@timbro/invoices 0.12.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +26 -0
  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 +117 -112
  9. package/dist/fiscal-engine-runtime.provenance.json +194 -189
  10. package/dist/generated/certification-api-contract.d.ts +430 -0
  11. package/dist/generated/certification-api-contract.d.ts.map +1 -0
  12. package/dist/generated/certification-api-contract.js +483 -0
  13. package/dist/generated/hosted/index.d.ts +3 -3
  14. package/dist/generated/hosted/index.d.ts.map +1 -1
  15. package/dist/generated/hosted/index.js +2 -2
  16. package/dist/generated/hosted/sdk.gen.d.ts +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 +1345 -105
  31. package/dist/generated/invoice-api-contract.d.ts.map +1 -1
  32. package/dist/generated/invoice-api-contract.js +1755 -163
  33. package/dist/generated/problem-catalog.d.ts.map +1 -1
  34. package/dist/generated/problem-catalog.js +2 -0
  35. package/dist/generated/sdk.gen.d.ts +5 -1
  36. package/dist/generated/sdk.gen.d.ts.map +1 -1
  37. package/dist/generated/sdk.gen.js +109 -1
  38. package/dist/generated/types.gen.d.ts +523 -49
  39. package/dist/generated/types.gen.d.ts.map +1 -1
  40. package/dist/generated/zod-response.gen.d.ts +22877 -5753
  41. package/dist/generated/zod-response.gen.d.ts.map +1 -1
  42. package/dist/generated/zod-response.gen.js +219 -3
  43. package/dist/generated/zod.gen.d.ts +17435 -2747
  44. package/dist/generated/zod.gen.d.ts.map +1 -1
  45. package/dist/generated/zod.gen.js +2317 -1439
  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 +2 -0
  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
  */
@@ -3647,6 +3669,108 @@ export const zIdentityEmailSchema = z
3647
3669
  .refine((text) => Array.from(text).length <= 320)
3648
3670
  .regex(/^(?=.{1,320}$)(?=[^@]{1,64}@)[A-Za-z0-9](?:[A-Za-z0-9_+-]*[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9_+-]*[A-Za-z0-9])?)*@(?=[^@]{1,254}$)[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*\.[A-Za-z]{2,63}$/);
3649
3671
  export const zInvitationStatus = z.enum(["pending", "accepted", "expired"]);
3672
+ export const zInvoiceAdditionalInformation = z.strictObject({
3673
+ referenceNumber: z
3674
+ .string()
3675
+ .refine((text) => Array.from(text).length >= 1)
3676
+ .refine((text) => Array.from(text).length <= 20)
3677
+ .regex(/^[0-9]+$/)
3678
+ .nullish(),
3679
+ shipment: z
3680
+ .strictObject({
3681
+ containerNumber: z
3682
+ .string()
3683
+ .refine((text) => Array.from(text).length >= 1)
3684
+ .refine((text) => Array.from(text).length <= 100)
3685
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
3686
+ .nullish(),
3687
+ deliveryNoteNumber: z
3688
+ .string()
3689
+ .refine((text) => Array.from(text).length >= 1)
3690
+ .refine((text) => Array.from(text).length <= 20)
3691
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
3692
+ .nullish(),
3693
+ driver: z
3694
+ .string()
3695
+ .refine((text) => Array.from(text).length >= 1)
3696
+ .refine((text) => Array.from(text).length <= 20)
3697
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
3698
+ .nullish(),
3699
+ grossWeight: z
3700
+ .string()
3701
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
3702
+ .nullish(),
3703
+ grossWeightUnit: z
3704
+ .string()
3705
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
3706
+ .nullish(),
3707
+ netWeight: z
3708
+ .string()
3709
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
3710
+ .nullish(),
3711
+ netWeightUnit: z
3712
+ .string()
3713
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
3714
+ .nullish(),
3715
+ packageCount: z
3716
+ .string()
3717
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
3718
+ .nullish(),
3719
+ packageUnit: z
3720
+ .string()
3721
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
3722
+ .nullish(),
3723
+ packageVolume: z
3724
+ .string()
3725
+ .regex(/^(?=[0-9.]*[1-9])[0-9]{1,16}(\.[0-9]{1,2})?$/)
3726
+ .nullish(),
3727
+ route: z
3728
+ .string()
3729
+ .refine((text) => Array.from(text).length >= 1)
3730
+ .refine((text) => Array.from(text).length <= 20)
3731
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
3732
+ .nullish(),
3733
+ shipmentDate: z.iso
3734
+ .date()
3735
+ .regex(/^(19|20)[0-9]{2}-[0-9]{2}-[0-9]{2}$/)
3736
+ .nullish(),
3737
+ shipmentNumber: z
3738
+ .string()
3739
+ .refine((text) => Array.from(text).length >= 1)
3740
+ .refine((text) => Array.from(text).length <= 25)
3741
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
3742
+ .nullish(),
3743
+ transportDocumentNumber: z
3744
+ .string()
3745
+ .refine((text) => Array.from(text).length >= 1)
3746
+ .refine((text) => Array.from(text).length <= 20)
3747
+ .regex(/^[0-9]+$/)
3748
+ .nullish(),
3749
+ transportZone: z
3750
+ .string()
3751
+ .refine((text) => Array.from(text).length >= 1)
3752
+ .refine((text) => Array.from(text).length <= 20)
3753
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
3754
+ .nullish(),
3755
+ vehicleFiche: z
3756
+ .string()
3757
+ .refine((text) => Array.from(text).length >= 1)
3758
+ .refine((text) => Array.from(text).length <= 10)
3759
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
3760
+ .nullish(),
3761
+ vehiclePlate: z
3762
+ .string()
3763
+ .refine((text) => Array.from(text).length >= 1)
3764
+ .refine((text) => Array.from(text).length <= 7)
3765
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
3766
+ .nullish(),
3767
+ volumeUnit: z
3768
+ .string()
3769
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
3770
+ .nullish(),
3771
+ })
3772
+ .optional(),
3773
+ });
3650
3774
  export const zInvoiceAffectedDocumentAttribution = z.union([
3651
3775
  z.strictObject({
3652
3776
  invoiceId: z.uuid(),
@@ -3671,6 +3795,10 @@ export const zInvoiceBuyer = z.strictObject({
3671
3795
  .refine((text) => Array.from(text).length <= 100)
3672
3796
  .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
3673
3797
  .nullish(),
3798
+ deliveryPhone: z
3799
+ .string()
3800
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
3801
+ .nullish(),
3674
3802
  email: z
3675
3803
  .string()
3676
3804
  .refine((text) => Array.from(text).length <= 80)
@@ -3710,6 +3838,10 @@ export const zInvoiceBuyerIdentity = z.union([
3710
3838
  kind: z.enum(["anonymous"]),
3711
3839
  }),
3712
3840
  z.strictObject({
3841
+ deliveryPhone: z
3842
+ .string()
3843
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
3844
+ .optional(),
3713
3845
  kind: z.enum(["domestic"]),
3714
3846
  legalName: z
3715
3847
  .string()
@@ -3719,6 +3851,10 @@ export const zInvoiceBuyerIdentity = z.union([
3719
3851
  taxId: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
3720
3852
  }),
3721
3853
  z.strictObject({
3854
+ deliveryPhone: z
3855
+ .string()
3856
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
3857
+ .optional(),
3722
3858
  foreignId: z
3723
3859
  .string()
3724
3860
  .refine((text) => Array.from(text).length >= 1)
@@ -3734,6 +3870,10 @@ export const zInvoiceBuyerIdentity = z.union([
3734
3870
  ]);
3735
3871
  export const zInvoiceConsumerBuyer = z.union([
3736
3872
  z.strictObject({
3873
+ deliveryPhone: z
3874
+ .string()
3875
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
3876
+ .nullish(),
3737
3877
  kind: z.enum(["domestic"]),
3738
3878
  legalName: z
3739
3879
  .string()
@@ -3743,6 +3883,10 @@ export const zInvoiceConsumerBuyer = z.union([
3743
3883
  taxId: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
3744
3884
  }),
3745
3885
  z.strictObject({
3886
+ deliveryPhone: z
3887
+ .string()
3888
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
3889
+ .nullish(),
3746
3890
  foreignId: z
3747
3891
  .string()
3748
3892
  .refine((text) => Array.from(text).length >= 1)
@@ -3827,6 +3971,10 @@ export const zInvoiceExpectedTotals = z.strictObject({
3827
3971
  * ForeignBuyer
3828
3972
  */
3829
3973
  export const zInvoiceExportBuyer = z.strictObject({
3974
+ deliveryPhone: z
3975
+ .string()
3976
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
3977
+ .nullish(),
3830
3978
  foreignId: z
3831
3979
  .string()
3832
3980
  .refine((text) => Array.from(text).length >= 1)
@@ -3929,6 +4077,108 @@ export const zInvoiceForeignPaymentResource = z.strictObject({
3929
4077
  payee: zInvoiceForeignPayee,
3930
4078
  withholdingBasis: zInvoiceForeignPaymentWithholdingBasis,
3931
4079
  });
4080
+ export const zInvoiceGovernmentAdditionalInformation = z.strictObject({
4081
+ referenceNumber: z
4082
+ .string()
4083
+ .refine((text) => Array.from(text).length >= 1)
4084
+ .refine((text) => Array.from(text).length <= 20)
4085
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
4086
+ .nullish(),
4087
+ shipment: z
4088
+ .strictObject({
4089
+ containerNumber: z
4090
+ .string()
4091
+ .refine((text) => Array.from(text).length >= 1)
4092
+ .refine((text) => Array.from(text).length <= 100)
4093
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
4094
+ .nullish(),
4095
+ deliveryNoteNumber: z
4096
+ .string()
4097
+ .refine((text) => Array.from(text).length >= 1)
4098
+ .refine((text) => Array.from(text).length <= 20)
4099
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
4100
+ .nullish(),
4101
+ driver: z
4102
+ .string()
4103
+ .refine((text) => Array.from(text).length >= 1)
4104
+ .refine((text) => Array.from(text).length <= 20)
4105
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
4106
+ .nullish(),
4107
+ grossWeight: z
4108
+ .string()
4109
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
4110
+ .nullish(),
4111
+ grossWeightUnit: z
4112
+ .string()
4113
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
4114
+ .nullish(),
4115
+ netWeight: z
4116
+ .string()
4117
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
4118
+ .nullish(),
4119
+ netWeightUnit: z
4120
+ .string()
4121
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
4122
+ .nullish(),
4123
+ packageCount: z
4124
+ .string()
4125
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
4126
+ .nullish(),
4127
+ packageUnit: z
4128
+ .string()
4129
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
4130
+ .nullish(),
4131
+ packageVolume: z
4132
+ .string()
4133
+ .regex(/^(?=[0-9.]*[1-9])[0-9]{1,16}(\.[0-9]{1,2})?$/)
4134
+ .nullish(),
4135
+ route: z
4136
+ .string()
4137
+ .refine((text) => Array.from(text).length >= 1)
4138
+ .refine((text) => Array.from(text).length <= 20)
4139
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
4140
+ .nullish(),
4141
+ shipmentDate: z.iso
4142
+ .date()
4143
+ .regex(/^(19|20)[0-9]{2}-[0-9]{2}-[0-9]{2}$/)
4144
+ .nullish(),
4145
+ shipmentNumber: z
4146
+ .string()
4147
+ .refine((text) => Array.from(text).length >= 1)
4148
+ .refine((text) => Array.from(text).length <= 25)
4149
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
4150
+ .nullish(),
4151
+ transportDocumentNumber: z
4152
+ .string()
4153
+ .refine((text) => Array.from(text).length >= 1)
4154
+ .refine((text) => Array.from(text).length <= 20)
4155
+ .regex(/^[0-9]+$/)
4156
+ .nullish(),
4157
+ transportZone: z
4158
+ .string()
4159
+ .refine((text) => Array.from(text).length >= 1)
4160
+ .refine((text) => Array.from(text).length <= 20)
4161
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
4162
+ .nullish(),
4163
+ vehicleFiche: z
4164
+ .string()
4165
+ .refine((text) => Array.from(text).length >= 1)
4166
+ .refine((text) => Array.from(text).length <= 10)
4167
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
4168
+ .nullish(),
4169
+ vehiclePlate: z
4170
+ .string()
4171
+ .refine((text) => Array.from(text).length >= 1)
4172
+ .refine((text) => Array.from(text).length <= 7)
4173
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
4174
+ .nullish(),
4175
+ volumeUnit: z
4176
+ .string()
4177
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
4178
+ .nullish(),
4179
+ })
4180
+ .optional(),
4181
+ });
3932
4182
  export const zInvoiceGovernmentEligibility = z.union([
3933
4183
  z.strictObject({
3934
4184
  authorityReference: z
@@ -4039,6 +4289,20 @@ export const zInvoiceLatestEvent = z.strictObject({
4039
4289
  occurredAt: z.iso.datetime(),
4040
4290
  sequence: z.string().regex(/^[1-9][0-9]*$/),
4041
4291
  });
4292
+ export const zInvoiceLinePriceAdjustmentResource = z.union([
4293
+ z.strictObject({
4294
+ amount: z.string().regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/),
4295
+ kind: z.enum(["fixed_amount"]),
4296
+ }),
4297
+ z.strictObject({
4298
+ kind: z.enum(["percentage"]),
4299
+ percentage: z.string().regex(/^(?=[0-9.]*[1-9])[0-9]{1,3}(\.[0-9]{1,2})?$/),
4300
+ }),
4301
+ ]);
4302
+ export const zInvoiceLinePriceAdjustmentsResource = z.strictObject({
4303
+ discounts: z.array(zInvoiceLinePriceAdjustmentResource),
4304
+ surcharges: z.array(zInvoiceLinePriceAdjustmentResource),
4305
+ });
4042
4306
  export const zInvoiceMinorExpensePaymentTerms = z.union([
4043
4307
  z.strictObject({
4044
4308
  type: z.enum(["immediate"]),
@@ -4051,6 +4315,20 @@ export const zInvoiceNumbering = z.strictObject({
4051
4315
  eNcf: z.string().regex(/^E(31|32|33|34|41|43|44|45|46|47)[0-9]{10}$/),
4052
4316
  sequenceExpiresOn: z.string().nullish(),
4053
4317
  });
4318
+ export const zInvoicePaymentAccountResource = z.strictObject({
4319
+ accountNumber: z
4320
+ .string()
4321
+ .refine((text) => Array.from(text).length >= 1)
4322
+ .refine((text) => Array.from(text).length <= 28)
4323
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4324
+ .nullable(),
4325
+ bankName: z
4326
+ .string()
4327
+ .refine((text) => Array.from(text).length >= 1)
4328
+ .refine((text) => Array.from(text).length <= 75)
4329
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4330
+ .nullable(),
4331
+ });
4054
4332
  export const zInvoicePdfLayout = z.enum(["a4", "receipt80mm"]);
4055
4333
  export const zInvoicePdfStage = z.enum([
4056
4334
  "awaitingSignedSource",
@@ -4100,74 +4378,230 @@ export const zInvoiceReceiptAccess = z.strictObject({
4100
4378
  });
4101
4379
  export const zInvoiceReceiptCurrency = z.enum(["DOP"]);
4102
4380
  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([
4381
+ export const zInvoiceReferenceAttributionResource = z.union([
4156
4382
  z.strictObject({
4157
- authorityReference: z
4383
+ fiscalOperationId: z
4158
4384
  .string()
4159
- .refine((text) => Array.from(text).length >= 1)
4160
- .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
4161
- basisKind: z.enum(["special_law"]),
4385
+ .regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),
4386
+ kind: z.enum(["internal_operation"]),
4162
4387
  }),
4163
4388
  z.strictObject({
4164
- authorityReference: z
4389
+ environment: zFiscalEnvironment,
4390
+ issuerTaxId: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
4391
+ kind: z.enum(["external_document"]),
4392
+ sourceReference: z
4165
4393
  .string()
4166
4394
  .refine((text) => Array.from(text).length >= 1)
4395
+ .refine((text) => Array.from(text).length <= 250)
4167
4396
  .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
4168
- basisKind: z.enum(["ratified_contract"]),
4169
4397
  }),
4170
- z.strictObject({
4398
+ ]);
4399
+ export const zInvoiceReferenceInformation = z.strictObject({
4400
+ attribution: z.union([
4401
+ z.strictObject({
4402
+ fiscalOperationId: z
4403
+ .string()
4404
+ .regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),
4405
+ kind: z.enum(["internal_operation"]),
4406
+ }),
4407
+ z.strictObject({
4408
+ environment: zFiscalEnvironment,
4409
+ issuerTaxId: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
4410
+ kind: z.enum(["external_document"]),
4411
+ sourceReference: z
4412
+ .string()
4413
+ .refine((text) => Array.from(text).length >= 1)
4414
+ .refine((text) => Array.from(text).length <= 250)
4415
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
4416
+ }),
4417
+ ]),
4418
+ fiscalNumber: z.string().regex(/^(B[0-9]{10}|E[0-9]{12}|[AP][0-9]{18})$/),
4419
+ issuedOn: z.iso.date().regex(/^(19|20)[0-9]{2}-[0-9]{2}-[0-9]{2}$/),
4420
+ modificationCode: z.enum(["4", "5"]),
4421
+ });
4422
+ export const zInvoiceReferenceInformationResource = z.strictObject({
4423
+ attribution: zInvoiceReferenceAttributionResource,
4424
+ fiscalNumber: z.string().regex(/^(B[0-9]{10}|E[0-9]{12}|[AP][0-9]{18})$/),
4425
+ issuedOn: z
4426
+ .string()
4427
+ .regex(/^(?:(?:31-(?:0?[13578]|1[02])|(?:29|30)-(?:0?[13-9]|1[0-2])|(?:0?[1-9]|1[0-9]|2[0-8])-(?:0?[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-0?2-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000))$/),
4428
+ modificationCode: z.enum(["4", "5"]),
4429
+ });
4430
+ export const zInvoiceShipmentInformationResource = z.strictObject({
4431
+ containerNumber: z
4432
+ .string()
4433
+ .refine((text) => Array.from(text).length >= 1)
4434
+ .refine((text) => Array.from(text).length <= 100)
4435
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4436
+ .nullable(),
4437
+ deliveryNoteNumber: z
4438
+ .string()
4439
+ .refine((text) => Array.from(text).length >= 1)
4440
+ .refine((text) => Array.from(text).length <= 20)
4441
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4442
+ .nullable(),
4443
+ driver: z
4444
+ .string()
4445
+ .refine((text) => Array.from(text).length >= 1)
4446
+ .refine((text) => Array.from(text).length <= 20)
4447
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4448
+ .nullable(),
4449
+ grossWeight: z
4450
+ .string()
4451
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
4452
+ .nullable(),
4453
+ grossWeightUnit: z
4454
+ .string()
4455
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
4456
+ .nullable(),
4457
+ netWeight: z
4458
+ .string()
4459
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
4460
+ .nullable(),
4461
+ netWeightUnit: z
4462
+ .string()
4463
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
4464
+ .nullable(),
4465
+ packageCount: z
4466
+ .string()
4467
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
4468
+ .nullable(),
4469
+ packageUnit: z
4470
+ .string()
4471
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
4472
+ .nullable(),
4473
+ packageVolume: z
4474
+ .string()
4475
+ .regex(/^(?=[0-9.]*[1-9])[0-9]{1,16}(\.[0-9]{1,2})?$/)
4476
+ .nullable(),
4477
+ route: z
4478
+ .string()
4479
+ .refine((text) => Array.from(text).length >= 1)
4480
+ .refine((text) => Array.from(text).length <= 20)
4481
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4482
+ .nullable(),
4483
+ shipmentDate: z
4484
+ .string()
4485
+ .regex(/^(?:(?:31-(?:0?[13578]|1[02])|(?:29|30)-(?:0?[13-9]|1[0-2])|(?:0?[1-9]|1[0-9]|2[0-8])-(?:0?[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-0?2-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000))$/)
4486
+ .nullable(),
4487
+ shipmentNumber: z
4488
+ .string()
4489
+ .refine((text) => Array.from(text).length >= 1)
4490
+ .refine((text) => Array.from(text).length <= 25)
4491
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4492
+ .nullable(),
4493
+ transportDocumentNumber: z
4494
+ .string()
4495
+ .refine((text) => Array.from(text).length >= 1)
4496
+ .refine((text) => Array.from(text).length <= 20)
4497
+ .regex(/^[0-9]+$/)
4498
+ .nullable(),
4499
+ transportZone: z
4500
+ .string()
4501
+ .refine((text) => Array.from(text).length >= 1)
4502
+ .refine((text) => Array.from(text).length <= 20)
4503
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4504
+ .nullable(),
4505
+ vehicleFiche: z
4506
+ .string()
4507
+ .refine((text) => Array.from(text).length >= 1)
4508
+ .refine((text) => Array.from(text).length <= 10)
4509
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4510
+ .nullable(),
4511
+ vehiclePlate: z
4512
+ .string()
4513
+ .refine((text) => Array.from(text).length >= 1)
4514
+ .refine((text) => Array.from(text).length <= 7)
4515
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
4516
+ .nullable(),
4517
+ volumeUnit: z
4518
+ .string()
4519
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
4520
+ .nullable(),
4521
+ });
4522
+ export const zInvoiceAdditionalInformationResource = z.strictObject({
4523
+ referenceNumber: z
4524
+ .string()
4525
+ .refine((text) => Array.from(text).length <= 20)
4526
+ .nullable(),
4527
+ shipment: zInvoiceShipmentInformationResource.nullable(),
4528
+ });
4529
+ /**
4530
+ * The signature facts DGII requires on every printed e-CF, read from the signed document.
4531
+ *
4532
+ * Print the buyer's copy after DGII accepts the Invoice; DGII sequences the printed e-CF after
4533
+ * its validation result, including the Type 32 below DOP 250,000 it validates by RFCE summary.
4534
+ */
4535
+ export const zInvoiceSignature = z.strictObject({
4536
+ securityCode: z.string().regex(/^[A-Za-z0-9+/]{6}$/),
4537
+ signedAt: z.string().regex(/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}-04:00$/),
4538
+ verificationUrl: z.url().regex(/^https:\/\/(ecf|fc)\.dgii\.gov\.do\//),
4539
+ });
4540
+ export const zInvoiceSource = z.strictObject({
4541
+ contentSha256: z.string().regex(/^[0-9a-f]{64}$/),
4542
+ id: z.string(),
4543
+ version: z.string(),
4544
+ });
4545
+ export const zInvoiceSourceInput = z.strictObject({
4546
+ id: z
4547
+ .string()
4548
+ .refine((text) => Array.from(text).length >= 1)
4549
+ .refine((text) => Array.from(text).length <= 128)
4550
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
4551
+ version: z
4552
+ .string()
4553
+ .refine((text) => Array.from(text).length >= 1)
4554
+ .refine((text) => Array.from(text).length <= 128)
4555
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
4556
+ });
4557
+ export const zInvoiceSpecialRegimeBuyer = z.union([
4558
+ z.strictObject({
4559
+ deliveryPhone: z
4560
+ .string()
4561
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
4562
+ .nullish(),
4563
+ kind: z.enum(["domestic"]),
4564
+ legalName: z
4565
+ .string()
4566
+ .refine((text) => Array.from(text).length >= 1)
4567
+ .refine((text) => Array.from(text).length <= 150)
4568
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
4569
+ taxId: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
4570
+ }),
4571
+ z.strictObject({
4572
+ deliveryPhone: z
4573
+ .string()
4574
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
4575
+ .nullish(),
4576
+ foreignId: z
4577
+ .string()
4578
+ .refine((text) => Array.from(text).length >= 1)
4579
+ .refine((text) => Array.from(text).length <= 20)
4580
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
4581
+ kind: z.enum(["foreign_diplomat"]),
4582
+ legalName: z
4583
+ .string()
4584
+ .refine((text) => Array.from(text).length >= 1)
4585
+ .refine((text) => Array.from(text).length <= 150)
4586
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
4587
+ }),
4588
+ ]);
4589
+ export const zInvoiceSpecialRegimeEligibility = z.union([
4590
+ z.strictObject({
4591
+ authorityReference: z
4592
+ .string()
4593
+ .refine((text) => Array.from(text).length >= 1)
4594
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
4595
+ basisKind: z.enum(["special_law"]),
4596
+ }),
4597
+ z.strictObject({
4598
+ authorityReference: z
4599
+ .string()
4600
+ .refine((text) => Array.from(text).length >= 1)
4601
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
4602
+ basisKind: z.enum(["ratified_contract"]),
4603
+ }),
4604
+ z.strictObject({
4171
4605
  authorityReference: z
4172
4606
  .string()
4173
4607
  .refine((text) => Array.from(text).length >= 1)
@@ -5699,6 +6133,26 @@ export const zLegalIssuerPage = z.strictObject({
5699
6133
  export const zLegalIssuerResource = z.strictObject({
5700
6134
  legal_issuer: zLegalIssuer,
5701
6135
  });
6136
+ /**
6137
+ * One fixed-amount or percentage discount or surcharge on a fiscal line.
6138
+ */
6139
+ export const zLinePriceAdjustment = z.union([
6140
+ z.strictObject({
6141
+ amount: z.string().regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/),
6142
+ kind: z.enum(["fixed_amount"]),
6143
+ }),
6144
+ z.strictObject({
6145
+ kind: z.enum(["percentage"]),
6146
+ percentage: z.string().regex(/^(?=[0-9.]*[1-9])[0-9]{1,3}(\.[0-9]{1,2})?$/),
6147
+ }),
6148
+ ]);
6149
+ /**
6150
+ * Line-level discounts and surcharges, kept separate from document-level adjustments.
6151
+ */
6152
+ export const zLinePriceAdjustments = z.strictObject({
6153
+ discounts: z.array(zLinePriceAdjustment).min(0).max(12).optional(),
6154
+ surcharges: z.array(zLinePriceAdjustment).min(0).max(12).optional(),
6155
+ });
5702
6156
  export const zMembershipRole = z.enum(["administrator", "operator"]);
5703
6157
  export const zAcceptedMembership = z.strictObject({
5704
6158
  organization_id: z.uuid(),
@@ -5852,6 +6306,23 @@ export const zOrganizationIdentity = z.strictObject({
5852
6306
  export const zOrganizationResource = z.strictObject({
5853
6307
  organization: zOrganizationIdentity,
5854
6308
  });
6309
+ /**
6310
+ * Bank details that accompany an optional payment method table.
6311
+ */
6312
+ export const zPaymentAccount = z.strictObject({
6313
+ account_number: z
6314
+ .string()
6315
+ .refine((text) => Array.from(text).length >= 1)
6316
+ .refine((text) => Array.from(text).length <= 28)
6317
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
6318
+ .optional(),
6319
+ bank_name: z
6320
+ .string()
6321
+ .refine((text) => Array.from(text).length >= 1)
6322
+ .refine((text) => Array.from(text).length <= 75)
6323
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
6324
+ .optional(),
6325
+ });
5855
6326
  /**
5856
6327
  * One authoritative payment-method and amount pair from `TablaFormasPago`.
5857
6328
  */
@@ -5863,6 +6334,7 @@ export const zPaymentAllocation = z.strictObject({
5863
6334
  * An optional payment table for profiles whose official schema permits its omission.
5864
6335
  */
5865
6336
  export const zOptionalPaymentAllocations = z.strictObject({
6337
+ payment_account: zPaymentAccount.optional(),
5866
6338
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
5867
6339
  });
5868
6340
  export const zPrintedRepresentationA4ProfileVersion = z.enum(["a4.v1"]);
@@ -6101,6 +6573,8 @@ export const zPublicProblemCode = z.enum([
6101
6573
  "request_body_timeout",
6102
6574
  "malformed_json",
6103
6575
  "invalid_request",
6576
+ "certification_environment_required",
6577
+ "certification_test_set_invalid",
6104
6578
  "invalid_collection_query",
6105
6579
  "invalid_collection_cursor",
6106
6580
  "document_type_not_enabled",
@@ -6433,6 +6907,24 @@ export const zRequirementId = z.enum([
6433
6907
  "first_fiscal_operation",
6434
6908
  ]);
6435
6909
  export const zRequirementStatus = z.enum(["complete", "pending", "blocked", "action_required"]);
6910
+ export const zRetainedCertificationWorkbook = z.strictObject({
6911
+ name: z.string(),
6912
+ sha256: z.string().regex(/^[0-9a-f]{64}$/),
6913
+ sizeBytes: z.int().gte(1).lte(3145728),
6914
+ });
6915
+ export const zCertificationTestSetResource = z.strictObject({
6916
+ attemptReference: z.string(),
6917
+ createdAt: z.iso.datetime(),
6918
+ file: zRetainedCertificationWorkbook,
6919
+ generation: z.string().regex(/^[1-9][0-9]*$/),
6920
+ id: z.uuid(),
6921
+ kind: zCertificationTestSetKind,
6922
+ object: zCertificationTestSetObject,
6923
+ review: zCertificationTestSetReview,
6924
+ });
6925
+ export const zCurrentCertificationTestSet = z.strictObject({
6926
+ current: zCertificationTestSetResource.nullable(),
6927
+ });
6436
6928
  export const zRevokeCertificateCustodyCertificateVersionRequest = z.strictObject({
6437
6929
  certificate_custody_certificate_version: zLedgerCounter,
6438
6930
  });
@@ -6442,6 +6934,10 @@ export const zRevokeCertificateCustodyCertificateVersionRequest = z.strictObject
6442
6934
  export const zSalesTermsSpecialRegimeBuyerOptionalPaymentAllocations = z.strictObject({
6443
6935
  buyer: z.union([
6444
6936
  z.strictObject({
6937
+ delivery_phone: z
6938
+ .string()
6939
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
6940
+ .optional(),
6445
6941
  identity_kind: z.enum(["domestic"]),
6446
6942
  legal_name: z
6447
6943
  .string()
@@ -6451,6 +6947,10 @@ export const zSalesTermsSpecialRegimeBuyerOptionalPaymentAllocations = z.strictO
6451
6947
  tax_id: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
6452
6948
  }),
6453
6949
  z.strictObject({
6950
+ delivery_phone: z
6951
+ .string()
6952
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
6953
+ .optional(),
6454
6954
  foreign_identifier: z
6455
6955
  .string()
6456
6956
  .refine((text) => Array.from(text).length >= 1)
@@ -6465,6 +6965,7 @@ export const zSalesTermsSpecialRegimeBuyerOptionalPaymentAllocations = z.strictO
6465
6965
  }),
6466
6966
  ]),
6467
6967
  income_type: z.enum(["01", "02", "03", "04", "05", "06"]),
6968
+ payment_account: zPaymentAccount.optional(),
6468
6969
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
6469
6970
  payment_type: z.enum(["1", "2", "3"]),
6470
6971
  });
@@ -6483,80 +6984,199 @@ export const zSchemaValidationOutcome = z.enum(["succeeded", "failed"]);
6483
6984
  * Stage at which a fiscal XML artifact was validated.
6484
6985
  */
6485
6986
  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
6987
  /**
6542
- * Named additional taxes supported by the common Source contract.
6988
+ * Typed shipping and transport facts admitted by the official `InformacionesAdicionales` area.
6543
6989
  */
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",
6554
- "target_verification_failed",
6555
- "credential_reprovisioning_required",
6556
- ]);
6557
- export const zSourceConnectionActivationPhase = z.enum([
6558
- "credential_staging",
6559
- "target_configuring",
6990
+ export const zShipmentInformation = z.strictObject({
6991
+ container_number: z
6992
+ .string()
6993
+ .refine((text) => Array.from(text).length >= 1)
6994
+ .refine((text) => Array.from(text).length <= 100)
6995
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
6996
+ .optional(),
6997
+ delivery_note_number: z
6998
+ .string()
6999
+ .refine((text) => Array.from(text).length >= 1)
7000
+ .refine((text) => Array.from(text).length <= 20)
7001
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
7002
+ .optional(),
7003
+ driver: z
7004
+ .string()
7005
+ .refine((text) => Array.from(text).length >= 1)
7006
+ .refine((text) => Array.from(text).length <= 20)
7007
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
7008
+ .optional(),
7009
+ gross_weight: z
7010
+ .string()
7011
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
7012
+ .optional(),
7013
+ gross_weight_unit: z
7014
+ .string()
7015
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
7016
+ .optional(),
7017
+ net_weight: z
7018
+ .string()
7019
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
7020
+ .optional(),
7021
+ net_weight_unit: z
7022
+ .string()
7023
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
7024
+ .optional(),
7025
+ package_count: z
7026
+ .string()
7027
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
7028
+ .optional(),
7029
+ package_unit: z
7030
+ .string()
7031
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
7032
+ .optional(),
7033
+ package_volume: z
7034
+ .string()
7035
+ .regex(/^(?=[0-9.]*[1-9])[0-9]{1,16}(\.[0-9]{1,2})?$/)
7036
+ .optional(),
7037
+ route: z
7038
+ .string()
7039
+ .refine((text) => Array.from(text).length >= 1)
7040
+ .refine((text) => Array.from(text).length <= 20)
7041
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
7042
+ .optional(),
7043
+ shipment_date: z
7044
+ .string()
7045
+ .regex(/^(?:(?:31-(?:0?[13578]|1[02])|(?:29|30)-(?:0?[13-9]|1[0-2])|(?:0?[1-9]|1[0-9]|2[0-8])-(?:0?[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-0?2-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000))$/)
7046
+ .optional(),
7047
+ shipment_number: z
7048
+ .string()
7049
+ .refine((text) => Array.from(text).length >= 1)
7050
+ .refine((text) => Array.from(text).length <= 25)
7051
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
7052
+ .optional(),
7053
+ transport_document_number: z
7054
+ .string()
7055
+ .refine((text) => Array.from(text).length >= 1)
7056
+ .refine((text) => Array.from(text).length <= 20)
7057
+ .regex(/^[0-9]+$/)
7058
+ .optional(),
7059
+ transport_zone: z
7060
+ .string()
7061
+ .refine((text) => Array.from(text).length >= 1)
7062
+ .refine((text) => Array.from(text).length <= 20)
7063
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
7064
+ .optional(),
7065
+ vehicle_fiche: z
7066
+ .string()
7067
+ .refine((text) => Array.from(text).length >= 1)
7068
+ .refine((text) => Array.from(text).length <= 10)
7069
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
7070
+ .optional(),
7071
+ vehicle_plate: z
7072
+ .string()
7073
+ .refine((text) => Array.from(text).length >= 1)
7074
+ .refine((text) => Array.from(text).length <= 7)
7075
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
7076
+ .optional(),
7077
+ volume_unit: z
7078
+ .string()
7079
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
7080
+ .optional(),
7081
+ });
7082
+ /**
7083
+ * Additional official document facts emitted in `InformacionesAdicionales`.
7084
+ */
7085
+ export const zAdditionalDocumentInformation = z.strictObject({
7086
+ reference_number: z
7087
+ .string()
7088
+ .refine((text) => Array.from(text).length >= 1)
7089
+ .refine((text) => Array.from(text).length <= 20)
7090
+ .regex(/^[0-9]+$/)
7091
+ .optional(),
7092
+ shipment: zShipmentInformation.optional(),
7093
+ });
7094
+ /**
7095
+ * Additional document facts for the governmental e-CF profile, whose reference may be alphanumeric.
7096
+ */
7097
+ export const zGovernmentAdditionalDocumentInformation = z.strictObject({
7098
+ reference_number: z
7099
+ .string()
7100
+ .refine((text) => Array.from(text).length >= 1)
7101
+ .refine((text) => Array.from(text).length <= 20)
7102
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
7103
+ .optional(),
7104
+ shipment: zShipmentInformation.optional(),
7105
+ });
7106
+ export const zSignedDocumentReadinessResource = z.union([
7107
+ z.strictObject({
7108
+ status: z.enum(["not_applicable"]),
7109
+ }),
7110
+ z.strictObject({
7111
+ status: z.enum(["pending"]),
7112
+ }),
7113
+ z.strictObject({
7114
+ artifact_id: z.uuid(),
7115
+ artifact_kind: zFiscalArtifactKind,
7116
+ byte_length: z
7117
+ .int()
7118
+ .gte(0)
7119
+ .max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
7120
+ created_at: z.iso.datetime(),
7121
+ media_type: zFiscalArtifactMediaType,
7122
+ sha256: z.string().regex(/^[0-9a-f]{64}$/),
7123
+ status: z.enum(["ready"]),
7124
+ }),
7125
+ ]);
7126
+ /**
7127
+ * The active signing certificate, judged at the moment of the read.
7128
+ */
7129
+ export const zSigningCertificateReadiness = z.union([
7130
+ z.strictObject({
7131
+ notAfter: z.iso.datetime(),
7132
+ notBefore: z.iso.datetime(),
7133
+ sha256: z.string().regex(/^[0-9a-f]{64}$/),
7134
+ status: z.enum(["ready"]),
7135
+ }),
7136
+ z.strictObject({
7137
+ notAfter: z.iso.datetime(),
7138
+ notBefore: z.iso.datetime(),
7139
+ sha256: z.string().regex(/^[0-9a-f]{64}$/),
7140
+ status: z.enum(["expired"]),
7141
+ }),
7142
+ z.strictObject({
7143
+ notAfter: z.iso.datetime(),
7144
+ notBefore: z.iso.datetime(),
7145
+ sha256: z.string().regex(/^[0-9a-f]{64}$/),
7146
+ status: z.enum(["notYetValid"]),
7147
+ }),
7148
+ z.strictObject({
7149
+ status: z.enum(["missing"]),
7150
+ }),
7151
+ ]);
7152
+ /**
7153
+ * Whether the issuer can issue each e-CF type now in this environment.
7154
+ */
7155
+ export const zIssuanceReadiness = z.strictObject({
7156
+ certificate: zSigningCertificateReadiness,
7157
+ documentTypes: z.array(zDocumentTypeIssuanceReadiness),
7158
+ environment: zFiscalEnvironment,
7159
+ issuerTaxId: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
7160
+ });
7161
+ /**
7162
+ * Named additional taxes supported by the common Source contract.
7163
+ */
7164
+ export const zSourceAdditionalTax = z.enum(["legal_tip"]);
7165
+ export const zSourceBuyerIdentityRequirement = z.enum(["required", "optional"]);
7166
+ export const zSourceConnectionActionReason = z.enum([
7167
+ "authorization_disabled",
7168
+ "authorization_scope_insufficient",
7169
+ "target_access_removed",
7170
+ "target_origin_unavailable",
7171
+ "target_configuration_rejected",
7172
+ "target_deployment_failed",
7173
+ "target_release_identity_unavailable",
7174
+ "target_verification_failed",
7175
+ "credential_reprovisioning_required",
7176
+ ]);
7177
+ export const zSourceConnectionActivationPhase = z.enum([
7178
+ "credential_staging",
7179
+ "target_configuring",
6560
7180
  "deployment_requesting",
6561
7181
  "deployment_observing",
6562
7182
  "deployment_promotion_requesting",
@@ -6830,6 +7450,7 @@ export const zSourceGovernmentEligibility = z.union([
6830
7450
  export const zSourceItemKind = z.enum(["good", "service"]);
6831
7451
  export const zInvoiceItemResource = z.strictObject({
6832
7452
  additionalTaxCodes: z.array(z.string()),
7453
+ adjustments: zInvoiceLinePriceAdjustmentsResource.nullable(),
6833
7454
  description: z.string(),
6834
7455
  id: z.string(),
6835
7456
  itemCodes: z.array(zInvoiceItemCodeResource),
@@ -6846,6 +7467,7 @@ export const zInvoiceItemResource = z.strictObject({
6846
7467
  */
6847
7468
  export const zSourceMeasurementUnit = z.enum(["unit", "kilogram", "litre", "metre", "piece"]);
6848
7469
  export const zInvoiceExportItem = z.strictObject({
7470
+ adjustments: zLinePriceAdjustments.nullish(),
6849
7471
  description: z
6850
7472
  .string()
6851
7473
  .refine((text) => Array.from(text).length >= 1)
@@ -6903,6 +7525,7 @@ export const zInvoiceGovernmentItem = z.strictObject({
6903
7525
  unitPrice: z.string().regex(/^[0-9]{1,16}(\.[0-9]{1,4})?$/),
6904
7526
  });
6905
7527
  export const zInvoiceItem = z.strictObject({
7528
+ adjustments: zLinePriceAdjustments.nullish(),
6906
7529
  description: z
6907
7530
  .string()
6908
7531
  .refine((text) => Array.from(text).length >= 1)
@@ -6941,6 +7564,7 @@ export const zInvoiceMinorExpenseItem = z.strictObject({
6941
7564
  unitPrice: z.string().regex(/^[0-9]{1,16}(\.[0-9]{1,4})?$/),
6942
7565
  });
6943
7566
  export const zInvoicePurchaseItem = z.strictObject({
7567
+ adjustments: zLinePriceAdjustments.nullish(),
6944
7568
  description: z
6945
7569
  .string()
6946
7570
  .refine((text) => Array.from(text).length >= 1)
@@ -7003,6 +7627,22 @@ export const zInvoicePaymentAllocation = z.strictObject({
7003
7627
  export const zInvoicePaymentTerms = z.union([
7004
7628
  z.strictObject({
7005
7629
  allocations: z.array(zInvoicePaymentAllocation).min(1).max(7).nullish(),
7630
+ paymentAccount: z
7631
+ .strictObject({
7632
+ accountNumber: z
7633
+ .string()
7634
+ .refine((text) => Array.from(text).length >= 1)
7635
+ .refine((text) => Array.from(text).length <= 28)
7636
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
7637
+ .nullish(),
7638
+ bankName: z
7639
+ .string()
7640
+ .refine((text) => Array.from(text).length >= 1)
7641
+ .refine((text) => Array.from(text).length <= 75)
7642
+ .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
7643
+ .nullish(),
7644
+ })
7645
+ .optional(),
7006
7646
  type: z.enum(["immediate"]),
7007
7647
  }),
7008
7648
  z.strictObject({
@@ -7016,6 +7656,7 @@ export const zInvoicePaymentTerms = z.union([
7016
7656
  export const zInvoicePaymentTermsResource = z.union([
7017
7657
  z.strictObject({
7018
7658
  allocations: z.array(zInvoicePaymentAllocation).max(7),
7659
+ paymentAccount: zInvoicePaymentAccountResource.optional(),
7019
7660
  type: z.enum(["immediate"]),
7020
7661
  }),
7021
7662
  z.strictObject({
@@ -7050,6 +7691,7 @@ export const zInvoiceReceipt = z.strictObject({
7050
7691
  });
7051
7692
  export const zInvoiceRequest = z.union([
7052
7693
  z.strictObject({
7694
+ additionalInformation: zInvoiceAdditionalInformation.nullish(),
7053
7695
  buyer: zInvoiceBuyer,
7054
7696
  currency: z.enum(["DOP"]),
7055
7697
  expectedTotals: zInvoiceExpectedTotals.nullish(),
@@ -7072,10 +7714,12 @@ export const zInvoiceRequest = z.union([
7072
7714
  numbering: zInvoiceNumbering.nullish(),
7073
7715
  paymentTerms: zInvoicePaymentTerms,
7074
7716
  pdfLayout: zInvoicePdfLayout.nullish(),
7717
+ referenceInformation: zInvoiceReferenceInformation.nullish(),
7075
7718
  source: zInvoiceSourceInput.nullish(),
7076
7719
  type: z.enum(["E31"]),
7077
7720
  }),
7078
7721
  z.strictObject({
7722
+ additionalInformation: zInvoiceAdditionalInformation.nullish(),
7079
7723
  buyer: zInvoiceConsumerBuyer.nullish(),
7080
7724
  currency: z.enum(["DOP"]),
7081
7725
  expectedTotals: zInvoiceExpectedTotals.nullish(),
@@ -7098,10 +7742,12 @@ export const zInvoiceRequest = z.union([
7098
7742
  numbering: zInvoiceNumbering.nullish(),
7099
7743
  paymentTerms: zInvoicePaymentTerms,
7100
7744
  pdfLayout: zInvoicePdfLayout.nullish(),
7745
+ referenceInformation: zInvoiceReferenceInformation.nullish(),
7101
7746
  source: zInvoiceSourceInput.nullish(),
7102
7747
  type: z.enum(["E32"]),
7103
7748
  }),
7104
7749
  z.strictObject({
7750
+ additionalInformation: zInvoiceAdditionalInformation.nullish(),
7105
7751
  currency: z.enum(["DOP"]),
7106
7752
  expectedTotals: zInvoiceExpectedTotals.nullish(),
7107
7753
  invoiceReference: z
@@ -7113,6 +7759,7 @@ export const zInvoiceRequest = z.union([
7113
7759
  numbering: zInvoiceNumbering.nullish(),
7114
7760
  paymentTerms: zInvoicePaymentTerms,
7115
7761
  pdfLayout: zInvoicePdfLayout.nullish(),
7762
+ referenceInformation: zInvoiceReferenceInformation.nullish(),
7116
7763
  source: zInvoiceSourceInput.nullish(),
7117
7764
  supplier: z.strictObject({
7118
7765
  address: z
@@ -8320,6 +8967,7 @@ export const zInvoiceRequest = z.union([
8320
8967
  type: z.enum(["E41"]),
8321
8968
  }),
8322
8969
  z.strictObject({
8970
+ additionalInformation: zInvoiceGovernmentAdditionalInformation.nullish(),
8323
8971
  buyer: z.strictObject({
8324
8972
  address: z
8325
8973
  .string()
@@ -8337,6 +8985,10 @@ export const zInvoiceRequest = z.union([
8337
8985
  .date()
8338
8986
  .regex(/^(19|20)[0-9]{2}-[0-9]{2}-[0-9]{2}$/)
8339
8987
  .nullish(),
8988
+ deliveryPhone: z
8989
+ .string()
8990
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
8991
+ .nullish(),
8340
8992
  email: z
8341
8993
  .string()
8342
8994
  .refine((text) => Array.from(text).length <= 80)
@@ -9559,6 +10211,7 @@ export const zInvoiceRequest = z.union([
9559
10211
  numbering: zInvoiceNumbering.nullish(),
9560
10212
  paymentTerms: zInvoicePaymentTerms,
9561
10213
  pdfLayout: zInvoicePdfLayout.nullish(),
10214
+ referenceInformation: zInvoiceReferenceInformation.nullish(),
9562
10215
  source: zInvoiceSourceInput.nullish(),
9563
10216
  type: z.enum(["E45"]),
9564
10217
  }),
@@ -9575,6 +10228,7 @@ export const zInvoiceRequest = z.union([
9575
10228
  numbering: zInvoiceNumbering.nullish(),
9576
10229
  paymentTerms: zInvoiceMinorExpensePaymentTerms.nullish(),
9577
10230
  pdfLayout: zInvoicePdfLayout.nullish(),
10231
+ referenceInformation: zInvoiceReferenceInformation.nullish(),
9578
10232
  source: zInvoiceSourceInput.nullish(),
9579
10233
  type: z.enum(["E43"]),
9580
10234
  }),
@@ -9592,11 +10246,13 @@ export const zInvoiceRequest = z.union([
9592
10246
  numbering: zInvoiceNumbering.nullish(),
9593
10247
  paymentTerms: zInvoicePaymentTerms.nullish(),
9594
10248
  pdfLayout: zInvoicePdfLayout.nullish(),
10249
+ referenceInformation: zInvoiceReferenceInformation.nullish(),
9595
10250
  source: zInvoiceSourceInput.nullish(),
9596
10251
  type: z.enum(["E47"]),
9597
10252
  withholdingBasis: zInvoiceForeignPaymentBasis,
9598
10253
  }),
9599
10254
  z.strictObject({
10255
+ additionalInformation: zInvoiceAdditionalInformation.nullish(),
9600
10256
  buyer: zInvoiceSpecialRegimeBuyer,
9601
10257
  currency: z.enum(["DOP"]),
9602
10258
  eligibility: zInvoiceSpecialRegimeEligibility,
@@ -9621,10 +10277,12 @@ export const zInvoiceRequest = z.union([
9621
10277
  numbering: zInvoiceNumbering.nullish(),
9622
10278
  paymentTerms: zInvoicePaymentTerms,
9623
10279
  pdfLayout: zInvoicePdfLayout.nullish(),
10280
+ referenceInformation: zInvoiceReferenceInformation.nullish(),
9624
10281
  source: zInvoiceSourceInput.nullish(),
9625
10282
  type: z.enum(["E44"]),
9626
10283
  }),
9627
10284
  z.strictObject({
10285
+ additionalInformation: zInvoiceAdditionalInformation.nullish(),
9628
10286
  buyer: zInvoiceExportBuyer,
9629
10287
  currency: z.enum(["DOP"]),
9630
10288
  eligibility: zInvoiceExportEligibility,
@@ -9649,10 +10307,12 @@ export const zInvoiceRequest = z.union([
9649
10307
  numbering: zInvoiceNumbering.nullish(),
9650
10308
  paymentTerms: zInvoicePaymentTerms,
9651
10309
  pdfLayout: zInvoicePdfLayout.nullish(),
10310
+ referenceInformation: zInvoiceReferenceInformation.nullish(),
9652
10311
  source: zInvoiceSourceInput.nullish(),
9653
10312
  type: z.enum(["E46"]),
9654
10313
  }),
9655
10314
  z.strictObject({
10315
+ additionalInformation: zInvoiceAdditionalInformation.nullish(),
9656
10316
  currency: z.enum(["DOP"]),
9657
10317
  expectedTotals: zInvoiceExpectedTotals.nullish(),
9658
10318
  incomeType: z
@@ -9685,6 +10345,7 @@ export const zInvoiceRequest = z.union([
9685
10345
  type: z.enum(["E33"]),
9686
10346
  }),
9687
10347
  z.strictObject({
10348
+ additionalInformation: zInvoiceAdditionalInformation.nullish(),
9688
10349
  currency: z.enum(["DOP"]),
9689
10350
  expectedTotals: zInvoiceExpectedTotals.nullish(),
9690
10351
  incomeType: z
@@ -9730,6 +10391,7 @@ export const zHostedInvoiceSubmission = z.strictObject({
9730
10391
  export const zInvoiceResource = z.union([
9731
10392
  z.strictObject({
9732
10393
  acceptedAt: z.iso.datetime().nullable(),
10394
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
9733
10395
  buyer: zInvoiceBuyerIdentity.nullable(),
9734
10396
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
9735
10397
  corrections: z.array(zInvoiceCorrection),
@@ -9748,6 +10410,7 @@ export const zInvoiceResource = z.union([
9748
10410
  latestEvent: zInvoiceLatestEvent.nullable(),
9749
10411
  originalInvoiceId: z.uuid().nullable(),
9750
10412
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
10413
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
9751
10414
  replacesInvoiceId: z.uuid().nullable(),
9752
10415
  source: zInvoiceSource,
9753
10416
  status: z.enum(["rejected"]),
@@ -9758,6 +10421,7 @@ export const zInvoiceResource = z.union([
9758
10421
  }),
9759
10422
  z.strictObject({
9760
10423
  acceptedAt: z.iso.datetime().nullable(),
10424
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
9761
10425
  buyer: zInvoiceBuyerIdentity.nullable(),
9762
10426
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
9763
10427
  corrections: z.array(zInvoiceCorrection),
@@ -9777,6 +10441,7 @@ export const zInvoiceResource = z.union([
9777
10441
  latestEvent: zInvoiceLatestEvent.nullable(),
9778
10442
  originalInvoiceId: z.uuid().nullable(),
9779
10443
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
10444
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
9780
10445
  replacesInvoiceId: z.uuid().nullable(),
9781
10446
  source: zInvoiceSource,
9782
10447
  stage: zInvoiceProcessingStage,
@@ -9788,6 +10453,7 @@ export const zInvoiceResource = z.union([
9788
10453
  }),
9789
10454
  z.strictObject({
9790
10455
  acceptedAt: z.iso.datetime().nullable(),
10456
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
9791
10457
  buyer: zInvoiceBuyerIdentity.nullable(),
9792
10458
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
9793
10459
  corrections: z.array(zInvoiceCorrection),
@@ -9807,6 +10473,7 @@ export const zInvoiceResource = z.union([
9807
10473
  latestEvent: zInvoiceLatestEvent.nullable(),
9808
10474
  originalInvoiceId: z.uuid().nullable(),
9809
10475
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
10476
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
9810
10477
  replacesInvoiceId: z.uuid().nullable(),
9811
10478
  source: zInvoiceSource,
9812
10479
  status: z.enum(["verifying"]),
@@ -9817,6 +10484,7 @@ export const zInvoiceResource = z.union([
9817
10484
  }),
9818
10485
  z.strictObject({
9819
10486
  acceptedAt: z.iso.datetime().nullable(),
10487
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
9820
10488
  buyer: zInvoiceBuyerIdentity.nullable(),
9821
10489
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
9822
10490
  corrections: z.array(zInvoiceCorrection),
@@ -9836,6 +10504,7 @@ export const zInvoiceResource = z.union([
9836
10504
  latestEvent: zInvoiceLatestEvent.nullable(),
9837
10505
  originalInvoiceId: z.uuid().nullable(),
9838
10506
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
10507
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
9839
10508
  replacesInvoiceId: z.uuid().nullable(),
9840
10509
  source: zInvoiceSource,
9841
10510
  status: z.enum(["accepted"]),
@@ -9846,6 +10515,7 @@ export const zInvoiceResource = z.union([
9846
10515
  }),
9847
10516
  z.strictObject({
9848
10517
  acceptedAt: z.iso.datetime().nullable(),
10518
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
9849
10519
  buyer: zInvoiceBuyerIdentity.nullable(),
9850
10520
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
9851
10521
  corrections: z.array(zInvoiceCorrection),
@@ -9865,6 +10535,7 @@ export const zInvoiceResource = z.union([
9865
10535
  latestEvent: zInvoiceLatestEvent.nullable(),
9866
10536
  originalInvoiceId: z.uuid().nullable(),
9867
10537
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
10538
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
9868
10539
  replacesInvoiceId: z.uuid().nullable(),
9869
10540
  source: zInvoiceSource,
9870
10541
  status: z.enum(["acceptedWithObservations"]),
@@ -9875,6 +10546,7 @@ export const zInvoiceResource = z.union([
9875
10546
  }),
9876
10547
  z.strictObject({
9877
10548
  acceptedAt: z.iso.datetime().nullable(),
10549
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
9878
10550
  buyer: zInvoiceBuyerIdentity.nullable(),
9879
10551
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
9880
10552
  corrections: z.array(zInvoiceCorrection),
@@ -9894,6 +10566,7 @@ export const zInvoiceResource = z.union([
9894
10566
  latestEvent: zInvoiceLatestEvent.nullable(),
9895
10567
  originalInvoiceId: z.uuid().nullable(),
9896
10568
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
10569
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
9897
10570
  replacesInvoiceId: z.uuid().nullable(),
9898
10571
  source: zInvoiceSource,
9899
10572
  status: z.enum(["authorityRejected"]),
@@ -9904,6 +10577,7 @@ export const zInvoiceResource = z.union([
9904
10577
  }),
9905
10578
  z.strictObject({
9906
10579
  acceptedAt: z.iso.datetime().nullable(),
10580
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
9907
10581
  buyer: zInvoiceBuyerIdentity.nullable(),
9908
10582
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
9909
10583
  corrections: z.array(zInvoiceCorrection),
@@ -9923,6 +10597,7 @@ export const zInvoiceResource = z.union([
9923
10597
  latestEvent: zInvoiceLatestEvent.nullable(),
9924
10598
  originalInvoiceId: z.uuid().nullable(),
9925
10599
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
10600
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
9926
10601
  replacesInvoiceId: z.uuid().nullable(),
9927
10602
  source: zInvoiceSource,
9928
10603
  status: z.enum(["operatorRequired"]),
@@ -10154,1248 +10829,9 @@ export const zSourceDocumentEvaluationRequest = z.strictObject({
10154
10829
  protocol: z.string(),
10155
10830
  request_id: z.string(),
10156
10831
  });
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
10832
+ export const zSourceType32Snapshot = z
11398
10833
  .strictObject({
10834
+ payment_account: zPaymentAccount.optional(),
11399
10835
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
11400
10836
  })
11401
10837
  .and(z.strictObject({
@@ -11404,6 +10840,10 @@ export const zSourceType32Snapshot = z
11404
10840
  identity_kind: z.enum(["anonymous"]),
11405
10841
  }),
11406
10842
  z.strictObject({
10843
+ delivery_phone: z
10844
+ .string()
10845
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
10846
+ .optional(),
11407
10847
  identity_kind: z.enum(["domestic"]),
11408
10848
  legal_name: z
11409
10849
  .string()
@@ -11413,6 +10853,10 @@ export const zSourceType32Snapshot = z
11413
10853
  tax_id: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
11414
10854
  }),
11415
10855
  z.strictObject({
10856
+ delivery_phone: z
10857
+ .string()
10858
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
10859
+ .optional(),
11416
10860
  foreign_identifier: z
11417
10861
  .string()
11418
10862
  .refine((text) => Array.from(text).length >= 1)
@@ -11430,6 +10874,7 @@ export const zSourceType32Snapshot = z
11430
10874
  payment_type: z.enum(["1", "2", "3"]),
11431
10875
  }))
11432
10876
  .and(z.strictObject({
10877
+ additional_information: zAdditionalDocumentInformation.optional(),
11433
10878
  deferred_submission: z.enum(["1"]).optional(),
11434
10879
  discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
11435
10880
  foreign_currency: zForeignCurrencyIntent.optional(),
@@ -11446,6 +10891,7 @@ export const zSourceType32Snapshot = z
11446
10891
  }));
11447
10892
  export const zSourceType33Snapshot = z
11448
10893
  .strictObject({
10894
+ payment_account: zPaymentAccount.optional(),
11449
10895
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
11450
10896
  })
11451
10897
  .and(z.strictObject({
@@ -11471,6 +10917,10 @@ export const zSourceType33Snapshot = z
11471
10917
  .string()
11472
10918
  .regex(/^(?:(?:31-(?:0?[13578]|1[02])|(?:29|30)-(?:0?[13-9]|1[0-2])|(?:0?[1-9]|1[0-9]|2[0-8])-(?:0?[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-0?2-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000))$/)
11473
10919
  .optional(),
10920
+ delivery_phone: z
10921
+ .string()
10922
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
10923
+ .optional(),
11474
10924
  email: z
11475
10925
  .string()
11476
10926
  .refine((text) => Array.from(text).length <= 80)
@@ -12675,6 +12125,10 @@ export const zSourceType33Snapshot = z
12675
12125
  identity_kind: z.enum(["domestic"]),
12676
12126
  })),
12677
12127
  z.strictObject({
12128
+ delivery_phone: z
12129
+ .string()
12130
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
12131
+ .optional(),
12678
12132
  foreign_identifier: z
12679
12133
  .string()
12680
12134
  .refine((text) => Array.from(text).length >= 1)
@@ -12692,6 +12146,7 @@ export const zSourceType33Snapshot = z
12692
12146
  payment_type: z.enum(["1", "2", "3"]),
12693
12147
  }))
12694
12148
  .and(z.strictObject({
12149
+ additional_information: zAdditionalDocumentInformation.optional(),
12695
12150
  deferred_submission: z.enum(["1"]).optional(),
12696
12151
  discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
12697
12152
  foreign_currency: zForeignCurrencyIntent.optional(),
@@ -12730,6 +12185,10 @@ export const zSourceType34Snapshot = z
12730
12185
  .string()
12731
12186
  .regex(/^(?:(?:31-(?:0?[13578]|1[02])|(?:29|30)-(?:0?[13-9]|1[0-2])|(?:0?[1-9]|1[0-9]|2[0-8])-(?:0?[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-0?2-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000))$/)
12732
12187
  .optional(),
12188
+ delivery_phone: z
12189
+ .string()
12190
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
12191
+ .optional(),
12733
12192
  email: z
12734
12193
  .string()
12735
12194
  .refine((text) => Array.from(text).length <= 80)
@@ -13934,6 +13393,10 @@ export const zSourceType34Snapshot = z
13934
13393
  identity_kind: z.enum(["domestic"]),
13935
13394
  })),
13936
13395
  z.strictObject({
13396
+ delivery_phone: z
13397
+ .string()
13398
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
13399
+ .optional(),
13937
13400
  foreign_identifier: z
13938
13401
  .string()
13939
13402
  .refine((text) => Array.from(text).length >= 1)
@@ -13951,6 +13414,7 @@ export const zSourceType34Snapshot = z
13951
13414
  payment_type: z.enum(["1", "2", "3"]),
13952
13415
  }))
13953
13416
  .and(z.strictObject({
13417
+ additional_information: zAdditionalDocumentInformation.optional(),
13954
13418
  deferred_submission: z.enum(["1"]).optional(),
13955
13419
  discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
13956
13420
  foreign_currency: zForeignCurrencyIntent.optional(),
@@ -13984,6 +13448,7 @@ export const zSourceType45Snapshot = zOptionalPaymentAllocations
13984
13448
  payment_type: z.enum(["1", "2", "3"]),
13985
13449
  }))
13986
13450
  .and(z.strictObject({
13451
+ additional_information: zGovernmentAdditionalDocumentInformation.optional(),
13987
13452
  deferred_submission: z.enum(["1"]).optional(),
13988
13453
  discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
13989
13454
  foreign_currency: zForeignCurrencyIntent.optional(),
@@ -13998,28 +13463,6 @@ export const zSourceType45Snapshot = zOptionalPaymentAllocations
13998
13463
  currency: z.enum(["DOP"]),
13999
13464
  lines: z.array(zFiscalLineWithLegalTip).min(1).max(1000),
14000
13465
  }));
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
13466
  export const zSourceType47Snapshot = zOptionalPaymentAllocations
14024
13467
  .and(z.strictObject({
14025
13468
  foreign_payee: zForeignPayee,
@@ -14069,6 +13512,7 @@ export const zSourceType44Snapshot = zSalesTermsSpecialRegimeBuyerOptionalPaymen
14069
13512
  caller_declared_eligibility: zCallerDeclaredSpecialRegimeEligibility,
14070
13513
  }))
14071
13514
  .and(z.strictObject({
13515
+ additional_information: zAdditionalDocumentInformation.optional(),
14072
13516
  deferred_submission: z.enum(["1"]).optional(),
14073
13517
  discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
14074
13518
  foreign_currency: zForeignCurrencyIntent.optional(),
@@ -14741,21 +14185,1301 @@ export const zTimingWork = z.strictObject({
14741
14185
  .nullable(),
14742
14186
  producer_traceparent: z
14743
14187
  .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
- });
14188
+ .regex(/^00-[0-9a-f]{32}-[0-9a-f]{16}-0[01]$/)
14189
+ .nullable(),
14190
+ scheduled_delay_ms: z
14191
+ .int()
14192
+ .gte(0)
14193
+ .max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
14194
+ .nullable(),
14195
+ settled_at: z.iso.datetime().nullable(),
14196
+ state: zTimingWorkState,
14197
+ work_id: z.string().regex(/^[0-9a-f]{64}$/),
14198
+ });
14199
+ /**
14200
+ * A Type 31 line with its profile-permitted line-level discounts and surcharges.
14201
+ */
14202
+ export const zType31Line = z.strictObject({
14203
+ additional_tax_codes: z
14204
+ .array(z.enum(["001"]))
14205
+ .min(1)
14206
+ .max(2)
14207
+ .optional(),
14208
+ adjustments: z
14209
+ .strictObject({
14210
+ discounts: z.array(zLinePriceAdjustment).min(0).max(12).optional(),
14211
+ surcharges: z.array(zLinePriceAdjustment).min(0).max(12).optional(),
14212
+ })
14213
+ .optional(),
14214
+ billing_indicator: z.enum(["0", "1", "2", "3", "4"]),
14215
+ goods_or_service_indicator: z.enum(["1", "2"]),
14216
+ item_codes: z.array(zFiscalItemCode).min(0).max(5).optional(),
14217
+ measurement_unit: z.string().regex(/^([1-9]|[1-5][0-9]|6[0-2])$/),
14218
+ name: z
14219
+ .string()
14220
+ .refine((text) => Array.from(text).length >= 1)
14221
+ .refine((text) => Array.from(text).length <= 80)
14222
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
14223
+ quantity: z.string().regex(/^(?=[0-9.]*[1-9])[0-9]{1,16}(\.[0-9]{1,2})?$/),
14224
+ source_line_id: z
14225
+ .string()
14226
+ .refine((text) => Array.from(text).length >= 1)
14227
+ .refine((text) => Array.from(text).length <= 128)
14228
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
14229
+ tax_exclusive_unit_price: z.enum(["1"]).optional(),
14230
+ unit_price: z.string().regex(/^[0-9]{1,16}(\.[0-9]{1,4})?$/),
14231
+ });
14232
+ export const zSourceType31Snapshot = z
14233
+ .strictObject({
14234
+ payment_account: zPaymentAccount.optional(),
14235
+ payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
14236
+ })
14237
+ .and(z.strictObject({
14238
+ buyer: z.strictObject({
14239
+ address: z
14240
+ .string()
14241
+ .refine((text) => Array.from(text).length >= 1)
14242
+ .refine((text) => Array.from(text).length <= 100)
14243
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
14244
+ .optional(),
14245
+ contact_name: z
14246
+ .string()
14247
+ .refine((text) => Array.from(text).length >= 1)
14248
+ .refine((text) => Array.from(text).length <= 80)
14249
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
14250
+ .optional(),
14251
+ delivery_on: z
14252
+ .string()
14253
+ .regex(/^(?:(?:31-(?:0?[13578]|1[02])|(?:29|30)-(?:0?[13-9]|1[0-2])|(?:0?[1-9]|1[0-9]|2[0-8])-(?:0?[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-0?2-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000))$/)
14254
+ .optional(),
14255
+ delivery_phone: z
14256
+ .string()
14257
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
14258
+ .optional(),
14259
+ email: z
14260
+ .string()
14261
+ .refine((text) => Array.from(text).length <= 80)
14262
+ .regex(/^[\p{L}\p{M}\p{N}\p{S}]+(?:[-.][\p{L}\p{M}\p{N}\p{S}]+)*@[\p{L}\p{M}\p{N}\p{S}]+(?:[-.][\p{L}\p{M}\p{N}\p{S}]+)*\.[\p{L}\p{M}\p{N}\p{S}]+(?:[-.][\p{L}\p{M}\p{N}\p{S}]+)*$/u)
14263
+ .optional(),
14264
+ internal_code: z
14265
+ .string()
14266
+ .refine((text) => Array.from(text).length >= 1)
14267
+ .refine((text) => Array.from(text).length <= 20)
14268
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
14269
+ .optional(),
14270
+ legal_name: z
14271
+ .string()
14272
+ .refine((text) => Array.from(text).length >= 1)
14273
+ .refine((text) => Array.from(text).length <= 150)
14274
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
14275
+ municipality_code: z
14276
+ .enum([
14277
+ "010000",
14278
+ "010100",
14279
+ "010101",
14280
+ "020000",
14281
+ "020100",
14282
+ "020101",
14283
+ "020102",
14284
+ "020103",
14285
+ "020104",
14286
+ "020105",
14287
+ "020106",
14288
+ "020107",
14289
+ "020108",
14290
+ "020109",
14291
+ "020200",
14292
+ "020201",
14293
+ "020202",
14294
+ "020300",
14295
+ "020301",
14296
+ "020302",
14297
+ "020303",
14298
+ "020400",
14299
+ "020401",
14300
+ "020402",
14301
+ "020403",
14302
+ "020404",
14303
+ "020405",
14304
+ "020500",
14305
+ "020501",
14306
+ "020600",
14307
+ "020601",
14308
+ "020602",
14309
+ "020603",
14310
+ "020604",
14311
+ "020700",
14312
+ "020701",
14313
+ "020702",
14314
+ "020800",
14315
+ "020801",
14316
+ "020802",
14317
+ "020803",
14318
+ "020804",
14319
+ "020900",
14320
+ "020901",
14321
+ "021000",
14322
+ "021001",
14323
+ "030000",
14324
+ "030001",
14325
+ "030101",
14326
+ "030102",
14327
+ "030200",
14328
+ "030201",
14329
+ "030202",
14330
+ "030300",
14331
+ "030301",
14332
+ "030302",
14333
+ "030303",
14334
+ "030304",
14335
+ "030305",
14336
+ "030306",
14337
+ "030307",
14338
+ "030400",
14339
+ "030401",
14340
+ "030500",
14341
+ "030501",
14342
+ "030502",
14343
+ "040000",
14344
+ "040100",
14345
+ "040101",
14346
+ "040102",
14347
+ "040103",
14348
+ "040104",
14349
+ "040200",
14350
+ "040201",
14351
+ "040300",
14352
+ "040301",
14353
+ "040302",
14354
+ "040400",
14355
+ "040401",
14356
+ "040402",
14357
+ "040500",
14358
+ "040501",
14359
+ "040502",
14360
+ "040503",
14361
+ "040504",
14362
+ "040600",
14363
+ "040601",
14364
+ "040700",
14365
+ "040701",
14366
+ "040702",
14367
+ "040800",
14368
+ "040801",
14369
+ "040802",
14370
+ "040900",
14371
+ "040901",
14372
+ "041000",
14373
+ "041001",
14374
+ "041100",
14375
+ "041101",
14376
+ "041102",
14377
+ "050000",
14378
+ "050100",
14379
+ "050101",
14380
+ "050102",
14381
+ "050200",
14382
+ "050201",
14383
+ "050202",
14384
+ "050203",
14385
+ "050300",
14386
+ "050301",
14387
+ "050400",
14388
+ "050401",
14389
+ "050500",
14390
+ "050501",
14391
+ "050502",
14392
+ "060000",
14393
+ "060100",
14394
+ "060101",
14395
+ "060102",
14396
+ "060103",
14397
+ "060104",
14398
+ "060105",
14399
+ "060200",
14400
+ "060201",
14401
+ "060202",
14402
+ "060203",
14403
+ "060300",
14404
+ "060301",
14405
+ "060400",
14406
+ "060401",
14407
+ "060500",
14408
+ "060501",
14409
+ "060502",
14410
+ "060503",
14411
+ "060504",
14412
+ "060505",
14413
+ "060600",
14414
+ "060601",
14415
+ "060700",
14416
+ "060701",
14417
+ "060702",
14418
+ "070000",
14419
+ "070100",
14420
+ "070101",
14421
+ "070102",
14422
+ "070103",
14423
+ "070200",
14424
+ "070201",
14425
+ "070202",
14426
+ "070203",
14427
+ "070300",
14428
+ "070301",
14429
+ "070302",
14430
+ "070400",
14431
+ "070401",
14432
+ "070402",
14433
+ "070500",
14434
+ "070501",
14435
+ "070502",
14436
+ "070600",
14437
+ "070601",
14438
+ "080000",
14439
+ "080100",
14440
+ "080101",
14441
+ "080102",
14442
+ "080103",
14443
+ "080104",
14444
+ "080200",
14445
+ "080201",
14446
+ "080202",
14447
+ "080203",
14448
+ "090000",
14449
+ "090100",
14450
+ "090101",
14451
+ "090102",
14452
+ "090103",
14453
+ "090104",
14454
+ "090105",
14455
+ "090106",
14456
+ "090107",
14457
+ "090108",
14458
+ "090109",
14459
+ "090200",
14460
+ "090201",
14461
+ "090300",
14462
+ "090301",
14463
+ "090302",
14464
+ "090303",
14465
+ "090304",
14466
+ "090400",
14467
+ "090401",
14468
+ "100000",
14469
+ "100100",
14470
+ "100101",
14471
+ "100102",
14472
+ "100103",
14473
+ "100200",
14474
+ "100201",
14475
+ "100202",
14476
+ "100300",
14477
+ "100301",
14478
+ "100400",
14479
+ "100401",
14480
+ "100402",
14481
+ "100500",
14482
+ "100501",
14483
+ "100502",
14484
+ "100600",
14485
+ "100601",
14486
+ "100602",
14487
+ "110000",
14488
+ "110100",
14489
+ "110101",
14490
+ "110102",
14491
+ "110103",
14492
+ "110104",
14493
+ "110200",
14494
+ "110201",
14495
+ "110202",
14496
+ "110203",
14497
+ "120000",
14498
+ "120100",
14499
+ "120101",
14500
+ "120102",
14501
+ "120200",
14502
+ "120201",
14503
+ "120300",
14504
+ "120301",
14505
+ "120302",
14506
+ "130000",
14507
+ "130100",
14508
+ "130101",
14509
+ "130102",
14510
+ "130103",
14511
+ "130104",
14512
+ "130105",
14513
+ "130200",
14514
+ "130201",
14515
+ "130202",
14516
+ "130203",
14517
+ "130300",
14518
+ "130301",
14519
+ "130302",
14520
+ "130303",
14521
+ "130400",
14522
+ "130401",
14523
+ "130402",
14524
+ "140000",
14525
+ "140100",
14526
+ "140101",
14527
+ "140102",
14528
+ "140103",
14529
+ "140104",
14530
+ "140200",
14531
+ "140201",
14532
+ "140202",
14533
+ "140203",
14534
+ "140300",
14535
+ "140301",
14536
+ "140302",
14537
+ "140400",
14538
+ "140401",
14539
+ "150000",
14540
+ "150100",
14541
+ "150101",
14542
+ "150200",
14543
+ "150201",
14544
+ "150202",
14545
+ "150300",
14546
+ "150301",
14547
+ "150302",
14548
+ "150303",
14549
+ "150304",
14550
+ "150400",
14551
+ "150401",
14552
+ "150500",
14553
+ "150501",
14554
+ "150502",
14555
+ "150600",
14556
+ "150601",
14557
+ "160000",
14558
+ "160100",
14559
+ "160101",
14560
+ "160102",
14561
+ "160200",
14562
+ "160201",
14563
+ "160202",
14564
+ "170000",
14565
+ "170100",
14566
+ "170101",
14567
+ "170102",
14568
+ "170103",
14569
+ "170104",
14570
+ "170105",
14571
+ "170106",
14572
+ "170107",
14573
+ "170108",
14574
+ "170109",
14575
+ "170110",
14576
+ "170200",
14577
+ "170201",
14578
+ "170202",
14579
+ "170203",
14580
+ "170300",
14581
+ "170301",
14582
+ "180000",
14583
+ "180100",
14584
+ "180101",
14585
+ "180102",
14586
+ "180103",
14587
+ "180200",
14588
+ "180201",
14589
+ "180202",
14590
+ "180300",
14591
+ "180301",
14592
+ "180400",
14593
+ "180401",
14594
+ "180500",
14595
+ "180501",
14596
+ "180502",
14597
+ "180600",
14598
+ "180601",
14599
+ "180602",
14600
+ "180603",
14601
+ "180604",
14602
+ "180700",
14603
+ "180701",
14604
+ "180702",
14605
+ "180703",
14606
+ "180800",
14607
+ "180801",
14608
+ "180802",
14609
+ "180803",
14610
+ "180804",
14611
+ "180900",
14612
+ "180901",
14613
+ "190000",
14614
+ "190100",
14615
+ "190101",
14616
+ "190102",
14617
+ "190200",
14618
+ "190201",
14619
+ "190202",
14620
+ "190300",
14621
+ "190301",
14622
+ "200000",
14623
+ "200100",
14624
+ "200101",
14625
+ "200102",
14626
+ "200103",
14627
+ "200104",
14628
+ "200200",
14629
+ "200201",
14630
+ "200300",
14631
+ "200301",
14632
+ "210000",
14633
+ "210100",
14634
+ "210101",
14635
+ "210102",
14636
+ "210103",
14637
+ "210200",
14638
+ "210201",
14639
+ "210300",
14640
+ "210301",
14641
+ "210302",
14642
+ "210303",
14643
+ "210400",
14644
+ "210401",
14645
+ "210402",
14646
+ "210500",
14647
+ "210501",
14648
+ "210502",
14649
+ "210503",
14650
+ "210504",
14651
+ "210600",
14652
+ "210601",
14653
+ "210602",
14654
+ "210700",
14655
+ "210701",
14656
+ "210800",
14657
+ "210801",
14658
+ "220000",
14659
+ "220100",
14660
+ "220101",
14661
+ "220102",
14662
+ "220103",
14663
+ "220104",
14664
+ "220105",
14665
+ "220106",
14666
+ "220107",
14667
+ "220108",
14668
+ "220109",
14669
+ "220110",
14670
+ "220111",
14671
+ "220200",
14672
+ "220201",
14673
+ "220202",
14674
+ "220203",
14675
+ "220300",
14676
+ "220301",
14677
+ "220302",
14678
+ "220303",
14679
+ "220400",
14680
+ "220401",
14681
+ "220402",
14682
+ "220500",
14683
+ "220501",
14684
+ "220502",
14685
+ "220503",
14686
+ "220600",
14687
+ "220601",
14688
+ "220602",
14689
+ "230000",
14690
+ "230100",
14691
+ "230101",
14692
+ "230200",
14693
+ "230201",
14694
+ "230202",
14695
+ "230203",
14696
+ "230300",
14697
+ "230301",
14698
+ "230400",
14699
+ "230401",
14700
+ "230500",
14701
+ "230501",
14702
+ "230600",
14703
+ "230601",
14704
+ "240000",
14705
+ "240100",
14706
+ "240101",
14707
+ "240102",
14708
+ "240103",
14709
+ "240104",
14710
+ "240105",
14711
+ "240106",
14712
+ "240200",
14713
+ "240201",
14714
+ "240202",
14715
+ "240300",
14716
+ "240301",
14717
+ "240400",
14718
+ "240401",
14719
+ "240402",
14720
+ "240403",
14721
+ "240404",
14722
+ "250000",
14723
+ "250100",
14724
+ "250101",
14725
+ "250102",
14726
+ "250104",
14727
+ "250105",
14728
+ "250106",
14729
+ "250107",
14730
+ "250200",
14731
+ "250201",
14732
+ "250300",
14733
+ "250301",
14734
+ "250302",
14735
+ "250303",
14736
+ "250400",
14737
+ "250401",
14738
+ "250402",
14739
+ "250500",
14740
+ "250501",
14741
+ "250502",
14742
+ "250503",
14743
+ "250504",
14744
+ "250600",
14745
+ "250601",
14746
+ "250602",
14747
+ "250700",
14748
+ "250701",
14749
+ "250702",
14750
+ "250703",
14751
+ "250800",
14752
+ "250801",
14753
+ "250802",
14754
+ "250803",
14755
+ "250900",
14756
+ "250901",
14757
+ "251000",
14758
+ "251001",
14759
+ "260000",
14760
+ "260100",
14761
+ "260101",
14762
+ "260200",
14763
+ "260201",
14764
+ "260300",
14765
+ "260301",
14766
+ "270000",
14767
+ "270100",
14768
+ "270101",
14769
+ "270102",
14770
+ "270103",
14771
+ "270104",
14772
+ "270200",
14773
+ "270201",
14774
+ "270202",
14775
+ "270203",
14776
+ "270204",
14777
+ "270205",
14778
+ "270300",
14779
+ "270301",
14780
+ "270302",
14781
+ "270303",
14782
+ "270304",
14783
+ "280000",
14784
+ "280100",
14785
+ "280101",
14786
+ "280102",
14787
+ "280103",
14788
+ "280104",
14789
+ "280105",
14790
+ "280106",
14791
+ "280200",
14792
+ "280201",
14793
+ "280300",
14794
+ "280301",
14795
+ "280302",
14796
+ "280303",
14797
+ "290000",
14798
+ "290100",
14799
+ "290101",
14800
+ "290102",
14801
+ "290103",
14802
+ "290104",
14803
+ "290200",
14804
+ "290201",
14805
+ "290300",
14806
+ "290301",
14807
+ "290302",
14808
+ "290303",
14809
+ "290400",
14810
+ "290402",
14811
+ "290403",
14812
+ "290500",
14813
+ "290501",
14814
+ "300000",
14815
+ "300100",
14816
+ "300101",
14817
+ "300102",
14818
+ "300103",
14819
+ "300104",
14820
+ "300200",
14821
+ "300201",
14822
+ "300202",
14823
+ "300300",
14824
+ "300301",
14825
+ "310000",
14826
+ "310100",
14827
+ "310101",
14828
+ "310102",
14829
+ "310103",
14830
+ "310104",
14831
+ "310105",
14832
+ "310200",
14833
+ "310201",
14834
+ "310300",
14835
+ "310301",
14836
+ "320000",
14837
+ "320100",
14838
+ "320101",
14839
+ "320102",
14840
+ "320200",
14841
+ "320201",
14842
+ "320300",
14843
+ "320301",
14844
+ "320302",
14845
+ "320400",
14846
+ "320401",
14847
+ "320402",
14848
+ "320500",
14849
+ "320501",
14850
+ "320502",
14851
+ "320600",
14852
+ "320601",
14853
+ "320602",
14854
+ "320603",
14855
+ "320700",
14856
+ "320701",
14857
+ "320702",
14858
+ "320703",
14859
+ ])
14860
+ .optional(),
14861
+ province_code: z
14862
+ .enum([
14863
+ "010000",
14864
+ "010100",
14865
+ "010101",
14866
+ "020000",
14867
+ "020100",
14868
+ "020101",
14869
+ "020102",
14870
+ "020103",
14871
+ "020104",
14872
+ "020105",
14873
+ "020106",
14874
+ "020107",
14875
+ "020108",
14876
+ "020109",
14877
+ "020200",
14878
+ "020201",
14879
+ "020202",
14880
+ "020300",
14881
+ "020301",
14882
+ "020302",
14883
+ "020303",
14884
+ "020400",
14885
+ "020401",
14886
+ "020402",
14887
+ "020403",
14888
+ "020404",
14889
+ "020405",
14890
+ "020500",
14891
+ "020501",
14892
+ "020600",
14893
+ "020601",
14894
+ "020602",
14895
+ "020603",
14896
+ "020604",
14897
+ "020700",
14898
+ "020701",
14899
+ "020702",
14900
+ "020800",
14901
+ "020801",
14902
+ "020802",
14903
+ "020803",
14904
+ "020804",
14905
+ "020900",
14906
+ "020901",
14907
+ "021000",
14908
+ "021001",
14909
+ "030000",
14910
+ "030001",
14911
+ "030101",
14912
+ "030102",
14913
+ "030200",
14914
+ "030201",
14915
+ "030202",
14916
+ "030300",
14917
+ "030301",
14918
+ "030302",
14919
+ "030303",
14920
+ "030304",
14921
+ "030305",
14922
+ "030306",
14923
+ "030307",
14924
+ "030400",
14925
+ "030401",
14926
+ "030500",
14927
+ "030501",
14928
+ "030502",
14929
+ "040000",
14930
+ "040100",
14931
+ "040101",
14932
+ "040102",
14933
+ "040103",
14934
+ "040104",
14935
+ "040200",
14936
+ "040201",
14937
+ "040300",
14938
+ "040301",
14939
+ "040302",
14940
+ "040400",
14941
+ "040401",
14942
+ "040402",
14943
+ "040500",
14944
+ "040501",
14945
+ "040502",
14946
+ "040503",
14947
+ "040504",
14948
+ "040600",
14949
+ "040601",
14950
+ "040700",
14951
+ "040701",
14952
+ "040702",
14953
+ "040800",
14954
+ "040801",
14955
+ "040802",
14956
+ "040900",
14957
+ "040901",
14958
+ "041000",
14959
+ "041001",
14960
+ "041100",
14961
+ "041101",
14962
+ "041102",
14963
+ "050000",
14964
+ "050100",
14965
+ "050101",
14966
+ "050102",
14967
+ "050200",
14968
+ "050201",
14969
+ "050202",
14970
+ "050203",
14971
+ "050300",
14972
+ "050301",
14973
+ "050400",
14974
+ "050401",
14975
+ "050500",
14976
+ "050501",
14977
+ "050502",
14978
+ "060000",
14979
+ "060100",
14980
+ "060101",
14981
+ "060102",
14982
+ "060103",
14983
+ "060104",
14984
+ "060105",
14985
+ "060200",
14986
+ "060201",
14987
+ "060202",
14988
+ "060203",
14989
+ "060300",
14990
+ "060301",
14991
+ "060400",
14992
+ "060401",
14993
+ "060500",
14994
+ "060501",
14995
+ "060502",
14996
+ "060503",
14997
+ "060504",
14998
+ "060505",
14999
+ "060600",
15000
+ "060601",
15001
+ "060700",
15002
+ "060701",
15003
+ "060702",
15004
+ "070000",
15005
+ "070100",
15006
+ "070101",
15007
+ "070102",
15008
+ "070103",
15009
+ "070200",
15010
+ "070201",
15011
+ "070202",
15012
+ "070203",
15013
+ "070300",
15014
+ "070301",
15015
+ "070302",
15016
+ "070400",
15017
+ "070401",
15018
+ "070402",
15019
+ "070500",
15020
+ "070501",
15021
+ "070502",
15022
+ "070600",
15023
+ "070601",
15024
+ "080000",
15025
+ "080100",
15026
+ "080101",
15027
+ "080102",
15028
+ "080103",
15029
+ "080104",
15030
+ "080200",
15031
+ "080201",
15032
+ "080202",
15033
+ "080203",
15034
+ "090000",
15035
+ "090100",
15036
+ "090101",
15037
+ "090102",
15038
+ "090103",
15039
+ "090104",
15040
+ "090105",
15041
+ "090106",
15042
+ "090107",
15043
+ "090108",
15044
+ "090109",
15045
+ "090200",
15046
+ "090201",
15047
+ "090300",
15048
+ "090301",
15049
+ "090302",
15050
+ "090303",
15051
+ "090304",
15052
+ "090400",
15053
+ "090401",
15054
+ "100000",
15055
+ "100100",
15056
+ "100101",
15057
+ "100102",
15058
+ "100103",
15059
+ "100200",
15060
+ "100201",
15061
+ "100202",
15062
+ "100300",
15063
+ "100301",
15064
+ "100400",
15065
+ "100401",
15066
+ "100402",
15067
+ "100500",
15068
+ "100501",
15069
+ "100502",
15070
+ "100600",
15071
+ "100601",
15072
+ "100602",
15073
+ "110000",
15074
+ "110100",
15075
+ "110101",
15076
+ "110102",
15077
+ "110103",
15078
+ "110104",
15079
+ "110200",
15080
+ "110201",
15081
+ "110202",
15082
+ "110203",
15083
+ "120000",
15084
+ "120100",
15085
+ "120101",
15086
+ "120102",
15087
+ "120200",
15088
+ "120201",
15089
+ "120300",
15090
+ "120301",
15091
+ "120302",
15092
+ "130000",
15093
+ "130100",
15094
+ "130101",
15095
+ "130102",
15096
+ "130103",
15097
+ "130104",
15098
+ "130105",
15099
+ "130200",
15100
+ "130201",
15101
+ "130202",
15102
+ "130203",
15103
+ "130300",
15104
+ "130301",
15105
+ "130302",
15106
+ "130303",
15107
+ "130400",
15108
+ "130401",
15109
+ "130402",
15110
+ "140000",
15111
+ "140100",
15112
+ "140101",
15113
+ "140102",
15114
+ "140103",
15115
+ "140104",
15116
+ "140200",
15117
+ "140201",
15118
+ "140202",
15119
+ "140203",
15120
+ "140300",
15121
+ "140301",
15122
+ "140302",
15123
+ "140400",
15124
+ "140401",
15125
+ "150000",
15126
+ "150100",
15127
+ "150101",
15128
+ "150200",
15129
+ "150201",
15130
+ "150202",
15131
+ "150300",
15132
+ "150301",
15133
+ "150302",
15134
+ "150303",
15135
+ "150304",
15136
+ "150400",
15137
+ "150401",
15138
+ "150500",
15139
+ "150501",
15140
+ "150502",
15141
+ "150600",
15142
+ "150601",
15143
+ "160000",
15144
+ "160100",
15145
+ "160101",
15146
+ "160102",
15147
+ "160200",
15148
+ "160201",
15149
+ "160202",
15150
+ "170000",
15151
+ "170100",
15152
+ "170101",
15153
+ "170102",
15154
+ "170103",
15155
+ "170104",
15156
+ "170105",
15157
+ "170106",
15158
+ "170107",
15159
+ "170108",
15160
+ "170109",
15161
+ "170110",
15162
+ "170200",
15163
+ "170201",
15164
+ "170202",
15165
+ "170203",
15166
+ "170300",
15167
+ "170301",
15168
+ "180000",
15169
+ "180100",
15170
+ "180101",
15171
+ "180102",
15172
+ "180103",
15173
+ "180200",
15174
+ "180201",
15175
+ "180202",
15176
+ "180300",
15177
+ "180301",
15178
+ "180400",
15179
+ "180401",
15180
+ "180500",
15181
+ "180501",
15182
+ "180502",
15183
+ "180600",
15184
+ "180601",
15185
+ "180602",
15186
+ "180603",
15187
+ "180604",
15188
+ "180700",
15189
+ "180701",
15190
+ "180702",
15191
+ "180703",
15192
+ "180800",
15193
+ "180801",
15194
+ "180802",
15195
+ "180803",
15196
+ "180804",
15197
+ "180900",
15198
+ "180901",
15199
+ "190000",
15200
+ "190100",
15201
+ "190101",
15202
+ "190102",
15203
+ "190200",
15204
+ "190201",
15205
+ "190202",
15206
+ "190300",
15207
+ "190301",
15208
+ "200000",
15209
+ "200100",
15210
+ "200101",
15211
+ "200102",
15212
+ "200103",
15213
+ "200104",
15214
+ "200200",
15215
+ "200201",
15216
+ "200300",
15217
+ "200301",
15218
+ "210000",
15219
+ "210100",
15220
+ "210101",
15221
+ "210102",
15222
+ "210103",
15223
+ "210200",
15224
+ "210201",
15225
+ "210300",
15226
+ "210301",
15227
+ "210302",
15228
+ "210303",
15229
+ "210400",
15230
+ "210401",
15231
+ "210402",
15232
+ "210500",
15233
+ "210501",
15234
+ "210502",
15235
+ "210503",
15236
+ "210504",
15237
+ "210600",
15238
+ "210601",
15239
+ "210602",
15240
+ "210700",
15241
+ "210701",
15242
+ "210800",
15243
+ "210801",
15244
+ "220000",
15245
+ "220100",
15246
+ "220101",
15247
+ "220102",
15248
+ "220103",
15249
+ "220104",
15250
+ "220105",
15251
+ "220106",
15252
+ "220107",
15253
+ "220108",
15254
+ "220109",
15255
+ "220110",
15256
+ "220111",
15257
+ "220200",
15258
+ "220201",
15259
+ "220202",
15260
+ "220203",
15261
+ "220300",
15262
+ "220301",
15263
+ "220302",
15264
+ "220303",
15265
+ "220400",
15266
+ "220401",
15267
+ "220402",
15268
+ "220500",
15269
+ "220501",
15270
+ "220502",
15271
+ "220503",
15272
+ "220600",
15273
+ "220601",
15274
+ "220602",
15275
+ "230000",
15276
+ "230100",
15277
+ "230101",
15278
+ "230200",
15279
+ "230201",
15280
+ "230202",
15281
+ "230203",
15282
+ "230300",
15283
+ "230301",
15284
+ "230400",
15285
+ "230401",
15286
+ "230500",
15287
+ "230501",
15288
+ "230600",
15289
+ "230601",
15290
+ "240000",
15291
+ "240100",
15292
+ "240101",
15293
+ "240102",
15294
+ "240103",
15295
+ "240104",
15296
+ "240105",
15297
+ "240106",
15298
+ "240200",
15299
+ "240201",
15300
+ "240202",
15301
+ "240300",
15302
+ "240301",
15303
+ "240400",
15304
+ "240401",
15305
+ "240402",
15306
+ "240403",
15307
+ "240404",
15308
+ "250000",
15309
+ "250100",
15310
+ "250101",
15311
+ "250102",
15312
+ "250104",
15313
+ "250105",
15314
+ "250106",
15315
+ "250107",
15316
+ "250200",
15317
+ "250201",
15318
+ "250300",
15319
+ "250301",
15320
+ "250302",
15321
+ "250303",
15322
+ "250400",
15323
+ "250401",
15324
+ "250402",
15325
+ "250500",
15326
+ "250501",
15327
+ "250502",
15328
+ "250503",
15329
+ "250504",
15330
+ "250600",
15331
+ "250601",
15332
+ "250602",
15333
+ "250700",
15334
+ "250701",
15335
+ "250702",
15336
+ "250703",
15337
+ "250800",
15338
+ "250801",
15339
+ "250802",
15340
+ "250803",
15341
+ "250900",
15342
+ "250901",
15343
+ "251000",
15344
+ "251001",
15345
+ "260000",
15346
+ "260100",
15347
+ "260101",
15348
+ "260200",
15349
+ "260201",
15350
+ "260300",
15351
+ "260301",
15352
+ "270000",
15353
+ "270100",
15354
+ "270101",
15355
+ "270102",
15356
+ "270103",
15357
+ "270104",
15358
+ "270200",
15359
+ "270201",
15360
+ "270202",
15361
+ "270203",
15362
+ "270204",
15363
+ "270205",
15364
+ "270300",
15365
+ "270301",
15366
+ "270302",
15367
+ "270303",
15368
+ "270304",
15369
+ "280000",
15370
+ "280100",
15371
+ "280101",
15372
+ "280102",
15373
+ "280103",
15374
+ "280104",
15375
+ "280105",
15376
+ "280106",
15377
+ "280200",
15378
+ "280201",
15379
+ "280300",
15380
+ "280301",
15381
+ "280302",
15382
+ "280303",
15383
+ "290000",
15384
+ "290100",
15385
+ "290101",
15386
+ "290102",
15387
+ "290103",
15388
+ "290104",
15389
+ "290200",
15390
+ "290201",
15391
+ "290300",
15392
+ "290301",
15393
+ "290302",
15394
+ "290303",
15395
+ "290400",
15396
+ "290402",
15397
+ "290403",
15398
+ "290500",
15399
+ "290501",
15400
+ "300000",
15401
+ "300100",
15402
+ "300101",
15403
+ "300102",
15404
+ "300103",
15405
+ "300104",
15406
+ "300200",
15407
+ "300201",
15408
+ "300202",
15409
+ "300300",
15410
+ "300301",
15411
+ "310000",
15412
+ "310100",
15413
+ "310101",
15414
+ "310102",
15415
+ "310103",
15416
+ "310104",
15417
+ "310105",
15418
+ "310200",
15419
+ "310201",
15420
+ "310300",
15421
+ "310301",
15422
+ "320000",
15423
+ "320100",
15424
+ "320101",
15425
+ "320102",
15426
+ "320200",
15427
+ "320201",
15428
+ "320300",
15429
+ "320301",
15430
+ "320302",
15431
+ "320400",
15432
+ "320401",
15433
+ "320402",
15434
+ "320500",
15435
+ "320501",
15436
+ "320502",
15437
+ "320600",
15438
+ "320601",
15439
+ "320602",
15440
+ "320603",
15441
+ "320700",
15442
+ "320701",
15443
+ "320702",
15444
+ "320703",
15445
+ ])
15446
+ .optional(),
15447
+ purchase_order_number: z
15448
+ .string()
15449
+ .refine((text) => Array.from(text).length >= 1)
15450
+ .refine((text) => Array.from(text).length <= 20)
15451
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
15452
+ .optional(),
15453
+ purchase_order_on: z
15454
+ .string()
15455
+ .regex(/^(?:(?:31-(?:0?[13578]|1[02])|(?:29|30)-(?:0?[13-9]|1[0-2])|(?:0?[1-9]|1[0-9]|2[0-8])-(?:0?[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-0?2-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000))$/)
15456
+ .optional(),
15457
+ tax_id: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
15458
+ }),
15459
+ income_type: z.enum(["01", "02", "03", "04", "05", "06"]),
15460
+ payment_type: z.enum(["1", "2", "3"]),
15461
+ }))
15462
+ .and(z.strictObject({
15463
+ additional_information: zAdditionalDocumentInformation.optional(),
15464
+ deferred_submission: z.enum(["1"]).optional(),
15465
+ discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
15466
+ foreign_currency: zForeignCurrencyIntent.optional(),
15467
+ payment_due_on: z
15468
+ .string()
15469
+ .regex(/^(?:(?:31-(?:0?[13578]|1[02])|(?:29|30)-(?:0?[13-9]|1[0-2])|(?:0?[1-9]|1[0-9]|2[0-8])-(?:0?[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-0?2-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000))$/)
15470
+ .optional(),
15471
+ reference_information: zReferenceInformation.optional(),
15472
+ tax_inclusive_amounts: z.enum(["0", "1"]).optional(),
15473
+ }))
15474
+ .and(z.strictObject({
15475
+ currency: z.enum(["DOP"]),
15476
+ lines: z.array(zType31Line).min(1).max(1000),
15477
+ }));
14755
15478
  /**
14756
15479
  * Factura de Crédito Fiscal Electrónica, code 31.
14757
15480
  */
14758
15481
  export const zType31Intent = z.strictObject({
15482
+ additional_information: zAdditionalDocumentInformation.optional(),
14759
15483
  buyer: zBuyer,
14760
15484
  currency: z.enum(["DOP"]),
14761
15485
  deferred_submission: z.enum(["1"]).optional(),
@@ -15382,7 +16106,10 @@ export const zType31Intent = z.strictObject({
15382
16106
  "320702",
15383
16107
  "320703",
15384
16108
  ]),
15385
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
16109
+ phones: z
16110
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
16111
+ .min(1)
16112
+ .max(3),
15386
16113
  province_code: z.enum([
15387
16114
  "010000",
15388
16115
  "010100",
@@ -15987,7 +16714,8 @@ export const zType31Intent = z.strictObject({
15987
16714
  .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
15988
16715
  .optional(),
15989
16716
  }),
15990
- lines: z.array(zFiscalLineWithLegalTip).min(1).max(1000),
16717
+ lines: z.array(zType31Line).min(1).max(1000),
16718
+ payment_account: zPaymentAccount.optional(),
15991
16719
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
15992
16720
  payment_due_on: z
15993
16721
  .string()
@@ -16013,6 +16741,10 @@ export const zType32Buyer = z.union([
16013
16741
  identity_kind: z.enum(["anonymous"]),
16014
16742
  }),
16015
16743
  z.strictObject({
16744
+ delivery_phone: z
16745
+ .string()
16746
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
16747
+ .optional(),
16016
16748
  identity_kind: z.enum(["domestic"]),
16017
16749
  legal_name: z
16018
16750
  .string()
@@ -16022,6 +16754,10 @@ export const zType32Buyer = z.union([
16022
16754
  tax_id: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
16023
16755
  }),
16024
16756
  z.strictObject({
16757
+ delivery_phone: z
16758
+ .string()
16759
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
16760
+ .optional(),
16025
16761
  foreign_identifier: z
16026
16762
  .string()
16027
16763
  .refine((text) => Array.from(text).length >= 1)
@@ -16039,6 +16775,7 @@ export const zType32Buyer = z.union([
16039
16775
  * Factura de Consumo Electrónica, code 32.
16040
16776
  */
16041
16777
  export const zType32Intent = z.strictObject({
16778
+ additional_information: zAdditionalDocumentInformation.optional(),
16042
16779
  buyer: zType32Buyer,
16043
16780
  currency: z.enum(["DOP"]),
16044
16781
  deferred_submission: z.enum(["1"]).optional(),
@@ -16665,7 +17402,10 @@ export const zType32Intent = z.strictObject({
16665
17402
  "320702",
16666
17403
  "320703",
16667
17404
  ]),
16668
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
17405
+ phones: z
17406
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
17407
+ .min(1)
17408
+ .max(3),
16669
17409
  province_code: z.enum([
16670
17410
  "010000",
16671
17411
  "010100",
@@ -17271,6 +18011,7 @@ export const zType32Intent = z.strictObject({
17271
18011
  .optional(),
17272
18012
  }),
17273
18013
  lines: z.array(zFiscalLineWithLegalTip).min(1).max(1000),
18014
+ payment_account: zPaymentAccount.optional(),
17274
18015
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
17275
18016
  payment_due_on: z
17276
18017
  .string()
@@ -17288,6 +18029,7 @@ export const zType32Intent = z.strictObject({
17288
18029
  * Nota de Débito Electrónica, code 33.
17289
18030
  */
17290
18031
  export const zType33Intent = z.strictObject({
18032
+ additional_information: zAdditionalDocumentInformation.optional(),
17291
18033
  affected_document: z.strictObject({
17292
18034
  attribution: zAffectedFiscalDocumentAttribution,
17293
18035
  consumer_invoice_total: z
@@ -17931,7 +18673,10 @@ export const zType33Intent = z.strictObject({
17931
18673
  "320702",
17932
18674
  "320703",
17933
18675
  ]),
17934
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
18676
+ phones: z
18677
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
18678
+ .min(1)
18679
+ .max(3),
17935
18680
  province_code: z.enum([
17936
18681
  "010000",
17937
18682
  "010100",
@@ -18537,6 +19282,7 @@ export const zType33Intent = z.strictObject({
18537
19282
  .optional(),
18538
19283
  }),
18539
19284
  lines: z.array(zFiscalLineWithLegalTip).min(1).max(10000),
19285
+ payment_account: zPaymentAccount.optional(),
18540
19286
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
18541
19287
  payment_due_on: z
18542
19288
  .string()
@@ -18553,6 +19299,7 @@ export const zType33Intent = z.strictObject({
18553
19299
  * Nota de Crédito Electrónica, code 34.
18554
19300
  */
18555
19301
  export const zType34Intent = z.strictObject({
19302
+ additional_information: zAdditionalDocumentInformation.optional(),
18556
19303
  affected_document: z.strictObject({
18557
19304
  attribution: zAffectedFiscalDocumentAttribution,
18558
19305
  consumer_invoice_total: z
@@ -19196,7 +19943,10 @@ export const zType34Intent = z.strictObject({
19196
19943
  "320702",
19197
19944
  "320703",
19198
19945
  ]),
19199
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
19946
+ phones: z
19947
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
19948
+ .min(1)
19949
+ .max(3),
19200
19950
  province_code: z.enum([
19201
19951
  "010000",
19202
19952
  "010100",
@@ -19830,6 +20580,12 @@ export const zType41LineWithholding = z.strictObject({
19830
20580
  * One Type 41 line with the mandatory official withholding section.
19831
20581
  */
19832
20582
  export const zType41Line = z.strictObject({
20583
+ adjustments: z
20584
+ .strictObject({
20585
+ discounts: z.array(zLinePriceAdjustment).min(0).max(12).optional(),
20586
+ surcharges: z.array(zLinePriceAdjustment).min(0).max(12).optional(),
20587
+ })
20588
+ .optional(),
19833
20589
  billing_indicator: z.enum(["1", "2", "3", "4"]),
19834
20590
  goods_or_service_indicator: z.enum(["1", "2"]),
19835
20591
  item_codes: z.array(zFiscalItemCode).min(0).max(5).optional(),
@@ -20480,7 +21236,10 @@ export const zType43Intent = z.strictObject({
20480
21236
  "320702",
20481
21237
  "320703",
20482
21238
  ]),
20483
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
21239
+ phones: z
21240
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
21241
+ .min(1)
21242
+ .max(3),
20484
21243
  province_code: z.enum([
20485
21244
  "010000",
20486
21245
  "010100",
@@ -21085,8 +21844,13 @@ export const zType43Intent = z.strictObject({
21085
21844
  * Comprobante Electrónico para Regímenes Especiales, code 44.
21086
21845
  */
21087
21846
  export const zType44Intent = z.strictObject({
21847
+ additional_information: zAdditionalDocumentInformation.optional(),
21088
21848
  buyer: z.union([
21089
21849
  z.strictObject({
21850
+ delivery_phone: z
21851
+ .string()
21852
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
21853
+ .optional(),
21090
21854
  identity_kind: z.enum(["domestic"]),
21091
21855
  legal_name: z
21092
21856
  .string()
@@ -21096,6 +21860,10 @@ export const zType44Intent = z.strictObject({
21096
21860
  tax_id: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
21097
21861
  }),
21098
21862
  z.strictObject({
21863
+ delivery_phone: z
21864
+ .string()
21865
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
21866
+ .optional(),
21099
21867
  foreign_identifier: z
21100
21868
  .string()
21101
21869
  .refine((text) => Array.from(text).length >= 1)
@@ -21735,7 +22503,10 @@ export const zType44Intent = z.strictObject({
21735
22503
  "320702",
21736
22504
  "320703",
21737
22505
  ]),
21738
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
22506
+ phones: z
22507
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
22508
+ .min(1)
22509
+ .max(3),
21739
22510
  province_code: z.enum([
21740
22511
  "010000",
21741
22512
  "010100",
@@ -22341,6 +23112,7 @@ export const zType44Intent = z.strictObject({
22341
23112
  .optional(),
22342
23113
  }),
22343
23114
  lines: z.array(zSpecialRegimeLine).min(1).max(1000),
23115
+ payment_account: zPaymentAccount.optional(),
22344
23116
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
22345
23117
  payment_due_on: z
22346
23118
  .string()
@@ -22358,6 +23130,7 @@ export const zType44Intent = z.strictObject({
22358
23130
  * Comprobante Electrónico Gubernamental, code 45.
22359
23131
  */
22360
23132
  export const zType45Intent = z.strictObject({
23133
+ additional_information: zGovernmentAdditionalDocumentInformation.optional(),
22361
23134
  currency: z.enum(["DOP"]),
22362
23135
  deferred_submission: z.enum(["1"]).optional(),
22363
23136
  discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
@@ -22985,7 +23758,10 @@ export const zType45Intent = z.strictObject({
22985
23758
  "320702",
22986
23759
  "320703",
22987
23760
  ]),
22988
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
23761
+ phones: z
23762
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
23763
+ .min(1)
23764
+ .max(3),
22989
23765
  province_code: z.enum([
22990
23766
  "010000",
22991
23767
  "010100",
@@ -23591,6 +24367,7 @@ export const zType45Intent = z.strictObject({
23591
24367
  .optional(),
23592
24368
  }),
23593
24369
  lines: z.array(zFiscalLineWithLegalTip).min(1).max(1000),
24370
+ payment_account: zPaymentAccount.optional(),
23594
24371
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
23595
24372
  payment_due_on: z
23596
24373
  .string()
@@ -23604,10 +24381,61 @@ export const zType45Intent = z.strictObject({
23604
24381
  .regex(/^(?:(?:31-(?:0[13578]|1[02])|(?:29|30)-(?:0[13-9]|1[0-2])|(?:0[1-9]|1[0-9]|2[0-8])-(?:0[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-02-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000)) (?:[0-9]|[01][0-9]|2[0-3]):(?:[0-9]|[0-5][0-9]):(?:[0-9]|[0-5][0-9])$/),
23605
24382
  tax_inclusive_amounts: z.enum(["0", "1"]).optional(),
23606
24383
  });
24384
+ /**
24385
+ * A Type 46 line with its profile-permitted line-level discounts and surcharges.
24386
+ */
24387
+ export const zType46Line = z.strictObject({
24388
+ adjustments: z
24389
+ .strictObject({
24390
+ discounts: z.array(zLinePriceAdjustment).min(0).max(12).optional(),
24391
+ surcharges: z.array(zLinePriceAdjustment).min(0).max(12).optional(),
24392
+ })
24393
+ .optional(),
24394
+ billing_indicator: z.enum(["0", "1", "2", "3", "4"]),
24395
+ goods_or_service_indicator: z.enum(["1", "2"]),
24396
+ item_codes: z.array(zFiscalItemCode).min(0).max(5).optional(),
24397
+ measurement_unit: z.string().regex(/^([1-9]|[1-5][0-9]|6[0-2])$/),
24398
+ name: z
24399
+ .string()
24400
+ .refine((text) => Array.from(text).length >= 1)
24401
+ .refine((text) => Array.from(text).length <= 80)
24402
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
24403
+ quantity: z.string().regex(/^(?=[0-9.]*[1-9])[0-9]{1,16}(\.[0-9]{1,2})?$/),
24404
+ source_line_id: z
24405
+ .string()
24406
+ .refine((text) => Array.from(text).length >= 1)
24407
+ .refine((text) => Array.from(text).length <= 128)
24408
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
24409
+ unit_price: z.string().regex(/^[0-9]{1,16}(\.[0-9]{1,4})?$/),
24410
+ });
24411
+ export const zSourceType46Snapshot = zOptionalPaymentAllocations
24412
+ .and(z.strictObject({
24413
+ export_customer: zExportCustomer,
24414
+ export_eligibility: zCallerDeclaredExportEligibility,
24415
+ income_type: z.enum(["01", "02", "03", "04", "05", "06"]),
24416
+ payment_type: z.enum(["1", "2", "3"]),
24417
+ }))
24418
+ .and(z.strictObject({
24419
+ additional_information: zAdditionalDocumentInformation.optional(),
24420
+ deferred_submission: z.enum(["1"]).optional(),
24421
+ discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
24422
+ foreign_currency: zForeignCurrencyIntent.optional(),
24423
+ payment_due_on: z
24424
+ .string()
24425
+ .regex(/^(?:(?:31-(?:0?[13578]|1[02])|(?:29|30)-(?:0?[13-9]|1[0-2])|(?:0?[1-9]|1[0-9]|2[0-8])-(?:0?[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-0?2-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000))$/)
24426
+ .optional(),
24427
+ reference_information: zReferenceInformation.optional(),
24428
+ tax_inclusive_amounts: z.enum(["0", "1"]).optional(),
24429
+ }))
24430
+ .and(z.strictObject({
24431
+ currency: z.enum(["DOP"]),
24432
+ lines: z.array(zType46Line).min(1).max(1000),
24433
+ }));
23607
24434
  /**
23608
24435
  * Comprobante para Exportaciones Electrónico, code 46.
23609
24436
  */
23610
24437
  export const zType46Intent = z.strictObject({
24438
+ additional_information: zAdditionalDocumentInformation.optional(),
23611
24439
  currency: z.enum(["DOP"]),
23612
24440
  deferred_submission: z.enum(["1"]).optional(),
23613
24441
  discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
@@ -24235,7 +25063,10 @@ export const zType46Intent = z.strictObject({
24235
25063
  "320702",
24236
25064
  "320703",
24237
25065
  ]),
24238
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
25066
+ phones: z
25067
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
25068
+ .min(1)
25069
+ .max(3),
24239
25070
  province_code: z.enum([
24240
25071
  "010000",
24241
25072
  "010100",
@@ -24840,7 +25671,8 @@ export const zType46Intent = z.strictObject({
24840
25671
  .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
24841
25672
  .optional(),
24842
25673
  }),
24843
- lines: z.array(zFiscalLine).min(1).max(1000),
25674
+ lines: z.array(zType46Line).min(1).max(1000),
25675
+ payment_account: zPaymentAccount.optional(),
24844
25676
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
24845
25677
  payment_due_on: z
24846
25678
  .string()
@@ -25487,7 +26319,10 @@ export const zType47Intent = z.strictObject({
25487
26319
  "320702",
25488
26320
  "320703",
25489
26321
  ]),
25490
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
26322
+ phones: z
26323
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
26324
+ .min(1)
26325
+ .max(3),
25491
26326
  province_code: z.enum([
25492
26327
  "010000",
25493
26328
  "010100",
@@ -26081,6 +26916,7 @@ export const zType47Intent = z.strictObject({
26081
26916
  .optional(),
26082
26917
  }),
26083
26918
  lines: z.array(zForeignPaymentLine).min(1).max(1000),
26919
+ payment_account: zPaymentAccount.optional(),
26084
26920
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
26085
26921
  payment_due_on: z
26086
26922
  .string()
@@ -27306,6 +28142,7 @@ export const zSourceType41Snapshot = zOptionalPaymentAllocations
27306
28142
  supplier: zUnregisteredSupplier,
27307
28143
  }))
27308
28144
  .and(z.strictObject({
28145
+ additional_information: zAdditionalDocumentInformation.optional(),
27309
28146
  deferred_submission: z.enum(["1"]).optional(),
27310
28147
  discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
27311
28148
  foreign_currency: zForeignCurrencyIntent.optional(),
@@ -27401,6 +28238,7 @@ export const zFiscalOperationSubmission = z.union([
27401
28238
  * Comprobante Electrónico de Compras, code 41.
27402
28239
  */
27403
28240
  export const zType41Intent = z.strictObject({
28241
+ additional_information: zAdditionalDocumentInformation.optional(),
27404
28242
  currency: z.enum(["DOP"]),
27405
28243
  deferred_submission: z.enum(["1"]).optional(),
27406
28244
  discounts_or_surcharges: z.array(zDiscountOrSurcharge).min(1).max(20).optional(),
@@ -28031,7 +28869,10 @@ export const zType41Intent = z.strictObject({
28031
28869
  "320702",
28032
28870
  "320703",
28033
28871
  ]),
28034
- phone: z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/),
28872
+ phones: z
28873
+ .array(z.string().regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/))
28874
+ .min(1)
28875
+ .max(3),
28035
28876
  province_code: z.enum([
28036
28877
  "010000",
28037
28878
  "010100",
@@ -28625,6 +29466,7 @@ export const zType41Intent = z.strictObject({
28625
29466
  .optional(),
28626
29467
  }),
28627
29468
  lines: z.array(zType41Line).min(1).max(1000),
29469
+ payment_account: zPaymentAccount.optional(),
28628
29470
  payment_allocations: z.array(zPaymentAllocation).min(0).max(7).optional(),
28629
29471
  payment_due_on: z
28630
29472
  .string()
@@ -29473,6 +30315,42 @@ export const zCreateHostedTenantWebhookSecretRotationPath = z.object({
29473
30315
  * The rotation this Idempotency-Key already made.
29474
30316
  */
29475
30317
  export const zCreateHostedTenantWebhookSecretRotationResponse = zHostedWebhookSecretRotation;
30318
+ export const zUploadHostedCertificationTestSetBody = zCertificationTestSetUploadRequest;
30319
+ export const zUploadHostedCertificationTestSetHeaders = z.object({
30320
+ "Idempotency-Key": z
30321
+ .string()
30322
+ .refine((text) => Array.from(text).length >= 16)
30323
+ .refine((text) => Array.from(text).length <= 255)
30324
+ .regex(/^[A-Za-z0-9._:-]+$/),
30325
+ });
30326
+ export const zUploadHostedCertificationTestSetPath = z.object({
30327
+ attemptReference: z.string().regex(/^cert_[a-z0-9]{24,100}$/),
30328
+ });
30329
+ export const zUploadHostedCertificationTestSetQuery = z.object({
30330
+ checkout_tenant_id: z
30331
+ .string()
30332
+ .refine((text) => Array.from(text).length >= 1)
30333
+ .optional(),
30334
+ environment: zFiscalEnvironment.optional(),
30335
+ });
30336
+ /**
30337
+ * The original upload recovered by its idempotency key.
30338
+ */
30339
+ export const zUploadHostedCertificationTestSetResponse = zCertificationTestSetResource;
30340
+ export const zRetrieveHostedCertificationTestSetPath = z.object({
30341
+ attemptReference: z.string().regex(/^cert_[a-z0-9]{24,100}$/),
30342
+ });
30343
+ export const zRetrieveHostedCertificationTestSetQuery = z.object({
30344
+ checkout_tenant_id: z
30345
+ .string()
30346
+ .refine((text) => Array.from(text).length >= 1)
30347
+ .optional(),
30348
+ environment: zFiscalEnvironment.optional(),
30349
+ });
30350
+ /**
30351
+ * The latest retained workbook, or null when no set was uploaded.
30352
+ */
30353
+ export const zRetrieveHostedCertificationTestSetResponse = zCurrentCertificationTestSet;
29476
30354
  export const zListHostedInvoicesQuery = z.object({
29477
30355
  cursor: z
29478
30356
  .string()