@archastro/sdk 0.9.0 → 0.11.0

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.
Files changed (102) hide show
  1. package/dist/client.d.ts +14 -0
  2. package/dist/client.d.ts.map +1 -1
  3. package/dist/client.js +15 -1
  4. package/dist/client.js.map +1 -1
  5. package/dist/types/ai.d.ts +2 -2
  6. package/dist/types/chat.d.ts +111 -50
  7. package/dist/types/chat.d.ts.map +1 -1
  8. package/dist/types/common.d.ts +1096 -468
  9. package/dist/types/common.d.ts.map +1 -1
  10. package/dist/types/common.js +155 -62
  11. package/dist/types/common.js.map +1 -1
  12. package/dist/types/extractions.d.ts +36 -0
  13. package/dist/types/extractions.d.ts.map +1 -1
  14. package/dist/types/index.d.ts +2 -0
  15. package/dist/types/index.d.ts.map +1 -1
  16. package/dist/types/index.js +3 -1
  17. package/dist/types/index.js.map +1 -1
  18. package/dist/types/status.d.ts +121 -0
  19. package/dist/types/status.d.ts.map +1 -0
  20. package/dist/types/status.js +18 -0
  21. package/dist/types/status.js.map +1 -0
  22. package/dist/types/tasks.d.ts +601 -0
  23. package/dist/types/tasks.d.ts.map +1 -0
  24. package/dist/types/tasks.js +118 -0
  25. package/dist/types/tasks.js.map +1 -0
  26. package/dist/types/threads.d.ts +542 -5
  27. package/dist/types/threads.d.ts.map +1 -1
  28. package/dist/types/threads.js +45 -2
  29. package/dist/types/threads.js.map +1 -1
  30. package/dist/v1/resources/activity_feed.d.ts +1 -1
  31. package/dist/v1/resources/activity_feed.js +2 -2
  32. package/dist/v1/resources/agents.d.ts +2 -2
  33. package/dist/v1/resources/agents.js +3 -3
  34. package/dist/v1/resources/custom_objects.d.ts +86 -20
  35. package/dist/v1/resources/custom_objects.d.ts.map +1 -1
  36. package/dist/v1/resources/custom_objects.js +41 -19
  37. package/dist/v1/resources/custom_objects.js.map +1 -1
  38. package/dist/v1/resources/files.d.ts +19 -0
  39. package/dist/v1/resources/files.d.ts.map +1 -1
  40. package/dist/v1/resources/files.js +3 -1
  41. package/dist/v1/resources/files.js.map +1 -1
  42. package/dist/v1/resources/index.d.ts +7 -0
  43. package/dist/v1/resources/index.d.ts.map +1 -1
  44. package/dist/v1/resources/index.js +8 -1
  45. package/dist/v1/resources/index.js.map +1 -1
  46. package/dist/v1/resources/private_service_definitions.d.ts +12 -0
  47. package/dist/v1/resources/private_service_definitions.d.ts.map +1 -0
  48. package/dist/v1/resources/private_service_definitions.js +18 -0
  49. package/dist/v1/resources/private_service_definitions.js.map +1 -0
  50. package/dist/v1/resources/private_service_enrollments.d.ts +42 -0
  51. package/dist/v1/resources/private_service_enrollments.d.ts.map +1 -0
  52. package/dist/v1/resources/private_service_enrollments.js +56 -0
  53. package/dist/v1/resources/private_service_enrollments.js.map +1 -0
  54. package/dist/v1/resources/private_services.d.ts +46 -0
  55. package/dist/v1/resources/private_services.d.ts.map +1 -0
  56. package/dist/v1/resources/private_services.js +55 -0
  57. package/dist/v1/resources/private_services.js.map +1 -0
  58. package/dist/v1/resources/sandboxes.d.ts +81 -0
  59. package/dist/v1/resources/sandboxes.d.ts.map +1 -0
  60. package/dist/v1/resources/sandboxes.js +84 -0
  61. package/dist/v1/resources/sandboxes.js.map +1 -0
  62. package/dist/v1/resources/slack_channel_bindings.d.ts +37 -0
  63. package/dist/v1/resources/slack_channel_bindings.d.ts.map +1 -1
  64. package/dist/v1/resources/slack_channel_bindings.js +31 -1
  65. package/dist/v1/resources/slack_channel_bindings.js.map +1 -1
  66. package/dist/v1/resources/solutions.d.ts +2 -0
  67. package/dist/v1/resources/solutions.d.ts.map +1 -1
  68. package/dist/v1/resources/solutions.js +2 -1
  69. package/dist/v1/resources/solutions.js.map +1 -1
  70. package/dist/v1/resources/status.d.ts +22 -0
  71. package/dist/v1/resources/status.d.ts.map +1 -0
  72. package/dist/v1/resources/status.js +27 -0
  73. package/dist/v1/resources/status.js.map +1 -0
  74. package/dist/v1/resources/tasks.d.ts +599 -0
  75. package/dist/v1/resources/tasks.d.ts.map +1 -0
  76. package/dist/v1/resources/tasks.js +436 -0
  77. package/dist/v1/resources/tasks.js.map +1 -0
  78. package/dist/v1/resources/teams.d.ts +463 -0
  79. package/dist/v1/resources/teams.d.ts.map +1 -1
  80. package/dist/v1/resources/teams.js +281 -1
  81. package/dist/v1/resources/teams.js.map +1 -1
  82. package/dist/v1/resources/thread_messages.d.ts +25 -3
  83. package/dist/v1/resources/thread_messages.d.ts.map +1 -1
  84. package/dist/v1/resources/thread_messages.js +25 -4
  85. package/dist/v1/resources/thread_messages.js.map +1 -1
  86. package/dist/v1/resources/threads.d.ts +40 -0
  87. package/dist/v1/resources/threads.d.ts.map +1 -1
  88. package/dist/v1/resources/threads.js +36 -1
  89. package/dist/v1/resources/threads.js.map +1 -1
  90. package/dist/v1/resources/trajectories.d.ts +34 -0
  91. package/dist/v1/resources/trajectories.d.ts.map +1 -0
  92. package/dist/v1/resources/trajectories.js +41 -0
  93. package/dist/v1/resources/trajectories.js.map +1 -0
  94. package/dist/v1/resources/users.d.ts +353 -0
  95. package/dist/v1/resources/users.d.ts.map +1 -1
  96. package/dist/v1/resources/users.js +208 -1
  97. package/dist/v1/resources/users.js.map +1 -1
  98. package/dist/v1.d.ts +14 -0
  99. package/dist/v1.d.ts.map +1 -1
  100. package/dist/v1.js +22 -1
  101. package/dist/v1.js.map +1 -1
  102. package/package.json +1 -1
@@ -0,0 +1,436 @@
1
+ // Copyright (c) 2026 ArchAstro Inc. Licensed under the MIT License.
2
+ // This file is auto-generated by @archastro/sdk-generator. Do not edit.
3
+ // Content hash: 57ab6e966188
4
+ export class BlockerResource {
5
+ http;
6
+ constructor(http) {
7
+ this.http = http;
8
+ }
9
+ /**
10
+ * List a task's blockers
11
+ * Returns a bounded page of the tasks currently marked as blocking the
12
+ * specified task, newest first. Blocking is informational: a blocked task
13
+ * can still change status, and it stops counting as blocked as soon as
14
+ * every blocker is done. The task's owner is resolved from the task itself.
15
+ * @param task - Blocked task ID (`tsk_...`).
16
+ * @param params - Query parameters.
17
+ * @param params.team - Explicit owning team (`tem_...`) for privileged calls.
18
+ * @param params.user - Explicit owning user (`usr_...`) for privileged calls.
19
+ * @param params.agent - Explicit owning agent (`agi_...`) for privileged calls.
20
+ * @param params.org - Explicit organization (`org_...`) for privileged calls; pass null when unscoped.
21
+ * @param params.limit - Maximum blockers to return. Capped at 100.
22
+ * @param params.afterCursor - Opaque cursor returned by the previous page.
23
+ * @returns Successful response
24
+ */
25
+ async list(task, params) {
26
+ const query = {};
27
+ if (params?.team !== undefined) {
28
+ query["team"] = params?.team;
29
+ }
30
+ if (params?.user !== undefined) {
31
+ query["user"] = params?.user;
32
+ }
33
+ if (params?.agent !== undefined) {
34
+ query["agent"] = params?.agent;
35
+ }
36
+ if (params?.org !== undefined) {
37
+ query["org"] = params?.org;
38
+ }
39
+ if (params?.limit !== undefined) {
40
+ query["limit"] = params?.limit;
41
+ }
42
+ if (params?.afterCursor !== undefined) {
43
+ query["after_cursor"] = params?.afterCursor;
44
+ }
45
+ return this.http.request(`/api/v1/tasks/${task}/blockers`, { query });
46
+ }
47
+ /**
48
+ * Mark a task as blocked by another task
49
+ * Records that the task in `blocker` blocks the specified task and returns
50
+ * the updated task. Blocking is informational — the blocked task can still
51
+ * change status — and derived at read time, so the task stops reporting
52
+ * `is_blocked` as soon as every blocker is done. The blocker must belong to
53
+ * the same owner (team or user) as the task; self-blocking and blocking a
54
+ * task that already blocks the blocker (a direct cycle) are rejected.
55
+ * @param task - Blocked task ID (`tsk_...`).
56
+ * @param input - Request body.
57
+ * @param input.agent - Explicit owning agent (`agi_...`) for privileged calls.
58
+ * @param input.blocker - ID of the task that blocks this task (`tsk_...`).
59
+ * @param input.org - Explicit organization (`org_...`) for privileged calls; pass null when unscoped.
60
+ * @param input.team - Explicit owning team (`tem_...`) for privileged calls.
61
+ * @param input.user - Explicit owning user (`usr_...`) for privileged calls.
62
+ * @returns The updated (blocked) task.
63
+ */
64
+ async create(task, input) {
65
+ return this.http.request(`/api/v1/tasks/${task}/blockers`, { method: "POST", body: input });
66
+ }
67
+ /**
68
+ * Remove a blocker from a task
69
+ * Removes the blocking relationship between the task in `blocker` and the
70
+ * specified task. Returns 204 No Content on success, or 404 if the given
71
+ * task is not currently marked as blocking this task.
72
+ * @param task - Blocked task ID (`tsk_...`).
73
+ * @param blocker - ID of the blocking task to remove (`tsk_...`).
74
+ * @returns Empty response body. HTTP 204 No Content on success.
75
+ */
76
+ async delete(task, blocker) {
77
+ await this.http.request(`/api/v1/tasks/${task}/blockers/${blocker}`, { method: "DELETE" });
78
+ }
79
+ }
80
+ export class CommentResource {
81
+ http;
82
+ constructor(http) {
83
+ this.http = http;
84
+ }
85
+ /**
86
+ * List comments on a task
87
+ * Returns a bounded page of comments on the specified task, ordered by creation
88
+ * time ascending. App-scoped developer and server-to-server callers explicitly
89
+ * provide the owning `team`, `user`, or `agent` and `org`.
90
+ * @param task - Task ID (`tsk_...`).
91
+ * @param params - Query parameters.
92
+ * @param params.team - Explicit owning team (`tem_...`) for privileged calls.
93
+ * @param params.user - Explicit owning user (`usr_...`) for privileged calls.
94
+ * @param params.agent - Explicit owning agent (`agi_...`) for privileged calls.
95
+ * @param params.org - Explicit organization (`org_...`) for privileged calls; pass null when unscoped.
96
+ * @param params.limit - Maximum comments to return. Capped at 100.
97
+ * @param params.afterCursor - Opaque cursor returned by the previous page.
98
+ * @returns Successful response
99
+ */
100
+ async list(task, params) {
101
+ const query = {};
102
+ if (params?.team !== undefined) {
103
+ query["team"] = params?.team;
104
+ }
105
+ if (params?.user !== undefined) {
106
+ query["user"] = params?.user;
107
+ }
108
+ if (params?.agent !== undefined) {
109
+ query["agent"] = params?.agent;
110
+ }
111
+ if (params?.org !== undefined) {
112
+ query["org"] = params?.org;
113
+ }
114
+ if (params?.limit !== undefined) {
115
+ query["limit"] = params?.limit;
116
+ }
117
+ if (params?.afterCursor !== undefined) {
118
+ query["after_cursor"] = params?.afterCursor;
119
+ }
120
+ return this.http.request(`/api/v1/tasks/${task}/comments`, { query });
121
+ }
122
+ /**
123
+ * Create a comment on a task
124
+ * Posts a new comment on the specified task and returns the created comment.
125
+ * The task's owner is resolved from the task itself.
126
+ * @param task - Task ID (`tsk_...`).
127
+ * @param input - Request body.
128
+ * @param input.comment - Parameters for the comment to create, including its body.
129
+ * @returns The newly created comment.
130
+ */
131
+ async create(task, input) {
132
+ return this.http.request(`/api/v1/tasks/${task}/comments`, { method: "POST", body: input });
133
+ }
134
+ /**
135
+ * Delete a task comment
136
+ * Permanently removes a comment from its task. This action cannot be undone.
137
+ * The task's owner is resolved from the task itself.
138
+ * Only the comment's author, an admin of the comment's organization, or an
139
+ * admin of the owning team may delete a comment. Returns `403 Forbidden`
140
+ * otherwise.
141
+ * @param task - Task ID (`tsk_...`).
142
+ * @param comment - Comment ID (`tcm_...`).
143
+ * @returns Empty body. The server responds with HTTP 204 No Content on success.
144
+ */
145
+ async delete(task, comment) {
146
+ await this.http.request(`/api/v1/tasks/${task}/comments/${comment}`, { method: "DELETE" });
147
+ }
148
+ /**
149
+ * Update a task comment
150
+ * Replaces the body of an existing comment and returns the updated comment.
151
+ * The task's owner is resolved from the task itself.
152
+ * Only the comment's author, an admin of the comment's organization, or an
153
+ * admin of the owning team may edit a comment. Returns `403 Forbidden`
154
+ * otherwise.
155
+ * @param task - Task ID (`tsk_...`).
156
+ * @param comment - Comment ID (`tcm_...`).
157
+ * @param input - Request body.
158
+ * @param input.body - Replacement body for the comment. Must be non-empty.
159
+ * @returns The updated comment.
160
+ */
161
+ async replace(task, comment, input) {
162
+ return this.http.request(`/api/v1/tasks/${task}/comments/${comment}`, { method: "PUT", body: input });
163
+ }
164
+ }
165
+ export class LeaseResource {
166
+ http;
167
+ constructor(http) {
168
+ this.http = http;
169
+ }
170
+ /**
171
+ * Release a task session lease
172
+ * Releases the authenticated assignee's matching live task lease. Repeating a
173
+ * release after the lease is absent succeeds. A different live successor lease
174
+ * returns a mismatch.
175
+ * @param task - Task ID (`tsk_...`).
176
+ * @returns Empty response. HTTP 204 is returned after release is accepted.
177
+ */
178
+ async remove(task) {
179
+ await this.http.request(`/api/v1/tasks/${task}/lease`, { method: "DELETE" });
180
+ }
181
+ /**
182
+ * Retrieve a task's current session lease
183
+ * Returns the authenticated assignee's viewer-safe live lease summary, or null
184
+ * when no live lease exists. Fencing and opaque session identifiers are never
185
+ * included.
186
+ * @param task - Task ID (`tsk_...`).
187
+ * @returns Viewer-safe live lease summary, or null.
188
+ */
189
+ async list(task) {
190
+ return this.http.request(`/api/v1/tasks/${task}/lease`);
191
+ }
192
+ /**
193
+ * Claim a task for a coding session
194
+ * Atomically claims a user-assigned task for the authenticated user's coding
195
+ * session. The caller generates and retains both UUIDs. An exact retry returns
196
+ * the existing lease without extending it; another live holder produces a
197
+ * conflict. Developer and server-to-server credentials cannot impersonate the
198
+ * assigned user.
199
+ * @param task - Task ID (`tsk_...`).
200
+ * @param input - Request body.
201
+ * @param input.harness - Bounded harness identifier.
202
+ * @param input.lease_duration_seconds - Requested lease lifetime in seconds; the task aggregate enforces its bounds.
203
+ * @param input.lease_id - Caller-generated lease UUID.
204
+ * @param input.session_id - Caller-generated coding-session UUID.
205
+ * @param input.session_name - Human-readable coding-session label.
206
+ * @returns The caller-held lease, including its fencing token.
207
+ */
208
+ async create(task, input) {
209
+ return this.http.request(`/api/v1/tasks/${task}/lease`, { method: "POST", body: input });
210
+ }
211
+ /**
212
+ * Renew a task session lease
213
+ * Renews the authenticated assignee's matching live task lease. Both
214
+ * caller-generated UUIDs must match the aggregate's current lease.
215
+ * @param task - Task ID (`tsk_...`).
216
+ * @param input - Request body.
217
+ * @param input.lease_duration_seconds - Requested renewed lifetime in seconds; the task aggregate enforces its bounds.
218
+ * @param input.lease_id - Current caller-held lease UUID.
219
+ * @param input.session_id - Current coding-session UUID.
220
+ * @returns The renewed caller-held lease.
221
+ */
222
+ async renew(task, input) {
223
+ return this.http.request(`/api/v1/tasks/${task}/lease/renew`, { method: "POST", body: input });
224
+ }
225
+ }
226
+ export class TaskResource {
227
+ http;
228
+ blockers;
229
+ comments;
230
+ lease;
231
+ constructor(http) {
232
+ this.http = http;
233
+ this.blockers = new BlockerResource(http);
234
+ this.comments = new CommentResource(http);
235
+ this.lease = new LeaseResource(http);
236
+ }
237
+ /**
238
+ * Delete a task
239
+ * Deletes a task from task lists and detail views. The task event stream is
240
+ * retained for auditability, while comments are removed and direct subtasks
241
+ * are promoted to top-level tasks.
242
+ * The delete event is accepted before the read model is updated. Clients
243
+ * should remove the task from local collections immediately; subsequent reads
244
+ * converge once the projection processes the event.
245
+ * Authenticated users may delete tasks they can access using their session
246
+ * identity. App-scoped developer and server-to-server callers must explicitly
247
+ * supply the task's `org` and owner. `team` or `user` identifies that owner;
248
+ * when neither is present, `agent` identifies an agent-owned task. With a team
249
+ * or user owner, `agent` identifies the acting principal. Each reference is
250
+ * validated before deletion.
251
+ * @param task - Task ID (`tsk_...`).
252
+ * @returns Empty response. HTTP 204 is returned after the delete event is accepted.
253
+ */
254
+ async delete(task) {
255
+ await this.http.request(`/api/v1/tasks/${task}`, { method: "DELETE" });
256
+ }
257
+ /**
258
+ * Retrieve a task
259
+ * Returns the full task object for the specified task ID. Authenticated users
260
+ * and agents resolve access through their session. App-scoped developer and
261
+ * server-to-server callers explicitly provide the owning `team`, `user`, or `agent` and
262
+ * `org`. Callers without access receive a 404.
263
+ * @param task - Task ID (`tsk_...`).
264
+ * @param params - Query parameters.
265
+ * @param params.team - Explicit owning team (`tem_...`) for privileged calls.
266
+ * @param params.user - Explicit owning user (`usr_...`) for privileged calls.
267
+ * @param params.agent - Explicit owning agent (`agi_...`) for privileged calls.
268
+ * @param params.org - Explicit organization (`org_...`) for privileged calls; pass null when unscoped.
269
+ * @returns The requested task.
270
+ */
271
+ async get(task, params) {
272
+ const query = {};
273
+ if (params?.team !== undefined) {
274
+ query["team"] = params?.team;
275
+ }
276
+ if (params?.user !== undefined) {
277
+ query["user"] = params?.user;
278
+ }
279
+ if (params?.agent !== undefined) {
280
+ query["agent"] = params?.agent;
281
+ }
282
+ if (params?.org !== undefined) {
283
+ query["org"] = params?.org;
284
+ }
285
+ return this.http.request(`/api/v1/tasks/${task}`, { query });
286
+ }
287
+ /**
288
+ * Update a task
289
+ * Updates the supplied fields on a task and returns the complete updated task.
290
+ * Authenticated users use their session identity. App-scoped developer and
291
+ * server-to-server callers must explicitly supply the task's `org` and owner.
292
+ * `team` or `user` identifies that owner; when neither is present, `agent`
293
+ * identifies an agent-owned task. With a team or user owner, `agent` identifies
294
+ * the acting principal. Every reference is validated before the update.
295
+ * A cooperating coding-session client may supply both `lease_id` and
296
+ * `lease_session_id`. The task aggregate fences that update against the live
297
+ * lease and records server-sourced session provenance. Omitting both remains a
298
+ * normal authorized human/API update.
299
+ * @param task - Task ID (`tsk_...`).
300
+ * @param input - Request body.
301
+ * @param input.agent - Explicit agent (`agi_...`). It is the owner when `team` and `user` are absent; otherwise it is the acting principal.
302
+ * @param input.description - Updated long-form description.
303
+ * @param input.due_date - Updated due date in ISO 8601 format, or null to clear it.
304
+ * @param input.lease_id - Current caller-held lease UUID. Must be paired with `lease_session_id`.
305
+ * @param input.lease_session_id - Current coding-session UUID. Must be paired with `lease_id`.
306
+ * @param input.links - Replacement related-links object.
307
+ * @param input.metadata - Replacement task metadata object.
308
+ * @param input.name - Updated display name for the task.
309
+ * @param input.org - Explicit organization (`org_...`) for a developer or server-to-server call. Pass null for an owner outside an organization.
310
+ * @param input.owner_agent - Assign to an agent by public ID (`agi_...`).
311
+ * @param input.owner_user - Assign to a user by public ID (`usr_...`).
312
+ * @param input.parent - Move this task under a top-level parent (`tsk_...`), or pass null to promote it to a top-level task. A task that has subtasks cannot become one.
313
+ * @param input.priority - Updated priority from 0 (highest) to 4 (lowest).
314
+ * @param input.status - Updated status: `open`, `in_progress`, or `done`.
315
+ * @param input.tags - Replacement tag list (max 20, each up to 40 characters; normalized to lowercase). Pass an empty array to clear all tags.
316
+ * @param input.team - Explicit owning team (`tem_...`) for a developer or server-to-server call.
317
+ * @param input.user - Explicit user (`usr_...`) for a developer or server-to-server call. With `team`, this identifies the acting team member.
318
+ * @returns The updated task.
319
+ */
320
+ async replace(task, input) {
321
+ return this.http.request(`/api/v1/tasks/${task}`, { method: "PUT", body: input });
322
+ }
323
+ /**
324
+ * List a task's activity
325
+ * Returns a bounded chronological page of activity for the specified task.
326
+ * App-scoped developer and server-to-server callers explicitly provide the
327
+ * owning `team`, `user`, or `agent` and `org`.
328
+ * @param task - Task ID (`tsk_...`).
329
+ * @param params - Query parameters.
330
+ * @param params.team - Explicit owning team (`tem_...`) for privileged calls.
331
+ * @param params.user - Explicit owning user (`usr_...`) for privileged calls.
332
+ * @param params.agent - Explicit owning agent (`agi_...`) for privileged calls.
333
+ * @param params.org - Explicit organization (`org_...`) for privileged calls; pass null when unscoped.
334
+ * @param params.limit - Maximum entries to return. Capped at 100.
335
+ * @param params.afterCursor - Opaque cursor returned by the previous page.
336
+ * @returns Successful response
337
+ */
338
+ async activity(task, params) {
339
+ const query = {};
340
+ if (params?.team !== undefined) {
341
+ query["team"] = params?.team;
342
+ }
343
+ if (params?.user !== undefined) {
344
+ query["user"] = params?.user;
345
+ }
346
+ if (params?.agent !== undefined) {
347
+ query["agent"] = params?.agent;
348
+ }
349
+ if (params?.org !== undefined) {
350
+ query["org"] = params?.org;
351
+ }
352
+ if (params?.limit !== undefined) {
353
+ query["limit"] = params?.limit;
354
+ }
355
+ if (params?.afterCursor !== undefined) {
356
+ query["after_cursor"] = params?.afterCursor;
357
+ }
358
+ return this.http.request(`/api/v1/tasks/${task}/activity`, { query });
359
+ }
360
+ /**
361
+ * List the tasks a task blocks
362
+ * Returns a bounded page of the tasks that the specified task is marked as
363
+ * blocking (the inverse of `GET /tasks/{task}/blockers`), newest first.
364
+ * The task's owner is resolved from the task itself.
365
+ * @param task - Blocking task ID (`tsk_...`).
366
+ * @param params - Query parameters.
367
+ * @param params.team - Explicit owning team (`tem_...`) for privileged calls.
368
+ * @param params.user - Explicit owning user (`usr_...`) for privileged calls.
369
+ * @param params.agent - Explicit owning agent (`agi_...`) for privileged calls.
370
+ * @param params.org - Explicit organization (`org_...`) for privileged calls; pass null when unscoped.
371
+ * @param params.limit - Maximum tasks to return. Capped at 100.
372
+ * @param params.afterCursor - Opaque cursor returned by the previous page.
373
+ * @returns Successful response
374
+ */
375
+ async blocking(task, params) {
376
+ const query = {};
377
+ if (params?.team !== undefined) {
378
+ query["team"] = params?.team;
379
+ }
380
+ if (params?.user !== undefined) {
381
+ query["user"] = params?.user;
382
+ }
383
+ if (params?.agent !== undefined) {
384
+ query["agent"] = params?.agent;
385
+ }
386
+ if (params?.org !== undefined) {
387
+ query["org"] = params?.org;
388
+ }
389
+ if (params?.limit !== undefined) {
390
+ query["limit"] = params?.limit;
391
+ }
392
+ if (params?.afterCursor !== undefined) {
393
+ query["after_cursor"] = params?.afterCursor;
394
+ }
395
+ return this.http.request(`/api/v1/tasks/${task}/blocking`, { query });
396
+ }
397
+ /**
398
+ * List a task's subtasks
399
+ * Returns a bounded page of the specified task's subtasks (tasks whose
400
+ * `parent` is this task), newest first. Subtasks nest exactly one level, so
401
+ * entries never have subtasks of their own. Privileged callers explicitly
402
+ * provide the owning `team`, `user`, or `agent` and `org`.
403
+ * @param task - Parent task ID (`tsk_...`).
404
+ * @param params - Query parameters.
405
+ * @param params.team - Explicit owning team (`tem_...`) for privileged calls.
406
+ * @param params.user - Explicit owning user (`usr_...`) for privileged calls.
407
+ * @param params.agent - Explicit owning agent (`agi_...`) for privileged calls.
408
+ * @param params.org - Explicit organization (`org_...`) for privileged calls; pass null when unscoped.
409
+ * @param params.limit - Maximum subtasks to return. Capped at 100.
410
+ * @param params.afterCursor - Opaque cursor returned by the previous page.
411
+ * @returns Successful response
412
+ */
413
+ async subtasks(task, params) {
414
+ const query = {};
415
+ if (params?.team !== undefined) {
416
+ query["team"] = params?.team;
417
+ }
418
+ if (params?.user !== undefined) {
419
+ query["user"] = params?.user;
420
+ }
421
+ if (params?.agent !== undefined) {
422
+ query["agent"] = params?.agent;
423
+ }
424
+ if (params?.org !== undefined) {
425
+ query["org"] = params?.org;
426
+ }
427
+ if (params?.limit !== undefined) {
428
+ query["limit"] = params?.limit;
429
+ }
430
+ if (params?.afterCursor !== undefined) {
431
+ query["after_cursor"] = params?.afterCursor;
432
+ }
433
+ return this.http.request(`/api/v1/tasks/${task}/subtasks`, { query });
434
+ }
435
+ }
436
+ //# sourceMappingURL=tasks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tasks.js","sourceRoot":"","sources":["../../../src/v1/resources/tasks.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,wEAAwE;AACxE,6BAA6B;AAK7B,MAAM,OAAO,eAAe;IACN;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,IAAI,CAAC,IAAY,EAAE,MAA6G;QACpI,MAAM,KAAK,GAA6F,EAAE,CAAC;QAC3G,IAAI,MAAM,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;YAC/B,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,IAAI,CAAC;QAC/B,CAAC;QACD,IAAI,MAAM,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;YAC/B,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,IAAI,CAAC;QAC/B,CAAC;QACD,IAAI,MAAM,EAAE,KAAK,KAAK,SAAS,EAAE,CAAC;YAChC,KAAK,CAAC,OAAO,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC;QACjC,CAAC;QACD,IAAI,MAAM,EAAE,GAAG,KAAK,SAAS,EAAE,CAAC;YAC9B,KAAK,CAAC,KAAK,CAAC,GAAG,MAAM,EAAE,GAAG,CAAC;QAC7B,CAAC;QACD,IAAI,MAAM,EAAE,KAAK,KAAK,SAAS,EAAE,CAAC;YAChC,KAAK,CAAC,OAAO,CAAC,GAAG,MAAM,EAAE,KAAK,CA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