@nimble-way/nimble-js 0.13.0 → 0.16.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 (267) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/api-promise.d.mts +1 -0
  3. package/api-promise.d.mts.map +1 -1
  4. package/api-promise.d.ts +1 -0
  5. package/api-promise.d.ts.map +1 -1
  6. package/api-promise.mjs +1 -0
  7. package/api-promise.mjs.map +1 -1
  8. package/client.d.mts +17 -2
  9. package/client.d.mts.map +1 -1
  10. package/client.d.ts +17 -2
  11. package/client.d.ts.map +1 -1
  12. package/client.js +24 -1
  13. package/client.js.map +1 -1
  14. package/client.mjs +24 -1
  15. package/client.mjs.map +1 -1
  16. package/core/api-promise.d.mts.map +1 -1
  17. package/core/api-promise.d.ts.map +1 -1
  18. package/core/api-promise.mjs.map +1 -1
  19. package/core/error.mjs.map +1 -1
  20. package/core/resource.d.mts.map +1 -1
  21. package/core/resource.d.ts.map +1 -1
  22. package/core/uploads.d.mts.map +1 -1
  23. package/core/uploads.d.ts.map +1 -1
  24. package/core/uploads.mjs.map +1 -1
  25. package/error.d.mts +1 -0
  26. package/error.d.mts.map +1 -1
  27. package/error.d.ts +1 -0
  28. package/error.d.ts.map +1 -1
  29. package/error.mjs +1 -0
  30. package/error.mjs.map +1 -1
  31. package/index.d.mts.map +1 -1
  32. package/index.d.ts.map +1 -1
  33. package/index.mjs.map +1 -1
  34. package/internal/detect-platform.mjs.map +1 -1
  35. package/internal/headers.mjs.map +1 -1
  36. package/internal/parse.d.mts.map +1 -1
  37. package/internal/parse.d.ts.map +1 -1
  38. package/internal/parse.mjs.map +1 -1
  39. package/internal/request-options.d.mts.map +1 -1
  40. package/internal/request-options.d.ts.map +1 -1
  41. package/internal/shims.d.mts +6 -0
  42. package/internal/shims.d.mts.map +1 -1
  43. package/internal/shims.d.ts +6 -0
  44. package/internal/shims.d.ts.map +1 -1
  45. package/internal/to-file.d.mts.map +1 -1
  46. package/internal/to-file.d.ts.map +1 -1
  47. package/internal/to-file.mjs.map +1 -1
  48. package/internal/tslib.js +22 -22
  49. package/internal/types.d.mts +4 -4
  50. package/internal/types.d.mts.map +1 -1
  51. package/internal/types.d.ts +4 -4
  52. package/internal/types.d.ts.map +1 -1
  53. package/internal/uploads.d.mts.map +1 -1
  54. package/internal/uploads.d.ts.map +1 -1
  55. package/internal/uploads.mjs.map +1 -1
  56. package/internal/utils/base64.mjs.map +1 -1
  57. package/internal/utils/log.d.mts.map +1 -1
  58. package/internal/utils/log.d.ts.map +1 -1
  59. package/internal/utils/log.js +2 -0
  60. package/internal/utils/log.js.map +1 -1
  61. package/internal/utils/log.mjs +2 -0
  62. package/internal/utils/log.mjs.map +1 -1
  63. package/internal/utils/path.mjs.map +1 -1
  64. package/internal/utils/query.mjs.map +1 -1
  65. package/internal/utils/values.mjs.map +1 -1
  66. package/internal/utils.d.mts.map +1 -1
  67. package/internal/utils.d.ts.map +1 -1
  68. package/internal/utils.mjs.map +1 -1
  69. package/package.json +1 -1
  70. package/resource.d.mts +1 -0
  71. package/resource.d.mts.map +1 -1
  72. package/resource.d.ts +1 -0
  73. package/resource.d.ts.map +1 -1
  74. package/resource.mjs +1 -0
  75. package/resource.mjs.map +1 -1
  76. package/resources/agent.d.mts +33 -26
  77. package/resources/agent.d.mts.map +1 -1
  78. package/resources/agent.d.ts +33 -26
  79. package/resources/agent.d.ts.map +1 -1
  80. package/resources/agent.js +0 -8
  81. package/resources/agent.js.map +1 -1
  82. package/resources/agent.mjs +0 -8
  83. package/resources/agent.mjs.map +1 -1
  84. package/resources/batches.d.mts +1 -1
  85. package/resources/batches.d.mts.map +1 -1
  86. package/resources/batches.d.ts +1 -1
  87. package/resources/batches.d.ts.map +1 -1
  88. package/resources/batches.mjs.map +1 -1
  89. package/resources/crawl.d.mts +5 -1
  90. package/resources/crawl.d.mts.map +1 -1
  91. package/resources/crawl.d.ts +5 -1
  92. package/resources/crawl.d.ts.map +1 -1
  93. package/resources/crawl.mjs.map +1 -1
  94. package/resources/domain-knowledge.d.mts +50 -0
  95. package/resources/domain-knowledge.d.mts.map +1 -0
  96. package/resources/domain-knowledge.d.ts +50 -0
  97. package/resources/domain-knowledge.d.ts.map +1 -0
  98. package/resources/domain-knowledge.js +16 -0
  99. package/resources/domain-knowledge.js.map +1 -0
  100. package/resources/domain-knowledge.mjs +12 -0
  101. package/resources/domain-knowledge.mjs.map +1 -0
  102. package/resources/index.d.mts +6 -1
  103. package/resources/index.d.mts.map +1 -1
  104. package/resources/index.d.ts +6 -1
  105. package/resources/index.d.ts.map +1 -1
  106. package/resources/index.js +11 -1
  107. package/resources/index.js.map +1 -1
  108. package/resources/index.mjs +5 -0
  109. package/resources/index.mjs.map +1 -1
  110. package/resources/jobs/index.d.mts +3 -0
  111. package/resources/jobs/index.d.mts.map +1 -0
  112. package/resources/jobs/index.d.ts +3 -0
  113. package/resources/jobs/index.d.ts.map +1 -0
  114. package/resources/jobs/index.js +9 -0
  115. package/resources/jobs/index.js.map +1 -0
  116. package/resources/jobs/index.mjs +4 -0
  117. package/resources/jobs/index.mjs.map +1 -0
  118. package/resources/jobs/jobs.d.mts +248 -0
  119. package/resources/jobs/jobs.d.mts.map +1 -0
  120. package/resources/jobs/jobs.d.ts +248 -0
  121. package/resources/jobs/jobs.d.ts.map +1 -0
  122. package/resources/jobs/jobs.js +58 -0
  123. package/resources/jobs/jobs.js.map +1 -0
  124. package/resources/jobs/jobs.mjs +53 -0
  125. package/resources/jobs/jobs.mjs.map +1 -0
  126. package/resources/jobs/runs/artifacts.d.mts +62 -0
  127. package/resources/jobs/runs/artifacts.d.mts.map +1 -0
  128. package/resources/jobs/runs/artifacts.d.ts +62 -0
  129. package/resources/jobs/runs/artifacts.d.ts.map +1 -0
  130. package/resources/jobs/runs/artifacts.js +37 -0
  131. package/resources/jobs/runs/artifacts.js.map +1 -0
  132. package/resources/jobs/runs/artifacts.mjs +33 -0
  133. package/resources/jobs/runs/artifacts.mjs.map +1 -0
  134. package/resources/jobs/runs/index.d.mts +3 -0
  135. package/resources/jobs/runs/index.d.mts.map +1 -0
  136. package/resources/jobs/runs/index.d.ts +3 -0
  137. package/resources/jobs/runs/index.d.ts.map +1 -0
  138. package/resources/jobs/runs/index.js +9 -0
  139. package/resources/jobs/runs/index.js.map +1 -0
  140. package/resources/jobs/runs/index.mjs +4 -0
  141. package/resources/jobs/runs/index.mjs.map +1 -0
  142. package/resources/jobs/runs/runs.d.mts +95 -0
  143. package/resources/jobs/runs/runs.d.mts.map +1 -0
  144. package/resources/jobs/runs/runs.d.ts +95 -0
  145. package/resources/jobs/runs/runs.d.ts.map +1 -0
  146. package/resources/jobs/runs/runs.js +36 -0
  147. package/resources/jobs/runs/runs.js.map +1 -0
  148. package/resources/jobs/runs/runs.mjs +31 -0
  149. package/resources/jobs/runs/runs.mjs.map +1 -0
  150. package/resources/jobs/runs.d.mts +2 -0
  151. package/resources/jobs/runs.d.mts.map +1 -0
  152. package/resources/jobs/runs.d.ts +2 -0
  153. package/resources/jobs/runs.d.ts.map +1 -0
  154. package/resources/jobs/runs.js +6 -0
  155. package/resources/jobs/runs.js.map +1 -0
  156. package/resources/jobs/runs.mjs +3 -0
  157. package/resources/jobs/runs.mjs.map +1 -0
  158. package/resources/jobs.d.mts +2 -0
  159. package/resources/jobs.d.mts.map +1 -0
  160. package/resources/jobs.d.ts +2 -0
  161. package/resources/jobs.d.ts.map +1 -0
  162. package/resources/jobs.js +6 -0
  163. package/resources/jobs.js.map +1 -0
  164. package/resources/jobs.mjs +3 -0
  165. package/resources/jobs.mjs.map +1 -0
  166. package/resources/media.d.mts +390 -0
  167. package/resources/media.d.mts.map +1 -0
  168. package/resources/media.d.ts +390 -0
  169. package/resources/media.d.ts.map +1 -0
  170. package/resources/media.js +35 -0
  171. package/resources/media.js.map +1 -0
  172. package/resources/media.mjs +31 -0
  173. package/resources/media.mjs.map +1 -0
  174. package/resources/serp.d.mts +714 -0
  175. package/resources/serp.d.mts.map +1 -0
  176. package/resources/serp.d.ts +714 -0
  177. package/resources/serp.d.ts.map +1 -0
  178. package/resources/serp.js +48 -0
  179. package/resources/serp.js.map +1 -0
  180. package/resources/serp.mjs +44 -0
  181. package/resources/serp.mjs.map +1 -0
  182. package/resources/task-agent/index.d.mts +4 -0
  183. package/resources/task-agent/index.d.mts.map +1 -0
  184. package/resources/task-agent/index.d.ts +4 -0
  185. package/resources/task-agent/index.d.ts.map +1 -0
  186. package/resources/task-agent/index.js +11 -0
  187. package/resources/task-agent/index.js.map +1 -0
  188. package/resources/task-agent/index.mjs +5 -0
  189. package/resources/task-agent/index.mjs.map +1 -0
  190. package/resources/task-agent/runs.d.mts +277 -0
  191. package/resources/task-agent/runs.d.mts.map +1 -0
  192. package/resources/task-agent/runs.d.ts +277 -0
  193. package/resources/task-agent/runs.d.ts.map +1 -0
  194. package/resources/task-agent/runs.js +50 -0
  195. package/resources/task-agent/runs.js.map +1 -0
  196. package/resources/task-agent/runs.mjs +46 -0
  197. package/resources/task-agent/runs.mjs.map +1 -0
  198. package/resources/task-agent/task-agent.d.mts +383 -0
  199. package/resources/task-agent/task-agent.d.mts.map +1 -0
  200. package/resources/task-agent/task-agent.d.ts +383 -0
  201. package/resources/task-agent/task-agent.d.ts.map +1 -0
  202. package/resources/task-agent/task-agent.js +70 -0
  203. package/resources/task-agent/task-agent.js.map +1 -0
  204. package/resources/task-agent/task-agent.mjs +65 -0
  205. package/resources/task-agent/task-agent.mjs.map +1 -0
  206. package/resources/task-agent/templates.d.mts +98 -0
  207. package/resources/task-agent/templates.d.mts.map +1 -0
  208. package/resources/task-agent/templates.d.ts +98 -0
  209. package/resources/task-agent/templates.d.ts.map +1 -0
  210. package/resources/task-agent/templates.js +22 -0
  211. package/resources/task-agent/templates.js.map +1 -0
  212. package/resources/task-agent/templates.mjs +18 -0
  213. package/resources/task-agent/templates.mjs.map +1 -0
  214. package/resources/task-agent.d.mts +2 -0
  215. package/resources/task-agent.d.mts.map +1 -0
  216. package/resources/task-agent.d.ts +2 -0
  217. package/resources/task-agent.d.ts.map +1 -0
  218. package/resources/task-agent.js +6 -0
  219. package/resources/task-agent.js.map +1 -0
  220. package/resources/task-agent.mjs +3 -0
  221. package/resources/task-agent.mjs.map +1 -0
  222. package/resources/tasks.d.mts +2 -2
  223. package/resources/tasks.d.mts.map +1 -1
  224. package/resources/tasks.d.ts +2 -2
  225. package/resources/tasks.d.ts.map +1 -1
  226. package/resources/tasks.mjs.map +1 -1
  227. package/resources/top-level.d.mts +32 -8
  228. package/resources/top-level.d.mts.map +1 -1
  229. package/resources/top-level.d.ts +32 -8
  230. package/resources/top-level.d.ts.map +1 -1
  231. package/resources.d.mts.map +1 -1
  232. package/resources.d.ts.map +1 -1
  233. package/resources.mjs.map +1 -1
  234. package/src/client.ts +112 -5
  235. package/src/internal/utils/log.ts +2 -0
  236. package/src/resources/agent.ts +21 -38
  237. package/src/resources/batches.ts +1 -1
  238. package/src/resources/crawl.ts +6 -1
  239. package/src/resources/domain-knowledge.ts +69 -0
  240. package/src/resources/index.ts +44 -2
  241. package/src/resources/jobs/index.ts +20 -0
  242. package/src/resources/jobs/jobs.ts +413 -0
  243. package/src/resources/jobs/runs/artifacts.ts +115 -0
  244. package/src/resources/jobs/runs/index.ts +19 -0
  245. package/src/resources/jobs/runs/runs.ts +177 -0
  246. package/src/resources/jobs/runs.ts +3 -0
  247. package/src/resources/jobs.ts +3 -0
  248. package/src/resources/media.ts +570 -0
  249. package/src/resources/serp.ts +1001 -0
  250. package/src/resources/task-agent/index.ts +32 -0
  251. package/src/resources/task-agent/runs.ts +416 -0
  252. package/src/resources/task-agent/task-agent.ts +652 -0
  253. package/src/resources/task-agent/templates.ts +163 -0
  254. package/src/resources/task-agent.ts +3 -0
  255. package/src/resources/tasks.ts +2 -2
  256. package/src/resources/top-level.ts +35 -8
  257. package/src/version.ts +1 -1
  258. package/uploads.d.mts +1 -0
  259. package/uploads.d.mts.map +1 -1
  260. package/uploads.d.ts +1 -0
  261. package/uploads.d.ts.map +1 -1
  262. package/uploads.mjs +1 -0
  263. package/uploads.mjs.map +1 -1
  264. package/version.d.mts +1 -1
  265. package/version.d.ts +1 -1
  266. package/version.js +1 -1
  267. package/version.mjs +1 -1
@@ -0,0 +1,714 @@
1
+ import { APIResource } from "../core/resource.mjs";
2
+ import { APIPromise } from "../core/api-promise.mjs";
3
+ import { RequestOptions } from "../internal/request-options.mjs";
4
+ export declare class Serp extends APIResource {
5
+ /**
6
+ * SERP
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * const response = await client.serp.run({
11
+ * search_engine: 'google_search',
12
+ * });
13
+ * ```
14
+ */
15
+ run(body: SerpRunParams, options?: RequestOptions): APIPromise<SerpRunResponse>;
16
+ /**
17
+ * SERP Async Endpoint
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * const response = await client.serp.runAsync({
22
+ * search_engine: 'google_search',
23
+ * });
24
+ * ```
25
+ */
26
+ runAsync(body: SerpRunAsyncParams, options?: RequestOptions): APIPromise<SerpRunAsyncResponse>;
27
+ /**
28
+ * SERP Batch Endpoint
29
+ *
30
+ * @example
31
+ * ```ts
32
+ * const response = await client.serp.runBatch({
33
+ * inputs: [{}],
34
+ * });
35
+ * ```
36
+ */
37
+ runBatch(body: SerpRunBatchParams, options?: RequestOptions): APIPromise<SerpRunBatchResponse>;
38
+ }
39
+ export interface SerpRunResponse {
40
+ data: SerpRunResponse.Data;
41
+ metadata: SerpRunResponse.Metadata;
42
+ /**
43
+ * The status of the task.
44
+ */
45
+ status: 'success' | 'skipped' | 'fatal' | 'error' | 'postponed' | 'ignored' | 'rejected' | 'blocked';
46
+ /**
47
+ * Unique identifier for the task.
48
+ */
49
+ task_id: string;
50
+ /**
51
+ * The final URL.
52
+ */
53
+ url: string;
54
+ debug?: SerpRunResponse.Debug;
55
+ /**
56
+ * Pagination information if applicable.
57
+ */
58
+ pagination?: SerpRunResponse.NextPageParams | Array<SerpRunResponse.UnionMember1>;
59
+ /**
60
+ * The HTTP status code of the task.
61
+ */
62
+ status_code?: number;
63
+ /**
64
+ * List of warnings generated during the task.
65
+ */
66
+ warnings?: Array<string>;
67
+ }
68
+ export declare namespace SerpRunResponse {
69
+ interface Data {
70
+ /**
71
+ * Browser actions execution results. Present only when browser_actions were
72
+ * specified in the request.
73
+ */
74
+ browser_actions?: Data.BrowserActions;
75
+ /**
76
+ * The cookies collected from browser actions during the task.
77
+ */
78
+ cookies?: Array<unknown>;
79
+ /**
80
+ * The evaluation results from browser actions during the task.
81
+ */
82
+ eval?: Array<unknown>;
83
+ /**
84
+ * The http requests from browser actions made during the task.
85
+ */
86
+ fetch?: Array<unknown>;
87
+ /**
88
+ * The headers received during the task.
89
+ */
90
+ headers?: {
91
+ [key: string]: string;
92
+ };
93
+ /**
94
+ * The HTML content of the page.
95
+ */
96
+ html?: string;
97
+ /**
98
+ * List of all unique URLs found on the page.
99
+ */
100
+ links?: Array<string>;
101
+ /**
102
+ * The Markdown version of the HTML content.
103
+ */
104
+ markdown?: string;
105
+ /**
106
+ * The network capture data collected during the task.
107
+ */
108
+ network_capture?: Array<Data.NetworkCapture>;
109
+ /**
110
+ * Individual HTML content of each pagination page, before merging.
111
+ */
112
+ pages_html?: Array<string>;
113
+ /**
114
+ * The parsing results extracted from the HTML & network content.
115
+ */
116
+ parsing?: Data.ParsingSuccessResult | Data.ParsingErrorResult | {
117
+ [key: string]: unknown;
118
+ };
119
+ /**
120
+ * The list of redirects that occurred during the task.
121
+ */
122
+ redirects?: Array<Data.Redirect>;
123
+ /**
124
+ * Screenshots taken during the task, from browser actions, or the screenshot
125
+ * format.
126
+ */
127
+ screenshots?: Array<unknown>;
128
+ }
129
+ namespace Data {
130
+ /**
131
+ * Browser actions execution results. Present only when browser_actions were
132
+ * specified in the request.
133
+ */
134
+ interface BrowserActions {
135
+ results: Array<BrowserActions.Result>;
136
+ success: boolean;
137
+ total_duration: number;
138
+ }
139
+ namespace BrowserActions {
140
+ interface Result {
141
+ duration: number;
142
+ name: 'goto' | 'wait' | 'wait_for_element' | 'wait_for_navigation' | 'click' | 'fill' | 'press' | 'scroll' | 'auto_scroll' | 'screenshot' | 'get_cookies' | 'eval' | 'fetch';
143
+ status: 'no-run' | 'in-progress' | 'done' | 'error' | 'skipped';
144
+ error?: string;
145
+ result?: unknown;
146
+ }
147
+ }
148
+ interface NetworkCapture {
149
+ filter: NetworkCapture.Filter;
150
+ results: Array<NetworkCapture.Result>;
151
+ errorMessage?: string;
152
+ }
153
+ namespace NetworkCapture {
154
+ interface Filter {
155
+ validation: boolean;
156
+ wait_for_requests_count: number;
157
+ method?: 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH';
158
+ /**
159
+ * Resource type for network capture filtering
160
+ */
161
+ resource_type?: 'document' | 'stylesheet' | 'image' | 'media' | 'font' | 'script' | 'texttrack' | 'xhr' | 'fetch' | 'prefetch' | 'eventsource' | 'websocket' | 'manifest' | 'signedexchange' | 'ping' | 'cspviolationreport' | 'preflight' | 'other' | 'fedcm' | Array<'document' | 'stylesheet' | 'image' | 'media' | 'font' | 'script' | 'texttrack' | 'xhr' | 'fetch' | 'prefetch' | 'eventsource' | 'websocket' | 'manifest' | 'signedexchange' | 'ping' | 'cspviolationreport' | 'preflight' | 'other' | 'fedcm'>;
162
+ status_code?: number | Array<number>;
163
+ url?: Filter.URL;
164
+ wait_for_requests_count_timeout?: number;
165
+ }
166
+ namespace Filter {
167
+ interface URL {
168
+ type: 'exact' | 'contains';
169
+ value: string;
170
+ }
171
+ }
172
+ interface Result {
173
+ request: Result.Request;
174
+ response: Result.Response;
175
+ }
176
+ namespace Result {
177
+ interface Request {
178
+ headers: {
179
+ [key: string]: string;
180
+ };
181
+ method: string;
182
+ /**
183
+ * Resource type for network capture filtering
184
+ */
185
+ resource_type: 'document' | 'stylesheet' | 'image' | 'media' | 'font' | 'script' | 'texttrack' | 'xhr' | 'fetch' | 'prefetch' | 'eventsource' | 'websocket' | 'manifest' | 'signedexchange' | 'ping' | 'cspviolationreport' | 'preflight' | 'other' | 'fedcm';
186
+ url: string;
187
+ body?: string;
188
+ }
189
+ interface Response {
190
+ body: string;
191
+ headers: {
192
+ [key: string]: string;
193
+ };
194
+ serialization: 'none' | 'base64';
195
+ status: number;
196
+ status_text: string;
197
+ }
198
+ }
199
+ }
200
+ interface ParsingSuccessResult {
201
+ entities: {
202
+ [key: string]: unknown;
203
+ };
204
+ status: 'success';
205
+ }
206
+ interface ParsingErrorResult {
207
+ error: string;
208
+ status: 'error';
209
+ }
210
+ interface Redirect {
211
+ status_code: number;
212
+ url: string;
213
+ }
214
+ }
215
+ interface Metadata {
216
+ /**
217
+ * The name of the agent used for the query.
218
+ */
219
+ agent?: string;
220
+ /**
221
+ * The driver used for the task.
222
+ */
223
+ driver?: string;
224
+ /**
225
+ * The localization identifier for the query.
226
+ */
227
+ localization_id?: string;
228
+ /**
229
+ * The duration in milliseconds of the query processing.
230
+ */
231
+ query_duration?: number;
232
+ /**
233
+ * The time when the query was received.
234
+ */
235
+ query_time?: string;
236
+ /**
237
+ * Additional response parameters.
238
+ */
239
+ response_parameters?: unknown;
240
+ /**
241
+ * A tag associated with the query.
242
+ */
243
+ tag?: string;
244
+ }
245
+ interface Debug {
246
+ /**
247
+ * Performance metrics collected during the task.
248
+ */
249
+ performance_metrics?: {
250
+ [key: string]: number;
251
+ };
252
+ /**
253
+ * Total bytes used by the proxy during the task.
254
+ */
255
+ proxy_total_bytes_usage?: number;
256
+ /**
257
+ * The transformed output after applying any transformations.
258
+ */
259
+ transformed_output?: unknown;
260
+ /**
261
+ * The userbrowser instance using during the task.
262
+ */
263
+ userbrowser?: unknown;
264
+ }
265
+ interface NextPageParams {
266
+ next_page_params: {
267
+ [key: string]: unknown;
268
+ };
269
+ }
270
+ interface UnionMember1 {
271
+ next_page_params: {
272
+ [key: string]: unknown;
273
+ };
274
+ }
275
+ }
276
+ /**
277
+ * Response when an async SERP task is created successfully.
278
+ */
279
+ export interface SerpRunAsyncResponse {
280
+ /**
281
+ * Status indicating the async SERP task was created successfully.
282
+ */
283
+ status: 'success';
284
+ /**
285
+ * The created async task details.
286
+ */
287
+ task: SerpRunAsyncResponse.Task;
288
+ }
289
+ export declare namespace SerpRunAsyncResponse {
290
+ /**
291
+ * The created async task details.
292
+ */
293
+ interface Task {
294
+ /**
295
+ * Unique task identifier.
296
+ */
297
+ id: string;
298
+ _query: unknown;
299
+ /**
300
+ * Timestamp when the task was created.
301
+ */
302
+ created_at: string;
303
+ /**
304
+ * Original input data for the task.
305
+ */
306
+ input: unknown;
307
+ /**
308
+ * Current state of the task.
309
+ */
310
+ state: 'pending' | 'success' | 'error';
311
+ /**
312
+ * URL for checking the task status.
313
+ */
314
+ status_url: string;
315
+ /**
316
+ * Account name that owns the task.
317
+ */
318
+ account_name?: string;
319
+ api_type?: 'web' | 'serp' | 'ecommerce' | 'social' | 'media' | 'agent' | 'extract' | 'fast-serp';
320
+ /**
321
+ * Batch ID if this task is part of a batch.
322
+ */
323
+ batch_id?: string;
324
+ /**
325
+ * URL for downloading the task results.
326
+ */
327
+ download_url?: string;
328
+ /**
329
+ * Error message if the task failed.
330
+ */
331
+ error?: string;
332
+ /**
333
+ * Classification of the error type.
334
+ */
335
+ error_type?: string;
336
+ /**
337
+ * Timestamp when the task was last modified.
338
+ */
339
+ modified_at?: string;
340
+ /**
341
+ * Storage location of the output data.
342
+ */
343
+ output_url?: string;
344
+ /**
345
+ * HTTP status code from the task execution.
346
+ */
347
+ status_code?: number;
348
+ }
349
+ }
350
+ /**
351
+ * Response when a batch of SERP tasks is created successfully.
352
+ */
353
+ export interface SerpRunBatchResponse {
354
+ /**
355
+ * Unique identifier for the batch.
356
+ */
357
+ batch_id: string;
358
+ /**
359
+ * Number of tasks in the batch.
360
+ */
361
+ batch_size: number;
362
+ /**
363
+ * List of created tasks.
364
+ */
365
+ tasks: Array<SerpRunBatchResponse.Task>;
366
+ }
367
+ export declare namespace SerpRunBatchResponse {
368
+ interface Task {
369
+ /**
370
+ * Unique task identifier.
371
+ */
372
+ id: string;
373
+ _query: unknown;
374
+ /**
375
+ * Timestamp when the task was created.
376
+ */
377
+ created_at: string;
378
+ /**
379
+ * Original input data for the task.
380
+ */
381
+ input: unknown;
382
+ /**
383
+ * Current state of the task.
384
+ */
385
+ state: 'pending' | 'success' | 'error';
386
+ /**
387
+ * URL for checking the task status.
388
+ */
389
+ status_url: string;
390
+ /**
391
+ * Account name that owns the task.
392
+ */
393
+ account_name?: string;
394
+ api_type?: 'web' | 'serp' | 'ecommerce' | 'social' | 'media' | 'agent' | 'extract' | 'fast-serp';
395
+ /**
396
+ * Batch ID if this task is part of a batch.
397
+ */
398
+ batch_id?: string;
399
+ /**
400
+ * URL for downloading the task results.
401
+ */
402
+ download_url?: string;
403
+ /**
404
+ * Error message if the task failed.
405
+ */
406
+ error?: string;
407
+ /**
408
+ * Classification of the error type.
409
+ */
410
+ error_type?: string;
411
+ /**
412
+ * Timestamp when the task was last modified.
413
+ */
414
+ modified_at?: string;
415
+ /**
416
+ * Storage location of the output data.
417
+ */
418
+ output_url?: string;
419
+ /**
420
+ * HTTP status code from the task execution.
421
+ */
422
+ status_code?: number;
423
+ }
424
+ }
425
+ export interface SerpRunParams {
426
+ /**
427
+ * The search engine to query.
428
+ */
429
+ search_engine: 'google_search' | 'google_sge' | 'google_aio' | 'google_maps_search' | 'google_maps_reviews' | 'google_maps_place' | 'google_news' | 'google_images' | 'bing_search' | 'yandex_search';
430
+ /**
431
+ * ISO Alpha-2 country code used to access the target search engine (e.g. US, DE,
432
+ * GB).
433
+ */
434
+ country?: string;
435
+ /**
436
+ * Device type used for the search request.
437
+ */
438
+ device?: 'desktop' | 'mobile';
439
+ /**
440
+ * Top-level domain for the search engine (e.g. "com", "co.uk", "de").
441
+ */
442
+ domain?: string;
443
+ /**
444
+ * Locale used for the search request.
445
+ */
446
+ locale?: string;
447
+ /**
448
+ * Geo-location for the search (canonical Google location name).
449
+ */
450
+ location?: string;
451
+ /**
452
+ * Number of results to return (1–100).
453
+ */
454
+ num_results?: number;
455
+ /**
456
+ * The result page number for pagination.
457
+ */
458
+ page?: number;
459
+ /**
460
+ * When true, the SERP response is parsed into structured JSON.
461
+ */
462
+ parse?: boolean;
463
+ /**
464
+ * The search keyword or phrase to query.
465
+ */
466
+ query?: string;
467
+ /**
468
+ * Whether to render the page in a browser before extracting.
469
+ */
470
+ render?: boolean;
471
+ /**
472
+ * When true, disables Google result filtering (filter=0) so omitted/duplicate and
473
+ * highly similar pages are also returned. Applies to Google search engines.
474
+ */
475
+ show_hidden_results?: boolean;
476
+ }
477
+ export interface SerpRunAsyncParams {
478
+ /**
479
+ * The search engine to query.
480
+ */
481
+ search_engine: 'google_search' | 'google_sge' | 'google_aio' | 'google_maps_search' | 'google_maps_reviews' | 'google_maps_place' | 'google_news' | 'google_images' | 'bing_search' | 'yandex_search';
482
+ /**
483
+ * URL to call back when async operation completes
484
+ */
485
+ callback_url?: string;
486
+ /**
487
+ * ISO Alpha-2 country code used to access the target search engine (e.g. US, DE,
488
+ * GB).
489
+ */
490
+ country?: string;
491
+ /**
492
+ * Device type used for the search request.
493
+ */
494
+ device?: 'desktop' | 'mobile';
495
+ /**
496
+ * Top-level domain for the search engine (e.g. "com", "co.uk", "de").
497
+ */
498
+ domain?: string;
499
+ /**
500
+ * Locale used for the search request.
501
+ */
502
+ locale?: string;
503
+ /**
504
+ * Geo-location for the search (canonical Google location name).
505
+ */
506
+ location?: string;
507
+ /**
508
+ * Number of results to return (1–100).
509
+ */
510
+ num_results?: number;
511
+ /**
512
+ * The result page number for pagination.
513
+ */
514
+ page?: number;
515
+ /**
516
+ * When true, the SERP response is parsed into structured JSON.
517
+ */
518
+ parse?: boolean;
519
+ /**
520
+ * The search keyword or phrase to query.
521
+ */
522
+ query?: string;
523
+ /**
524
+ * Whether to render the page in a browser before extracting.
525
+ */
526
+ render?: boolean;
527
+ /**
528
+ * When true, disables Google result filtering (filter=0) so omitted/duplicate and
529
+ * highly similar pages are also returned. Applies to Google search engines.
530
+ */
531
+ show_hidden_results?: boolean;
532
+ /**
533
+ * Whether to compress stored data
534
+ */
535
+ storage_compress?: boolean;
536
+ /**
537
+ * Custom name for the stored object
538
+ */
539
+ storage_object_name?: string;
540
+ /**
541
+ * Type of storage to use for results
542
+ */
543
+ storage_type?: string;
544
+ /**
545
+ * URL for storage location
546
+ */
547
+ storage_url?: string;
548
+ }
549
+ export interface SerpRunBatchParams {
550
+ /**
551
+ * Array of SERP requests. Each object can include search parameters and
552
+ * async/storage settings.
553
+ */
554
+ inputs: Array<SerpRunBatchParams.Input>;
555
+ /**
556
+ * Shared parameters applied to the entire batch. Can include search parameters and
557
+ * async/storage settings.
558
+ */
559
+ shared_inputs?: SerpRunBatchParams.SharedInputs;
560
+ }
561
+ export declare namespace SerpRunBatchParams {
562
+ interface Input {
563
+ /**
564
+ * URL to call back when async operation completes
565
+ */
566
+ callback_url?: string;
567
+ /**
568
+ * ISO Alpha-2 country code used to access the target search engine (e.g. US, DE,
569
+ * GB).
570
+ */
571
+ country?: string;
572
+ /**
573
+ * Device type used for the search request.
574
+ */
575
+ device?: 'desktop' | 'mobile';
576
+ /**
577
+ * Top-level domain for the search engine (e.g. "com", "co.uk", "de").
578
+ */
579
+ domain?: string;
580
+ /**
581
+ * Locale used for the search request.
582
+ */
583
+ locale?: string;
584
+ /**
585
+ * Geo-location for the search (canonical Google location name).
586
+ */
587
+ location?: string;
588
+ /**
589
+ * Number of results to return (1–100).
590
+ */
591
+ num_results?: number;
592
+ /**
593
+ * The result page number for pagination.
594
+ */
595
+ page?: number;
596
+ /**
597
+ * When true, the SERP response is parsed into structured JSON.
598
+ */
599
+ parse?: boolean;
600
+ /**
601
+ * The search keyword or phrase to query.
602
+ */
603
+ query?: string;
604
+ /**
605
+ * Whether to render the page in a browser before extracting.
606
+ */
607
+ render?: boolean;
608
+ /**
609
+ * The search engine to query.
610
+ */
611
+ search_engine?: 'google_search' | 'google_sge' | 'google_aio' | 'google_maps_search' | 'google_maps_reviews' | 'google_maps_place' | 'google_news' | 'google_images' | 'bing_search' | 'yandex_search';
612
+ /**
613
+ * When true, disables Google result filtering (filter=0) so omitted/duplicate and
614
+ * highly similar pages are also returned. Applies to Google search engines.
615
+ */
616
+ show_hidden_results?: boolean;
617
+ /**
618
+ * Whether to compress stored data
619
+ */
620
+ storage_compress?: boolean;
621
+ /**
622
+ * Custom name for the stored object
623
+ */
624
+ storage_object_name?: string;
625
+ /**
626
+ * Type of storage to use for results
627
+ */
628
+ storage_type?: string;
629
+ /**
630
+ * URL for storage location
631
+ */
632
+ storage_url?: string;
633
+ }
634
+ /**
635
+ * Shared parameters applied to the entire batch. Can include search parameters and
636
+ * async/storage settings.
637
+ */
638
+ interface SharedInputs {
639
+ /**
640
+ * URL to call back when async operation completes
641
+ */
642
+ callback_url?: string;
643
+ /**
644
+ * ISO Alpha-2 country code used to access the target search engine (e.g. US, DE,
645
+ * GB).
646
+ */
647
+ country?: string;
648
+ /**
649
+ * Device type used for the search request.
650
+ */
651
+ device?: 'desktop' | 'mobile';
652
+ /**
653
+ * Top-level domain for the search engine (e.g. "com", "co.uk", "de").
654
+ */
655
+ domain?: string;
656
+ /**
657
+ * Locale used for the search request.
658
+ */
659
+ locale?: string;
660
+ /**
661
+ * Geo-location for the search (canonical Google location name).
662
+ */
663
+ location?: string;
664
+ /**
665
+ * Number of results to return (1–100).
666
+ */
667
+ num_results?: number;
668
+ /**
669
+ * The result page number for pagination.
670
+ */
671
+ page?: number;
672
+ /**
673
+ * When true, the SERP response is parsed into structured JSON.
674
+ */
675
+ parse?: boolean;
676
+ /**
677
+ * The search keyword or phrase to query.
678
+ */
679
+ query?: string;
680
+ /**
681
+ * Whether to render the page in a browser before extracting.
682
+ */
683
+ render?: boolean;
684
+ /**
685
+ * The search engine to query.
686
+ */
687
+ search_engine?: 'google_search' | 'google_sge' | 'google_aio' | 'google_maps_search' | 'google_maps_reviews' | 'google_maps_place' | 'google_news' | 'google_images' | 'bing_search' | 'yandex_search';
688
+ /**
689
+ * When true, disables Google result filtering (filter=0) so omitted/duplicate and
690
+ * highly similar pages are also returned. Applies to Google search engines.
691
+ */
692
+ show_hidden_results?: boolean;
693
+ /**
694
+ * Whether to compress stored data
695
+ */
696
+ storage_compress?: boolean;
697
+ /**
698
+ * Custom name for the stored object
699
+ */
700
+ storage_object_name?: string;
701
+ /**
702
+ * Type of storage to use for results
703
+ */
704
+ storage_type?: string;
705
+ /**
706
+ * URL for storage location
707
+ */
708
+ storage_url?: string;
709
+ }
710
+ }
711
+ export declare namespace Serp {
712
+ export { type SerpRunResponse as SerpRunResponse, type SerpRunAsyncResponse as SerpRunAsyncResponse, type SerpRunBatchResponse as SerpRunBatchResponse, type SerpRunParams as SerpRunParams, type SerpRunAsyncParams as SerpRunAsyncParams, type SerpRunBatchParams as SerpRunBatchParams, };
713
+ }
714
+ //# sourceMappingURL=serp.d.mts.map