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