alterlab-mcp-server 1.8.0 → 1.9.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 (68) hide show
  1. package/README.md +68 -26
  2. package/dist/client.d.ts +2 -1
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +7 -4
  5. package/dist/client.js.map +1 -1
  6. package/dist/errors.js +2 -2
  7. package/dist/errors.js.map +1 -1
  8. package/dist/format.d.ts +5 -1
  9. package/dist/format.d.ts.map +1 -1
  10. package/dist/format.js +48 -0
  11. package/dist/format.js.map +1 -1
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +3 -1
  14. package/dist/index.js.map +1 -1
  15. package/dist/tools/batch.d.ts +1213 -17
  16. package/dist/tools/batch.d.ts.map +1 -1
  17. package/dist/tools/batch.js +121 -33
  18. package/dist/tools/batch.js.map +1 -1
  19. package/dist/tools/common.d.ts +313 -0
  20. package/dist/tools/common.d.ts.map +1 -0
  21. package/dist/tools/common.js +336 -0
  22. package/dist/tools/common.js.map +1 -0
  23. package/dist/tools/crawl.d.ts +135 -18
  24. package/dist/tools/crawl.d.ts.map +1 -1
  25. package/dist/tools/crawl.js +141 -56
  26. package/dist/tools/crawl.js.map +1 -1
  27. package/dist/tools/estimate.d.ts +20 -5
  28. package/dist/tools/estimate.d.ts.map +1 -1
  29. package/dist/tools/estimate.js +25 -34
  30. package/dist/tools/estimate.js.map +1 -1
  31. package/dist/tools/extract.d.ts +4 -4
  32. package/dist/tools/extract.d.ts.map +1 -1
  33. package/dist/tools/extract.js +2 -0
  34. package/dist/tools/extract.js.map +1 -1
  35. package/dist/tools/job.d.ts +13 -0
  36. package/dist/tools/job.d.ts.map +1 -0
  37. package/dist/tools/job.js +62 -0
  38. package/dist/tools/job.js.map +1 -0
  39. package/dist/tools/map.d.ts.map +1 -1
  40. package/dist/tools/map.js +4 -1
  41. package/dist/tools/map.js.map +1 -1
  42. package/dist/tools/scrape.d.ts +362 -59
  43. package/dist/tools/scrape.d.ts.map +1 -1
  44. package/dist/tools/scrape.js +176 -215
  45. package/dist/tools/scrape.js.map +1 -1
  46. package/dist/tools/screenshot.d.ts +33 -0
  47. package/dist/tools/screenshot.d.ts.map +1 -1
  48. package/dist/tools/screenshot.js +46 -5
  49. package/dist/tools/screenshot.js.map +1 -1
  50. package/dist/tools/search.d.ts +8 -5
  51. package/dist/tools/search.d.ts.map +1 -1
  52. package/dist/tools/search.js +13 -5
  53. package/dist/tools/search.js.map +1 -1
  54. package/dist/tools/sessions.d.ts +180 -12
  55. package/dist/tools/sessions.d.ts.map +1 -1
  56. package/dist/tools/sessions.js +75 -21
  57. package/dist/tools/sessions.js.map +1 -1
  58. package/dist/tools/simple_batch.d.ts +3 -3
  59. package/dist/tools/simple_batch.d.ts.map +1 -1
  60. package/dist/tools/simple_batch.js +5 -4
  61. package/dist/tools/simple_batch.js.map +1 -1
  62. package/dist/tools/usage.js +9 -18
  63. package/dist/tools/usage.js.map +1 -1
  64. package/dist/types.d.ts +170 -52
  65. package/dist/types.d.ts.map +1 -1
  66. package/dist/types.js.map +1 -1
  67. package/package.json +5 -3
  68. package/server.json +9 -5
@@ -1,67 +1,1263 @@
1
1
  import { z } from "zod";
2
2
  import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
3
3
  import type { AlterLabClient } from "../client.js";
4
+ import type { BatchItemRequest } from "../types.js";
5
+ export declare const batchItemSchema: z.ZodObject<{
6
+ url: z.ZodString;
7
+ mode: z.ZodOptional<z.ZodEnum<["auto", "html", "js", "pdf", "ocr"]>>;
8
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
9
+ body: z.ZodOptional<z.ZodString>;
10
+ content_type: z.ZodOptional<z.ZodEnum<["application/json", "application/x-www-form-urlencoded", "text/plain", "application/graphql"]>>;
11
+ formats: z.ZodOptional<z.ZodArray<z.ZodEnum<["text", "json", "json_v2", "html", "markdown", "rag", "content", "raw"]>, "many">>;
12
+ extraction_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
13
+ extraction_prompt: z.ZodOptional<z.ZodString>;
14
+ extraction_provider: z.ZodOptional<z.ZodEnum<["openai", "anthropic", "openrouter", "groq"]>>;
15
+ extraction_profile: z.ZodOptional<z.ZodEnum<["auto", "product", "article", "job_posting", "faq", "recipe", "event", "ecommerce_homepage", "directory_listing"]>>;
16
+ extraction_template: z.ZodOptional<z.ZodEnum<["auto", "product", "article", "job_posting", "faq", "recipe", "event", "ecommerce_homepage", "directory_listing"]>>;
17
+ advanced: z.ZodOptional<z.ZodObject<{
18
+ screenshot: z.ZodOptional<z.ZodBoolean>;
19
+ markdown: z.ZodOptional<z.ZodBoolean>;
20
+ render_js: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"auto">]>>;
21
+ use_proxy: z.ZodOptional<z.ZodBoolean>;
22
+ use_own_proxy: z.ZodOptional<z.ZodBoolean>;
23
+ use_system_proxy: z.ZodOptional<z.ZodBoolean>;
24
+ proxy_integration_id: z.ZodOptional<z.ZodString>;
25
+ proxy_country: z.ZodOptional<z.ZodString>;
26
+ wait_condition: z.ZodOptional<z.ZodString>;
27
+ remove_cookie_banners: z.ZodOptional<z.ZodBoolean>;
28
+ include_iframes: z.ZodOptional<z.ZodBoolean>;
29
+ flatten_shadow_dom: z.ZodOptional<z.ZodBoolean>;
30
+ skip_tls_verification: z.ZodOptional<z.ZodBoolean>;
31
+ block_images: z.ZodOptional<z.ZodBoolean>;
32
+ scroll_to_load: z.ZodOptional<z.ZodBoolean>;
33
+ scroll_count: z.ZodOptional<z.ZodNumber>;
34
+ generate_pdf: z.ZodOptional<z.ZodBoolean>;
35
+ ocr: z.ZodOptional<z.ZodBoolean>;
36
+ section_filter: z.ZodOptional<z.ZodObject<{
37
+ min_content_blocks: z.ZodOptional<z.ZodNumber>;
38
+ exclude_content_types: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
39
+ content_only: z.ZodOptional<z.ZodBoolean>;
40
+ }, "strip", z.ZodTypeAny, {
41
+ min_content_blocks?: number | undefined;
42
+ exclude_content_types?: string[] | undefined;
43
+ content_only?: boolean | undefined;
44
+ }, {
45
+ min_content_blocks?: number | undefined;
46
+ exclude_content_types?: string[] | undefined;
47
+ content_only?: boolean | undefined;
48
+ }>>;
49
+ session_id: z.ZodOptional<z.ZodString>;
50
+ cookies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
51
+ session_headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
52
+ sticky_session: z.ZodOptional<z.ZodString>;
53
+ sticky_session_ttl: z.ZodOptional<z.ZodNumber>;
54
+ actions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
55
+ type: z.ZodLiteral<"wait">;
56
+ milliseconds: z.ZodOptional<z.ZodNumber>;
57
+ selector: z.ZodOptional<z.ZodString>;
58
+ }, "strip", z.ZodTypeAny, {
59
+ type: "wait";
60
+ milliseconds?: number | undefined;
61
+ selector?: string | undefined;
62
+ }, {
63
+ type: "wait";
64
+ milliseconds?: number | undefined;
65
+ selector?: string | undefined;
66
+ }>, z.ZodObject<{
67
+ type: z.ZodLiteral<"wait_for">;
68
+ selector: z.ZodString;
69
+ timeout: z.ZodOptional<z.ZodNumber>;
70
+ }, "strip", z.ZodTypeAny, {
71
+ type: "wait_for";
72
+ selector: string;
73
+ timeout?: number | undefined;
74
+ }, {
75
+ type: "wait_for";
76
+ selector: string;
77
+ timeout?: number | undefined;
78
+ }>, z.ZodObject<{
79
+ type: z.ZodLiteral<"click">;
80
+ selector: z.ZodString;
81
+ }, "strip", z.ZodTypeAny, {
82
+ type: "click";
83
+ selector: string;
84
+ }, {
85
+ type: "click";
86
+ selector: string;
87
+ }>, z.ZodObject<{
88
+ type: z.ZodLiteral<"fill">;
89
+ selector: z.ZodString;
90
+ value: z.ZodString;
91
+ }, "strip", z.ZodTypeAny, {
92
+ type: "fill";
93
+ value: string;
94
+ selector: string;
95
+ }, {
96
+ type: "fill";
97
+ value: string;
98
+ selector: string;
99
+ }>, z.ZodObject<{
100
+ type: z.ZodLiteral<"press">;
101
+ key: z.ZodString;
102
+ }, "strip", z.ZodTypeAny, {
103
+ type: "press";
104
+ key: string;
105
+ }, {
106
+ type: "press";
107
+ key: string;
108
+ }>, z.ZodObject<{
109
+ type: z.ZodLiteral<"scroll">;
110
+ direction: z.ZodOptional<z.ZodEnum<["down", "up"]>>;
111
+ amount: z.ZodOptional<z.ZodNumber>;
112
+ }, "strip", z.ZodTypeAny, {
113
+ type: "scroll";
114
+ direction?: "down" | "up" | undefined;
115
+ amount?: number | undefined;
116
+ }, {
117
+ type: "scroll";
118
+ direction?: "down" | "up" | undefined;
119
+ amount?: number | undefined;
120
+ }>, z.ZodObject<{
121
+ type: z.ZodLiteral<"infinite_scroll">;
122
+ max_scrolls: z.ZodOptional<z.ZodNumber>;
123
+ delay: z.ZodOptional<z.ZodNumber>;
124
+ end_selector: z.ZodOptional<z.ZodString>;
125
+ }, "strip", z.ZodTypeAny, {
126
+ type: "infinite_scroll";
127
+ max_scrolls?: number | undefined;
128
+ delay?: number | undefined;
129
+ end_selector?: string | undefined;
130
+ }, {
131
+ type: "infinite_scroll";
132
+ max_scrolls?: number | undefined;
133
+ delay?: number | undefined;
134
+ end_selector?: string | undefined;
135
+ }>, z.ZodObject<{
136
+ type: z.ZodLiteral<"screenshot">;
137
+ full_page: z.ZodOptional<z.ZodBoolean>;
138
+ }, "strip", z.ZodTypeAny, {
139
+ type: "screenshot";
140
+ full_page?: boolean | undefined;
141
+ }, {
142
+ type: "screenshot";
143
+ full_page?: boolean | undefined;
144
+ }>, z.ZodObject<{
145
+ type: z.ZodLiteral<"evaluate">;
146
+ script: z.ZodString;
147
+ }, "strip", z.ZodTypeAny, {
148
+ type: "evaluate";
149
+ script: string;
150
+ }, {
151
+ type: "evaluate";
152
+ script: string;
153
+ }>]>, "many">>;
154
+ }, "strip", z.ZodTypeAny, {
155
+ markdown?: boolean | undefined;
156
+ ocr?: boolean | undefined;
157
+ screenshot?: boolean | undefined;
158
+ render_js?: boolean | "auto" | undefined;
159
+ use_proxy?: boolean | undefined;
160
+ use_own_proxy?: boolean | undefined;
161
+ use_system_proxy?: boolean | undefined;
162
+ proxy_integration_id?: string | undefined;
163
+ proxy_country?: string | undefined;
164
+ wait_condition?: string | undefined;
165
+ remove_cookie_banners?: boolean | undefined;
166
+ include_iframes?: boolean | undefined;
167
+ flatten_shadow_dom?: boolean | undefined;
168
+ skip_tls_verification?: boolean | undefined;
169
+ block_images?: boolean | undefined;
170
+ scroll_to_load?: boolean | undefined;
171
+ scroll_count?: number | undefined;
172
+ generate_pdf?: boolean | undefined;
173
+ section_filter?: {
174
+ min_content_blocks?: number | undefined;
175
+ exclude_content_types?: string[] | undefined;
176
+ content_only?: boolean | undefined;
177
+ } | undefined;
178
+ session_id?: string | undefined;
179
+ cookies?: Record<string, string> | undefined;
180
+ session_headers?: Record<string, string> | undefined;
181
+ sticky_session?: string | undefined;
182
+ sticky_session_ttl?: number | undefined;
183
+ actions?: ({
184
+ type: "wait";
185
+ milliseconds?: number | undefined;
186
+ selector?: string | undefined;
187
+ } | {
188
+ type: "wait_for";
189
+ selector: string;
190
+ timeout?: number | undefined;
191
+ } | {
192
+ type: "click";
193
+ selector: string;
194
+ } | {
195
+ type: "fill";
196
+ value: string;
197
+ selector: string;
198
+ } | {
199
+ type: "press";
200
+ key: string;
201
+ } | {
202
+ type: "scroll";
203
+ direction?: "down" | "up" | undefined;
204
+ amount?: number | undefined;
205
+ } | {
206
+ type: "infinite_scroll";
207
+ max_scrolls?: number | undefined;
208
+ delay?: number | undefined;
209
+ end_selector?: string | undefined;
210
+ } | {
211
+ type: "screenshot";
212
+ full_page?: boolean | undefined;
213
+ } | {
214
+ type: "evaluate";
215
+ script: string;
216
+ })[] | undefined;
217
+ }, {
218
+ markdown?: boolean | undefined;
219
+ ocr?: boolean | undefined;
220
+ screenshot?: boolean | undefined;
221
+ render_js?: boolean | "auto" | undefined;
222
+ use_proxy?: boolean | undefined;
223
+ use_own_proxy?: boolean | undefined;
224
+ use_system_proxy?: boolean | undefined;
225
+ proxy_integration_id?: string | undefined;
226
+ proxy_country?: string | undefined;
227
+ wait_condition?: string | undefined;
228
+ remove_cookie_banners?: boolean | undefined;
229
+ include_iframes?: boolean | undefined;
230
+ flatten_shadow_dom?: boolean | undefined;
231
+ skip_tls_verification?: boolean | undefined;
232
+ block_images?: boolean | undefined;
233
+ scroll_to_load?: boolean | undefined;
234
+ scroll_count?: number | undefined;
235
+ generate_pdf?: boolean | undefined;
236
+ section_filter?: {
237
+ min_content_blocks?: number | undefined;
238
+ exclude_content_types?: string[] | undefined;
239
+ content_only?: boolean | undefined;
240
+ } | undefined;
241
+ session_id?: string | undefined;
242
+ cookies?: Record<string, string> | undefined;
243
+ session_headers?: Record<string, string> | undefined;
244
+ sticky_session?: string | undefined;
245
+ sticky_session_ttl?: number | undefined;
246
+ actions?: ({
247
+ type: "wait";
248
+ milliseconds?: number | undefined;
249
+ selector?: string | undefined;
250
+ } | {
251
+ type: "wait_for";
252
+ selector: string;
253
+ timeout?: number | undefined;
254
+ } | {
255
+ type: "click";
256
+ selector: string;
257
+ } | {
258
+ type: "fill";
259
+ value: string;
260
+ selector: string;
261
+ } | {
262
+ type: "press";
263
+ key: string;
264
+ } | {
265
+ type: "scroll";
266
+ direction?: "down" | "up" | undefined;
267
+ amount?: number | undefined;
268
+ } | {
269
+ type: "infinite_scroll";
270
+ max_scrolls?: number | undefined;
271
+ delay?: number | undefined;
272
+ end_selector?: string | undefined;
273
+ } | {
274
+ type: "screenshot";
275
+ full_page?: boolean | undefined;
276
+ } | {
277
+ type: "evaluate";
278
+ script: string;
279
+ })[] | undefined;
280
+ }>>;
281
+ location: z.ZodOptional<z.ZodObject<{
282
+ country: z.ZodOptional<z.ZodString>;
283
+ language: z.ZodOptional<z.ZodString>;
284
+ }, "strip", z.ZodTypeAny, {
285
+ country?: string | undefined;
286
+ language?: string | undefined;
287
+ }, {
288
+ country?: string | undefined;
289
+ language?: string | undefined;
290
+ }>>;
291
+ cost_controls: z.ZodOptional<z.ZodObject<{
292
+ force_tier: z.ZodOptional<z.ZodEnum<["1", "2", "3", "3.5", "4"]>>;
293
+ max_tier: z.ZodOptional<z.ZodEnum<["1", "2", "3", "3.5", "4"]>>;
294
+ max_credits: z.ZodOptional<z.ZodNumber>;
295
+ prefer_cost: z.ZodOptional<z.ZodBoolean>;
296
+ prefer_speed: z.ZodOptional<z.ZodBoolean>;
297
+ fail_fast: z.ZodOptional<z.ZodBoolean>;
298
+ time_budget: z.ZodOptional<z.ZodNumber>;
299
+ }, "strip", z.ZodTypeAny, {
300
+ force_tier?: "1" | "2" | "3" | "3.5" | "4" | undefined;
301
+ max_tier?: "1" | "2" | "3" | "3.5" | "4" | undefined;
302
+ max_credits?: number | undefined;
303
+ prefer_cost?: boolean | undefined;
304
+ prefer_speed?: boolean | undefined;
305
+ fail_fast?: boolean | undefined;
306
+ time_budget?: number | undefined;
307
+ }, {
308
+ force_tier?: "1" | "2" | "3" | "3.5" | "4" | undefined;
309
+ max_tier?: "1" | "2" | "3" | "3.5" | "4" | undefined;
310
+ max_credits?: number | undefined;
311
+ prefer_cost?: boolean | undefined;
312
+ prefer_speed?: boolean | undefined;
313
+ fail_fast?: boolean | undefined;
314
+ time_budget?: number | undefined;
315
+ }>>;
316
+ render_js: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"auto">]>>;
317
+ use_proxy: z.ZodOptional<z.ZodBoolean>;
318
+ timeout: z.ZodOptional<z.ZodNumber>;
319
+ wait_for: z.ZodOptional<z.ZodString>;
320
+ cache: z.ZodOptional<z.ZodBoolean>;
321
+ include_raw_html: z.ZodOptional<z.ZodBoolean>;
322
+ }, "strip", z.ZodTypeAny, {
323
+ url: string;
324
+ mode?: "auto" | "html" | "js" | "pdf" | "ocr" | undefined;
325
+ method?: "POST" | "GET" | undefined;
326
+ timeout?: number | undefined;
327
+ wait_for?: string | undefined;
328
+ body?: string | undefined;
329
+ content_type?: "application/json" | "application/x-www-form-urlencoded" | "text/plain" | "application/graphql" | undefined;
330
+ formats?: ("content" | "text" | "json" | "json_v2" | "html" | "markdown" | "rag" | "raw")[] | undefined;
331
+ extraction_schema?: Record<string, unknown> | undefined;
332
+ extraction_provider?: "openai" | "anthropic" | "openrouter" | "groq" | undefined;
333
+ extraction_prompt?: string | undefined;
334
+ extraction_profile?: "auto" | "product" | "article" | "job_posting" | "faq" | "recipe" | "event" | "ecommerce_homepage" | "directory_listing" | undefined;
335
+ extraction_template?: "auto" | "product" | "article" | "job_posting" | "faq" | "recipe" | "event" | "ecommerce_homepage" | "directory_listing" | undefined;
336
+ cache?: boolean | undefined;
337
+ include_raw_html?: boolean | undefined;
338
+ location?: {
339
+ country?: string | undefined;
340
+ language?: string | undefined;
341
+ } | undefined;
342
+ cost_controls?: {
343
+ force_tier?: "1" | "2" | "3" | "3.5" | "4" | undefined;
344
+ max_tier?: "1" | "2" | "3" | "3.5" | "4" | undefined;
345
+ max_credits?: number | undefined;
346
+ prefer_cost?: boolean | undefined;
347
+ prefer_speed?: boolean | undefined;
348
+ fail_fast?: boolean | undefined;
349
+ time_budget?: number | undefined;
350
+ } | undefined;
351
+ render_js?: boolean | "auto" | undefined;
352
+ use_proxy?: boolean | undefined;
353
+ advanced?: {
354
+ markdown?: boolean | undefined;
355
+ ocr?: boolean | undefined;
356
+ screenshot?: boolean | undefined;
357
+ render_js?: boolean | "auto" | undefined;
358
+ use_proxy?: boolean | undefined;
359
+ use_own_proxy?: boolean | undefined;
360
+ use_system_proxy?: boolean | undefined;
361
+ proxy_integration_id?: string | undefined;
362
+ proxy_country?: string | undefined;
363
+ wait_condition?: string | undefined;
364
+ remove_cookie_banners?: boolean | undefined;
365
+ include_iframes?: boolean | undefined;
366
+ flatten_shadow_dom?: boolean | undefined;
367
+ skip_tls_verification?: boolean | undefined;
368
+ block_images?: boolean | undefined;
369
+ scroll_to_load?: boolean | undefined;
370
+ scroll_count?: number | undefined;
371
+ generate_pdf?: boolean | undefined;
372
+ section_filter?: {
373
+ min_content_blocks?: number | undefined;
374
+ exclude_content_types?: string[] | undefined;
375
+ content_only?: boolean | undefined;
376
+ } | undefined;
377
+ session_id?: string | undefined;
378
+ cookies?: Record<string, string> | undefined;
379
+ session_headers?: Record<string, string> | undefined;
380
+ sticky_session?: string | undefined;
381
+ sticky_session_ttl?: number | undefined;
382
+ actions?: ({
383
+ type: "wait";
384
+ milliseconds?: number | undefined;
385
+ selector?: string | undefined;
386
+ } | {
387
+ type: "wait_for";
388
+ selector: string;
389
+ timeout?: number | undefined;
390
+ } | {
391
+ type: "click";
392
+ selector: string;
393
+ } | {
394
+ type: "fill";
395
+ value: string;
396
+ selector: string;
397
+ } | {
398
+ type: "press";
399
+ key: string;
400
+ } | {
401
+ type: "scroll";
402
+ direction?: "down" | "up" | undefined;
403
+ amount?: number | undefined;
404
+ } | {
405
+ type: "infinite_scroll";
406
+ max_scrolls?: number | undefined;
407
+ delay?: number | undefined;
408
+ end_selector?: string | undefined;
409
+ } | {
410
+ type: "screenshot";
411
+ full_page?: boolean | undefined;
412
+ } | {
413
+ type: "evaluate";
414
+ script: string;
415
+ })[] | undefined;
416
+ } | undefined;
417
+ }, {
418
+ url: string;
419
+ mode?: "auto" | "html" | "js" | "pdf" | "ocr" | undefined;
420
+ method?: "POST" | "GET" | undefined;
421
+ timeout?: number | undefined;
422
+ wait_for?: string | undefined;
423
+ body?: string | undefined;
424
+ content_type?: "application/json" | "application/x-www-form-urlencoded" | "text/plain" | "application/graphql" | undefined;
425
+ formats?: ("content" | "text" | "json" | "json_v2" | "html" | "markdown" | "rag" | "raw")[] | undefined;
426
+ extraction_schema?: Record<string, unknown> | undefined;
427
+ extraction_provider?: "openai" | "anthropic" | "openrouter" | "groq" | undefined;
428
+ extraction_prompt?: string | undefined;
429
+ extraction_profile?: "auto" | "product" | "article" | "job_posting" | "faq" | "recipe" | "event" | "ecommerce_homepage" | "directory_listing" | undefined;
430
+ extraction_template?: "auto" | "product" | "article" | "job_posting" | "faq" | "recipe" | "event" | "ecommerce_homepage" | "directory_listing" | undefined;
431
+ cache?: boolean | undefined;
432
+ include_raw_html?: boolean | undefined;
433
+ location?: {
434
+ country?: string | undefined;
435
+ language?: string | undefined;
436
+ } | undefined;
437
+ cost_controls?: {
438
+ force_tier?: "1" | "2" | "3" | "3.5" | "4" | undefined;
439
+ max_tier?: "1" | "2" | "3" | "3.5" | "4" | undefined;
440
+ max_credits?: number | undefined;
441
+ prefer_cost?: boolean | undefined;
442
+ prefer_speed?: boolean | undefined;
443
+ fail_fast?: boolean | undefined;
444
+ time_budget?: number | undefined;
445
+ } | undefined;
446
+ render_js?: boolean | "auto" | undefined;
447
+ use_proxy?: boolean | undefined;
448
+ advanced?: {
449
+ markdown?: boolean | undefined;
450
+ ocr?: boolean | undefined;
451
+ screenshot?: boolean | undefined;
452
+ render_js?: boolean | "auto" | undefined;
453
+ use_proxy?: boolean | undefined;
454
+ use_own_proxy?: boolean | undefined;
455
+ use_system_proxy?: boolean | undefined;
456
+ proxy_integration_id?: string | undefined;
457
+ proxy_country?: string | undefined;
458
+ wait_condition?: string | undefined;
459
+ remove_cookie_banners?: boolean | undefined;
460
+ include_iframes?: boolean | undefined;
461
+ flatten_shadow_dom?: boolean | undefined;
462
+ skip_tls_verification?: boolean | undefined;
463
+ block_images?: boolean | undefined;
464
+ scroll_to_load?: boolean | undefined;
465
+ scroll_count?: number | undefined;
466
+ generate_pdf?: boolean | undefined;
467
+ section_filter?: {
468
+ min_content_blocks?: number | undefined;
469
+ exclude_content_types?: string[] | undefined;
470
+ content_only?: boolean | undefined;
471
+ } | undefined;
472
+ session_id?: string | undefined;
473
+ cookies?: Record<string, string> | undefined;
474
+ session_headers?: Record<string, string> | undefined;
475
+ sticky_session?: string | undefined;
476
+ sticky_session_ttl?: number | undefined;
477
+ actions?: ({
478
+ type: "wait";
479
+ milliseconds?: number | undefined;
480
+ selector?: string | undefined;
481
+ } | {
482
+ type: "wait_for";
483
+ selector: string;
484
+ timeout?: number | undefined;
485
+ } | {
486
+ type: "click";
487
+ selector: string;
488
+ } | {
489
+ type: "fill";
490
+ value: string;
491
+ selector: string;
492
+ } | {
493
+ type: "press";
494
+ key: string;
495
+ } | {
496
+ type: "scroll";
497
+ direction?: "down" | "up" | undefined;
498
+ amount?: number | undefined;
499
+ } | {
500
+ type: "infinite_scroll";
501
+ max_scrolls?: number | undefined;
502
+ delay?: number | undefined;
503
+ end_selector?: string | undefined;
504
+ } | {
505
+ type: "screenshot";
506
+ full_page?: boolean | undefined;
507
+ } | {
508
+ type: "evaluate";
509
+ script: string;
510
+ })[] | undefined;
511
+ } | undefined;
512
+ }>;
4
513
  export declare const batchSchema: z.ZodObject<{
5
514
  urls: z.ZodArray<z.ZodObject<{
6
515
  url: z.ZodString;
7
- mode: z.ZodOptional<z.ZodDefault<z.ZodEnum<["auto", "html", "js", "pdf", "ocr"]>>>;
8
- formats: z.ZodOptional<z.ZodArray<z.ZodEnum<["text", "json", "json_v2", "html", "markdown", "rag"]>, "many">>;
516
+ mode: z.ZodOptional<z.ZodEnum<["auto", "html", "js", "pdf", "ocr"]>>;
517
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
518
+ body: z.ZodOptional<z.ZodString>;
519
+ content_type: z.ZodOptional<z.ZodEnum<["application/json", "application/x-www-form-urlencoded", "text/plain", "application/graphql"]>>;
520
+ formats: z.ZodOptional<z.ZodArray<z.ZodEnum<["text", "json", "json_v2", "html", "markdown", "rag", "content", "raw"]>, "many">>;
9
521
  extraction_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
10
- render_js: z.ZodOptional<z.ZodBoolean>;
522
+ extraction_prompt: z.ZodOptional<z.ZodString>;
523
+ extraction_provider: z.ZodOptional<z.ZodEnum<["openai", "anthropic", "openrouter", "groq"]>>;
524
+ extraction_profile: z.ZodOptional<z.ZodEnum<["auto", "product", "article", "job_posting", "faq", "recipe", "event", "ecommerce_homepage", "directory_listing"]>>;
525
+ extraction_template: z.ZodOptional<z.ZodEnum<["auto", "product", "article", "job_posting", "faq", "recipe", "event", "ecommerce_homepage", "directory_listing"]>>;
526
+ advanced: z.ZodOptional<z.ZodObject<{
527
+ screenshot: z.ZodOptional<z.ZodBoolean>;
528
+ markdown: z.ZodOptional<z.ZodBoolean>;
529
+ render_js: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"auto">]>>;
530
+ use_proxy: z.ZodOptional<z.ZodBoolean>;
531
+ use_own_proxy: z.ZodOptional<z.ZodBoolean>;
532
+ use_system_proxy: z.ZodOptional<z.ZodBoolean>;
533
+ proxy_integration_id: z.ZodOptional<z.ZodString>;
534
+ proxy_country: z.ZodOptional<z.ZodString>;
535
+ wait_condition: z.ZodOptional<z.ZodString>;
536
+ remove_cookie_banners: z.ZodOptional<z.ZodBoolean>;
537
+ include_iframes: z.ZodOptional<z.ZodBoolean>;
538
+ flatten_shadow_dom: z.ZodOptional<z.ZodBoolean>;
539
+ skip_tls_verification: z.ZodOptional<z.ZodBoolean>;
540
+ block_images: z.ZodOptional<z.ZodBoolean>;
541
+ scroll_to_load: z.ZodOptional<z.ZodBoolean>;
542
+ scroll_count: z.ZodOptional<z.ZodNumber>;
543
+ generate_pdf: z.ZodOptional<z.ZodBoolean>;
544
+ ocr: z.ZodOptional<z.ZodBoolean>;
545
+ section_filter: z.ZodOptional<z.ZodObject<{
546
+ min_content_blocks: z.ZodOptional<z.ZodNumber>;
547
+ exclude_content_types: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
548
+ content_only: z.ZodOptional<z.ZodBoolean>;
549
+ }, "strip", z.ZodTypeAny, {
550
+ min_content_blocks?: number | undefined;
551
+ exclude_content_types?: string[] | undefined;
552
+ content_only?: boolean | undefined;
553
+ }, {
554
+ min_content_blocks?: number | undefined;
555
+ exclude_content_types?: string[] | undefined;
556
+ content_only?: boolean | undefined;
557
+ }>>;
558
+ session_id: z.ZodOptional<z.ZodString>;
559
+ cookies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
560
+ session_headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
561
+ sticky_session: z.ZodOptional<z.ZodString>;
562
+ sticky_session_ttl: z.ZodOptional<z.ZodNumber>;
563
+ actions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
564
+ type: z.ZodLiteral<"wait">;
565
+ milliseconds: z.ZodOptional<z.ZodNumber>;
566
+ selector: z.ZodOptional<z.ZodString>;
567
+ }, "strip", z.ZodTypeAny, {
568
+ type: "wait";
569
+ milliseconds?: number | undefined;
570
+ selector?: string | undefined;
571
+ }, {
572
+ type: "wait";
573
+ milliseconds?: number | undefined;
574
+ selector?: string | undefined;
575
+ }>, z.ZodObject<{
576
+ type: z.ZodLiteral<"wait_for">;
577
+ selector: z.ZodString;
578
+ timeout: z.ZodOptional<z.ZodNumber>;
579
+ }, "strip", z.ZodTypeAny, {
580
+ type: "wait_for";
581
+ selector: string;
582
+ timeout?: number | undefined;
583
+ }, {
584
+ type: "wait_for";
585
+ selector: string;
586
+ timeout?: number | undefined;
587
+ }>, z.ZodObject<{
588
+ type: z.ZodLiteral<"click">;
589
+ selector: z.ZodString;
590
+ }, "strip", z.ZodTypeAny, {
591
+ type: "click";
592
+ selector: string;
593
+ }, {
594
+ type: "click";
595
+ selector: string;
596
+ }>, z.ZodObject<{
597
+ type: z.ZodLiteral<"fill">;
598
+ selector: z.ZodString;
599
+ value: z.ZodString;
600
+ }, "strip", z.ZodTypeAny, {
601
+ type: "fill";
602
+ value: string;
603
+ selector: string;
604
+ }, {
605
+ type: "fill";
606
+ value: string;
607
+ selector: string;
608
+ }>, z.ZodObject<{
609
+ type: z.ZodLiteral<"press">;
610
+ key: z.ZodString;
611
+ }, "strip", z.ZodTypeAny, {
612
+ type: "press";
613
+ key: string;
614
+ }, {
615
+ type: "press";
616
+ key: string;
617
+ }>, z.ZodObject<{
618
+ type: z.ZodLiteral<"scroll">;
619
+ direction: z.ZodOptional<z.ZodEnum<["down", "up"]>>;
620
+ amount: z.ZodOptional<z.ZodNumber>;
621
+ }, "strip", z.ZodTypeAny, {
622
+ type: "scroll";
623
+ direction?: "down" | "up" | undefined;
624
+ amount?: number | undefined;
625
+ }, {
626
+ type: "scroll";
627
+ direction?: "down" | "up" | undefined;
628
+ amount?: number | undefined;
629
+ }>, z.ZodObject<{
630
+ type: z.ZodLiteral<"infinite_scroll">;
631
+ max_scrolls: z.ZodOptional<z.ZodNumber>;
632
+ delay: z.ZodOptional<z.ZodNumber>;
633
+ end_selector: z.ZodOptional<z.ZodString>;
634
+ }, "strip", z.ZodTypeAny, {
635
+ type: "infinite_scroll";
636
+ max_scrolls?: number | undefined;
637
+ delay?: number | undefined;
638
+ end_selector?: string | undefined;
639
+ }, {
640
+ type: "infinite_scroll";
641
+ max_scrolls?: number | undefined;
642
+ delay?: number | undefined;
643
+ end_selector?: string | undefined;
644
+ }>, z.ZodObject<{
645
+ type: z.ZodLiteral<"screenshot">;
646
+ full_page: z.ZodOptional<z.ZodBoolean>;
647
+ }, "strip", z.ZodTypeAny, {
648
+ type: "screenshot";
649
+ full_page?: boolean | undefined;
650
+ }, {
651
+ type: "screenshot";
652
+ full_page?: boolean | undefined;
653
+ }>, z.ZodObject<{
654
+ type: z.ZodLiteral<"evaluate">;
655
+ script: z.ZodString;
656
+ }, "strip", z.ZodTypeAny, {
657
+ type: "evaluate";
658
+ script: string;
659
+ }, {
660
+ type: "evaluate";
661
+ script: string;
662
+ }>]>, "many">>;
663
+ }, "strip", z.ZodTypeAny, {
664
+ markdown?: boolean | undefined;
665
+ ocr?: boolean | undefined;
666
+ screenshot?: boolean | undefined;
667
+ render_js?: boolean | "auto" | undefined;
668
+ use_proxy?: boolean | undefined;
669
+ use_own_proxy?: boolean | undefined;
670
+ use_system_proxy?: boolean | undefined;
671
+ proxy_integration_id?: string | undefined;
672
+ proxy_country?: string | undefined;
673
+ wait_condition?: string | undefined;
674
+ remove_cookie_banners?: boolean | undefined;
675
+ include_iframes?: boolean | undefined;
676
+ flatten_shadow_dom?: boolean | undefined;
677
+ skip_tls_verification?: boolean | undefined;
678
+ block_images?: boolean | undefined;
679
+ scroll_to_load?: boolean | undefined;
680
+ scroll_count?: number | undefined;
681
+ generate_pdf?: boolean | undefined;
682
+ section_filter?: {
683
+ min_content_blocks?: number | undefined;
684
+ exclude_content_types?: string[] | undefined;
685
+ content_only?: boolean | undefined;
686
+ } | undefined;
687
+ session_id?: string | undefined;
688
+ cookies?: Record<string, string> | undefined;
689
+ session_headers?: Record<string, string> | undefined;
690
+ sticky_session?: string | undefined;
691
+ sticky_session_ttl?: number | undefined;
692
+ actions?: ({
693
+ type: "wait";
694
+ milliseconds?: number | undefined;
695
+ selector?: string | undefined;
696
+ } | {
697
+ type: "wait_for";
698
+ selector: string;
699
+ timeout?: number | undefined;
700
+ } | {
701
+ type: "click";
702
+ selector: string;
703
+ } | {
704
+ type: "fill";
705
+ value: string;
706
+ selector: string;
707
+ } | {
708
+ type: "press";
709
+ key: string;
710
+ } | {
711
+ type: "scroll";
712
+ direction?: "down" | "up" | undefined;
713
+ amount?: number | undefined;
714
+ } | {
715
+ type: "infinite_scroll";
716
+ max_scrolls?: number | undefined;
717
+ delay?: number | undefined;
718
+ end_selector?: string | undefined;
719
+ } | {
720
+ type: "screenshot";
721
+ full_page?: boolean | undefined;
722
+ } | {
723
+ type: "evaluate";
724
+ script: string;
725
+ })[] | undefined;
726
+ }, {
727
+ markdown?: boolean | undefined;
728
+ ocr?: boolean | undefined;
729
+ screenshot?: boolean | undefined;
730
+ render_js?: boolean | "auto" | undefined;
731
+ use_proxy?: boolean | undefined;
732
+ use_own_proxy?: boolean | undefined;
733
+ use_system_proxy?: boolean | undefined;
734
+ proxy_integration_id?: string | undefined;
735
+ proxy_country?: string | undefined;
736
+ wait_condition?: string | undefined;
737
+ remove_cookie_banners?: boolean | undefined;
738
+ include_iframes?: boolean | undefined;
739
+ flatten_shadow_dom?: boolean | undefined;
740
+ skip_tls_verification?: boolean | undefined;
741
+ block_images?: boolean | undefined;
742
+ scroll_to_load?: boolean | undefined;
743
+ scroll_count?: number | undefined;
744
+ generate_pdf?: boolean | undefined;
745
+ section_filter?: {
746
+ min_content_blocks?: number | undefined;
747
+ exclude_content_types?: string[] | undefined;
748
+ content_only?: boolean | undefined;
749
+ } | undefined;
750
+ session_id?: string | undefined;
751
+ cookies?: Record<string, string> | undefined;
752
+ session_headers?: Record<string, string> | undefined;
753
+ sticky_session?: string | undefined;
754
+ sticky_session_ttl?: number | undefined;
755
+ actions?: ({
756
+ type: "wait";
757
+ milliseconds?: number | undefined;
758
+ selector?: string | undefined;
759
+ } | {
760
+ type: "wait_for";
761
+ selector: string;
762
+ timeout?: number | undefined;
763
+ } | {
764
+ type: "click";
765
+ selector: string;
766
+ } | {
767
+ type: "fill";
768
+ value: string;
769
+ selector: string;
770
+ } | {
771
+ type: "press";
772
+ key: string;
773
+ } | {
774
+ type: "scroll";
775
+ direction?: "down" | "up" | undefined;
776
+ amount?: number | undefined;
777
+ } | {
778
+ type: "infinite_scroll";
779
+ max_scrolls?: number | undefined;
780
+ delay?: number | undefined;
781
+ end_selector?: string | undefined;
782
+ } | {
783
+ type: "screenshot";
784
+ full_page?: boolean | undefined;
785
+ } | {
786
+ type: "evaluate";
787
+ script: string;
788
+ })[] | undefined;
789
+ }>>;
790
+ location: z.ZodOptional<z.ZodObject<{
791
+ country: z.ZodOptional<z.ZodString>;
792
+ language: z.ZodOptional<z.ZodString>;
793
+ }, "strip", z.ZodTypeAny, {
794
+ country?: string | undefined;
795
+ language?: string | undefined;
796
+ }, {
797
+ country?: string | undefined;
798
+ language?: string | undefined;
799
+ }>>;
800
+ cost_controls: z.ZodOptional<z.ZodObject<{
801
+ force_tier: z.ZodOptional<z.ZodEnum<["1", "2", "3", "3.5", "4"]>>;
802
+ max_tier: z.ZodOptional<z.ZodEnum<["1", "2", "3", "3.5", "4"]>>;
803
+ max_credits: z.ZodOptional<z.ZodNumber>;
804
+ prefer_cost: z.ZodOptional<z.ZodBoolean>;
805
+ prefer_speed: z.ZodOptional<z.ZodBoolean>;
806
+ fail_fast: z.ZodOptional<z.ZodBoolean>;
807
+ time_budget: z.ZodOptional<z.ZodNumber>;
808
+ }, "strip", z.ZodTypeAny, {
809
+ force_tier?: "1" | "2" | "3" | "3.5" | "4" | undefined;
810
+ max_tier?: "1" | "2" | "3" | "3.5" | "4" | undefined;
811
+ max_credits?: number | undefined;
812
+ prefer_cost?: boolean | undefined;
813
+ prefer_speed?: boolean | undefined;
814
+ fail_fast?: boolean | undefined;
815
+ time_budget?: number | undefined;
816
+ }, {
817
+ force_tier?: "1" | "2" | "3" | "3.5" | "4" | undefined;
818
+ max_tier?: "1" | "2" | "3" | "3.5" | "4" | undefined;
819
+ max_credits?: number | undefined;
820
+ prefer_cost?: boolean | undefined;
821
+ prefer_speed?: boolean | undefined;
822
+ fail_fast?: boolean | undefined;
823
+ time_budget?: number | undefined;
824
+ }>>;
825
+ render_js: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"auto">]>>;
11
826
  use_proxy: z.ZodOptional<z.ZodBoolean>;
12
- timeout: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
827
+ timeout: z.ZodOptional<z.ZodNumber>;
13
828
  wait_for: z.ZodOptional<z.ZodString>;
14
- cache: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
829
+ cache: z.ZodOptional<z.ZodBoolean>;
830
+ include_raw_html: z.ZodOptional<z.ZodBoolean>;
15
831
  }, "strip", z.ZodTypeAny, {
16
832
  url: string;
17
833
  mode?: "auto" | "html" | "js" | "pdf" | "ocr" | undefined;
834
+ method?: "POST" | "GET" | undefined;
18
835
  timeout?: number | undefined;
19
- formats?: ("text" | "html" | "json" | "json_v2" | "markdown" | "rag")[] | undefined;
836
+ wait_for?: string | undefined;
837
+ body?: string | undefined;
838
+ content_type?: "application/json" | "application/x-www-form-urlencoded" | "text/plain" | "application/graphql" | undefined;
839
+ formats?: ("content" | "text" | "json" | "json_v2" | "html" | "markdown" | "rag" | "raw")[] | undefined;
20
840
  extraction_schema?: Record<string, unknown> | undefined;
841
+ extraction_provider?: "openai" | "anthropic" | "openrouter" | "groq" | undefined;
842
+ extraction_prompt?: string | undefined;
843
+ extraction_profile?: "auto" | "product" | "article" | "job_posting" | "faq" | "recipe" | "event" | "ecommerce_homepage" | "directory_listing" | undefined;
844
+ extraction_template?: "auto" | "product" | "article" | "job_posting" | "faq" | "recipe" | "event" | "ecommerce_homepage" | "directory_listing" | undefined;
21
845
  cache?: boolean | undefined;
22
- render_js?: boolean | undefined;
846
+ include_raw_html?: boolean | undefined;
847
+ location?: {
848
+ country?: string | undefined;
849
+ language?: string | undefined;
850
+ } | undefined;
851
+ cost_controls?: {
852
+ force_tier?: "1" | "2" | "3" | "3.5" | "4" | undefined;
853
+ max_tier?: "1" | "2" | "3" | "3.5" | "4" | undefined;
854
+ max_credits?: number | undefined;
855
+ prefer_cost?: boolean | undefined;
856
+ prefer_speed?: boolean | undefined;
857
+ fail_fast?: boolean | undefined;
858
+ time_budget?: number | undefined;
859
+ } | undefined;
860
+ render_js?: boolean | "auto" | undefined;
23
861
  use_proxy?: boolean | undefined;
24
- wait_for?: string | undefined;
862
+ advanced?: {
863
+ markdown?: boolean | undefined;
864
+ ocr?: boolean | undefined;
865
+ screenshot?: boolean | undefined;
866
+ render_js?: boolean | "auto" | undefined;
867
+ use_proxy?: boolean | undefined;
868
+ use_own_proxy?: boolean | undefined;
869
+ use_system_proxy?: boolean | undefined;
870
+ proxy_integration_id?: string | undefined;
871
+ proxy_country?: string | undefined;
872
+ wait_condition?: string | undefined;
873
+ remove_cookie_banners?: boolean | undefined;
874
+ include_iframes?: boolean | undefined;
875
+ flatten_shadow_dom?: boolean | undefined;
876
+ skip_tls_verification?: boolean | undefined;
877
+ block_images?: boolean | undefined;
878
+ scroll_to_load?: boolean | undefined;
879
+ scroll_count?: number | undefined;
880
+ generate_pdf?: boolean | undefined;
881
+ section_filter?: {
882
+ min_content_blocks?: number | undefined;
883
+ exclude_content_types?: string[] | undefined;
884
+ content_only?: boolean | undefined;
885
+ } | undefined;
886
+ session_id?: string | undefined;
887
+ cookies?: Record<string, string> | undefined;
888
+ session_headers?: Record<string, string> | undefined;
889
+ sticky_session?: string | undefined;
890
+ sticky_session_ttl?: number | undefined;
891
+ actions?: ({
892
+ type: "wait";
893
+ milliseconds?: number | undefined;
894
+ selector?: string | undefined;
895
+ } | {
896
+ type: "wait_for";
897
+ selector: string;
898
+ timeout?: number | undefined;
899
+ } | {
900
+ type: "click";
901
+ selector: string;
902
+ } | {
903
+ type: "fill";
904
+ value: string;
905
+ selector: string;
906
+ } | {
907
+ type: "press";
908
+ key: string;
909
+ } | {
910
+ type: "scroll";
911
+ direction?: "down" | "up" | undefined;
912
+ amount?: number | undefined;
913
+ } | {
914
+ type: "infinite_scroll";
915
+ max_scrolls?: number | undefined;
916
+ delay?: number | undefined;
917
+ end_selector?: string | undefined;
918
+ } | {
919
+ type: "screenshot";
920
+ full_page?: boolean | undefined;
921
+ } | {
922
+ type: "evaluate";
923
+ script: string;
924
+ })[] | undefined;
925
+ } | undefined;
25
926
  }, {
26
927
  url: string;
27
928
  mode?: "auto" | "html" | "js" | "pdf" | "ocr" | undefined;
929
+ method?: "POST" | "GET" | undefined;
28
930
  timeout?: number | undefined;
29
- formats?: ("text" | "html" | "json" | "json_v2" | "markdown" | "rag")[] | undefined;
931
+ wait_for?: string | undefined;
932
+ body?: string | undefined;
933
+ content_type?: "application/json" | "application/x-www-form-urlencoded" | "text/plain" | "application/graphql" | undefined;
934
+ formats?: ("content" | "text" | "json" | "json_v2" | "html" | "markdown" | "rag" | "raw")[] | undefined;
30
935
  extraction_schema?: Record<string, unknown> | undefined;
936
+ extraction_provider?: "openai" | "anthropic" | "openrouter" | "groq" | undefined;
937
+ extraction_prompt?: string | undefined;
938
+ extraction_profile?: "auto" | "product" | "article" | "job_posting" | "faq" | "recipe" | "event" | "ecommerce_homepage" | "directory_listing" | undefined;
939
+ extraction_template?: "auto" | "product" | "article" | "job_posting" | "faq" | "recipe" | "event" | "ecommerce_homepage" | "directory_listing" | undefined;
31
940
  cache?: boolean | undefined;
32
- render_js?: boolean | undefined;
941
+ include_raw_html?: boolean | undefined;
942
+ location?: {
943
+ country?: string | undefined;
944
+ language?: string | undefined;
945
+ } | undefined;
946
+ cost_controls?: {
947
+ force_tier?: "1" | "2" | "3" | "3.5" | "4" | undefined;
948
+ max_tier?: "1" | "2" | "3" | "3.5" | "4" | undefined;
949
+ max_credits?: number | undefined;
950
+ prefer_cost?: boolean | undefined;
951
+ prefer_speed?: boolean | undefined;
952
+ fail_fast?: boolean | undefined;
953
+ time_budget?: number | undefined;
954
+ } | undefined;
955
+ render_js?: boolean | "auto" | undefined;
33
956
  use_proxy?: boolean | undefined;
34
- wait_for?: string | undefined;
957
+ advanced?: {
958
+ markdown?: boolean | undefined;
959
+ ocr?: boolean | undefined;
960
+ screenshot?: boolean | undefined;
961
+ render_js?: boolean | "auto" | undefined;
962
+ use_proxy?: boolean | undefined;
963
+ use_own_proxy?: boolean | undefined;
964
+ use_system_proxy?: boolean | undefined;
965
+ proxy_integration_id?: string | undefined;
966
+ proxy_country?: string | undefined;
967
+ wait_condition?: string | undefined;
968
+ remove_cookie_banners?: boolean | undefined;
969
+ include_iframes?: boolean | undefined;
970
+ flatten_shadow_dom?: boolean | undefined;
971
+ skip_tls_verification?: boolean | undefined;
972
+ block_images?: boolean | undefined;
973
+ scroll_to_load?: boolean | undefined;
974
+ scroll_count?: number | undefined;
975
+ generate_pdf?: boolean | undefined;
976
+ section_filter?: {
977
+ min_content_blocks?: number | undefined;
978
+ exclude_content_types?: string[] | undefined;
979
+ content_only?: boolean | undefined;
980
+ } | undefined;
981
+ session_id?: string | undefined;
982
+ cookies?: Record<string, string> | undefined;
983
+ session_headers?: Record<string, string> | undefined;
984
+ sticky_session?: string | undefined;
985
+ sticky_session_ttl?: number | undefined;
986
+ actions?: ({
987
+ type: "wait";
988
+ milliseconds?: number | undefined;
989
+ selector?: string | undefined;
990
+ } | {
991
+ type: "wait_for";
992
+ selector: string;
993
+ timeout?: number | undefined;
994
+ } | {
995
+ type: "click";
996
+ selector: string;
997
+ } | {
998
+ type: "fill";
999
+ value: string;
1000
+ selector: string;
1001
+ } | {
1002
+ type: "press";
1003
+ key: string;
1004
+ } | {
1005
+ type: "scroll";
1006
+ direction?: "down" | "up" | undefined;
1007
+ amount?: number | undefined;
1008
+ } | {
1009
+ type: "infinite_scroll";
1010
+ max_scrolls?: number | undefined;
1011
+ delay?: number | undefined;
1012
+ end_selector?: string | undefined;
1013
+ } | {
1014
+ type: "screenshot";
1015
+ full_page?: boolean | undefined;
1016
+ } | {
1017
+ type: "evaluate";
1018
+ script: string;
1019
+ })[] | undefined;
1020
+ } | undefined;
35
1021
  }>, "many">;
1022
+ session_id: z.ZodOptional<z.ZodString>;
36
1023
  webhook_url: z.ZodOptional<z.ZodString>;
1024
+ export: z.ZodOptional<z.ZodObject<{
1025
+ integration_id: z.ZodString;
1026
+ prefix: z.ZodOptional<z.ZodString>;
1027
+ format: z.ZodOptional<z.ZodEnum<["jsonl", "csv", "json"]>>;
1028
+ }, "strip", z.ZodTypeAny, {
1029
+ integration_id: string;
1030
+ prefix?: string | undefined;
1031
+ format?: "json" | "jsonl" | "csv" | undefined;
1032
+ }, {
1033
+ integration_id: string;
1034
+ prefix?: string | undefined;
1035
+ format?: "json" | "jsonl" | "csv" | undefined;
1036
+ }>>;
1037
+ extraction_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1038
+ extraction_prompt: z.ZodOptional<z.ZodString>;
1039
+ extraction_provider: z.ZodOptional<z.ZodEnum<["openai", "anthropic", "openrouter", "groq"]>>;
1040
+ extraction_profile: z.ZodOptional<z.ZodEnum<["auto", "product", "article", "job_posting", "faq", "recipe", "event"]>>;
37
1041
  }, "strip", z.ZodTypeAny, {
38
1042
  urls: {
39
1043
  url: string;
40
1044
  mode?: "auto" | "html" | "js" | "pdf" | "ocr" | undefined;
1045
+ method?: "POST" | "GET" | undefined;
41
1046
  timeout?: number | undefined;
42
- formats?: ("text" | "html" | "json" | "json_v2" | "markdown" | "rag")[] | undefined;
1047
+ wait_for?: string | undefined;
1048
+ body?: string | undefined;
1049
+ content_type?: "application/json" | "application/x-www-form-urlencoded" | "text/plain" | "application/graphql" | undefined;
1050
+ formats?: ("content" | "text" | "json" | "json_v2" | "html" | "markdown" | "rag" | "raw")[] | undefined;
43
1051
  extraction_schema?: Record<string, unknown> | undefined;
1052
+ extraction_provider?: "openai" | "anthropic" | "openrouter" | "groq" | undefined;
1053
+ extraction_prompt?: string | undefined;
1054
+ extraction_profile?: "auto" | "product" | "article" | "job_posting" | "faq" | "recipe" | "event" | "ecommerce_homepage" | "directory_listing" | undefined;
1055
+ extraction_template?: "auto" | "product" | "article" | "job_posting" | "faq" | "recipe" | "event" | "ecommerce_homepage" | "directory_listing" | undefined;
44
1056
  cache?: boolean | undefined;
45
- render_js?: boolean | undefined;
1057
+ include_raw_html?: boolean | undefined;
1058
+ location?: {
1059
+ country?: string | undefined;
1060
+ language?: string | undefined;
1061
+ } | undefined;
1062
+ cost_controls?: {
1063
+ force_tier?: "1" | "2" | "3" | "3.5" | "4" | undefined;
1064
+ max_tier?: "1" | "2" | "3" | "3.5" | "4" | undefined;
1065
+ max_credits?: number | undefined;
1066
+ prefer_cost?: boolean | undefined;
1067
+ prefer_speed?: boolean | undefined;
1068
+ fail_fast?: boolean | undefined;
1069
+ time_budget?: number | undefined;
1070
+ } | undefined;
1071
+ render_js?: boolean | "auto" | undefined;
46
1072
  use_proxy?: boolean | undefined;
47
- wait_for?: string | undefined;
1073
+ advanced?: {
1074
+ markdown?: boolean | undefined;
1075
+ ocr?: boolean | undefined;
1076
+ screenshot?: boolean | undefined;
1077
+ render_js?: boolean | "auto" | undefined;
1078
+ use_proxy?: boolean | undefined;
1079
+ use_own_proxy?: boolean | undefined;
1080
+ use_system_proxy?: boolean | undefined;
1081
+ proxy_integration_id?: string | undefined;
1082
+ proxy_country?: string | undefined;
1083
+ wait_condition?: string | undefined;
1084
+ remove_cookie_banners?: boolean | undefined;
1085
+ include_iframes?: boolean | undefined;
1086
+ flatten_shadow_dom?: boolean | undefined;
1087
+ skip_tls_verification?: boolean | undefined;
1088
+ block_images?: boolean | undefined;
1089
+ scroll_to_load?: boolean | undefined;
1090
+ scroll_count?: number | undefined;
1091
+ generate_pdf?: boolean | undefined;
1092
+ section_filter?: {
1093
+ min_content_blocks?: number | undefined;
1094
+ exclude_content_types?: string[] | undefined;
1095
+ content_only?: boolean | undefined;
1096
+ } | undefined;
1097
+ session_id?: string | undefined;
1098
+ cookies?: Record<string, string> | undefined;
1099
+ session_headers?: Record<string, string> | undefined;
1100
+ sticky_session?: string | undefined;
1101
+ sticky_session_ttl?: number | undefined;
1102
+ actions?: ({
1103
+ type: "wait";
1104
+ milliseconds?: number | undefined;
1105
+ selector?: string | undefined;
1106
+ } | {
1107
+ type: "wait_for";
1108
+ selector: string;
1109
+ timeout?: number | undefined;
1110
+ } | {
1111
+ type: "click";
1112
+ selector: string;
1113
+ } | {
1114
+ type: "fill";
1115
+ value: string;
1116
+ selector: string;
1117
+ } | {
1118
+ type: "press";
1119
+ key: string;
1120
+ } | {
1121
+ type: "scroll";
1122
+ direction?: "down" | "up" | undefined;
1123
+ amount?: number | undefined;
1124
+ } | {
1125
+ type: "infinite_scroll";
1126
+ max_scrolls?: number | undefined;
1127
+ delay?: number | undefined;
1128
+ end_selector?: string | undefined;
1129
+ } | {
1130
+ type: "screenshot";
1131
+ full_page?: boolean | undefined;
1132
+ } | {
1133
+ type: "evaluate";
1134
+ script: string;
1135
+ })[] | undefined;
1136
+ } | undefined;
48
1137
  }[];
1138
+ extraction_schema?: Record<string, unknown> | undefined;
1139
+ extraction_provider?: "openai" | "anthropic" | "openrouter" | "groq" | undefined;
1140
+ extraction_prompt?: string | undefined;
1141
+ extraction_profile?: "auto" | "product" | "article" | "job_posting" | "faq" | "recipe" | "event" | undefined;
1142
+ session_id?: string | undefined;
49
1143
  webhook_url?: string | undefined;
1144
+ export?: {
1145
+ integration_id: string;
1146
+ prefix?: string | undefined;
1147
+ format?: "json" | "jsonl" | "csv" | undefined;
1148
+ } | undefined;
50
1149
  }, {
51
1150
  urls: {
52
1151
  url: string;
53
1152
  mode?: "auto" | "html" | "js" | "pdf" | "ocr" | undefined;
1153
+ method?: "POST" | "GET" | undefined;
54
1154
  timeout?: number | undefined;
55
- formats?: ("text" | "html" | "json" | "json_v2" | "markdown" | "rag")[] | undefined;
1155
+ wait_for?: string | undefined;
1156
+ body?: string | undefined;
1157
+ content_type?: "application/json" | "application/x-www-form-urlencoded" | "text/plain" | "application/graphql" | undefined;
1158
+ formats?: ("content" | "text" | "json" | "json_v2" | "html" | "markdown" | "rag" | "raw")[] | undefined;
56
1159
  extraction_schema?: Record<string, unknown> | undefined;
1160
+ extraction_provider?: "openai" | "anthropic" | "openrouter" | "groq" | undefined;
1161
+ extraction_prompt?: string | undefined;
1162
+ extraction_profile?: "auto" | "product" | "article" | "job_posting" | "faq" | "recipe" | "event" | "ecommerce_homepage" | "directory_listing" | undefined;
1163
+ extraction_template?: "auto" | "product" | "article" | "job_posting" | "faq" | "recipe" | "event" | "ecommerce_homepage" | "directory_listing" | undefined;
57
1164
  cache?: boolean | undefined;
58
- render_js?: boolean | undefined;
1165
+ include_raw_html?: boolean | undefined;
1166
+ location?: {
1167
+ country?: string | undefined;
1168
+ language?: string | undefined;
1169
+ } | undefined;
1170
+ cost_controls?: {
1171
+ force_tier?: "1" | "2" | "3" | "3.5" | "4" | undefined;
1172
+ max_tier?: "1" | "2" | "3" | "3.5" | "4" | undefined;
1173
+ max_credits?: number | undefined;
1174
+ prefer_cost?: boolean | undefined;
1175
+ prefer_speed?: boolean | undefined;
1176
+ fail_fast?: boolean | undefined;
1177
+ time_budget?: number | undefined;
1178
+ } | undefined;
1179
+ render_js?: boolean | "auto" | undefined;
59
1180
  use_proxy?: boolean | undefined;
60
- wait_for?: string | undefined;
1181
+ advanced?: {
1182
+ markdown?: boolean | undefined;
1183
+ ocr?: boolean | undefined;
1184
+ screenshot?: boolean | undefined;
1185
+ render_js?: boolean | "auto" | undefined;
1186
+ use_proxy?: boolean | undefined;
1187
+ use_own_proxy?: boolean | undefined;
1188
+ use_system_proxy?: boolean | undefined;
1189
+ proxy_integration_id?: string | undefined;
1190
+ proxy_country?: string | undefined;
1191
+ wait_condition?: string | undefined;
1192
+ remove_cookie_banners?: boolean | undefined;
1193
+ include_iframes?: boolean | undefined;
1194
+ flatten_shadow_dom?: boolean | undefined;
1195
+ skip_tls_verification?: boolean | undefined;
1196
+ block_images?: boolean | undefined;
1197
+ scroll_to_load?: boolean | undefined;
1198
+ scroll_count?: number | undefined;
1199
+ generate_pdf?: boolean | undefined;
1200
+ section_filter?: {
1201
+ min_content_blocks?: number | undefined;
1202
+ exclude_content_types?: string[] | undefined;
1203
+ content_only?: boolean | undefined;
1204
+ } | undefined;
1205
+ session_id?: string | undefined;
1206
+ cookies?: Record<string, string> | undefined;
1207
+ session_headers?: Record<string, string> | undefined;
1208
+ sticky_session?: string | undefined;
1209
+ sticky_session_ttl?: number | undefined;
1210
+ actions?: ({
1211
+ type: "wait";
1212
+ milliseconds?: number | undefined;
1213
+ selector?: string | undefined;
1214
+ } | {
1215
+ type: "wait_for";
1216
+ selector: string;
1217
+ timeout?: number | undefined;
1218
+ } | {
1219
+ type: "click";
1220
+ selector: string;
1221
+ } | {
1222
+ type: "fill";
1223
+ value: string;
1224
+ selector: string;
1225
+ } | {
1226
+ type: "press";
1227
+ key: string;
1228
+ } | {
1229
+ type: "scroll";
1230
+ direction?: "down" | "up" | undefined;
1231
+ amount?: number | undefined;
1232
+ } | {
1233
+ type: "infinite_scroll";
1234
+ max_scrolls?: number | undefined;
1235
+ delay?: number | undefined;
1236
+ end_selector?: string | undefined;
1237
+ } | {
1238
+ type: "screenshot";
1239
+ full_page?: boolean | undefined;
1240
+ } | {
1241
+ type: "evaluate";
1242
+ script: string;
1243
+ })[] | undefined;
1244
+ } | undefined;
61
1245
  }[];
1246
+ extraction_schema?: Record<string, unknown> | undefined;
1247
+ extraction_provider?: "openai" | "anthropic" | "openrouter" | "groq" | undefined;
1248
+ extraction_prompt?: string | undefined;
1249
+ extraction_profile?: "auto" | "product" | "article" | "job_posting" | "faq" | "recipe" | "event" | undefined;
1250
+ session_id?: string | undefined;
62
1251
  webhook_url?: string | undefined;
1252
+ export?: {
1253
+ integration_id: string;
1254
+ prefix?: string | undefined;
1255
+ format?: "json" | "jsonl" | "csv" | undefined;
1256
+ } | undefined;
63
1257
  }>;
64
1258
  export declare const batchDescription: string;
1259
+ /** Translate a batch item's tool parameters into the API's BatchItemRequest. Exported for tests. */
1260
+ export declare function buildBatchItem(item: z.infer<typeof batchItemSchema>): BatchItemRequest;
65
1261
  export declare function handleBatch(client: AlterLabClient, params: z.infer<typeof batchSchema>): Promise<CallToolResult>;
66
1262
  export declare const batchStatusSchema: z.ZodObject<{
67
1263
  batch_id: z.ZodString;