@timbro/invoices 0.11.0 → 0.13.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.
Files changed (59) hide show
  1. package/README.md +46 -0
  2. package/dist/admin.d.ts +2 -1
  3. package/dist/admin.d.ts.map +1 -1
  4. package/dist/admin.js +1 -0
  5. package/dist/certification-workbook.d.ts +9 -0
  6. package/dist/certification-workbook.d.ts.map +1 -0
  7. package/dist/certification-workbook.js +13 -0
  8. package/dist/fiscal-engine-runtime.manifest.json +117 -112
  9. package/dist/fiscal-engine-runtime.provenance.json +194 -189
  10. package/dist/generated/certification-api-contract.d.ts +430 -0
  11. package/dist/generated/certification-api-contract.d.ts.map +1 -0
  12. package/dist/generated/certification-api-contract.js +483 -0
  13. package/dist/generated/hosted/index.d.ts +3 -3
  14. package/dist/generated/hosted/index.d.ts.map +1 -1
  15. package/dist/generated/hosted/index.js +2 -2
  16. package/dist/generated/hosted/sdk.gen.d.ts +31 -1
  17. package/dist/generated/hosted/sdk.gen.d.ts.map +1 -1
  18. package/dist/generated/hosted/sdk.gen.js +389 -1
  19. package/dist/generated/hosted/types.gen.d.ts +878 -36
  20. package/dist/generated/hosted/types.gen.d.ts.map +1 -1
  21. package/dist/generated/hosted/zod-response.gen.d.ts +6005 -192
  22. package/dist/generated/hosted/zod-response.gen.d.ts.map +1 -1
  23. package/dist/generated/hosted/zod-response.gen.js +766 -231
  24. package/dist/generated/hosted/zod.gen.d.ts +1622 -7
  25. package/dist/generated/hosted/zod.gen.d.ts.map +1 -1
  26. package/dist/generated/hosted/zod.gen.js +830 -215
  27. package/dist/generated/index.d.ts +3 -3
  28. package/dist/generated/index.d.ts.map +1 -1
  29. package/dist/generated/index.js +2 -2
  30. package/dist/generated/invoice-api-contract.d.ts +1345 -105
  31. package/dist/generated/invoice-api-contract.d.ts.map +1 -1
  32. package/dist/generated/invoice-api-contract.js +1755 -163
  33. package/dist/generated/problem-catalog.d.ts.map +1 -1
  34. package/dist/generated/problem-catalog.js +2 -0
  35. package/dist/generated/sdk.gen.d.ts +5 -1
  36. package/dist/generated/sdk.gen.d.ts.map +1 -1
  37. package/dist/generated/sdk.gen.js +109 -1
  38. package/dist/generated/types.gen.d.ts +534 -51
  39. package/dist/generated/types.gen.d.ts.map +1 -1
  40. package/dist/generated/zod-response.gen.d.ts +21272 -4130
  41. package/dist/generated/zod-response.gen.d.ts.map +1 -1
  42. package/dist/generated/zod-response.gen.js +230 -4
  43. package/dist/generated/zod.gen.d.ts +17458 -2747
  44. package/dist/generated/zod.gen.d.ts.map +1 -1
  45. package/dist/generated/zod.gen.js +2333 -1441
  46. package/dist/generated-operation-client.d.ts +2 -2
  47. package/dist/generated-operation-client.d.ts.map +1 -1
  48. package/dist/hosted-tenant.d.ts +9 -0
  49. package/dist/hosted-tenant.d.ts.map +1 -1
  50. package/dist/hosted-tenant.js +7 -0
  51. package/dist/index.d.ts +2 -1
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/invoice-hosted-controls.d.ts +31 -3
  54. package/dist/invoice-hosted-controls.d.ts.map +1 -1
  55. package/dist/invoice-hosted-controls.js +73 -12
  56. package/dist/problem-contract.d.ts +2 -0
  57. package/dist/problem-contract.d.ts.map +1 -1
  58. package/dist/timbro_fiscal_engine_bg.wasm +0 -0
  59. package/package.json +3 -3
@@ -243,6 +243,20 @@ export const zMerchantBusinessLiveFiscalSetup = z.union([
243
243
  */
244
244
  export const zProblem = z.strictObject({
245
245
  code: z.enum([
246
+ "authorization_not_found",
247
+ "authorization_checkout_reference_invalid",
248
+ "authorization_reference_conflict",
249
+ "authorization_capture_conflict",
250
+ "authorization_capture_exceeds_hold",
251
+ "authorization_not_capturable",
252
+ "authorization_not_cancelable",
253
+ "authorization_not_editable",
254
+ "authorization_submission_invalid",
255
+ "authorization_authentication_pending",
256
+ "authorization_credentials_unavailable",
257
+ "authorization_dispatch_refused",
258
+ "authorization_hold_evidence_missing",
259
+ "provider_qualification_required",
246
260
  "merchant_authentication_unavailable",
247
261
  "platform_test_profile_unavailable",
248
262
  "merchant_fiscal_binding_unavailable",
@@ -283,6 +297,11 @@ export const zProblem = z.strictObject({
283
297
  "merchant_business_not_member",
284
298
  "merchant_business_revision_conflict",
285
299
  "merchant_business_capabilities_required",
300
+ "merchant_business_certification_path_unavailable",
301
+ "merchant_business_certification_requirements_unmet",
302
+ "merchant_business_certification_revision_conflict",
303
+ "merchant_business_certification_unavailable",
304
+ "merchant_business_certification_evidence_not_found",
286
305
  "merchant_fiscal_setup_incomplete",
287
306
  "merchant_payment_setup_assessment_incomplete",
288
307
  "merchant_certificate_conflict",
@@ -442,6 +461,9 @@ export const zProblem = z.strictObject({
442
461
  "refund_tip_amount_invalid",
443
462
  "refund_tip_allocation_unknown",
444
463
  "refund_amount_invalid",
464
+ "refund_tax_amount_invalid",
465
+ "refund_tax_amount_required",
466
+ "refund_tax_allocation_unknown",
445
467
  "refund_currency_mismatch",
446
468
  "payer_fiscal_profile_invalid",
447
469
  "rate_limit_exceeded",
@@ -510,6 +532,8 @@ export const zProblem = z.strictObject({
510
532
  "request_body_timeout",
511
533
  "malformed_json",
512
534
  "invalid_request",
535
+ "certification_environment_required",
536
+ "certification_test_set_invalid",
513
537
  "invalid_collection_query",
514
538
  "invalid_collection_cursor",
515
539
  "document_type_not_enabled",
@@ -597,6 +621,144 @@ export const zProblem = z.strictObject({
597
621
  title: z.string(),
598
622
  type: z.enum(["about:blank"]),
599
623
  });
624
+ /**
625
+ * MerchantBusinessCertificationRequirement
626
+ */
627
+ export const zMerchantBusinessCertificationRequirement = z.strictObject({
628
+ code: z.union([
629
+ z.literal("invoices_not_requested"),
630
+ z.literal("fiscal_details_incomplete"),
631
+ z.literal("certification_binding_required"),
632
+ z.literal("certification_certificate_required"),
633
+ z.literal("provider_eligibility_unverified"),
634
+ z.literal("certification_receiver_urls_pending"),
635
+ z.literal("certification_test_set_processing_unavailable"),
636
+ ]),
637
+ owner: z.union([
638
+ z.literal("merchant"),
639
+ z.literal("dgii"),
640
+ z.literal("timbro"),
641
+ z.literal("operator"),
642
+ ]),
643
+ blocks: z
644
+ .array(z.union([z.literal("start"), z.literal("step_1"), z.literal("step_2"), z.literal("step_7")]))
645
+ .max(4),
646
+ field: z.string().optional(),
647
+ });
648
+ /**
649
+ * MerchantBusinessCertificationEvidence
650
+ *
651
+ * A business-reported DGII outcome. It remains unverified until an authorized evidence review confirms it.
652
+ */
653
+ export const zMerchantBusinessCertificationEvidence = z.strictObject({
654
+ id: z.string().refine((text) => Array.from(text).length >= 1),
655
+ outcome: z.union([
656
+ z.literal("submitted"),
657
+ z.literal("approved"),
658
+ z.literal("rejected"),
659
+ z.literal("needs_correction"),
660
+ ]),
661
+ verification: z.union([
662
+ z.literal("user_reported"),
663
+ z.literal("operator_verified"),
664
+ z.literal("operator_rejected"),
665
+ ]),
666
+ reference: z
667
+ .string()
668
+ .refine((text) => Array.from(text).length <= 255)
669
+ .nullable(),
670
+ createdAt: z.iso.datetime(),
671
+ reviewedAt: z.iso.datetime().optional(),
672
+ reviewReference: z
673
+ .string()
674
+ .refine((text) => Array.from(text).length <= 512)
675
+ .optional(),
676
+ });
677
+ /**
678
+ * MerchantBusinessCertificationStep
679
+ */
680
+ export const zMerchantBusinessCertificationStep = z.strictObject({
681
+ number: z.union([
682
+ z.literal(1),
683
+ z.literal(2),
684
+ z.literal(3),
685
+ z.literal(4),
686
+ z.literal(5),
687
+ z.literal(6),
688
+ z.literal(7),
689
+ z.literal(8),
690
+ z.literal(9),
691
+ z.literal(10),
692
+ z.literal(11),
693
+ z.literal(12),
694
+ z.literal(13),
695
+ z.literal(14),
696
+ z.literal(15),
697
+ ]),
698
+ code: z.string().refine((text) => Array.from(text).length >= 1),
699
+ title: z.string().refine((text) => Array.from(text).length >= 1),
700
+ actor: z.union([z.literal("merchant"), z.literal("dgii"), z.literal("timbro")]),
701
+ status: z.union([
702
+ z.literal("blocked"),
703
+ z.literal("action_required"),
704
+ z.literal("awaiting_dgii"),
705
+ z.literal("reported"),
706
+ z.literal("verified"),
707
+ ]),
708
+ evidence: z.array(zMerchantBusinessCertificationEvidence),
709
+ });
710
+ /**
711
+ * RetainedCertificationWorkbook
712
+ */
713
+ export const zRetainedCertificationWorkbook = z.strictObject({
714
+ name: z.string(),
715
+ sha256: z.string().regex(/^[0-9a-f]{64}$/),
716
+ sizeBytes: z.int().gte(1).lte(3145728),
717
+ });
718
+ /**
719
+ * CertificationTestSetKind
720
+ */
721
+ export const zCertificationTestSetKind = z.enum(["ecf"]);
722
+ /**
723
+ * CertificationTestSetObject
724
+ */
725
+ export const zCertificationTestSetObject = z.enum(["certification_test_set"]);
726
+ /**
727
+ * CertificationTestSetRequirement
728
+ */
729
+ export const zCertificationTestSetRequirement = z.enum(["case_mapping_pending"]);
730
+ /**
731
+ * CertificationWorksheetName
732
+ */
733
+ export const zCertificationWorksheetName = z.enum(["ECF", "RFCE"]);
734
+ /**
735
+ * CertificationWorksheetSummary
736
+ */
737
+ export const zCertificationWorksheetSummary = z.strictObject({
738
+ caseCount: z.int().gte(1).lte(1000),
739
+ name: zCertificationWorksheetName,
740
+ });
741
+ /**
742
+ * CertificationTestSetReview
743
+ */
744
+ export const zCertificationTestSetReview = z.strictObject({
745
+ requirements: z.array(zCertificationTestSetRequirement),
746
+ status: z.enum(["review_required"]),
747
+ worksheets: z.array(zCertificationWorksheetSummary),
748
+ });
749
+ /**
750
+ * CertificationTestSetResource
751
+ */
752
+ export const zCertificationTestSetResource = z.strictObject({
753
+ attemptReference: z.string(),
754
+ createdAt: z.iso.datetime(),
755
+ file: zRetainedCertificationWorkbook,
756
+ generation: z.string().regex(/^[1-9][0-9]*$/),
757
+ id: z.uuid(),
758
+ kind: zCertificationTestSetKind,
759
+ object: zCertificationTestSetObject,
760
+ review: zCertificationTestSetReview,
761
+ });
600
762
  /**
601
763
  * MerchantBusiness
602
764
  *
@@ -1221,6 +1383,382 @@ export const zUpdateBusinessResponse = z.strictObject({
1221
1383
  })),
1222
1384
  onboardingUrl: z.url(),
1223
1385
  });
1386
+ /**
1387
+ * MerchantBusinessCertification
1388
+ *
1389
+ * Durable certification preparation and user-reported DGII progress for the authenticated business.
1390
+ */
1391
+ export const zRetrieveMerchantBusinessCertificationResponse = z.union([
1392
+ z.strictObject({
1393
+ object: z.literal("merchant_business_certification"),
1394
+ status: z.literal("not_started"),
1395
+ requirements: z.array(zMerchantBusinessCertificationRequirement),
1396
+ availablePaths: z
1397
+ .array(z.union([z.literal("own_software"), z.literal("external_software")]))
1398
+ .min(1),
1399
+ recommendedPath: z.union([z.literal("own_software"), z.literal("external_software")]),
1400
+ actions: z.array(z.literal("start")).max(1),
1401
+ }),
1402
+ z.strictObject({
1403
+ object: z.literal("merchant_business_certification"),
1404
+ id: z.string().regex(/^cert_[a-z0-9]{24,}$/),
1405
+ revision: z.int().gte(1),
1406
+ status: z.literal("in_progress"),
1407
+ path: z.union([z.literal("own_software"), z.literal("external_software")]),
1408
+ software: z.strictObject({
1409
+ name: z
1410
+ .string()
1411
+ .refine((text) => Array.from(text).length >= 1)
1412
+ .refine((text) => Array.from(text).length <= 128),
1413
+ version: z
1414
+ .string()
1415
+ .refine((text) => Array.from(text).length >= 1)
1416
+ .refine((text) => Array.from(text).length <= 64),
1417
+ }),
1418
+ phase: z.union([
1419
+ z.literal("preparation"),
1420
+ z.literal("application"),
1421
+ z.literal("tests"),
1422
+ z.literal("authorization"),
1423
+ ]),
1424
+ serviceUrls: z
1425
+ .strictObject({
1426
+ reception: z.url(),
1427
+ commercialApproval: z.url(),
1428
+ })
1429
+ .nullable(),
1430
+ requirements: z.array(zMerchantBusinessCertificationRequirement),
1431
+ actions: z.array(z.union([
1432
+ z.literal("report_evidence"),
1433
+ z.literal("import_certificate"),
1434
+ z.literal("upload_test_set"),
1435
+ ])),
1436
+ steps: z.tuple([
1437
+ zMerchantBusinessCertificationStep,
1438
+ zMerchantBusinessCertificationStep,
1439
+ zMerchantBusinessCertificationStep,
1440
+ zMerchantBusinessCertificationStep,
1441
+ zMerchantBusinessCertificationStep,
1442
+ zMerchantBusinessCertificationStep,
1443
+ zMerchantBusinessCertificationStep,
1444
+ zMerchantBusinessCertificationStep,
1445
+ zMerchantBusinessCertificationStep,
1446
+ zMerchantBusinessCertificationStep,
1447
+ zMerchantBusinessCertificationStep,
1448
+ zMerchantBusinessCertificationStep,
1449
+ zMerchantBusinessCertificationStep,
1450
+ zMerchantBusinessCertificationStep,
1451
+ zMerchantBusinessCertificationStep,
1452
+ ]),
1453
+ }),
1454
+ ]);
1455
+ /**
1456
+ * MerchantBusinessCertificationStartRequest
1457
+ */
1458
+ export const zStartMerchantBusinessCertificationBody = z.strictObject({
1459
+ path: z.union([z.literal("own_software"), z.literal("external_software")]),
1460
+ });
1461
+ export const zStartMerchantBusinessCertificationHeaders = z.object({
1462
+ "idempotency-key": z
1463
+ .string()
1464
+ .refine((text) => Array.from(text).length >= 1)
1465
+ .refine((text) => Array.from(text).length <= 255)
1466
+ .regex(/^[\x20-\x7e]+$/),
1467
+ });
1468
+ export const zStartMerchantBusinessCertificationResponse = z.union([
1469
+ z.union([
1470
+ z.strictObject({
1471
+ object: z.literal("merchant_business_certification"),
1472
+ status: z.literal("not_started"),
1473
+ requirements: z.array(zMerchantBusinessCertificationRequirement),
1474
+ availablePaths: z
1475
+ .array(z.union([z.literal("own_software"), z.literal("external_software")]))
1476
+ .min(1),
1477
+ recommendedPath: z.union([z.literal("own_software"), z.literal("external_software")]),
1478
+ actions: z.array(z.literal("start")).max(1),
1479
+ }),
1480
+ z.strictObject({
1481
+ object: z.literal("merchant_business_certification"),
1482
+ id: z.string().regex(/^cert_[a-z0-9]{24,}$/),
1483
+ revision: z.int().gte(1),
1484
+ status: z.literal("in_progress"),
1485
+ path: z.union([z.literal("own_software"), z.literal("external_software")]),
1486
+ software: z.strictObject({
1487
+ name: z
1488
+ .string()
1489
+ .refine((text) => Array.from(text).length >= 1)
1490
+ .refine((text) => Array.from(text).length <= 128),
1491
+ version: z
1492
+ .string()
1493
+ .refine((text) => Array.from(text).length >= 1)
1494
+ .refine((text) => Array.from(text).length <= 64),
1495
+ }),
1496
+ phase: z.union([
1497
+ z.literal("preparation"),
1498
+ z.literal("application"),
1499
+ z.literal("tests"),
1500
+ z.literal("authorization"),
1501
+ ]),
1502
+ serviceUrls: z
1503
+ .strictObject({
1504
+ reception: z.url(),
1505
+ commercialApproval: z.url(),
1506
+ })
1507
+ .nullable(),
1508
+ requirements: z.array(zMerchantBusinessCertificationRequirement),
1509
+ actions: z.array(z.union([
1510
+ z.literal("report_evidence"),
1511
+ z.literal("import_certificate"),
1512
+ z.literal("upload_test_set"),
1513
+ ])),
1514
+ steps: z.tuple([
1515
+ zMerchantBusinessCertificationStep,
1516
+ zMerchantBusinessCertificationStep,
1517
+ zMerchantBusinessCertificationStep,
1518
+ zMerchantBusinessCertificationStep,
1519
+ zMerchantBusinessCertificationStep,
1520
+ zMerchantBusinessCertificationStep,
1521
+ zMerchantBusinessCertificationStep,
1522
+ zMerchantBusinessCertificationStep,
1523
+ zMerchantBusinessCertificationStep,
1524
+ zMerchantBusinessCertificationStep,
1525
+ zMerchantBusinessCertificationStep,
1526
+ zMerchantBusinessCertificationStep,
1527
+ zMerchantBusinessCertificationStep,
1528
+ zMerchantBusinessCertificationStep,
1529
+ zMerchantBusinessCertificationStep,
1530
+ ]),
1531
+ }),
1532
+ ]),
1533
+ z.union([
1534
+ z.strictObject({
1535
+ object: z.literal("merchant_business_certification"),
1536
+ status: z.literal("not_started"),
1537
+ requirements: z.array(zMerchantBusinessCertificationRequirement),
1538
+ availablePaths: z
1539
+ .array(z.union([z.literal("own_software"), z.literal("external_software")]))
1540
+ .min(1),
1541
+ recommendedPath: z.union([z.literal("own_software"), z.literal("external_software")]),
1542
+ actions: z.array(z.literal("start")).max(1),
1543
+ }),
1544
+ z.strictObject({
1545
+ object: z.literal("merchant_business_certification"),
1546
+ id: z.string().regex(/^cert_[a-z0-9]{24,}$/),
1547
+ revision: z.int().gte(1),
1548
+ status: z.literal("in_progress"),
1549
+ path: z.union([z.literal("own_software"), z.literal("external_software")]),
1550
+ software: z.strictObject({
1551
+ name: z
1552
+ .string()
1553
+ .refine((text) => Array.from(text).length >= 1)
1554
+ .refine((text) => Array.from(text).length <= 128),
1555
+ version: z
1556
+ .string()
1557
+ .refine((text) => Array.from(text).length >= 1)
1558
+ .refine((text) => Array.from(text).length <= 64),
1559
+ }),
1560
+ phase: z.union([
1561
+ z.literal("preparation"),
1562
+ z.literal("application"),
1563
+ z.literal("tests"),
1564
+ z.literal("authorization"),
1565
+ ]),
1566
+ serviceUrls: z
1567
+ .strictObject({
1568
+ reception: z.url(),
1569
+ commercialApproval: z.url(),
1570
+ })
1571
+ .nullable(),
1572
+ requirements: z.array(zMerchantBusinessCertificationRequirement),
1573
+ actions: z.array(z.union([
1574
+ z.literal("report_evidence"),
1575
+ z.literal("import_certificate"),
1576
+ z.literal("upload_test_set"),
1577
+ ])),
1578
+ steps: z.tuple([
1579
+ zMerchantBusinessCertificationStep,
1580
+ zMerchantBusinessCertificationStep,
1581
+ zMerchantBusinessCertificationStep,
1582
+ zMerchantBusinessCertificationStep,
1583
+ zMerchantBusinessCertificationStep,
1584
+ zMerchantBusinessCertificationStep,
1585
+ zMerchantBusinessCertificationStep,
1586
+ zMerchantBusinessCertificationStep,
1587
+ zMerchantBusinessCertificationStep,
1588
+ zMerchantBusinessCertificationStep,
1589
+ zMerchantBusinessCertificationStep,
1590
+ zMerchantBusinessCertificationStep,
1591
+ zMerchantBusinessCertificationStep,
1592
+ zMerchantBusinessCertificationStep,
1593
+ zMerchantBusinessCertificationStep,
1594
+ ]),
1595
+ }),
1596
+ ]),
1597
+ ]);
1598
+ /**
1599
+ * MerchantBusinessCertificationEvidenceRequest
1600
+ */
1601
+ export const zSubmitMerchantBusinessCertificationEvidenceBody = z.strictObject({
1602
+ expectedRevision: z.int().gte(1),
1603
+ step: z.union([
1604
+ z.literal(1),
1605
+ z.literal(2),
1606
+ z.literal(3),
1607
+ z.literal(4),
1608
+ z.literal(5),
1609
+ z.literal(6),
1610
+ z.literal(7),
1611
+ z.literal(8),
1612
+ z.literal(9),
1613
+ z.literal(10),
1614
+ z.literal(11),
1615
+ z.literal(12),
1616
+ z.literal(13),
1617
+ z.literal(14),
1618
+ z.literal(15),
1619
+ ]),
1620
+ outcome: z.union([
1621
+ z.literal("submitted"),
1622
+ z.literal("approved"),
1623
+ z.literal("rejected"),
1624
+ z.literal("needs_correction"),
1625
+ ]),
1626
+ reference: z
1627
+ .string()
1628
+ .refine((text) => Array.from(text).length >= 1)
1629
+ .refine((text) => Array.from(text).length <= 255)
1630
+ .regex(/^[^\p{C}]*$/u)
1631
+ .optional(),
1632
+ });
1633
+ export const zSubmitMerchantBusinessCertificationEvidenceHeaders = z.object({
1634
+ "idempotency-key": z
1635
+ .string()
1636
+ .refine((text) => Array.from(text).length >= 1)
1637
+ .refine((text) => Array.from(text).length <= 255)
1638
+ .regex(/^[\x20-\x7e]+$/),
1639
+ });
1640
+ /**
1641
+ * MerchantBusinessCertification
1642
+ *
1643
+ * Durable certification preparation and user-reported DGII progress for the authenticated business.
1644
+ */
1645
+ export const zSubmitMerchantBusinessCertificationEvidenceResponse = z.union([
1646
+ z.strictObject({
1647
+ object: z.literal("merchant_business_certification"),
1648
+ status: z.literal("not_started"),
1649
+ requirements: z.array(zMerchantBusinessCertificationRequirement),
1650
+ availablePaths: z
1651
+ .array(z.union([z.literal("own_software"), z.literal("external_software")]))
1652
+ .min(1),
1653
+ recommendedPath: z.union([z.literal("own_software"), z.literal("external_software")]),
1654
+ actions: z.array(z.literal("start")).max(1),
1655
+ }),
1656
+ z.strictObject({
1657
+ object: z.literal("merchant_business_certification"),
1658
+ id: z.string().regex(/^cert_[a-z0-9]{24,}$/),
1659
+ revision: z.int().gte(1),
1660
+ status: z.literal("in_progress"),
1661
+ path: z.union([z.literal("own_software"), z.literal("external_software")]),
1662
+ software: z.strictObject({
1663
+ name: z
1664
+ .string()
1665
+ .refine((text) => Array.from(text).length >= 1)
1666
+ .refine((text) => Array.from(text).length <= 128),
1667
+ version: z
1668
+ .string()
1669
+ .refine((text) => Array.from(text).length >= 1)
1670
+ .refine((text) => Array.from(text).length <= 64),
1671
+ }),
1672
+ phase: z.union([
1673
+ z.literal("preparation"),
1674
+ z.literal("application"),
1675
+ z.literal("tests"),
1676
+ z.literal("authorization"),
1677
+ ]),
1678
+ serviceUrls: z
1679
+ .strictObject({
1680
+ reception: z.url(),
1681
+ commercialApproval: z.url(),
1682
+ })
1683
+ .nullable(),
1684
+ requirements: z.array(zMerchantBusinessCertificationRequirement),
1685
+ actions: z.array(z.union([
1686
+ z.literal("report_evidence"),
1687
+ z.literal("import_certificate"),
1688
+ z.literal("upload_test_set"),
1689
+ ])),
1690
+ steps: z.tuple([
1691
+ zMerchantBusinessCertificationStep,
1692
+ zMerchantBusinessCertificationStep,
1693
+ zMerchantBusinessCertificationStep,
1694
+ zMerchantBusinessCertificationStep,
1695
+ zMerchantBusinessCertificationStep,
1696
+ zMerchantBusinessCertificationStep,
1697
+ zMerchantBusinessCertificationStep,
1698
+ zMerchantBusinessCertificationStep,
1699
+ zMerchantBusinessCertificationStep,
1700
+ zMerchantBusinessCertificationStep,
1701
+ zMerchantBusinessCertificationStep,
1702
+ zMerchantBusinessCertificationStep,
1703
+ zMerchantBusinessCertificationStep,
1704
+ zMerchantBusinessCertificationStep,
1705
+ zMerchantBusinessCertificationStep,
1706
+ ]),
1707
+ }),
1708
+ ]);
1709
+ /**
1710
+ * CertificationTestSetUploadRequest
1711
+ */
1712
+ export const zUploadMerchantBusinessCertificationTestSetBody = z.strictObject({
1713
+ file: z.strictObject({
1714
+ contentBase64: z
1715
+ .string()
1716
+ .refine((text) => Array.from(text).length >= 1)
1717
+ .refine((text) => Array.from(text).length <= 4194304),
1718
+ name: z
1719
+ .string()
1720
+ .refine((text) => Array.from(text).length >= 1)
1721
+ .refine((text) => Array.from(text).length <= 128),
1722
+ }),
1723
+ kind: z.enum(["ecf"]),
1724
+ });
1725
+ export const zUploadMerchantBusinessCertificationTestSetHeaders = z.object({
1726
+ "idempotency-key": z
1727
+ .string()
1728
+ .refine((text) => Array.from(text).length >= 16)
1729
+ .refine((text) => Array.from(text).length <= 255)
1730
+ .regex(/^[A-Za-z0-9._:-]+$/),
1731
+ });
1732
+ export const zUploadMerchantBusinessCertificationTestSetResponse = z.union([
1733
+ z.strictObject({
1734
+ attemptReference: z.string(),
1735
+ createdAt: z.iso.datetime(),
1736
+ file: zRetainedCertificationWorkbook,
1737
+ generation: z.string().regex(/^[1-9][0-9]*$/),
1738
+ id: z.uuid(),
1739
+ kind: zCertificationTestSetKind,
1740
+ object: zCertificationTestSetObject,
1741
+ review: zCertificationTestSetReview,
1742
+ }),
1743
+ z.strictObject({
1744
+ attemptReference: z.string(),
1745
+ createdAt: z.iso.datetime(),
1746
+ file: zRetainedCertificationWorkbook,
1747
+ generation: z.string().regex(/^[1-9][0-9]*$/),
1748
+ id: z.uuid(),
1749
+ kind: zCertificationTestSetKind,
1750
+ object: zCertificationTestSetObject,
1751
+ review: zCertificationTestSetReview,
1752
+ }),
1753
+ ]);
1754
+ /**
1755
+ * CurrentCertificationTestSet
1756
+ *
1757
+ * Default Response
1758
+ */
1759
+ export const zRetrieveMerchantBusinessCertificationTestSetResponse = z.strictObject({
1760
+ current: zCertificationTestSetResource.nullable(),
1761
+ });
1224
1762
  /**
1225
1763
  * MerchantBusinessConfigureInvoicingRequest
1226
1764
  */
@@ -1246,108 +1784,93 @@ export const zConfigureInvoicingResponse = z.strictObject({
1246
1784
  /**
1247
1785
  * MerchantBusinessSigningCertificateRequest
1248
1786
  */
1249
- export const zImportSigningCertificateBody = z.strictObject({
1250
- mode: z.union([z.literal("test"), z.literal("live")]),
1251
- certificateP12Base64: z
1252
- .string()
1253
- .refine((text) => Array.from(text).length >= 24)
1254
- .refine((text) => Array.from(text).length <= 200000),
1255
- password: z
1256
- .string()
1257
- .refine((text) => Array.from(text).length >= 1)
1258
- .refine((text) => Array.from(text).length <= 256),
1259
- });
1787
+ export const zImportSigningCertificateBody = z.union([
1788
+ z.strictObject({
1789
+ mode: z.union([z.literal("test"), z.literal("live")]),
1790
+ certificateP12Base64: z
1791
+ .string()
1792
+ .refine((text) => Array.from(text).length >= 24)
1793
+ .refine((text) => Array.from(text).length <= 200000),
1794
+ password: z
1795
+ .string()
1796
+ .refine((text) => Array.from(text).length >= 1)
1797
+ .refine((text) => Array.from(text).length <= 256),
1798
+ }),
1799
+ z.strictObject({
1800
+ purpose: z.literal("certification"),
1801
+ certificateP12Base64: z
1802
+ .string()
1803
+ .refine((text) => Array.from(text).length >= 24)
1804
+ .refine((text) => Array.from(text).length <= 200000),
1805
+ password: z
1806
+ .string()
1807
+ .refine((text) => Array.from(text).length >= 1)
1808
+ .refine((text) => Array.from(text).length <= 256),
1809
+ }),
1810
+ ]);
1260
1811
  /**
1261
- * MerchantBusiness
1262
- *
1263
- * The business the credential selects, its capabilities, and the requirements that remain.
1812
+ * Default Response
1264
1813
  */
1265
- export const zImportSigningCertificateResponse = z.strictObject({
1266
- object: z.literal("merchant_business"),
1267
- id: z.string().regex(/^mbiz_[0-9a-hjkmnp-tv-z]{24,}$/),
1268
- rnc: z.string().regex(/^[0-9]{9}$/),
1269
- legalName: z.string().refine((text) => Array.from(text).length >= 1),
1270
- revision: z.int().gte(0),
1271
- capabilities: z.strictObject({
1272
- payments: z.strictObject({
1273
- requested: z.boolean(),
1274
- test: z.strictObject({
1275
- status: z.union([
1276
- z.literal("active"),
1277
- z.literal("pending"),
1278
- z.literal("inactive"),
1279
- z.literal("unavailable"),
1280
- ]),
1814
+ export const zImportSigningCertificateResponse = z.union([
1815
+ z.strictObject({
1816
+ object: z.literal("merchant_business"),
1817
+ id: z.string().regex(/^mbiz_[0-9a-hjkmnp-tv-z]{24,}$/),
1818
+ rnc: z.string().regex(/^[0-9]{9}$/),
1819
+ legalName: z.string().refine((text) => Array.from(text).length >= 1),
1820
+ revision: z.int().gte(0),
1821
+ capabilities: z.strictObject({
1822
+ payments: z.strictObject({
1823
+ requested: z.boolean(),
1824
+ test: z.strictObject({
1825
+ status: z.union([
1826
+ z.literal("active"),
1827
+ z.literal("pending"),
1828
+ z.literal("inactive"),
1829
+ z.literal("unavailable"),
1830
+ ]),
1831
+ }),
1832
+ live: z.strictObject({
1833
+ status: z.union([
1834
+ z.literal("active"),
1835
+ z.literal("pending"),
1836
+ z.literal("inactive"),
1837
+ z.literal("unavailable"),
1838
+ ]),
1839
+ }),
1281
1840
  }),
1282
- live: z.strictObject({
1283
- status: z.union([
1284
- z.literal("active"),
1285
- z.literal("pending"),
1286
- z.literal("inactive"),
1287
- z.literal("unavailable"),
1288
- ]),
1841
+ invoices: z.strictObject({
1842
+ requested: z.boolean(),
1843
+ test: z.strictObject({
1844
+ status: z.union([
1845
+ z.literal("active"),
1846
+ z.literal("pending"),
1847
+ z.literal("inactive"),
1848
+ z.literal("unavailable"),
1849
+ ]),
1850
+ }),
1851
+ live: z.strictObject({
1852
+ status: z.union([
1853
+ z.literal("active"),
1854
+ z.literal("pending"),
1855
+ z.literal("inactive"),
1856
+ z.literal("unavailable"),
1857
+ ]),
1858
+ }),
1289
1859
  }),
1290
1860
  }),
1291
- invoices: z.strictObject({
1292
- requested: z.boolean(),
1293
- test: z.strictObject({
1294
- status: z.union([
1295
- z.literal("active"),
1296
- z.literal("pending"),
1297
- z.literal("inactive"),
1298
- z.literal("unavailable"),
1299
- ]),
1300
- }),
1301
- live: z.strictObject({
1302
- status: z.union([
1303
- z.literal("active"),
1304
- z.literal("pending"),
1305
- z.literal("inactive"),
1306
- z.literal("unavailable"),
1307
- ]),
1308
- }),
1309
- }),
1310
- }),
1311
- fiscalDetails: z.strictObject({
1312
- commercialName: z.string().nullable(),
1313
- address: z.string().nullable(),
1314
- location: z
1315
- .strictObject({
1316
- placeId: z
1317
- .string()
1318
- .regex(/^place_[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/),
1319
- catalogReleaseId: z.string().regex(/^dr_[A-Za-z0-9._-]+$/),
1320
- municipalityCode: z
1321
- .string()
1322
- .regex(/^[0-9]{6}$/)
1323
- .nullable(),
1324
- name: z
1325
- .string()
1326
- .refine((text) => Array.from(text).length >= 1)
1327
- .refine((text) => Array.from(text).length <= 160),
1328
- kind: z.union([
1329
- z.literal("country"),
1330
- z.literal("region"),
1331
- z.literal("national_district"),
1332
- z.literal("province"),
1333
- z.literal("municipality"),
1334
- z.literal("municipal_district"),
1335
- z.literal("urban_zone"),
1336
- z.literal("section"),
1337
- z.literal("barrio"),
1338
- z.literal("paraje"),
1339
- z.literal("subbarrio"),
1340
- ]),
1341
- qualityStatus: z.union([
1342
- z.literal("verified"),
1343
- z.literal("provisional"),
1344
- z.literal("conflicted"),
1345
- ]),
1346
- ancestors: z
1347
- .array(z.strictObject({
1861
+ fiscalDetails: z.strictObject({
1862
+ commercialName: z.string().nullable(),
1863
+ address: z.string().nullable(),
1864
+ location: z
1865
+ .strictObject({
1348
1866
  placeId: z
1349
1867
  .string()
1350
1868
  .regex(/^place_[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/),
1869
+ catalogReleaseId: z.string().regex(/^dr_[A-Za-z0-9._-]+$/),
1870
+ municipalityCode: z
1871
+ .string()
1872
+ .regex(/^[0-9]{6}$/)
1873
+ .nullable(),
1351
1874
  name: z
1352
1875
  .string()
1353
1876
  .refine((text) => Array.from(text).length >= 1)
@@ -1370,140 +1893,232 @@ export const zImportSigningCertificateResponse = z.strictObject({
1370
1893
  z.literal("provisional"),
1371
1894
  z.literal("conflicted"),
1372
1895
  ]),
1373
- }))
1374
- .max(32),
1375
- })
1376
- .nullable(),
1377
- phone: z.string().nullable(),
1378
- email: z.string().nullable(),
1379
- defaultIncomeType: z.string().nullable(),
1380
- }),
1381
- paymentsProfile: z
1382
- .strictObject({
1383
- displayName: z
1384
- .string()
1385
- .refine((text) => Array.from(text).length >= 1)
1386
- .refine((text) => Array.from(text).length <= 80)
1387
- .regex(/\S/),
1388
- statementDescriptor: z
1389
- .string()
1390
- .refine((text) => Array.from(text).length >= 1)
1391
- .refine((text) => Array.from(text).length <= 22)
1392
- .regex(/\S/),
1393
- permanentAddress: z.strictObject({
1394
- line1: z
1395
- .string()
1396
- .refine((text) => Array.from(text).length >= 1)
1397
- .refine((text) => Array.from(text).length <= 160)
1398
- .regex(/\S/),
1399
- line2: z
1400
- .string()
1401
- .refine((text) => Array.from(text).length >= 1)
1402
- .refine((text) => Array.from(text).length <= 160)
1403
- .regex(/\S/)
1404
- .optional(),
1405
- city: z
1896
+ ancestors: z
1897
+ .array(z.strictObject({
1898
+ placeId: z
1899
+ .string()
1900
+ .regex(/^place_[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/),
1901
+ name: z
1902
+ .string()
1903
+ .refine((text) => Array.from(text).length >= 1)
1904
+ .refine((text) => Array.from(text).length <= 160),
1905
+ kind: z.union([
1906
+ z.literal("country"),
1907
+ z.literal("region"),
1908
+ z.literal("national_district"),
1909
+ z.literal("province"),
1910
+ z.literal("municipality"),
1911
+ z.literal("municipal_district"),
1912
+ z.literal("urban_zone"),
1913
+ z.literal("section"),
1914
+ z.literal("barrio"),
1915
+ z.literal("paraje"),
1916
+ z.literal("subbarrio"),
1917
+ ]),
1918
+ qualityStatus: z.union([
1919
+ z.literal("verified"),
1920
+ z.literal("provisional"),
1921
+ z.literal("conflicted"),
1922
+ ]),
1923
+ }))
1924
+ .max(32),
1925
+ })
1926
+ .nullable(),
1927
+ phone: z.string().nullable(),
1928
+ email: z.string().nullable(),
1929
+ defaultIncomeType: z.string().nullable(),
1930
+ }),
1931
+ paymentsProfile: z
1932
+ .strictObject({
1933
+ displayName: z
1406
1934
  .string()
1407
1935
  .refine((text) => Array.from(text).length >= 1)
1408
1936
  .refine((text) => Array.from(text).length <= 80)
1409
1937
  .regex(/\S/),
1410
- province: z
1411
- .string()
1412
- .refine((text) => Array.from(text).length >= 1)
1413
- .refine((text) => Array.from(text).length <= 80)
1414
- .regex(/\S/)
1415
- .optional(),
1416
- postalCode: z
1938
+ statementDescriptor: z
1417
1939
  .string()
1418
1940
  .refine((text) => Array.from(text).length >= 1)
1419
- .refine((text) => Array.from(text).length <= 20)
1420
- .regex(/\S/)
1421
- .optional(),
1422
- countryCode: z.string().regex(/^[A-Z]{2}$/),
1423
- }),
1424
- supportEmail: z.email().refine((text) => Array.from(text).length <= 254),
1425
- supportPhone: z.string().regex(/^\+[1-9][0-9]{7,14}$/),
1426
- deliveryPolicy: z.union([
1427
- z.strictObject({
1428
- kind: z.literal("not_offered"),
1429
- }),
1430
- z.strictObject({
1431
- kind: z.literal("merchant_managed"),
1432
- summary: z
1941
+ .refine((text) => Array.from(text).length <= 22)
1942
+ .regex(/\S/),
1943
+ permanentAddress: z.strictObject({
1944
+ line1: z
1433
1945
  .string()
1434
1946
  .refine((text) => Array.from(text).length >= 1)
1435
1947
  .refine((text) => Array.from(text).length <= 160)
1436
1948
  .regex(/\S/),
1437
- url: z
1438
- .url()
1439
- .refine((text) => Array.from(text).length <= 2048)
1440
- .regex(/^https?:\/\//)
1949
+ line2: z
1950
+ .string()
1951
+ .refine((text) => Array.from(text).length >= 1)
1952
+ .refine((text) => Array.from(text).length <= 160)
1953
+ .regex(/\S/)
1954
+ .optional(),
1955
+ city: z
1956
+ .string()
1957
+ .refine((text) => Array.from(text).length >= 1)
1958
+ .refine((text) => Array.from(text).length <= 80)
1959
+ .regex(/\S/),
1960
+ province: z
1961
+ .string()
1962
+ .refine((text) => Array.from(text).length >= 1)
1963
+ .refine((text) => Array.from(text).length <= 80)
1964
+ .regex(/\S/)
1965
+ .optional(),
1966
+ postalCode: z
1967
+ .string()
1968
+ .refine((text) => Array.from(text).length >= 1)
1969
+ .refine((text) => Array.from(text).length <= 20)
1970
+ .regex(/\S/)
1441
1971
  .optional(),
1972
+ countryCode: z.string().regex(/^[A-Z]{2}$/),
1442
1973
  }),
1443
- ]),
1444
- })
1445
- .nullable(),
1446
- invoicing: z.strictObject({
1447
- test: zMerchantBusinessFiscalSetup,
1448
- live: zMerchantBusinessLiveFiscalSetup,
1974
+ supportEmail: z.email().refine((text) => Array.from(text).length <= 254),
1975
+ supportPhone: z.string().regex(/^\+[1-9][0-9]{7,14}$/),
1976
+ deliveryPolicy: z.union([
1977
+ z.strictObject({
1978
+ kind: z.literal("not_offered"),
1979
+ }),
1980
+ z.strictObject({
1981
+ kind: z.literal("merchant_managed"),
1982
+ summary: z
1983
+ .string()
1984
+ .refine((text) => Array.from(text).length >= 1)
1985
+ .refine((text) => Array.from(text).length <= 160)
1986
+ .regex(/\S/),
1987
+ url: z
1988
+ .url()
1989
+ .refine((text) => Array.from(text).length <= 2048)
1990
+ .regex(/^https?:\/\//)
1991
+ .optional(),
1992
+ }),
1993
+ ]),
1994
+ })
1995
+ .nullable(),
1996
+ invoicing: z.strictObject({
1997
+ test: zMerchantBusinessFiscalSetup,
1998
+ live: zMerchantBusinessLiveFiscalSetup,
1999
+ }),
2000
+ requirements: z.array(z.strictObject({
2001
+ code: z.union([
2002
+ z.literal("capabilities_required"),
2003
+ z.literal("commercial_name_required"),
2004
+ z.literal("address_required"),
2005
+ z.literal("location_required"),
2006
+ z.literal("phone_required"),
2007
+ z.literal("default_income_type_required"),
2008
+ z.literal("contact_email_verification_required"),
2009
+ z.literal("fiscal_details_rejected"),
2010
+ z.literal("taxpayer_registration_required"),
2011
+ z.literal("signing_certificate_required"),
2012
+ z.literal("signing_certificate_expiring"),
2013
+ z.literal("test_fiscal_document_rejected"),
2014
+ z.literal("test_fiscal_document_pending"),
2015
+ z.literal("test_fiscal_document_send_pending"),
2016
+ z.literal("fiscal_binding_pending"),
2017
+ z.literal("legal_issuer_sync_pending"),
2018
+ z.literal("fiscal_setup_unavailable"),
2019
+ z.literal("fiscal_binding_conflict"),
2020
+ z.literal("fiscal_issuer_rejected"),
2021
+ z.literal("test_fiscal_document_operator_required"),
2022
+ z.literal("payments_profile_required"),
2023
+ z.literal("test_payments_unavailable"),
2024
+ z.literal("merchant_account_required"),
2025
+ z.literal("merchant_account_disabled"),
2026
+ z.literal("active_credential_required"),
2027
+ z.literal("credential_material_invalid"),
2028
+ z.literal("test_live_mode_mismatch"),
2029
+ z.literal("callback_configuration_failed"),
2030
+ z.literal("callback_configuration_required"),
2031
+ z.literal("connectivity_check_failed"),
2032
+ z.literal("connectivity_check_required"),
2033
+ z.literal("provider_qualification_failed"),
2034
+ z.literal("provider_qualification_required"),
2035
+ z.literal("provider_adapter_unavailable"),
2036
+ ]),
2037
+ owner: z.union([
2038
+ z.literal("merchant"),
2039
+ z.literal("dgii"),
2040
+ z.literal("timbro"),
2041
+ z.literal("provider"),
2042
+ z.literal("operator"),
2043
+ ]),
2044
+ blocks: z.array(z.union([z.literal("payments"), z.literal("invoices")])).max(2),
2045
+ mode: z.union([z.literal("test"), z.literal("live")]).optional(),
2046
+ field: z.string().optional(),
2047
+ errors: z
2048
+ .array(z.strictObject({
2049
+ code: z.string(),
2050
+ message: z.string(),
2051
+ }))
2052
+ .min(1)
2053
+ .optional(),
2054
+ })),
2055
+ onboardingUrl: z.url(),
1449
2056
  }),
1450
- requirements: z.array(z.strictObject({
1451
- code: z.union([
1452
- z.literal("capabilities_required"),
1453
- z.literal("commercial_name_required"),
1454
- z.literal("address_required"),
1455
- z.literal("location_required"),
1456
- z.literal("phone_required"),
1457
- z.literal("default_income_type_required"),
1458
- z.literal("contact_email_verification_required"),
1459
- z.literal("fiscal_details_rejected"),
1460
- z.literal("taxpayer_registration_required"),
1461
- z.literal("signing_certificate_required"),
1462
- z.literal("signing_certificate_expiring"),
1463
- z.literal("test_fiscal_document_rejected"),
1464
- z.literal("test_fiscal_document_pending"),
1465
- z.literal("test_fiscal_document_send_pending"),
1466
- z.literal("fiscal_binding_pending"),
1467
- z.literal("legal_issuer_sync_pending"),
1468
- z.literal("fiscal_setup_unavailable"),
1469
- z.literal("fiscal_binding_conflict"),
1470
- z.literal("fiscal_issuer_rejected"),
1471
- z.literal("test_fiscal_document_operator_required"),
1472
- z.literal("payments_profile_required"),
1473
- z.literal("test_payments_unavailable"),
1474
- z.literal("merchant_account_required"),
1475
- z.literal("merchant_account_disabled"),
1476
- z.literal("active_credential_required"),
1477
- z.literal("credential_material_invalid"),
1478
- z.literal("test_live_mode_mismatch"),
1479
- z.literal("callback_configuration_failed"),
1480
- z.literal("callback_configuration_required"),
1481
- z.literal("connectivity_check_failed"),
1482
- z.literal("connectivity_check_required"),
1483
- z.literal("provider_qualification_failed"),
1484
- z.literal("provider_qualification_required"),
1485
- z.literal("provider_adapter_unavailable"),
1486
- ]),
1487
- owner: z.union([
1488
- z.literal("merchant"),
1489
- z.literal("dgii"),
1490
- z.literal("timbro"),
1491
- z.literal("provider"),
1492
- z.literal("operator"),
1493
- ]),
1494
- blocks: z.array(z.union([z.literal("payments"), z.literal("invoices")])).max(2),
1495
- mode: z.union([z.literal("test"), z.literal("live")]).optional(),
1496
- field: z.string().optional(),
1497
- errors: z
1498
- .array(z.strictObject({
1499
- code: z.string(),
1500
- message: z.string(),
1501
- }))
1502
- .min(1)
1503
- .optional(),
1504
- })),
1505
- onboardingUrl: z.url(),
1506
- });
2057
+ z.union([
2058
+ z.strictObject({
2059
+ object: z.literal("merchant_business_certification"),
2060
+ status: z.literal("not_started"),
2061
+ requirements: z.array(zMerchantBusinessCertificationRequirement),
2062
+ availablePaths: z
2063
+ .array(z.union([z.literal("own_software"), z.literal("external_software")]))
2064
+ .min(1),
2065
+ recommendedPath: z.union([z.literal("own_software"), z.literal("external_software")]),
2066
+ actions: z.array(z.literal("start")).max(1),
2067
+ }),
2068
+ z.strictObject({
2069
+ object: z.literal("merchant_business_certification"),
2070
+ id: z.string().regex(/^cert_[a-z0-9]{24,}$/),
2071
+ revision: z.int().gte(1),
2072
+ status: z.literal("in_progress"),
2073
+ path: z.union([z.literal("own_software"), z.literal("external_software")]),
2074
+ software: z.strictObject({
2075
+ name: z
2076
+ .string()
2077
+ .refine((text) => Array.from(text).length >= 1)
2078
+ .refine((text) => Array.from(text).length <= 128),
2079
+ version: z
2080
+ .string()
2081
+ .refine((text) => Array.from(text).length >= 1)
2082
+ .refine((text) => Array.from(text).length <= 64),
2083
+ }),
2084
+ phase: z.union([
2085
+ z.literal("preparation"),
2086
+ z.literal("application"),
2087
+ z.literal("tests"),
2088
+ z.literal("authorization"),
2089
+ ]),
2090
+ serviceUrls: z
2091
+ .strictObject({
2092
+ reception: z.url(),
2093
+ commercialApproval: z.url(),
2094
+ })
2095
+ .nullable(),
2096
+ requirements: z.array(zMerchantBusinessCertificationRequirement),
2097
+ actions: z.array(z.union([
2098
+ z.literal("report_evidence"),
2099
+ z.literal("import_certificate"),
2100
+ z.literal("upload_test_set"),
2101
+ ])),
2102
+ steps: z.tuple([
2103
+ zMerchantBusinessCertificationStep,
2104
+ zMerchantBusinessCertificationStep,
2105
+ zMerchantBusinessCertificationStep,
2106
+ zMerchantBusinessCertificationStep,
2107
+ zMerchantBusinessCertificationStep,
2108
+ zMerchantBusinessCertificationStep,
2109
+ zMerchantBusinessCertificationStep,
2110
+ zMerchantBusinessCertificationStep,
2111
+ zMerchantBusinessCertificationStep,
2112
+ zMerchantBusinessCertificationStep,
2113
+ zMerchantBusinessCertificationStep,
2114
+ zMerchantBusinessCertificationStep,
2115
+ zMerchantBusinessCertificationStep,
2116
+ zMerchantBusinessCertificationStep,
2117
+ zMerchantBusinessCertificationStep,
2118
+ ]),
2119
+ }),
2120
+ ]),
2121
+ ]);
1507
2122
  /**
1508
2123
  * MerchantBusinessTestFiscalDocumentRequest
1509
2124
  */