@nimble-way/nimble-js 0.18.0 → 0.20.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 (130) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/agent.d.mts +14 -31
  10. package/resources/agent.d.mts.map +1 -1
  11. package/resources/agent.d.ts +14 -31
  12. package/resources/agent.d.ts.map +1 -1
  13. package/resources/agent.js +4 -21
  14. package/resources/agent.js.map +1 -1
  15. package/resources/agent.mjs +4 -21
  16. package/resources/agent.mjs.map +1 -1
  17. package/resources/batches.d.mts +5 -5
  18. package/resources/batches.d.mts.map +1 -1
  19. package/resources/batches.d.ts +5 -5
  20. package/resources/batches.d.ts.map +1 -1
  21. package/resources/crawl.d.mts +1 -0
  22. package/resources/crawl.d.mts.map +1 -1
  23. package/resources/crawl.d.ts +1 -0
  24. package/resources/crawl.d.ts.map +1 -1
  25. package/resources/fast-serp.d.mts +305 -0
  26. package/resources/fast-serp.d.mts.map +1 -1
  27. package/resources/fast-serp.d.ts +305 -0
  28. package/resources/fast-serp.d.ts.map +1 -1
  29. package/resources/fast-serp.js +13 -0
  30. package/resources/fast-serp.js.map +1 -1
  31. package/resources/fast-serp.mjs +13 -0
  32. package/resources/fast-serp.mjs.map +1 -1
  33. package/resources/index.d.mts +1 -1
  34. package/resources/index.d.mts.map +1 -1
  35. package/resources/index.d.ts +1 -1
  36. package/resources/index.d.ts.map +1 -1
  37. package/resources/index.js.map +1 -1
  38. package/resources/index.mjs.map +1 -1
  39. package/resources/jobs/jobs.d.mts +36 -6
  40. package/resources/jobs/jobs.d.mts.map +1 -1
  41. package/resources/jobs/jobs.d.ts +36 -6
  42. package/resources/jobs/jobs.d.ts.map +1 -1
  43. package/resources/jobs/jobs.js +12 -0
  44. package/resources/jobs/jobs.js.map +1 -1
  45. package/resources/jobs/jobs.mjs +12 -0
  46. package/resources/jobs/jobs.mjs.map +1 -1
  47. package/resources/jobs/runs/artifacts.d.mts +17 -13
  48. package/resources/jobs/runs/artifacts.d.mts.map +1 -1
  49. package/resources/jobs/runs/artifacts.d.ts +17 -13
  50. package/resources/jobs/runs/artifacts.d.ts.map +1 -1
  51. package/resources/jobs/runs/artifacts.js +8 -0
  52. package/resources/jobs/runs/artifacts.js.map +1 -1
  53. package/resources/jobs/runs/artifacts.mjs +8 -0
  54. package/resources/jobs/runs/artifacts.mjs.map +1 -1
  55. package/resources/jobs/runs/runs.d.mts +12 -6
  56. package/resources/jobs/runs/runs.d.mts.map +1 -1
  57. package/resources/jobs/runs/runs.d.ts +12 -6
  58. package/resources/jobs/runs/runs.d.ts.map +1 -1
  59. package/resources/jobs/runs/runs.js +6 -0
  60. package/resources/jobs/runs/runs.js.map +1 -1
  61. package/resources/jobs/runs/runs.mjs +6 -0
  62. package/resources/jobs/runs/runs.mjs.map +1 -1
  63. package/resources/media.d.mts +5 -5
  64. package/resources/media.d.mts.map +1 -1
  65. package/resources/media.d.ts +5 -5
  66. package/resources/media.d.ts.map +1 -1
  67. package/resources/serp.d.mts +10 -10
  68. package/resources/serp.d.mts.map +1 -1
  69. package/resources/serp.d.ts +10 -10
  70. package/resources/serp.d.ts.map +1 -1
  71. package/resources/task-agent/index.d.mts +1 -1
  72. package/resources/task-agent/index.d.mts.map +1 -1
  73. package/resources/task-agent/index.d.ts +1 -1
  74. package/resources/task-agent/index.d.ts.map +1 -1
  75. package/resources/task-agent/index.js.map +1 -1
  76. package/resources/task-agent/index.mjs.map +1 -1
  77. package/resources/task-agent/runs.d.mts +440 -81
  78. package/resources/task-agent/runs.d.mts.map +1 -1
  79. package/resources/task-agent/runs.d.ts +440 -81
  80. package/resources/task-agent/runs.d.ts.map +1 -1
  81. package/resources/task-agent/runs.js +30 -17
  82. package/resources/task-agent/runs.js.map +1 -1
  83. package/resources/task-agent/runs.mjs +30 -17
  84. package/resources/task-agent/runs.mjs.map +1 -1
  85. package/resources/task-agent/task-agent.d.mts +641 -51
  86. package/resources/task-agent/task-agent.d.mts.map +1 -1
  87. package/resources/task-agent/task-agent.d.ts +641 -51
  88. package/resources/task-agent/task-agent.d.ts.map +1 -1
  89. package/resources/task-agent/task-agent.js +24 -14
  90. package/resources/task-agent/task-agent.js.map +1 -1
  91. package/resources/task-agent/task-agent.mjs +24 -14
  92. package/resources/task-agent/task-agent.mjs.map +1 -1
  93. package/resources/task-agent/templates.d.mts +175 -12
  94. package/resources/task-agent/templates.d.mts.map +1 -1
  95. package/resources/task-agent/templates.d.ts +175 -12
  96. package/resources/task-agent/templates.d.ts.map +1 -1
  97. package/resources/task-agent/templates.js +6 -2
  98. package/resources/task-agent/templates.js.map +1 -1
  99. package/resources/task-agent/templates.mjs +6 -2
  100. package/resources/task-agent/templates.mjs.map +1 -1
  101. package/resources/tasks.d.mts +10 -10
  102. package/resources/tasks.d.mts.map +1 -1
  103. package/resources/tasks.d.ts +10 -10
  104. package/resources/tasks.d.ts.map +1 -1
  105. package/resources/top-level.d.mts +14 -16
  106. package/resources/top-level.d.mts.map +1 -1
  107. package/resources/top-level.d.ts +14 -16
  108. package/resources/top-level.d.ts.map +1 -1
  109. package/src/client.ts +6 -2
  110. package/src/resources/agent.ts +15 -32
  111. package/src/resources/batches.ts +5 -5
  112. package/src/resources/crawl.ts +2 -0
  113. package/src/resources/fast-serp.ts +461 -1
  114. package/src/resources/index.ts +1 -1
  115. package/src/resources/jobs/jobs.ts +36 -6
  116. package/src/resources/jobs/runs/artifacts.ts +17 -13
  117. package/src/resources/jobs/runs/runs.ts +12 -6
  118. package/src/resources/media.ts +5 -5
  119. package/src/resources/serp.ts +10 -10
  120. package/src/resources/task-agent/index.ts +0 -2
  121. package/src/resources/task-agent/runs.ts +461 -111
  122. package/src/resources/task-agent/task-agent.ts +652 -78
  123. package/src/resources/task-agent/templates.ts +178 -14
  124. package/src/resources/tasks.ts +10 -10
  125. package/src/resources/top-level.ts +18 -15
  126. package/src/version.ts +1 -1
  127. package/version.d.mts +1 -1
  128. package/version.d.ts +1 -1
  129. package/version.js +1 -1
  130. package/version.mjs +1 -1
@@ -7,7 +7,9 @@ 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
+ *
12
+ * @deprecated
11
13
  */
12
14
  list(
13
15
  query: TemplateListParams | null | undefined = {},
@@ -17,141 +19,303 @@ export class Templates extends APIResource {
17
19
  }
18
20
 
19
21
  /**
20
- * Fetch a single Web Search Agent template by name.
22
+ * Get Template
23
+ *
24
+ * @deprecated
21
25
  */
22
26
  get(templateName: string, options?: RequestOptions): APIPromise<TemplateGetResponse> {
23
27
  return this._client.get(path`/v1/task-agents/templates/${templateName}`, options);
24
28
  }
25
29
  }
26
30
 
27
- export type TemplateListResponse = Array<TemplateListResponse.TemplateListResponseItem>;
31
+ export interface TemplateListResponse {
32
+ /**
33
+ * Items returned in this page.
34
+ */
35
+ items: Array<TemplateListResponse.Item>;
36
+
37
+ /**
38
+ * Maximum number of items returned.
39
+ */
40
+ limit: number;
41
+
42
+ /**
43
+ * Number of items skipped before this page.
44
+ */
45
+ offset: number;
46
+
47
+ /**
48
+ * Total number of items matching the query.
49
+ */
50
+ total: number;
51
+ }
28
52
 
29
53
  export namespace TemplateListResponse {
30
- export interface TemplateListResponseItem {
54
+ export interface Item {
55
+ /**
56
+ * Unique template identifier (wsat\_<uuid>).
57
+ */
31
58
  id: string;
32
59
 
60
+ /**
61
+ * When the template was created.
62
+ */
33
63
  created_at: string;
34
64
 
65
+ /**
66
+ * Template description shown to users.
67
+ */
35
68
  description: string;
36
69
 
70
+ /**
71
+ * Human-friendly template name shown to users.
72
+ */
37
73
  display_name: string;
38
74
 
75
+ /**
76
+ * Domain expertise or operating context for the template.
77
+ */
39
78
  domain_expertise: string;
40
79
 
41
- effort: string;
80
+ /**
81
+ * Default effort level for runs created from this template.
82
+ */
83
+ effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
42
84
 
43
- goals: Array<TemplateListResponseItem.Goal>;
85
+ /**
86
+ * Ordered goals for the template.
87
+ */
88
+ goals: Array<Item.Goal>;
44
89
 
90
+ /**
91
+ * Icon identifier used when presenting the template.
92
+ */
45
93
  icon: string;
46
94
 
95
+ /**
96
+ * JSON schema describing the structured output the agent should produce.
97
+ */
47
98
  output_schema: { [key: string]: unknown } | null;
48
99
 
49
- sources: Array<TemplateListResponseItem.Source>;
100
+ /**
101
+ * Ordered source groups for the template.
102
+ */
103
+ sources: Array<Item.Source>;
50
104
 
51
- suggested_questions: Array<TemplateListResponseItem.SuggestedQuestion>;
105
+ /**
106
+ * Suggested prompts for the template.
107
+ */
108
+ suggested_questions: Array<Item.SuggestedQuestion>;
52
109
 
110
+ /**
111
+ * Stable template name used to create agent instances.
112
+ */
53
113
  template_name: string;
54
114
 
115
+ /**
116
+ * When the template was last updated.
117
+ */
55
118
  updated_at: string;
56
119
 
120
+ /**
121
+ * Primary use case supported by the template.
122
+ */
57
123
  use_case: 'research' | 'enrichment' | 'dataset_building';
58
124
  }
59
125
 
60
- export namespace TemplateListResponseItem {
126
+ export namespace Item {
61
127
  export interface Goal {
128
+ /**
129
+ * Unique goal identifier (wsag\_<uuid>).
130
+ */
62
131
  id: string;
63
132
 
133
+ /**
134
+ * Goal text.
135
+ */
64
136
  goal: string;
65
137
 
138
+ /**
139
+ * Zero-based goal position.
140
+ */
66
141
  order: number;
67
142
  }
68
143
 
69
144
  export interface Source {
145
+ /**
146
+ * Unique source group identifier (wsas\_<uuid>).
147
+ */
70
148
  id: string;
71
149
 
150
+ /**
151
+ * Domains included in this source group.
152
+ */
72
153
  domains: Array<string>;
73
154
 
155
+ /**
156
+ * Zero-based source group position.
157
+ */
74
158
  order: number;
75
159
 
160
+ /**
161
+ * Source group title.
162
+ */
76
163
  title: string;
77
164
  }
78
165
 
79
166
  export interface SuggestedQuestion {
167
+ /**
168
+ * Unique suggested question identifier (wsasq\_<uuid>).
169
+ */
80
170
  id: string;
81
171
 
172
+ /**
173
+ * Zero-based suggested question position.
174
+ */
82
175
  order: number;
83
176
 
177
+ /**
178
+ * Suggested prompt text.
179
+ */
84
180
  question: string;
85
181
  }
86
182
  }
87
183
  }
88
184
 
89
185
  export interface TemplateGetResponse {
186
+ /**
187
+ * Unique template identifier (wsat\_<uuid>).
188
+ */
90
189
  id: string;
91
190
 
191
+ /**
192
+ * When the template was created.
193
+ */
92
194
  created_at: string;
93
195
 
196
+ /**
197
+ * Template description shown to users.
198
+ */
94
199
  description: string;
95
200
 
201
+ /**
202
+ * Human-friendly template name shown to users.
203
+ */
96
204
  display_name: string;
97
205
 
206
+ /**
207
+ * Domain expertise or operating context for the template.
208
+ */
98
209
  domain_expertise: string;
99
210
 
100
- effort: string;
211
+ /**
212
+ * Default effort level for runs created from this template.
213
+ */
214
+ effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
101
215
 
216
+ /**
217
+ * Ordered goals for the template.
218
+ */
102
219
  goals: Array<TemplateGetResponse.Goal>;
103
220
 
221
+ /**
222
+ * Icon identifier used when presenting the template.
223
+ */
104
224
  icon: string;
105
225
 
226
+ /**
227
+ * JSON schema describing the structured output the agent should produce.
228
+ */
106
229
  output_schema: { [key: string]: unknown } | null;
107
230
 
231
+ /**
232
+ * Ordered source groups for the template.
233
+ */
108
234
  sources: Array<TemplateGetResponse.Source>;
109
235
 
236
+ /**
237
+ * Suggested prompts for the template.
238
+ */
110
239
  suggested_questions: Array<TemplateGetResponse.SuggestedQuestion>;
111
240
 
241
+ /**
242
+ * Stable template name used to create agent instances.
243
+ */
112
244
  template_name: string;
113
245
 
246
+ /**
247
+ * When the template was last updated.
248
+ */
114
249
  updated_at: string;
115
250
 
251
+ /**
252
+ * Primary use case supported by the template.
253
+ */
116
254
  use_case: 'research' | 'enrichment' | 'dataset_building';
117
255
  }
118
256
 
119
257
  export namespace TemplateGetResponse {
120
258
  export interface Goal {
259
+ /**
260
+ * Unique goal identifier (wsag\_<uuid>).
261
+ */
121
262
  id: string;
122
263
 
264
+ /**
265
+ * Goal text.
266
+ */
123
267
  goal: string;
124
268
 
269
+ /**
270
+ * Zero-based goal position.
271
+ */
125
272
  order: number;
126
273
  }
127
274
 
128
275
  export interface Source {
276
+ /**
277
+ * Unique source group identifier (wsas\_<uuid>).
278
+ */
129
279
  id: string;
130
280
 
281
+ /**
282
+ * Domains included in this source group.
283
+ */
131
284
  domains: Array<string>;
132
285
 
286
+ /**
287
+ * Zero-based source group position.
288
+ */
133
289
  order: number;
134
290
 
291
+ /**
292
+ * Source group title.
293
+ */
135
294
  title: string;
136
295
  }
137
296
 
138
297
  export interface SuggestedQuestion {
298
+ /**
299
+ * Unique suggested question identifier (wsasq\_<uuid>).
300
+ */
139
301
  id: string;
140
302
 
303
+ /**
304
+ * Zero-based suggested question position.
305
+ */
141
306
  order: number;
142
307
 
308
+ /**
309
+ * Suggested prompt text.
310
+ */
143
311
  question: string;
144
312
  }
145
313
  }
146
314
 
147
315
  export interface TemplateListParams {
148
- effort?: string | null;
149
-
150
316
  limit?: number;
151
317
 
152
318
  offset?: number;
153
-
154
- use_case?: string | null;
155
319
  }
156
320
 
157
321
  export declare namespace Templates {
@@ -82,22 +82,22 @@ export namespace TaskListResponse {
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,7 @@ 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
111
 
112
112
  /**
113
113
  * Queue name the task was submitted to.
@@ -184,22 +184,22 @@ export namespace TaskGetResponse {
184
184
  /**
185
185
  * Batch ID if this task is part of a batch.
186
186
  */
187
- batch_id?: string;
187
+ batch_id?: string | null;
188
188
 
189
189
  /**
190
190
  * URL for downloading the task results.
191
191
  */
192
- download_url?: string;
192
+ download_url?: string | null;
193
193
 
194
194
  /**
195
195
  * Error message if the task failed.
196
196
  */
197
- error?: string;
197
+ error?: string | null;
198
198
 
199
199
  /**
200
200
  * Classification of the error type.
201
201
  */
202
- error_type?: string;
202
+ error_type?: string | null;
203
203
 
204
204
  /**
205
205
  * Timestamp when the task was last modified.
@@ -209,7 +209,7 @@ export namespace TaskGetResponse {
209
209
  /**
210
210
  * Storage location of the output data.
211
211
  */
212
- output_url?: string;
212
+ output_url?: string | null;
213
213
 
214
214
  /**
215
215
  * Queue name the task was submitted to.
@@ -425,22 +425,22 @@ export namespace ExtractAsyncResponse {
425
425
  /**
426
426
  * Batch ID if this task is part of a batch.
427
427
  */
428
- batch_id?: string;
428
+ batch_id?: string | null;
429
429
 
430
430
  /**
431
431
  * URL for downloading the task results.
432
432
  */
433
- download_url?: string;
433
+ download_url?: string | null;
434
434
 
435
435
  /**
436
436
  * Error message if the task failed.
437
437
  */
438
- error?: string;
438
+ error?: string | null;
439
439
 
440
440
  /**
441
441
  * Classification of the error type.
442
442
  */
443
- error_type?: string;
443
+ error_type?: string | null;
444
444
 
445
445
  /**
446
446
  * Timestamp when the task was last modified.
@@ -450,7 +450,7 @@ export namespace ExtractAsyncResponse {
450
450
  /**
451
451
  * Storage location of the output data.
452
452
  */
453
- output_url?: string;
453
+ output_url?: string | null;
454
454
 
455
455
  /**
456
456
  * Queue name the task was submitted to.
@@ -523,22 +523,22 @@ export namespace ExtractBatchResponse {
523
523
  /**
524
524
  * Batch ID if this task is part of a batch.
525
525
  */
526
- batch_id?: string;
526
+ batch_id?: string | null;
527
527
 
528
528
  /**
529
529
  * URL for downloading the task results.
530
530
  */
531
- download_url?: string;
531
+ download_url?: string | null;
532
532
 
533
533
  /**
534
534
  * Error message if the task failed.
535
535
  */
536
- error?: string;
536
+ error?: string | null;
537
537
 
538
538
  /**
539
539
  * Classification of the error type.
540
540
  */
541
- error_type?: string;
541
+ error_type?: string | null;
542
542
 
543
543
  /**
544
544
  * Timestamp when the task was last modified.
@@ -548,7 +548,7 @@ export namespace ExtractBatchResponse {
548
548
  /**
549
549
  * Storage location of the output data.
550
550
  */
551
- output_url?: string;
551
+ output_url?: string | null;
552
552
 
553
553
  /**
554
554
  * Queue name the task was submitted to.
@@ -1793,6 +1793,8 @@ export namespace ExtractParams {
1793
1793
 
1794
1794
  prefetch_userbrowser?: boolean;
1795
1795
 
1796
+ renew_on_blocked?: boolean;
1797
+
1796
1798
  retry?: boolean;
1797
1799
 
1798
1800
  timeout?: number;
@@ -2924,6 +2926,8 @@ export namespace ExtractAsyncParams {
2924
2926
 
2925
2927
  prefetch_userbrowser?: boolean;
2926
2928
 
2929
+ renew_on_blocked?: boolean;
2930
+
2927
2931
  retry?: boolean;
2928
2932
 
2929
2933
  timeout?: number;
@@ -4072,6 +4076,8 @@ export namespace ExtractBatchParams {
4072
4076
 
4073
4077
  prefetch_userbrowser?: boolean;
4074
4078
 
4079
+ renew_on_blocked?: boolean;
4080
+
4075
4081
  retry?: boolean;
4076
4082
 
4077
4083
  timeout?: number;
@@ -5209,6 +5215,8 @@ export namespace ExtractBatchParams {
5209
5215
 
5210
5216
  prefetch_userbrowser?: boolean;
5211
5217
 
5218
+ renew_on_blocked?: boolean;
5219
+
5212
5220
  retry?: boolean;
5213
5221
 
5214
5222
  timeout?: number;
@@ -6049,11 +6057,6 @@ export interface SearchParams {
6049
6057
  */
6050
6058
  country?: string;
6051
6059
 
6052
- /**
6053
- * Internal-only. Gated to allowlisted accounts; ignored otherwise.
6054
- */
6055
- debug_params?: { [key: string]: unknown } | null;
6056
-
6057
6060
  /**
6058
6061
  * Deprecated. Use search_depth instead. true maps to 'deep', false maps to 'lite'.
6059
6062
  */
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.18.0'; // x-release-please-version
1
+ export const VERSION = '0.20.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.18.0";
1
+ export declare const VERSION = "0.20.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.18.0";
1
+ export declare const VERSION = "0.20.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.18.0'; // x-release-please-version
4
+ exports.VERSION = '0.20.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.18.0'; // x-release-please-version
1
+ export const VERSION = '0.20.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map