totalum-sdk 0.1.0-dev.10

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 (53) hide show
  1. package/README.md +18 -0
  2. package/dist/_types/billing.d-BbSZh1wY.d.ts +38 -0
  3. package/dist/_types/coerce.d-C0KIW76L.d.ts +6 -0
  4. package/dist/_types/errors.d-Cu3q_E_r.d.ts +3093 -0
  5. package/dist/_types/integrations.d-BNGV70e3.d.ts +793 -0
  6. package/dist/_types/ops.d-C9375KIG.d.ts +117 -0
  7. package/dist/ai/index.d.ts +424 -0
  8. package/dist/ai/index.js +185 -0
  9. package/dist/analytics/index.d.ts +35 -0
  10. package/dist/analytics/index.js +15 -0
  11. package/dist/browser/index.d.ts +1595 -0
  12. package/dist/browser/index.js +168 -0
  13. package/dist/cron/index.d.ts +180 -0
  14. package/dist/cron/index.js +61 -0
  15. package/dist/d1/errors.js +31 -0
  16. package/dist/d1/https.js +103 -0
  17. package/dist/d1/index.d.ts +107 -0
  18. package/dist/d1/index.js +73 -0
  19. package/dist/d1/lazy.js +112 -0
  20. package/dist/d1/libsql.js +125 -0
  21. package/dist/d1/session.js +38 -0
  22. package/dist/d1/sql.js +87 -0
  23. package/dist/d1/types.js +1 -0
  24. package/dist/email/index.d.ts +31 -0
  25. package/dist/email/index.js +30 -0
  26. package/dist/errors.js +35 -0
  27. package/dist/files/index.d.ts +119 -0
  28. package/dist/files/index.js +63 -0
  29. package/dist/http.js +85 -0
  30. package/dist/index.d.ts +73 -0
  31. package/dist/index.js +68 -0
  32. package/dist/logs/index.d.ts +51 -0
  33. package/dist/logs/index.js +18 -0
  34. package/dist/payments/index.d.ts +47 -0
  35. package/dist/payments/index.js +20 -0
  36. package/dist/pdf/index.d.ts +42 -0
  37. package/dist/pdf/index.js +17 -0
  38. package/dist/react/index.d.ts +91 -0
  39. package/dist/react/index.js +178 -0
  40. package/dist/realtime/index.d.ts +103 -0
  41. package/dist/realtime/index.js +30 -0
  42. package/dist/scan/index.d.ts +46 -0
  43. package/dist/scan/index.js +12 -0
  44. package/dist/seo/index.d.ts +23 -0
  45. package/dist/seo/index.js +12 -0
  46. package/dist/speech/index.d.ts +41 -0
  47. package/dist/speech/index.js +22 -0
  48. package/dist/web/index.d.ts +170 -0
  49. package/dist/web/index.js +31 -0
  50. package/dist/webhooks/index.d.ts +48 -0
  51. package/dist/webhooks/index.js +61 -0
  52. package/package.json +146 -0
  53. package/totalum-sdk.md +1088 -0
@@ -0,0 +1,793 @@
1
+ import { Z as ZodObject, d as ZodString, c as ZodOptional, f as ZodEnum, k as ZodNumber, j as ZodBoolean, m as $strip, o as output, p as ZodURL, e as ZodArray, n as ZodUnion, l as ZodInt, h as ZodRecord, v as ZodNullable, t as ZodISODateTime, w as ZodEmail, q as ZodLiteral, g as ZodUnknown } from './errors.d-Cu3q_E_r.js';
2
+ import { Z as ZodCoercedNumber } from './coerce.d-C0KIW76L.js';
3
+
4
+ /** `202` of every async integration call; `estimatedCredits` = the reserved estimate (settled to the real cost). */
5
+ declare const JobCreated: ZodObject<{
6
+ jobId: ZodString;
7
+ estimatedCredits: ZodOptional<ZodNumber>;
8
+ }, $strip>;
9
+ type JobCreated = output<typeof JobCreated>;
10
+ /**
11
+ * The file descriptor every file route answers (plan 04 §5.4; the `{fileName, fileSize, fileUrl}` convention A10.1
12
+ * keeps). `fileUrl` is the public `https://files.<zone>/<key>` URL, `null` when private (read it through a signed URL).
13
+ * `name`/`url`/`size`/`id`/`fileNameId` are the compat keys of the upload response (`fileNameId` = `key`).
14
+ */
15
+ declare const FileDescriptor: ZodObject<{
16
+ key: ZodString;
17
+ fileName: ZodString;
18
+ fileSize: ZodInt;
19
+ contentType: ZodString;
20
+ fileUrl: ZodNullable<ZodURL>;
21
+ visibility: ZodEnum<{
22
+ "public-by-link": "public-by-link";
23
+ private: "private";
24
+ }>;
25
+ createdAt: ZodISODateTime;
26
+ etag: ZodOptional<ZodString>;
27
+ storageClass: ZodOptional<ZodEnum<{
28
+ Standard: "Standard";
29
+ InfrequentAccess: "InfrequentAccess";
30
+ }>>;
31
+ name: ZodOptional<ZodString>;
32
+ url: ZodOptional<ZodNullable<ZodURL>>;
33
+ size: ZodOptional<ZodInt>;
34
+ id: ZodOptional<ZodString>;
35
+ fileNameId: ZodOptional<ZodString>;
36
+ }, $strip>;
37
+ type FileDescriptor = output<typeof FileDescriptor>;
38
+ /** `POST /v1/files/upload-url`: a presigned PUT bound to a fresh key + type + length, then `POST /v1/files/complete`. */
39
+ declare const FileUploadUrlInput: ZodObject<{
40
+ name: ZodString;
41
+ contentType: ZodString;
42
+ size: ZodInt;
43
+ folder: ZodOptional<ZodString>;
44
+ private: ZodOptional<ZodBoolean>;
45
+ }, $strip>;
46
+ type FileUploadUrlInput = output<typeof FileUploadUrlInput>;
47
+ declare const FileUploadUrlOutput: ZodObject<{
48
+ uploadUrl: ZodURL;
49
+ key: ZodString;
50
+ headers: ZodRecord<ZodString, ZodString>;
51
+ expiresAt: ZodISODateTime;
52
+ }, $strip>;
53
+ type FileUploadUrlOutput = output<typeof FileUploadUrlOutput>;
54
+ /** `GET /v1/files` query: folder/type, date range, size range, name search, ≤ 100 per page. */
55
+ declare const FilesListQuery: ZodObject<{
56
+ folder: ZodOptional<ZodString>;
57
+ type: ZodOptional<ZodString>;
58
+ name: ZodOptional<ZodString>;
59
+ createdFrom: ZodOptional<ZodISODateTime>;
60
+ createdTo: ZodOptional<ZodISODateTime>;
61
+ sizeFrom: ZodOptional<ZodCoercedNumber<unknown>>;
62
+ sizeTo: ZodOptional<ZodCoercedNumber<unknown>>;
63
+ cursor: ZodOptional<ZodString>;
64
+ limit: ZodOptional<ZodCoercedNumber<unknown>>;
65
+ }, $strip>;
66
+ type FilesListQuery = output<typeof FilesListQuery>;
67
+ declare const FilesPage: ZodObject<{
68
+ items: ZodArray<ZodObject<{
69
+ key: ZodString;
70
+ fileName: ZodString;
71
+ fileSize: ZodInt;
72
+ contentType: ZodString;
73
+ fileUrl: ZodNullable<ZodURL>;
74
+ visibility: ZodEnum<{
75
+ "public-by-link": "public-by-link";
76
+ private: "private";
77
+ }>;
78
+ createdAt: ZodISODateTime;
79
+ etag: ZodOptional<ZodString>;
80
+ storageClass: ZodOptional<ZodEnum<{
81
+ Standard: "Standard";
82
+ InfrequentAccess: "InfrequentAccess";
83
+ }>>;
84
+ name: ZodOptional<ZodString>;
85
+ url: ZodOptional<ZodNullable<ZodURL>>;
86
+ size: ZodOptional<ZodInt>;
87
+ id: ZodOptional<ZodString>;
88
+ fileNameId: ZodOptional<ZodString>;
89
+ }, $strip>>;
90
+ nextCursor: ZodNullable<ZodString>;
91
+ totalBytes: ZodInt;
92
+ fileCount: ZodInt;
93
+ }, $strip>;
94
+ type FilesPage = output<typeof FilesPage>;
95
+ /** `POST /v1/web/scrape` (≤ 55 s): one page, one retry with `proxy:'stealth'` on a block, then `502 SCRAPE_BLOCKED`. */
96
+ declare const WebScrapeInput: ZodObject<{
97
+ formats: ZodOptional<ZodArray<ZodEnum<{
98
+ screenshot: "screenshot";
99
+ markdown: "markdown";
100
+ html: "html";
101
+ rawHtml: "rawHtml";
102
+ links: "links";
103
+ json: "json";
104
+ summary: "summary";
105
+ }>>>;
106
+ onlyMainContent: ZodOptional<ZodBoolean>;
107
+ waitFor: ZodOptional<ZodInt>;
108
+ timeout: ZodOptional<ZodInt>;
109
+ proxy: ZodOptional<ZodEnum<{
110
+ basic: "basic";
111
+ stealth: "stealth";
112
+ auto: "auto";
113
+ }>>;
114
+ location: ZodOptional<ZodObject<{
115
+ country: ZodOptional<ZodString>;
116
+ languages: ZodOptional<ZodArray<ZodString>>;
117
+ }, $strip>>;
118
+ actions: ZodOptional<ZodArray<ZodRecord<ZodString, ZodUnknown>>>;
119
+ schema: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
120
+ prompt: ZodOptional<ZodString>;
121
+ cacheMaxAgeMs: ZodOptional<ZodInt>;
122
+ url: ZodURL;
123
+ }, $strip>;
124
+ type WebScrapeInput = output<typeof WebScrapeInput>;
125
+ declare const WebScrapeOutput: ZodObject<{
126
+ url: ZodURL;
127
+ statusCode: ZodInt;
128
+ markdown: ZodOptional<ZodString>;
129
+ html: ZodOptional<ZodString>;
130
+ rawHtml: ZodOptional<ZodString>;
131
+ links: ZodOptional<ZodArray<ZodString>>;
132
+ screenshotUrl: ZodOptional<ZodURL>;
133
+ json: ZodOptional<ZodUnknown>;
134
+ summary: ZodOptional<ZodString>;
135
+ metadata: ZodObject<{
136
+ title: ZodOptional<ZodString>;
137
+ description: ZodOptional<ZodString>;
138
+ language: ZodOptional<ZodString>;
139
+ sourceURL: ZodString;
140
+ }, $strip>;
141
+ contentUrl: ZodOptional<ZodURL>;
142
+ usage: ZodObject<{
143
+ credits: ZodNumber;
144
+ vendor: ZodOptional<ZodString>;
145
+ units: ZodOptional<ZodNumber>;
146
+ vendorCostUsd: ZodOptional<ZodNumber>;
147
+ }, $strip>;
148
+ }, $strip>;
149
+ type WebScrapeOutput = output<typeof WebScrapeOutput>;
150
+ /** `POST /v1/web/crawl` → `202 JobCreated`; `limit` ≤ the plan's max pages per crawl (default 100). */
151
+ declare const WebCrawlInput: ZodObject<{
152
+ url: ZodURL;
153
+ limit: ZodOptional<ZodInt>;
154
+ maxDepth: ZodOptional<ZodInt>;
155
+ includePaths: ZodOptional<ZodArray<ZodString>>;
156
+ excludePaths: ZodOptional<ZodArray<ZodString>>;
157
+ scrapeOptions: ZodOptional<ZodObject<{
158
+ formats: ZodOptional<ZodArray<ZodEnum<{
159
+ screenshot: "screenshot";
160
+ markdown: "markdown";
161
+ html: "html";
162
+ rawHtml: "rawHtml";
163
+ links: "links";
164
+ json: "json";
165
+ summary: "summary";
166
+ }>>>;
167
+ onlyMainContent: ZodOptional<ZodBoolean>;
168
+ waitFor: ZodOptional<ZodInt>;
169
+ timeout: ZodOptional<ZodInt>;
170
+ proxy: ZodOptional<ZodEnum<{
171
+ basic: "basic";
172
+ stealth: "stealth";
173
+ auto: "auto";
174
+ }>>;
175
+ location: ZodOptional<ZodObject<{
176
+ country: ZodOptional<ZodString>;
177
+ languages: ZodOptional<ZodArray<ZodString>>;
178
+ }, $strip>>;
179
+ actions: ZodOptional<ZodArray<ZodRecord<ZodString, ZodUnknown>>>;
180
+ schema: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
181
+ prompt: ZodOptional<ZodString>;
182
+ cacheMaxAgeMs: ZodOptional<ZodInt>;
183
+ }, $strip>>;
184
+ webhook: ZodOptional<ZodBoolean>;
185
+ }, $strip>;
186
+ type WebCrawlInput = output<typeof WebCrawlInput>;
187
+ /** `GET /v1/web/jobs/:jobId`: progress, the Firecrawl credits used, pages paged by `next`. */
188
+ declare const WebJob: ZodObject<{
189
+ jobId: ZodString;
190
+ status: ZodEnum<{
191
+ queued: "queued";
192
+ running: "running";
193
+ completed: "completed";
194
+ failed: "failed";
195
+ cancelled: "cancelled";
196
+ expired: "expired";
197
+ }>;
198
+ total: ZodInt;
199
+ completed: ZodInt;
200
+ creditsUsed: ZodNumber;
201
+ next: ZodOptional<ZodString>;
202
+ data: ZodArray<ZodObject<{
203
+ url: ZodURL;
204
+ statusCode: ZodInt;
205
+ markdown: ZodOptional<ZodString>;
206
+ html: ZodOptional<ZodString>;
207
+ rawHtml: ZodOptional<ZodString>;
208
+ links: ZodOptional<ZodArray<ZodString>>;
209
+ screenshotUrl: ZodOptional<ZodURL>;
210
+ json: ZodOptional<ZodUnknown>;
211
+ summary: ZodOptional<ZodString>;
212
+ metadata: ZodObject<{
213
+ title: ZodOptional<ZodString>;
214
+ description: ZodOptional<ZodString>;
215
+ language: ZodOptional<ZodString>;
216
+ sourceURL: ZodString;
217
+ }, $strip>;
218
+ contentUrl: ZodOptional<ZodURL>;
219
+ }, $strip>>;
220
+ resultUrl: ZodOptional<ZodURL>;
221
+ }, $strip>;
222
+ type WebJob = output<typeof WebJob>;
223
+ /** `POST /v1/web/map`. */
224
+ declare const WebMapInput: ZodObject<{
225
+ url: ZodURL;
226
+ search: ZodOptional<ZodString>;
227
+ limit: ZodOptional<ZodInt>;
228
+ }, $strip>;
229
+ type WebMapInput = output<typeof WebMapInput>;
230
+ /** `POST /v1/web/search` (Firecrawl `/search`); `scrapeOptions` scrapes the results inline. */
231
+ declare const WebSearchInput: ZodObject<{
232
+ query: ZodString;
233
+ limit: ZodOptional<ZodInt>;
234
+ sources: ZodOptional<ZodArray<ZodEnum<{
235
+ web: "web";
236
+ news: "news";
237
+ images: "images";
238
+ }>>>;
239
+ location: ZodOptional<ZodObject<{
240
+ country: ZodOptional<ZodString>;
241
+ city: ZodOptional<ZodString>;
242
+ }, $strip>>;
243
+ timeRange: ZodOptional<ZodEnum<{
244
+ day: "day";
245
+ month: "month";
246
+ week: "week";
247
+ year: "year";
248
+ }>>;
249
+ scrapeOptions: ZodOptional<ZodObject<{
250
+ formats: ZodOptional<ZodArray<ZodEnum<{
251
+ screenshot: "screenshot";
252
+ markdown: "markdown";
253
+ html: "html";
254
+ rawHtml: "rawHtml";
255
+ links: "links";
256
+ json: "json";
257
+ summary: "summary";
258
+ }>>>;
259
+ onlyMainContent: ZodOptional<ZodBoolean>;
260
+ waitFor: ZodOptional<ZodInt>;
261
+ timeout: ZodOptional<ZodInt>;
262
+ proxy: ZodOptional<ZodEnum<{
263
+ basic: "basic";
264
+ stealth: "stealth";
265
+ auto: "auto";
266
+ }>>;
267
+ location: ZodOptional<ZodObject<{
268
+ country: ZodOptional<ZodString>;
269
+ languages: ZodOptional<ZodArray<ZodString>>;
270
+ }, $strip>>;
271
+ actions: ZodOptional<ZodArray<ZodRecord<ZodString, ZodUnknown>>>;
272
+ schema: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
273
+ prompt: ZodOptional<ZodString>;
274
+ cacheMaxAgeMs: ZodOptional<ZodInt>;
275
+ }, $strip>>;
276
+ }, $strip>;
277
+ type WebSearchInput = output<typeof WebSearchInput>;
278
+ declare const WebSearchOutput: ZodObject<{
279
+ web: ZodArray<ZodObject<{
280
+ title: ZodString;
281
+ url: ZodString;
282
+ snippet: ZodOptional<ZodString>;
283
+ position: ZodInt;
284
+ }, $strip>>;
285
+ news: ZodOptional<ZodArray<ZodObject<{
286
+ title: ZodString;
287
+ url: ZodString;
288
+ snippet: ZodOptional<ZodString>;
289
+ position: ZodInt;
290
+ }, $strip>>>;
291
+ images: ZodOptional<ZodArray<ZodRecord<ZodString, ZodUnknown>>>;
292
+ scraped: ZodOptional<ZodArray<ZodObject<{
293
+ url: ZodURL;
294
+ statusCode: ZodInt;
295
+ markdown: ZodOptional<ZodString>;
296
+ html: ZodOptional<ZodString>;
297
+ rawHtml: ZodOptional<ZodString>;
298
+ links: ZodOptional<ZodArray<ZodString>>;
299
+ screenshotUrl: ZodOptional<ZodURL>;
300
+ json: ZodOptional<ZodUnknown>;
301
+ summary: ZodOptional<ZodString>;
302
+ metadata: ZodObject<{
303
+ title: ZodOptional<ZodString>;
304
+ description: ZodOptional<ZodString>;
305
+ language: ZodOptional<ZodString>;
306
+ sourceURL: ZodString;
307
+ }, $strip>;
308
+ contentUrl: ZodOptional<ZodURL>;
309
+ }, $strip>>>;
310
+ }, $strip>;
311
+ type WebSearchOutput = output<typeof WebSearchOutput>;
312
+ /** `POST /v1/web/screenshot` (Cloudflare Browser Run): stored in the project's R2 prefix; `base64` only with `inline`. */
313
+ declare const ScreenshotInput: ZodObject<{
314
+ url: ZodOptional<ZodURL>;
315
+ html: ZodOptional<ZodString>;
316
+ fullPage: ZodOptional<ZodBoolean>;
317
+ viewport: ZodOptional<ZodObject<{
318
+ width: ZodInt;
319
+ height: ZodInt;
320
+ }, $strip>>;
321
+ format: ZodOptional<ZodEnum<{
322
+ png: "png";
323
+ jpeg: "jpeg";
324
+ webp: "webp";
325
+ }>>;
326
+ waitForSelector: ZodOptional<ZodString>;
327
+ inline: ZodOptional<ZodBoolean>;
328
+ }, $strip>;
329
+ type ScreenshotInput = output<typeof ScreenshotInput>;
330
+ declare const ScreenshotOutput: ZodObject<{
331
+ key: ZodString;
332
+ url: ZodURL;
333
+ format: ZodEnum<{
334
+ png: "png";
335
+ jpeg: "jpeg";
336
+ webp: "webp";
337
+ }>;
338
+ base64: ZodOptional<ZodString>;
339
+ }, $strip>;
340
+ type ScreenshotOutput = output<typeof ScreenshotOutput>;
341
+ /** `POST /v1/pdf/from-html`: `html` or the v1 `base64HtmlString`, body ≤ 10 MB, never sanitised. */
342
+ declare const PdfFromHtmlInput: ZodObject<{
343
+ html: ZodOptional<ZodString>;
344
+ base64HtmlString: ZodOptional<ZodString>;
345
+ name: ZodString;
346
+ options: ZodOptional<ZodObject<{
347
+ format: ZodOptional<ZodString>;
348
+ landscape: ZodOptional<ZodBoolean>;
349
+ margin: ZodOptional<ZodRecord<ZodString, ZodString>>;
350
+ printBackground: ZodOptional<ZodBoolean>;
351
+ headerTemplate: ZodOptional<ZodString>;
352
+ footerTemplate: ZodOptional<ZodString>;
353
+ displayHeaderFooter: ZodOptional<ZodBoolean>;
354
+ }, $strip>>;
355
+ waitForSelector: ZodOptional<ZodString>;
356
+ }, $strip>;
357
+ type PdfFromHtmlInput = output<typeof PdfFromHtmlInput>;
358
+ /** `POST /v1/pdf/from-url` (SSRF-guarded). */
359
+ declare const PdfFromUrlInput: ZodObject<{
360
+ url: ZodURL;
361
+ name: ZodString;
362
+ options: ZodOptional<ZodObject<{
363
+ format: ZodOptional<ZodString>;
364
+ landscape: ZodOptional<ZodBoolean>;
365
+ margin: ZodOptional<ZodRecord<ZodString, ZodString>>;
366
+ printBackground: ZodOptional<ZodBoolean>;
367
+ headerTemplate: ZodOptional<ZodString>;
368
+ footerTemplate: ZodOptional<ZodString>;
369
+ displayHeaderFooter: ZodOptional<ZodBoolean>;
370
+ }, $strip>>;
371
+ cookies: ZodOptional<ZodArray<ZodRecord<ZodString, ZodUnknown>>>;
372
+ headers: ZodOptional<ZodRecord<ZodString, ZodString>>;
373
+ }, $strip>;
374
+ type PdfFromUrlInput = output<typeof PdfFromUrlInput>;
375
+ /** v1 `{url, fileName}` kept, plus the R2 `key`; a new file each time. */
376
+ declare const PdfOutput: ZodObject<{
377
+ url: ZodURL;
378
+ fileName: ZodString;
379
+ key: ZodString;
380
+ }, $strip>;
381
+ type PdfOutput = output<typeof PdfOutput>;
382
+ /** `POST /v1/scan/document`: v1 input contract; > 10 pages answers `202 JobCreated` (`GET /v1/scan/jobs/:jobId`). */
383
+ declare const ScanDocumentInput: ZodObject<{
384
+ properties: ZodRecord<ZodString, ZodRecord<ZodString, ZodUnknown>>;
385
+ options: ZodOptional<ZodObject<{
386
+ model: ZodOptional<ZodEnum<{
387
+ scanum: "scanum";
388
+ "scanum-pro": "scanum-pro";
389
+ "scanum-eye": "scanum-eye";
390
+ "scanum-eye-pro": "scanum-eye-pro";
391
+ }>>;
392
+ removeFileAfterScan: ZodOptional<ZodBoolean>;
393
+ returnOcrFullResult: ZodOptional<ZodBoolean>;
394
+ scanDescription: ZodOptional<ZodString>;
395
+ processEveryPdfPageAsDifferentScan: ZodOptional<ZodBoolean>;
396
+ maxPages: ZodOptional<ZodInt>;
397
+ pdfPages: ZodOptional<ZodArray<ZodInt>>;
398
+ minimumConfidence: ZodOptional<ZodNumber>;
399
+ }, $strip>>;
400
+ fileName: ZodOptional<ZodString>;
401
+ key: ZodOptional<ZodString>;
402
+ url: ZodOptional<ZodURL>;
403
+ }, $strip>;
404
+ type ScanDocumentInput = output<typeof ScanDocumentInput>;
405
+ /** `POST /v1/scan/ocr` (replaces `/files/ocr/image` and `/files/ocr/pdf`). */
406
+ declare const ScanOcrInput: ZodObject<{
407
+ pages: ZodOptional<ZodArray<ZodInt>>;
408
+ fileName: ZodOptional<ZodString>;
409
+ key: ZodOptional<ZodString>;
410
+ url: ZodOptional<ZodURL>;
411
+ }, $strip>;
412
+ type ScanOcrInput = output<typeof ScanOcrInput>;
413
+ declare const ScanOcrOutput: ZodObject<{
414
+ text: ZodString;
415
+ pages: ZodArray<ZodObject<{
416
+ markdown: ZodString;
417
+ width: ZodNumber;
418
+ height: ZodNumber;
419
+ words: ZodOptional<ZodArray<ZodObject<{
420
+ text: ZodString;
421
+ bbox: ZodArray<ZodNumber>;
422
+ }, $strip>>>;
423
+ }, $strip>>;
424
+ fullDetails: ZodOptional<ZodUnknown>;
425
+ }, $strip>;
426
+ type ScanOcrOutput = output<typeof ScanOcrOutput>;
427
+ /** `POST /v1/speech/transcribe` JSON form (≤ 25 MB; multipart `file` is the other form); v1 `{audioBase64, filename}`. */
428
+ declare const TranscribeInput: ZodObject<{
429
+ audioBase64: ZodOptional<ZodString>;
430
+ filename: ZodOptional<ZodString>;
431
+ url: ZodOptional<ZodURL>;
432
+ language: ZodOptional<ZodString>;
433
+ model: ZodOptional<ZodEnum<{
434
+ fast: "fast";
435
+ accurate: "accurate";
436
+ }>>;
437
+ diarize: ZodOptional<ZodBoolean>;
438
+ timestamps: ZodOptional<ZodEnum<{
439
+ word: "word";
440
+ segment: "segment";
441
+ }>>;
442
+ keyterms: ZodOptional<ZodArray<ZodString>>;
443
+ }, $strip>;
444
+ type TranscribeInput = output<typeof TranscribeInput>;
445
+ /** v1 `{text}` superset. */
446
+ declare const TranscribeOutput: ZodObject<{
447
+ text: ZodString;
448
+ language: ZodOptional<ZodString>;
449
+ durationSec: ZodNumber;
450
+ segments: ZodOptional<ZodArray<ZodObject<{
451
+ start: ZodNumber;
452
+ end: ZodNumber;
453
+ text: ZodString;
454
+ }, $strip>>>;
455
+ words: ZodOptional<ZodArray<ZodObject<{
456
+ word: ZodString;
457
+ start: ZodNumber;
458
+ end: ZodNumber;
459
+ }, $strip>>>;
460
+ usage: ZodObject<{
461
+ credits: ZodNumber;
462
+ vendor: ZodOptional<ZodString>;
463
+ units: ZodOptional<ZodNumber>;
464
+ vendorCostUsd: ZodOptional<ZodNumber>;
465
+ }, $strip>;
466
+ }, $strip>;
467
+ type TranscribeOutput = output<typeof TranscribeOutput>;
468
+ /** `POST /v1/speech/speak`: an `audio/*` body (header `X-Totalum-Credits`), or `StoredMedia` with `store:true`. */
469
+ declare const SpeakInput: ZodObject<{
470
+ text: ZodString;
471
+ voice: ZodOptional<ZodString>;
472
+ language: ZodOptional<ZodString>;
473
+ model: ZodOptional<ZodEnum<{
474
+ standard: "standard";
475
+ premium: "premium";
476
+ }>>;
477
+ format: ZodOptional<ZodEnum<{
478
+ mp3: "mp3";
479
+ wav: "wav";
480
+ opus: "opus";
481
+ }>>;
482
+ speed: ZodOptional<ZodNumber>;
483
+ store: ZodOptional<ZodBoolean>;
484
+ }, $strip>;
485
+ type SpeakInput = output<typeof SpeakInput>;
486
+ /** An integration output written to R2 through the storage gate (TTS audio, images, video, screenshots). */
487
+ declare const StoredMedia: ZodObject<{
488
+ key: ZodString;
489
+ url: ZodURL;
490
+ usage: ZodObject<{
491
+ credits: ZodNumber;
492
+ vendor: ZodOptional<ZodString>;
493
+ units: ZodOptional<ZodNumber>;
494
+ vendorCostUsd: ZodOptional<ZodNumber>;
495
+ }, $strip>;
496
+ }, $strip>;
497
+ type StoredMedia = output<typeof StoredMedia>;
498
+ /** `POST /v1/email/send`: HTML forwarded byte-for-byte; ≤ 50 recipients across to/cc/bcc; ≤ 10 attachments. */
499
+ declare const EmailSendInput: ZodObject<{
500
+ to: ZodUnion<readonly [ZodEmail, ZodArray<ZodEmail>]>;
501
+ subject: ZodString;
502
+ html: ZodOptional<ZodString>;
503
+ text: ZodOptional<ZodString>;
504
+ from: ZodOptional<ZodObject<{
505
+ name: ZodOptional<ZodString>;
506
+ localPart: ZodOptional<ZodString>;
507
+ domain: ZodOptional<ZodString>;
508
+ }, $strip>>;
509
+ replyTo: ZodOptional<ZodUnion<readonly [ZodEmail, ZodArray<ZodEmail>]>>;
510
+ cc: ZodOptional<ZodUnion<readonly [ZodEmail, ZodArray<ZodEmail>]>>;
511
+ bcc: ZodOptional<ZodUnion<readonly [ZodEmail, ZodArray<ZodEmail>]>>;
512
+ headers: ZodOptional<ZodRecord<ZodString, ZodString>>;
513
+ attachments: ZodOptional<ZodArray<ZodObject<{
514
+ filename: ZodString;
515
+ url: ZodOptional<ZodURL>;
516
+ content: ZodOptional<ZodString>;
517
+ contentType: ZodOptional<ZodString>;
518
+ }, $strip>>>;
519
+ tags: ZodOptional<ZodArray<ZodObject<{
520
+ name: ZodString;
521
+ value: ZodString;
522
+ }, $strip>>>;
523
+ scheduledAt: ZodOptional<ZodISODateTime>;
524
+ idempotencyKey: ZodOptional<ZodString>;
525
+ bulk: ZodOptional<ZodBoolean>;
526
+ }, $strip>;
527
+ type EmailSendInput = output<typeof EmailSendInput>;
528
+ /** v1 keys kept (`success`, `message`, `messageId`). */
529
+ declare const EmailSendOutput: ZodObject<{
530
+ success: ZodLiteral<true>;
531
+ message: ZodLiteral<"Email sent successfully">;
532
+ messageId: ZodString;
533
+ id: ZodString;
534
+ status: ZodEnum<{
535
+ queued: "queued";
536
+ sent: "sent";
537
+ }>;
538
+ }, $strip>;
539
+ type EmailSendOutput = output<typeof EmailSendOutput>;
540
+ /** `GET /v1/email/:id`. */
541
+ declare const EmailView: ZodObject<{
542
+ id: ZodString;
543
+ from: ZodString;
544
+ to: ZodArray<ZodString>;
545
+ subject: ZodString;
546
+ status: ZodEnum<{
547
+ queued: "queued";
548
+ failed: "failed";
549
+ sent: "sent";
550
+ delivered: "delivered";
551
+ delayed: "delayed";
552
+ bounced: "bounced";
553
+ complained: "complained";
554
+ suppressed: "suppressed";
555
+ }>;
556
+ lastEventAt: ZodNullable<ZodISODateTime>;
557
+ events: ZodArray<ZodObject<{
558
+ type: ZodString;
559
+ at: ZodISODateTime;
560
+ detail: ZodOptional<ZodUnknown>;
561
+ }, $strip>>;
562
+ }, $strip>;
563
+ type EmailView = output<typeof EmailView>;
564
+ /** `POST /v1/cron/jobs`; header values may reference `{{secret:NAME}}` (resolved by PGM at fire time). */
565
+ declare const CronJobInput: ZodObject<{
566
+ name: ZodString;
567
+ schedule: ZodUnion<readonly [ZodString, ZodObject<{
568
+ everyMinutes: ZodInt;
569
+ }, $strip>]>;
570
+ request: ZodObject<{
571
+ method: ZodEnum<{
572
+ GET: "GET";
573
+ POST: "POST";
574
+ }>;
575
+ url: ZodURL;
576
+ headers: ZodOptional<ZodRecord<ZodString, ZodString>>;
577
+ body: ZodOptional<ZodString>;
578
+ timeoutMs: ZodOptional<ZodInt>;
579
+ }, $strip>;
580
+ enabled: ZodOptional<ZodBoolean>;
581
+ description: ZodOptional<ZodString>;
582
+ env: ZodOptional<ZodEnum<{
583
+ dev: "dev";
584
+ live: "live";
585
+ }>>;
586
+ }, $strip>;
587
+ type CronJobInput = output<typeof CronJobInput>;
588
+ /** `PATCH /v1/cron/jobs/:id`: any create field. */
589
+ declare const CronJobPatch: ZodObject<{
590
+ name: ZodOptional<ZodString>;
591
+ schedule: ZodOptional<ZodUnion<readonly [ZodString, ZodObject<{
592
+ everyMinutes: ZodInt;
593
+ }, $strip>]>>;
594
+ request: ZodOptional<ZodObject<{
595
+ method: ZodEnum<{
596
+ GET: "GET";
597
+ POST: "POST";
598
+ }>;
599
+ url: ZodURL;
600
+ headers: ZodOptional<ZodRecord<ZodString, ZodString>>;
601
+ body: ZodOptional<ZodString>;
602
+ timeoutMs: ZodOptional<ZodInt>;
603
+ }, $strip>>;
604
+ enabled: ZodOptional<ZodOptional<ZodBoolean>>;
605
+ description: ZodOptional<ZodOptional<ZodString>>;
606
+ env: ZodOptional<ZodOptional<ZodEnum<{
607
+ dev: "dev";
608
+ live: "live";
609
+ }>>>;
610
+ }, $strip>;
611
+ type CronJobPatch = output<typeof CronJobPatch>;
612
+ /** A job row (secret references unresolved). `paused_failures` after 3 consecutive failures. */
613
+ declare const CronJob: ZodObject<{
614
+ id: ZodString;
615
+ name: ZodString;
616
+ schedule: ZodUnion<readonly [ZodString, ZodObject<{
617
+ everyMinutes: ZodInt;
618
+ }, $strip>]>;
619
+ request: ZodObject<{
620
+ method: ZodEnum<{
621
+ GET: "GET";
622
+ POST: "POST";
623
+ }>;
624
+ url: ZodURL;
625
+ headers: ZodOptional<ZodRecord<ZodString, ZodString>>;
626
+ body: ZodOptional<ZodString>;
627
+ timeoutMs: ZodOptional<ZodInt>;
628
+ }, $strip>;
629
+ enabled: ZodBoolean;
630
+ status: ZodEnum<{
631
+ active: "active";
632
+ paused: "paused";
633
+ paused_failures: "paused_failures";
634
+ }>;
635
+ nextRunAt: ZodNullable<ZodISODateTime>;
636
+ lastRun: ZodOptional<ZodObject<{
637
+ at: ZodISODateTime;
638
+ status: ZodUnion<readonly [ZodInt, ZodEnum<{
639
+ error: "error";
640
+ timeout: "timeout";
641
+ skipped: "skipped";
642
+ }>]>;
643
+ latencyMs: ZodInt;
644
+ }, $strip>>;
645
+ createdAt: ZodISODateTime;
646
+ description: ZodOptional<ZodString>;
647
+ env: ZodEnum<{
648
+ dev: "dev";
649
+ live: "live";
650
+ }>;
651
+ }, $strip>;
652
+ type CronJob = output<typeof CronJob>;
653
+ /**
654
+ * One execution (`GET /v1/cron/jobs/:id/runs`, retention 30 days): `status` = the HTTP status of the fired request,
655
+ * or `timeout` / `error`, or `skipped` (not fired: balance ≤ 0 or the `cron` feature capped — `error` says which).
656
+ */
657
+ declare const CronRun: ZodObject<{
658
+ id: ZodString;
659
+ scheduledFor: ZodISODateTime;
660
+ startedAt: ZodNullable<ZodISODateTime>;
661
+ status: ZodUnion<readonly [ZodInt, ZodEnum<{
662
+ error: "error";
663
+ timeout: "timeout";
664
+ skipped: "skipped";
665
+ }>]>;
666
+ latencyMs: ZodNullable<ZodInt>;
667
+ error: ZodOptional<ZodString>;
668
+ responseSnippet: ZodOptional<ZodString>;
669
+ }, $strip>;
670
+ type CronRun = output<typeof CronRun>;
671
+ declare const CronRunsPage: ZodObject<{
672
+ items: ZodArray<ZodObject<{
673
+ id: ZodString;
674
+ scheduledFor: ZodISODateTime;
675
+ startedAt: ZodNullable<ZodISODateTime>;
676
+ status: ZodUnion<readonly [ZodInt, ZodEnum<{
677
+ error: "error";
678
+ timeout: "timeout";
679
+ skipped: "skipped";
680
+ }>]>;
681
+ latencyMs: ZodNullable<ZodInt>;
682
+ error: ZodOptional<ZodString>;
683
+ responseSnippet: ZodOptional<ZodString>;
684
+ }, $strip>>;
685
+ nextCursor: ZodNullable<ZodString>;
686
+ }, $strip>;
687
+ type CronRunsPage = output<typeof CronRunsPage>;
688
+ /** Totalum's own zones are never pinged (`skipped_no_custom_domain`); Google reads sitemaps, not IndexNow. */
689
+ declare const SeoNotifyOutput: ZodObject<{
690
+ accepted: ZodInt;
691
+ indexNow: ZodEnum<{
692
+ error: "error";
693
+ sent: "sent";
694
+ skipped_no_custom_domain: "skipped_no_custom_domain";
695
+ }>;
696
+ sitemapsPinged: ZodBoolean;
697
+ }, $strip>;
698
+ type SeoNotifyOutput = output<typeof SeoNotifyOutput>;
699
+ /** `GET /v1/seo/indexnow-key`: the per-project key the template serves at `/<key>.txt`. */
700
+ declare const SeoIndexNowKey: ZodObject<{
701
+ key: ZodString;
702
+ keyLocation: ZodURL;
703
+ }, $strip>;
704
+ type SeoIndexNowKey = output<typeof SeoIndexNowKey>;
705
+ /** `GET /v1/payments/status`: `livemode` follows the request env (dev/sandbox key → the test connected account). */
706
+ declare const PaymentsStatus: ZodObject<{
707
+ enabled: ZodBoolean;
708
+ mode: ZodEnum<{
709
+ connect: "connect";
710
+ own_key: "own_key";
711
+ }>;
712
+ accountId: ZodNullable<ZodString>;
713
+ livemode: ZodBoolean;
714
+ chargesEnabled: ZodBoolean;
715
+ payoutsEnabled: ZodBoolean;
716
+ detailsSubmitted: ZodBoolean;
717
+ requirements: ZodObject<{
718
+ currentlyDue: ZodArray<ZodString>;
719
+ pastDue: ZodArray<ZodString>;
720
+ eventuallyDue: ZodArray<ZodString>;
721
+ }, $strip>;
722
+ applicationFeeBps: ZodInt;
723
+ }, $strip>;
724
+ type PaymentsStatus = output<typeof PaymentsStatus>;
725
+ /**
726
+ * `POST /v1/payments/onboarding-link` (owner-only via the platform): Stripe's hosted onboarding, single use. The first
727
+ * call creates the connected account, and Stripe needs its `country` then (ISO 3166-1 alpha-2, immutable afterwards).
728
+ */
729
+ declare const OnboardingLinkInput: ZodObject<{
730
+ returnUrl: ZodURL;
731
+ refreshUrl: ZodURL;
732
+ type: ZodOptional<ZodEnum<{
733
+ account_onboarding: "account_onboarding";
734
+ account_update: "account_update";
735
+ }>>;
736
+ country: ZodOptional<ZodString>;
737
+ }, $strip>;
738
+ type OnboardingLinkInput = output<typeof OnboardingLinkInput>;
739
+ declare const OnboardingLinkOutput: ZodObject<{
740
+ url: ZodURL;
741
+ expiresAt: ZodISODateTime;
742
+ }, $strip>;
743
+ type OnboardingLinkOutput = output<typeof OnboardingLinkOutput>;
744
+ /**
745
+ * `POST /v1/payments/checkout` — the direct charge: a hosted Checkout Session on the connected account
746
+ * (`Stripe-Account`), SDK-API injects the application fee; any `card[...]` field → `400 CARD_DATA_NOT_ACCEPTED`.
747
+ * `mode: 'setup'` saves a card for a later charge (plan 11 §9.5): no `lineItems`, and `currency` is required — Stripe
748
+ * asks for one in setup mode.
749
+ */
750
+ declare const CheckoutInput: ZodObject<{
751
+ lineItems: ZodOptional<ZodArray<ZodUnion<readonly [ZodObject<{
752
+ priceId: ZodString;
753
+ quantity: ZodInt;
754
+ }, $strip>, ZodObject<{
755
+ name: ZodString;
756
+ unitAmount: ZodInt;
757
+ currency: ZodString;
758
+ quantity: ZodInt;
759
+ }, $strip>]>>>;
760
+ mode: ZodEnum<{
761
+ payment: "payment";
762
+ subscription: "subscription";
763
+ setup: "setup";
764
+ }>;
765
+ currency: ZodOptional<ZodString>;
766
+ successUrl: ZodURL;
767
+ cancelUrl: ZodURL;
768
+ customerEmail: ZodOptional<ZodEmail>;
769
+ customerId: ZodOptional<ZodString>;
770
+ metadata: ZodOptional<ZodRecord<ZodString, ZodString>>;
771
+ allowPromotionCodes: ZodOptional<ZodBoolean>;
772
+ automaticTax: ZodOptional<ZodBoolean>;
773
+ trialDays: ZodOptional<ZodInt>;
774
+ clientReferenceId: ZodOptional<ZodString>;
775
+ }, $strip>;
776
+ type CheckoutInput = output<typeof CheckoutInput>;
777
+ declare const CheckoutOutput: ZodObject<{
778
+ id: ZodString;
779
+ url: ZodURL;
780
+ }, $strip>;
781
+ type CheckoutOutput = output<typeof CheckoutOutput>;
782
+ /** `POST /v1/payments/customer-portal-link`: Stripe's hosted customer portal on the connected account (sweep 50). */
783
+ declare const CustomerPortalLinkInput: ZodObject<{
784
+ customerId: ZodString;
785
+ returnUrl: ZodURL;
786
+ }, $strip>;
787
+ type CustomerPortalLinkInput = output<typeof CustomerPortalLinkInput>;
788
+ declare const CustomerPortalLinkOutput: ZodObject<{
789
+ url: ZodURL;
790
+ }, $strip>;
791
+ type CustomerPortalLinkOutput = output<typeof CustomerPortalLinkOutput>;
792
+
793
+ export { TranscribeOutput as A, WebScrapeOutput as B, CheckoutInput as C, WebSearchOutput as D, EmailSendInput as E, FileDescriptor as F, WebScrapeInput as G, WebSearchInput as H, WebMapInput as I, JobCreated as J, WebCrawlInput as K, OnboardingLinkInput as O, PaymentsStatus as P, ScanDocumentInput as S, TranscribeInput as T, WebJob as W, CheckoutOutput as a, CronJob as b, CronJobInput as c, CronJobPatch as d, CronRun as e, CronRunsPage as f, CustomerPortalLinkInput as g, CustomerPortalLinkOutput as h, EmailSendOutput as i, EmailView as j, FileUploadUrlInput as k, FileUploadUrlOutput as l, FilesListQuery as m, FilesPage as n, OnboardingLinkOutput as o, PdfFromHtmlInput as p, PdfFromUrlInput as q, PdfOutput as r, ScanOcrInput as s, ScanOcrOutput as t, ScreenshotInput as u, ScreenshotOutput as v, SeoIndexNowKey as w, SeoNotifyOutput as x, SpeakInput as y, StoredMedia as z };