@naturali/sdk 0.298.1 → 0.298.3

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 CHANGED
@@ -6047,7 +6047,7 @@ var Tasks = class {
6047
6047
  /**
6048
6048
  * List tasks
6049
6049
  *
6050
- * 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.
6050
+ * 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.
6051
6051
  */
6052
6052
  static listTasks(options) {
6053
6053
  return (options.client ?? client).get({
@@ -6147,7 +6147,7 @@ var Tasks = class {
6147
6147
  /**
6148
6148
  * Migrate a task to a newer workflow version
6149
6149
  *
6150
- * 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.
6150
+ * 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.
6151
6151
  */
6152
6152
  static migrateTask(options) {
6153
6153
  return (options.client ?? client).post({
@@ -6268,9 +6268,46 @@ var Tasks = class {
6268
6268
  });
6269
6269
  }
6270
6270
  /**
6271
+ * List a task's links
6272
+ *
6273
+ * 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.
6274
+ */
6275
+ static listTaskLinks(options) {
6276
+ return (options.client ?? client).get({
6277
+ url: "/v1/projects/{project_id}/tasks/{task_id}/links",
6278
+ ...options
6279
+ });
6280
+ }
6281
+ /**
6282
+ * Add a task link
6283
+ *
6284
+ * 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.
6285
+ */
6286
+ static addTaskLink(options) {
6287
+ return (options.client ?? client).post({
6288
+ url: "/v1/projects/{project_id}/tasks/{task_id}/links",
6289
+ ...options,
6290
+ headers: {
6291
+ "Content-Type": "application/json",
6292
+ ...options.headers
6293
+ }
6294
+ });
6295
+ }
6296
+ /**
6297
+ * Remove a task link
6298
+ *
6299
+ * Removes the task's `kind` link to `to_task_id`; answers `204` also when there is none. Both tasks' history records the removal.
6300
+ */
6301
+ static removeTaskLink(options) {
6302
+ return (options.client ?? client).delete({
6303
+ url: "/v1/projects/{project_id}/tasks/{task_id}/links/{kind}/{to_task_id}",
6304
+ ...options
6305
+ });
6306
+ }
6307
+ /**
6271
6308
  * Get task history
6272
6309
  *
6273
- * Returns the append-only transition history of a task.
6310
+ * Returns the append-only history of a task: its transitions, and the links added to or removed from it.
6274
6311
  */
6275
6312
  static getTaskHistory(options) {
6276
6313
  return (options.client ?? client).get({