@nimble-way/nimble-js 0.17.0 → 0.19.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 (86) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/package.json +1 -1
  3. package/resources/agent.d.mts +17 -13
  4. package/resources/agent.d.mts.map +1 -1
  5. package/resources/agent.d.ts +17 -13
  6. package/resources/agent.d.ts.map +1 -1
  7. package/resources/batches.d.mts +11 -7
  8. package/resources/batches.d.mts.map +1 -1
  9. package/resources/batches.d.ts +11 -7
  10. package/resources/batches.d.ts.map +1 -1
  11. package/resources/crawl.d.mts +11 -1
  12. package/resources/crawl.d.mts.map +1 -1
  13. package/resources/crawl.d.ts +11 -1
  14. package/resources/crawl.d.ts.map +1 -1
  15. package/resources/jobs/jobs.d.mts +447 -0
  16. package/resources/jobs/jobs.d.mts.map +1 -1
  17. package/resources/jobs/jobs.d.ts +447 -0
  18. package/resources/jobs/jobs.d.ts.map +1 -1
  19. package/resources/jobs/jobs.js.map +1 -1
  20. package/resources/jobs/jobs.mjs.map +1 -1
  21. package/resources/jobs/runs/artifacts.d.mts +67 -0
  22. package/resources/jobs/runs/artifacts.d.mts.map +1 -1
  23. package/resources/jobs/runs/artifacts.d.ts +67 -0
  24. package/resources/jobs/runs/artifacts.d.ts.map +1 -1
  25. package/resources/jobs/runs/runs.d.mts +139 -0
  26. package/resources/jobs/runs/runs.d.mts.map +1 -1
  27. package/resources/jobs/runs/runs.d.ts +139 -0
  28. package/resources/jobs/runs/runs.d.ts.map +1 -1
  29. package/resources/jobs/runs/runs.js.map +1 -1
  30. package/resources/jobs/runs/runs.mjs.map +1 -1
  31. package/resources/media.d.mts +11 -7
  32. package/resources/media.d.mts.map +1 -1
  33. package/resources/media.d.ts +11 -7
  34. package/resources/media.d.ts.map +1 -1
  35. package/resources/serp.d.mts +22 -14
  36. package/resources/serp.d.mts.map +1 -1
  37. package/resources/serp.d.ts +22 -14
  38. package/resources/serp.d.ts.map +1 -1
  39. package/resources/task-agent/runs.d.mts +332 -69
  40. package/resources/task-agent/runs.d.mts.map +1 -1
  41. package/resources/task-agent/runs.d.ts +332 -69
  42. package/resources/task-agent/runs.d.ts.map +1 -1
  43. package/resources/task-agent/runs.js +21 -6
  44. package/resources/task-agent/runs.js.map +1 -1
  45. package/resources/task-agent/runs.mjs +21 -6
  46. package/resources/task-agent/runs.mjs.map +1 -1
  47. package/resources/task-agent/task-agent.d.mts +131 -33
  48. package/resources/task-agent/task-agent.d.mts.map +1 -1
  49. package/resources/task-agent/task-agent.d.ts +131 -33
  50. package/resources/task-agent/task-agent.d.ts.map +1 -1
  51. package/resources/task-agent/task-agent.js +12 -14
  52. package/resources/task-agent/task-agent.js.map +1 -1
  53. package/resources/task-agent/task-agent.mjs +12 -14
  54. package/resources/task-agent/task-agent.mjs.map +1 -1
  55. package/resources/task-agent/templates.d.mts +15 -6
  56. package/resources/task-agent/templates.d.mts.map +1 -1
  57. package/resources/task-agent/templates.d.ts +15 -6
  58. package/resources/task-agent/templates.d.ts.map +1 -1
  59. package/resources/task-agent/templates.js +2 -2
  60. package/resources/task-agent/templates.mjs +2 -2
  61. package/resources/tasks.d.mts +22 -14
  62. package/resources/tasks.d.mts.map +1 -1
  63. package/resources/tasks.d.ts +22 -14
  64. package/resources/tasks.d.ts.map +1 -1
  65. package/resources/top-level.d.mts +77 -20
  66. package/resources/top-level.d.mts.map +1 -1
  67. package/resources/top-level.d.ts +77 -20
  68. package/resources/top-level.d.ts.map +1 -1
  69. package/src/resources/agent.ts +20 -15
  70. package/src/resources/batches.ts +12 -7
  71. package/src/resources/crawl.ts +21 -1
  72. package/src/resources/jobs/jobs.ts +447 -0
  73. package/src/resources/jobs/runs/artifacts.ts +67 -0
  74. package/src/resources/jobs/runs/runs.ts +139 -0
  75. package/src/resources/media.ts +12 -7
  76. package/src/resources/serp.ts +24 -14
  77. package/src/resources/task-agent/runs.ts +370 -78
  78. package/src/resources/task-agent/task-agent.ts +141 -47
  79. package/src/resources/task-agent/templates.ts +16 -7
  80. package/src/resources/tasks.ts +24 -14
  81. package/src/resources/top-level.ts +118 -20
  82. package/src/version.ts +1 -1
  83. package/version.d.mts +1 -1
  84. package/version.d.ts +1 -1
  85. package/version.js +1 -1
  86. package/version.mjs +1 -1
@@ -26,16 +26,16 @@ export class TaskAgent extends APIResource {
26
26
  runs: RunsAPI.Runs = new RunsAPI.Runs(this._client);
27
27
 
28
28
  /**
29
- * Create a new workspace-scoped Web Search Agent. Pass `template` to clone from a
30
- * named template.
29
+ * Create a Web Search Agent instance.
30
+ *
31
+ * `account_id` is JWT-derived and never read from the request body.
31
32
  */
32
33
  create(body: TaskAgentCreateParams, options?: RequestOptions): APIPromise<TaskAgentCreateResponse> {
33
34
  return this._client.post('/v1/task-agents', { body, ...options });
34
35
  }
35
36
 
36
37
  /**
37
- * Apply a JSON Patch document (`application/json-patch+json`) to an agent you own.
38
- * Each operation must be a `replace` with path `/field_name`.
38
+ * Update Agent
39
39
  */
40
40
  update(
41
41
  agentID: string,
@@ -43,16 +43,14 @@ export class TaskAgent extends APIResource {
43
43
  options?: RequestOptions,
44
44
  ): APIPromise<TaskAgentUpdateResponse> {
45
45
  const { body } = params;
46
- return this._client.patch(path`/v1/task-agents/${agentID}`, {
47
- body: body,
48
- ...options,
49
- headers: buildHeaders([{ 'Content-Type': 'application/json-patch+json' }, options?.headers]),
50
- });
46
+ return this._client.patch(path`/v1/task-agents/${agentID}`, { body: body, ...options });
51
47
  }
52
48
 
53
49
  /**
54
- * List active Web Search Agents visible to the caller. Includes agents scoped to
55
- * the caller's workspace.
50
+ * List Web Search Agent instances.
51
+ *
52
+ * Callers are strictly scoped to their (account, workspace). If `workspace_id` is
53
+ * omitted, the user's default workspace is used.
56
54
  */
57
55
  list(
58
56
  query: TaskAgentListParams | null | undefined = {},
@@ -62,7 +60,7 @@ export class TaskAgent extends APIResource {
62
60
  }
63
61
 
64
62
  /**
65
- * Deactivate an agent you own. The agent is marked inactive but not deleted.
63
+ * Deactivate Agent
66
64
  */
67
65
  deactivate(agentID: string, options?: RequestOptions): APIPromise<void> {
68
66
  return this._client.delete(path`/v1/task-agents/${agentID}`, {
@@ -72,14 +70,14 @@ export class TaskAgent extends APIResource {
72
70
  }
73
71
 
74
72
  /**
75
- * Fetch a single Web Search Agent by id.
73
+ * Get Agent
76
74
  */
77
75
  get(agentID: string, options?: RequestOptions): APIPromise<TaskAgentGetResponse> {
78
76
  return this._client.get(path`/v1/task-agents/${agentID}`, options);
79
77
  }
80
78
 
81
79
  /**
82
- * Create and enqueue a research run for a Web Search Agent.
80
+ * Create a research run for a Web Search Agent instance.
83
81
  */
84
82
  run(agentID: string, body: TaskAgentRunParams, options?: RequestOptions): APIPromise<TaskAgentRunResponse> {
85
83
  return this._client.post(path`/v1/task-agents/${agentID}/runs`, { body, ...options });
@@ -97,7 +95,10 @@ export interface TaskAgentCreateResponse {
97
95
 
98
96
  domain_expertise: string;
99
97
 
100
- effort: string;
98
+ /**
99
+ * Canonical effort tier names for the research graph.
100
+ */
101
+ effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
101
102
 
102
103
  goals: Array<TaskAgentCreateResponse.Goal>;
103
104
 
@@ -107,6 +108,9 @@ export interface TaskAgentCreateResponse {
107
108
 
108
109
  output_schema: { [key: string]: unknown } | null;
109
110
 
111
+ /**
112
+ * Response variant of AgentSources — preserves per-row id on allow rows.
113
+ */
110
114
  sources: TaskAgentCreateResponse.Sources;
111
115
 
112
116
  suggested_questions: Array<TaskAgentCreateResponse.SuggestedQuestion>;
@@ -120,8 +124,6 @@ export interface TaskAgentCreateResponse {
120
124
  agent_name?: string | null;
121
125
 
122
126
  workspace_id?: string | null;
123
-
124
- workspace_name?: string | null;
125
127
  }
126
128
 
127
129
  export namespace TaskAgentCreateResponse {
@@ -133,6 +135,9 @@ export namespace TaskAgentCreateResponse {
133
135
  order: number;
134
136
  }
135
137
 
138
+ /**
139
+ * Response variant of AgentSources — preserves per-row id on allow rows.
140
+ */
136
141
  export interface Sources {
137
142
  allow?: Array<Sources.Allow>;
138
143
 
@@ -154,12 +159,15 @@ export namespace TaskAgentCreateResponse {
154
159
  title: string;
155
160
  }
156
161
 
162
+ /**
163
+ * Lenient response shape — domains are plain strings (no re-validation).
164
+ */
157
165
  export interface Block {
158
166
  domains: Array<string>;
159
167
 
160
- title: string;
168
+ order: number;
161
169
 
162
- order?: number;
170
+ title: string;
163
171
  }
164
172
  }
165
173
 
@@ -183,7 +191,10 @@ export interface TaskAgentUpdateResponse {
183
191
 
184
192
  domain_expertise: string;
185
193
 
186
- effort: string;
194
+ /**
195
+ * Canonical effort tier names for the research graph.
196
+ */
197
+ effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
187
198
 
188
199
  goals: Array<TaskAgentUpdateResponse.Goal>;
189
200
 
@@ -193,6 +204,9 @@ export interface TaskAgentUpdateResponse {
193
204
 
194
205
  output_schema: { [key: string]: unknown } | null;
195
206
 
207
+ /**
208
+ * Response variant of AgentSources — preserves per-row id on allow rows.
209
+ */
196
210
  sources: TaskAgentUpdateResponse.Sources;
197
211
 
198
212
  suggested_questions: Array<TaskAgentUpdateResponse.SuggestedQuestion>;
@@ -206,8 +220,6 @@ export interface TaskAgentUpdateResponse {
206
220
  agent_name?: string | null;
207
221
 
208
222
  workspace_id?: string | null;
209
-
210
- workspace_name?: string | null;
211
223
  }
212
224
 
213
225
  export namespace TaskAgentUpdateResponse {
@@ -219,6 +231,9 @@ export namespace TaskAgentUpdateResponse {
219
231
  order: number;
220
232
  }
221
233
 
234
+ /**
235
+ * Response variant of AgentSources — preserves per-row id on allow rows.
236
+ */
222
237
  export interface Sources {
223
238
  allow?: Array<Sources.Allow>;
224
239
 
@@ -240,12 +255,15 @@ export namespace TaskAgentUpdateResponse {
240
255
  title: string;
241
256
  }
242
257
 
258
+ /**
259
+ * Lenient response shape — domains are plain strings (no re-validation).
260
+ */
243
261
  export interface Block {
244
262
  domains: Array<string>;
245
263
 
246
- title: string;
264
+ order: number;
247
265
 
248
- order?: number;
266
+ title: string;
249
267
  }
250
268
  }
251
269
 
@@ -272,7 +290,10 @@ export namespace TaskAgentListResponse {
272
290
 
273
291
  domain_expertise: string;
274
292
 
275
- effort: string;
293
+ /**
294
+ * Canonical effort tier names for the research graph.
295
+ */
296
+ effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
276
297
 
277
298
  goals: Array<TaskAgentListResponseItem.Goal>;
278
299
 
@@ -282,6 +303,9 @@ export namespace TaskAgentListResponse {
282
303
 
283
304
  output_schema: { [key: string]: unknown } | null;
284
305
 
306
+ /**
307
+ * Response variant of AgentSources — preserves per-row id on allow rows.
308
+ */
285
309
  sources: TaskAgentListResponseItem.Sources;
286
310
 
287
311
  suggested_questions: Array<TaskAgentListResponseItem.SuggestedQuestion>;
@@ -295,8 +319,6 @@ export namespace TaskAgentListResponse {
295
319
  agent_name?: string | null;
296
320
 
297
321
  workspace_id?: string | null;
298
-
299
- workspace_name?: string | null;
300
322
  }
301
323
 
302
324
  export namespace TaskAgentListResponseItem {
@@ -308,6 +330,9 @@ export namespace TaskAgentListResponse {
308
330
  order: number;
309
331
  }
310
332
 
333
+ /**
334
+ * Response variant of AgentSources — preserves per-row id on allow rows.
335
+ */
311
336
  export interface Sources {
312
337
  allow?: Array<Sources.Allow>;
313
338
 
@@ -329,12 +354,15 @@ export namespace TaskAgentListResponse {
329
354
  title: string;
330
355
  }
331
356
 
357
+ /**
358
+ * Lenient response shape — domains are plain strings (no re-validation).
359
+ */
332
360
  export interface Block {
333
361
  domains: Array<string>;
334
362
 
335
- title: string;
363
+ order: number;
336
364
 
337
- order?: number;
365
+ title: string;
338
366
  }
339
367
  }
340
368
 
@@ -359,7 +387,10 @@ export interface TaskAgentGetResponse {
359
387
 
360
388
  domain_expertise: string;
361
389
 
362
- effort: string;
390
+ /**
391
+ * Canonical effort tier names for the research graph.
392
+ */
393
+ effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
363
394
 
364
395
  goals: Array<TaskAgentGetResponse.Goal>;
365
396
 
@@ -369,6 +400,9 @@ export interface TaskAgentGetResponse {
369
400
 
370
401
  output_schema: { [key: string]: unknown } | null;
371
402
 
403
+ /**
404
+ * Response variant of AgentSources — preserves per-row id on allow rows.
405
+ */
372
406
  sources: TaskAgentGetResponse.Sources;
373
407
 
374
408
  suggested_questions: Array<TaskAgentGetResponse.SuggestedQuestion>;
@@ -382,8 +416,6 @@ export interface TaskAgentGetResponse {
382
416
  agent_name?: string | null;
383
417
 
384
418
  workspace_id?: string | null;
385
-
386
- workspace_name?: string | null;
387
419
  }
388
420
 
389
421
  export namespace TaskAgentGetResponse {
@@ -395,6 +427,9 @@ export namespace TaskAgentGetResponse {
395
427
  order: number;
396
428
  }
397
429
 
430
+ /**
431
+ * Response variant of AgentSources — preserves per-row id on allow rows.
432
+ */
398
433
  export interface Sources {
399
434
  allow?: Array<Sources.Allow>;
400
435
 
@@ -416,12 +451,15 @@ export namespace TaskAgentGetResponse {
416
451
  title: string;
417
452
  }
418
453
 
454
+ /**
455
+ * Lenient response shape — domains are plain strings (no re-validation).
456
+ */
419
457
  export interface Block {
420
458
  domains: Array<string>;
421
459
 
422
- title: string;
460
+ order: number;
423
461
 
424
- order?: number;
462
+ title: string;
425
463
  }
426
464
  }
427
465
 
@@ -434,15 +472,21 @@ export namespace TaskAgentGetResponse {
434
472
  }
435
473
  }
436
474
 
475
+ /**
476
+ * Task run status returned by list/create/get endpoints.
477
+ */
437
478
  export interface TaskAgentRunResponse {
438
479
  /**
439
- * Run identifier.
480
+ * Run identifier, format "task*run*{uuid}".
440
481
  */
441
482
  id: string;
442
483
 
443
484
  created_at: string;
444
485
 
445
- effort: 'quickest' | 'quick' | 'research' | 'pro' | 'max';
486
+ /**
487
+ * Canonical effort tier names for the research graph.
488
+ */
489
+ effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
446
490
 
447
491
  /**
448
492
  * Interaction ID — pass as previous_interaction_id to reuse context.
@@ -454,25 +498,40 @@ export interface TaskAgentRunResponse {
454
498
  */
455
499
  is_active: boolean;
456
500
 
501
+ /**
502
+ * Lowercase status values used in API responses (distinct from the DB-level
503
+ * TaskRunStatus enum).
504
+ */
457
505
  status: 'queued' | 'running' | 'completed' | 'failed' | 'cancelled';
458
506
 
507
+ /**
508
+ * Web Search Agent instance this run belongs to. Every task run is agent-bound
509
+ * (see AGENTS-1666). Use this to build the nested URL
510
+ * /api/v2/web-search-agents/{web_search_agent_id}/runs/{id}.
511
+ */
512
+ web_search_agent_id: string;
513
+
459
514
  completed_at?: string | null;
460
515
 
516
+ /**
517
+ * Error detail for a failed run.
518
+ */
461
519
  error?: TaskAgentRunResponse.Error | null;
462
520
 
521
+ /**
522
+ * Original user prompt before enrichment. Populated for Web Search Agent runs.
523
+ */
463
524
  prompt?: string | null;
464
525
 
465
526
  started_at?: string | null;
466
527
 
467
- /**
468
- * Web Search Agent instance this run belongs to.
469
- */
470
- web_search_agent_id?: string | null;
471
-
472
528
  workspace_id?: string | null;
473
529
  }
474
530
 
475
531
  export namespace TaskAgentRunResponse {
532
+ /**
533
+ * Error detail for a failed run.
534
+ */
476
535
  export interface Error {
477
536
  /**
478
537
  * Human-readable error description.
@@ -495,7 +554,10 @@ export interface TaskAgentCreateParams {
495
554
 
496
555
  domain_expertise?: string | null;
497
556
 
498
- effort?: string;
557
+ /**
558
+ * Canonical effort tier names for the research graph.
559
+ */
560
+ effort?: 'low' | 'medium' | 'high' | 'x-high' | 'max';
499
561
 
500
562
  goals?: Array<string>;
501
563
 
@@ -505,12 +567,15 @@ export interface TaskAgentCreateParams {
505
567
 
506
568
  output_schema?: { [key: string]: unknown } | null;
507
569
 
570
+ /**
571
+ * Source preferences for a web search agent instance.
572
+ */
508
573
  sources?: TaskAgentCreateParams.Sources;
509
574
 
510
575
  suggested_questions?: Array<string>;
511
576
 
512
577
  /**
513
- * Template name to materialise this instance from. When set, scalar fields and
578
+ * Template name to materialize this instance from. When set, the scalar fields and
514
579
  * child rows are copied from the template.
515
580
  */
516
581
  template?: string | null;
@@ -521,6 +586,9 @@ export interface TaskAgentCreateParams {
521
586
  }
522
587
 
523
588
  export namespace TaskAgentCreateParams {
589
+ /**
590
+ * Source preferences for a web search agent instance.
591
+ */
524
592
  export interface Sources {
525
593
  allow?: Array<Sources.Allow>;
526
594
 
@@ -551,40 +619,66 @@ export namespace TaskAgentCreateParams {
551
619
  }
552
620
 
553
621
  export interface TaskAgentUpdateParams {
622
+ /**
623
+ * A JSON Patch document per RFC 6902 — a JSON array of patch operations.
624
+ */
554
625
  body: Array<TaskAgentUpdateParams.Body>;
555
626
  }
556
627
 
557
628
  export namespace TaskAgentUpdateParams {
629
+ /**
630
+ * A single JSON Patch operation per RFC 6902.
631
+ */
558
632
  export interface Body {
559
- op: 'replace';
633
+ op: 'add' | 'remove' | 'replace' | 'move' | 'copy' | 'test';
560
634
 
561
635
  path: string;
562
636
 
563
- value: unknown;
637
+ from?: string | null;
638
+
639
+ value?: unknown;
564
640
  }
565
641
  }
566
642
 
567
643
  export interface TaskAgentListParams {
568
- effort?: string | null;
644
+ /**
645
+ * Canonical effort tier names for the research graph.
646
+ */
647
+ filter_effort?: 'low' | 'medium' | 'high' | 'x-high' | 'max' | null;
648
+
649
+ filter_use_case?: 'research' | 'enrichment' | 'dataset_building' | null;
569
650
 
570
651
  limit?: number;
571
652
 
572
653
  offset?: number;
573
654
 
574
- use_case?: string | null;
655
+ workspace_id?: string | null;
575
656
  }
576
657
 
577
658
  export interface TaskAgentRunParams {
578
659
  input: string;
579
660
 
661
+ /**
662
+ * Canonical effort tier names for the research graph.
663
+ */
664
+ effort?: 'low' | 'medium' | 'high' | 'x-high' | 'max' | null;
665
+
580
666
  enable_events?: boolean;
581
667
 
582
668
  output_schema?: { [key: string]: unknown } | null;
583
669
 
670
+ previous_interaction_id?: string | null;
671
+
672
+ /**
673
+ * Source preferences for a web search agent instance.
674
+ */
584
675
  sources?: TaskAgentRunParams.Sources | null;
585
676
  }
586
677
 
587
678
  export namespace TaskAgentRunParams {
679
+ /**
680
+ * Source preferences for a web search agent instance.
681
+ */
588
682
  export interface Sources {
589
683
  allow?: Array<Sources.Allow>;
590
684
 
@@ -7,7 +7,7 @@ import { path } from '../../internal/utils/path';
7
7
 
8
8
  export class Templates extends APIResource {
9
9
  /**
10
- * List all available Web Search Agent templates.
10
+ * List Templates
11
11
  */
12
12
  list(
13
13
  query: TemplateListParams | null | undefined = {},
@@ -17,7 +17,7 @@ export class Templates extends APIResource {
17
17
  }
18
18
 
19
19
  /**
20
- * Fetch a single Web Search Agent template by name.
20
+ * Get Template
21
21
  */
22
22
  get(templateName: string, options?: RequestOptions): APIPromise<TemplateGetResponse> {
23
23
  return this._client.get(path`/v1/task-agents/templates/${templateName}`, options);
@@ -38,7 +38,10 @@ export namespace TemplateListResponse {
38
38
 
39
39
  domain_expertise: string;
40
40
 
41
- effort: string;
41
+ /**
42
+ * Canonical effort tier names for the research graph.
43
+ */
44
+ effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
42
45
 
43
46
  goals: Array<TemplateListResponseItem.Goal>;
44
47
 
@@ -97,7 +100,10 @@ export interface TemplateGetResponse {
97
100
 
98
101
  domain_expertise: string;
99
102
 
100
- effort: string;
103
+ /**
104
+ * Canonical effort tier names for the research graph.
105
+ */
106
+ effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
101
107
 
102
108
  goals: Array<TemplateGetResponse.Goal>;
103
109
 
@@ -145,13 +151,16 @@ export namespace TemplateGetResponse {
145
151
  }
146
152
 
147
153
  export interface TemplateListParams {
148
- effort?: string | null;
154
+ /**
155
+ * Canonical effort tier names for the research graph.
156
+ */
157
+ filter_effort?: 'low' | 'medium' | 'high' | 'x-high' | 'max' | null;
158
+
159
+ filter_use_case?: 'research' | 'enrichment' | 'dataset_building' | null;
149
160
 
150
161
  limit?: number;
151
162
 
152
163
  offset?: number;
153
-
154
- use_case?: string | null;
155
164
  }
156
165
 
157
166
  export declare namespace Templates {
@@ -65,7 +65,7 @@ export namespace TaskListResponse {
65
65
  /**
66
66
  * Current state of the task.
67
67
  */
68
- state: 'pending' | 'success' | 'error';
68
+ state: 'pending' | 'queued' | 'in_progress' | 'success' | 'error';
69
69
 
70
70
  /**
71
71
  * URL for checking the task status.
@@ -77,27 +77,27 @@ export namespace TaskListResponse {
77
77
  */
78
78
  account_name?: string;
79
79
 
80
- api_type?: 'web' | 'serp' | 'ecommerce' | 'social' | 'media' | 'agent' | 'extract' | 'fast-serp';
80
+ api_type?: 'web' | 'serp' | 'ecommerce' | 'social' | 'media' | 'agent' | 'extract' | 'fast-serp' | 'labs';
81
81
 
82
82
  /**
83
83
  * Batch ID if this task is part of a batch.
84
84
  */
85
- batch_id?: string;
85
+ batch_id?: string | null;
86
86
 
87
87
  /**
88
88
  * URL for downloading the task results.
89
89
  */
90
- download_url?: string;
90
+ download_url?: string | null;
91
91
 
92
92
  /**
93
93
  * Error message if the task failed.
94
94
  */
95
- error?: string;
95
+ error?: string | null;
96
96
 
97
97
  /**
98
98
  * Classification of the error type.
99
99
  */
100
- error_type?: string;
100
+ error_type?: string | null;
101
101
 
102
102
  /**
103
103
  * Timestamp when the task was last modified.
@@ -107,7 +107,12 @@ export namespace TaskListResponse {
107
107
  /**
108
108
  * Storage location of the output data.
109
109
  */
110
- output_url?: string;
110
+ output_url?: string | null;
111
+
112
+ /**
113
+ * Queue name the task was submitted to.
114
+ */
115
+ queue?: string;
111
116
 
112
117
  /**
113
118
  * HTTP status code from the task execution.
@@ -162,7 +167,7 @@ export namespace TaskGetResponse {
162
167
  /**
163
168
  * Current state of the task.
164
169
  */
165
- state: 'pending' | 'success' | 'error';
170
+ state: 'pending' | 'queued' | 'in_progress' | 'success' | 'error';
166
171
 
167
172
  /**
168
173
  * URL for checking the task status.
@@ -174,27 +179,27 @@ export namespace TaskGetResponse {
174
179
  */
175
180
  account_name?: string;
176
181
 
177
- api_type?: 'web' | 'serp' | 'ecommerce' | 'social' | 'media' | 'agent' | 'extract' | 'fast-serp';
182
+ api_type?: 'web' | 'serp' | 'ecommerce' | 'social' | 'media' | 'agent' | 'extract' | 'fast-serp' | 'labs';
178
183
 
179
184
  /**
180
185
  * Batch ID if this task is part of a batch.
181
186
  */
182
- batch_id?: string;
187
+ batch_id?: string | null;
183
188
 
184
189
  /**
185
190
  * URL for downloading the task results.
186
191
  */
187
- download_url?: string;
192
+ download_url?: string | null;
188
193
 
189
194
  /**
190
195
  * Error message if the task failed.
191
196
  */
192
- error?: string;
197
+ error?: string | null;
193
198
 
194
199
  /**
195
200
  * Classification of the error type.
196
201
  */
197
- error_type?: string;
202
+ error_type?: string | null;
198
203
 
199
204
  /**
200
205
  * Timestamp when the task was last modified.
@@ -204,7 +209,12 @@ export namespace TaskGetResponse {
204
209
  /**
205
210
  * Storage location of the output data.
206
211
  */
207
- output_url?: string;
212
+ output_url?: string | null;
213
+
214
+ /**
215
+ * Queue name the task was submitted to.
216
+ */
217
+ queue?: string;
208
218
 
209
219
  /**
210
220
  * HTTP status code from the task execution.