@papierapi/sdk 0.1.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.
@@ -0,0 +1,979 @@
1
+ import { z } from "zod";
2
+ export declare const ChannelSchema: z.ZodEnum<{
3
+ letter: "letter";
4
+ fax: "fax";
5
+ }>;
6
+ export type Channel = z.infer<typeof ChannelSchema>;
7
+ export declare const ProviderNameSchema: z.ZodEnum<{
8
+ onlinebrief24: "onlinebrief24";
9
+ pingen: "pingen";
10
+ faxsuite: "faxsuite";
11
+ mock: "mock";
12
+ }>;
13
+ export type ProviderName = z.infer<typeof ProviderNameSchema>;
14
+ export declare const DraftStatusSchema: z.ZodEnum<{
15
+ draft: "draft";
16
+ validated: "validated";
17
+ quoted: "quoted";
18
+ awaiting_approval: "awaiting_approval";
19
+ approved: "approved";
20
+ cancelled: "cancelled";
21
+ }>;
22
+ export type DraftStatus = z.infer<typeof DraftStatusSchema>;
23
+ export declare const DispatchStatusSchema: z.ZodEnum<{
24
+ failed: "failed";
25
+ cancelled: "cancelled";
26
+ funds_reserved: "funds_reserved";
27
+ submitting: "submitting";
28
+ provider_accepted: "provider_accepted";
29
+ producing: "producing";
30
+ sending: "sending";
31
+ handed_to_carrier: "handed_to_carrier";
32
+ delivered: "delivered";
33
+ returned: "returned";
34
+ cancellation_pending: "cancellation_pending";
35
+ }>;
36
+ export type DispatchStatus = z.infer<typeof DispatchStatusSchema>;
37
+ export declare const DraftSchema: z.ZodObject<{
38
+ id: z.ZodString;
39
+ channel: z.ZodEnum<{
40
+ letter: "letter";
41
+ fax: "fax";
42
+ }>;
43
+ status: z.ZodEnum<{
44
+ draft: "draft";
45
+ validated: "validated";
46
+ quoted: "quoted";
47
+ awaiting_approval: "awaiting_approval";
48
+ approved: "approved";
49
+ cancelled: "cancelled";
50
+ }>;
51
+ content_sha256: z.ZodString;
52
+ page_count: z.ZodInt;
53
+ recipient_display: z.ZodString;
54
+ verification: z.ZodObject<{
55
+ status: z.ZodEnum<{
56
+ passed: "passed";
57
+ warning: "warning";
58
+ failed: "failed";
59
+ }>;
60
+ checks: z.ZodArray<z.ZodObject<{
61
+ id: z.ZodString;
62
+ version: z.ZodString;
63
+ status: z.ZodEnum<{
64
+ passed: "passed";
65
+ warning: "warning";
66
+ failed: "failed";
67
+ skipped: "skipped";
68
+ }>;
69
+ rule: z.ZodString;
70
+ evidence: z.ZodRecord<z.ZodString, z.ZodUnknown>;
71
+ violations: z.ZodArray<z.ZodObject<{
72
+ code: z.ZodString;
73
+ field_path: z.ZodOptional<z.ZodString>;
74
+ page: z.ZodOptional<z.ZodInt>;
75
+ rule: z.ZodString;
76
+ message: z.ZodString;
77
+ suggested_action: z.ZodString;
78
+ }, z.core.$strict>>;
79
+ duration_ms: z.ZodInt;
80
+ }, z.core.$strict>>;
81
+ verifier_version: z.ZodString;
82
+ }, z.core.$strict>;
83
+ preview_url: z.ZodURL;
84
+ preview_expires_at: z.ZodISODateTime;
85
+ created_at: z.ZodISODateTime;
86
+ updated_at: z.ZodISODateTime;
87
+ }, z.core.$strict>;
88
+ export type Draft = z.infer<typeof DraftSchema>;
89
+ export declare const ApprovalLetterDraftSchema: z.ZodObject<{
90
+ id: z.ZodString;
91
+ status: z.ZodEnum<{
92
+ draft: "draft";
93
+ validated: "validated";
94
+ quoted: "quoted";
95
+ awaiting_approval: "awaiting_approval";
96
+ approved: "approved";
97
+ cancelled: "cancelled";
98
+ }>;
99
+ created_at: z.ZodISODateTime;
100
+ updated_at: z.ZodISODateTime;
101
+ verification: z.ZodObject<{
102
+ status: z.ZodEnum<{
103
+ passed: "passed";
104
+ warning: "warning";
105
+ failed: "failed";
106
+ }>;
107
+ checks: z.ZodArray<z.ZodObject<{
108
+ id: z.ZodString;
109
+ version: z.ZodString;
110
+ status: z.ZodEnum<{
111
+ passed: "passed";
112
+ warning: "warning";
113
+ failed: "failed";
114
+ skipped: "skipped";
115
+ }>;
116
+ rule: z.ZodString;
117
+ evidence: z.ZodRecord<z.ZodString, z.ZodUnknown>;
118
+ violations: z.ZodArray<z.ZodObject<{
119
+ code: z.ZodString;
120
+ field_path: z.ZodOptional<z.ZodString>;
121
+ page: z.ZodOptional<z.ZodInt>;
122
+ rule: z.ZodString;
123
+ message: z.ZodString;
124
+ suggested_action: z.ZodString;
125
+ }, z.core.$strict>>;
126
+ duration_ms: z.ZodInt;
127
+ }, z.core.$strict>>;
128
+ verifier_version: z.ZodString;
129
+ }, z.core.$strict>;
130
+ content_sha256: z.ZodString;
131
+ preview_expires_at: z.ZodISODateTime;
132
+ page_count: z.ZodInt;
133
+ preview_url: z.ZodURL;
134
+ channel: z.ZodLiteral<"letter">;
135
+ recipient: z.ZodDiscriminatedUnion<[z.ZodObject<{
136
+ type: z.ZodDefault<z.ZodLiteral<"street">>;
137
+ company: z.ZodOptional<z.ZodString>;
138
+ name: z.ZodString;
139
+ attention: z.ZodOptional<z.ZodString>;
140
+ additional_line: z.ZodOptional<z.ZodString>;
141
+ street: z.ZodString;
142
+ house_number: z.ZodString;
143
+ postal_code: z.ZodString;
144
+ city: z.ZodString;
145
+ country: z.ZodLiteral<"DE">;
146
+ }, z.core.$strict>, z.ZodObject<{
147
+ type: z.ZodLiteral<"post_box">;
148
+ company: z.ZodOptional<z.ZodString>;
149
+ name: z.ZodString;
150
+ attention: z.ZodOptional<z.ZodString>;
151
+ post_box: z.ZodString;
152
+ postal_code: z.ZodString;
153
+ city: z.ZodString;
154
+ country: z.ZodLiteral<"DE">;
155
+ }, z.core.$strict>], "type">;
156
+ sender: z.ZodObject<{
157
+ name: z.ZodString;
158
+ company: z.ZodOptional<z.ZodString>;
159
+ street: z.ZodString;
160
+ house_number: z.ZodString;
161
+ postal_code: z.ZodString;
162
+ city: z.ZodString;
163
+ country: z.ZodLiteral<"DE">;
164
+ email: z.ZodOptional<z.ZodEmail>;
165
+ }, z.core.$strict>;
166
+ options: z.ZodObject<{
167
+ print: z.ZodEnum<{
168
+ grayscale: "grayscale";
169
+ color: "color";
170
+ }>;
171
+ duplex: z.ZodBoolean;
172
+ service: z.ZodEnum<{
173
+ standard: "standard";
174
+ registered_insertion: "registered_insertion";
175
+ registered_signature: "registered_signature";
176
+ }>;
177
+ criticality: z.ZodDefault<z.ZodEnum<{
178
+ normal: "normal";
179
+ high: "high";
180
+ }>>;
181
+ layout_profile: z.ZodDefault<z.ZodEnum<{
182
+ de_business_window_a: "de_business_window_a";
183
+ de_business_window_b: "de_business_window_b";
184
+ de_business_no_window: "de_business_no_window";
185
+ }>>;
186
+ }, z.core.$strict>;
187
+ }, z.core.$strict>;
188
+ export declare const ApprovalFaxDraftSchema: z.ZodObject<{
189
+ id: z.ZodString;
190
+ status: z.ZodEnum<{
191
+ draft: "draft";
192
+ validated: "validated";
193
+ quoted: "quoted";
194
+ awaiting_approval: "awaiting_approval";
195
+ approved: "approved";
196
+ cancelled: "cancelled";
197
+ }>;
198
+ created_at: z.ZodISODateTime;
199
+ updated_at: z.ZodISODateTime;
200
+ verification: z.ZodObject<{
201
+ status: z.ZodEnum<{
202
+ passed: "passed";
203
+ warning: "warning";
204
+ failed: "failed";
205
+ }>;
206
+ checks: z.ZodArray<z.ZodObject<{
207
+ id: z.ZodString;
208
+ version: z.ZodString;
209
+ status: z.ZodEnum<{
210
+ passed: "passed";
211
+ warning: "warning";
212
+ failed: "failed";
213
+ skipped: "skipped";
214
+ }>;
215
+ rule: z.ZodString;
216
+ evidence: z.ZodRecord<z.ZodString, z.ZodUnknown>;
217
+ violations: z.ZodArray<z.ZodObject<{
218
+ code: z.ZodString;
219
+ field_path: z.ZodOptional<z.ZodString>;
220
+ page: z.ZodOptional<z.ZodInt>;
221
+ rule: z.ZodString;
222
+ message: z.ZodString;
223
+ suggested_action: z.ZodString;
224
+ }, z.core.$strict>>;
225
+ duration_ms: z.ZodInt;
226
+ }, z.core.$strict>>;
227
+ verifier_version: z.ZodString;
228
+ }, z.core.$strict>;
229
+ content_sha256: z.ZodString;
230
+ preview_expires_at: z.ZodISODateTime;
231
+ page_count: z.ZodInt;
232
+ preview_url: z.ZodURL;
233
+ channel: z.ZodLiteral<"fax">;
234
+ recipient: z.ZodObject<{
235
+ fax_number_e164: z.ZodString;
236
+ name: z.ZodOptional<z.ZodString>;
237
+ company: z.ZodOptional<z.ZodString>;
238
+ recipient_reference: z.ZodOptional<z.ZodString>;
239
+ }, z.core.$strict>;
240
+ sender: z.ZodObject<{
241
+ name: z.ZodString;
242
+ company: z.ZodOptional<z.ZodString>;
243
+ street: z.ZodString;
244
+ house_number: z.ZodString;
245
+ postal_code: z.ZodString;
246
+ city: z.ZodString;
247
+ country: z.ZodLiteral<"DE">;
248
+ email: z.ZodOptional<z.ZodEmail>;
249
+ }, z.core.$strict>;
250
+ options: z.ZodObject<{
251
+ max_attempts: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
252
+ scheduled_at: z.ZodOptional<z.ZodISODateTime>;
253
+ purpose: z.ZodEnum<{
254
+ transactional: "transactional";
255
+ contractual: "contractual";
256
+ support: "support";
257
+ other: "other";
258
+ }>;
259
+ consent_reference: z.ZodOptional<z.ZodString>;
260
+ }, z.core.$strict>;
261
+ }, z.core.$strict>;
262
+ export declare const ApprovalDraftSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
263
+ id: z.ZodString;
264
+ status: z.ZodEnum<{
265
+ draft: "draft";
266
+ validated: "validated";
267
+ quoted: "quoted";
268
+ awaiting_approval: "awaiting_approval";
269
+ approved: "approved";
270
+ cancelled: "cancelled";
271
+ }>;
272
+ created_at: z.ZodISODateTime;
273
+ updated_at: z.ZodISODateTime;
274
+ verification: z.ZodObject<{
275
+ status: z.ZodEnum<{
276
+ passed: "passed";
277
+ warning: "warning";
278
+ failed: "failed";
279
+ }>;
280
+ checks: z.ZodArray<z.ZodObject<{
281
+ id: z.ZodString;
282
+ version: z.ZodString;
283
+ status: z.ZodEnum<{
284
+ passed: "passed";
285
+ warning: "warning";
286
+ failed: "failed";
287
+ skipped: "skipped";
288
+ }>;
289
+ rule: z.ZodString;
290
+ evidence: z.ZodRecord<z.ZodString, z.ZodUnknown>;
291
+ violations: z.ZodArray<z.ZodObject<{
292
+ code: z.ZodString;
293
+ field_path: z.ZodOptional<z.ZodString>;
294
+ page: z.ZodOptional<z.ZodInt>;
295
+ rule: z.ZodString;
296
+ message: z.ZodString;
297
+ suggested_action: z.ZodString;
298
+ }, z.core.$strict>>;
299
+ duration_ms: z.ZodInt;
300
+ }, z.core.$strict>>;
301
+ verifier_version: z.ZodString;
302
+ }, z.core.$strict>;
303
+ content_sha256: z.ZodString;
304
+ preview_expires_at: z.ZodISODateTime;
305
+ page_count: z.ZodInt;
306
+ preview_url: z.ZodURL;
307
+ channel: z.ZodLiteral<"letter">;
308
+ recipient: z.ZodDiscriminatedUnion<[z.ZodObject<{
309
+ type: z.ZodDefault<z.ZodLiteral<"street">>;
310
+ company: z.ZodOptional<z.ZodString>;
311
+ name: z.ZodString;
312
+ attention: z.ZodOptional<z.ZodString>;
313
+ additional_line: z.ZodOptional<z.ZodString>;
314
+ street: z.ZodString;
315
+ house_number: z.ZodString;
316
+ postal_code: z.ZodString;
317
+ city: z.ZodString;
318
+ country: z.ZodLiteral<"DE">;
319
+ }, z.core.$strict>, z.ZodObject<{
320
+ type: z.ZodLiteral<"post_box">;
321
+ company: z.ZodOptional<z.ZodString>;
322
+ name: z.ZodString;
323
+ attention: z.ZodOptional<z.ZodString>;
324
+ post_box: z.ZodString;
325
+ postal_code: z.ZodString;
326
+ city: z.ZodString;
327
+ country: z.ZodLiteral<"DE">;
328
+ }, z.core.$strict>], "type">;
329
+ sender: z.ZodObject<{
330
+ name: z.ZodString;
331
+ company: z.ZodOptional<z.ZodString>;
332
+ street: z.ZodString;
333
+ house_number: z.ZodString;
334
+ postal_code: z.ZodString;
335
+ city: z.ZodString;
336
+ country: z.ZodLiteral<"DE">;
337
+ email: z.ZodOptional<z.ZodEmail>;
338
+ }, z.core.$strict>;
339
+ options: z.ZodObject<{
340
+ print: z.ZodEnum<{
341
+ grayscale: "grayscale";
342
+ color: "color";
343
+ }>;
344
+ duplex: z.ZodBoolean;
345
+ service: z.ZodEnum<{
346
+ standard: "standard";
347
+ registered_insertion: "registered_insertion";
348
+ registered_signature: "registered_signature";
349
+ }>;
350
+ criticality: z.ZodDefault<z.ZodEnum<{
351
+ normal: "normal";
352
+ high: "high";
353
+ }>>;
354
+ layout_profile: z.ZodDefault<z.ZodEnum<{
355
+ de_business_window_a: "de_business_window_a";
356
+ de_business_window_b: "de_business_window_b";
357
+ de_business_no_window: "de_business_no_window";
358
+ }>>;
359
+ }, z.core.$strict>;
360
+ }, z.core.$strict>, z.ZodObject<{
361
+ id: z.ZodString;
362
+ status: z.ZodEnum<{
363
+ draft: "draft";
364
+ validated: "validated";
365
+ quoted: "quoted";
366
+ awaiting_approval: "awaiting_approval";
367
+ approved: "approved";
368
+ cancelled: "cancelled";
369
+ }>;
370
+ created_at: z.ZodISODateTime;
371
+ updated_at: z.ZodISODateTime;
372
+ verification: z.ZodObject<{
373
+ status: z.ZodEnum<{
374
+ passed: "passed";
375
+ warning: "warning";
376
+ failed: "failed";
377
+ }>;
378
+ checks: z.ZodArray<z.ZodObject<{
379
+ id: z.ZodString;
380
+ version: z.ZodString;
381
+ status: z.ZodEnum<{
382
+ passed: "passed";
383
+ warning: "warning";
384
+ failed: "failed";
385
+ skipped: "skipped";
386
+ }>;
387
+ rule: z.ZodString;
388
+ evidence: z.ZodRecord<z.ZodString, z.ZodUnknown>;
389
+ violations: z.ZodArray<z.ZodObject<{
390
+ code: z.ZodString;
391
+ field_path: z.ZodOptional<z.ZodString>;
392
+ page: z.ZodOptional<z.ZodInt>;
393
+ rule: z.ZodString;
394
+ message: z.ZodString;
395
+ suggested_action: z.ZodString;
396
+ }, z.core.$strict>>;
397
+ duration_ms: z.ZodInt;
398
+ }, z.core.$strict>>;
399
+ verifier_version: z.ZodString;
400
+ }, z.core.$strict>;
401
+ content_sha256: z.ZodString;
402
+ preview_expires_at: z.ZodISODateTime;
403
+ page_count: z.ZodInt;
404
+ preview_url: z.ZodURL;
405
+ channel: z.ZodLiteral<"fax">;
406
+ recipient: z.ZodObject<{
407
+ fax_number_e164: z.ZodString;
408
+ name: z.ZodOptional<z.ZodString>;
409
+ company: z.ZodOptional<z.ZodString>;
410
+ recipient_reference: z.ZodOptional<z.ZodString>;
411
+ }, z.core.$strict>;
412
+ sender: z.ZodObject<{
413
+ name: z.ZodString;
414
+ company: z.ZodOptional<z.ZodString>;
415
+ street: z.ZodString;
416
+ house_number: z.ZodString;
417
+ postal_code: z.ZodString;
418
+ city: z.ZodString;
419
+ country: z.ZodLiteral<"DE">;
420
+ email: z.ZodOptional<z.ZodEmail>;
421
+ }, z.core.$strict>;
422
+ options: z.ZodObject<{
423
+ max_attempts: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
424
+ scheduled_at: z.ZodOptional<z.ZodISODateTime>;
425
+ purpose: z.ZodEnum<{
426
+ transactional: "transactional";
427
+ contractual: "contractual";
428
+ support: "support";
429
+ other: "other";
430
+ }>;
431
+ consent_reference: z.ZodOptional<z.ZodString>;
432
+ }, z.core.$strict>;
433
+ }, z.core.$strict>], "channel">;
434
+ export type ApprovalDraft = z.infer<typeof ApprovalDraftSchema>;
435
+ export declare const QuoteSchema: z.ZodObject<{
436
+ id: z.ZodString;
437
+ draft_id: z.ZodString;
438
+ subtotal_cents: z.ZodInt;
439
+ vat_cents: z.ZodInt;
440
+ total_cents: z.ZodInt;
441
+ currency: z.ZodLiteral<"EUR">;
442
+ valid_until: z.ZodISODateTime;
443
+ assumptions: z.ZodObject<{
444
+ channel: z.ZodEnum<{
445
+ letter: "letter";
446
+ fax: "fax";
447
+ }>;
448
+ country: z.ZodLiteral<"DE">;
449
+ pages: z.ZodInt;
450
+ service: z.ZodString;
451
+ }, z.core.$strict>;
452
+ }, z.core.$strict>;
453
+ export type Quote = z.infer<typeof QuoteSchema>;
454
+ export declare const ApprovalQuoteSchema: z.ZodObject<{
455
+ id: z.ZodString;
456
+ draft_id: z.ZodString;
457
+ subtotal_cents: z.ZodInt;
458
+ vat_cents: z.ZodInt;
459
+ total_cents: z.ZodInt;
460
+ currency: z.ZodLiteral<"EUR">;
461
+ valid_until: z.ZodISODateTime;
462
+ assumptions: z.ZodObject<{
463
+ channel: z.ZodEnum<{
464
+ letter: "letter";
465
+ fax: "fax";
466
+ }>;
467
+ country: z.ZodLiteral<"DE">;
468
+ pages: z.ZodInt;
469
+ service: z.ZodString;
470
+ }, z.core.$strict>;
471
+ provider: z.ZodEnum<{
472
+ onlinebrief24: "onlinebrief24";
473
+ pingen: "pingen";
474
+ faxsuite: "faxsuite";
475
+ mock: "mock";
476
+ }>;
477
+ }, z.core.$strict>;
478
+ export declare const CreateQuoteSchema: z.ZodObject<{}, z.core.$strict>;
479
+ export declare const ApprovalRequestSchema: z.ZodObject<{
480
+ id: z.ZodString;
481
+ draft_id: z.ZodString;
482
+ quote_id: z.ZodString;
483
+ status: z.ZodEnum<{
484
+ pending: "pending";
485
+ rejected: "rejected";
486
+ expired: "expired";
487
+ approved: "approved";
488
+ stale: "stale";
489
+ }>;
490
+ approval_url: z.ZodURL;
491
+ expires_at: z.ZodISODateTime;
492
+ created_at: z.ZodISODateTime;
493
+ }, z.core.$strict>;
494
+ export declare const ApprovalReviewSchema: z.ZodObject<{
495
+ approval: z.ZodObject<{
496
+ id: z.ZodString;
497
+ draft_id: z.ZodString;
498
+ quote_id: z.ZodString;
499
+ status: z.ZodEnum<{
500
+ pending: "pending";
501
+ rejected: "rejected";
502
+ expired: "expired";
503
+ approved: "approved";
504
+ stale: "stale";
505
+ }>;
506
+ approval_url: z.ZodURL;
507
+ expires_at: z.ZodISODateTime;
508
+ created_at: z.ZodISODateTime;
509
+ }, z.core.$strict>;
510
+ decision: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
511
+ status: z.ZodLiteral<"approved">;
512
+ approval_id: z.ZodString;
513
+ decided_at: z.ZodISODateTime;
514
+ expires_at: z.ZodISODateTime;
515
+ }, z.core.$strict>, z.ZodObject<{
516
+ status: z.ZodLiteral<"rejected">;
517
+ approval_id: z.ZodNull;
518
+ decided_at: z.ZodISODateTime;
519
+ expires_at: z.ZodNull;
520
+ }, z.core.$strict>], "status">>;
521
+ draft: z.ZodDiscriminatedUnion<[z.ZodObject<{
522
+ id: z.ZodString;
523
+ status: z.ZodEnum<{
524
+ draft: "draft";
525
+ validated: "validated";
526
+ quoted: "quoted";
527
+ awaiting_approval: "awaiting_approval";
528
+ approved: "approved";
529
+ cancelled: "cancelled";
530
+ }>;
531
+ created_at: z.ZodISODateTime;
532
+ updated_at: z.ZodISODateTime;
533
+ verification: z.ZodObject<{
534
+ status: z.ZodEnum<{
535
+ passed: "passed";
536
+ warning: "warning";
537
+ failed: "failed";
538
+ }>;
539
+ checks: z.ZodArray<z.ZodObject<{
540
+ id: z.ZodString;
541
+ version: z.ZodString;
542
+ status: z.ZodEnum<{
543
+ passed: "passed";
544
+ warning: "warning";
545
+ failed: "failed";
546
+ skipped: "skipped";
547
+ }>;
548
+ rule: z.ZodString;
549
+ evidence: z.ZodRecord<z.ZodString, z.ZodUnknown>;
550
+ violations: z.ZodArray<z.ZodObject<{
551
+ code: z.ZodString;
552
+ field_path: z.ZodOptional<z.ZodString>;
553
+ page: z.ZodOptional<z.ZodInt>;
554
+ rule: z.ZodString;
555
+ message: z.ZodString;
556
+ suggested_action: z.ZodString;
557
+ }, z.core.$strict>>;
558
+ duration_ms: z.ZodInt;
559
+ }, z.core.$strict>>;
560
+ verifier_version: z.ZodString;
561
+ }, z.core.$strict>;
562
+ content_sha256: z.ZodString;
563
+ preview_expires_at: z.ZodISODateTime;
564
+ page_count: z.ZodInt;
565
+ preview_url: z.ZodURL;
566
+ channel: z.ZodLiteral<"letter">;
567
+ recipient: z.ZodDiscriminatedUnion<[z.ZodObject<{
568
+ type: z.ZodDefault<z.ZodLiteral<"street">>;
569
+ company: z.ZodOptional<z.ZodString>;
570
+ name: z.ZodString;
571
+ attention: z.ZodOptional<z.ZodString>;
572
+ additional_line: z.ZodOptional<z.ZodString>;
573
+ street: z.ZodString;
574
+ house_number: z.ZodString;
575
+ postal_code: z.ZodString;
576
+ city: z.ZodString;
577
+ country: z.ZodLiteral<"DE">;
578
+ }, z.core.$strict>, z.ZodObject<{
579
+ type: z.ZodLiteral<"post_box">;
580
+ company: z.ZodOptional<z.ZodString>;
581
+ name: z.ZodString;
582
+ attention: z.ZodOptional<z.ZodString>;
583
+ post_box: z.ZodString;
584
+ postal_code: z.ZodString;
585
+ city: z.ZodString;
586
+ country: z.ZodLiteral<"DE">;
587
+ }, z.core.$strict>], "type">;
588
+ sender: z.ZodObject<{
589
+ name: z.ZodString;
590
+ company: z.ZodOptional<z.ZodString>;
591
+ street: z.ZodString;
592
+ house_number: z.ZodString;
593
+ postal_code: z.ZodString;
594
+ city: z.ZodString;
595
+ country: z.ZodLiteral<"DE">;
596
+ email: z.ZodOptional<z.ZodEmail>;
597
+ }, z.core.$strict>;
598
+ options: z.ZodObject<{
599
+ print: z.ZodEnum<{
600
+ grayscale: "grayscale";
601
+ color: "color";
602
+ }>;
603
+ duplex: z.ZodBoolean;
604
+ service: z.ZodEnum<{
605
+ standard: "standard";
606
+ registered_insertion: "registered_insertion";
607
+ registered_signature: "registered_signature";
608
+ }>;
609
+ criticality: z.ZodDefault<z.ZodEnum<{
610
+ normal: "normal";
611
+ high: "high";
612
+ }>>;
613
+ layout_profile: z.ZodDefault<z.ZodEnum<{
614
+ de_business_window_a: "de_business_window_a";
615
+ de_business_window_b: "de_business_window_b";
616
+ de_business_no_window: "de_business_no_window";
617
+ }>>;
618
+ }, z.core.$strict>;
619
+ }, z.core.$strict>, z.ZodObject<{
620
+ id: z.ZodString;
621
+ status: z.ZodEnum<{
622
+ draft: "draft";
623
+ validated: "validated";
624
+ quoted: "quoted";
625
+ awaiting_approval: "awaiting_approval";
626
+ approved: "approved";
627
+ cancelled: "cancelled";
628
+ }>;
629
+ created_at: z.ZodISODateTime;
630
+ updated_at: z.ZodISODateTime;
631
+ verification: z.ZodObject<{
632
+ status: z.ZodEnum<{
633
+ passed: "passed";
634
+ warning: "warning";
635
+ failed: "failed";
636
+ }>;
637
+ checks: z.ZodArray<z.ZodObject<{
638
+ id: z.ZodString;
639
+ version: z.ZodString;
640
+ status: z.ZodEnum<{
641
+ passed: "passed";
642
+ warning: "warning";
643
+ failed: "failed";
644
+ skipped: "skipped";
645
+ }>;
646
+ rule: z.ZodString;
647
+ evidence: z.ZodRecord<z.ZodString, z.ZodUnknown>;
648
+ violations: z.ZodArray<z.ZodObject<{
649
+ code: z.ZodString;
650
+ field_path: z.ZodOptional<z.ZodString>;
651
+ page: z.ZodOptional<z.ZodInt>;
652
+ rule: z.ZodString;
653
+ message: z.ZodString;
654
+ suggested_action: z.ZodString;
655
+ }, z.core.$strict>>;
656
+ duration_ms: z.ZodInt;
657
+ }, z.core.$strict>>;
658
+ verifier_version: z.ZodString;
659
+ }, z.core.$strict>;
660
+ content_sha256: z.ZodString;
661
+ preview_expires_at: z.ZodISODateTime;
662
+ page_count: z.ZodInt;
663
+ preview_url: z.ZodURL;
664
+ channel: z.ZodLiteral<"fax">;
665
+ recipient: z.ZodObject<{
666
+ fax_number_e164: z.ZodString;
667
+ name: z.ZodOptional<z.ZodString>;
668
+ company: z.ZodOptional<z.ZodString>;
669
+ recipient_reference: z.ZodOptional<z.ZodString>;
670
+ }, z.core.$strict>;
671
+ sender: z.ZodObject<{
672
+ name: z.ZodString;
673
+ company: z.ZodOptional<z.ZodString>;
674
+ street: z.ZodString;
675
+ house_number: z.ZodString;
676
+ postal_code: z.ZodString;
677
+ city: z.ZodString;
678
+ country: z.ZodLiteral<"DE">;
679
+ email: z.ZodOptional<z.ZodEmail>;
680
+ }, z.core.$strict>;
681
+ options: z.ZodObject<{
682
+ max_attempts: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
683
+ scheduled_at: z.ZodOptional<z.ZodISODateTime>;
684
+ purpose: z.ZodEnum<{
685
+ transactional: "transactional";
686
+ contractual: "contractual";
687
+ support: "support";
688
+ other: "other";
689
+ }>;
690
+ consent_reference: z.ZodOptional<z.ZodString>;
691
+ }, z.core.$strict>;
692
+ }, z.core.$strict>], "channel">;
693
+ quote: z.ZodObject<{
694
+ id: z.ZodString;
695
+ draft_id: z.ZodString;
696
+ subtotal_cents: z.ZodInt;
697
+ vat_cents: z.ZodInt;
698
+ total_cents: z.ZodInt;
699
+ currency: z.ZodLiteral<"EUR">;
700
+ valid_until: z.ZodISODateTime;
701
+ assumptions: z.ZodObject<{
702
+ channel: z.ZodEnum<{
703
+ letter: "letter";
704
+ fax: "fax";
705
+ }>;
706
+ country: z.ZodLiteral<"DE">;
707
+ pages: z.ZodInt;
708
+ service: z.ZodString;
709
+ }, z.core.$strict>;
710
+ provider: z.ZodEnum<{
711
+ onlinebrief24: "onlinebrief24";
712
+ pingen: "pingen";
713
+ faxsuite: "faxsuite";
714
+ mock: "mock";
715
+ }>;
716
+ }, z.core.$strict>;
717
+ binding_sha256: z.ZodString;
718
+ }, z.core.$strict>;
719
+ export type ApprovalReview = z.infer<typeof ApprovalReviewSchema>;
720
+ export declare const ApprovalDecisionSchema: z.ZodObject<{
721
+ decision: z.ZodEnum<{
722
+ approve: "approve";
723
+ reject: "reject";
724
+ }>;
725
+ reason: z.ZodOptional<z.ZodString>;
726
+ }, z.core.$strict>;
727
+ export declare const ApprovalSchema: z.ZodObject<{
728
+ id: z.ZodString;
729
+ request_id: z.ZodString;
730
+ status: z.ZodEnum<{
731
+ rejected: "rejected";
732
+ approved: "approved";
733
+ }>;
734
+ actor_type: z.ZodEnum<{
735
+ human: "human";
736
+ policy: "policy";
737
+ }>;
738
+ decided_at: z.ZodISODateTime;
739
+ }, z.core.$strict>;
740
+ export declare const CreateDispatchSchema: z.ZodObject<{
741
+ quote_id: z.ZodString;
742
+ approval_id: z.ZodString;
743
+ }, z.core.$strict>;
744
+ export declare const DispatchSchema: z.ZodObject<{
745
+ id: z.ZodString;
746
+ draft_id: z.ZodString;
747
+ status: z.ZodEnum<{
748
+ failed: "failed";
749
+ cancelled: "cancelled";
750
+ funds_reserved: "funds_reserved";
751
+ submitting: "submitting";
752
+ provider_accepted: "provider_accepted";
753
+ producing: "producing";
754
+ sending: "sending";
755
+ handed_to_carrier: "handed_to_carrier";
756
+ delivered: "delivered";
757
+ returned: "returned";
758
+ cancellation_pending: "cancellation_pending";
759
+ }>;
760
+ channel: z.ZodEnum<{
761
+ letter: "letter";
762
+ fax: "fax";
763
+ }>;
764
+ amount_cents: z.ZodInt;
765
+ currency: z.ZodLiteral<"EUR">;
766
+ scheduled_for: z.ZodNullable<z.ZodISODateTime>;
767
+ needs_review: z.ZodBoolean;
768
+ terminal_reason: z.ZodNullable<z.ZodString>;
769
+ created_at: z.ZodISODateTime;
770
+ updated_at: z.ZodISODateTime;
771
+ }, z.core.$strict>;
772
+ export type Dispatch = z.infer<typeof DispatchSchema>;
773
+ export declare const DispatchLetterSummarySchema: z.ZodObject<{
774
+ subject: z.ZodNullable<z.ZodString>;
775
+ channel: z.ZodLiteral<"letter">;
776
+ recipient: z.ZodObject<{
777
+ label: z.ZodString;
778
+ city: z.ZodString;
779
+ }, z.core.$strict>;
780
+ }, z.core.$strict>;
781
+ export declare const DispatchFaxSummarySchema: z.ZodObject<{
782
+ subject: z.ZodNullable<z.ZodString>;
783
+ channel: z.ZodLiteral<"fax">;
784
+ recipient: z.ZodObject<{
785
+ label: z.ZodNullable<z.ZodString>;
786
+ fax_number_e164: z.ZodString;
787
+ }, z.core.$strict>;
788
+ }, z.core.$strict>;
789
+ export declare const DispatchSummarySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
790
+ subject: z.ZodNullable<z.ZodString>;
791
+ channel: z.ZodLiteral<"letter">;
792
+ recipient: z.ZodObject<{
793
+ label: z.ZodString;
794
+ city: z.ZodString;
795
+ }, z.core.$strict>;
796
+ }, z.core.$strict>, z.ZodObject<{
797
+ subject: z.ZodNullable<z.ZodString>;
798
+ channel: z.ZodLiteral<"fax">;
799
+ recipient: z.ZodObject<{
800
+ label: z.ZodNullable<z.ZodString>;
801
+ fax_number_e164: z.ZodString;
802
+ }, z.core.$strict>;
803
+ }, z.core.$strict>], "channel">;
804
+ export type DispatchSummary = z.infer<typeof DispatchSummarySchema>;
805
+ export declare const DispatchEventSchema: z.ZodObject<{
806
+ id: z.ZodString;
807
+ dispatch_id: z.ZodString;
808
+ sequence: z.ZodInt;
809
+ type: z.ZodString;
810
+ status: z.ZodEnum<{
811
+ failed: "failed";
812
+ cancelled: "cancelled";
813
+ funds_reserved: "funds_reserved";
814
+ submitting: "submitting";
815
+ provider_accepted: "provider_accepted";
816
+ producing: "producing";
817
+ sending: "sending";
818
+ handed_to_carrier: "handed_to_carrier";
819
+ delivered: "delivered";
820
+ returned: "returned";
821
+ cancellation_pending: "cancellation_pending";
822
+ }>;
823
+ created_at: z.ZodISODateTime;
824
+ evidence: z.ZodRecord<z.ZodString, z.ZodUnknown>;
825
+ event_hash: z.ZodString;
826
+ previous_hash: z.ZodNullable<z.ZodString>;
827
+ }, z.core.$strict>;
828
+ export type DispatchEvent = z.infer<typeof DispatchEventSchema>;
829
+ export declare const ProofBundleSchema: z.ZodObject<{
830
+ schema_version: z.ZodLiteral<"2.0">;
831
+ dispatch_id: z.ZodString;
832
+ organization_id: z.ZodString;
833
+ channel: z.ZodEnum<{
834
+ letter: "letter";
835
+ fax: "fax";
836
+ }>;
837
+ content: z.ZodObject<{
838
+ document_id: z.ZodString;
839
+ sha256: z.ZodString;
840
+ }, z.core.$strict>;
841
+ recipient: z.ZodObject<{
842
+ fingerprint: z.ZodString;
843
+ display: z.ZodString;
844
+ }, z.core.$strict>;
845
+ verification: z.ZodObject<{
846
+ id: z.ZodString;
847
+ verifier_version: z.ZodString;
848
+ status: z.ZodEnum<{
849
+ passed: "passed";
850
+ warning: "warning";
851
+ }>;
852
+ content_sha256: z.ZodString;
853
+ }, z.core.$strict>;
854
+ quote: z.ZodObject<{
855
+ id: z.ZodString;
856
+ subtotal_cents: z.ZodInt;
857
+ vat_cents: z.ZodInt;
858
+ total_cents: z.ZodInt;
859
+ currency: z.ZodLiteral<"EUR">;
860
+ catalog_version: z.ZodString;
861
+ }, z.core.$strict>;
862
+ approval: z.ZodObject<{
863
+ id: z.ZodString;
864
+ actor_type: z.ZodEnum<{
865
+ human: "human";
866
+ policy: "policy";
867
+ }>;
868
+ actor_id: z.ZodString;
869
+ decided_at: z.ZodISODateTime;
870
+ binding_hash: z.ZodString;
871
+ }, z.core.$strict>;
872
+ provider: z.ZodNullable<z.ZodObject<{
873
+ name: z.ZodEnum<{
874
+ onlinebrief24: "onlinebrief24";
875
+ pingen: "pingen";
876
+ faxsuite: "faxsuite";
877
+ mock: "mock";
878
+ }>;
879
+ acceptance_reference_hash: z.ZodString;
880
+ accepted_at: z.ZodISODateTime;
881
+ }, z.core.$strict>>;
882
+ status: z.ZodObject<{
883
+ normalized: z.ZodEnum<{
884
+ failed: "failed";
885
+ cancelled: "cancelled";
886
+ funds_reserved: "funds_reserved";
887
+ submitting: "submitting";
888
+ provider_accepted: "provider_accepted";
889
+ producing: "producing";
890
+ sending: "sending";
891
+ handed_to_carrier: "handed_to_carrier";
892
+ delivered: "delivered";
893
+ returned: "returned";
894
+ cancellation_pending: "cancellation_pending";
895
+ }>;
896
+ observed_at: z.ZodISODateTime;
897
+ }, z.core.$strict>;
898
+ event_chain: z.ZodObject<{
899
+ valid: z.ZodBoolean;
900
+ checked_events: z.ZodInt;
901
+ head: z.ZodNullable<z.ZodString>;
902
+ }, z.core.$strict>;
903
+ generated_at: z.ZodISODateTime;
904
+ }, z.core.$strict>;
905
+ export type ProofBundle = z.infer<typeof ProofBundleSchema>;
906
+ export declare const ApiEnvelopeSchema: <T extends z.ZodType>(schema: T) => z.ZodObject<{
907
+ request_id: z.ZodString;
908
+ data: T;
909
+ next_actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
910
+ action: z.ZodString;
911
+ method: z.ZodOptional<z.ZodEnum<{
912
+ GET: "GET";
913
+ POST: "POST";
914
+ PATCH: "PATCH";
915
+ DELETE: "DELETE";
916
+ }>>;
917
+ href: z.ZodOptional<z.ZodString>;
918
+ }, z.core.$strict>>>;
919
+ }, z.core.$strict>;
920
+ export declare const ErrorCodeSchema: z.ZodEnum<{
921
+ SCHEMA_INVALID: "SCHEMA_INVALID";
922
+ UNAUTHENTICATED: "UNAUTHENTICATED";
923
+ FORBIDDEN: "FORBIDDEN";
924
+ NOT_FOUND: "NOT_FOUND";
925
+ ADDRESS_INVALID: "ADDRESS_INVALID";
926
+ FAX_NUMBER_INVALID: "FAX_NUMBER_INVALID";
927
+ DOCUMENT_UNREADABLE: "DOCUMENT_UNREADABLE";
928
+ PDF_LAYOUT_INVALID: "PDF_LAYOUT_INVALID";
929
+ UNSUPPORTED_OPTION: "UNSUPPORTED_OPTION";
930
+ VERIFICATION_FAILED: "VERIFICATION_FAILED";
931
+ QUOTE_EXPIRED: "QUOTE_EXPIRED";
932
+ APPROVAL_REQUIRED: "APPROVAL_REQUIRED";
933
+ APPROVAL_STALE: "APPROVAL_STALE";
934
+ BUDGET_EXCEEDED: "BUDGET_EXCEEDED";
935
+ INSUFFICIENT_FUNDS: "INSUFFICIENT_FUNDS";
936
+ IDEMPOTENCY_REQUIRED: "IDEMPOTENCY_REQUIRED";
937
+ IDEMPOTENCY_CONFLICT: "IDEMPOTENCY_CONFLICT";
938
+ DISPATCH_NOT_CANCELLABLE: "DISPATCH_NOT_CANCELLABLE";
939
+ PROVIDER_UNAVAILABLE: "PROVIDER_UNAVAILABLE";
940
+ PROVIDER_REJECTED: "PROVIDER_REJECTED";
941
+ RATE_LIMITED: "RATE_LIMITED";
942
+ INTERNAL_ERROR: "INTERNAL_ERROR";
943
+ }>;
944
+ export type ErrorCode = z.infer<typeof ErrorCodeSchema>;
945
+ export declare const ApiErrorSchema: z.ZodObject<{
946
+ request_id: z.ZodString;
947
+ error: z.ZodObject<{
948
+ code: z.ZodEnum<{
949
+ SCHEMA_INVALID: "SCHEMA_INVALID";
950
+ UNAUTHENTICATED: "UNAUTHENTICATED";
951
+ FORBIDDEN: "FORBIDDEN";
952
+ NOT_FOUND: "NOT_FOUND";
953
+ ADDRESS_INVALID: "ADDRESS_INVALID";
954
+ FAX_NUMBER_INVALID: "FAX_NUMBER_INVALID";
955
+ DOCUMENT_UNREADABLE: "DOCUMENT_UNREADABLE";
956
+ PDF_LAYOUT_INVALID: "PDF_LAYOUT_INVALID";
957
+ UNSUPPORTED_OPTION: "UNSUPPORTED_OPTION";
958
+ VERIFICATION_FAILED: "VERIFICATION_FAILED";
959
+ QUOTE_EXPIRED: "QUOTE_EXPIRED";
960
+ APPROVAL_REQUIRED: "APPROVAL_REQUIRED";
961
+ APPROVAL_STALE: "APPROVAL_STALE";
962
+ BUDGET_EXCEEDED: "BUDGET_EXCEEDED";
963
+ INSUFFICIENT_FUNDS: "INSUFFICIENT_FUNDS";
964
+ IDEMPOTENCY_REQUIRED: "IDEMPOTENCY_REQUIRED";
965
+ IDEMPOTENCY_CONFLICT: "IDEMPOTENCY_CONFLICT";
966
+ DISPATCH_NOT_CANCELLABLE: "DISPATCH_NOT_CANCELLABLE";
967
+ PROVIDER_UNAVAILABLE: "PROVIDER_UNAVAILABLE";
968
+ PROVIDER_REJECTED: "PROVIDER_REJECTED";
969
+ RATE_LIMITED: "RATE_LIMITED";
970
+ INTERNAL_ERROR: "INTERNAL_ERROR";
971
+ }>;
972
+ message: z.ZodString;
973
+ retryable: z.ZodBoolean;
974
+ field_path: z.ZodOptional<z.ZodString>;
975
+ suggested_action: z.ZodString;
976
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
977
+ }, z.core.$strict>;
978
+ }, z.core.$strict>;
979
+ export type ApiError = z.infer<typeof ApiErrorSchema>;