@invoicetronic/ts-sdk 1.1.7 → 1.3.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/CHANGELOG.md +1 -1
- package/README.md +2 -2
- package/api.ts +1 -0
- package/common.ts +15 -2
- package/configuration.ts +1 -1
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- package/dist/common.d.ts +6 -0
- package/dist/common.js +17 -3
- package/dist/configuration.js +1 -1
- package/dist/esm/api.d.ts +1 -0
- package/dist/esm/api.js +1 -0
- package/dist/esm/common.d.ts +6 -0
- package/dist/esm/common.js +15 -2
- package/dist/esm/configuration.js +1 -1
- package/dist/esm/src/api/company-api.d.ts +35 -30
- package/dist/esm/src/api/company-api.js +34 -27
- package/dist/esm/src/api/export-api.d.ts +115 -0
- package/dist/esm/src/api/export-api.js +179 -0
- package/dist/esm/src/api/log-api.d.ts +10 -10
- package/dist/esm/src/api/log-api.js +8 -8
- package/dist/esm/src/api/receive-api.d.ts +15 -15
- package/dist/esm/src/api/receive-api.js +12 -12
- package/dist/esm/src/api/send-api.d.ts +55 -55
- package/dist/esm/src/api/send-api.js +44 -44
- package/dist/esm/src/api/status-api.d.ts +5 -5
- package/dist/esm/src/api/status-api.js +4 -4
- package/dist/esm/src/api/update-api.d.ts +10 -10
- package/dist/esm/src/api/update-api.js +8 -8
- package/dist/esm/src/api/webhook-api.d.ts +25 -25
- package/dist/esm/src/api/webhook-api.js +20 -20
- package/dist/esm/src/models/event.d.ts +2 -2
- package/dist/esm/src/models/receive.d.ts +3 -3
- package/dist/esm/src/models/send.d.ts +2 -2
- package/dist/esm/src/models/update.d.ts +2 -2
- package/dist/esm/src/models/web-hook-history.d.ts +1 -1
- package/dist/esm/src/models/web-hook.d.ts +2 -2
- package/dist/src/api/company-api.d.ts +35 -30
- package/dist/src/api/company-api.js +34 -27
- package/dist/src/api/export-api.d.ts +115 -0
- package/dist/src/api/export-api.js +186 -0
- package/dist/src/api/log-api.d.ts +10 -10
- package/dist/src/api/log-api.js +8 -8
- package/dist/src/api/receive-api.d.ts +15 -15
- package/dist/src/api/receive-api.js +12 -12
- package/dist/src/api/send-api.d.ts +55 -55
- package/dist/src/api/send-api.js +44 -44
- package/dist/src/api/status-api.d.ts +5 -5
- package/dist/src/api/status-api.js +4 -4
- package/dist/src/api/update-api.d.ts +10 -10
- package/dist/src/api/update-api.js +8 -8
- package/dist/src/api/webhook-api.d.ts +25 -25
- package/dist/src/api/webhook-api.js +20 -20
- package/dist/src/models/event.d.ts +2 -2
- package/dist/src/models/receive.d.ts +3 -3
- package/dist/src/models/send.d.ts +2 -2
- package/dist/src/models/update.d.ts +2 -2
- package/dist/src/models/web-hook-history.d.ts +1 -1
- package/dist/src/models/web-hook.d.ts +2 -2
- package/docs/CompanyApi.md +10 -6
- package/docs/Event.md +2 -2
- package/docs/ExportApi.md +79 -0
- package/docs/LogApi.md +2 -2
- package/docs/Receive.md +3 -3
- package/docs/ReceiveApi.md +4 -3
- package/docs/Send.md +2 -2
- package/docs/SendApi.md +11 -11
- package/docs/StatusApi.md +1 -1
- package/docs/Update.md +2 -2
- package/docs/UpdateApi.md +2 -2
- package/docs/WebHook.md +2 -2
- package/docs/WebHookHistory.md +1 -1
- package/docs/WebhookApi.md +6 -5
- package/package.json +1 -1
- package/src/api/company-api.ts +43 -34
- package/src/api/export-api.ts +211 -0
- package/src/api/log-api.ts +11 -11
- package/src/api/receive-api.ts +16 -16
- package/src/api/send-api.ts +56 -56
- package/src/api/status-api.ts +6 -6
- package/src/api/update-api.ts +11 -11
- package/src/api/webhook-api.ts +26 -26
- package/src/models/event.ts +2 -2
- package/src/models/receive.ts +3 -3
- package/src/models/send.ts +2 -2
- package/src/models/update.ts +2 -2
- package/src/models/web-hook-history.ts +1 -1
- package/src/models/web-hook.ts +2 -2
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Invoicetronic API
|
|
5
|
+
* The [Invoicetronic API][2] is a RESTful service that allows you to send and receive invoices through the Italian [Servizio di Interscambio (SDI)][1], or Interchange Service. The API is designed to be simple and easy to use, abstracting away SDI complexity while providing complete control over the invoice send/receive process. It provides advanced features as encryption at rest, multi-language pre-flight invoice validation, multiple upload formats, webhooks, event logging, client SDKs, and CLI tools. For more information, see [Invoicetronic website][2] [1]: https://www.fatturapa.gov.it/it/sistemainterscambio/cose-il-sdi/ [2]: https://invoicetronic.com/
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1
|
|
8
|
+
* Contact: info@invoicetronic.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import type { Configuration } from '../../configuration';
|
|
17
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
18
|
+
import globalAxios from 'axios';
|
|
19
|
+
// URLSearchParams not necessarily used
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
import { URL, URLSearchParams } from 'url';
|
|
22
|
+
// Some imports not used depending on template conditions
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../../common';
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../../base';
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
import type { ProblemDetails } from '../../src/models';
|
|
29
|
+
/**
|
|
30
|
+
* ExportApi - axios parameter creator
|
|
31
|
+
*/
|
|
32
|
+
export const ExportApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
33
|
+
return {
|
|
34
|
+
/**
|
|
35
|
+
* Export invoices as a ZIP archive of FatturaPA XML files, suitable for import into accounting software (TeamSystem, Zucchetti, etc.). **Sent invoices** are only included when they have reached a definitive state (e.g., `Consegnato` for private recipients, `AccettatoDalDestinatario`, `DecorrenzaTermini`, etc.). Invoices still being processed by SDI are excluded. **Received invoices** are always included. Unread invoices are automatically marked as read and counted as operations. ### Period filters You can filter by period using either: - `year` + `month` (e.g., `year=2026&month=3` for March 2026) - `year` + `quarter` (e.g., `year=2026&quarter=1` for Q1 Jan-Mar) - `document_date_from` / `document_date_to` for a custom date range These options are mutually exclusive. The `year` parameter alone is not valid and requires either `month` or `quarter`. ### Response Returns `200` with a ZIP archive, or `204 No Content` if no invoices match the given filters. Files in the archive are organized by company VAT number (`{vat}/send/`, `{vat}/receive/`). ### Rate limiting This endpoint has a dedicated rate limit: only one export request per user can be processed at a time. Concurrent requests will receive a `429 Too Many Requests` response.
|
|
36
|
+
* @summary Export invoices as a ZIP archive
|
|
37
|
+
* @param {ExportGetTypeEnum} [type]
|
|
38
|
+
* @param {number} [companyId] Company id
|
|
39
|
+
* @param {number} [year]
|
|
40
|
+
* @param {number} [month]
|
|
41
|
+
* @param {number} [quarter]
|
|
42
|
+
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
43
|
+
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
44
|
+
* @param {*} [options] Override http request option.
|
|
45
|
+
* @throws {RequiredError}
|
|
46
|
+
*/
|
|
47
|
+
exportGet: async (type?: ExportGetTypeEnum, companyId?: number, year?: number, month?: number, quarter?: number, documentDateFrom?: string, documentDateTo?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
48
|
+
const localVarPath = `/export`;
|
|
49
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
50
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
51
|
+
let baseOptions;
|
|
52
|
+
if (configuration) {
|
|
53
|
+
baseOptions = configuration.baseOptions;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
57
|
+
const localVarHeaderParameter = {} as any;
|
|
58
|
+
const localVarQueryParameter = {} as any;
|
|
59
|
+
|
|
60
|
+
// authentication Basic required
|
|
61
|
+
// http basic authentication required
|
|
62
|
+
setBasicAuthToObject(localVarRequestOptions, configuration)
|
|
63
|
+
|
|
64
|
+
if (type !== undefined) {
|
|
65
|
+
localVarQueryParameter['type'] = type;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (companyId !== undefined) {
|
|
69
|
+
localVarQueryParameter['company_id'] = companyId;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (year !== undefined) {
|
|
73
|
+
localVarQueryParameter['year'] = year;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (month !== undefined) {
|
|
77
|
+
localVarQueryParameter['month'] = month;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (quarter !== undefined) {
|
|
81
|
+
localVarQueryParameter['quarter'] = quarter;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (documentDateFrom !== undefined) {
|
|
85
|
+
localVarQueryParameter['document_date_from'] = (documentDateFrom as any instanceof Date) ?
|
|
86
|
+
(documentDateFrom as any).toISOString() :
|
|
87
|
+
documentDateFrom;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (documentDateTo !== undefined) {
|
|
91
|
+
localVarQueryParameter['document_date_to'] = (documentDateTo as any instanceof Date) ?
|
|
92
|
+
(documentDateTo as any).toISOString() :
|
|
93
|
+
documentDateTo;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
localVarHeaderParameter['Accept'] = 'application/problem+json';
|
|
97
|
+
|
|
98
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
99
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
100
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
101
|
+
|
|
102
|
+
return {
|
|
103
|
+
url: toPathString(localVarUrlObj),
|
|
104
|
+
options: localVarRequestOptions,
|
|
105
|
+
};
|
|
106
|
+
},
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* ExportApi - functional programming interface
|
|
112
|
+
*/
|
|
113
|
+
export const ExportApiFp = function(configuration?: Configuration) {
|
|
114
|
+
const localVarAxiosParamCreator = ExportApiAxiosParamCreator(configuration)
|
|
115
|
+
return {
|
|
116
|
+
/**
|
|
117
|
+
* Export invoices as a ZIP archive of FatturaPA XML files, suitable for import into accounting software (TeamSystem, Zucchetti, etc.). **Sent invoices** are only included when they have reached a definitive state (e.g., `Consegnato` for private recipients, `AccettatoDalDestinatario`, `DecorrenzaTermini`, etc.). Invoices still being processed by SDI are excluded. **Received invoices** are always included. Unread invoices are automatically marked as read and counted as operations. ### Period filters You can filter by period using either: - `year` + `month` (e.g., `year=2026&month=3` for March 2026) - `year` + `quarter` (e.g., `year=2026&quarter=1` for Q1 Jan-Mar) - `document_date_from` / `document_date_to` for a custom date range These options are mutually exclusive. The `year` parameter alone is not valid and requires either `month` or `quarter`. ### Response Returns `200` with a ZIP archive, or `204 No Content` if no invoices match the given filters. Files in the archive are organized by company VAT number (`{vat}/send/`, `{vat}/receive/`). ### Rate limiting This endpoint has a dedicated rate limit: only one export request per user can be processed at a time. Concurrent requests will receive a `429 Too Many Requests` response.
|
|
118
|
+
* @summary Export invoices as a ZIP archive
|
|
119
|
+
* @param {ExportGetTypeEnum} [type]
|
|
120
|
+
* @param {number} [companyId] Company id
|
|
121
|
+
* @param {number} [year]
|
|
122
|
+
* @param {number} [month]
|
|
123
|
+
* @param {number} [quarter]
|
|
124
|
+
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
125
|
+
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
126
|
+
* @param {*} [options] Override http request option.
|
|
127
|
+
* @throws {RequiredError}
|
|
128
|
+
*/
|
|
129
|
+
async exportGet(type?: ExportGetTypeEnum, companyId?: number, year?: number, month?: number, quarter?: number, documentDateFrom?: string, documentDateTo?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
130
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.exportGet(type, companyId, year, month, quarter, documentDateFrom, documentDateTo, options);
|
|
131
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
132
|
+
const localVarOperationServerBasePath = operationServerMap['ExportApi.exportGet']?.[localVarOperationServerIndex]?.url;
|
|
133
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
134
|
+
},
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* ExportApi - factory interface
|
|
140
|
+
*/
|
|
141
|
+
export const ExportApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
142
|
+
const localVarFp = ExportApiFp(configuration)
|
|
143
|
+
return {
|
|
144
|
+
/**
|
|
145
|
+
* Export invoices as a ZIP archive of FatturaPA XML files, suitable for import into accounting software (TeamSystem, Zucchetti, etc.). **Sent invoices** are only included when they have reached a definitive state (e.g., `Consegnato` for private recipients, `AccettatoDalDestinatario`, `DecorrenzaTermini`, etc.). Invoices still being processed by SDI are excluded. **Received invoices** are always included. Unread invoices are automatically marked as read and counted as operations. ### Period filters You can filter by period using either: - `year` + `month` (e.g., `year=2026&month=3` for March 2026) - `year` + `quarter` (e.g., `year=2026&quarter=1` for Q1 Jan-Mar) - `document_date_from` / `document_date_to` for a custom date range These options are mutually exclusive. The `year` parameter alone is not valid and requires either `month` or `quarter`. ### Response Returns `200` with a ZIP archive, or `204 No Content` if no invoices match the given filters. Files in the archive are organized by company VAT number (`{vat}/send/`, `{vat}/receive/`). ### Rate limiting This endpoint has a dedicated rate limit: only one export request per user can be processed at a time. Concurrent requests will receive a `429 Too Many Requests` response.
|
|
146
|
+
* @summary Export invoices as a ZIP archive
|
|
147
|
+
* @param {ExportGetTypeEnum} [type]
|
|
148
|
+
* @param {number} [companyId] Company id
|
|
149
|
+
* @param {number} [year]
|
|
150
|
+
* @param {number} [month]
|
|
151
|
+
* @param {number} [quarter]
|
|
152
|
+
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
153
|
+
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
154
|
+
* @param {*} [options] Override http request option.
|
|
155
|
+
* @throws {RequiredError}
|
|
156
|
+
*/
|
|
157
|
+
exportGet(type?: ExportGetTypeEnum, companyId?: number, year?: number, month?: number, quarter?: number, documentDateFrom?: string, documentDateTo?: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
158
|
+
return localVarFp.exportGet(type, companyId, year, month, quarter, documentDateFrom, documentDateTo, options).then((request) => request(axios, basePath));
|
|
159
|
+
},
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* ExportApi - interface
|
|
165
|
+
*/
|
|
166
|
+
export interface ExportApiInterface {
|
|
167
|
+
/**
|
|
168
|
+
* Export invoices as a ZIP archive of FatturaPA XML files, suitable for import into accounting software (TeamSystem, Zucchetti, etc.). **Sent invoices** are only included when they have reached a definitive state (e.g., `Consegnato` for private recipients, `AccettatoDalDestinatario`, `DecorrenzaTermini`, etc.). Invoices still being processed by SDI are excluded. **Received invoices** are always included. Unread invoices are automatically marked as read and counted as operations. ### Period filters You can filter by period using either: - `year` + `month` (e.g., `year=2026&month=3` for March 2026) - `year` + `quarter` (e.g., `year=2026&quarter=1` for Q1 Jan-Mar) - `document_date_from` / `document_date_to` for a custom date range These options are mutually exclusive. The `year` parameter alone is not valid and requires either `month` or `quarter`. ### Response Returns `200` with a ZIP archive, or `204 No Content` if no invoices match the given filters. Files in the archive are organized by company VAT number (`{vat}/send/`, `{vat}/receive/`). ### Rate limiting This endpoint has a dedicated rate limit: only one export request per user can be processed at a time. Concurrent requests will receive a `429 Too Many Requests` response.
|
|
169
|
+
* @summary Export invoices as a ZIP archive
|
|
170
|
+
* @param {ExportGetTypeEnum} [type]
|
|
171
|
+
* @param {number} [companyId] Company id
|
|
172
|
+
* @param {number} [year]
|
|
173
|
+
* @param {number} [month]
|
|
174
|
+
* @param {number} [quarter]
|
|
175
|
+
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
176
|
+
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
177
|
+
* @param {*} [options] Override http request option.
|
|
178
|
+
* @throws {RequiredError}
|
|
179
|
+
*/
|
|
180
|
+
exportGet(type?: ExportGetTypeEnum, companyId?: number, year?: number, month?: number, quarter?: number, documentDateFrom?: string, documentDateTo?: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
181
|
+
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* ExportApi - object-oriented interface
|
|
186
|
+
*/
|
|
187
|
+
export class ExportApi extends BaseAPI implements ExportApiInterface {
|
|
188
|
+
/**
|
|
189
|
+
* Export invoices as a ZIP archive of FatturaPA XML files, suitable for import into accounting software (TeamSystem, Zucchetti, etc.). **Sent invoices** are only included when they have reached a definitive state (e.g., `Consegnato` for private recipients, `AccettatoDalDestinatario`, `DecorrenzaTermini`, etc.). Invoices still being processed by SDI are excluded. **Received invoices** are always included. Unread invoices are automatically marked as read and counted as operations. ### Period filters You can filter by period using either: - `year` + `month` (e.g., `year=2026&month=3` for March 2026) - `year` + `quarter` (e.g., `year=2026&quarter=1` for Q1 Jan-Mar) - `document_date_from` / `document_date_to` for a custom date range These options are mutually exclusive. The `year` parameter alone is not valid and requires either `month` or `quarter`. ### Response Returns `200` with a ZIP archive, or `204 No Content` if no invoices match the given filters. Files in the archive are organized by company VAT number (`{vat}/send/`, `{vat}/receive/`). ### Rate limiting This endpoint has a dedicated rate limit: only one export request per user can be processed at a time. Concurrent requests will receive a `429 Too Many Requests` response.
|
|
190
|
+
* @summary Export invoices as a ZIP archive
|
|
191
|
+
* @param {ExportGetTypeEnum} [type]
|
|
192
|
+
* @param {number} [companyId] Company id
|
|
193
|
+
* @param {number} [year]
|
|
194
|
+
* @param {number} [month]
|
|
195
|
+
* @param {number} [quarter]
|
|
196
|
+
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
197
|
+
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
198
|
+
* @param {*} [options] Override http request option.
|
|
199
|
+
* @throws {RequiredError}
|
|
200
|
+
*/
|
|
201
|
+
public exportGet(type?: ExportGetTypeEnum, companyId?: number, year?: number, month?: number, quarter?: number, documentDateFrom?: string, documentDateTo?: string, options?: RawAxiosRequestConfig) {
|
|
202
|
+
return ExportApiFp(this.configuration).exportGet(type, companyId, year, month, quarter, documentDateFrom, documentDateTo, options).then((request) => request(this.axios, this.basePath));
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export const ExportGetTypeEnum = {
|
|
207
|
+
Send: 'Send',
|
|
208
|
+
Receive: 'Receive',
|
|
209
|
+
Both: 'Both'
|
|
210
|
+
} as const;
|
|
211
|
+
export type ExportGetTypeEnum = typeof ExportGetTypeEnum[keyof typeof ExportGetTypeEnum];
|
package/src/api/log-api.ts
CHANGED
|
@@ -21,7 +21,7 @@ import globalAxios from 'axios';
|
|
|
21
21
|
import { URL, URLSearchParams } from 'url';
|
|
22
22
|
// Some imports not used depending on template conditions
|
|
23
23
|
// @ts-ignore
|
|
24
|
-
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../../common';
|
|
24
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../../common';
|
|
25
25
|
// @ts-ignore
|
|
26
26
|
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../../base';
|
|
27
27
|
// @ts-ignore
|
|
@@ -34,7 +34,7 @@ import type { ProblemHttpResult } from '../../src/models';
|
|
|
34
34
|
export const LogApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
35
35
|
return {
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* Retrieve a paginated list of log events. Results can be filtered by various criteria such as endpoint, method, status code, and date ranges. **Logs** record every API request. They are preserved for 15 days. You can also view logs in the Events section of the [Dashboard](https://dashboard.invoicetronic.com).
|
|
38
38
|
* @summary List events
|
|
39
39
|
* @param {number} [companyId] Company id
|
|
40
40
|
* @param {string} [endpoint]
|
|
@@ -146,7 +146,7 @@ export const LogApiAxiosParamCreator = function (configuration?: Configuration)
|
|
|
146
146
|
};
|
|
147
147
|
},
|
|
148
148
|
/**
|
|
149
|
-
*
|
|
149
|
+
* Retrieve a log event by its internal id. **Logs** record every API request. They are preserved for 15 days. You can also view logs in the Events section of the [Dashboard](https://dashboard.invoicetronic.com).
|
|
150
150
|
* @summary Get an event by id
|
|
151
151
|
* @param {number} id Item id
|
|
152
152
|
* @param {*} [options] Override http request option.
|
|
@@ -193,7 +193,7 @@ export const LogApiFp = function(configuration?: Configuration) {
|
|
|
193
193
|
const localVarAxiosParamCreator = LogApiAxiosParamCreator(configuration)
|
|
194
194
|
return {
|
|
195
195
|
/**
|
|
196
|
-
*
|
|
196
|
+
* Retrieve a paginated list of log events. Results can be filtered by various criteria such as endpoint, method, status code, and date ranges. **Logs** record every API request. They are preserved for 15 days. You can also view logs in the Events section of the [Dashboard](https://dashboard.invoicetronic.com).
|
|
197
197
|
* @summary List events
|
|
198
198
|
* @param {number} [companyId] Company id
|
|
199
199
|
* @param {string} [endpoint]
|
|
@@ -219,7 +219,7 @@ export const LogApiFp = function(configuration?: Configuration) {
|
|
|
219
219
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
220
220
|
},
|
|
221
221
|
/**
|
|
222
|
-
*
|
|
222
|
+
* Retrieve a log event by its internal id. **Logs** record every API request. They are preserved for 15 days. You can also view logs in the Events section of the [Dashboard](https://dashboard.invoicetronic.com).
|
|
223
223
|
* @summary Get an event by id
|
|
224
224
|
* @param {number} id Item id
|
|
225
225
|
* @param {*} [options] Override http request option.
|
|
@@ -241,7 +241,7 @@ export const LogApiFactory = function (configuration?: Configuration, basePath?:
|
|
|
241
241
|
const localVarFp = LogApiFp(configuration)
|
|
242
242
|
return {
|
|
243
243
|
/**
|
|
244
|
-
*
|
|
244
|
+
* Retrieve a paginated list of log events. Results can be filtered by various criteria such as endpoint, method, status code, and date ranges. **Logs** record every API request. They are preserved for 15 days. You can also view logs in the Events section of the [Dashboard](https://dashboard.invoicetronic.com).
|
|
245
245
|
* @summary List events
|
|
246
246
|
* @param {number} [companyId] Company id
|
|
247
247
|
* @param {string} [endpoint]
|
|
@@ -264,7 +264,7 @@ export const LogApiFactory = function (configuration?: Configuration, basePath?:
|
|
|
264
264
|
return localVarFp.logGet(companyId, endpoint, method, apiVerion, statusCode, dateCreatedFrom, dateCreatedTo, page, pageSize, sort, query, success, dateTimeFrom, dateTimeTo, options).then((request) => request(axios, basePath));
|
|
265
265
|
},
|
|
266
266
|
/**
|
|
267
|
-
*
|
|
267
|
+
* Retrieve a log event by its internal id. **Logs** record every API request. They are preserved for 15 days. You can also view logs in the Events section of the [Dashboard](https://dashboard.invoicetronic.com).
|
|
268
268
|
* @summary Get an event by id
|
|
269
269
|
* @param {number} id Item id
|
|
270
270
|
* @param {*} [options] Override http request option.
|
|
@@ -281,7 +281,7 @@ export const LogApiFactory = function (configuration?: Configuration, basePath?:
|
|
|
281
281
|
*/
|
|
282
282
|
export interface LogApiInterface {
|
|
283
283
|
/**
|
|
284
|
-
*
|
|
284
|
+
* Retrieve a paginated list of log events. Results can be filtered by various criteria such as endpoint, method, status code, and date ranges. **Logs** record every API request. They are preserved for 15 days. You can also view logs in the Events section of the [Dashboard](https://dashboard.invoicetronic.com).
|
|
285
285
|
* @summary List events
|
|
286
286
|
* @param {number} [companyId] Company id
|
|
287
287
|
* @param {string} [endpoint]
|
|
@@ -303,7 +303,7 @@ export interface LogApiInterface {
|
|
|
303
303
|
logGet(companyId?: number, endpoint?: string, method?: string, apiVerion?: number, statusCode?: number, dateCreatedFrom?: string, dateCreatedTo?: string, page?: number, pageSize?: number, sort?: string, query?: string, success?: boolean, dateTimeFrom?: string, dateTimeTo?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Event>>;
|
|
304
304
|
|
|
305
305
|
/**
|
|
306
|
-
*
|
|
306
|
+
* Retrieve a log event by its internal id. **Logs** record every API request. They are preserved for 15 days. You can also view logs in the Events section of the [Dashboard](https://dashboard.invoicetronic.com).
|
|
307
307
|
* @summary Get an event by id
|
|
308
308
|
* @param {number} id Item id
|
|
309
309
|
* @param {*} [options] Override http request option.
|
|
@@ -318,7 +318,7 @@ export interface LogApiInterface {
|
|
|
318
318
|
*/
|
|
319
319
|
export class LogApi extends BaseAPI implements LogApiInterface {
|
|
320
320
|
/**
|
|
321
|
-
*
|
|
321
|
+
* Retrieve a paginated list of log events. Results can be filtered by various criteria such as endpoint, method, status code, and date ranges. **Logs** record every API request. They are preserved for 15 days. You can also view logs in the Events section of the [Dashboard](https://dashboard.invoicetronic.com).
|
|
322
322
|
* @summary List events
|
|
323
323
|
* @param {number} [companyId] Company id
|
|
324
324
|
* @param {string} [endpoint]
|
|
@@ -342,7 +342,7 @@ export class LogApi extends BaseAPI implements LogApiInterface {
|
|
|
342
342
|
}
|
|
343
343
|
|
|
344
344
|
/**
|
|
345
|
-
*
|
|
345
|
+
* Retrieve a log event by its internal id. **Logs** record every API request. They are preserved for 15 days. You can also view logs in the Events section of the [Dashboard](https://dashboard.invoicetronic.com).
|
|
346
346
|
* @summary Get an event by id
|
|
347
347
|
* @param {number} id Item id
|
|
348
348
|
* @param {*} [options] Override http request option.
|
package/src/api/receive-api.ts
CHANGED
|
@@ -21,7 +21,7 @@ import globalAxios from 'axios';
|
|
|
21
21
|
import { URL, URLSearchParams } from 'url';
|
|
22
22
|
// Some imports not used depending on template conditions
|
|
23
23
|
// @ts-ignore
|
|
24
|
-
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../../common';
|
|
24
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../../common';
|
|
25
25
|
// @ts-ignore
|
|
26
26
|
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../../base';
|
|
27
27
|
// @ts-ignore
|
|
@@ -34,7 +34,7 @@ import type { Receive } from '../../src/models';
|
|
|
34
34
|
export const ReceiveApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
35
35
|
return {
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* Retrieve a paginated list of receive invoices. Results can be filtered by various criteria such as company, date ranges, sender, and document number. Returns invoice metadata; set `include_payload` to true to include the full invoice content. Invoices are marked as read (`is_read` = true) only when `include_payload` is true. **Receive** invoices are inbound purchase invoices received from suppliers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 24 hours in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
38
38
|
* @summary List incoming invoices
|
|
39
39
|
* @param {number} [companyId] Company id
|
|
40
40
|
* @param {string} [identifier] SDI identifier.
|
|
@@ -165,7 +165,7 @@ export const ReceiveApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
165
165
|
};
|
|
166
166
|
},
|
|
167
167
|
/**
|
|
168
|
-
* Receive invoices are
|
|
168
|
+
* Permanently delete a receive invoice by its internal id. This action cannot be undone. **Receive** invoices are inbound purchase invoices received from suppliers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 24 hours in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
169
169
|
* @summary Delete an incoming invoice by id
|
|
170
170
|
* @param {number} id Item id
|
|
171
171
|
* @param {*} [options] Override http request option.
|
|
@@ -203,7 +203,7 @@ export const ReceiveApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
203
203
|
};
|
|
204
204
|
},
|
|
205
205
|
/**
|
|
206
|
-
*
|
|
206
|
+
* Retrieve an incoming invoice by its internal id. The `id` is unique and assigned by the system when the invoice is received. Returns invoice metadata; set `include_payload` to true to include the full invoice content. The invoice is marked as read (`is_read` = true) only when `include_payload` is true. **Receive** invoices are inbound purchase invoices received from suppliers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 24 hours in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
207
207
|
* @summary Get an incoming invoice by id
|
|
208
208
|
* @param {number} id Item id
|
|
209
209
|
* @param {boolean} [includePayload] Include payload in the response. Defaults to false.
|
|
@@ -255,7 +255,7 @@ export const ReceiveApiFp = function(configuration?: Configuration) {
|
|
|
255
255
|
const localVarAxiosParamCreator = ReceiveApiAxiosParamCreator(configuration)
|
|
256
256
|
return {
|
|
257
257
|
/**
|
|
258
|
-
*
|
|
258
|
+
* Retrieve a paginated list of receive invoices. Results can be filtered by various criteria such as company, date ranges, sender, and document number. Returns invoice metadata; set `include_payload` to true to include the full invoice content. Invoices are marked as read (`is_read` = true) only when `include_payload` is true. **Receive** invoices are inbound purchase invoices received from suppliers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 24 hours in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
259
259
|
* @summary List incoming invoices
|
|
260
260
|
* @param {number} [companyId] Company id
|
|
261
261
|
* @param {string} [identifier] SDI identifier.
|
|
@@ -284,7 +284,7 @@ export const ReceiveApiFp = function(configuration?: Configuration) {
|
|
|
284
284
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
285
285
|
},
|
|
286
286
|
/**
|
|
287
|
-
* Receive invoices are
|
|
287
|
+
* Permanently delete a receive invoice by its internal id. This action cannot be undone. **Receive** invoices are inbound purchase invoices received from suppliers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 24 hours in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
288
288
|
* @summary Delete an incoming invoice by id
|
|
289
289
|
* @param {number} id Item id
|
|
290
290
|
* @param {*} [options] Override http request option.
|
|
@@ -297,7 +297,7 @@ export const ReceiveApiFp = function(configuration?: Configuration) {
|
|
|
297
297
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
298
298
|
},
|
|
299
299
|
/**
|
|
300
|
-
*
|
|
300
|
+
* Retrieve an incoming invoice by its internal id. The `id` is unique and assigned by the system when the invoice is received. Returns invoice metadata; set `include_payload` to true to include the full invoice content. The invoice is marked as read (`is_read` = true) only when `include_payload` is true. **Receive** invoices are inbound purchase invoices received from suppliers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 24 hours in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
301
301
|
* @summary Get an incoming invoice by id
|
|
302
302
|
* @param {number} id Item id
|
|
303
303
|
* @param {boolean} [includePayload] Include payload in the response. Defaults to false.
|
|
@@ -320,7 +320,7 @@ export const ReceiveApiFactory = function (configuration?: Configuration, basePa
|
|
|
320
320
|
const localVarFp = ReceiveApiFp(configuration)
|
|
321
321
|
return {
|
|
322
322
|
/**
|
|
323
|
-
*
|
|
323
|
+
* Retrieve a paginated list of receive invoices. Results can be filtered by various criteria such as company, date ranges, sender, and document number. Returns invoice metadata; set `include_payload` to true to include the full invoice content. Invoices are marked as read (`is_read` = true) only when `include_payload` is true. **Receive** invoices are inbound purchase invoices received from suppliers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 24 hours in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
324
324
|
* @summary List incoming invoices
|
|
325
325
|
* @param {number} [companyId] Company id
|
|
326
326
|
* @param {string} [identifier] SDI identifier.
|
|
@@ -346,7 +346,7 @@ export const ReceiveApiFactory = function (configuration?: Configuration, basePa
|
|
|
346
346
|
return localVarFp.receiveGet(companyId, identifier, unread, committente, prestatore, fileName, lastUpdateFrom, lastUpdateTo, dateSentFrom, dateSentTo, documentDateFrom, documentDateTo, documentNumber, includePayload, page, pageSize, sort, options).then((request) => request(axios, basePath));
|
|
347
347
|
},
|
|
348
348
|
/**
|
|
349
|
-
* Receive invoices are
|
|
349
|
+
* Permanently delete a receive invoice by its internal id. This action cannot be undone. **Receive** invoices are inbound purchase invoices received from suppliers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 24 hours in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
350
350
|
* @summary Delete an incoming invoice by id
|
|
351
351
|
* @param {number} id Item id
|
|
352
352
|
* @param {*} [options] Override http request option.
|
|
@@ -356,7 +356,7 @@ export const ReceiveApiFactory = function (configuration?: Configuration, basePa
|
|
|
356
356
|
return localVarFp.receiveIdDelete(id, options).then((request) => request(axios, basePath));
|
|
357
357
|
},
|
|
358
358
|
/**
|
|
359
|
-
*
|
|
359
|
+
* Retrieve an incoming invoice by its internal id. The `id` is unique and assigned by the system when the invoice is received. Returns invoice metadata; set `include_payload` to true to include the full invoice content. The invoice is marked as read (`is_read` = true) only when `include_payload` is true. **Receive** invoices are inbound purchase invoices received from suppliers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 24 hours in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
360
360
|
* @summary Get an incoming invoice by id
|
|
361
361
|
* @param {number} id Item id
|
|
362
362
|
* @param {boolean} [includePayload] Include payload in the response. Defaults to false.
|
|
@@ -374,7 +374,7 @@ export const ReceiveApiFactory = function (configuration?: Configuration, basePa
|
|
|
374
374
|
*/
|
|
375
375
|
export interface ReceiveApiInterface {
|
|
376
376
|
/**
|
|
377
|
-
*
|
|
377
|
+
* Retrieve a paginated list of receive invoices. Results can be filtered by various criteria such as company, date ranges, sender, and document number. Returns invoice metadata; set `include_payload` to true to include the full invoice content. Invoices are marked as read (`is_read` = true) only when `include_payload` is true. **Receive** invoices are inbound purchase invoices received from suppliers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 24 hours in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
378
378
|
* @summary List incoming invoices
|
|
379
379
|
* @param {number} [companyId] Company id
|
|
380
380
|
* @param {string} [identifier] SDI identifier.
|
|
@@ -399,7 +399,7 @@ export interface ReceiveApiInterface {
|
|
|
399
399
|
receiveGet(companyId?: number, identifier?: string, unread?: boolean, committente?: string, prestatore?: string, fileName?: string, lastUpdateFrom?: string, lastUpdateTo?: string, dateSentFrom?: string, dateSentTo?: string, documentDateFrom?: string, documentDateTo?: string, documentNumber?: string, includePayload?: boolean, page?: number, pageSize?: number, sort?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Receive>>;
|
|
400
400
|
|
|
401
401
|
/**
|
|
402
|
-
* Receive invoices are
|
|
402
|
+
* Permanently delete a receive invoice by its internal id. This action cannot be undone. **Receive** invoices are inbound purchase invoices received from suppliers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 24 hours in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
403
403
|
* @summary Delete an incoming invoice by id
|
|
404
404
|
* @param {number} id Item id
|
|
405
405
|
* @param {*} [options] Override http request option.
|
|
@@ -408,7 +408,7 @@ export interface ReceiveApiInterface {
|
|
|
408
408
|
receiveIdDelete(id: number, options?: RawAxiosRequestConfig): AxiosPromise<Receive>;
|
|
409
409
|
|
|
410
410
|
/**
|
|
411
|
-
*
|
|
411
|
+
* Retrieve an incoming invoice by its internal id. The `id` is unique and assigned by the system when the invoice is received. Returns invoice metadata; set `include_payload` to true to include the full invoice content. The invoice is marked as read (`is_read` = true) only when `include_payload` is true. **Receive** invoices are inbound purchase invoices received from suppliers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 24 hours in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
412
412
|
* @summary Get an incoming invoice by id
|
|
413
413
|
* @param {number} id Item id
|
|
414
414
|
* @param {boolean} [includePayload] Include payload in the response. Defaults to false.
|
|
@@ -424,7 +424,7 @@ export interface ReceiveApiInterface {
|
|
|
424
424
|
*/
|
|
425
425
|
export class ReceiveApi extends BaseAPI implements ReceiveApiInterface {
|
|
426
426
|
/**
|
|
427
|
-
*
|
|
427
|
+
* Retrieve a paginated list of receive invoices. Results can be filtered by various criteria such as company, date ranges, sender, and document number. Returns invoice metadata; set `include_payload` to true to include the full invoice content. Invoices are marked as read (`is_read` = true) only when `include_payload` is true. **Receive** invoices are inbound purchase invoices received from suppliers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 24 hours in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
428
428
|
* @summary List incoming invoices
|
|
429
429
|
* @param {number} [companyId] Company id
|
|
430
430
|
* @param {string} [identifier] SDI identifier.
|
|
@@ -451,7 +451,7 @@ export class ReceiveApi extends BaseAPI implements ReceiveApiInterface {
|
|
|
451
451
|
}
|
|
452
452
|
|
|
453
453
|
/**
|
|
454
|
-
* Receive invoices are
|
|
454
|
+
* Permanently delete a receive invoice by its internal id. This action cannot be undone. **Receive** invoices are inbound purchase invoices received from suppliers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 24 hours in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
455
455
|
* @summary Delete an incoming invoice by id
|
|
456
456
|
* @param {number} id Item id
|
|
457
457
|
* @param {*} [options] Override http request option.
|
|
@@ -462,7 +462,7 @@ export class ReceiveApi extends BaseAPI implements ReceiveApiInterface {
|
|
|
462
462
|
}
|
|
463
463
|
|
|
464
464
|
/**
|
|
465
|
-
*
|
|
465
|
+
* Retrieve an incoming invoice by its internal id. The `id` is unique and assigned by the system when the invoice is received. Returns invoice metadata; set `include_payload` to true to include the full invoice content. The invoice is marked as read (`is_read` = true) only when `include_payload` is true. **Receive** invoices are inbound purchase invoices received from suppliers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 24 hours in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
466
466
|
* @summary Get an incoming invoice by id
|
|
467
467
|
* @param {number} id Item id
|
|
468
468
|
* @param {boolean} [includePayload] Include payload in the response. Defaults to false.
|