@nimble-way/nimble-js 0.20.0 → 1.0.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 (252) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +10 -10
  3. package/client.d.mts +10 -39
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +10 -39
  6. package/client.d.ts.map +1 -1
  7. package/client.js +8 -43
  8. package/client.js.map +1 -1
  9. package/client.mjs +8 -43
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/{task-agent/task-agent.d.mts → agents/agents.d.mts} +51 -213
  13. package/resources/agents/agents.d.mts.map +1 -0
  14. package/resources/{task-agent/task-agent.d.ts → agents/agents.d.ts} +51 -213
  15. package/resources/agents/agents.d.ts.map +1 -0
  16. package/resources/agents/agents.js +67 -0
  17. package/resources/agents/agents.js.map +1 -0
  18. package/resources/agents/agents.mjs +62 -0
  19. package/resources/agents/agents.mjs.map +1 -0
  20. package/resources/agents/index.d.mts +4 -0
  21. package/resources/agents/index.d.mts.map +1 -0
  22. package/resources/agents/index.d.ts +4 -0
  23. package/resources/agents/index.d.ts.map +1 -0
  24. package/resources/{task-agent → agents}/index.js +3 -3
  25. package/resources/agents/index.js.map +1 -0
  26. package/resources/{task-agent → agents}/index.mjs +1 -1
  27. package/resources/agents/index.mjs.map +1 -0
  28. package/resources/{task-agent → agents}/runs.d.mts +192 -43
  29. package/resources/agents/runs.d.mts.map +1 -0
  30. package/resources/{task-agent → agents}/runs.d.ts +192 -43
  31. package/resources/agents/runs.d.ts.map +1 -0
  32. package/resources/agents/runs.js +63 -0
  33. package/resources/agents/runs.js.map +1 -0
  34. package/resources/agents/runs.mjs +59 -0
  35. package/resources/agents/runs.mjs.map +1 -0
  36. package/resources/{task-agent → agents}/templates.d.mts +3 -6
  37. package/resources/agents/templates.d.mts.map +1 -0
  38. package/resources/{task-agent → agents}/templates.d.ts +3 -6
  39. package/resources/agents/templates.d.ts.map +1 -0
  40. package/resources/{task-agent → agents}/templates.js +5 -8
  41. package/resources/agents/templates.js.map +1 -0
  42. package/resources/agents/templates.mjs +19 -0
  43. package/resources/agents/templates.mjs.map +1 -0
  44. package/resources/agents.d.mts +2 -0
  45. package/resources/agents.d.mts.map +1 -0
  46. package/resources/agents.d.ts +2 -0
  47. package/resources/agents.d.ts.map +1 -0
  48. package/resources/{task-agent.js → agents.js} +2 -2
  49. package/resources/agents.js.map +1 -0
  50. package/resources/{task-agent.mjs → agents.mjs} +2 -2
  51. package/resources/agents.mjs.map +1 -0
  52. package/resources/batches.js +3 -3
  53. package/resources/batches.mjs +3 -3
  54. package/resources/crawl.js +4 -4
  55. package/resources/crawl.mjs +4 -4
  56. package/resources/domain-knowledge.js +1 -1
  57. package/resources/domain-knowledge.mjs +1 -1
  58. package/resources/extract/extract.d.mts +1243 -0
  59. package/resources/extract/extract.d.mts.map +1 -0
  60. package/resources/extract/extract.d.ts +1243 -0
  61. package/resources/extract/extract.d.ts.map +1 -0
  62. package/resources/extract/extract.js +52 -0
  63. package/resources/extract/extract.js.map +1 -0
  64. package/resources/extract/extract.mjs +47 -0
  65. package/resources/extract/extract.mjs.map +1 -0
  66. package/resources/extract/index.d.mts +3 -0
  67. package/resources/extract/index.d.mts.map +1 -0
  68. package/resources/extract/index.d.ts +3 -0
  69. package/resources/extract/index.d.ts.map +1 -0
  70. package/resources/extract/index.js +9 -0
  71. package/resources/extract/index.js.map +1 -0
  72. package/resources/extract/index.mjs +4 -0
  73. package/resources/extract/index.mjs.map +1 -0
  74. package/resources/extract/templates/generations.d.mts +364 -0
  75. package/resources/extract/templates/generations.d.mts.map +1 -0
  76. package/resources/extract/templates/generations.d.ts +364 -0
  77. package/resources/extract/templates/generations.d.ts.map +1 -0
  78. package/resources/extract/templates/generations.js +39 -0
  79. package/resources/extract/templates/generations.js.map +1 -0
  80. package/resources/extract/templates/generations.mjs +35 -0
  81. package/resources/extract/templates/generations.mjs.map +1 -0
  82. package/resources/extract/templates/index.d.mts +4 -0
  83. package/resources/extract/templates/index.d.mts.map +1 -0
  84. package/resources/extract/templates/index.d.ts +4 -0
  85. package/resources/extract/templates/index.d.ts.map +1 -0
  86. package/resources/extract/templates/index.js +11 -0
  87. package/resources/extract/templates/index.js.map +1 -0
  88. package/resources/extract/templates/index.mjs +5 -0
  89. package/resources/extract/templates/index.mjs.map +1 -0
  90. package/resources/extract/templates/templates.d.mts +870 -0
  91. package/resources/extract/templates/templates.d.mts.map +1 -0
  92. package/resources/extract/templates/templates.d.ts +870 -0
  93. package/resources/extract/templates/templates.d.ts.map +1 -0
  94. package/resources/extract/templates/templates.js +120 -0
  95. package/resources/extract/templates/templates.js.map +1 -0
  96. package/resources/extract/templates/templates.mjs +115 -0
  97. package/resources/extract/templates/templates.mjs.map +1 -0
  98. package/resources/extract/templates/versions.d.mts +226 -0
  99. package/resources/extract/templates/versions.d.mts.map +1 -0
  100. package/resources/extract/templates/versions.d.ts +226 -0
  101. package/resources/extract/templates/versions.d.ts.map +1 -0
  102. package/resources/extract/templates/versions.js +42 -0
  103. package/resources/extract/templates/versions.js.map +1 -0
  104. package/resources/extract/templates/versions.mjs +38 -0
  105. package/resources/extract/templates/versions.mjs.map +1 -0
  106. package/resources/extract/templates.d.mts +2 -0
  107. package/resources/extract/templates.d.mts.map +1 -0
  108. package/resources/extract/templates.d.ts +2 -0
  109. package/resources/extract/templates.d.ts.map +1 -0
  110. package/resources/extract/templates.js +6 -0
  111. package/resources/extract/templates.js.map +1 -0
  112. package/resources/extract/templates.mjs +3 -0
  113. package/resources/extract/templates.mjs.map +1 -0
  114. package/resources/extract.d.mts +2 -0
  115. package/resources/extract.d.mts.map +1 -0
  116. package/resources/extract.d.ts +2 -0
  117. package/resources/extract.d.ts.map +1 -0
  118. package/resources/extract.js +6 -0
  119. package/resources/extract.js.map +1 -0
  120. package/resources/extract.mjs +3 -0
  121. package/resources/extract.mjs.map +1 -0
  122. package/resources/fast-serp.js +1 -1
  123. package/resources/fast-serp.mjs +1 -1
  124. package/resources/index.d.mts +4 -4
  125. package/resources/index.d.mts.map +1 -1
  126. package/resources/index.d.ts +4 -4
  127. package/resources/index.d.ts.map +1 -1
  128. package/resources/index.js +5 -5
  129. package/resources/index.js.map +1 -1
  130. package/resources/index.mjs +2 -2
  131. package/resources/index.mjs.map +1 -1
  132. package/resources/jobs/index.d.mts +2 -2
  133. package/resources/jobs/index.d.mts.map +1 -1
  134. package/resources/jobs/index.d.ts +2 -2
  135. package/resources/jobs/index.d.ts.map +1 -1
  136. package/resources/jobs/index.js.map +1 -1
  137. package/resources/jobs/index.mjs.map +1 -1
  138. package/resources/jobs/jobs.d.mts +35 -103
  139. package/resources/jobs/jobs.d.mts.map +1 -1
  140. package/resources/jobs/jobs.d.ts +35 -103
  141. package/resources/jobs/jobs.d.ts.map +1 -1
  142. package/resources/jobs/jobs.js +10 -28
  143. package/resources/jobs/jobs.js.map +1 -1
  144. package/resources/jobs/jobs.mjs +11 -29
  145. package/resources/jobs/jobs.mjs.map +1 -1
  146. package/resources/jobs/runs/artifacts.d.mts +4 -12
  147. package/resources/jobs/runs/artifacts.d.mts.map +1 -1
  148. package/resources/jobs/runs/artifacts.d.ts +4 -12
  149. package/resources/jobs/runs/artifacts.d.ts.map +1 -1
  150. package/resources/jobs/runs/artifacts.js +8 -16
  151. package/resources/jobs/runs/artifacts.js.map +1 -1
  152. package/resources/jobs/runs/artifacts.mjs +8 -16
  153. package/resources/jobs/runs/artifacts.mjs.map +1 -1
  154. package/resources/jobs/runs/index.d.mts +1 -1
  155. package/resources/jobs/runs/index.d.mts.map +1 -1
  156. package/resources/jobs/runs/index.d.ts +1 -1
  157. package/resources/jobs/runs/index.d.ts.map +1 -1
  158. package/resources/jobs/runs/index.js.map +1 -1
  159. package/resources/jobs/runs/index.mjs.map +1 -1
  160. package/resources/jobs/runs/runs.d.mts +60 -28
  161. package/resources/jobs/runs/runs.d.mts.map +1 -1
  162. package/resources/jobs/runs/runs.d.ts +60 -28
  163. package/resources/jobs/runs/runs.d.ts.map +1 -1
  164. package/resources/jobs/runs/runs.js +12 -12
  165. package/resources/jobs/runs/runs.js.map +1 -1
  166. package/resources/jobs/runs/runs.mjs +12 -12
  167. package/resources/jobs/runs/runs.mjs.map +1 -1
  168. package/resources/media.js +2 -2
  169. package/resources/media.mjs +2 -2
  170. package/resources/serp.js +3 -3
  171. package/resources/serp.mjs +3 -3
  172. package/resources/tasks.js +3 -3
  173. package/resources/tasks.mjs +3 -3
  174. package/resources/top-level.d.mts +1 -1202
  175. package/resources/top-level.d.mts.map +1 -1
  176. package/resources/top-level.d.ts +1 -1202
  177. package/resources/top-level.d.ts.map +1 -1
  178. package/src/client.ts +41 -123
  179. package/src/resources/{task-agent/task-agent.ts → agents/agents.ts} +71 -258
  180. package/src/resources/{task-agent → agents}/index.ts +14 -14
  181. package/src/resources/{task-agent → agents}/runs.ts +228 -54
  182. package/src/resources/{task-agent → agents}/templates.ts +5 -8
  183. package/src/resources/{task-agent.ts → agents.ts} +1 -1
  184. package/src/resources/batches.ts +3 -3
  185. package/src/resources/crawl.ts +4 -4
  186. package/src/resources/domain-knowledge.ts +1 -1
  187. package/src/resources/extract/extract.ts +5182 -0
  188. package/src/resources/extract/index.ts +25 -0
  189. package/src/resources/extract/templates/generations.ts +435 -0
  190. package/src/resources/extract/templates/index.ts +29 -0
  191. package/src/resources/extract/templates/templates.ts +1176 -0
  192. package/src/resources/extract/templates/versions.ts +284 -0
  193. package/src/resources/extract/templates.ts +3 -0
  194. package/src/resources/extract.ts +3 -0
  195. package/src/resources/fast-serp.ts +1 -1
  196. package/src/resources/index.ts +16 -36
  197. package/src/resources/jobs/index.ts +1 -1
  198. package/src/resources/jobs/jobs.ts +50 -125
  199. package/src/resources/jobs/runs/artifacts.ts +8 -16
  200. package/src/resources/jobs/runs/index.ts +1 -0
  201. package/src/resources/jobs/runs/runs.ts +75 -31
  202. package/src/resources/media.ts +2 -2
  203. package/src/resources/serp.ts +3 -3
  204. package/src/resources/tasks.ts +3 -3
  205. package/src/resources/top-level.ts +72 -5171
  206. package/src/version.ts +1 -1
  207. package/version.d.mts +1 -1
  208. package/version.d.mts.map +1 -1
  209. package/version.d.ts +1 -1
  210. package/version.d.ts.map +1 -1
  211. package/version.js +1 -1
  212. package/version.js.map +1 -1
  213. package/version.mjs +1 -1
  214. package/version.mjs.map +1 -1
  215. package/resources/agent.d.mts +0 -641
  216. package/resources/agent.d.mts.map +0 -1
  217. package/resources/agent.d.ts +0 -641
  218. package/resources/agent.d.ts.map +0 -1
  219. package/resources/agent.js +0 -84
  220. package/resources/agent.js.map +0 -1
  221. package/resources/agent.mjs +0 -80
  222. package/resources/agent.mjs.map +0 -1
  223. package/resources/task-agent/index.d.mts +0 -4
  224. package/resources/task-agent/index.d.mts.map +0 -1
  225. package/resources/task-agent/index.d.ts +0 -4
  226. package/resources/task-agent/index.d.ts.map +0 -1
  227. package/resources/task-agent/index.js.map +0 -1
  228. package/resources/task-agent/index.mjs.map +0 -1
  229. package/resources/task-agent/runs.d.mts.map +0 -1
  230. package/resources/task-agent/runs.d.ts.map +0 -1
  231. package/resources/task-agent/runs.js +0 -63
  232. package/resources/task-agent/runs.js.map +0 -1
  233. package/resources/task-agent/runs.mjs +0 -59
  234. package/resources/task-agent/runs.mjs.map +0 -1
  235. package/resources/task-agent/task-agent.d.mts.map +0 -1
  236. package/resources/task-agent/task-agent.d.ts.map +0 -1
  237. package/resources/task-agent/task-agent.js +0 -80
  238. package/resources/task-agent/task-agent.js.map +0 -1
  239. package/resources/task-agent/task-agent.mjs +0 -75
  240. package/resources/task-agent/task-agent.mjs.map +0 -1
  241. package/resources/task-agent/templates.d.mts.map +0 -1
  242. package/resources/task-agent/templates.d.ts.map +0 -1
  243. package/resources/task-agent/templates.js.map +0 -1
  244. package/resources/task-agent/templates.mjs +0 -22
  245. package/resources/task-agent/templates.mjs.map +0 -1
  246. package/resources/task-agent.d.mts +0 -2
  247. package/resources/task-agent.d.mts.map +0 -1
  248. package/resources/task-agent.d.ts +0 -2
  249. package/resources/task-agent.d.ts.map +0 -1
  250. package/resources/task-agent.js.map +0 -1
  251. package/resources/task-agent.mjs.map +0 -1
  252. package/src/resources/agent.ts +0 -935
@@ -7,18 +7,14 @@ import { path } from '../../../internal/utils/path';
7
7
 
8
8
  export class Artifacts extends APIResource {
9
9
  /**
10
- * List Run Artifacts
11
- *
12
- * @deprecated
10
+ * List Run Artifacts Public V2
13
11
  */
14
12
  list(runID: string, options?: RequestOptions): APIPromise<ArtifactListResponse> {
15
- return this._client.get(path`/v1/jobs/runs/${runID}/artifacts`, options);
13
+ return this._client.get(path`/v2/jobs/runs/${runID}/artifacts`, options);
16
14
  }
17
15
 
18
16
  /**
19
- * Get Run Artifact Download URL
20
- *
21
- * @deprecated
17
+ * Get Run Artifact Download Url Public V2
22
18
  */
23
19
  downloadURL(
24
20
  artifactID: number,
@@ -26,13 +22,11 @@ export class Artifacts extends APIResource {
26
22
  options?: RequestOptions,
27
23
  ): APIPromise<ArtifactDownloadURLResponse> {
28
24
  const { run_id } = params;
29
- return this._client.get(path`/v1/jobs/runs/${run_id}/artifacts/${artifactID}/download-url`, options);
25
+ return this._client.get(path`/v2/jobs/runs/${run_id}/artifacts/${artifactID}/download-url`, options);
30
26
  }
31
27
 
32
28
  /**
33
- * Get Run Artifact
34
- *
35
- * @deprecated
29
+ * Get Run Artifact Public V2
36
30
  */
37
31
  get(
38
32
  artifactID: number,
@@ -40,13 +34,11 @@ export class Artifacts extends APIResource {
40
34
  options?: RequestOptions,
41
35
  ): APIPromise<ArtifactGetResponse> {
42
36
  const { run_id } = params;
43
- return this._client.get(path`/v1/jobs/runs/${run_id}/artifacts/${artifactID}`, options);
37
+ return this._client.get(path`/v2/jobs/runs/${run_id}/artifacts/${artifactID}`, options);
44
38
  }
45
39
 
46
40
  /**
47
- * Preview Run Artifact
48
- *
49
- * @deprecated
41
+ * Preview Run Artifact Public V2
50
42
  */
51
43
  preview(
52
44
  artifactID: number,
@@ -54,7 +46,7 @@ export class Artifacts extends APIResource {
54
46
  options?: RequestOptions,
55
47
  ): APIPromise<ArtifactPreviewResponse> {
56
48
  const { run_id } = params;
57
- return this._client.get(path`/v1/jobs/runs/${run_id}/artifacts/${artifactID}/preview`, options);
49
+ return this._client.get(path`/v2/jobs/runs/${run_id}/artifacts/${artifactID}/preview`, options);
58
50
  }
59
51
  }
60
52
 
@@ -12,6 +12,7 @@ export {
12
12
  } from './artifacts';
13
13
  export {
14
14
  Runs,
15
+ type RunCreateResponse,
15
16
  type RunListResponse,
16
17
  type RunCancelResponse,
17
18
  type RunGetResponse,
@@ -20,60 +20,108 @@ export class Runs extends APIResource {
20
20
  artifacts: ArtifactsAPI.Artifacts = new ArtifactsAPI.Artifacts(this._client);
21
21
 
22
22
  /**
23
- * List Runs for Job
24
- *
25
- * @deprecated
23
+ * Trigger Job Run Public V2
24
+ */
25
+ create(jobID: string, options?: RequestOptions): APIPromise<RunCreateResponse> {
26
+ return this._client.post(path`/v2/jobs/${jobID}/runs`, options);
27
+ }
28
+
29
+ /**
30
+ * List Job Runs Public V2
26
31
  */
27
32
  list(
28
33
  jobID: string,
29
34
  query: RunListParams | null | undefined = {},
30
35
  options?: RequestOptions,
31
36
  ): APIPromise<RunListResponse> {
32
- return this._client.get(path`/v1/jobs/${jobID}/runs`, { query, ...options });
37
+ return this._client.get(path`/v2/jobs/${jobID}/runs`, { query, ...options });
33
38
  }
34
39
 
35
40
  /**
36
- * Cancel Run
37
- *
38
- * @deprecated
41
+ * Cancel Run Public V2
39
42
  */
40
43
  cancel(runID: string, options?: RequestOptions): APIPromise<RunCancelResponse> {
41
- return this._client.post(path`/v1/jobs/runs/${runID}/cancel`, options);
44
+ return this._client.post(path`/v2/jobs/runs/${runID}/cancel`, options);
42
45
  }
43
46
 
44
47
  /**
45
- * Get Run
46
- *
47
- * @deprecated
48
+ * Get Run Public V2
48
49
  */
49
50
  get(runID: string, options?: RequestOptions): APIPromise<RunGetResponse> {
50
- return this._client.get(path`/v1/jobs/runs/${runID}`, options);
51
+ return this._client.get(path`/v2/jobs/runs/${runID}`, options);
51
52
  }
52
53
  }
53
54
 
54
55
  /**
55
- * A page of job runs.
56
+ * A single execution of a job.
56
57
  */
58
+ export interface RunCreateResponse {
59
+ /**
60
+ * Unique run identifier (run\_<n>).
61
+ */
62
+ id: string;
63
+
64
+ /**
65
+ * When the run was created.
66
+ */
67
+ created_at: string;
68
+
69
+ /**
70
+ * Identifier of the job this run belongs to.
71
+ */
72
+ job_id: string;
73
+
74
+ /**
75
+ * Current run status.
76
+ */
77
+ status: 'PENDING' | 'RUNNING' | 'SUCCESS' | 'FAILED' | 'CANCELLED' | 'TIMEOUT' | 'WARNING';
78
+
79
+ /**
80
+ * What triggered the run: 'schedule' or 'manual'.
81
+ */
82
+ triggered_by: 'schedule' | 'manual';
83
+
84
+ /**
85
+ * When the run finished.
86
+ */
87
+ finished_at?: string | null;
88
+
89
+ /**
90
+ * Number of input records processed.
91
+ */
92
+ input_count?: number | null;
93
+
94
+ /**
95
+ * Number of result records produced.
96
+ */
97
+ result_count?: number | null;
98
+
99
+ /**
100
+ * When the run started executing.
101
+ */
102
+ started_at?: string | null;
103
+ }
104
+
57
105
  export interface RunListResponse {
58
106
  /**
59
- * Runs on this page.
107
+ * Items returned in this page.
60
108
  */
61
109
  items: Array<RunListResponse.Item>;
62
110
 
63
111
  /**
64
- * Total number of runs matching the query.
112
+ * Maximum number of items returned.
65
113
  */
66
- total: number;
114
+ limit: number;
67
115
 
68
116
  /**
69
- * Current page number.
117
+ * Number of items skipped before this page.
70
118
  */
71
- page?: number;
119
+ offset: number;
72
120
 
73
121
  /**
74
- * Number of items per page.
122
+ * Total number of items matching the query.
75
123
  */
76
- per_page?: number;
124
+ total: number;
77
125
  }
78
126
 
79
127
  export namespace RunListResponse {
@@ -214,14 +262,14 @@ export namespace RunGetResponse {
214
262
  name: string;
215
263
 
216
264
  /**
217
- * Name of the agent this job runs.
265
+ * Human-friendly job name shown in the UI.
218
266
  */
219
- agent_name?: string | null;
267
+ display_name?: string | null;
220
268
 
221
269
  /**
222
- * Human-friendly job name shown in the UI.
270
+ * Name of the extract template this job runs.
223
271
  */
224
- display_name?: string | null;
272
+ extract_template_name?: string | null;
225
273
 
226
274
  /**
227
275
  * Cron-based schedule controlling when a job runs automatically.
@@ -289,20 +337,16 @@ export namespace RunGetResponse {
289
337
  }
290
338
 
291
339
  export interface RunListParams {
292
- page?: number;
340
+ limit?: number;
293
341
 
294
- per_page?: number;
295
-
296
- /**
297
- * Filter by status
298
- */
299
- status?: string | null;
342
+ offset?: number;
300
343
  }
301
344
 
302
345
  Runs.Artifacts = Artifacts;
303
346
 
304
347
  export declare namespace Runs {
305
348
  export {
349
+ type RunCreateResponse as RunCreateResponse,
306
350
  type RunListResponse as RunListResponse,
307
351
  type RunCancelResponse as RunCancelResponse,
308
352
  type RunGetResponse as RunGetResponse,
@@ -16,7 +16,7 @@ export class Media extends APIResource {
16
16
  * ```
17
17
  */
18
18
  run(body: MediaRunParams, options?: RequestOptions): APIPromise<MediaRunResponse> {
19
- return this._client.post('/v1/media', { body, ...options });
19
+ return this._client.post('/v2/media', { body, ...options });
20
20
  }
21
21
 
22
22
  /**
@@ -30,7 +30,7 @@ export class Media extends APIResource {
30
30
  * ```
31
31
  */
32
32
  runAsync(body: MediaRunAsyncParams, options?: RequestOptions): APIPromise<MediaRunAsyncResponse> {
33
- return this._client.post('/v1/media/async', { body, ...options });
33
+ return this._client.post('/v2/media/async', { body, ...options });
34
34
  }
35
35
  }
36
36
 
@@ -16,7 +16,7 @@ export class Serp extends APIResource {
16
16
  * ```
17
17
  */
18
18
  run(body: SerpRunParams, options?: RequestOptions): APIPromise<SerpRunResponse> {
19
- return this._client.post('/v1/serp', { body, ...options });
19
+ return this._client.post('/v2/serp', { body, ...options });
20
20
  }
21
21
 
22
22
  /**
@@ -30,7 +30,7 @@ export class Serp extends APIResource {
30
30
  * ```
31
31
  */
32
32
  runAsync(body: SerpRunAsyncParams, options?: RequestOptions): APIPromise<SerpRunAsyncResponse> {
33
- return this._client.post('/v1/serp/async', { body, ...options });
33
+ return this._client.post('/v2/serp/async', { body, ...options });
34
34
  }
35
35
 
36
36
  /**
@@ -44,7 +44,7 @@ export class Serp extends APIResource {
44
44
  * ```
45
45
  */
46
46
  runBatch(body: SerpRunBatchParams, options?: RequestOptions): APIPromise<SerpRunBatchResponse> {
47
- return this._client.post('/v1/serp/batch', { body, ...options });
47
+ return this._client.post('/v2/serp/batch', { body, ...options });
48
48
  }
49
49
  }
50
50
 
@@ -13,21 +13,21 @@ export class Tasks extends APIResource {
13
13
  query: TaskListParams | null | undefined = {},
14
14
  options?: RequestOptions,
15
15
  ): APIPromise<TaskListResponse> {
16
- return this._client.get('/v1/tasks', { query, ...options });
16
+ return this._client.get('/v2/tasks', { query, ...options });
17
17
  }
18
18
 
19
19
  /**
20
20
  * Retrieve the details of a specific task by its ID.
21
21
  */
22
22
  get(taskID: string, options?: RequestOptions): APIPromise<TaskGetResponse> {
23
- return this._client.get(path`/v1/tasks/${taskID}`, options);
23
+ return this._client.get(path`/v2/tasks/${taskID}`, options);
24
24
  }
25
25
 
26
26
  /**
27
27
  * Retrieve the results of a completed task.
28
28
  */
29
29
  results(taskID: string, options?: RequestOptions): APIPromise<TaskResultsResponse> {
30
- return this._client.get(path`/v1/tasks/${taskID}/results`, options);
30
+ return this._client.get(path`/v2/tasks/${taskID}/results`, options);
31
31
  }
32
32
  }
33
33