@naturali/sdk 0.298.0 → 0.298.2

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.mjs CHANGED
@@ -6046,7 +6046,7 @@ var Tasks = class {
6046
6046
  /**
6047
6047
  * List tasks
6048
6048
  *
6049
- * Lists tasks (the board query). Filter by workflow, state, status, automation status, priority, assignee, `upstream_of` or `metadata` — `GET /tasks?workflow_id=...&state=...` is one board column.
6049
+ * Lists tasks (the board query). Filter by workflow, state, status, automation status, priority, assignee, `upstream_of`, links or `metadata` — `GET /tasks?workflow_id=...&state=...` is one board column.
6050
6050
  */
6051
6051
  static listTasks(options) {
6052
6052
  return (options.client ?? client).get({
@@ -6146,7 +6146,7 @@ var Tasks = class {
6146
6146
  /**
6147
6147
  * Migrate a task to a newer workflow version
6148
6148
  *
6149
- * Moves an open task onto a newer version of its workflow. A state the target version also declares maps to itself; `state_map` maps a state it lacks. The payload is re-validated against the target `payload_schema`. The mapped state's `on_enter` is not fired: transition the task when you want the target's automation. A task with a dispatch in flight or a transition pending approval is refused, since both belong to the version they started under. Recorded in history as a row with `transition: null` and both versions.
6149
+ * Moves an open task onto a newer version of its workflow. A state the target version also declares maps to itself; `state_map` maps a state it lacks. The payload is re-validated against the target `payload_schema`. The mapped state's `on_enter` is not fired: transition the task when you want the target's automation. A task with a dispatch in flight or a transition pending approval is refused, since both belong to the version they started under. Mapping it to another state counts against that state's `max_tasks`; a task kept in its state keeps its slot. Recorded in history as a row with `transition: null` and both versions.
6150
6150
  */
6151
6151
  static migrateTask(options) {
6152
6152
  return (options.client ?? client).post({
@@ -6267,9 +6267,46 @@ var Tasks = class {
6267
6267
  });
6268
6268
  }
6269
6269
  /**
6270
+ * List a task's links
6271
+ *
6272
+ * Lists the task's links in both directions, oldest first: `from_task` is this task on a link it starts, `to_task` on one pointing at it.
6273
+ */
6274
+ static listTaskLinks(options) {
6275
+ return (options.client ?? client).get({
6276
+ url: "/v1/projects/{project_id}/tasks/{task_id}/links",
6277
+ ...options
6278
+ });
6279
+ }
6280
+ /**
6281
+ * Add a task link
6282
+ *
6283
+ * Links the task to `to_task_id`, a task in the same project, under a `kind` the caller names. A link never affects either task's readiness, and either may be closed. Adding the same link again answers `200` with the existing one. Both tasks' history records it.
6284
+ */
6285
+ static addTaskLink(options) {
6286
+ return (options.client ?? client).post({
6287
+ url: "/v1/projects/{project_id}/tasks/{task_id}/links",
6288
+ ...options,
6289
+ headers: {
6290
+ "Content-Type": "application/json",
6291
+ ...options.headers
6292
+ }
6293
+ });
6294
+ }
6295
+ /**
6296
+ * Remove a task link
6297
+ *
6298
+ * Removes the task's `kind` link to `to_task_id`; answers `204` also when there is none. Both tasks' history records the removal.
6299
+ */
6300
+ static removeTaskLink(options) {
6301
+ return (options.client ?? client).delete({
6302
+ url: "/v1/projects/{project_id}/tasks/{task_id}/links/{kind}/{to_task_id}",
6303
+ ...options
6304
+ });
6305
+ }
6306
+ /**
6270
6307
  * Get task history
6271
6308
  *
6272
- * Returns the append-only transition history of a task.
6309
+ * Returns the append-only history of a task: its transitions, and the links added to or removed from it.
6273
6310
  */
6274
6311
  static getTaskHistory(options) {
6275
6312
  return (options.client ?? client).get({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/sdk",
3
- "version": "0.298.0",
3
+ "version": "0.298.2",
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.298.0",
41
+ "@naturali/api": "0.298.2",
42
42
  "@ttoss/openapi-codegen": "^0.10.1",
43
43
  "@types/node": "^26.5.1",
44
44
  "tsdown": "^0.23.0",