@automate.ax/integration-contracts 0.152.4 → 0.153.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.
- package/dist/calcom/schemas.d.ts +1 -1
- package/dist/close/events.d.ts +7 -7
- package/dist/close/schemas.d.ts +1 -1
- package/dist/cloudflare/api.d.ts +24 -0
- package/dist/cloudflare/api.js +131 -23
- package/dist/cloudflare/browser-rendering.d.ts +1512 -0
- package/dist/cloudflare/browser-rendering.js +414 -0
- package/dist/cloudflare/index.d.ts +1 -0
- package/dist/cloudflare/index.js +1 -0
- package/dist/elevenlabs/schemas.d.ts +1 -1
- package/dist/google-forms/event-schemas.d.ts +1 -1
- package/dist/google-forms/google-forms.d.ts +2 -2
- package/dist/google-forms/index.d.ts +1 -1
- package/dist/google-forms/schemas.d.ts +6 -6
- package/dist/millionverifier/schemas.d.ts +7 -7
- package/dist/outlook/index.d.ts +18 -18
- package/dist/outlook/schemas.d.ts +6 -6
- package/package.json +2 -2
- package/src/calcom/schemas.ts +1 -1
- package/src/cloudflare/api.ts +192 -27
- package/src/cloudflare/browser-rendering.ts +466 -0
- package/src/cloudflare/index.ts +1 -0
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
const RESOURCE_TYPE_SCHEMA = z.enum([
|
|
3
|
+
"document",
|
|
4
|
+
"stylesheet",
|
|
5
|
+
"image",
|
|
6
|
+
"media",
|
|
7
|
+
"font",
|
|
8
|
+
"script",
|
|
9
|
+
"texttrack",
|
|
10
|
+
"xhr",
|
|
11
|
+
"fetch",
|
|
12
|
+
"prefetch",
|
|
13
|
+
"eventsource",
|
|
14
|
+
"websocket",
|
|
15
|
+
"manifest",
|
|
16
|
+
"signedexchange",
|
|
17
|
+
"ping",
|
|
18
|
+
"cspviolationreport",
|
|
19
|
+
"preflight",
|
|
20
|
+
"other",
|
|
21
|
+
]);
|
|
22
|
+
const SCRIPT_TAG_SCHEMA = z.object({
|
|
23
|
+
content: z.string().optional(),
|
|
24
|
+
id: z.string().optional(),
|
|
25
|
+
type: z.string().optional(),
|
|
26
|
+
url: z.url().optional(),
|
|
27
|
+
});
|
|
28
|
+
const STYLE_TAG_SCHEMA = z.object({
|
|
29
|
+
content: z.string().optional(),
|
|
30
|
+
url: z.url().optional(),
|
|
31
|
+
});
|
|
32
|
+
const COOKIE_SCHEMA = z.object({
|
|
33
|
+
domain: z.string().optional(),
|
|
34
|
+
expires: z.number().optional(),
|
|
35
|
+
httpOnly: z.boolean().optional(),
|
|
36
|
+
name: z.string().min(1),
|
|
37
|
+
partitionKey: z.string().optional(),
|
|
38
|
+
path: z.string().optional(),
|
|
39
|
+
priority: z.enum(["Low", "Medium", "High"]).optional(),
|
|
40
|
+
sameParty: z.boolean().optional(),
|
|
41
|
+
sameSite: z.enum(["Strict", "Lax", "None"]).optional(),
|
|
42
|
+
secure: z.boolean().optional(),
|
|
43
|
+
sourcePort: z.number().int().min(0).max(65_535).optional(),
|
|
44
|
+
sourceScheme: z.enum(["Unset", "NonSecure", "Secure"]).optional(),
|
|
45
|
+
url: z.string().optional(),
|
|
46
|
+
value: z.string(),
|
|
47
|
+
});
|
|
48
|
+
const WAIT_UNTIL_SCHEMA = z.enum([
|
|
49
|
+
"load",
|
|
50
|
+
"domcontentloaded",
|
|
51
|
+
"networkidle0",
|
|
52
|
+
"networkidle2",
|
|
53
|
+
]);
|
|
54
|
+
const GOTO_OPTIONS_SCHEMA = z.object({
|
|
55
|
+
referer: z.string().optional(),
|
|
56
|
+
referrerPolicy: z.string().optional(),
|
|
57
|
+
timeout: z.number().min(0).max(60_000).optional(),
|
|
58
|
+
waitUntil: z
|
|
59
|
+
.union([WAIT_UNTIL_SCHEMA, WAIT_UNTIL_SCHEMA.array().min(1)])
|
|
60
|
+
.optional(),
|
|
61
|
+
});
|
|
62
|
+
const VIEWPORT_SCHEMA = z.object({
|
|
63
|
+
deviceScaleFactor: z.number().positive().optional(),
|
|
64
|
+
hasTouch: z.boolean().optional(),
|
|
65
|
+
height: z.number().positive(),
|
|
66
|
+
isLandscape: z.boolean().optional(),
|
|
67
|
+
isMobile: z.boolean().optional(),
|
|
68
|
+
width: z.number().positive(),
|
|
69
|
+
});
|
|
70
|
+
const WAIT_FOR_SELECTOR_SCHEMA = z
|
|
71
|
+
.object({
|
|
72
|
+
hidden: z.literal(true).optional(),
|
|
73
|
+
selector: z.string().min(1),
|
|
74
|
+
timeout: z.number().min(0).max(120_000).optional(),
|
|
75
|
+
visible: z.literal(true).optional(),
|
|
76
|
+
})
|
|
77
|
+
.refine(({ hidden, visible }) => !(hidden && visible), {
|
|
78
|
+
message: "Choose hidden or visible, not both.",
|
|
79
|
+
});
|
|
80
|
+
const SCREENSHOT_OPTIONS_SCHEMA = z
|
|
81
|
+
.object({
|
|
82
|
+
captureBeyondViewport: z.boolean().optional(),
|
|
83
|
+
clip: z
|
|
84
|
+
.object({
|
|
85
|
+
height: z.number().positive(),
|
|
86
|
+
scale: z.number().positive().optional(),
|
|
87
|
+
width: z.number().positive(),
|
|
88
|
+
x: z.number(),
|
|
89
|
+
y: z.number(),
|
|
90
|
+
})
|
|
91
|
+
.optional(),
|
|
92
|
+
fromSurface: z.boolean().optional(),
|
|
93
|
+
fullPage: z.boolean().optional(),
|
|
94
|
+
omitBackground: z.boolean().optional(),
|
|
95
|
+
optimizeForSpeed: z.boolean().optional(),
|
|
96
|
+
quality: z.number().min(0).max(100).optional(),
|
|
97
|
+
type: z.enum(["png", "jpeg", "webp"]).optional(),
|
|
98
|
+
})
|
|
99
|
+
.refine(({ quality, type }) => quality === undefined || type !== "png", {
|
|
100
|
+
message: "Screenshot quality requires jpeg or webp output.",
|
|
101
|
+
path: ["quality"],
|
|
102
|
+
});
|
|
103
|
+
const PDF_DIMENSION_SCHEMA = z.union([z.number().positive(), z.string().min(1)]);
|
|
104
|
+
const PDF_OPTIONS_SCHEMA = z.object({
|
|
105
|
+
displayHeaderFooter: z.boolean().optional(),
|
|
106
|
+
footerTemplate: z.string().optional(),
|
|
107
|
+
format: z
|
|
108
|
+
.enum([
|
|
109
|
+
"letter",
|
|
110
|
+
"legal",
|
|
111
|
+
"tabloid",
|
|
112
|
+
"ledger",
|
|
113
|
+
"a0",
|
|
114
|
+
"a1",
|
|
115
|
+
"a2",
|
|
116
|
+
"a3",
|
|
117
|
+
"a4",
|
|
118
|
+
"a5",
|
|
119
|
+
"a6",
|
|
120
|
+
])
|
|
121
|
+
.optional(),
|
|
122
|
+
headerTemplate: z.string().optional(),
|
|
123
|
+
height: PDF_DIMENSION_SCHEMA.optional(),
|
|
124
|
+
landscape: z.boolean().optional(),
|
|
125
|
+
margin: z
|
|
126
|
+
.object({
|
|
127
|
+
bottom: PDF_DIMENSION_SCHEMA.optional(),
|
|
128
|
+
left: PDF_DIMENSION_SCHEMA.optional(),
|
|
129
|
+
right: PDF_DIMENSION_SCHEMA.optional(),
|
|
130
|
+
top: PDF_DIMENSION_SCHEMA.optional(),
|
|
131
|
+
})
|
|
132
|
+
.optional(),
|
|
133
|
+
omitBackground: z.boolean().optional(),
|
|
134
|
+
outline: z.boolean().optional(),
|
|
135
|
+
pageRanges: z.string().optional(),
|
|
136
|
+
preferCSSPageSize: z.boolean().optional(),
|
|
137
|
+
printBackground: z.boolean().optional(),
|
|
138
|
+
scale: z.number().min(0.1).max(2).optional(),
|
|
139
|
+
tagged: z.boolean().optional(),
|
|
140
|
+
timeout: z.number().min(0).optional(),
|
|
141
|
+
width: PDF_DIMENSION_SCHEMA.optional(),
|
|
142
|
+
});
|
|
143
|
+
const JSON_EXTRACTION_OPTIONS = {
|
|
144
|
+
customAi: z
|
|
145
|
+
.object({
|
|
146
|
+
authorization: z.string().min(1).optional(),
|
|
147
|
+
model: z.string().min(1),
|
|
148
|
+
})
|
|
149
|
+
.array()
|
|
150
|
+
.min(1)
|
|
151
|
+
.optional(),
|
|
152
|
+
prompt: z.string().min(1).optional(),
|
|
153
|
+
responseFormat: z
|
|
154
|
+
.object({
|
|
155
|
+
jsonSchema: z.record(z.string(), z.json()).nullable().optional(),
|
|
156
|
+
type: z.string().min(1),
|
|
157
|
+
})
|
|
158
|
+
.optional(),
|
|
159
|
+
};
|
|
160
|
+
const COMMON_RENDERING_FIELDS = {
|
|
161
|
+
accountId: z.string().trim().min(1),
|
|
162
|
+
actionTimeout: z.number().min(0).max(120_000).optional(),
|
|
163
|
+
addScriptTag: SCRIPT_TAG_SCHEMA.array().optional(),
|
|
164
|
+
addStyleTag: STYLE_TAG_SCHEMA.array().optional(),
|
|
165
|
+
allowRequestPattern: z.string().min(1).array().min(1).optional(),
|
|
166
|
+
allowResourceTypes: RESOURCE_TYPE_SCHEMA.array().min(1).optional(),
|
|
167
|
+
authenticate: z
|
|
168
|
+
.object({ password: z.string().min(1), username: z.string().min(1) })
|
|
169
|
+
.optional(),
|
|
170
|
+
bestAttempt: z.boolean().optional(),
|
|
171
|
+
cacheTtl: z.number().int().min(0).max(86_400).optional(),
|
|
172
|
+
cookies: COOKIE_SCHEMA.array().optional(),
|
|
173
|
+
emulateMediaType: z.string().optional(),
|
|
174
|
+
gotoOptions: GOTO_OPTIONS_SCHEMA.optional(),
|
|
175
|
+
rejectRequestPattern: z.string().min(1).array().min(1).optional(),
|
|
176
|
+
rejectResourceTypes: RESOURCE_TYPE_SCHEMA.array().min(1).optional(),
|
|
177
|
+
setExtraHttpHeaders: z.record(z.string(), z.string()).optional(),
|
|
178
|
+
setJavaScriptEnabled: z.boolean().optional(),
|
|
179
|
+
viewport: VIEWPORT_SCHEMA.optional(),
|
|
180
|
+
waitForSelector: WAIT_FOR_SELECTOR_SCHEMA.optional(),
|
|
181
|
+
waitForTimeout: z.number().min(0).max(120_000).optional(),
|
|
182
|
+
};
|
|
183
|
+
const SOURCE_FIELDS = {
|
|
184
|
+
html: z.string().min(1).optional(),
|
|
185
|
+
url: z.url().optional(),
|
|
186
|
+
};
|
|
187
|
+
const QUICK_ACTION_RENDERING_FIELDS = {
|
|
188
|
+
...COMMON_RENDERING_FIELDS,
|
|
189
|
+
userAgent: z.string().optional(),
|
|
190
|
+
};
|
|
191
|
+
export const CLOUDFLARE_ACCESSIBILITY_NODE_SCHEMA = z.lazy(() => z.object({
|
|
192
|
+
autocomplete: z.string().optional(),
|
|
193
|
+
checked: z.union([z.boolean(), z.literal("mixed")]).optional(),
|
|
194
|
+
children: CLOUDFLARE_ACCESSIBILITY_NODE_SCHEMA.array().optional(),
|
|
195
|
+
description: z.string().optional(),
|
|
196
|
+
disabled: z.boolean().optional(),
|
|
197
|
+
expanded: z.boolean().optional(),
|
|
198
|
+
focused: z.boolean().optional(),
|
|
199
|
+
haspopup: z.string().optional(),
|
|
200
|
+
invalid: z.string().optional(),
|
|
201
|
+
keyshortcuts: z.string().optional(),
|
|
202
|
+
level: z.number().optional(),
|
|
203
|
+
modal: z.boolean().optional(),
|
|
204
|
+
multiline: z.boolean().optional(),
|
|
205
|
+
multiselectable: z.boolean().optional(),
|
|
206
|
+
name: z.string().optional(),
|
|
207
|
+
orientation: z.string().optional(),
|
|
208
|
+
pressed: z.union([z.boolean(), z.literal("mixed")]).optional(),
|
|
209
|
+
readonly: z.boolean().optional(),
|
|
210
|
+
required: z.boolean().optional(),
|
|
211
|
+
role: z.string(),
|
|
212
|
+
roledescription: z.string().optional(),
|
|
213
|
+
selected: z.boolean().optional(),
|
|
214
|
+
value: z.union([z.number(), z.string()]).optional(),
|
|
215
|
+
valuemax: z.number().optional(),
|
|
216
|
+
valuemin: z.number().optional(),
|
|
217
|
+
valuetext: z.string().optional(),
|
|
218
|
+
}));
|
|
219
|
+
export const CLOUDFLARE_BROWSER_CONTENT_INPUT_SCHEMA = browserRenderingInput({});
|
|
220
|
+
export const CLOUDFLARE_BROWSER_MARKDOWN_INPUT_SCHEMA = browserRenderingInput({});
|
|
221
|
+
export const CLOUDFLARE_BROWSER_ACCESSIBILITY_INPUT_SCHEMA = browserRenderingInput({
|
|
222
|
+
interestingOnly: z.boolean().optional(),
|
|
223
|
+
root: z.string().optional(),
|
|
224
|
+
});
|
|
225
|
+
export const CLOUDFLARE_BROWSER_LINKS_INPUT_SCHEMA = browserRenderingInput({
|
|
226
|
+
excludeExternalLinks: z.boolean().optional(),
|
|
227
|
+
visibleLinksOnly: z.boolean().optional(),
|
|
228
|
+
});
|
|
229
|
+
export const CLOUDFLARE_BROWSER_SCRAPE_INPUT_SCHEMA = browserRenderingInput({
|
|
230
|
+
elements: z
|
|
231
|
+
.object({ selector: z.string().min(1) })
|
|
232
|
+
.array()
|
|
233
|
+
.min(1),
|
|
234
|
+
});
|
|
235
|
+
export const CLOUDFLARE_BROWSER_SCREENSHOT_INPUT_SCHEMA = browserRenderingInput({
|
|
236
|
+
screenshotOptions: SCREENSHOT_OPTIONS_SCHEMA.optional(),
|
|
237
|
+
scrollPage: z.boolean().optional(),
|
|
238
|
+
selector: z.string().min(1).optional(),
|
|
239
|
+
});
|
|
240
|
+
export const CLOUDFLARE_BROWSER_PDF_INPUT_SCHEMA = browserRenderingInput({
|
|
241
|
+
pdfOptions: PDF_OPTIONS_SCHEMA.optional(),
|
|
242
|
+
});
|
|
243
|
+
export const CLOUDFLARE_BROWSER_SNAPSHOT_INPUT_SCHEMA = browserRenderingInput({
|
|
244
|
+
formats: z
|
|
245
|
+
.enum(["content", "screenshot", "markdown", "accessibilityTree"])
|
|
246
|
+
.array()
|
|
247
|
+
.min(2)
|
|
248
|
+
.refine((formats) => new Set(formats).size === formats.length, {
|
|
249
|
+
message: "Choose each snapshot format once.",
|
|
250
|
+
})
|
|
251
|
+
.optional(),
|
|
252
|
+
screenshotOptions: SCREENSHOT_OPTIONS_SCHEMA.optional(),
|
|
253
|
+
});
|
|
254
|
+
export const CLOUDFLARE_BROWSER_JSON_INPUT_SCHEMA = browserRenderingInput(JSON_EXTRACTION_OPTIONS).superRefine(({ prompt, responseFormat }, context) => {
|
|
255
|
+
if (!prompt && !responseFormat)
|
|
256
|
+
context.addIssue({
|
|
257
|
+
code: "custom",
|
|
258
|
+
message: "Provide prompt or responseFormat.",
|
|
259
|
+
});
|
|
260
|
+
});
|
|
261
|
+
export const CLOUDFLARE_BROWSER_SCRAPE_RESULT_SCHEMA = z.object({
|
|
262
|
+
results: z.object({
|
|
263
|
+
attributes: z.object({ name: z.string(), value: z.string() }).array(),
|
|
264
|
+
height: z.number(),
|
|
265
|
+
html: z.string(),
|
|
266
|
+
left: z.number(),
|
|
267
|
+
text: z.string(),
|
|
268
|
+
top: z.number(),
|
|
269
|
+
width: z.number(),
|
|
270
|
+
}),
|
|
271
|
+
selector: z.string(),
|
|
272
|
+
});
|
|
273
|
+
export const CLOUDFLARE_BROWSER_SNAPSHOT_RESULT_SCHEMA = z.object({
|
|
274
|
+
accessibilityTree: CLOUDFLARE_ACCESSIBILITY_NODE_SCHEMA.optional(),
|
|
275
|
+
content: z.string().optional(),
|
|
276
|
+
markdown: z.string().optional(),
|
|
277
|
+
screenshot: z.base64().optional(),
|
|
278
|
+
});
|
|
279
|
+
const CRAWL_STATUS_SCHEMA = z.enum([
|
|
280
|
+
"queued",
|
|
281
|
+
"errored",
|
|
282
|
+
"completed",
|
|
283
|
+
"disallowed",
|
|
284
|
+
"skipped",
|
|
285
|
+
"cancelled",
|
|
286
|
+
]);
|
|
287
|
+
const CRAWL_OPTIONS_SCHEMA = z.object({
|
|
288
|
+
excludePatterns: z.string().min(1).array().optional(),
|
|
289
|
+
includeExternalLinks: z.boolean().optional(),
|
|
290
|
+
includePatterns: z.string().min(1).array().optional(),
|
|
291
|
+
includeSubdomains: z.boolean().optional(),
|
|
292
|
+
});
|
|
293
|
+
const CRAWL_FIELDS = {
|
|
294
|
+
contentUse: z.enum(["reference", "full"]).optional(),
|
|
295
|
+
crawlPurposes: z
|
|
296
|
+
.enum(["search", "ai-input", "ai-train"])
|
|
297
|
+
.array()
|
|
298
|
+
.min(1)
|
|
299
|
+
.max(3)
|
|
300
|
+
.refine((purposes) => new Set(purposes).size === purposes.length, {
|
|
301
|
+
message: "Choose each crawl purpose once.",
|
|
302
|
+
})
|
|
303
|
+
.optional(),
|
|
304
|
+
depth: z.number().int().min(1).max(100_000).optional(),
|
|
305
|
+
formats: z
|
|
306
|
+
.enum(["html", "markdown", "json"])
|
|
307
|
+
.array()
|
|
308
|
+
.min(1)
|
|
309
|
+
.refine((formats) => new Set(formats).size === formats.length, {
|
|
310
|
+
message: "Choose each crawl format once.",
|
|
311
|
+
})
|
|
312
|
+
.optional(),
|
|
313
|
+
jsonOptions: z.object(JSON_EXTRACTION_OPTIONS).optional(),
|
|
314
|
+
limit: z.number().int().min(1).max(100_000).optional(),
|
|
315
|
+
maxAge: z.number().int().min(0).max(604_800).optional(),
|
|
316
|
+
modifiedSince: z.number().int().nonnegative().optional(),
|
|
317
|
+
options: CRAWL_OPTIONS_SCHEMA.optional(),
|
|
318
|
+
source: z.enum(["sitemaps", "links", "all"]).optional(),
|
|
319
|
+
url: z.url(),
|
|
320
|
+
};
|
|
321
|
+
export const CLOUDFLARE_BROWSER_CREATE_CRAWL_INPUT_SCHEMA = z
|
|
322
|
+
.object({
|
|
323
|
+
...COMMON_RENDERING_FIELDS,
|
|
324
|
+
...CRAWL_FIELDS,
|
|
325
|
+
render: z.boolean().prefault(true),
|
|
326
|
+
})
|
|
327
|
+
.superRefine((input, context) => {
|
|
328
|
+
if (!input.render &&
|
|
329
|
+
(input.actionTimeout !== undefined ||
|
|
330
|
+
input.addScriptTag !== undefined ||
|
|
331
|
+
input.addStyleTag !== undefined ||
|
|
332
|
+
input.allowRequestPattern !== undefined ||
|
|
333
|
+
input.allowResourceTypes !== undefined ||
|
|
334
|
+
input.authenticate !== undefined ||
|
|
335
|
+
input.bestAttempt !== undefined ||
|
|
336
|
+
input.cookies !== undefined ||
|
|
337
|
+
input.emulateMediaType !== undefined ||
|
|
338
|
+
input.gotoOptions !== undefined ||
|
|
339
|
+
input.rejectRequestPattern !== undefined ||
|
|
340
|
+
input.rejectResourceTypes !== undefined ||
|
|
341
|
+
input.setExtraHttpHeaders !== undefined ||
|
|
342
|
+
input.setJavaScriptEnabled !== undefined ||
|
|
343
|
+
input.viewport !== undefined ||
|
|
344
|
+
input.waitForSelector !== undefined ||
|
|
345
|
+
input.waitForTimeout !== undefined))
|
|
346
|
+
context.addIssue({
|
|
347
|
+
code: "custom",
|
|
348
|
+
message: "Rendered-page options require render: true.",
|
|
349
|
+
path: ["render"],
|
|
350
|
+
});
|
|
351
|
+
});
|
|
352
|
+
export const CLOUDFLARE_BROWSER_GET_CRAWL_INPUT_SCHEMA = z.object({
|
|
353
|
+
accountId: z.string().trim().min(1),
|
|
354
|
+
cacheTtl: z.number().int().min(0).max(86_400).optional(),
|
|
355
|
+
cursor: z.number().int().nonnegative().optional(),
|
|
356
|
+
jobId: z.string().trim().min(1),
|
|
357
|
+
limit: z.number().int().positive().optional(),
|
|
358
|
+
status: CRAWL_STATUS_SCHEMA.optional(),
|
|
359
|
+
});
|
|
360
|
+
export const CLOUDFLARE_BROWSER_CANCEL_CRAWL_INPUT_SCHEMA = z.object({
|
|
361
|
+
accountId: z.string().trim().min(1),
|
|
362
|
+
jobId: z.string().trim().min(1),
|
|
363
|
+
});
|
|
364
|
+
export const CLOUDFLARE_BROWSER_CRAWL_RESULT_SCHEMA = z.object({
|
|
365
|
+
browserSecondsUsed: z.number().nonnegative(),
|
|
366
|
+
cursor: z.string().optional(),
|
|
367
|
+
finished: z.number().int().nonnegative(),
|
|
368
|
+
id: z.string().min(1),
|
|
369
|
+
records: z
|
|
370
|
+
.object({
|
|
371
|
+
html: z.string().optional(),
|
|
372
|
+
json: z.record(z.string(), z.json()).optional(),
|
|
373
|
+
markdown: z.string().optional(),
|
|
374
|
+
metadata: z
|
|
375
|
+
.object({
|
|
376
|
+
status: z.number().int(),
|
|
377
|
+
title: z.string().optional(),
|
|
378
|
+
url: z.string(),
|
|
379
|
+
})
|
|
380
|
+
.optional(),
|
|
381
|
+
status: CRAWL_STATUS_SCHEMA,
|
|
382
|
+
url: z.string(),
|
|
383
|
+
})
|
|
384
|
+
.array(),
|
|
385
|
+
skipped: z.number().int().nonnegative(),
|
|
386
|
+
status: z.string(),
|
|
387
|
+
total: z.number().int().nonnegative(),
|
|
388
|
+
});
|
|
389
|
+
export const CLOUDFLARE_BROWSER_CANCEL_CRAWL_RESULT_SCHEMA = z.object({
|
|
390
|
+
jobId: z.string().min(1),
|
|
391
|
+
message: z.string(),
|
|
392
|
+
});
|
|
393
|
+
/**
|
|
394
|
+
* Builds a Browser Run input schema that requires exactly one page source.
|
|
395
|
+
*
|
|
396
|
+
* @param fields - Endpoint-specific input fields.
|
|
397
|
+
*/
|
|
398
|
+
function browserRenderingInput(fields) {
|
|
399
|
+
return z
|
|
400
|
+
.object({ ...QUICK_ACTION_RENDERING_FIELDS, ...SOURCE_FIELDS, ...fields })
|
|
401
|
+
.refine(hasExactlyOnePageSource, {
|
|
402
|
+
message: "Provide exactly one of url or html.",
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* Returns whether an input provides exactly one Browser Run page source.
|
|
407
|
+
*
|
|
408
|
+
* @param input - Candidate page source.
|
|
409
|
+
* @param input.html - Inline HTML source.
|
|
410
|
+
* @param input.url - URL source.
|
|
411
|
+
*/
|
|
412
|
+
function hasExactlyOnePageSource(input) {
|
|
413
|
+
return (Number(input.html !== undefined) + Number(input.url !== undefined) === 1);
|
|
414
|
+
}
|
package/dist/cloudflare/index.js
CHANGED
|
@@ -189,11 +189,11 @@ export declare const ELEVENLABS_DUBBING_SCHEMA: z.ZodObject<{
|
|
|
189
189
|
sourceLanguage: z.ZodNullable<z.ZodString>;
|
|
190
190
|
status: z.ZodEnum<{
|
|
191
191
|
failed: "failed";
|
|
192
|
+
queued: "queued";
|
|
192
193
|
cloning: "cloning";
|
|
193
194
|
dubbed: "dubbed";
|
|
194
195
|
dubbing: "dubbing";
|
|
195
196
|
preparing: "preparing";
|
|
196
|
-
queued: "queued";
|
|
197
197
|
}>;
|
|
198
198
|
targetLanguages: z.ZodArray<z.ZodString>;
|
|
199
199
|
}, z.core.$strip>;
|
|
@@ -58,10 +58,10 @@ export declare const GOOGLE_FORMS_FORM_CHANGED_EVENT_SCHEMA: z.ZodObject<{
|
|
|
58
58
|
checkbox: "checkbox";
|
|
59
59
|
shortText: "shortText";
|
|
60
60
|
rating: "rating";
|
|
61
|
+
scale: "scale";
|
|
61
62
|
paragraph: "paragraph";
|
|
62
63
|
multipleChoice: "multipleChoice";
|
|
63
64
|
dropdown: "dropdown";
|
|
64
|
-
scale: "scale";
|
|
65
65
|
fileUpload: "fileUpload";
|
|
66
66
|
gridRow: "gridRow";
|
|
67
67
|
}>;
|
|
@@ -40,7 +40,7 @@ export declare function normalizeForm(form: forms_v1.Schema$Form): {
|
|
|
40
40
|
choices: string[];
|
|
41
41
|
questionId: string;
|
|
42
42
|
required: boolean;
|
|
43
|
-
type: "unknown" | "date" | "time" | "duration" | "checkbox" | "shortText" | "rating" | "
|
|
43
|
+
type: "unknown" | "date" | "time" | "duration" | "checkbox" | "shortText" | "rating" | "scale" | "paragraph" | "multipleChoice" | "dropdown" | "fileUpload" | "gridRow";
|
|
44
44
|
date?: {
|
|
45
45
|
includeTime: boolean;
|
|
46
46
|
includeYear: boolean;
|
|
@@ -104,7 +104,7 @@ export declare function normalizeFormItem(item: forms_v1.Schema$Item, index: num
|
|
|
104
104
|
choices: string[];
|
|
105
105
|
questionId: string;
|
|
106
106
|
required: boolean;
|
|
107
|
-
type: "unknown" | "date" | "time" | "duration" | "checkbox" | "shortText" | "rating" | "
|
|
107
|
+
type: "unknown" | "date" | "time" | "duration" | "checkbox" | "shortText" | "rating" | "scale" | "paragraph" | "multipleChoice" | "dropdown" | "fileUpload" | "gridRow";
|
|
108
108
|
date?: {
|
|
109
109
|
includeTime: boolean;
|
|
110
110
|
includeYear: boolean;
|
|
@@ -60,10 +60,10 @@ export declare const googleFormsTriggerContracts: {
|
|
|
60
60
|
checkbox: "checkbox";
|
|
61
61
|
shortText: "shortText";
|
|
62
62
|
rating: "rating";
|
|
63
|
+
scale: "scale";
|
|
63
64
|
paragraph: "paragraph";
|
|
64
65
|
multipleChoice: "multipleChoice";
|
|
65
66
|
dropdown: "dropdown";
|
|
66
|
-
scale: "scale";
|
|
67
67
|
fileUpload: "fileUpload";
|
|
68
68
|
gridRow: "gridRow";
|
|
69
69
|
}>;
|
|
@@ -209,8 +209,8 @@ export declare const FORM_ITEM_INPUT_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
209
209
|
altText: z.ZodOptional<z.ZodString>;
|
|
210
210
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
211
211
|
left: "left";
|
|
212
|
-
center: "center";
|
|
213
212
|
right: "right";
|
|
213
|
+
center: "center";
|
|
214
214
|
}>>;
|
|
215
215
|
sourceUrl: z.ZodURL;
|
|
216
216
|
type: z.ZodLiteral<"image">;
|
|
@@ -222,8 +222,8 @@ export declare const FORM_ITEM_INPUT_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
222
222
|
caption: z.ZodOptional<z.ZodString>;
|
|
223
223
|
alignment: z.ZodOptional<z.ZodEnum<{
|
|
224
224
|
left: "left";
|
|
225
|
-
center: "center";
|
|
226
225
|
right: "right";
|
|
226
|
+
center: "center";
|
|
227
227
|
}>>;
|
|
228
228
|
type: z.ZodLiteral<"video">;
|
|
229
229
|
width: z.ZodOptional<z.ZodNumber>;
|
|
@@ -280,10 +280,10 @@ export declare const NORMALIZED_QUESTION_SCHEMA: z.ZodObject<{
|
|
|
280
280
|
checkbox: "checkbox";
|
|
281
281
|
shortText: "shortText";
|
|
282
282
|
rating: "rating";
|
|
283
|
+
scale: "scale";
|
|
283
284
|
paragraph: "paragraph";
|
|
284
285
|
multipleChoice: "multipleChoice";
|
|
285
286
|
dropdown: "dropdown";
|
|
286
|
-
scale: "scale";
|
|
287
287
|
fileUpload: "fileUpload";
|
|
288
288
|
gridRow: "gridRow";
|
|
289
289
|
}>;
|
|
@@ -334,10 +334,10 @@ export declare const FORM_ITEM_SCHEMA: z.ZodObject<{
|
|
|
334
334
|
checkbox: "checkbox";
|
|
335
335
|
shortText: "shortText";
|
|
336
336
|
rating: "rating";
|
|
337
|
+
scale: "scale";
|
|
337
338
|
paragraph: "paragraph";
|
|
338
339
|
multipleChoice: "multipleChoice";
|
|
339
340
|
dropdown: "dropdown";
|
|
340
|
-
scale: "scale";
|
|
341
341
|
fileUpload: "fileUpload";
|
|
342
342
|
gridRow: "gridRow";
|
|
343
343
|
}>;
|
|
@@ -402,10 +402,10 @@ export declare const FORM_SCHEMA: z.ZodObject<{
|
|
|
402
402
|
checkbox: "checkbox";
|
|
403
403
|
shortText: "shortText";
|
|
404
404
|
rating: "rating";
|
|
405
|
+
scale: "scale";
|
|
405
406
|
paragraph: "paragraph";
|
|
406
407
|
multipleChoice: "multipleChoice";
|
|
407
408
|
dropdown: "dropdown";
|
|
408
|
-
scale: "scale";
|
|
409
409
|
fileUpload: "fileUpload";
|
|
410
410
|
gridRow: "gridRow";
|
|
411
411
|
}>;
|
|
@@ -571,10 +571,10 @@ export declare const FORM_BATCH_UPDATE_SCHEMA: z.ZodObject<{
|
|
|
571
571
|
checkbox: "checkbox";
|
|
572
572
|
shortText: "shortText";
|
|
573
573
|
rating: "rating";
|
|
574
|
+
scale: "scale";
|
|
574
575
|
paragraph: "paragraph";
|
|
575
576
|
multipleChoice: "multipleChoice";
|
|
576
577
|
dropdown: "dropdown";
|
|
577
|
-
scale: "scale";
|
|
578
578
|
fileUpload: "fileUpload";
|
|
579
579
|
gridRow: "gridRow";
|
|
580
580
|
}>;
|
|
@@ -4,16 +4,16 @@ export declare const MILLIONVERIFIER_FILE_STATUS_SCHEMA: z.ZodEnum<{
|
|
|
4
4
|
unknown: "unknown";
|
|
5
5
|
error: "error";
|
|
6
6
|
canceled: "canceled";
|
|
7
|
-
paused: "paused";
|
|
8
7
|
finished: "finished";
|
|
8
|
+
paused: "paused";
|
|
9
9
|
inProgress: "inProgress";
|
|
10
10
|
inQueueToStart: "inQueueToStart";
|
|
11
11
|
}>;
|
|
12
12
|
export declare const MILLIONVERIFIER_FILE_FILTER_STATUS_SCHEMA: z.ZodEnum<{
|
|
13
13
|
error: "error";
|
|
14
14
|
canceled: "canceled";
|
|
15
|
-
paused: "paused";
|
|
16
15
|
finished: "finished";
|
|
16
|
+
paused: "paused";
|
|
17
17
|
inProgress: "inProgress";
|
|
18
18
|
inQueueToStart: "inQueueToStart";
|
|
19
19
|
}>;
|
|
@@ -34,8 +34,8 @@ export declare const MILLIONVERIFIER_FILE_SCHEMA: z.ZodObject<{
|
|
|
34
34
|
unknown: "unknown";
|
|
35
35
|
error: "error";
|
|
36
36
|
canceled: "canceled";
|
|
37
|
-
paused: "paused";
|
|
38
37
|
finished: "finished";
|
|
38
|
+
paused: "paused";
|
|
39
39
|
inProgress: "inProgress";
|
|
40
40
|
inQueueToStart: "inQueueToStart";
|
|
41
41
|
}>;
|
|
@@ -105,8 +105,8 @@ export declare const MILLIONVERIFIER_FILE_WIRE_SCHEMA: z.ZodPipe<z.ZodObject<{
|
|
|
105
105
|
error: "error";
|
|
106
106
|
in_progress: "in_progress";
|
|
107
107
|
canceled: "canceled";
|
|
108
|
-
paused: "paused";
|
|
109
108
|
finished: "finished";
|
|
109
|
+
paused: "paused";
|
|
110
110
|
in_queue_to_start: "in_queue_to_start";
|
|
111
111
|
}>;
|
|
112
112
|
total_rows: z.ZodNumber;
|
|
@@ -128,7 +128,7 @@ export declare const MILLIONVERIFIER_FILE_WIRE_SCHEMA: z.ZodPipe<z.ZodObject<{
|
|
|
128
128
|
ok: number;
|
|
129
129
|
percent: number;
|
|
130
130
|
reverify: number;
|
|
131
|
-
status: "unknown" | "error" | "canceled" | "
|
|
131
|
+
status: "unknown" | "error" | "canceled" | "finished" | "paused" | "inProgress" | "inQueueToStart";
|
|
132
132
|
totalRows: number;
|
|
133
133
|
uniqueEmails: number;
|
|
134
134
|
unknown: number;
|
|
@@ -149,7 +149,7 @@ export declare const MILLIONVERIFIER_FILE_WIRE_SCHEMA: z.ZodPipe<z.ZodObject<{
|
|
|
149
149
|
ok: number;
|
|
150
150
|
percent: number;
|
|
151
151
|
reverify: number;
|
|
152
|
-
status: "unknown" | "error" | "in_progress" | "canceled" | "
|
|
152
|
+
status: "unknown" | "error" | "in_progress" | "canceled" | "finished" | "paused" | "in_queue_to_start";
|
|
153
153
|
total_rows: number;
|
|
154
154
|
unique_emails: number;
|
|
155
155
|
unknown: number;
|
|
@@ -234,4 +234,4 @@ export declare const MILLIONVERIFIER_CREDITS_WIRE_SCHEMA: z.ZodPipe<z.ZodObject<
|
|
|
234
234
|
*
|
|
235
235
|
* @param status - Public file status.
|
|
236
236
|
*/
|
|
237
|
-
export declare function toMillionVerifierFileStatus(status: z.output<typeof MILLIONVERIFIER_FILE_FILTER_STATUS_SCHEMA>): "error" | "in_progress" | "canceled" | "
|
|
237
|
+
export declare function toMillionVerifierFileStatus(status: z.output<typeof MILLIONVERIFIER_FILE_FILTER_STATUS_SCHEMA>): "error" | "in_progress" | "canceled" | "finished" | "paused" | "in_queue_to_start";
|