@timbro/invoices 0.10.3 → 0.12.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 (60) hide show
  1. package/README.md +58 -2
  2. package/dist/admin.d.ts +2 -3
  3. package/dist/admin.d.ts.map +1 -1
  4. package/dist/generated/hosted/index.d.ts +3 -3
  5. package/dist/generated/hosted/index.d.ts.map +1 -1
  6. package/dist/generated/hosted/index.js +2 -2
  7. package/dist/generated/hosted/sdk.gen.d.ts +19 -1
  8. package/dist/generated/hosted/sdk.gen.d.ts.map +1 -1
  9. package/dist/generated/hosted/sdk.gen.js +225 -1
  10. package/dist/generated/hosted/types.gen.d.ts +583 -5
  11. package/dist/generated/hosted/types.gen.d.ts.map +1 -1
  12. package/dist/generated/hosted/zod-response.gen.d.ts +6678 -208
  13. package/dist/generated/hosted/zod-response.gen.d.ts.map +1 -1
  14. package/dist/generated/hosted/zod-response.gen.js +694 -207
  15. package/dist/generated/hosted/zod.gen.d.ts +1661 -14
  16. package/dist/generated/hosted/zod.gen.d.ts.map +1 -1
  17. package/dist/generated/hosted/zod.gen.js +772 -222
  18. package/dist/generated/index.d.ts +3 -3
  19. package/dist/generated/index.d.ts.map +1 -1
  20. package/dist/generated/index.js +2 -2
  21. package/dist/generated/invoice-api-contract.d.ts +186 -2
  22. package/dist/generated/invoice-api-contract.d.ts.map +1 -1
  23. package/dist/generated/invoice-api-contract.js +211 -1
  24. package/dist/generated/sdk.gen.d.ts +5 -5
  25. package/dist/generated/sdk.gen.d.ts.map +1 -1
  26. package/dist/generated/sdk.gen.js +93 -93
  27. package/dist/generated/types.gen.d.ts +288 -139
  28. package/dist/generated/types.gen.d.ts.map +1 -1
  29. package/dist/generated/zod-response.gen.d.ts +2304 -2548
  30. package/dist/generated/zod-response.gen.d.ts.map +1 -1
  31. package/dist/generated/zod-response.gen.js +179 -109
  32. package/dist/generated/zod.gen.d.ts +1252 -2188
  33. package/dist/generated/zod.gen.d.ts.map +1 -1
  34. package/dist/generated/zod.gen.js +215 -115
  35. package/dist/hosted-tenant.d.ts +9 -0
  36. package/dist/hosted-tenant.d.ts.map +1 -1
  37. package/dist/hosted-tenant.js +7 -0
  38. package/dist/index.d.ts +1 -1
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/invoice-hosted-controls.d.ts +22 -3
  41. package/dist/invoice-hosted-controls.d.ts.map +1 -1
  42. package/dist/invoice-hosted-controls.js +48 -12
  43. package/dist/invoice.d.ts +5 -0
  44. package/dist/invoice.d.ts.map +1 -1
  45. package/dist/invoice.js +1 -0
  46. package/dist/issuance-readiness.d.ts +9 -0
  47. package/dist/issuance-readiness.d.ts.map +1 -0
  48. package/dist/issuance-readiness.js +19 -0
  49. package/dist/timbro-client.d.ts +6 -8
  50. package/dist/timbro-client.d.ts.map +1 -1
  51. package/dist/timbro-client.js +3 -5
  52. package/dist/webhook-event.d.ts +392 -0
  53. package/dist/webhook-event.d.ts.map +1 -1
  54. package/package.json +3 -3
  55. package/dist/certificate-custody-readiness.d.ts +0 -6
  56. package/dist/certificate-custody-readiness.d.ts.map +0 -1
  57. package/dist/certificate-custody-readiness.js +0 -13
  58. package/dist/fiscal-numbering-readiness.d.ts +0 -6
  59. package/dist/fiscal-numbering-readiness.d.ts.map +0 -1
  60. package/dist/fiscal-numbering-readiness.js +0 -13
@@ -9,11 +9,6 @@ export type AcceptedMembership = {
9
9
  organization_id: string;
10
10
  role: MembershipRole;
11
11
  };
12
- export type ActiveCertificateCustodyBindingResource = {
13
- binding_id: string;
14
- certificate_version: string;
15
- expected_certificate_sha256: string;
16
- };
17
12
  /**
18
13
  * Buyer identity alternatives admitted by official conditional Type 33 and Type 34 `Comprador`.
19
14
  */
@@ -124,7 +119,8 @@ export type Buyer = {
124
119
  tax_id: string;
125
120
  };
126
121
  /**
127
- * Actor-facing buyer-delivery milestone projected from the immutable lifecycle event ledger.
122
+ * Whether the buyer may receive the e-CF: ready once DGII received it and answered `Aceptado` or
123
+ * `Aceptado Condicional`, projected from the immutable lifecycle event ledger.
128
124
  */
129
125
  export type BuyerDeliveryReadinessResource = {
130
126
  status: "not_applicable";
@@ -204,12 +200,6 @@ export type CertificateCustodyBindingResource = {
204
200
  legal_issuer_id: string;
205
201
  organization_id: string;
206
202
  };
207
- export type CertificateCustodyCertificateResource = {
208
- certificate_expires_at: string;
209
- certificate_sha256: string;
210
- certificate_subject_serial_number: string;
211
- effect_replay_retention_seconds: number;
212
- };
213
203
  export type CertificateCustodyCertificateVersionResource = {
214
204
  certificate_custody_certificate_version: LedgerCounter;
215
205
  certificate_not_after: string;
@@ -219,25 +209,6 @@ export type CertificateCustodyCertificateVersionResource = {
219
209
  effect_replay_retention_seconds: number;
220
210
  signature_algorithm: CertificateCustodySignatureAlgorithm;
221
211
  };
222
- export type CertificateCustodyReadiness = {
223
- environment: FiscalEnvironment;
224
- legal_issuer_id: string;
225
- organization_id: string;
226
- status: "not_configured";
227
- } | {
228
- binding: EnrolledCertificateCustodyBindingResource;
229
- environment: FiscalEnvironment;
230
- legal_issuer_id: string;
231
- organization_id: string;
232
- status: "awaiting_certificate_registration";
233
- } | {
234
- binding: ActiveCertificateCustodyBindingResource;
235
- certificate: CertificateCustodyCertificateResource;
236
- environment: FiscalEnvironment;
237
- legal_issuer_id: string;
238
- organization_id: string;
239
- status: "ready";
240
- };
241
212
  /**
242
213
  * Signature algorithm pinned with a certificate-custody binding.
243
214
  */
@@ -329,6 +300,10 @@ export type CreateInvoiceDeliveryRequest = {
329
300
  * An `https` page where the buyer keeps this purchase; the email links it, and it grants no access.
330
301
  */
331
302
  accountClaimUrl?: string | undefined;
303
+ /**
304
+ * Files attached to the email beside its link. Omitted, the email attaches nothing.
305
+ */
306
+ attachments?: InvoiceDeliveryAttachmentSelection | undefined;
332
307
  recipientEmail: string;
333
308
  };
334
309
  export type CreateOrganizationRequest = {
@@ -401,6 +376,19 @@ export type DiscountOrSurcharge = {
401
376
  * The native artifact family selected for one schema validation.
402
377
  */
403
378
  export type DocumentSchemaArtifactKind = "complete_document" | "rfce";
379
+ export type DocumentTypeIssuanceReadiness = {
380
+ numbering: NumberingRange;
381
+ status: "ready";
382
+ type: InvoiceType;
383
+ } | {
384
+ numbering: null | NumberingRange;
385
+ /**
386
+ * Every condition that blocks this type: issuer, then certificate, then numbering.
387
+ */
388
+ reasons: Array<IssuanceReadinessReason>;
389
+ status: "actionRequired";
390
+ type: InvoiceType;
391
+ };
404
392
  export type ElectronicFiscalDocumentEligibilityResource = {
405
393
  counterparty_class: FiscalCounterpartyClass;
406
394
  direction: FiscalIssuanceDirection;
@@ -424,9 +412,6 @@ export type EngineProblem = {
424
412
  path: string;
425
413
  };
426
414
  export type EngineProtocol = "timbro.fiscal-engine.v3";
427
- export type EnrolledCertificateCustodyBindingResource = {
428
- binding_id: string;
429
- };
430
415
  /**
431
416
  * A successful deterministic fiscal-document engine response.
432
417
  */
@@ -655,18 +640,6 @@ export type FiscalLineWithLegalTip = {
655
640
  tax_exclusive_unit_price?: "1" | undefined;
656
641
  unit_price: string;
657
642
  };
658
- export type FiscalNumberAuthorizationDocumentReadiness = {
659
- e31: FiscalNumberAuthorizationTypeReadiness;
660
- e32: FiscalNumberAuthorizationTypeReadiness;
661
- e33: FiscalNumberAuthorizationTypeReadiness;
662
- e34: FiscalNumberAuthorizationTypeReadiness;
663
- e41: FiscalNumberAuthorizationTypeReadiness;
664
- e43: FiscalNumberAuthorizationTypeReadiness;
665
- e44: FiscalNumberAuthorizationTypeReadiness;
666
- e45: FiscalNumberAuthorizationTypeReadiness;
667
- e46: FiscalNumberAuthorizationTypeReadiness;
668
- e47: FiscalNumberAuthorizationTypeReadiness;
669
- };
670
643
  export type FiscalNumberAuthorizationHistoryResource = {
671
644
  authorizations: Array<FiscalNumberAuthorizationLineage>;
672
645
  document_type: ElectronicFiscalDocumentType;
@@ -691,16 +664,6 @@ export type FiscalNumberAuthorizationNextUnused = {
691
664
  } | {
692
665
  kind: "exhausted";
693
666
  };
694
- export type FiscalNumberAuthorizationReadiness = {
695
- documents: FiscalNumberAuthorizationDocumentReadiness;
696
- effective_on: string;
697
- environment: FiscalEnvironment;
698
- issuer_tax_id: string;
699
- legal_issuer_id: string;
700
- object: string;
701
- source_connection_id: string;
702
- };
703
- export type FiscalNumberAuthorizationReadinessStatus = "ready" | "action_required";
704
667
  export type FiscalNumberAuthorizationResource = {
705
668
  created_at: string;
706
669
  document_type: ElectronicFiscalDocumentType;
@@ -723,16 +686,6 @@ export type FiscalNumberAuthorizationResource = {
723
686
  supersedes_id: string | null;
724
687
  verified_next_unused: FiscalNumberAuthorizationNextUnused;
725
688
  };
726
- export type FiscalNumberAuthorizationSelection = {
727
- authorization_id: string;
728
- ends_at: LedgerCounter;
729
- expires_on: string | null;
730
- next_available_sequence: LedgerCounter;
731
- remaining_capacity: number;
732
- starts_at: LedgerCounter;
733
- state: FiscalNumberAuthorizationState;
734
- verified_next_unused: FiscalNumberAuthorizationNextUnused;
735
- };
736
689
  /**
737
690
  * Origin of a fiscal-number authorization fact.
738
691
  */
@@ -741,13 +694,6 @@ export type FiscalNumberAuthorizationSourceKind = "official_source_manifest" | "
741
694
  * Lifecycle state of a fiscal-number authorization fact.
742
695
  */
743
696
  export type FiscalNumberAuthorizationState = "active" | "suspended" | "cancelled" | "superseded" | "exhausted" | "conflicting";
744
- export type FiscalNumberAuthorizationTypeReadiness = {
745
- document_type: ElectronicFiscalDocumentType;
746
- selected: null | FiscalNumberAuthorizationSelection;
747
- status: FiscalNumberAuthorizationReadinessStatus;
748
- unavailable_reason: null | FiscalNumberAuthorizationUnavailableReason;
749
- };
750
- export type FiscalNumberAuthorizationUnavailableReason = "authorization_missing" | "authorization_not_active" | "authorization_not_verified" | "authorization_not_observed" | "range_exhausted" | "authorization_expiration_invalid" | "authorization_expired" | "authorization_range_overlap";
751
697
  /**
752
698
  * Caller instruction that selects how a Fiscal operation obtains its e-NCF.
753
699
  *
@@ -922,7 +868,7 @@ export type HealthReadyResponse = {
922
868
  status: HealthStatus;
923
869
  };
924
870
  export type HealthStatus = "ok" | "unavailable";
925
- export type HostedCertificateImportEnvironment = "sandbox" | "production";
871
+ export type HostedCertificateImportEnvironment = "sandbox" | "certification" | "production";
926
872
  export type HostedFiscalOperationSubmission = {
927
873
  /**
928
874
  * The hosted Checkout tenant the service acts for.
@@ -948,7 +894,7 @@ export type HostedImportResponse = {
948
894
  object: string;
949
895
  signer_subject_serial_number: string;
950
896
  };
951
- export type HostedInvoiceCredentialEnvironment = "sandbox" | "production";
897
+ export type HostedInvoiceCredentialEnvironment = "sandbox" | "certification" | "production";
952
898
  export type HostedInvoiceCredentialRequest = {
953
899
  checkout_tenant_id: string;
954
900
  environment: HostedInvoiceCredentialEnvironment;
@@ -969,6 +915,11 @@ export type HostedInvoiceSubmission = {
969
915
  environment: FiscalEnvironment;
970
916
  request: InvoiceRequest;
971
917
  };
918
+ export type HostedReceiverUrls = {
919
+ base_url: string;
920
+ commercial_approval_url: string;
921
+ reception_url: string;
922
+ };
972
923
  export type HostedTenantResource = {
973
924
  /**
974
925
  * The binding identity the Checkout host uses for an exact release request.
@@ -976,6 +927,10 @@ export type HostedTenantResource = {
976
927
  hosted_tenant_binding_id: string;
977
928
  legal_issuer_id: string;
978
929
  organization_id: string;
930
+ /**
931
+ * Assigned receiver addresses; certificate import and communication checks establish readiness.
932
+ */
933
+ receiver_urls: HostedReceiverUrls;
979
934
  source_connection_id: string;
980
935
  /**
981
936
  * The endpoint this binding's Webhook deliveries are listed and replayed by.
@@ -1050,6 +1005,10 @@ export type InvoiceBuyer = {
1050
1005
  legalName: string;
1051
1006
  taxId: string;
1052
1007
  };
1008
+ /**
1009
+ * Whether the buyer may receive the e-CF: `ready` once DGII received it and answered `Aceptado`
1010
+ * or `Aceptado Condicional`, never at signing or submission alone.
1011
+ */
1053
1012
  export type InvoiceBuyerDeliveryReadiness = {
1054
1013
  status: "notApplicable";
1055
1014
  } | {
@@ -1103,7 +1062,25 @@ export type InvoiceCreditNotePaymentTerms = {
1103
1062
  type: "free";
1104
1063
  };
1105
1064
  export type InvoiceDebitNoteModificationCode = "2" | "3";
1065
+ export type InvoiceDeliveryAttachmentSelection = {
1066
+ /**
1067
+ * Attach the printed representation as `{RNC}{e-NCF}.pdf`.
1068
+ */
1069
+ pdf?: boolean | undefined;
1070
+ /**
1071
+ * Attach the signed e-CF as `{RNC}{e-NCF}.xml`, DGII's file-name standard.
1072
+ */
1073
+ xml?: boolean | undefined;
1074
+ };
1075
+ /**
1076
+ * The files this email attaches beside its link.
1077
+ */
1078
+ export type InvoiceDeliveryAttachments = {
1079
+ pdf: boolean;
1080
+ xml: boolean;
1081
+ };
1106
1082
  export type InvoiceDeliveryResource = {
1083
+ attachments: InvoiceDeliveryAttachments;
1107
1084
  createdAt: string;
1108
1085
  id: string;
1109
1086
  invoiceId: string;
@@ -1155,6 +1132,7 @@ export type InvoiceFiles = {
1155
1132
  };
1156
1133
  export type InvoiceFiscalIdentity = {
1157
1134
  eNcf: string;
1135
+ signature: null | InvoiceSignature;
1158
1136
  type: InvoiceType;
1159
1137
  };
1160
1138
  export type InvoiceForeignCurrency = {
@@ -1802,6 +1780,27 @@ export type InvoiceResource = {
1802
1780
  type: InvoiceType;
1803
1781
  updatedAt: string;
1804
1782
  };
1783
+ /**
1784
+ * The signature facts DGII requires on every printed e-CF, read from the signed document.
1785
+ *
1786
+ * Print the buyer's copy after DGII accepts the Invoice; DGII sequences the printed e-CF after
1787
+ * its validation result, including the Type 32 below DOP 250,000 it validates by RFCE summary.
1788
+ */
1789
+ export type InvoiceSignature = {
1790
+ /**
1791
+ * The first six characters of the signature value, printed below the QR code.
1792
+ */
1793
+ securityCode: string;
1794
+ /**
1795
+ * The exact `FechaHoraFirma` instant as RFC 3339 in DGII's fixed GMT-4, so its date and
1796
+ * time read as the printed `dd-MM-aaaa HH:mm:ss`.
1797
+ */
1798
+ signedAt: string;
1799
+ /**
1800
+ * The DGII consultation URL the printed QR code encodes.
1801
+ */
1802
+ verificationUrl: string;
1803
+ };
1805
1804
  export type InvoiceSource = {
1806
1805
  contentSha256: string;
1807
1806
  id: string;
@@ -1909,6 +1908,30 @@ export type InvoiceWebhookEvent = {
1909
1908
  sourceConnectionId: string;
1910
1909
  };
1911
1910
  type: "invoice.ready";
1911
+ } | {
1912
+ /**
1913
+ * InvoiceDeliveryEventData
1914
+ *
1915
+ * The Invoice and the buyer email whose sent or failed outcome the event announces.
1916
+ */
1917
+ data: {
1918
+ deliveryId: string;
1919
+ id: string;
1920
+ sourceConnectionId: string;
1921
+ };
1922
+ type: "invoice.deliverySent";
1923
+ } | {
1924
+ /**
1925
+ * InvoiceDeliveryEventData
1926
+ *
1927
+ * The Invoice and the buyer email whose sent or failed outcome the event announces.
1928
+ */
1929
+ data: {
1930
+ deliveryId: string;
1931
+ id: string;
1932
+ sourceConnectionId: string;
1933
+ };
1934
+ type: "invoice.deliveryFailed";
1912
1935
  };
1913
1936
  export type InvoiceWebhookEventEnvelope = {
1914
1937
  apiVersion: string;
@@ -1974,6 +1997,44 @@ export type InvoiceWebhookEventEnvelope = {
1974
1997
  organizationId: string;
1975
1998
  sequence: string;
1976
1999
  type: "invoice.ready";
2000
+ } | {
2001
+ apiVersion: string;
2002
+ /**
2003
+ * InvoiceDeliveryEventData
2004
+ *
2005
+ * The Invoice and the buyer email whose sent or failed outcome the event announces.
2006
+ */
2007
+ data: {
2008
+ deliveryId: string;
2009
+ id: string;
2010
+ sourceConnectionId: string;
2011
+ };
2012
+ environment: FiscalEnvironment;
2013
+ id: string;
2014
+ object: WebhookEventObject;
2015
+ occurredAt: string;
2016
+ organizationId: string;
2017
+ sequence: string;
2018
+ type: "invoice.deliverySent";
2019
+ } | {
2020
+ apiVersion: string;
2021
+ /**
2022
+ * InvoiceDeliveryEventData
2023
+ *
2024
+ * The Invoice and the buyer email whose sent or failed outcome the event announces.
2025
+ */
2026
+ data: {
2027
+ deliveryId: string;
2028
+ id: string;
2029
+ sourceConnectionId: string;
2030
+ };
2031
+ environment: FiscalEnvironment;
2032
+ id: string;
2033
+ object: WebhookEventObject;
2034
+ occurredAt: string;
2035
+ organizationId: string;
2036
+ sequence: string;
2037
+ type: "invoice.deliveryFailed";
1977
2038
  };
1978
2039
  export type InvoiceXmlReadiness = {
1979
2040
  status: "notApplicable";
@@ -1990,6 +2051,19 @@ export type InvoiceXmlReadiness = {
1990
2051
  * One stable reason the authoritative rules refuse to issue.
1991
2052
  */
1992
2053
  export type IssuanceBlocker = "invalid_request" | "unsupported_protocol" | "unsupported_rules_version" | "invalid_resolved_facts" | "numbering_verifier_missing" | "numbering_mode_not_enabled" | "document_type_not_recognized" | "authorization_missing" | "authorization_not_observed_on_effective_date" | "authorization_suspended" | "authorization_cancelled" | "authorization_superseded" | "authorization_exhausted" | "authorization_conflicting" | "authorization_document_type_mismatch" | "central_assignment_requires_verified_authorization" | "authorization_expired" | "authorization_range_overlap" | "fiscal_number_capacity_exhausted" | "invalid_fiscal_number" | "fiscal_number_outside_authorized_range" | "fiscal_number_before_verified_floor" | "sequence_expiration_mismatch";
2054
+ /**
2055
+ * Whether the issuer can issue each e-CF type now in this environment.
2056
+ */
2057
+ export type IssuanceReadiness = {
2058
+ certificate: SigningCertificateReadiness;
2059
+ /**
2060
+ * Every e-CF type, in type order.
2061
+ */
2062
+ documentTypes: Array<DocumentTypeIssuanceReadiness>;
2063
+ environment: FiscalEnvironment;
2064
+ issuerTaxId: string;
2065
+ };
2066
+ export type IssuanceReadinessReason = "legal_issuer_profile_incomplete" | "signing_certificate_missing" | "signing_certificate_expired" | "signing_certificate_not_yet_valid" | "authorization_missing" | "authorization_not_active" | "authorization_not_verified" | "authorization_not_observed" | "range_exhausted" | "authorization_expiration_invalid" | "authorization_expired" | "authorization_range_overlap";
1993
2067
  export type LedgerCounter = string;
1994
2068
  export type LegalIssuer = {
1995
2069
  address: string | null;
@@ -2059,6 +2133,19 @@ export type NumberedFiscalDocument = {
2059
2133
  fiscal_number: string;
2060
2134
  sequence_expires_on: string | null;
2061
2135
  };
2136
+ /**
2137
+ * The range Timbro assigns the next fiscal number of this type from.
2138
+ */
2139
+ export type NumberingRange = {
2140
+ /**
2141
+ * The sequence expiry, or `null` for a type without one (E32 and E34).
2142
+ */
2143
+ expiresOn: string | null;
2144
+ /**
2145
+ * Fiscal numbers left in the selected range.
2146
+ */
2147
+ remaining: number;
2148
+ };
2062
2149
  export type OnboardingLegalIssuerIdentity = {
2063
2150
  object: OnboardingLegalIssuerIdentityResourceObject;
2064
2151
  outcome: OnboardingLegalIssuerIdentityOutcome;
@@ -2493,6 +2580,27 @@ export type SignedDocumentReadinessResource = {
2493
2580
  sha256: string;
2494
2581
  status: "ready";
2495
2582
  };
2583
+ /**
2584
+ * The active signing certificate, judged at the moment of the read.
2585
+ */
2586
+ export type SigningCertificateReadiness = {
2587
+ notAfter: string;
2588
+ notBefore: string;
2589
+ sha256: string;
2590
+ status: "ready";
2591
+ } | {
2592
+ notAfter: string;
2593
+ notBefore: string;
2594
+ sha256: string;
2595
+ status: "expired";
2596
+ } | {
2597
+ notAfter: string;
2598
+ notBefore: string;
2599
+ sha256: string;
2600
+ status: "notYetValid";
2601
+ } | {
2602
+ status: "missing";
2603
+ };
2496
2604
  /**
2497
2605
  * Named additional taxes supported by the common Source contract.
2498
2606
  */
@@ -4202,6 +4310,44 @@ export type WebhookEventEnvelope = {
4202
4310
  organizationId: string;
4203
4311
  sequence: string;
4204
4312
  type: "invoice.ready";
4313
+ } | {
4314
+ apiVersion: string;
4315
+ /**
4316
+ * InvoiceDeliveryEventData
4317
+ *
4318
+ * The Invoice and the buyer email whose sent or failed outcome the event announces.
4319
+ */
4320
+ data: {
4321
+ deliveryId: string;
4322
+ id: string;
4323
+ sourceConnectionId: string;
4324
+ };
4325
+ environment: FiscalEnvironment;
4326
+ id: string;
4327
+ object: WebhookEventObject;
4328
+ occurredAt: string;
4329
+ organizationId: string;
4330
+ sequence: string;
4331
+ type: "invoice.deliverySent";
4332
+ } | {
4333
+ apiVersion: string;
4334
+ /**
4335
+ * InvoiceDeliveryEventData
4336
+ *
4337
+ * The Invoice and the buyer email whose sent or failed outcome the event announces.
4338
+ */
4339
+ data: {
4340
+ deliveryId: string;
4341
+ id: string;
4342
+ sourceConnectionId: string;
4343
+ };
4344
+ environment: FiscalEnvironment;
4345
+ id: string;
4346
+ object: WebhookEventObject;
4347
+ occurredAt: string;
4348
+ organizationId: string;
4349
+ sequence: string;
4350
+ type: "invoice.deliveryFailed";
4205
4351
  } | {
4206
4352
  apiVersion: string;
4207
4353
  data: {
@@ -4980,6 +5126,45 @@ export type ReplaceHostedInvoiceResponses = {
4980
5126
  201: InvoiceResource;
4981
5127
  };
4982
5128
  export type ReplaceHostedInvoiceResponse = ReplaceHostedInvoiceResponses[keyof ReplaceHostedInvoiceResponses];
5129
+ export type RetrieveHostedIssuanceReadinessData = {
5130
+ body?: never | undefined;
5131
+ path?: never | undefined;
5132
+ query: {
5133
+ checkout_tenant_id: string;
5134
+ environment: FiscalEnvironment;
5135
+ };
5136
+ url: "/internal/hosted/issuance-readiness";
5137
+ };
5138
+ export type RetrieveHostedIssuanceReadinessErrors = {
5139
+ /**
5140
+ * The hosted tenant coordinates are invalid.
5141
+ */
5142
+ 400: ProblemBody;
5143
+ /**
5144
+ * The service credential is missing, revoked, or invalid.
5145
+ */
5146
+ 401: ProblemBody;
5147
+ /**
5148
+ * The hosted tenant has no binding in this environment.
5149
+ */
5150
+ 404: ProblemBody;
5151
+ /**
5152
+ * The native stamp server returned a typed Problem.
5153
+ */
5154
+ 409: ProblemBody;
5155
+ /**
5156
+ * The native stamp server returned a typed Problem.
5157
+ */
5158
+ 500: ProblemBody;
5159
+ };
5160
+ export type RetrieveHostedIssuanceReadinessError = RetrieveHostedIssuanceReadinessErrors[keyof RetrieveHostedIssuanceReadinessErrors];
5161
+ export type RetrieveHostedIssuanceReadinessResponses = {
5162
+ /**
5163
+ * Whether the hosted tenant's issuer can issue each e-CF type now in this environment.
5164
+ */
5165
+ 200: IssuanceReadiness;
5166
+ };
5167
+ export type RetrieveHostedIssuanceReadinessResponse = RetrieveHostedIssuanceReadinessResponses[keyof RetrieveHostedIssuanceReadinessResponses];
4983
5168
  export type ListFiscalOperationsData = {
4984
5169
  body?: never | undefined;
4985
5170
  path?: never | undefined;
@@ -5289,38 +5474,6 @@ export type ReadFiscalOperationTimingResponses = {
5289
5474
  200: FiscalOperationTimingReport;
5290
5475
  };
5291
5476
  export type ReadFiscalOperationTimingResponse = ReadFiscalOperationTimingResponses[keyof ReadFiscalOperationTimingResponses];
5292
- export type ReadCertificateCustodyReadinessData = {
5293
- body?: never | undefined;
5294
- path?: never | undefined;
5295
- query?: never | undefined;
5296
- url: "/v1/certificate-custody/readiness";
5297
- };
5298
- export type ReadCertificateCustodyReadinessErrors = {
5299
- /**
5300
- * The Source connection credential is missing, invalid, or revoked.
5301
- */
5302
- 401: ProblemBody;
5303
- /**
5304
- * The Source connection is not authorized to read this Fiscal operation.
5305
- */
5306
- 403: ProblemBody;
5307
- /**
5308
- * The native stamp server returned a typed Problem.
5309
- */
5310
- 409: ProblemBody;
5311
- /**
5312
- * The native stamp server returned a typed Problem.
5313
- */
5314
- 500: ProblemBody;
5315
- };
5316
- export type ReadCertificateCustodyReadinessError = ReadCertificateCustodyReadinessErrors[keyof ReadCertificateCustodyReadinessErrors];
5317
- export type ReadCertificateCustodyReadinessResponses = {
5318
- /**
5319
- * The authenticated tenant's certificate-custody readiness resource.
5320
- */
5321
- 200: CertificateCustodyReadiness;
5322
- };
5323
- export type ReadCertificateCustodyReadinessResponse = ReadCertificateCustodyReadinessResponses[keyof ReadCertificateCustodyReadinessResponses];
5324
5477
  export type CreateDirectConnectionRequestData = {
5325
5478
  body: CreateDirectConnectionRequest;
5326
5479
  path?: never | undefined;
@@ -5487,38 +5640,6 @@ export type RetrieveFiscalDeliveryPrintedRepresentationResponses = {
5487
5640
  200: Uint8Array;
5488
5641
  };
5489
5642
  export type RetrieveFiscalDeliveryPrintedRepresentationResponse = RetrieveFiscalDeliveryPrintedRepresentationResponses[keyof RetrieveFiscalDeliveryPrintedRepresentationResponses];
5490
- export type ReadFiscalNumberAuthorizationReadinessData = {
5491
- body?: never | undefined;
5492
- path?: never | undefined;
5493
- query?: never | undefined;
5494
- url: "/v1/fiscal-number-authorizations/readiness";
5495
- };
5496
- export type ReadFiscalNumberAuthorizationReadinessErrors = {
5497
- /**
5498
- * The Source connection credential is missing, invalid, or revoked.
5499
- */
5500
- 401: ProblemBody;
5501
- /**
5502
- * The Source connection is not authorized to read fiscal-number readiness.
5503
- */
5504
- 403: ProblemBody;
5505
- /**
5506
- * The native stamp server returned a typed Problem.
5507
- */
5508
- 409: ProblemBody;
5509
- /**
5510
- * The native stamp server returned a typed Problem.
5511
- */
5512
- 500: ProblemBody;
5513
- };
5514
- export type ReadFiscalNumberAuthorizationReadinessError = ReadFiscalNumberAuthorizationReadinessErrors[keyof ReadFiscalNumberAuthorizationReadinessErrors];
5515
- export type ReadFiscalNumberAuthorizationReadinessResponses = {
5516
- /**
5517
- * Current central fiscal-number ranges and actionable availability for the authenticated Source connection's issuer and environment.
5518
- */
5519
- 200: FiscalNumberAuthorizationReadiness;
5520
- };
5521
- export type ReadFiscalNumberAuthorizationReadinessResponse = ReadFiscalNumberAuthorizationReadinessResponses[keyof ReadFiscalNumberAuthorizationReadinessResponses];
5522
5643
  export type ImportHostedCertificateCustodyData = {
5523
5644
  body: HostedImportRequest;
5524
5645
  path?: never | undefined;
@@ -6189,6 +6310,34 @@ export type ReplaceInvoiceResponses = {
6189
6310
  201: InvoiceResource;
6190
6311
  };
6191
6312
  export type ReplaceInvoiceResponse = ReplaceInvoiceResponses[keyof ReplaceInvoiceResponses];
6313
+ export type RetrieveIssuanceReadinessData = {
6314
+ body?: never | undefined;
6315
+ path?: never | undefined;
6316
+ query?: never | undefined;
6317
+ url: "/v1/issuance-readiness";
6318
+ };
6319
+ export type RetrieveIssuanceReadinessErrors = {
6320
+ /**
6321
+ * The Source connection credential is missing, invalid, or revoked.
6322
+ */
6323
+ 401: ProblemBody;
6324
+ /**
6325
+ * The Source connection is not connected.
6326
+ */
6327
+ 409: ProblemBody;
6328
+ /**
6329
+ * The native stamp server returned a typed Problem.
6330
+ */
6331
+ 500: ProblemBody;
6332
+ };
6333
+ export type RetrieveIssuanceReadinessError = RetrieveIssuanceReadinessErrors[keyof RetrieveIssuanceReadinessErrors];
6334
+ export type RetrieveIssuanceReadinessResponses = {
6335
+ /**
6336
+ * Whether the Source connection's issuer can issue each e-CF type now, with every blocking reason.
6337
+ */
6338
+ 200: IssuanceReadiness;
6339
+ };
6340
+ export type RetrieveIssuanceReadinessResponse = RetrieveIssuanceReadinessResponses[keyof RetrieveIssuanceReadinessResponses];
6192
6341
  export type ReadOpenApiDocumentData = {
6193
6342
  body?: never | undefined;
6194
6343
  path?: never | undefined;