@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.
Files changed (88) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/README.md +2 -2
  3. package/api.ts +1 -0
  4. package/common.ts +15 -2
  5. package/configuration.ts +1 -1
  6. package/dist/api.d.ts +1 -0
  7. package/dist/api.js +1 -0
  8. package/dist/common.d.ts +6 -0
  9. package/dist/common.js +17 -3
  10. package/dist/configuration.js +1 -1
  11. package/dist/esm/api.d.ts +1 -0
  12. package/dist/esm/api.js +1 -0
  13. package/dist/esm/common.d.ts +6 -0
  14. package/dist/esm/common.js +15 -2
  15. package/dist/esm/configuration.js +1 -1
  16. package/dist/esm/src/api/company-api.d.ts +35 -30
  17. package/dist/esm/src/api/company-api.js +34 -27
  18. package/dist/esm/src/api/export-api.d.ts +115 -0
  19. package/dist/esm/src/api/export-api.js +179 -0
  20. package/dist/esm/src/api/log-api.d.ts +10 -10
  21. package/dist/esm/src/api/log-api.js +8 -8
  22. package/dist/esm/src/api/receive-api.d.ts +15 -15
  23. package/dist/esm/src/api/receive-api.js +12 -12
  24. package/dist/esm/src/api/send-api.d.ts +55 -55
  25. package/dist/esm/src/api/send-api.js +44 -44
  26. package/dist/esm/src/api/status-api.d.ts +5 -5
  27. package/dist/esm/src/api/status-api.js +4 -4
  28. package/dist/esm/src/api/update-api.d.ts +10 -10
  29. package/dist/esm/src/api/update-api.js +8 -8
  30. package/dist/esm/src/api/webhook-api.d.ts +25 -25
  31. package/dist/esm/src/api/webhook-api.js +20 -20
  32. package/dist/esm/src/models/event.d.ts +2 -2
  33. package/dist/esm/src/models/receive.d.ts +3 -3
  34. package/dist/esm/src/models/send.d.ts +2 -2
  35. package/dist/esm/src/models/update.d.ts +2 -2
  36. package/dist/esm/src/models/web-hook-history.d.ts +1 -1
  37. package/dist/esm/src/models/web-hook.d.ts +2 -2
  38. package/dist/src/api/company-api.d.ts +35 -30
  39. package/dist/src/api/company-api.js +34 -27
  40. package/dist/src/api/export-api.d.ts +115 -0
  41. package/dist/src/api/export-api.js +186 -0
  42. package/dist/src/api/log-api.d.ts +10 -10
  43. package/dist/src/api/log-api.js +8 -8
  44. package/dist/src/api/receive-api.d.ts +15 -15
  45. package/dist/src/api/receive-api.js +12 -12
  46. package/dist/src/api/send-api.d.ts +55 -55
  47. package/dist/src/api/send-api.js +44 -44
  48. package/dist/src/api/status-api.d.ts +5 -5
  49. package/dist/src/api/status-api.js +4 -4
  50. package/dist/src/api/update-api.d.ts +10 -10
  51. package/dist/src/api/update-api.js +8 -8
  52. package/dist/src/api/webhook-api.d.ts +25 -25
  53. package/dist/src/api/webhook-api.js +20 -20
  54. package/dist/src/models/event.d.ts +2 -2
  55. package/dist/src/models/receive.d.ts +3 -3
  56. package/dist/src/models/send.d.ts +2 -2
  57. package/dist/src/models/update.d.ts +2 -2
  58. package/dist/src/models/web-hook-history.d.ts +1 -1
  59. package/dist/src/models/web-hook.d.ts +2 -2
  60. package/docs/CompanyApi.md +10 -6
  61. package/docs/Event.md +2 -2
  62. package/docs/ExportApi.md +79 -0
  63. package/docs/LogApi.md +2 -2
  64. package/docs/Receive.md +3 -3
  65. package/docs/ReceiveApi.md +4 -3
  66. package/docs/Send.md +2 -2
  67. package/docs/SendApi.md +11 -11
  68. package/docs/StatusApi.md +1 -1
  69. package/docs/Update.md +2 -2
  70. package/docs/UpdateApi.md +2 -2
  71. package/docs/WebHook.md +2 -2
  72. package/docs/WebHookHistory.md +1 -1
  73. package/docs/WebhookApi.md +6 -5
  74. package/package.json +1 -1
  75. package/src/api/company-api.ts +43 -34
  76. package/src/api/export-api.ts +211 -0
  77. package/src/api/log-api.ts +11 -11
  78. package/src/api/receive-api.ts +16 -16
  79. package/src/api/send-api.ts +56 -56
  80. package/src/api/status-api.ts +6 -6
  81. package/src/api/update-api.ts +11 -11
  82. package/src/api/webhook-api.ts +26 -26
  83. package/src/models/event.ts +2 -2
  84. package/src/models/receive.ts +3 -3
  85. package/src/models/send.ts +2 -2
  86. package/src/models/update.ts +2 -2
  87. package/src/models/web-hook-history.ts +1 -1
  88. package/src/models/web-hook.ts +2 -2
@@ -38,7 +38,7 @@ const base_1 = require("../../base");
38
38
  const CompanyApiAxiosParamCreator = function (configuration) {
39
39
  return {
40
40
  /**
41
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
41
+ * Retrieve a paginated list of companies. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
42
42
  * @summary List companies
43
43
  * @param {number} [page] Page number.
44
44
  * @param {number} [pageSize] Items per page. Cannot be greater than 200.
@@ -79,13 +79,14 @@ const CompanyApiAxiosParamCreator = function (configuration) {
79
79
  };
80
80
  }),
81
81
  /**
82
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
82
+ * Delete a company by its internal id. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received. **Warning:** Deleting a company will permanently remove all associated data, including sent invoices, received invoices, invoice updates from SDI, logs, and webhooks. If the company has any linked invoices, you must explicitly confirm deletion by adding `?force=true` to the request. Without this parameter, the API will return `409 Conflict` with details about the linked data.
83
83
  * @summary Delete a company
84
84
  * @param {number} id Item id
85
+ * @param {boolean} [force] Force delete including all related data.
85
86
  * @param {*} [options] Override http request option.
86
87
  * @throws {RequiredError}
87
88
  */
88
- companyIdDelete: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
89
+ companyIdDelete: (id_1, force_1, ...args_1) => __awaiter(this, [id_1, force_1, ...args_1], void 0, function* (id, force, options = {}) {
89
90
  // verify required parameter 'id' is not null or undefined
90
91
  (0, common_1.assertParamExists)('companyIdDelete', 'id', id);
91
92
  const localVarPath = `/company/{id}`
@@ -102,6 +103,9 @@ const CompanyApiAxiosParamCreator = function (configuration) {
102
103
  // authentication Basic required
103
104
  // http basic authentication required
104
105
  (0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
106
+ if (force !== undefined) {
107
+ localVarQueryParameter['force'] = force;
108
+ }
105
109
  localVarHeaderParameter['Accept'] = 'application/json';
106
110
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
107
111
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -112,7 +116,7 @@ const CompanyApiAxiosParamCreator = function (configuration) {
112
116
  };
113
117
  }),
114
118
  /**
115
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
119
+ * Retrieve a company by its internal id. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
116
120
  * @summary Get a company by id
117
121
  * @param {number} id Item id
118
122
  * @param {*} [options] Override http request option.
@@ -145,7 +149,7 @@ const CompanyApiAxiosParamCreator = function (configuration) {
145
149
  };
146
150
  }),
147
151
  /**
148
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
152
+ * Add a new company. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
149
153
  * @summary Add a company
150
154
  * @param {Company} company
151
155
  * @param {*} [options] Override http request option.
@@ -179,7 +183,7 @@ const CompanyApiAxiosParamCreator = function (configuration) {
179
183
  };
180
184
  }),
181
185
  /**
182
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
186
+ * Update an existing company. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
183
187
  * @summary Update a company
184
188
  * @param {Company} company
185
189
  * @param {*} [options] Override http request option.
@@ -222,7 +226,7 @@ const CompanyApiFp = function (configuration) {
222
226
  const localVarAxiosParamCreator = (0, exports.CompanyApiAxiosParamCreator)(configuration);
223
227
  return {
224
228
  /**
225
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
229
+ * Retrieve a paginated list of companies. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
226
230
  * @summary List companies
227
231
  * @param {number} [page] Page number.
228
232
  * @param {number} [pageSize] Items per page. Cannot be greater than 200.
@@ -240,23 +244,24 @@ const CompanyApiFp = function (configuration) {
240
244
  });
241
245
  },
242
246
  /**
243
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
247
+ * Delete a company by its internal id. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received. **Warning:** Deleting a company will permanently remove all associated data, including sent invoices, received invoices, invoice updates from SDI, logs, and webhooks. If the company has any linked invoices, you must explicitly confirm deletion by adding `?force=true` to the request. Without this parameter, the API will return `409 Conflict` with details about the linked data.
244
248
  * @summary Delete a company
245
249
  * @param {number} id Item id
250
+ * @param {boolean} [force] Force delete including all related data.
246
251
  * @param {*} [options] Override http request option.
247
252
  * @throws {RequiredError}
248
253
  */
249
- companyIdDelete(id, options) {
254
+ companyIdDelete(id, force, options) {
250
255
  return __awaiter(this, void 0, void 0, function* () {
251
256
  var _a, _b, _c;
252
- const localVarAxiosArgs = yield localVarAxiosParamCreator.companyIdDelete(id, options);
257
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.companyIdDelete(id, force, options);
253
258
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
254
259
  const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CompanyApi.companyIdDelete']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
255
260
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
256
261
  });
257
262
  },
258
263
  /**
259
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
264
+ * Retrieve a company by its internal id. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
260
265
  * @summary Get a company by id
261
266
  * @param {number} id Item id
262
267
  * @param {*} [options] Override http request option.
@@ -272,7 +277,7 @@ const CompanyApiFp = function (configuration) {
272
277
  });
273
278
  },
274
279
  /**
275
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
280
+ * Add a new company. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
276
281
  * @summary Add a company
277
282
  * @param {Company} company
278
283
  * @param {*} [options] Override http request option.
@@ -288,7 +293,7 @@ const CompanyApiFp = function (configuration) {
288
293
  });
289
294
  },
290
295
  /**
291
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
296
+ * Update an existing company. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
292
297
  * @summary Update a company
293
298
  * @param {Company} company
294
299
  * @param {*} [options] Override http request option.
@@ -313,7 +318,7 @@ const CompanyApiFactory = function (configuration, basePath, axios) {
313
318
  const localVarFp = (0, exports.CompanyApiFp)(configuration);
314
319
  return {
315
320
  /**
316
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
321
+ * Retrieve a paginated list of companies. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
317
322
  * @summary List companies
318
323
  * @param {number} [page] Page number.
319
324
  * @param {number} [pageSize] Items per page. Cannot be greater than 200.
@@ -325,17 +330,18 @@ const CompanyApiFactory = function (configuration, basePath, axios) {
325
330
  return localVarFp.companyGet(page, pageSize, sort, options).then((request) => request(axios, basePath));
326
331
  },
327
332
  /**
328
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
333
+ * Delete a company by its internal id. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received. **Warning:** Deleting a company will permanently remove all associated data, including sent invoices, received invoices, invoice updates from SDI, logs, and webhooks. If the company has any linked invoices, you must explicitly confirm deletion by adding `?force=true` to the request. Without this parameter, the API will return `409 Conflict` with details about the linked data.
329
334
  * @summary Delete a company
330
335
  * @param {number} id Item id
336
+ * @param {boolean} [force] Force delete including all related data.
331
337
  * @param {*} [options] Override http request option.
332
338
  * @throws {RequiredError}
333
339
  */
334
- companyIdDelete(id, options) {
335
- return localVarFp.companyIdDelete(id, options).then((request) => request(axios, basePath));
340
+ companyIdDelete(id, force, options) {
341
+ return localVarFp.companyIdDelete(id, force, options).then((request) => request(axios, basePath));
336
342
  },
337
343
  /**
338
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
344
+ * Retrieve a company by its internal id. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
339
345
  * @summary Get a company by id
340
346
  * @param {number} id Item id
341
347
  * @param {*} [options] Override http request option.
@@ -345,7 +351,7 @@ const CompanyApiFactory = function (configuration, basePath, axios) {
345
351
  return localVarFp.companyIdGet(id, options).then((request) => request(axios, basePath));
346
352
  },
347
353
  /**
348
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
354
+ * Add a new company. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
349
355
  * @summary Add a company
350
356
  * @param {Company} company
351
357
  * @param {*} [options] Override http request option.
@@ -355,7 +361,7 @@ const CompanyApiFactory = function (configuration, basePath, axios) {
355
361
  return localVarFp.companyPost(company, options).then((request) => request(axios, basePath));
356
362
  },
357
363
  /**
358
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
364
+ * Update an existing company. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
359
365
  * @summary Update a company
360
366
  * @param {Company} company
361
367
  * @param {*} [options] Override http request option.
@@ -372,7 +378,7 @@ exports.CompanyApiFactory = CompanyApiFactory;
372
378
  */
373
379
  class CompanyApi extends base_1.BaseAPI {
374
380
  /**
375
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
381
+ * Retrieve a paginated list of companies. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
376
382
  * @summary List companies
377
383
  * @param {number} [page] Page number.
378
384
  * @param {number} [pageSize] Items per page. Cannot be greater than 200.
@@ -384,17 +390,18 @@ class CompanyApi extends base_1.BaseAPI {
384
390
  return (0, exports.CompanyApiFp)(this.configuration).companyGet(page, pageSize, sort, options).then((request) => request(this.axios, this.basePath));
385
391
  }
386
392
  /**
387
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
393
+ * Delete a company by its internal id. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received. **Warning:** Deleting a company will permanently remove all associated data, including sent invoices, received invoices, invoice updates from SDI, logs, and webhooks. If the company has any linked invoices, you must explicitly confirm deletion by adding `?force=true` to the request. Without this parameter, the API will return `409 Conflict` with details about the linked data.
388
394
  * @summary Delete a company
389
395
  * @param {number} id Item id
396
+ * @param {boolean} [force] Force delete including all related data.
390
397
  * @param {*} [options] Override http request option.
391
398
  * @throws {RequiredError}
392
399
  */
393
- companyIdDelete(id, options) {
394
- return (0, exports.CompanyApiFp)(this.configuration).companyIdDelete(id, options).then((request) => request(this.axios, this.basePath));
400
+ companyIdDelete(id, force, options) {
401
+ return (0, exports.CompanyApiFp)(this.configuration).companyIdDelete(id, force, options).then((request) => request(this.axios, this.basePath));
395
402
  }
396
403
  /**
397
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
404
+ * Retrieve a company by its internal id. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
398
405
  * @summary Get a company by id
399
406
  * @param {number} id Item id
400
407
  * @param {*} [options] Override http request option.
@@ -404,7 +411,7 @@ class CompanyApi extends base_1.BaseAPI {
404
411
  return (0, exports.CompanyApiFp)(this.configuration).companyIdGet(id, options).then((request) => request(this.axios, this.basePath));
405
412
  }
406
413
  /**
407
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
414
+ * Add a new company. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
408
415
  * @summary Add a company
409
416
  * @param {Company} company
410
417
  * @param {*} [options] Override http request option.
@@ -414,7 +421,7 @@ class CompanyApi extends base_1.BaseAPI {
414
421
  return (0, exports.CompanyApiFp)(this.configuration).companyPost(company, options).then((request) => request(this.axios, this.basePath));
415
422
  }
416
423
  /**
417
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
424
+ * Update an existing company. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
418
425
  * @summary Update a company
419
426
  * @param {Company} company
420
427
  * @param {*} [options] Override http request option.
@@ -0,0 +1,115 @@
1
+ /**
2
+ * Invoicetronic API
3
+ * 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/
4
+ *
5
+ * The version of the OpenAPI document: 1
6
+ * Contact: info@invoicetronic.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { Configuration } from '../../configuration';
13
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
+ import { type RequestArgs, BaseAPI } from '../../base';
15
+ /**
16
+ * ExportApi - axios parameter creator
17
+ */
18
+ export declare const ExportApiAxiosParamCreator: (configuration?: Configuration) => {
19
+ /**
20
+ * 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.
21
+ * @summary Export invoices as a ZIP archive
22
+ * @param {ExportGetTypeEnum} [type]
23
+ * @param {number} [companyId] Company id
24
+ * @param {number} [year]
25
+ * @param {number} [month]
26
+ * @param {number} [quarter]
27
+ * @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
28
+ * @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
29
+ * @param {*} [options] Override http request option.
30
+ * @throws {RequiredError}
31
+ */
32
+ exportGet: (type?: ExportGetTypeEnum, companyId?: number, year?: number, month?: number, quarter?: number, documentDateFrom?: string, documentDateTo?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
33
+ };
34
+ /**
35
+ * ExportApi - functional programming interface
36
+ */
37
+ export declare const ExportApiFp: (configuration?: Configuration) => {
38
+ /**
39
+ * 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.
40
+ * @summary Export invoices as a ZIP archive
41
+ * @param {ExportGetTypeEnum} [type]
42
+ * @param {number} [companyId] Company id
43
+ * @param {number} [year]
44
+ * @param {number} [month]
45
+ * @param {number} [quarter]
46
+ * @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
47
+ * @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
48
+ * @param {*} [options] Override http request option.
49
+ * @throws {RequiredError}
50
+ */
51
+ exportGet(type?: ExportGetTypeEnum, companyId?: number, year?: number, month?: number, quarter?: number, documentDateFrom?: string, documentDateTo?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
52
+ };
53
+ /**
54
+ * ExportApi - factory interface
55
+ */
56
+ export declare const ExportApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
57
+ /**
58
+ * 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.
59
+ * @summary Export invoices as a ZIP archive
60
+ * @param {ExportGetTypeEnum} [type]
61
+ * @param {number} [companyId] Company id
62
+ * @param {number} [year]
63
+ * @param {number} [month]
64
+ * @param {number} [quarter]
65
+ * @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
66
+ * @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
67
+ * @param {*} [options] Override http request option.
68
+ * @throws {RequiredError}
69
+ */
70
+ exportGet(type?: ExportGetTypeEnum, companyId?: number, year?: number, month?: number, quarter?: number, documentDateFrom?: string, documentDateTo?: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
71
+ };
72
+ /**
73
+ * ExportApi - interface
74
+ */
75
+ export interface ExportApiInterface {
76
+ /**
77
+ * 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.
78
+ * @summary Export invoices as a ZIP archive
79
+ * @param {ExportGetTypeEnum} [type]
80
+ * @param {number} [companyId] Company id
81
+ * @param {number} [year]
82
+ * @param {number} [month]
83
+ * @param {number} [quarter]
84
+ * @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
85
+ * @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
86
+ * @param {*} [options] Override http request option.
87
+ * @throws {RequiredError}
88
+ */
89
+ exportGet(type?: ExportGetTypeEnum, companyId?: number, year?: number, month?: number, quarter?: number, documentDateFrom?: string, documentDateTo?: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
90
+ }
91
+ /**
92
+ * ExportApi - object-oriented interface
93
+ */
94
+ export declare class ExportApi extends BaseAPI implements ExportApiInterface {
95
+ /**
96
+ * 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.
97
+ * @summary Export invoices as a ZIP archive
98
+ * @param {ExportGetTypeEnum} [type]
99
+ * @param {number} [companyId] Company id
100
+ * @param {number} [year]
101
+ * @param {number} [month]
102
+ * @param {number} [quarter]
103
+ * @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
104
+ * @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
105
+ * @param {*} [options] Override http request option.
106
+ * @throws {RequiredError}
107
+ */
108
+ exportGet(type?: ExportGetTypeEnum, companyId?: number, year?: number, month?: number, quarter?: number, documentDateFrom?: string, documentDateTo?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
109
+ }
110
+ export declare const ExportGetTypeEnum: {
111
+ readonly Send: "Send";
112
+ readonly Receive: "Receive";
113
+ readonly Both: "Both";
114
+ };
115
+ export type ExportGetTypeEnum = typeof ExportGetTypeEnum[keyof typeof ExportGetTypeEnum];
@@ -0,0 +1,186 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Invoicetronic API
6
+ * 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/
7
+ *
8
+ * The version of the OpenAPI document: 1
9
+ * Contact: info@invoicetronic.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.ExportGetTypeEnum = exports.ExportApi = exports.ExportApiFactory = exports.ExportApiFp = exports.ExportApiAxiosParamCreator = void 0;
26
+ const axios_1 = require("axios");
27
+ // URLSearchParams not necessarily used
28
+ // @ts-ignore
29
+ const url_1 = require("url");
30
+ // Some imports not used depending on template conditions
31
+ // @ts-ignore
32
+ const common_1 = require("../../common");
33
+ // @ts-ignore
34
+ const base_1 = require("../../base");
35
+ /**
36
+ * ExportApi - axios parameter creator
37
+ */
38
+ const ExportApiAxiosParamCreator = function (configuration) {
39
+ return {
40
+ /**
41
+ * 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.
42
+ * @summary Export invoices as a ZIP archive
43
+ * @param {ExportGetTypeEnum} [type]
44
+ * @param {number} [companyId] Company id
45
+ * @param {number} [year]
46
+ * @param {number} [month]
47
+ * @param {number} [quarter]
48
+ * @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
49
+ * @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
50
+ * @param {*} [options] Override http request option.
51
+ * @throws {RequiredError}
52
+ */
53
+ exportGet: (type_1, companyId_1, year_1, month_1, quarter_1, documentDateFrom_1, documentDateTo_1, ...args_1) => __awaiter(this, [type_1, companyId_1, year_1, month_1, quarter_1, documentDateFrom_1, documentDateTo_1, ...args_1], void 0, function* (type, companyId, year, month, quarter, documentDateFrom, documentDateTo, options = {}) {
54
+ const localVarPath = `/export`;
55
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
56
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
57
+ let baseOptions;
58
+ if (configuration) {
59
+ baseOptions = configuration.baseOptions;
60
+ }
61
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
62
+ const localVarHeaderParameter = {};
63
+ const localVarQueryParameter = {};
64
+ // authentication Basic required
65
+ // http basic authentication required
66
+ (0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
67
+ if (type !== undefined) {
68
+ localVarQueryParameter['type'] = type;
69
+ }
70
+ if (companyId !== undefined) {
71
+ localVarQueryParameter['company_id'] = companyId;
72
+ }
73
+ if (year !== undefined) {
74
+ localVarQueryParameter['year'] = year;
75
+ }
76
+ if (month !== undefined) {
77
+ localVarQueryParameter['month'] = month;
78
+ }
79
+ if (quarter !== undefined) {
80
+ localVarQueryParameter['quarter'] = quarter;
81
+ }
82
+ if (documentDateFrom !== undefined) {
83
+ localVarQueryParameter['document_date_from'] = (documentDateFrom instanceof Date) ?
84
+ documentDateFrom.toISOString() :
85
+ documentDateFrom;
86
+ }
87
+ if (documentDateTo !== undefined) {
88
+ localVarQueryParameter['document_date_to'] = (documentDateTo instanceof Date) ?
89
+ documentDateTo.toISOString() :
90
+ documentDateTo;
91
+ }
92
+ localVarHeaderParameter['Accept'] = 'application/problem+json';
93
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
94
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
95
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
96
+ return {
97
+ url: (0, common_1.toPathString)(localVarUrlObj),
98
+ options: localVarRequestOptions,
99
+ };
100
+ }),
101
+ };
102
+ };
103
+ exports.ExportApiAxiosParamCreator = ExportApiAxiosParamCreator;
104
+ /**
105
+ * ExportApi - functional programming interface
106
+ */
107
+ const ExportApiFp = function (configuration) {
108
+ const localVarAxiosParamCreator = (0, exports.ExportApiAxiosParamCreator)(configuration);
109
+ return {
110
+ /**
111
+ * 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.
112
+ * @summary Export invoices as a ZIP archive
113
+ * @param {ExportGetTypeEnum} [type]
114
+ * @param {number} [companyId] Company id
115
+ * @param {number} [year]
116
+ * @param {number} [month]
117
+ * @param {number} [quarter]
118
+ * @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
119
+ * @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
120
+ * @param {*} [options] Override http request option.
121
+ * @throws {RequiredError}
122
+ */
123
+ exportGet(type, companyId, year, month, quarter, documentDateFrom, documentDateTo, options) {
124
+ return __awaiter(this, void 0, void 0, function* () {
125
+ var _a, _b, _c;
126
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.exportGet(type, companyId, year, month, quarter, documentDateFrom, documentDateTo, options);
127
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
128
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ExportApi.exportGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
129
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
130
+ });
131
+ },
132
+ };
133
+ };
134
+ exports.ExportApiFp = ExportApiFp;
135
+ /**
136
+ * ExportApi - factory interface
137
+ */
138
+ const ExportApiFactory = function (configuration, basePath, axios) {
139
+ const localVarFp = (0, exports.ExportApiFp)(configuration);
140
+ return {
141
+ /**
142
+ * 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.
143
+ * @summary Export invoices as a ZIP archive
144
+ * @param {ExportGetTypeEnum} [type]
145
+ * @param {number} [companyId] Company id
146
+ * @param {number} [year]
147
+ * @param {number} [month]
148
+ * @param {number} [quarter]
149
+ * @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
150
+ * @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
151
+ * @param {*} [options] Override http request option.
152
+ * @throws {RequiredError}
153
+ */
154
+ exportGet(type, companyId, year, month, quarter, documentDateFrom, documentDateTo, options) {
155
+ return localVarFp.exportGet(type, companyId, year, month, quarter, documentDateFrom, documentDateTo, options).then((request) => request(axios, basePath));
156
+ },
157
+ };
158
+ };
159
+ exports.ExportApiFactory = ExportApiFactory;
160
+ /**
161
+ * ExportApi - object-oriented interface
162
+ */
163
+ class ExportApi extends base_1.BaseAPI {
164
+ /**
165
+ * 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.
166
+ * @summary Export invoices as a ZIP archive
167
+ * @param {ExportGetTypeEnum} [type]
168
+ * @param {number} [companyId] Company id
169
+ * @param {number} [year]
170
+ * @param {number} [month]
171
+ * @param {number} [quarter]
172
+ * @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
173
+ * @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
174
+ * @param {*} [options] Override http request option.
175
+ * @throws {RequiredError}
176
+ */
177
+ exportGet(type, companyId, year, month, quarter, documentDateFrom, documentDateTo, options) {
178
+ return (0, exports.ExportApiFp)(this.configuration).exportGet(type, companyId, year, month, quarter, documentDateFrom, documentDateTo, options).then((request) => request(this.axios, this.basePath));
179
+ }
180
+ }
181
+ exports.ExportApi = ExportApi;
182
+ exports.ExportGetTypeEnum = {
183
+ Send: 'Send',
184
+ Receive: 'Receive',
185
+ Both: 'Both'
186
+ };