@timbro/invoices 0.10.3-next.0 → 0.11.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.
- package/README.md +38 -2
- package/dist/admin.d.ts +1 -2
- package/dist/admin.d.ts.map +1 -1
- package/dist/generated/hosted/index.d.ts +2 -2
- package/dist/generated/hosted/index.d.ts.map +1 -1
- package/dist/generated/hosted/index.js +1 -1
- package/dist/generated/hosted/types.gen.d.ts +40 -2
- package/dist/generated/hosted/types.gen.d.ts.map +1 -1
- package/dist/generated/hosted/zod-response.gen.d.ts +965 -6
- package/dist/generated/hosted/zod-response.gen.d.ts.map +1 -1
- package/dist/generated/hosted/zod-response.gen.js +66 -6
- package/dist/generated/hosted/zod.gen.d.ts +255 -7
- package/dist/generated/hosted/zod.gen.d.ts.map +1 -1
- package/dist/generated/hosted/zod.gen.js +70 -7
- package/dist/generated/index.d.ts +3 -3
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +2 -2
- package/dist/generated/invoice-api-contract.d.ts +186 -2
- package/dist/generated/invoice-api-contract.d.ts.map +1 -1
- package/dist/generated/invoice-api-contract.js +211 -1
- package/dist/generated/sdk.gen.d.ts +5 -5
- package/dist/generated/sdk.gen.d.ts.map +1 -1
- package/dist/generated/sdk.gen.js +93 -93
- package/dist/generated/types.gen.d.ts +277 -137
- package/dist/generated/types.gen.d.ts.map +1 -1
- package/dist/generated/zod-response.gen.d.ts +2286 -2548
- package/dist/generated/zod-response.gen.d.ts.map +1 -1
- package/dist/generated/zod-response.gen.js +168 -108
- package/dist/generated/zod.gen.d.ts +1229 -2188
- package/dist/generated/zod.gen.d.ts.map +1 -1
- package/dist/generated/zod.gen.js +199 -113
- package/dist/invoice.d.ts +5 -0
- package/dist/invoice.d.ts.map +1 -1
- package/dist/invoice.js +1 -0
- package/dist/issuance-readiness.d.ts +9 -0
- package/dist/issuance-readiness.d.ts.map +1 -0
- package/dist/issuance-readiness.js +19 -0
- package/dist/timbro-client.d.ts +6 -8
- package/dist/timbro-client.d.ts.map +1 -1
- package/dist/timbro-client.js +3 -5
- package/dist/webhook-event.d.ts +392 -0
- package/dist/webhook-event.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/certificate-custody-readiness.d.ts +0 -6
- package/dist/certificate-custody-readiness.d.ts.map +0 -1
- package/dist/certificate-custody-readiness.js +0 -13
- package/dist/fiscal-numbering-readiness.d.ts +0 -6
- package/dist/fiscal-numbering-readiness.d.ts.map +0 -1
- 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
|
-
*
|
|
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
|
*
|
|
@@ -1050,6 +996,10 @@ export type InvoiceBuyer = {
|
|
|
1050
996
|
legalName: string;
|
|
1051
997
|
taxId: string;
|
|
1052
998
|
};
|
|
999
|
+
/**
|
|
1000
|
+
* Whether the buyer may receive the e-CF: `ready` once DGII received it and answered `Aceptado`
|
|
1001
|
+
* or `Aceptado Condicional`, never at signing or submission alone.
|
|
1002
|
+
*/
|
|
1053
1003
|
export type InvoiceBuyerDeliveryReadiness = {
|
|
1054
1004
|
status: "notApplicable";
|
|
1055
1005
|
} | {
|
|
@@ -1103,7 +1053,25 @@ export type InvoiceCreditNotePaymentTerms = {
|
|
|
1103
1053
|
type: "free";
|
|
1104
1054
|
};
|
|
1105
1055
|
export type InvoiceDebitNoteModificationCode = "2" | "3";
|
|
1056
|
+
export type InvoiceDeliveryAttachmentSelection = {
|
|
1057
|
+
/**
|
|
1058
|
+
* Attach the printed representation as `{RNC}{e-NCF}.pdf`.
|
|
1059
|
+
*/
|
|
1060
|
+
pdf?: boolean | undefined;
|
|
1061
|
+
/**
|
|
1062
|
+
* Attach the signed e-CF as `{RNC}{e-NCF}.xml`, DGII's file-name standard.
|
|
1063
|
+
*/
|
|
1064
|
+
xml?: boolean | undefined;
|
|
1065
|
+
};
|
|
1066
|
+
/**
|
|
1067
|
+
* The files this email attaches beside its link.
|
|
1068
|
+
*/
|
|
1069
|
+
export type InvoiceDeliveryAttachments = {
|
|
1070
|
+
pdf: boolean;
|
|
1071
|
+
xml: boolean;
|
|
1072
|
+
};
|
|
1106
1073
|
export type InvoiceDeliveryResource = {
|
|
1074
|
+
attachments: InvoiceDeliveryAttachments;
|
|
1107
1075
|
createdAt: string;
|
|
1108
1076
|
id: string;
|
|
1109
1077
|
invoiceId: string;
|
|
@@ -1155,6 +1123,7 @@ export type InvoiceFiles = {
|
|
|
1155
1123
|
};
|
|
1156
1124
|
export type InvoiceFiscalIdentity = {
|
|
1157
1125
|
eNcf: string;
|
|
1126
|
+
signature: null | InvoiceSignature;
|
|
1158
1127
|
type: InvoiceType;
|
|
1159
1128
|
};
|
|
1160
1129
|
export type InvoiceForeignCurrency = {
|
|
@@ -1802,6 +1771,27 @@ export type InvoiceResource = {
|
|
|
1802
1771
|
type: InvoiceType;
|
|
1803
1772
|
updatedAt: string;
|
|
1804
1773
|
};
|
|
1774
|
+
/**
|
|
1775
|
+
* The signature facts DGII requires on every printed e-CF, read from the signed document.
|
|
1776
|
+
*
|
|
1777
|
+
* Print the buyer's copy after DGII accepts the Invoice; DGII sequences the printed e-CF after
|
|
1778
|
+
* its validation result, including the Type 32 below DOP 250,000 it validates by RFCE summary.
|
|
1779
|
+
*/
|
|
1780
|
+
export type InvoiceSignature = {
|
|
1781
|
+
/**
|
|
1782
|
+
* The first six characters of the signature value, printed below the QR code.
|
|
1783
|
+
*/
|
|
1784
|
+
securityCode: string;
|
|
1785
|
+
/**
|
|
1786
|
+
* The exact `FechaHoraFirma` instant as RFC 3339 in DGII's fixed GMT-4, so its date and
|
|
1787
|
+
* time read as the printed `dd-MM-aaaa HH:mm:ss`.
|
|
1788
|
+
*/
|
|
1789
|
+
signedAt: string;
|
|
1790
|
+
/**
|
|
1791
|
+
* The DGII consultation URL the printed QR code encodes.
|
|
1792
|
+
*/
|
|
1793
|
+
verificationUrl: string;
|
|
1794
|
+
};
|
|
1805
1795
|
export type InvoiceSource = {
|
|
1806
1796
|
contentSha256: string;
|
|
1807
1797
|
id: string;
|
|
@@ -1909,6 +1899,30 @@ export type InvoiceWebhookEvent = {
|
|
|
1909
1899
|
sourceConnectionId: string;
|
|
1910
1900
|
};
|
|
1911
1901
|
type: "invoice.ready";
|
|
1902
|
+
} | {
|
|
1903
|
+
/**
|
|
1904
|
+
* InvoiceDeliveryEventData
|
|
1905
|
+
*
|
|
1906
|
+
* The Invoice and the buyer email whose sent or failed outcome the event announces.
|
|
1907
|
+
*/
|
|
1908
|
+
data: {
|
|
1909
|
+
deliveryId: string;
|
|
1910
|
+
id: string;
|
|
1911
|
+
sourceConnectionId: string;
|
|
1912
|
+
};
|
|
1913
|
+
type: "invoice.deliverySent";
|
|
1914
|
+
} | {
|
|
1915
|
+
/**
|
|
1916
|
+
* InvoiceDeliveryEventData
|
|
1917
|
+
*
|
|
1918
|
+
* The Invoice and the buyer email whose sent or failed outcome the event announces.
|
|
1919
|
+
*/
|
|
1920
|
+
data: {
|
|
1921
|
+
deliveryId: string;
|
|
1922
|
+
id: string;
|
|
1923
|
+
sourceConnectionId: string;
|
|
1924
|
+
};
|
|
1925
|
+
type: "invoice.deliveryFailed";
|
|
1912
1926
|
};
|
|
1913
1927
|
export type InvoiceWebhookEventEnvelope = {
|
|
1914
1928
|
apiVersion: string;
|
|
@@ -1974,6 +1988,44 @@ export type InvoiceWebhookEventEnvelope = {
|
|
|
1974
1988
|
organizationId: string;
|
|
1975
1989
|
sequence: string;
|
|
1976
1990
|
type: "invoice.ready";
|
|
1991
|
+
} | {
|
|
1992
|
+
apiVersion: string;
|
|
1993
|
+
/**
|
|
1994
|
+
* InvoiceDeliveryEventData
|
|
1995
|
+
*
|
|
1996
|
+
* The Invoice and the buyer email whose sent or failed outcome the event announces.
|
|
1997
|
+
*/
|
|
1998
|
+
data: {
|
|
1999
|
+
deliveryId: string;
|
|
2000
|
+
id: string;
|
|
2001
|
+
sourceConnectionId: string;
|
|
2002
|
+
};
|
|
2003
|
+
environment: FiscalEnvironment;
|
|
2004
|
+
id: string;
|
|
2005
|
+
object: WebhookEventObject;
|
|
2006
|
+
occurredAt: string;
|
|
2007
|
+
organizationId: string;
|
|
2008
|
+
sequence: string;
|
|
2009
|
+
type: "invoice.deliverySent";
|
|
2010
|
+
} | {
|
|
2011
|
+
apiVersion: string;
|
|
2012
|
+
/**
|
|
2013
|
+
* InvoiceDeliveryEventData
|
|
2014
|
+
*
|
|
2015
|
+
* The Invoice and the buyer email whose sent or failed outcome the event announces.
|
|
2016
|
+
*/
|
|
2017
|
+
data: {
|
|
2018
|
+
deliveryId: string;
|
|
2019
|
+
id: string;
|
|
2020
|
+
sourceConnectionId: string;
|
|
2021
|
+
};
|
|
2022
|
+
environment: FiscalEnvironment;
|
|
2023
|
+
id: string;
|
|
2024
|
+
object: WebhookEventObject;
|
|
2025
|
+
occurredAt: string;
|
|
2026
|
+
organizationId: string;
|
|
2027
|
+
sequence: string;
|
|
2028
|
+
type: "invoice.deliveryFailed";
|
|
1977
2029
|
};
|
|
1978
2030
|
export type InvoiceXmlReadiness = {
|
|
1979
2031
|
status: "notApplicable";
|
|
@@ -1990,6 +2042,19 @@ export type InvoiceXmlReadiness = {
|
|
|
1990
2042
|
* One stable reason the authoritative rules refuse to issue.
|
|
1991
2043
|
*/
|
|
1992
2044
|
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";
|
|
2045
|
+
/**
|
|
2046
|
+
* Whether the issuer can issue each e-CF type now in this environment.
|
|
2047
|
+
*/
|
|
2048
|
+
export type IssuanceReadiness = {
|
|
2049
|
+
certificate: SigningCertificateReadiness;
|
|
2050
|
+
/**
|
|
2051
|
+
* Every e-CF type, in type order.
|
|
2052
|
+
*/
|
|
2053
|
+
documentTypes: Array<DocumentTypeIssuanceReadiness>;
|
|
2054
|
+
environment: FiscalEnvironment;
|
|
2055
|
+
issuerTaxId: string;
|
|
2056
|
+
};
|
|
2057
|
+
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
2058
|
export type LedgerCounter = string;
|
|
1994
2059
|
export type LegalIssuer = {
|
|
1995
2060
|
address: string | null;
|
|
@@ -2059,6 +2124,19 @@ export type NumberedFiscalDocument = {
|
|
|
2059
2124
|
fiscal_number: string;
|
|
2060
2125
|
sequence_expires_on: string | null;
|
|
2061
2126
|
};
|
|
2127
|
+
/**
|
|
2128
|
+
* The range Timbro assigns the next fiscal number of this type from.
|
|
2129
|
+
*/
|
|
2130
|
+
export type NumberingRange = {
|
|
2131
|
+
/**
|
|
2132
|
+
* The sequence expiry, or `null` for a type without one (E32 and E34).
|
|
2133
|
+
*/
|
|
2134
|
+
expiresOn: string | null;
|
|
2135
|
+
/**
|
|
2136
|
+
* Fiscal numbers left in the selected range.
|
|
2137
|
+
*/
|
|
2138
|
+
remaining: number;
|
|
2139
|
+
};
|
|
2062
2140
|
export type OnboardingLegalIssuerIdentity = {
|
|
2063
2141
|
object: OnboardingLegalIssuerIdentityResourceObject;
|
|
2064
2142
|
outcome: OnboardingLegalIssuerIdentityOutcome;
|
|
@@ -2493,6 +2571,27 @@ export type SignedDocumentReadinessResource = {
|
|
|
2493
2571
|
sha256: string;
|
|
2494
2572
|
status: "ready";
|
|
2495
2573
|
};
|
|
2574
|
+
/**
|
|
2575
|
+
* The active signing certificate, judged at the moment of the read.
|
|
2576
|
+
*/
|
|
2577
|
+
export type SigningCertificateReadiness = {
|
|
2578
|
+
notAfter: string;
|
|
2579
|
+
notBefore: string;
|
|
2580
|
+
sha256: string;
|
|
2581
|
+
status: "ready";
|
|
2582
|
+
} | {
|
|
2583
|
+
notAfter: string;
|
|
2584
|
+
notBefore: string;
|
|
2585
|
+
sha256: string;
|
|
2586
|
+
status: "expired";
|
|
2587
|
+
} | {
|
|
2588
|
+
notAfter: string;
|
|
2589
|
+
notBefore: string;
|
|
2590
|
+
sha256: string;
|
|
2591
|
+
status: "notYetValid";
|
|
2592
|
+
} | {
|
|
2593
|
+
status: "missing";
|
|
2594
|
+
};
|
|
2496
2595
|
/**
|
|
2497
2596
|
* Named additional taxes supported by the common Source contract.
|
|
2498
2597
|
*/
|
|
@@ -4202,6 +4301,44 @@ export type WebhookEventEnvelope = {
|
|
|
4202
4301
|
organizationId: string;
|
|
4203
4302
|
sequence: string;
|
|
4204
4303
|
type: "invoice.ready";
|
|
4304
|
+
} | {
|
|
4305
|
+
apiVersion: string;
|
|
4306
|
+
/**
|
|
4307
|
+
* InvoiceDeliveryEventData
|
|
4308
|
+
*
|
|
4309
|
+
* The Invoice and the buyer email whose sent or failed outcome the event announces.
|
|
4310
|
+
*/
|
|
4311
|
+
data: {
|
|
4312
|
+
deliveryId: string;
|
|
4313
|
+
id: string;
|
|
4314
|
+
sourceConnectionId: string;
|
|
4315
|
+
};
|
|
4316
|
+
environment: FiscalEnvironment;
|
|
4317
|
+
id: string;
|
|
4318
|
+
object: WebhookEventObject;
|
|
4319
|
+
occurredAt: string;
|
|
4320
|
+
organizationId: string;
|
|
4321
|
+
sequence: string;
|
|
4322
|
+
type: "invoice.deliverySent";
|
|
4323
|
+
} | {
|
|
4324
|
+
apiVersion: string;
|
|
4325
|
+
/**
|
|
4326
|
+
* InvoiceDeliveryEventData
|
|
4327
|
+
*
|
|
4328
|
+
* The Invoice and the buyer email whose sent or failed outcome the event announces.
|
|
4329
|
+
*/
|
|
4330
|
+
data: {
|
|
4331
|
+
deliveryId: string;
|
|
4332
|
+
id: string;
|
|
4333
|
+
sourceConnectionId: string;
|
|
4334
|
+
};
|
|
4335
|
+
environment: FiscalEnvironment;
|
|
4336
|
+
id: string;
|
|
4337
|
+
object: WebhookEventObject;
|
|
4338
|
+
occurredAt: string;
|
|
4339
|
+
organizationId: string;
|
|
4340
|
+
sequence: string;
|
|
4341
|
+
type: "invoice.deliveryFailed";
|
|
4205
4342
|
} | {
|
|
4206
4343
|
apiVersion: string;
|
|
4207
4344
|
data: {
|
|
@@ -4980,6 +5117,45 @@ export type ReplaceHostedInvoiceResponses = {
|
|
|
4980
5117
|
201: InvoiceResource;
|
|
4981
5118
|
};
|
|
4982
5119
|
export type ReplaceHostedInvoiceResponse = ReplaceHostedInvoiceResponses[keyof ReplaceHostedInvoiceResponses];
|
|
5120
|
+
export type RetrieveHostedIssuanceReadinessData = {
|
|
5121
|
+
body?: never | undefined;
|
|
5122
|
+
path?: never | undefined;
|
|
5123
|
+
query: {
|
|
5124
|
+
checkout_tenant_id: string;
|
|
5125
|
+
environment: FiscalEnvironment;
|
|
5126
|
+
};
|
|
5127
|
+
url: "/internal/hosted/issuance-readiness";
|
|
5128
|
+
};
|
|
5129
|
+
export type RetrieveHostedIssuanceReadinessErrors = {
|
|
5130
|
+
/**
|
|
5131
|
+
* The hosted tenant coordinates are invalid.
|
|
5132
|
+
*/
|
|
5133
|
+
400: ProblemBody;
|
|
5134
|
+
/**
|
|
5135
|
+
* The service credential is missing, revoked, or invalid.
|
|
5136
|
+
*/
|
|
5137
|
+
401: ProblemBody;
|
|
5138
|
+
/**
|
|
5139
|
+
* The hosted tenant has no binding in this environment.
|
|
5140
|
+
*/
|
|
5141
|
+
404: ProblemBody;
|
|
5142
|
+
/**
|
|
5143
|
+
* The native stamp server returned a typed Problem.
|
|
5144
|
+
*/
|
|
5145
|
+
409: ProblemBody;
|
|
5146
|
+
/**
|
|
5147
|
+
* The native stamp server returned a typed Problem.
|
|
5148
|
+
*/
|
|
5149
|
+
500: ProblemBody;
|
|
5150
|
+
};
|
|
5151
|
+
export type RetrieveHostedIssuanceReadinessError = RetrieveHostedIssuanceReadinessErrors[keyof RetrieveHostedIssuanceReadinessErrors];
|
|
5152
|
+
export type RetrieveHostedIssuanceReadinessResponses = {
|
|
5153
|
+
/**
|
|
5154
|
+
* Whether the hosted tenant's issuer can issue each e-CF type now in this environment.
|
|
5155
|
+
*/
|
|
5156
|
+
200: IssuanceReadiness;
|
|
5157
|
+
};
|
|
5158
|
+
export type RetrieveHostedIssuanceReadinessResponse = RetrieveHostedIssuanceReadinessResponses[keyof RetrieveHostedIssuanceReadinessResponses];
|
|
4983
5159
|
export type ListFiscalOperationsData = {
|
|
4984
5160
|
body?: never | undefined;
|
|
4985
5161
|
path?: never | undefined;
|
|
@@ -5289,38 +5465,6 @@ export type ReadFiscalOperationTimingResponses = {
|
|
|
5289
5465
|
200: FiscalOperationTimingReport;
|
|
5290
5466
|
};
|
|
5291
5467
|
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
5468
|
export type CreateDirectConnectionRequestData = {
|
|
5325
5469
|
body: CreateDirectConnectionRequest;
|
|
5326
5470
|
path?: never | undefined;
|
|
@@ -5487,38 +5631,6 @@ export type RetrieveFiscalDeliveryPrintedRepresentationResponses = {
|
|
|
5487
5631
|
200: Uint8Array;
|
|
5488
5632
|
};
|
|
5489
5633
|
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
5634
|
export type ImportHostedCertificateCustodyData = {
|
|
5523
5635
|
body: HostedImportRequest;
|
|
5524
5636
|
path?: never | undefined;
|
|
@@ -6189,6 +6301,34 @@ export type ReplaceInvoiceResponses = {
|
|
|
6189
6301
|
201: InvoiceResource;
|
|
6190
6302
|
};
|
|
6191
6303
|
export type ReplaceInvoiceResponse = ReplaceInvoiceResponses[keyof ReplaceInvoiceResponses];
|
|
6304
|
+
export type RetrieveIssuanceReadinessData = {
|
|
6305
|
+
body?: never | undefined;
|
|
6306
|
+
path?: never | undefined;
|
|
6307
|
+
query?: never | undefined;
|
|
6308
|
+
url: "/v1/issuance-readiness";
|
|
6309
|
+
};
|
|
6310
|
+
export type RetrieveIssuanceReadinessErrors = {
|
|
6311
|
+
/**
|
|
6312
|
+
* The Source connection credential is missing, invalid, or revoked.
|
|
6313
|
+
*/
|
|
6314
|
+
401: ProblemBody;
|
|
6315
|
+
/**
|
|
6316
|
+
* The Source connection is not connected.
|
|
6317
|
+
*/
|
|
6318
|
+
409: ProblemBody;
|
|
6319
|
+
/**
|
|
6320
|
+
* The native stamp server returned a typed Problem.
|
|
6321
|
+
*/
|
|
6322
|
+
500: ProblemBody;
|
|
6323
|
+
};
|
|
6324
|
+
export type RetrieveIssuanceReadinessError = RetrieveIssuanceReadinessErrors[keyof RetrieveIssuanceReadinessErrors];
|
|
6325
|
+
export type RetrieveIssuanceReadinessResponses = {
|
|
6326
|
+
/**
|
|
6327
|
+
* Whether the Source connection's issuer can issue each e-CF type now, with every blocking reason.
|
|
6328
|
+
*/
|
|
6329
|
+
200: IssuanceReadiness;
|
|
6330
|
+
};
|
|
6331
|
+
export type RetrieveIssuanceReadinessResponse = RetrieveIssuanceReadinessResponses[keyof RetrieveIssuanceReadinessResponses];
|
|
6192
6332
|
export type ReadOpenApiDocumentData = {
|
|
6193
6333
|
body?: never | undefined;
|
|
6194
6334
|
path?: never | undefined;
|