@soat/sdk 0.15.6 → 0.15.8
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/dist/index.cjs +161 -3
- package/dist/index.d.cts +595 -11
- package/dist/index.d.mts +595 -11
- package/dist/index.mjs +160 -4
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -954,7 +954,7 @@ var ApiKeys = class {
|
|
|
954
954
|
/**
|
|
955
955
|
* Create an API key
|
|
956
956
|
*
|
|
957
|
-
* Creates a new API key for the authenticated user. - `project_id` is
|
|
957
|
+
* Creates a new API key for the authenticated user. - `project_id` is optional. When set, the key is scoped to that single project. When omitted or null, the key is **unscoped** and spans every project its owner can reach. - If `policy_ids` is provided, the key's effective permissions are the intersection of the user's policies and the key's policies. - Otherwise the key inherits the user's permissions (confined to the key's project when scoped).
|
|
958
958
|
*
|
|
959
959
|
*/
|
|
960
960
|
static createApiKey(options) {
|
|
@@ -992,7 +992,7 @@ var ApiKeys = class {
|
|
|
992
992
|
/**
|
|
993
993
|
* Update an API key
|
|
994
994
|
*
|
|
995
|
-
* Updates an API key's name, project scope, or policies. The project scope can be changed to another project
|
|
995
|
+
* Updates an API key's name, project scope, or policies. The project scope can be changed to another project, set (scoping a previously unscoped key), or cleared with null (unscoping the key). Only the owner or an admin can update it.
|
|
996
996
|
*/
|
|
997
997
|
static updateApiKey(options) {
|
|
998
998
|
return (options.client ?? client).put({
|
|
@@ -2184,7 +2184,7 @@ var Orchestrations = class {
|
|
|
2184
2184
|
/**
|
|
2185
2185
|
* Create an orchestration
|
|
2186
2186
|
*
|
|
2187
|
-
* Creates a new orchestration
|
|
2187
|
+
* Creates a new orchestration (pipeline) definition in the project.
|
|
2188
2188
|
*/
|
|
2189
2189
|
static createOrchestration(options) {
|
|
2190
2190
|
return (options.client ?? client).post({
|
|
@@ -2710,6 +2710,97 @@ var Sessions = class {
|
|
|
2710
2710
|
});
|
|
2711
2711
|
}
|
|
2712
2712
|
};
|
|
2713
|
+
var Tasks = class {
|
|
2714
|
+
/**
|
|
2715
|
+
* List tasks
|
|
2716
|
+
*
|
|
2717
|
+
* Lists tasks (the board query). Filter by workflow, state, status, or assignee — `GET /tasks?workflow_id=...&state=...` is one board column.
|
|
2718
|
+
*/
|
|
2719
|
+
static listTasks(options) {
|
|
2720
|
+
return (options?.client ?? client).get({
|
|
2721
|
+
url: "/api/v1/tasks",
|
|
2722
|
+
...options
|
|
2723
|
+
});
|
|
2724
|
+
}
|
|
2725
|
+
/**
|
|
2726
|
+
* Create a task
|
|
2727
|
+
*
|
|
2728
|
+
* Creates a task bound to a workflow. The task is placed in the workflow's initial state and that state's `on_enter` automation fires.
|
|
2729
|
+
*/
|
|
2730
|
+
static createTask(options) {
|
|
2731
|
+
return (options.client ?? client).post({
|
|
2732
|
+
url: "/api/v1/tasks",
|
|
2733
|
+
...options,
|
|
2734
|
+
headers: {
|
|
2735
|
+
"Content-Type": "application/json",
|
|
2736
|
+
...options.headers
|
|
2737
|
+
}
|
|
2738
|
+
});
|
|
2739
|
+
}
|
|
2740
|
+
/**
|
|
2741
|
+
* Delete a task
|
|
2742
|
+
*
|
|
2743
|
+
* Deletes a task. Its transition history cascades.
|
|
2744
|
+
*/
|
|
2745
|
+
static deleteTask(options) {
|
|
2746
|
+
return (options.client ?? client).delete({
|
|
2747
|
+
url: "/api/v1/tasks/{task_id}",
|
|
2748
|
+
...options
|
|
2749
|
+
});
|
|
2750
|
+
}
|
|
2751
|
+
/**
|
|
2752
|
+
* Get a task
|
|
2753
|
+
*
|
|
2754
|
+
* Retrieves a task, including its active dispatch and automation status.
|
|
2755
|
+
*/
|
|
2756
|
+
static getTask(options) {
|
|
2757
|
+
return (options.client ?? client).get({
|
|
2758
|
+
url: "/api/v1/tasks/{task_id}",
|
|
2759
|
+
...options
|
|
2760
|
+
});
|
|
2761
|
+
}
|
|
2762
|
+
/**
|
|
2763
|
+
* Update a task
|
|
2764
|
+
*
|
|
2765
|
+
* Updates a task's payload, title, or assignee. `state` is never directly writable — move it with a transition.
|
|
2766
|
+
*/
|
|
2767
|
+
static updateTask(options) {
|
|
2768
|
+
return (options.client ?? client).patch({
|
|
2769
|
+
url: "/api/v1/tasks/{task_id}",
|
|
2770
|
+
...options,
|
|
2771
|
+
headers: {
|
|
2772
|
+
"Content-Type": "application/json",
|
|
2773
|
+
...options.headers
|
|
2774
|
+
}
|
|
2775
|
+
});
|
|
2776
|
+
}
|
|
2777
|
+
/**
|
|
2778
|
+
* Transition a task
|
|
2779
|
+
*
|
|
2780
|
+
* Fires a named transition on a task. The transition must exist in the workflow and be valid from the task's current state; its guard must pass. This is the single path every state change routes through.
|
|
2781
|
+
*/
|
|
2782
|
+
static transitionTask(options) {
|
|
2783
|
+
return (options.client ?? client).post({
|
|
2784
|
+
url: "/api/v1/tasks/{task_id}/transitions",
|
|
2785
|
+
...options,
|
|
2786
|
+
headers: {
|
|
2787
|
+
"Content-Type": "application/json",
|
|
2788
|
+
...options.headers
|
|
2789
|
+
}
|
|
2790
|
+
});
|
|
2791
|
+
}
|
|
2792
|
+
/**
|
|
2793
|
+
* Get task history
|
|
2794
|
+
*
|
|
2795
|
+
* Returns the append-only transition history of a task.
|
|
2796
|
+
*/
|
|
2797
|
+
static getTaskHistory(options) {
|
|
2798
|
+
return (options.client ?? client).get({
|
|
2799
|
+
url: "/api/v1/tasks/{task_id}/history",
|
|
2800
|
+
...options
|
|
2801
|
+
});
|
|
2802
|
+
}
|
|
2803
|
+
};
|
|
2713
2804
|
var Tools = class {
|
|
2714
2805
|
/**
|
|
2715
2806
|
* List tools
|
|
@@ -3274,6 +3365,71 @@ var Webhooks = class {
|
|
|
3274
3365
|
});
|
|
3275
3366
|
}
|
|
3276
3367
|
};
|
|
3368
|
+
var Workflows = class {
|
|
3369
|
+
/**
|
|
3370
|
+
* List workflows
|
|
3371
|
+
*
|
|
3372
|
+
* Lists workflow definitions in a project.
|
|
3373
|
+
*/
|
|
3374
|
+
static listWorkflows(options) {
|
|
3375
|
+
return (options?.client ?? client).get({
|
|
3376
|
+
url: "/api/v1/workflows",
|
|
3377
|
+
...options
|
|
3378
|
+
});
|
|
3379
|
+
}
|
|
3380
|
+
/**
|
|
3381
|
+
* Create a workflow
|
|
3382
|
+
*
|
|
3383
|
+
* Creates a new workflow definition. The definition is statically validated.
|
|
3384
|
+
*/
|
|
3385
|
+
static createWorkflow(options) {
|
|
3386
|
+
return (options.client ?? client).post({
|
|
3387
|
+
url: "/api/v1/workflows",
|
|
3388
|
+
...options,
|
|
3389
|
+
headers: {
|
|
3390
|
+
"Content-Type": "application/json",
|
|
3391
|
+
...options.headers
|
|
3392
|
+
}
|
|
3393
|
+
});
|
|
3394
|
+
}
|
|
3395
|
+
/**
|
|
3396
|
+
* Delete a workflow
|
|
3397
|
+
*
|
|
3398
|
+
* Deletes a workflow. Rejected while open tasks exist.
|
|
3399
|
+
*/
|
|
3400
|
+
static deleteWorkflow(options) {
|
|
3401
|
+
return (options.client ?? client).delete({
|
|
3402
|
+
url: "/api/v1/workflows/{workflow_id}",
|
|
3403
|
+
...options
|
|
3404
|
+
});
|
|
3405
|
+
}
|
|
3406
|
+
/**
|
|
3407
|
+
* Get a workflow
|
|
3408
|
+
*
|
|
3409
|
+
* Retrieves a workflow definition.
|
|
3410
|
+
*/
|
|
3411
|
+
static getWorkflow(options) {
|
|
3412
|
+
return (options.client ?? client).get({
|
|
3413
|
+
url: "/api/v1/workflows/{workflow_id}",
|
|
3414
|
+
...options
|
|
3415
|
+
});
|
|
3416
|
+
}
|
|
3417
|
+
/**
|
|
3418
|
+
* Update a workflow
|
|
3419
|
+
*
|
|
3420
|
+
* Updates a workflow definition. Structural changes (states/transitions) are re-validated. Existing tasks in a removed state stay put but can only leave via transitions valid in the new definition.
|
|
3421
|
+
*/
|
|
3422
|
+
static updateWorkflow(options) {
|
|
3423
|
+
return (options.client ?? client).patch({
|
|
3424
|
+
url: "/api/v1/workflows/{workflow_id}",
|
|
3425
|
+
...options,
|
|
3426
|
+
headers: {
|
|
3427
|
+
"Content-Type": "application/json",
|
|
3428
|
+
...options.headers
|
|
3429
|
+
}
|
|
3430
|
+
});
|
|
3431
|
+
}
|
|
3432
|
+
};
|
|
3277
3433
|
//#endregion
|
|
3278
3434
|
//#region src/soatClient.ts
|
|
3279
3435
|
/**
|
|
@@ -3376,4 +3532,4 @@ var SoatClient = class {
|
|
|
3376
3532
|
}
|
|
3377
3533
|
};
|
|
3378
3534
|
//#endregion
|
|
3379
|
-
export { Actors, Agents, AiProviders, ApiKeys, Approvals, Chats, Conversations, Discussions, Documents, Embeddings, Files, Formations, Generations, IngestionRules, Knowledge, Memories, MemoryEntries, Orchestrations, Policies, Projects, Secrets, Sessions, SoatClient, Tools, Traces, Triggers, Usage, Users, Webhooks, createClient, createConfig };
|
|
3535
|
+
export { Actors, Agents, AiProviders, ApiKeys, Approvals, Chats, Conversations, Discussions, Documents, Embeddings, Files, Formations, Generations, IngestionRules, Knowledge, Memories, MemoryEntries, Orchestrations, Policies, Projects, Secrets, Sessions, SoatClient, Tasks, Tools, Traces, Triggers, Usage, Users, Webhooks, Workflows, createClient, createConfig };
|