@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,1563 @@
1
+ import type { z } from "zod";
2
+ export declare const papierApiOperations: {
3
+ readonly uploadDocument: {
4
+ readonly operationId: "uploadDocument";
5
+ readonly method: "POST";
6
+ readonly path: "/v1/documents";
7
+ readonly request: {
8
+ readonly kind: "pdf";
9
+ };
10
+ readonly pathParameters: {};
11
+ readonly queryParameters: {};
12
+ readonly dataSchema: z.ZodObject<{
13
+ document: z.ZodObject<{
14
+ id: z.ZodString;
15
+ sha256: z.ZodString;
16
+ byte_size: z.ZodInt;
17
+ page_count: z.ZodInt;
18
+ created_at: z.ZodISODateTime;
19
+ }, z.core.$strict>;
20
+ verification: z.ZodObject<{
21
+ status: z.ZodEnum<{
22
+ passed: "passed";
23
+ warning: "warning";
24
+ failed: "failed";
25
+ }>;
26
+ checks: z.ZodArray<z.ZodObject<{
27
+ id: z.ZodString;
28
+ version: z.ZodString;
29
+ status: z.ZodEnum<{
30
+ passed: "passed";
31
+ warning: "warning";
32
+ failed: "failed";
33
+ skipped: "skipped";
34
+ }>;
35
+ rule: z.ZodString;
36
+ evidence: z.ZodRecord<z.ZodString, z.ZodUnknown>;
37
+ violations: z.ZodArray<z.ZodObject<{
38
+ code: z.ZodString;
39
+ field_path: z.ZodOptional<z.ZodString>;
40
+ page: z.ZodOptional<z.ZodInt>;
41
+ rule: z.ZodString;
42
+ message: z.ZodString;
43
+ suggested_action: z.ZodString;
44
+ }, z.core.$strict>>;
45
+ duration_ms: z.ZodInt;
46
+ }, z.core.$strict>>;
47
+ verifier_version: z.ZodString;
48
+ }, z.core.$strict>;
49
+ }, z.core.$strict>;
50
+ readonly requiresIdempotencyKey: false;
51
+ readonly safeToRetry: false;
52
+ } & {
53
+ readonly responseSchema: z.ZodObject<{
54
+ request_id: z.ZodString;
55
+ data: z.ZodObject<{
56
+ document: z.ZodObject<{
57
+ id: z.ZodString;
58
+ sha256: z.ZodString;
59
+ byte_size: z.ZodInt;
60
+ page_count: z.ZodInt;
61
+ created_at: z.ZodISODateTime;
62
+ }, z.core.$strict>;
63
+ verification: z.ZodObject<{
64
+ status: z.ZodEnum<{
65
+ passed: "passed";
66
+ warning: "warning";
67
+ failed: "failed";
68
+ }>;
69
+ checks: z.ZodArray<z.ZodObject<{
70
+ id: z.ZodString;
71
+ version: z.ZodString;
72
+ status: z.ZodEnum<{
73
+ passed: "passed";
74
+ warning: "warning";
75
+ failed: "failed";
76
+ skipped: "skipped";
77
+ }>;
78
+ rule: z.ZodString;
79
+ evidence: z.ZodRecord<z.ZodString, z.ZodUnknown>;
80
+ violations: z.ZodArray<z.ZodObject<{
81
+ code: z.ZodString;
82
+ field_path: z.ZodOptional<z.ZodString>;
83
+ page: z.ZodOptional<z.ZodInt>;
84
+ rule: z.ZodString;
85
+ message: z.ZodString;
86
+ suggested_action: z.ZodString;
87
+ }, z.core.$strict>>;
88
+ duration_ms: z.ZodInt;
89
+ }, z.core.$strict>>;
90
+ verifier_version: z.ZodString;
91
+ }, z.core.$strict>;
92
+ }, z.core.$strict>;
93
+ next_actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
94
+ action: z.ZodString;
95
+ method: z.ZodOptional<z.ZodEnum<{
96
+ GET: "GET";
97
+ POST: "POST";
98
+ PATCH: "PATCH";
99
+ DELETE: "DELETE";
100
+ }>>;
101
+ href: z.ZodOptional<z.ZodString>;
102
+ }, z.core.$strict>>>;
103
+ }, z.core.$strict>;
104
+ };
105
+ readonly createLetterDraft: {
106
+ readonly operationId: "createLetterDraft";
107
+ readonly method: "POST";
108
+ readonly path: "/v1/drafts/letters";
109
+ readonly request: {
110
+ readonly kind: "json";
111
+ readonly schema: z.ZodObject<{
112
+ sender_profile_id: z.ZodString;
113
+ recipient: z.ZodDiscriminatedUnion<[z.ZodObject<{
114
+ type: z.ZodDefault<z.ZodLiteral<"street">>;
115
+ company: z.ZodOptional<z.ZodString>;
116
+ name: z.ZodString;
117
+ attention: z.ZodOptional<z.ZodString>;
118
+ additional_line: z.ZodOptional<z.ZodString>;
119
+ street: z.ZodString;
120
+ house_number: z.ZodString;
121
+ postal_code: z.ZodString;
122
+ city: z.ZodString;
123
+ country: z.ZodLiteral<"DE">;
124
+ }, z.core.$strict>, z.ZodObject<{
125
+ type: z.ZodLiteral<"post_box">;
126
+ company: z.ZodOptional<z.ZodString>;
127
+ name: z.ZodString;
128
+ attention: z.ZodOptional<z.ZodString>;
129
+ post_box: z.ZodString;
130
+ postal_code: z.ZodString;
131
+ city: z.ZodString;
132
+ country: z.ZodLiteral<"DE">;
133
+ }, z.core.$strict>], "type">;
134
+ source: z.ZodDiscriminatedUnion<[z.ZodObject<{
135
+ mode: z.ZodLiteral<"structured">;
136
+ content: z.ZodObject<{
137
+ locale: z.ZodDefault<z.ZodEnum<{
138
+ "de-DE": "de-DE";
139
+ "en-DE": "en-DE";
140
+ }>>;
141
+ date: z.ZodISODate;
142
+ reference_lines: z.ZodOptional<z.ZodArray<z.ZodObject<{
143
+ label: z.ZodString;
144
+ value: z.ZodString;
145
+ }, z.core.$strict>>>;
146
+ subject: z.ZodString;
147
+ salutation: z.ZodOptional<z.ZodString>;
148
+ blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
149
+ type: z.ZodLiteral<"paragraph">;
150
+ text: z.ZodString;
151
+ style: z.ZodDefault<z.ZodEnum<{
152
+ normal: "normal";
153
+ emphasis: "emphasis";
154
+ }>>;
155
+ }, z.core.$strict>, z.ZodObject<{
156
+ type: z.ZodLiteral<"heading">;
157
+ text: z.ZodString;
158
+ level: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
159
+ }, z.core.$strict>, z.ZodObject<{
160
+ type: z.ZodLiteral<"list">;
161
+ ordered: z.ZodDefault<z.ZodBoolean>;
162
+ items: z.ZodArray<z.ZodString>;
163
+ }, z.core.$strict>, z.ZodObject<{
164
+ type: z.ZodLiteral<"table">;
165
+ columns: z.ZodArray<z.ZodString>;
166
+ rows: z.ZodArray<z.ZodArray<z.ZodString>>;
167
+ }, z.core.$strict>, z.ZodObject<{
168
+ type: z.ZodLiteral<"spacer">;
169
+ millimeters: z.ZodNumber;
170
+ }, z.core.$strict>, z.ZodObject<{
171
+ type: z.ZodLiteral<"closing">;
172
+ text: z.ZodString;
173
+ }, z.core.$strict>, z.ZodObject<{
174
+ type: z.ZodLiteral<"signature_placeholder">;
175
+ height_mm: z.ZodNumber;
176
+ }, z.core.$strict>], "type">>;
177
+ closing: z.ZodOptional<z.ZodString>;
178
+ signatory: z.ZodOptional<z.ZodString>;
179
+ }, z.core.$strict>;
180
+ }, z.core.$strict>, z.ZodObject<{
181
+ mode: z.ZodLiteral<"raw_pdf">;
182
+ document_id: z.ZodString;
183
+ }, z.core.$strict>], "mode">;
184
+ attachments: z.ZodDefault<z.ZodArray<z.ZodObject<{
185
+ document_id: z.ZodString;
186
+ }, z.core.$strict>>>;
187
+ options: z.ZodObject<{
188
+ print: z.ZodEnum<{
189
+ grayscale: "grayscale";
190
+ color: "color";
191
+ }>;
192
+ duplex: z.ZodBoolean;
193
+ service: z.ZodEnum<{
194
+ standard: "standard";
195
+ registered_insertion: "registered_insertion";
196
+ registered_signature: "registered_signature";
197
+ }>;
198
+ criticality: z.ZodDefault<z.ZodEnum<{
199
+ normal: "normal";
200
+ high: "high";
201
+ }>>;
202
+ layout_profile: z.ZodDefault<z.ZodEnum<{
203
+ de_business_window_a: "de_business_window_a";
204
+ de_business_window_b: "de_business_window_b";
205
+ de_business_no_window: "de_business_no_window";
206
+ }>>;
207
+ }, z.core.$strict>;
208
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
209
+ }, z.core.$strict>;
210
+ };
211
+ readonly pathParameters: {};
212
+ readonly queryParameters: {};
213
+ readonly dataSchema: z.ZodObject<{
214
+ id: z.ZodString;
215
+ channel: z.ZodEnum<{
216
+ letter: "letter";
217
+ fax: "fax";
218
+ }>;
219
+ status: z.ZodEnum<{
220
+ draft: "draft";
221
+ validated: "validated";
222
+ quoted: "quoted";
223
+ awaiting_approval: "awaiting_approval";
224
+ approved: "approved";
225
+ cancelled: "cancelled";
226
+ }>;
227
+ content_sha256: z.ZodString;
228
+ page_count: z.ZodInt;
229
+ recipient_display: z.ZodString;
230
+ verification: z.ZodObject<{
231
+ status: z.ZodEnum<{
232
+ passed: "passed";
233
+ warning: "warning";
234
+ failed: "failed";
235
+ }>;
236
+ checks: z.ZodArray<z.ZodObject<{
237
+ id: z.ZodString;
238
+ version: z.ZodString;
239
+ status: z.ZodEnum<{
240
+ passed: "passed";
241
+ warning: "warning";
242
+ failed: "failed";
243
+ skipped: "skipped";
244
+ }>;
245
+ rule: z.ZodString;
246
+ evidence: z.ZodRecord<z.ZodString, z.ZodUnknown>;
247
+ violations: z.ZodArray<z.ZodObject<{
248
+ code: z.ZodString;
249
+ field_path: z.ZodOptional<z.ZodString>;
250
+ page: z.ZodOptional<z.ZodInt>;
251
+ rule: z.ZodString;
252
+ message: z.ZodString;
253
+ suggested_action: z.ZodString;
254
+ }, z.core.$strict>>;
255
+ duration_ms: z.ZodInt;
256
+ }, z.core.$strict>>;
257
+ verifier_version: z.ZodString;
258
+ }, z.core.$strict>;
259
+ preview_url: z.ZodURL;
260
+ preview_expires_at: z.ZodISODateTime;
261
+ created_at: z.ZodISODateTime;
262
+ updated_at: z.ZodISODateTime;
263
+ }, z.core.$strict>;
264
+ readonly requiresIdempotencyKey: false;
265
+ readonly safeToRetry: false;
266
+ } & {
267
+ readonly responseSchema: z.ZodObject<{
268
+ request_id: z.ZodString;
269
+ data: z.ZodObject<{
270
+ id: z.ZodString;
271
+ channel: z.ZodEnum<{
272
+ letter: "letter";
273
+ fax: "fax";
274
+ }>;
275
+ status: z.ZodEnum<{
276
+ draft: "draft";
277
+ validated: "validated";
278
+ quoted: "quoted";
279
+ awaiting_approval: "awaiting_approval";
280
+ approved: "approved";
281
+ cancelled: "cancelled";
282
+ }>;
283
+ content_sha256: z.ZodString;
284
+ page_count: z.ZodInt;
285
+ recipient_display: z.ZodString;
286
+ verification: z.ZodObject<{
287
+ status: z.ZodEnum<{
288
+ passed: "passed";
289
+ warning: "warning";
290
+ failed: "failed";
291
+ }>;
292
+ checks: z.ZodArray<z.ZodObject<{
293
+ id: z.ZodString;
294
+ version: z.ZodString;
295
+ status: z.ZodEnum<{
296
+ passed: "passed";
297
+ warning: "warning";
298
+ failed: "failed";
299
+ skipped: "skipped";
300
+ }>;
301
+ rule: z.ZodString;
302
+ evidence: z.ZodRecord<z.ZodString, z.ZodUnknown>;
303
+ violations: z.ZodArray<z.ZodObject<{
304
+ code: z.ZodString;
305
+ field_path: z.ZodOptional<z.ZodString>;
306
+ page: z.ZodOptional<z.ZodInt>;
307
+ rule: z.ZodString;
308
+ message: z.ZodString;
309
+ suggested_action: z.ZodString;
310
+ }, z.core.$strict>>;
311
+ duration_ms: z.ZodInt;
312
+ }, z.core.$strict>>;
313
+ verifier_version: z.ZodString;
314
+ }, z.core.$strict>;
315
+ preview_url: z.ZodURL;
316
+ preview_expires_at: z.ZodISODateTime;
317
+ created_at: z.ZodISODateTime;
318
+ updated_at: z.ZodISODateTime;
319
+ }, z.core.$strict>;
320
+ next_actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
321
+ action: z.ZodString;
322
+ method: z.ZodOptional<z.ZodEnum<{
323
+ GET: "GET";
324
+ POST: "POST";
325
+ PATCH: "PATCH";
326
+ DELETE: "DELETE";
327
+ }>>;
328
+ href: z.ZodOptional<z.ZodString>;
329
+ }, z.core.$strict>>>;
330
+ }, z.core.$strict>;
331
+ };
332
+ readonly createFaxDraft: {
333
+ readonly operationId: "createFaxDraft";
334
+ readonly method: "POST";
335
+ readonly path: "/v1/drafts/faxes";
336
+ readonly request: {
337
+ readonly kind: "json";
338
+ readonly schema: z.ZodObject<{
339
+ sender_profile_id: z.ZodString;
340
+ recipient: z.ZodObject<{
341
+ fax_number_e164: z.ZodString;
342
+ name: z.ZodOptional<z.ZodString>;
343
+ company: z.ZodOptional<z.ZodString>;
344
+ recipient_reference: z.ZodOptional<z.ZodString>;
345
+ }, z.core.$strict>;
346
+ document_id: z.ZodString;
347
+ cover: z.ZodDefault<z.ZodObject<{
348
+ enabled: z.ZodBoolean;
349
+ subject: z.ZodOptional<z.ZodString>;
350
+ note: z.ZodOptional<z.ZodString>;
351
+ }, z.core.$strict>>;
352
+ options: z.ZodObject<{
353
+ max_attempts: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
354
+ scheduled_at: z.ZodOptional<z.ZodISODateTime>;
355
+ purpose: z.ZodEnum<{
356
+ transactional: "transactional";
357
+ contractual: "contractual";
358
+ support: "support";
359
+ other: "other";
360
+ }>;
361
+ consent_reference: z.ZodOptional<z.ZodString>;
362
+ }, z.core.$strict>;
363
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
364
+ }, z.core.$strict>;
365
+ };
366
+ readonly pathParameters: {};
367
+ readonly queryParameters: {};
368
+ readonly dataSchema: z.ZodObject<{
369
+ id: z.ZodString;
370
+ channel: z.ZodEnum<{
371
+ letter: "letter";
372
+ fax: "fax";
373
+ }>;
374
+ status: z.ZodEnum<{
375
+ draft: "draft";
376
+ validated: "validated";
377
+ quoted: "quoted";
378
+ awaiting_approval: "awaiting_approval";
379
+ approved: "approved";
380
+ cancelled: "cancelled";
381
+ }>;
382
+ content_sha256: z.ZodString;
383
+ page_count: z.ZodInt;
384
+ recipient_display: z.ZodString;
385
+ verification: z.ZodObject<{
386
+ status: z.ZodEnum<{
387
+ passed: "passed";
388
+ warning: "warning";
389
+ failed: "failed";
390
+ }>;
391
+ checks: z.ZodArray<z.ZodObject<{
392
+ id: z.ZodString;
393
+ version: z.ZodString;
394
+ status: z.ZodEnum<{
395
+ passed: "passed";
396
+ warning: "warning";
397
+ failed: "failed";
398
+ skipped: "skipped";
399
+ }>;
400
+ rule: z.ZodString;
401
+ evidence: z.ZodRecord<z.ZodString, z.ZodUnknown>;
402
+ violations: z.ZodArray<z.ZodObject<{
403
+ code: z.ZodString;
404
+ field_path: z.ZodOptional<z.ZodString>;
405
+ page: z.ZodOptional<z.ZodInt>;
406
+ rule: z.ZodString;
407
+ message: z.ZodString;
408
+ suggested_action: z.ZodString;
409
+ }, z.core.$strict>>;
410
+ duration_ms: z.ZodInt;
411
+ }, z.core.$strict>>;
412
+ verifier_version: z.ZodString;
413
+ }, z.core.$strict>;
414
+ preview_url: z.ZodURL;
415
+ preview_expires_at: z.ZodISODateTime;
416
+ created_at: z.ZodISODateTime;
417
+ updated_at: z.ZodISODateTime;
418
+ }, z.core.$strict>;
419
+ readonly requiresIdempotencyKey: false;
420
+ readonly safeToRetry: false;
421
+ } & {
422
+ readonly responseSchema: z.ZodObject<{
423
+ request_id: z.ZodString;
424
+ data: z.ZodObject<{
425
+ id: z.ZodString;
426
+ channel: z.ZodEnum<{
427
+ letter: "letter";
428
+ fax: "fax";
429
+ }>;
430
+ status: z.ZodEnum<{
431
+ draft: "draft";
432
+ validated: "validated";
433
+ quoted: "quoted";
434
+ awaiting_approval: "awaiting_approval";
435
+ approved: "approved";
436
+ cancelled: "cancelled";
437
+ }>;
438
+ content_sha256: z.ZodString;
439
+ page_count: z.ZodInt;
440
+ recipient_display: z.ZodString;
441
+ verification: z.ZodObject<{
442
+ status: z.ZodEnum<{
443
+ passed: "passed";
444
+ warning: "warning";
445
+ failed: "failed";
446
+ }>;
447
+ checks: z.ZodArray<z.ZodObject<{
448
+ id: z.ZodString;
449
+ version: z.ZodString;
450
+ status: z.ZodEnum<{
451
+ passed: "passed";
452
+ warning: "warning";
453
+ failed: "failed";
454
+ skipped: "skipped";
455
+ }>;
456
+ rule: z.ZodString;
457
+ evidence: z.ZodRecord<z.ZodString, z.ZodUnknown>;
458
+ violations: z.ZodArray<z.ZodObject<{
459
+ code: z.ZodString;
460
+ field_path: z.ZodOptional<z.ZodString>;
461
+ page: z.ZodOptional<z.ZodInt>;
462
+ rule: z.ZodString;
463
+ message: z.ZodString;
464
+ suggested_action: z.ZodString;
465
+ }, z.core.$strict>>;
466
+ duration_ms: z.ZodInt;
467
+ }, z.core.$strict>>;
468
+ verifier_version: z.ZodString;
469
+ }, z.core.$strict>;
470
+ preview_url: z.ZodURL;
471
+ preview_expires_at: z.ZodISODateTime;
472
+ created_at: z.ZodISODateTime;
473
+ updated_at: z.ZodISODateTime;
474
+ }, z.core.$strict>;
475
+ next_actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
476
+ action: z.ZodString;
477
+ method: z.ZodOptional<z.ZodEnum<{
478
+ GET: "GET";
479
+ POST: "POST";
480
+ PATCH: "PATCH";
481
+ DELETE: "DELETE";
482
+ }>>;
483
+ href: z.ZodOptional<z.ZodString>;
484
+ }, z.core.$strict>>>;
485
+ }, z.core.$strict>;
486
+ };
487
+ readonly getDraft: {
488
+ readonly operationId: "getDraft";
489
+ readonly method: "GET";
490
+ readonly path: "/v1/drafts/{draftId}";
491
+ readonly request: {
492
+ readonly kind: "none";
493
+ };
494
+ readonly pathParameters: {
495
+ readonly draftId: z.ZodString;
496
+ };
497
+ readonly queryParameters: {};
498
+ readonly dataSchema: z.ZodObject<{
499
+ id: z.ZodString;
500
+ channel: z.ZodEnum<{
501
+ letter: "letter";
502
+ fax: "fax";
503
+ }>;
504
+ status: z.ZodEnum<{
505
+ draft: "draft";
506
+ validated: "validated";
507
+ quoted: "quoted";
508
+ awaiting_approval: "awaiting_approval";
509
+ approved: "approved";
510
+ cancelled: "cancelled";
511
+ }>;
512
+ content_sha256: z.ZodString;
513
+ page_count: z.ZodInt;
514
+ recipient_display: z.ZodString;
515
+ verification: z.ZodObject<{
516
+ status: z.ZodEnum<{
517
+ passed: "passed";
518
+ warning: "warning";
519
+ failed: "failed";
520
+ }>;
521
+ checks: z.ZodArray<z.ZodObject<{
522
+ id: z.ZodString;
523
+ version: z.ZodString;
524
+ status: z.ZodEnum<{
525
+ passed: "passed";
526
+ warning: "warning";
527
+ failed: "failed";
528
+ skipped: "skipped";
529
+ }>;
530
+ rule: z.ZodString;
531
+ evidence: z.ZodRecord<z.ZodString, z.ZodUnknown>;
532
+ violations: z.ZodArray<z.ZodObject<{
533
+ code: z.ZodString;
534
+ field_path: z.ZodOptional<z.ZodString>;
535
+ page: z.ZodOptional<z.ZodInt>;
536
+ rule: z.ZodString;
537
+ message: z.ZodString;
538
+ suggested_action: z.ZodString;
539
+ }, z.core.$strict>>;
540
+ duration_ms: z.ZodInt;
541
+ }, z.core.$strict>>;
542
+ verifier_version: z.ZodString;
543
+ }, z.core.$strict>;
544
+ preview_url: z.ZodURL;
545
+ preview_expires_at: z.ZodISODateTime;
546
+ created_at: z.ZodISODateTime;
547
+ updated_at: z.ZodISODateTime;
548
+ }, z.core.$strict>;
549
+ readonly requiresIdempotencyKey: false;
550
+ readonly safeToRetry: true;
551
+ } & {
552
+ readonly responseSchema: z.ZodObject<{
553
+ request_id: z.ZodString;
554
+ data: z.ZodObject<{
555
+ id: z.ZodString;
556
+ channel: z.ZodEnum<{
557
+ letter: "letter";
558
+ fax: "fax";
559
+ }>;
560
+ status: z.ZodEnum<{
561
+ draft: "draft";
562
+ validated: "validated";
563
+ quoted: "quoted";
564
+ awaiting_approval: "awaiting_approval";
565
+ approved: "approved";
566
+ cancelled: "cancelled";
567
+ }>;
568
+ content_sha256: z.ZodString;
569
+ page_count: z.ZodInt;
570
+ recipient_display: z.ZodString;
571
+ verification: z.ZodObject<{
572
+ status: z.ZodEnum<{
573
+ passed: "passed";
574
+ warning: "warning";
575
+ failed: "failed";
576
+ }>;
577
+ checks: z.ZodArray<z.ZodObject<{
578
+ id: z.ZodString;
579
+ version: z.ZodString;
580
+ status: z.ZodEnum<{
581
+ passed: "passed";
582
+ warning: "warning";
583
+ failed: "failed";
584
+ skipped: "skipped";
585
+ }>;
586
+ rule: z.ZodString;
587
+ evidence: z.ZodRecord<z.ZodString, z.ZodUnknown>;
588
+ violations: z.ZodArray<z.ZodObject<{
589
+ code: z.ZodString;
590
+ field_path: z.ZodOptional<z.ZodString>;
591
+ page: z.ZodOptional<z.ZodInt>;
592
+ rule: z.ZodString;
593
+ message: z.ZodString;
594
+ suggested_action: z.ZodString;
595
+ }, z.core.$strict>>;
596
+ duration_ms: z.ZodInt;
597
+ }, z.core.$strict>>;
598
+ verifier_version: z.ZodString;
599
+ }, z.core.$strict>;
600
+ preview_url: z.ZodURL;
601
+ preview_expires_at: z.ZodISODateTime;
602
+ created_at: z.ZodISODateTime;
603
+ updated_at: z.ZodISODateTime;
604
+ }, z.core.$strict>;
605
+ next_actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
606
+ action: z.ZodString;
607
+ method: z.ZodOptional<z.ZodEnum<{
608
+ GET: "GET";
609
+ POST: "POST";
610
+ PATCH: "PATCH";
611
+ DELETE: "DELETE";
612
+ }>>;
613
+ href: z.ZodOptional<z.ZodString>;
614
+ }, z.core.$strict>>>;
615
+ }, z.core.$strict>;
616
+ };
617
+ readonly quoteDraft: {
618
+ readonly operationId: "quoteDraft";
619
+ readonly method: "POST";
620
+ readonly path: "/v1/drafts/{draftId}/quote";
621
+ readonly request: {
622
+ readonly kind: "none";
623
+ };
624
+ readonly pathParameters: {
625
+ readonly draftId: z.ZodString;
626
+ };
627
+ readonly queryParameters: {};
628
+ readonly dataSchema: z.ZodObject<{
629
+ id: z.ZodString;
630
+ draft_id: z.ZodString;
631
+ subtotal_cents: z.ZodInt;
632
+ vat_cents: z.ZodInt;
633
+ total_cents: z.ZodInt;
634
+ currency: z.ZodLiteral<"EUR">;
635
+ valid_until: z.ZodISODateTime;
636
+ assumptions: z.ZodObject<{
637
+ channel: z.ZodEnum<{
638
+ letter: "letter";
639
+ fax: "fax";
640
+ }>;
641
+ country: z.ZodLiteral<"DE">;
642
+ pages: z.ZodInt;
643
+ service: z.ZodString;
644
+ }, z.core.$strict>;
645
+ }, z.core.$strict>;
646
+ readonly requiresIdempotencyKey: false;
647
+ readonly safeToRetry: false;
648
+ } & {
649
+ readonly responseSchema: z.ZodObject<{
650
+ request_id: z.ZodString;
651
+ data: z.ZodObject<{
652
+ id: z.ZodString;
653
+ draft_id: z.ZodString;
654
+ subtotal_cents: z.ZodInt;
655
+ vat_cents: z.ZodInt;
656
+ total_cents: z.ZodInt;
657
+ currency: z.ZodLiteral<"EUR">;
658
+ valid_until: z.ZodISODateTime;
659
+ assumptions: z.ZodObject<{
660
+ channel: z.ZodEnum<{
661
+ letter: "letter";
662
+ fax: "fax";
663
+ }>;
664
+ country: z.ZodLiteral<"DE">;
665
+ pages: z.ZodInt;
666
+ service: z.ZodString;
667
+ }, z.core.$strict>;
668
+ }, z.core.$strict>;
669
+ next_actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
670
+ action: z.ZodString;
671
+ method: z.ZodOptional<z.ZodEnum<{
672
+ GET: "GET";
673
+ POST: "POST";
674
+ PATCH: "PATCH";
675
+ DELETE: "DELETE";
676
+ }>>;
677
+ href: z.ZodOptional<z.ZodString>;
678
+ }, z.core.$strict>>>;
679
+ }, z.core.$strict>;
680
+ };
681
+ readonly requestApproval: {
682
+ readonly operationId: "requestApproval";
683
+ readonly method: "POST";
684
+ readonly path: "/v1/drafts/{draftId}/approval-requests";
685
+ readonly request: {
686
+ readonly kind: "json";
687
+ readonly schema: z.ZodObject<{
688
+ quote_id: z.ZodString;
689
+ expires_in_seconds: z.ZodDefault<z.ZodInt>;
690
+ }, z.core.$strict>;
691
+ };
692
+ readonly pathParameters: {
693
+ readonly draftId: z.ZodString;
694
+ };
695
+ readonly queryParameters: {};
696
+ readonly dataSchema: z.ZodObject<{
697
+ id: z.ZodString;
698
+ draft_id: z.ZodString;
699
+ quote_id: z.ZodString;
700
+ status: z.ZodEnum<{
701
+ pending: "pending";
702
+ rejected: "rejected";
703
+ expired: "expired";
704
+ approved: "approved";
705
+ stale: "stale";
706
+ }>;
707
+ approval_url: z.ZodURL;
708
+ expires_at: z.ZodISODateTime;
709
+ created_at: z.ZodISODateTime;
710
+ }, z.core.$strict>;
711
+ readonly requiresIdempotencyKey: false;
712
+ readonly safeToRetry: false;
713
+ } & {
714
+ readonly responseSchema: z.ZodObject<{
715
+ request_id: z.ZodString;
716
+ data: z.ZodObject<{
717
+ id: z.ZodString;
718
+ draft_id: z.ZodString;
719
+ quote_id: z.ZodString;
720
+ status: z.ZodEnum<{
721
+ pending: "pending";
722
+ rejected: "rejected";
723
+ expired: "expired";
724
+ approved: "approved";
725
+ stale: "stale";
726
+ }>;
727
+ approval_url: z.ZodURL;
728
+ expires_at: z.ZodISODateTime;
729
+ created_at: z.ZodISODateTime;
730
+ }, z.core.$strict>;
731
+ next_actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
732
+ action: z.ZodString;
733
+ method: z.ZodOptional<z.ZodEnum<{
734
+ GET: "GET";
735
+ POST: "POST";
736
+ PATCH: "PATCH";
737
+ DELETE: "DELETE";
738
+ }>>;
739
+ href: z.ZodOptional<z.ZodString>;
740
+ }, z.core.$strict>>>;
741
+ }, z.core.$strict>;
742
+ };
743
+ readonly createDispatch: {
744
+ readonly operationId: "createDispatch";
745
+ readonly method: "POST";
746
+ readonly path: "/v1/drafts/{draftId}/dispatches";
747
+ readonly request: {
748
+ readonly kind: "json";
749
+ readonly schema: z.ZodObject<{
750
+ quote_id: z.ZodString;
751
+ approval_id: z.ZodString;
752
+ }, z.core.$strict>;
753
+ };
754
+ readonly pathParameters: {
755
+ readonly draftId: z.ZodString;
756
+ };
757
+ readonly queryParameters: {};
758
+ readonly dataSchema: z.ZodObject<{
759
+ id: z.ZodString;
760
+ draft_id: z.ZodString;
761
+ status: z.ZodEnum<{
762
+ failed: "failed";
763
+ cancelled: "cancelled";
764
+ funds_reserved: "funds_reserved";
765
+ submitting: "submitting";
766
+ provider_accepted: "provider_accepted";
767
+ producing: "producing";
768
+ sending: "sending";
769
+ handed_to_carrier: "handed_to_carrier";
770
+ delivered: "delivered";
771
+ returned: "returned";
772
+ cancellation_pending: "cancellation_pending";
773
+ }>;
774
+ channel: z.ZodEnum<{
775
+ letter: "letter";
776
+ fax: "fax";
777
+ }>;
778
+ amount_cents: z.ZodInt;
779
+ currency: z.ZodLiteral<"EUR">;
780
+ scheduled_for: z.ZodNullable<z.ZodISODateTime>;
781
+ needs_review: z.ZodBoolean;
782
+ terminal_reason: z.ZodNullable<z.ZodString>;
783
+ created_at: z.ZodISODateTime;
784
+ updated_at: z.ZodISODateTime;
785
+ }, z.core.$strict>;
786
+ readonly requiresIdempotencyKey: true;
787
+ readonly safeToRetry: true;
788
+ } & {
789
+ readonly responseSchema: z.ZodObject<{
790
+ request_id: z.ZodString;
791
+ data: z.ZodObject<{
792
+ id: z.ZodString;
793
+ draft_id: z.ZodString;
794
+ status: z.ZodEnum<{
795
+ failed: "failed";
796
+ cancelled: "cancelled";
797
+ funds_reserved: "funds_reserved";
798
+ submitting: "submitting";
799
+ provider_accepted: "provider_accepted";
800
+ producing: "producing";
801
+ sending: "sending";
802
+ handed_to_carrier: "handed_to_carrier";
803
+ delivered: "delivered";
804
+ returned: "returned";
805
+ cancellation_pending: "cancellation_pending";
806
+ }>;
807
+ channel: z.ZodEnum<{
808
+ letter: "letter";
809
+ fax: "fax";
810
+ }>;
811
+ amount_cents: z.ZodInt;
812
+ currency: z.ZodLiteral<"EUR">;
813
+ scheduled_for: z.ZodNullable<z.ZodISODateTime>;
814
+ needs_review: z.ZodBoolean;
815
+ terminal_reason: z.ZodNullable<z.ZodString>;
816
+ created_at: z.ZodISODateTime;
817
+ updated_at: z.ZodISODateTime;
818
+ }, z.core.$strict>;
819
+ next_actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
820
+ action: z.ZodString;
821
+ method: z.ZodOptional<z.ZodEnum<{
822
+ GET: "GET";
823
+ POST: "POST";
824
+ PATCH: "PATCH";
825
+ DELETE: "DELETE";
826
+ }>>;
827
+ href: z.ZodOptional<z.ZodString>;
828
+ }, z.core.$strict>>>;
829
+ }, z.core.$strict>;
830
+ };
831
+ readonly createDirectPaymentSession: {
832
+ readonly operationId: "createDirectPaymentSession";
833
+ readonly method: "POST";
834
+ readonly path: "/v1/drafts/{draftId}/direct-payment-sessions";
835
+ readonly request: {
836
+ readonly kind: "json";
837
+ readonly schema: z.ZodObject<{
838
+ quote_id: z.ZodString;
839
+ approval_id: z.ZodString;
840
+ }, z.core.$strict>;
841
+ };
842
+ readonly pathParameters: {
843
+ readonly draftId: z.ZodString;
844
+ };
845
+ readonly queryParameters: {};
846
+ readonly dataSchema: z.ZodObject<{
847
+ id: z.ZodString;
848
+ status: z.ZodEnum<{
849
+ pending: "pending";
850
+ checkout_open: "checkout_open";
851
+ dispatch_created: "dispatch_created";
852
+ expired: "expired";
853
+ payment_failed: "payment_failed";
854
+ refund_required: "refund_required";
855
+ refunded: "refunded";
856
+ }>;
857
+ amount_cents: z.ZodInt;
858
+ currency: z.ZodLiteral<"EUR">;
859
+ expires_at: z.ZodNullable<z.ZodISODateTime>;
860
+ checkout_url: z.ZodNullable<z.ZodURL>;
861
+ dispatch_id: z.ZodNullable<z.ZodString>;
862
+ }, z.core.$strict>;
863
+ readonly requiresIdempotencyKey: true;
864
+ readonly safeToRetry: true;
865
+ } & {
866
+ readonly responseSchema: z.ZodObject<{
867
+ request_id: z.ZodString;
868
+ data: z.ZodObject<{
869
+ id: z.ZodString;
870
+ status: z.ZodEnum<{
871
+ pending: "pending";
872
+ checkout_open: "checkout_open";
873
+ dispatch_created: "dispatch_created";
874
+ expired: "expired";
875
+ payment_failed: "payment_failed";
876
+ refund_required: "refund_required";
877
+ refunded: "refunded";
878
+ }>;
879
+ amount_cents: z.ZodInt;
880
+ currency: z.ZodLiteral<"EUR">;
881
+ expires_at: z.ZodNullable<z.ZodISODateTime>;
882
+ checkout_url: z.ZodNullable<z.ZodURL>;
883
+ dispatch_id: z.ZodNullable<z.ZodString>;
884
+ }, z.core.$strict>;
885
+ next_actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
886
+ action: z.ZodString;
887
+ method: z.ZodOptional<z.ZodEnum<{
888
+ GET: "GET";
889
+ POST: "POST";
890
+ PATCH: "PATCH";
891
+ DELETE: "DELETE";
892
+ }>>;
893
+ href: z.ZodOptional<z.ZodString>;
894
+ }, z.core.$strict>>>;
895
+ }, z.core.$strict>;
896
+ };
897
+ readonly getDirectPayment: {
898
+ readonly operationId: "getDirectPayment";
899
+ readonly method: "GET";
900
+ readonly path: "/v1/direct-payments/{directPaymentId}";
901
+ readonly request: {
902
+ readonly kind: "none";
903
+ };
904
+ readonly pathParameters: {
905
+ readonly directPaymentId: z.ZodString;
906
+ };
907
+ readonly queryParameters: {};
908
+ readonly dataSchema: z.ZodObject<{
909
+ id: z.ZodString;
910
+ status: z.ZodEnum<{
911
+ pending: "pending";
912
+ checkout_open: "checkout_open";
913
+ dispatch_created: "dispatch_created";
914
+ expired: "expired";
915
+ payment_failed: "payment_failed";
916
+ refund_required: "refund_required";
917
+ refunded: "refunded";
918
+ }>;
919
+ amount_cents: z.ZodInt;
920
+ currency: z.ZodLiteral<"EUR">;
921
+ expires_at: z.ZodNullable<z.ZodISODateTime>;
922
+ checkout_url: z.ZodNullable<z.ZodURL>;
923
+ dispatch_id: z.ZodNullable<z.ZodString>;
924
+ }, z.core.$strict>;
925
+ readonly requiresIdempotencyKey: false;
926
+ readonly safeToRetry: true;
927
+ } & {
928
+ readonly responseSchema: z.ZodObject<{
929
+ request_id: z.ZodString;
930
+ data: z.ZodObject<{
931
+ id: z.ZodString;
932
+ status: z.ZodEnum<{
933
+ pending: "pending";
934
+ checkout_open: "checkout_open";
935
+ dispatch_created: "dispatch_created";
936
+ expired: "expired";
937
+ payment_failed: "payment_failed";
938
+ refund_required: "refund_required";
939
+ refunded: "refunded";
940
+ }>;
941
+ amount_cents: z.ZodInt;
942
+ currency: z.ZodLiteral<"EUR">;
943
+ expires_at: z.ZodNullable<z.ZodISODateTime>;
944
+ checkout_url: z.ZodNullable<z.ZodURL>;
945
+ dispatch_id: z.ZodNullable<z.ZodString>;
946
+ }, z.core.$strict>;
947
+ next_actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
948
+ action: z.ZodString;
949
+ method: z.ZodOptional<z.ZodEnum<{
950
+ GET: "GET";
951
+ POST: "POST";
952
+ PATCH: "PATCH";
953
+ DELETE: "DELETE";
954
+ }>>;
955
+ href: z.ZodOptional<z.ZodString>;
956
+ }, z.core.$strict>>>;
957
+ }, z.core.$strict>;
958
+ };
959
+ readonly listDispatches: {
960
+ readonly operationId: "listDispatches";
961
+ readonly method: "GET";
962
+ readonly path: "/v1/dispatches";
963
+ readonly request: {
964
+ readonly kind: "none";
965
+ };
966
+ readonly pathParameters: {};
967
+ readonly queryParameters: {
968
+ readonly limit: z.ZodDefault<z.ZodInt>;
969
+ };
970
+ readonly dataSchema: z.ZodArray<z.ZodObject<{
971
+ id: z.ZodString;
972
+ draft_id: z.ZodString;
973
+ status: z.ZodEnum<{
974
+ failed: "failed";
975
+ cancelled: "cancelled";
976
+ funds_reserved: "funds_reserved";
977
+ submitting: "submitting";
978
+ provider_accepted: "provider_accepted";
979
+ producing: "producing";
980
+ sending: "sending";
981
+ handed_to_carrier: "handed_to_carrier";
982
+ delivered: "delivered";
983
+ returned: "returned";
984
+ cancellation_pending: "cancellation_pending";
985
+ }>;
986
+ channel: z.ZodEnum<{
987
+ letter: "letter";
988
+ fax: "fax";
989
+ }>;
990
+ amount_cents: z.ZodInt;
991
+ currency: z.ZodLiteral<"EUR">;
992
+ scheduled_for: z.ZodNullable<z.ZodISODateTime>;
993
+ needs_review: z.ZodBoolean;
994
+ terminal_reason: z.ZodNullable<z.ZodString>;
995
+ created_at: z.ZodISODateTime;
996
+ updated_at: z.ZodISODateTime;
997
+ }, z.core.$strict>>;
998
+ readonly requiresIdempotencyKey: false;
999
+ readonly safeToRetry: true;
1000
+ } & {
1001
+ readonly responseSchema: z.ZodObject<{
1002
+ request_id: z.ZodString;
1003
+ data: z.ZodArray<z.ZodObject<{
1004
+ id: z.ZodString;
1005
+ draft_id: z.ZodString;
1006
+ status: z.ZodEnum<{
1007
+ failed: "failed";
1008
+ cancelled: "cancelled";
1009
+ funds_reserved: "funds_reserved";
1010
+ submitting: "submitting";
1011
+ provider_accepted: "provider_accepted";
1012
+ producing: "producing";
1013
+ sending: "sending";
1014
+ handed_to_carrier: "handed_to_carrier";
1015
+ delivered: "delivered";
1016
+ returned: "returned";
1017
+ cancellation_pending: "cancellation_pending";
1018
+ }>;
1019
+ channel: z.ZodEnum<{
1020
+ letter: "letter";
1021
+ fax: "fax";
1022
+ }>;
1023
+ amount_cents: z.ZodInt;
1024
+ currency: z.ZodLiteral<"EUR">;
1025
+ scheduled_for: z.ZodNullable<z.ZodISODateTime>;
1026
+ needs_review: z.ZodBoolean;
1027
+ terminal_reason: z.ZodNullable<z.ZodString>;
1028
+ created_at: z.ZodISODateTime;
1029
+ updated_at: z.ZodISODateTime;
1030
+ }, z.core.$strict>>;
1031
+ next_actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
1032
+ action: z.ZodString;
1033
+ method: z.ZodOptional<z.ZodEnum<{
1034
+ GET: "GET";
1035
+ POST: "POST";
1036
+ PATCH: "PATCH";
1037
+ DELETE: "DELETE";
1038
+ }>>;
1039
+ href: z.ZodOptional<z.ZodString>;
1040
+ }, z.core.$strict>>>;
1041
+ }, z.core.$strict>;
1042
+ };
1043
+ readonly getDispatch: {
1044
+ readonly operationId: "getDispatch";
1045
+ readonly method: "GET";
1046
+ readonly path: "/v1/dispatches/{dispatchId}";
1047
+ readonly request: {
1048
+ readonly kind: "none";
1049
+ };
1050
+ readonly pathParameters: {
1051
+ readonly dispatchId: z.ZodString;
1052
+ };
1053
+ readonly queryParameters: {};
1054
+ readonly dataSchema: z.ZodObject<{
1055
+ id: z.ZodString;
1056
+ draft_id: z.ZodString;
1057
+ status: z.ZodEnum<{
1058
+ failed: "failed";
1059
+ cancelled: "cancelled";
1060
+ funds_reserved: "funds_reserved";
1061
+ submitting: "submitting";
1062
+ provider_accepted: "provider_accepted";
1063
+ producing: "producing";
1064
+ sending: "sending";
1065
+ handed_to_carrier: "handed_to_carrier";
1066
+ delivered: "delivered";
1067
+ returned: "returned";
1068
+ cancellation_pending: "cancellation_pending";
1069
+ }>;
1070
+ channel: z.ZodEnum<{
1071
+ letter: "letter";
1072
+ fax: "fax";
1073
+ }>;
1074
+ amount_cents: z.ZodInt;
1075
+ currency: z.ZodLiteral<"EUR">;
1076
+ scheduled_for: z.ZodNullable<z.ZodISODateTime>;
1077
+ needs_review: z.ZodBoolean;
1078
+ terminal_reason: z.ZodNullable<z.ZodString>;
1079
+ created_at: z.ZodISODateTime;
1080
+ updated_at: z.ZodISODateTime;
1081
+ }, z.core.$strict>;
1082
+ readonly requiresIdempotencyKey: false;
1083
+ readonly safeToRetry: true;
1084
+ } & {
1085
+ readonly responseSchema: z.ZodObject<{
1086
+ request_id: z.ZodString;
1087
+ data: z.ZodObject<{
1088
+ id: z.ZodString;
1089
+ draft_id: z.ZodString;
1090
+ status: z.ZodEnum<{
1091
+ failed: "failed";
1092
+ cancelled: "cancelled";
1093
+ funds_reserved: "funds_reserved";
1094
+ submitting: "submitting";
1095
+ provider_accepted: "provider_accepted";
1096
+ producing: "producing";
1097
+ sending: "sending";
1098
+ handed_to_carrier: "handed_to_carrier";
1099
+ delivered: "delivered";
1100
+ returned: "returned";
1101
+ cancellation_pending: "cancellation_pending";
1102
+ }>;
1103
+ channel: z.ZodEnum<{
1104
+ letter: "letter";
1105
+ fax: "fax";
1106
+ }>;
1107
+ amount_cents: z.ZodInt;
1108
+ currency: z.ZodLiteral<"EUR">;
1109
+ scheduled_for: z.ZodNullable<z.ZodISODateTime>;
1110
+ needs_review: z.ZodBoolean;
1111
+ terminal_reason: z.ZodNullable<z.ZodString>;
1112
+ created_at: z.ZodISODateTime;
1113
+ updated_at: z.ZodISODateTime;
1114
+ }, z.core.$strict>;
1115
+ next_actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
1116
+ action: z.ZodString;
1117
+ method: z.ZodOptional<z.ZodEnum<{
1118
+ GET: "GET";
1119
+ POST: "POST";
1120
+ PATCH: "PATCH";
1121
+ DELETE: "DELETE";
1122
+ }>>;
1123
+ href: z.ZodOptional<z.ZodString>;
1124
+ }, z.core.$strict>>>;
1125
+ }, z.core.$strict>;
1126
+ };
1127
+ readonly getDispatchSummary: {
1128
+ readonly operationId: "getDispatchSummary";
1129
+ readonly method: "GET";
1130
+ readonly path: "/v1/dispatches/{dispatchId}/summary";
1131
+ readonly request: {
1132
+ readonly kind: "none";
1133
+ };
1134
+ readonly pathParameters: {
1135
+ readonly dispatchId: z.ZodString;
1136
+ };
1137
+ readonly queryParameters: {};
1138
+ readonly dataSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1139
+ subject: z.ZodNullable<z.ZodString>;
1140
+ channel: z.ZodLiteral<"letter">;
1141
+ recipient: z.ZodObject<{
1142
+ label: z.ZodString;
1143
+ city: z.ZodString;
1144
+ }, z.core.$strict>;
1145
+ }, z.core.$strict>, z.ZodObject<{
1146
+ subject: z.ZodNullable<z.ZodString>;
1147
+ channel: z.ZodLiteral<"fax">;
1148
+ recipient: z.ZodObject<{
1149
+ label: z.ZodNullable<z.ZodString>;
1150
+ fax_number_e164: z.ZodString;
1151
+ }, z.core.$strict>;
1152
+ }, z.core.$strict>], "channel">;
1153
+ readonly requiresIdempotencyKey: false;
1154
+ readonly safeToRetry: true;
1155
+ } & {
1156
+ readonly responseSchema: z.ZodObject<{
1157
+ request_id: z.ZodString;
1158
+ data: z.ZodDiscriminatedUnion<[z.ZodObject<{
1159
+ subject: z.ZodNullable<z.ZodString>;
1160
+ channel: z.ZodLiteral<"letter">;
1161
+ recipient: z.ZodObject<{
1162
+ label: z.ZodString;
1163
+ city: z.ZodString;
1164
+ }, z.core.$strict>;
1165
+ }, z.core.$strict>, z.ZodObject<{
1166
+ subject: z.ZodNullable<z.ZodString>;
1167
+ channel: z.ZodLiteral<"fax">;
1168
+ recipient: z.ZodObject<{
1169
+ label: z.ZodNullable<z.ZodString>;
1170
+ fax_number_e164: z.ZodString;
1171
+ }, z.core.$strict>;
1172
+ }, z.core.$strict>], "channel">;
1173
+ next_actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
1174
+ action: z.ZodString;
1175
+ method: z.ZodOptional<z.ZodEnum<{
1176
+ GET: "GET";
1177
+ POST: "POST";
1178
+ PATCH: "PATCH";
1179
+ DELETE: "DELETE";
1180
+ }>>;
1181
+ href: z.ZodOptional<z.ZodString>;
1182
+ }, z.core.$strict>>>;
1183
+ }, z.core.$strict>;
1184
+ };
1185
+ readonly getDispatchEvents: {
1186
+ readonly operationId: "getDispatchEvents";
1187
+ readonly method: "GET";
1188
+ readonly path: "/v1/dispatches/{dispatchId}/events";
1189
+ readonly request: {
1190
+ readonly kind: "none";
1191
+ };
1192
+ readonly pathParameters: {
1193
+ readonly dispatchId: z.ZodString;
1194
+ };
1195
+ readonly queryParameters: {};
1196
+ readonly dataSchema: z.ZodArray<z.ZodObject<{
1197
+ id: z.ZodString;
1198
+ dispatch_id: z.ZodString;
1199
+ sequence: z.ZodInt;
1200
+ type: z.ZodString;
1201
+ status: z.ZodEnum<{
1202
+ failed: "failed";
1203
+ cancelled: "cancelled";
1204
+ funds_reserved: "funds_reserved";
1205
+ submitting: "submitting";
1206
+ provider_accepted: "provider_accepted";
1207
+ producing: "producing";
1208
+ sending: "sending";
1209
+ handed_to_carrier: "handed_to_carrier";
1210
+ delivered: "delivered";
1211
+ returned: "returned";
1212
+ cancellation_pending: "cancellation_pending";
1213
+ }>;
1214
+ created_at: z.ZodISODateTime;
1215
+ evidence: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1216
+ event_hash: z.ZodString;
1217
+ previous_hash: z.ZodNullable<z.ZodString>;
1218
+ }, z.core.$strict>>;
1219
+ readonly requiresIdempotencyKey: false;
1220
+ readonly safeToRetry: true;
1221
+ } & {
1222
+ readonly responseSchema: z.ZodObject<{
1223
+ request_id: z.ZodString;
1224
+ data: z.ZodArray<z.ZodObject<{
1225
+ id: z.ZodString;
1226
+ dispatch_id: z.ZodString;
1227
+ sequence: z.ZodInt;
1228
+ type: z.ZodString;
1229
+ status: z.ZodEnum<{
1230
+ failed: "failed";
1231
+ cancelled: "cancelled";
1232
+ funds_reserved: "funds_reserved";
1233
+ submitting: "submitting";
1234
+ provider_accepted: "provider_accepted";
1235
+ producing: "producing";
1236
+ sending: "sending";
1237
+ handed_to_carrier: "handed_to_carrier";
1238
+ delivered: "delivered";
1239
+ returned: "returned";
1240
+ cancellation_pending: "cancellation_pending";
1241
+ }>;
1242
+ created_at: z.ZodISODateTime;
1243
+ evidence: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1244
+ event_hash: z.ZodString;
1245
+ previous_hash: z.ZodNullable<z.ZodString>;
1246
+ }, z.core.$strict>>;
1247
+ next_actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
1248
+ action: z.ZodString;
1249
+ method: z.ZodOptional<z.ZodEnum<{
1250
+ GET: "GET";
1251
+ POST: "POST";
1252
+ PATCH: "PATCH";
1253
+ DELETE: "DELETE";
1254
+ }>>;
1255
+ href: z.ZodOptional<z.ZodString>;
1256
+ }, z.core.$strict>>>;
1257
+ }, z.core.$strict>;
1258
+ };
1259
+ readonly getDispatchProof: {
1260
+ readonly operationId: "getDispatchProof";
1261
+ readonly method: "GET";
1262
+ readonly path: "/v1/dispatches/{dispatchId}/proof";
1263
+ readonly request: {
1264
+ readonly kind: "none";
1265
+ };
1266
+ readonly pathParameters: {
1267
+ readonly dispatchId: z.ZodString;
1268
+ };
1269
+ readonly queryParameters: {};
1270
+ readonly dataSchema: z.ZodObject<{
1271
+ schema_version: z.ZodLiteral<"2.0">;
1272
+ dispatch_id: z.ZodString;
1273
+ organization_id: z.ZodString;
1274
+ channel: z.ZodEnum<{
1275
+ letter: "letter";
1276
+ fax: "fax";
1277
+ }>;
1278
+ content: z.ZodObject<{
1279
+ document_id: z.ZodString;
1280
+ sha256: z.ZodString;
1281
+ }, z.core.$strict>;
1282
+ recipient: z.ZodObject<{
1283
+ fingerprint: z.ZodString;
1284
+ display: z.ZodString;
1285
+ }, z.core.$strict>;
1286
+ verification: z.ZodObject<{
1287
+ id: z.ZodString;
1288
+ verifier_version: z.ZodString;
1289
+ status: z.ZodEnum<{
1290
+ passed: "passed";
1291
+ warning: "warning";
1292
+ }>;
1293
+ content_sha256: z.ZodString;
1294
+ }, z.core.$strict>;
1295
+ quote: z.ZodObject<{
1296
+ id: z.ZodString;
1297
+ subtotal_cents: z.ZodInt;
1298
+ vat_cents: z.ZodInt;
1299
+ total_cents: z.ZodInt;
1300
+ currency: z.ZodLiteral<"EUR">;
1301
+ catalog_version: z.ZodString;
1302
+ }, z.core.$strict>;
1303
+ approval: z.ZodObject<{
1304
+ id: z.ZodString;
1305
+ actor_type: z.ZodEnum<{
1306
+ human: "human";
1307
+ policy: "policy";
1308
+ }>;
1309
+ actor_id: z.ZodString;
1310
+ decided_at: z.ZodISODateTime;
1311
+ binding_hash: z.ZodString;
1312
+ }, z.core.$strict>;
1313
+ provider: z.ZodNullable<z.ZodObject<{
1314
+ name: z.ZodEnum<{
1315
+ onlinebrief24: "onlinebrief24";
1316
+ pingen: "pingen";
1317
+ faxsuite: "faxsuite";
1318
+ mock: "mock";
1319
+ }>;
1320
+ acceptance_reference_hash: z.ZodString;
1321
+ accepted_at: z.ZodISODateTime;
1322
+ }, z.core.$strict>>;
1323
+ status: z.ZodObject<{
1324
+ normalized: z.ZodEnum<{
1325
+ failed: "failed";
1326
+ cancelled: "cancelled";
1327
+ funds_reserved: "funds_reserved";
1328
+ submitting: "submitting";
1329
+ provider_accepted: "provider_accepted";
1330
+ producing: "producing";
1331
+ sending: "sending";
1332
+ handed_to_carrier: "handed_to_carrier";
1333
+ delivered: "delivered";
1334
+ returned: "returned";
1335
+ cancellation_pending: "cancellation_pending";
1336
+ }>;
1337
+ observed_at: z.ZodISODateTime;
1338
+ }, z.core.$strict>;
1339
+ event_chain: z.ZodObject<{
1340
+ valid: z.ZodBoolean;
1341
+ checked_events: z.ZodInt;
1342
+ head: z.ZodNullable<z.ZodString>;
1343
+ }, z.core.$strict>;
1344
+ generated_at: z.ZodISODateTime;
1345
+ }, z.core.$strict>;
1346
+ readonly requiresIdempotencyKey: false;
1347
+ readonly safeToRetry: true;
1348
+ } & {
1349
+ readonly responseSchema: z.ZodObject<{
1350
+ request_id: z.ZodString;
1351
+ data: z.ZodObject<{
1352
+ schema_version: z.ZodLiteral<"2.0">;
1353
+ dispatch_id: z.ZodString;
1354
+ organization_id: z.ZodString;
1355
+ channel: z.ZodEnum<{
1356
+ letter: "letter";
1357
+ fax: "fax";
1358
+ }>;
1359
+ content: z.ZodObject<{
1360
+ document_id: z.ZodString;
1361
+ sha256: z.ZodString;
1362
+ }, z.core.$strict>;
1363
+ recipient: z.ZodObject<{
1364
+ fingerprint: z.ZodString;
1365
+ display: z.ZodString;
1366
+ }, z.core.$strict>;
1367
+ verification: z.ZodObject<{
1368
+ id: z.ZodString;
1369
+ verifier_version: z.ZodString;
1370
+ status: z.ZodEnum<{
1371
+ passed: "passed";
1372
+ warning: "warning";
1373
+ }>;
1374
+ content_sha256: z.ZodString;
1375
+ }, z.core.$strict>;
1376
+ quote: z.ZodObject<{
1377
+ id: z.ZodString;
1378
+ subtotal_cents: z.ZodInt;
1379
+ vat_cents: z.ZodInt;
1380
+ total_cents: z.ZodInt;
1381
+ currency: z.ZodLiteral<"EUR">;
1382
+ catalog_version: z.ZodString;
1383
+ }, z.core.$strict>;
1384
+ approval: z.ZodObject<{
1385
+ id: z.ZodString;
1386
+ actor_type: z.ZodEnum<{
1387
+ human: "human";
1388
+ policy: "policy";
1389
+ }>;
1390
+ actor_id: z.ZodString;
1391
+ decided_at: z.ZodISODateTime;
1392
+ binding_hash: z.ZodString;
1393
+ }, z.core.$strict>;
1394
+ provider: z.ZodNullable<z.ZodObject<{
1395
+ name: z.ZodEnum<{
1396
+ onlinebrief24: "onlinebrief24";
1397
+ pingen: "pingen";
1398
+ faxsuite: "faxsuite";
1399
+ mock: "mock";
1400
+ }>;
1401
+ acceptance_reference_hash: z.ZodString;
1402
+ accepted_at: z.ZodISODateTime;
1403
+ }, z.core.$strict>>;
1404
+ status: z.ZodObject<{
1405
+ normalized: z.ZodEnum<{
1406
+ failed: "failed";
1407
+ cancelled: "cancelled";
1408
+ funds_reserved: "funds_reserved";
1409
+ submitting: "submitting";
1410
+ provider_accepted: "provider_accepted";
1411
+ producing: "producing";
1412
+ sending: "sending";
1413
+ handed_to_carrier: "handed_to_carrier";
1414
+ delivered: "delivered";
1415
+ returned: "returned";
1416
+ cancellation_pending: "cancellation_pending";
1417
+ }>;
1418
+ observed_at: z.ZodISODateTime;
1419
+ }, z.core.$strict>;
1420
+ event_chain: z.ZodObject<{
1421
+ valid: z.ZodBoolean;
1422
+ checked_events: z.ZodInt;
1423
+ head: z.ZodNullable<z.ZodString>;
1424
+ }, z.core.$strict>;
1425
+ generated_at: z.ZodISODateTime;
1426
+ }, z.core.$strict>;
1427
+ next_actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
1428
+ action: z.ZodString;
1429
+ method: z.ZodOptional<z.ZodEnum<{
1430
+ GET: "GET";
1431
+ POST: "POST";
1432
+ PATCH: "PATCH";
1433
+ DELETE: "DELETE";
1434
+ }>>;
1435
+ href: z.ZodOptional<z.ZodString>;
1436
+ }, z.core.$strict>>>;
1437
+ }, z.core.$strict>;
1438
+ };
1439
+ readonly cancelDispatch: {
1440
+ readonly operationId: "cancelDispatch";
1441
+ readonly method: "POST";
1442
+ readonly path: "/v1/dispatches/{dispatchId}/cancel";
1443
+ readonly request: {
1444
+ readonly kind: "none";
1445
+ };
1446
+ readonly pathParameters: {
1447
+ readonly dispatchId: z.ZodString;
1448
+ };
1449
+ readonly queryParameters: {};
1450
+ readonly dataSchema: z.ZodObject<{
1451
+ id: z.ZodString;
1452
+ draft_id: z.ZodString;
1453
+ status: z.ZodEnum<{
1454
+ failed: "failed";
1455
+ cancelled: "cancelled";
1456
+ funds_reserved: "funds_reserved";
1457
+ submitting: "submitting";
1458
+ provider_accepted: "provider_accepted";
1459
+ producing: "producing";
1460
+ sending: "sending";
1461
+ handed_to_carrier: "handed_to_carrier";
1462
+ delivered: "delivered";
1463
+ returned: "returned";
1464
+ cancellation_pending: "cancellation_pending";
1465
+ }>;
1466
+ channel: z.ZodEnum<{
1467
+ letter: "letter";
1468
+ fax: "fax";
1469
+ }>;
1470
+ amount_cents: z.ZodInt;
1471
+ currency: z.ZodLiteral<"EUR">;
1472
+ scheduled_for: z.ZodNullable<z.ZodISODateTime>;
1473
+ needs_review: z.ZodBoolean;
1474
+ terminal_reason: z.ZodNullable<z.ZodString>;
1475
+ created_at: z.ZodISODateTime;
1476
+ updated_at: z.ZodISODateTime;
1477
+ }, z.core.$strict>;
1478
+ readonly requiresIdempotencyKey: false;
1479
+ readonly safeToRetry: false;
1480
+ } & {
1481
+ readonly responseSchema: z.ZodObject<{
1482
+ request_id: z.ZodString;
1483
+ data: z.ZodObject<{
1484
+ id: z.ZodString;
1485
+ draft_id: z.ZodString;
1486
+ status: z.ZodEnum<{
1487
+ failed: "failed";
1488
+ cancelled: "cancelled";
1489
+ funds_reserved: "funds_reserved";
1490
+ submitting: "submitting";
1491
+ provider_accepted: "provider_accepted";
1492
+ producing: "producing";
1493
+ sending: "sending";
1494
+ handed_to_carrier: "handed_to_carrier";
1495
+ delivered: "delivered";
1496
+ returned: "returned";
1497
+ cancellation_pending: "cancellation_pending";
1498
+ }>;
1499
+ channel: z.ZodEnum<{
1500
+ letter: "letter";
1501
+ fax: "fax";
1502
+ }>;
1503
+ amount_cents: z.ZodInt;
1504
+ currency: z.ZodLiteral<"EUR">;
1505
+ scheduled_for: z.ZodNullable<z.ZodISODateTime>;
1506
+ needs_review: z.ZodBoolean;
1507
+ terminal_reason: z.ZodNullable<z.ZodString>;
1508
+ created_at: z.ZodISODateTime;
1509
+ updated_at: z.ZodISODateTime;
1510
+ }, z.core.$strict>;
1511
+ next_actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
1512
+ action: z.ZodString;
1513
+ method: z.ZodOptional<z.ZodEnum<{
1514
+ GET: "GET";
1515
+ POST: "POST";
1516
+ PATCH: "PATCH";
1517
+ DELETE: "DELETE";
1518
+ }>>;
1519
+ href: z.ZodOptional<z.ZodString>;
1520
+ }, z.core.$strict>>>;
1521
+ }, z.core.$strict>;
1522
+ };
1523
+ readonly getWallet: {
1524
+ readonly operationId: "getWallet";
1525
+ readonly method: "GET";
1526
+ readonly path: "/v1/wallet";
1527
+ readonly request: {
1528
+ readonly kind: "none";
1529
+ };
1530
+ readonly pathParameters: {};
1531
+ readonly queryParameters: {};
1532
+ readonly dataSchema: z.ZodObject<{
1533
+ available_cents: z.ZodInt;
1534
+ reserved_cents: z.ZodInt;
1535
+ total_cents: z.ZodInt;
1536
+ currency: z.ZodLiteral<"EUR">;
1537
+ }, z.core.$strict>;
1538
+ readonly requiresIdempotencyKey: false;
1539
+ readonly safeToRetry: true;
1540
+ } & {
1541
+ readonly responseSchema: z.ZodObject<{
1542
+ request_id: z.ZodString;
1543
+ data: z.ZodObject<{
1544
+ available_cents: z.ZodInt;
1545
+ reserved_cents: z.ZodInt;
1546
+ total_cents: z.ZodInt;
1547
+ currency: z.ZodLiteral<"EUR">;
1548
+ }, z.core.$strict>;
1549
+ next_actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
1550
+ action: z.ZodString;
1551
+ method: z.ZodOptional<z.ZodEnum<{
1552
+ GET: "GET";
1553
+ POST: "POST";
1554
+ PATCH: "PATCH";
1555
+ DELETE: "DELETE";
1556
+ }>>;
1557
+ href: z.ZodOptional<z.ZodString>;
1558
+ }, z.core.$strict>>>;
1559
+ }, z.core.$strict>;
1560
+ };
1561
+ };
1562
+ export type PapierApiOperationName = keyof typeof papierApiOperations;
1563
+ export type PapierApiOperationResponse<Name extends PapierApiOperationName> = z.infer<(typeof papierApiOperations)[Name]["responseSchema"]>;