@timbro/invoices 0.8.2 → 0.9.0-next.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 +95 -258
- package/dist/admin.d.ts +44 -0
- package/dist/admin.d.ts.map +1 -0
- package/dist/admin.js +16 -0
- package/dist/certificate-custody-import.d.ts +4 -2
- package/dist/certificate-custody-import.d.ts.map +1 -1
- package/dist/certificate-custody-import.js +1 -1
- package/dist/collection.d.ts +1 -1
- package/dist/collection.js +4 -4
- package/dist/fiscal-engine-runtime.manifest.json +16 -16
- package/dist/fiscal-engine-runtime.provenance.json +17 -17
- package/dist/generated/hosted/index.d.ts +4 -0
- package/dist/generated/hosted/index.d.ts.map +1 -0
- package/dist/generated/hosted/index.js +3 -0
- package/dist/generated/hosted/sdk.gen.d.ts +106 -0
- package/dist/generated/hosted/sdk.gen.d.ts.map +1 -0
- package/dist/generated/hosted/sdk.gen.js +1049 -0
- package/dist/generated/hosted/types.gen.d.ts +2425 -0
- package/dist/generated/hosted/types.gen.d.ts.map +1 -0
- package/dist/generated/hosted/types.gen.js +2 -0
- package/dist/generated/hosted/zod.gen.d.ts +1772 -0
- package/dist/generated/hosted/zod.gen.d.ts.map +1 -0
- package/dist/generated/hosted/zod.gen.js +2269 -0
- 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 +6348 -0
- package/dist/generated/invoice-api-contract.d.ts.map +1 -0
- package/dist/generated/invoice-api-contract.js +11004 -0
- package/dist/generated/problem-catalog.d.ts.map +1 -1
- package/dist/generated/problem-catalog.js +9 -3
- package/dist/generated/sdk.gen.d.ts +70 -38
- package/dist/generated/sdk.gen.d.ts.map +1 -1
- package/dist/generated/sdk.gen.js +1261 -251
- package/dist/generated/types.gen.d.ts +4349 -2686
- package/dist/generated/types.gen.d.ts.map +1 -1
- package/dist/generated/zod.gen.d.ts +53878 -22744
- package/dist/generated/zod.gen.d.ts.map +1 -1
- package/dist/generated/zod.gen.js +5733 -665
- package/dist/generated-operation-client.d.ts +1 -0
- package/dist/generated-operation-client.d.ts.map +1 -1
- package/dist/generated-operation-client.js +3 -2
- package/dist/generated-problem.d.ts +1 -1
- package/dist/generated-problem.d.ts.map +1 -1
- package/dist/generated-problem.js +4 -4
- package/dist/index.d.ts +8 -37
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -12
- package/dist/{fiscal-error.d.ts → invoice-error.d.ts} +10 -9
- package/dist/invoice-error.d.ts.map +1 -0
- package/dist/{fiscal-error.js → invoice-error.js} +7 -4
- package/dist/invoice-hosted-controls.d.ts +62 -0
- package/dist/invoice-hosted-controls.d.ts.map +1 -0
- package/dist/invoice-hosted-controls.js +188 -0
- package/dist/invoice-receipt.d.ts +10 -0
- package/dist/invoice-receipt.d.ts.map +1 -0
- package/dist/invoice-receipt.js +49 -0
- package/dist/invoice-replacement.d.ts +8 -0
- package/dist/invoice-replacement.d.ts.map +1 -0
- package/dist/invoice-replacement.js +18 -0
- package/dist/invoice.d.ts +94 -0
- package/dist/invoice.d.ts.map +1 -0
- package/dist/invoice.js +251 -0
- package/dist/printed-representation.d.ts +0 -1
- package/dist/printed-representation.d.ts.map +1 -1
- package/dist/printed-representation.js +3 -3
- package/dist/problem-contract.d.ts +17 -114
- package/dist/problem-contract.d.ts.map +1 -1
- package/dist/public-case.d.ts +1 -1
- package/dist/received-documents.d.ts +13 -12
- package/dist/received-documents.d.ts.map +1 -1
- package/dist/received-documents.js +26 -20
- package/dist/source-connection.d.ts +5 -5
- package/dist/source-connection.d.ts.map +1 -1
- package/dist/source-connection.js +8 -9
- package/dist/stamp-server-http-transport.js +6 -6
- package/dist/timbro-client.d.ts +5 -37
- package/dist/timbro-client.d.ts.map +1 -1
- package/dist/timbro-client.js +4 -20
- package/dist/timbro_fiscal_engine_bg.wasm +0 -0
- package/dist/transport-contract.d.ts +1 -1
- package/dist/transport-contract.d.ts.map +1 -1
- package/dist/webhook-delivery.js +1 -1
- package/dist/webhook-event.d.ts +124 -842
- package/dist/webhook-event.d.ts.map +1 -1
- package/dist/webhook-event.js +3 -1
- package/dist/webhook-registration.d.ts +1 -2
- package/dist/webhook-registration.d.ts.map +1 -1
- package/dist/webhook-registration.js +1 -2
- package/dist/webhook-replay.d.ts +1 -2
- package/dist/webhook-replay.d.ts.map +1 -1
- package/dist/webhook-replay.js +3 -4
- package/dist/workspace.d.ts.map +1 -1
- package/dist/workspace.js +2 -2
- package/package.json +26 -16
- package/dist/fiscal-delivery.d.ts +0 -12
- package/dist/fiscal-delivery.d.ts.map +0 -1
- package/dist/fiscal-delivery.js +0 -45
- package/dist/fiscal-error.d.ts.map +0 -1
- package/dist/fiscal-receipt.d.ts +0 -19
- package/dist/fiscal-receipt.d.ts.map +0 -1
- package/dist/fiscal-receipt.js +0 -66
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { Client, InvoiceDeliveryResource, InvoicePage, InvoicePreview, InvoiceReceipt, InvoiceReceiptAccess, InvoiceRequest, InvoiceResource, InvoiceType } from "./generated/index.ts";
|
|
2
|
+
import { type CommercialResponse } from "./generated/index.ts";
|
|
3
|
+
import { type InvoiceHostedControls } from "./invoice-hosted-controls.ts";
|
|
4
|
+
import { type InvoiceReceiptTransportOptions } from "./invoice-receipt.ts";
|
|
5
|
+
import { type InvoiceReplacement } from "./invoice-replacement.ts";
|
|
6
|
+
import { type ReceivedDocumentDownload, type ReceivedDocumentListCommand, type ReceivedDocumentPage, type ReceivedDocumentResource } from "./received-documents.ts";
|
|
7
|
+
import type { DeliveredWebhookEvent } from "./webhook-event.ts";
|
|
8
|
+
import { type WebhookVerificationCommand } from "./webhook-verification.ts";
|
|
9
|
+
export type { InvoiceReplacement } from "./invoice-replacement.ts";
|
|
10
|
+
export type TimbroInvoicesOptions = {
|
|
11
|
+
readonly apiKey: string;
|
|
12
|
+
readonly baseUrl?: string;
|
|
13
|
+
readonly fetch?: typeof globalThis.fetch;
|
|
14
|
+
};
|
|
15
|
+
export type InvoiceListFilters = {
|
|
16
|
+
readonly invoiceReference?: string;
|
|
17
|
+
readonly type?: InvoiceType;
|
|
18
|
+
readonly cursor?: string;
|
|
19
|
+
readonly limit?: number;
|
|
20
|
+
};
|
|
21
|
+
export type InvoiceRequestOptions = {
|
|
22
|
+
readonly signal?: AbortSignal;
|
|
23
|
+
};
|
|
24
|
+
export type InvoiceCreateOptions = InvoiceRequestOptions & {
|
|
25
|
+
readonly idempotencyKey?: string;
|
|
26
|
+
};
|
|
27
|
+
export type InvoiceDeliveryCommand = InvoiceRequestOptions & {
|
|
28
|
+
readonly invoiceId: string;
|
|
29
|
+
readonly recipientEmail: string;
|
|
30
|
+
readonly idempotencyKey: string;
|
|
31
|
+
readonly accountClaimUrl?: string;
|
|
32
|
+
};
|
|
33
|
+
export type InvoiceDeliveryReadCommand = InvoiceRequestOptions & {
|
|
34
|
+
readonly invoiceId: string;
|
|
35
|
+
readonly deliveryId: string;
|
|
36
|
+
};
|
|
37
|
+
export type InvoiceXmlDownload = {
|
|
38
|
+
readonly bytes: Uint8Array;
|
|
39
|
+
readonly byteLength: number;
|
|
40
|
+
readonly certificateSha256: string;
|
|
41
|
+
readonly createdAt: string;
|
|
42
|
+
readonly invoiceId: string;
|
|
43
|
+
readonly mediaType: "application/xml";
|
|
44
|
+
readonly securityCode: string;
|
|
45
|
+
readonly sha256: string;
|
|
46
|
+
};
|
|
47
|
+
export type InvoicePdfDownload = {
|
|
48
|
+
readonly bytes: Uint8Array;
|
|
49
|
+
readonly byteLength: number;
|
|
50
|
+
readonly createdAt: string;
|
|
51
|
+
readonly eNcf: string;
|
|
52
|
+
readonly invoiceId: string;
|
|
53
|
+
readonly invoiceType: InvoiceType;
|
|
54
|
+
readonly layout: "a4" | "receipt80mm";
|
|
55
|
+
readonly mediaType: "application/pdf";
|
|
56
|
+
readonly pageCount: number;
|
|
57
|
+
readonly sha256: string;
|
|
58
|
+
readonly signedSourceSha256: string;
|
|
59
|
+
};
|
|
60
|
+
export type TimbroInvoices = InvoiceHostedControls & {
|
|
61
|
+
readonly webhooks: {
|
|
62
|
+
readonly verify: (command: WebhookVerificationCommand) => Promise<DeliveredWebhookEvent>;
|
|
63
|
+
};
|
|
64
|
+
readonly invoices: {
|
|
65
|
+
readonly shareReceipt: (invoiceId: string, options?: InvoiceRequestOptions) => Promise<InvoiceReceiptAccess>;
|
|
66
|
+
readonly retrieveReceipt: (receipt: InvoiceReceiptAccess, options?: InvoiceRequestOptions) => Promise<InvoiceReceipt | undefined>;
|
|
67
|
+
readonly downloadReceiptPdf: (receipt: InvoiceReceiptAccess, options?: InvoiceRequestOptions) => Promise<InvoicePdfDownload>;
|
|
68
|
+
readonly create: (request: InvoiceRequest, options?: InvoiceCreateOptions) => Promise<InvoiceResource>;
|
|
69
|
+
readonly preview: (request: InvoiceRequest, options?: InvoiceRequestOptions) => Promise<InvoicePreview>;
|
|
70
|
+
readonly retrieve: (invoiceId: string, options?: InvoiceRequestOptions) => Promise<InvoiceResource | undefined>;
|
|
71
|
+
readonly downloadXml: (invoiceId: string, options?: InvoiceRequestOptions) => Promise<InvoiceXmlDownload>;
|
|
72
|
+
readonly downloadPdf: (invoiceId: string, options?: InvoiceRequestOptions) => Promise<InvoicePdfDownload>;
|
|
73
|
+
readonly list: (filters?: InvoiceListFilters, options?: InvoiceRequestOptions) => Promise<InvoicePage>;
|
|
74
|
+
readonly deliver: (command: InvoiceDeliveryCommand) => Promise<InvoiceDeliveryResource>;
|
|
75
|
+
readonly retrieveDelivery: (command: InvoiceDeliveryReadCommand) => Promise<InvoiceDeliveryResource | undefined>;
|
|
76
|
+
} & InvoiceReplacement;
|
|
77
|
+
readonly receivedDocuments: {
|
|
78
|
+
readonly list: (command?: ReceivedDocumentListCommand) => Promise<ReceivedDocumentPage>;
|
|
79
|
+
readonly retrieve: (receivedDocumentId: string, options?: InvoiceRequestOptions) => Promise<ReceivedDocumentResource | undefined>;
|
|
80
|
+
readonly respond: (receivedDocumentId: string, response: CommercialResponse, options?: InvoiceRequestOptions) => Promise<ReceivedDocumentResource>;
|
|
81
|
+
readonly downloadXml: (receivedDocumentId: string, options?: InvoiceRequestOptions) => Promise<ReceivedDocumentDownload>;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
export declare function createTimbroInvoices(options: TimbroInvoicesOptions): TimbroInvoices;
|
|
85
|
+
export declare function createInvoiceResources(client: Client, transport: InvoiceReceiptTransportOptions): TimbroInvoices["invoices"];
|
|
86
|
+
export declare function verifyInvoiceXmlDownload(response: {
|
|
87
|
+
readonly body: unknown;
|
|
88
|
+
readonly headers: ReadonlyMap<string, string>;
|
|
89
|
+
}, requestedInvoiceId: string): Promise<InvoiceXmlDownload>;
|
|
90
|
+
export declare function verifyInvoicePdfDownload(response: {
|
|
91
|
+
readonly body: unknown;
|
|
92
|
+
readonly headers: ReadonlyMap<string, string>;
|
|
93
|
+
}, requestedInvoiceId: string): Promise<InvoicePdfDownload>;
|
|
94
|
+
//# sourceMappingURL=invoice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invoice.d.ts","sourceRoot":"","sources":["../src/invoice.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,MAAM,EACN,uBAAuB,EACvB,WAAW,EACX,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,WAAW,EACZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,KAAK,kBAAkB,EAaxB,MAAM,sBAAsB,CAAC;AAK9B,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,KAAK,8BAA8B,EAGpC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAA4B,KAAK,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE7F,OAAO,EAGL,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,wBAAw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AAC,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,EACnF,kBAAkB,EAAE,MAAM,GACzB,OAAO,CAAC,kBAAkB,CAAC,CAkC7B"}
|
package/dist/invoice.js
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { createArtifactHeaderReader } from "./artifact-headers.js";
|
|
2
|
+
import { createInvoiceDelivery as createInvoiceDeliveryOperation, createInvoice as createInvoiceOperation, downloadInvoicePdf as downloadInvoicePdfOperation, downloadInvoiceReceiptPdf as downloadInvoiceReceiptPdfOperation, downloadInvoiceXml as downloadInvoiceXmlOperation, listInvoices as listInvoicesOperation, previewInvoice as previewInvoiceOperation, retrieveInvoiceDelivery as retrieveInvoiceDeliveryOperation, retrieveInvoice as retrieveInvoiceOperation, zCreateInvoiceDeliveryRequest, zInvoiceRequest, zInvoiceType, } from "./generated/index.js";
|
|
3
|
+
import { zProblemBody } from "./generated/zod.gen.js";
|
|
4
|
+
import { createGeneratedOperationClient } from "./generated-operation-client.js";
|
|
5
|
+
import { isExpectedNotFoundProblem, throwGeneratedProblem } from "./generated-problem.js";
|
|
6
|
+
import { isValidIdempotencyKey } from "./idempotency-key.js";
|
|
7
|
+
import { createInvoiceHostedControls, } from "./invoice-hosted-controls.js";
|
|
8
|
+
import { createInvoiceReceiptClient, retrieveInvoiceReceiptResource, shareInvoiceReceiptResource, } from "./invoice-receipt.js";
|
|
9
|
+
import { createInvoiceReplacement } from "./invoice-replacement.js";
|
|
10
|
+
import { isCanonicalRfc3339MillisecondUtc } from "./printed-representation.js";
|
|
11
|
+
import { downloadReceivedDocument, listReceivedDocuments, respondToReceivedDocument, retrieveReceivedDocument, } from "./received-documents.js";
|
|
12
|
+
import { digestSha256Hex } from "./sha256.js";
|
|
13
|
+
import { createStampServerHttpTransport } from "./stamp-server-http-transport.js";
|
|
14
|
+
import { verifyWebhookDelivery } from "./webhook-verification.js";
|
|
15
|
+
const DEFAULT_INVOICES_ORIGIN = "https://api.timbro.do";
|
|
16
|
+
export function createTimbroInvoices(options) {
|
|
17
|
+
if (options.apiKey.trim() === "") {
|
|
18
|
+
throw new TypeError("apiKey must not be empty");
|
|
19
|
+
}
|
|
20
|
+
const client = createGeneratedOperationClient(createStampServerHttpTransport({
|
|
21
|
+
stampServerOrigin: options.baseUrl ?? DEFAULT_INVOICES_ORIGIN,
|
|
22
|
+
authentication: { mode: "source_connection", credential: options.apiKey },
|
|
23
|
+
...(options.fetch === undefined ? {} : { fetch: options.fetch }),
|
|
24
|
+
}));
|
|
25
|
+
return {
|
|
26
|
+
...createInvoiceHostedControls(client),
|
|
27
|
+
invoices: createInvoiceResources(client, {
|
|
28
|
+
baseUrl: options.baseUrl ?? DEFAULT_INVOICES_ORIGIN,
|
|
29
|
+
...(options.fetch === undefined ? {} : { fetch: options.fetch }),
|
|
30
|
+
}),
|
|
31
|
+
receivedDocuments: {
|
|
32
|
+
list: (command) => listReceivedDocuments(client, command),
|
|
33
|
+
retrieve: (receivedDocumentId, requestOptions) => retrieveReceivedDocument(client, receivedDocumentId, requestOptions?.signal),
|
|
34
|
+
respond: (receivedDocumentId, response, requestOptions) => respondToReceivedDocument(client, receivedDocumentId, response, requestOptions?.signal),
|
|
35
|
+
downloadXml: (receivedDocumentId, requestOptions) => downloadReceivedDocument(client, receivedDocumentId, requestOptions?.signal),
|
|
36
|
+
},
|
|
37
|
+
webhooks: { verify: verifyWebhookDelivery },
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export function createInvoiceResources(client, transport) {
|
|
41
|
+
return {
|
|
42
|
+
...createInvoiceReplacement(client),
|
|
43
|
+
deliver: async (command) => {
|
|
44
|
+
if (command.invoiceId.trim() === "") {
|
|
45
|
+
throw new TypeError("invoiceId must not be blank");
|
|
46
|
+
}
|
|
47
|
+
if (!isValidIdempotencyKey(command.idempotencyKey)) {
|
|
48
|
+
throw new TypeError("idempotencyKey must contain 16 to 255 allowed characters");
|
|
49
|
+
}
|
|
50
|
+
const body = zCreateInvoiceDeliveryRequest.parse({
|
|
51
|
+
recipientEmail: command.recipientEmail,
|
|
52
|
+
...(command.accountClaimUrl === undefined
|
|
53
|
+
? {}
|
|
54
|
+
: { accountClaimUrl: command.accountClaimUrl }),
|
|
55
|
+
});
|
|
56
|
+
const response = await createInvoiceDeliveryOperation({
|
|
57
|
+
client,
|
|
58
|
+
path: { invoiceId: command.invoiceId },
|
|
59
|
+
body,
|
|
60
|
+
headers: { "Idempotency-Key": command.idempotencyKey },
|
|
61
|
+
...(command.signal === undefined ? {} : { signal: command.signal }),
|
|
62
|
+
});
|
|
63
|
+
if (response.status === 200 || response.status === 201) {
|
|
64
|
+
return response.body;
|
|
65
|
+
}
|
|
66
|
+
throwGeneratedProblem(response, "Invoice delivery request failed");
|
|
67
|
+
},
|
|
68
|
+
retrieveDelivery: async (command) => {
|
|
69
|
+
if (command.invoiceId.trim() === "" || command.deliveryId.trim() === "") {
|
|
70
|
+
throw new TypeError("invoiceId and deliveryId must not be blank");
|
|
71
|
+
}
|
|
72
|
+
const response = await retrieveInvoiceDeliveryOperation({
|
|
73
|
+
client,
|
|
74
|
+
path: { invoiceId: command.invoiceId, deliveryId: command.deliveryId },
|
|
75
|
+
...(command.signal === undefined ? {} : { signal: command.signal }),
|
|
76
|
+
});
|
|
77
|
+
if (response.status === 200) {
|
|
78
|
+
return response.body;
|
|
79
|
+
}
|
|
80
|
+
if (isExpectedNotFoundProblem(response, "fiscal_delivery_not_found", "Invoice delivery lookup failed")) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
throwGeneratedProblem(response, "Invoice delivery lookup failed");
|
|
84
|
+
},
|
|
85
|
+
shareReceipt: (invoiceId, requestOptions) => shareInvoiceReceiptResource(client, invoiceId, requestOptions?.signal),
|
|
86
|
+
retrieveReceipt: (receipt, requestOptions) => retrieveInvoiceReceiptResource(transport, receipt, requestOptions?.signal),
|
|
87
|
+
downloadReceiptPdf: async (receipt, requestOptions) => {
|
|
88
|
+
const response = await downloadInvoiceReceiptPdfOperation({
|
|
89
|
+
client: createInvoiceReceiptClient(transport, receipt),
|
|
90
|
+
path: { receiptId: receipt.id },
|
|
91
|
+
...(requestOptions?.signal === undefined ? {} : { signal: requestOptions.signal }),
|
|
92
|
+
});
|
|
93
|
+
if (response.status !== 200) {
|
|
94
|
+
throwGeneratedProblem(response, "Invoice receipt PDF download failed");
|
|
95
|
+
}
|
|
96
|
+
return verifyInvoicePdfDownload(response, receipt.invoiceId);
|
|
97
|
+
},
|
|
98
|
+
create: async (request, requestOptions) => {
|
|
99
|
+
const body = zInvoiceRequest.parse(request);
|
|
100
|
+
const response = await createInvoiceOperation({
|
|
101
|
+
client,
|
|
102
|
+
body,
|
|
103
|
+
...(requestOptions?.idempotencyKey === undefined
|
|
104
|
+
? {}
|
|
105
|
+
: { headers: { "Idempotency-Key": requestOptions.idempotencyKey } }),
|
|
106
|
+
...(requestOptions?.signal === undefined ? {} : { signal: requestOptions.signal }),
|
|
107
|
+
});
|
|
108
|
+
if (response.status === 200 || response.status === 201) {
|
|
109
|
+
return response.body;
|
|
110
|
+
}
|
|
111
|
+
throwGeneratedProblem(response, "Invoice creation failed");
|
|
112
|
+
},
|
|
113
|
+
preview: async (request, requestOptions) => {
|
|
114
|
+
const body = zInvoiceRequest.parse(request);
|
|
115
|
+
const response = await previewInvoiceOperation({
|
|
116
|
+
client,
|
|
117
|
+
body,
|
|
118
|
+
...(requestOptions?.signal === undefined ? {} : { signal: requestOptions.signal }),
|
|
119
|
+
});
|
|
120
|
+
if (response.status === 200) {
|
|
121
|
+
return response.body;
|
|
122
|
+
}
|
|
123
|
+
throwGeneratedProblem(response, "Invoice preview failed");
|
|
124
|
+
},
|
|
125
|
+
retrieve: async (invoiceId, requestOptions) => {
|
|
126
|
+
const response = await retrieveInvoiceOperation({
|
|
127
|
+
client,
|
|
128
|
+
path: { invoiceId },
|
|
129
|
+
...(requestOptions?.signal === undefined ? {} : { signal: requestOptions.signal }),
|
|
130
|
+
});
|
|
131
|
+
if (response.status === 200) {
|
|
132
|
+
return response.body;
|
|
133
|
+
}
|
|
134
|
+
if (response.status === 404) {
|
|
135
|
+
const problem = zProblemBody.safeParse(response.body);
|
|
136
|
+
if (problem.success && problem.data.code === "invoice_not_found") {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
throwGeneratedProblem(response, "Invoice lookup failed");
|
|
141
|
+
},
|
|
142
|
+
downloadXml: async (invoiceId, requestOptions) => {
|
|
143
|
+
const response = await downloadInvoiceXmlOperation({
|
|
144
|
+
client,
|
|
145
|
+
path: { invoiceId },
|
|
146
|
+
...(requestOptions?.signal === undefined ? {} : { signal: requestOptions.signal }),
|
|
147
|
+
});
|
|
148
|
+
if (response.status !== 200) {
|
|
149
|
+
throwGeneratedProblem(response, "Invoice XML download failed");
|
|
150
|
+
}
|
|
151
|
+
return verifyInvoiceXmlDownload(response, invoiceId);
|
|
152
|
+
},
|
|
153
|
+
downloadPdf: async (invoiceId, requestOptions) => {
|
|
154
|
+
const response = await downloadInvoicePdfOperation({
|
|
155
|
+
client,
|
|
156
|
+
path: { invoiceId },
|
|
157
|
+
...(requestOptions?.signal === undefined ? {} : { signal: requestOptions.signal }),
|
|
158
|
+
});
|
|
159
|
+
if (response.status !== 200) {
|
|
160
|
+
throwGeneratedProblem(response, "Invoice PDF download failed");
|
|
161
|
+
}
|
|
162
|
+
return verifyInvoicePdfDownload(response, invoiceId);
|
|
163
|
+
},
|
|
164
|
+
list: async (filters, requestOptions) => {
|
|
165
|
+
const response = await listInvoicesOperation({
|
|
166
|
+
client,
|
|
167
|
+
...(filters === undefined ? {} : { query: filters }),
|
|
168
|
+
...(requestOptions?.signal === undefined ? {} : { signal: requestOptions.signal }),
|
|
169
|
+
});
|
|
170
|
+
if (response.status === 200) {
|
|
171
|
+
return response.body;
|
|
172
|
+
}
|
|
173
|
+
throwGeneratedProblem(response, "Invoice listing failed");
|
|
174
|
+
},
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
export async function verifyInvoiceXmlDownload(response, requestedInvoiceId) {
|
|
178
|
+
const file = await decodeInvoiceFile(response, requestedInvoiceId, "application/xml");
|
|
179
|
+
const headers = createArtifactHeaderReader(response.headers, "Invoice XML");
|
|
180
|
+
const certificateSha256 = headers.digest("timbro-certificate-sha256");
|
|
181
|
+
const securityCode = headers.required("timbro-security-code");
|
|
182
|
+
if (securityCode.length !== 6) {
|
|
183
|
+
throw new TypeError("Timbro returned an invalid Invoice XML security code");
|
|
184
|
+
}
|
|
185
|
+
return { ...file, certificateSha256, securityCode };
|
|
186
|
+
}
|
|
187
|
+
export async function verifyInvoicePdfDownload(response, requestedInvoiceId) {
|
|
188
|
+
const file = await decodeInvoiceFile(response, requestedInvoiceId, "application/pdf");
|
|
189
|
+
const headers = createArtifactHeaderReader(response.headers, "Invoice PDF");
|
|
190
|
+
const pdfSha256 = headers.digest("timbro-pdf-sha256");
|
|
191
|
+
if (file.sha256 !== pdfSha256) {
|
|
192
|
+
throw new TypeError("Timbro returned mismatched Invoice file and PDF digests");
|
|
193
|
+
}
|
|
194
|
+
const signedSourceSha256 = headers.digest("timbro-signed-source-sha256");
|
|
195
|
+
const parsedInvoiceType = zInvoiceType.safeParse(headers.required("timbro-invoice-type"));
|
|
196
|
+
if (!parsedInvoiceType.success) {
|
|
197
|
+
throw new TypeError("Timbro returned an unsupported Invoice PDF document type");
|
|
198
|
+
}
|
|
199
|
+
const invoiceType = parsedInvoiceType.data;
|
|
200
|
+
const eNcf = headers.required("timbro-encf");
|
|
201
|
+
if (!FISCAL_NUMBER_PATTERN.test(eNcf) || eNcf.slice(0, 3) !== invoiceType) {
|
|
202
|
+
throw new TypeError("Timbro returned an Invoice PDF eNCF for another type");
|
|
203
|
+
}
|
|
204
|
+
const layout = headers.required("timbro-pdf-layout");
|
|
205
|
+
if (layout !== "a4" && layout !== "receipt80mm") {
|
|
206
|
+
throw new TypeError("Timbro returned an unsupported Invoice PDF layout");
|
|
207
|
+
}
|
|
208
|
+
const pageCount = headers.positiveInteger("timbro-page-count");
|
|
209
|
+
if (pageCount > 100) {
|
|
210
|
+
throw new TypeError("Timbro returned an Invoice PDF with too many pages");
|
|
211
|
+
}
|
|
212
|
+
return {
|
|
213
|
+
...file,
|
|
214
|
+
eNcf,
|
|
215
|
+
invoiceType,
|
|
216
|
+
layout,
|
|
217
|
+
mediaType: "application/pdf",
|
|
218
|
+
pageCount,
|
|
219
|
+
signedSourceSha256,
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
async function decodeInvoiceFile(response, requestedInvoiceId, mediaType) {
|
|
223
|
+
if (!(response.body instanceof Uint8Array)) {
|
|
224
|
+
throw new TypeError("Timbro returned a non-binary Invoice file");
|
|
225
|
+
}
|
|
226
|
+
const headers = createArtifactHeaderReader(response.headers, "Invoice file");
|
|
227
|
+
if (headers.required("content-type") !== mediaType) {
|
|
228
|
+
throw new TypeError("Timbro returned an Invoice file with the wrong media type");
|
|
229
|
+
}
|
|
230
|
+
const sha256 = headers.digest("timbro-file-sha256");
|
|
231
|
+
if ((await digestSha256Hex(response.body)) !== sha256) {
|
|
232
|
+
throw new TypeError("Invoice file bytes do not match their SHA-256");
|
|
233
|
+
}
|
|
234
|
+
const invoiceId = headers.uuid("timbro-invoice-id");
|
|
235
|
+
if (invoiceId.toLowerCase() !== requestedInvoiceId.toLowerCase()) {
|
|
236
|
+
throw new TypeError("Timbro returned a file for another Invoice");
|
|
237
|
+
}
|
|
238
|
+
const createdAt = headers.required("timbro-file-created-at");
|
|
239
|
+
if (!isCanonicalRfc3339MillisecondUtc(createdAt)) {
|
|
240
|
+
throw new TypeError("Timbro returned an invalid Invoice file creation time");
|
|
241
|
+
}
|
|
242
|
+
return {
|
|
243
|
+
bytes: response.body,
|
|
244
|
+
byteLength: response.body.byteLength,
|
|
245
|
+
createdAt,
|
|
246
|
+
invoiceId,
|
|
247
|
+
mediaType,
|
|
248
|
+
sha256,
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
const FISCAL_NUMBER_PATTERN = /^E(?:31|32|33|34|41|43|44|45|46|47)[0-9]{10}$/;
|
|
@@ -19,5 +19,4 @@ export type PrintedRepresentationDownload = {
|
|
|
19
19
|
readonly signedSourceSha256: string;
|
|
20
20
|
};
|
|
21
21
|
export declare function downloadPrintedRepresentationResource(client: Client, fiscalOperationId: string, signal: AbortSignal | undefined): Promise<PrintedRepresentationDownload>;
|
|
22
|
-
export declare function decodePrintedRepresentation(response: Pick<import("./transport-contract.ts").TimbroTransportResponse, "body" | "headers">, fiscalOperationId: string): Promise<PrintedRepresentationDownload>;
|
|
23
22
|
//# sourceMappingURL=printed-representation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"printed-representation.d.ts","sourceRoot":"","sources":["../src/printed-representation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"printed-representation.d.ts","sourceRoot":"","sources":["../src/printed-representation.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,4BAA4B,EAEjC,KAAK,4BAA4B,EAElC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAQ9D,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAsBvE;AAED,MAAM,MAAM,6BAA6B,GAAG;IAC1C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,kBAAkB,EAAE,4BAA4B,CAAC;IAC1D,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,SAAS,EAAE,iBAAiB,CAAC;IACtC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,4BAA4B,CAAC;IAC/C,QAAQ,CAAC,cAAc,EAAE,OAAO,GAAG,iBAAiB,CAAC;IACrD,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;CACrC,CAAC;AAEF,wBAAsB,qCAAqC,CACzD,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,MAAM,EACzB,MAAM,EAAE,WAAW,GAAG,SAAS,GAC9B,OAAO,CAAC,6BAA6B,CAAC,CAaxC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createArtifactHeaderReader } from "./artifact-headers.js";
|
|
2
|
-
import { FiscalError } from "./fiscal-error.js";
|
|
3
2
|
import { findFiscalArtifact, zElectronicFiscalDocumentType, } from "./generated/index.js";
|
|
4
3
|
import { throwGeneratedProblem } from "./generated-problem.js";
|
|
4
|
+
import { InvoiceError } from "./invoice-error.js";
|
|
5
5
|
import { digestSha256Hex } from "./sha256.js";
|
|
6
6
|
const FISCAL_NUMBER_PATTERN = /^E(?:31|32|33|34|41|43|44|45|46|47)[0-9]{10}$/;
|
|
7
7
|
const RFC3339_MILLISECOND_UTC_PATTERN = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
|
|
@@ -40,7 +40,7 @@ export async function downloadPrintedRepresentationResource(client, fiscalOperat
|
|
|
40
40
|
}
|
|
41
41
|
return decodePrintedRepresentation(response, fiscalOperationId);
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
async function decodePrintedRepresentation(response, fiscalOperationId) {
|
|
44
44
|
if (!(response.body instanceof Uint8Array)) {
|
|
45
45
|
throwArtifactFailure("Timbro returned a non-binary printed representation");
|
|
46
46
|
}
|
|
@@ -131,5 +131,5 @@ function requiredProfileVersionHeader(headers) {
|
|
|
131
131
|
throwArtifactFailure("Timbro returned a profile version that does not match its profile");
|
|
132
132
|
}
|
|
133
133
|
function throwArtifactFailure(message) {
|
|
134
|
-
throw new
|
|
134
|
+
throw new InvoiceError(message, { failure: "server_processing" });
|
|
135
135
|
}
|
|
@@ -8,115 +8,10 @@ export type { ProblemCatalogEntry } from "./generated/problem-catalog.ts";
|
|
|
8
8
|
export { PROBLEM_CATALOG } from "./generated/problem-catalog.ts";
|
|
9
9
|
export type { ProblemBody, PublicProblemCode } from "./generated/types.gen.ts";
|
|
10
10
|
export declare const problemBodySchema: z.ZodObject<{
|
|
11
|
-
code: z.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
certificate_custody_binding_conflict: "certificate_custody_binding_conflict";
|
|
16
|
-
certificate_custody_binding_not_found: "certificate_custody_binding_not_found";
|
|
17
|
-
certificate_custody_certificate_version_not_active: "certificate_custody_certificate_version_not_active";
|
|
18
|
-
certificate_p12_password_invalid: "certificate_p12_password_invalid";
|
|
19
|
-
commercial_response_decision_conflict: "commercial_response_decision_conflict";
|
|
20
|
-
commercial_response_motive_invalid: "commercial_response_motive_invalid";
|
|
21
|
-
correction_target_unsettled: "correction_target_unsettled";
|
|
22
|
-
credential_revoked: "credential_revoked";
|
|
23
|
-
custody_certificate_chain_untrusted: "custody_certificate_chain_untrusted";
|
|
24
|
-
custody_certificate_malformed: "custody_certificate_malformed";
|
|
25
|
-
custody_certificate_purpose_unsupported: "custody_certificate_purpose_unsupported";
|
|
26
|
-
custody_certificate_trust_profile_unsupported: "custody_certificate_trust_profile_unsupported";
|
|
27
|
-
custody_signature_algorithm_unsupported: "custody_signature_algorithm_unsupported";
|
|
28
|
-
custody_unavailable: "custody_unavailable";
|
|
29
|
-
delegated_authorization_verifier_forbidden: "delegated_authorization_verifier_forbidden";
|
|
30
|
-
document_type_not_enabled: "document_type_not_enabled";
|
|
31
|
-
email_already_registered: "email_already_registered";
|
|
32
|
-
environment_not_active: "environment_not_active";
|
|
33
|
-
fiscal_artifact_not_found: "fiscal_artifact_not_found";
|
|
34
|
-
fiscal_artifact_unavailable: "fiscal_artifact_unavailable";
|
|
35
|
-
fiscal_artifact_unverified: "fiscal_artifact_unverified";
|
|
36
|
-
fiscal_delivery_not_found: "fiscal_delivery_not_found";
|
|
37
|
-
fiscal_delivery_outcome_conflict: "fiscal_delivery_outcome_conflict";
|
|
38
|
-
fiscal_delivery_unavailable: "fiscal_delivery_unavailable";
|
|
39
|
-
fiscal_intent_rejected: "fiscal_intent_rejected";
|
|
40
|
-
fiscal_issuance_blocked: "fiscal_issuance_blocked";
|
|
41
|
-
fiscal_number_already_used: "fiscal_number_already_used";
|
|
42
|
-
fiscal_number_authorization_changed: "fiscal_number_authorization_changed";
|
|
43
|
-
fiscal_number_authorization_source_record_conflict: "fiscal_number_authorization_source_record_conflict";
|
|
44
|
-
fiscal_operation_not_found: "fiscal_operation_not_found";
|
|
45
|
-
fiscal_receipt_not_found: "fiscal_receipt_not_found";
|
|
46
|
-
fiscal_receipt_not_ready: "fiscal_receipt_not_ready";
|
|
47
|
-
fiscal_receipt_unavailable: "fiscal_receipt_unavailable";
|
|
48
|
-
hosted_tenant_conflict: "hosted_tenant_conflict";
|
|
49
|
-
idempotency_key_conflict: "idempotency_key_conflict";
|
|
50
|
-
insufficient_role: "insufficient_role";
|
|
51
|
-
internal_error: "internal_error";
|
|
52
|
-
invalid_certificate_custody_signer_identity: "invalid_certificate_custody_signer_identity";
|
|
53
|
-
invalid_collection_cursor: "invalid_collection_cursor";
|
|
54
|
-
invalid_collection_query: "invalid_collection_query";
|
|
55
|
-
invalid_credential: "invalid_credential";
|
|
56
|
-
invalid_fiscal_identity: "invalid_fiscal_identity";
|
|
57
|
-
invalid_idempotency_key: "invalid_idempotency_key";
|
|
58
|
-
invalid_login: "invalid_login";
|
|
59
|
-
invalid_replay_scope: "invalid_replay_scope";
|
|
60
|
-
invalid_request: "invalid_request";
|
|
61
|
-
invitation_expired: "invitation_expired";
|
|
62
|
-
invitation_invalid: "invitation_invalid";
|
|
63
|
-
issuer_not_authorized: "issuer_not_authorized";
|
|
64
|
-
legal_issuer_already_registered: "legal_issuer_already_registered";
|
|
65
|
-
legal_issuer_not_found: "legal_issuer_not_found";
|
|
66
|
-
legal_issuer_profile_incomplete: "legal_issuer_profile_incomplete";
|
|
67
|
-
malformed_json: "malformed_json";
|
|
68
|
-
method_not_allowed: "method_not_allowed";
|
|
69
|
-
missing_idempotency_key: "missing_idempotency_key";
|
|
70
|
-
onboarding_legal_issuer_identity_conflict: "onboarding_legal_issuer_identity_conflict";
|
|
71
|
-
organization_not_found: "organization_not_found";
|
|
72
|
-
organization_slug_taken: "organization_slug_taken";
|
|
73
|
-
printed_representation_profile_conflict: "printed_representation_profile_conflict";
|
|
74
|
-
received_document_not_found: "received_document_not_found";
|
|
75
|
-
request_body_timeout: "request_body_timeout";
|
|
76
|
-
request_too_large: "request_too_large";
|
|
77
|
-
route_not_found: "route_not_found";
|
|
78
|
-
service_role_not_permitted: "service_role_not_permitted";
|
|
79
|
-
signed_document_schema_invalid: "signed_document_schema_invalid";
|
|
80
|
-
source_action_conflict: "source_action_conflict";
|
|
81
|
-
source_command_conflict: "source_command_conflict";
|
|
82
|
-
source_connection_activation_conflict: "source_connection_activation_conflict";
|
|
83
|
-
source_connection_activation_verification_rejected: "source_connection_activation_verification_rejected";
|
|
84
|
-
source_connection_creation_conflict: "source_connection_creation_conflict";
|
|
85
|
-
source_connection_not_connected: "source_connection_not_connected";
|
|
86
|
-
source_connection_not_found: "source_connection_not_found";
|
|
87
|
-
source_content_conflict: "source_content_conflict";
|
|
88
|
-
source_history_requires_reconciliation: "source_history_requires_reconciliation";
|
|
89
|
-
source_operation_pending: "source_operation_pending";
|
|
90
|
-
source_outcome_unknown: "source_outcome_unknown";
|
|
91
|
-
source_predecessor_conflict: "source_predecessor_conflict";
|
|
92
|
-
source_provider_authorization_conflict: "source_provider_authorization_conflict";
|
|
93
|
-
source_provider_authorization_not_found: "source_provider_authorization_not_found";
|
|
94
|
-
source_provider_authorization_required: "source_provider_authorization_required";
|
|
95
|
-
source_provider_installation_callback_replayed: "source_provider_installation_callback_replayed";
|
|
96
|
-
source_provider_installation_disabled: "source_provider_installation_disabled";
|
|
97
|
-
source_provider_installation_removed: "source_provider_installation_removed";
|
|
98
|
-
source_provider_installation_request_expired: "source_provider_installation_request_expired";
|
|
99
|
-
source_provider_installation_request_invalid: "source_provider_installation_request_invalid";
|
|
100
|
-
source_provider_outcome_unknown: "source_provider_outcome_unknown";
|
|
101
|
-
source_provider_scope_insufficient: "source_provider_scope_insufficient";
|
|
102
|
-
source_provider_target_access_removed: "source_provider_target_access_removed";
|
|
103
|
-
source_provider_throttled: "source_provider_throttled";
|
|
104
|
-
source_provider_unavailable: "source_provider_unavailable";
|
|
105
|
-
source_record_already_fiscalized: "source_record_already_fiscalized";
|
|
106
|
-
source_version_stale: "source_version_stale";
|
|
107
|
-
unauthenticated: "unauthenticated";
|
|
108
|
-
unsigned_document_schema_invalid: "unsigned_document_schema_invalid";
|
|
109
|
-
unsupported_media_type: "unsupported_media_type";
|
|
110
|
-
unsupported_printed_representation_profile: "unsupported_printed_representation_profile";
|
|
111
|
-
webhook_destination_not_allowed: "webhook_destination_not_allowed";
|
|
112
|
-
webhook_endpoint_deleted: "webhook_endpoint_deleted";
|
|
113
|
-
webhook_endpoint_not_found: "webhook_endpoint_not_found";
|
|
114
|
-
webhook_endpoint_registration_conflict: "webhook_endpoint_registration_conflict";
|
|
115
|
-
webhook_endpoint_suspended: "webhook_endpoint_suspended";
|
|
116
|
-
webhook_event_not_found: "webhook_event_not_found";
|
|
117
|
-
}>;
|
|
118
|
-
fiscal_operation_id: z.ZodOptional<z.ZodString>;
|
|
119
|
-
issuance_blockers: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
11
|
+
code: z.ZodString;
|
|
12
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
13
|
+
invoiceId: z.ZodOptional<z.ZodString>;
|
|
14
|
+
issuanceBlockers: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
120
15
|
authorization_cancelled: "authorization_cancelled";
|
|
121
16
|
authorization_conflicting: "authorization_conflicting";
|
|
122
17
|
authorization_document_type_mismatch: "authorization_document_type_mismatch";
|
|
@@ -146,10 +41,12 @@ export declare const problemBodySchema: z.ZodObject<{
|
|
|
146
41
|
message: z.ZodString;
|
|
147
42
|
path: z.ZodString;
|
|
148
43
|
}, z.core.$strict>>>;
|
|
149
|
-
|
|
44
|
+
requestId: z.ZodString;
|
|
150
45
|
status: z.ZodInt;
|
|
151
46
|
title: z.ZodString;
|
|
152
|
-
type: z.
|
|
47
|
+
type: z.ZodEnum<{
|
|
48
|
+
"about:blank": "about:blank";
|
|
49
|
+
}>;
|
|
153
50
|
}, z.core.$strict>;
|
|
154
51
|
export declare const problemCodeSchema: z.ZodEnum<{
|
|
155
52
|
affected_fiscal_operation_unsupported: "affected_fiscal_operation_unsupported";
|
|
@@ -164,9 +61,12 @@ export declare const problemCodeSchema: z.ZodEnum<{
|
|
|
164
61
|
correction_target_unsettled: "correction_target_unsettled";
|
|
165
62
|
credential_revoked: "credential_revoked";
|
|
166
63
|
custody_certificate_chain_untrusted: "custody_certificate_chain_untrusted";
|
|
64
|
+
custody_certificate_expired: "custody_certificate_expired";
|
|
167
65
|
custody_certificate_malformed: "custody_certificate_malformed";
|
|
66
|
+
custody_certificate_not_yet_valid: "custody_certificate_not_yet_valid";
|
|
168
67
|
custody_certificate_purpose_unsupported: "custody_certificate_purpose_unsupported";
|
|
169
68
|
custody_certificate_trust_profile_unsupported: "custody_certificate_trust_profile_unsupported";
|
|
69
|
+
custody_p12_work_limit_exceeded: "custody_p12_work_limit_exceeded";
|
|
170
70
|
custody_signature_algorithm_unsupported: "custody_signature_algorithm_unsupported";
|
|
171
71
|
custody_unavailable: "custody_unavailable";
|
|
172
72
|
delegated_authorization_verifier_forbidden: "delegated_authorization_verifier_forbidden";
|
|
@@ -185,9 +85,6 @@ export declare const problemCodeSchema: z.ZodEnum<{
|
|
|
185
85
|
fiscal_number_authorization_changed: "fiscal_number_authorization_changed";
|
|
186
86
|
fiscal_number_authorization_source_record_conflict: "fiscal_number_authorization_source_record_conflict";
|
|
187
87
|
fiscal_operation_not_found: "fiscal_operation_not_found";
|
|
188
|
-
fiscal_receipt_not_found: "fiscal_receipt_not_found";
|
|
189
|
-
fiscal_receipt_not_ready: "fiscal_receipt_not_ready";
|
|
190
|
-
fiscal_receipt_unavailable: "fiscal_receipt_unavailable";
|
|
191
88
|
hosted_tenant_conflict: "hosted_tenant_conflict";
|
|
192
89
|
idempotency_key_conflict: "idempotency_key_conflict";
|
|
193
90
|
insufficient_role: "insufficient_role";
|
|
@@ -203,6 +100,12 @@ export declare const problemCodeSchema: z.ZodEnum<{
|
|
|
203
100
|
invalid_request: "invalid_request";
|
|
204
101
|
invitation_expired: "invitation_expired";
|
|
205
102
|
invitation_invalid: "invitation_invalid";
|
|
103
|
+
invoice_not_found: "invoice_not_found";
|
|
104
|
+
invoice_receipt_not_found: "invoice_receipt_not_found";
|
|
105
|
+
invoice_receipt_not_ready: "invoice_receipt_not_ready";
|
|
106
|
+
invoice_receipt_unavailable: "invoice_receipt_unavailable";
|
|
107
|
+
invoice_reference_conflict: "invoice_reference_conflict";
|
|
108
|
+
invoice_totals_mismatch: "invoice_totals_mismatch";
|
|
206
109
|
issuer_not_authorized: "issuer_not_authorized";
|
|
207
110
|
legal_issuer_already_registered: "legal_issuer_already_registered";
|
|
208
111
|
legal_issuer_not_found: "legal_issuer_not_found";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"problem-contract.d.ts","sourceRoot":"","sources":["../src/problem-contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAqB,CAAC;AAEpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,wBAAgB,aAAa,CAAC,SAAS,EAAE,OAAO,GAAG,SAAS,IAAI,iBAAiB,CAEhF;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,WAAW,GAAG,cAAc,CAiB1E;AAED,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
package/dist/public-case.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type SnakeToCamelCase<Value extends string> = Value extends `${infer Head}_${infer Tail}` ? `${Head}${SnakeToCamelCase<Capitalize<Tail>>}` : Value;
|
|
3
3
|
/**
|
|
4
4
|
* Projects generated JSON types into the readonly camelCase vocabulary exposed by the task SDK.
|
|
5
|
-
* Generated bindings remain available from `@timbro/invoices/generated` for wire-level consumers.
|
|
5
|
+
* Generated bindings remain available from `@timbro/invoices/admin/generated` for wire-level consumers.
|
|
6
6
|
*/
|
|
7
7
|
export type ReadonlyCamelCase<Value> = Value extends readonly unknown[] ? readonly ReadonlyCamelCase<Value[number]>[] : Value extends object ? {
|
|
8
8
|
readonly [Key in keyof Value as Key extends string ? SnakeToCamelCase<Key> : Key]: ReadonlyCamelCase<Value[Key]>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type ReceivedDocumentPage as GeneratedReceivedDocumentPage, type ReceivedDocumentResource as GeneratedReceivedDocumentResource, type ReceivedDocumentRecoveryFilter, type ReceivedDocumentResponseFilter, type ReceivedDocumentStateFilter } from "./generated/index.ts";
|
|
2
2
|
import type { Client } from "./generated-operation-client.ts";
|
|
3
|
-
import { type ReadonlyCamelCase } from "./public-case.ts";
|
|
4
3
|
export type CommercialResponse = {
|
|
5
4
|
readonly decision: "accepted";
|
|
6
5
|
} | {
|
|
@@ -16,20 +15,22 @@ export type ReceivedDocumentListCommand = {
|
|
|
16
15
|
readonly recovery?: ReceivedDocumentRecoveryFilter;
|
|
17
16
|
readonly signal?: AbortSignal;
|
|
18
17
|
};
|
|
19
|
-
export type ReceivedDocumentSummary =
|
|
20
|
-
export type ReceivedDocumentPage =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export type ReceivedDocumentResource = ReadonlyCamelCase<GeneratedReceivedDocumentResource>;
|
|
24
|
-
export type ReceivedDocumentSignedDocumentDownload = {
|
|
18
|
+
export type ReceivedDocumentSummary = GeneratedReceivedDocumentPage["data"][number];
|
|
19
|
+
export type ReceivedDocumentPage = GeneratedReceivedDocumentPage;
|
|
20
|
+
export type ReceivedDocumentResource = GeneratedReceivedDocumentResource;
|
|
21
|
+
export type ReceivedDocumentDownload = {
|
|
25
22
|
readonly bytes: Uint8Array;
|
|
26
23
|
readonly byteLength: number;
|
|
27
24
|
readonly contentSha256: string;
|
|
28
25
|
readonly mediaType: "application/xml";
|
|
29
|
-
readonly
|
|
26
|
+
readonly receivedDocumentId: string;
|
|
30
27
|
};
|
|
31
|
-
export declare function
|
|
32
|
-
export declare function
|
|
33
|
-
export declare function respondToReceivedDocument(client: Client,
|
|
34
|
-
export declare function
|
|
28
|
+
export declare function listReceivedDocuments(client: Client, command?: ReceivedDocumentListCommand): Promise<ReceivedDocumentPage>;
|
|
29
|
+
export declare function retrieveReceivedDocument(client: Client, receivedDocumentId: string, signal: AbortSignal | undefined): Promise<ReceivedDocumentResource | undefined>;
|
|
30
|
+
export declare function respondToReceivedDocument(client: Client, receivedDocumentId: string, responseBody: CommercialResponse, signal: AbortSignal | undefined): Promise<ReceivedDocumentResource>;
|
|
31
|
+
export declare function downloadReceivedDocument(client: Client, receivedDocumentId: string, signal: AbortSignal | undefined): Promise<ReceivedDocumentDownload>;
|
|
32
|
+
export declare function verifyReceivedDocumentXmlDownload(response: {
|
|
33
|
+
readonly body: unknown;
|
|
34
|
+
readonly headers: ReadonlyMap<string, string>;
|
|
35
|
+
}, receivedDocumentId: string): Promise<ReceivedDocumentDownload>;
|
|
35
36
|
//# sourceMappingURL=received-documents.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"received-documents.d.ts","sourceRoot":"","sources":["../src/received-documents.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,oBAAoB,IAAI,6BAA6B,EAC1D,KAAK,wBAAwB,IAAI,iCAAiC,EAGlE,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EACnC,KAAK,2BAA2B,EAEjC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"received-documents.d.ts","sourceRoot":"","sources":["../src/received-documents.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,oBAAoB,IAAI,6BAA6B,EAC1D,KAAK,wBAAwB,IAAI,iCAAiC,EAGlE,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EACnC,KAAK,2BAA2B,EAEjC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAI9D,MAAM,MAAM,kBAAkB,GAC1B;IAAE,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAA;CAAE,GACjC;IAAE,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/D,YAAY,EACV,8BAA8B,EAC9B,8BAA8B,EAC9B,2BAA2B,GAC5B,MAAM,sBAAsB,CAAC;AAE9B,MAAM,MAAM,2BAA2B,GAAG;IACxC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,2BAA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