@timbro/invoices 0.12.0 → 0.14.0-next.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 (56) hide show
  1. package/README.md +27 -1
  2. package/dist/admin.d.ts +1 -0
  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 +121 -116
  9. package/dist/fiscal-engine-runtime.provenance.json +198 -193
  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 +13 -1
  17. package/dist/generated/hosted/sdk.gen.d.ts.map +1 -1
  18. package/dist/generated/hosted/sdk.gen.js +165 -1
  19. package/dist/generated/hosted/types.gen.d.ts +308 -6
  20. package/dist/generated/hosted/types.gen.d.ts.map +1 -1
  21. package/dist/generated/hosted/zod-response.gen.d.ts +322 -20
  22. package/dist/generated/hosted/zod-response.gen.d.ts.map +1 -1
  23. package/dist/generated/hosted/zod-response.gen.js +113 -5
  24. package/dist/generated/hosted/zod.gen.d.ts +221 -5
  25. package/dist/generated/hosted/zod.gen.d.ts.map +1 -1
  26. package/dist/generated/hosted/zod.gen.js +133 -5
  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 +1346 -106
  31. package/dist/generated/invoice-api-contract.d.ts.map +1 -1
  32. package/dist/generated/invoice-api-contract.js +1756 -164
  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 +544 -55
  39. package/dist/generated/types.gen.d.ts.map +1 -1
  40. package/dist/generated/zod-response.gen.d.ts +20971 -3786
  41. package/dist/generated/zod-response.gen.d.ts.map +1 -1
  42. package/dist/generated/zod-response.gen.js +228 -6
  43. package/dist/generated/zod.gen.d.ts +17521 -2762
  44. package/dist/generated/zod.gen.d.ts.map +1 -1
  45. package/dist/generated/zod.gen.js +2328 -1438
  46. package/dist/generated-operation-client.d.ts +2 -2
  47. package/dist/generated-operation-client.d.ts.map +1 -1
  48. package/dist/index.d.ts +2 -1
  49. package/dist/index.d.ts.map +1 -1
  50. package/dist/invoice-hosted-controls.d.ts +11 -2
  51. package/dist/invoice-hosted-controls.d.ts.map +1 -1
  52. package/dist/invoice-hosted-controls.js +26 -1
  53. package/dist/problem-contract.d.ts +3 -1
  54. package/dist/problem-contract.d.ts.map +1 -1
  55. package/dist/timbro_fiscal_engine_bg.wasm +0 -0
  56. package/package.json +2 -2
@@ -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
  */
@@ -3367,7 +3389,7 @@ export const zFiscalLineWithLegalTip = z.strictObject({
3367
3389
  /**
3368
3390
  * Provenance strength of a fiscal-number authorization fact.
3369
3391
  */
3370
- export const zFiscalNumberAuthorizationKnowledge = z.enum(["verified", "reported"]);
3392
+ export const zFiscalNumberAuthorizationKnowledge = z.enum(["verified", "reported", "disputed"]);
3371
3393
  /**
3372
3394
  * Origin of a fiscal-number authorization fact.
3373
3395
  */
@@ -3375,6 +3397,7 @@ export const zFiscalNumberAuthorizationSourceKind = z.enum([
3375
3397
  "official_source_manifest",
3376
3398
  "operator_attested",
3377
3399
  "caller_reported",
3400
+ "dgii_response",
3378
3401
  ]);
3379
3402
  /**
3380
3403
  * Lifecycle state of a fiscal-number authorization fact.
@@ -3647,6 +3670,108 @@ export const zIdentityEmailSchema = z
3647
3670
  .refine((text) => Array.from(text).length <= 320)
3648
3671
  .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}$/);
3649
3672
  export const zInvitationStatus = z.enum(["pending", "accepted", "expired"]);
3673
+ export const zInvoiceAdditionalInformation = z.strictObject({
3674
+ referenceNumber: z
3675
+ .string()
3676
+ .refine((text) => Array.from(text).length >= 1)
3677
+ .refine((text) => Array.from(text).length <= 20)
3678
+ .regex(/^[0-9]+$/)
3679
+ .nullish(),
3680
+ shipment: z
3681
+ .strictObject({
3682
+ containerNumber: z
3683
+ .string()
3684
+ .refine((text) => Array.from(text).length >= 1)
3685
+ .refine((text) => Array.from(text).length <= 100)
3686
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
3687
+ .nullish(),
3688
+ deliveryNoteNumber: z
3689
+ .string()
3690
+ .refine((text) => Array.from(text).length >= 1)
3691
+ .refine((text) => Array.from(text).length <= 20)
3692
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
3693
+ .nullish(),
3694
+ driver: z
3695
+ .string()
3696
+ .refine((text) => Array.from(text).length >= 1)
3697
+ .refine((text) => Array.from(text).length <= 20)
3698
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
3699
+ .nullish(),
3700
+ grossWeight: z
3701
+ .string()
3702
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
3703
+ .nullish(),
3704
+ grossWeightUnit: z
3705
+ .string()
3706
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
3707
+ .nullish(),
3708
+ netWeight: z
3709
+ .string()
3710
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
3711
+ .nullish(),
3712
+ netWeightUnit: z
3713
+ .string()
3714
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
3715
+ .nullish(),
3716
+ packageCount: z
3717
+ .string()
3718
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
3719
+ .nullish(),
3720
+ packageUnit: z
3721
+ .string()
3722
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
3723
+ .nullish(),
3724
+ packageVolume: z
3725
+ .string()
3726
+ .regex(/^(?=[0-9.]*[1-9])[0-9]{1,16}(\.[0-9]{1,2})?$/)
3727
+ .nullish(),
3728
+ route: z
3729
+ .string()
3730
+ .refine((text) => Array.from(text).length >= 1)
3731
+ .refine((text) => Array.from(text).length <= 20)
3732
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
3733
+ .nullish(),
3734
+ shipmentDate: z.iso
3735
+ .date()
3736
+ .regex(/^(19|20)[0-9]{2}-[0-9]{2}-[0-9]{2}$/)
3737
+ .nullish(),
3738
+ shipmentNumber: z
3739
+ .string()
3740
+ .refine((text) => Array.from(text).length >= 1)
3741
+ .refine((text) => Array.from(text).length <= 25)
3742
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
3743
+ .nullish(),
3744
+ transportDocumentNumber: z
3745
+ .string()
3746
+ .refine((text) => Array.from(text).length >= 1)
3747
+ .refine((text) => Array.from(text).length <= 20)
3748
+ .regex(/^[0-9]+$/)
3749
+ .nullish(),
3750
+ transportZone: z
3751
+ .string()
3752
+ .refine((text) => Array.from(text).length >= 1)
3753
+ .refine((text) => Array.from(text).length <= 20)
3754
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
3755
+ .nullish(),
3756
+ vehicleFiche: z
3757
+ .string()
3758
+ .refine((text) => Array.from(text).length >= 1)
3759
+ .refine((text) => Array.from(text).length <= 10)
3760
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
3761
+ .nullish(),
3762
+ vehiclePlate: z
3763
+ .string()
3764
+ .refine((text) => Array.from(text).length >= 1)
3765
+ .refine((text) => Array.from(text).length <= 7)
3766
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
3767
+ .nullish(),
3768
+ volumeUnit: z
3769
+ .string()
3770
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
3771
+ .nullish(),
3772
+ })
3773
+ .optional(),
3774
+ });
3650
3775
  export const zInvoiceAffectedDocumentAttribution = z.union([
3651
3776
  z.strictObject({
3652
3777
  invoiceId: z.uuid(),
@@ -3671,6 +3796,10 @@ export const zInvoiceBuyer = z.strictObject({
3671
3796
  .refine((text) => Array.from(text).length <= 100)
3672
3797
  .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
3673
3798
  .nullish(),
3799
+ deliveryPhone: z
3800
+ .string()
3801
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
3802
+ .nullish(),
3674
3803
  email: z
3675
3804
  .string()
3676
3805
  .refine((text) => Array.from(text).length <= 80)
@@ -3710,6 +3839,10 @@ export const zInvoiceBuyerIdentity = z.union([
3710
3839
  kind: z.enum(["anonymous"]),
3711
3840
  }),
3712
3841
  z.strictObject({
3842
+ deliveryPhone: z
3843
+ .string()
3844
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
3845
+ .optional(),
3713
3846
  kind: z.enum(["domestic"]),
3714
3847
  legalName: z
3715
3848
  .string()
@@ -3719,6 +3852,10 @@ export const zInvoiceBuyerIdentity = z.union([
3719
3852
  taxId: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
3720
3853
  }),
3721
3854
  z.strictObject({
3855
+ deliveryPhone: z
3856
+ .string()
3857
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
3858
+ .optional(),
3722
3859
  foreignId: z
3723
3860
  .string()
3724
3861
  .refine((text) => Array.from(text).length >= 1)
@@ -3734,6 +3871,10 @@ export const zInvoiceBuyerIdentity = z.union([
3734
3871
  ]);
3735
3872
  export const zInvoiceConsumerBuyer = z.union([
3736
3873
  z.strictObject({
3874
+ deliveryPhone: z
3875
+ .string()
3876
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
3877
+ .nullish(),
3737
3878
  kind: z.enum(["domestic"]),
3738
3879
  legalName: z
3739
3880
  .string()
@@ -3743,6 +3884,10 @@ export const zInvoiceConsumerBuyer = z.union([
3743
3884
  taxId: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
3744
3885
  }),
3745
3886
  z.strictObject({
3887
+ deliveryPhone: z
3888
+ .string()
3889
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
3890
+ .nullish(),
3746
3891
  foreignId: z
3747
3892
  .string()
3748
3893
  .refine((text) => Array.from(text).length >= 1)
@@ -3827,6 +3972,10 @@ export const zInvoiceExpectedTotals = z.strictObject({
3827
3972
  * ForeignBuyer
3828
3973
  */
3829
3974
  export const zInvoiceExportBuyer = z.strictObject({
3975
+ deliveryPhone: z
3976
+ .string()
3977
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
3978
+ .nullish(),
3830
3979
  foreignId: z
3831
3980
  .string()
3832
3981
  .refine((text) => Array.from(text).length >= 1)
@@ -3929,6 +4078,108 @@ export const zInvoiceForeignPaymentResource = z.strictObject({
3929
4078
  payee: zInvoiceForeignPayee,
3930
4079
  withholdingBasis: zInvoiceForeignPaymentWithholdingBasis,
3931
4080
  });
4081
+ export const zInvoiceGovernmentAdditionalInformation = z.strictObject({
4082
+ referenceNumber: z
4083
+ .string()
4084
+ .refine((text) => Array.from(text).length >= 1)
4085
+ .refine((text) => Array.from(text).length <= 20)
4086
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
4087
+ .nullish(),
4088
+ shipment: z
4089
+ .strictObject({
4090
+ containerNumber: z
4091
+ .string()
4092
+ .refine((text) => Array.from(text).length >= 1)
4093
+ .refine((text) => Array.from(text).length <= 100)
4094
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
4095
+ .nullish(),
4096
+ deliveryNoteNumber: z
4097
+ .string()
4098
+ .refine((text) => Array.from(text).length >= 1)
4099
+ .refine((text) => Array.from(text).length <= 20)
4100
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
4101
+ .nullish(),
4102
+ driver: z
4103
+ .string()
4104
+ .refine((text) => Array.from(text).length >= 1)
4105
+ .refine((text) => Array.from(text).length <= 20)
4106
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
4107
+ .nullish(),
4108
+ grossWeight: z
4109
+ .string()
4110
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
4111
+ .nullish(),
4112
+ grossWeightUnit: z
4113
+ .string()
4114
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
4115
+ .nullish(),
4116
+ netWeight: z
4117
+ .string()
4118
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
4119
+ .nullish(),
4120
+ netWeightUnit: z
4121
+ .string()
4122
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
4123
+ .nullish(),
4124
+ packageCount: z
4125
+ .string()
4126
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
4127
+ .nullish(),
4128
+ packageUnit: z
4129
+ .string()
4130
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
4131
+ .nullish(),
4132
+ packageVolume: z
4133
+ .string()
4134
+ .regex(/^(?=[0-9.]*[1-9])[0-9]{1,16}(\.[0-9]{1,2})?$/)
4135
+ .nullish(),
4136
+ route: z
4137
+ .string()
4138
+ .refine((text) => Array.from(text).length >= 1)
4139
+ .refine((text) => Array.from(text).length <= 20)
4140
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
4141
+ .nullish(),
4142
+ shipmentDate: z.iso
4143
+ .date()
4144
+ .regex(/^(19|20)[0-9]{2}-[0-9]{2}-[0-9]{2}$/)
4145
+ .nullish(),
4146
+ shipmentNumber: z
4147
+ .string()
4148
+ .refine((text) => Array.from(text).length >= 1)
4149
+ .refine((text) => Array.from(text).length <= 25)
4150
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
4151
+ .nullish(),
4152
+ transportDocumentNumber: z
4153
+ .string()
4154
+ .refine((text) => Array.from(text).length >= 1)
4155
+ .refine((text) => Array.from(text).length <= 20)
4156
+ .regex(/^[0-9]+$/)
4157
+ .nullish(),
4158
+ transportZone: z
4159
+ .string()
4160
+ .refine((text) => Array.from(text).length >= 1)
4161
+ .refine((text) => Array.from(text).length <= 20)
4162
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
4163
+ .nullish(),
4164
+ vehicleFiche: z
4165
+ .string()
4166
+ .refine((text) => Array.from(text).length >= 1)
4167
+ .refine((text) => Array.from(text).length <= 10)
4168
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
4169
+ .nullish(),
4170
+ vehiclePlate: z
4171
+ .string()
4172
+ .refine((text) => Array.from(text).length >= 1)
4173
+ .refine((text) => Array.from(text).length <= 7)
4174
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
4175
+ .nullish(),
4176
+ volumeUnit: z
4177
+ .string()
4178
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
4179
+ .nullish(),
4180
+ })
4181
+ .optional(),
4182
+ });
3932
4183
  export const zInvoiceGovernmentEligibility = z.union([
3933
4184
  z.strictObject({
3934
4185
  authorityReference: z
@@ -4039,6 +4290,20 @@ export const zInvoiceLatestEvent = z.strictObject({
4039
4290
  occurredAt: z.iso.datetime(),
4040
4291
  sequence: z.string().regex(/^[1-9][0-9]*$/),
4041
4292
  });
4293
+ export const zInvoiceLinePriceAdjustmentResource = z.union([
4294
+ z.strictObject({
4295
+ amount: z.string().regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/),
4296
+ kind: z.enum(["fixed_amount"]),
4297
+ }),
4298
+ z.strictObject({
4299
+ kind: z.enum(["percentage"]),
4300
+ percentage: z.string().regex(/^(?=[0-9.]*[1-9])[0-9]{1,3}(\.[0-9]{1,2})?$/),
4301
+ }),
4302
+ ]);
4303
+ export const zInvoiceLinePriceAdjustmentsResource = z.strictObject({
4304
+ discounts: z.array(zInvoiceLinePriceAdjustmentResource),
4305
+ surcharges: z.array(zInvoiceLinePriceAdjustmentResource),
4306
+ });
4042
4307
  export const zInvoiceMinorExpensePaymentTerms = z.union([
4043
4308
  z.strictObject({
4044
4309
  type: z.enum(["immediate"]),
@@ -4051,6 +4316,20 @@ export const zInvoiceNumbering = z.strictObject({
4051
4316
  eNcf: z.string().regex(/^E(31|32|33|34|41|43|44|45|46|47)[0-9]{10}$/),
4052
4317
  sequenceExpiresOn: z.string().nullish(),
4053
4318
  });
4319
+ export const zInvoicePaymentAccountResource = z.strictObject({
4320
+ accountNumber: z
4321
+ .string()
4322
+ .refine((text) => Array.from(text).length >= 1)
4323
+ .refine((text) => Array.from(text).length <= 28)
4324
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4325
+ .nullable(),
4326
+ bankName: z
4327
+ .string()
4328
+ .refine((text) => Array.from(text).length >= 1)
4329
+ .refine((text) => Array.from(text).length <= 75)
4330
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4331
+ .nullable(),
4332
+ });
4054
4333
  export const zInvoicePdfLayout = z.enum(["a4", "receipt80mm"]);
4055
4334
  export const zInvoicePdfStage = z.enum([
4056
4335
  "awaitingSignedSource",
@@ -4100,74 +4379,230 @@ export const zInvoiceReceiptAccess = z.strictObject({
4100
4379
  });
4101
4380
  export const zInvoiceReceiptCurrency = z.enum(["DOP"]);
4102
4381
  export const zInvoiceReceiptStatus = z.enum(["accepted", "acceptedWithObservations"]);
4103
- /**
4104
- * The signature facts DGII requires on every printed e-CF, read from the signed document.
4105
- *
4106
- * Print the buyer's copy after DGII accepts the Invoice; DGII sequences the printed e-CF after
4107
- * its validation result, including the Type 32 below DOP 250,000 it validates by RFCE summary.
4108
- */
4109
- export const zInvoiceSignature = z.strictObject({
4110
- securityCode: z.string().regex(/^[A-Za-z0-9+/]{6}$/),
4111
- 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$/),
4112
- verificationUrl: z.url().regex(/^https:\/\/(ecf|fc)\.dgii\.gov\.do\//),
4113
- });
4114
- export const zInvoiceSource = z.strictObject({
4115
- contentSha256: z.string().regex(/^[0-9a-f]{64}$/),
4116
- id: z.string(),
4117
- version: z.string(),
4118
- });
4119
- export const zInvoiceSourceInput = z.strictObject({
4120
- id: z
4121
- .string()
4122
- .refine((text) => Array.from(text).length >= 1)
4123
- .refine((text) => Array.from(text).length <= 128)
4124
- .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
4125
- version: z
4126
- .string()
4127
- .refine((text) => Array.from(text).length >= 1)
4128
- .refine((text) => Array.from(text).length <= 128)
4129
- .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
4130
- });
4131
- export const zInvoiceSpecialRegimeBuyer = z.union([
4132
- z.strictObject({
4133
- kind: z.enum(["domestic"]),
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),
4139
- taxId: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
4140
- }),
4141
- z.strictObject({
4142
- foreignId: z
4143
- .string()
4144
- .refine((text) => Array.from(text).length >= 1)
4145
- .refine((text) => Array.from(text).length <= 20)
4146
- .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
4147
- kind: z.enum(["foreign_diplomat"]),
4148
- legalName: z
4149
- .string()
4150
- .refine((text) => Array.from(text).length >= 1)
4151
- .refine((text) => Array.from(text).length <= 150)
4152
- .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
4153
- }),
4154
- ]);
4155
- export const zInvoiceSpecialRegimeEligibility = z.union([
4382
+ export const zInvoiceReferenceAttributionResource = z.union([
4156
4383
  z.strictObject({
4157
- authorityReference: z
4384
+ fiscalOperationId: z
4158
4385
  .string()
4159
- .refine((text) => Array.from(text).length >= 1)
4160
- .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
4161
- basisKind: z.enum(["special_law"]),
4386
+ .regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),
4387
+ kind: z.enum(["internal_operation"]),
4162
4388
  }),
4163
4389
  z.strictObject({
4164
- authorityReference: z
4390
+ environment: zFiscalEnvironment,
4391
+ issuerTaxId: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
4392
+ kind: z.enum(["external_document"]),
4393
+ sourceReference: z
4165
4394
  .string()
4166
4395
  .refine((text) => Array.from(text).length >= 1)
4396
+ .refine((text) => Array.from(text).length <= 250)
4167
4397
  .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
4168
- basisKind: z.enum(["ratified_contract"]),
4169
4398
  }),
4170
- z.strictObject({
4399
+ ]);
4400
+ export const zInvoiceReferenceInformation = z.strictObject({
4401
+ attribution: z.union([
4402
+ z.strictObject({
4403
+ fiscalOperationId: z
4404
+ .string()
4405
+ .regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),
4406
+ kind: z.enum(["internal_operation"]),
4407
+ }),
4408
+ z.strictObject({
4409
+ environment: zFiscalEnvironment,
4410
+ issuerTaxId: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
4411
+ kind: z.enum(["external_document"]),
4412
+ sourceReference: z
4413
+ .string()
4414
+ .refine((text) => Array.from(text).length >= 1)
4415
+ .refine((text) => Array.from(text).length <= 250)
4416
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
4417
+ }),
4418
+ ]),
4419
+ fiscalNumber: z.string().regex(/^(B[0-9]{10}|E[0-9]{12}|[AP][0-9]{18})$/),
4420
+ issuedOn: z.iso.date().regex(/^(19|20)[0-9]{2}-[0-9]{2}-[0-9]{2}$/),
4421
+ modificationCode: z.enum(["4", "5"]),
4422
+ });
4423
+ export const zInvoiceReferenceInformationResource = z.strictObject({
4424
+ attribution: zInvoiceReferenceAttributionResource,
4425
+ fiscalNumber: z.string().regex(/^(B[0-9]{10}|E[0-9]{12}|[AP][0-9]{18})$/),
4426
+ issuedOn: z
4427
+ .string()
4428
+ .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))$/),
4429
+ modificationCode: z.enum(["4", "5"]),
4430
+ });
4431
+ export const zInvoiceShipmentInformationResource = z.strictObject({
4432
+ containerNumber: z
4433
+ .string()
4434
+ .refine((text) => Array.from(text).length >= 1)
4435
+ .refine((text) => Array.from(text).length <= 100)
4436
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4437
+ .nullable(),
4438
+ deliveryNoteNumber: z
4439
+ .string()
4440
+ .refine((text) => Array.from(text).length >= 1)
4441
+ .refine((text) => Array.from(text).length <= 20)
4442
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4443
+ .nullable(),
4444
+ driver: z
4445
+ .string()
4446
+ .refine((text) => Array.from(text).length >= 1)
4447
+ .refine((text) => Array.from(text).length <= 20)
4448
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4449
+ .nullable(),
4450
+ grossWeight: z
4451
+ .string()
4452
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
4453
+ .nullable(),
4454
+ grossWeightUnit: z
4455
+ .string()
4456
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
4457
+ .nullable(),
4458
+ netWeight: z
4459
+ .string()
4460
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
4461
+ .nullable(),
4462
+ netWeightUnit: z
4463
+ .string()
4464
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
4465
+ .nullable(),
4466
+ packageCount: z
4467
+ .string()
4468
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
4469
+ .nullable(),
4470
+ packageUnit: z
4471
+ .string()
4472
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
4473
+ .nullable(),
4474
+ packageVolume: z
4475
+ .string()
4476
+ .regex(/^(?=[0-9.]*[1-9])[0-9]{1,16}(\.[0-9]{1,2})?$/)
4477
+ .nullable(),
4478
+ route: z
4479
+ .string()
4480
+ .refine((text) => Array.from(text).length >= 1)
4481
+ .refine((text) => Array.from(text).length <= 20)
4482
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4483
+ .nullable(),
4484
+ shipmentDate: z
4485
+ .string()
4486
+ .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))$/)
4487
+ .nullable(),
4488
+ shipmentNumber: z
4489
+ .string()
4490
+ .refine((text) => Array.from(text).length >= 1)
4491
+ .refine((text) => Array.from(text).length <= 25)
4492
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4493
+ .nullable(),
4494
+ transportDocumentNumber: z
4495
+ .string()
4496
+ .refine((text) => Array.from(text).length >= 1)
4497
+ .refine((text) => Array.from(text).length <= 20)
4498
+ .regex(/^[0-9]+$/)
4499
+ .nullable(),
4500
+ transportZone: z
4501
+ .string()
4502
+ .refine((text) => Array.from(text).length >= 1)
4503
+ .refine((text) => Array.from(text).length <= 20)
4504
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4505
+ .nullable(),
4506
+ vehicleFiche: z
4507
+ .string()
4508
+ .refine((text) => Array.from(text).length >= 1)
4509
+ .refine((text) => Array.from(text).length <= 10)
4510
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4511
+ .nullable(),
4512
+ vehiclePlate: z
4513
+ .string()
4514
+ .refine((text) => Array.from(text).length >= 1)
4515
+ .refine((text) => Array.from(text).length <= 7)
4516
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4517
+ .nullable(),
4518
+ volumeUnit: z
4519
+ .string()
4520
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
4521
+ .nullable(),
4522
+ });
4523
+ export const zInvoiceAdditionalInformationResource = z.strictObject({
4524
+ referenceNumber: z
4525
+ .string()
4526
+ .refine((text) => Array.from(text).length <= 20)
4527
+ .nullable(),
4528
+ shipment: zInvoiceShipmentInformationResource.nullable(),
4529
+ });
4530
+ /**
4531
+ * The signature facts DGII requires on every printed e-CF, read from the signed document.
4532
+ *
4533
+ * Print the buyer's copy after DGII accepts the Invoice; DGII sequences the printed e-CF after
4534
+ * its validation result, including the Type 32 below DOP 250,000 it validates by RFCE summary.
4535
+ */
4536
+ export const zInvoiceSignature = z.strictObject({
4537
+ securityCode: z.string().regex(/^[A-Za-z0-9+/]{6}$/),
4538
+ 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$/),
4539
+ verificationUrl: z.url().regex(/^https:\/\/(ecf|fc)\.dgii\.gov\.do\//),
4540
+ });
4541
+ export const zInvoiceSource = z.strictObject({
4542
+ contentSha256: z.string().regex(/^[0-9a-f]{64}$/),
4543
+ id: z.string(),
4544
+ version: z.string(),
4545
+ });
4546
+ export const zInvoiceSourceInput = z.strictObject({
4547
+ id: z
4548
+ .string()
4549
+ .refine((text) => Array.from(text).length >= 1)
4550
+ .refine((text) => Array.from(text).length <= 128)
4551
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
4552
+ version: z
4553
+ .string()
4554
+ .refine((text) => Array.from(text).length >= 1)
4555
+ .refine((text) => Array.from(text).length <= 128)
4556
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
4557
+ });
4558
+ export const zInvoiceSpecialRegimeBuyer = z.union([
4559
+ z.strictObject({
4560
+ deliveryPhone: z
4561
+ .string()
4562
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
4563
+ .nullish(),
4564
+ kind: z.enum(["domestic"]),
4565
+ legalName: z
4566
+ .string()
4567
+ .refine((text) => Array.from(text).length >= 1)
4568
+ .refine((text) => Array.from(text).length <= 150)
4569
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
4570
+ taxId: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
4571
+ }),
4572
+ z.strictObject({
4573
+ deliveryPhone: z
4574
+ .string()
4575
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
4576
+ .nullish(),
4577
+ foreignId: z
4578
+ .string()
4579
+ .refine((text) => Array.from(text).length >= 1)
4580
+ .refine((text) => Array.from(text).length <= 20)
4581
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
4582
+ kind: z.enum(["foreign_diplomat"]),
4583
+ legalName: z
4584
+ .string()
4585
+ .refine((text) => Array.from(text).length >= 1)
4586
+ .refine((text) => Array.from(text).length <= 150)
4587
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
4588
+ }),
4589
+ ]);
4590
+ export const zInvoiceSpecialRegimeEligibility = z.union([
4591
+ z.strictObject({
4592
+ authorityReference: z
4593
+ .string()
4594
+ .refine((text) => Array.from(text).length >= 1)
4595
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
4596
+ basisKind: z.enum(["special_law"]),
4597
+ }),
4598
+ z.strictObject({
4599
+ authorityReference: z
4600
+ .string()
4601
+ .refine((text) => Array.from(text).length >= 1)
4602
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
4603
+ basisKind: z.enum(["ratified_contract"]),
4604
+ }),
4605
+ z.strictObject({
4171
4606
  authorityReference: z
4172
4607
  .string()
4173
4608
  .refine((text) => Array.from(text).length >= 1)
@@ -5514,7 +5949,7 @@ export const zIssuanceBlocker = z.enum([
5514
5949
  "authorization_exhausted",
5515
5950
  "authorization_conflicting",
5516
5951
  "authorization_document_type_mismatch",
5517
- "central_assignment_requires_verified_authorization",
5952
+ "sequence_rejected_by_dgii",
5518
5953
  "authorization_expired",
5519
5954
  "authorization_range_overlap",
5520
5955
  "fiscal_number_capacity_exhausted",
@@ -5530,7 +5965,7 @@ export const zIssuanceReadinessReason = z.enum([
5530
5965
  "signing_certificate_not_yet_valid",
5531
5966
  "authorization_missing",
5532
5967
  "authorization_not_active",
5533
- "authorization_not_verified",
5968
+ "sequence_rejected_by_dgii",
5534
5969
  "authorization_not_observed",
5535
5970
  "range_exhausted",
5536
5971
  "authorization_expiration_invalid",
@@ -5699,6 +6134,26 @@ export const zLegalIssuerPage = z.strictObject({
5699
6134
  export const zLegalIssuerResource = z.strictObject({
5700
6135
  legal_issuer: zLegalIssuer,
5701
6136
  });
6137
+ /**
6138
+ * One fixed-amount or percentage discount or surcharge on a fiscal line.
6139
+ */
6140
+ export const zLinePriceAdjustment = z.union([
6141
+ z.strictObject({
6142
+ amount: z.string().regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/),
6143
+ kind: z.enum(["fixed_amount"]),
6144
+ }),
6145
+ z.strictObject({
6146
+ kind: z.enum(["percentage"]),
6147
+ percentage: z.string().regex(/^(?=[0-9.]*[1-9])[0-9]{1,3}(\.[0-9]{1,2})?$/),
6148
+ }),
6149
+ ]);
6150
+ /**
6151
+ * Line-level discounts and surcharges, kept separate from document-level adjustments.
6152
+ */
6153
+ export const zLinePriceAdjustments = z.strictObject({
6154
+ discounts: z.array(zLinePriceAdjustment).min(0).max(12).optional(),
6155
+ surcharges: z.array(zLinePriceAdjustment).min(0).max(12).optional(),
6156
+ });
5702
6157
  export const zMembershipRole = z.enum(["administrator", "operator"]);
5703
6158
  export const zAcceptedMembership = z.strictObject({
5704
6159
  organization_id: z.uuid(),
@@ -5765,10 +6220,16 @@ export const zNumberedFiscalDocument = z.strictObject({
5765
6220
  fiscal_number: z.string().regex(/^E(31|32|33|34|41|43|44|45|46|47)[0-9]{10}$/),
5766
6221
  sequence_expires_on: z.string().nullable(),
5767
6222
  });
6223
+ /**
6224
+ * Whether DGII has accepted an e-CF numbered from the range Timbro would assign from. Either way
6225
+ * the range is issuable.
6226
+ */
6227
+ export const zNumberingConfirmation = z.enum(["confirmed", "not_yet_confirmed"]);
5768
6228
  /**
5769
6229
  * The range Timbro assigns the next fiscal number of this type from.
5770
6230
  */
5771
6231
  export const zNumberingRange = z.strictObject({
6232
+ confirmation: zNumberingConfirmation,
5772
6233
  expiresOn: z.iso.date().nullable(),
5773
6234
  remaining: z.int().gte(1).lte(9999999999),
5774
6235
  });
@@ -5852,6 +6313,23 @@ export const zOrganizationIdentity = z.strictObject({
5852
6313
  export const zOrganizationResource = z.strictObject({
5853
6314
  organization: zOrganizationIdentity,
5854
6315
  });
6316
+ /**
6317
+ * Bank details that accompany an optional payment method table.
6318
+ */
6319
+ export const zPaymentAccount = z.strictObject({
6320
+ account_number: z
6321
+ .string()
6322
+ .refine((text) => Array.from(text).length >= 1)
6323
+ .refine((text) => Array.from(text).length <= 28)
6324
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
6325
+ .optional(),
6326
+ bank_name: z
6327
+ .string()
6328
+ .refine((text) => Array.from(text).length >= 1)
6329
+ .refine((text) => Array.from(text).length <= 75)
6330
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
6331
+ .optional(),
6332
+ });
5855
6333
  /**
5856
6334
  * One authoritative payment-method and amount pair from `TablaFormasPago`.
5857
6335
  */
@@ -5863,6 +6341,7 @@ export const zPaymentAllocation = z.strictObject({
5863
6341
  * An optional payment table for profiles whose official schema permits its omission.
5864
6342
  */
5865
6343
  export const zOptionalPaymentAllocations = z.strictObject({
6344
+ payment_account: zPaymentAccount.optional(),
5866
6345
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
5867
6346
  });
5868
6347
  export const zPrintedRepresentationA4ProfileVersion = z.enum(["a4.v1"]);
@@ -6101,6 +6580,8 @@ export const zPublicProblemCode = z.enum([
6101
6580
  "request_body_timeout",
6102
6581
  "malformed_json",
6103
6582
  "invalid_request",
6583
+ "certification_environment_required",
6584
+ "certification_test_set_invalid",
6104
6585
  "invalid_collection_query",
6105
6586
  "invalid_collection_cursor",
6106
6587
  "document_type_not_enabled",
@@ -6264,6 +6745,11 @@ export const zReferenceInformation = z.strictObject({
6264
6745
  .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))$/),
6265
6746
  modification_code: z.enum(["4", "5"]),
6266
6747
  });
6748
+ /**
6749
+ * The sequence a business records. Timbro, not the caller, decides how far DGII has confirmed it:
6750
+ * a recorded sequence is reported until DGII accepts an e-CF numbered from it. `knowledge` and
6751
+ * `source_kind` are deprecated, accepted so an older caller keeps working, and never trusted.
6752
+ */
6267
6753
  export const zRegisterFiscalNumberAuthorizationRequest = z.strictObject({
6268
6754
  document_type: zElectronicFiscalDocumentType,
6269
6755
  ends_at: zLedgerCounter,
@@ -6273,7 +6759,7 @@ export const zRegisterFiscalNumberAuthorizationRequest = z.strictObject({
6273
6759
  .string()
6274
6760
  .regex(/^\d{2}-\d{2}-\d{4}$/)
6275
6761
  .nullable(),
6276
- knowledge: zFiscalNumberAuthorizationKnowledge,
6762
+ knowledge: zFiscalNumberAuthorizationKnowledge.nullish(),
6277
6763
  legal_issuer_id: z.uuid(),
6278
6764
  observed_at: z.iso.datetime(),
6279
6765
  provenance_sha256: z.string().regex(/^[0-9a-f]{64}$/),
@@ -6283,7 +6769,7 @@ export const zRegisterFiscalNumberAuthorizationRequest = z.strictObject({
6283
6769
  .refine((text) => Array.from(text).length >= 1)
6284
6770
  .refine((text) => Array.from(text).length <= 128)
6285
6771
  .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
6286
- source_kind: zFiscalNumberAuthorizationSourceKind,
6772
+ source_kind: zFiscalNumberAuthorizationSourceKind.nullish(),
6287
6773
  source_reference: z
6288
6774
  .string()
6289
6775
  .refine((text) => Array.from(text).length >= 1)
@@ -6433,6 +6919,24 @@ export const zRequirementId = z.enum([
6433
6919
  "first_fiscal_operation",
6434
6920
  ]);
6435
6921
  export const zRequirementStatus = z.enum(["complete", "pending", "blocked", "action_required"]);
6922
+ export const zRetainedCertificationWorkbook = z.strictObject({
6923
+ name: z.string(),
6924
+ sha256: z.string().regex(/^[0-9a-f]{64}$/),
6925
+ sizeBytes: z.int().gte(1).lte(3145728),
6926
+ });
6927
+ export const zCertificationTestSetResource = z.strictObject({
6928
+ attemptReference: z.string(),
6929
+ createdAt: z.iso.datetime(),
6930
+ file: zRetainedCertificationWorkbook,
6931
+ generation: z.string().regex(/^[1-9][0-9]*$/),
6932
+ id: z.uuid(),
6933
+ kind: zCertificationTestSetKind,
6934
+ object: zCertificationTestSetObject,
6935
+ review: zCertificationTestSetReview,
6936
+ });
6937
+ export const zCurrentCertificationTestSet = z.strictObject({
6938
+ current: zCertificationTestSetResource.nullable(),
6939
+ });
6436
6940
  export const zRevokeCertificateCustodyCertificateVersionRequest = z.strictObject({
6437
6941
  certificate_custody_certificate_version: zLedgerCounter,
6438
6942
  });
@@ -6442,6 +6946,10 @@ export const zRevokeCertificateCustodyCertificateVersionRequest = z.strictObject
6442
6946
  export const zSalesTermsSpecialRegimeBuyerOptionalPaymentAllocations = z.strictObject({
6443
6947
  buyer: z.union([
6444
6948
  z.strictObject({
6949
+ delivery_phone: z
6950
+ .string()
6951
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
6952
+ .optional(),
6445
6953
  identity_kind: z.enum(["domestic"]),
6446
6954
  legal_name: z
6447
6955
  .string()
@@ -6451,6 +6959,10 @@ export const zSalesTermsSpecialRegimeBuyerOptionalPaymentAllocations = z.strictO
6451
6959
  tax_id: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
6452
6960
  }),
6453
6961
  z.strictObject({
6962
+ delivery_phone: z
6963
+ .string()
6964
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
6965
+ .optional(),
6454
6966
  foreign_identifier: z
6455
6967
  .string()
6456
6968
  .refine((text) => Array.from(text).length >= 1)
@@ -6465,6 +6977,7 @@ export const zSalesTermsSpecialRegimeBuyerOptionalPaymentAllocations = z.strictO
6465
6977
  }),
6466
6978
  ]),
6467
6979
  income_type: z.enum(["01", "02", "03", "04", "05", "06"]),
6980
+ payment_account: zPaymentAccount.optional(),
6468
6981
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
6469
6982
  payment_type: z.enum(["1", "2", "3"]),
6470
6983
  });
@@ -6483,74 +6996,193 @@ export const zSchemaValidationOutcome = z.enum(["succeeded", "failed"]);
6483
6996
  * Stage at which a fiscal XML artifact was validated.
6484
6997
  */
6485
6998
  export const zSchemaValidationStage = z.enum(["unsigned", "signed"]);
6486
- export const zSignedDocumentReadinessResource = z.union([
6487
- z.strictObject({
6488
- status: z.enum(["not_applicable"]),
6489
- }),
6490
- z.strictObject({
6491
- status: z.enum(["pending"]),
6492
- }),
6493
- z.strictObject({
6494
- artifact_id: z.uuid(),
6495
- artifact_kind: zFiscalArtifactKind,
6496
- byte_length: z
6497
- .int()
6498
- .gte(0)
6499
- .max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
6500
- created_at: z.iso.datetime(),
6501
- media_type: zFiscalArtifactMediaType,
6502
- sha256: z.string().regex(/^[0-9a-f]{64}$/),
6503
- status: z.enum(["ready"]),
6504
- }),
6505
- ]);
6506
- /**
6507
- * The active signing certificate, judged at the moment of the read.
6508
- */
6509
- export const zSigningCertificateReadiness = z.union([
6510
- z.strictObject({
6511
- notAfter: z.iso.datetime(),
6512
- notBefore: z.iso.datetime(),
6513
- sha256: z.string().regex(/^[0-9a-f]{64}$/),
6514
- status: z.enum(["ready"]),
6515
- }),
6516
- z.strictObject({
6517
- notAfter: z.iso.datetime(),
6518
- notBefore: z.iso.datetime(),
6519
- sha256: z.string().regex(/^[0-9a-f]{64}$/),
6520
- status: z.enum(["expired"]),
6521
- }),
6522
- z.strictObject({
6523
- notAfter: z.iso.datetime(),
6524
- notBefore: z.iso.datetime(),
6525
- sha256: z.string().regex(/^[0-9a-f]{64}$/),
6526
- status: z.enum(["notYetValid"]),
6527
- }),
6528
- z.strictObject({
6529
- status: z.enum(["missing"]),
6530
- }),
6531
- ]);
6532
- /**
6533
- * Whether the issuer can issue each e-CF type now in this environment.
6534
- */
6535
- export const zIssuanceReadiness = z.strictObject({
6536
- certificate: zSigningCertificateReadiness,
6537
- documentTypes: z.array(zDocumentTypeIssuanceReadiness),
6538
- environment: zFiscalEnvironment,
6539
- issuerTaxId: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
6540
- });
6541
6999
  /**
6542
- * Named additional taxes supported by the common Source contract.
7000
+ * Typed shipping and transport facts admitted by the official `InformacionesAdicionales` area.
6543
7001
  */
6544
- export const zSourceAdditionalTax = z.enum(["legal_tip"]);
6545
- export const zSourceBuyerIdentityRequirement = z.enum(["required", "optional"]);
6546
- export const zSourceConnectionActionReason = z.enum([
6547
- "authorization_disabled",
6548
- "authorization_scope_insufficient",
6549
- "target_access_removed",
6550
- "target_origin_unavailable",
6551
- "target_configuration_rejected",
6552
- "target_deployment_failed",
6553
- "target_release_identity_unavailable",
7002
+ export const zShipmentInformation = z.strictObject({
7003
+ container_number: z
7004
+ .string()
7005
+ .refine((text) => Array.from(text).length >= 1)
7006
+ .refine((text) => Array.from(text).length <= 100)
7007
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
7008
+ .optional(),
7009
+ delivery_note_number: z
7010
+ .string()
7011
+ .refine((text) => Array.from(text).length >= 1)
7012
+ .refine((text) => Array.from(text).length <= 20)
7013
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
7014
+ .optional(),
7015
+ driver: z
7016
+ .string()
7017
+ .refine((text) => Array.from(text).length >= 1)
7018
+ .refine((text) => Array.from(text).length <= 20)
7019
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
7020
+ .optional(),
7021
+ gross_weight: z
7022
+ .string()
7023
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
7024
+ .optional(),
7025
+ gross_weight_unit: z
7026
+ .string()
7027
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
7028
+ .optional(),
7029
+ net_weight: z
7030
+ .string()
7031
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
7032
+ .optional(),
7033
+ net_weight_unit: z
7034
+ .string()
7035
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
7036
+ .optional(),
7037
+ package_count: z
7038
+ .string()
7039
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
7040
+ .optional(),
7041
+ package_unit: z
7042
+ .string()
7043
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
7044
+ .optional(),
7045
+ package_volume: z
7046
+ .string()
7047
+ .regex(/^(?=[0-9.]*[1-9])[0-9]{1,16}(\.[0-9]{1,2})?$/)
7048
+ .optional(),
7049
+ route: z
7050
+ .string()
7051
+ .refine((text) => Array.from(text).length >= 1)
7052
+ .refine((text) => Array.from(text).length <= 20)
7053
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
7054
+ .optional(),
7055
+ shipment_date: z
7056
+ .string()
7057
+ .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))$/)
7058
+ .optional(),
7059
+ shipment_number: z
7060
+ .string()
7061
+ .refine((text) => Array.from(text).length >= 1)
7062
+ .refine((text) => Array.from(text).length <= 25)
7063
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
7064
+ .optional(),
7065
+ transport_document_number: z
7066
+ .string()
7067
+ .refine((text) => Array.from(text).length >= 1)
7068
+ .refine((text) => Array.from(text).length <= 20)
7069
+ .regex(/^[0-9]+$/)
7070
+ .optional(),
7071
+ transport_zone: z
7072
+ .string()
7073
+ .refine((text) => Array.from(text).length >= 1)
7074
+ .refine((text) => Array.from(text).length <= 20)
7075
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
7076
+ .optional(),
7077
+ vehicle_fiche: z
7078
+ .string()
7079
+ .refine((text) => Array.from(text).length >= 1)
7080
+ .refine((text) => Array.from(text).length <= 10)
7081
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
7082
+ .optional(),
7083
+ vehicle_plate: z
7084
+ .string()
7085
+ .refine((text) => Array.from(text).length >= 1)
7086
+ .refine((text) => Array.from(text).length <= 7)
7087
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
7088
+ .optional(),
7089
+ volume_unit: z
7090
+ .string()
7091
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
7092
+ .optional(),
7093
+ });
7094
+ /**
7095
+ * Additional official document facts emitted in `InformacionesAdicionales`.
7096
+ */
7097
+ export const zAdditionalDocumentInformation = 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(/^[0-9]+$/)
7103
+ .optional(),
7104
+ shipment: zShipmentInformation.optional(),
7105
+ });
7106
+ /**
7107
+ * Additional document facts for the governmental e-CF profile, whose reference may be alphanumeric.
7108
+ */
7109
+ export const zGovernmentAdditionalDocumentInformation = z.strictObject({
7110
+ reference_number: z
7111
+ .string()
7112
+ .refine((text) => Array.from(text).length >= 1)
7113
+ .refine((text) => Array.from(text).length <= 20)
7114
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
7115
+ .optional(),
7116
+ shipment: zShipmentInformation.optional(),
7117
+ });
7118
+ export const zSignedDocumentReadinessResource = z.union([
7119
+ z.strictObject({
7120
+ status: z.enum(["not_applicable"]),
7121
+ }),
7122
+ z.strictObject({
7123
+ status: z.enum(["pending"]),
7124
+ }),
7125
+ z.strictObject({
7126
+ artifact_id: z.uuid(),
7127
+ artifact_kind: zFiscalArtifactKind,
7128
+ byte_length: z
7129
+ .int()
7130
+ .gte(0)
7131
+ .max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
7132
+ created_at: z.iso.datetime(),
7133
+ media_type: zFiscalArtifactMediaType,
7134
+ sha256: z.string().regex(/^[0-9a-f]{64}$/),
7135
+ status: z.enum(["ready"]),
7136
+ }),
7137
+ ]);
7138
+ /**
7139
+ * The active signing certificate, judged at the moment of the read.
7140
+ */
7141
+ export const zSigningCertificateReadiness = z.union([
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(["ready"]),
7147
+ }),
7148
+ z.strictObject({
7149
+ notAfter: z.iso.datetime(),
7150
+ notBefore: z.iso.datetime(),
7151
+ sha256: z.string().regex(/^[0-9a-f]{64}$/),
7152
+ status: z.enum(["expired"]),
7153
+ }),
7154
+ z.strictObject({
7155
+ notAfter: z.iso.datetime(),
7156
+ notBefore: z.iso.datetime(),
7157
+ sha256: z.string().regex(/^[0-9a-f]{64}$/),
7158
+ status: z.enum(["notYetValid"]),
7159
+ }),
7160
+ z.strictObject({
7161
+ status: z.enum(["missing"]),
7162
+ }),
7163
+ ]);
7164
+ /**
7165
+ * Whether the issuer can issue each e-CF type now in this environment.
7166
+ */
7167
+ export const zIssuanceReadiness = z.strictObject({
7168
+ certificate: zSigningCertificateReadiness,
7169
+ documentTypes: z.array(zDocumentTypeIssuanceReadiness),
7170
+ environment: zFiscalEnvironment,
7171
+ issuerTaxId: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
7172
+ });
7173
+ /**
7174
+ * Named additional taxes supported by the common Source contract.
7175
+ */
7176
+ export const zSourceAdditionalTax = z.enum(["legal_tip"]);
7177
+ export const zSourceBuyerIdentityRequirement = z.enum(["required", "optional"]);
7178
+ export const zSourceConnectionActionReason = z.enum([
7179
+ "authorization_disabled",
7180
+ "authorization_scope_insufficient",
7181
+ "target_access_removed",
7182
+ "target_origin_unavailable",
7183
+ "target_configuration_rejected",
7184
+ "target_deployment_failed",
7185
+ "target_release_identity_unavailable",
6554
7186
  "target_verification_failed",
6555
7187
  "credential_reprovisioning_required",
6556
7188
  ]);
@@ -6830,6 +7462,7 @@ export const zSourceGovernmentEligibility = z.union([
6830
7462
  export const zSourceItemKind = z.enum(["good", "service"]);
6831
7463
  export const zInvoiceItemResource = z.strictObject({
6832
7464
  additionalTaxCodes: z.array(z.string()),
7465
+ adjustments: zInvoiceLinePriceAdjustmentsResource.nullable(),
6833
7466
  description: z.string(),
6834
7467
  id: z.string(),
6835
7468
  itemCodes: z.array(zInvoiceItemCodeResource),
@@ -6846,6 +7479,7 @@ export const zInvoiceItemResource = z.strictObject({
6846
7479
  */
6847
7480
  export const zSourceMeasurementUnit = z.enum(["unit", "kilogram", "litre", "metre", "piece"]);
6848
7481
  export const zInvoiceExportItem = z.strictObject({
7482
+ adjustments: zLinePriceAdjustments.nullish(),
6849
7483
  description: z
6850
7484
  .string()
6851
7485
  .refine((text) => Array.from(text).length >= 1)
@@ -6903,6 +7537,7 @@ export const zInvoiceGovernmentItem = z.strictObject({
6903
7537
  unitPrice: z.string().regex(/^[0-9]{1,16}(\.[0-9]{1,4})?$/),
6904
7538
  });
6905
7539
  export const zInvoiceItem = z.strictObject({
7540
+ adjustments: zLinePriceAdjustments.nullish(),
6906
7541
  description: z
6907
7542
  .string()
6908
7543
  .refine((text) => Array.from(text).length >= 1)
@@ -6941,6 +7576,7 @@ export const zInvoiceMinorExpenseItem = z.strictObject({
6941
7576
  unitPrice: z.string().regex(/^[0-9]{1,16}(\.[0-9]{1,4})?$/),
6942
7577
  });
6943
7578
  export const zInvoicePurchaseItem = z.strictObject({
7579
+ adjustments: zLinePriceAdjustments.nullish(),
6944
7580
  description: z
6945
7581
  .string()
6946
7582
  .refine((text) => Array.from(text).length >= 1)
@@ -7003,6 +7639,22 @@ export const zInvoicePaymentAllocation = z.strictObject({
7003
7639
  export const zInvoicePaymentTerms = z.union([
7004
7640
  z.strictObject({
7005
7641
  allocations: z.array(zInvoicePaymentAllocation).min(1).max(7).nullish(),
7642
+ paymentAccount: z
7643
+ .strictObject({
7644
+ accountNumber: z
7645
+ .string()
7646
+ .refine((text) => Array.from(text).length >= 1)
7647
+ .refine((text) => Array.from(text).length <= 28)
7648
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
7649
+ .nullish(),
7650
+ bankName: z
7651
+ .string()
7652
+ .refine((text) => Array.from(text).length >= 1)
7653
+ .refine((text) => Array.from(text).length <= 75)
7654
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
7655
+ .nullish(),
7656
+ })
7657
+ .optional(),
7006
7658
  type: z.enum(["immediate"]),
7007
7659
  }),
7008
7660
  z.strictObject({
@@ -7016,6 +7668,7 @@ export const zInvoicePaymentTerms = z.union([
7016
7668
  export const zInvoicePaymentTermsResource = z.union([
7017
7669
  z.strictObject({
7018
7670
  allocations: z.array(zInvoicePaymentAllocation).max(7),
7671
+ paymentAccount: zInvoicePaymentAccountResource.optional(),
7019
7672
  type: z.enum(["immediate"]),
7020
7673
  }),
7021
7674
  z.strictObject({
@@ -7050,6 +7703,7 @@ export const zInvoiceReceipt = z.strictObject({
7050
7703
  });
7051
7704
  export const zInvoiceRequest = z.union([
7052
7705
  z.strictObject({
7706
+ additionalInformation: zInvoiceAdditionalInformation.nullish(),
7053
7707
  buyer: zInvoiceBuyer,
7054
7708
  currency: z.enum(["DOP"]),
7055
7709
  expectedTotals: zInvoiceExpectedTotals.nullish(),
@@ -7072,10 +7726,12 @@ export const zInvoiceRequest = z.union([
7072
7726
  numbering: zInvoiceNumbering.nullish(),
7073
7727
  paymentTerms: zInvoicePaymentTerms,
7074
7728
  pdfLayout: zInvoicePdfLayout.nullish(),
7729
+ referenceInformation: zInvoiceReferenceInformation.nullish(),
7075
7730
  source: zInvoiceSourceInput.nullish(),
7076
7731
  type: z.enum(["E31"]),
7077
7732
  }),
7078
7733
  z.strictObject({
7734
+ additionalInformation: zInvoiceAdditionalInformation.nullish(),
7079
7735
  buyer: zInvoiceConsumerBuyer.nullish(),
7080
7736
  currency: z.enum(["DOP"]),
7081
7737
  expectedTotals: zInvoiceExpectedTotals.nullish(),
@@ -7098,10 +7754,12 @@ export const zInvoiceRequest = z.union([
7098
7754
  numbering: zInvoiceNumbering.nullish(),
7099
7755
  paymentTerms: zInvoicePaymentTerms,
7100
7756
  pdfLayout: zInvoicePdfLayout.nullish(),
7757
+ referenceInformation: zInvoiceReferenceInformation.nullish(),
7101
7758
  source: zInvoiceSourceInput.nullish(),
7102
7759
  type: z.enum(["E32"]),
7103
7760
  }),
7104
7761
  z.strictObject({
7762
+ additionalInformation: zInvoiceAdditionalInformation.nullish(),
7105
7763
  currency: z.enum(["DOP"]),
7106
7764
  expectedTotals: zInvoiceExpectedTotals.nullish(),
7107
7765
  invoiceReference: z
@@ -7113,6 +7771,7 @@ export const zInvoiceRequest = z.union([
7113
7771
  numbering: zInvoiceNumbering.nullish(),
7114
7772
  paymentTerms: zInvoicePaymentTerms,
7115
7773
  pdfLayout: zInvoicePdfLayout.nullish(),
7774
+ referenceInformation: zInvoiceReferenceInformation.nullish(),
7116
7775
  source: zInvoiceSourceInput.nullish(),
7117
7776
  supplier: z.strictObject({
7118
7777
  address: z
@@ -8320,6 +8979,7 @@ export const zInvoiceRequest = z.union([
8320
8979
  type: z.enum(["E41"]),
8321
8980
  }),
8322
8981
  z.strictObject({
8982
+ additionalInformation: zInvoiceGovernmentAdditionalInformation.nullish(),
8323
8983
  buyer: z.strictObject({
8324
8984
  address: z
8325
8985
  .string()
@@ -8337,6 +8997,10 @@ export const zInvoiceRequest = z.union([
8337
8997
  .date()
8338
8998
  .regex(/^(19|20)[0-9]{2}-[0-9]{2}-[0-9]{2}$/)
8339
8999
  .nullish(),
9000
+ deliveryPhone: z
9001
+ .string()
9002
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
9003
+ .nullish(),
8340
9004
  email: z
8341
9005
  .string()
8342
9006
  .refine((text) => Array.from(text).length <= 80)
@@ -9559,6 +10223,7 @@ export const zInvoiceRequest = z.union([
9559
10223
  numbering: zInvoiceNumbering.nullish(),
9560
10224
  paymentTerms: zInvoicePaymentTerms,
9561
10225
  pdfLayout: zInvoicePdfLayout.nullish(),
10226
+ referenceInformation: zInvoiceReferenceInformation.nullish(),
9562
10227
  source: zInvoiceSourceInput.nullish(),
9563
10228
  type: z.enum(["E45"]),
9564
10229
  }),
@@ -9575,6 +10240,7 @@ export const zInvoiceRequest = z.union([
9575
10240
  numbering: zInvoiceNumbering.nullish(),
9576
10241
  paymentTerms: zInvoiceMinorExpensePaymentTerms.nullish(),
9577
10242
  pdfLayout: zInvoicePdfLayout.nullish(),
10243
+ referenceInformation: zInvoiceReferenceInformation.nullish(),
9578
10244
  source: zInvoiceSourceInput.nullish(),
9579
10245
  type: z.enum(["E43"]),
9580
10246
  }),
@@ -9592,11 +10258,13 @@ export const zInvoiceRequest = z.union([
9592
10258
  numbering: zInvoiceNumbering.nullish(),
9593
10259
  paymentTerms: zInvoicePaymentTerms.nullish(),
9594
10260
  pdfLayout: zInvoicePdfLayout.nullish(),
10261
+ referenceInformation: zInvoiceReferenceInformation.nullish(),
9595
10262
  source: zInvoiceSourceInput.nullish(),
9596
10263
  type: z.enum(["E47"]),
9597
10264
  withholdingBasis: zInvoiceForeignPaymentBasis,
9598
10265
  }),
9599
10266
  z.strictObject({
10267
+ additionalInformation: zInvoiceAdditionalInformation.nullish(),
9600
10268
  buyer: zInvoiceSpecialRegimeBuyer,
9601
10269
  currency: z.enum(["DOP"]),
9602
10270
  eligibility: zInvoiceSpecialRegimeEligibility,
@@ -9621,10 +10289,12 @@ export const zInvoiceRequest = z.union([
9621
10289
  numbering: zInvoiceNumbering.nullish(),
9622
10290
  paymentTerms: zInvoicePaymentTerms,
9623
10291
  pdfLayout: zInvoicePdfLayout.nullish(),
10292
+ referenceInformation: zInvoiceReferenceInformation.nullish(),
9624
10293
  source: zInvoiceSourceInput.nullish(),
9625
10294
  type: z.enum(["E44"]),
9626
10295
  }),
9627
10296
  z.strictObject({
10297
+ additionalInformation: zInvoiceAdditionalInformation.nullish(),
9628
10298
  buyer: zInvoiceExportBuyer,
9629
10299
  currency: z.enum(["DOP"]),
9630
10300
  eligibility: zInvoiceExportEligibility,
@@ -9649,10 +10319,12 @@ export const zInvoiceRequest = z.union([
9649
10319
  numbering: zInvoiceNumbering.nullish(),
9650
10320
  paymentTerms: zInvoicePaymentTerms,
9651
10321
  pdfLayout: zInvoicePdfLayout.nullish(),
10322
+ referenceInformation: zInvoiceReferenceInformation.nullish(),
9652
10323
  source: zInvoiceSourceInput.nullish(),
9653
10324
  type: z.enum(["E46"]),
9654
10325
  }),
9655
10326
  z.strictObject({
10327
+ additionalInformation: zInvoiceAdditionalInformation.nullish(),
9656
10328
  currency: z.enum(["DOP"]),
9657
10329
  expectedTotals: zInvoiceExpectedTotals.nullish(),
9658
10330
  incomeType: z
@@ -9685,6 +10357,7 @@ export const zInvoiceRequest = z.union([
9685
10357
  type: z.enum(["E33"]),
9686
10358
  }),
9687
10359
  z.strictObject({
10360
+ additionalInformation: zInvoiceAdditionalInformation.nullish(),
9688
10361
  currency: z.enum(["DOP"]),
9689
10362
  expectedTotals: zInvoiceExpectedTotals.nullish(),
9690
10363
  incomeType: z
@@ -9730,6 +10403,7 @@ export const zHostedInvoiceSubmission = z.strictObject({
9730
10403
  export const zInvoiceResource = z.union([
9731
10404
  z.strictObject({
9732
10405
  acceptedAt: z.iso.datetime().nullable(),
10406
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
9733
10407
  buyer: zInvoiceBuyerIdentity.nullable(),
9734
10408
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
9735
10409
  corrections: z.array(zInvoiceCorrection),
@@ -9748,6 +10422,7 @@ export const zInvoiceResource = z.union([
9748
10422
  latestEvent: zInvoiceLatestEvent.nullable(),
9749
10423
  originalInvoiceId: z.uuid().nullable(),
9750
10424
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
10425
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
9751
10426
  replacesInvoiceId: z.uuid().nullable(),
9752
10427
  source: zInvoiceSource,
9753
10428
  status: z.enum(["rejected"]),
@@ -9758,6 +10433,7 @@ export const zInvoiceResource = z.union([
9758
10433
  }),
9759
10434
  z.strictObject({
9760
10435
  acceptedAt: z.iso.datetime().nullable(),
10436
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
9761
10437
  buyer: zInvoiceBuyerIdentity.nullable(),
9762
10438
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
9763
10439
  corrections: z.array(zInvoiceCorrection),
@@ -9777,6 +10453,7 @@ export const zInvoiceResource = z.union([
9777
10453
  latestEvent: zInvoiceLatestEvent.nullable(),
9778
10454
  originalInvoiceId: z.uuid().nullable(),
9779
10455
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
10456
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
9780
10457
  replacesInvoiceId: z.uuid().nullable(),
9781
10458
  source: zInvoiceSource,
9782
10459
  stage: zInvoiceProcessingStage,
@@ -9788,6 +10465,7 @@ export const zInvoiceResource = z.union([
9788
10465
  }),
9789
10466
  z.strictObject({
9790
10467
  acceptedAt: z.iso.datetime().nullable(),
10468
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
9791
10469
  buyer: zInvoiceBuyerIdentity.nullable(),
9792
10470
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
9793
10471
  corrections: z.array(zInvoiceCorrection),
@@ -9807,6 +10485,7 @@ export const zInvoiceResource = z.union([
9807
10485
  latestEvent: zInvoiceLatestEvent.nullable(),
9808
10486
  originalInvoiceId: z.uuid().nullable(),
9809
10487
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
10488
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
9810
10489
  replacesInvoiceId: z.uuid().nullable(),
9811
10490
  source: zInvoiceSource,
9812
10491
  status: z.enum(["verifying"]),
@@ -9817,6 +10496,7 @@ export const zInvoiceResource = z.union([
9817
10496
  }),
9818
10497
  z.strictObject({
9819
10498
  acceptedAt: z.iso.datetime().nullable(),
10499
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
9820
10500
  buyer: zInvoiceBuyerIdentity.nullable(),
9821
10501
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
9822
10502
  corrections: z.array(zInvoiceCorrection),
@@ -9836,6 +10516,7 @@ export const zInvoiceResource = z.union([
9836
10516
  latestEvent: zInvoiceLatestEvent.nullable(),
9837
10517
  originalInvoiceId: z.uuid().nullable(),
9838
10518
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
10519
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
9839
10520
  replacesInvoiceId: z.uuid().nullable(),
9840
10521
  source: zInvoiceSource,
9841
10522
  status: z.enum(["accepted"]),
@@ -9846,6 +10527,7 @@ export const zInvoiceResource = z.union([
9846
10527
  }),
9847
10528
  z.strictObject({
9848
10529
  acceptedAt: z.iso.datetime().nullable(),
10530
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
9849
10531
  buyer: zInvoiceBuyerIdentity.nullable(),
9850
10532
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
9851
10533
  corrections: z.array(zInvoiceCorrection),
@@ -9865,6 +10547,7 @@ export const zInvoiceResource = z.union([
9865
10547
  latestEvent: zInvoiceLatestEvent.nullable(),
9866
10548
  originalInvoiceId: z.uuid().nullable(),
9867
10549
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
10550
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
9868
10551
  replacesInvoiceId: z.uuid().nullable(),
9869
10552
  source: zInvoiceSource,
9870
10553
  status: z.enum(["acceptedWithObservations"]),
@@ -9875,6 +10558,7 @@ export const zInvoiceResource = z.union([
9875
10558
  }),
9876
10559
  z.strictObject({
9877
10560
  acceptedAt: z.iso.datetime().nullable(),
10561
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
9878
10562
  buyer: zInvoiceBuyerIdentity.nullable(),
9879
10563
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
9880
10564
  corrections: z.array(zInvoiceCorrection),
@@ -9894,6 +10578,7 @@ export const zInvoiceResource = z.union([
9894
10578
  latestEvent: zInvoiceLatestEvent.nullable(),
9895
10579
  originalInvoiceId: z.uuid().nullable(),
9896
10580
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
10581
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
9897
10582
  replacesInvoiceId: z.uuid().nullable(),
9898
10583
  source: zInvoiceSource,
9899
10584
  status: z.enum(["authorityRejected"]),
@@ -9904,6 +10589,7 @@ export const zInvoiceResource = z.union([
9904
10589
  }),
9905
10590
  z.strictObject({
9906
10591
  acceptedAt: z.iso.datetime().nullable(),
10592
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
9907
10593
  buyer: zInvoiceBuyerIdentity.nullable(),
9908
10594
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
9909
10595
  corrections: z.array(zInvoiceCorrection),
@@ -9923,6 +10609,7 @@ export const zInvoiceResource = z.union([
9923
10609
  latestEvent: zInvoiceLatestEvent.nullable(),
9924
10610
  originalInvoiceId: z.uuid().nullable(),
9925
10611
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
10612
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
9926
10613
  replacesInvoiceId: z.uuid().nullable(),
9927
10614
  source: zInvoiceSource,
9928
10615
  status: z.enum(["operatorRequired"]),
@@ -10154,1248 +10841,9 @@ export const zSourceDocumentEvaluationRequest = z.strictObject({
10154
10841
  protocol: z.string(),
10155
10842
  request_id: z.string(),
10156
10843
  });
10157
- export const zSourceType31Snapshot = z
10158
- .strictObject({
10159
- payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
10160
- })
10161
- .and(z.strictObject({
10162
- buyer: z.strictObject({
10163
- address: z
10164
- .string()
10165
- .refine((text) => Array.from(text).length >= 1)
10166
- .refine((text) => Array.from(text).length <= 100)
10167
- .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
10168
- .optional(),
10169
- contact_name: z
10170
- .string()
10171
- .refine((text) => Array.from(text).length >= 1)
10172
- .refine((text) => Array.from(text).length <= 80)
10173
- .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
10174
- .optional(),
10175
- delivery_on: z
10176
- .string()
10177
- .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))$/)
10178
- .optional(),
10179
- email: z
10180
- .string()
10181
- .refine((text) => Array.from(text).length <= 80)
10182
- .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)
10183
- .optional(),
10184
- internal_code: z
10185
- .string()
10186
- .refine((text) => Array.from(text).length >= 1)
10187
- .refine((text) => Array.from(text).length <= 20)
10188
- .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
10189
- .optional(),
10190
- legal_name: z
10191
- .string()
10192
- .refine((text) => Array.from(text).length >= 1)
10193
- .refine((text) => Array.from(text).length <= 150)
10194
- .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
10195
- municipality_code: z
10196
- .enum([
10197
- "010000",
10198
- "010100",
10199
- "010101",
10200
- "020000",
10201
- "020100",
10202
- "020101",
10203
- "020102",
10204
- "020103",
10205
- "020104",
10206
- "020105",
10207
- "020106",
10208
- "020107",
10209
- "020108",
10210
- "020109",
10211
- "020200",
10212
- "020201",
10213
- "020202",
10214
- "020300",
10215
- "020301",
10216
- "020302",
10217
- "020303",
10218
- "020400",
10219
- "020401",
10220
- "020402",
10221
- "020403",
10222
- "020404",
10223
- "020405",
10224
- "020500",
10225
- "020501",
10226
- "020600",
10227
- "020601",
10228
- "020602",
10229
- "020603",
10230
- "020604",
10231
- "020700",
10232
- "020701",
10233
- "020702",
10234
- "020800",
10235
- "020801",
10236
- "020802",
10237
- "020803",
10238
- "020804",
10239
- "020900",
10240
- "020901",
10241
- "021000",
10242
- "021001",
10243
- "030000",
10244
- "030001",
10245
- "030101",
10246
- "030102",
10247
- "030200",
10248
- "030201",
10249
- "030202",
10250
- "030300",
10251
- "030301",
10252
- "030302",
10253
- "030303",
10254
- "030304",
10255
- "030305",
10256
- "030306",
10257
- "030307",
10258
- "030400",
10259
- "030401",
10260
- "030500",
10261
- "030501",
10262
- "030502",
10263
- "040000",
10264
- "040100",
10265
- "040101",
10266
- "040102",
10267
- "040103",
10268
- "040104",
10269
- "040200",
10270
- "040201",
10271
- "040300",
10272
- "040301",
10273
- "040302",
10274
- "040400",
10275
- "040401",
10276
- "040402",
10277
- "040500",
10278
- "040501",
10279
- "040502",
10280
- "040503",
10281
- "040504",
10282
- "040600",
10283
- "040601",
10284
- "040700",
10285
- "040701",
10286
- "040702",
10287
- "040800",
10288
- "040801",
10289
- "040802",
10290
- "040900",
10291
- "040901",
10292
- "041000",
10293
- "041001",
10294
- "041100",
10295
- "041101",
10296
- "041102",
10297
- "050000",
10298
- "050100",
10299
- "050101",
10300
- "050102",
10301
- "050200",
10302
- "050201",
10303
- "050202",
10304
- "050203",
10305
- "050300",
10306
- "050301",
10307
- "050400",
10308
- "050401",
10309
- "050500",
10310
- "050501",
10311
- "050502",
10312
- "060000",
10313
- "060100",
10314
- "060101",
10315
- "060102",
10316
- "060103",
10317
- "060104",
10318
- "060105",
10319
- "060200",
10320
- "060201",
10321
- "060202",
10322
- "060203",
10323
- "060300",
10324
- "060301",
10325
- "060400",
10326
- "060401",
10327
- "060500",
10328
- "060501",
10329
- "060502",
10330
- "060503",
10331
- "060504",
10332
- "060505",
10333
- "060600",
10334
- "060601",
10335
- "060700",
10336
- "060701",
10337
- "060702",
10338
- "070000",
10339
- "070100",
10340
- "070101",
10341
- "070102",
10342
- "070103",
10343
- "070200",
10344
- "070201",
10345
- "070202",
10346
- "070203",
10347
- "070300",
10348
- "070301",
10349
- "070302",
10350
- "070400",
10351
- "070401",
10352
- "070402",
10353
- "070500",
10354
- "070501",
10355
- "070502",
10356
- "070600",
10357
- "070601",
10358
- "080000",
10359
- "080100",
10360
- "080101",
10361
- "080102",
10362
- "080103",
10363
- "080104",
10364
- "080200",
10365
- "080201",
10366
- "080202",
10367
- "080203",
10368
- "090000",
10369
- "090100",
10370
- "090101",
10371
- "090102",
10372
- "090103",
10373
- "090104",
10374
- "090105",
10375
- "090106",
10376
- "090107",
10377
- "090108",
10378
- "090109",
10379
- "090200",
10380
- "090201",
10381
- "090300",
10382
- "090301",
10383
- "090302",
10384
- "090303",
10385
- "090304",
10386
- "090400",
10387
- "090401",
10388
- "100000",
10389
- "100100",
10390
- "100101",
10391
- "100102",
10392
- "100103",
10393
- "100200",
10394
- "100201",
10395
- "100202",
10396
- "100300",
10397
- "100301",
10398
- "100400",
10399
- "100401",
10400
- "100402",
10401
- "100500",
10402
- "100501",
10403
- "100502",
10404
- "100600",
10405
- "100601",
10406
- "100602",
10407
- "110000",
10408
- "110100",
10409
- "110101",
10410
- "110102",
10411
- "110103",
10412
- "110104",
10413
- "110200",
10414
- "110201",
10415
- "110202",
10416
- "110203",
10417
- "120000",
10418
- "120100",
10419
- "120101",
10420
- "120102",
10421
- "120200",
10422
- "120201",
10423
- "120300",
10424
- "120301",
10425
- "120302",
10426
- "130000",
10427
- "130100",
10428
- "130101",
10429
- "130102",
10430
- "130103",
10431
- "130104",
10432
- "130105",
10433
- "130200",
10434
- "130201",
10435
- "130202",
10436
- "130203",
10437
- "130300",
10438
- "130301",
10439
- "130302",
10440
- "130303",
10441
- "130400",
10442
- "130401",
10443
- "130402",
10444
- "140000",
10445
- "140100",
10446
- "140101",
10447
- "140102",
10448
- "140103",
10449
- "140104",
10450
- "140200",
10451
- "140201",
10452
- "140202",
10453
- "140203",
10454
- "140300",
10455
- "140301",
10456
- "140302",
10457
- "140400",
10458
- "140401",
10459
- "150000",
10460
- "150100",
10461
- "150101",
10462
- "150200",
10463
- "150201",
10464
- "150202",
10465
- "150300",
10466
- "150301",
10467
- "150302",
10468
- "150303",
10469
- "150304",
10470
- "150400",
10471
- "150401",
10472
- "150500",
10473
- "150501",
10474
- "150502",
10475
- "150600",
10476
- "150601",
10477
- "160000",
10478
- "160100",
10479
- "160101",
10480
- "160102",
10481
- "160200",
10482
- "160201",
10483
- "160202",
10484
- "170000",
10485
- "170100",
10486
- "170101",
10487
- "170102",
10488
- "170103",
10489
- "170104",
10490
- "170105",
10491
- "170106",
10492
- "170107",
10493
- "170108",
10494
- "170109",
10495
- "170110",
10496
- "170200",
10497
- "170201",
10498
- "170202",
10499
- "170203",
10500
- "170300",
10501
- "170301",
10502
- "180000",
10503
- "180100",
10504
- "180101",
10505
- "180102",
10506
- "180103",
10507
- "180200",
10508
- "180201",
10509
- "180202",
10510
- "180300",
10511
- "180301",
10512
- "180400",
10513
- "180401",
10514
- "180500",
10515
- "180501",
10516
- "180502",
10517
- "180600",
10518
- "180601",
10519
- "180602",
10520
- "180603",
10521
- "180604",
10522
- "180700",
10523
- "180701",
10524
- "180702",
10525
- "180703",
10526
- "180800",
10527
- "180801",
10528
- "180802",
10529
- "180803",
10530
- "180804",
10531
- "180900",
10532
- "180901",
10533
- "190000",
10534
- "190100",
10535
- "190101",
10536
- "190102",
10537
- "190200",
10538
- "190201",
10539
- "190202",
10540
- "190300",
10541
- "190301",
10542
- "200000",
10543
- "200100",
10544
- "200101",
10545
- "200102",
10546
- "200103",
10547
- "200104",
10548
- "200200",
10549
- "200201",
10550
- "200300",
10551
- "200301",
10552
- "210000",
10553
- "210100",
10554
- "210101",
10555
- "210102",
10556
- "210103",
10557
- "210200",
10558
- "210201",
10559
- "210300",
10560
- "210301",
10561
- "210302",
10562
- "210303",
10563
- "210400",
10564
- "210401",
10565
- "210402",
10566
- "210500",
10567
- "210501",
10568
- "210502",
10569
- "210503",
10570
- "210504",
10571
- "210600",
10572
- "210601",
10573
- "210602",
10574
- "210700",
10575
- "210701",
10576
- "210800",
10577
- "210801",
10578
- "220000",
10579
- "220100",
10580
- "220101",
10581
- "220102",
10582
- "220103",
10583
- "220104",
10584
- "220105",
10585
- "220106",
10586
- "220107",
10587
- "220108",
10588
- "220109",
10589
- "220110",
10590
- "220111",
10591
- "220200",
10592
- "220201",
10593
- "220202",
10594
- "220203",
10595
- "220300",
10596
- "220301",
10597
- "220302",
10598
- "220303",
10599
- "220400",
10600
- "220401",
10601
- "220402",
10602
- "220500",
10603
- "220501",
10604
- "220502",
10605
- "220503",
10606
- "220600",
10607
- "220601",
10608
- "220602",
10609
- "230000",
10610
- "230100",
10611
- "230101",
10612
- "230200",
10613
- "230201",
10614
- "230202",
10615
- "230203",
10616
- "230300",
10617
- "230301",
10618
- "230400",
10619
- "230401",
10620
- "230500",
10621
- "230501",
10622
- "230600",
10623
- "230601",
10624
- "240000",
10625
- "240100",
10626
- "240101",
10627
- "240102",
10628
- "240103",
10629
- "240104",
10630
- "240105",
10631
- "240106",
10632
- "240200",
10633
- "240201",
10634
- "240202",
10635
- "240300",
10636
- "240301",
10637
- "240400",
10638
- "240401",
10639
- "240402",
10640
- "240403",
10641
- "240404",
10642
- "250000",
10643
- "250100",
10644
- "250101",
10645
- "250102",
10646
- "250104",
10647
- "250105",
10648
- "250106",
10649
- "250107",
10650
- "250200",
10651
- "250201",
10652
- "250300",
10653
- "250301",
10654
- "250302",
10655
- "250303",
10656
- "250400",
10657
- "250401",
10658
- "250402",
10659
- "250500",
10660
- "250501",
10661
- "250502",
10662
- "250503",
10663
- "250504",
10664
- "250600",
10665
- "250601",
10666
- "250602",
10667
- "250700",
10668
- "250701",
10669
- "250702",
10670
- "250703",
10671
- "250800",
10672
- "250801",
10673
- "250802",
10674
- "250803",
10675
- "250900",
10676
- "250901",
10677
- "251000",
10678
- "251001",
10679
- "260000",
10680
- "260100",
10681
- "260101",
10682
- "260200",
10683
- "260201",
10684
- "260300",
10685
- "260301",
10686
- "270000",
10687
- "270100",
10688
- "270101",
10689
- "270102",
10690
- "270103",
10691
- "270104",
10692
- "270200",
10693
- "270201",
10694
- "270202",
10695
- "270203",
10696
- "270204",
10697
- "270205",
10698
- "270300",
10699
- "270301",
10700
- "270302",
10701
- "270303",
10702
- "270304",
10703
- "280000",
10704
- "280100",
10705
- "280101",
10706
- "280102",
10707
- "280103",
10708
- "280104",
10709
- "280105",
10710
- "280106",
10711
- "280200",
10712
- "280201",
10713
- "280300",
10714
- "280301",
10715
- "280302",
10716
- "280303",
10717
- "290000",
10718
- "290100",
10719
- "290101",
10720
- "290102",
10721
- "290103",
10722
- "290104",
10723
- "290200",
10724
- "290201",
10725
- "290300",
10726
- "290301",
10727
- "290302",
10728
- "290303",
10729
- "290400",
10730
- "290402",
10731
- "290403",
10732
- "290500",
10733
- "290501",
10734
- "300000",
10735
- "300100",
10736
- "300101",
10737
- "300102",
10738
- "300103",
10739
- "300104",
10740
- "300200",
10741
- "300201",
10742
- "300202",
10743
- "300300",
10744
- "300301",
10745
- "310000",
10746
- "310100",
10747
- "310101",
10748
- "310102",
10749
- "310103",
10750
- "310104",
10751
- "310105",
10752
- "310200",
10753
- "310201",
10754
- "310300",
10755
- "310301",
10756
- "320000",
10757
- "320100",
10758
- "320101",
10759
- "320102",
10760
- "320200",
10761
- "320201",
10762
- "320300",
10763
- "320301",
10764
- "320302",
10765
- "320400",
10766
- "320401",
10767
- "320402",
10768
- "320500",
10769
- "320501",
10770
- "320502",
10771
- "320600",
10772
- "320601",
10773
- "320602",
10774
- "320603",
10775
- "320700",
10776
- "320701",
10777
- "320702",
10778
- "320703",
10779
- ])
10780
- .optional(),
10781
- province_code: z
10782
- .enum([
10783
- "010000",
10784
- "010100",
10785
- "010101",
10786
- "020000",
10787
- "020100",
10788
- "020101",
10789
- "020102",
10790
- "020103",
10791
- "020104",
10792
- "020105",
10793
- "020106",
10794
- "020107",
10795
- "020108",
10796
- "020109",
10797
- "020200",
10798
- "020201",
10799
- "020202",
10800
- "020300",
10801
- "020301",
10802
- "020302",
10803
- "020303",
10804
- "020400",
10805
- "020401",
10806
- "020402",
10807
- "020403",
10808
- "020404",
10809
- "020405",
10810
- "020500",
10811
- "020501",
10812
- "020600",
10813
- "020601",
10814
- "020602",
10815
- "020603",
10816
- "020604",
10817
- "020700",
10818
- "020701",
10819
- "020702",
10820
- "020800",
10821
- "020801",
10822
- "020802",
10823
- "020803",
10824
- "020804",
10825
- "020900",
10826
- "020901",
10827
- "021000",
10828
- "021001",
10829
- "030000",
10830
- "030001",
10831
- "030101",
10832
- "030102",
10833
- "030200",
10834
- "030201",
10835
- "030202",
10836
- "030300",
10837
- "030301",
10838
- "030302",
10839
- "030303",
10840
- "030304",
10841
- "030305",
10842
- "030306",
10843
- "030307",
10844
- "030400",
10845
- "030401",
10846
- "030500",
10847
- "030501",
10848
- "030502",
10849
- "040000",
10850
- "040100",
10851
- "040101",
10852
- "040102",
10853
- "040103",
10854
- "040104",
10855
- "040200",
10856
- "040201",
10857
- "040300",
10858
- "040301",
10859
- "040302",
10860
- "040400",
10861
- "040401",
10862
- "040402",
10863
- "040500",
10864
- "040501",
10865
- "040502",
10866
- "040503",
10867
- "040504",
10868
- "040600",
10869
- "040601",
10870
- "040700",
10871
- "040701",
10872
- "040702",
10873
- "040800",
10874
- "040801",
10875
- "040802",
10876
- "040900",
10877
- "040901",
10878
- "041000",
10879
- "041001",
10880
- "041100",
10881
- "041101",
10882
- "041102",
10883
- "050000",
10884
- "050100",
10885
- "050101",
10886
- "050102",
10887
- "050200",
10888
- "050201",
10889
- "050202",
10890
- "050203",
10891
- "050300",
10892
- "050301",
10893
- "050400",
10894
- "050401",
10895
- "050500",
10896
- "050501",
10897
- "050502",
10898
- "060000",
10899
- "060100",
10900
- "060101",
10901
- "060102",
10902
- "060103",
10903
- "060104",
10904
- "060105",
10905
- "060200",
10906
- "060201",
10907
- "060202",
10908
- "060203",
10909
- "060300",
10910
- "060301",
10911
- "060400",
10912
- "060401",
10913
- "060500",
10914
- "060501",
10915
- "060502",
10916
- "060503",
10917
- "060504",
10918
- "060505",
10919
- "060600",
10920
- "060601",
10921
- "060700",
10922
- "060701",
10923
- "060702",
10924
- "070000",
10925
- "070100",
10926
- "070101",
10927
- "070102",
10928
- "070103",
10929
- "070200",
10930
- "070201",
10931
- "070202",
10932
- "070203",
10933
- "070300",
10934
- "070301",
10935
- "070302",
10936
- "070400",
10937
- "070401",
10938
- "070402",
10939
- "070500",
10940
- "070501",
10941
- "070502",
10942
- "070600",
10943
- "070601",
10944
- "080000",
10945
- "080100",
10946
- "080101",
10947
- "080102",
10948
- "080103",
10949
- "080104",
10950
- "080200",
10951
- "080201",
10952
- "080202",
10953
- "080203",
10954
- "090000",
10955
- "090100",
10956
- "090101",
10957
- "090102",
10958
- "090103",
10959
- "090104",
10960
- "090105",
10961
- "090106",
10962
- "090107",
10963
- "090108",
10964
- "090109",
10965
- "090200",
10966
- "090201",
10967
- "090300",
10968
- "090301",
10969
- "090302",
10970
- "090303",
10971
- "090304",
10972
- "090400",
10973
- "090401",
10974
- "100000",
10975
- "100100",
10976
- "100101",
10977
- "100102",
10978
- "100103",
10979
- "100200",
10980
- "100201",
10981
- "100202",
10982
- "100300",
10983
- "100301",
10984
- "100400",
10985
- "100401",
10986
- "100402",
10987
- "100500",
10988
- "100501",
10989
- "100502",
10990
- "100600",
10991
- "100601",
10992
- "100602",
10993
- "110000",
10994
- "110100",
10995
- "110101",
10996
- "110102",
10997
- "110103",
10998
- "110104",
10999
- "110200",
11000
- "110201",
11001
- "110202",
11002
- "110203",
11003
- "120000",
11004
- "120100",
11005
- "120101",
11006
- "120102",
11007
- "120200",
11008
- "120201",
11009
- "120300",
11010
- "120301",
11011
- "120302",
11012
- "130000",
11013
- "130100",
11014
- "130101",
11015
- "130102",
11016
- "130103",
11017
- "130104",
11018
- "130105",
11019
- "130200",
11020
- "130201",
11021
- "130202",
11022
- "130203",
11023
- "130300",
11024
- "130301",
11025
- "130302",
11026
- "130303",
11027
- "130400",
11028
- "130401",
11029
- "130402",
11030
- "140000",
11031
- "140100",
11032
- "140101",
11033
- "140102",
11034
- "140103",
11035
- "140104",
11036
- "140200",
11037
- "140201",
11038
- "140202",
11039
- "140203",
11040
- "140300",
11041
- "140301",
11042
- "140302",
11043
- "140400",
11044
- "140401",
11045
- "150000",
11046
- "150100",
11047
- "150101",
11048
- "150200",
11049
- "150201",
11050
- "150202",
11051
- "150300",
11052
- "150301",
11053
- "150302",
11054
- "150303",
11055
- "150304",
11056
- "150400",
11057
- "150401",
11058
- "150500",
11059
- "150501",
11060
- "150502",
11061
- "150600",
11062
- "150601",
11063
- "160000",
11064
- "160100",
11065
- "160101",
11066
- "160102",
11067
- "160200",
11068
- "160201",
11069
- "160202",
11070
- "170000",
11071
- "170100",
11072
- "170101",
11073
- "170102",
11074
- "170103",
11075
- "170104",
11076
- "170105",
11077
- "170106",
11078
- "170107",
11079
- "170108",
11080
- "170109",
11081
- "170110",
11082
- "170200",
11083
- "170201",
11084
- "170202",
11085
- "170203",
11086
- "170300",
11087
- "170301",
11088
- "180000",
11089
- "180100",
11090
- "180101",
11091
- "180102",
11092
- "180103",
11093
- "180200",
11094
- "180201",
11095
- "180202",
11096
- "180300",
11097
- "180301",
11098
- "180400",
11099
- "180401",
11100
- "180500",
11101
- "180501",
11102
- "180502",
11103
- "180600",
11104
- "180601",
11105
- "180602",
11106
- "180603",
11107
- "180604",
11108
- "180700",
11109
- "180701",
11110
- "180702",
11111
- "180703",
11112
- "180800",
11113
- "180801",
11114
- "180802",
11115
- "180803",
11116
- "180804",
11117
- "180900",
11118
- "180901",
11119
- "190000",
11120
- "190100",
11121
- "190101",
11122
- "190102",
11123
- "190200",
11124
- "190201",
11125
- "190202",
11126
- "190300",
11127
- "190301",
11128
- "200000",
11129
- "200100",
11130
- "200101",
11131
- "200102",
11132
- "200103",
11133
- "200104",
11134
- "200200",
11135
- "200201",
11136
- "200300",
11137
- "200301",
11138
- "210000",
11139
- "210100",
11140
- "210101",
11141
- "210102",
11142
- "210103",
11143
- "210200",
11144
- "210201",
11145
- "210300",
11146
- "210301",
11147
- "210302",
11148
- "210303",
11149
- "210400",
11150
- "210401",
11151
- "210402",
11152
- "210500",
11153
- "210501",
11154
- "210502",
11155
- "210503",
11156
- "210504",
11157
- "210600",
11158
- "210601",
11159
- "210602",
11160
- "210700",
11161
- "210701",
11162
- "210800",
11163
- "210801",
11164
- "220000",
11165
- "220100",
11166
- "220101",
11167
- "220102",
11168
- "220103",
11169
- "220104",
11170
- "220105",
11171
- "220106",
11172
- "220107",
11173
- "220108",
11174
- "220109",
11175
- "220110",
11176
- "220111",
11177
- "220200",
11178
- "220201",
11179
- "220202",
11180
- "220203",
11181
- "220300",
11182
- "220301",
11183
- "220302",
11184
- "220303",
11185
- "220400",
11186
- "220401",
11187
- "220402",
11188
- "220500",
11189
- "220501",
11190
- "220502",
11191
- "220503",
11192
- "220600",
11193
- "220601",
11194
- "220602",
11195
- "230000",
11196
- "230100",
11197
- "230101",
11198
- "230200",
11199
- "230201",
11200
- "230202",
11201
- "230203",
11202
- "230300",
11203
- "230301",
11204
- "230400",
11205
- "230401",
11206
- "230500",
11207
- "230501",
11208
- "230600",
11209
- "230601",
11210
- "240000",
11211
- "240100",
11212
- "240101",
11213
- "240102",
11214
- "240103",
11215
- "240104",
11216
- "240105",
11217
- "240106",
11218
- "240200",
11219
- "240201",
11220
- "240202",
11221
- "240300",
11222
- "240301",
11223
- "240400",
11224
- "240401",
11225
- "240402",
11226
- "240403",
11227
- "240404",
11228
- "250000",
11229
- "250100",
11230
- "250101",
11231
- "250102",
11232
- "250104",
11233
- "250105",
11234
- "250106",
11235
- "250107",
11236
- "250200",
11237
- "250201",
11238
- "250300",
11239
- "250301",
11240
- "250302",
11241
- "250303",
11242
- "250400",
11243
- "250401",
11244
- "250402",
11245
- "250500",
11246
- "250501",
11247
- "250502",
11248
- "250503",
11249
- "250504",
11250
- "250600",
11251
- "250601",
11252
- "250602",
11253
- "250700",
11254
- "250701",
11255
- "250702",
11256
- "250703",
11257
- "250800",
11258
- "250801",
11259
- "250802",
11260
- "250803",
11261
- "250900",
11262
- "250901",
11263
- "251000",
11264
- "251001",
11265
- "260000",
11266
- "260100",
11267
- "260101",
11268
- "260200",
11269
- "260201",
11270
- "260300",
11271
- "260301",
11272
- "270000",
11273
- "270100",
11274
- "270101",
11275
- "270102",
11276
- "270103",
11277
- "270104",
11278
- "270200",
11279
- "270201",
11280
- "270202",
11281
- "270203",
11282
- "270204",
11283
- "270205",
11284
- "270300",
11285
- "270301",
11286
- "270302",
11287
- "270303",
11288
- "270304",
11289
- "280000",
11290
- "280100",
11291
- "280101",
11292
- "280102",
11293
- "280103",
11294
- "280104",
11295
- "280105",
11296
- "280106",
11297
- "280200",
11298
- "280201",
11299
- "280300",
11300
- "280301",
11301
- "280302",
11302
- "280303",
11303
- "290000",
11304
- "290100",
11305
- "290101",
11306
- "290102",
11307
- "290103",
11308
- "290104",
11309
- "290200",
11310
- "290201",
11311
- "290300",
11312
- "290301",
11313
- "290302",
11314
- "290303",
11315
- "290400",
11316
- "290402",
11317
- "290403",
11318
- "290500",
11319
- "290501",
11320
- "300000",
11321
- "300100",
11322
- "300101",
11323
- "300102",
11324
- "300103",
11325
- "300104",
11326
- "300200",
11327
- "300201",
11328
- "300202",
11329
- "300300",
11330
- "300301",
11331
- "310000",
11332
- "310100",
11333
- "310101",
11334
- "310102",
11335
- "310103",
11336
- "310104",
11337
- "310105",
11338
- "310200",
11339
- "310201",
11340
- "310300",
11341
- "310301",
11342
- "320000",
11343
- "320100",
11344
- "320101",
11345
- "320102",
11346
- "320200",
11347
- "320201",
11348
- "320300",
11349
- "320301",
11350
- "320302",
11351
- "320400",
11352
- "320401",
11353
- "320402",
11354
- "320500",
11355
- "320501",
11356
- "320502",
11357
- "320600",
11358
- "320601",
11359
- "320602",
11360
- "320603",
11361
- "320700",
11362
- "320701",
11363
- "320702",
11364
- "320703",
11365
- ])
11366
- .optional(),
11367
- purchase_order_number: z
11368
- .string()
11369
- .refine((text) => Array.from(text).length >= 1)
11370
- .refine((text) => Array.from(text).length <= 20)
11371
- .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
11372
- .optional(),
11373
- purchase_order_on: z
11374
- .string()
11375
- .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))$/)
11376
- .optional(),
11377
- tax_id: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
11378
- }),
11379
- income_type: z.enum(["01", "02", "03", "04", "05", "06"]),
11380
- payment_type: z.enum(["1", "2", "3"]),
11381
- }))
11382
- .and(z.strictObject({
11383
- deferred_submission: z.enum(["1"]).optional(),
11384
- discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
11385
- foreign_currency: zForeignCurrencyIntent.optional(),
11386
- payment_due_on: z
11387
- .string()
11388
- .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))$/)
11389
- .optional(),
11390
- reference_information: zReferenceInformation.optional(),
11391
- tax_inclusive_amounts: z.enum(["0", "1"]).optional(),
11392
- }))
11393
- .and(z.strictObject({
11394
- currency: z.enum(["DOP"]),
11395
- lines: z.array(zFiscalLineWithLegalTip).min(1).max(1000),
11396
- }));
11397
- export const zSourceType32Snapshot = z
10844
+ export const zSourceType32Snapshot = z
11398
10845
  .strictObject({
10846
+ payment_account: zPaymentAccount.optional(),
11399
10847
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
11400
10848
  })
11401
10849
  .and(z.strictObject({
@@ -11404,6 +10852,10 @@ export const zSourceType32Snapshot = z
11404
10852
  identity_kind: z.enum(["anonymous"]),
11405
10853
  }),
11406
10854
  z.strictObject({
10855
+ delivery_phone: z
10856
+ .string()
10857
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
10858
+ .optional(),
11407
10859
  identity_kind: z.enum(["domestic"]),
11408
10860
  legal_name: z
11409
10861
  .string()
@@ -11413,6 +10865,10 @@ export const zSourceType32Snapshot = z
11413
10865
  tax_id: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
11414
10866
  }),
11415
10867
  z.strictObject({
10868
+ delivery_phone: z
10869
+ .string()
10870
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
10871
+ .optional(),
11416
10872
  foreign_identifier: z
11417
10873
  .string()
11418
10874
  .refine((text) => Array.from(text).length >= 1)
@@ -11430,6 +10886,7 @@ export const zSourceType32Snapshot = z
11430
10886
  payment_type: z.enum(["1", "2", "3"]),
11431
10887
  }))
11432
10888
  .and(z.strictObject({
10889
+ additional_information: zAdditionalDocumentInformation.optional(),
11433
10890
  deferred_submission: z.enum(["1"]).optional(),
11434
10891
  discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
11435
10892
  foreign_currency: zForeignCurrencyIntent.optional(),
@@ -11446,6 +10903,7 @@ export const zSourceType32Snapshot = z
11446
10903
  }));
11447
10904
  export const zSourceType33Snapshot = z
11448
10905
  .strictObject({
10906
+ payment_account: zPaymentAccount.optional(),
11449
10907
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
11450
10908
  })
11451
10909
  .and(z.strictObject({
@@ -11471,6 +10929,10 @@ export const zSourceType33Snapshot = z
11471
10929
  .string()
11472
10930
  .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))$/)
11473
10931
  .optional(),
10932
+ delivery_phone: z
10933
+ .string()
10934
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
10935
+ .optional(),
11474
10936
  email: z
11475
10937
  .string()
11476
10938
  .refine((text) => Array.from(text).length <= 80)
@@ -12675,6 +12137,10 @@ export const zSourceType33Snapshot = z
12675
12137
  identity_kind: z.enum(["domestic"]),
12676
12138
  })),
12677
12139
  z.strictObject({
12140
+ delivery_phone: z
12141
+ .string()
12142
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
12143
+ .optional(),
12678
12144
  foreign_identifier: z
12679
12145
  .string()
12680
12146
  .refine((text) => Array.from(text).length >= 1)
@@ -12692,6 +12158,7 @@ export const zSourceType33Snapshot = z
12692
12158
  payment_type: z.enum(["1", "2", "3"]),
12693
12159
  }))
12694
12160
  .and(z.strictObject({
12161
+ additional_information: zAdditionalDocumentInformation.optional(),
12695
12162
  deferred_submission: z.enum(["1"]).optional(),
12696
12163
  discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
12697
12164
  foreign_currency: zForeignCurrencyIntent.optional(),
@@ -12730,6 +12197,10 @@ export const zSourceType34Snapshot = z
12730
12197
  .string()
12731
12198
  .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))$/)
12732
12199
  .optional(),
12200
+ delivery_phone: z
12201
+ .string()
12202
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
12203
+ .optional(),
12733
12204
  email: z
12734
12205
  .string()
12735
12206
  .refine((text) => Array.from(text).length <= 80)
@@ -13934,6 +13405,10 @@ export const zSourceType34Snapshot = z
13934
13405
  identity_kind: z.enum(["domestic"]),
13935
13406
  })),
13936
13407
  z.strictObject({
13408
+ delivery_phone: z
13409
+ .string()
13410
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
13411
+ .optional(),
13937
13412
  foreign_identifier: z
13938
13413
  .string()
13939
13414
  .refine((text) => Array.from(text).length >= 1)
@@ -13951,6 +13426,7 @@ export const zSourceType34Snapshot = z
13951
13426
  payment_type: z.enum(["1", "2", "3"]),
13952
13427
  }))
13953
13428
  .and(z.strictObject({
13429
+ additional_information: zAdditionalDocumentInformation.optional(),
13954
13430
  deferred_submission: z.enum(["1"]).optional(),
13955
13431
  discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
13956
13432
  foreign_currency: zForeignCurrencyIntent.optional(),
@@ -13984,6 +13460,7 @@ export const zSourceType45Snapshot = zOptionalPaymentAllocations
13984
13460
  payment_type: z.enum(["1", "2", "3"]),
13985
13461
  }))
13986
13462
  .and(z.strictObject({
13463
+ additional_information: zGovernmentAdditionalDocumentInformation.optional(),
13987
13464
  deferred_submission: z.enum(["1"]).optional(),
13988
13465
  discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
13989
13466
  foreign_currency: zForeignCurrencyIntent.optional(),
@@ -13998,28 +13475,6 @@ export const zSourceType45Snapshot = zOptionalPaymentAllocations
13998
13475
  currency: z.enum(["DOP"]),
13999
13476
  lines: z.array(zFiscalLineWithLegalTip).min(1).max(1000),
14000
13477
  }));
14001
- export const zSourceType46Snapshot = zOptionalPaymentAllocations
14002
- .and(z.strictObject({
14003
- export_customer: zExportCustomer,
14004
- export_eligibility: zCallerDeclaredExportEligibility,
14005
- income_type: z.enum(["01", "02", "03", "04", "05", "06"]),
14006
- payment_type: z.enum(["1", "2", "3"]),
14007
- }))
14008
- .and(z.strictObject({
14009
- deferred_submission: z.enum(["1"]).optional(),
14010
- discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
14011
- foreign_currency: zForeignCurrencyIntent.optional(),
14012
- payment_due_on: z
14013
- .string()
14014
- .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))$/)
14015
- .optional(),
14016
- reference_information: zReferenceInformation.optional(),
14017
- tax_inclusive_amounts: z.enum(["0", "1"]).optional(),
14018
- }))
14019
- .and(z.strictObject({
14020
- currency: z.enum(["DOP"]),
14021
- lines: z.array(zFiscalLine).min(1).max(1000),
14022
- }));
14023
13478
  export const zSourceType47Snapshot = zOptionalPaymentAllocations
14024
13479
  .and(z.strictObject({
14025
13480
  foreign_payee: zForeignPayee,
@@ -14069,6 +13524,7 @@ export const zSourceType44Snapshot = zSalesTermsSpecialRegimeBuyerOptionalPaymen
14069
13524
  caller_declared_eligibility: zCallerDeclaredSpecialRegimeEligibility,
14070
13525
  }))
14071
13526
  .and(z.strictObject({
13527
+ additional_information: zAdditionalDocumentInformation.optional(),
14072
13528
  deferred_submission: z.enum(["1"]).optional(),
14073
13529
  discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
14074
13530
  foreign_currency: zForeignCurrencyIntent.optional(),
@@ -14741,21 +14197,1301 @@ export const zTimingWork = z.strictObject({
14741
14197
  .nullable(),
14742
14198
  producer_traceparent: z
14743
14199
  .string()
14744
- .regex(/^00-[0-9a-f]{32}-[0-9a-f]{16}-0[01]$/)
14745
- .nullable(),
14746
- scheduled_delay_ms: z
14747
- .int()
14748
- .gte(0)
14749
- .max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
14750
- .nullable(),
14751
- settled_at: z.iso.datetime().nullable(),
14752
- state: zTimingWorkState,
14753
- work_id: z.string().regex(/^[0-9a-f]{64}$/),
14754
- });
14200
+ .regex(/^00-[0-9a-f]{32}-[0-9a-f]{16}-0[01]$/)
14201
+ .nullable(),
14202
+ scheduled_delay_ms: z
14203
+ .int()
14204
+ .gte(0)
14205
+ .max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
14206
+ .nullable(),
14207
+ settled_at: z.iso.datetime().nullable(),
14208
+ state: zTimingWorkState,
14209
+ work_id: z.string().regex(/^[0-9a-f]{64}$/),
14210
+ });
14211
+ /**
14212
+ * A Type 31 line with its profile-permitted line-level discounts and surcharges.
14213
+ */
14214
+ export const zType31Line = z.strictObject({
14215
+ additional_tax_codes: z
14216
+ .array(z.enum(["001"]))
14217
+ .min(1)
14218
+ .max(2)
14219
+ .optional(),
14220
+ adjustments: z
14221
+ .strictObject({
14222
+ discounts: z.array(zLinePriceAdjustment).min(0).max(12).optional(),
14223
+ surcharges: z.array(zLinePriceAdjustment).min(0).max(12).optional(),
14224
+ })
14225
+ .optional(),
14226
+ billing_indicator: z.enum(["0", "1", "2", "3", "4"]),
14227
+ goods_or_service_indicator: z.enum(["1", "2"]),
14228
+ item_codes: z.array(zFiscalItemCode).min(0).max(5).optional(),
14229
+ measurement_unit: z.string().regex(/^([1-9]|[1-5][0-9]|6[0-2])$/),
14230
+ name: z
14231
+ .string()
14232
+ .refine((text) => Array.from(text).length >= 1)
14233
+ .refine((text) => Array.from(text).length <= 80)
14234
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
14235
+ quantity: z.string().regex(/^(?=[0-9.]*[1-9])[0-9]{1,16}(\.[0-9]{1,2})?$/),
14236
+ source_line_id: z
14237
+ .string()
14238
+ .refine((text) => Array.from(text).length >= 1)
14239
+ .refine((text) => Array.from(text).length <= 128)
14240
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
14241
+ tax_exclusive_unit_price: z.enum(["1"]).optional(),
14242
+ unit_price: z.string().regex(/^[0-9]{1,16}(\.[0-9]{1,4})?$/),
14243
+ });
14244
+ export const zSourceType31Snapshot = z
14245
+ .strictObject({
14246
+ payment_account: zPaymentAccount.optional(),
14247
+ payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
14248
+ })
14249
+ .and(z.strictObject({
14250
+ buyer: z.strictObject({
14251
+ address: z
14252
+ .string()
14253
+ .refine((text) => Array.from(text).length >= 1)
14254
+ .refine((text) => Array.from(text).length <= 100)
14255
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
14256
+ .optional(),
14257
+ contact_name: z
14258
+ .string()
14259
+ .refine((text) => Array.from(text).length >= 1)
14260
+ .refine((text) => Array.from(text).length <= 80)
14261
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
14262
+ .optional(),
14263
+ delivery_on: z
14264
+ .string()
14265
+ .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))$/)
14266
+ .optional(),
14267
+ delivery_phone: z
14268
+ .string()
14269
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
14270
+ .optional(),
14271
+ email: z
14272
+ .string()
14273
+ .refine((text) => Array.from(text).length <= 80)
14274
+ .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)
14275
+ .optional(),
14276
+ internal_code: z
14277
+ .string()
14278
+ .refine((text) => Array.from(text).length >= 1)
14279
+ .refine((text) => Array.from(text).length <= 20)
14280
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
14281
+ .optional(),
14282
+ legal_name: z
14283
+ .string()
14284
+ .refine((text) => Array.from(text).length >= 1)
14285
+ .refine((text) => Array.from(text).length <= 150)
14286
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
14287
+ municipality_code: z
14288
+ .enum([
14289
+ "010000",
14290
+ "010100",
14291
+ "010101",
14292
+ "020000",
14293
+ "020100",
14294
+ "020101",
14295
+ "020102",
14296
+ "020103",
14297
+ "020104",
14298
+ "020105",
14299
+ "020106",
14300
+ "020107",
14301
+ "020108",
14302
+ "020109",
14303
+ "020200",
14304
+ "020201",
14305
+ "020202",
14306
+ "020300",
14307
+ "020301",
14308
+ "020302",
14309
+ "020303",
14310
+ "020400",
14311
+ "020401",
14312
+ "020402",
14313
+ "020403",
14314
+ "020404",
14315
+ "020405",
14316
+ "020500",
14317
+ "020501",
14318
+ "020600",
14319
+ "020601",
14320
+ "020602",
14321
+ "020603",
14322
+ "020604",
14323
+ "020700",
14324
+ "020701",
14325
+ "020702",
14326
+ "020800",
14327
+ "020801",
14328
+ "020802",
14329
+ "020803",
14330
+ "020804",
14331
+ "020900",
14332
+ "020901",
14333
+ "021000",
14334
+ "021001",
14335
+ "030000",
14336
+ "030001",
14337
+ "030101",
14338
+ "030102",
14339
+ "030200",
14340
+ "030201",
14341
+ "030202",
14342
+ "030300",
14343
+ "030301",
14344
+ "030302",
14345
+ "030303",
14346
+ "030304",
14347
+ "030305",
14348
+ "030306",
14349
+ "030307",
14350
+ "030400",
14351
+ "030401",
14352
+ "030500",
14353
+ "030501",
14354
+ "030502",
14355
+ "040000",
14356
+ "040100",
14357
+ "040101",
14358
+ "040102",
14359
+ "040103",
14360
+ "040104",
14361
+ "040200",
14362
+ "040201",
14363
+ "040300",
14364
+ "040301",
14365
+ "040302",
14366
+ "040400",
14367
+ "040401",
14368
+ "040402",
14369
+ "040500",
14370
+ "040501",
14371
+ "040502",
14372
+ "040503",
14373
+ "040504",
14374
+ "040600",
14375
+ "040601",
14376
+ "040700",
14377
+ "040701",
14378
+ "040702",
14379
+ "040800",
14380
+ "040801",
14381
+ "040802",
14382
+ "040900",
14383
+ "040901",
14384
+ "041000",
14385
+ "041001",
14386
+ "041100",
14387
+ "041101",
14388
+ "041102",
14389
+ "050000",
14390
+ "050100",
14391
+ "050101",
14392
+ "050102",
14393
+ "050200",
14394
+ "050201",
14395
+ "050202",
14396
+ "050203",
14397
+ "050300",
14398
+ "050301",
14399
+ "050400",
14400
+ "050401",
14401
+ "050500",
14402
+ "050501",
14403
+ "050502",
14404
+ "060000",
14405
+ "060100",
14406
+ "060101",
14407
+ "060102",
14408
+ "060103",
14409
+ "060104",
14410
+ "060105",
14411
+ "060200",
14412
+ "060201",
14413
+ "060202",
14414
+ "060203",
14415
+ "060300",
14416
+ "060301",
14417
+ "060400",
14418
+ "060401",
14419
+ "060500",
14420
+ "060501",
14421
+ "060502",
14422
+ "060503",
14423
+ "060504",
14424
+ "060505",
14425
+ "060600",
14426
+ "060601",
14427
+ "060700",
14428
+ "060701",
14429
+ "060702",
14430
+ "070000",
14431
+ "070100",
14432
+ "070101",
14433
+ "070102",
14434
+ "070103",
14435
+ "070200",
14436
+ "070201",
14437
+ "070202",
14438
+ "070203",
14439
+ "070300",
14440
+ "070301",
14441
+ "070302",
14442
+ "070400",
14443
+ "070401",
14444
+ "070402",
14445
+ "070500",
14446
+ "070501",
14447
+ "070502",
14448
+ "070600",
14449
+ "070601",
14450
+ "080000",
14451
+ "080100",
14452
+ "080101",
14453
+ "080102",
14454
+ "080103",
14455
+ "080104",
14456
+ "080200",
14457
+ "080201",
14458
+ "080202",
14459
+ "080203",
14460
+ "090000",
14461
+ "090100",
14462
+ "090101",
14463
+ "090102",
14464
+ "090103",
14465
+ "090104",
14466
+ "090105",
14467
+ "090106",
14468
+ "090107",
14469
+ "090108",
14470
+ "090109",
14471
+ "090200",
14472
+ "090201",
14473
+ "090300",
14474
+ "090301",
14475
+ "090302",
14476
+ "090303",
14477
+ "090304",
14478
+ "090400",
14479
+ "090401",
14480
+ "100000",
14481
+ "100100",
14482
+ "100101",
14483
+ "100102",
14484
+ "100103",
14485
+ "100200",
14486
+ "100201",
14487
+ "100202",
14488
+ "100300",
14489
+ "100301",
14490
+ "100400",
14491
+ "100401",
14492
+ "100402",
14493
+ "100500",
14494
+ "100501",
14495
+ "100502",
14496
+ "100600",
14497
+ "100601",
14498
+ "100602",
14499
+ "110000",
14500
+ "110100",
14501
+ "110101",
14502
+ "110102",
14503
+ "110103",
14504
+ "110104",
14505
+ "110200",
14506
+ "110201",
14507
+ "110202",
14508
+ "110203",
14509
+ "120000",
14510
+ "120100",
14511
+ "120101",
14512
+ "120102",
14513
+ "120200",
14514
+ "120201",
14515
+ "120300",
14516
+ "120301",
14517
+ "120302",
14518
+ "130000",
14519
+ "130100",
14520
+ "130101",
14521
+ "130102",
14522
+ "130103",
14523
+ "130104",
14524
+ "130105",
14525
+ "130200",
14526
+ "130201",
14527
+ "130202",
14528
+ "130203",
14529
+ "130300",
14530
+ "130301",
14531
+ "130302",
14532
+ "130303",
14533
+ "130400",
14534
+ "130401",
14535
+ "130402",
14536
+ "140000",
14537
+ "140100",
14538
+ "140101",
14539
+ "140102",
14540
+ "140103",
14541
+ "140104",
14542
+ "140200",
14543
+ "140201",
14544
+ "140202",
14545
+ "140203",
14546
+ "140300",
14547
+ "140301",
14548
+ "140302",
14549
+ "140400",
14550
+ "140401",
14551
+ "150000",
14552
+ "150100",
14553
+ "150101",
14554
+ "150200",
14555
+ "150201",
14556
+ "150202",
14557
+ "150300",
14558
+ "150301",
14559
+ "150302",
14560
+ "150303",
14561
+ "150304",
14562
+ "150400",
14563
+ "150401",
14564
+ "150500",
14565
+ "150501",
14566
+ "150502",
14567
+ "150600",
14568
+ "150601",
14569
+ "160000",
14570
+ "160100",
14571
+ "160101",
14572
+ "160102",
14573
+ "160200",
14574
+ "160201",
14575
+ "160202",
14576
+ "170000",
14577
+ "170100",
14578
+ "170101",
14579
+ "170102",
14580
+ "170103",
14581
+ "170104",
14582
+ "170105",
14583
+ "170106",
14584
+ "170107",
14585
+ "170108",
14586
+ "170109",
14587
+ "170110",
14588
+ "170200",
14589
+ "170201",
14590
+ "170202",
14591
+ "170203",
14592
+ "170300",
14593
+ "170301",
14594
+ "180000",
14595
+ "180100",
14596
+ "180101",
14597
+ "180102",
14598
+ "180103",
14599
+ "180200",
14600
+ "180201",
14601
+ "180202",
14602
+ "180300",
14603
+ "180301",
14604
+ "180400",
14605
+ "180401",
14606
+ "180500",
14607
+ "180501",
14608
+ "180502",
14609
+ "180600",
14610
+ "180601",
14611
+ "180602",
14612
+ "180603",
14613
+ "180604",
14614
+ "180700",
14615
+ "180701",
14616
+ "180702",
14617
+ "180703",
14618
+ "180800",
14619
+ "180801",
14620
+ "180802",
14621
+ "180803",
14622
+ "180804",
14623
+ "180900",
14624
+ "180901",
14625
+ "190000",
14626
+ "190100",
14627
+ "190101",
14628
+ "190102",
14629
+ "190200",
14630
+ "190201",
14631
+ "190202",
14632
+ "190300",
14633
+ "190301",
14634
+ "200000",
14635
+ "200100",
14636
+ "200101",
14637
+ "200102",
14638
+ "200103",
14639
+ "200104",
14640
+ "200200",
14641
+ "200201",
14642
+ "200300",
14643
+ "200301",
14644
+ "210000",
14645
+ "210100",
14646
+ "210101",
14647
+ "210102",
14648
+ "210103",
14649
+ "210200",
14650
+ "210201",
14651
+ "210300",
14652
+ "210301",
14653
+ "210302",
14654
+ "210303",
14655
+ "210400",
14656
+ "210401",
14657
+ "210402",
14658
+ "210500",
14659
+ "210501",
14660
+ "210502",
14661
+ "210503",
14662
+ "210504",
14663
+ "210600",
14664
+ "210601",
14665
+ "210602",
14666
+ "210700",
14667
+ "210701",
14668
+ "210800",
14669
+ "210801",
14670
+ "220000",
14671
+ "220100",
14672
+ "220101",
14673
+ "220102",
14674
+ "220103",
14675
+ "220104",
14676
+ "220105",
14677
+ "220106",
14678
+ "220107",
14679
+ "220108",
14680
+ "220109",
14681
+ "220110",
14682
+ "220111",
14683
+ "220200",
14684
+ "220201",
14685
+ "220202",
14686
+ "220203",
14687
+ "220300",
14688
+ "220301",
14689
+ "220302",
14690
+ "220303",
14691
+ "220400",
14692
+ "220401",
14693
+ "220402",
14694
+ "220500",
14695
+ "220501",
14696
+ "220502",
14697
+ "220503",
14698
+ "220600",
14699
+ "220601",
14700
+ "220602",
14701
+ "230000",
14702
+ "230100",
14703
+ "230101",
14704
+ "230200",
14705
+ "230201",
14706
+ "230202",
14707
+ "230203",
14708
+ "230300",
14709
+ "230301",
14710
+ "230400",
14711
+ "230401",
14712
+ "230500",
14713
+ "230501",
14714
+ "230600",
14715
+ "230601",
14716
+ "240000",
14717
+ "240100",
14718
+ "240101",
14719
+ "240102",
14720
+ "240103",
14721
+ "240104",
14722
+ "240105",
14723
+ "240106",
14724
+ "240200",
14725
+ "240201",
14726
+ "240202",
14727
+ "240300",
14728
+ "240301",
14729
+ "240400",
14730
+ "240401",
14731
+ "240402",
14732
+ "240403",
14733
+ "240404",
14734
+ "250000",
14735
+ "250100",
14736
+ "250101",
14737
+ "250102",
14738
+ "250104",
14739
+ "250105",
14740
+ "250106",
14741
+ "250107",
14742
+ "250200",
14743
+ "250201",
14744
+ "250300",
14745
+ "250301",
14746
+ "250302",
14747
+ "250303",
14748
+ "250400",
14749
+ "250401",
14750
+ "250402",
14751
+ "250500",
14752
+ "250501",
14753
+ "250502",
14754
+ "250503",
14755
+ "250504",
14756
+ "250600",
14757
+ "250601",
14758
+ "250602",
14759
+ "250700",
14760
+ "250701",
14761
+ "250702",
14762
+ "250703",
14763
+ "250800",
14764
+ "250801",
14765
+ "250802",
14766
+ "250803",
14767
+ "250900",
14768
+ "250901",
14769
+ "251000",
14770
+ "251001",
14771
+ "260000",
14772
+ "260100",
14773
+ "260101",
14774
+ "260200",
14775
+ "260201",
14776
+ "260300",
14777
+ "260301",
14778
+ "270000",
14779
+ "270100",
14780
+ "270101",
14781
+ "270102",
14782
+ "270103",
14783
+ "270104",
14784
+ "270200",
14785
+ "270201",
14786
+ "270202",
14787
+ "270203",
14788
+ "270204",
14789
+ "270205",
14790
+ "270300",
14791
+ "270301",
14792
+ "270302",
14793
+ "270303",
14794
+ "270304",
14795
+ "280000",
14796
+ "280100",
14797
+ "280101",
14798
+ "280102",
14799
+ "280103",
14800
+ "280104",
14801
+ "280105",
14802
+ "280106",
14803
+ "280200",
14804
+ "280201",
14805
+ "280300",
14806
+ "280301",
14807
+ "280302",
14808
+ "280303",
14809
+ "290000",
14810
+ "290100",
14811
+ "290101",
14812
+ "290102",
14813
+ "290103",
14814
+ "290104",
14815
+ "290200",
14816
+ "290201",
14817
+ "290300",
14818
+ "290301",
14819
+ "290302",
14820
+ "290303",
14821
+ "290400",
14822
+ "290402",
14823
+ "290403",
14824
+ "290500",
14825
+ "290501",
14826
+ "300000",
14827
+ "300100",
14828
+ "300101",
14829
+ "300102",
14830
+ "300103",
14831
+ "300104",
14832
+ "300200",
14833
+ "300201",
14834
+ "300202",
14835
+ "300300",
14836
+ "300301",
14837
+ "310000",
14838
+ "310100",
14839
+ "310101",
14840
+ "310102",
14841
+ "310103",
14842
+ "310104",
14843
+ "310105",
14844
+ "310200",
14845
+ "310201",
14846
+ "310300",
14847
+ "310301",
14848
+ "320000",
14849
+ "320100",
14850
+ "320101",
14851
+ "320102",
14852
+ "320200",
14853
+ "320201",
14854
+ "320300",
14855
+ "320301",
14856
+ "320302",
14857
+ "320400",
14858
+ "320401",
14859
+ "320402",
14860
+ "320500",
14861
+ "320501",
14862
+ "320502",
14863
+ "320600",
14864
+ "320601",
14865
+ "320602",
14866
+ "320603",
14867
+ "320700",
14868
+ "320701",
14869
+ "320702",
14870
+ "320703",
14871
+ ])
14872
+ .optional(),
14873
+ province_code: z
14874
+ .enum([
14875
+ "010000",
14876
+ "010100",
14877
+ "010101",
14878
+ "020000",
14879
+ "020100",
14880
+ "020101",
14881
+ "020102",
14882
+ "020103",
14883
+ "020104",
14884
+ "020105",
14885
+ "020106",
14886
+ "020107",
14887
+ "020108",
14888
+ "020109",
14889
+ "020200",
14890
+ "020201",
14891
+ "020202",
14892
+ "020300",
14893
+ "020301",
14894
+ "020302",
14895
+ "020303",
14896
+ "020400",
14897
+ "020401",
14898
+ "020402",
14899
+ "020403",
14900
+ "020404",
14901
+ "020405",
14902
+ "020500",
14903
+ "020501",
14904
+ "020600",
14905
+ "020601",
14906
+ "020602",
14907
+ "020603",
14908
+ "020604",
14909
+ "020700",
14910
+ "020701",
14911
+ "020702",
14912
+ "020800",
14913
+ "020801",
14914
+ "020802",
14915
+ "020803",
14916
+ "020804",
14917
+ "020900",
14918
+ "020901",
14919
+ "021000",
14920
+ "021001",
14921
+ "030000",
14922
+ "030001",
14923
+ "030101",
14924
+ "030102",
14925
+ "030200",
14926
+ "030201",
14927
+ "030202",
14928
+ "030300",
14929
+ "030301",
14930
+ "030302",
14931
+ "030303",
14932
+ "030304",
14933
+ "030305",
14934
+ "030306",
14935
+ "030307",
14936
+ "030400",
14937
+ "030401",
14938
+ "030500",
14939
+ "030501",
14940
+ "030502",
14941
+ "040000",
14942
+ "040100",
14943
+ "040101",
14944
+ "040102",
14945
+ "040103",
14946
+ "040104",
14947
+ "040200",
14948
+ "040201",
14949
+ "040300",
14950
+ "040301",
14951
+ "040302",
14952
+ "040400",
14953
+ "040401",
14954
+ "040402",
14955
+ "040500",
14956
+ "040501",
14957
+ "040502",
14958
+ "040503",
14959
+ "040504",
14960
+ "040600",
14961
+ "040601",
14962
+ "040700",
14963
+ "040701",
14964
+ "040702",
14965
+ "040800",
14966
+ "040801",
14967
+ "040802",
14968
+ "040900",
14969
+ "040901",
14970
+ "041000",
14971
+ "041001",
14972
+ "041100",
14973
+ "041101",
14974
+ "041102",
14975
+ "050000",
14976
+ "050100",
14977
+ "050101",
14978
+ "050102",
14979
+ "050200",
14980
+ "050201",
14981
+ "050202",
14982
+ "050203",
14983
+ "050300",
14984
+ "050301",
14985
+ "050400",
14986
+ "050401",
14987
+ "050500",
14988
+ "050501",
14989
+ "050502",
14990
+ "060000",
14991
+ "060100",
14992
+ "060101",
14993
+ "060102",
14994
+ "060103",
14995
+ "060104",
14996
+ "060105",
14997
+ "060200",
14998
+ "060201",
14999
+ "060202",
15000
+ "060203",
15001
+ "060300",
15002
+ "060301",
15003
+ "060400",
15004
+ "060401",
15005
+ "060500",
15006
+ "060501",
15007
+ "060502",
15008
+ "060503",
15009
+ "060504",
15010
+ "060505",
15011
+ "060600",
15012
+ "060601",
15013
+ "060700",
15014
+ "060701",
15015
+ "060702",
15016
+ "070000",
15017
+ "070100",
15018
+ "070101",
15019
+ "070102",
15020
+ "070103",
15021
+ "070200",
15022
+ "070201",
15023
+ "070202",
15024
+ "070203",
15025
+ "070300",
15026
+ "070301",
15027
+ "070302",
15028
+ "070400",
15029
+ "070401",
15030
+ "070402",
15031
+ "070500",
15032
+ "070501",
15033
+ "070502",
15034
+ "070600",
15035
+ "070601",
15036
+ "080000",
15037
+ "080100",
15038
+ "080101",
15039
+ "080102",
15040
+ "080103",
15041
+ "080104",
15042
+ "080200",
15043
+ "080201",
15044
+ "080202",
15045
+ "080203",
15046
+ "090000",
15047
+ "090100",
15048
+ "090101",
15049
+ "090102",
15050
+ "090103",
15051
+ "090104",
15052
+ "090105",
15053
+ "090106",
15054
+ "090107",
15055
+ "090108",
15056
+ "090109",
15057
+ "090200",
15058
+ "090201",
15059
+ "090300",
15060
+ "090301",
15061
+ "090302",
15062
+ "090303",
15063
+ "090304",
15064
+ "090400",
15065
+ "090401",
15066
+ "100000",
15067
+ "100100",
15068
+ "100101",
15069
+ "100102",
15070
+ "100103",
15071
+ "100200",
15072
+ "100201",
15073
+ "100202",
15074
+ "100300",
15075
+ "100301",
15076
+ "100400",
15077
+ "100401",
15078
+ "100402",
15079
+ "100500",
15080
+ "100501",
15081
+ "100502",
15082
+ "100600",
15083
+ "100601",
15084
+ "100602",
15085
+ "110000",
15086
+ "110100",
15087
+ "110101",
15088
+ "110102",
15089
+ "110103",
15090
+ "110104",
15091
+ "110200",
15092
+ "110201",
15093
+ "110202",
15094
+ "110203",
15095
+ "120000",
15096
+ "120100",
15097
+ "120101",
15098
+ "120102",
15099
+ "120200",
15100
+ "120201",
15101
+ "120300",
15102
+ "120301",
15103
+ "120302",
15104
+ "130000",
15105
+ "130100",
15106
+ "130101",
15107
+ "130102",
15108
+ "130103",
15109
+ "130104",
15110
+ "130105",
15111
+ "130200",
15112
+ "130201",
15113
+ "130202",
15114
+ "130203",
15115
+ "130300",
15116
+ "130301",
15117
+ "130302",
15118
+ "130303",
15119
+ "130400",
15120
+ "130401",
15121
+ "130402",
15122
+ "140000",
15123
+ "140100",
15124
+ "140101",
15125
+ "140102",
15126
+ "140103",
15127
+ "140104",
15128
+ "140200",
15129
+ "140201",
15130
+ "140202",
15131
+ "140203",
15132
+ "140300",
15133
+ "140301",
15134
+ "140302",
15135
+ "140400",
15136
+ "140401",
15137
+ "150000",
15138
+ "150100",
15139
+ "150101",
15140
+ "150200",
15141
+ "150201",
15142
+ "150202",
15143
+ "150300",
15144
+ "150301",
15145
+ "150302",
15146
+ "150303",
15147
+ "150304",
15148
+ "150400",
15149
+ "150401",
15150
+ "150500",
15151
+ "150501",
15152
+ "150502",
15153
+ "150600",
15154
+ "150601",
15155
+ "160000",
15156
+ "160100",
15157
+ "160101",
15158
+ "160102",
15159
+ "160200",
15160
+ "160201",
15161
+ "160202",
15162
+ "170000",
15163
+ "170100",
15164
+ "170101",
15165
+ "170102",
15166
+ "170103",
15167
+ "170104",
15168
+ "170105",
15169
+ "170106",
15170
+ "170107",
15171
+ "170108",
15172
+ "170109",
15173
+ "170110",
15174
+ "170200",
15175
+ "170201",
15176
+ "170202",
15177
+ "170203",
15178
+ "170300",
15179
+ "170301",
15180
+ "180000",
15181
+ "180100",
15182
+ "180101",
15183
+ "180102",
15184
+ "180103",
15185
+ "180200",
15186
+ "180201",
15187
+ "180202",
15188
+ "180300",
15189
+ "180301",
15190
+ "180400",
15191
+ "180401",
15192
+ "180500",
15193
+ "180501",
15194
+ "180502",
15195
+ "180600",
15196
+ "180601",
15197
+ "180602",
15198
+ "180603",
15199
+ "180604",
15200
+ "180700",
15201
+ "180701",
15202
+ "180702",
15203
+ "180703",
15204
+ "180800",
15205
+ "180801",
15206
+ "180802",
15207
+ "180803",
15208
+ "180804",
15209
+ "180900",
15210
+ "180901",
15211
+ "190000",
15212
+ "190100",
15213
+ "190101",
15214
+ "190102",
15215
+ "190200",
15216
+ "190201",
15217
+ "190202",
15218
+ "190300",
15219
+ "190301",
15220
+ "200000",
15221
+ "200100",
15222
+ "200101",
15223
+ "200102",
15224
+ "200103",
15225
+ "200104",
15226
+ "200200",
15227
+ "200201",
15228
+ "200300",
15229
+ "200301",
15230
+ "210000",
15231
+ "210100",
15232
+ "210101",
15233
+ "210102",
15234
+ "210103",
15235
+ "210200",
15236
+ "210201",
15237
+ "210300",
15238
+ "210301",
15239
+ "210302",
15240
+ "210303",
15241
+ "210400",
15242
+ "210401",
15243
+ "210402",
15244
+ "210500",
15245
+ "210501",
15246
+ "210502",
15247
+ "210503",
15248
+ "210504",
15249
+ "210600",
15250
+ "210601",
15251
+ "210602",
15252
+ "210700",
15253
+ "210701",
15254
+ "210800",
15255
+ "210801",
15256
+ "220000",
15257
+ "220100",
15258
+ "220101",
15259
+ "220102",
15260
+ "220103",
15261
+ "220104",
15262
+ "220105",
15263
+ "220106",
15264
+ "220107",
15265
+ "220108",
15266
+ "220109",
15267
+ "220110",
15268
+ "220111",
15269
+ "220200",
15270
+ "220201",
15271
+ "220202",
15272
+ "220203",
15273
+ "220300",
15274
+ "220301",
15275
+ "220302",
15276
+ "220303",
15277
+ "220400",
15278
+ "220401",
15279
+ "220402",
15280
+ "220500",
15281
+ "220501",
15282
+ "220502",
15283
+ "220503",
15284
+ "220600",
15285
+ "220601",
15286
+ "220602",
15287
+ "230000",
15288
+ "230100",
15289
+ "230101",
15290
+ "230200",
15291
+ "230201",
15292
+ "230202",
15293
+ "230203",
15294
+ "230300",
15295
+ "230301",
15296
+ "230400",
15297
+ "230401",
15298
+ "230500",
15299
+ "230501",
15300
+ "230600",
15301
+ "230601",
15302
+ "240000",
15303
+ "240100",
15304
+ "240101",
15305
+ "240102",
15306
+ "240103",
15307
+ "240104",
15308
+ "240105",
15309
+ "240106",
15310
+ "240200",
15311
+ "240201",
15312
+ "240202",
15313
+ "240300",
15314
+ "240301",
15315
+ "240400",
15316
+ "240401",
15317
+ "240402",
15318
+ "240403",
15319
+ "240404",
15320
+ "250000",
15321
+ "250100",
15322
+ "250101",
15323
+ "250102",
15324
+ "250104",
15325
+ "250105",
15326
+ "250106",
15327
+ "250107",
15328
+ "250200",
15329
+ "250201",
15330
+ "250300",
15331
+ "250301",
15332
+ "250302",
15333
+ "250303",
15334
+ "250400",
15335
+ "250401",
15336
+ "250402",
15337
+ "250500",
15338
+ "250501",
15339
+ "250502",
15340
+ "250503",
15341
+ "250504",
15342
+ "250600",
15343
+ "250601",
15344
+ "250602",
15345
+ "250700",
15346
+ "250701",
15347
+ "250702",
15348
+ "250703",
15349
+ "250800",
15350
+ "250801",
15351
+ "250802",
15352
+ "250803",
15353
+ "250900",
15354
+ "250901",
15355
+ "251000",
15356
+ "251001",
15357
+ "260000",
15358
+ "260100",
15359
+ "260101",
15360
+ "260200",
15361
+ "260201",
15362
+ "260300",
15363
+ "260301",
15364
+ "270000",
15365
+ "270100",
15366
+ "270101",
15367
+ "270102",
15368
+ "270103",
15369
+ "270104",
15370
+ "270200",
15371
+ "270201",
15372
+ "270202",
15373
+ "270203",
15374
+ "270204",
15375
+ "270205",
15376
+ "270300",
15377
+ "270301",
15378
+ "270302",
15379
+ "270303",
15380
+ "270304",
15381
+ "280000",
15382
+ "280100",
15383
+ "280101",
15384
+ "280102",
15385
+ "280103",
15386
+ "280104",
15387
+ "280105",
15388
+ "280106",
15389
+ "280200",
15390
+ "280201",
15391
+ "280300",
15392
+ "280301",
15393
+ "280302",
15394
+ "280303",
15395
+ "290000",
15396
+ "290100",
15397
+ "290101",
15398
+ "290102",
15399
+ "290103",
15400
+ "290104",
15401
+ "290200",
15402
+ "290201",
15403
+ "290300",
15404
+ "290301",
15405
+ "290302",
15406
+ "290303",
15407
+ "290400",
15408
+ "290402",
15409
+ "290403",
15410
+ "290500",
15411
+ "290501",
15412
+ "300000",
15413
+ "300100",
15414
+ "300101",
15415
+ "300102",
15416
+ "300103",
15417
+ "300104",
15418
+ "300200",
15419
+ "300201",
15420
+ "300202",
15421
+ "300300",
15422
+ "300301",
15423
+ "310000",
15424
+ "310100",
15425
+ "310101",
15426
+ "310102",
15427
+ "310103",
15428
+ "310104",
15429
+ "310105",
15430
+ "310200",
15431
+ "310201",
15432
+ "310300",
15433
+ "310301",
15434
+ "320000",
15435
+ "320100",
15436
+ "320101",
15437
+ "320102",
15438
+ "320200",
15439
+ "320201",
15440
+ "320300",
15441
+ "320301",
15442
+ "320302",
15443
+ "320400",
15444
+ "320401",
15445
+ "320402",
15446
+ "320500",
15447
+ "320501",
15448
+ "320502",
15449
+ "320600",
15450
+ "320601",
15451
+ "320602",
15452
+ "320603",
15453
+ "320700",
15454
+ "320701",
15455
+ "320702",
15456
+ "320703",
15457
+ ])
15458
+ .optional(),
15459
+ purchase_order_number: z
15460
+ .string()
15461
+ .refine((text) => Array.from(text).length >= 1)
15462
+ .refine((text) => Array.from(text).length <= 20)
15463
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
15464
+ .optional(),
15465
+ purchase_order_on: z
15466
+ .string()
15467
+ .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))$/)
15468
+ .optional(),
15469
+ tax_id: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
15470
+ }),
15471
+ income_type: z.enum(["01", "02", "03", "04", "05", "06"]),
15472
+ payment_type: z.enum(["1", "2", "3"]),
15473
+ }))
15474
+ .and(z.strictObject({
15475
+ additional_information: zAdditionalDocumentInformation.optional(),
15476
+ deferred_submission: z.enum(["1"]).optional(),
15477
+ discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
15478
+ foreign_currency: zForeignCurrencyIntent.optional(),
15479
+ payment_due_on: z
15480
+ .string()
15481
+ .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))$/)
15482
+ .optional(),
15483
+ reference_information: zReferenceInformation.optional(),
15484
+ tax_inclusive_amounts: z.enum(["0", "1"]).optional(),
15485
+ }))
15486
+ .and(z.strictObject({
15487
+ currency: z.enum(["DOP"]),
15488
+ lines: z.array(zType31Line).min(1).max(1000),
15489
+ }));
14755
15490
  /**
14756
15491
  * Factura de Crédito Fiscal Electrónica, code 31.
14757
15492
  */
14758
15493
  export const zType31Intent = z.strictObject({
15494
+ additional_information: zAdditionalDocumentInformation.optional(),
14759
15495
  buyer: zBuyer,
14760
15496
  currency: z.enum(["DOP"]),
14761
15497
  deferred_submission: z.enum(["1"]).optional(),
@@ -15382,7 +16118,10 @@ export const zType31Intent = z.strictObject({
15382
16118
  "320702",
15383
16119
  "320703",
15384
16120
  ]),
15385
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
16121
+ phones: z
16122
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
16123
+ .min(1)
16124
+ .max(3),
15386
16125
  province_code: z.enum([
15387
16126
  "010000",
15388
16127
  "010100",
@@ -15987,7 +16726,8 @@ export const zType31Intent = z.strictObject({
15987
16726
  .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
15988
16727
  .optional(),
15989
16728
  }),
15990
- lines: z.array(zFiscalLineWithLegalTip).min(1).max(1000),
16729
+ lines: z.array(zType31Line).min(1).max(1000),
16730
+ payment_account: zPaymentAccount.optional(),
15991
16731
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
15992
16732
  payment_due_on: z
15993
16733
  .string()
@@ -16013,6 +16753,10 @@ export const zType32Buyer = z.union([
16013
16753
  identity_kind: z.enum(["anonymous"]),
16014
16754
  }),
16015
16755
  z.strictObject({
16756
+ delivery_phone: z
16757
+ .string()
16758
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
16759
+ .optional(),
16016
16760
  identity_kind: z.enum(["domestic"]),
16017
16761
  legal_name: z
16018
16762
  .string()
@@ -16022,6 +16766,10 @@ export const zType32Buyer = z.union([
16022
16766
  tax_id: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
16023
16767
  }),
16024
16768
  z.strictObject({
16769
+ delivery_phone: z
16770
+ .string()
16771
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
16772
+ .optional(),
16025
16773
  foreign_identifier: z
16026
16774
  .string()
16027
16775
  .refine((text) => Array.from(text).length >= 1)
@@ -16039,6 +16787,7 @@ export const zType32Buyer = z.union([
16039
16787
  * Factura de Consumo Electrónica, code 32.
16040
16788
  */
16041
16789
  export const zType32Intent = z.strictObject({
16790
+ additional_information: zAdditionalDocumentInformation.optional(),
16042
16791
  buyer: zType32Buyer,
16043
16792
  currency: z.enum(["DOP"]),
16044
16793
  deferred_submission: z.enum(["1"]).optional(),
@@ -16665,7 +17414,10 @@ export const zType32Intent = z.strictObject({
16665
17414
  "320702",
16666
17415
  "320703",
16667
17416
  ]),
16668
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
17417
+ phones: z
17418
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
17419
+ .min(1)
17420
+ .max(3),
16669
17421
  province_code: z.enum([
16670
17422
  "010000",
16671
17423
  "010100",
@@ -17271,6 +18023,7 @@ export const zType32Intent = z.strictObject({
17271
18023
  .optional(),
17272
18024
  }),
17273
18025
  lines: z.array(zFiscalLineWithLegalTip).min(1).max(1000),
18026
+ payment_account: zPaymentAccount.optional(),
17274
18027
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
17275
18028
  payment_due_on: z
17276
18029
  .string()
@@ -17288,6 +18041,7 @@ export const zType32Intent = z.strictObject({
17288
18041
  * Nota de Débito Electrónica, code 33.
17289
18042
  */
17290
18043
  export const zType33Intent = z.strictObject({
18044
+ additional_information: zAdditionalDocumentInformation.optional(),
17291
18045
  affected_document: z.strictObject({
17292
18046
  attribution: zAffectedFiscalDocumentAttribution,
17293
18047
  consumer_invoice_total: z
@@ -17931,7 +18685,10 @@ export const zType33Intent = z.strictObject({
17931
18685
  "320702",
17932
18686
  "320703",
17933
18687
  ]),
17934
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
18688
+ phones: z
18689
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
18690
+ .min(1)
18691
+ .max(3),
17935
18692
  province_code: z.enum([
17936
18693
  "010000",
17937
18694
  "010100",
@@ -18537,6 +19294,7 @@ export const zType33Intent = z.strictObject({
18537
19294
  .optional(),
18538
19295
  }),
18539
19296
  lines: z.array(zFiscalLineWithLegalTip).min(1).max(10000),
19297
+ payment_account: zPaymentAccount.optional(),
18540
19298
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
18541
19299
  payment_due_on: z
18542
19300
  .string()
@@ -18553,6 +19311,7 @@ export const zType33Intent = z.strictObject({
18553
19311
  * Nota de Crédito Electrónica, code 34.
18554
19312
  */
18555
19313
  export const zType34Intent = z.strictObject({
19314
+ additional_information: zAdditionalDocumentInformation.optional(),
18556
19315
  affected_document: z.strictObject({
18557
19316
  attribution: zAffectedFiscalDocumentAttribution,
18558
19317
  consumer_invoice_total: z
@@ -19196,7 +19955,10 @@ export const zType34Intent = z.strictObject({
19196
19955
  "320702",
19197
19956
  "320703",
19198
19957
  ]),
19199
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
19958
+ phones: z
19959
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
19960
+ .min(1)
19961
+ .max(3),
19200
19962
  province_code: z.enum([
19201
19963
  "010000",
19202
19964
  "010100",
@@ -19830,6 +20592,12 @@ export const zType41LineWithholding = z.strictObject({
19830
20592
  * One Type 41 line with the mandatory official withholding section.
19831
20593
  */
19832
20594
  export const zType41Line = z.strictObject({
20595
+ adjustments: z
20596
+ .strictObject({
20597
+ discounts: z.array(zLinePriceAdjustment).min(0).max(12).optional(),
20598
+ surcharges: z.array(zLinePriceAdjustment).min(0).max(12).optional(),
20599
+ })
20600
+ .optional(),
19833
20601
  billing_indicator: z.enum(["1", "2", "3", "4"]),
19834
20602
  goods_or_service_indicator: z.enum(["1", "2"]),
19835
20603
  item_codes: z.array(zFiscalItemCode).min(0).max(5).optional(),
@@ -20480,7 +21248,10 @@ export const zType43Intent = z.strictObject({
20480
21248
  "320702",
20481
21249
  "320703",
20482
21250
  ]),
20483
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
21251
+ phones: z
21252
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
21253
+ .min(1)
21254
+ .max(3),
20484
21255
  province_code: z.enum([
20485
21256
  "010000",
20486
21257
  "010100",
@@ -21085,8 +21856,13 @@ export const zType43Intent = z.strictObject({
21085
21856
  * Comprobante Electrónico para Regímenes Especiales, code 44.
21086
21857
  */
21087
21858
  export const zType44Intent = z.strictObject({
21859
+ additional_information: zAdditionalDocumentInformation.optional(),
21088
21860
  buyer: z.union([
21089
21861
  z.strictObject({
21862
+ delivery_phone: z
21863
+ .string()
21864
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
21865
+ .optional(),
21090
21866
  identity_kind: z.enum(["domestic"]),
21091
21867
  legal_name: z
21092
21868
  .string()
@@ -21096,6 +21872,10 @@ export const zType44Intent = z.strictObject({
21096
21872
  tax_id: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
21097
21873
  }),
21098
21874
  z.strictObject({
21875
+ delivery_phone: z
21876
+ .string()
21877
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
21878
+ .optional(),
21099
21879
  foreign_identifier: z
21100
21880
  .string()
21101
21881
  .refine((text) => Array.from(text).length >= 1)
@@ -21735,7 +22515,10 @@ export const zType44Intent = z.strictObject({
21735
22515
  "320702",
21736
22516
  "320703",
21737
22517
  ]),
21738
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
22518
+ phones: z
22519
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
22520
+ .min(1)
22521
+ .max(3),
21739
22522
  province_code: z.enum([
21740
22523
  "010000",
21741
22524
  "010100",
@@ -22341,6 +23124,7 @@ export const zType44Intent = z.strictObject({
22341
23124
  .optional(),
22342
23125
  }),
22343
23126
  lines: z.array(zSpecialRegimeLine).min(1).max(1000),
23127
+ payment_account: zPaymentAccount.optional(),
22344
23128
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
22345
23129
  payment_due_on: z
22346
23130
  .string()
@@ -22358,6 +23142,7 @@ export const zType44Intent = z.strictObject({
22358
23142
  * Comprobante Electrónico Gubernamental, code 45.
22359
23143
  */
22360
23144
  export const zType45Intent = z.strictObject({
23145
+ additional_information: zGovernmentAdditionalDocumentInformation.optional(),
22361
23146
  currency: z.enum(["DOP"]),
22362
23147
  deferred_submission: z.enum(["1"]).optional(),
22363
23148
  discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
@@ -22985,7 +23770,10 @@ export const zType45Intent = z.strictObject({
22985
23770
  "320702",
22986
23771
  "320703",
22987
23772
  ]),
22988
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
23773
+ phones: z
23774
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
23775
+ .min(1)
23776
+ .max(3),
22989
23777
  province_code: z.enum([
22990
23778
  "010000",
22991
23779
  "010100",
@@ -23591,6 +24379,7 @@ export const zType45Intent = z.strictObject({
23591
24379
  .optional(),
23592
24380
  }),
23593
24381
  lines: z.array(zFiscalLineWithLegalTip).min(1).max(1000),
24382
+ payment_account: zPaymentAccount.optional(),
23594
24383
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
23595
24384
  payment_due_on: z
23596
24385
  .string()
@@ -23604,10 +24393,61 @@ export const zType45Intent = z.strictObject({
23604
24393
  .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])$/),
23605
24394
  tax_inclusive_amounts: z.enum(["0", "1"]).optional(),
23606
24395
  });
24396
+ /**
24397
+ * A Type 46 line with its profile-permitted line-level discounts and surcharges.
24398
+ */
24399
+ export const zType46Line = z.strictObject({
24400
+ adjustments: z
24401
+ .strictObject({
24402
+ discounts: z.array(zLinePriceAdjustment).min(0).max(12).optional(),
24403
+ surcharges: z.array(zLinePriceAdjustment).min(0).max(12).optional(),
24404
+ })
24405
+ .optional(),
24406
+ billing_indicator: z.enum(["0", "1", "2", "3", "4"]),
24407
+ goods_or_service_indicator: z.enum(["1", "2"]),
24408
+ item_codes: z.array(zFiscalItemCode).min(0).max(5).optional(),
24409
+ measurement_unit: z.string().regex(/^([1-9]|[1-5][0-9]|6[0-2])$/),
24410
+ name: z
24411
+ .string()
24412
+ .refine((text) => Array.from(text).length >= 1)
24413
+ .refine((text) => Array.from(text).length <= 80)
24414
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
24415
+ quantity: z.string().regex(/^(?=[0-9.]*[1-9])[0-9]{1,16}(\.[0-9]{1,2})?$/),
24416
+ source_line_id: z
24417
+ .string()
24418
+ .refine((text) => Array.from(text).length >= 1)
24419
+ .refine((text) => Array.from(text).length <= 128)
24420
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
24421
+ unit_price: z.string().regex(/^[0-9]{1,16}(\.[0-9]{1,4})?$/),
24422
+ });
24423
+ export const zSourceType46Snapshot = zOptionalPaymentAllocations
24424
+ .and(z.strictObject({
24425
+ export_customer: zExportCustomer,
24426
+ export_eligibility: zCallerDeclaredExportEligibility,
24427
+ income_type: z.enum(["01", "02", "03", "04", "05", "06"]),
24428
+ payment_type: z.enum(["1", "2", "3"]),
24429
+ }))
24430
+ .and(z.strictObject({
24431
+ additional_information: zAdditionalDocumentInformation.optional(),
24432
+ deferred_submission: z.enum(["1"]).optional(),
24433
+ discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
24434
+ foreign_currency: zForeignCurrencyIntent.optional(),
24435
+ payment_due_on: z
24436
+ .string()
24437
+ .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))$/)
24438
+ .optional(),
24439
+ reference_information: zReferenceInformation.optional(),
24440
+ tax_inclusive_amounts: z.enum(["0", "1"]).optional(),
24441
+ }))
24442
+ .and(z.strictObject({
24443
+ currency: z.enum(["DOP"]),
24444
+ lines: z.array(zType46Line).min(1).max(1000),
24445
+ }));
23607
24446
  /**
23608
24447
  * Comprobante para Exportaciones Electrónico, code 46.
23609
24448
  */
23610
24449
  export const zType46Intent = z.strictObject({
24450
+ additional_information: zAdditionalDocumentInformation.optional(),
23611
24451
  currency: z.enum(["DOP"]),
23612
24452
  deferred_submission: z.enum(["1"]).optional(),
23613
24453
  discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
@@ -24235,7 +25075,10 @@ export const zType46Intent = z.strictObject({
24235
25075
  "320702",
24236
25076
  "320703",
24237
25077
  ]),
24238
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
25078
+ phones: z
25079
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
25080
+ .min(1)
25081
+ .max(3),
24239
25082
  province_code: z.enum([
24240
25083
  "010000",
24241
25084
  "010100",
@@ -24840,7 +25683,8 @@ export const zType46Intent = z.strictObject({
24840
25683
  .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
24841
25684
  .optional(),
24842
25685
  }),
24843
- lines: z.array(zFiscalLine).min(1).max(1000),
25686
+ lines: z.array(zType46Line).min(1).max(1000),
25687
+ payment_account: zPaymentAccount.optional(),
24844
25688
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
24845
25689
  payment_due_on: z
24846
25690
  .string()
@@ -25487,7 +26331,10 @@ export const zType47Intent = z.strictObject({
25487
26331
  "320702",
25488
26332
  "320703",
25489
26333
  ]),
25490
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
26334
+ phones: z
26335
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
26336
+ .min(1)
26337
+ .max(3),
25491
26338
  province_code: z.enum([
25492
26339
  "010000",
25493
26340
  "010100",
@@ -26081,6 +26928,7 @@ export const zType47Intent = z.strictObject({
26081
26928
  .optional(),
26082
26929
  }),
26083
26930
  lines: z.array(zForeignPaymentLine).min(1).max(1000),
26931
+ payment_account: zPaymentAccount.optional(),
26084
26932
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
26085
26933
  payment_due_on: z
26086
26934
  .string()
@@ -27306,6 +28154,7 @@ export const zSourceType41Snapshot = zOptionalPaymentAllocations
27306
28154
  supplier: zUnregisteredSupplier,
27307
28155
  }))
27308
28156
  .and(z.strictObject({
28157
+ additional_information: zAdditionalDocumentInformation.optional(),
27309
28158
  deferred_submission: z.enum(["1"]).optional(),
27310
28159
  discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
27311
28160
  foreign_currency: zForeignCurrencyIntent.optional(),
@@ -27401,6 +28250,7 @@ export const zFiscalOperationSubmission = z.union([
27401
28250
  * Comprobante Electrónico de Compras, code 41.
27402
28251
  */
27403
28252
  export const zType41Intent = z.strictObject({
28253
+ additional_information: zAdditionalDocumentInformation.optional(),
27404
28254
  currency: z.enum(["DOP"]),
27405
28255
  deferred_submission: z.enum(["1"]).optional(),
27406
28256
  discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
@@ -28031,7 +28881,10 @@ export const zType41Intent = z.strictObject({
28031
28881
  "320702",
28032
28882
  "320703",
28033
28883
  ]),
28034
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
28884
+ phones: z
28885
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
28886
+ .min(1)
28887
+ .max(3),
28035
28888
  province_code: z.enum([
28036
28889
  "010000",
28037
28890
  "010100",
@@ -28625,6 +29478,7 @@ export const zType41Intent = z.strictObject({
28625
29478
  .optional(),
28626
29479
  }),
28627
29480
  lines: z.array(zType41Line).min(1).max(1000),
29481
+ payment_account: zPaymentAccount.optional(),
28628
29482
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
28629
29483
  payment_due_on: z
28630
29484
  .string()
@@ -29473,6 +30327,42 @@ export const zCreateHostedTenantWebhookSecretRotationPath = z.object({
29473
30327
  * The rotation this Idempotency-Key already made.
29474
30328
  */
29475
30329
  export const zCreateHostedTenantWebhookSecretRotationResponse = zHostedWebhookSecretRotation;
30330
+ export const zUploadHostedCertificationTestSetBody = zCertificationTestSetUploadRequest;
30331
+ export const zUploadHostedCertificationTestSetHeaders = z.object({
30332
+ "Idempotency-Key": z
30333
+ .string()
30334
+ .refine((text) => Array.from(text).length >= 16)
30335
+ .refine((text) => Array.from(text).length <= 255)
30336
+ .regex(/^[A-Za-z0-9._:-]+$/),
30337
+ });
30338
+ export const zUploadHostedCertificationTestSetPath = z.object({
30339
+ attemptReference: z.string().regex(/^cert_[a-z0-9]{24,100}$/),
30340
+ });
30341
+ export const zUploadHostedCertificationTestSetQuery = z.object({
30342
+ checkout_tenant_id: z
30343
+ .string()
30344
+ .refine((text) => Array.from(text).length >= 1)
30345
+ .optional(),
30346
+ environment: zFiscalEnvironment.optional(),
30347
+ });
30348
+ /**
30349
+ * The original upload recovered by its idempotency key.
30350
+ */
30351
+ export const zUploadHostedCertificationTestSetResponse = zCertificationTestSetResource;
30352
+ export const zRetrieveHostedCertificationTestSetPath = z.object({
30353
+ attemptReference: z.string().regex(/^cert_[a-z0-9]{24,100}$/),
30354
+ });
30355
+ export const zRetrieveHostedCertificationTestSetQuery = z.object({
30356
+ checkout_tenant_id: z
30357
+ .string()
30358
+ .refine((text) => Array.from(text).length >= 1)
30359
+ .optional(),
30360
+ environment: zFiscalEnvironment.optional(),
30361
+ });
30362
+ /**
30363
+ * The latest retained workbook, or null when no set was uploaded.
30364
+ */
30365
+ export const zRetrieveHostedCertificationTestSetResponse = zCurrentCertificationTestSet;
29476
30366
  export const zListHostedInvoicesQuery = z.object({
29477
30367
  cursor: z
29478
30368
  .string()