@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
|
@@ -38,7 +38,7 @@ const base_1 = require("../../base");
|
|
|
38
38
|
const WebhookApiAxiosParamCreator = function (configuration) {
|
|
39
39
|
return {
|
|
40
40
|
/**
|
|
41
|
-
* Webhooks
|
|
41
|
+
* Retrieve a paginated list of webhooks. Results can be filtered by company, description, enabled status, events, and URL. **Webhooks** allow you to receive notifications to an external service when specific events occur, such as invoice creation or status updates. You can subscribe to specific events and receive a notification when they occur. You can also manage webhooks via the [Dashboard](https://dashboard.invoicetronic.com). For more information, see the **[Webhooks documentation page](https://invoicetronic.com/en/docs/webhooks/)**.
|
|
42
42
|
* @summary List webhooks
|
|
43
43
|
* @param {number} [companyId] Company id
|
|
44
44
|
* @param {number} [page] Page number.
|
|
@@ -99,7 +99,7 @@ const WebhookApiAxiosParamCreator = function (configuration) {
|
|
|
99
99
|
};
|
|
100
100
|
}),
|
|
101
101
|
/**
|
|
102
|
-
* Webhooks
|
|
102
|
+
* Delete a webhook subscription by its internal id. **Webhooks** allow you to receive notifications to an external service when specific events occur, such as invoice creation or status updates. You can subscribe to specific events and receive a notification when they occur. You can also manage webhooks via the [Dashboard](https://dashboard.invoicetronic.com). For more information, see the **[Webhooks documentation page](https://invoicetronic.com/en/docs/webhooks/)**.
|
|
103
103
|
* @summary Delete a webhook by id
|
|
104
104
|
* @param {number} id Item id
|
|
105
105
|
* @param {*} [options] Override http request option.
|
|
@@ -132,7 +132,7 @@ const WebhookApiAxiosParamCreator = function (configuration) {
|
|
|
132
132
|
};
|
|
133
133
|
}),
|
|
134
134
|
/**
|
|
135
|
-
* Webhooks
|
|
135
|
+
* Retrieve a webhook by its internal id. **Webhooks** allow you to receive notifications to an external service when specific events occur, such as invoice creation or status updates. You can subscribe to specific events and receive a notification when they occur. You can also manage webhooks via the [Dashboard](https://dashboard.invoicetronic.com). For more information, see the **[Webhooks documentation page](https://invoicetronic.com/en/docs/webhooks/)**.
|
|
136
136
|
* @summary Get a webhook by id
|
|
137
137
|
* @param {number} id Item id
|
|
138
138
|
* @param {*} [options] Override http request option.
|
|
@@ -165,7 +165,7 @@ const WebhookApiAxiosParamCreator = function (configuration) {
|
|
|
165
165
|
};
|
|
166
166
|
}),
|
|
167
167
|
/**
|
|
168
|
-
* Webhooks
|
|
168
|
+
* Create a new webhook subscription. **Webhooks** allow you to receive notifications to an external service when specific events occur, such as invoice creation or status updates. You can subscribe to specific events and receive a notification when they occur. You can also manage webhooks via the [Dashboard](https://dashboard.invoicetronic.com). For more information, see the **[Webhooks documentation page](https://invoicetronic.com/en/docs/webhooks/)**.
|
|
169
169
|
* @summary Add a webhook
|
|
170
170
|
* @param {WebHook} webHook
|
|
171
171
|
* @param {*} [options] Override http request option.
|
|
@@ -199,7 +199,7 @@ const WebhookApiAxiosParamCreator = function (configuration) {
|
|
|
199
199
|
};
|
|
200
200
|
}),
|
|
201
201
|
/**
|
|
202
|
-
* Webhooks
|
|
202
|
+
* Update an existing webhook subscription. **Webhooks** allow you to receive notifications to an external service when specific events occur, such as invoice creation or status updates. You can subscribe to specific events and receive a notification when they occur. You can also manage webhooks via the [Dashboard](https://dashboard.invoicetronic.com). For more information, see the **[Webhooks documentation page](https://invoicetronic.com/en/docs/webhooks/)**.
|
|
203
203
|
* @summary Update a webhook
|
|
204
204
|
* @param {WebHook} webHook
|
|
205
205
|
* @param {*} [options] Override http request option.
|
|
@@ -320,7 +320,7 @@ const WebhookApiFp = function (configuration) {
|
|
|
320
320
|
const localVarAxiosParamCreator = (0, exports.WebhookApiAxiosParamCreator)(configuration);
|
|
321
321
|
return {
|
|
322
322
|
/**
|
|
323
|
-
* Webhooks
|
|
323
|
+
* Retrieve a paginated list of webhooks. Results can be filtered by company, description, enabled status, events, and URL. **Webhooks** allow you to receive notifications to an external service when specific events occur, such as invoice creation or status updates. You can subscribe to specific events and receive a notification when they occur. You can also manage webhooks via the [Dashboard](https://dashboard.invoicetronic.com). For more information, see the **[Webhooks documentation page](https://invoicetronic.com/en/docs/webhooks/)**.
|
|
324
324
|
* @summary List webhooks
|
|
325
325
|
* @param {number} [companyId] Company id
|
|
326
326
|
* @param {number} [page] Page number.
|
|
@@ -343,7 +343,7 @@ const WebhookApiFp = function (configuration) {
|
|
|
343
343
|
});
|
|
344
344
|
},
|
|
345
345
|
/**
|
|
346
|
-
* Webhooks
|
|
346
|
+
* Delete a webhook subscription by its internal id. **Webhooks** allow you to receive notifications to an external service when specific events occur, such as invoice creation or status updates. You can subscribe to specific events and receive a notification when they occur. You can also manage webhooks via the [Dashboard](https://dashboard.invoicetronic.com). For more information, see the **[Webhooks documentation page](https://invoicetronic.com/en/docs/webhooks/)**.
|
|
347
347
|
* @summary Delete a webhook by id
|
|
348
348
|
* @param {number} id Item id
|
|
349
349
|
* @param {*} [options] Override http request option.
|
|
@@ -359,7 +359,7 @@ const WebhookApiFp = function (configuration) {
|
|
|
359
359
|
});
|
|
360
360
|
},
|
|
361
361
|
/**
|
|
362
|
-
* Webhooks
|
|
362
|
+
* Retrieve a webhook by its internal id. **Webhooks** allow you to receive notifications to an external service when specific events occur, such as invoice creation or status updates. You can subscribe to specific events and receive a notification when they occur. You can also manage webhooks via the [Dashboard](https://dashboard.invoicetronic.com). For more information, see the **[Webhooks documentation page](https://invoicetronic.com/en/docs/webhooks/)**.
|
|
363
363
|
* @summary Get a webhook by id
|
|
364
364
|
* @param {number} id Item id
|
|
365
365
|
* @param {*} [options] Override http request option.
|
|
@@ -375,7 +375,7 @@ const WebhookApiFp = function (configuration) {
|
|
|
375
375
|
});
|
|
376
376
|
},
|
|
377
377
|
/**
|
|
378
|
-
* Webhooks
|
|
378
|
+
* Create a new webhook subscription. **Webhooks** allow you to receive notifications to an external service when specific events occur, such as invoice creation or status updates. You can subscribe to specific events and receive a notification when they occur. You can also manage webhooks via the [Dashboard](https://dashboard.invoicetronic.com). For more information, see the **[Webhooks documentation page](https://invoicetronic.com/en/docs/webhooks/)**.
|
|
379
379
|
* @summary Add a webhook
|
|
380
380
|
* @param {WebHook} webHook
|
|
381
381
|
* @param {*} [options] Override http request option.
|
|
@@ -391,7 +391,7 @@ const WebhookApiFp = function (configuration) {
|
|
|
391
391
|
});
|
|
392
392
|
},
|
|
393
393
|
/**
|
|
394
|
-
* Webhooks
|
|
394
|
+
* Update an existing webhook subscription. **Webhooks** allow you to receive notifications to an external service when specific events occur, such as invoice creation or status updates. You can subscribe to specific events and receive a notification when they occur. You can also manage webhooks via the [Dashboard](https://dashboard.invoicetronic.com). For more information, see the **[Webhooks documentation page](https://invoicetronic.com/en/docs/webhooks/)**.
|
|
395
395
|
* @summary Update a webhook
|
|
396
396
|
* @param {WebHook} webHook
|
|
397
397
|
* @param {*} [options] Override http request option.
|
|
@@ -451,7 +451,7 @@ const WebhookApiFactory = function (configuration, basePath, axios) {
|
|
|
451
451
|
const localVarFp = (0, exports.WebhookApiFp)(configuration);
|
|
452
452
|
return {
|
|
453
453
|
/**
|
|
454
|
-
* Webhooks
|
|
454
|
+
* Retrieve a paginated list of webhooks. Results can be filtered by company, description, enabled status, events, and URL. **Webhooks** allow you to receive notifications to an external service when specific events occur, such as invoice creation or status updates. You can subscribe to specific events and receive a notification when they occur. You can also manage webhooks via the [Dashboard](https://dashboard.invoicetronic.com). For more information, see the **[Webhooks documentation page](https://invoicetronic.com/en/docs/webhooks/)**.
|
|
455
455
|
* @summary List webhooks
|
|
456
456
|
* @param {number} [companyId] Company id
|
|
457
457
|
* @param {number} [page] Page number.
|
|
@@ -468,7 +468,7 @@ const WebhookApiFactory = function (configuration, basePath, axios) {
|
|
|
468
468
|
return localVarFp.webhookGet(companyId, page, pageSize, sort, description, enabled, events, url, options).then((request) => request(axios, basePath));
|
|
469
469
|
},
|
|
470
470
|
/**
|
|
471
|
-
* Webhooks
|
|
471
|
+
* Delete a webhook subscription by its internal id. **Webhooks** allow you to receive notifications to an external service when specific events occur, such as invoice creation or status updates. You can subscribe to specific events and receive a notification when they occur. You can also manage webhooks via the [Dashboard](https://dashboard.invoicetronic.com). For more information, see the **[Webhooks documentation page](https://invoicetronic.com/en/docs/webhooks/)**.
|
|
472
472
|
* @summary Delete a webhook by id
|
|
473
473
|
* @param {number} id Item id
|
|
474
474
|
* @param {*} [options] Override http request option.
|
|
@@ -478,7 +478,7 @@ const WebhookApiFactory = function (configuration, basePath, axios) {
|
|
|
478
478
|
return localVarFp.webhookIdDelete(id, options).then((request) => request(axios, basePath));
|
|
479
479
|
},
|
|
480
480
|
/**
|
|
481
|
-
* Webhooks
|
|
481
|
+
* Retrieve a webhook by its internal id. **Webhooks** allow you to receive notifications to an external service when specific events occur, such as invoice creation or status updates. You can subscribe to specific events and receive a notification when they occur. You can also manage webhooks via the [Dashboard](https://dashboard.invoicetronic.com). For more information, see the **[Webhooks documentation page](https://invoicetronic.com/en/docs/webhooks/)**.
|
|
482
482
|
* @summary Get a webhook by id
|
|
483
483
|
* @param {number} id Item id
|
|
484
484
|
* @param {*} [options] Override http request option.
|
|
@@ -488,7 +488,7 @@ const WebhookApiFactory = function (configuration, basePath, axios) {
|
|
|
488
488
|
return localVarFp.webhookIdGet(id, options).then((request) => request(axios, basePath));
|
|
489
489
|
},
|
|
490
490
|
/**
|
|
491
|
-
* Webhooks
|
|
491
|
+
* Create a new webhook subscription. **Webhooks** allow you to receive notifications to an external service when specific events occur, such as invoice creation or status updates. You can subscribe to specific events and receive a notification when they occur. You can also manage webhooks via the [Dashboard](https://dashboard.invoicetronic.com). For more information, see the **[Webhooks documentation page](https://invoicetronic.com/en/docs/webhooks/)**.
|
|
492
492
|
* @summary Add a webhook
|
|
493
493
|
* @param {WebHook} webHook
|
|
494
494
|
* @param {*} [options] Override http request option.
|
|
@@ -498,7 +498,7 @@ const WebhookApiFactory = function (configuration, basePath, axios) {
|
|
|
498
498
|
return localVarFp.webhookPost(webHook, options).then((request) => request(axios, basePath));
|
|
499
499
|
},
|
|
500
500
|
/**
|
|
501
|
-
* Webhooks
|
|
501
|
+
* Update an existing webhook subscription. **Webhooks** allow you to receive notifications to an external service when specific events occur, such as invoice creation or status updates. You can subscribe to specific events and receive a notification when they occur. You can also manage webhooks via the [Dashboard](https://dashboard.invoicetronic.com). For more information, see the **[Webhooks documentation page](https://invoicetronic.com/en/docs/webhooks/)**.
|
|
502
502
|
* @summary Update a webhook
|
|
503
503
|
* @param {WebHook} webHook
|
|
504
504
|
* @param {*} [options] Override http request option.
|
|
@@ -538,7 +538,7 @@ exports.WebhookApiFactory = WebhookApiFactory;
|
|
|
538
538
|
*/
|
|
539
539
|
class WebhookApi extends base_1.BaseAPI {
|
|
540
540
|
/**
|
|
541
|
-
* Webhooks
|
|
541
|
+
* Retrieve a paginated list of webhooks. Results can be filtered by company, description, enabled status, events, and URL. **Webhooks** allow you to receive notifications to an external service when specific events occur, such as invoice creation or status updates. You can subscribe to specific events and receive a notification when they occur. You can also manage webhooks via the [Dashboard](https://dashboard.invoicetronic.com). For more information, see the **[Webhooks documentation page](https://invoicetronic.com/en/docs/webhooks/)**.
|
|
542
542
|
* @summary List webhooks
|
|
543
543
|
* @param {number} [companyId] Company id
|
|
544
544
|
* @param {number} [page] Page number.
|
|
@@ -555,7 +555,7 @@ class WebhookApi extends base_1.BaseAPI {
|
|
|
555
555
|
return (0, exports.WebhookApiFp)(this.configuration).webhookGet(companyId, page, pageSize, sort, description, enabled, events, url, options).then((request) => request(this.axios, this.basePath));
|
|
556
556
|
}
|
|
557
557
|
/**
|
|
558
|
-
* Webhooks
|
|
558
|
+
* Delete a webhook subscription by its internal id. **Webhooks** allow you to receive notifications to an external service when specific events occur, such as invoice creation or status updates. You can subscribe to specific events and receive a notification when they occur. You can also manage webhooks via the [Dashboard](https://dashboard.invoicetronic.com). For more information, see the **[Webhooks documentation page](https://invoicetronic.com/en/docs/webhooks/)**.
|
|
559
559
|
* @summary Delete a webhook by id
|
|
560
560
|
* @param {number} id Item id
|
|
561
561
|
* @param {*} [options] Override http request option.
|
|
@@ -565,7 +565,7 @@ class WebhookApi extends base_1.BaseAPI {
|
|
|
565
565
|
return (0, exports.WebhookApiFp)(this.configuration).webhookIdDelete(id, options).then((request) => request(this.axios, this.basePath));
|
|
566
566
|
}
|
|
567
567
|
/**
|
|
568
|
-
* Webhooks
|
|
568
|
+
* Retrieve a webhook by its internal id. **Webhooks** allow you to receive notifications to an external service when specific events occur, such as invoice creation or status updates. You can subscribe to specific events and receive a notification when they occur. You can also manage webhooks via the [Dashboard](https://dashboard.invoicetronic.com). For more information, see the **[Webhooks documentation page](https://invoicetronic.com/en/docs/webhooks/)**.
|
|
569
569
|
* @summary Get a webhook by id
|
|
570
570
|
* @param {number} id Item id
|
|
571
571
|
* @param {*} [options] Override http request option.
|
|
@@ -575,7 +575,7 @@ class WebhookApi extends base_1.BaseAPI {
|
|
|
575
575
|
return (0, exports.WebhookApiFp)(this.configuration).webhookIdGet(id, options).then((request) => request(this.axios, this.basePath));
|
|
576
576
|
}
|
|
577
577
|
/**
|
|
578
|
-
* Webhooks
|
|
578
|
+
* Create a new webhook subscription. **Webhooks** allow you to receive notifications to an external service when specific events occur, such as invoice creation or status updates. You can subscribe to specific events and receive a notification when they occur. You can also manage webhooks via the [Dashboard](https://dashboard.invoicetronic.com). For more information, see the **[Webhooks documentation page](https://invoicetronic.com/en/docs/webhooks/)**.
|
|
579
579
|
* @summary Add a webhook
|
|
580
580
|
* @param {WebHook} webHook
|
|
581
581
|
* @param {*} [options] Override http request option.
|
|
@@ -585,7 +585,7 @@ class WebhookApi extends base_1.BaseAPI {
|
|
|
585
585
|
return (0, exports.WebhookApiFp)(this.configuration).webhookPost(webHook, options).then((request) => request(this.axios, this.basePath));
|
|
586
586
|
}
|
|
587
587
|
/**
|
|
588
|
-
* Webhooks
|
|
588
|
+
* Update an existing webhook subscription. **Webhooks** allow you to receive notifications to an external service when specific events occur, such as invoice creation or status updates. You can subscribe to specific events and receive a notification when they occur. You can also manage webhooks via the [Dashboard](https://dashboard.invoicetronic.com). For more information, see the **[Webhooks documentation page](https://invoicetronic.com/en/docs/webhooks/)**.
|
|
589
589
|
* @summary Update a webhook
|
|
590
590
|
* @param {WebHook} webHook
|
|
591
591
|
* @param {*} [options] Override http request option.
|
|
@@ -63,7 +63,7 @@ export interface Event {
|
|
|
63
63
|
*/
|
|
64
64
|
'resource_id'?: number | null;
|
|
65
65
|
/**
|
|
66
|
-
*
|
|
66
|
+
* Whether the request was successful.
|
|
67
67
|
*/
|
|
68
68
|
'success'?: boolean;
|
|
69
69
|
/**
|
|
@@ -71,7 +71,7 @@ export interface Event {
|
|
|
71
71
|
*/
|
|
72
72
|
'query'?: string | null;
|
|
73
73
|
/**
|
|
74
|
-
* Response payload. It is guaranteed to be
|
|
74
|
+
* Response payload. It is guaranteed to be encrypted at rest.
|
|
75
75
|
*/
|
|
76
76
|
'response_body'?: string | null;
|
|
77
77
|
}
|
|
@@ -40,7 +40,7 @@ export interface Receive {
|
|
|
40
40
|
*/
|
|
41
41
|
'prestatore'?: string | null;
|
|
42
42
|
/**
|
|
43
|
-
* SDI identifier. This is set by the SDI and is
|
|
43
|
+
* SDI identifier. This is set by the SDI and is guaranteed to be unique within the SDI system.
|
|
44
44
|
*/
|
|
45
45
|
'identifier'?: string | null;
|
|
46
46
|
/**
|
|
@@ -52,7 +52,7 @@ export interface Receive {
|
|
|
52
52
|
*/
|
|
53
53
|
'format'?: string | null;
|
|
54
54
|
/**
|
|
55
|
-
* Xml
|
|
55
|
+
* Xml payload. This is the actual xml content, as string. On send, it can be base64 encoded. If it\'s not, it will be encoded before sending. It is guaranteed to be encrypted at rest.
|
|
56
56
|
*/
|
|
57
57
|
'payload': string;
|
|
58
58
|
/**
|
|
@@ -72,7 +72,7 @@ export interface Receive {
|
|
|
72
72
|
*/
|
|
73
73
|
'encoding'?: ReceiveEncodingEnum;
|
|
74
74
|
/**
|
|
75
|
-
*
|
|
75
|
+
* Whether the invoice has been read at least once. Set to true only when the invoice is requested with include_payload=true.
|
|
76
76
|
*/
|
|
77
77
|
'is_read'?: boolean;
|
|
78
78
|
/**
|
|
@@ -41,7 +41,7 @@ export interface Send {
|
|
|
41
41
|
*/
|
|
42
42
|
'prestatore'?: string | null;
|
|
43
43
|
/**
|
|
44
|
-
* SDI identifier. This is set by the SDI and is
|
|
44
|
+
* SDI identifier. This is set by the SDI and is guaranteed to be unique within the SDI system.
|
|
45
45
|
*/
|
|
46
46
|
'identifier'?: string | null;
|
|
47
47
|
/**
|
|
@@ -53,7 +53,7 @@ export interface Send {
|
|
|
53
53
|
*/
|
|
54
54
|
'format'?: string | null;
|
|
55
55
|
/**
|
|
56
|
-
* Xml
|
|
56
|
+
* Xml payload. This is the actual xml content, as string. On send, it can be base64 encoded. If it\'s not, it will be encoded before sending. It is guaranteed to be encrypted at rest.
|
|
57
57
|
*/
|
|
58
58
|
'payload': string;
|
|
59
59
|
/**
|
|
@@ -40,7 +40,7 @@ export interface Update {
|
|
|
40
40
|
*/
|
|
41
41
|
'last_update'?: string;
|
|
42
42
|
/**
|
|
43
|
-
* State of the document.
|
|
43
|
+
* State of the document. These are the possible values, as per the SDI documentation:
|
|
44
44
|
*/
|
|
45
45
|
'state'?: UpdateStateEnum;
|
|
46
46
|
/**
|
|
@@ -56,7 +56,7 @@ export interface Update {
|
|
|
56
56
|
*/
|
|
57
57
|
'errors'?: Array<Error> | null;
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
59
|
+
* Whether the item has been read at least once.
|
|
60
60
|
*/
|
|
61
61
|
'is_read'?: boolean;
|
|
62
62
|
'send'?: SendReduced;
|
|
@@ -35,7 +35,7 @@ export interface WebHook {
|
|
|
35
35
|
*/
|
|
36
36
|
'url': string;
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* Whether the webhook is enabled. On creation, this is set to `true`.
|
|
39
39
|
*/
|
|
40
40
|
'enabled'?: boolean;
|
|
41
41
|
/**
|
|
@@ -47,7 +47,7 @@ export interface WebHook {
|
|
|
47
47
|
*/
|
|
48
48
|
'description'?: string | null;
|
|
49
49
|
/**
|
|
50
|
-
* List of events
|
|
50
|
+
* List of events that trigger the webhook. See Invoicetronic.SupportedEvents.Available for a list of valid event names.
|
|
51
51
|
*/
|
|
52
52
|
'events'?: Array<string> | null;
|
|
53
53
|
}
|
package/docs/CompanyApi.md
CHANGED
|
@@ -13,7 +13,7 @@ All URIs are relative to *http://localhost*
|
|
|
13
13
|
# **companyGet**
|
|
14
14
|
> Array<Company> companyGet()
|
|
15
15
|
|
|
16
|
-
Companies are the entities that send and receive invoices.
|
|
16
|
+
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.
|
|
17
17
|
|
|
18
18
|
### Example
|
|
19
19
|
|
|
@@ -72,7 +72,7 @@ const { status, data } = await apiInstance.companyGet(
|
|
|
72
72
|
# **companyIdDelete**
|
|
73
73
|
> Company companyIdDelete()
|
|
74
74
|
|
|
75
|
-
Companies are the entities that send and receive invoices.
|
|
75
|
+
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.
|
|
76
76
|
|
|
77
77
|
### Example
|
|
78
78
|
|
|
@@ -86,9 +86,11 @@ const configuration = new Configuration();
|
|
|
86
86
|
const apiInstance = new CompanyApi(configuration);
|
|
87
87
|
|
|
88
88
|
let id: number; //Item id (default to undefined)
|
|
89
|
+
let force: boolean; //Force delete including all related data. (optional) (default to false)
|
|
89
90
|
|
|
90
91
|
const { status, data } = await apiInstance.companyIdDelete(
|
|
91
|
-
id
|
|
92
|
+
id,
|
|
93
|
+
force
|
|
92
94
|
);
|
|
93
95
|
```
|
|
94
96
|
|
|
@@ -97,6 +99,7 @@ const { status, data } = await apiInstance.companyIdDelete(
|
|
|
97
99
|
|Name | Type | Description | Notes|
|
|
98
100
|
|------------- | ------------- | ------------- | -------------|
|
|
99
101
|
| **id** | [**number**] | Item id | defaults to undefined|
|
|
102
|
+
| **force** | [**boolean**] | Force delete including all related data. | (optional) defaults to false|
|
|
100
103
|
|
|
101
104
|
|
|
102
105
|
### Return type
|
|
@@ -119,6 +122,7 @@ const { status, data } = await apiInstance.companyIdDelete(
|
|
|
119
122
|
|**200** | OK | - |
|
|
120
123
|
|**422** | Unprocessable Content | - |
|
|
121
124
|
|**400** | Bad Request | - |
|
|
125
|
+
|**409** | Conflict | - |
|
|
122
126
|
|**404** | Not Found | - |
|
|
123
127
|
|
|
124
128
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
@@ -126,7 +130,7 @@ const { status, data } = await apiInstance.companyIdDelete(
|
|
|
126
130
|
# **companyIdGet**
|
|
127
131
|
> Company companyIdGet()
|
|
128
132
|
|
|
129
|
-
Companies are the entities that send and receive invoices.
|
|
133
|
+
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.
|
|
130
134
|
|
|
131
135
|
### Example
|
|
132
136
|
|
|
@@ -178,7 +182,7 @@ const { status, data } = await apiInstance.companyIdGet(
|
|
|
178
182
|
# **companyPost**
|
|
179
183
|
> Company companyPost(company)
|
|
180
184
|
|
|
181
|
-
Companies are the entities that send and receive invoices.
|
|
185
|
+
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.
|
|
182
186
|
|
|
183
187
|
### Example
|
|
184
188
|
|
|
@@ -232,7 +236,7 @@ const { status, data } = await apiInstance.companyPost(
|
|
|
232
236
|
# **companyPut**
|
|
233
237
|
> Company companyPut(company)
|
|
234
238
|
|
|
235
|
-
Companies are the entities that send and receive invoices.
|
|
239
|
+
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.
|
|
236
240
|
|
|
237
241
|
### Example
|
|
238
242
|
|
package/docs/Event.md
CHANGED
|
@@ -18,9 +18,9 @@ Name | Type | Description | Notes
|
|
|
18
18
|
**date_time** | **string** | Date and time of the request. | [optional] [default to undefined]
|
|
19
19
|
**error** | **string** | Response error. | [optional] [default to undefined]
|
|
20
20
|
**resource_id** | **number** | ID of the resource created or modified by this request. | [optional] [default to undefined]
|
|
21
|
-
**success** | **boolean** |
|
|
21
|
+
**success** | **boolean** | Whether the request was successful. | [optional] [readonly] [default to undefined]
|
|
22
22
|
**query** | **string** | Request query. Only used for internal logging, not sent to webhooks. | [optional] [default to undefined]
|
|
23
|
-
**response_body** | **string** | Response payload. It is guaranteed to be
|
|
23
|
+
**response_body** | **string** | Response payload. It is guaranteed to be encrypted at rest. | [optional] [default to undefined]
|
|
24
24
|
|
|
25
25
|
## Example
|
|
26
26
|
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# ExportApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**exportGet**](#exportget) | **GET** /export | Export invoices as a ZIP archive|
|
|
8
|
+
|
|
9
|
+
# **exportGet**
|
|
10
|
+
> exportGet()
|
|
11
|
+
|
|
12
|
+
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.
|
|
13
|
+
|
|
14
|
+
### Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import {
|
|
18
|
+
ExportApi,
|
|
19
|
+
Configuration
|
|
20
|
+
} from '@invoicetronic/ts-sdk';
|
|
21
|
+
|
|
22
|
+
const configuration = new Configuration();
|
|
23
|
+
const apiInstance = new ExportApi(configuration);
|
|
24
|
+
|
|
25
|
+
let type: 'Send' | 'Receive' | 'Both'; // (optional) (default to 'Both')
|
|
26
|
+
let companyId: number; //Company id (optional) (default to undefined)
|
|
27
|
+
let year: number; // (optional) (default to undefined)
|
|
28
|
+
let month: number; // (optional) (default to undefined)
|
|
29
|
+
let quarter: number; // (optional) (default to undefined)
|
|
30
|
+
let documentDateFrom: string; //UTC ISO 8601 (2024-11-29T12:34:56Z) (optional) (default to undefined)
|
|
31
|
+
let documentDateTo: string; //UTC ISO 8601 (2024-11-29T12:34:56Z) (optional) (default to undefined)
|
|
32
|
+
|
|
33
|
+
const { status, data } = await apiInstance.exportGet(
|
|
34
|
+
type,
|
|
35
|
+
companyId,
|
|
36
|
+
year,
|
|
37
|
+
month,
|
|
38
|
+
quarter,
|
|
39
|
+
documentDateFrom,
|
|
40
|
+
documentDateTo
|
|
41
|
+
);
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Parameters
|
|
45
|
+
|
|
46
|
+
|Name | Type | Description | Notes|
|
|
47
|
+
|------------- | ------------- | ------------- | -------------|
|
|
48
|
+
| **type** | [**'Send' | 'Receive' | 'Both'**]**Array<'Send' | 'Receive' | 'Both'>** | | (optional) defaults to 'Both'|
|
|
49
|
+
| **companyId** | [**number**] | Company id | (optional) defaults to undefined|
|
|
50
|
+
| **year** | [**number**] | | (optional) defaults to undefined|
|
|
51
|
+
| **month** | [**number**] | | (optional) defaults to undefined|
|
|
52
|
+
| **quarter** | [**number**] | | (optional) defaults to undefined|
|
|
53
|
+
| **documentDateFrom** | [**string**] | UTC ISO 8601 (2024-11-29T12:34:56Z) | (optional) defaults to undefined|
|
|
54
|
+
| **documentDateTo** | [**string**] | UTC ISO 8601 (2024-11-29T12:34:56Z) | (optional) defaults to undefined|
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### Return type
|
|
58
|
+
|
|
59
|
+
void (empty response body)
|
|
60
|
+
|
|
61
|
+
### Authorization
|
|
62
|
+
|
|
63
|
+
[Basic](../README.md#Basic)
|
|
64
|
+
|
|
65
|
+
### HTTP request headers
|
|
66
|
+
|
|
67
|
+
- **Content-Type**: Not defined
|
|
68
|
+
- **Accept**: application/problem+json
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
### HTTP response details
|
|
72
|
+
| Status code | Description | Response headers |
|
|
73
|
+
|-------------|-------------|------------------|
|
|
74
|
+
|**200** | OK | - |
|
|
75
|
+
|**204** | No Content | - |
|
|
76
|
+
|**400** | Bad Request | - |
|
|
77
|
+
|
|
78
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
79
|
+
|
package/docs/LogApi.md
CHANGED
|
@@ -10,7 +10,7 @@ All URIs are relative to *http://localhost*
|
|
|
10
10
|
# **logGet**
|
|
11
11
|
> Array<Event> logGet()
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
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).
|
|
14
14
|
|
|
15
15
|
### Example
|
|
16
16
|
|
|
@@ -102,7 +102,7 @@ const { status, data } = await apiInstance.logGet(
|
|
|
102
102
|
# **logIdGet**
|
|
103
103
|
> Event logIdGet()
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
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).
|
|
106
106
|
|
|
107
107
|
### Example
|
|
108
108
|
|
package/docs/Receive.md
CHANGED
|
@@ -12,15 +12,15 @@ Name | Type | Description | Notes
|
|
|
12
12
|
**company_id** | **number** | Company id. On send, this is the sender and must be set in advance. On receive, it will be automatically set based on the recipient\'s VAT number. If a matching company is not found, the invoice will be rejected until the company is created. | [optional] [default to undefined]
|
|
13
13
|
**committente** | **string** | VAT number of the Cessionario/Committente (customer). This is automatically set based on the recipient\'s VAT number. | [optional] [default to undefined]
|
|
14
14
|
**prestatore** | **string** | VAT number of the Cedente/Prestatore (vendor). This is automatically set based on the sender\'s VAT number. | [optional] [default to undefined]
|
|
15
|
-
**identifier** | **string** | SDI identifier. This is set by the SDI and is
|
|
15
|
+
**identifier** | **string** | SDI identifier. This is set by the SDI and is guaranteed to be unique within the SDI system. | [optional] [default to undefined]
|
|
16
16
|
**file_name** | **string** | Xml file name. | [optional] [default to undefined]
|
|
17
17
|
**format** | **string** | SDI format (FPA12, FPR12, FSM10, ...) | [optional] [default to undefined]
|
|
18
|
-
**payload** | **string** | Xml
|
|
18
|
+
**payload** | **string** | Xml payload. This is the actual xml content, as string. On send, it can be base64 encoded. If it\'s not, it will be encoded before sending. It is guaranteed to be encrypted at rest. | [default to undefined]
|
|
19
19
|
**last_update** | **string** | Last update from SDI. | [optional] [default to undefined]
|
|
20
20
|
**date_sent** | **string** | When the invoice was sent to SDI. | [optional] [default to undefined]
|
|
21
21
|
**documents** | [**Array<DocumentData>**](DocumentData.md) | The invoices included in the payload. This is set by the system, based on the xml content. | [optional] [default to undefined]
|
|
22
22
|
**encoding** | **string** | Whether the payload is Base64 encoded or a plain XML (text). | [optional] [default to undefined]
|
|
23
|
-
**is_read** | **boolean** |
|
|
23
|
+
**is_read** | **boolean** | Whether the invoice has been read at least once. Set to true only when the invoice is requested with include_payload=true. | [optional] [default to undefined]
|
|
24
24
|
**message_id** | **string** | SDI message id. | [optional] [default to undefined]
|
|
25
25
|
|
|
26
26
|
## Example
|
package/docs/ReceiveApi.md
CHANGED
|
@@ -11,7 +11,7 @@ All URIs are relative to *http://localhost*
|
|
|
11
11
|
# **receiveGet**
|
|
12
12
|
> Array<Receive> receiveGet()
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
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/).
|
|
15
15
|
|
|
16
16
|
### Example
|
|
17
17
|
|
|
@@ -112,7 +112,7 @@ const { status, data } = await apiInstance.receiveGet(
|
|
|
112
112
|
# **receiveIdDelete**
|
|
113
113
|
> Receive receiveIdDelete()
|
|
114
114
|
|
|
115
|
-
Receive invoices are
|
|
115
|
+
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/).
|
|
116
116
|
|
|
117
117
|
### Example
|
|
118
118
|
|
|
@@ -159,6 +159,7 @@ const { status, data } = await apiInstance.receiveIdDelete(
|
|
|
159
159
|
|**200** | OK | - |
|
|
160
160
|
|**422** | Unprocessable Content | - |
|
|
161
161
|
|**400** | Bad Request | - |
|
|
162
|
+
|**409** | Conflict | - |
|
|
162
163
|
|**404** | Not Found | - |
|
|
163
164
|
|
|
164
165
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
@@ -166,7 +167,7 @@ const { status, data } = await apiInstance.receiveIdDelete(
|
|
|
166
167
|
# **receiveIdGet**
|
|
167
168
|
> Receive receiveIdGet()
|
|
168
169
|
|
|
169
|
-
|
|
170
|
+
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/).
|
|
170
171
|
|
|
171
172
|
### Example
|
|
172
173
|
|
package/docs/Send.md
CHANGED
|
@@ -12,10 +12,10 @@ Name | Type | Description | Notes
|
|
|
12
12
|
**company_id** | **number** | Company id. On send, this is the sender and must be set in advance. On receive, it will be automatically set based on the recipient\'s VAT number. If a matching company is not found, the invoice will be rejected until the company is created. | [optional] [default to undefined]
|
|
13
13
|
**committente** | **string** | VAT number of the Cessionario/Committente (customer). This is automatically set based on the recipient\'s VAT number. | [optional] [default to undefined]
|
|
14
14
|
**prestatore** | **string** | VAT number of the Cedente/Prestatore (vendor). This is automatically set based on the sender\'s VAT number. | [optional] [default to undefined]
|
|
15
|
-
**identifier** | **string** | SDI identifier. This is set by the SDI and is
|
|
15
|
+
**identifier** | **string** | SDI identifier. This is set by the SDI and is guaranteed to be unique within the SDI system. | [optional] [default to undefined]
|
|
16
16
|
**file_name** | **string** | Xml file name. | [optional] [default to undefined]
|
|
17
17
|
**format** | **string** | SDI format (FPA12, FPR12, FSM10, ...) | [optional] [default to undefined]
|
|
18
|
-
**payload** | **string** | Xml
|
|
18
|
+
**payload** | **string** | Xml payload. This is the actual xml content, as string. On send, it can be base64 encoded. If it\'s not, it will be encoded before sending. It is guaranteed to be encrypted at rest. | [default to undefined]
|
|
19
19
|
**last_update** | **string** | Last update from SDI. | [optional] [default to undefined]
|
|
20
20
|
**date_sent** | **string** | When the invoice was sent to SDI. | [optional] [default to undefined]
|
|
21
21
|
**documents** | [**Array<DocumentData>**](DocumentData.md) | The invoices included in the payload. This is set by the system, based on the xml content. | [optional] [default to undefined]
|