@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
@@ -102,6 +102,19 @@ export const zBuyerDeliveryTerminalResultCode = z.enum([
102
102
  * Exporter classification retained as a caller declaration, not authority confirmation.
103
103
  */
104
104
  export const zCertificateCustodySignatureAlgorithm = z.enum(["rsa_sha256"]);
105
+ export const zCertificationTestSetKind = z.enum(["ecf"]);
106
+ export const zCertificationTestSetObject = z.enum(["certification_test_set"]);
107
+ export const zCertificationTestSetRequirement = z.enum(["case_mapping_pending"]);
108
+ export const zCertificationWorksheetName = z.enum(["ECF", "RFCE"]);
109
+ export const zCertificationWorksheetSummary = z.object({
110
+ caseCount: z.int().gte(1).lte(1000),
111
+ name: zCertificationWorksheetName,
112
+ });
113
+ export const zCertificationTestSetReview = z.object({
114
+ requirements: z.array(zCertificationTestSetRequirement),
115
+ status: z.enum(["review_required"]),
116
+ worksheets: z.array(zCertificationWorksheetSummary),
117
+ });
105
118
  /**
106
119
  * The wire family a Collection page announces.
107
120
  */
@@ -506,7 +519,7 @@ export const zFiscalLifecycleResultCode = z.enum([
506
519
  "fiscal_signing_retry_requested",
507
520
  ]);
508
521
  /**
509
- * One fiscal line admitted by sales and adjustment document profiles.
522
+ * Deterministic totals calculated for one fiscal line.
510
523
  */
511
524
  export const zFiscalLineTotal = z.object({
512
525
  net: z.string().regex(/^-?[0-9]+\.[0-9]{2}$/),
@@ -753,6 +766,10 @@ export const zInvoiceBuyerIdentity = lenientUnion([
753
766
  kind: z.enum(["anonymous"]),
754
767
  }),
755
768
  z.object({
769
+ deliveryPhone: z
770
+ .string()
771
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
772
+ .optional(),
756
773
  kind: z.enum(["domestic"]),
757
774
  legalName: z
758
775
  .string()
@@ -762,6 +779,10 @@ export const zInvoiceBuyerIdentity = lenientUnion([
762
779
  taxId: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
763
780
  }),
764
781
  z.object({
782
+ deliveryPhone: z
783
+ .string()
784
+ .regex(/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/)
785
+ .optional(),
765
786
  foreignId: z
766
787
  .string()
767
788
  .refine((text) => Array.from(text).length >= 1)
@@ -946,6 +967,34 @@ export const zInvoiceLatestEvent = z.object({
946
967
  occurredAt: z.iso.datetime(),
947
968
  sequence: z.string().regex(/^[1-9][0-9]*$/),
948
969
  });
970
+ export const zInvoiceLinePriceAdjustmentResource = lenientUnion([
971
+ z.object({
972
+ amount: z.string().regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/),
973
+ kind: z.enum(["fixed_amount"]),
974
+ }),
975
+ z.object({
976
+ kind: z.enum(["percentage"]),
977
+ percentage: z.string().regex(/^(?=[0-9.]*[1-9])[0-9]{1,3}(\.[0-9]{1,2})?$/),
978
+ }),
979
+ ]);
980
+ export const zInvoiceLinePriceAdjustmentsResource = z.object({
981
+ discounts: z.array(zInvoiceLinePriceAdjustmentResource),
982
+ surcharges: z.array(zInvoiceLinePriceAdjustmentResource),
983
+ });
984
+ export const zInvoicePaymentAccountResource = z.object({
985
+ accountNumber: z
986
+ .string()
987
+ .refine((text) => Array.from(text).length >= 1)
988
+ .refine((text) => Array.from(text).length <= 28)
989
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
990
+ .nullable(),
991
+ bankName: z
992
+ .string()
993
+ .refine((text) => Array.from(text).length >= 1)
994
+ .refine((text) => Array.from(text).length <= 75)
995
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
996
+ .nullable(),
997
+ });
949
998
  export const zInvoicePdfLayout = z.enum(["a4", "receipt80mm"]);
950
999
  export const zInvoicePdfStage = z.enum([
951
1000
  "awaitingSignedSource",
@@ -971,6 +1020,131 @@ export const zInvoiceReceiptAccess = z.object({
971
1020
  });
972
1021
  export const zInvoiceReceiptCurrency = z.enum(["DOP"]);
973
1022
  export const zInvoiceReceiptStatus = z.enum(["accepted", "acceptedWithObservations"]);
1023
+ export const zInvoiceReferenceAttributionResource = lenientUnion([
1024
+ z.object({
1025
+ fiscalOperationId: z
1026
+ .string()
1027
+ .regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/),
1028
+ kind: z.enum(["internal_operation"]),
1029
+ }),
1030
+ z.object({
1031
+ environment: zFiscalEnvironment,
1032
+ issuerTaxId: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
1033
+ kind: z.enum(["external_document"]),
1034
+ sourceReference: z
1035
+ .string()
1036
+ .refine((text) => Array.from(text).length >= 1)
1037
+ .refine((text) => Array.from(text).length <= 250)
1038
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
1039
+ }),
1040
+ ]);
1041
+ export const zInvoiceReferenceInformationResource = z.object({
1042
+ attribution: zInvoiceReferenceAttributionResource,
1043
+ fiscalNumber: z.string().regex(/^(B[0-9]{10}|E[0-9]{12}|[AP][0-9]{18})$/),
1044
+ issuedOn: z
1045
+ .string()
1046
+ .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))$/),
1047
+ modificationCode: z.enum(["4", "5"]),
1048
+ });
1049
+ export const zInvoiceShipmentInformationResource = z.object({
1050
+ containerNumber: z
1051
+ .string()
1052
+ .refine((text) => Array.from(text).length >= 1)
1053
+ .refine((text) => Array.from(text).length <= 100)
1054
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
1055
+ .nullable(),
1056
+ deliveryNoteNumber: z
1057
+ .string()
1058
+ .refine((text) => Array.from(text).length >= 1)
1059
+ .refine((text) => Array.from(text).length <= 20)
1060
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
1061
+ .nullable(),
1062
+ driver: z
1063
+ .string()
1064
+ .refine((text) => Array.from(text).length >= 1)
1065
+ .refine((text) => Array.from(text).length <= 20)
1066
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
1067
+ .nullable(),
1068
+ grossWeight: z
1069
+ .string()
1070
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
1071
+ .nullable(),
1072
+ grossWeightUnit: z
1073
+ .string()
1074
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
1075
+ .nullable(),
1076
+ netWeight: z
1077
+ .string()
1078
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
1079
+ .nullable(),
1080
+ netWeightUnit: z
1081
+ .string()
1082
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
1083
+ .nullable(),
1084
+ packageCount: z
1085
+ .string()
1086
+ .regex(/^[0-9]{1,16}(\.[0-9]{1,2})?$/)
1087
+ .nullable(),
1088
+ packageUnit: z
1089
+ .string()
1090
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
1091
+ .nullable(),
1092
+ packageVolume: z
1093
+ .string()
1094
+ .regex(/^(?=[0-9.]*[1-9])[0-9]{1,16}(\.[0-9]{1,2})?$/)
1095
+ .nullable(),
1096
+ route: z
1097
+ .string()
1098
+ .refine((text) => Array.from(text).length >= 1)
1099
+ .refine((text) => Array.from(text).length <= 20)
1100
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
1101
+ .nullable(),
1102
+ shipmentDate: z
1103
+ .string()
1104
+ .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))$/)
1105
+ .nullable(),
1106
+ shipmentNumber: z
1107
+ .string()
1108
+ .refine((text) => Array.from(text).length >= 1)
1109
+ .refine((text) => Array.from(text).length <= 25)
1110
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
1111
+ .nullable(),
1112
+ transportDocumentNumber: z
1113
+ .string()
1114
+ .refine((text) => Array.from(text).length >= 1)
1115
+ .refine((text) => Array.from(text).length <= 20)
1116
+ .regex(/^[0-9]+$/)
1117
+ .nullable(),
1118
+ transportZone: z
1119
+ .string()
1120
+ .refine((text) => Array.from(text).length >= 1)
1121
+ .refine((text) => Array.from(text).length <= 20)
1122
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
1123
+ .nullable(),
1124
+ vehicleFiche: z
1125
+ .string()
1126
+ .refine((text) => Array.from(text).length >= 1)
1127
+ .refine((text) => Array.from(text).length <= 10)
1128
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
1129
+ .nullable(),
1130
+ vehiclePlate: z
1131
+ .string()
1132
+ .refine((text) => Array.from(text).length >= 1)
1133
+ .refine((text) => Array.from(text).length <= 7)
1134
+ .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u)
1135
+ .nullable(),
1136
+ volumeUnit: z
1137
+ .string()
1138
+ .regex(/^([1-9]|[1-5][0-9]|6[0-2])$/)
1139
+ .nullable(),
1140
+ });
1141
+ export const zInvoiceAdditionalInformationResource = z.object({
1142
+ referenceNumber: z
1143
+ .string()
1144
+ .refine((text) => Array.from(text).length <= 20)
1145
+ .nullable(),
1146
+ shipment: zInvoiceShipmentInformationResource.nullable(),
1147
+ });
974
1148
  /**
975
1149
  * The signature facts DGII requires on every printed e-CF, read from the signed document.
976
1150
  *
@@ -2494,6 +2668,9 @@ export const zLegalIssuerPage = z.object({
2494
2668
  export const zLegalIssuerResource = z.object({
2495
2669
  legal_issuer: zLegalIssuer,
2496
2670
  });
2671
+ /**
2672
+ * One fixed-amount or percentage discount or surcharge on a fiscal line.
2673
+ */
2497
2674
  export const zMembershipRole = z.enum(["administrator", "operator"]);
2498
2675
  export const zAcceptedMembership = z.object({
2499
2676
  organization_id: z.uuid(),
@@ -2633,7 +2810,7 @@ export const zOrganizationResource = z.object({
2633
2810
  organization: zOrganizationIdentity,
2634
2811
  });
2635
2812
  /**
2636
- * One authoritative payment-method and amount pair from `TablaFormasPago`.
2813
+ * Bank details that accompany an optional payment method table.
2637
2814
  */
2638
2815
  export const zPrintedRepresentationA4ProfileVersion = z.enum(["a4.v1"]);
2639
2816
  /**
@@ -2945,6 +3122,24 @@ export const zRequirementId = z.enum([
2945
3122
  "first_fiscal_operation",
2946
3123
  ]);
2947
3124
  export const zRequirementStatus = z.enum(["complete", "pending", "blocked", "action_required"]);
3125
+ export const zRetainedCertificationWorkbook = z.object({
3126
+ name: z.string(),
3127
+ sha256: z.string().regex(/^[0-9a-f]{64}$/),
3128
+ sizeBytes: z.int().gte(1).lte(3145728),
3129
+ });
3130
+ export const zCertificationTestSetResource = z.object({
3131
+ attemptReference: z.string(),
3132
+ createdAt: z.iso.datetime(),
3133
+ file: zRetainedCertificationWorkbook,
3134
+ generation: z.string().regex(/^[1-9][0-9]*$/),
3135
+ id: z.uuid(),
3136
+ kind: zCertificationTestSetKind,
3137
+ object: zCertificationTestSetObject,
3138
+ review: zCertificationTestSetReview,
3139
+ });
3140
+ export const zCurrentCertificationTestSet = z.object({
3141
+ current: zCertificationTestSetResource.nullable(),
3142
+ });
2948
3143
  export const zSchemaValidationDiagnosticCode = z.enum([
2949
3144
  "document_xml_unreadable",
2950
3145
  "document_schema_rejected",
@@ -2957,6 +3152,9 @@ export const zSchemaValidationOutcome = z.enum(["succeeded", "failed"]);
2957
3152
  * Stage at which a fiscal XML artifact was validated.
2958
3153
  */
2959
3154
  export const zSchemaValidationStage = z.enum(["unsigned", "signed"]);
3155
+ /**
3156
+ * Typed shipping and transport facts admitted by the official `InformacionesAdicionales` area.
3157
+ */
2960
3158
  export const zSignedDocumentReadinessResource = lenientUnion([
2961
3159
  z.object({
2962
3160
  status: z.enum(["not_applicable"]),
@@ -3128,6 +3326,7 @@ export const zSourceFiscalOperationPage = z.object({
3128
3326
  export const zSourceItemKind = z.enum(["good", "service"]);
3129
3327
  export const zInvoiceItemResource = z.object({
3130
3328
  additionalTaxCodes: z.array(z.string()),
3329
+ adjustments: zInvoiceLinePriceAdjustmentsResource.nullable(),
3131
3330
  description: z.string(),
3132
3331
  id: z.string(),
3133
3332
  itemCodes: z.array(zInvoiceItemCodeResource),
@@ -3159,6 +3358,7 @@ export const zInvoicePaymentAllocation = z.object({
3159
3358
  export const zInvoicePaymentTermsResource = lenientUnion([
3160
3359
  z.object({
3161
3360
  allocations: z.array(zInvoicePaymentAllocation).max(7),
3361
+ paymentAccount: zInvoicePaymentAccountResource.optional(),
3162
3362
  type: z.enum(["immediate"]),
3163
3363
  }),
3164
3364
  z.object({
@@ -3194,6 +3394,7 @@ export const zInvoiceReceipt = z.object({
3194
3394
  export const zInvoiceResource = lenientUnion([
3195
3395
  z.object({
3196
3396
  acceptedAt: z.iso.datetime().nullable(),
3397
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
3197
3398
  buyer: zInvoiceBuyerIdentity.nullable(),
3198
3399
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
3199
3400
  corrections: z.array(zInvoiceCorrection),
@@ -3212,6 +3413,7 @@ export const zInvoiceResource = lenientUnion([
3212
3413
  latestEvent: zInvoiceLatestEvent.nullable(),
3213
3414
  originalInvoiceId: z.uuid().nullable(),
3214
3415
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
3416
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
3215
3417
  replacesInvoiceId: z.uuid().nullable(),
3216
3418
  source: zInvoiceSource,
3217
3419
  status: z.enum(["rejected"]),
@@ -3222,6 +3424,7 @@ export const zInvoiceResource = lenientUnion([
3222
3424
  }),
3223
3425
  z.object({
3224
3426
  acceptedAt: z.iso.datetime().nullable(),
3427
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
3225
3428
  buyer: zInvoiceBuyerIdentity.nullable(),
3226
3429
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
3227
3430
  corrections: z.array(zInvoiceCorrection),
@@ -3241,6 +3444,7 @@ export const zInvoiceResource = lenientUnion([
3241
3444
  latestEvent: zInvoiceLatestEvent.nullable(),
3242
3445
  originalInvoiceId: z.uuid().nullable(),
3243
3446
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
3447
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
3244
3448
  replacesInvoiceId: z.uuid().nullable(),
3245
3449
  source: zInvoiceSource,
3246
3450
  stage: zInvoiceProcessingStage,
@@ -3252,6 +3456,7 @@ export const zInvoiceResource = lenientUnion([
3252
3456
  }),
3253
3457
  z.object({
3254
3458
  acceptedAt: z.iso.datetime().nullable(),
3459
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
3255
3460
  buyer: zInvoiceBuyerIdentity.nullable(),
3256
3461
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
3257
3462
  corrections: z.array(zInvoiceCorrection),
@@ -3271,6 +3476,7 @@ export const zInvoiceResource = lenientUnion([
3271
3476
  latestEvent: zInvoiceLatestEvent.nullable(),
3272
3477
  originalInvoiceId: z.uuid().nullable(),
3273
3478
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
3479
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
3274
3480
  replacesInvoiceId: z.uuid().nullable(),
3275
3481
  source: zInvoiceSource,
3276
3482
  status: z.enum(["verifying"]),
@@ -3281,6 +3487,7 @@ export const zInvoiceResource = lenientUnion([
3281
3487
  }),
3282
3488
  z.object({
3283
3489
  acceptedAt: z.iso.datetime().nullable(),
3490
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
3284
3491
  buyer: zInvoiceBuyerIdentity.nullable(),
3285
3492
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
3286
3493
  corrections: z.array(zInvoiceCorrection),
@@ -3300,6 +3507,7 @@ export const zInvoiceResource = lenientUnion([
3300
3507
  latestEvent: zInvoiceLatestEvent.nullable(),
3301
3508
  originalInvoiceId: z.uuid().nullable(),
3302
3509
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
3510
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
3303
3511
  replacesInvoiceId: z.uuid().nullable(),
3304
3512
  source: zInvoiceSource,
3305
3513
  status: z.enum(["accepted"]),
@@ -3310,6 +3518,7 @@ export const zInvoiceResource = lenientUnion([
3310
3518
  }),
3311
3519
  z.object({
3312
3520
  acceptedAt: z.iso.datetime().nullable(),
3521
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
3313
3522
  buyer: zInvoiceBuyerIdentity.nullable(),
3314
3523
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
3315
3524
  corrections: z.array(zInvoiceCorrection),
@@ -3329,6 +3538,7 @@ export const zInvoiceResource = lenientUnion([
3329
3538
  latestEvent: zInvoiceLatestEvent.nullable(),
3330
3539
  originalInvoiceId: z.uuid().nullable(),
3331
3540
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
3541
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
3332
3542
  replacesInvoiceId: z.uuid().nullable(),
3333
3543
  source: zInvoiceSource,
3334
3544
  status: z.enum(["acceptedWithObservations"]),
@@ -3339,6 +3549,7 @@ export const zInvoiceResource = lenientUnion([
3339
3549
  }),
3340
3550
  z.object({
3341
3551
  acceptedAt: z.iso.datetime().nullable(),
3552
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
3342
3553
  buyer: zInvoiceBuyerIdentity.nullable(),
3343
3554
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
3344
3555
  corrections: z.array(zInvoiceCorrection),
@@ -3358,6 +3569,7 @@ export const zInvoiceResource = lenientUnion([
3358
3569
  latestEvent: zInvoiceLatestEvent.nullable(),
3359
3570
  originalInvoiceId: z.uuid().nullable(),
3360
3571
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
3572
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
3361
3573
  replacesInvoiceId: z.uuid().nullable(),
3362
3574
  source: zInvoiceSource,
3363
3575
  status: z.enum(["authorityRejected"]),
@@ -3368,6 +3580,7 @@ export const zInvoiceResource = lenientUnion([
3368
3580
  }),
3369
3581
  z.object({
3370
3582
  acceptedAt: z.iso.datetime().nullable(),
3583
+ additionalInformation: zInvoiceAdditionalInformationResource.nullable(),
3371
3584
  buyer: zInvoiceBuyerIdentity.nullable(),
3372
3585
  buyerDeliveryReadiness: zInvoiceBuyerDeliveryReadiness,
3373
3586
  corrections: z.array(zInvoiceCorrection),
@@ -3387,6 +3600,7 @@ export const zInvoiceResource = lenientUnion([
3387
3600
  latestEvent: zInvoiceLatestEvent.nullable(),
3388
3601
  originalInvoiceId: z.uuid().nullable(),
3389
3602
  paymentTerms: zInvoicePaymentTermsResource.nullable(),
3603
+ referenceInformation: zInvoiceReferenceInformationResource.nullable(),
3390
3604
  replacesInvoiceId: z.uuid().nullable(),
3391
3605
  source: zInvoiceSource,
3392
3606
  status: z.enum(["operatorRequired"]),
@@ -4181,7 +4395,7 @@ export const zTimingWork = z.object({
4181
4395
  work_id: z.string().regex(/^[0-9a-f]{64}$/),
4182
4396
  });
4183
4397
  /**
4184
- * Factura de Crédito Fiscal Electrónica, code 31.
4398
+ * A Type 31 line with its profile-permitted line-level discounts and surcharges.
4185
4399
  */
4186
4400
  export const zUserAccountIdentity = z.object({
4187
4401
  created_at: z.iso.datetime(),
@@ -4949,6 +5163,8 @@ export const zWorkspaceFiscalOperationResource = z.object({
4949
5163
  export const zCreateHostedTenantResponse = zHostedTenantResource;
4950
5164
  export const zReleaseHostedTenantResponse = zReleasedHostedTenant;
4951
5165
  export const zCreateHostedTenantWebhookSecretRotationResponse = zHostedWebhookSecretRotation;
5166
+ export const zUploadHostedCertificationTestSetResponse = zCertificationTestSetResource;
5167
+ export const zRetrieveHostedCertificationTestSetResponse = zCurrentCertificationTestSet;
4952
5168
  export const zListHostedInvoicesResponse = zInvoicePage;
4953
5169
  export const zCreateHostedInvoiceResponse = zInvoiceResource;
4954
5170
  export const zPreviewHostedInvoiceResponse = zInvoicePreview;