@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
@@ -30,6 +30,10 @@ export const zAdjustmentNoteBuyer = z.union([
30
30
  .string()
31
31
  .regex(/^(?:(?:31-(?:0?[13578]|1[02])|(?:29|30)-(?:0?[13-9]|1[0-2])|(?:0?[1-9]|1[0-9]|2[0-8])-(?:0?[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-0?2-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000))$/)
32
32
  .optional(),
33
+ delivery_phone: z
34
+ .string()
35
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
36
+ .optional(),
33
37
  email: z
34
38
  .string()
35
39
  .refine((text) => Array.from(text).length <= 80)
@@ -1232,6 +1236,10 @@ export const zAdjustmentNoteBuyer = z.union([
1232
1236
  tax_id: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
1233
1237
  }),
1234
1238
  z.strictObject({
1239
+ delivery_phone: z
1240
+ .string()
1241
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
1242
+ .optional(),
1235
1243
  foreign_identifier: z
1236
1244
  .string()
1237
1245
  .refine((text) => Array.from(text).length >= 1)
@@ -1338,6 +1346,10 @@ export const zBuyer = z.strictObject({
1338
1346
  .string()
1339
1347
  .regex(/^(?:(?:31-(?:0?[13578]|1[02])|(?:29|30)-(?:0?[13-9]|1[0-2])|(?:0?[1-9]|1[0-9]|2[0-8])-(?:0?[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-0?2-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000))$/)
1340
1348
  .optional(),
1349
+ delivery_phone: z
1350
+ .string()
1351
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
1352
+ .optional(),
1341
1353
  email: z
1342
1354
  .string()
1343
1355
  .refine((text) => Array.from(text).length <= 80)
@@ -2642,6 +2654,33 @@ export const zCallerDeclaredSpecialRegimeEligibility = z.union([
2642
2654
  * Signature algorithm pinned with a certificate-custody binding.
2643
2655
  */
2644
2656
  export const zCertificateCustodySignatureAlgorithm = z.enum(["rsa_sha256"]);
2657
+ export const zCertificationTestSetKind = z.enum(["ecf"]);
2658
+ export const zCertificationTestSetObject = z.enum(["certification_test_set"]);
2659
+ export const zCertificationTestSetRequirement = z.enum(["case_mapping_pending"]);
2660
+ export const zCertificationWorkbookFile = z.strictObject({
2661
+ contentBase64: z
2662
+ .string()
2663
+ .refine((text) => Array.from(text).length >= 1)
2664
+ .refine((text) => Array.from(text).length <= 4194304),
2665
+ name: z
2666
+ .string()
2667
+ .refine((text) => Array.from(text).length >= 1)
2668
+ .refine((text) => Array.from(text).length <= 128),
2669
+ });
2670
+ export const zCertificationTestSetUploadRequest = z.strictObject({
2671
+ file: zCertificationWorkbookFile,
2672
+ kind: zCertificationTestSetKind,
2673
+ });
2674
+ export const zCertificationWorksheetName = z.enum(["ECF", "RFCE"]);
2675
+ export const zCertificationWorksheetSummary = z.strictObject({
2676
+ caseCount: z.int().gte(1).lte(1000),
2677
+ name: zCertificationWorksheetName,
2678
+ });
2679
+ export const zCertificationTestSetReview = z.strictObject({
2680
+ requirements: z.array(zCertificationTestSetRequirement),
2681
+ status: z.enum(["review_required"]),
2682
+ worksheets: z.array(zCertificationWorksheetSummary),
2683
+ });
2645
2684
  /**
2646
2685
  * The wire family a Collection page announces.
2647
2686
  */
@@ -2883,6 +2922,10 @@ export const zEvidenceAccessResultCode = z.enum([
2883
2922
  * Foreign customer identity admitted by the Type 46 export profile.
2884
2923
  */
2885
2924
  export const zExportCustomer = z.strictObject({
2925
+ delivery_phone: z
2926
+ .string()
2927
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
2928
+ .optional(),
2886
2929
  foreign_identifier: z
2887
2930
  .string()
2888
2931
  .refine((text) => Array.from(text).length >= 1)
@@ -3307,27 +3350,6 @@ export const zFiscalLifecycleResultCode = z.enum([
3307
3350
  "fiscal_signing_requested",
3308
3351
  "fiscal_signing_retry_requested",
3309
3352
  ]);
3310
- /**
3311
- * One fiscal line admitted by sales and adjustment document profiles.
3312
- */
3313
- export const zFiscalLine = z.strictObject({
3314
- billing_indicator: z.enum(["0", "1", "2", "3", "4"]),
3315
- goods_or_service_indicator: z.enum(["1", "2"]),
3316
- item_codes: z.array(zFiscalItemCode).min(0).max(5).optional(),
3317
- measurement_unit: z.string().regex(/^([1-9]|[1-5][0-9]|6[0-2])$/),
3318
- name: z
3319
- .string()
3320
- .refine((text) => Array.from(text).length >= 1)
3321
- .refine((text) => Array.from(text).length <= 80)
3322
- .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
3323
- quantity: z.string().regex(/^(?=[0-9.]*[1-9])[0-9]{1,16}(\.[0-9]{1,2})?$/),
3324
- source_line_id: z
3325
- .string()
3326
- .refine((text) => Array.from(text).length >= 1)
3327
- .refine((text) => Array.from(text).length <= 128)
3328
- .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
3329
- unit_price: z.string().regex(/^[0-9]{1,16}(\.[0-9]{1,4})?$/),
3330
- });
3331
3353
  /**
3332
3354
  * Deterministic totals calculated for one fiscal line.
3333
3355
  */
@@ -3589,7 +3611,11 @@ export const zHealthReadyResponse = z.strictObject({
3589
3611
  schema_version: z.int().gte(1).lte(2147483647).nullable(),
3590
3612
  status: zHealthStatus,
3591
3613
  });
3592
- export const zHostedCertificateImportEnvironment = z.enum(["sandbox", "production"]);
3614
+ export const zHostedCertificateImportEnvironment = z.enum([
3615
+ "sandbox",
3616
+ "certification",
3617
+ "production",
3618
+ ]);
3593
3619
  export const zHostedImportRequest = z.strictObject({
3594
3620
  certificate_p12_base64: z.string(),
3595
3621
  checkout_tenant_id: z.string(),
@@ -3604,7 +3630,11 @@ export const zHostedImportResponse = z.strictObject({
3604
3630
  object: z.string(),
3605
3631
  signer_subject_serial_number: z.string(),
3606
3632
  });
3607
- export const zHostedInvoiceCredentialEnvironment = z.enum(["sandbox", "production"]);
3633
+ export const zHostedInvoiceCredentialEnvironment = z.enum([
3634
+ "sandbox",
3635
+ "certification",
3636
+ "production",
3637
+ ]);
3608
3638
  export const zHostedInvoiceCredentialRequest = z.strictObject({
3609
3639
  checkout_tenant_id: z.string(),
3610
3640
  environment: zHostedInvoiceCredentialEnvironment,
@@ -3615,10 +3645,16 @@ export const zHostedInvoiceCredentialResponse = z.strictObject({
3615
3645
  object: z.string(),
3616
3646
  source_connection_id: z.uuid(),
3617
3647
  });
3648
+ export const zHostedReceiverUrls = z.strictObject({
3649
+ base_url: z.string(),
3650
+ commercial_approval_url: z.string(),
3651
+ reception_url: z.string(),
3652
+ });
3618
3653
  export const zHostedTenantResource = z.strictObject({
3619
3654
  hosted_tenant_binding_id: z.uuid(),
3620
3655
  legal_issuer_id: z.uuid(),
3621
3656
  organization_id: z.uuid(),
3657
+ receiver_urls: zHostedReceiverUrls,
3622
3658
  source_connection_id: z.uuid(),
3623
3659
  webhook_endpoint_id: z.uuid(),
3624
3660
  webhook_signing_secret: z.string().nullable(),
@@ -3633,6 +3669,108 @@ export const zIdentityEmailSchema = z
3633
3669
  .refine((text) => Array.from(text).length <= 320)
3634
3670
  .regex(/^(?=.{1,320}$)(?=[^@]{1,64}@)[A-Za-z0-9](?:[A-Za-z0-9_+-]*[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9_+-]*[A-Za-z0-9])?)*@(?=[^@]{1,254}$)[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*\.[A-Za-z]{2,63}$/);
3635
3671
  export const zInvitationStatus = z.enum(["pending", "accepted", "expired"]);
3672
+ export const zInvoiceAdditionalInformation = z.strictObject({
3673
+ referenceNumber: z
3674
+ .string()
3675
+ .refine((text) => Array.from(text).length >= 1)
3676
+ .refine((text) => Array.from(text).length <= 20)
3677
+ .regex(/^[0-9]+$/)
3678
+ .nullish(),
3679
+ shipment: z
3680
+ .strictObject({
3681
+ containerNumber: z
3682
+ .string()
3683
+ .refine((text) => Array.from(text).length >= 1)
3684
+ .refine((text) => Array.from(text).length <= 100)
3685
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
3686
+ .nullish(),
3687
+ deliveryNoteNumber: z
3688
+ .string()
3689
+ .refine((text) => Array.from(text).length >= 1)
3690
+ .refine((text) => Array.from(text).length <= 20)
3691
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
3692
+ .nullish(),
3693
+ driver: z
3694
+ .string()
3695
+ .refine((text) => Array.from(text).length >= 1)
3696
+ .refine((text) => Array.from(text).length <= 20)
3697
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
3698
+ .nullish(),
3699
+ grossWeight: z
3700
+ .string()
3701
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
3702
+ .nullish(),
3703
+ grossWeightUnit: z
3704
+ .string()
3705
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
3706
+ .nullish(),
3707
+ netWeight: z
3708
+ .string()
3709
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
3710
+ .nullish(),
3711
+ netWeightUnit: z
3712
+ .string()
3713
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
3714
+ .nullish(),
3715
+ packageCount: z
3716
+ .string()
3717
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
3718
+ .nullish(),
3719
+ packageUnit: z
3720
+ .string()
3721
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
3722
+ .nullish(),
3723
+ packageVolume: z
3724
+ .string()
3725
+ .regex(/^(?=[0-9.]*[1-9])[0-9]{1,16}(\.[0-9]{1,2})?$/)
3726
+ .nullish(),
3727
+ route: z
3728
+ .string()
3729
+ .refine((text) => Array.from(text).length >= 1)
3730
+ .refine((text) => Array.from(text).length <= 20)
3731
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
3732
+ .nullish(),
3733
+ shipmentDate: z.iso
3734
+ .date()
3735
+ .regex(/^(19|20)[0-9]{2}-[0-9]{2}-[0-9]{2}$/)
3736
+ .nullish(),
3737
+ shipmentNumber: z
3738
+ .string()
3739
+ .refine((text) => Array.from(text).length >= 1)
3740
+ .refine((text) => Array.from(text).length <= 25)
3741
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
3742
+ .nullish(),
3743
+ transportDocumentNumber: z
3744
+ .string()
3745
+ .refine((text) => Array.from(text).length >= 1)
3746
+ .refine((text) => Array.from(text).length <= 20)
3747
+ .regex(/^[0-9]+$/)
3748
+ .nullish(),
3749
+ transportZone: z
3750
+ .string()
3751
+ .refine((text) => Array.from(text).length >= 1)
3752
+ .refine((text) => Array.from(text).length <= 20)
3753
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
3754
+ .nullish(),
3755
+ vehicleFiche: z
3756
+ .string()
3757
+ .refine((text) => Array.from(text).length >= 1)
3758
+ .refine((text) => Array.from(text).length <= 10)
3759
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
3760
+ .nullish(),
3761
+ vehiclePlate: z
3762
+ .string()
3763
+ .refine((text) => Array.from(text).length >= 1)
3764
+ .refine((text) => Array.from(text).length <= 7)
3765
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
3766
+ .nullish(),
3767
+ volumeUnit: z
3768
+ .string()
3769
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
3770
+ .nullish(),
3771
+ })
3772
+ .optional(),
3773
+ });
3636
3774
  export const zInvoiceAffectedDocumentAttribution = z.union([
3637
3775
  z.strictObject({
3638
3776
  invoiceId: z.uuid(),
@@ -3657,6 +3795,10 @@ export const zInvoiceBuyer = z.strictObject({
3657
3795
  .refine((text) => Array.from(text).length <= 100)
3658
3796
  .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
3659
3797
  .nullish(),
3798
+ deliveryPhone: z
3799
+ .string()
3800
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
3801
+ .nullish(),
3660
3802
  email: z
3661
3803
  .string()
3662
3804
  .refine((text) => Array.from(text).length <= 80)
@@ -3696,6 +3838,10 @@ export const zInvoiceBuyerIdentity = z.union([
3696
3838
  kind: z.enum(["anonymous"]),
3697
3839
  }),
3698
3840
  z.strictObject({
3841
+ deliveryPhone: z
3842
+ .string()
3843
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
3844
+ .optional(),
3699
3845
  kind: z.enum(["domestic"]),
3700
3846
  legalName: z
3701
3847
  .string()
@@ -3705,6 +3851,10 @@ export const zInvoiceBuyerIdentity = z.union([
3705
3851
  taxId: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
3706
3852
  }),
3707
3853
  z.strictObject({
3854
+ deliveryPhone: z
3855
+ .string()
3856
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
3857
+ .optional(),
3708
3858
  foreignId: z
3709
3859
  .string()
3710
3860
  .refine((text) => Array.from(text).length >= 1)
@@ -3720,6 +3870,10 @@ export const zInvoiceBuyerIdentity = z.union([
3720
3870
  ]);
3721
3871
  export const zInvoiceConsumerBuyer = z.union([
3722
3872
  z.strictObject({
3873
+ deliveryPhone: z
3874
+ .string()
3875
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
3876
+ .nullish(),
3723
3877
  kind: z.enum(["domestic"]),
3724
3878
  legalName: z
3725
3879
  .string()
@@ -3729,6 +3883,10 @@ export const zInvoiceConsumerBuyer = z.union([
3729
3883
  taxId: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
3730
3884
  }),
3731
3885
  z.strictObject({
3886
+ deliveryPhone: z
3887
+ .string()
3888
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
3889
+ .nullish(),
3732
3890
  foreignId: z
3733
3891
  .string()
3734
3892
  .refine((text) => Array.from(text).length >= 1)
@@ -3813,6 +3971,10 @@ export const zInvoiceExpectedTotals = z.strictObject({
3813
3971
  * ForeignBuyer
3814
3972
  */
3815
3973
  export const zInvoiceExportBuyer = z.strictObject({
3974
+ deliveryPhone: z
3975
+ .string()
3976
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
3977
+ .nullish(),
3816
3978
  foreignId: z
3817
3979
  .string()
3818
3980
  .refine((text) => Array.from(text).length >= 1)
@@ -3915,6 +4077,108 @@ export const zInvoiceForeignPaymentResource = z.strictObject({
3915
4077
  payee: zInvoiceForeignPayee,
3916
4078
  withholdingBasis: zInvoiceForeignPaymentWithholdingBasis,
3917
4079
  });
4080
+ export const zInvoiceGovernmentAdditionalInformation = z.strictObject({
4081
+ referenceNumber: z
4082
+ .string()
4083
+ .refine((text) => Array.from(text).length >= 1)
4084
+ .refine((text) => Array.from(text).length <= 20)
4085
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
4086
+ .nullish(),
4087
+ shipment: z
4088
+ .strictObject({
4089
+ containerNumber: z
4090
+ .string()
4091
+ .refine((text) => Array.from(text).length >= 1)
4092
+ .refine((text) => Array.from(text).length <= 100)
4093
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
4094
+ .nullish(),
4095
+ deliveryNoteNumber: z
4096
+ .string()
4097
+ .refine((text) => Array.from(text).length >= 1)
4098
+ .refine((text) => Array.from(text).length <= 20)
4099
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
4100
+ .nullish(),
4101
+ driver: z
4102
+ .string()
4103
+ .refine((text) => Array.from(text).length >= 1)
4104
+ .refine((text) => Array.from(text).length <= 20)
4105
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
4106
+ .nullish(),
4107
+ grossWeight: z
4108
+ .string()
4109
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
4110
+ .nullish(),
4111
+ grossWeightUnit: z
4112
+ .string()
4113
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
4114
+ .nullish(),
4115
+ netWeight: z
4116
+ .string()
4117
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
4118
+ .nullish(),
4119
+ netWeightUnit: z
4120
+ .string()
4121
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
4122
+ .nullish(),
4123
+ packageCount: z
4124
+ .string()
4125
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
4126
+ .nullish(),
4127
+ packageUnit: z
4128
+ .string()
4129
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
4130
+ .nullish(),
4131
+ packageVolume: z
4132
+ .string()
4133
+ .regex(/^(?=[0-9.]*[1-9])[0-9]{1,16}(\.[0-9]{1,2})?$/)
4134
+ .nullish(),
4135
+ route: z
4136
+ .string()
4137
+ .refine((text) => Array.from(text).length >= 1)
4138
+ .refine((text) => Array.from(text).length <= 20)
4139
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
4140
+ .nullish(),
4141
+ shipmentDate: z.iso
4142
+ .date()
4143
+ .regex(/^(19|20)[0-9]{2}-[0-9]{2}-[0-9]{2}$/)
4144
+ .nullish(),
4145
+ shipmentNumber: z
4146
+ .string()
4147
+ .refine((text) => Array.from(text).length >= 1)
4148
+ .refine((text) => Array.from(text).length <= 25)
4149
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
4150
+ .nullish(),
4151
+ transportDocumentNumber: z
4152
+ .string()
4153
+ .refine((text) => Array.from(text).length >= 1)
4154
+ .refine((text) => Array.from(text).length <= 20)
4155
+ .regex(/^[0-9]+$/)
4156
+ .nullish(),
4157
+ transportZone: z
4158
+ .string()
4159
+ .refine((text) => Array.from(text).length >= 1)
4160
+ .refine((text) => Array.from(text).length <= 20)
4161
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
4162
+ .nullish(),
4163
+ vehicleFiche: z
4164
+ .string()
4165
+ .refine((text) => Array.from(text).length >= 1)
4166
+ .refine((text) => Array.from(text).length <= 10)
4167
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
4168
+ .nullish(),
4169
+ vehiclePlate: z
4170
+ .string()
4171
+ .refine((text) => Array.from(text).length >= 1)
4172
+ .refine((text) => Array.from(text).length <= 7)
4173
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
4174
+ .nullish(),
4175
+ volumeUnit: z
4176
+ .string()
4177
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
4178
+ .nullish(),
4179
+ })
4180
+ .optional(),
4181
+ });
3918
4182
  export const zInvoiceGovernmentEligibility = z.union([
3919
4183
  z.strictObject({
3920
4184
  authorityReference: z
@@ -4025,6 +4289,20 @@ export const zInvoiceLatestEvent = z.strictObject({
4025
4289
  occurredAt: z.iso.datetime(),
4026
4290
  sequence: z.string().regex(/^[1-9][0-9]*$/),
4027
4291
  });
4292
+ export const zInvoiceLinePriceAdjustmentResource = z.union([
4293
+ z.strictObject({
4294
+ amount: z.string().regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/),
4295
+ kind: z.enum(["fixed_amount"]),
4296
+ }),
4297
+ z.strictObject({
4298
+ kind: z.enum(["percentage"]),
4299
+ percentage: z.string().regex(/^(?=[0-9.]*[1-9])[0-9]{1,3}(\.[0-9]{1,2})?$/),
4300
+ }),
4301
+ ]);
4302
+ export const zInvoiceLinePriceAdjustmentsResource = z.strictObject({
4303
+ discounts: z.array(zInvoiceLinePriceAdjustmentResource),
4304
+ surcharges: z.array(zInvoiceLinePriceAdjustmentResource),
4305
+ });
4028
4306
  export const zInvoiceMinorExpensePaymentTerms = z.union([
4029
4307
  z.strictObject({
4030
4308
  type: z.enum(["immediate"]),
@@ -4037,6 +4315,20 @@ export const zInvoiceNumbering = z.strictObject({
4037
4315
  eNcf: z.string().regex(/^E(31|32|33|34|41|43|44|45|46|47)[0-9]{10}$/),
4038
4316
  sequenceExpiresOn: z.string().nullish(),
4039
4317
  });
4318
+ export const zInvoicePaymentAccountResource = z.strictObject({
4319
+ accountNumber: z
4320
+ .string()
4321
+ .refine((text) => Array.from(text).length >= 1)
4322
+ .refine((text) => Array.from(text).length <= 28)
4323
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4324
+ .nullable(),
4325
+ bankName: z
4326
+ .string()
4327
+ .refine((text) => Array.from(text).length >= 1)
4328
+ .refine((text) => Array.from(text).length <= 75)
4329
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4330
+ .nullable(),
4331
+ });
4040
4332
  export const zInvoicePdfLayout = z.enum(["a4", "receipt80mm"]);
4041
4333
  export const zInvoicePdfStage = z.enum([
4042
4334
  "awaitingSignedSource",
@@ -4086,71 +4378,227 @@ export const zInvoiceReceiptAccess = z.strictObject({
4086
4378
  });
4087
4379
  export const zInvoiceReceiptCurrency = z.enum(["DOP"]);
4088
4380
  export const zInvoiceReceiptStatus = z.enum(["accepted", "acceptedWithObservations"]);
4089
- /**
4090
- * The signature facts DGII requires on every printed e-CF, read from the signed document.
4091
- *
4092
- * Print the buyer's copy after DGII accepts the Invoice; DGII sequences the printed e-CF after
4093
- * its validation result, including the Type 32 below DOP 250,000 it validates by RFCE summary.
4094
- */
4095
- export const zInvoiceSignature = z.strictObject({
4096
- securityCode: z.string().regex(/^[A-Za-z0-9+/]{6}$/),
4097
- signedAt: z.string().regex(/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}-04:00$/),
4098
- verificationUrl: z.url().regex(/^https:\/\/(ecf|fc)\.dgii\.gov\.do\//),
4099
- });
4100
- export const zInvoiceSource = z.strictObject({
4101
- contentSha256: z.string().regex(/^[0-9a-f]{64}$/),
4102
- id: z.string(),
4103
- version: z.string(),
4104
- });
4105
- export const zInvoiceSourceInput = z.strictObject({
4106
- id: z
4107
- .string()
4108
- .refine((text) => Array.from(text).length >= 1)
4109
- .refine((text) => Array.from(text).length <= 128)
4110
- .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
4111
- version: z
4112
- .string()
4113
- .refine((text) => Array.from(text).length >= 1)
4114
- .refine((text) => Array.from(text).length <= 128)
4115
- .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
4116
- });
4117
- export const zInvoiceSpecialRegimeBuyer = z.union([
4118
- z.strictObject({
4119
- kind: z.enum(["domestic"]),
4120
- legalName: z
4121
- .string()
4122
- .refine((text) => Array.from(text).length >= 1)
4123
- .refine((text) => Array.from(text).length <= 150)
4124
- .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
4125
- taxId: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
4126
- }),
4381
+ export const zInvoiceReferenceAttributionResource = z.union([
4127
4382
  z.strictObject({
4128
- foreignId: z
4383
+ fiscalOperationId: z
4129
4384
  .string()
4130
- .refine((text) => Array.from(text).length >= 1)
4131
- .refine((text) => Array.from(text).length <= 20)
4132
- .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
4133
- kind: z.enum(["foreign_diplomat"]),
4134
- legalName: z
4135
- .string()
4136
- .refine((text) => Array.from(text).length >= 1)
4137
- .refine((text) => Array.from(text).length <= 150)
4138
- .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
4385
+ .regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),
4386
+ kind: z.enum(["internal_operation"]),
4139
4387
  }),
4140
- ]);
4141
- export const zInvoiceSpecialRegimeEligibility = z.union([
4142
4388
  z.strictObject({
4143
- authorityReference: z
4389
+ environment: zFiscalEnvironment,
4390
+ issuerTaxId: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
4391
+ kind: z.enum(["external_document"]),
4392
+ sourceReference: z
4144
4393
  .string()
4145
4394
  .refine((text) => Array.from(text).length >= 1)
4395
+ .refine((text) => Array.from(text).length <= 250)
4146
4396
  .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
4147
- basisKind: z.enum(["special_law"]),
4148
4397
  }),
4149
- z.strictObject({
4150
- authorityReference: z
4151
- .string()
4152
- .refine((text) => Array.from(text).length >= 1)
4153
- .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
4398
+ ]);
4399
+ export const zInvoiceReferenceInformation = z.strictObject({
4400
+ attribution: z.union([
4401
+ z.strictObject({
4402
+ fiscalOperationId: z
4403
+ .string()
4404
+ .regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),
4405
+ kind: z.enum(["internal_operation"]),
4406
+ }),
4407
+ z.strictObject({
4408
+ environment: zFiscalEnvironment,
4409
+ issuerTaxId: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
4410
+ kind: z.enum(["external_document"]),
4411
+ sourceReference: z
4412
+ .string()
4413
+ .refine((text) => Array.from(text).length >= 1)
4414
+ .refine((text) => Array.from(text).length <= 250)
4415
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
4416
+ }),
4417
+ ]),
4418
+ fiscalNumber: z.string().regex(/^(B[0-9]{10}|E[0-9]{12}|[AP][0-9]{18})$/),
4419
+ issuedOn: z.iso.date().regex(/^(19|20)[0-9]{2}-[0-9]{2}-[0-9]{2}$/),
4420
+ modificationCode: z.enum(["4", "5"]),
4421
+ });
4422
+ export const zInvoiceReferenceInformationResource = z.strictObject({
4423
+ attribution: zInvoiceReferenceAttributionResource,
4424
+ fiscalNumber: z.string().regex(/^(B[0-9]{10}|E[0-9]{12}|[AP][0-9]{18})$/),
4425
+ issuedOn: z
4426
+ .string()
4427
+ .regex(/^(?:(?:31-(?:0?[13578]|1[02])|(?:29|30)-(?:0?[13-9]|1[0-2])|(?:0?[1-9]|1[0-9]|2[0-8])-(?:0?[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-0?2-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000))$/),
4428
+ modificationCode: z.enum(["4", "5"]),
4429
+ });
4430
+ export const zInvoiceShipmentInformationResource = z.strictObject({
4431
+ containerNumber: z
4432
+ .string()
4433
+ .refine((text) => Array.from(text).length >= 1)
4434
+ .refine((text) => Array.from(text).length <= 100)
4435
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4436
+ .nullable(),
4437
+ deliveryNoteNumber: z
4438
+ .string()
4439
+ .refine((text) => Array.from(text).length >= 1)
4440
+ .refine((text) => Array.from(text).length <= 20)
4441
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4442
+ .nullable(),
4443
+ driver: z
4444
+ .string()
4445
+ .refine((text) => Array.from(text).length >= 1)
4446
+ .refine((text) => Array.from(text).length <= 20)
4447
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4448
+ .nullable(),
4449
+ grossWeight: z
4450
+ .string()
4451
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
4452
+ .nullable(),
4453
+ grossWeightUnit: z
4454
+ .string()
4455
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
4456
+ .nullable(),
4457
+ netWeight: z
4458
+ .string()
4459
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
4460
+ .nullable(),
4461
+ netWeightUnit: z
4462
+ .string()
4463
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
4464
+ .nullable(),
4465
+ packageCount: z
4466
+ .string()
4467
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
4468
+ .nullable(),
4469
+ packageUnit: z
4470
+ .string()
4471
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
4472
+ .nullable(),
4473
+ packageVolume: z
4474
+ .string()
4475
+ .regex(/^(?=[0-9.]*[1-9])[0-9]{1,16}(\.[0-9]{1,2})?$/)
4476
+ .nullable(),
4477
+ route: z
4478
+ .string()
4479
+ .refine((text) => Array.from(text).length >= 1)
4480
+ .refine((text) => Array.from(text).length <= 20)
4481
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4482
+ .nullable(),
4483
+ shipmentDate: z
4484
+ .string()
4485
+ .regex(/^(?:(?:31-(?:0?[13578]|1[02])|(?:29|30)-(?:0?[13-9]|1[0-2])|(?:0?[1-9]|1[0-9]|2[0-8])-(?:0?[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-0?2-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000))$/)
4486
+ .nullable(),
4487
+ shipmentNumber: z
4488
+ .string()
4489
+ .refine((text) => Array.from(text).length >= 1)
4490
+ .refine((text) => Array.from(text).length <= 25)
4491
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4492
+ .nullable(),
4493
+ transportDocumentNumber: z
4494
+ .string()
4495
+ .refine((text) => Array.from(text).length >= 1)
4496
+ .refine((text) => Array.from(text).length <= 20)
4497
+ .regex(/^[0-9]+$/)
4498
+ .nullable(),
4499
+ transportZone: z
4500
+ .string()
4501
+ .refine((text) => Array.from(text).length >= 1)
4502
+ .refine((text) => Array.from(text).length <= 20)
4503
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4504
+ .nullable(),
4505
+ vehicleFiche: z
4506
+ .string()
4507
+ .refine((text) => Array.from(text).length >= 1)
4508
+ .refine((text) => Array.from(text).length <= 10)
4509
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4510
+ .nullable(),
4511
+ vehiclePlate: z
4512
+ .string()
4513
+ .refine((text) => Array.from(text).length >= 1)
4514
+ .refine((text) => Array.from(text).length <= 7)
4515
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4516
+ .nullable(),
4517
+ volumeUnit: z
4518
+ .string()
4519
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
4520
+ .nullable(),
4521
+ });
4522
+ export const zInvoiceAdditionalInformationResource = z.strictObject({
4523
+ referenceNumber: z
4524
+ .string()
4525
+ .refine((text) => Array.from(text).length <= 20)
4526
+ .nullable(),
4527
+ shipment: zInvoiceShipmentInformationResource.nullable(),
4528
+ });
4529
+ /**
4530
+ * The signature facts DGII requires on every printed e-CF, read from the signed document.
4531
+ *
4532
+ * Print the buyer's copy after DGII accepts the Invoice; DGII sequences the printed e-CF after
4533
+ * its validation result, including the Type 32 below DOP 250,000 it validates by RFCE summary.
4534
+ */
4535
+ export const zInvoiceSignature = z.strictObject({
4536
+ securityCode: z.string().regex(/^[A-Za-z0-9+/]{6}$/),
4537
+ signedAt: z.string().regex(/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}-04:00$/),
4538
+ verificationUrl: z.url().regex(/^https:\/\/(ecf|fc)\.dgii\.gov\.do\//),
4539
+ });
4540
+ export const zInvoiceSource = z.strictObject({
4541
+ contentSha256: z.string().regex(/^[0-9a-f]{64}$/),
4542
+ id: z.string(),
4543
+ version: z.string(),
4544
+ });
4545
+ export const zInvoiceSourceInput = z.strictObject({
4546
+ id: z
4547
+ .string()
4548
+ .refine((text) => Array.from(text).length >= 1)
4549
+ .refine((text) => Array.from(text).length <= 128)
4550
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
4551
+ version: z
4552
+ .string()
4553
+ .refine((text) => Array.from(text).length >= 1)
4554
+ .refine((text) => Array.from(text).length <= 128)
4555
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
4556
+ });
4557
+ export const zInvoiceSpecialRegimeBuyer = z.union([
4558
+ z.strictObject({
4559
+ deliveryPhone: z
4560
+ .string()
4561
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
4562
+ .nullish(),
4563
+ kind: z.enum(["domestic"]),
4564
+ legalName: z
4565
+ .string()
4566
+ .refine((text) => Array.from(text).length >= 1)
4567
+ .refine((text) => Array.from(text).length <= 150)
4568
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
4569
+ taxId: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
4570
+ }),
4571
+ z.strictObject({
4572
+ deliveryPhone: z
4573
+ .string()
4574
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
4575
+ .nullish(),
4576
+ foreignId: z
4577
+ .string()
4578
+ .refine((text) => Array.from(text).length >= 1)
4579
+ .refine((text) => Array.from(text).length <= 20)
4580
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
4581
+ kind: z.enum(["foreign_diplomat"]),
4582
+ legalName: z
4583
+ .string()
4584
+ .refine((text) => Array.from(text).length >= 1)
4585
+ .refine((text) => Array.from(text).length <= 150)
4586
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
4587
+ }),
4588
+ ]);
4589
+ export const zInvoiceSpecialRegimeEligibility = z.union([
4590
+ z.strictObject({
4591
+ authorityReference: z
4592
+ .string()
4593
+ .refine((text) => Array.from(text).length >= 1)
4594
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
4595
+ basisKind: z.enum(["special_law"]),
4596
+ }),
4597
+ z.strictObject({
4598
+ authorityReference: z
4599
+ .string()
4600
+ .refine((text) => Array.from(text).length >= 1)
4601
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
4154
4602
  basisKind: z.enum(["ratified_contract"]),
4155
4603
  }),
4156
4604
  z.strictObject({
@@ -5685,6 +6133,26 @@ export const zLegalIssuerPage = z.strictObject({
5685
6133
  export const zLegalIssuerResource = z.strictObject({
5686
6134
  legal_issuer: zLegalIssuer,
5687
6135
  });
6136
+ /**
6137
+ * One fixed-amount or percentage discount or surcharge on a fiscal line.
6138
+ */
6139
+ export const zLinePriceAdjustment = z.union([
6140
+ z.strictObject({
6141
+ amount: z.string().regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/),
6142
+ kind: z.enum(["fixed_amount"]),
6143
+ }),
6144
+ z.strictObject({
6145
+ kind: z.enum(["percentage"]),
6146
+ percentage: z.string().regex(/^(?=[0-9.]*[1-9])[0-9]{1,3}(\.[0-9]{1,2})?$/),
6147
+ }),
6148
+ ]);
6149
+ /**
6150
+ * Line-level discounts and surcharges, kept separate from document-level adjustments.
6151
+ */
6152
+ export const zLinePriceAdjustments = z.strictObject({
6153
+ discounts: z.array(zLinePriceAdjustment).min(0).max(12).optional(),
6154
+ surcharges: z.array(zLinePriceAdjustment).min(0).max(12).optional(),
6155
+ });
5688
6156
  export const zMembershipRole = z.enum(["administrator", "operator"]);
5689
6157
  export const zAcceptedMembership = z.strictObject({
5690
6158
  organization_id: z.uuid(),
@@ -5838,6 +6306,23 @@ export const zOrganizationIdentity = z.strictObject({
5838
6306
  export const zOrganizationResource = z.strictObject({
5839
6307
  organization: zOrganizationIdentity,
5840
6308
  });
6309
+ /**
6310
+ * Bank details that accompany an optional payment method table.
6311
+ */
6312
+ export const zPaymentAccount = z.strictObject({
6313
+ account_number: z
6314
+ .string()
6315
+ .refine((text) => Array.from(text).length >= 1)
6316
+ .refine((text) => Array.from(text).length <= 28)
6317
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
6318
+ .optional(),
6319
+ bank_name: z
6320
+ .string()
6321
+ .refine((text) => Array.from(text).length >= 1)
6322
+ .refine((text) => Array.from(text).length <= 75)
6323
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
6324
+ .optional(),
6325
+ });
5841
6326
  /**
5842
6327
  * One authoritative payment-method and amount pair from `TablaFormasPago`.
5843
6328
  */
@@ -5849,6 +6334,7 @@ export const zPaymentAllocation = z.strictObject({
5849
6334
  * An optional payment table for profiles whose official schema permits its omission.
5850
6335
  */
5851
6336
  export const zOptionalPaymentAllocations = z.strictObject({
6337
+ payment_account: zPaymentAccount.optional(),
5852
6338
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
5853
6339
  });
5854
6340
  export const zPrintedRepresentationA4ProfileVersion = z.enum(["a4.v1"]);
@@ -6087,6 +6573,8 @@ export const zPublicProblemCode = z.enum([
6087
6573
  "request_body_timeout",
6088
6574
  "malformed_json",
6089
6575
  "invalid_request",
6576
+ "certification_environment_required",
6577
+ "certification_test_set_invalid",
6090
6578
  "invalid_collection_query",
6091
6579
  "invalid_collection_cursor",
6092
6580
  "document_type_not_enabled",
@@ -6419,6 +6907,24 @@ export const zRequirementId = z.enum([
6419
6907
  "first_fiscal_operation",
6420
6908
  ]);
6421
6909
  export const zRequirementStatus = z.enum(["complete", "pending", "blocked", "action_required"]);
6910
+ export const zRetainedCertificationWorkbook = z.strictObject({
6911
+ name: z.string(),
6912
+ sha256: z.string().regex(/^[0-9a-f]{64}$/),
6913
+ sizeBytes: z.int().gte(1).lte(3145728),
6914
+ });
6915
+ export const zCertificationTestSetResource = z.strictObject({
6916
+ attemptReference: z.string(),
6917
+ createdAt: z.iso.datetime(),
6918
+ file: zRetainedCertificationWorkbook,
6919
+ generation: z.string().regex(/^[1-9][0-9]*$/),
6920
+ id: z.uuid(),
6921
+ kind: zCertificationTestSetKind,
6922
+ object: zCertificationTestSetObject,
6923
+ review: zCertificationTestSetReview,
6924
+ });
6925
+ export const zCurrentCertificationTestSet = z.strictObject({
6926
+ current: zCertificationTestSetResource.nullable(),
6927
+ });
6422
6928
  export const zRevokeCertificateCustodyCertificateVersionRequest = z.strictObject({
6423
6929
  certificate_custody_certificate_version: zLedgerCounter,
6424
6930
  });
@@ -6428,6 +6934,10 @@ export const zRevokeCertificateCustodyCertificateVersionRequest = z.strictObject
6428
6934
  export const zSalesTermsSpecialRegimeBuyerOptionalPaymentAllocations = z.strictObject({
6429
6935
  buyer: z.union([
6430
6936
  z.strictObject({
6937
+ delivery_phone: z
6938
+ .string()
6939
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
6940
+ .optional(),
6431
6941
  identity_kind: z.enum(["domestic"]),
6432
6942
  legal_name: z
6433
6943
  .string()
@@ -6437,6 +6947,10 @@ export const zSalesTermsSpecialRegimeBuyerOptionalPaymentAllocations = z.strictO
6437
6947
  tax_id: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
6438
6948
  }),
6439
6949
  z.strictObject({
6950
+ delivery_phone: z
6951
+ .string()
6952
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
6953
+ .optional(),
6440
6954
  foreign_identifier: z
6441
6955
  .string()
6442
6956
  .refine((text) => Array.from(text).length >= 1)
@@ -6451,6 +6965,7 @@ export const zSalesTermsSpecialRegimeBuyerOptionalPaymentAllocations = z.strictO
6451
6965
  }),
6452
6966
  ]),
6453
6967
  income_type: z.enum(["01", "02", "03", "04", "05", "06"]),
6968
+ payment_account: zPaymentAccount.optional(),
6454
6969
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
6455
6970
  payment_type: z.enum(["1", "2", "3"]),
6456
6971
  });
@@ -6469,83 +6984,202 @@ export const zSchemaValidationOutcome = z.enum(["succeeded", "failed"]);
6469
6984
  * Stage at which a fiscal XML artifact was validated.
6470
6985
  */
6471
6986
  export const zSchemaValidationStage = z.enum(["unsigned", "signed"]);
6472
- export const zSignedDocumentReadinessResource = z.union([
6473
- z.strictObject({
6474
- status: z.enum(["not_applicable"]),
6475
- }),
6476
- z.strictObject({
6477
- status: z.enum(["pending"]),
6478
- }),
6479
- z.strictObject({
6480
- artifact_id: z.uuid(),
6481
- artifact_kind: zFiscalArtifactKind,
6482
- byte_length: z
6483
- .int()
6484
- .gte(0)
6485
- .max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
6486
- created_at: z.iso.datetime(),
6487
- media_type: zFiscalArtifactMediaType,
6488
- sha256: z.string().regex(/^[0-9a-f]{64}$/),
6489
- status: z.enum(["ready"]),
6490
- }),
6491
- ]);
6492
- /**
6493
- * The active signing certificate, judged at the moment of the read.
6494
- */
6495
- export const zSigningCertificateReadiness = z.union([
6496
- z.strictObject({
6497
- notAfter: z.iso.datetime(),
6498
- notBefore: z.iso.datetime(),
6499
- sha256: z.string().regex(/^[0-9a-f]{64}$/),
6500
- status: z.enum(["ready"]),
6501
- }),
6502
- z.strictObject({
6503
- notAfter: z.iso.datetime(),
6504
- notBefore: z.iso.datetime(),
6505
- sha256: z.string().regex(/^[0-9a-f]{64}$/),
6506
- status: z.enum(["expired"]),
6507
- }),
6508
- z.strictObject({
6509
- notAfter: z.iso.datetime(),
6510
- notBefore: z.iso.datetime(),
6511
- sha256: z.string().regex(/^[0-9a-f]{64}$/),
6512
- status: z.enum(["notYetValid"]),
6513
- }),
6514
- z.strictObject({
6515
- status: z.enum(["missing"]),
6516
- }),
6517
- ]);
6518
- /**
6519
- * Whether the issuer can issue each e-CF type now in this environment.
6520
- */
6521
- export const zIssuanceReadiness = z.strictObject({
6522
- certificate: zSigningCertificateReadiness,
6523
- documentTypes: z.array(zDocumentTypeIssuanceReadiness),
6524
- environment: zFiscalEnvironment,
6525
- issuerTaxId: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
6526
- });
6527
6987
  /**
6528
- * Named additional taxes supported by the common Source contract.
6988
+ * Typed shipping and transport facts admitted by the official `InformacionesAdicionales` area.
6529
6989
  */
6530
- export const zSourceAdditionalTax = z.enum(["legal_tip"]);
6531
- export const zSourceBuyerIdentityRequirement = z.enum(["required", "optional"]);
6532
- export const zSourceConnectionActionReason = z.enum([
6533
- "authorization_disabled",
6534
- "authorization_scope_insufficient",
6535
- "target_access_removed",
6536
- "target_origin_unavailable",
6537
- "target_configuration_rejected",
6538
- "target_deployment_failed",
6539
- "target_release_identity_unavailable",
6540
- "target_verification_failed",
6541
- "credential_reprovisioning_required",
6542
- ]);
6543
- export const zSourceConnectionActivationPhase = z.enum([
6544
- "credential_staging",
6545
- "target_configuring",
6546
- "deployment_requesting",
6547
- "deployment_observing",
6548
- "deployment_promotion_requesting",
6990
+ export const zShipmentInformation = z.strictObject({
6991
+ container_number: z
6992
+ .string()
6993
+ .refine((text) => Array.from(text).length >= 1)
6994
+ .refine((text) => Array.from(text).length <= 100)
6995
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
6996
+ .optional(),
6997
+ delivery_note_number: z
6998
+ .string()
6999
+ .refine((text) => Array.from(text).length >= 1)
7000
+ .refine((text) => Array.from(text).length <= 20)
7001
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
7002
+ .optional(),
7003
+ driver: z
7004
+ .string()
7005
+ .refine((text) => Array.from(text).length >= 1)
7006
+ .refine((text) => Array.from(text).length <= 20)
7007
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
7008
+ .optional(),
7009
+ gross_weight: z
7010
+ .string()
7011
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
7012
+ .optional(),
7013
+ gross_weight_unit: z
7014
+ .string()
7015
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
7016
+ .optional(),
7017
+ net_weight: z
7018
+ .string()
7019
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
7020
+ .optional(),
7021
+ net_weight_unit: z
7022
+ .string()
7023
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
7024
+ .optional(),
7025
+ package_count: z
7026
+ .string()
7027
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
7028
+ .optional(),
7029
+ package_unit: z
7030
+ .string()
7031
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
7032
+ .optional(),
7033
+ package_volume: z
7034
+ .string()
7035
+ .regex(/^(?=[0-9.]*[1-9])[0-9]{1,16}(\.[0-9]{1,2})?$/)
7036
+ .optional(),
7037
+ route: z
7038
+ .string()
7039
+ .refine((text) => Array.from(text).length >= 1)
7040
+ .refine((text) => Array.from(text).length <= 20)
7041
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
7042
+ .optional(),
7043
+ shipment_date: z
7044
+ .string()
7045
+ .regex(/^(?:(?:31-(?:0?[13578]|1[02])|(?:29|30)-(?:0?[13-9]|1[0-2])|(?:0?[1-9]|1[0-9]|2[0-8])-(?:0?[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-0?2-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000))$/)
7046
+ .optional(),
7047
+ shipment_number: z
7048
+ .string()
7049
+ .refine((text) => Array.from(text).length >= 1)
7050
+ .refine((text) => Array.from(text).length <= 25)
7051
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
7052
+ .optional(),
7053
+ transport_document_number: z
7054
+ .string()
7055
+ .refine((text) => Array.from(text).length >= 1)
7056
+ .refine((text) => Array.from(text).length <= 20)
7057
+ .regex(/^[0-9]+$/)
7058
+ .optional(),
7059
+ transport_zone: z
7060
+ .string()
7061
+ .refine((text) => Array.from(text).length >= 1)
7062
+ .refine((text) => Array.from(text).length <= 20)
7063
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
7064
+ .optional(),
7065
+ vehicle_fiche: z
7066
+ .string()
7067
+ .refine((text) => Array.from(text).length >= 1)
7068
+ .refine((text) => Array.from(text).length <= 10)
7069
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
7070
+ .optional(),
7071
+ vehicle_plate: z
7072
+ .string()
7073
+ .refine((text) => Array.from(text).length >= 1)
7074
+ .refine((text) => Array.from(text).length <= 7)
7075
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
7076
+ .optional(),
7077
+ volume_unit: z
7078
+ .string()
7079
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
7080
+ .optional(),
7081
+ });
7082
+ /**
7083
+ * Additional official document facts emitted in `InformacionesAdicionales`.
7084
+ */
7085
+ export const zAdditionalDocumentInformation = z.strictObject({
7086
+ reference_number: z
7087
+ .string()
7088
+ .refine((text) => Array.from(text).length >= 1)
7089
+ .refine((text) => Array.from(text).length <= 20)
7090
+ .regex(/^[0-9]+$/)
7091
+ .optional(),
7092
+ shipment: zShipmentInformation.optional(),
7093
+ });
7094
+ /**
7095
+ * Additional document facts for the governmental e-CF profile, whose reference may be alphanumeric.
7096
+ */
7097
+ export const zGovernmentAdditionalDocumentInformation = z.strictObject({
7098
+ reference_number: z
7099
+ .string()
7100
+ .refine((text) => Array.from(text).length >= 1)
7101
+ .refine((text) => Array.from(text).length <= 20)
7102
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
7103
+ .optional(),
7104
+ shipment: zShipmentInformation.optional(),
7105
+ });
7106
+ export const zSignedDocumentReadinessResource = z.union([
7107
+ z.strictObject({
7108
+ status: z.enum(["not_applicable"]),
7109
+ }),
7110
+ z.strictObject({
7111
+ status: z.enum(["pending"]),
7112
+ }),
7113
+ z.strictObject({
7114
+ artifact_id: z.uuid(),
7115
+ artifact_kind: zFiscalArtifactKind,
7116
+ byte_length: z
7117
+ .int()
7118
+ .gte(0)
7119
+ .max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
7120
+ created_at: z.iso.datetime(),
7121
+ media_type: zFiscalArtifactMediaType,
7122
+ sha256: z.string().regex(/^[0-9a-f]{64}$/),
7123
+ status: z.enum(["ready"]),
7124
+ }),
7125
+ ]);
7126
+ /**
7127
+ * The active signing certificate, judged at the moment of the read.
7128
+ */
7129
+ export const zSigningCertificateReadiness = z.union([
7130
+ z.strictObject({
7131
+ notAfter: z.iso.datetime(),
7132
+ notBefore: z.iso.datetime(),
7133
+ sha256: z.string().regex(/^[0-9a-f]{64}$/),
7134
+ status: z.enum(["ready"]),
7135
+ }),
7136
+ z.strictObject({
7137
+ notAfter: z.iso.datetime(),
7138
+ notBefore: z.iso.datetime(),
7139
+ sha256: z.string().regex(/^[0-9a-f]{64}$/),
7140
+ status: z.enum(["expired"]),
7141
+ }),
7142
+ z.strictObject({
7143
+ notAfter: z.iso.datetime(),
7144
+ notBefore: z.iso.datetime(),
7145
+ sha256: z.string().regex(/^[0-9a-f]{64}$/),
7146
+ status: z.enum(["notYetValid"]),
7147
+ }),
7148
+ z.strictObject({
7149
+ status: z.enum(["missing"]),
7150
+ }),
7151
+ ]);
7152
+ /**
7153
+ * Whether the issuer can issue each e-CF type now in this environment.
7154
+ */
7155
+ export const zIssuanceReadiness = z.strictObject({
7156
+ certificate: zSigningCertificateReadiness,
7157
+ documentTypes: z.array(zDocumentTypeIssuanceReadiness),
7158
+ environment: zFiscalEnvironment,
7159
+ issuerTaxId: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
7160
+ });
7161
+ /**
7162
+ * Named additional taxes supported by the common Source contract.
7163
+ */
7164
+ export const zSourceAdditionalTax = z.enum(["legal_tip"]);
7165
+ export const zSourceBuyerIdentityRequirement = z.enum(["required", "optional"]);
7166
+ export const zSourceConnectionActionReason = z.enum([
7167
+ "authorization_disabled",
7168
+ "authorization_scope_insufficient",
7169
+ "target_access_removed",
7170
+ "target_origin_unavailable",
7171
+ "target_configuration_rejected",
7172
+ "target_deployment_failed",
7173
+ "target_release_identity_unavailable",
7174
+ "target_verification_failed",
7175
+ "credential_reprovisioning_required",
7176
+ ]);
7177
+ export const zSourceConnectionActivationPhase = z.enum([
7178
+ "credential_staging",
7179
+ "target_configuring",
7180
+ "deployment_requesting",
7181
+ "deployment_observing",
7182
+ "deployment_promotion_requesting",
6549
7183
  "deployment_promotion_observing",
6550
7184
  "verification_requesting",
6551
7185
  "verification_observing",
@@ -6816,6 +7450,7 @@ export const zSourceGovernmentEligibility = z.union([
6816
7450
  export const zSourceItemKind = z.enum(["good", "service"]);
6817
7451
  export const zInvoiceItemResource = z.strictObject({
6818
7452
  additionalTaxCodes: z.array(z.string()),
7453
+ adjustments: zInvoiceLinePriceAdjustmentsResource.nullable(),
6819
7454
  description: z.string(),
6820
7455
  id: z.string(),
6821
7456
  itemCodes: z.array(zInvoiceItemCodeResource),
@@ -6832,6 +7467,7 @@ export const zInvoiceItemResource = z.strictObject({
6832
7467
  */
6833
7468
  export const zSourceMeasurementUnit = z.enum(["unit", "kilogram", "litre", "metre", "piece"]);
6834
7469
  export const zInvoiceExportItem = z.strictObject({
7470
+ adjustments: zLinePriceAdjustments.nullish(),
6835
7471
  description: z
6836
7472
  .string()
6837
7473
  .refine((text) => Array.from(text).length >= 1)
@@ -6889,6 +7525,7 @@ export const zInvoiceGovernmentItem = z.strictObject({
6889
7525
  unitPrice: z.string().regex(/^[0-9]{1,16}(\.[0-9]{1,4})?$/),
6890
7526
  });
6891
7527
  export const zInvoiceItem = z.strictObject({
7528
+ adjustments: zLinePriceAdjustments.nullish(),
6892
7529
  description: z
6893
7530
  .string()
6894
7531
  .refine((text) => Array.from(text).length >= 1)
@@ -6927,6 +7564,7 @@ export const zInvoiceMinorExpenseItem = z.strictObject({
6927
7564
  unitPrice: z.string().regex(/^[0-9]{1,16}(\.[0-9]{1,4})?$/),
6928
7565
  });
6929
7566
  export const zInvoicePurchaseItem = z.strictObject({
7567
+ adjustments: zLinePriceAdjustments.nullish(),
6930
7568
  description: z
6931
7569
  .string()
6932
7570
  .refine((text) => Array.from(text).length >= 1)
@@ -6989,6 +7627,22 @@ export const zInvoicePaymentAllocation = z.strictObject({
6989
7627
  export const zInvoicePaymentTerms = z.union([
6990
7628
  z.strictObject({
6991
7629
  allocations: z.array(zInvoicePaymentAllocation).min(1).max(7).nullish(),
7630
+ paymentAccount: z
7631
+ .strictObject({
7632
+ accountNumber: z
7633
+ .string()
7634
+ .refine((text) => Array.from(text).length >= 1)
7635
+ .refine((text) => Array.from(text).length <= 28)
7636
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
7637
+ .nullish(),
7638
+ bankName: z
7639
+ .string()
7640
+ .refine((text) => Array.from(text).length >= 1)
7641
+ .refine((text) => Array.from(text).length <= 75)
7642
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
7643
+ .nullish(),
7644
+ })
7645
+ .optional(),
6992
7646
  type: z.enum(["immediate"]),
6993
7647
  }),
6994
7648
  z.strictObject({
@@ -7002,6 +7656,7 @@ export const zInvoicePaymentTerms = z.union([
7002
7656
  export const zInvoicePaymentTermsResource = z.union([
7003
7657
  z.strictObject({
7004
7658
  allocations: z.array(zInvoicePaymentAllocation).max(7),
7659
+ paymentAccount: zInvoicePaymentAccountResource.optional(),
7005
7660
  type: z.enum(["immediate"]),
7006
7661
  }),
7007
7662
  z.strictObject({
@@ -7036,6 +7691,7 @@ export const zInvoiceReceipt = z.strictObject({
7036
7691
  });
7037
7692
  export const zInvoiceRequest = z.union([
7038
7693
  z.strictObject({
7694
+ additionalInformation: zInvoiceAdditionalInformation.nullish(),
7039
7695
  buyer: zInvoiceBuyer,
7040
7696
  currency: z.enum(["DOP"]),
7041
7697
  expectedTotals: zInvoiceExpectedTotals.nullish(),
@@ -7058,10 +7714,12 @@ export const zInvoiceRequest = z.union([
7058
7714
  numbering: zInvoiceNumbering.nullish(),
7059
7715
  paymentTerms: zInvoicePaymentTerms,
7060
7716
  pdfLayout: zInvoicePdfLayout.nullish(),
7717
+ referenceInformation: zInvoiceReferenceInformation.nullish(),
7061
7718
  source: zInvoiceSourceInput.nullish(),
7062
7719
  type: z.enum(["E31"]),
7063
7720
  }),
7064
7721
  z.strictObject({
7722
+ additionalInformation: zInvoiceAdditionalInformation.nullish(),
7065
7723
  buyer: zInvoiceConsumerBuyer.nullish(),
7066
7724
  currency: z.enum(["DOP"]),
7067
7725
  expectedTotals: zInvoiceExpectedTotals.nullish(),
@@ -7084,10 +7742,12 @@ export const zInvoiceRequest = z.union([
7084
7742
  numbering: zInvoiceNumbering.nullish(),
7085
7743
  paymentTerms: zInvoicePaymentTerms,
7086
7744
  pdfLayout: zInvoicePdfLayout.nullish(),
7745
+ referenceInformation: zInvoiceReferenceInformation.nullish(),
7087
7746
  source: zInvoiceSourceInput.nullish(),
7088
7747
  type: z.enum(["E32"]),
7089
7748
  }),
7090
7749
  z.strictObject({
7750
+ additionalInformation: zInvoiceAdditionalInformation.nullish(),
7091
7751
  currency: z.enum(["DOP"]),
7092
7752
  expectedTotals: zInvoiceExpectedTotals.nullish(),
7093
7753
  invoiceReference: z
@@ -7099,6 +7759,7 @@ export const zInvoiceRequest = z.union([
7099
7759
  numbering: zInvoiceNumbering.nullish(),
7100
7760
  paymentTerms: zInvoicePaymentTerms,
7101
7761
  pdfLayout: zInvoicePdfLayout.nullish(),
7762
+ referenceInformation: zInvoiceReferenceInformation.nullish(),
7102
7763
  source: zInvoiceSourceInput.nullish(),
7103
7764
  supplier: z.strictObject({
7104
7765
  address: z
@@ -8306,6 +8967,7 @@ export const zInvoiceRequest = z.union([
8306
8967
  type: z.enum(["E41"]),
8307
8968
  }),
8308
8969
  z.strictObject({
8970
+ additionalInformation: zInvoiceGovernmentAdditionalInformation.nullish(),
8309
8971
  buyer: z.strictObject({
8310
8972
  address: z
8311
8973
  .string()
@@ -8323,6 +8985,10 @@ export const zInvoiceRequest = z.union([
8323
8985
  .date()
8324
8986
  .regex(/^(19|20)[0-9]{2}-[0-9]{2}-[0-9]{2}$/)
8325
8987
  .nullish(),
8988
+ deliveryPhone: z
8989
+ .string()
8990
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
8991
+ .nullish(),
8326
8992
  email: z
8327
8993
  .string()
8328
8994
  .refine((text) => Array.from(text).length <= 80)
@@ -9545,6 +10211,7 @@ export const zInvoiceRequest = z.union([
9545
10211
  numbering: zInvoiceNumbering.nullish(),
9546
10212
  paymentTerms: zInvoicePaymentTerms,
9547
10213
  pdfLayout: zInvoicePdfLayout.nullish(),
10214
+ referenceInformation: zInvoiceReferenceInformation.nullish(),
9548
10215
  source: zInvoiceSourceInput.nullish(),
9549
10216
  type: z.enum(["E45"]),
9550
10217
  }),
@@ -9561,6 +10228,7 @@ export const zInvoiceRequest = z.union([
9561
10228
  numbering: zInvoiceNumbering.nullish(),
9562
10229
  paymentTerms: zInvoiceMinorExpensePaymentTerms.nullish(),
9563
10230
  pdfLayout: zInvoicePdfLayout.nullish(),
10231
+ referenceInformation: zInvoiceReferenceInformation.nullish(),
9564
10232
  source: zInvoiceSourceInput.nullish(),
9565
10233
  type: z.enum(["E43"]),
9566
10234
  }),
@@ -9578,11 +10246,13 @@ export const zInvoiceRequest = z.union([
9578
10246
  numbering: zInvoiceNumbering.nullish(),
9579
10247
  paymentTerms: zInvoicePaymentTerms.nullish(),
9580
10248
  pdfLayout: zInvoicePdfLayout.nullish(),
10249
+ referenceInformation: zInvoiceReferenceInformation.nullish(),
9581
10250
  source: zInvoiceSourceInput.nullish(),
9582
10251
  type: z.enum(["E47"]),
9583
10252
  withholdingBasis: zInvoiceForeignPaymentBasis,
9584
10253
  }),
9585
10254
  z.strictObject({
10255
+ additionalInformation: zInvoiceAdditionalInformation.nullish(),
9586
10256
  buyer: zInvoiceSpecialRegimeBuyer,
9587
10257
  currency: z.enum(["DOP"]),
9588
10258
  eligibility: zInvoiceSpecialRegimeEligibility,
@@ -9607,10 +10277,12 @@ export const zInvoiceRequest = z.union([
9607
10277
  numbering: zInvoiceNumbering.nullish(),
9608
10278
  paymentTerms: zInvoicePaymentTerms,
9609
10279
  pdfLayout: zInvoicePdfLayout.nullish(),
10280
+ referenceInformation: zInvoiceReferenceInformation.nullish(),
9610
10281
  source: zInvoiceSourceInput.nullish(),
9611
10282
  type: z.enum(["E44"]),
9612
10283
  }),
9613
10284
  z.strictObject({
10285
+ additionalInformation: zInvoiceAdditionalInformation.nullish(),
9614
10286
  buyer: zInvoiceExportBuyer,
9615
10287
  currency: z.enum(["DOP"]),
9616
10288
  eligibility: zInvoiceExportEligibility,
@@ -9635,10 +10307,12 @@ export const zInvoiceRequest = z.union([
9635
10307
  numbering: zInvoiceNumbering.nullish(),
9636
10308
  paymentTerms: zInvoicePaymentTerms,
9637
10309
  pdfLayout: zInvoicePdfLayout.nullish(),
10310
+ referenceInformation: zInvoiceReferenceInformation.nullish(),
9638
10311
  source: zInvoiceSourceInput.nullish(),
9639
10312
  type: z.enum(["E46"]),
9640
10313
  }),
9641
10314
  z.strictObject({
10315
+ additionalInformation: zInvoiceAdditionalInformation.nullish(),
9642
10316
  currency: z.enum(["DOP"]),
9643
10317
  expectedTotals: zInvoiceExpectedTotals.nullish(),
9644
10318
  incomeType: z
@@ -9671,6 +10345,7 @@ export const zInvoiceRequest = z.union([
9671
10345
  type: z.enum(["E33"]),
9672
10346
  }),
9673
10347
  z.strictObject({
10348
+ additionalInformation: zInvoiceAdditionalInformation.nullish(),
9674
10349
  currency: z.enum(["DOP"]),
9675
10350
  expectedTotals: zInvoiceExpectedTotals.nullish(),
9676
10351
  incomeType: z
@@ -9716,6 +10391,7 @@ export const zHostedInvoiceSubmission = z.strictObject({
9716
10391
  export const zInvoiceResource = z.union([
9717
10392
  z.strictObject({
9718
10393
  acceptedAt: z.iso.datetime().nullable(),
10394
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
9719
10395
  buyer: zInvoiceBuyerIdentity.nullable(),
9720
10396
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
9721
10397
  corrections: z.array(zInvoiceCorrection),
@@ -9734,6 +10410,7 @@ export const zInvoiceResource = z.union([
9734
10410
  latestEvent: zInvoiceLatestEvent.nullable(),
9735
10411
  originalInvoiceId: z.uuid().nullable(),
9736
10412
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
10413
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
9737
10414
  replacesInvoiceId: z.uuid().nullable(),
9738
10415
  source: zInvoiceSource,
9739
10416
  status: z.enum(["rejected"]),
@@ -9744,6 +10421,7 @@ export const zInvoiceResource = z.union([
9744
10421
  }),
9745
10422
  z.strictObject({
9746
10423
  acceptedAt: z.iso.datetime().nullable(),
10424
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
9747
10425
  buyer: zInvoiceBuyerIdentity.nullable(),
9748
10426
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
9749
10427
  corrections: z.array(zInvoiceCorrection),
@@ -9763,6 +10441,7 @@ export const zInvoiceResource = z.union([
9763
10441
  latestEvent: zInvoiceLatestEvent.nullable(),
9764
10442
  originalInvoiceId: z.uuid().nullable(),
9765
10443
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
10444
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
9766
10445
  replacesInvoiceId: z.uuid().nullable(),
9767
10446
  source: zInvoiceSource,
9768
10447
  stage: zInvoiceProcessingStage,
@@ -9774,6 +10453,7 @@ export const zInvoiceResource = z.union([
9774
10453
  }),
9775
10454
  z.strictObject({
9776
10455
  acceptedAt: z.iso.datetime().nullable(),
10456
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
9777
10457
  buyer: zInvoiceBuyerIdentity.nullable(),
9778
10458
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
9779
10459
  corrections: z.array(zInvoiceCorrection),
@@ -9793,6 +10473,7 @@ export const zInvoiceResource = z.union([
9793
10473
  latestEvent: zInvoiceLatestEvent.nullable(),
9794
10474
  originalInvoiceId: z.uuid().nullable(),
9795
10475
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
10476
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
9796
10477
  replacesInvoiceId: z.uuid().nullable(),
9797
10478
  source: zInvoiceSource,
9798
10479
  status: z.enum(["verifying"]),
@@ -9803,6 +10484,7 @@ export const zInvoiceResource = z.union([
9803
10484
  }),
9804
10485
  z.strictObject({
9805
10486
  acceptedAt: z.iso.datetime().nullable(),
10487
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
9806
10488
  buyer: zInvoiceBuyerIdentity.nullable(),
9807
10489
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
9808
10490
  corrections: z.array(zInvoiceCorrection),
@@ -9822,6 +10504,7 @@ export const zInvoiceResource = z.union([
9822
10504
  latestEvent: zInvoiceLatestEvent.nullable(),
9823
10505
  originalInvoiceId: z.uuid().nullable(),
9824
10506
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
10507
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
9825
10508
  replacesInvoiceId: z.uuid().nullable(),
9826
10509
  source: zInvoiceSource,
9827
10510
  status: z.enum(["accepted"]),
@@ -9832,6 +10515,7 @@ export const zInvoiceResource = z.union([
9832
10515
  }),
9833
10516
  z.strictObject({
9834
10517
  acceptedAt: z.iso.datetime().nullable(),
10518
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
9835
10519
  buyer: zInvoiceBuyerIdentity.nullable(),
9836
10520
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
9837
10521
  corrections: z.array(zInvoiceCorrection),
@@ -9851,6 +10535,7 @@ export const zInvoiceResource = z.union([
9851
10535
  latestEvent: zInvoiceLatestEvent.nullable(),
9852
10536
  originalInvoiceId: z.uuid().nullable(),
9853
10537
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
10538
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
9854
10539
  replacesInvoiceId: z.uuid().nullable(),
9855
10540
  source: zInvoiceSource,
9856
10541
  status: z.enum(["acceptedWithObservations"]),
@@ -9861,6 +10546,7 @@ export const zInvoiceResource = z.union([
9861
10546
  }),
9862
10547
  z.strictObject({
9863
10548
  acceptedAt: z.iso.datetime().nullable(),
10549
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
9864
10550
  buyer: zInvoiceBuyerIdentity.nullable(),
9865
10551
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
9866
10552
  corrections: z.array(zInvoiceCorrection),
@@ -9880,6 +10566,7 @@ export const zInvoiceResource = z.union([
9880
10566
  latestEvent: zInvoiceLatestEvent.nullable(),
9881
10567
  originalInvoiceId: z.uuid().nullable(),
9882
10568
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
10569
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
9883
10570
  replacesInvoiceId: z.uuid().nullable(),
9884
10571
  source: zInvoiceSource,
9885
10572
  status: z.enum(["authorityRejected"]),
@@ -9890,6 +10577,7 @@ export const zInvoiceResource = z.union([
9890
10577
  }),
9891
10578
  z.strictObject({
9892
10579
  acceptedAt: z.iso.datetime().nullable(),
10580
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
9893
10581
  buyer: zInvoiceBuyerIdentity.nullable(),
9894
10582
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
9895
10583
  corrections: z.array(zInvoiceCorrection),
@@ -9909,6 +10597,7 @@ export const zInvoiceResource = z.union([
9909
10597
  latestEvent: zInvoiceLatestEvent.nullable(),
9910
10598
  originalInvoiceId: z.uuid().nullable(),
9911
10599
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
10600
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
9912
10601
  replacesInvoiceId: z.uuid().nullable(),
9913
10602
  source: zInvoiceSource,
9914
10603
  status: z.enum(["operatorRequired"]),
@@ -10140,1248 +10829,9 @@ export const zSourceDocumentEvaluationRequest = z.strictObject({
10140
10829
  protocol: z.string(),
10141
10830
  request_id: z.string(),
10142
10831
  });
10143
- export const zSourceType31Snapshot = z
10144
- .strictObject({
10145
- payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
10146
- })
10147
- .and(z.strictObject({
10148
- buyer: z.strictObject({
10149
- address: z
10150
- .string()
10151
- .refine((text) => Array.from(text).length >= 1)
10152
- .refine((text) => Array.from(text).length <= 100)
10153
- .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
10154
- .optional(),
10155
- contact_name: z
10156
- .string()
10157
- .refine((text) => Array.from(text).length >= 1)
10158
- .refine((text) => Array.from(text).length <= 80)
10159
- .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
10160
- .optional(),
10161
- delivery_on: z
10162
- .string()
10163
- .regex(/^(?:(?:31-(?:0?[13578]|1[02])|(?:29|30)-(?:0?[13-9]|1[0-2])|(?:0?[1-9]|1[0-9]|2[0-8])-(?:0?[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-0?2-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000))$/)
10164
- .optional(),
10165
- email: z
10166
- .string()
10167
- .refine((text) => Array.from(text).length <= 80)
10168
- .regex(/^[\p{L}\p{M}\p{N}\p{S}]+(?:[-.][\p{L}\p{M}\p{N}\p{S}]+)*@[\p{L}\p{M}\p{N}\p{S}]+(?:[-.][\p{L}\p{M}\p{N}\p{S}]+)*\.[\p{L}\p{M}\p{N}\p{S}]+(?:[-.][\p{L}\p{M}\p{N}\p{S}]+)*$/u)
10169
- .optional(),
10170
- internal_code: z
10171
- .string()
10172
- .refine((text) => Array.from(text).length >= 1)
10173
- .refine((text) => Array.from(text).length <= 20)
10174
- .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
10175
- .optional(),
10176
- legal_name: z
10177
- .string()
10178
- .refine((text) => Array.from(text).length >= 1)
10179
- .refine((text) => Array.from(text).length <= 150)
10180
- .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
10181
- municipality_code: z
10182
- .enum([
10183
- "010000",
10184
- "010100",
10185
- "010101",
10186
- "020000",
10187
- "020100",
10188
- "020101",
10189
- "020102",
10190
- "020103",
10191
- "020104",
10192
- "020105",
10193
- "020106",
10194
- "020107",
10195
- "020108",
10196
- "020109",
10197
- "020200",
10198
- "020201",
10199
- "020202",
10200
- "020300",
10201
- "020301",
10202
- "020302",
10203
- "020303",
10204
- "020400",
10205
- "020401",
10206
- "020402",
10207
- "020403",
10208
- "020404",
10209
- "020405",
10210
- "020500",
10211
- "020501",
10212
- "020600",
10213
- "020601",
10214
- "020602",
10215
- "020603",
10216
- "020604",
10217
- "020700",
10218
- "020701",
10219
- "020702",
10220
- "020800",
10221
- "020801",
10222
- "020802",
10223
- "020803",
10224
- "020804",
10225
- "020900",
10226
- "020901",
10227
- "021000",
10228
- "021001",
10229
- "030000",
10230
- "030001",
10231
- "030101",
10232
- "030102",
10233
- "030200",
10234
- "030201",
10235
- "030202",
10236
- "030300",
10237
- "030301",
10238
- "030302",
10239
- "030303",
10240
- "030304",
10241
- "030305",
10242
- "030306",
10243
- "030307",
10244
- "030400",
10245
- "030401",
10246
- "030500",
10247
- "030501",
10248
- "030502",
10249
- "040000",
10250
- "040100",
10251
- "040101",
10252
- "040102",
10253
- "040103",
10254
- "040104",
10255
- "040200",
10256
- "040201",
10257
- "040300",
10258
- "040301",
10259
- "040302",
10260
- "040400",
10261
- "040401",
10262
- "040402",
10263
- "040500",
10264
- "040501",
10265
- "040502",
10266
- "040503",
10267
- "040504",
10268
- "040600",
10269
- "040601",
10270
- "040700",
10271
- "040701",
10272
- "040702",
10273
- "040800",
10274
- "040801",
10275
- "040802",
10276
- "040900",
10277
- "040901",
10278
- "041000",
10279
- "041001",
10280
- "041100",
10281
- "041101",
10282
- "041102",
10283
- "050000",
10284
- "050100",
10285
- "050101",
10286
- "050102",
10287
- "050200",
10288
- "050201",
10289
- "050202",
10290
- "050203",
10291
- "050300",
10292
- "050301",
10293
- "050400",
10294
- "050401",
10295
- "050500",
10296
- "050501",
10297
- "050502",
10298
- "060000",
10299
- "060100",
10300
- "060101",
10301
- "060102",
10302
- "060103",
10303
- "060104",
10304
- "060105",
10305
- "060200",
10306
- "060201",
10307
- "060202",
10308
- "060203",
10309
- "060300",
10310
- "060301",
10311
- "060400",
10312
- "060401",
10313
- "060500",
10314
- "060501",
10315
- "060502",
10316
- "060503",
10317
- "060504",
10318
- "060505",
10319
- "060600",
10320
- "060601",
10321
- "060700",
10322
- "060701",
10323
- "060702",
10324
- "070000",
10325
- "070100",
10326
- "070101",
10327
- "070102",
10328
- "070103",
10329
- "070200",
10330
- "070201",
10331
- "070202",
10332
- "070203",
10333
- "070300",
10334
- "070301",
10335
- "070302",
10336
- "070400",
10337
- "070401",
10338
- "070402",
10339
- "070500",
10340
- "070501",
10341
- "070502",
10342
- "070600",
10343
- "070601",
10344
- "080000",
10345
- "080100",
10346
- "080101",
10347
- "080102",
10348
- "080103",
10349
- "080104",
10350
- "080200",
10351
- "080201",
10352
- "080202",
10353
- "080203",
10354
- "090000",
10355
- "090100",
10356
- "090101",
10357
- "090102",
10358
- "090103",
10359
- "090104",
10360
- "090105",
10361
- "090106",
10362
- "090107",
10363
- "090108",
10364
- "090109",
10365
- "090200",
10366
- "090201",
10367
- "090300",
10368
- "090301",
10369
- "090302",
10370
- "090303",
10371
- "090304",
10372
- "090400",
10373
- "090401",
10374
- "100000",
10375
- "100100",
10376
- "100101",
10377
- "100102",
10378
- "100103",
10379
- "100200",
10380
- "100201",
10381
- "100202",
10382
- "100300",
10383
- "100301",
10384
- "100400",
10385
- "100401",
10386
- "100402",
10387
- "100500",
10388
- "100501",
10389
- "100502",
10390
- "100600",
10391
- "100601",
10392
- "100602",
10393
- "110000",
10394
- "110100",
10395
- "110101",
10396
- "110102",
10397
- "110103",
10398
- "110104",
10399
- "110200",
10400
- "110201",
10401
- "110202",
10402
- "110203",
10403
- "120000",
10404
- "120100",
10405
- "120101",
10406
- "120102",
10407
- "120200",
10408
- "120201",
10409
- "120300",
10410
- "120301",
10411
- "120302",
10412
- "130000",
10413
- "130100",
10414
- "130101",
10415
- "130102",
10416
- "130103",
10417
- "130104",
10418
- "130105",
10419
- "130200",
10420
- "130201",
10421
- "130202",
10422
- "130203",
10423
- "130300",
10424
- "130301",
10425
- "130302",
10426
- "130303",
10427
- "130400",
10428
- "130401",
10429
- "130402",
10430
- "140000",
10431
- "140100",
10432
- "140101",
10433
- "140102",
10434
- "140103",
10435
- "140104",
10436
- "140200",
10437
- "140201",
10438
- "140202",
10439
- "140203",
10440
- "140300",
10441
- "140301",
10442
- "140302",
10443
- "140400",
10444
- "140401",
10445
- "150000",
10446
- "150100",
10447
- "150101",
10448
- "150200",
10449
- "150201",
10450
- "150202",
10451
- "150300",
10452
- "150301",
10453
- "150302",
10454
- "150303",
10455
- "150304",
10456
- "150400",
10457
- "150401",
10458
- "150500",
10459
- "150501",
10460
- "150502",
10461
- "150600",
10462
- "150601",
10463
- "160000",
10464
- "160100",
10465
- "160101",
10466
- "160102",
10467
- "160200",
10468
- "160201",
10469
- "160202",
10470
- "170000",
10471
- "170100",
10472
- "170101",
10473
- "170102",
10474
- "170103",
10475
- "170104",
10476
- "170105",
10477
- "170106",
10478
- "170107",
10479
- "170108",
10480
- "170109",
10481
- "170110",
10482
- "170200",
10483
- "170201",
10484
- "170202",
10485
- "170203",
10486
- "170300",
10487
- "170301",
10488
- "180000",
10489
- "180100",
10490
- "180101",
10491
- "180102",
10492
- "180103",
10493
- "180200",
10494
- "180201",
10495
- "180202",
10496
- "180300",
10497
- "180301",
10498
- "180400",
10499
- "180401",
10500
- "180500",
10501
- "180501",
10502
- "180502",
10503
- "180600",
10504
- "180601",
10505
- "180602",
10506
- "180603",
10507
- "180604",
10508
- "180700",
10509
- "180701",
10510
- "180702",
10511
- "180703",
10512
- "180800",
10513
- "180801",
10514
- "180802",
10515
- "180803",
10516
- "180804",
10517
- "180900",
10518
- "180901",
10519
- "190000",
10520
- "190100",
10521
- "190101",
10522
- "190102",
10523
- "190200",
10524
- "190201",
10525
- "190202",
10526
- "190300",
10527
- "190301",
10528
- "200000",
10529
- "200100",
10530
- "200101",
10531
- "200102",
10532
- "200103",
10533
- "200104",
10534
- "200200",
10535
- "200201",
10536
- "200300",
10537
- "200301",
10538
- "210000",
10539
- "210100",
10540
- "210101",
10541
- "210102",
10542
- "210103",
10543
- "210200",
10544
- "210201",
10545
- "210300",
10546
- "210301",
10547
- "210302",
10548
- "210303",
10549
- "210400",
10550
- "210401",
10551
- "210402",
10552
- "210500",
10553
- "210501",
10554
- "210502",
10555
- "210503",
10556
- "210504",
10557
- "210600",
10558
- "210601",
10559
- "210602",
10560
- "210700",
10561
- "210701",
10562
- "210800",
10563
- "210801",
10564
- "220000",
10565
- "220100",
10566
- "220101",
10567
- "220102",
10568
- "220103",
10569
- "220104",
10570
- "220105",
10571
- "220106",
10572
- "220107",
10573
- "220108",
10574
- "220109",
10575
- "220110",
10576
- "220111",
10577
- "220200",
10578
- "220201",
10579
- "220202",
10580
- "220203",
10581
- "220300",
10582
- "220301",
10583
- "220302",
10584
- "220303",
10585
- "220400",
10586
- "220401",
10587
- "220402",
10588
- "220500",
10589
- "220501",
10590
- "220502",
10591
- "220503",
10592
- "220600",
10593
- "220601",
10594
- "220602",
10595
- "230000",
10596
- "230100",
10597
- "230101",
10598
- "230200",
10599
- "230201",
10600
- "230202",
10601
- "230203",
10602
- "230300",
10603
- "230301",
10604
- "230400",
10605
- "230401",
10606
- "230500",
10607
- "230501",
10608
- "230600",
10609
- "230601",
10610
- "240000",
10611
- "240100",
10612
- "240101",
10613
- "240102",
10614
- "240103",
10615
- "240104",
10616
- "240105",
10617
- "240106",
10618
- "240200",
10619
- "240201",
10620
- "240202",
10621
- "240300",
10622
- "240301",
10623
- "240400",
10624
- "240401",
10625
- "240402",
10626
- "240403",
10627
- "240404",
10628
- "250000",
10629
- "250100",
10630
- "250101",
10631
- "250102",
10632
- "250104",
10633
- "250105",
10634
- "250106",
10635
- "250107",
10636
- "250200",
10637
- "250201",
10638
- "250300",
10639
- "250301",
10640
- "250302",
10641
- "250303",
10642
- "250400",
10643
- "250401",
10644
- "250402",
10645
- "250500",
10646
- "250501",
10647
- "250502",
10648
- "250503",
10649
- "250504",
10650
- "250600",
10651
- "250601",
10652
- "250602",
10653
- "250700",
10654
- "250701",
10655
- "250702",
10656
- "250703",
10657
- "250800",
10658
- "250801",
10659
- "250802",
10660
- "250803",
10661
- "250900",
10662
- "250901",
10663
- "251000",
10664
- "251001",
10665
- "260000",
10666
- "260100",
10667
- "260101",
10668
- "260200",
10669
- "260201",
10670
- "260300",
10671
- "260301",
10672
- "270000",
10673
- "270100",
10674
- "270101",
10675
- "270102",
10676
- "270103",
10677
- "270104",
10678
- "270200",
10679
- "270201",
10680
- "270202",
10681
- "270203",
10682
- "270204",
10683
- "270205",
10684
- "270300",
10685
- "270301",
10686
- "270302",
10687
- "270303",
10688
- "270304",
10689
- "280000",
10690
- "280100",
10691
- "280101",
10692
- "280102",
10693
- "280103",
10694
- "280104",
10695
- "280105",
10696
- "280106",
10697
- "280200",
10698
- "280201",
10699
- "280300",
10700
- "280301",
10701
- "280302",
10702
- "280303",
10703
- "290000",
10704
- "290100",
10705
- "290101",
10706
- "290102",
10707
- "290103",
10708
- "290104",
10709
- "290200",
10710
- "290201",
10711
- "290300",
10712
- "290301",
10713
- "290302",
10714
- "290303",
10715
- "290400",
10716
- "290402",
10717
- "290403",
10718
- "290500",
10719
- "290501",
10720
- "300000",
10721
- "300100",
10722
- "300101",
10723
- "300102",
10724
- "300103",
10725
- "300104",
10726
- "300200",
10727
- "300201",
10728
- "300202",
10729
- "300300",
10730
- "300301",
10731
- "310000",
10732
- "310100",
10733
- "310101",
10734
- "310102",
10735
- "310103",
10736
- "310104",
10737
- "310105",
10738
- "310200",
10739
- "310201",
10740
- "310300",
10741
- "310301",
10742
- "320000",
10743
- "320100",
10744
- "320101",
10745
- "320102",
10746
- "320200",
10747
- "320201",
10748
- "320300",
10749
- "320301",
10750
- "320302",
10751
- "320400",
10752
- "320401",
10753
- "320402",
10754
- "320500",
10755
- "320501",
10756
- "320502",
10757
- "320600",
10758
- "320601",
10759
- "320602",
10760
- "320603",
10761
- "320700",
10762
- "320701",
10763
- "320702",
10764
- "320703",
10765
- ])
10766
- .optional(),
10767
- province_code: z
10768
- .enum([
10769
- "010000",
10770
- "010100",
10771
- "010101",
10772
- "020000",
10773
- "020100",
10774
- "020101",
10775
- "020102",
10776
- "020103",
10777
- "020104",
10778
- "020105",
10779
- "020106",
10780
- "020107",
10781
- "020108",
10782
- "020109",
10783
- "020200",
10784
- "020201",
10785
- "020202",
10786
- "020300",
10787
- "020301",
10788
- "020302",
10789
- "020303",
10790
- "020400",
10791
- "020401",
10792
- "020402",
10793
- "020403",
10794
- "020404",
10795
- "020405",
10796
- "020500",
10797
- "020501",
10798
- "020600",
10799
- "020601",
10800
- "020602",
10801
- "020603",
10802
- "020604",
10803
- "020700",
10804
- "020701",
10805
- "020702",
10806
- "020800",
10807
- "020801",
10808
- "020802",
10809
- "020803",
10810
- "020804",
10811
- "020900",
10812
- "020901",
10813
- "021000",
10814
- "021001",
10815
- "030000",
10816
- "030001",
10817
- "030101",
10818
- "030102",
10819
- "030200",
10820
- "030201",
10821
- "030202",
10822
- "030300",
10823
- "030301",
10824
- "030302",
10825
- "030303",
10826
- "030304",
10827
- "030305",
10828
- "030306",
10829
- "030307",
10830
- "030400",
10831
- "030401",
10832
- "030500",
10833
- "030501",
10834
- "030502",
10835
- "040000",
10836
- "040100",
10837
- "040101",
10838
- "040102",
10839
- "040103",
10840
- "040104",
10841
- "040200",
10842
- "040201",
10843
- "040300",
10844
- "040301",
10845
- "040302",
10846
- "040400",
10847
- "040401",
10848
- "040402",
10849
- "040500",
10850
- "040501",
10851
- "040502",
10852
- "040503",
10853
- "040504",
10854
- "040600",
10855
- "040601",
10856
- "040700",
10857
- "040701",
10858
- "040702",
10859
- "040800",
10860
- "040801",
10861
- "040802",
10862
- "040900",
10863
- "040901",
10864
- "041000",
10865
- "041001",
10866
- "041100",
10867
- "041101",
10868
- "041102",
10869
- "050000",
10870
- "050100",
10871
- "050101",
10872
- "050102",
10873
- "050200",
10874
- "050201",
10875
- "050202",
10876
- "050203",
10877
- "050300",
10878
- "050301",
10879
- "050400",
10880
- "050401",
10881
- "050500",
10882
- "050501",
10883
- "050502",
10884
- "060000",
10885
- "060100",
10886
- "060101",
10887
- "060102",
10888
- "060103",
10889
- "060104",
10890
- "060105",
10891
- "060200",
10892
- "060201",
10893
- "060202",
10894
- "060203",
10895
- "060300",
10896
- "060301",
10897
- "060400",
10898
- "060401",
10899
- "060500",
10900
- "060501",
10901
- "060502",
10902
- "060503",
10903
- "060504",
10904
- "060505",
10905
- "060600",
10906
- "060601",
10907
- "060700",
10908
- "060701",
10909
- "060702",
10910
- "070000",
10911
- "070100",
10912
- "070101",
10913
- "070102",
10914
- "070103",
10915
- "070200",
10916
- "070201",
10917
- "070202",
10918
- "070203",
10919
- "070300",
10920
- "070301",
10921
- "070302",
10922
- "070400",
10923
- "070401",
10924
- "070402",
10925
- "070500",
10926
- "070501",
10927
- "070502",
10928
- "070600",
10929
- "070601",
10930
- "080000",
10931
- "080100",
10932
- "080101",
10933
- "080102",
10934
- "080103",
10935
- "080104",
10936
- "080200",
10937
- "080201",
10938
- "080202",
10939
- "080203",
10940
- "090000",
10941
- "090100",
10942
- "090101",
10943
- "090102",
10944
- "090103",
10945
- "090104",
10946
- "090105",
10947
- "090106",
10948
- "090107",
10949
- "090108",
10950
- "090109",
10951
- "090200",
10952
- "090201",
10953
- "090300",
10954
- "090301",
10955
- "090302",
10956
- "090303",
10957
- "090304",
10958
- "090400",
10959
- "090401",
10960
- "100000",
10961
- "100100",
10962
- "100101",
10963
- "100102",
10964
- "100103",
10965
- "100200",
10966
- "100201",
10967
- "100202",
10968
- "100300",
10969
- "100301",
10970
- "100400",
10971
- "100401",
10972
- "100402",
10973
- "100500",
10974
- "100501",
10975
- "100502",
10976
- "100600",
10977
- "100601",
10978
- "100602",
10979
- "110000",
10980
- "110100",
10981
- "110101",
10982
- "110102",
10983
- "110103",
10984
- "110104",
10985
- "110200",
10986
- "110201",
10987
- "110202",
10988
- "110203",
10989
- "120000",
10990
- "120100",
10991
- "120101",
10992
- "120102",
10993
- "120200",
10994
- "120201",
10995
- "120300",
10996
- "120301",
10997
- "120302",
10998
- "130000",
10999
- "130100",
11000
- "130101",
11001
- "130102",
11002
- "130103",
11003
- "130104",
11004
- "130105",
11005
- "130200",
11006
- "130201",
11007
- "130202",
11008
- "130203",
11009
- "130300",
11010
- "130301",
11011
- "130302",
11012
- "130303",
11013
- "130400",
11014
- "130401",
11015
- "130402",
11016
- "140000",
11017
- "140100",
11018
- "140101",
11019
- "140102",
11020
- "140103",
11021
- "140104",
11022
- "140200",
11023
- "140201",
11024
- "140202",
11025
- "140203",
11026
- "140300",
11027
- "140301",
11028
- "140302",
11029
- "140400",
11030
- "140401",
11031
- "150000",
11032
- "150100",
11033
- "150101",
11034
- "150200",
11035
- "150201",
11036
- "150202",
11037
- "150300",
11038
- "150301",
11039
- "150302",
11040
- "150303",
11041
- "150304",
11042
- "150400",
11043
- "150401",
11044
- "150500",
11045
- "150501",
11046
- "150502",
11047
- "150600",
11048
- "150601",
11049
- "160000",
11050
- "160100",
11051
- "160101",
11052
- "160102",
11053
- "160200",
11054
- "160201",
11055
- "160202",
11056
- "170000",
11057
- "170100",
11058
- "170101",
11059
- "170102",
11060
- "170103",
11061
- "170104",
11062
- "170105",
11063
- "170106",
11064
- "170107",
11065
- "170108",
11066
- "170109",
11067
- "170110",
11068
- "170200",
11069
- "170201",
11070
- "170202",
11071
- "170203",
11072
- "170300",
11073
- "170301",
11074
- "180000",
11075
- "180100",
11076
- "180101",
11077
- "180102",
11078
- "180103",
11079
- "180200",
11080
- "180201",
11081
- "180202",
11082
- "180300",
11083
- "180301",
11084
- "180400",
11085
- "180401",
11086
- "180500",
11087
- "180501",
11088
- "180502",
11089
- "180600",
11090
- "180601",
11091
- "180602",
11092
- "180603",
11093
- "180604",
11094
- "180700",
11095
- "180701",
11096
- "180702",
11097
- "180703",
11098
- "180800",
11099
- "180801",
11100
- "180802",
11101
- "180803",
11102
- "180804",
11103
- "180900",
11104
- "180901",
11105
- "190000",
11106
- "190100",
11107
- "190101",
11108
- "190102",
11109
- "190200",
11110
- "190201",
11111
- "190202",
11112
- "190300",
11113
- "190301",
11114
- "200000",
11115
- "200100",
11116
- "200101",
11117
- "200102",
11118
- "200103",
11119
- "200104",
11120
- "200200",
11121
- "200201",
11122
- "200300",
11123
- "200301",
11124
- "210000",
11125
- "210100",
11126
- "210101",
11127
- "210102",
11128
- "210103",
11129
- "210200",
11130
- "210201",
11131
- "210300",
11132
- "210301",
11133
- "210302",
11134
- "210303",
11135
- "210400",
11136
- "210401",
11137
- "210402",
11138
- "210500",
11139
- "210501",
11140
- "210502",
11141
- "210503",
11142
- "210504",
11143
- "210600",
11144
- "210601",
11145
- "210602",
11146
- "210700",
11147
- "210701",
11148
- "210800",
11149
- "210801",
11150
- "220000",
11151
- "220100",
11152
- "220101",
11153
- "220102",
11154
- "220103",
11155
- "220104",
11156
- "220105",
11157
- "220106",
11158
- "220107",
11159
- "220108",
11160
- "220109",
11161
- "220110",
11162
- "220111",
11163
- "220200",
11164
- "220201",
11165
- "220202",
11166
- "220203",
11167
- "220300",
11168
- "220301",
11169
- "220302",
11170
- "220303",
11171
- "220400",
11172
- "220401",
11173
- "220402",
11174
- "220500",
11175
- "220501",
11176
- "220502",
11177
- "220503",
11178
- "220600",
11179
- "220601",
11180
- "220602",
11181
- "230000",
11182
- "230100",
11183
- "230101",
11184
- "230200",
11185
- "230201",
11186
- "230202",
11187
- "230203",
11188
- "230300",
11189
- "230301",
11190
- "230400",
11191
- "230401",
11192
- "230500",
11193
- "230501",
11194
- "230600",
11195
- "230601",
11196
- "240000",
11197
- "240100",
11198
- "240101",
11199
- "240102",
11200
- "240103",
11201
- "240104",
11202
- "240105",
11203
- "240106",
11204
- "240200",
11205
- "240201",
11206
- "240202",
11207
- "240300",
11208
- "240301",
11209
- "240400",
11210
- "240401",
11211
- "240402",
11212
- "240403",
11213
- "240404",
11214
- "250000",
11215
- "250100",
11216
- "250101",
11217
- "250102",
11218
- "250104",
11219
- "250105",
11220
- "250106",
11221
- "250107",
11222
- "250200",
11223
- "250201",
11224
- "250300",
11225
- "250301",
11226
- "250302",
11227
- "250303",
11228
- "250400",
11229
- "250401",
11230
- "250402",
11231
- "250500",
11232
- "250501",
11233
- "250502",
11234
- "250503",
11235
- "250504",
11236
- "250600",
11237
- "250601",
11238
- "250602",
11239
- "250700",
11240
- "250701",
11241
- "250702",
11242
- "250703",
11243
- "250800",
11244
- "250801",
11245
- "250802",
11246
- "250803",
11247
- "250900",
11248
- "250901",
11249
- "251000",
11250
- "251001",
11251
- "260000",
11252
- "260100",
11253
- "260101",
11254
- "260200",
11255
- "260201",
11256
- "260300",
11257
- "260301",
11258
- "270000",
11259
- "270100",
11260
- "270101",
11261
- "270102",
11262
- "270103",
11263
- "270104",
11264
- "270200",
11265
- "270201",
11266
- "270202",
11267
- "270203",
11268
- "270204",
11269
- "270205",
11270
- "270300",
11271
- "270301",
11272
- "270302",
11273
- "270303",
11274
- "270304",
11275
- "280000",
11276
- "280100",
11277
- "280101",
11278
- "280102",
11279
- "280103",
11280
- "280104",
11281
- "280105",
11282
- "280106",
11283
- "280200",
11284
- "280201",
11285
- "280300",
11286
- "280301",
11287
- "280302",
11288
- "280303",
11289
- "290000",
11290
- "290100",
11291
- "290101",
11292
- "290102",
11293
- "290103",
11294
- "290104",
11295
- "290200",
11296
- "290201",
11297
- "290300",
11298
- "290301",
11299
- "290302",
11300
- "290303",
11301
- "290400",
11302
- "290402",
11303
- "290403",
11304
- "290500",
11305
- "290501",
11306
- "300000",
11307
- "300100",
11308
- "300101",
11309
- "300102",
11310
- "300103",
11311
- "300104",
11312
- "300200",
11313
- "300201",
11314
- "300202",
11315
- "300300",
11316
- "300301",
11317
- "310000",
11318
- "310100",
11319
- "310101",
11320
- "310102",
11321
- "310103",
11322
- "310104",
11323
- "310105",
11324
- "310200",
11325
- "310201",
11326
- "310300",
11327
- "310301",
11328
- "320000",
11329
- "320100",
11330
- "320101",
11331
- "320102",
11332
- "320200",
11333
- "320201",
11334
- "320300",
11335
- "320301",
11336
- "320302",
11337
- "320400",
11338
- "320401",
11339
- "320402",
11340
- "320500",
11341
- "320501",
11342
- "320502",
11343
- "320600",
11344
- "320601",
11345
- "320602",
11346
- "320603",
11347
- "320700",
11348
- "320701",
11349
- "320702",
11350
- "320703",
11351
- ])
11352
- .optional(),
11353
- purchase_order_number: z
11354
- .string()
11355
- .refine((text) => Array.from(text).length >= 1)
11356
- .refine((text) => Array.from(text).length <= 20)
11357
- .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
11358
- .optional(),
11359
- purchase_order_on: z
11360
- .string()
11361
- .regex(/^(?:(?:31-(?:0?[13578]|1[02])|(?:29|30)-(?:0?[13-9]|1[0-2])|(?:0?[1-9]|1[0-9]|2[0-8])-(?:0?[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-0?2-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000))$/)
11362
- .optional(),
11363
- tax_id: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
11364
- }),
11365
- income_type: z.enum(["01", "02", "03", "04", "05", "06"]),
11366
- payment_type: z.enum(["1", "2", "3"]),
11367
- }))
11368
- .and(z.strictObject({
11369
- deferred_submission: z.enum(["1"]).optional(),
11370
- discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
11371
- foreign_currency: zForeignCurrencyIntent.optional(),
11372
- payment_due_on: z
11373
- .string()
11374
- .regex(/^(?:(?:31-(?:0?[13578]|1[02])|(?:29|30)-(?:0?[13-9]|1[0-2])|(?:0?[1-9]|1[0-9]|2[0-8])-(?:0?[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-0?2-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000))$/)
11375
- .optional(),
11376
- reference_information: zReferenceInformation.optional(),
11377
- tax_inclusive_amounts: z.enum(["0", "1"]).optional(),
11378
- }))
11379
- .and(z.strictObject({
11380
- currency: z.enum(["DOP"]),
11381
- lines: z.array(zFiscalLineWithLegalTip).min(1).max(1000),
11382
- }));
11383
- export const zSourceType32Snapshot = z
10832
+ export const zSourceType32Snapshot = z
11384
10833
  .strictObject({
10834
+ payment_account: zPaymentAccount.optional(),
11385
10835
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
11386
10836
  })
11387
10837
  .and(z.strictObject({
@@ -11390,6 +10840,10 @@ export const zSourceType32Snapshot = z
11390
10840
  identity_kind: z.enum(["anonymous"]),
11391
10841
  }),
11392
10842
  z.strictObject({
10843
+ delivery_phone: z
10844
+ .string()
10845
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
10846
+ .optional(),
11393
10847
  identity_kind: z.enum(["domestic"]),
11394
10848
  legal_name: z
11395
10849
  .string()
@@ -11399,6 +10853,10 @@ export const zSourceType32Snapshot = z
11399
10853
  tax_id: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
11400
10854
  }),
11401
10855
  z.strictObject({
10856
+ delivery_phone: z
10857
+ .string()
10858
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
10859
+ .optional(),
11402
10860
  foreign_identifier: z
11403
10861
  .string()
11404
10862
  .refine((text) => Array.from(text).length >= 1)
@@ -11416,6 +10874,7 @@ export const zSourceType32Snapshot = z
11416
10874
  payment_type: z.enum(["1", "2", "3"]),
11417
10875
  }))
11418
10876
  .and(z.strictObject({
10877
+ additional_information: zAdditionalDocumentInformation.optional(),
11419
10878
  deferred_submission: z.enum(["1"]).optional(),
11420
10879
  discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
11421
10880
  foreign_currency: zForeignCurrencyIntent.optional(),
@@ -11432,6 +10891,7 @@ export const zSourceType32Snapshot = z
11432
10891
  }));
11433
10892
  export const zSourceType33Snapshot = z
11434
10893
  .strictObject({
10894
+ payment_account: zPaymentAccount.optional(),
11435
10895
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
11436
10896
  })
11437
10897
  .and(z.strictObject({
@@ -11457,6 +10917,10 @@ export const zSourceType33Snapshot = z
11457
10917
  .string()
11458
10918
  .regex(/^(?:(?:31-(?:0?[13578]|1[02])|(?:29|30)-(?:0?[13-9]|1[0-2])|(?:0?[1-9]|1[0-9]|2[0-8])-(?:0?[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-0?2-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000))$/)
11459
10919
  .optional(),
10920
+ delivery_phone: z
10921
+ .string()
10922
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
10923
+ .optional(),
11460
10924
  email: z
11461
10925
  .string()
11462
10926
  .refine((text) => Array.from(text).length <= 80)
@@ -12661,6 +12125,10 @@ export const zSourceType33Snapshot = z
12661
12125
  identity_kind: z.enum(["domestic"]),
12662
12126
  })),
12663
12127
  z.strictObject({
12128
+ delivery_phone: z
12129
+ .string()
12130
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
12131
+ .optional(),
12664
12132
  foreign_identifier: z
12665
12133
  .string()
12666
12134
  .refine((text) => Array.from(text).length >= 1)
@@ -12678,6 +12146,7 @@ export const zSourceType33Snapshot = z
12678
12146
  payment_type: z.enum(["1", "2", "3"]),
12679
12147
  }))
12680
12148
  .and(z.strictObject({
12149
+ additional_information: zAdditionalDocumentInformation.optional(),
12681
12150
  deferred_submission: z.enum(["1"]).optional(),
12682
12151
  discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
12683
12152
  foreign_currency: zForeignCurrencyIntent.optional(),
@@ -12716,6 +12185,10 @@ export const zSourceType34Snapshot = z
12716
12185
  .string()
12717
12186
  .regex(/^(?:(?:31-(?:0?[13578]|1[02])|(?:29|30)-(?:0?[13-9]|1[0-2])|(?:0?[1-9]|1[0-9]|2[0-8])-(?:0?[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-0?2-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000))$/)
12718
12187
  .optional(),
12188
+ delivery_phone: z
12189
+ .string()
12190
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
12191
+ .optional(),
12719
12192
  email: z
12720
12193
  .string()
12721
12194
  .refine((text) => Array.from(text).length <= 80)
@@ -13920,6 +13393,10 @@ export const zSourceType34Snapshot = z
13920
13393
  identity_kind: z.enum(["domestic"]),
13921
13394
  })),
13922
13395
  z.strictObject({
13396
+ delivery_phone: z
13397
+ .string()
13398
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
13399
+ .optional(),
13923
13400
  foreign_identifier: z
13924
13401
  .string()
13925
13402
  .refine((text) => Array.from(text).length >= 1)
@@ -13937,6 +13414,7 @@ export const zSourceType34Snapshot = z
13937
13414
  payment_type: z.enum(["1", "2", "3"]),
13938
13415
  }))
13939
13416
  .and(z.strictObject({
13417
+ additional_information: zAdditionalDocumentInformation.optional(),
13940
13418
  deferred_submission: z.enum(["1"]).optional(),
13941
13419
  discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
13942
13420
  foreign_currency: zForeignCurrencyIntent.optional(),
@@ -13970,6 +13448,7 @@ export const zSourceType45Snapshot = zOptionalPaymentAllocations
13970
13448
  payment_type: z.enum(["1", "2", "3"]),
13971
13449
  }))
13972
13450
  .and(z.strictObject({
13451
+ additional_information: zGovernmentAdditionalDocumentInformation.optional(),
13973
13452
  deferred_submission: z.enum(["1"]).optional(),
13974
13453
  discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
13975
13454
  foreign_currency: zForeignCurrencyIntent.optional(),
@@ -13984,28 +13463,6 @@ export const zSourceType45Snapshot = zOptionalPaymentAllocations
13984
13463
  currency: z.enum(["DOP"]),
13985
13464
  lines: z.array(zFiscalLineWithLegalTip).min(1).max(1000),
13986
13465
  }));
13987
- export const zSourceType46Snapshot = zOptionalPaymentAllocations
13988
- .and(z.strictObject({
13989
- export_customer: zExportCustomer,
13990
- export_eligibility: zCallerDeclaredExportEligibility,
13991
- income_type: z.enum(["01", "02", "03", "04", "05", "06"]),
13992
- payment_type: z.enum(["1", "2", "3"]),
13993
- }))
13994
- .and(z.strictObject({
13995
- deferred_submission: z.enum(["1"]).optional(),
13996
- discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
13997
- foreign_currency: zForeignCurrencyIntent.optional(),
13998
- payment_due_on: z
13999
- .string()
14000
- .regex(/^(?:(?:31-(?:0?[13578]|1[02])|(?:29|30)-(?:0?[13-9]|1[0-2])|(?:0?[1-9]|1[0-9]|2[0-8])-(?:0?[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-0?2-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000))$/)
14001
- .optional(),
14002
- reference_information: zReferenceInformation.optional(),
14003
- tax_inclusive_amounts: z.enum(["0", "1"]).optional(),
14004
- }))
14005
- .and(z.strictObject({
14006
- currency: z.enum(["DOP"]),
14007
- lines: z.array(zFiscalLine).min(1).max(1000),
14008
- }));
14009
13466
  export const zSourceType47Snapshot = zOptionalPaymentAllocations
14010
13467
  .and(z.strictObject({
14011
13468
  foreign_payee: zForeignPayee,
@@ -14055,6 +13512,7 @@ export const zSourceType44Snapshot = zSalesTermsSpecialRegimeBuyerOptionalPaymen
14055
13512
  caller_declared_eligibility: zCallerDeclaredSpecialRegimeEligibility,
14056
13513
  }))
14057
13514
  .and(z.strictObject({
13515
+ additional_information: zAdditionalDocumentInformation.optional(),
14058
13516
  deferred_submission: z.enum(["1"]).optional(),
14059
13517
  discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
14060
13518
  foreign_currency: zForeignCurrencyIntent.optional(),
@@ -14727,21 +14185,1301 @@ export const zTimingWork = z.strictObject({
14727
14185
  .nullable(),
14728
14186
  producer_traceparent: z
14729
14187
  .string()
14730
- .regex(/^00-[0-9a-f]{32}-[0-9a-f]{16}-0[01]$/)
14731
- .nullable(),
14732
- scheduled_delay_ms: z
14733
- .int()
14734
- .gte(0)
14735
- .max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
14736
- .nullable(),
14737
- settled_at: z.iso.datetime().nullable(),
14738
- state: zTimingWorkState,
14739
- work_id: z.string().regex(/^[0-9a-f]{64}$/),
14740
- });
14188
+ .regex(/^00-[0-9a-f]{32}-[0-9a-f]{16}-0[01]$/)
14189
+ .nullable(),
14190
+ scheduled_delay_ms: z
14191
+ .int()
14192
+ .gte(0)
14193
+ .max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
14194
+ .nullable(),
14195
+ settled_at: z.iso.datetime().nullable(),
14196
+ state: zTimingWorkState,
14197
+ work_id: z.string().regex(/^[0-9a-f]{64}$/),
14198
+ });
14199
+ /**
14200
+ * A Type 31 line with its profile-permitted line-level discounts and surcharges.
14201
+ */
14202
+ export const zType31Line = z.strictObject({
14203
+ additional_tax_codes: z
14204
+ .array(z.enum(["001"]))
14205
+ .min(1)
14206
+ .max(2)
14207
+ .optional(),
14208
+ adjustments: z
14209
+ .strictObject({
14210
+ discounts: z.array(zLinePriceAdjustment).min(0).max(12).optional(),
14211
+ surcharges: z.array(zLinePriceAdjustment).min(0).max(12).optional(),
14212
+ })
14213
+ .optional(),
14214
+ billing_indicator: z.enum(["0", "1", "2", "3", "4"]),
14215
+ goods_or_service_indicator: z.enum(["1", "2"]),
14216
+ item_codes: z.array(zFiscalItemCode).min(0).max(5).optional(),
14217
+ measurement_unit: z.string().regex(/^([1-9]|[1-5][0-9]|6[0-2])$/),
14218
+ name: z
14219
+ .string()
14220
+ .refine((text) => Array.from(text).length >= 1)
14221
+ .refine((text) => Array.from(text).length <= 80)
14222
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
14223
+ quantity: z.string().regex(/^(?=[0-9.]*[1-9])[0-9]{1,16}(\.[0-9]{1,2})?$/),
14224
+ source_line_id: z
14225
+ .string()
14226
+ .refine((text) => Array.from(text).length >= 1)
14227
+ .refine((text) => Array.from(text).length <= 128)
14228
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
14229
+ tax_exclusive_unit_price: z.enum(["1"]).optional(),
14230
+ unit_price: z.string().regex(/^[0-9]{1,16}(\.[0-9]{1,4})?$/),
14231
+ });
14232
+ export const zSourceType31Snapshot = z
14233
+ .strictObject({
14234
+ payment_account: zPaymentAccount.optional(),
14235
+ payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
14236
+ })
14237
+ .and(z.strictObject({
14238
+ buyer: z.strictObject({
14239
+ address: z
14240
+ .string()
14241
+ .refine((text) => Array.from(text).length >= 1)
14242
+ .refine((text) => Array.from(text).length <= 100)
14243
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
14244
+ .optional(),
14245
+ contact_name: z
14246
+ .string()
14247
+ .refine((text) => Array.from(text).length >= 1)
14248
+ .refine((text) => Array.from(text).length <= 80)
14249
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
14250
+ .optional(),
14251
+ delivery_on: z
14252
+ .string()
14253
+ .regex(/^(?:(?:31-(?:0?[13578]|1[02])|(?:29|30)-(?:0?[13-9]|1[0-2])|(?:0?[1-9]|1[0-9]|2[0-8])-(?:0?[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-0?2-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000))$/)
14254
+ .optional(),
14255
+ delivery_phone: z
14256
+ .string()
14257
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
14258
+ .optional(),
14259
+ email: z
14260
+ .string()
14261
+ .refine((text) => Array.from(text).length <= 80)
14262
+ .regex(/^[\p{L}\p{M}\p{N}\p{S}]+(?:[-.][\p{L}\p{M}\p{N}\p{S}]+)*@[\p{L}\p{M}\p{N}\p{S}]+(?:[-.][\p{L}\p{M}\p{N}\p{S}]+)*\.[\p{L}\p{M}\p{N}\p{S}]+(?:[-.][\p{L}\p{M}\p{N}\p{S}]+)*$/u)
14263
+ .optional(),
14264
+ internal_code: z
14265
+ .string()
14266
+ .refine((text) => Array.from(text).length >= 1)
14267
+ .refine((text) => Array.from(text).length <= 20)
14268
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
14269
+ .optional(),
14270
+ legal_name: z
14271
+ .string()
14272
+ .refine((text) => Array.from(text).length >= 1)
14273
+ .refine((text) => Array.from(text).length <= 150)
14274
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
14275
+ municipality_code: z
14276
+ .enum([
14277
+ "010000",
14278
+ "010100",
14279
+ "010101",
14280
+ "020000",
14281
+ "020100",
14282
+ "020101",
14283
+ "020102",
14284
+ "020103",
14285
+ "020104",
14286
+ "020105",
14287
+ "020106",
14288
+ "020107",
14289
+ "020108",
14290
+ "020109",
14291
+ "020200",
14292
+ "020201",
14293
+ "020202",
14294
+ "020300",
14295
+ "020301",
14296
+ "020302",
14297
+ "020303",
14298
+ "020400",
14299
+ "020401",
14300
+ "020402",
14301
+ "020403",
14302
+ "020404",
14303
+ "020405",
14304
+ "020500",
14305
+ "020501",
14306
+ "020600",
14307
+ "020601",
14308
+ "020602",
14309
+ "020603",
14310
+ "020604",
14311
+ "020700",
14312
+ "020701",
14313
+ "020702",
14314
+ "020800",
14315
+ "020801",
14316
+ "020802",
14317
+ "020803",
14318
+ "020804",
14319
+ "020900",
14320
+ "020901",
14321
+ "021000",
14322
+ "021001",
14323
+ "030000",
14324
+ "030001",
14325
+ "030101",
14326
+ "030102",
14327
+ "030200",
14328
+ "030201",
14329
+ "030202",
14330
+ "030300",
14331
+ "030301",
14332
+ "030302",
14333
+ "030303",
14334
+ "030304",
14335
+ "030305",
14336
+ "030306",
14337
+ "030307",
14338
+ "030400",
14339
+ "030401",
14340
+ "030500",
14341
+ "030501",
14342
+ "030502",
14343
+ "040000",
14344
+ "040100",
14345
+ "040101",
14346
+ "040102",
14347
+ "040103",
14348
+ "040104",
14349
+ "040200",
14350
+ "040201",
14351
+ "040300",
14352
+ "040301",
14353
+ "040302",
14354
+ "040400",
14355
+ "040401",
14356
+ "040402",
14357
+ "040500",
14358
+ "040501",
14359
+ "040502",
14360
+ "040503",
14361
+ "040504",
14362
+ "040600",
14363
+ "040601",
14364
+ "040700",
14365
+ "040701",
14366
+ "040702",
14367
+ "040800",
14368
+ "040801",
14369
+ "040802",
14370
+ "040900",
14371
+ "040901",
14372
+ "041000",
14373
+ "041001",
14374
+ "041100",
14375
+ "041101",
14376
+ "041102",
14377
+ "050000",
14378
+ "050100",
14379
+ "050101",
14380
+ "050102",
14381
+ "050200",
14382
+ "050201",
14383
+ "050202",
14384
+ "050203",
14385
+ "050300",
14386
+ "050301",
14387
+ "050400",
14388
+ "050401",
14389
+ "050500",
14390
+ "050501",
14391
+ "050502",
14392
+ "060000",
14393
+ "060100",
14394
+ "060101",
14395
+ "060102",
14396
+ "060103",
14397
+ "060104",
14398
+ "060105",
14399
+ "060200",
14400
+ "060201",
14401
+ "060202",
14402
+ "060203",
14403
+ "060300",
14404
+ "060301",
14405
+ "060400",
14406
+ "060401",
14407
+ "060500",
14408
+ "060501",
14409
+ "060502",
14410
+ "060503",
14411
+ "060504",
14412
+ "060505",
14413
+ "060600",
14414
+ "060601",
14415
+ "060700",
14416
+ "060701",
14417
+ "060702",
14418
+ "070000",
14419
+ "070100",
14420
+ "070101",
14421
+ "070102",
14422
+ "070103",
14423
+ "070200",
14424
+ "070201",
14425
+ "070202",
14426
+ "070203",
14427
+ "070300",
14428
+ "070301",
14429
+ "070302",
14430
+ "070400",
14431
+ "070401",
14432
+ "070402",
14433
+ "070500",
14434
+ "070501",
14435
+ "070502",
14436
+ "070600",
14437
+ "070601",
14438
+ "080000",
14439
+ "080100",
14440
+ "080101",
14441
+ "080102",
14442
+ "080103",
14443
+ "080104",
14444
+ "080200",
14445
+ "080201",
14446
+ "080202",
14447
+ "080203",
14448
+ "090000",
14449
+ "090100",
14450
+ "090101",
14451
+ "090102",
14452
+ "090103",
14453
+ "090104",
14454
+ "090105",
14455
+ "090106",
14456
+ "090107",
14457
+ "090108",
14458
+ "090109",
14459
+ "090200",
14460
+ "090201",
14461
+ "090300",
14462
+ "090301",
14463
+ "090302",
14464
+ "090303",
14465
+ "090304",
14466
+ "090400",
14467
+ "090401",
14468
+ "100000",
14469
+ "100100",
14470
+ "100101",
14471
+ "100102",
14472
+ "100103",
14473
+ "100200",
14474
+ "100201",
14475
+ "100202",
14476
+ "100300",
14477
+ "100301",
14478
+ "100400",
14479
+ "100401",
14480
+ "100402",
14481
+ "100500",
14482
+ "100501",
14483
+ "100502",
14484
+ "100600",
14485
+ "100601",
14486
+ "100602",
14487
+ "110000",
14488
+ "110100",
14489
+ "110101",
14490
+ "110102",
14491
+ "110103",
14492
+ "110104",
14493
+ "110200",
14494
+ "110201",
14495
+ "110202",
14496
+ "110203",
14497
+ "120000",
14498
+ "120100",
14499
+ "120101",
14500
+ "120102",
14501
+ "120200",
14502
+ "120201",
14503
+ "120300",
14504
+ "120301",
14505
+ "120302",
14506
+ "130000",
14507
+ "130100",
14508
+ "130101",
14509
+ "130102",
14510
+ "130103",
14511
+ "130104",
14512
+ "130105",
14513
+ "130200",
14514
+ "130201",
14515
+ "130202",
14516
+ "130203",
14517
+ "130300",
14518
+ "130301",
14519
+ "130302",
14520
+ "130303",
14521
+ "130400",
14522
+ "130401",
14523
+ "130402",
14524
+ "140000",
14525
+ "140100",
14526
+ "140101",
14527
+ "140102",
14528
+ "140103",
14529
+ "140104",
14530
+ "140200",
14531
+ "140201",
14532
+ "140202",
14533
+ "140203",
14534
+ "140300",
14535
+ "140301",
14536
+ "140302",
14537
+ "140400",
14538
+ "140401",
14539
+ "150000",
14540
+ "150100",
14541
+ "150101",
14542
+ "150200",
14543
+ "150201",
14544
+ "150202",
14545
+ "150300",
14546
+ "150301",
14547
+ "150302",
14548
+ "150303",
14549
+ "150304",
14550
+ "150400",
14551
+ "150401",
14552
+ "150500",
14553
+ "150501",
14554
+ "150502",
14555
+ "150600",
14556
+ "150601",
14557
+ "160000",
14558
+ "160100",
14559
+ "160101",
14560
+ "160102",
14561
+ "160200",
14562
+ "160201",
14563
+ "160202",
14564
+ "170000",
14565
+ "170100",
14566
+ "170101",
14567
+ "170102",
14568
+ "170103",
14569
+ "170104",
14570
+ "170105",
14571
+ "170106",
14572
+ "170107",
14573
+ "170108",
14574
+ "170109",
14575
+ "170110",
14576
+ "170200",
14577
+ "170201",
14578
+ "170202",
14579
+ "170203",
14580
+ "170300",
14581
+ "170301",
14582
+ "180000",
14583
+ "180100",
14584
+ "180101",
14585
+ "180102",
14586
+ "180103",
14587
+ "180200",
14588
+ "180201",
14589
+ "180202",
14590
+ "180300",
14591
+ "180301",
14592
+ "180400",
14593
+ "180401",
14594
+ "180500",
14595
+ "180501",
14596
+ "180502",
14597
+ "180600",
14598
+ "180601",
14599
+ "180602",
14600
+ "180603",
14601
+ "180604",
14602
+ "180700",
14603
+ "180701",
14604
+ "180702",
14605
+ "180703",
14606
+ "180800",
14607
+ "180801",
14608
+ "180802",
14609
+ "180803",
14610
+ "180804",
14611
+ "180900",
14612
+ "180901",
14613
+ "190000",
14614
+ "190100",
14615
+ "190101",
14616
+ "190102",
14617
+ "190200",
14618
+ "190201",
14619
+ "190202",
14620
+ "190300",
14621
+ "190301",
14622
+ "200000",
14623
+ "200100",
14624
+ "200101",
14625
+ "200102",
14626
+ "200103",
14627
+ "200104",
14628
+ "200200",
14629
+ "200201",
14630
+ "200300",
14631
+ "200301",
14632
+ "210000",
14633
+ "210100",
14634
+ "210101",
14635
+ "210102",
14636
+ "210103",
14637
+ "210200",
14638
+ "210201",
14639
+ "210300",
14640
+ "210301",
14641
+ "210302",
14642
+ "210303",
14643
+ "210400",
14644
+ "210401",
14645
+ "210402",
14646
+ "210500",
14647
+ "210501",
14648
+ "210502",
14649
+ "210503",
14650
+ "210504",
14651
+ "210600",
14652
+ "210601",
14653
+ "210602",
14654
+ "210700",
14655
+ "210701",
14656
+ "210800",
14657
+ "210801",
14658
+ "220000",
14659
+ "220100",
14660
+ "220101",
14661
+ "220102",
14662
+ "220103",
14663
+ "220104",
14664
+ "220105",
14665
+ "220106",
14666
+ "220107",
14667
+ "220108",
14668
+ "220109",
14669
+ "220110",
14670
+ "220111",
14671
+ "220200",
14672
+ "220201",
14673
+ "220202",
14674
+ "220203",
14675
+ "220300",
14676
+ "220301",
14677
+ "220302",
14678
+ "220303",
14679
+ "220400",
14680
+ "220401",
14681
+ "220402",
14682
+ "220500",
14683
+ "220501",
14684
+ "220502",
14685
+ "220503",
14686
+ "220600",
14687
+ "220601",
14688
+ "220602",
14689
+ "230000",
14690
+ "230100",
14691
+ "230101",
14692
+ "230200",
14693
+ "230201",
14694
+ "230202",
14695
+ "230203",
14696
+ "230300",
14697
+ "230301",
14698
+ "230400",
14699
+ "230401",
14700
+ "230500",
14701
+ "230501",
14702
+ "230600",
14703
+ "230601",
14704
+ "240000",
14705
+ "240100",
14706
+ "240101",
14707
+ "240102",
14708
+ "240103",
14709
+ "240104",
14710
+ "240105",
14711
+ "240106",
14712
+ "240200",
14713
+ "240201",
14714
+ "240202",
14715
+ "240300",
14716
+ "240301",
14717
+ "240400",
14718
+ "240401",
14719
+ "240402",
14720
+ "240403",
14721
+ "240404",
14722
+ "250000",
14723
+ "250100",
14724
+ "250101",
14725
+ "250102",
14726
+ "250104",
14727
+ "250105",
14728
+ "250106",
14729
+ "250107",
14730
+ "250200",
14731
+ "250201",
14732
+ "250300",
14733
+ "250301",
14734
+ "250302",
14735
+ "250303",
14736
+ "250400",
14737
+ "250401",
14738
+ "250402",
14739
+ "250500",
14740
+ "250501",
14741
+ "250502",
14742
+ "250503",
14743
+ "250504",
14744
+ "250600",
14745
+ "250601",
14746
+ "250602",
14747
+ "250700",
14748
+ "250701",
14749
+ "250702",
14750
+ "250703",
14751
+ "250800",
14752
+ "250801",
14753
+ "250802",
14754
+ "250803",
14755
+ "250900",
14756
+ "250901",
14757
+ "251000",
14758
+ "251001",
14759
+ "260000",
14760
+ "260100",
14761
+ "260101",
14762
+ "260200",
14763
+ "260201",
14764
+ "260300",
14765
+ "260301",
14766
+ "270000",
14767
+ "270100",
14768
+ "270101",
14769
+ "270102",
14770
+ "270103",
14771
+ "270104",
14772
+ "270200",
14773
+ "270201",
14774
+ "270202",
14775
+ "270203",
14776
+ "270204",
14777
+ "270205",
14778
+ "270300",
14779
+ "270301",
14780
+ "270302",
14781
+ "270303",
14782
+ "270304",
14783
+ "280000",
14784
+ "280100",
14785
+ "280101",
14786
+ "280102",
14787
+ "280103",
14788
+ "280104",
14789
+ "280105",
14790
+ "280106",
14791
+ "280200",
14792
+ "280201",
14793
+ "280300",
14794
+ "280301",
14795
+ "280302",
14796
+ "280303",
14797
+ "290000",
14798
+ "290100",
14799
+ "290101",
14800
+ "290102",
14801
+ "290103",
14802
+ "290104",
14803
+ "290200",
14804
+ "290201",
14805
+ "290300",
14806
+ "290301",
14807
+ "290302",
14808
+ "290303",
14809
+ "290400",
14810
+ "290402",
14811
+ "290403",
14812
+ "290500",
14813
+ "290501",
14814
+ "300000",
14815
+ "300100",
14816
+ "300101",
14817
+ "300102",
14818
+ "300103",
14819
+ "300104",
14820
+ "300200",
14821
+ "300201",
14822
+ "300202",
14823
+ "300300",
14824
+ "300301",
14825
+ "310000",
14826
+ "310100",
14827
+ "310101",
14828
+ "310102",
14829
+ "310103",
14830
+ "310104",
14831
+ "310105",
14832
+ "310200",
14833
+ "310201",
14834
+ "310300",
14835
+ "310301",
14836
+ "320000",
14837
+ "320100",
14838
+ "320101",
14839
+ "320102",
14840
+ "320200",
14841
+ "320201",
14842
+ "320300",
14843
+ "320301",
14844
+ "320302",
14845
+ "320400",
14846
+ "320401",
14847
+ "320402",
14848
+ "320500",
14849
+ "320501",
14850
+ "320502",
14851
+ "320600",
14852
+ "320601",
14853
+ "320602",
14854
+ "320603",
14855
+ "320700",
14856
+ "320701",
14857
+ "320702",
14858
+ "320703",
14859
+ ])
14860
+ .optional(),
14861
+ province_code: z
14862
+ .enum([
14863
+ "010000",
14864
+ "010100",
14865
+ "010101",
14866
+ "020000",
14867
+ "020100",
14868
+ "020101",
14869
+ "020102",
14870
+ "020103",
14871
+ "020104",
14872
+ "020105",
14873
+ "020106",
14874
+ "020107",
14875
+ "020108",
14876
+ "020109",
14877
+ "020200",
14878
+ "020201",
14879
+ "020202",
14880
+ "020300",
14881
+ "020301",
14882
+ "020302",
14883
+ "020303",
14884
+ "020400",
14885
+ "020401",
14886
+ "020402",
14887
+ "020403",
14888
+ "020404",
14889
+ "020405",
14890
+ "020500",
14891
+ "020501",
14892
+ "020600",
14893
+ "020601",
14894
+ "020602",
14895
+ "020603",
14896
+ "020604",
14897
+ "020700",
14898
+ "020701",
14899
+ "020702",
14900
+ "020800",
14901
+ "020801",
14902
+ "020802",
14903
+ "020803",
14904
+ "020804",
14905
+ "020900",
14906
+ "020901",
14907
+ "021000",
14908
+ "021001",
14909
+ "030000",
14910
+ "030001",
14911
+ "030101",
14912
+ "030102",
14913
+ "030200",
14914
+ "030201",
14915
+ "030202",
14916
+ "030300",
14917
+ "030301",
14918
+ "030302",
14919
+ "030303",
14920
+ "030304",
14921
+ "030305",
14922
+ "030306",
14923
+ "030307",
14924
+ "030400",
14925
+ "030401",
14926
+ "030500",
14927
+ "030501",
14928
+ "030502",
14929
+ "040000",
14930
+ "040100",
14931
+ "040101",
14932
+ "040102",
14933
+ "040103",
14934
+ "040104",
14935
+ "040200",
14936
+ "040201",
14937
+ "040300",
14938
+ "040301",
14939
+ "040302",
14940
+ "040400",
14941
+ "040401",
14942
+ "040402",
14943
+ "040500",
14944
+ "040501",
14945
+ "040502",
14946
+ "040503",
14947
+ "040504",
14948
+ "040600",
14949
+ "040601",
14950
+ "040700",
14951
+ "040701",
14952
+ "040702",
14953
+ "040800",
14954
+ "040801",
14955
+ "040802",
14956
+ "040900",
14957
+ "040901",
14958
+ "041000",
14959
+ "041001",
14960
+ "041100",
14961
+ "041101",
14962
+ "041102",
14963
+ "050000",
14964
+ "050100",
14965
+ "050101",
14966
+ "050102",
14967
+ "050200",
14968
+ "050201",
14969
+ "050202",
14970
+ "050203",
14971
+ "050300",
14972
+ "050301",
14973
+ "050400",
14974
+ "050401",
14975
+ "050500",
14976
+ "050501",
14977
+ "050502",
14978
+ "060000",
14979
+ "060100",
14980
+ "060101",
14981
+ "060102",
14982
+ "060103",
14983
+ "060104",
14984
+ "060105",
14985
+ "060200",
14986
+ "060201",
14987
+ "060202",
14988
+ "060203",
14989
+ "060300",
14990
+ "060301",
14991
+ "060400",
14992
+ "060401",
14993
+ "060500",
14994
+ "060501",
14995
+ "060502",
14996
+ "060503",
14997
+ "060504",
14998
+ "060505",
14999
+ "060600",
15000
+ "060601",
15001
+ "060700",
15002
+ "060701",
15003
+ "060702",
15004
+ "070000",
15005
+ "070100",
15006
+ "070101",
15007
+ "070102",
15008
+ "070103",
15009
+ "070200",
15010
+ "070201",
15011
+ "070202",
15012
+ "070203",
15013
+ "070300",
15014
+ "070301",
15015
+ "070302",
15016
+ "070400",
15017
+ "070401",
15018
+ "070402",
15019
+ "070500",
15020
+ "070501",
15021
+ "070502",
15022
+ "070600",
15023
+ "070601",
15024
+ "080000",
15025
+ "080100",
15026
+ "080101",
15027
+ "080102",
15028
+ "080103",
15029
+ "080104",
15030
+ "080200",
15031
+ "080201",
15032
+ "080202",
15033
+ "080203",
15034
+ "090000",
15035
+ "090100",
15036
+ "090101",
15037
+ "090102",
15038
+ "090103",
15039
+ "090104",
15040
+ "090105",
15041
+ "090106",
15042
+ "090107",
15043
+ "090108",
15044
+ "090109",
15045
+ "090200",
15046
+ "090201",
15047
+ "090300",
15048
+ "090301",
15049
+ "090302",
15050
+ "090303",
15051
+ "090304",
15052
+ "090400",
15053
+ "090401",
15054
+ "100000",
15055
+ "100100",
15056
+ "100101",
15057
+ "100102",
15058
+ "100103",
15059
+ "100200",
15060
+ "100201",
15061
+ "100202",
15062
+ "100300",
15063
+ "100301",
15064
+ "100400",
15065
+ "100401",
15066
+ "100402",
15067
+ "100500",
15068
+ "100501",
15069
+ "100502",
15070
+ "100600",
15071
+ "100601",
15072
+ "100602",
15073
+ "110000",
15074
+ "110100",
15075
+ "110101",
15076
+ "110102",
15077
+ "110103",
15078
+ "110104",
15079
+ "110200",
15080
+ "110201",
15081
+ "110202",
15082
+ "110203",
15083
+ "120000",
15084
+ "120100",
15085
+ "120101",
15086
+ "120102",
15087
+ "120200",
15088
+ "120201",
15089
+ "120300",
15090
+ "120301",
15091
+ "120302",
15092
+ "130000",
15093
+ "130100",
15094
+ "130101",
15095
+ "130102",
15096
+ "130103",
15097
+ "130104",
15098
+ "130105",
15099
+ "130200",
15100
+ "130201",
15101
+ "130202",
15102
+ "130203",
15103
+ "130300",
15104
+ "130301",
15105
+ "130302",
15106
+ "130303",
15107
+ "130400",
15108
+ "130401",
15109
+ "130402",
15110
+ "140000",
15111
+ "140100",
15112
+ "140101",
15113
+ "140102",
15114
+ "140103",
15115
+ "140104",
15116
+ "140200",
15117
+ "140201",
15118
+ "140202",
15119
+ "140203",
15120
+ "140300",
15121
+ "140301",
15122
+ "140302",
15123
+ "140400",
15124
+ "140401",
15125
+ "150000",
15126
+ "150100",
15127
+ "150101",
15128
+ "150200",
15129
+ "150201",
15130
+ "150202",
15131
+ "150300",
15132
+ "150301",
15133
+ "150302",
15134
+ "150303",
15135
+ "150304",
15136
+ "150400",
15137
+ "150401",
15138
+ "150500",
15139
+ "150501",
15140
+ "150502",
15141
+ "150600",
15142
+ "150601",
15143
+ "160000",
15144
+ "160100",
15145
+ "160101",
15146
+ "160102",
15147
+ "160200",
15148
+ "160201",
15149
+ "160202",
15150
+ "170000",
15151
+ "170100",
15152
+ "170101",
15153
+ "170102",
15154
+ "170103",
15155
+ "170104",
15156
+ "170105",
15157
+ "170106",
15158
+ "170107",
15159
+ "170108",
15160
+ "170109",
15161
+ "170110",
15162
+ "170200",
15163
+ "170201",
15164
+ "170202",
15165
+ "170203",
15166
+ "170300",
15167
+ "170301",
15168
+ "180000",
15169
+ "180100",
15170
+ "180101",
15171
+ "180102",
15172
+ "180103",
15173
+ "180200",
15174
+ "180201",
15175
+ "180202",
15176
+ "180300",
15177
+ "180301",
15178
+ "180400",
15179
+ "180401",
15180
+ "180500",
15181
+ "180501",
15182
+ "180502",
15183
+ "180600",
15184
+ "180601",
15185
+ "180602",
15186
+ "180603",
15187
+ "180604",
15188
+ "180700",
15189
+ "180701",
15190
+ "180702",
15191
+ "180703",
15192
+ "180800",
15193
+ "180801",
15194
+ "180802",
15195
+ "180803",
15196
+ "180804",
15197
+ "180900",
15198
+ "180901",
15199
+ "190000",
15200
+ "190100",
15201
+ "190101",
15202
+ "190102",
15203
+ "190200",
15204
+ "190201",
15205
+ "190202",
15206
+ "190300",
15207
+ "190301",
15208
+ "200000",
15209
+ "200100",
15210
+ "200101",
15211
+ "200102",
15212
+ "200103",
15213
+ "200104",
15214
+ "200200",
15215
+ "200201",
15216
+ "200300",
15217
+ "200301",
15218
+ "210000",
15219
+ "210100",
15220
+ "210101",
15221
+ "210102",
15222
+ "210103",
15223
+ "210200",
15224
+ "210201",
15225
+ "210300",
15226
+ "210301",
15227
+ "210302",
15228
+ "210303",
15229
+ "210400",
15230
+ "210401",
15231
+ "210402",
15232
+ "210500",
15233
+ "210501",
15234
+ "210502",
15235
+ "210503",
15236
+ "210504",
15237
+ "210600",
15238
+ "210601",
15239
+ "210602",
15240
+ "210700",
15241
+ "210701",
15242
+ "210800",
15243
+ "210801",
15244
+ "220000",
15245
+ "220100",
15246
+ "220101",
15247
+ "220102",
15248
+ "220103",
15249
+ "220104",
15250
+ "220105",
15251
+ "220106",
15252
+ "220107",
15253
+ "220108",
15254
+ "220109",
15255
+ "220110",
15256
+ "220111",
15257
+ "220200",
15258
+ "220201",
15259
+ "220202",
15260
+ "220203",
15261
+ "220300",
15262
+ "220301",
15263
+ "220302",
15264
+ "220303",
15265
+ "220400",
15266
+ "220401",
15267
+ "220402",
15268
+ "220500",
15269
+ "220501",
15270
+ "220502",
15271
+ "220503",
15272
+ "220600",
15273
+ "220601",
15274
+ "220602",
15275
+ "230000",
15276
+ "230100",
15277
+ "230101",
15278
+ "230200",
15279
+ "230201",
15280
+ "230202",
15281
+ "230203",
15282
+ "230300",
15283
+ "230301",
15284
+ "230400",
15285
+ "230401",
15286
+ "230500",
15287
+ "230501",
15288
+ "230600",
15289
+ "230601",
15290
+ "240000",
15291
+ "240100",
15292
+ "240101",
15293
+ "240102",
15294
+ "240103",
15295
+ "240104",
15296
+ "240105",
15297
+ "240106",
15298
+ "240200",
15299
+ "240201",
15300
+ "240202",
15301
+ "240300",
15302
+ "240301",
15303
+ "240400",
15304
+ "240401",
15305
+ "240402",
15306
+ "240403",
15307
+ "240404",
15308
+ "250000",
15309
+ "250100",
15310
+ "250101",
15311
+ "250102",
15312
+ "250104",
15313
+ "250105",
15314
+ "250106",
15315
+ "250107",
15316
+ "250200",
15317
+ "250201",
15318
+ "250300",
15319
+ "250301",
15320
+ "250302",
15321
+ "250303",
15322
+ "250400",
15323
+ "250401",
15324
+ "250402",
15325
+ "250500",
15326
+ "250501",
15327
+ "250502",
15328
+ "250503",
15329
+ "250504",
15330
+ "250600",
15331
+ "250601",
15332
+ "250602",
15333
+ "250700",
15334
+ "250701",
15335
+ "250702",
15336
+ "250703",
15337
+ "250800",
15338
+ "250801",
15339
+ "250802",
15340
+ "250803",
15341
+ "250900",
15342
+ "250901",
15343
+ "251000",
15344
+ "251001",
15345
+ "260000",
15346
+ "260100",
15347
+ "260101",
15348
+ "260200",
15349
+ "260201",
15350
+ "260300",
15351
+ "260301",
15352
+ "270000",
15353
+ "270100",
15354
+ "270101",
15355
+ "270102",
15356
+ "270103",
15357
+ "270104",
15358
+ "270200",
15359
+ "270201",
15360
+ "270202",
15361
+ "270203",
15362
+ "270204",
15363
+ "270205",
15364
+ "270300",
15365
+ "270301",
15366
+ "270302",
15367
+ "270303",
15368
+ "270304",
15369
+ "280000",
15370
+ "280100",
15371
+ "280101",
15372
+ "280102",
15373
+ "280103",
15374
+ "280104",
15375
+ "280105",
15376
+ "280106",
15377
+ "280200",
15378
+ "280201",
15379
+ "280300",
15380
+ "280301",
15381
+ "280302",
15382
+ "280303",
15383
+ "290000",
15384
+ "290100",
15385
+ "290101",
15386
+ "290102",
15387
+ "290103",
15388
+ "290104",
15389
+ "290200",
15390
+ "290201",
15391
+ "290300",
15392
+ "290301",
15393
+ "290302",
15394
+ "290303",
15395
+ "290400",
15396
+ "290402",
15397
+ "290403",
15398
+ "290500",
15399
+ "290501",
15400
+ "300000",
15401
+ "300100",
15402
+ "300101",
15403
+ "300102",
15404
+ "300103",
15405
+ "300104",
15406
+ "300200",
15407
+ "300201",
15408
+ "300202",
15409
+ "300300",
15410
+ "300301",
15411
+ "310000",
15412
+ "310100",
15413
+ "310101",
15414
+ "310102",
15415
+ "310103",
15416
+ "310104",
15417
+ "310105",
15418
+ "310200",
15419
+ "310201",
15420
+ "310300",
15421
+ "310301",
15422
+ "320000",
15423
+ "320100",
15424
+ "320101",
15425
+ "320102",
15426
+ "320200",
15427
+ "320201",
15428
+ "320300",
15429
+ "320301",
15430
+ "320302",
15431
+ "320400",
15432
+ "320401",
15433
+ "320402",
15434
+ "320500",
15435
+ "320501",
15436
+ "320502",
15437
+ "320600",
15438
+ "320601",
15439
+ "320602",
15440
+ "320603",
15441
+ "320700",
15442
+ "320701",
15443
+ "320702",
15444
+ "320703",
15445
+ ])
15446
+ .optional(),
15447
+ purchase_order_number: z
15448
+ .string()
15449
+ .refine((text) => Array.from(text).length >= 1)
15450
+ .refine((text) => Array.from(text).length <= 20)
15451
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
15452
+ .optional(),
15453
+ purchase_order_on: z
15454
+ .string()
15455
+ .regex(/^(?:(?:31-(?:0?[13578]|1[02])|(?:29|30)-(?:0?[13-9]|1[0-2])|(?:0?[1-9]|1[0-9]|2[0-8])-(?:0?[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-0?2-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000))$/)
15456
+ .optional(),
15457
+ tax_id: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
15458
+ }),
15459
+ income_type: z.enum(["01", "02", "03", "04", "05", "06"]),
15460
+ payment_type: z.enum(["1", "2", "3"]),
15461
+ }))
15462
+ .and(z.strictObject({
15463
+ additional_information: zAdditionalDocumentInformation.optional(),
15464
+ deferred_submission: z.enum(["1"]).optional(),
15465
+ discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
15466
+ foreign_currency: zForeignCurrencyIntent.optional(),
15467
+ payment_due_on: z
15468
+ .string()
15469
+ .regex(/^(?:(?:31-(?:0?[13578]|1[02])|(?:29|30)-(?:0?[13-9]|1[0-2])|(?:0?[1-9]|1[0-9]|2[0-8])-(?:0?[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-0?2-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000))$/)
15470
+ .optional(),
15471
+ reference_information: zReferenceInformation.optional(),
15472
+ tax_inclusive_amounts: z.enum(["0", "1"]).optional(),
15473
+ }))
15474
+ .and(z.strictObject({
15475
+ currency: z.enum(["DOP"]),
15476
+ lines: z.array(zType31Line).min(1).max(1000),
15477
+ }));
14741
15478
  /**
14742
15479
  * Factura de Crédito Fiscal Electrónica, code 31.
14743
15480
  */
14744
15481
  export const zType31Intent = z.strictObject({
15482
+ additional_information: zAdditionalDocumentInformation.optional(),
14745
15483
  buyer: zBuyer,
14746
15484
  currency: z.enum(["DOP"]),
14747
15485
  deferred_submission: z.enum(["1"]).optional(),
@@ -15368,7 +16106,10 @@ export const zType31Intent = z.strictObject({
15368
16106
  "320702",
15369
16107
  "320703",
15370
16108
  ]),
15371
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
16109
+ phones: z
16110
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
16111
+ .min(1)
16112
+ .max(3),
15372
16113
  province_code: z.enum([
15373
16114
  "010000",
15374
16115
  "010100",
@@ -15973,7 +16714,8 @@ export const zType31Intent = z.strictObject({
15973
16714
  .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
15974
16715
  .optional(),
15975
16716
  }),
15976
- lines: z.array(zFiscalLineWithLegalTip).min(1).max(1000),
16717
+ lines: z.array(zType31Line).min(1).max(1000),
16718
+ payment_account: zPaymentAccount.optional(),
15977
16719
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
15978
16720
  payment_due_on: z
15979
16721
  .string()
@@ -15999,6 +16741,10 @@ export const zType32Buyer = z.union([
15999
16741
  identity_kind: z.enum(["anonymous"]),
16000
16742
  }),
16001
16743
  z.strictObject({
16744
+ delivery_phone: z
16745
+ .string()
16746
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
16747
+ .optional(),
16002
16748
  identity_kind: z.enum(["domestic"]),
16003
16749
  legal_name: z
16004
16750
  .string()
@@ -16008,6 +16754,10 @@ export const zType32Buyer = z.union([
16008
16754
  tax_id: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
16009
16755
  }),
16010
16756
  z.strictObject({
16757
+ delivery_phone: z
16758
+ .string()
16759
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
16760
+ .optional(),
16011
16761
  foreign_identifier: z
16012
16762
  .string()
16013
16763
  .refine((text) => Array.from(text).length >= 1)
@@ -16025,6 +16775,7 @@ export const zType32Buyer = z.union([
16025
16775
  * Factura de Consumo Electrónica, code 32.
16026
16776
  */
16027
16777
  export const zType32Intent = z.strictObject({
16778
+ additional_information: zAdditionalDocumentInformation.optional(),
16028
16779
  buyer: zType32Buyer,
16029
16780
  currency: z.enum(["DOP"]),
16030
16781
  deferred_submission: z.enum(["1"]).optional(),
@@ -16651,7 +17402,10 @@ export const zType32Intent = z.strictObject({
16651
17402
  "320702",
16652
17403
  "320703",
16653
17404
  ]),
16654
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
17405
+ phones: z
17406
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
17407
+ .min(1)
17408
+ .max(3),
16655
17409
  province_code: z.enum([
16656
17410
  "010000",
16657
17411
  "010100",
@@ -17257,6 +18011,7 @@ export const zType32Intent = z.strictObject({
17257
18011
  .optional(),
17258
18012
  }),
17259
18013
  lines: z.array(zFiscalLineWithLegalTip).min(1).max(1000),
18014
+ payment_account: zPaymentAccount.optional(),
17260
18015
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
17261
18016
  payment_due_on: z
17262
18017
  .string()
@@ -17274,6 +18029,7 @@ export const zType32Intent = z.strictObject({
17274
18029
  * Nota de Débito Electrónica, code 33.
17275
18030
  */
17276
18031
  export const zType33Intent = z.strictObject({
18032
+ additional_information: zAdditionalDocumentInformation.optional(),
17277
18033
  affected_document: z.strictObject({
17278
18034
  attribution: zAffectedFiscalDocumentAttribution,
17279
18035
  consumer_invoice_total: z
@@ -17917,7 +18673,10 @@ export const zType33Intent = z.strictObject({
17917
18673
  "320702",
17918
18674
  "320703",
17919
18675
  ]),
17920
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
18676
+ phones: z
18677
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
18678
+ .min(1)
18679
+ .max(3),
17921
18680
  province_code: z.enum([
17922
18681
  "010000",
17923
18682
  "010100",
@@ -18523,6 +19282,7 @@ export const zType33Intent = z.strictObject({
18523
19282
  .optional(),
18524
19283
  }),
18525
19284
  lines: z.array(zFiscalLineWithLegalTip).min(1).max(10000),
19285
+ payment_account: zPaymentAccount.optional(),
18526
19286
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
18527
19287
  payment_due_on: z
18528
19288
  .string()
@@ -18539,6 +19299,7 @@ export const zType33Intent = z.strictObject({
18539
19299
  * Nota de Crédito Electrónica, code 34.
18540
19300
  */
18541
19301
  export const zType34Intent = z.strictObject({
19302
+ additional_information: zAdditionalDocumentInformation.optional(),
18542
19303
  affected_document: z.strictObject({
18543
19304
  attribution: zAffectedFiscalDocumentAttribution,
18544
19305
  consumer_invoice_total: z
@@ -19182,7 +19943,10 @@ export const zType34Intent = z.strictObject({
19182
19943
  "320702",
19183
19944
  "320703",
19184
19945
  ]),
19185
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
19946
+ phones: z
19947
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
19948
+ .min(1)
19949
+ .max(3),
19186
19950
  province_code: z.enum([
19187
19951
  "010000",
19188
19952
  "010100",
@@ -19816,6 +20580,12 @@ export const zType41LineWithholding = z.strictObject({
19816
20580
  * One Type 41 line with the mandatory official withholding section.
19817
20581
  */
19818
20582
  export const zType41Line = z.strictObject({
20583
+ adjustments: z
20584
+ .strictObject({
20585
+ discounts: z.array(zLinePriceAdjustment).min(0).max(12).optional(),
20586
+ surcharges: z.array(zLinePriceAdjustment).min(0).max(12).optional(),
20587
+ })
20588
+ .optional(),
19819
20589
  billing_indicator: z.enum(["1", "2", "3", "4"]),
19820
20590
  goods_or_service_indicator: z.enum(["1", "2"]),
19821
20591
  item_codes: z.array(zFiscalItemCode).min(0).max(5).optional(),
@@ -20466,7 +21236,10 @@ export const zType43Intent = z.strictObject({
20466
21236
  "320702",
20467
21237
  "320703",
20468
21238
  ]),
20469
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
21239
+ phones: z
21240
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
21241
+ .min(1)
21242
+ .max(3),
20470
21243
  province_code: z.enum([
20471
21244
  "010000",
20472
21245
  "010100",
@@ -21071,8 +21844,13 @@ export const zType43Intent = z.strictObject({
21071
21844
  * Comprobante Electrónico para Regímenes Especiales, code 44.
21072
21845
  */
21073
21846
  export const zType44Intent = z.strictObject({
21847
+ additional_information: zAdditionalDocumentInformation.optional(),
21074
21848
  buyer: z.union([
21075
21849
  z.strictObject({
21850
+ delivery_phone: z
21851
+ .string()
21852
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
21853
+ .optional(),
21076
21854
  identity_kind: z.enum(["domestic"]),
21077
21855
  legal_name: z
21078
21856
  .string()
@@ -21082,6 +21860,10 @@ export const zType44Intent = z.strictObject({
21082
21860
  tax_id: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
21083
21861
  }),
21084
21862
  z.strictObject({
21863
+ delivery_phone: z
21864
+ .string()
21865
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
21866
+ .optional(),
21085
21867
  foreign_identifier: z
21086
21868
  .string()
21087
21869
  .refine((text) => Array.from(text).length >= 1)
@@ -21721,7 +22503,10 @@ export const zType44Intent = z.strictObject({
21721
22503
  "320702",
21722
22504
  "320703",
21723
22505
  ]),
21724
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
22506
+ phones: z
22507
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
22508
+ .min(1)
22509
+ .max(3),
21725
22510
  province_code: z.enum([
21726
22511
  "010000",
21727
22512
  "010100",
@@ -22327,6 +23112,7 @@ export const zType44Intent = z.strictObject({
22327
23112
  .optional(),
22328
23113
  }),
22329
23114
  lines: z.array(zSpecialRegimeLine).min(1).max(1000),
23115
+ payment_account: zPaymentAccount.optional(),
22330
23116
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
22331
23117
  payment_due_on: z
22332
23118
  .string()
@@ -22344,6 +23130,7 @@ export const zType44Intent = z.strictObject({
22344
23130
  * Comprobante Electrónico Gubernamental, code 45.
22345
23131
  */
22346
23132
  export const zType45Intent = z.strictObject({
23133
+ additional_information: zGovernmentAdditionalDocumentInformation.optional(),
22347
23134
  currency: z.enum(["DOP"]),
22348
23135
  deferred_submission: z.enum(["1"]).optional(),
22349
23136
  discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
@@ -22971,7 +23758,10 @@ export const zType45Intent = z.strictObject({
22971
23758
  "320702",
22972
23759
  "320703",
22973
23760
  ]),
22974
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
23761
+ phones: z
23762
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
23763
+ .min(1)
23764
+ .max(3),
22975
23765
  province_code: z.enum([
22976
23766
  "010000",
22977
23767
  "010100",
@@ -23577,6 +24367,7 @@ export const zType45Intent = z.strictObject({
23577
24367
  .optional(),
23578
24368
  }),
23579
24369
  lines: z.array(zFiscalLineWithLegalTip).min(1).max(1000),
24370
+ payment_account: zPaymentAccount.optional(),
23580
24371
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
23581
24372
  payment_due_on: z
23582
24373
  .string()
@@ -23590,10 +24381,61 @@ export const zType45Intent = z.strictObject({
23590
24381
  .regex(/^(?:(?:31-(?:0[13578]|1[02])|(?:29|30)-(?:0[13-9]|1[0-2])|(?:0[1-9]|1[0-9]|2[0-8])-(?:0[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-02-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000)) (?:[0-9]|[01][0-9]|2[0-3]):(?:[0-9]|[0-5][0-9]):(?:[0-9]|[0-5][0-9])$/),
23591
24382
  tax_inclusive_amounts: z.enum(["0", "1"]).optional(),
23592
24383
  });
24384
+ /**
24385
+ * A Type 46 line with its profile-permitted line-level discounts and surcharges.
24386
+ */
24387
+ export const zType46Line = z.strictObject({
24388
+ adjustments: z
24389
+ .strictObject({
24390
+ discounts: z.array(zLinePriceAdjustment).min(0).max(12).optional(),
24391
+ surcharges: z.array(zLinePriceAdjustment).min(0).max(12).optional(),
24392
+ })
24393
+ .optional(),
24394
+ billing_indicator: z.enum(["0", "1", "2", "3", "4"]),
24395
+ goods_or_service_indicator: z.enum(["1", "2"]),
24396
+ item_codes: z.array(zFiscalItemCode).min(0).max(5).optional(),
24397
+ measurement_unit: z.string().regex(/^([1-9]|[1-5][0-9]|6[0-2])$/),
24398
+ name: z
24399
+ .string()
24400
+ .refine((text) => Array.from(text).length >= 1)
24401
+ .refine((text) => Array.from(text).length <= 80)
24402
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
24403
+ quantity: z.string().regex(/^(?=[0-9.]*[1-9])[0-9]{1,16}(\.[0-9]{1,2})?$/),
24404
+ source_line_id: z
24405
+ .string()
24406
+ .refine((text) => Array.from(text).length >= 1)
24407
+ .refine((text) => Array.from(text).length <= 128)
24408
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
24409
+ unit_price: z.string().regex(/^[0-9]{1,16}(\.[0-9]{1,4})?$/),
24410
+ });
24411
+ export const zSourceType46Snapshot = zOptionalPaymentAllocations
24412
+ .and(z.strictObject({
24413
+ export_customer: zExportCustomer,
24414
+ export_eligibility: zCallerDeclaredExportEligibility,
24415
+ income_type: z.enum(["01", "02", "03", "04", "05", "06"]),
24416
+ payment_type: z.enum(["1", "2", "3"]),
24417
+ }))
24418
+ .and(z.strictObject({
24419
+ additional_information: zAdditionalDocumentInformation.optional(),
24420
+ deferred_submission: z.enum(["1"]).optional(),
24421
+ discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
24422
+ foreign_currency: zForeignCurrencyIntent.optional(),
24423
+ payment_due_on: z
24424
+ .string()
24425
+ .regex(/^(?:(?:31-(?:0?[13578]|1[02])|(?:29|30)-(?:0?[13-9]|1[0-2])|(?:0?[1-9]|1[0-9]|2[0-8])-(?:0?[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-0?2-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000))$/)
24426
+ .optional(),
24427
+ reference_information: zReferenceInformation.optional(),
24428
+ tax_inclusive_amounts: z.enum(["0", "1"]).optional(),
24429
+ }))
24430
+ .and(z.strictObject({
24431
+ currency: z.enum(["DOP"]),
24432
+ lines: z.array(zType46Line).min(1).max(1000),
24433
+ }));
23593
24434
  /**
23594
24435
  * Comprobante para Exportaciones Electrónico, code 46.
23595
24436
  */
23596
24437
  export const zType46Intent = z.strictObject({
24438
+ additional_information: zAdditionalDocumentInformation.optional(),
23597
24439
  currency: z.enum(["DOP"]),
23598
24440
  deferred_submission: z.enum(["1"]).optional(),
23599
24441
  discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
@@ -24221,7 +25063,10 @@ export const zType46Intent = z.strictObject({
24221
25063
  "320702",
24222
25064
  "320703",
24223
25065
  ]),
24224
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
25066
+ phones: z
25067
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
25068
+ .min(1)
25069
+ .max(3),
24225
25070
  province_code: z.enum([
24226
25071
  "010000",
24227
25072
  "010100",
@@ -24826,7 +25671,8 @@ export const zType46Intent = z.strictObject({
24826
25671
  .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
24827
25672
  .optional(),
24828
25673
  }),
24829
- lines: z.array(zFiscalLine).min(1).max(1000),
25674
+ lines: z.array(zType46Line).min(1).max(1000),
25675
+ payment_account: zPaymentAccount.optional(),
24830
25676
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
24831
25677
  payment_due_on: z
24832
25678
  .string()
@@ -25473,7 +26319,10 @@ export const zType47Intent = z.strictObject({
25473
26319
  "320702",
25474
26320
  "320703",
25475
26321
  ]),
25476
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
26322
+ phones: z
26323
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
26324
+ .min(1)
26325
+ .max(3),
25477
26326
  province_code: z.enum([
25478
26327
  "010000",
25479
26328
  "010100",
@@ -26067,6 +26916,7 @@ export const zType47Intent = z.strictObject({
26067
26916
  .optional(),
26068
26917
  }),
26069
26918
  lines: z.array(zForeignPaymentLine).min(1).max(1000),
26919
+ payment_account: zPaymentAccount.optional(),
26070
26920
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
26071
26921
  payment_due_on: z
26072
26922
  .string()
@@ -27292,6 +28142,7 @@ export const zSourceType41Snapshot = zOptionalPaymentAllocations
27292
28142
  supplier: zUnregisteredSupplier,
27293
28143
  }))
27294
28144
  .and(z.strictObject({
28145
+ additional_information: zAdditionalDocumentInformation.optional(),
27295
28146
  deferred_submission: z.enum(["1"]).optional(),
27296
28147
  discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
27297
28148
  foreign_currency: zForeignCurrencyIntent.optional(),
@@ -27387,6 +28238,7 @@ export const zFiscalOperationSubmission = z.union([
27387
28238
  * Comprobante Electrónico de Compras, code 41.
27388
28239
  */
27389
28240
  export const zType41Intent = z.strictObject({
28241
+ additional_information: zAdditionalDocumentInformation.optional(),
27390
28242
  currency: z.enum(["DOP"]),
27391
28243
  deferred_submission: z.enum(["1"]).optional(),
27392
28244
  discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
@@ -28017,7 +28869,10 @@ export const zType41Intent = z.strictObject({
28017
28869
  "320702",
28018
28870
  "320703",
28019
28871
  ]),
28020
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
28872
+ phones: z
28873
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
28874
+ .min(1)
28875
+ .max(3),
28021
28876
  province_code: z.enum([
28022
28877
  "010000",
28023
28878
  "010100",
@@ -28611,6 +29466,7 @@ export const zType41Intent = z.strictObject({
28611
29466
  .optional(),
28612
29467
  }),
28613
29468
  lines: z.array(zType41Line).min(1).max(1000),
29469
+ payment_account: zPaymentAccount.optional(),
28614
29470
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
28615
29471
  payment_due_on: z
28616
29472
  .string()
@@ -29459,6 +30315,42 @@ export const zCreateHostedTenantWebhookSecretRotationPath = z.object({
29459
30315
  * The rotation this Idempotency-Key already made.
29460
30316
  */
29461
30317
  export const zCreateHostedTenantWebhookSecretRotationResponse = zHostedWebhookSecretRotation;
30318
+ export const zUploadHostedCertificationTestSetBody = zCertificationTestSetUploadRequest;
30319
+ export const zUploadHostedCertificationTestSetHeaders = z.object({
30320
+ "Idempotency-Key": z
30321
+ .string()
30322
+ .refine((text) => Array.from(text).length >= 16)
30323
+ .refine((text) => Array.from(text).length <= 255)
30324
+ .regex(/^[A-Za-z0-9._:-]+$/),
30325
+ });
30326
+ export const zUploadHostedCertificationTestSetPath = z.object({
30327
+ attemptReference: z.string().regex(/^cert_[a-z0-9]{24,100}$/),
30328
+ });
30329
+ export const zUploadHostedCertificationTestSetQuery = z.object({
30330
+ checkout_tenant_id: z
30331
+ .string()
30332
+ .refine((text) => Array.from(text).length >= 1)
30333
+ .optional(),
30334
+ environment: zFiscalEnvironment.optional(),
30335
+ });
30336
+ /**
30337
+ * The original upload recovered by its idempotency key.
30338
+ */
30339
+ export const zUploadHostedCertificationTestSetResponse = zCertificationTestSetResource;
30340
+ export const zRetrieveHostedCertificationTestSetPath = z.object({
30341
+ attemptReference: z.string().regex(/^cert_[a-z0-9]{24,100}$/),
30342
+ });
30343
+ export const zRetrieveHostedCertificationTestSetQuery = z.object({
30344
+ checkout_tenant_id: z
30345
+ .string()
30346
+ .refine((text) => Array.from(text).length >= 1)
30347
+ .optional(),
30348
+ environment: zFiscalEnvironment.optional(),
30349
+ });
30350
+ /**
30351
+ * The latest retained workbook, or null when no set was uploaded.
30352
+ */
30353
+ export const zRetrieveHostedCertificationTestSetResponse = zCurrentCertificationTestSet;
29462
30354
  export const zListHostedInvoicesQuery = z.object({
29463
30355
  cursor: z
29464
30356
  .string()