@timbro/invoices 0.14.0-next.0 → 0.14.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 (39) hide show
  1. package/README.md +25 -1
  2. package/dist/admin.d.ts +1 -1
  3. package/dist/admin.d.ts.map +1 -1
  4. package/dist/fiscal-engine-runtime.manifest.json +17 -12
  5. package/dist/fiscal-engine-runtime.provenance.json +18 -13
  6. package/dist/generated/hosted/types.gen.d.ts +40 -5
  7. package/dist/generated/hosted/types.gen.d.ts.map +1 -1
  8. package/dist/generated/hosted/zod-response.gen.d.ts +28 -14
  9. package/dist/generated/hosted/zod-response.gen.d.ts.map +1 -1
  10. package/dist/generated/hosted/zod-response.gen.js +90 -0
  11. package/dist/generated/hosted/zod.gen.d.ts +10 -5
  12. package/dist/generated/hosted/zod.gen.d.ts.map +1 -1
  13. package/dist/generated/hosted/zod.gen.js +90 -0
  14. package/dist/generated/index.d.ts +3 -3
  15. package/dist/generated/index.d.ts.map +1 -1
  16. package/dist/generated/index.js +2 -2
  17. package/dist/generated/invoice-api-contract.d.ts +241 -12
  18. package/dist/generated/invoice-api-contract.d.ts.map +1 -1
  19. package/dist/generated/invoice-api-contract.js +369 -12
  20. package/dist/generated/problem-catalog.d.ts.map +1 -1
  21. package/dist/generated/problem-catalog.js +13 -0
  22. package/dist/generated/sdk.gen.d.ts +4 -2
  23. package/dist/generated/sdk.gen.d.ts.map +1 -1
  24. package/dist/generated/sdk.gen.js +70 -2
  25. package/dist/generated/types.gen.d.ts +179 -9
  26. package/dist/generated/types.gen.d.ts.map +1 -1
  27. package/dist/generated/zod-response.gen.d.ts +588 -286
  28. package/dist/generated/zod-response.gen.d.ts.map +1 -1
  29. package/dist/generated/zod-response.gen.js +86 -4
  30. package/dist/generated/zod.gen.d.ts +15608 -597
  31. package/dist/generated/zod.gen.d.ts.map +1 -1
  32. package/dist/generated/zod.gen.js +312 -17
  33. package/dist/hosted-tenant.d.ts +12 -1
  34. package/dist/hosted-tenant.d.ts.map +1 -1
  35. package/dist/hosted-tenant.js +13 -1
  36. package/dist/problem-contract.d.ts +4 -0
  37. package/dist/problem-contract.d.ts.map +1 -1
  38. package/dist/timbro_fiscal_engine_bg.wasm +0 -0
  39. package/package.json +1 -1
@@ -684,11 +684,17 @@ export const zHealthReadyResponse = z.object({
684
684
  schema_version: z.int().gte(1).lte(2147483647).nullable(),
685
685
  status: zHealthStatus,
686
686
  });
687
+ export const zHostedCertificateImportEnvironment = z.enum([
688
+ "sandbox",
689
+ "certification",
690
+ "production",
691
+ ]);
687
692
  export const zHostedImportResponse = z.object({
688
693
  certificate_subject_common_name: z
689
694
  .string()
690
695
  .refine((text) => Array.from(text).length <= 256)
691
696
  .nullable(),
697
+ environments: z.array(zHostedCertificateImportEnvironment),
692
698
  object: z.string(),
693
699
  signer_subject_serial_number: z.string(),
694
700
  });
@@ -708,6 +714,10 @@ export const zHostedReceiverUrls = z.object({
708
714
  commercial_approval_url: z.string(),
709
715
  reception_url: z.string(),
710
716
  });
717
+ /**
718
+ * What the repair did to the binding's Source connection.
719
+ */
720
+ export const zHostedSourceConnectionRepairOutcome = z.enum(["reconnected", "already_connected"]);
711
721
  export const zHostedTenantResource = z.object({
712
722
  hosted_tenant_binding_id: z.uuid(),
713
723
  legal_issuer_id: z.uuid(),
@@ -3119,6 +3129,12 @@ export const zReleasedHostedTenant = z.object({
3119
3129
  release_id: z.uuid(),
3120
3130
  state: z.string(),
3121
3131
  });
3132
+ export const zRepairedHostedTenantSourceConnection = z.object({
3133
+ environment: zFiscalEnvironment,
3134
+ hosted_tenant_binding_id: z.uuid(),
3135
+ outcome: zHostedSourceConnectionRepairOutcome,
3136
+ source_connection_id: z.uuid(),
3137
+ });
3122
3138
  export const zRequirementId = z.enum([
3123
3139
  "organization_identity",
3124
3140
  "legal_issuer_identity",
@@ -3330,6 +3346,74 @@ export const zSourceFiscalOperationPage = z.object({
3330
3346
  * Government classification retained as caller-declared Source context.
3331
3347
  */
3332
3348
  export const zSourceItemKind = z.enum(["good", "service"]);
3349
+ /**
3350
+ * A DGII e-CF unit of measure: a readable lowercase name on the Source and Invoice wire,
3351
+ * the official numeric catalog code in fiscal documents.
3352
+ */
3353
+ export const zSourceMeasurementUnit = z.enum([
3354
+ "barrel",
3355
+ "bag",
3356
+ "jar",
3357
+ "bundle",
3358
+ "bottle",
3359
+ "box",
3360
+ "cigarette_pack",
3361
+ "centimetre",
3362
+ "cylinder",
3363
+ "set",
3364
+ "container",
3365
+ "day",
3366
+ "dozen",
3367
+ "bale",
3368
+ "gallon",
3369
+ "degree",
3370
+ "gram",
3371
+ "bulk",
3372
+ "hour",
3373
+ "crate",
3374
+ "kilogram",
3375
+ "kilowatt_hour",
3376
+ "pound",
3377
+ "litre",
3378
+ "lot",
3379
+ "metre",
3380
+ "square_metre",
3381
+ "cubic_metre",
3382
+ "million_btu",
3383
+ "minute",
3384
+ "package",
3385
+ "pair",
3386
+ "foot",
3387
+ "piece",
3388
+ "roll",
3389
+ "envelope",
3390
+ "second",
3391
+ "tank",
3392
+ "ton",
3393
+ "tube",
3394
+ "yard",
3395
+ "square_yard",
3396
+ "unit",
3397
+ "element",
3398
+ "thousand",
3399
+ "sack",
3400
+ "tin",
3401
+ "display",
3402
+ "drum",
3403
+ "ration",
3404
+ "quintal",
3405
+ "gross_register_tonnage",
3406
+ "square_foot",
3407
+ "passenger",
3408
+ "inch",
3409
+ "boat_berth_stay",
3410
+ "tray",
3411
+ "hectare",
3412
+ "millilitre",
3413
+ "milligram",
3414
+ "ounce",
3415
+ "troy_ounce",
3416
+ ]);
3333
3417
  export const zInvoiceItemResource = z.object({
3334
3418
  additionalTaxCodes: z.array(z.string()),
3335
3419
  adjustments: zInvoiceLinePriceAdjustmentsResource.nullable(),
@@ -3340,13 +3424,10 @@ export const zInvoiceItemResource = z.object({
3340
3424
  legalTip: z.boolean(),
3341
3425
  quantity: z.string().regex(/^(?=[0-9.]*[1-9])[0-9]{1,16}(\.[0-9]{1,2})?$/),
3342
3426
  tax: zInvoiceTax,
3343
- unit: z.string(),
3427
+ unit: zSourceMeasurementUnit,
3344
3428
  unitPrice: z.string().regex(/^[0-9]{1,16}(\.[0-9]{1,4})?$/),
3345
3429
  withholding: zInvoiceItemWithholding.nullable(),
3346
3430
  });
3347
- /**
3348
- * Common semantic measurement units mapped to official DGII catalog codes by fiscal-document.
3349
- */
3350
3431
  export const zSourcePaymentMethod = z.enum([
3351
3432
  "cash",
3352
3433
  "bank_transfer",
@@ -5168,6 +5249,7 @@ export const zWorkspaceFiscalOperationResource = z.object({
5168
5249
  */
5169
5250
  export const zCreateHostedTenantResponse = zHostedTenantResource;
5170
5251
  export const zReleaseHostedTenantResponse = zReleasedHostedTenant;
5252
+ export const zRepairHostedTenantSourceConnectionResponse = zRepairedHostedTenantSourceConnection;
5171
5253
  export const zCreateHostedTenantWebhookSecretRotationResponse = zHostedWebhookSecretRotation;
5172
5254
  export const zUploadHostedCertificationTestSetResponse = zCertificationTestSetResource;
5173
5255
  export const zRetrieveHostedCertificationTestSetResponse = zCurrentCertificationTestSet;