@deepraxis/sdk 0.1.1-dev.d00e6d2 → 0.1.1-dev.d03c066
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 +268 -205
- package/README.md +5 -4
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +287 -177
- package/dist/generated/sdk.gen.js +819 -524
- package/dist/generated/types.gen.d.ts +4904 -2858
- package/dist/operations.generated.d.ts +1 -0
- package/dist/operations.generated.js +8120 -7218
- package/dist/resources.generated.d.ts +174 -126
- package/dist/resources.generated.js +156 -117
- package/package.json +1 -1
|
@@ -626,6 +626,31 @@ export const computersFilesContent = (options) => (options.client ?? client).get
|
|
|
626
626
|
url: '/agent/v1/computers/{computer_id}/files/content',
|
|
627
627
|
...options
|
|
628
628
|
});
|
|
629
|
+
/**
|
|
630
|
+
* Write computer file content
|
|
631
|
+
*
|
|
632
|
+
* Write the bytes of one existing file on a computer, only if the file is still the version you read.
|
|
633
|
+
*
|
|
634
|
+
* Send the raw bytes as the body (at most 16 MiB) and the version you edited in `If-Match`: the `version` field of the file listing (`<size>-<mtimeMs>`). The file must already exist; the write replaces it whole and keeps its permissions. A request without `If-Match` answers 428 FILE_VERSION_REQUIRED and nothing is written. When the file has changed since that version, the answer is 412 FILE_VERSION_MISMATCH with `error.current_version`, and nothing is written: read the file again, redo the edit and write with the new version. The version is checked against the file's current size and modification time, then the content digest is bound into the write itself, so a change that lands while the bytes are being written is refused instead of overwritten. Paths under /attachments and /skills are read-only (403 READ_ONLY). A successful write answers the new path, size, mtime and version; use that version for the next write.
|
|
635
|
+
*/
|
|
636
|
+
export const updateComputerFileContent = (options) => (options.client ?? client).put({
|
|
637
|
+
bodySerializer: null,
|
|
638
|
+
security: [{
|
|
639
|
+
key: 'BearerAuth',
|
|
640
|
+
scheme: 'bearer',
|
|
641
|
+
type: 'http'
|
|
642
|
+
}, {
|
|
643
|
+
key: 'ApiKeyAuth',
|
|
644
|
+
name: 'X-API-Key',
|
|
645
|
+
type: 'apiKey'
|
|
646
|
+
}],
|
|
647
|
+
url: '/agent/v1/computers/{computer_id}/files/content',
|
|
648
|
+
...options,
|
|
649
|
+
headers: {
|
|
650
|
+
'Content-Type': 'application/octet-stream',
|
|
651
|
+
...options.headers
|
|
652
|
+
}
|
|
653
|
+
});
|
|
629
654
|
/**
|
|
630
655
|
* Preview a computer file
|
|
631
656
|
*
|
|
@@ -1429,9 +1454,10 @@ export const browserSeleniumUnsupported = (options) => (options?.client ?? clien
|
|
|
1429
1454
|
/**
|
|
1430
1455
|
* List files
|
|
1431
1456
|
*
|
|
1432
|
-
* List live files owned by your tenant, optionally filtered by purpose or
|
|
1457
|
+
* List live files owned by your tenant, optionally filtered by purpose, session scope_id or up to 100 file ids. Results default to descending creation order with a limit of 10000. Page using after or before with a file ID from the list; these cursors are mutually exclusive. Deleted and expired files are excluded.
|
|
1433
1458
|
*/
|
|
1434
1459
|
export const fileListFiles = (options) => (options?.client ?? client).get({
|
|
1460
|
+
querySerializer: { parameters: { ids: { array: { explode: false } } } },
|
|
1435
1461
|
security: [{
|
|
1436
1462
|
key: 'BearerAuth',
|
|
1437
1463
|
scheme: 'bearer',
|
|
@@ -2641,11 +2667,11 @@ export const exportOrganizationCharges = (options) => (options.client ?? client)
|
|
|
2641
2667
|
...options
|
|
2642
2668
|
});
|
|
2643
2669
|
/**
|
|
2644
|
-
*
|
|
2670
|
+
* Upgrade to a full sandbox
|
|
2645
2671
|
*
|
|
2646
|
-
*
|
|
2672
|
+
* 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.
|
|
2647
2673
|
*/
|
|
2648
|
-
export const
|
|
2674
|
+
export const upgradeSandbox = (options) => (options.client ?? client).post({
|
|
2649
2675
|
security: [{
|
|
2650
2676
|
key: 'BearerAuth',
|
|
2651
2677
|
scheme: 'bearer',
|
|
@@ -2655,15 +2681,19 @@ export const listOrganizationDepartments = (options) => (options?.client ?? clie
|
|
|
2655
2681
|
name: 'X-API-Key',
|
|
2656
2682
|
type: 'apiKey'
|
|
2657
2683
|
}],
|
|
2658
|
-
url: '/
|
|
2659
|
-
...options
|
|
2684
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/upgrade',
|
|
2685
|
+
...options,
|
|
2686
|
+
headers: {
|
|
2687
|
+
'Content-Type': 'application/json',
|
|
2688
|
+
...options.headers
|
|
2689
|
+
}
|
|
2660
2690
|
});
|
|
2661
2691
|
/**
|
|
2662
|
-
*
|
|
2692
|
+
* Extend a running sandbox without shortening its deadline
|
|
2663
2693
|
*
|
|
2664
|
-
*
|
|
2694
|
+
* 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.
|
|
2665
2695
|
*/
|
|
2666
|
-
export const
|
|
2696
|
+
export const extendSandbox = (options) => (options.client ?? client).post({
|
|
2667
2697
|
security: [{
|
|
2668
2698
|
key: 'BearerAuth',
|
|
2669
2699
|
scheme: 'bearer',
|
|
@@ -2673,7 +2703,7 @@ export const establishOrganizationDepartment = (options) => (options.client ?? c
|
|
|
2673
2703
|
name: 'X-API-Key',
|
|
2674
2704
|
type: 'apiKey'
|
|
2675
2705
|
}],
|
|
2676
|
-
url: '/
|
|
2706
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/extend',
|
|
2677
2707
|
...options,
|
|
2678
2708
|
headers: {
|
|
2679
2709
|
'Content-Type': 'application/json',
|
|
@@ -2681,11 +2711,11 @@ export const establishOrganizationDepartment = (options) => (options.client ?? c
|
|
|
2681
2711
|
}
|
|
2682
2712
|
});
|
|
2683
2713
|
/**
|
|
2684
|
-
*
|
|
2714
|
+
* List live processes and retained observations
|
|
2685
2715
|
*
|
|
2686
|
-
*
|
|
2716
|
+
* 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.
|
|
2687
2717
|
*/
|
|
2688
|
-
export const
|
|
2718
|
+
export const listObservedProcesses = (options) => (options.client ?? client).get({
|
|
2689
2719
|
security: [{
|
|
2690
2720
|
key: 'BearerAuth',
|
|
2691
2721
|
scheme: 'bearer',
|
|
@@ -2695,15 +2725,33 @@ export const getOrganizationDepartment = (options) => (options.client ?? client)
|
|
|
2695
2725
|
name: 'X-API-Key',
|
|
2696
2726
|
type: 'apiKey'
|
|
2697
2727
|
}],
|
|
2698
|
-
url: '/
|
|
2728
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/processes',
|
|
2699
2729
|
...options
|
|
2700
2730
|
});
|
|
2701
2731
|
/**
|
|
2702
|
-
*
|
|
2732
|
+
* Read bounded observed process output
|
|
2703
2733
|
*
|
|
2704
|
-
*
|
|
2734
|
+
* 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.
|
|
2705
2735
|
*/
|
|
2706
|
-
export const
|
|
2736
|
+
export const getObservedProcessOutput = (options) => (options.client ?? client).get({
|
|
2737
|
+
security: [{
|
|
2738
|
+
key: 'BearerAuth',
|
|
2739
|
+
scheme: 'bearer',
|
|
2740
|
+
type: 'http'
|
|
2741
|
+
}, {
|
|
2742
|
+
key: 'ApiKeyAuth',
|
|
2743
|
+
name: 'X-API-Key',
|
|
2744
|
+
type: 'apiKey'
|
|
2745
|
+
}],
|
|
2746
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/processes/{processID}/output',
|
|
2747
|
+
...options
|
|
2748
|
+
});
|
|
2749
|
+
/**
|
|
2750
|
+
* Start a task whose output is pushed off the machine while it runs
|
|
2751
|
+
*
|
|
2752
|
+
* 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.
|
|
2753
|
+
*/
|
|
2754
|
+
export const startSandboxTask = (options) => (options.client ?? client).post({
|
|
2707
2755
|
security: [{
|
|
2708
2756
|
key: 'BearerAuth',
|
|
2709
2757
|
scheme: 'bearer',
|
|
@@ -2713,7 +2761,7 @@ export const reorganizeOrganizationDepartment = (options) => (options.client ??
|
|
|
2713
2761
|
name: 'X-API-Key',
|
|
2714
2762
|
type: 'apiKey'
|
|
2715
2763
|
}],
|
|
2716
|
-
url: '/
|
|
2764
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/tasks',
|
|
2717
2765
|
...options,
|
|
2718
2766
|
headers: {
|
|
2719
2767
|
'Content-Type': 'application/json',
|
|
@@ -2721,11 +2769,11 @@ export const reorganizeOrganizationDepartment = (options) => (options.client ??
|
|
|
2721
2769
|
}
|
|
2722
2770
|
});
|
|
2723
2771
|
/**
|
|
2724
|
-
*
|
|
2772
|
+
* Read a range of a task's pushed output
|
|
2725
2773
|
*
|
|
2726
|
-
*
|
|
2774
|
+
* 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.
|
|
2727
2775
|
*/
|
|
2728
|
-
export const
|
|
2776
|
+
export const getSandboxTaskLog = (options) => (options.client ?? client).get({
|
|
2729
2777
|
security: [{
|
|
2730
2778
|
key: 'BearerAuth',
|
|
2731
2779
|
scheme: 'bearer',
|
|
@@ -2735,15 +2783,89 @@ export const dissolveOrganizationDepartment = (options) => (options.client ?? cl
|
|
|
2735
2783
|
name: 'X-API-Key',
|
|
2736
2784
|
type: 'apiKey'
|
|
2737
2785
|
}],
|
|
2738
|
-
url: '/
|
|
2786
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/tasks/{taskID}/log',
|
|
2739
2787
|
...options
|
|
2740
2788
|
});
|
|
2741
2789
|
/**
|
|
2742
|
-
*
|
|
2790
|
+
* Kill sandbox
|
|
2743
2791
|
*
|
|
2744
|
-
*
|
|
2792
|
+
* 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.
|
|
2745
2793
|
*/
|
|
2746
|
-
export const
|
|
2794
|
+
export const deleteSandboxV1SandboxesBySandboxId = (options) => (options.client ?? client).delete({
|
|
2795
|
+
security: [
|
|
2796
|
+
{
|
|
2797
|
+
key: 'sandbox-ApiKeyAuth',
|
|
2798
|
+
name: 'X-API-Key',
|
|
2799
|
+
type: 'apiKey'
|
|
2800
|
+
},
|
|
2801
|
+
{
|
|
2802
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
2803
|
+
scheme: 'bearer',
|
|
2804
|
+
type: 'http'
|
|
2805
|
+
},
|
|
2806
|
+
{
|
|
2807
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
2808
|
+
name: 'X-Team-ID',
|
|
2809
|
+
type: 'apiKey'
|
|
2810
|
+
},
|
|
2811
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
2812
|
+
{
|
|
2813
|
+
key: 'sandbox-AdminTeamAuth',
|
|
2814
|
+
name: 'X-Team-ID',
|
|
2815
|
+
type: 'apiKey'
|
|
2816
|
+
},
|
|
2817
|
+
{
|
|
2818
|
+
key: 'sandbox-AdminJWTAuth',
|
|
2819
|
+
scheme: 'bearer',
|
|
2820
|
+
type: 'http'
|
|
2821
|
+
}
|
|
2822
|
+
],
|
|
2823
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}',
|
|
2824
|
+
...options
|
|
2825
|
+
});
|
|
2826
|
+
/**
|
|
2827
|
+
* Sandbox
|
|
2828
|
+
*
|
|
2829
|
+
* 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.
|
|
2830
|
+
*/
|
|
2831
|
+
export const getSandboxV1SandboxesBySandboxId = (options) => (options.client ?? client).get({
|
|
2832
|
+
security: [
|
|
2833
|
+
{
|
|
2834
|
+
key: 'sandbox-ApiKeyAuth',
|
|
2835
|
+
name: 'X-API-Key',
|
|
2836
|
+
type: 'apiKey'
|
|
2837
|
+
},
|
|
2838
|
+
{
|
|
2839
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
2840
|
+
scheme: 'bearer',
|
|
2841
|
+
type: 'http'
|
|
2842
|
+
},
|
|
2843
|
+
{
|
|
2844
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
2845
|
+
name: 'X-Team-ID',
|
|
2846
|
+
type: 'apiKey'
|
|
2847
|
+
},
|
|
2848
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
2849
|
+
{
|
|
2850
|
+
key: 'sandbox-AdminTeamAuth',
|
|
2851
|
+
name: 'X-Team-ID',
|
|
2852
|
+
type: 'apiKey'
|
|
2853
|
+
},
|
|
2854
|
+
{
|
|
2855
|
+
key: 'sandbox-AdminJWTAuth',
|
|
2856
|
+
scheme: 'bearer',
|
|
2857
|
+
type: 'http'
|
|
2858
|
+
}
|
|
2859
|
+
],
|
|
2860
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}',
|
|
2861
|
+
...options
|
|
2862
|
+
});
|
|
2863
|
+
/**
|
|
2864
|
+
* Rename a sandbox
|
|
2865
|
+
*
|
|
2866
|
+
* 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.
|
|
2867
|
+
*/
|
|
2868
|
+
export const renameSandbox = (options) => (options.client ?? client).patch({
|
|
2747
2869
|
security: [{
|
|
2748
2870
|
key: 'BearerAuth',
|
|
2749
2871
|
scheme: 'bearer',
|
|
@@ -2753,7 +2875,7 @@ export const amendOrganizationDepartmentCharter = (options) => (options.client ?
|
|
|
2753
2875
|
name: 'X-API-Key',
|
|
2754
2876
|
type: 'apiKey'
|
|
2755
2877
|
}],
|
|
2756
|
-
url: '/
|
|
2878
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}',
|
|
2757
2879
|
...options,
|
|
2758
2880
|
headers: {
|
|
2759
2881
|
'Content-Type': 'application/json',
|
|
@@ -2761,11 +2883,13 @@ export const amendOrganizationDepartmentCharter = (options) => (options.client ?
|
|
|
2761
2883
|
}
|
|
2762
2884
|
});
|
|
2763
2885
|
/**
|
|
2764
|
-
*
|
|
2886
|
+
* Act on a phone sandbox's screen
|
|
2765
2887
|
*
|
|
2766
|
-
*
|
|
2888
|
+
* 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.
|
|
2889
|
+
*
|
|
2890
|
+
* 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.
|
|
2767
2891
|
*/
|
|
2768
|
-
export const
|
|
2892
|
+
export const actOnSandboxDisplay = (options) => (options.client ?? client).post({
|
|
2769
2893
|
security: [{
|
|
2770
2894
|
key: 'BearerAuth',
|
|
2771
2895
|
scheme: 'bearer',
|
|
@@ -2775,15 +2899,19 @@ export const listOrganizationJobs = (options) => (options?.client ?? client).get
|
|
|
2775
2899
|
name: 'X-API-Key',
|
|
2776
2900
|
type: 'apiKey'
|
|
2777
2901
|
}],
|
|
2778
|
-
url: '/
|
|
2779
|
-
...options
|
|
2902
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/act',
|
|
2903
|
+
...options,
|
|
2904
|
+
headers: {
|
|
2905
|
+
'Content-Type': 'application/json',
|
|
2906
|
+
...options.headers
|
|
2907
|
+
}
|
|
2780
2908
|
});
|
|
2781
2909
|
/**
|
|
2782
|
-
*
|
|
2910
|
+
* Remove a file or directory in the sandbox
|
|
2783
2911
|
*
|
|
2784
|
-
*
|
|
2912
|
+
* 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.
|
|
2785
2913
|
*/
|
|
2786
|
-
export const
|
|
2914
|
+
export const removeSandboxFile = (options) => (options.client ?? client).delete({
|
|
2787
2915
|
security: [{
|
|
2788
2916
|
key: 'BearerAuth',
|
|
2789
2917
|
scheme: 'bearer',
|
|
@@ -2793,19 +2921,15 @@ export const defineOrganizationJob = (options) => (options.client ?? client).pos
|
|
|
2793
2921
|
name: 'X-API-Key',
|
|
2794
2922
|
type: 'apiKey'
|
|
2795
2923
|
}],
|
|
2796
|
-
url: '/
|
|
2797
|
-
...options
|
|
2798
|
-
headers: {
|
|
2799
|
-
'Content-Type': 'application/json',
|
|
2800
|
-
...options.headers
|
|
2801
|
-
}
|
|
2924
|
+
url: '/sandbox/v1/sandboxes/{sandbox_id}/files',
|
|
2925
|
+
...options
|
|
2802
2926
|
});
|
|
2803
2927
|
/**
|
|
2804
|
-
*
|
|
2928
|
+
* Read a file in the sandbox
|
|
2805
2929
|
*
|
|
2806
|
-
*
|
|
2930
|
+
* 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.
|
|
2807
2931
|
*/
|
|
2808
|
-
export const
|
|
2932
|
+
export const readSandboxFile = (options) => (options.client ?? client).get({
|
|
2809
2933
|
security: [{
|
|
2810
2934
|
key: 'BearerAuth',
|
|
2811
2935
|
scheme: 'bearer',
|
|
@@ -2815,15 +2939,15 @@ export const getOrganizationJob = (options) => (options.client ?? client).get({
|
|
|
2815
2939
|
name: 'X-API-Key',
|
|
2816
2940
|
type: 'apiKey'
|
|
2817
2941
|
}],
|
|
2818
|
-
url: '/
|
|
2942
|
+
url: '/sandbox/v1/sandboxes/{sandbox_id}/files',
|
|
2819
2943
|
...options
|
|
2820
2944
|
});
|
|
2821
2945
|
/**
|
|
2822
|
-
*
|
|
2946
|
+
* Write a file in the sandbox
|
|
2823
2947
|
*
|
|
2824
|
-
*
|
|
2948
|
+
* 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"}.
|
|
2825
2949
|
*/
|
|
2826
|
-
export const
|
|
2950
|
+
export const writeSandboxFile = (options) => (options.client ?? client).put({
|
|
2827
2951
|
security: [{
|
|
2828
2952
|
key: 'BearerAuth',
|
|
2829
2953
|
scheme: 'bearer',
|
|
@@ -2833,7 +2957,7 @@ export const reviseOrganizationJob = (options) => (options.client ?? client).pat
|
|
|
2833
2957
|
name: 'X-API-Key',
|
|
2834
2958
|
type: 'apiKey'
|
|
2835
2959
|
}],
|
|
2836
|
-
url: '/
|
|
2960
|
+
url: '/sandbox/v1/sandboxes/{sandbox_id}/files',
|
|
2837
2961
|
...options,
|
|
2838
2962
|
headers: {
|
|
2839
2963
|
'Content-Type': 'application/json',
|
|
@@ -2841,11 +2965,11 @@ export const reviseOrganizationJob = (options) => (options.client ?? client).pat
|
|
|
2841
2965
|
}
|
|
2842
2966
|
});
|
|
2843
2967
|
/**
|
|
2844
|
-
*
|
|
2968
|
+
* List files in a sandbox directory
|
|
2845
2969
|
*
|
|
2846
|
-
*
|
|
2970
|
+
* 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.
|
|
2847
2971
|
*/
|
|
2848
|
-
export const
|
|
2972
|
+
export const listSandboxFiles = (options) => (options.client ?? client).get({
|
|
2849
2973
|
security: [{
|
|
2850
2974
|
key: 'BearerAuth',
|
|
2851
2975
|
scheme: 'bearer',
|
|
@@ -2855,15 +2979,15 @@ export const retireOrganizationJob = (options) => (options.client ?? client).pos
|
|
|
2855
2979
|
name: 'X-API-Key',
|
|
2856
2980
|
type: 'apiKey'
|
|
2857
2981
|
}],
|
|
2858
|
-
url: '/
|
|
2982
|
+
url: '/sandbox/v1/sandboxes/{sandbox_id}/files:list',
|
|
2859
2983
|
...options
|
|
2860
2984
|
});
|
|
2861
2985
|
/**
|
|
2862
|
-
*
|
|
2986
|
+
* Create a directory in the sandbox
|
|
2863
2987
|
*
|
|
2864
|
-
*
|
|
2988
|
+
* 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.
|
|
2865
2989
|
*/
|
|
2866
|
-
export const
|
|
2990
|
+
export const makeSandboxDirectory = (options) => (options.client ?? client).post({
|
|
2867
2991
|
security: [{
|
|
2868
2992
|
key: 'BearerAuth',
|
|
2869
2993
|
scheme: 'bearer',
|
|
@@ -2873,15 +2997,15 @@ export const listOrganizationLadders = (options) => (options?.client ?? client).
|
|
|
2873
2997
|
name: 'X-API-Key',
|
|
2874
2998
|
type: 'apiKey'
|
|
2875
2999
|
}],
|
|
2876
|
-
url: '/
|
|
3000
|
+
url: '/sandbox/v1/sandboxes/{sandbox_id}/files:makeDir',
|
|
2877
3001
|
...options
|
|
2878
3002
|
});
|
|
2879
3003
|
/**
|
|
2880
|
-
*
|
|
3004
|
+
* Run a command in the sandbox
|
|
2881
3005
|
*
|
|
2882
|
-
*
|
|
3006
|
+
* 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"}.
|
|
2883
3007
|
*/
|
|
2884
|
-
export const
|
|
3008
|
+
export const runSandboxCommand = (options) => (options.client ?? client).post({
|
|
2885
3009
|
security: [{
|
|
2886
3010
|
key: 'BearerAuth',
|
|
2887
3011
|
scheme: 'bearer',
|
|
@@ -2891,7 +3015,7 @@ export const defineOrganizationLadder = (options) => (options.client ?? client).
|
|
|
2891
3015
|
name: 'X-API-Key',
|
|
2892
3016
|
type: 'apiKey'
|
|
2893
3017
|
}],
|
|
2894
|
-
url: '/
|
|
3018
|
+
url: '/sandbox/v1/sandboxes/{sandbox_id}/commands',
|
|
2895
3019
|
...options,
|
|
2896
3020
|
headers: {
|
|
2897
3021
|
'Content-Type': 'application/json',
|
|
@@ -2899,11 +3023,11 @@ export const defineOrganizationLadder = (options) => (options.client ?? client).
|
|
|
2899
3023
|
}
|
|
2900
3024
|
});
|
|
2901
3025
|
/**
|
|
2902
|
-
*
|
|
3026
|
+
* Start adding a phone of your own
|
|
2903
3027
|
*
|
|
2904
|
-
*
|
|
3028
|
+
* 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'}.
|
|
2905
3029
|
*/
|
|
2906
|
-
export const
|
|
3030
|
+
export const createByodPairing = (options) => (options?.client ?? client).post({
|
|
2907
3031
|
security: [{
|
|
2908
3032
|
key: 'BearerAuth',
|
|
2909
3033
|
scheme: 'bearer',
|
|
@@ -2913,15 +3037,15 @@ export const getOrganizationLadder = (options) => (options.client ?? client).get
|
|
|
2913
3037
|
name: 'X-API-Key',
|
|
2914
3038
|
type: 'apiKey'
|
|
2915
3039
|
}],
|
|
2916
|
-
url: '/
|
|
3040
|
+
url: '/sandbox/v1/byod/pairings',
|
|
2917
3041
|
...options
|
|
2918
3042
|
});
|
|
2919
3043
|
/**
|
|
2920
|
-
*
|
|
3044
|
+
* List your organization's own devices
|
|
2921
3045
|
*
|
|
2922
|
-
*
|
|
3046
|
+
* 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:[]}]}.
|
|
2923
3047
|
*/
|
|
2924
|
-
export const
|
|
3048
|
+
export const listByodDevices = (options) => (options?.client ?? client).get({
|
|
2925
3049
|
security: [{
|
|
2926
3050
|
key: 'BearerAuth',
|
|
2927
3051
|
scheme: 'bearer',
|
|
@@ -2931,19 +3055,15 @@ export const reviseOrganizationLadder = (options) => (options.client ?? client).
|
|
|
2931
3055
|
name: 'X-API-Key',
|
|
2932
3056
|
type: 'apiKey'
|
|
2933
3057
|
}],
|
|
2934
|
-
url: '/
|
|
2935
|
-
...options
|
|
2936
|
-
headers: {
|
|
2937
|
-
'Content-Type': 'application/json',
|
|
2938
|
-
...options.headers
|
|
2939
|
-
}
|
|
3058
|
+
url: '/sandbox/v1/byod/devices',
|
|
3059
|
+
...options
|
|
2940
3060
|
});
|
|
2941
3061
|
/**
|
|
2942
|
-
*
|
|
3062
|
+
* Read one of your organization's devices
|
|
2943
3063
|
*
|
|
2944
|
-
*
|
|
3064
|
+
* 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.
|
|
2945
3065
|
*/
|
|
2946
|
-
export const
|
|
3066
|
+
export const getByodDevice = (options) => (options.client ?? client).get({
|
|
2947
3067
|
security: [{
|
|
2948
3068
|
key: 'BearerAuth',
|
|
2949
3069
|
scheme: 'bearer',
|
|
@@ -2953,15 +3073,15 @@ export const listOrganizationPositions = (options) => (options?.client ?? client
|
|
|
2953
3073
|
name: 'X-API-Key',
|
|
2954
3074
|
type: 'apiKey'
|
|
2955
3075
|
}],
|
|
2956
|
-
url: '/
|
|
3076
|
+
url: '/sandbox/v1/byod/devices/{deviceID}',
|
|
2957
3077
|
...options
|
|
2958
3078
|
});
|
|
2959
3079
|
/**
|
|
2960
|
-
*
|
|
3080
|
+
* Rename one of your organization's devices
|
|
2961
3081
|
*
|
|
2962
|
-
*
|
|
3082
|
+
* 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.
|
|
2963
3083
|
*/
|
|
2964
|
-
export const
|
|
3084
|
+
export const updateByodDevice = (options) => (options.client ?? client).patch({
|
|
2965
3085
|
security: [{
|
|
2966
3086
|
key: 'BearerAuth',
|
|
2967
3087
|
scheme: 'bearer',
|
|
@@ -2971,7 +3091,7 @@ export const openOrganizationPositions = (options) => (options.client ?? client)
|
|
|
2971
3091
|
name: 'X-API-Key',
|
|
2972
3092
|
type: 'apiKey'
|
|
2973
3093
|
}],
|
|
2974
|
-
url: '/
|
|
3094
|
+
url: '/sandbox/v1/byod/devices/{deviceID}',
|
|
2975
3095
|
...options,
|
|
2976
3096
|
headers: {
|
|
2977
3097
|
'Content-Type': 'application/json',
|
|
@@ -2979,11 +3099,11 @@ export const openOrganizationPositions = (options) => (options.client ?? client)
|
|
|
2979
3099
|
}
|
|
2980
3100
|
});
|
|
2981
3101
|
/**
|
|
2982
|
-
*
|
|
3102
|
+
* Disconnect a device and revoke its credential
|
|
2983
3103
|
*
|
|
2984
|
-
*
|
|
3104
|
+
* 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}.
|
|
2985
3105
|
*/
|
|
2986
|
-
export const
|
|
3106
|
+
export const disconnectByodDevice = (options) => (options.client ?? client).post({
|
|
2987
3107
|
security: [{
|
|
2988
3108
|
key: 'BearerAuth',
|
|
2989
3109
|
scheme: 'bearer',
|
|
@@ -2993,15 +3113,33 @@ export const getOrganizationPosition = (options) => (options.client ?? client).g
|
|
|
2993
3113
|
name: 'X-API-Key',
|
|
2994
3114
|
type: 'apiKey'
|
|
2995
3115
|
}],
|
|
2996
|
-
url: '/
|
|
3116
|
+
url: '/sandbox/v1/byod/devices/{deviceID}/disconnect',
|
|
2997
3117
|
...options
|
|
2998
3118
|
});
|
|
2999
3119
|
/**
|
|
3000
|
-
*
|
|
3120
|
+
* Read a pairing for the phone's Allow screen
|
|
3001
3121
|
*
|
|
3002
|
-
*
|
|
3122
|
+
* 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'}.
|
|
3003
3123
|
*/
|
|
3004
|
-
export const
|
|
3124
|
+
export const getByodPairing = (options) => (options.client ?? client).get({
|
|
3125
|
+
security: [{
|
|
3126
|
+
key: 'BearerAuth',
|
|
3127
|
+
scheme: 'bearer',
|
|
3128
|
+
type: 'http'
|
|
3129
|
+
}, {
|
|
3130
|
+
key: 'ApiKeyAuth',
|
|
3131
|
+
name: 'X-API-Key',
|
|
3132
|
+
type: 'apiKey'
|
|
3133
|
+
}],
|
|
3134
|
+
url: '/sandbox/v1/byod/pairings/{code}',
|
|
3135
|
+
...options
|
|
3136
|
+
});
|
|
3137
|
+
/**
|
|
3138
|
+
* Claim a pairing and register the phone
|
|
3139
|
+
*
|
|
3140
|
+
* 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/'}.
|
|
3141
|
+
*/
|
|
3142
|
+
export const claimByodPairing = (options) => (options.client ?? client).post({
|
|
3005
3143
|
security: [{
|
|
3006
3144
|
key: 'BearerAuth',
|
|
3007
3145
|
scheme: 'bearer',
|
|
@@ -3011,7 +3149,7 @@ export const reviseOrganizationPosition = (options) => (options.client ?? client
|
|
|
3011
3149
|
name: 'X-API-Key',
|
|
3012
3150
|
type: 'apiKey'
|
|
3013
3151
|
}],
|
|
3014
|
-
url: '/
|
|
3152
|
+
url: '/sandbox/v1/byod/pairings/{code}/claim',
|
|
3015
3153
|
...options,
|
|
3016
3154
|
headers: {
|
|
3017
3155
|
'Content-Type': 'application/json',
|
|
@@ -3019,11 +3157,11 @@ export const reviseOrganizationPosition = (options) => (options.client ?? client
|
|
|
3019
3157
|
}
|
|
3020
3158
|
});
|
|
3021
3159
|
/**
|
|
3022
|
-
*
|
|
3160
|
+
* List departments
|
|
3023
3161
|
*
|
|
3024
|
-
*
|
|
3162
|
+
* 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.
|
|
3025
3163
|
*/
|
|
3026
|
-
export const
|
|
3164
|
+
export const listOrganizationDepartments = (options) => (options?.client ?? client).get({
|
|
3027
3165
|
security: [{
|
|
3028
3166
|
key: 'BearerAuth',
|
|
3029
3167
|
scheme: 'bearer',
|
|
@@ -3033,15 +3171,15 @@ export const closeOrganizationPosition = (options) => (options.client ?? client)
|
|
|
3033
3171
|
name: 'X-API-Key',
|
|
3034
3172
|
type: 'apiKey'
|
|
3035
3173
|
}],
|
|
3036
|
-
url: '/
|
|
3174
|
+
url: '/workforce/v1/departments',
|
|
3037
3175
|
...options
|
|
3038
3176
|
});
|
|
3039
3177
|
/**
|
|
3040
|
-
*
|
|
3178
|
+
* Establish a department
|
|
3041
3179
|
*
|
|
3042
|
-
*
|
|
3180
|
+
* 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 and no charter: 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"}.
|
|
3043
3181
|
*/
|
|
3044
|
-
export const
|
|
3182
|
+
export const establishOrganizationDepartment = (options) => (options.client ?? client).post({
|
|
3045
3183
|
security: [{
|
|
3046
3184
|
key: 'BearerAuth',
|
|
3047
3185
|
scheme: 'bearer',
|
|
@@ -3051,15 +3189,19 @@ export const freezeOrganizationPosition = (options) => (options.client ?? client
|
|
|
3051
3189
|
name: 'X-API-Key',
|
|
3052
3190
|
type: 'apiKey'
|
|
3053
3191
|
}],
|
|
3054
|
-
url: '/
|
|
3055
|
-
...options
|
|
3192
|
+
url: '/workforce/v1/departments',
|
|
3193
|
+
...options,
|
|
3194
|
+
headers: {
|
|
3195
|
+
'Content-Type': 'application/json',
|
|
3196
|
+
...options.headers
|
|
3197
|
+
}
|
|
3056
3198
|
});
|
|
3057
3199
|
/**
|
|
3058
|
-
*
|
|
3200
|
+
* Get a department
|
|
3059
3201
|
*
|
|
3060
|
-
*
|
|
3202
|
+
* Reads one department with its head position id and its charter, including the charter revision you need before amending the charter. 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.
|
|
3061
3203
|
*/
|
|
3062
|
-
export const
|
|
3204
|
+
export const getOrganizationDepartment = (options) => (options.client ?? client).get({
|
|
3063
3205
|
security: [{
|
|
3064
3206
|
key: 'BearerAuth',
|
|
3065
3207
|
scheme: 'bearer',
|
|
@@ -3069,15 +3211,15 @@ export const unfreezeOrganizationPosition = (options) => (options.client ?? clie
|
|
|
3069
3211
|
name: 'X-API-Key',
|
|
3070
3212
|
type: 'apiKey'
|
|
3071
3213
|
}],
|
|
3072
|
-
url: '/
|
|
3214
|
+
url: '/workforce/v1/departments/{id}',
|
|
3073
3215
|
...options
|
|
3074
3216
|
});
|
|
3075
3217
|
/**
|
|
3076
|
-
*
|
|
3218
|
+
* Reorganize a department
|
|
3077
3219
|
*
|
|
3078
|
-
*
|
|
3220
|
+
* 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.
|
|
3079
3221
|
*/
|
|
3080
|
-
export const
|
|
3222
|
+
export const reorganizeOrganizationDepartment = (options) => (options.client ?? client).patch({
|
|
3081
3223
|
security: [{
|
|
3082
3224
|
key: 'BearerAuth',
|
|
3083
3225
|
scheme: 'bearer',
|
|
@@ -3087,7 +3229,7 @@ export const reassignOrganizationPositionManager = (options) => (options.client
|
|
|
3087
3229
|
name: 'X-API-Key',
|
|
3088
3230
|
type: 'apiKey'
|
|
3089
3231
|
}],
|
|
3090
|
-
url: '/
|
|
3232
|
+
url: '/workforce/v1/departments/{id}',
|
|
3091
3233
|
...options,
|
|
3092
3234
|
headers: {
|
|
3093
3235
|
'Content-Type': 'application/json',
|
|
@@ -3095,11 +3237,29 @@ export const reassignOrganizationPositionManager = (options) => (options.client
|
|
|
3095
3237
|
}
|
|
3096
3238
|
});
|
|
3097
3239
|
/**
|
|
3098
|
-
*
|
|
3240
|
+
* Dissolve a department
|
|
3099
3241
|
*
|
|
3100
|
-
*
|
|
3242
|
+
* 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.
|
|
3101
3243
|
*/
|
|
3102
|
-
export const
|
|
3244
|
+
export const dissolveOrganizationDepartment = (options) => (options.client ?? client).post({
|
|
3245
|
+
security: [{
|
|
3246
|
+
key: 'BearerAuth',
|
|
3247
|
+
scheme: 'bearer',
|
|
3248
|
+
type: 'http'
|
|
3249
|
+
}, {
|
|
3250
|
+
key: 'ApiKeyAuth',
|
|
3251
|
+
name: 'X-API-Key',
|
|
3252
|
+
type: 'apiKey'
|
|
3253
|
+
}],
|
|
3254
|
+
url: '/workforce/v1/departments/{id}/dissolve',
|
|
3255
|
+
...options
|
|
3256
|
+
});
|
|
3257
|
+
/**
|
|
3258
|
+
* Amend a department charter
|
|
3259
|
+
*
|
|
3260
|
+
* 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.
|
|
3261
|
+
*/
|
|
3262
|
+
export const amendOrganizationDepartmentCharter = (options) => (options.client ?? client).put({
|
|
3103
3263
|
security: [{
|
|
3104
3264
|
key: 'BearerAuth',
|
|
3105
3265
|
scheme: 'bearer',
|
|
@@ -3109,7 +3269,7 @@ export const regradeOrganizationPosition = (options) => (options.client ?? clien
|
|
|
3109
3269
|
name: 'X-API-Key',
|
|
3110
3270
|
type: 'apiKey'
|
|
3111
3271
|
}],
|
|
3112
|
-
url: '/
|
|
3272
|
+
url: '/workforce/v1/departments/{id}/charter',
|
|
3113
3273
|
...options,
|
|
3114
3274
|
headers: {
|
|
3115
3275
|
'Content-Type': 'application/json',
|
|
@@ -3117,11 +3277,11 @@ export const regradeOrganizationPosition = (options) => (options.client ?? clien
|
|
|
3117
3277
|
}
|
|
3118
3278
|
});
|
|
3119
3279
|
/**
|
|
3120
|
-
*
|
|
3280
|
+
* List jobs
|
|
3121
3281
|
*
|
|
3122
|
-
*
|
|
3282
|
+
* 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.
|
|
3123
3283
|
*/
|
|
3124
|
-
export const
|
|
3284
|
+
export const listOrganizationJobs = (options) => (options?.client ?? client).get({
|
|
3125
3285
|
security: [{
|
|
3126
3286
|
key: 'BearerAuth',
|
|
3127
3287
|
scheme: 'bearer',
|
|
@@ -3131,15 +3291,15 @@ export const designateOrganizationPositionHead = (options) => (options.client ??
|
|
|
3131
3291
|
name: 'X-API-Key',
|
|
3132
3292
|
type: 'apiKey'
|
|
3133
3293
|
}],
|
|
3134
|
-
url: '/
|
|
3294
|
+
url: '/workforce/v1/jobs',
|
|
3135
3295
|
...options
|
|
3136
3296
|
});
|
|
3137
3297
|
/**
|
|
3138
|
-
*
|
|
3298
|
+
* Define a job
|
|
3139
3299
|
*
|
|
3140
|
-
*
|
|
3300
|
+
* 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."}.
|
|
3141
3301
|
*/
|
|
3142
|
-
export const
|
|
3302
|
+
export const defineOrganizationJob = (options) => (options.client ?? client).post({
|
|
3143
3303
|
security: [{
|
|
3144
3304
|
key: 'BearerAuth',
|
|
3145
3305
|
scheme: 'bearer',
|
|
@@ -3149,7 +3309,7 @@ export const hireOrganizationPosition = (options) => (options.client ?? client).
|
|
|
3149
3309
|
name: 'X-API-Key',
|
|
3150
3310
|
type: 'apiKey'
|
|
3151
3311
|
}],
|
|
3152
|
-
url: '/
|
|
3312
|
+
url: '/workforce/v1/jobs',
|
|
3153
3313
|
...options,
|
|
3154
3314
|
headers: {
|
|
3155
3315
|
'Content-Type': 'application/json',
|
|
@@ -3157,11 +3317,29 @@ export const hireOrganizationPosition = (options) => (options.client ?? client).
|
|
|
3157
3317
|
}
|
|
3158
3318
|
});
|
|
3159
3319
|
/**
|
|
3160
|
-
*
|
|
3320
|
+
* Get a job
|
|
3161
3321
|
*
|
|
3162
|
-
*
|
|
3322
|
+
* 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.
|
|
3163
3323
|
*/
|
|
3164
|
-
export const
|
|
3324
|
+
export const getOrganizationJob = (options) => (options.client ?? client).get({
|
|
3325
|
+
security: [{
|
|
3326
|
+
key: 'BearerAuth',
|
|
3327
|
+
scheme: 'bearer',
|
|
3328
|
+
type: 'http'
|
|
3329
|
+
}, {
|
|
3330
|
+
key: 'ApiKeyAuth',
|
|
3331
|
+
name: 'X-API-Key',
|
|
3332
|
+
type: 'apiKey'
|
|
3333
|
+
}],
|
|
3334
|
+
url: '/workforce/v1/jobs/{id}',
|
|
3335
|
+
...options
|
|
3336
|
+
});
|
|
3337
|
+
/**
|
|
3338
|
+
* Revise a job
|
|
3339
|
+
*
|
|
3340
|
+
* 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.
|
|
3341
|
+
*/
|
|
3342
|
+
export const reviseOrganizationJob = (options) => (options.client ?? client).patch({
|
|
3165
3343
|
security: [{
|
|
3166
3344
|
key: 'BearerAuth',
|
|
3167
3345
|
scheme: 'bearer',
|
|
@@ -3171,7 +3349,7 @@ export const replaceOrganizationPositionHolder = (options) => (options.client ??
|
|
|
3171
3349
|
name: 'X-API-Key',
|
|
3172
3350
|
type: 'apiKey'
|
|
3173
3351
|
}],
|
|
3174
|
-
url: '/
|
|
3352
|
+
url: '/workforce/v1/jobs/{id}',
|
|
3175
3353
|
...options,
|
|
3176
3354
|
headers: {
|
|
3177
3355
|
'Content-Type': 'application/json',
|
|
@@ -3179,11 +3357,11 @@ export const replaceOrganizationPositionHolder = (options) => (options.client ??
|
|
|
3179
3357
|
}
|
|
3180
3358
|
});
|
|
3181
3359
|
/**
|
|
3182
|
-
*
|
|
3360
|
+
* Retire a job
|
|
3183
3361
|
*
|
|
3184
|
-
*
|
|
3362
|
+
* 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.
|
|
3185
3363
|
*/
|
|
3186
|
-
export const
|
|
3364
|
+
export const retireOrganizationJob = (options) => (options.client ?? client).post({
|
|
3187
3365
|
security: [{
|
|
3188
3366
|
key: 'BearerAuth',
|
|
3189
3367
|
scheme: 'bearer',
|
|
@@ -3193,15 +3371,15 @@ export const listOrganizationAssignments = (options) => (options?.client ?? clie
|
|
|
3193
3371
|
name: 'X-API-Key',
|
|
3194
3372
|
type: 'apiKey'
|
|
3195
3373
|
}],
|
|
3196
|
-
url: '/
|
|
3374
|
+
url: '/workforce/v1/jobs/{id}/retire',
|
|
3197
3375
|
...options
|
|
3198
3376
|
});
|
|
3199
3377
|
/**
|
|
3200
|
-
*
|
|
3378
|
+
* List job ladders
|
|
3201
3379
|
*
|
|
3202
|
-
*
|
|
3380
|
+
* 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.
|
|
3203
3381
|
*/
|
|
3204
|
-
export const
|
|
3382
|
+
export const listOrganizationLadders = (options) => (options?.client ?? client).get({
|
|
3205
3383
|
security: [{
|
|
3206
3384
|
key: 'BearerAuth',
|
|
3207
3385
|
scheme: 'bearer',
|
|
@@ -3211,15 +3389,15 @@ export const getOrganizationAssignment = (options) => (options.client ?? client)
|
|
|
3211
3389
|
name: 'X-API-Key',
|
|
3212
3390
|
type: 'apiKey'
|
|
3213
3391
|
}],
|
|
3214
|
-
url: '/
|
|
3392
|
+
url: '/workforce/v1/ladders',
|
|
3215
3393
|
...options
|
|
3216
3394
|
});
|
|
3217
3395
|
/**
|
|
3218
|
-
*
|
|
3396
|
+
* Define a job ladder
|
|
3219
3397
|
*
|
|
3220
|
-
*
|
|
3398
|
+
* 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}]}.
|
|
3221
3399
|
*/
|
|
3222
|
-
export const
|
|
3400
|
+
export const defineOrganizationLadder = (options) => (options.client ?? client).post({
|
|
3223
3401
|
security: [{
|
|
3224
3402
|
key: 'BearerAuth',
|
|
3225
3403
|
scheme: 'bearer',
|
|
@@ -3229,7 +3407,7 @@ export const transferOrganizationAssignment = (options) => (options.client ?? cl
|
|
|
3229
3407
|
name: 'X-API-Key',
|
|
3230
3408
|
type: 'apiKey'
|
|
3231
3409
|
}],
|
|
3232
|
-
url: '/
|
|
3410
|
+
url: '/workforce/v1/ladders',
|
|
3233
3411
|
...options,
|
|
3234
3412
|
headers: {
|
|
3235
3413
|
'Content-Type': 'application/json',
|
|
@@ -3237,11 +3415,11 @@ export const transferOrganizationAssignment = (options) => (options.client ?? cl
|
|
|
3237
3415
|
}
|
|
3238
3416
|
});
|
|
3239
3417
|
/**
|
|
3240
|
-
*
|
|
3418
|
+
* Get a job ladder
|
|
3241
3419
|
*
|
|
3242
|
-
*
|
|
3420
|
+
* 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.
|
|
3243
3421
|
*/
|
|
3244
|
-
export const
|
|
3422
|
+
export const getOrganizationLadder = (options) => (options.client ?? client).get({
|
|
3245
3423
|
security: [{
|
|
3246
3424
|
key: 'BearerAuth',
|
|
3247
3425
|
scheme: 'bearer',
|
|
@@ -3251,19 +3429,15 @@ export const terminateOrganizationAssignment = (options) => (options.client ?? c
|
|
|
3251
3429
|
name: 'X-API-Key',
|
|
3252
3430
|
type: 'apiKey'
|
|
3253
3431
|
}],
|
|
3254
|
-
url: '/
|
|
3255
|
-
...options
|
|
3256
|
-
headers: {
|
|
3257
|
-
'Content-Type': 'application/json',
|
|
3258
|
-
...options.headers
|
|
3259
|
-
}
|
|
3432
|
+
url: '/workforce/v1/ladders/{id}',
|
|
3433
|
+
...options
|
|
3260
3434
|
});
|
|
3261
3435
|
/**
|
|
3262
|
-
*
|
|
3436
|
+
* Revise a job ladder
|
|
3263
3437
|
*
|
|
3264
|
-
*
|
|
3438
|
+
* 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.
|
|
3265
3439
|
*/
|
|
3266
|
-
export const
|
|
3440
|
+
export const reviseOrganizationLadder = (options) => (options.client ?? client).put({
|
|
3267
3441
|
security: [{
|
|
3268
3442
|
key: 'BearerAuth',
|
|
3269
3443
|
scheme: 'bearer',
|
|
@@ -3273,15 +3447,19 @@ export const makePrimaryOrganizationAssignment = (options) => (options.client ??
|
|
|
3273
3447
|
name: 'X-API-Key',
|
|
3274
3448
|
type: 'apiKey'
|
|
3275
3449
|
}],
|
|
3276
|
-
url: '/
|
|
3277
|
-
...options
|
|
3450
|
+
url: '/workforce/v1/ladders/{id}',
|
|
3451
|
+
...options,
|
|
3452
|
+
headers: {
|
|
3453
|
+
'Content-Type': 'application/json',
|
|
3454
|
+
...options.headers
|
|
3455
|
+
}
|
|
3278
3456
|
});
|
|
3279
3457
|
/**
|
|
3280
|
-
* List
|
|
3458
|
+
* List positions
|
|
3281
3459
|
*
|
|
3282
|
-
* Lists
|
|
3460
|
+
* 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.
|
|
3283
3461
|
*/
|
|
3284
|
-
export const
|
|
3462
|
+
export const listOrganizationPositions = (options) => (options?.client ?? client).get({
|
|
3285
3463
|
security: [{
|
|
3286
3464
|
key: 'BearerAuth',
|
|
3287
3465
|
scheme: 'bearer',
|
|
@@ -3291,15 +3469,15 @@ export const listOrganizationActors = (options) => (options?.client ?? client).g
|
|
|
3291
3469
|
name: 'X-API-Key',
|
|
3292
3470
|
type: 'apiKey'
|
|
3293
3471
|
}],
|
|
3294
|
-
url: '/
|
|
3472
|
+
url: '/workforce/v1/positions',
|
|
3295
3473
|
...options
|
|
3296
3474
|
});
|
|
3297
3475
|
/**
|
|
3298
|
-
*
|
|
3476
|
+
* Open positions
|
|
3299
3477
|
*
|
|
3300
|
-
*
|
|
3478
|
+
* 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"}.
|
|
3301
3479
|
*/
|
|
3302
|
-
export const
|
|
3480
|
+
export const openOrganizationPositions = (options) => (options.client ?? client).post({
|
|
3303
3481
|
security: [{
|
|
3304
3482
|
key: 'BearerAuth',
|
|
3305
3483
|
scheme: 'bearer',
|
|
@@ -3309,15 +3487,19 @@ export const getOrganizationActor = (options) => (options.client ?? client).get(
|
|
|
3309
3487
|
name: 'X-API-Key',
|
|
3310
3488
|
type: 'apiKey'
|
|
3311
3489
|
}],
|
|
3312
|
-
url: '/
|
|
3313
|
-
...options
|
|
3490
|
+
url: '/workforce/v1/positions',
|
|
3491
|
+
...options,
|
|
3492
|
+
headers: {
|
|
3493
|
+
'Content-Type': 'application/json',
|
|
3494
|
+
...options.headers
|
|
3495
|
+
}
|
|
3314
3496
|
});
|
|
3315
3497
|
/**
|
|
3316
|
-
*
|
|
3498
|
+
* Get a position
|
|
3317
3499
|
*
|
|
3318
|
-
*
|
|
3500
|
+
* 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.
|
|
3319
3501
|
*/
|
|
3320
|
-
export const
|
|
3502
|
+
export const getOrganizationPosition = (options) => (options.client ?? client).get({
|
|
3321
3503
|
security: [{
|
|
3322
3504
|
key: 'BearerAuth',
|
|
3323
3505
|
scheme: 'bearer',
|
|
@@ -3327,15 +3509,15 @@ export const listOrganizationPeriods = (options) => (options?.client ?? client).
|
|
|
3327
3509
|
name: 'X-API-Key',
|
|
3328
3510
|
type: 'apiKey'
|
|
3329
3511
|
}],
|
|
3330
|
-
url: '/
|
|
3512
|
+
url: '/workforce/v1/positions/{id}',
|
|
3331
3513
|
...options
|
|
3332
3514
|
});
|
|
3333
3515
|
/**
|
|
3334
|
-
*
|
|
3516
|
+
* Revise a position
|
|
3335
3517
|
*
|
|
3336
|
-
*
|
|
3518
|
+
* 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.
|
|
3337
3519
|
*/
|
|
3338
|
-
export const
|
|
3520
|
+
export const reviseOrganizationPosition = (options) => (options.client ?? client).patch({
|
|
3339
3521
|
security: [{
|
|
3340
3522
|
key: 'BearerAuth',
|
|
3341
3523
|
scheme: 'bearer',
|
|
@@ -3345,7 +3527,7 @@ export const openOrganizationPeriod = (options) => (options.client ?? client).po
|
|
|
3345
3527
|
name: 'X-API-Key',
|
|
3346
3528
|
type: 'apiKey'
|
|
3347
3529
|
}],
|
|
3348
|
-
url: '/
|
|
3530
|
+
url: '/workforce/v1/positions/{id}',
|
|
3349
3531
|
...options,
|
|
3350
3532
|
headers: {
|
|
3351
3533
|
'Content-Type': 'application/json',
|
|
@@ -3353,11 +3535,11 @@ export const openOrganizationPeriod = (options) => (options.client ?? client).po
|
|
|
3353
3535
|
}
|
|
3354
3536
|
});
|
|
3355
3537
|
/**
|
|
3356
|
-
*
|
|
3538
|
+
* Close a position
|
|
3357
3539
|
*
|
|
3358
|
-
*
|
|
3540
|
+
* 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.
|
|
3359
3541
|
*/
|
|
3360
|
-
export const
|
|
3542
|
+
export const closeOrganizationPosition = (options) => (options.client ?? client).post({
|
|
3361
3543
|
security: [{
|
|
3362
3544
|
key: 'BearerAuth',
|
|
3363
3545
|
scheme: 'bearer',
|
|
@@ -3367,15 +3549,15 @@ export const getOrganizationPeriod = (options) => (options.client ?? client).get
|
|
|
3367
3549
|
name: 'X-API-Key',
|
|
3368
3550
|
type: 'apiKey'
|
|
3369
3551
|
}],
|
|
3370
|
-
url: '/
|
|
3552
|
+
url: '/workforce/v1/positions/{id}/close',
|
|
3371
3553
|
...options
|
|
3372
3554
|
});
|
|
3373
3555
|
/**
|
|
3374
|
-
*
|
|
3556
|
+
* Freeze a position
|
|
3375
3557
|
*
|
|
3376
|
-
*
|
|
3558
|
+
* 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.
|
|
3377
3559
|
*/
|
|
3378
|
-
export const
|
|
3560
|
+
export const freezeOrganizationPosition = (options) => (options.client ?? client).post({
|
|
3379
3561
|
security: [{
|
|
3380
3562
|
key: 'BearerAuth',
|
|
3381
3563
|
scheme: 'bearer',
|
|
@@ -3385,15 +3567,15 @@ export const closeOrganizationPeriod = (options) => (options.client ?? client).p
|
|
|
3385
3567
|
name: 'X-API-Key',
|
|
3386
3568
|
type: 'apiKey'
|
|
3387
3569
|
}],
|
|
3388
|
-
url: '/
|
|
3570
|
+
url: '/workforce/v1/positions/{id}/freeze',
|
|
3389
3571
|
...options
|
|
3390
3572
|
});
|
|
3391
3573
|
/**
|
|
3392
|
-
*
|
|
3574
|
+
* Unfreeze a position
|
|
3393
3575
|
*
|
|
3394
|
-
*
|
|
3576
|
+
* 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.
|
|
3395
3577
|
*/
|
|
3396
|
-
export const
|
|
3578
|
+
export const unfreezeOrganizationPosition = (options) => (options.client ?? client).post({
|
|
3397
3579
|
security: [{
|
|
3398
3580
|
key: 'BearerAuth',
|
|
3399
3581
|
scheme: 'bearer',
|
|
@@ -3403,15 +3585,15 @@ export const listOrganizationObjectives = (options) => (options?.client ?? clien
|
|
|
3403
3585
|
name: 'X-API-Key',
|
|
3404
3586
|
type: 'apiKey'
|
|
3405
3587
|
}],
|
|
3406
|
-
url: '/
|
|
3588
|
+
url: '/workforce/v1/positions/{id}/unfreeze',
|
|
3407
3589
|
...options
|
|
3408
3590
|
});
|
|
3409
3591
|
/**
|
|
3410
|
-
*
|
|
3592
|
+
* Reassign a position's manager
|
|
3411
3593
|
*
|
|
3412
|
-
* Sets
|
|
3594
|
+
* 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.
|
|
3413
3595
|
*/
|
|
3414
|
-
export const
|
|
3596
|
+
export const reassignOrganizationPositionManager = (options) => (options.client ?? client).put({
|
|
3415
3597
|
security: [{
|
|
3416
3598
|
key: 'BearerAuth',
|
|
3417
3599
|
scheme: 'bearer',
|
|
@@ -3421,7 +3603,7 @@ export const setOrganizationObjective = (options) => (options.client ?? client).
|
|
|
3421
3603
|
name: 'X-API-Key',
|
|
3422
3604
|
type: 'apiKey'
|
|
3423
3605
|
}],
|
|
3424
|
-
url: '/
|
|
3606
|
+
url: '/workforce/v1/positions/{id}/manager',
|
|
3425
3607
|
...options,
|
|
3426
3608
|
headers: {
|
|
3427
3609
|
'Content-Type': 'application/json',
|
|
@@ -3429,11 +3611,11 @@ export const setOrganizationObjective = (options) => (options.client ?? client).
|
|
|
3429
3611
|
}
|
|
3430
3612
|
});
|
|
3431
3613
|
/**
|
|
3432
|
-
*
|
|
3614
|
+
* Regrade a position
|
|
3433
3615
|
*
|
|
3434
|
-
*
|
|
3616
|
+
* 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.
|
|
3435
3617
|
*/
|
|
3436
|
-
export const
|
|
3618
|
+
export const regradeOrganizationPosition = (options) => (options.client ?? client).put({
|
|
3437
3619
|
security: [{
|
|
3438
3620
|
key: 'BearerAuth',
|
|
3439
3621
|
scheme: 'bearer',
|
|
@@ -3443,15 +3625,19 @@ export const getOrganizationObjective = (options) => (options.client ?? client).
|
|
|
3443
3625
|
name: 'X-API-Key',
|
|
3444
3626
|
type: 'apiKey'
|
|
3445
3627
|
}],
|
|
3446
|
-
url: '/
|
|
3447
|
-
...options
|
|
3628
|
+
url: '/workforce/v1/positions/{id}/level',
|
|
3629
|
+
...options,
|
|
3630
|
+
headers: {
|
|
3631
|
+
'Content-Type': 'application/json',
|
|
3632
|
+
...options.headers
|
|
3633
|
+
}
|
|
3448
3634
|
});
|
|
3449
3635
|
/**
|
|
3450
|
-
*
|
|
3636
|
+
* Designate a department head position
|
|
3451
3637
|
*
|
|
3452
|
-
*
|
|
3638
|
+
* 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.
|
|
3453
3639
|
*/
|
|
3454
|
-
export const
|
|
3640
|
+
export const designateOrganizationPositionHead = (options) => (options.client ?? client).post({
|
|
3455
3641
|
security: [{
|
|
3456
3642
|
key: 'BearerAuth',
|
|
3457
3643
|
scheme: 'bearer',
|
|
@@ -3461,19 +3647,15 @@ export const reviseOrganizationObjective = (options) => (options.client ?? clien
|
|
|
3461
3647
|
name: 'X-API-Key',
|
|
3462
3648
|
type: 'apiKey'
|
|
3463
3649
|
}],
|
|
3464
|
-
url: '/
|
|
3465
|
-
...options
|
|
3466
|
-
headers: {
|
|
3467
|
-
'Content-Type': 'application/json',
|
|
3468
|
-
...options.headers
|
|
3469
|
-
}
|
|
3650
|
+
url: '/workforce/v1/positions/{id}/designate_head',
|
|
3651
|
+
...options
|
|
3470
3652
|
});
|
|
3471
3653
|
/**
|
|
3472
|
-
*
|
|
3654
|
+
* Hire into a position
|
|
3473
3655
|
*
|
|
3474
|
-
*
|
|
3656
|
+
* 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"}.
|
|
3475
3657
|
*/
|
|
3476
|
-
export const
|
|
3658
|
+
export const hireOrganizationPosition = (options) => (options.client ?? client).post({
|
|
3477
3659
|
security: [{
|
|
3478
3660
|
key: 'BearerAuth',
|
|
3479
3661
|
scheme: 'bearer',
|
|
@@ -3483,7 +3665,7 @@ export const alignOrganizationObjective = (options) => (options.client ?? client
|
|
|
3483
3665
|
name: 'X-API-Key',
|
|
3484
3666
|
type: 'apiKey'
|
|
3485
3667
|
}],
|
|
3486
|
-
url: '/
|
|
3668
|
+
url: '/workforce/v1/positions/{id}/hire',
|
|
3487
3669
|
...options,
|
|
3488
3670
|
headers: {
|
|
3489
3671
|
'Content-Type': 'application/json',
|
|
@@ -3491,11 +3673,11 @@ export const alignOrganizationObjective = (options) => (options.client ?? client
|
|
|
3491
3673
|
}
|
|
3492
3674
|
});
|
|
3493
3675
|
/**
|
|
3494
|
-
*
|
|
3676
|
+
* Replace a position's holder
|
|
3495
3677
|
*
|
|
3496
|
-
*
|
|
3678
|
+
* 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"}.
|
|
3497
3679
|
*/
|
|
3498
|
-
export const
|
|
3680
|
+
export const replaceOrganizationPositionHolder = (options) => (options.client ?? client).post({
|
|
3499
3681
|
security: [{
|
|
3500
3682
|
key: 'BearerAuth',
|
|
3501
3683
|
scheme: 'bearer',
|
|
@@ -3505,7 +3687,7 @@ export const gradeOrganizationObjective = (options) => (options.client ?? client
|
|
|
3505
3687
|
name: 'X-API-Key',
|
|
3506
3688
|
type: 'apiKey'
|
|
3507
3689
|
}],
|
|
3508
|
-
url: '/
|
|
3690
|
+
url: '/workforce/v1/positions/{id}/replace_holder',
|
|
3509
3691
|
...options,
|
|
3510
3692
|
headers: {
|
|
3511
3693
|
'Content-Type': 'application/json',
|
|
@@ -3513,11 +3695,11 @@ export const gradeOrganizationObjective = (options) => (options.client ?? client
|
|
|
3513
3695
|
}
|
|
3514
3696
|
});
|
|
3515
3697
|
/**
|
|
3516
|
-
* List
|
|
3698
|
+
* List assignments
|
|
3517
3699
|
*
|
|
3518
|
-
* Lists
|
|
3700
|
+
* 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.
|
|
3519
3701
|
*/
|
|
3520
|
-
export const
|
|
3702
|
+
export const listOrganizationAssignments = (options) => (options?.client ?? client).get({
|
|
3521
3703
|
security: [{
|
|
3522
3704
|
key: 'BearerAuth',
|
|
3523
3705
|
scheme: 'bearer',
|
|
@@ -3527,15 +3709,15 @@ export const listOrganizationKeyResults = (options) => (options?.client ?? clien
|
|
|
3527
3709
|
name: 'X-API-Key',
|
|
3528
3710
|
type: 'apiKey'
|
|
3529
3711
|
}],
|
|
3530
|
-
url: '/
|
|
3712
|
+
url: '/workforce/v1/assignments',
|
|
3531
3713
|
...options
|
|
3532
3714
|
});
|
|
3533
3715
|
/**
|
|
3534
|
-
*
|
|
3716
|
+
* Get an assignment
|
|
3535
3717
|
*
|
|
3536
|
-
*
|
|
3718
|
+
* 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.
|
|
3537
3719
|
*/
|
|
3538
|
-
export const
|
|
3720
|
+
export const getOrganizationAssignment = (options) => (options.client ?? client).get({
|
|
3539
3721
|
security: [{
|
|
3540
3722
|
key: 'BearerAuth',
|
|
3541
3723
|
scheme: 'bearer',
|
|
@@ -3545,19 +3727,15 @@ export const setOrganizationKeyResult = (options) => (options.client ?? client).
|
|
|
3545
3727
|
name: 'X-API-Key',
|
|
3546
3728
|
type: 'apiKey'
|
|
3547
3729
|
}],
|
|
3548
|
-
url: '/
|
|
3549
|
-
...options
|
|
3550
|
-
headers: {
|
|
3551
|
-
'Content-Type': 'application/json',
|
|
3552
|
-
...options.headers
|
|
3553
|
-
}
|
|
3730
|
+
url: '/workforce/v1/assignments/{id}',
|
|
3731
|
+
...options
|
|
3554
3732
|
});
|
|
3555
3733
|
/**
|
|
3556
|
-
*
|
|
3734
|
+
* Transfer an assignment to another position
|
|
3557
3735
|
*
|
|
3558
|
-
*
|
|
3736
|
+
* 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"}.
|
|
3559
3737
|
*/
|
|
3560
|
-
export const
|
|
3738
|
+
export const transferOrganizationAssignment = (options) => (options.client ?? client).post({
|
|
3561
3739
|
security: [{
|
|
3562
3740
|
key: 'BearerAuth',
|
|
3563
3741
|
scheme: 'bearer',
|
|
@@ -3567,15 +3745,19 @@ export const getOrganizationKeyResult = (options) => (options.client ?? client).
|
|
|
3567
3745
|
name: 'X-API-Key',
|
|
3568
3746
|
type: 'apiKey'
|
|
3569
3747
|
}],
|
|
3570
|
-
url: '/
|
|
3571
|
-
...options
|
|
3748
|
+
url: '/workforce/v1/assignments/{id}/transfer',
|
|
3749
|
+
...options,
|
|
3750
|
+
headers: {
|
|
3751
|
+
'Content-Type': 'application/json',
|
|
3752
|
+
...options.headers
|
|
3753
|
+
}
|
|
3572
3754
|
});
|
|
3573
3755
|
/**
|
|
3574
|
-
*
|
|
3756
|
+
* End an assignment
|
|
3575
3757
|
*
|
|
3576
|
-
*
|
|
3758
|
+
* 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"}.
|
|
3577
3759
|
*/
|
|
3578
|
-
export const
|
|
3760
|
+
export const terminateOrganizationAssignment = (options) => (options.client ?? client).post({
|
|
3579
3761
|
security: [{
|
|
3580
3762
|
key: 'BearerAuth',
|
|
3581
3763
|
scheme: 'bearer',
|
|
@@ -3585,7 +3767,7 @@ export const reviseOrganizationKeyResult = (options) => (options.client ?? clien
|
|
|
3585
3767
|
name: 'X-API-Key',
|
|
3586
3768
|
type: 'apiKey'
|
|
3587
3769
|
}],
|
|
3588
|
-
url: '/
|
|
3770
|
+
url: '/workforce/v1/assignments/{id}/terminate',
|
|
3589
3771
|
...options,
|
|
3590
3772
|
headers: {
|
|
3591
3773
|
'Content-Type': 'application/json',
|
|
@@ -3593,11 +3775,11 @@ export const reviseOrganizationKeyResult = (options) => (options.client ?? clien
|
|
|
3593
3775
|
}
|
|
3594
3776
|
});
|
|
3595
3777
|
/**
|
|
3596
|
-
*
|
|
3778
|
+
* Make an assignment primary
|
|
3597
3779
|
*
|
|
3598
|
-
*
|
|
3780
|
+
* 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.
|
|
3599
3781
|
*/
|
|
3600
|
-
export const
|
|
3782
|
+
export const makePrimaryOrganizationAssignment = (options) => (options.client ?? client).post({
|
|
3601
3783
|
security: [{
|
|
3602
3784
|
key: 'BearerAuth',
|
|
3603
3785
|
scheme: 'bearer',
|
|
@@ -3607,15 +3789,15 @@ export const listOrganizationSpecs = (options) => (options?.client ?? client).ge
|
|
|
3607
3789
|
name: 'X-API-Key',
|
|
3608
3790
|
type: 'apiKey'
|
|
3609
3791
|
}],
|
|
3610
|
-
url: '/
|
|
3792
|
+
url: '/workforce/v1/assignments/{id}/make_primary',
|
|
3611
3793
|
...options
|
|
3612
3794
|
});
|
|
3613
3795
|
/**
|
|
3614
|
-
*
|
|
3796
|
+
* List actors holding positions
|
|
3615
3797
|
*
|
|
3616
|
-
*
|
|
3798
|
+
* 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.
|
|
3617
3799
|
*/
|
|
3618
|
-
export const
|
|
3800
|
+
export const listOrganizationActors = (options) => (options?.client ?? client).get({
|
|
3619
3801
|
security: [{
|
|
3620
3802
|
key: 'BearerAuth',
|
|
3621
3803
|
scheme: 'bearer',
|
|
@@ -3625,15 +3807,15 @@ export const getOrganizationSpec = (options) => (options.client ?? client).get({
|
|
|
3625
3807
|
name: 'X-API-Key',
|
|
3626
3808
|
type: 'apiKey'
|
|
3627
3809
|
}],
|
|
3628
|
-
url: '/
|
|
3810
|
+
url: '/workforce/v1/actors',
|
|
3629
3811
|
...options
|
|
3630
3812
|
});
|
|
3631
3813
|
/**
|
|
3632
|
-
*
|
|
3814
|
+
* Get the position chain of an actor
|
|
3633
3815
|
*
|
|
3634
|
-
*
|
|
3816
|
+
* 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 with every level's charter, 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.
|
|
3635
3817
|
*/
|
|
3636
|
-
export const
|
|
3818
|
+
export const getOrganizationActor = (options) => (options.client ?? client).get({
|
|
3637
3819
|
security: [{
|
|
3638
3820
|
key: 'BearerAuth',
|
|
3639
3821
|
scheme: 'bearer',
|
|
@@ -3643,19 +3825,15 @@ export const reviseOrganizationSpec = (options) => (options.client ?? client).pu
|
|
|
3643
3825
|
name: 'X-API-Key',
|
|
3644
3826
|
type: 'apiKey'
|
|
3645
3827
|
}],
|
|
3646
|
-
url: '/
|
|
3647
|
-
...options
|
|
3648
|
-
headers: {
|
|
3649
|
-
'Content-Type': 'application/json',
|
|
3650
|
-
...options.headers
|
|
3651
|
-
}
|
|
3828
|
+
url: '/workforce/v1/actors/{actor}',
|
|
3829
|
+
...options
|
|
3652
3830
|
});
|
|
3653
3831
|
/**
|
|
3654
|
-
* List
|
|
3832
|
+
* List periods
|
|
3655
3833
|
*
|
|
3656
|
-
* Lists
|
|
3834
|
+
* 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.
|
|
3657
3835
|
*/
|
|
3658
|
-
export const
|
|
3836
|
+
export const listOrganizationPeriods = (options) => (options?.client ?? client).get({
|
|
3659
3837
|
security: [{
|
|
3660
3838
|
key: 'BearerAuth',
|
|
3661
3839
|
scheme: 'bearer',
|
|
@@ -3665,15 +3843,15 @@ export const listOrganizationSpecRevisions = (options) => (options.client ?? cli
|
|
|
3665
3843
|
name: 'X-API-Key',
|
|
3666
3844
|
type: 'apiKey'
|
|
3667
3845
|
}],
|
|
3668
|
-
url: '/
|
|
3846
|
+
url: '/workforce/v1/periods',
|
|
3669
3847
|
...options
|
|
3670
3848
|
});
|
|
3671
3849
|
/**
|
|
3672
|
-
*
|
|
3850
|
+
* Open a period
|
|
3673
3851
|
*
|
|
3674
|
-
*
|
|
3852
|
+
* 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"}.
|
|
3675
3853
|
*/
|
|
3676
|
-
export const
|
|
3854
|
+
export const openOrganizationPeriod = (options) => (options.client ?? client).post({
|
|
3677
3855
|
security: [{
|
|
3678
3856
|
key: 'BearerAuth',
|
|
3679
3857
|
scheme: 'bearer',
|
|
@@ -3683,15 +3861,19 @@ export const diffOrganizationSpec = (options) => (options.client ?? client).get(
|
|
|
3683
3861
|
name: 'X-API-Key',
|
|
3684
3862
|
type: 'apiKey'
|
|
3685
3863
|
}],
|
|
3686
|
-
url: '/
|
|
3687
|
-
...options
|
|
3864
|
+
url: '/workforce/v1/periods',
|
|
3865
|
+
...options,
|
|
3866
|
+
headers: {
|
|
3867
|
+
'Content-Type': 'application/json',
|
|
3868
|
+
...options.headers
|
|
3869
|
+
}
|
|
3688
3870
|
});
|
|
3689
3871
|
/**
|
|
3690
|
-
*
|
|
3872
|
+
* Get a period
|
|
3691
3873
|
*
|
|
3692
|
-
*
|
|
3874
|
+
* 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.
|
|
3693
3875
|
*/
|
|
3694
|
-
export const
|
|
3876
|
+
export const getOrganizationPeriod = (options) => (options.client ?? client).get({
|
|
3695
3877
|
security: [{
|
|
3696
3878
|
key: 'BearerAuth',
|
|
3697
3879
|
scheme: 'bearer',
|
|
@@ -3701,15 +3883,15 @@ export const getOrganizationEffectiveSpec = (options) => (options?.client ?? cli
|
|
|
3701
3883
|
name: 'X-API-Key',
|
|
3702
3884
|
type: 'apiKey'
|
|
3703
3885
|
}],
|
|
3704
|
-
url: '/
|
|
3886
|
+
url: '/workforce/v1/periods/{id}',
|
|
3705
3887
|
...options
|
|
3706
3888
|
});
|
|
3707
3889
|
/**
|
|
3708
|
-
*
|
|
3890
|
+
* Close a period
|
|
3709
3891
|
*
|
|
3710
|
-
*
|
|
3892
|
+
* 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.
|
|
3711
3893
|
*/
|
|
3712
|
-
export const
|
|
3894
|
+
export const closeOrganizationPeriod = (options) => (options.client ?? client).post({
|
|
3713
3895
|
security: [{
|
|
3714
3896
|
key: 'BearerAuth',
|
|
3715
3897
|
scheme: 'bearer',
|
|
@@ -3719,15 +3901,15 @@ export const planOrganizationReconcile = (options) => (options.client ?? client)
|
|
|
3719
3901
|
name: 'X-API-Key',
|
|
3720
3902
|
type: 'apiKey'
|
|
3721
3903
|
}],
|
|
3722
|
-
url: '/
|
|
3904
|
+
url: '/workforce/v1/periods/{id}/close',
|
|
3723
3905
|
...options
|
|
3724
3906
|
});
|
|
3725
3907
|
/**
|
|
3726
|
-
*
|
|
3908
|
+
* List objectives
|
|
3727
3909
|
*
|
|
3728
|
-
*
|
|
3910
|
+
* 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.
|
|
3729
3911
|
*/
|
|
3730
|
-
export const
|
|
3912
|
+
export const listOrganizationObjectives = (options) => (options?.client ?? client).get({
|
|
3731
3913
|
security: [{
|
|
3732
3914
|
key: 'BearerAuth',
|
|
3733
3915
|
scheme: 'bearer',
|
|
@@ -3737,15 +3919,15 @@ export const getOrganizationReconcileStatus = (options) => (options.client ?? cl
|
|
|
3737
3919
|
name: 'X-API-Key',
|
|
3738
3920
|
type: 'apiKey'
|
|
3739
3921
|
}],
|
|
3740
|
-
url: '/
|
|
3922
|
+
url: '/workforce/v1/objectives',
|
|
3741
3923
|
...options
|
|
3742
3924
|
});
|
|
3743
3925
|
/**
|
|
3744
|
-
*
|
|
3926
|
+
* Set an objective
|
|
3745
3927
|
*
|
|
3746
|
-
*
|
|
3928
|
+
* 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"}.
|
|
3747
3929
|
*/
|
|
3748
|
-
export const
|
|
3930
|
+
export const setOrganizationObjective = (options) => (options.client ?? client).post({
|
|
3749
3931
|
security: [{
|
|
3750
3932
|
key: 'BearerAuth',
|
|
3751
3933
|
scheme: 'bearer',
|
|
@@ -3755,7 +3937,7 @@ export const runOrganizationReconcile = (options) => (options.client ?? client).
|
|
|
3755
3937
|
name: 'X-API-Key',
|
|
3756
3938
|
type: 'apiKey'
|
|
3757
3939
|
}],
|
|
3758
|
-
url: '/
|
|
3940
|
+
url: '/workforce/v1/objectives',
|
|
3759
3941
|
...options,
|
|
3760
3942
|
headers: {
|
|
3761
3943
|
'Content-Type': 'application/json',
|
|
@@ -3763,11 +3945,11 @@ export const runOrganizationReconcile = (options) => (options.client ?? client).
|
|
|
3763
3945
|
}
|
|
3764
3946
|
});
|
|
3765
3947
|
/**
|
|
3766
|
-
*
|
|
3948
|
+
* Get an objective
|
|
3767
3949
|
*
|
|
3768
|
-
*
|
|
3950
|
+
* 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.
|
|
3769
3951
|
*/
|
|
3770
|
-
export const
|
|
3952
|
+
export const getOrganizationObjective = (options) => (options.client ?? client).get({
|
|
3771
3953
|
security: [{
|
|
3772
3954
|
key: 'BearerAuth',
|
|
3773
3955
|
scheme: 'bearer',
|
|
@@ -3777,19 +3959,15 @@ export const pauseOrganizationReconcile = (options) => (options.client ?? client
|
|
|
3777
3959
|
name: 'X-API-Key',
|
|
3778
3960
|
type: 'apiKey'
|
|
3779
3961
|
}],
|
|
3780
|
-
url: '/
|
|
3781
|
-
...options
|
|
3782
|
-
headers: {
|
|
3783
|
-
'Content-Type': 'application/json',
|
|
3784
|
-
...options.headers
|
|
3785
|
-
}
|
|
3962
|
+
url: '/workforce/v1/objectives/{id}',
|
|
3963
|
+
...options
|
|
3786
3964
|
});
|
|
3787
3965
|
/**
|
|
3788
|
-
*
|
|
3966
|
+
* Revise an objective
|
|
3789
3967
|
*
|
|
3790
|
-
*
|
|
3968
|
+
* 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"}.
|
|
3791
3969
|
*/
|
|
3792
|
-
export const
|
|
3970
|
+
export const reviseOrganizationObjective = (options) => (options.client ?? client).patch({
|
|
3793
3971
|
security: [{
|
|
3794
3972
|
key: 'BearerAuth',
|
|
3795
3973
|
scheme: 'bearer',
|
|
@@ -3799,7 +3977,7 @@ export const resumeOrganizationReconcile = (options) => (options.client ?? clien
|
|
|
3799
3977
|
name: 'X-API-Key',
|
|
3800
3978
|
type: 'apiKey'
|
|
3801
3979
|
}],
|
|
3802
|
-
url: '/
|
|
3980
|
+
url: '/workforce/v1/objectives/{id}',
|
|
3803
3981
|
...options,
|
|
3804
3982
|
headers: {
|
|
3805
3983
|
'Content-Type': 'application/json',
|
|
@@ -3807,11 +3985,11 @@ export const resumeOrganizationReconcile = (options) => (options.client ?? clien
|
|
|
3807
3985
|
}
|
|
3808
3986
|
});
|
|
3809
3987
|
/**
|
|
3810
|
-
*
|
|
3988
|
+
* Align an objective to parent objectives
|
|
3811
3989
|
*
|
|
3812
|
-
*
|
|
3990
|
+
* 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}]}.
|
|
3813
3991
|
*/
|
|
3814
|
-
export const
|
|
3992
|
+
export const alignOrganizationObjective = (options) => (options.client ?? client).put({
|
|
3815
3993
|
security: [{
|
|
3816
3994
|
key: 'BearerAuth',
|
|
3817
3995
|
scheme: 'bearer',
|
|
@@ -3821,7 +3999,7 @@ export const upgradeSandbox = (options) => (options.client ?? client).post({
|
|
|
3821
3999
|
name: 'X-API-Key',
|
|
3822
4000
|
type: 'apiKey'
|
|
3823
4001
|
}],
|
|
3824
|
-
url: '/
|
|
4002
|
+
url: '/workforce/v1/objectives/{id}/parents',
|
|
3825
4003
|
...options,
|
|
3826
4004
|
headers: {
|
|
3827
4005
|
'Content-Type': 'application/json',
|
|
@@ -3829,11 +4007,11 @@ export const upgradeSandbox = (options) => (options.client ?? client).post({
|
|
|
3829
4007
|
}
|
|
3830
4008
|
});
|
|
3831
4009
|
/**
|
|
3832
|
-
*
|
|
4010
|
+
* Grade an objective
|
|
3833
4011
|
*
|
|
3834
|
-
*
|
|
4012
|
+
* 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."}.
|
|
3835
4013
|
*/
|
|
3836
|
-
export const
|
|
4014
|
+
export const gradeOrganizationObjective = (options) => (options.client ?? client).post({
|
|
3837
4015
|
security: [{
|
|
3838
4016
|
key: 'BearerAuth',
|
|
3839
4017
|
scheme: 'bearer',
|
|
@@ -3843,7 +4021,7 @@ export const extendSandbox = (options) => (options.client ?? client).post({
|
|
|
3843
4021
|
name: 'X-API-Key',
|
|
3844
4022
|
type: 'apiKey'
|
|
3845
4023
|
}],
|
|
3846
|
-
url: '/
|
|
4024
|
+
url: '/workforce/v1/objectives/{id}/grade',
|
|
3847
4025
|
...options,
|
|
3848
4026
|
headers: {
|
|
3849
4027
|
'Content-Type': 'application/json',
|
|
@@ -3851,29 +4029,11 @@ export const extendSandbox = (options) => (options.client ?? client).post({
|
|
|
3851
4029
|
}
|
|
3852
4030
|
});
|
|
3853
4031
|
/**
|
|
3854
|
-
* List
|
|
3855
|
-
*
|
|
3856
|
-
* 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.
|
|
3857
|
-
*/
|
|
3858
|
-
export const listObservedProcesses = (options) => (options.client ?? client).get({
|
|
3859
|
-
security: [{
|
|
3860
|
-
key: 'BearerAuth',
|
|
3861
|
-
scheme: 'bearer',
|
|
3862
|
-
type: 'http'
|
|
3863
|
-
}, {
|
|
3864
|
-
key: 'ApiKeyAuth',
|
|
3865
|
-
name: 'X-API-Key',
|
|
3866
|
-
type: 'apiKey'
|
|
3867
|
-
}],
|
|
3868
|
-
url: '/sandbox/v1/sandboxes/{sandboxID}/processes',
|
|
3869
|
-
...options
|
|
3870
|
-
});
|
|
3871
|
-
/**
|
|
3872
|
-
* Read bounded observed process output
|
|
4032
|
+
* List key results
|
|
3873
4033
|
*
|
|
3874
|
-
*
|
|
4034
|
+
* 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.
|
|
3875
4035
|
*/
|
|
3876
|
-
export const
|
|
4036
|
+
export const listOrganizationKeyResults = (options) => (options?.client ?? client).get({
|
|
3877
4037
|
security: [{
|
|
3878
4038
|
key: 'BearerAuth',
|
|
3879
4039
|
scheme: 'bearer',
|
|
@@ -3883,15 +4043,15 @@ export const getObservedProcessOutput = (options) => (options.client ?? client).
|
|
|
3883
4043
|
name: 'X-API-Key',
|
|
3884
4044
|
type: 'apiKey'
|
|
3885
4045
|
}],
|
|
3886
|
-
url: '/
|
|
4046
|
+
url: '/workforce/v1/key_results',
|
|
3887
4047
|
...options
|
|
3888
4048
|
});
|
|
3889
4049
|
/**
|
|
3890
|
-
*
|
|
4050
|
+
* Set a key result
|
|
3891
4051
|
*
|
|
3892
|
-
*
|
|
4052
|
+
* 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"}}.
|
|
3893
4053
|
*/
|
|
3894
|
-
export const
|
|
4054
|
+
export const setOrganizationKeyResult = (options) => (options.client ?? client).post({
|
|
3895
4055
|
security: [{
|
|
3896
4056
|
key: 'BearerAuth',
|
|
3897
4057
|
scheme: 'bearer',
|
|
@@ -3901,7 +4061,7 @@ export const startSandboxTask = (options) => (options.client ?? client).post({
|
|
|
3901
4061
|
name: 'X-API-Key',
|
|
3902
4062
|
type: 'apiKey'
|
|
3903
4063
|
}],
|
|
3904
|
-
url: '/
|
|
4064
|
+
url: '/workforce/v1/key_results',
|
|
3905
4065
|
...options,
|
|
3906
4066
|
headers: {
|
|
3907
4067
|
'Content-Type': 'application/json',
|
|
@@ -3909,11 +4069,11 @@ export const startSandboxTask = (options) => (options.client ?? client).post({
|
|
|
3909
4069
|
}
|
|
3910
4070
|
});
|
|
3911
4071
|
/**
|
|
3912
|
-
*
|
|
4072
|
+
* Get a key result
|
|
3913
4073
|
*
|
|
3914
|
-
*
|
|
4074
|
+
* 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.
|
|
3915
4075
|
*/
|
|
3916
|
-
export const
|
|
4076
|
+
export const getOrganizationKeyResult = (options) => (options.client ?? client).get({
|
|
3917
4077
|
security: [{
|
|
3918
4078
|
key: 'BearerAuth',
|
|
3919
4079
|
scheme: 'bearer',
|
|
@@ -3923,113 +4083,15 @@ export const getSandboxTaskLog = (options) => (options.client ?? client).get({
|
|
|
3923
4083
|
name: 'X-API-Key',
|
|
3924
4084
|
type: 'apiKey'
|
|
3925
4085
|
}],
|
|
3926
|
-
url: '/
|
|
3927
|
-
...options
|
|
3928
|
-
});
|
|
3929
|
-
/**
|
|
3930
|
-
* Kill sandbox
|
|
3931
|
-
*
|
|
3932
|
-
* 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.
|
|
3933
|
-
*/
|
|
3934
|
-
export const deleteSandboxV1SandboxesBySandboxId = (options) => (options.client ?? client).delete({
|
|
3935
|
-
security: [
|
|
3936
|
-
{
|
|
3937
|
-
key: 'sandbox-ApiKeyAuth',
|
|
3938
|
-
name: 'X-API-Key',
|
|
3939
|
-
type: 'apiKey'
|
|
3940
|
-
},
|
|
3941
|
-
{
|
|
3942
|
-
key: 'sandbox-AuthProviderBearerAuth',
|
|
3943
|
-
scheme: 'bearer',
|
|
3944
|
-
type: 'http'
|
|
3945
|
-
},
|
|
3946
|
-
{
|
|
3947
|
-
key: 'sandbox-AuthProviderTeamAuth',
|
|
3948
|
-
name: 'X-Team-ID',
|
|
3949
|
-
type: 'apiKey'
|
|
3950
|
-
},
|
|
3951
|
-
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
3952
|
-
{
|
|
3953
|
-
key: 'sandbox-AdminTeamAuth',
|
|
3954
|
-
name: 'X-Team-ID',
|
|
3955
|
-
type: 'apiKey'
|
|
3956
|
-
},
|
|
3957
|
-
{
|
|
3958
|
-
key: 'sandbox-AdminJWTAuth',
|
|
3959
|
-
scheme: 'bearer',
|
|
3960
|
-
type: 'http'
|
|
3961
|
-
}
|
|
3962
|
-
],
|
|
3963
|
-
url: '/sandbox/v1/sandboxes/{sandboxID}',
|
|
3964
|
-
...options
|
|
3965
|
-
});
|
|
3966
|
-
/**
|
|
3967
|
-
* Sandbox
|
|
3968
|
-
*
|
|
3969
|
-
* 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.
|
|
3970
|
-
*/
|
|
3971
|
-
export const getSandboxV1SandboxesBySandboxId = (options) => (options.client ?? client).get({
|
|
3972
|
-
security: [
|
|
3973
|
-
{
|
|
3974
|
-
key: 'sandbox-ApiKeyAuth',
|
|
3975
|
-
name: 'X-API-Key',
|
|
3976
|
-
type: 'apiKey'
|
|
3977
|
-
},
|
|
3978
|
-
{
|
|
3979
|
-
key: 'sandbox-AuthProviderBearerAuth',
|
|
3980
|
-
scheme: 'bearer',
|
|
3981
|
-
type: 'http'
|
|
3982
|
-
},
|
|
3983
|
-
{
|
|
3984
|
-
key: 'sandbox-AuthProviderTeamAuth',
|
|
3985
|
-
name: 'X-Team-ID',
|
|
3986
|
-
type: 'apiKey'
|
|
3987
|
-
},
|
|
3988
|
-
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
3989
|
-
{
|
|
3990
|
-
key: 'sandbox-AdminTeamAuth',
|
|
3991
|
-
name: 'X-Team-ID',
|
|
3992
|
-
type: 'apiKey'
|
|
3993
|
-
},
|
|
3994
|
-
{
|
|
3995
|
-
key: 'sandbox-AdminJWTAuth',
|
|
3996
|
-
scheme: 'bearer',
|
|
3997
|
-
type: 'http'
|
|
3998
|
-
}
|
|
3999
|
-
],
|
|
4000
|
-
url: '/sandbox/v1/sandboxes/{sandboxID}',
|
|
4086
|
+
url: '/workforce/v1/key_results/{id}',
|
|
4001
4087
|
...options
|
|
4002
4088
|
});
|
|
4003
4089
|
/**
|
|
4004
|
-
*
|
|
4005
|
-
*
|
|
4006
|
-
* 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.
|
|
4007
|
-
*/
|
|
4008
|
-
export const renameSandbox = (options) => (options.client ?? client).patch({
|
|
4009
|
-
security: [{
|
|
4010
|
-
key: 'BearerAuth',
|
|
4011
|
-
scheme: 'bearer',
|
|
4012
|
-
type: 'http'
|
|
4013
|
-
}, {
|
|
4014
|
-
key: 'ApiKeyAuth',
|
|
4015
|
-
name: 'X-API-Key',
|
|
4016
|
-
type: 'apiKey'
|
|
4017
|
-
}],
|
|
4018
|
-
url: '/sandbox/v1/sandboxes/{sandboxID}',
|
|
4019
|
-
...options,
|
|
4020
|
-
headers: {
|
|
4021
|
-
'Content-Type': 'application/json',
|
|
4022
|
-
...options.headers
|
|
4023
|
-
}
|
|
4024
|
-
});
|
|
4025
|
-
/**
|
|
4026
|
-
* Act on a phone sandbox's screen
|
|
4027
|
-
*
|
|
4028
|
-
* 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.
|
|
4090
|
+
* Revise a key result
|
|
4029
4091
|
*
|
|
4030
|
-
*
|
|
4092
|
+
* 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"}.
|
|
4031
4093
|
*/
|
|
4032
|
-
export const
|
|
4094
|
+
export const reviseOrganizationKeyResult = (options) => (options.client ?? client).patch({
|
|
4033
4095
|
security: [{
|
|
4034
4096
|
key: 'BearerAuth',
|
|
4035
4097
|
scheme: 'bearer',
|
|
@@ -4039,7 +4101,7 @@ export const actOnSandboxDisplay = (options) => (options.client ?? client).post(
|
|
|
4039
4101
|
name: 'X-API-Key',
|
|
4040
4102
|
type: 'apiKey'
|
|
4041
4103
|
}],
|
|
4042
|
-
url: '/
|
|
4104
|
+
url: '/workforce/v1/key_results/{id}',
|
|
4043
4105
|
...options,
|
|
4044
4106
|
headers: {
|
|
4045
4107
|
'Content-Type': 'application/json',
|
|
@@ -4047,11 +4109,11 @@ export const actOnSandboxDisplay = (options) => (options.client ?? client).post(
|
|
|
4047
4109
|
}
|
|
4048
4110
|
});
|
|
4049
4111
|
/**
|
|
4050
|
-
*
|
|
4112
|
+
* List specs
|
|
4051
4113
|
*
|
|
4052
|
-
*
|
|
4114
|
+
* 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.
|
|
4053
4115
|
*/
|
|
4054
|
-
export const
|
|
4116
|
+
export const listOrganizationSpecs = (options) => (options?.client ?? client).get({
|
|
4055
4117
|
security: [{
|
|
4056
4118
|
key: 'BearerAuth',
|
|
4057
4119
|
scheme: 'bearer',
|
|
@@ -4061,15 +4123,15 @@ export const removeSandboxFile = (options) => (options.client ?? client).delete(
|
|
|
4061
4123
|
name: 'X-API-Key',
|
|
4062
4124
|
type: 'apiKey'
|
|
4063
4125
|
}],
|
|
4064
|
-
url: '/
|
|
4126
|
+
url: '/workforce/v1/specs',
|
|
4065
4127
|
...options
|
|
4066
4128
|
});
|
|
4067
4129
|
/**
|
|
4068
|
-
*
|
|
4130
|
+
* Get a spec
|
|
4069
4131
|
*
|
|
4070
|
-
*
|
|
4132
|
+
* 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.
|
|
4071
4133
|
*/
|
|
4072
|
-
export const
|
|
4134
|
+
export const getOrganizationSpec = (options) => (options.client ?? client).get({
|
|
4073
4135
|
security: [{
|
|
4074
4136
|
key: 'BearerAuth',
|
|
4075
4137
|
scheme: 'bearer',
|
|
@@ -4079,15 +4141,15 @@ export const readSandboxFile = (options) => (options.client ?? client).get({
|
|
|
4079
4141
|
name: 'X-API-Key',
|
|
4080
4142
|
type: 'apiKey'
|
|
4081
4143
|
}],
|
|
4082
|
-
url: '/
|
|
4144
|
+
url: '/workforce/v1/specs/{kind}/{id}',
|
|
4083
4145
|
...options
|
|
4084
4146
|
});
|
|
4085
4147
|
/**
|
|
4086
|
-
*
|
|
4148
|
+
* Revise a spec
|
|
4087
4149
|
*
|
|
4088
|
-
*
|
|
4150
|
+
* 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"}}}}.
|
|
4089
4151
|
*/
|
|
4090
|
-
export const
|
|
4152
|
+
export const reviseOrganizationSpec = (options) => (options.client ?? client).put({
|
|
4091
4153
|
security: [{
|
|
4092
4154
|
key: 'BearerAuth',
|
|
4093
4155
|
scheme: 'bearer',
|
|
@@ -4097,7 +4159,7 @@ export const writeSandboxFile = (options) => (options.client ?? client).put({
|
|
|
4097
4159
|
name: 'X-API-Key',
|
|
4098
4160
|
type: 'apiKey'
|
|
4099
4161
|
}],
|
|
4100
|
-
url: '/
|
|
4162
|
+
url: '/workforce/v1/specs/{kind}/{id}',
|
|
4101
4163
|
...options,
|
|
4102
4164
|
headers: {
|
|
4103
4165
|
'Content-Type': 'application/json',
|
|
@@ -4105,29 +4167,11 @@ export const writeSandboxFile = (options) => (options.client ?? client).put({
|
|
|
4105
4167
|
}
|
|
4106
4168
|
});
|
|
4107
4169
|
/**
|
|
4108
|
-
* List
|
|
4109
|
-
*
|
|
4110
|
-
* 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.
|
|
4111
|
-
*/
|
|
4112
|
-
export const listSandboxFiles = (options) => (options.client ?? client).get({
|
|
4113
|
-
security: [{
|
|
4114
|
-
key: 'BearerAuth',
|
|
4115
|
-
scheme: 'bearer',
|
|
4116
|
-
type: 'http'
|
|
4117
|
-
}, {
|
|
4118
|
-
key: 'ApiKeyAuth',
|
|
4119
|
-
name: 'X-API-Key',
|
|
4120
|
-
type: 'apiKey'
|
|
4121
|
-
}],
|
|
4122
|
-
url: '/sandbox/v1/sandboxes/{sandbox_id}/files:list',
|
|
4123
|
-
...options
|
|
4124
|
-
});
|
|
4125
|
-
/**
|
|
4126
|
-
* Create a directory in the sandbox
|
|
4170
|
+
* List spec revisions
|
|
4127
4171
|
*
|
|
4128
|
-
*
|
|
4172
|
+
* 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.
|
|
4129
4173
|
*/
|
|
4130
|
-
export const
|
|
4174
|
+
export const listOrganizationSpecRevisions = (options) => (options.client ?? client).get({
|
|
4131
4175
|
security: [{
|
|
4132
4176
|
key: 'BearerAuth',
|
|
4133
4177
|
scheme: 'bearer',
|
|
@@ -4137,37 +4181,33 @@ export const makeSandboxDirectory = (options) => (options.client ?? client).post
|
|
|
4137
4181
|
name: 'X-API-Key',
|
|
4138
4182
|
type: 'apiKey'
|
|
4139
4183
|
}],
|
|
4140
|
-
url: '/
|
|
4184
|
+
url: '/workforce/v1/specs/{kind}/{id}/revisions',
|
|
4141
4185
|
...options
|
|
4142
4186
|
});
|
|
4143
4187
|
/**
|
|
4144
|
-
*
|
|
4188
|
+
* Diff two spec revisions
|
|
4145
4189
|
*
|
|
4146
|
-
*
|
|
4190
|
+
* 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.
|
|
4147
4191
|
*/
|
|
4148
|
-
export const
|
|
4192
|
+
export const diffOrganizationSpec = (options) => (options.client ?? client).get({
|
|
4149
4193
|
security: [{
|
|
4150
4194
|
key: 'BearerAuth',
|
|
4151
4195
|
scheme: 'bearer',
|
|
4152
4196
|
type: 'http'
|
|
4153
4197
|
}, {
|
|
4154
4198
|
key: 'ApiKeyAuth',
|
|
4155
|
-
name: 'X-API-Key',
|
|
4156
|
-
type: 'apiKey'
|
|
4157
|
-
}],
|
|
4158
|
-
url: '/
|
|
4159
|
-
...options
|
|
4160
|
-
headers: {
|
|
4161
|
-
'Content-Type': 'application/json',
|
|
4162
|
-
...options.headers
|
|
4163
|
-
}
|
|
4199
|
+
name: 'X-API-Key',
|
|
4200
|
+
type: 'apiKey'
|
|
4201
|
+
}],
|
|
4202
|
+
url: '/workforce/v1/specs/{kind}/{id}/diff',
|
|
4203
|
+
...options
|
|
4164
4204
|
});
|
|
4165
4205
|
/**
|
|
4166
|
-
*
|
|
4206
|
+
* Read the effective spec
|
|
4167
4207
|
*
|
|
4168
|
-
*
|
|
4208
|
+
* 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.
|
|
4169
4209
|
*/
|
|
4170
|
-
export const
|
|
4210
|
+
export const getOrganizationEffectiveSpec = (options) => (options?.client ?? client).get({
|
|
4171
4211
|
security: [{
|
|
4172
4212
|
key: 'BearerAuth',
|
|
4173
4213
|
scheme: 'bearer',
|
|
@@ -4177,15 +4217,15 @@ export const createByodPairing = (options) => (options?.client ?? client).post({
|
|
|
4177
4217
|
name: 'X-API-Key',
|
|
4178
4218
|
type: 'apiKey'
|
|
4179
4219
|
}],
|
|
4180
|
-
url: '/
|
|
4220
|
+
url: '/workforce/v1/effective_spec',
|
|
4181
4221
|
...options
|
|
4182
4222
|
});
|
|
4183
4223
|
/**
|
|
4184
|
-
*
|
|
4224
|
+
* Read the spec schema
|
|
4185
4225
|
*
|
|
4186
|
-
*
|
|
4226
|
+
* 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.
|
|
4187
4227
|
*/
|
|
4188
|
-
export const
|
|
4228
|
+
export const getOrganizationSpecSchema = (options) => (options?.client ?? client).get({
|
|
4189
4229
|
security: [{
|
|
4190
4230
|
key: 'BearerAuth',
|
|
4191
4231
|
scheme: 'bearer',
|
|
@@ -4195,15 +4235,15 @@ export const listByodDevices = (options) => (options?.client ?? client).get({
|
|
|
4195
4235
|
name: 'X-API-Key',
|
|
4196
4236
|
type: 'apiKey'
|
|
4197
4237
|
}],
|
|
4198
|
-
url: '/
|
|
4238
|
+
url: '/workforce/v1/spec_schema',
|
|
4199
4239
|
...options
|
|
4200
4240
|
});
|
|
4201
4241
|
/**
|
|
4202
|
-
*
|
|
4242
|
+
* Plan reconciliation
|
|
4203
4243
|
*
|
|
4204
|
-
*
|
|
4244
|
+
* 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.
|
|
4205
4245
|
*/
|
|
4206
|
-
export const
|
|
4246
|
+
export const planOrganizationReconcile = (options) => (options.client ?? client).get({
|
|
4207
4247
|
security: [{
|
|
4208
4248
|
key: 'BearerAuth',
|
|
4209
4249
|
scheme: 'bearer',
|
|
@@ -4213,15 +4253,15 @@ export const getByodDevice = (options) => (options.client ?? client).get({
|
|
|
4213
4253
|
name: 'X-API-Key',
|
|
4214
4254
|
type: 'apiKey'
|
|
4215
4255
|
}],
|
|
4216
|
-
url: '/
|
|
4256
|
+
url: '/workforce/v1/reconcile/plan',
|
|
4217
4257
|
...options
|
|
4218
4258
|
});
|
|
4219
4259
|
/**
|
|
4220
|
-
*
|
|
4260
|
+
* Read reconcile status
|
|
4221
4261
|
*
|
|
4222
|
-
*
|
|
4262
|
+
* 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 or paused), 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.
|
|
4223
4263
|
*/
|
|
4224
|
-
export const
|
|
4264
|
+
export const getOrganizationReconcileStatus = (options) => (options.client ?? client).get({
|
|
4225
4265
|
security: [{
|
|
4226
4266
|
key: 'BearerAuth',
|
|
4227
4267
|
scheme: 'bearer',
|
|
@@ -4231,19 +4271,15 @@ export const updateByodDevice = (options) => (options.client ?? client).patch({
|
|
|
4231
4271
|
name: 'X-API-Key',
|
|
4232
4272
|
type: 'apiKey'
|
|
4233
4273
|
}],
|
|
4234
|
-
url: '/
|
|
4235
|
-
...options
|
|
4236
|
-
headers: {
|
|
4237
|
-
'Content-Type': 'application/json',
|
|
4238
|
-
...options.headers
|
|
4239
|
-
}
|
|
4274
|
+
url: '/workforce/v1/reconcile/status',
|
|
4275
|
+
...options
|
|
4240
4276
|
});
|
|
4241
4277
|
/**
|
|
4242
|
-
*
|
|
4278
|
+
* Run reconciliation now
|
|
4243
4279
|
*
|
|
4244
|
-
*
|
|
4280
|
+
* 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"}.
|
|
4245
4281
|
*/
|
|
4246
|
-
export const
|
|
4282
|
+
export const runOrganizationReconcile = (options) => (options.client ?? client).post({
|
|
4247
4283
|
security: [{
|
|
4248
4284
|
key: 'BearerAuth',
|
|
4249
4285
|
scheme: 'bearer',
|
|
@@ -4253,15 +4289,19 @@ export const disconnectByodDevice = (options) => (options.client ?? client).post
|
|
|
4253
4289
|
name: 'X-API-Key',
|
|
4254
4290
|
type: 'apiKey'
|
|
4255
4291
|
}],
|
|
4256
|
-
url: '/
|
|
4257
|
-
...options
|
|
4292
|
+
url: '/workforce/v1/reconcile/run',
|
|
4293
|
+
...options,
|
|
4294
|
+
headers: {
|
|
4295
|
+
'Content-Type': 'application/json',
|
|
4296
|
+
...options.headers
|
|
4297
|
+
}
|
|
4258
4298
|
});
|
|
4259
4299
|
/**
|
|
4260
|
-
*
|
|
4300
|
+
* Pause reconciliation
|
|
4261
4301
|
*
|
|
4262
|
-
*
|
|
4302
|
+
* 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"}.
|
|
4263
4303
|
*/
|
|
4264
|
-
export const
|
|
4304
|
+
export const pauseOrganizationReconcile = (options) => (options.client ?? client).post({
|
|
4265
4305
|
security: [{
|
|
4266
4306
|
key: 'BearerAuth',
|
|
4267
4307
|
scheme: 'bearer',
|
|
@@ -4271,15 +4311,19 @@ export const getByodPairing = (options) => (options.client ?? client).get({
|
|
|
4271
4311
|
name: 'X-API-Key',
|
|
4272
4312
|
type: 'apiKey'
|
|
4273
4313
|
}],
|
|
4274
|
-
url: '/
|
|
4275
|
-
...options
|
|
4314
|
+
url: '/workforce/v1/reconcile/pause',
|
|
4315
|
+
...options,
|
|
4316
|
+
headers: {
|
|
4317
|
+
'Content-Type': 'application/json',
|
|
4318
|
+
...options.headers
|
|
4319
|
+
}
|
|
4276
4320
|
});
|
|
4277
4321
|
/**
|
|
4278
|
-
*
|
|
4322
|
+
* Resume reconciliation
|
|
4279
4323
|
*
|
|
4280
|
-
*
|
|
4324
|
+
* 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"}.
|
|
4281
4325
|
*/
|
|
4282
|
-
export const
|
|
4326
|
+
export const resumeOrganizationReconcile = (options) => (options.client ?? client).post({
|
|
4283
4327
|
security: [{
|
|
4284
4328
|
key: 'BearerAuth',
|
|
4285
4329
|
scheme: 'bearer',
|
|
@@ -4289,7 +4333,7 @@ export const claimByodPairing = (options) => (options.client ?? client).post({
|
|
|
4289
4333
|
name: 'X-API-Key',
|
|
4290
4334
|
type: 'apiKey'
|
|
4291
4335
|
}],
|
|
4292
|
-
url: '/
|
|
4336
|
+
url: '/workforce/v1/reconcile/resume',
|
|
4293
4337
|
...options,
|
|
4294
4338
|
headers: {
|
|
4295
4339
|
'Content-Type': 'application/json',
|
|
@@ -5517,7 +5561,7 @@ export const applicationListGrants = (options) => (options.client ?? client).get
|
|
|
5517
5561
|
/**
|
|
5518
5562
|
* Create grant
|
|
5519
5563
|
*
|
|
5520
|
-
* Record access to an organization-owned database
|
|
5564
|
+
* 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).
|
|
5521
5565
|
*/
|
|
5522
5566
|
export const applicationCreateGrant = (options) => (options.client ?? client).post({
|
|
5523
5567
|
security: [{
|
|
@@ -6105,7 +6149,7 @@ export const automationWorkflowsList = (options) => (options?.client ?? client).
|
|
|
6105
6149
|
/**
|
|
6106
6150
|
* Create a workflow
|
|
6107
6151
|
*
|
|
6108
|
-
* Workflow syntax reference: https://deepraxis.com/
|
|
6152
|
+
* Workflow syntax reference: https://docs.deepraxis.com/developers/automation/reference/workflow-syntax. Save a YAML workflow as an editable draft; this does not validate, publish or run it, so check it with validate (kind=workflow) first. Minimal draft: document with dsl ("1.0.3"), namespace, name and version, plus a do list of steps, for example document: {dsl: "1.0.3", namespace: demo, name: add, version: "1.0.0"} and do: [{first: {call: demo/add-one, with: {n: "${ .n }"}}}]. call: <ns/name> calls an Action directly (bare name for built-ins such as ocr) and with is the Action input; the input contract is at current_revision.input_schema in the get-action response. run: starts a saved script or child workflow. The run input is . in the first step, and expressions are jq written as a whole ${ ... } string. Limits: Action 5 min (run-sandbox 6 h), workflow 24 h by default and 30 days at most, payload 1 MiB. Test the draft by sending its source and language=yaml to praxis.automation.runs.create. To pause for a person, call praxis/approval (it opens a human task; the step output is the decision); agents answer with praxis.automation.humanTasks.respond on behalf of their user. Guide: /developers/automation/guides/approvals Guide: /developers/automation/guides/write-workflow. Error details are in the errors[] of the response (pointer, detail, hint). Choose your own namespace without registering it first; praxis is reserved for built-in Actions. Scripts and workflows share names within the tenant; a duplicate returns NAME_TAKEN. run.workflow accepts ns/name@range or {namespace, name, version, input}; run.script uses the same reference shape as a platform extension. Object namespace, name and version are required; version accepts an exact version, dist-tag or range, locked at publication. Object input defaults to {} and supports expressions; string references retain task-level with. run.await defaults to true and returns the child output. With false, the child uses detach and the task immediately returns {run_id}; parent cancellation does not cascade. Inline script.code returns DEFINITION_INVALID with a detail asking you to save a script and reference it first. raise.error retains its type URI, status, title and detail in the run error.
|
|
6109
6153
|
*/
|
|
6110
6154
|
export const automationWorkflowsCreate = (options) => (options.client ?? client).post({
|
|
6111
6155
|
security: [{
|
|
@@ -6145,7 +6189,7 @@ export const automationWorkflowsGet = (options) => (options.client ?? client).ge
|
|
|
6145
6189
|
/**
|
|
6146
6190
|
* Update a workflow draft
|
|
6147
6191
|
*
|
|
6148
|
-
* Update description, labels or draft with the current draft revision in If-Match, taken from draft.revision in the get-workflow response. Even metadata-only updates create a new draft revision. A mismatch returns 412 PRECONDITION_FAILED; read the draft again, merge and retry. The draft is not validated here, so check it with validate (kind=workflow) before publishing. Error details are in errors[]. See the workflow syntax reference at https://deepraxis.com/
|
|
6192
|
+
* Update description, labels or draft with the current draft revision in If-Match, taken from draft.revision in the get-workflow response. Even metadata-only updates create a new draft revision. A mismatch returns 412 PRECONDITION_FAILED; read the draft again, merge and retry. The draft is not validated here, so check it with validate (kind=workflow) before publishing. Error details are in errors[]. See the workflow syntax reference at https://docs.deepraxis.com/developers/automation/reference/workflow-syntax.
|
|
6149
6193
|
*/
|
|
6150
6194
|
export const automationWorkflowsPatch = (options) => (options.client ?? client).patch({
|
|
6151
6195
|
security: [{
|
|
@@ -6349,7 +6393,7 @@ export const automationWorkflowsSetDistTag = (options) => (options.client ?? cli
|
|
|
6349
6393
|
/**
|
|
6350
6394
|
* Validate a definition
|
|
6351
6395
|
*
|
|
6352
|
-
* Check source without executing it when you need diagnostics, inferred schemas or references. This is optional before praxis.automation.runs.create, which also validates source before execution. Actions, scripts and workflows are supported; results include validity without saving. Invalid source is reported with valid=false. Script/action output schemas are inferred from return types: Promise unwrapping, Record, intersections and Date. Unknown types yield an empty schema and a warning in warnings. Source diagnostics use /source or /implementation/source with 1-based line/column. For kind=action the same admission checks as action creation apply (no external imports, platform operations only as direct call(praxis/<api>.<op>, input) calls, no agent or automation calls), so source that validates is not rejected at creation. For kind=workflow the YAML needs document (dsl, namespace, name, version) and do; each problem is one entry in errors[] (pointer, detail, hint), so read the first one. A listen outside the supported subset (to.all, inside a fork) and emit are not reported here and fail with DEFINITION_INVALID only when a run is created. Workflow syntax reference: https://deepraxis.com/
|
|
6396
|
+
* Check source without executing it when you need diagnostics, inferred schemas or references. This is optional before praxis.automation.runs.create, which also validates source before execution. Actions, scripts and workflows are supported; results include validity without saving. Invalid source is reported with valid=false. Script/action output schemas are inferred from return types: Promise unwrapping, Record, intersections and Date. Unknown types yield an empty schema and a warning in warnings. Source diagnostics use /source or /implementation/source with 1-based line/column. For kind=action the same admission checks as action creation apply (no external imports, platform operations only as direct call(praxis/<api>.<op>, input) calls, no agent or automation calls), so source that validates is not rejected at creation. For kind=workflow the YAML needs document (dsl, namespace, name, version) and do; each problem is one entry in errors[] (pointer, detail, hint), so read the first one. A listen outside the supported subset (to.all, inside a fork) and emit are not reported here and fail with DEFINITION_INVALID only when a run is created. Workflow syntax reference: https://docs.deepraxis.com/developers/automation/reference/workflow-syntax.
|
|
6353
6397
|
*/
|
|
6354
6398
|
export const automationValidateValidate = (options) => (options.client ?? client).post({
|
|
6355
6399
|
security: [{
|
|
@@ -8592,7 +8636,7 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
|
8592
8636
|
* codemode.describe("praxis.cut.script") // names, one page at a time
|
|
8593
8637
|
* ```
|
|
8594
8638
|
*
|
|
8595
|
-
* Published at https://docs.deepraxis.com/
|
|
8639
|
+
* Published at https://docs.deepraxis.com/developers/cut/script-reference with one anchor per entry. Names below omit the `praxis.cut.<kind>.` prefix.
|
|
8596
8640
|
*
|
|
8597
8641
|
* #### Script functions (script)
|
|
8598
8642
|
*
|
|
@@ -9111,7 +9155,7 @@ export const databaseListDatabases = (options) => (options?.client ?? client).ge
|
|
|
9111
9155
|
/**
|
|
9112
9156
|
* Create database
|
|
9113
9157
|
*
|
|
9114
|
-
* 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.
|
|
9158
|
+
* 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.
|
|
9115
9159
|
*/
|
|
9116
9160
|
export const databaseCreateDatabase = (options) => (options.client ?? client).post({
|
|
9117
9161
|
security: [{
|
|
@@ -9422,6 +9466,102 @@ export const databaseInsert = (options) => (options.client ?? client).post({
|
|
|
9422
9466
|
...options.headers
|
|
9423
9467
|
}
|
|
9424
9468
|
});
|
|
9469
|
+
/**
|
|
9470
|
+
* List keys
|
|
9471
|
+
*
|
|
9472
|
+
* 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.
|
|
9473
|
+
*/
|
|
9474
|
+
export const databaseListKeys = (options) => (options.client ?? client).get({
|
|
9475
|
+
security: [{
|
|
9476
|
+
key: 'database-bearerAuth',
|
|
9477
|
+
scheme: 'bearer',
|
|
9478
|
+
type: 'http'
|
|
9479
|
+
}],
|
|
9480
|
+
url: '/database/v1/databases/{database_id}/keys',
|
|
9481
|
+
...options
|
|
9482
|
+
});
|
|
9483
|
+
/**
|
|
9484
|
+
* Delete key
|
|
9485
|
+
*
|
|
9486
|
+
* 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.
|
|
9487
|
+
*/
|
|
9488
|
+
export const databaseDeleteKey = (options) => (options.client ?? client).delete({
|
|
9489
|
+
security: [{
|
|
9490
|
+
key: 'database-bearerAuth',
|
|
9491
|
+
scheme: 'bearer',
|
|
9492
|
+
type: 'http'
|
|
9493
|
+
}],
|
|
9494
|
+
url: '/database/v1/databases/{database_id}/keys/{key}',
|
|
9495
|
+
...options
|
|
9496
|
+
});
|
|
9497
|
+
/**
|
|
9498
|
+
* Get key
|
|
9499
|
+
*
|
|
9500
|
+
* 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.
|
|
9501
|
+
*/
|
|
9502
|
+
export const databaseGetKey = (options) => (options.client ?? client).get({
|
|
9503
|
+
security: [{
|
|
9504
|
+
key: 'database-bearerAuth',
|
|
9505
|
+
scheme: 'bearer',
|
|
9506
|
+
type: 'http'
|
|
9507
|
+
}],
|
|
9508
|
+
url: '/database/v1/databases/{database_id}/keys/{key}',
|
|
9509
|
+
...options
|
|
9510
|
+
});
|
|
9511
|
+
/**
|
|
9512
|
+
* Update key
|
|
9513
|
+
*
|
|
9514
|
+
* 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.
|
|
9515
|
+
*/
|
|
9516
|
+
export const databaseUpdateKey = (options) => (options.client ?? client).patch({
|
|
9517
|
+
security: [{
|
|
9518
|
+
key: 'database-bearerAuth',
|
|
9519
|
+
scheme: 'bearer',
|
|
9520
|
+
type: 'http'
|
|
9521
|
+
}],
|
|
9522
|
+
url: '/database/v1/databases/{database_id}/keys/{key}',
|
|
9523
|
+
...options,
|
|
9524
|
+
headers: {
|
|
9525
|
+
'Content-Type': 'application/json',
|
|
9526
|
+
...options.headers
|
|
9527
|
+
}
|
|
9528
|
+
});
|
|
9529
|
+
/**
|
|
9530
|
+
* Set key
|
|
9531
|
+
*
|
|
9532
|
+
* 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.
|
|
9533
|
+
*/
|
|
9534
|
+
export const databaseSetKey = (options) => (options.client ?? client).put({
|
|
9535
|
+
security: [{
|
|
9536
|
+
key: 'database-bearerAuth',
|
|
9537
|
+
scheme: 'bearer',
|
|
9538
|
+
type: 'http'
|
|
9539
|
+
}],
|
|
9540
|
+
url: '/database/v1/databases/{database_id}/keys/{key}',
|
|
9541
|
+
...options,
|
|
9542
|
+
headers: {
|
|
9543
|
+
'Content-Type': 'application/json',
|
|
9544
|
+
...options.headers
|
|
9545
|
+
}
|
|
9546
|
+
});
|
|
9547
|
+
/**
|
|
9548
|
+
* Execute command
|
|
9549
|
+
*
|
|
9550
|
+
* 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.
|
|
9551
|
+
*/
|
|
9552
|
+
export const databaseExecuteCommand = (options) => (options.client ?? client).post({
|
|
9553
|
+
security: [{
|
|
9554
|
+
key: 'database-bearerAuth',
|
|
9555
|
+
scheme: 'bearer',
|
|
9556
|
+
type: 'http'
|
|
9557
|
+
}],
|
|
9558
|
+
url: '/database/v1/databases/{database_id}/commands',
|
|
9559
|
+
...options,
|
|
9560
|
+
headers: {
|
|
9561
|
+
'Content-Type': 'application/json',
|
|
9562
|
+
...options.headers
|
|
9563
|
+
}
|
|
9564
|
+
});
|
|
9425
9565
|
/**
|
|
9426
9566
|
* Read a commit's test catalog
|
|
9427
9567
|
*
|
|
@@ -9740,6 +9880,42 @@ export const devopsProjectsList = (options) => (options?.client ?? client).get({
|
|
|
9740
9880
|
url: '/devops/v1/projects',
|
|
9741
9881
|
...options
|
|
9742
9882
|
});
|
|
9883
|
+
/**
|
|
9884
|
+
* Create a project
|
|
9885
|
+
*
|
|
9886
|
+
* Create a delivery project and its two default environments (develop, production). The code lives in one of two places. Our own Git: pass provider platform and package, the id (pkg_...) of a git package in your organization's registry (the registry domain lists packages and creates git libraries); there is no install flow and no connection, the project records the provider, the package and the package's default branch, and from then on pull requests, the merge gate, changes and cloud workspaces use that package and DevOps merges a pull request itself. A package backs at most one project (REPOSITORY_ALREADY_BOUND) and a package that is not a git package of your organization is INVALID_ARGUMENT. If the package has no default branch yet, which is usual for a library imported from elsewhere, pass initialRef, an existing branch such as import: the default branch is created at its head while the project is created, and no change can be opened before it exists. If the default branch already exists the call is refused with DEFAULT_BRANCH_EXISTS, and a missing initialRef branch with REF_NOT_FOUND; neither leaves a project behind. For a package whose project already exists, use devops.projects.initializeDefaultBranch instead. GitHub (the default): pass the connection of a completed GitHub App install and the repository (owner/name) it can see; leave both out to create a project with no repository yet. A name must be kebab-case and unused in the organization (PROJECT_NAME_TAKEN).
|
|
9887
|
+
*/
|
|
9888
|
+
export const devopsProjectsCreate = (options) => (options.client ?? client).post({
|
|
9889
|
+
security: [{
|
|
9890
|
+
key: 'devops-bearerAuth',
|
|
9891
|
+
scheme: 'bearer',
|
|
9892
|
+
type: 'http'
|
|
9893
|
+
}],
|
|
9894
|
+
url: '/devops/v1/projects',
|
|
9895
|
+
...options,
|
|
9896
|
+
headers: {
|
|
9897
|
+
'Content-Type': 'application/json',
|
|
9898
|
+
...options.headers
|
|
9899
|
+
}
|
|
9900
|
+
});
|
|
9901
|
+
/**
|
|
9902
|
+
* Create a project's default branch
|
|
9903
|
+
*
|
|
9904
|
+
* Create the default branch of a project on our own Git, once. A git package imported from elsewhere can hold branches and no default branch, and every change is cut from the default branch, so until it exists no change can be opened. The default branch is protected and only DevOps holds the credential that may write it, so this call is the one way to create it: it points the default branch at the head of the existing branch named in from (for example import). It only creates: a default branch that already exists is refused with DEFAULT_BRANCH_EXISTS and is never moved, a from that is not a branch of the repository is REF_NOT_FOUND, and a GitHub project is INVALID_ARGUMENT because GitHub's branches are GitHub's. The push reaches the project like any other push to its default branch. Read the project first (devops.projects.retrieve) for the package's default branch name.
|
|
9905
|
+
*/
|
|
9906
|
+
export const devopsProjectsInitializeDefaultBranch = (options) => (options.client ?? client).post({
|
|
9907
|
+
security: [{
|
|
9908
|
+
key: 'devops-bearerAuth',
|
|
9909
|
+
scheme: 'bearer',
|
|
9910
|
+
type: 'http'
|
|
9911
|
+
}],
|
|
9912
|
+
url: '/devops/v1/projects/{id}/default-branch:initialize',
|
|
9913
|
+
...options,
|
|
9914
|
+
headers: {
|
|
9915
|
+
'Content-Type': 'application/json',
|
|
9916
|
+
...options.headers
|
|
9917
|
+
}
|
|
9918
|
+
});
|
|
9743
9919
|
/**
|
|
9744
9920
|
* Retrieve a project
|
|
9745
9921
|
*
|
|
@@ -9839,7 +10015,7 @@ export const devopsReleasesAbandon = (options) => (options.client ?? client).pos
|
|
|
9839
10015
|
/**
|
|
9840
10016
|
* Create a promotion
|
|
9841
10017
|
*
|
|
9842
|
-
* Promote a release into one environment: this is the operation that actually schedules a deployment. Name the release and the environment; path is regular for an ordinary promotion, targeted to deploy only the targets you list, patch to carry a patch release, and rollback to return the environment to an earlier release. A regular promotion promotes EVERY target the release changed in that environment and refuses a targets list (to promote a subset use path targeted, so a narrowing is never silently ignored). A targeted promotion requires targets: each item is a target id from the target list or the workspace path the console shows (services/devops), and the call resolves the path to the id. A target the release does not carry is refused with the targets the release does deploy; so is a target this environment never runs. Naming a target also deploys the targets it depends on, which come first and are reported in plan.addedDependencies. The targets that changed but were not named are listed in plan.skipped with reason not_requested, so a reader sees what the promotion left behind. Callees upgrade first by default: naming a target brings the targets it depends on, because a caller cannot run on a callee it did not deploy. To leave one of those callees behind, pass withoutCallees, a list of { target, reason } on a targeted promotion. Each entry names a callee the named targets depend on — by target id or workspace path, as in targets — and carries a required, non-empty reason, because an exception nobody can justify afterwards is indistinguishable from a mistake. An excluded callee is subtracted rather than deferred: it is not deployed, and a target that entered the plan only through it leaves the plan too, so nothing is deployed that would have needed it. The exclusion is visible in the plan (plan.skipped with reason callee_excluded, carrying the reason in message) and on the promotion (withoutCallees), and a retry repeats it. Excluding a target you named is refused (take it out of targets instead), as is excluding a target the named ones do not depend on; a regular promotion refuses withoutCallees the same way it refuses targets. A targeted promotion's success verifies only the targets it deployed, not the whole release, so the upstream gate still requires the untouched targets before a later environment may take them. The service reads the environment's promotion order and refuses when an upstream environment has not verified this release yet, unless a bypass carries the authorization for that gate. An environment takes one promotion at a time, so a create while another is running is queued behind it rather than refused; only a regular promotion supersedes waiting regular ones, and a targeted promotion neither overtakes another ride nor is overtaken. Set validateOnly to read the plan and its refusals — layers, skipped targets, pending migrations, missing configuration keys — without scheduling anything, which is the safe way to find out what a promotion will do; the same plan is on the promotion
|
|
10018
|
+
* 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`.
|
|
9843
10019
|
*/
|
|
9844
10020
|
export const devopsPromotionsCreate = (options) => (options.client ?? client).post({
|
|
9845
10021
|
security: [{
|
|
@@ -9857,7 +10033,7 @@ export const devopsPromotionsCreate = (options) => (options.client ?? client).po
|
|
|
9857
10033
|
/**
|
|
9858
10034
|
* List promotions
|
|
9859
10035
|
*
|
|
9860
|
-
* 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".
|
|
10036
|
+
* 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.
|
|
9861
10037
|
*/
|
|
9862
10038
|
export const devopsPromotionsList = (options) => (options.client ?? client).get({
|
|
9863
10039
|
security: [{
|
|
@@ -9871,7 +10047,7 @@ export const devopsPromotionsList = (options) => (options.client ?? client).get(
|
|
|
9871
10047
|
/**
|
|
9872
10048
|
* Retrieve a promotion
|
|
9873
10049
|
*
|
|
9874
|
-
* 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).
|
|
10050
|
+
* 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).
|
|
9875
10051
|
*/
|
|
9876
10052
|
export const devopsPromotionsGet = (options) => (options.client ?? client).get({
|
|
9877
10053
|
security: [{
|
|
@@ -9950,6 +10126,20 @@ export const devopsPromotionsConclude = (options) => (options.client ?? client).
|
|
|
9950
10126
|
...options.headers
|
|
9951
10127
|
}
|
|
9952
10128
|
});
|
|
10129
|
+
/**
|
|
10130
|
+
* Get the checkout credential of a running promotion
|
|
10131
|
+
*
|
|
10132
|
+
* Issue the credential the deploy machine fetches a platform-Git project's code with. The caller is the deploy machine itself, during a run: its `devops/prepare` step sends the API key it already holds and receives the clone URL of the project's repository plus a pull-only credential for exactly that one repository. The credential lives 15 minutes and is issued again on every request, so it never sits in the run's stored input or log, and a leaked copy is useless almost at once. A run that needs the code later, such as an engine checkout after a long install, asks again. It answers only while the promotion is deploying (a rollback is a promotion and deploys too) or halted; a promotion that is queued, waiting for approval, observing or finished is refused with PROMOTION_NOT_RUNNING, because no machine should be fetching code for it. A project whose code is on GitHub is refused with SOURCE_NOT_PLATFORM: its checkout uses the GitHub App token, not this. The key must belong to the promotion's organization, the same check as reading the promotion with `praxis api devops promotion get <id>`. People do not need this call: to read a platform project's code use the code browser calls instead.
|
|
10133
|
+
*/
|
|
10134
|
+
export const devopsPromotionsCheckoutCredential = (options) => (options.client ?? client).post({
|
|
10135
|
+
security: [{
|
|
10136
|
+
key: 'devops-bearerAuth',
|
|
10137
|
+
scheme: 'bearer',
|
|
10138
|
+
type: 'http'
|
|
10139
|
+
}],
|
|
10140
|
+
url: '/devops/v1/promotions/{id}:checkoutCredential',
|
|
10141
|
+
...options
|
|
10142
|
+
});
|
|
9953
10143
|
/**
|
|
9954
10144
|
* List a promotion's rollouts
|
|
9955
10145
|
*
|
|
@@ -10027,7 +10217,7 @@ export const devopsEnvironmentsCheckpointsList = (options) => (options.client ??
|
|
|
10027
10217
|
/**
|
|
10028
10218
|
* Roll an environment back
|
|
10029
10219
|
*
|
|
10030
|
-
* 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.
|
|
10220
|
+
* 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.
|
|
10031
10221
|
*/
|
|
10032
10222
|
export const devopsEnvironmentsRollback = (options) => (options.client ?? client).post({
|
|
10033
10223
|
security: [{
|
|
@@ -10501,7 +10691,7 @@ export const devopsPullRequestsList = (options) => (options.client ?? client).ge
|
|
|
10501
10691
|
/**
|
|
10502
10692
|
* Retrieve a pull request
|
|
10503
10693
|
*
|
|
10504
|
-
* Read one pull request in full: its state, its head and base, its changed paths, the exposure its description declares, and — the part this call exists for — its gate. The gate is a list of named checks (the declaration, the flag duties, the affected tests, and the one judgement only a person makes), each with a result and, when it failed or is pending, the sentence saying what is missing; the gate's own state is passed only when no check failed and none is still pending. Read the gate here before merging or before recording a verdict, and read it again after a rerun: the checks are facts about the current head, and a new head starts a new gate. Add expand=runs to also get the
|
|
10694
|
+
* Read one pull request in full: its state, its head and base, its changed paths, the exposure its description declares, and — the part this call exists for — its gate. The gate is a list of named checks (the declaration, the flag duties, the affected tests, and the one judgement only a person makes), each with a result and, when it failed or is pending, the sentence saying what is missing; the tests check is never pending, because DevOps runs no tests for a pull request: it is passed, or failed naming the missing or failed cases and the command `praxis devops test <package> --record-impact` the author runs on the pushed head; the gate's own state is passed only when no check failed and none is still pending. Read the gate here before merging or before recording a verdict, and read it again after a rerun: the checks are facts about the current head, and a new head starts a new gate. Add expand=runs to also get the test runs reported at the head commit (uploaded by the author, never started by DevOps), newest first.
|
|
10505
10695
|
*/
|
|
10506
10696
|
export const devopsPullRequestsGet = (options) => (options.client ?? client).get({
|
|
10507
10697
|
security: [{
|
|
@@ -10515,7 +10705,7 @@ export const devopsPullRequestsGet = (options) => (options.client ?? client).get
|
|
|
10515
10705
|
/**
|
|
10516
10706
|
* Decide a pull request's merge gate again
|
|
10517
10707
|
*
|
|
10518
|
-
* Decide the merge gate again at the pull request's current head and report the result on GitHub as the "Praxis DevOps / gate" check run. Use it when a fact the gate reads has changed without a new push — a
|
|
10708
|
+
* Decide the merge gate again at the pull request's current head and report the result on GitHub as the "Praxis DevOps / gate" check run. Use it when a fact the gate reads has changed without a new push — a flag was registered, or a check that had no evidence now has some (test evidence uploaded for the head already decides the gate again by itself) — so nobody has to push an empty commit to make the check move. The answer is the pull request with the gate it now reaches. A head whose earlier gate already had a verdict and comes back pending opens a NEW check run, because GitHub will not reopen a completed one; while the same head is still deciding, the run it already owns is updated in place. Nothing else on the pull request changes, and repeating the call is safe: the same facts decide the same gate.
|
|
10519
10709
|
*/
|
|
10520
10710
|
export const devopsPullRequestsRerunGate = (options) => (options.client ?? client).post({
|
|
10521
10711
|
security: [{
|
|
@@ -10529,7 +10719,7 @@ export const devopsPullRequestsRerunGate = (options) => (options.client ?? clien
|
|
|
10529
10719
|
/**
|
|
10530
10720
|
* Merge a pull request through its gate
|
|
10531
10721
|
*
|
|
10532
|
-
* Land a pull request by having DevOps call GitHub, so the merge goes through the platform's own merge gate instead of around it. The gate is the permission: while the gate is pending or failed the merge is refused with GATE_NOT_PASSED, and a pull request that is already merged or closed is refused with PULL_REQUEST_NOT_OPEN. Only the commit the gate decided on may land — that commit is sent to GitHub as the merge sha, so a head that moved underneath is refused with HEAD_MOVED rather than merged untested — and GitHub's own refusal, such as a conflict, comes back as MERGE_REFUSED carrying its words. method picks the merge shape
|
|
10722
|
+
* Land a pull request by having DevOps call GitHub, so the merge goes through the platform's own merge gate instead of around it. The gate is the permission: while the gate is pending or failed the merge is refused with GATE_NOT_PASSED, and a pull request that is already merged or closed is refused with PULL_REQUEST_NOT_OPEN. Only the commit the gate decided on may land — that commit is sent to GitHub as the merge sha, so a head that moved underneath is refused with HEAD_MOVED rather than merged untested — and GitHub's own refusal, such as a conflict, comes back as MERGE_REFUSED carrying its words. method picks the merge shape; on GitHub it defaults to rebase. A project on our own Git (provider platform) merges by squash only: no method means squash, and rebase or merge is refused with INVALID_ARGUMENT naming squash. queue true does not merge now: it puts the pull request into its (project, base) merge queue, where the commit that eventually lands is one GitHub built from the current base and a test run proved. Send requestId to make a retry safe — a retry that reaches a pull request DevOps itself already merged answers that merge without calling GitHub again; it does not make the merge wait. Merging something already merged by somebody else stays a refusal rather than a replay.
|
|
10533
10723
|
*/
|
|
10534
10724
|
export const devopsPullRequestsMerge = (options) => (options.client ?? client).post({
|
|
10535
10725
|
security: [{
|
|
@@ -10545,9 +10735,9 @@ export const devopsPullRequestsMerge = (options) => (options.client ?? client).p
|
|
|
10545
10735
|
}
|
|
10546
10736
|
});
|
|
10547
10737
|
/**
|
|
10548
|
-
* Record a
|
|
10738
|
+
* Record a review verdict on a pull request
|
|
10549
10739
|
*
|
|
10550
|
-
*
|
|
10740
|
+
* Record a reviewer's verdict on a pull request, after the fact (Sean 2026-11-24). The merge gate no longer waits for it: exposure-judged is decided by machine from the declaration for every kind of exposure, so a pull request merges without any verdict. This call is the review record — send result passed or failed with reason saying in a sentence a reviewer can act on why. It is stored on the pull request as review and announced with the event devops.pullRequest.reviewed. A failed verdict on an already merged pull request is a finding for follow-up (the event says finding true): the merge stands, nothing is un-merged, and a rollback or a fix is asked for on the ticket. headSha must be the pull request's head, and a verdict for another commit is refused with INVALID_ARGUMENT. List the merged pull requests nobody reviewed with pullRequests.list reviewed=false.
|
|
10551
10741
|
*/
|
|
10552
10742
|
export const devopsPullRequestsRecordVerdict = (options) => (options.client ?? client).post({
|
|
10553
10743
|
security: [{
|
|
@@ -10580,6 +10770,24 @@ export const devopsPullRequestsClose = (options) => (options.client ?? client).p
|
|
|
10580
10770
|
...options.headers
|
|
10581
10771
|
}
|
|
10582
10772
|
});
|
|
10773
|
+
/**
|
|
10774
|
+
* Review a pull request on our own Git
|
|
10775
|
+
*
|
|
10776
|
+
* Give your verdict on a pull request whose project keeps its code on the platform's own Git, where there is no GitHub to hold reviews. The reviewer is you — the user or agent the credential names, never a name in the body — and the platform stores your verdict on the pull request's reviewers under your id, so an ownership rule that lists principal ids reads it. Send approved to approve, changes_requested to hold it with changes you want, or commented to say something without a verdict. A second review from you replaces your first, and the gate is decided again so a rule that reads reviews sees it at once. Only an open pull request is reviewed: a merged or closed one is refused with PULL_REQUEST_NOT_OPEN. A project connected to GitHub is refused with INVALID_ARGUMENT, because its reviews belong to GitHub and the platform projects them from there, so a verdict is never recorded in two places that can disagree.
|
|
10777
|
+
*/
|
|
10778
|
+
export const devopsPullRequestsReviewsCreate = (options) => (options.client ?? client).post({
|
|
10779
|
+
security: [{
|
|
10780
|
+
key: 'devops-bearerAuth',
|
|
10781
|
+
scheme: 'bearer',
|
|
10782
|
+
type: 'http'
|
|
10783
|
+
}],
|
|
10784
|
+
url: '/devops/v1/pull-requests/{id}/reviews',
|
|
10785
|
+
...options,
|
|
10786
|
+
headers: {
|
|
10787
|
+
'Content-Type': 'application/json',
|
|
10788
|
+
...options.headers
|
|
10789
|
+
}
|
|
10790
|
+
});
|
|
10583
10791
|
/**
|
|
10584
10792
|
* List connections
|
|
10585
10793
|
*
|
|
@@ -10725,7 +10933,7 @@ export const devopsTestRunsRetryFailed = (options) => (options.client ?? client)
|
|
|
10725
10933
|
/**
|
|
10726
10934
|
* List a project's stage workspaces
|
|
10727
10935
|
*
|
|
10728
|
-
* List the project's three stage workspaces — development, integration and
|
|
10936
|
+
* List the project's three stage workspaces — development, integration and release — in that order. Each row says how a machine of that stage is built and how long it lives; it is configuration, not a machine, so listing never opens one. A project whose rows do not exist yet gets all three materialized on this call with the defaults (size medium, prebuild on, idle timeout 30 minutes, retention 7 days), and a later call reads those same rows back rather than replacing them. Read one stage with the workspace retrieve; the machines actually running are units.
|
|
10729
10937
|
*/
|
|
10730
10938
|
export const devopsWorkspacesList = (options) => (options.client ?? client).get({
|
|
10731
10939
|
security: [{
|
|
@@ -10800,6 +11008,20 @@ export const devopsUnitsCreate = (options) => (options.client ?? client).post({
|
|
|
10800
11008
|
...options.headers
|
|
10801
11009
|
}
|
|
10802
11010
|
});
|
|
11011
|
+
/**
|
|
11012
|
+
* List a project's cleanup ledger
|
|
11013
|
+
*
|
|
11014
|
+
* List what the daily cleanup job removed or archived for the project, newest decision first: merged branches deleted when their pull request merged, stopped units deleted after the project's window, test evidence past its age, and prebuilds beyond the kept versions. Each row names the kind of thing, which one, whether it was archived (the record stays, the heavy content goes) or deleted, the reason and when it was decided and done; error is set while the last attempt failed and the job will try again. The ledger is read-only: the job is its only writer, and a project changes what is kept through settings.retention on devops.projects.update. A project with no row has had nothing cleaned.
|
|
11015
|
+
*/
|
|
11016
|
+
export const devopsCleanupsList = (options) => (options.client ?? client).get({
|
|
11017
|
+
security: [{
|
|
11018
|
+
key: 'devops-bearerAuth',
|
|
11019
|
+
scheme: 'bearer',
|
|
11020
|
+
type: 'http'
|
|
11021
|
+
}],
|
|
11022
|
+
url: '/devops/v1/projects/{project}/cleanups',
|
|
11023
|
+
...options
|
|
11024
|
+
});
|
|
10803
11025
|
/**
|
|
10804
11026
|
* Delete a unit
|
|
10805
11027
|
*
|
|
@@ -12297,7 +12519,7 @@ export const registryRepositoriesList = (options) => (options?.client ?? client)
|
|
|
12297
12519
|
/**
|
|
12298
12520
|
* Create repository
|
|
12299
12521
|
*
|
|
12300
|
-
* 新建一个库来分类存放包。name 是库的唯一标识,小写字母、数字和连字符,最多 63 个字符,且不能和已有的库重名;display_name 和 description 是给人看的。每个组织本来就有一个默认库,需要新分类时才建;一个库非空时不能删除,所以不要用库来临时隔离一次上传。
|
|
12522
|
+
* 新建一个库来分类存放包。name 是库的唯一标识,小写字母、数字和连字符,最多 63 个字符,且不能和已有的库重名;display_name 和 description 是给人看的。每个组织本来就有一个默认库,需要新分类时才建;一个库非空时不能删除,所以不要用库来临时隔离一次上传。format 默认 oci,库里放技能和插件;要放 git 仓库就传 format=git,建库后 format 不能改。git 库需要这个组织已开放 git 功能,否则返回 409。
|
|
12301
12523
|
*/
|
|
12302
12524
|
export const registryRepositoriesCreate = (options) => (options.client ?? client).post({
|
|
12303
12525
|
security: [{
|
|
@@ -12373,12 +12595,11 @@ export const registryRepositoriesPackagesList = (options) => (options.client ??
|
|
|
12373
12595
|
...options
|
|
12374
12596
|
});
|
|
12375
12597
|
/**
|
|
12376
|
-
*
|
|
12598
|
+
* Create a package
|
|
12377
12599
|
*
|
|
12378
|
-
*
|
|
12600
|
+
* 在一个库里建新包,按库的 format 走两条路。git 库(format=git):Content-Type 用 application/json,请求体 {name, format:"git", default_branch?, description?, import?},建一个空的 git 仓库,或者用 import.url(公开 https 仓库)从现有仓库导入;成功返回的包带 clone_url、default_branch 和 protected_refs(默认只保护默认分支),接着调用 packages.git-credential 取推拉凭据;组织未开放 git 功能返回 409,往 oci 库里用 JSON 建包也是 409。oci 库(技能和插件):把一个新包发布进这个库,一次调用建立包并上传它的第一个版本,Content-Type 用 multipart/form-data。发布内容是 multipart:version 必填,archive 给一个 zip,或者 files 给一组文件(每个文件的 filename 是相对上传根的路径,例如 pdf/SKILL.md)。单个顶层目录会被剥掉。种类按根上有什么判:有 SKILL.md 就是 skill,有 .claude-plugin/plugin.json 就是 plugin;两者都没有、或都有,会被拒。名字从 SKILL.md 或 plugin.json 里读,不从路径或 query 猜。限额:上传 ≤25 MiB,解压后 ≤50 MiB,≤1000 个文件。版本必须是 semver 且严格递增;第一个版本可以是任意合法 semver,之后每个新版本都要比已发布的最高版本高。把已有智能体的技能搬过来时,先用 GET /agent/v1/skills/{id}/versions/{v}/content 导出 zip,再在这里作为 archive 发布。
|
|
12379
12601
|
*/
|
|
12380
12602
|
export const registryRepositoriesPackagesCreate = (options) => (options.client ?? client).post({
|
|
12381
|
-
...formDataBodySerializer,
|
|
12382
12603
|
security: [{
|
|
12383
12604
|
key: 'registry-bearerAuth',
|
|
12384
12605
|
scheme: 'bearer',
|
|
@@ -12387,7 +12608,7 @@ export const registryRepositoriesPackagesCreate = (options) => (options.client ?
|
|
|
12387
12608
|
url: '/registry/v1/repositories/{repository_id}/packages',
|
|
12388
12609
|
...options,
|
|
12389
12610
|
headers: {
|
|
12390
|
-
'Content-Type':
|
|
12611
|
+
'Content-Type': 'application/json',
|
|
12391
12612
|
...options.headers
|
|
12392
12613
|
}
|
|
12393
12614
|
});
|
|
@@ -12438,6 +12659,24 @@ export const registryPackagesVersionsCreate = (options) => (options.client ?? cl
|
|
|
12438
12659
|
...options.headers
|
|
12439
12660
|
}
|
|
12440
12661
|
});
|
|
12662
|
+
/**
|
|
12663
|
+
* Create a git credential
|
|
12664
|
+
*
|
|
12665
|
+
* 给一个 git 包换一个短期的 git 凭据,用来 git clone / git push。access 选 pull(只读,用来克隆和拉取)或 push(推分支,同时可以克隆和拉取)。push-protected(更新受保护分支)暂不发放,请推到别的分支再合并,请求它返回 400。ttl_seconds 是有效秒数,1-3600,默认 3600;到期后重新调用本接口,不要缓存过期的凭据。返回的 password 是敏感信息,只出现这一次,不要写进日志或提交。用法:git clone https://x-access-token:$PASSWORD@host/git/组织/库/包.git,或把 url 里的地址配上 http.extraHeader。组织未开放 git 功能返回 409;另一个组织的包、已被删除的包和 oci 包都返回 404。同一个 package_id 可以多次取,每次是一个新凭据,互不影响。
|
|
12666
|
+
*/
|
|
12667
|
+
export const registryPackagesGitCredentialCreate = (options) => (options.client ?? client).post({
|
|
12668
|
+
security: [{
|
|
12669
|
+
key: 'registry-bearerAuth',
|
|
12670
|
+
scheme: 'bearer',
|
|
12671
|
+
type: 'http'
|
|
12672
|
+
}],
|
|
12673
|
+
url: '/registry/v1/packages/{package_id}/git-credential',
|
|
12674
|
+
...options,
|
|
12675
|
+
headers: {
|
|
12676
|
+
'Content-Type': 'application/json',
|
|
12677
|
+
...options.headers
|
|
12678
|
+
}
|
|
12679
|
+
});
|
|
12441
12680
|
/**
|
|
12442
12681
|
* List commits
|
|
12443
12682
|
*
|
|
@@ -12455,7 +12694,7 @@ export const registryGitLog = (options) => (options.client ?? client).get({
|
|
|
12455
12694
|
/**
|
|
12456
12695
|
* Read a commit
|
|
12457
12696
|
*
|
|
12458
|
-
* 按对象 id 读一个提交(完整 sha
|
|
12697
|
+
* 按对象 id 读一个提交(完整 sha,不解析缩写)。返回提交信息、作者、提交时间与父提交;changed_files=true 时再返回它相对第一个父提交改了哪些文件(根提交的全部文件算新增),文件列表被上限截断时 changed_files_truncated 为 true。仓库里没有这个对象返回 404。
|
|
12459
12698
|
*/
|
|
12460
12699
|
export const registryGitCommitsRetrieve = (options) => (options.client ?? client).get({
|
|
12461
12700
|
security: [{
|
|
@@ -12480,6 +12719,62 @@ export const registryGitTreesRetrieve = (options) => (options.client ?? client).
|
|
|
12480
12719
|
url: '/registry/v1/packages/{package_id}/git/trees/{sha}',
|
|
12481
12720
|
...options
|
|
12482
12721
|
});
|
|
12722
|
+
/**
|
|
12723
|
+
* List branches and tags
|
|
12724
|
+
*
|
|
12725
|
+
* 列出一个 git 包的分支和标签,按名字排序;prefix 只取 refs/heads/(分支)或 refs/tags/(标签),不给就两者都列。page 从 1 起,size 1 到 500,默认 100;has_more 为 true 表示还有下一页。带注解的标签返回它指向的提交 id,不是标签对象的 id。想把一个名字换成提交 id 用 git/resolve,不要自己在这个列表里找。只读;OCI 包返回 404。
|
|
12726
|
+
*/
|
|
12727
|
+
export const registryGitRefs = (options) => (options.client ?? client).get({
|
|
12728
|
+
security: [{
|
|
12729
|
+
key: 'registry-bearerAuth',
|
|
12730
|
+
scheme: 'bearer',
|
|
12731
|
+
type: 'http'
|
|
12732
|
+
}],
|
|
12733
|
+
url: '/registry/v1/packages/{package_id}/git/refs',
|
|
12734
|
+
...options
|
|
12735
|
+
});
|
|
12736
|
+
/**
|
|
12737
|
+
* Resolve a ref
|
|
12738
|
+
*
|
|
12739
|
+
* 把一个引用换成它指向的提交 id:ref 可以是分支名、标签名、refs/… 全名、HEAD 或完整对象 id(40 或 64 位十六进制,缩写不解析)。名字既是标签又是分支时取标签。完整对象 id 只在仓库里真有这个提交时才返回。仓库没有这个引用或提交返回 404(GIT_OBJECT_NOT_FOUND),不会返回空值。要比较两个引用用 git/compare。
|
|
12740
|
+
*/
|
|
12741
|
+
export const registryGitResolve = (options) => (options.client ?? client).get({
|
|
12742
|
+
security: [{
|
|
12743
|
+
key: 'registry-bearerAuth',
|
|
12744
|
+
scheme: 'bearer',
|
|
12745
|
+
type: 'http'
|
|
12746
|
+
}],
|
|
12747
|
+
url: '/registry/v1/packages/{package_id}/git/resolve',
|
|
12748
|
+
...options
|
|
12749
|
+
});
|
|
12750
|
+
/**
|
|
12751
|
+
* Compare two refs
|
|
12752
|
+
*
|
|
12753
|
+
* 比较 base 与 head(引用名或完整对象 id):status 是 identical、ahead(head 在 base 之上有新提交)、behind(head 已包含在 base 里)或 diverged(两边各有提交);merge_base 是找到的最近共同祖先;files 是 head 相对 merge_base 改了哪些文件(added、modified、removed、renamed,renamed 带 previous_path),commits 是 head 比 base 多出的提交,最新的在前。Artifacts 无法低成本回答祖先关系,所以这里只沿两边的第一父链各走最多 300 个提交,并在有界读取下比对树:找不到共同祖先时返回 diverged、merge_base 为 null;files 被上限(3000 个文件、1000 次树读取)截断时 truncated 为 true;commits 被截断、或合并提交藏起了被合并分支上的提交时 commits_truncated 为 true。truncated 或 commits_truncated 为 true 时不要把列表当作完整结果。引用不存在返回 404。只读。
|
|
12754
|
+
*/
|
|
12755
|
+
export const registryGitCompare = (options) => (options.client ?? client).get({
|
|
12756
|
+
security: [{
|
|
12757
|
+
key: 'registry-bearerAuth',
|
|
12758
|
+
scheme: 'bearer',
|
|
12759
|
+
type: 'http'
|
|
12760
|
+
}],
|
|
12761
|
+
url: '/registry/v1/packages/{package_id}/git/compare',
|
|
12762
|
+
...options
|
|
12763
|
+
});
|
|
12764
|
+
/**
|
|
12765
|
+
* List a tree recursively
|
|
12766
|
+
*
|
|
12767
|
+
* 读一个提交(或树对象)下的全部条目,递归,每个条目用相对根的完整路径命名,目录和子模块也是条目(子模块不展开)。适合要拿到整个仓库文件清单的场景(例如 DevOps 的构建判断);只想看一个目录用 git/trees/{sha}。相同的子树只读一次。条目上限 20000、树读取上限 1000 次,撞到上限时 truncated 为 true、entries 只是前一部分,不要当作全部。sha 通常来自 git/resolve。仓库里没有这个对象返回 404。只读。
|
|
12768
|
+
*/
|
|
12769
|
+
export const registryGitTreesRecursive = (options) => (options.client ?? client).get({
|
|
12770
|
+
security: [{
|
|
12771
|
+
key: 'registry-bearerAuth',
|
|
12772
|
+
scheme: 'bearer',
|
|
12773
|
+
type: 'http'
|
|
12774
|
+
}],
|
|
12775
|
+
url: '/registry/v1/packages/{package_id}/git/trees/{sha}/recursive',
|
|
12776
|
+
...options
|
|
12777
|
+
});
|
|
12483
12778
|
/**
|
|
12484
12779
|
* Download a file from a ref
|
|
12485
12780
|
*
|
|
@@ -15543,7 +15838,7 @@ export const vaultListTemplates = (options) => (options?.client ?? client).get({
|
|
|
15543
15838
|
/**
|
|
15544
15839
|
* Create authorization
|
|
15545
15840
|
*
|
|
15546
|
-
* Connect an OAuth service to an active vault using either an OAuth template or a resource URL. Unlike Anthropic mcp_oauth credential creation, this flow obtains tokens through user consent rather than accepting an auth token bundle; compatible mcp_oauth creation and updates return 501. Open connect_url, then poll praxis.vault.authorizations.retrieve until completed, failed or expired; only completed supplies the resulting secret_id.
|
|
15841
|
+
* Connect an OAuth service to an active vault using either an OAuth template or a resource URL. Unlike Anthropic mcp_oauth credential creation, this flow obtains tokens through user consent rather than accepting an auth token bundle; compatible mcp_oauth creation and updates return 501. Open connect_url, then poll praxis.vault.authorizations.retrieve until completed, failed or expired; only completed supplies the resulting secret_id. The resulting oauth secret serves vault-backed MCP authentication — an Agent session or deployment whose vault_ids include this vault sends it to the MCP server whose URL equals this authorization's resource URL (normalized), and the platform refreshes the token once when that server answers 401.
|
|
15547
15842
|
*/
|
|
15548
15843
|
export const vaultCreateAuthorization = (options) => (options.client ?? client).post({
|
|
15549
15844
|
security: [{
|