@naturali/sdk 0.256.0 → 0.257.1
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 +67 -4
- package/dist/index.d.cts +449 -27
- package/dist/index.d.mts +449 -27
- package/dist/index.mjs +67 -4
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -4935,7 +4935,7 @@ var Playbooks = class {
|
|
|
4935
4935
|
/**
|
|
4936
4936
|
* Run a node of a case
|
|
4937
4937
|
*
|
|
4938
|
-
* Runs one node now. The cascade already runs every node whose inputs are set once a write, a settle or a resume makes it runnable, and never reruns a `failed` or `done` one: this is how a failed node is retried, and how a `done` node is recomputed after an upgrade changed its executor. A `collect` node takes its own input values as its output, any other node starts its executor with the node's input values mapped through the executor's `input`. The executor runs under the `policy_ids` of the case's playbook version, which must allow starting it:
|
|
4938
|
+
* Runs one node now. The cascade already runs every node whose inputs are set once a write, a settle or a resume makes it runnable, and never reruns a `failed` or `done` one: this is how a failed node is retried, and how a `done` node is recomputed after an upgrade changed its executor. A `collect` node takes its own input values as its output, any other node starts its executor with the node's input values mapped through the executor's `input`. The executor runs under the `policy_ids` of the case's playbook version, which must allow starting it: an executor it may not start fails the execution (`FORBIDDEN`). Only a `ready`, `stale`, `failed` or `done` node with every required input set runs; anything else is `409 PLAYBOOK_NODE_NOT_RUNNABLE`. A paused case is `409 PLAYBOOK_CASE_PAUSED`, and a case in a paused project `409 PROJECT_PAUSED`.
|
|
4939
4939
|
*
|
|
4940
4940
|
* An `upstream` node has no executor: running it pulls the current output of the node it names in the bound case, which must be `done`. This is the only way to refresh one that an upstream change left `stale`.
|
|
4941
4941
|
*
|
|
@@ -5814,7 +5814,7 @@ var Tasks = class {
|
|
|
5814
5814
|
/**
|
|
5815
5815
|
* List tasks
|
|
5816
5816
|
*
|
|
5817
|
-
* Lists tasks (the board query). Filter by workflow, state, status, automation status, assignee, or `metadata` — `GET /tasks?workflow_id=...&state=...` is one board column.
|
|
5817
|
+
* Lists tasks (the board query). Filter by workflow, state, status, automation status, priority, assignee, or `metadata` — `GET /tasks?workflow_id=...&state=...` is one board column.
|
|
5818
5818
|
*/
|
|
5819
5819
|
static listTasks(options) {
|
|
5820
5820
|
return (options.client ?? client).get({
|
|
@@ -5840,7 +5840,7 @@ var Tasks = class {
|
|
|
5840
5840
|
/**
|
|
5841
5841
|
* Delete a task
|
|
5842
5842
|
*
|
|
5843
|
-
* Deletes a task. Its transition history
|
|
5843
|
+
* Deletes a task. Its transition history and dependencies cascade; a dependent it was the last open dependency of is freed.
|
|
5844
5844
|
*/
|
|
5845
5845
|
static deleteTask(options) {
|
|
5846
5846
|
return (options.client ?? client).delete({
|
|
@@ -5916,6 +5916,21 @@ var Tasks = class {
|
|
|
5916
5916
|
});
|
|
5917
5917
|
}
|
|
5918
5918
|
/**
|
|
5919
|
+
* Set a task's priority
|
|
5920
|
+
*
|
|
5921
|
+
* Sets or clears a task's priority. An action of its own, `tasks:SetTaskPriority`, so a principal can update a task without reprioritising it; create-task and update-task do not accept `priority`.
|
|
5922
|
+
*/
|
|
5923
|
+
static setTaskPriority(options) {
|
|
5924
|
+
return (options.client ?? client).put({
|
|
5925
|
+
url: "/v1/projects/{project_id}/tasks/{task_id}/priority",
|
|
5926
|
+
...options,
|
|
5927
|
+
headers: {
|
|
5928
|
+
"Content-Type": "application/json",
|
|
5929
|
+
...options.headers
|
|
5930
|
+
}
|
|
5931
|
+
});
|
|
5932
|
+
}
|
|
5933
|
+
/**
|
|
5919
5934
|
* Pause a task
|
|
5920
5935
|
*
|
|
5921
5936
|
* Pauses a task's automation. While a pause is in force no state's `on_enter` dispatches and no retry chain continues — an agent generation, a tool call and a sub-orchestration alike — so the task stops spending without losing its place.
|
|
@@ -5946,6 +5961,54 @@ var Tasks = class {
|
|
|
5946
5961
|
});
|
|
5947
5962
|
}
|
|
5948
5963
|
/**
|
|
5964
|
+
* List a task's dependencies
|
|
5965
|
+
*
|
|
5966
|
+
* Lists the tasks this task depends on, open and closed, oldest first. Only the open ones block it.
|
|
5967
|
+
*/
|
|
5968
|
+
static listTaskDependencies(options) {
|
|
5969
|
+
return (options.client ?? client).get({
|
|
5970
|
+
url: "/v1/projects/{project_id}/tasks/{task_id}/dependencies",
|
|
5971
|
+
...options
|
|
5972
|
+
});
|
|
5973
|
+
}
|
|
5974
|
+
/**
|
|
5975
|
+
* Add a task dependency
|
|
5976
|
+
*
|
|
5977
|
+
* Makes the task depend on `depends_on_task_id`, a task in the same project: the path's task is blocked until that one closes, in any terminal state. The pair is the dependency's identity: adding it again answers `200` with the existing one. An edge that would close a cycle is refused.
|
|
5978
|
+
*/
|
|
5979
|
+
static addTaskDependency(options) {
|
|
5980
|
+
return (options.client ?? client).post({
|
|
5981
|
+
url: "/v1/projects/{project_id}/tasks/{task_id}/dependencies",
|
|
5982
|
+
...options,
|
|
5983
|
+
headers: {
|
|
5984
|
+
"Content-Type": "application/json",
|
|
5985
|
+
...options.headers
|
|
5986
|
+
}
|
|
5987
|
+
});
|
|
5988
|
+
}
|
|
5989
|
+
/**
|
|
5990
|
+
* List a task's dependents
|
|
5991
|
+
*
|
|
5992
|
+
* Lists the tasks that depend on this task, open and closed, oldest first.
|
|
5993
|
+
*/
|
|
5994
|
+
static listTaskDependents(options) {
|
|
5995
|
+
return (options.client ?? client).get({
|
|
5996
|
+
url: "/v1/projects/{project_id}/tasks/{task_id}/dependents",
|
|
5997
|
+
...options
|
|
5998
|
+
});
|
|
5999
|
+
}
|
|
6000
|
+
/**
|
|
6001
|
+
* Remove a task dependency
|
|
6002
|
+
*
|
|
6003
|
+
* Removes the task's dependency on `depends_on_task_id`; answers `204` also when there is none. When it was the task's last open dependency, `tasks.unblocked` fires.
|
|
6004
|
+
*/
|
|
6005
|
+
static removeTaskDependency(options) {
|
|
6006
|
+
return (options.client ?? client).delete({
|
|
6007
|
+
url: "/v1/projects/{project_id}/tasks/{task_id}/dependencies/{depends_on_task_id}",
|
|
6008
|
+
...options
|
|
6009
|
+
});
|
|
6010
|
+
}
|
|
6011
|
+
/**
|
|
5949
6012
|
* Get task history
|
|
5950
6013
|
*
|
|
5951
6014
|
* Returns the append-only transition history of a task.
|
|
@@ -6190,7 +6253,7 @@ var Triggers = class {
|
|
|
6190
6253
|
/**
|
|
6191
6254
|
* Fire a trigger
|
|
6192
6255
|
*
|
|
6193
|
-
* Fires a trigger synchronously and returns the terminal firing record. The firing acts as the caller ∩ the trigger's `policy_ids`, which must allow starting the target, else `403`. The firing itself always settles here; an `eval` target's run is queued rather than executed inline, so the record names a `queued` run to poll.
|
|
6256
|
+
* Fires a trigger synchronously and returns the terminal firing record. The firing acts as the caller ∩ the trigger's `policy_ids`, which must allow starting the target, else the firing fails `FORBIDDEN`. A body carrying `input` or `tool_context` also needs the caller to start the target, else `403`. The firing itself always settles here; an `eval` target's run is queued rather than executed inline, so the record names a `queued` run to poll.
|
|
6194
6257
|
*/
|
|
6195
6258
|
static fireTrigger(options) {
|
|
6196
6259
|
return (options.client ?? client).post({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.257.1",
|
|
4
4
|
"description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"naturali",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@hey-api/openapi-ts": "^0.99.0",
|
|
41
|
-
"@naturali/api": "0.
|
|
41
|
+
"@naturali/api": "0.257.1",
|
|
42
42
|
"@ttoss/openapi-codegen": "^0.10.1",
|
|
43
43
|
"@types/node": "^26.5.1",
|
|
44
44
|
"tsdown": "^0.23.0",
|