@upcrawl/sdk 1.4.0 → 1.4.1
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.
- package/README.md +214 -65
- package/dist/index.d.mts +270 -249
- package/dist/index.d.ts +270 -249
- package/dist/index.js +194 -0
- package/dist/index.mjs +174 -0
- package/package.json +8 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,262 +1,283 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
import { AxiosInstance } from 'axios';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Upcrawl SDK Types
|
|
5
6
|
* Type definitions for all API requests and responses
|
|
7
|
+
* Powered by Zod schemas — single source of truth for types, validation, and docs
|
|
6
8
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
type
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
summary
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
waitUntil
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
error
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
}
|
|
9
|
+
|
|
10
|
+
declare const UpcrawlConfigSchema: z.ZodObject<{
|
|
11
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
12
|
+
baseUrl: z.ZodOptional<z.ZodString>;
|
|
13
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
type UpcrawlConfig = z.infer<typeof UpcrawlConfigSchema>;
|
|
16
|
+
declare const SummaryQuerySchema: z.ZodObject<{
|
|
17
|
+
query: z.ZodString;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
type SummaryQuery = z.infer<typeof SummaryQuerySchema>;
|
|
20
|
+
declare const ScrapeOptionsSchema: z.ZodObject<{
|
|
21
|
+
url: z.ZodString;
|
|
22
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
23
|
+
html: "html";
|
|
24
|
+
markdown: "markdown";
|
|
25
|
+
}>>;
|
|
26
|
+
onlyMainContent: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
+
extractMetadata: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
+
summary: z.ZodOptional<z.ZodObject<{
|
|
29
|
+
query: z.ZodString;
|
|
30
|
+
}, z.core.$strip>>;
|
|
31
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
waitUntil: z.ZodOptional<z.ZodEnum<{
|
|
33
|
+
load: "load";
|
|
34
|
+
domcontentloaded: "domcontentloaded";
|
|
35
|
+
networkidle: "networkidle";
|
|
36
|
+
}>>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
type ScrapeOptions = z.infer<typeof ScrapeOptionsSchema>;
|
|
39
|
+
declare const ScrapeMetadataSchema: z.ZodObject<{
|
|
40
|
+
title: z.ZodOptional<z.ZodString>;
|
|
41
|
+
description: z.ZodOptional<z.ZodString>;
|
|
42
|
+
canonicalUrl: z.ZodOptional<z.ZodString>;
|
|
43
|
+
finalUrl: z.ZodOptional<z.ZodString>;
|
|
44
|
+
contentType: z.ZodOptional<z.ZodString>;
|
|
45
|
+
contentLength: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
type ScrapeMetadata = z.infer<typeof ScrapeMetadataSchema>;
|
|
48
|
+
declare const ScrapeResponseSchema: z.ZodObject<{
|
|
49
|
+
url: z.ZodString;
|
|
50
|
+
html: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
51
|
+
markdown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
52
|
+
statusCode: z.ZodNullable<z.ZodNumber>;
|
|
53
|
+
success: z.ZodBoolean;
|
|
54
|
+
error: z.ZodOptional<z.ZodString>;
|
|
55
|
+
timestamp: z.ZodString;
|
|
56
|
+
loadTimeMs: z.ZodNumber;
|
|
57
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
58
|
+
title: z.ZodOptional<z.ZodString>;
|
|
59
|
+
description: z.ZodOptional<z.ZodString>;
|
|
60
|
+
canonicalUrl: z.ZodOptional<z.ZodString>;
|
|
61
|
+
finalUrl: z.ZodOptional<z.ZodString>;
|
|
62
|
+
contentType: z.ZodOptional<z.ZodString>;
|
|
63
|
+
contentLength: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
}, z.core.$strip>>;
|
|
65
|
+
retryCount: z.ZodNumber;
|
|
66
|
+
cost: z.ZodOptional<z.ZodNumber>;
|
|
67
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
type ScrapeResponse = z.infer<typeof ScrapeResponseSchema>;
|
|
70
|
+
declare const BatchScrapeOptionsSchema: z.ZodObject<{
|
|
71
|
+
urls: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
72
|
+
url: z.ZodString;
|
|
73
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
74
|
+
html: "html";
|
|
75
|
+
markdown: "markdown";
|
|
76
|
+
}>>;
|
|
77
|
+
onlyMainContent: z.ZodOptional<z.ZodBoolean>;
|
|
78
|
+
extractMetadata: z.ZodOptional<z.ZodBoolean>;
|
|
79
|
+
summary: z.ZodOptional<z.ZodObject<{
|
|
80
|
+
query: z.ZodString;
|
|
81
|
+
}, z.core.$strip>>;
|
|
82
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
83
|
+
waitUntil: z.ZodOptional<z.ZodEnum<{
|
|
84
|
+
load: "load";
|
|
85
|
+
domcontentloaded: "domcontentloaded";
|
|
86
|
+
networkidle: "networkidle";
|
|
87
|
+
}>>;
|
|
88
|
+
}, z.core.$strip>]>>;
|
|
89
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
90
|
+
html: "html";
|
|
91
|
+
markdown: "markdown";
|
|
92
|
+
}>>;
|
|
93
|
+
onlyMainContent: z.ZodOptional<z.ZodBoolean>;
|
|
94
|
+
summary: z.ZodOptional<z.ZodObject<{
|
|
95
|
+
query: z.ZodString;
|
|
96
|
+
}, z.core.$strip>>;
|
|
97
|
+
batchTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
98
|
+
failFast: z.ZodOptional<z.ZodBoolean>;
|
|
99
|
+
}, z.core.$strip>;
|
|
100
|
+
type BatchScrapeOptions = z.infer<typeof BatchScrapeOptionsSchema>;
|
|
101
|
+
declare const BatchScrapeResponseSchema: z.ZodObject<{
|
|
102
|
+
results: z.ZodArray<z.ZodObject<{
|
|
103
|
+
url: z.ZodString;
|
|
104
|
+
html: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
105
|
+
markdown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
106
|
+
statusCode: z.ZodNullable<z.ZodNumber>;
|
|
107
|
+
success: z.ZodBoolean;
|
|
108
|
+
error: z.ZodOptional<z.ZodString>;
|
|
109
|
+
timestamp: z.ZodString;
|
|
110
|
+
loadTimeMs: z.ZodNumber;
|
|
111
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
112
|
+
title: z.ZodOptional<z.ZodString>;
|
|
113
|
+
description: z.ZodOptional<z.ZodString>;
|
|
114
|
+
canonicalUrl: z.ZodOptional<z.ZodString>;
|
|
115
|
+
finalUrl: z.ZodOptional<z.ZodString>;
|
|
116
|
+
contentType: z.ZodOptional<z.ZodString>;
|
|
117
|
+
contentLength: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
}, z.core.$strip>>;
|
|
119
|
+
retryCount: z.ZodNumber;
|
|
120
|
+
cost: z.ZodOptional<z.ZodNumber>;
|
|
121
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
122
|
+
}, z.core.$strip>>;
|
|
123
|
+
total: z.ZodNumber;
|
|
124
|
+
successful: z.ZodNumber;
|
|
125
|
+
failed: z.ZodNumber;
|
|
126
|
+
totalTimeMs: z.ZodNumber;
|
|
127
|
+
timestamp: z.ZodString;
|
|
128
|
+
cost: z.ZodOptional<z.ZodNumber>;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
type BatchScrapeResponse = z.infer<typeof BatchScrapeResponseSchema>;
|
|
131
|
+
declare const SearchOptionsSchema: z.ZodObject<{
|
|
132
|
+
queries: z.ZodArray<z.ZodString>;
|
|
133
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
134
|
+
location: z.ZodOptional<z.ZodString>;
|
|
135
|
+
includeDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
136
|
+
excludeDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
137
|
+
}, z.core.$strip>;
|
|
138
|
+
type SearchOptions = z.infer<typeof SearchOptionsSchema>;
|
|
139
|
+
declare const SearchResultWebSchema: z.ZodObject<{
|
|
140
|
+
url: z.ZodString;
|
|
141
|
+
title: z.ZodString;
|
|
142
|
+
description: z.ZodString;
|
|
143
|
+
}, z.core.$strip>;
|
|
144
|
+
type SearchResultWeb = z.infer<typeof SearchResultWebSchema>;
|
|
145
|
+
declare const SearchResultItemSchema: z.ZodObject<{
|
|
146
|
+
query: z.ZodString;
|
|
147
|
+
success: z.ZodBoolean;
|
|
148
|
+
results: z.ZodArray<z.ZodObject<{
|
|
149
|
+
url: z.ZodString;
|
|
150
|
+
title: z.ZodString;
|
|
151
|
+
description: z.ZodString;
|
|
152
|
+
}, z.core.$strip>>;
|
|
153
|
+
error: z.ZodOptional<z.ZodString>;
|
|
154
|
+
loadTimeMs: z.ZodOptional<z.ZodNumber>;
|
|
155
|
+
cost: z.ZodOptional<z.ZodNumber>;
|
|
156
|
+
}, z.core.$strip>;
|
|
157
|
+
type SearchResultItem = z.infer<typeof SearchResultItemSchema>;
|
|
158
|
+
declare const SearchResponseSchema: z.ZodObject<{
|
|
159
|
+
results: z.ZodArray<z.ZodObject<{
|
|
160
|
+
query: z.ZodString;
|
|
161
|
+
success: z.ZodBoolean;
|
|
162
|
+
results: z.ZodArray<z.ZodObject<{
|
|
163
|
+
url: z.ZodString;
|
|
164
|
+
title: z.ZodString;
|
|
165
|
+
description: z.ZodString;
|
|
166
|
+
}, z.core.$strip>>;
|
|
167
|
+
error: z.ZodOptional<z.ZodString>;
|
|
168
|
+
loadTimeMs: z.ZodOptional<z.ZodNumber>;
|
|
169
|
+
cost: z.ZodOptional<z.ZodNumber>;
|
|
170
|
+
}, z.core.$strip>>;
|
|
171
|
+
total: z.ZodNumber;
|
|
172
|
+
successful: z.ZodNumber;
|
|
173
|
+
failed: z.ZodNumber;
|
|
174
|
+
totalTimeMs: z.ZodNumber;
|
|
175
|
+
timestamp: z.ZodString;
|
|
176
|
+
cost: z.ZodOptional<z.ZodNumber>;
|
|
177
|
+
}, z.core.$strip>;
|
|
178
|
+
type SearchResponse = z.infer<typeof SearchResponseSchema>;
|
|
179
|
+
declare const PdfMarginSchema: z.ZodObject<{
|
|
180
|
+
top: z.ZodOptional<z.ZodString>;
|
|
181
|
+
right: z.ZodOptional<z.ZodString>;
|
|
182
|
+
bottom: z.ZodOptional<z.ZodString>;
|
|
183
|
+
left: z.ZodOptional<z.ZodString>;
|
|
184
|
+
}, z.core.$strip>;
|
|
185
|
+
type PdfMargin = z.infer<typeof PdfMarginSchema>;
|
|
186
|
+
declare const GeneratePdfOptionsSchema: z.ZodObject<{
|
|
187
|
+
html: z.ZodString;
|
|
188
|
+
title: z.ZodOptional<z.ZodString>;
|
|
189
|
+
pageSize: z.ZodOptional<z.ZodEnum<{
|
|
190
|
+
A4: "A4";
|
|
191
|
+
Letter: "Letter";
|
|
192
|
+
Legal: "Legal";
|
|
193
|
+
}>>;
|
|
194
|
+
landscape: z.ZodOptional<z.ZodBoolean>;
|
|
195
|
+
margin: z.ZodOptional<z.ZodObject<{
|
|
196
|
+
top: z.ZodOptional<z.ZodString>;
|
|
197
|
+
right: z.ZodOptional<z.ZodString>;
|
|
198
|
+
bottom: z.ZodOptional<z.ZodString>;
|
|
199
|
+
left: z.ZodOptional<z.ZodString>;
|
|
200
|
+
}, z.core.$strip>>;
|
|
201
|
+
printBackground: z.ZodOptional<z.ZodBoolean>;
|
|
202
|
+
skipChartWait: z.ZodOptional<z.ZodBoolean>;
|
|
203
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
204
|
+
}, z.core.$strip>;
|
|
205
|
+
type GeneratePdfOptions = z.infer<typeof GeneratePdfOptionsSchema>;
|
|
206
|
+
declare const GeneratePdfFromUrlOptionsSchema: z.ZodObject<{
|
|
207
|
+
url: z.ZodString;
|
|
208
|
+
title: z.ZodOptional<z.ZodString>;
|
|
209
|
+
pageSize: z.ZodOptional<z.ZodEnum<{
|
|
210
|
+
A4: "A4";
|
|
211
|
+
Letter: "Letter";
|
|
212
|
+
Legal: "Legal";
|
|
213
|
+
}>>;
|
|
214
|
+
landscape: z.ZodOptional<z.ZodBoolean>;
|
|
215
|
+
margin: z.ZodOptional<z.ZodObject<{
|
|
216
|
+
top: z.ZodOptional<z.ZodString>;
|
|
217
|
+
right: z.ZodOptional<z.ZodString>;
|
|
218
|
+
bottom: z.ZodOptional<z.ZodString>;
|
|
219
|
+
left: z.ZodOptional<z.ZodString>;
|
|
220
|
+
}, z.core.$strip>>;
|
|
221
|
+
printBackground: z.ZodOptional<z.ZodBoolean>;
|
|
222
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
223
|
+
}, z.core.$strip>;
|
|
224
|
+
type GeneratePdfFromUrlOptions = z.infer<typeof GeneratePdfFromUrlOptionsSchema>;
|
|
225
|
+
declare const PdfResponseSchema: z.ZodObject<{
|
|
226
|
+
success: z.ZodBoolean;
|
|
227
|
+
url: z.ZodOptional<z.ZodString>;
|
|
228
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
229
|
+
blobName: z.ZodOptional<z.ZodString>;
|
|
230
|
+
error: z.ZodOptional<z.ZodString>;
|
|
231
|
+
durationMs: z.ZodNumber;
|
|
232
|
+
}, z.core.$strip>;
|
|
233
|
+
type PdfResponse = z.infer<typeof PdfResponseSchema>;
|
|
234
|
+
declare const ExecuteCodeOptionsSchema: z.ZodObject<{
|
|
235
|
+
code: z.ZodString;
|
|
236
|
+
language: z.ZodOptional<z.ZodEnum<{
|
|
237
|
+
python: "python";
|
|
238
|
+
}>>;
|
|
239
|
+
}, z.core.$strip>;
|
|
240
|
+
type ExecuteCodeOptions = z.infer<typeof ExecuteCodeOptionsSchema>;
|
|
241
|
+
declare const ExecuteCodeResponseSchema: z.ZodObject<{
|
|
242
|
+
stdout: z.ZodString;
|
|
243
|
+
stderr: z.ZodString;
|
|
244
|
+
exitCode: z.ZodNumber;
|
|
245
|
+
executionTimeMs: z.ZodNumber;
|
|
246
|
+
timedOut: z.ZodBoolean;
|
|
247
|
+
memoryUsageMb: z.ZodOptional<z.ZodNumber>;
|
|
248
|
+
error: z.ZodOptional<z.ZodString>;
|
|
249
|
+
cost: z.ZodOptional<z.ZodNumber>;
|
|
250
|
+
}, z.core.$strip>;
|
|
251
|
+
type ExecuteCodeResponse = z.infer<typeof ExecuteCodeResponseSchema>;
|
|
252
|
+
declare const UpcrawlErrorResponseSchema: z.ZodObject<{
|
|
253
|
+
error: z.ZodObject<{
|
|
254
|
+
code: z.ZodString;
|
|
255
|
+
message: z.ZodString;
|
|
256
|
+
}, z.core.$strip>;
|
|
257
|
+
statusCode: z.ZodOptional<z.ZodNumber>;
|
|
258
|
+
}, z.core.$strip>;
|
|
259
|
+
type UpcrawlErrorResponse = z.infer<typeof UpcrawlErrorResponseSchema>;
|
|
231
260
|
declare class UpcrawlError extends Error {
|
|
232
261
|
readonly status: number;
|
|
233
262
|
readonly code: string;
|
|
234
263
|
constructor(message: string, status: number, code?: string);
|
|
235
264
|
}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
affinityCookie?: string;
|
|
253
|
-
/** Session creation timestamp */
|
|
254
|
-
createdAt: Date;
|
|
255
|
-
/** Browser viewport width */
|
|
256
|
-
width: number;
|
|
257
|
-
/** Browser viewport height */
|
|
258
|
-
height: number;
|
|
259
|
-
}
|
|
265
|
+
declare const CreateBrowserSessionOptionsSchema: z.ZodObject<{
|
|
266
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
267
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
268
|
+
headless: z.ZodOptional<z.ZodBoolean>;
|
|
269
|
+
}, z.core.$strip>;
|
|
270
|
+
type CreateBrowserSessionOptions = z.infer<typeof CreateBrowserSessionOptionsSchema>;
|
|
271
|
+
declare const BrowserSessionSchema: z.ZodObject<{
|
|
272
|
+
sessionId: z.ZodString;
|
|
273
|
+
wsEndpoint: z.ZodString;
|
|
274
|
+
vncUrl: z.ZodNullable<z.ZodString>;
|
|
275
|
+
affinityCookie: z.ZodOptional<z.ZodString>;
|
|
276
|
+
createdAt: z.ZodDate;
|
|
277
|
+
width: z.ZodNumber;
|
|
278
|
+
height: z.ZodNumber;
|
|
279
|
+
}, z.core.$strip>;
|
|
280
|
+
type BrowserSession = z.infer<typeof BrowserSessionSchema>;
|
|
260
281
|
|
|
261
282
|
/**
|
|
262
283
|
* Upcrawl Browser Namespace
|
|
@@ -640,4 +661,4 @@ declare const Upcrawl: {
|
|
|
640
661
|
readonly UpcrawlError: typeof UpcrawlError;
|
|
641
662
|
};
|
|
642
663
|
|
|
643
|
-
export { type BatchScrapeOptions, type BatchScrapeResponse, Browser, type BrowserSession, type CreateBrowserSessionOptions, type ExecuteCodeOptions, type ExecuteCodeResponse, type GeneratePdfFromUrlOptions, type GeneratePdfOptions, type PdfMargin, type PdfResponse, type ScrapeMetadata, type ScrapeOptions, type ScrapeResponse, type SearchOptions, type SearchResponse, type SearchResultItem, type SearchResultWeb, type SummaryQuery, type UpcrawlConfig, UpcrawlError, type UpcrawlErrorResponse, batchScrape, configure, Upcrawl as default, executeCode, generatePdf, generatePdfFromUrl, getConfig, resetConfig, scrape, search, setApiKey, setBaseUrl, setTimeout };
|
|
664
|
+
export { type BatchScrapeOptions, BatchScrapeOptionsSchema, type BatchScrapeResponse, BatchScrapeResponseSchema, Browser, type BrowserSession, BrowserSessionSchema, type CreateBrowserSessionOptions, CreateBrowserSessionOptionsSchema, type ExecuteCodeOptions, ExecuteCodeOptionsSchema, type ExecuteCodeResponse, ExecuteCodeResponseSchema, type GeneratePdfFromUrlOptions, GeneratePdfFromUrlOptionsSchema, type GeneratePdfOptions, GeneratePdfOptionsSchema, type PdfMargin, PdfMarginSchema, type PdfResponse, PdfResponseSchema, type ScrapeMetadata, ScrapeMetadataSchema, type ScrapeOptions, ScrapeOptionsSchema, type ScrapeResponse, ScrapeResponseSchema, type SearchOptions, SearchOptionsSchema, type SearchResponse, SearchResponseSchema, type SearchResultItem, SearchResultItemSchema, type SearchResultWeb, SearchResultWebSchema, type SummaryQuery, SummaryQuerySchema, type UpcrawlConfig, UpcrawlConfigSchema, UpcrawlError, type UpcrawlErrorResponse, UpcrawlErrorResponseSchema, batchScrape, configure, Upcrawl as default, executeCode, generatePdf, generatePdfFromUrl, getConfig, resetConfig, scrape, search, setApiKey, setBaseUrl, setTimeout };
|