@invoicetronic/ts-sdk 1.7.0 → 1.9.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 (145) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/README.md +16 -2
  3. package/api.ts +2 -2
  4. package/base.ts +2 -2
  5. package/common.ts +2 -2
  6. package/configuration.ts +3 -3
  7. package/dist/api.d.ts +2 -2
  8. package/dist/api.js +2 -2
  9. package/dist/base.d.ts +2 -2
  10. package/dist/base.js +2 -2
  11. package/dist/common.d.ts +2 -2
  12. package/dist/common.js +2 -2
  13. package/dist/configuration.d.ts +2 -2
  14. package/dist/configuration.js +3 -3
  15. package/dist/esm/api.d.ts +2 -2
  16. package/dist/esm/api.js +2 -2
  17. package/dist/esm/base.d.ts +2 -2
  18. package/dist/esm/base.js +2 -2
  19. package/dist/esm/common.d.ts +2 -2
  20. package/dist/esm/common.js +2 -2
  21. package/dist/esm/configuration.d.ts +2 -2
  22. package/dist/esm/configuration.js +3 -3
  23. package/dist/esm/index.d.ts +2 -2
  24. package/dist/esm/index.js +2 -2
  25. package/dist/esm/src/api/company-api.d.ts +2 -2
  26. package/dist/esm/src/api/company-api.js +2 -2
  27. package/dist/esm/src/api/export-api.d.ts +2 -2
  28. package/dist/esm/src/api/export-api.js +2 -2
  29. package/dist/esm/src/api/health-api.d.ts +2 -2
  30. package/dist/esm/src/api/health-api.js +2 -2
  31. package/dist/esm/src/api/log-api.d.ts +2 -2
  32. package/dist/esm/src/api/log-api.js +2 -2
  33. package/dist/esm/src/api/receive-api.d.ts +17 -17
  34. package/dist/esm/src/api/receive-api.js +14 -14
  35. package/dist/esm/src/api/send-api.d.ts +99 -57
  36. package/dist/esm/src/api/send-api.js +114 -61
  37. package/dist/esm/src/api/status-api.d.ts +2 -2
  38. package/dist/esm/src/api/status-api.js +2 -2
  39. package/dist/esm/src/api/update-api.d.ts +2 -2
  40. package/dist/esm/src/api/update-api.js +2 -2
  41. package/dist/esm/src/api/webhook-api.d.ts +27 -27
  42. package/dist/esm/src/api/webhook-api.js +22 -22
  43. package/dist/esm/src/models/company.d.ts +4 -4
  44. package/dist/esm/src/models/company.js +2 -2
  45. package/dist/esm/src/models/document-data.d.ts +2 -2
  46. package/dist/esm/src/models/document-data.js +2 -2
  47. package/dist/esm/src/models/event.d.ts +3 -3
  48. package/dist/esm/src/models/event.js +2 -2
  49. package/dist/esm/src/models/model-error.d.ts +2 -2
  50. package/dist/esm/src/models/model-error.js +2 -2
  51. package/dist/esm/src/models/problem-details.d.ts +2 -2
  52. package/dist/esm/src/models/problem-details.js +2 -2
  53. package/dist/esm/src/models/receive.d.ts +6 -6
  54. package/dist/esm/src/models/receive.js +2 -2
  55. package/dist/esm/src/models/send-reduced.d.ts +18 -2
  56. package/dist/esm/src/models/send-reduced.js +13 -3
  57. package/dist/esm/src/models/send.d.ts +22 -6
  58. package/dist/esm/src/models/send.js +13 -2
  59. package/dist/esm/src/models/status.d.ts +10 -2
  60. package/dist/esm/src/models/status.js +2 -2
  61. package/dist/esm/src/models/update.d.ts +3 -3
  62. package/dist/esm/src/models/update.js +2 -2
  63. package/dist/esm/src/models/web-hook-history.d.ts +8 -4
  64. package/dist/esm/src/models/web-hook-history.js +2 -2
  65. package/dist/esm/src/models/web-hook.d.ts +9 -5
  66. package/dist/esm/src/models/web-hook.js +2 -2
  67. package/dist/index.d.ts +2 -2
  68. package/dist/index.js +2 -2
  69. package/dist/src/api/company-api.d.ts +2 -2
  70. package/dist/src/api/company-api.js +2 -2
  71. package/dist/src/api/export-api.d.ts +2 -2
  72. package/dist/src/api/export-api.js +2 -2
  73. package/dist/src/api/health-api.d.ts +2 -2
  74. package/dist/src/api/health-api.js +2 -2
  75. package/dist/src/api/log-api.d.ts +2 -2
  76. package/dist/src/api/log-api.js +2 -2
  77. package/dist/src/api/receive-api.d.ts +17 -17
  78. package/dist/src/api/receive-api.js +14 -14
  79. package/dist/src/api/send-api.d.ts +99 -57
  80. package/dist/src/api/send-api.js +115 -62
  81. package/dist/src/api/status-api.d.ts +2 -2
  82. package/dist/src/api/status-api.js +2 -2
  83. package/dist/src/api/update-api.d.ts +2 -2
  84. package/dist/src/api/update-api.js +2 -2
  85. package/dist/src/api/webhook-api.d.ts +27 -27
  86. package/dist/src/api/webhook-api.js +22 -22
  87. package/dist/src/models/company.d.ts +4 -4
  88. package/dist/src/models/company.js +2 -2
  89. package/dist/src/models/document-data.d.ts +2 -2
  90. package/dist/src/models/document-data.js +2 -2
  91. package/dist/src/models/event.d.ts +3 -3
  92. package/dist/src/models/event.js +2 -2
  93. package/dist/src/models/model-error.d.ts +2 -2
  94. package/dist/src/models/model-error.js +2 -2
  95. package/dist/src/models/problem-details.d.ts +2 -2
  96. package/dist/src/models/problem-details.js +2 -2
  97. package/dist/src/models/receive.d.ts +6 -6
  98. package/dist/src/models/receive.js +2 -2
  99. package/dist/src/models/send-reduced.d.ts +18 -2
  100. package/dist/src/models/send-reduced.js +14 -2
  101. package/dist/src/models/send.d.ts +22 -6
  102. package/dist/src/models/send.js +14 -3
  103. package/dist/src/models/status.d.ts +10 -2
  104. package/dist/src/models/status.js +2 -2
  105. package/dist/src/models/update.d.ts +3 -3
  106. package/dist/src/models/update.js +2 -2
  107. package/dist/src/models/web-hook-history.d.ts +8 -4
  108. package/dist/src/models/web-hook-history.js +2 -2
  109. package/dist/src/models/web-hook.d.ts +9 -5
  110. package/dist/src/models/web-hook.js +2 -2
  111. package/docs/Company.md +4 -4
  112. package/docs/Event.md +3 -3
  113. package/docs/Receive.md +12 -12
  114. package/docs/ReceiveApi.md +3 -3
  115. package/docs/Send.md +15 -13
  116. package/docs/SendApi.md +28 -10
  117. package/docs/SendReduced.md +2 -0
  118. package/docs/Status.md +4 -0
  119. package/docs/Update.md +3 -3
  120. package/docs/WebHook.md +7 -5
  121. package/docs/WebHookHistory.md +6 -4
  122. package/docs/WebhookApi.md +5 -5
  123. package/index.ts +2 -2
  124. package/package.json +1 -1
  125. package/src/api/company-api.ts +2 -2
  126. package/src/api/export-api.ts +2 -2
  127. package/src/api/health-api.ts +2 -2
  128. package/src/api/log-api.ts +2 -2
  129. package/src/api/receive-api.ts +17 -17
  130. package/src/api/send-api.ts +134 -72
  131. package/src/api/status-api.ts +2 -2
  132. package/src/api/update-api.ts +2 -2
  133. package/src/api/webhook-api.ts +27 -27
  134. package/src/models/company.ts +4 -4
  135. package/src/models/document-data.ts +2 -2
  136. package/src/models/event.ts +3 -3
  137. package/src/models/model-error.ts +2 -2
  138. package/src/models/problem-details.ts +2 -2
  139. package/src/models/receive.ts +6 -6
  140. package/src/models/send-reduced.ts +21 -2
  141. package/src/models/send.ts +23 -6
  142. package/src/models/status.ts +10 -2
  143. package/src/models/update.ts +3 -3
  144. package/src/models/web-hook-history.ts +8 -4
  145. package/src/models/web-hook.ts +9 -5
@@ -3,9 +3,9 @@
3
3
  /* eslint-disable */
4
4
  /**
5
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/
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] ## Before you start For the full integration guide, tutorials, SDKs and quickstarts, see the **[Documentation](https://invoicetronic.com/en/docs/)**. A few cross-cutting topics worth knowing before integrating: - **[Prerequisites](https://invoicetronic.com/en/docs/prerequisites/)** — what you need to start in Sandbox and what\'s required to move to production. - **[API Keys](https://invoicetronic.com/en/docs/apikeys/)** — how `ik_live_` and `ik_test_` keys select the environment. - **[Sandbox](https://invoicetronic.com/en/docs/sandbox/)** — free test environment that mirrors the live workflow, with no credits consumed. - **[Rate Limiting](https://invoicetronic.com/en/docs/ratelimiting/)** — per-second, per-minute and per-day limits; how to handle `429 Too Many Requests`. - **[Pagination](https://invoicetronic.com/en/docs/pagination/)** — `page` and `page_size` parameters and the `Invoicetronic-Total-Count` response header. - **[CORS](https://invoicetronic.com/en/docs/cors/)** — calling the API from the browser; allowed origins are configured per key. - **[Webhooks](https://invoicetronic.com/en/docs/webhooks/)** — real-time event notifications with HMAC-SHA256 signature validation. - **[Localization](https://invoicetronic.com/en/docs/accept-language/)** — use the `Accept-Language` header to receive error messages in Italian, English or German. [1]: https://www.fatturapa.gov.it/it/sistemainterscambio/cose-il-sdi/ [2]: https://invoicetronic.com/
7
7
  *
8
- * The version of the OpenAPI document: 1.6.4
8
+ * The version of the OpenAPI document: 1.14.0
9
9
  * Contact: info@invoicetronic.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -1,8 +1,8 @@
1
1
  /**
2
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/
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] ## Before you start For the full integration guide, tutorials, SDKs and quickstarts, see the **[Documentation](https://invoicetronic.com/en/docs/)**. A few cross-cutting topics worth knowing before integrating: - **[Prerequisites](https://invoicetronic.com/en/docs/prerequisites/)** — what you need to start in Sandbox and what\'s required to move to production. - **[API Keys](https://invoicetronic.com/en/docs/apikeys/)** — how `ik_live_` and `ik_test_` keys select the environment. - **[Sandbox](https://invoicetronic.com/en/docs/sandbox/)** — free test environment that mirrors the live workflow, with no credits consumed. - **[Rate Limiting](https://invoicetronic.com/en/docs/ratelimiting/)** — per-second, per-minute and per-day limits; how to handle `429 Too Many Requests`. - **[Pagination](https://invoicetronic.com/en/docs/pagination/)** — `page` and `page_size` parameters and the `Invoicetronic-Total-Count` response header. - **[CORS](https://invoicetronic.com/en/docs/cors/)** — calling the API from the browser; allowed origins are configured per key. - **[Webhooks](https://invoicetronic.com/en/docs/webhooks/)** — real-time event notifications with HMAC-SHA256 signature validation. - **[Localization](https://invoicetronic.com/en/docs/accept-language/)** — use the `Accept-Language` header to receive error messages in Italian, English or German. [1]: https://www.fatturapa.gov.it/it/sistemainterscambio/cose-il-sdi/ [2]: https://invoicetronic.com/
4
4
  *
5
- * The version of the OpenAPI document: 1.6.4
5
+ * The version of the OpenAPI document: 1.14.0
6
6
  * Contact: info@invoicetronic.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -14,7 +14,7 @@
14
14
  */
15
15
  export interface WebHook {
16
16
  /**
17
- * Unique identifier. Leave it at 0 for new records as it will be set automatically.
17
+ * Unique identifier. For POST requests, leave it at `0` the server will assign one automatically. For PUT requests, set it to the id of the record you want to update.
18
18
  */
19
19
  'id'?: number;
20
20
  /**
@@ -26,11 +26,11 @@ export interface WebHook {
26
26
  */
27
27
  'version'?: number;
28
28
  /**
29
- * User id.
29
+ * User id. It is set automatically based on the authenticated user.
30
30
  */
31
31
  'user_id'?: number;
32
32
  /**
33
- * Company id.
33
+ * Optional company id. If set, the webhook is restricted to events for that company; if omitted, it fires for all companies on the account.
34
34
  */
35
35
  'company_id'?: number | null;
36
36
  /**
@@ -53,4 +53,8 @@ export interface WebHook {
53
53
  * List of events that trigger the webhook. See Invoicetronic.SupportedEvents.Available for a list of valid event names.
54
54
  */
55
55
  'events'?: Array<string> | null;
56
+ /**
57
+ * Timestamp of the last failure notification email sent for this webhook. Set by the notifier service; reset to null on successful delivery.
58
+ */
59
+ 'failure_notified_at'?: string | null;
56
60
  }
@@ -3,9 +3,9 @@
3
3
  /* eslint-disable */
4
4
  /**
5
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/
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] ## Before you start For the full integration guide, tutorials, SDKs and quickstarts, see the **[Documentation](https://invoicetronic.com/en/docs/)**. A few cross-cutting topics worth knowing before integrating: - **[Prerequisites](https://invoicetronic.com/en/docs/prerequisites/)** — what you need to start in Sandbox and what\'s required to move to production. - **[API Keys](https://invoicetronic.com/en/docs/apikeys/)** — how `ik_live_` and `ik_test_` keys select the environment. - **[Sandbox](https://invoicetronic.com/en/docs/sandbox/)** — free test environment that mirrors the live workflow, with no credits consumed. - **[Rate Limiting](https://invoicetronic.com/en/docs/ratelimiting/)** — per-second, per-minute and per-day limits; how to handle `429 Too Many Requests`. - **[Pagination](https://invoicetronic.com/en/docs/pagination/)** — `page` and `page_size` parameters and the `Invoicetronic-Total-Count` response header. - **[CORS](https://invoicetronic.com/en/docs/cors/)** — calling the API from the browser; allowed origins are configured per key. - **[Webhooks](https://invoicetronic.com/en/docs/webhooks/)** — real-time event notifications with HMAC-SHA256 signature validation. - **[Localization](https://invoicetronic.com/en/docs/accept-language/)** — use the `Accept-Language` header to receive error messages in Italian, English or German. [1]: https://www.fatturapa.gov.it/it/sistemainterscambio/cose-il-sdi/ [2]: https://invoicetronic.com/
7
7
  *
8
- * The version of the OpenAPI document: 1.6.4
8
+ * The version of the OpenAPI document: 1.14.0
9
9
  * Contact: info@invoicetronic.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/docs/Company.md CHANGED
@@ -6,10 +6,10 @@ A company model.
6
6
 
7
7
  Name | Type | Description | Notes
8
8
  ------------ | ------------- | ------------- | -------------
9
- **id** | **number** | Unique identifier. Leave it at 0 for new records as it will be set automatically. | [optional] [default to undefined]
10
- **created** | **string** | Creation date. It is set automatically. | [optional] [default to undefined]
11
- **version** | **number** | Row version, for optimistic concurrency. It is set automatically. | [optional] [default to undefined]
12
- **user_id** | **number** | User id. | [optional] [default to undefined]
9
+ **id** | **number** | Unique identifier. For POST requests, leave it at &#x60;0&#x60; the server will assign one automatically. For PUT requests, set it to the id of the record you want to update. | [optional] [default to undefined]
10
+ **created** | **string** | Creation date. It is set automatically. | [optional] [readonly] [default to undefined]
11
+ **version** | **number** | Row version, for optimistic concurrency. It is set automatically. | [optional] [readonly] [default to undefined]
12
+ **user_id** | **number** | User id. It is set automatically based on the authenticated user. | [optional] [readonly] [default to undefined]
13
13
  **vat** | **string** | Vat number. Must include the country code. | [default to undefined]
14
14
  **fiscal_code** | **string** | Fiscal code. In most cases it\&#39;s the same as the vat number. | [default to undefined]
15
15
  **name** | **string** | Name | [default to undefined]
package/docs/Event.md CHANGED
@@ -6,9 +6,9 @@ An API request log entry.
6
6
 
7
7
  Name | Type | Description | Notes
8
8
  ------------ | ------------- | ------------- | -------------
9
- **id** | **number** | Unique identifier. Leave it at 0 for new records as it will be set automatically. | [optional] [default to undefined]
10
- **created** | **string** | Creation date. It is set automatically. | [optional] [default to undefined]
11
- **version** | **number** | Row version, for optimistic concurrency. It is set automatically. | [optional] [default to undefined]
9
+ **id** | **number** | Unique identifier. For POST requests, leave it at &#x60;0&#x60; the server will assign one automatically. For PUT requests, set it to the id of the record you want to update. | [optional] [default to undefined]
10
+ **created** | **string** | Creation date. It is set automatically. | [optional] [readonly] [default to undefined]
11
+ **version** | **number** | Row version, for optimistic concurrency. It is set automatically. | [optional] [readonly] [default to undefined]
12
12
  **user_id** | **number** | User id. | [optional] [default to undefined]
13
13
  **api_key_id** | **number** | Api key id. | [optional] [default to undefined]
14
14
  **company_id** | **number** | Company id. | [optional] [default to undefined]
package/docs/Receive.md CHANGED
@@ -6,20 +6,20 @@ A received invoice.
6
6
 
7
7
  Name | Type | Description | Notes
8
8
  ------------ | ------------- | ------------- | -------------
9
- **id** | **number** | Unique identifier. Leave it at 0 for new records as it will be set automatically. | [optional] [default to undefined]
10
- **created** | **string** | Creation date. It is set automatically. | [optional] [default to undefined]
11
- **version** | **number** | Row version, for optimistic concurrency. It is set automatically. | [optional] [default to undefined]
12
- **user_id** | **number** | User id. | [optional] [default to undefined]
13
- **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\&#39;s VAT number. If a matching company is not found, the invoice will be rejected until the company is created. | [optional] [default to undefined]
14
- **committente** | **string** | VAT number of the Cessionario/Committente (customer). This is automatically set based on the recipient\&#39;s VAT number. | [optional] [default to undefined]
15
- **prestatore** | **string** | VAT number of the Cedente/Prestatore (vendor). This is automatically set based on the sender\&#39;s VAT number. | [optional] [default to undefined]
16
- **identifier** | **string** | SDI identifier. This is set by the SDI and is guaranteed to be unique within the SDI system. | [optional] [default to undefined]
17
- **file_name** | **string** | Xml file name. | [optional] [default to undefined]
9
+ **id** | **number** | Unique identifier. For POST requests, leave it at &#x60;0&#x60; the server will assign one automatically. For PUT requests, set it to the id of the record you want to update. | [optional] [default to undefined]
10
+ **created** | **string** | Creation date. It is set automatically. | [optional] [readonly] [default to undefined]
11
+ **version** | **number** | Row version, for optimistic concurrency. It is set automatically. | [optional] [readonly] [default to undefined]
12
+ **user_id** | **number** | User id. It is set automatically based on the authenticated user. | [optional] [readonly] [default to undefined]
13
+ **company_id** | **number** | Company id. It is set automatically based on the VAT number extracted from the invoice payload (the sender for &#x60;send&#x60;, the recipient for &#x60;receive&#x60;). | [optional] [readonly] [default to undefined]
14
+ **committente** | **string** | VAT number of the Cessionario/Committente (customer). This is automatically set based on the recipient\&#39;s VAT number. | [optional] [readonly] [default to undefined]
15
+ **prestatore** | **string** | VAT number of the Cedente/Prestatore (vendor). This is automatically set based on the sender\&#39;s VAT number. | [optional] [readonly] [default to undefined]
16
+ **identifier** | **string** | SDI identifier. This is set by the SDI and is guaranteed to be unique within the SDI system. | [optional] [readonly] [default to undefined]
17
+ **file_name** | **string** | Xml file name. If not provided on send, it will be auto-generated. | [optional] [default to undefined]
18
18
  **format** | **string** | SDI format (FPA12, FPR12, FSM10, ...) | [optional] [default to undefined]
19
19
  **payload** | **string** | Xml payload. This is the actual xml content, as string. On send, it can be base64 encoded. If it\&#39;s not, it will be encoded before sending. It is guaranteed to be encrypted at rest. | [default to undefined]
20
- **last_update** | **string** | Last update from SDI. | [optional] [default to undefined]
21
- **date_sent** | **string** | When the invoice was sent to SDI. | [optional] [default to undefined]
22
- **documents** | [**Array&lt;DocumentData&gt;**](DocumentData.md) | The invoices included in the payload. This is set by the system, based on the xml content. | [optional] [default to undefined]
20
+ **last_update** | **string** | Last update from SDI. | [optional] [readonly] [default to undefined]
21
+ **date_sent** | **string** | When the invoice was sent to SDI. | [optional] [readonly] [default to undefined]
22
+ **documents** | [**Array&lt;DocumentData&gt;**](DocumentData.md) | The invoices included in the payload. This is set by the system, based on the xml content. | [optional] [readonly] [default to undefined]
23
23
  **encoding** | **string** | Whether the payload is Base64 encoded or a plain XML (text). | [optional] [default to undefined]
24
24
  **nome_prestatore** | **string** | Business name of the prestatore (supplier/seller) extracted from the invoice XML. | [optional] [default to undefined]
25
25
  **is_read** | **boolean** | Whether the invoice has been read at least once. Set to true only when the invoice is requested with include_payload&#x3D;true. | [optional] [default to undefined]
@@ -12,7 +12,7 @@ All URIs are relative to *http://localhost*
12
12
  # **receiveGet**
13
13
  > Array<Receive> receiveGet()
14
14
 
15
- Retrieve a paginated list of receive invoices. Results can be filtered by various criteria such as company, date ranges, sender, document number, and free-text search (`q`). 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
+ Retrieve a paginated list of receive invoices. Results can be filtered by various criteria such as company, date ranges, sender, document number, and free-text search (`q`). 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/). Inbound invoices are routed to your account via the recipient VAT number, so the recipient company must exist in Invoicetronic for the invoice to be matched. If an invoice arrives before its company has been registered, it is held by our SDI infrastructure and automatically re-processed once the company is created—no invoice is lost. See [Prerequisites](https://invoicetronic.com/en/docs/prerequisites/) for the recommended setup order.
16
16
 
17
17
  ### Example
18
18
 
@@ -115,7 +115,7 @@ const { status, data } = await apiInstance.receiveGet(
115
115
  # **receiveIdDelete**
116
116
  > Receive receiveIdDelete()
117
117
 
118
- 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/).
118
+ 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/). Inbound invoices are routed to your account via the recipient VAT number, so the recipient company must exist in Invoicetronic for the invoice to be matched. If an invoice arrives before its company has been registered, it is held by our SDI infrastructure and automatically re-processed once the company is created—no invoice is lost. See [Prerequisites](https://invoicetronic.com/en/docs/prerequisites/) for the recommended setup order.
119
119
 
120
120
  ### Example
121
121
 
@@ -167,7 +167,7 @@ const { status, data } = await apiInstance.receiveIdDelete(
167
167
  # **receiveIdGet**
168
168
  > Receive receiveIdGet()
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
+ 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/). Inbound invoices are routed to your account via the recipient VAT number, so the recipient company must exist in Invoicetronic for the invoice to be matched. If an invoice arrives before its company has been registered, it is held by our SDI infrastructure and automatically re-processed once the company is created—no invoice is lost. See [Prerequisites](https://invoicetronic.com/en/docs/prerequisites/) for the recommended setup order.
171
171
 
172
172
  ### Example
173
173
 
package/docs/Send.md CHANGED
@@ -6,23 +6,24 @@ A sent invoice.
6
6
 
7
7
  Name | Type | Description | Notes
8
8
  ------------ | ------------- | ------------- | -------------
9
- **id** | **number** | Unique identifier. Leave it at 0 for new records as it will be set automatically. | [optional] [default to undefined]
10
- **created** | **string** | Creation date. It is set automatically. | [optional] [default to undefined]
11
- **version** | **number** | Row version, for optimistic concurrency. It is set automatically. | [optional] [default to undefined]
12
- **user_id** | **number** | User id. | [optional] [default to undefined]
13
- **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\&#39;s VAT number. If a matching company is not found, the invoice will be rejected until the company is created. | [optional] [default to undefined]
14
- **committente** | **string** | VAT number of the Cessionario/Committente (customer). This is automatically set based on the recipient\&#39;s VAT number. | [optional] [default to undefined]
15
- **prestatore** | **string** | VAT number of the Cedente/Prestatore (vendor). This is automatically set based on the sender\&#39;s VAT number. | [optional] [default to undefined]
16
- **identifier** | **string** | SDI identifier. This is set by the SDI and is guaranteed to be unique within the SDI system. | [optional] [default to undefined]
17
- **file_name** | **string** | Xml file name. | [optional] [default to undefined]
9
+ **id** | **number** | Unique identifier. For POST requests, leave it at &#x60;0&#x60; the server will assign one automatically. For PUT requests, set it to the id of the record you want to update. | [optional] [default to undefined]
10
+ **created** | **string** | Creation date. It is set automatically. | [optional] [readonly] [default to undefined]
11
+ **version** | **number** | Row version, for optimistic concurrency. It is set automatically. | [optional] [readonly] [default to undefined]
12
+ **user_id** | **number** | User id. It is set automatically based on the authenticated user. | [optional] [readonly] [default to undefined]
13
+ **company_id** | **number** | Company id. It is set automatically based on the VAT number extracted from the invoice payload (the sender for &#x60;send&#x60;, the recipient for &#x60;receive&#x60;). | [optional] [readonly] [default to undefined]
14
+ **committente** | **string** | VAT number of the Cessionario/Committente (customer). This is automatically set based on the recipient\&#39;s VAT number. | [optional] [readonly] [default to undefined]
15
+ **prestatore** | **string** | VAT number of the Cedente/Prestatore (vendor). This is automatically set based on the sender\&#39;s VAT number. | [optional] [readonly] [default to undefined]
16
+ **identifier** | **string** | SDI identifier. This is set by the SDI and is guaranteed to be unique within the SDI system. | [optional] [readonly] [default to undefined]
17
+ **file_name** | **string** | Xml file name. If not provided on send, it will be auto-generated. | [optional] [default to undefined]
18
18
  **format** | **string** | SDI format (FPA12, FPR12, FSM10, ...) | [optional] [default to undefined]
19
19
  **payload** | **string** | Xml payload. This is the actual xml content, as string. On send, it can be base64 encoded. If it\&#39;s not, it will be encoded before sending. It is guaranteed to be encrypted at rest. | [default to undefined]
20
- **last_update** | **string** | Last update from SDI. | [optional] [default to undefined]
21
- **date_sent** | **string** | When the invoice was sent to SDI. | [optional] [default to undefined]
22
- **documents** | [**Array&lt;DocumentData&gt;**](DocumentData.md) | The invoices included in the payload. This is set by the system, based on the xml content. | [optional] [default to undefined]
20
+ **last_update** | **string** | Last update from SDI. | [optional] [readonly] [default to undefined]
21
+ **date_sent** | **string** | When the invoice was sent to SDI. | [optional] [readonly] [default to undefined]
22
+ **documents** | [**Array&lt;DocumentData&gt;**](DocumentData.md) | The invoices included in the payload. This is set by the system, based on the xml content. | [optional] [readonly] [default to undefined]
23
23
  **encoding** | **string** | Whether the payload is Base64 encoded or a plain XML (text). | [optional] [default to undefined]
24
- **nome_committente** | **string** | Business name of the committente (client/buyer) extracted from the invoice XML. | [optional] [default to undefined]
24
+ **nome_committente** | **string** | Business name of the committente (client/buyer) extracted from the invoice XML. | [optional] [readonly] [default to undefined]
25
25
  **meta_data** | **{ [key: string]: string; }** | Optional metadata, as json. | [optional] [default to undefined]
26
+ **latest_state** | **string** | Current SDI state of the invoice. Reflects the most recent update received from SDI. Null when no update has been received yet. | [optional] [readonly] [default to undefined]
26
27
  **company** | [**Company**](Company.md) | | [optional] [default to undefined]
27
28
 
28
29
  ## Example
@@ -48,6 +49,7 @@ const instance: Send = {
48
49
  encoding,
49
50
  nome_committente,
50
51
  meta_data,
52
+ latest_state,
51
53
  company,
52
54
  };
53
55
  ```
package/docs/SendApi.md CHANGED
@@ -20,7 +20,7 @@ All URIs are relative to *http://localhost*
20
20
  # **sendFilePost**
21
21
  > Send sendFilePost()
22
22
 
23
- Add a new invoice by uploading a file. Supported formats are XML (FatturaPA) and P7M (signed). The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com).
23
+ Add a new invoice by uploading a file. Supported formats are XML (FatturaPA) and P7M (signed). The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com). ### Idempotency To protect against duplicate submissions caused by network retries, you can send an optional `Idempotency-Key` header with any unique, client-generated value (up to 255 characters). - The first request with a given key is processed normally, and its response (status, body and `Location`) is stored for 24 hours. - Any subsequent request that reuses the same key within that window replays the original response instead of sending a second invoice to SDI. - If a request with the same key is still being processed, the retry receives `409 Conflict`. - If the same key is reused with a **different** invoice payload, the request is rejected with `422 Unprocessable Entity`: a given key must always map to the same request. Keys are scoped per account, so different accounts can use the same key value without interfering. If the idempotency store is temporarily unavailable, the request is processed normally without idempotency protection.
24
24
 
25
25
  ### Example
26
26
 
@@ -36,11 +36,13 @@ const apiInstance = new SendApi(configuration);
36
36
  let file: File; // (default to undefined)
37
37
  let validate: boolean; //Validate the document first, and reject it on failure. (optional) (default to false)
38
38
  let signature: 'None' | 'Apply' | 'Force' | 'Auto'; //Whether to digitally sign the document. (optional) (default to 'Auto')
39
+ let idempotencyKey: string; //Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice. (optional) (default to undefined)
39
40
 
40
41
  const { status, data } = await apiInstance.sendFilePost(
41
42
  file,
42
43
  validate,
43
- signature
44
+ signature,
45
+ idempotencyKey
44
46
  );
45
47
  ```
46
48
 
@@ -51,6 +53,7 @@ const { status, data } = await apiInstance.sendFilePost(
51
53
  | **file** | [**File**] | | defaults to undefined|
52
54
  | **validate** | [**boolean**] | Validate the document first, and reject it on failure. | (optional) defaults to false|
53
55
  | **signature** | [**&#39;None&#39; | &#39;Apply&#39; | &#39;Force&#39; | &#39;Auto&#39;**]**Array<&#39;None&#39; &#124; &#39;Apply&#39; &#124; &#39;Force&#39; &#124; &#39;Auto&#39;>** | Whether to digitally sign the document. | (optional) defaults to 'Auto'|
56
+ | **idempotencyKey** | [**string**] | Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice. | (optional) defaults to undefined|
54
57
 
55
58
 
56
59
  ### Return type
@@ -78,7 +81,7 @@ const { status, data } = await apiInstance.sendFilePost(
78
81
  # **sendGet**
79
82
  > Array<Send> sendGet()
80
83
 
81
- Retrieve a paginated list of send invoices. Results can be filtered by various criteria such as company, date ranges, document number, and free-text search (`q`). Returns invoice metadata; set `include_payload` to true to include the full invoice content. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
84
+ Retrieve a paginated list of send invoices. Results can be filtered by various criteria such as company, date ranges, document number, current SDI state (`latest_state`), and free-text search (`q`). Use `ids` to fetch specific Send records in a single call (comma-separated, up to 100). Returns invoice metadata; set `include_payload` to true to include the full invoice content. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
82
85
 
83
86
  ### Example
84
87
 
@@ -103,7 +106,9 @@ let dateSentTo: string; //UTC ISO 8601 (2024-11-29T12:34:56Z) (optional) (defaul
103
106
  let documentDateFrom: string; //UTC ISO 8601 (2024-11-29T12:34:56Z) (optional) (default to undefined)
104
107
  let documentDateTo: string; //UTC ISO 8601 (2024-11-29T12:34:56Z) (optional) (default to undefined)
105
108
  let documentNumber: string; //Document number. (optional) (default to undefined)
109
+ let latestState: 'Inviato' | 'Consegnato' | 'NonConsegnato' | 'Scartato' | 'AccettatoDalDestinatario' | 'RifiutatoDalDestinatario' | 'ImpossibilitaDiRecapito' | 'DecorrenzaTermini' | 'AttestazioneTrasmissioneFattura'; //Filter by the most recent SDI state for the invoice. Matches the `latest_state` field exposed inline on each Send. (optional) (default to undefined)
106
110
  let includePayload: boolean; //Include payload in the response. Defaults to false. (optional) (default to undefined)
111
+ let ids: string; //Comma-separated list of Send ids (max 100). Filters the collection to the matching rows; unknown or unauthorized ids are silently skipped. (optional) (default to undefined)
107
112
  let page: number; //Page number. (optional) (default to 1)
108
113
  let pageSize: number; //Items per page. Cannot be greater than 200. (optional) (default to 100)
109
114
  let sort: string; //Sort by field. Prefix with \'-\' for descending order. (optional) (default to undefined)
@@ -122,7 +127,9 @@ const { status, data } = await apiInstance.sendGet(
122
127
  documentDateFrom,
123
128
  documentDateTo,
124
129
  documentNumber,
130
+ latestState,
125
131
  includePayload,
132
+ ids,
126
133
  page,
127
134
  pageSize,
128
135
  sort,
@@ -146,7 +153,9 @@ const { status, data } = await apiInstance.sendGet(
146
153
  | **documentDateFrom** | [**string**] | UTC ISO 8601 (2024-11-29T12:34:56Z) | (optional) defaults to undefined|
147
154
  | **documentDateTo** | [**string**] | UTC ISO 8601 (2024-11-29T12:34:56Z) | (optional) defaults to undefined|
148
155
  | **documentNumber** | [**string**] | Document number. | (optional) defaults to undefined|
156
+ | **latestState** | [**&#39;Inviato&#39; | &#39;Consegnato&#39; | &#39;NonConsegnato&#39; | &#39;Scartato&#39; | &#39;AccettatoDalDestinatario&#39; | &#39;RifiutatoDalDestinatario&#39; | &#39;ImpossibilitaDiRecapito&#39; | &#39;DecorrenzaTermini&#39; | &#39;AttestazioneTrasmissioneFattura&#39;**]**Array<&#39;Inviato&#39; &#124; &#39;Consegnato&#39; &#124; &#39;NonConsegnato&#39; &#124; &#39;Scartato&#39; &#124; &#39;AccettatoDalDestinatario&#39; &#124; &#39;RifiutatoDalDestinatario&#39; &#124; &#39;ImpossibilitaDiRecapito&#39; &#124; &#39;DecorrenzaTermini&#39; &#124; &#39;AttestazioneTrasmissioneFattura&#39;>** | Filter by the most recent SDI state for the invoice. Matches the &#x60;latest_state&#x60; field exposed inline on each Send. | (optional) defaults to undefined|
149
157
  | **includePayload** | [**boolean**] | Include payload in the response. Defaults to false. | (optional) defaults to undefined|
158
+ | **ids** | [**string**] | Comma-separated list of Send ids (max 100). Filters the collection to the matching rows; unknown or unauthorized ids are silently skipped. | (optional) defaults to undefined|
150
159
  | **page** | [**number**] | Page number. | (optional) defaults to 1|
151
160
  | **pageSize** | [**number**] | Items per page. Cannot be greater than 200. | (optional) defaults to 100|
152
161
  | **sort** | [**string**] | Sort by field. Prefix with \&#39;-\&#39; for descending order. | (optional) defaults to undefined|
@@ -340,7 +349,7 @@ const { status, data } = await apiInstance.sendIdentifierGet(
340
349
  # **sendJsonPost**
341
350
  > Send sendJsonPost(body)
342
351
 
343
- Add a new invoice using a FatturaPA JSON representation. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com).
352
+ Add a new invoice using a FatturaPA JSON representation. Property names mirror the FatturaPA XML schema (PascalCase, e.g. `FatturaElettronicaHeader`). The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com). ### Idempotency To protect against duplicate submissions caused by network retries, you can send an optional `Idempotency-Key` header with any unique, client-generated value (up to 255 characters). - The first request with a given key is processed normally, and its response (status, body and `Location`) is stored for 24 hours. - Any subsequent request that reuses the same key within that window replays the original response instead of sending a second invoice to SDI. - If a request with the same key is still being processed, the retry receives `409 Conflict`. - If the same key is reused with a **different** invoice payload, the request is rejected with `422 Unprocessable Entity`: a given key must always map to the same request. Keys are scoped per account, so different accounts can use the same key value without interfering. If the idempotency store is temporarily unavailable, the request is processed normally without idempotency protection.
344
353
 
345
354
  ### Example
346
355
 
@@ -356,11 +365,13 @@ const apiInstance = new SendApi(configuration);
356
365
  let body: object; //
357
366
  let validate: boolean; //Validate the document first, and reject it on failure. (optional) (default to false)
358
367
  let signature: 'None' | 'Apply' | 'Force' | 'Auto'; //Whether to digitally sign the document. (optional) (default to 'Auto')
368
+ let idempotencyKey: string; //Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice. (optional) (default to undefined)
359
369
 
360
370
  const { status, data } = await apiInstance.sendJsonPost(
361
371
  body,
362
372
  validate,
363
- signature
373
+ signature,
374
+ idempotencyKey
364
375
  );
365
376
  ```
366
377
 
@@ -371,6 +382,7 @@ const { status, data } = await apiInstance.sendJsonPost(
371
382
  | **body** | **object**| | |
372
383
  | **validate** | [**boolean**] | Validate the document first, and reject it on failure. | (optional) defaults to false|
373
384
  | **signature** | [**&#39;None&#39; | &#39;Apply&#39; | &#39;Force&#39; | &#39;Auto&#39;**]**Array<&#39;None&#39; &#124; &#39;Apply&#39; &#124; &#39;Force&#39; &#124; &#39;Auto&#39;>** | Whether to digitally sign the document. | (optional) defaults to 'Auto'|
385
+ | **idempotencyKey** | [**string**] | Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice. | (optional) defaults to undefined|
374
386
 
375
387
 
376
388
  ### Return type
@@ -398,7 +410,7 @@ const { status, data } = await apiInstance.sendJsonPost(
398
410
  # **sendPost**
399
411
  > Send sendPost(send)
400
412
 
401
- Add a new invoice using a structured Send object. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com).
413
+ Add a new invoice using a structured Send object. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com). ### Idempotency To protect against duplicate submissions caused by network retries, you can send an optional `Idempotency-Key` header with any unique, client-generated value (up to 255 characters). - The first request with a given key is processed normally, and its response (status, body and `Location`) is stored for 24 hours. - Any subsequent request that reuses the same key within that window replays the original response instead of sending a second invoice to SDI. - If a request with the same key is still being processed, the retry receives `409 Conflict`. - If the same key is reused with a **different** invoice payload, the request is rejected with `422 Unprocessable Entity`: a given key must always map to the same request. Keys are scoped per account, so different accounts can use the same key value without interfering. If the idempotency store is temporarily unavailable, the request is processed normally without idempotency protection.
402
414
 
403
415
  ### Example
404
416
 
@@ -415,11 +427,13 @@ const apiInstance = new SendApi(configuration);
415
427
  let send: Send; //
416
428
  let validate: boolean; //Validate the document first, and reject it on failure. (optional) (default to false)
417
429
  let signature: 'None' | 'Apply' | 'Force' | 'Auto'; //Whether to digitally sign the document. (optional) (default to 'Auto')
430
+ let idempotencyKey: string; //Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice. (optional) (default to undefined)
418
431
 
419
432
  const { status, data } = await apiInstance.sendPost(
420
433
  send,
421
434
  validate,
422
- signature
435
+ signature,
436
+ idempotencyKey
423
437
  );
424
438
  ```
425
439
 
@@ -430,6 +444,7 @@ const { status, data } = await apiInstance.sendPost(
430
444
  | **send** | **Send**| | |
431
445
  | **validate** | [**boolean**] | Validate the document first, and reject it on failure. | (optional) defaults to false|
432
446
  | **signature** | [**&#39;None&#39; | &#39;Apply&#39; | &#39;Force&#39; | &#39;Auto&#39;**]**Array<&#39;None&#39; &#124; &#39;Apply&#39; &#124; &#39;Force&#39; &#124; &#39;Auto&#39;>** | Whether to digitally sign the document. | (optional) defaults to 'Auto'|
447
+ | **idempotencyKey** | [**string**] | Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice. | (optional) defaults to undefined|
433
448
 
434
449
 
435
450
  ### Return type
@@ -509,7 +524,7 @@ void (empty response body)
509
524
  # **sendValidateJsonPost**
510
525
  > sendValidateJsonPost(body)
511
526
 
512
- Validate a JSON invoice without sending it to SDI. Use this to check for errors before actual submission. Returns validation results with any errors found. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
527
+ Validate a FatturaPA JSON invoice without sending it to SDI. Property names mirror the FatturaPA XML schema (PascalCase, e.g. `FatturaElettronicaHeader`). Use this to check for errors before actual submission. Returns validation results with any errors found. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
513
528
 
514
529
  ### Example
515
530
 
@@ -666,7 +681,7 @@ void (empty response body)
666
681
  # **sendXmlPost**
667
682
  > Send sendXmlPost(body)
668
683
 
669
- Add a new invoice using a raw XML document in FatturaPA format. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com).
684
+ Add a new invoice using a raw XML document in FatturaPA format. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com). ### Idempotency To protect against duplicate submissions caused by network retries, you can send an optional `Idempotency-Key` header with any unique, client-generated value (up to 255 characters). - The first request with a given key is processed normally, and its response (status, body and `Location`) is stored for 24 hours. - Any subsequent request that reuses the same key within that window replays the original response instead of sending a second invoice to SDI. - If a request with the same key is still being processed, the retry receives `409 Conflict`. - If the same key is reused with a **different** invoice payload, the request is rejected with `422 Unprocessable Entity`: a given key must always map to the same request. Keys are scoped per account, so different accounts can use the same key value without interfering. If the idempotency store is temporarily unavailable, the request is processed normally without idempotency protection.
670
685
 
671
686
  ### Example
672
687
 
@@ -682,11 +697,13 @@ const apiInstance = new SendApi(configuration);
682
697
  let body: object; //
683
698
  let validate: boolean; //Validate the document first, and reject it on failure. (optional) (default to false)
684
699
  let signature: 'None' | 'Apply' | 'Force' | 'Auto'; //Whether to digitally sign the document. (optional) (default to 'Auto')
700
+ let idempotencyKey: string; //Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice. (optional) (default to undefined)
685
701
 
686
702
  const { status, data } = await apiInstance.sendXmlPost(
687
703
  body,
688
704
  validate,
689
- signature
705
+ signature,
706
+ idempotencyKey
690
707
  );
691
708
  ```
692
709
 
@@ -697,6 +714,7 @@ const { status, data } = await apiInstance.sendXmlPost(
697
714
  | **body** | **object**| | |
698
715
  | **validate** | [**boolean**] | Validate the document first, and reject it on failure. | (optional) defaults to false|
699
716
  | **signature** | [**&#39;None&#39; | &#39;Apply&#39; | &#39;Force&#39; | &#39;Auto&#39;**]**Array<&#39;None&#39; &#124; &#39;Apply&#39; &#124; &#39;Force&#39; &#124; &#39;Auto&#39;>** | Whether to digitally sign the document. | (optional) defaults to 'Auto'|
717
+ | **idempotencyKey** | [**string**] | Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice. | (optional) defaults to undefined|
700
718
 
701
719
 
702
720
  ### Return type
@@ -11,6 +11,7 @@ Name | Type | Description | Notes
11
11
  **meta_data** | **{ [key: string]: string; }** | Optional metadata, as json. | [optional] [default to undefined]
12
12
  **documents** | [**Array&lt;DocumentData&gt;**](DocumentData.md) | The invoices included in the payload. | [optional] [default to undefined]
13
13
  **date_sent** | **string** | When the invoice was sent to SDI. | [optional] [default to undefined]
14
+ **latest_state** | **string** | Current SDI state of the invoice. Reflects the most recent update received from SDI. | [optional] [default to undefined]
14
15
 
15
16
  ## Example
16
17
 
@@ -23,6 +24,7 @@ const instance: SendReduced = {
23
24
  meta_data,
24
25
  documents,
25
26
  date_sent,
27
+ latest_state,
26
28
  };
27
29
  ```
28
30
 
package/docs/Status.md CHANGED
@@ -8,6 +8,8 @@ Name | Type | Description | Notes
8
8
  ------------ | ------------- | ------------- | -------------
9
9
  **operation_left** | **number** | Operations (invoices and validations) left. | [optional] [default to undefined]
10
10
  **signature_left** | **number** | Signatures left. | [optional] [default to undefined]
11
+ **has_active_seat** | **boolean** | Whether the current API key has an active Desk seat. | [optional] [default to undefined]
12
+ **is_sub_key** | **boolean** | Whether the current API key is a sub-key (restricted key). | [optional] [default to undefined]
11
13
 
12
14
  ## Example
13
15
 
@@ -17,6 +19,8 @@ import { Status } from '@invoicetronic/ts-sdk';
17
19
  const instance: Status = {
18
20
  operation_left,
19
21
  signature_left,
22
+ has_active_seat,
23
+ is_sub_key,
20
24
  };
21
25
  ```
22
26
 
package/docs/Update.md CHANGED
@@ -6,9 +6,9 @@ An SDI status update for a sent invoice.
6
6
 
7
7
  Name | Type | Description | Notes
8
8
  ------------ | ------------- | ------------- | -------------
9
- **id** | **number** | Unique identifier. Leave it at 0 for new records as it will be set automatically. | [optional] [default to undefined]
10
- **created** | **string** | Creation date. It is set automatically. | [optional] [default to undefined]
11
- **version** | **number** | Row version, for optimistic concurrency. It is set automatically. | [optional] [default to undefined]
9
+ **id** | **number** | Unique identifier. For POST requests, leave it at &#x60;0&#x60; the server will assign one automatically. For PUT requests, set it to the id of the record you want to update. | [optional] [default to undefined]
10
+ **created** | **string** | Creation date. It is set automatically. | [optional] [readonly] [default to undefined]
11
+ **version** | **number** | Row version, for optimistic concurrency. It is set automatically. | [optional] [readonly] [default to undefined]
12
12
  **user_id** | **number** | User id. | [optional] [default to undefined]
13
13
  **company_id** | **number** | Company id. | [optional] [default to undefined]
14
14
  **send_id** | **number** | Send id. This is the id of the sent invoice to which this update refers to. | [optional] [default to undefined]
package/docs/WebHook.md CHANGED
@@ -6,16 +6,17 @@ A webhook subscription.
6
6
 
7
7
  Name | Type | Description | Notes
8
8
  ------------ | ------------- | ------------- | -------------
9
- **id** | **number** | Unique identifier. Leave it at 0 for new records as it will be set automatically. | [optional] [default to undefined]
10
- **created** | **string** | Creation date. It is set automatically. | [optional] [default to undefined]
11
- **version** | **number** | Row version, for optimistic concurrency. It is set automatically. | [optional] [default to undefined]
12
- **user_id** | **number** | User id. | [optional] [default to undefined]
13
- **company_id** | **number** | Company id. | [optional] [default to undefined]
9
+ **id** | **number** | Unique identifier. For POST requests, leave it at &#x60;0&#x60; the server will assign one automatically. For PUT requests, set it to the id of the record you want to update. | [optional] [default to undefined]
10
+ **created** | **string** | Creation date. It is set automatically. | [optional] [readonly] [default to undefined]
11
+ **version** | **number** | Row version, for optimistic concurrency. It is set automatically. | [optional] [readonly] [default to undefined]
12
+ **user_id** | **number** | User id. It is set automatically based on the authenticated user. | [optional] [readonly] [default to undefined]
13
+ **company_id** | **number** | Optional company id. If set, the webhook is restricted to events for that company; if omitted, it fires for all companies on the account. | [optional] [default to undefined]
14
14
  **url** | **string** | The url of your application\&#39;s endpoint that will receive a POST request when the webhook is fired. | [default to undefined]
15
15
  **enabled** | **boolean** | Whether the webhook is enabled. On creation, this is set to &#x60;true&#x60;. | [optional] [default to undefined]
16
16
  **secret** | **string** | The secret used to generate webhook signatures, only returned on creation. You should store this value securely and validate it on every call, to ensure that the caller is InvoicetronicApi. | [optional] [default to undefined]
17
17
  **description** | **string** | An optional description. | [optional] [default to undefined]
18
18
  **events** | **Array&lt;string&gt;** | List of events that trigger the webhook. See Invoicetronic.SupportedEvents.Available for a list of valid event names. | [optional] [default to undefined]
19
+ **failure_notified_at** | **string** | Timestamp of the last failure notification email sent for this webhook. Set by the notifier service; reset to null on successful delivery. | [optional] [readonly] [default to undefined]
19
20
 
20
21
  ## Example
21
22
 
@@ -33,6 +34,7 @@ const instance: WebHook = {
33
34
  secret,
34
35
  description,
35
36
  events,
37
+ failure_notified_at,
36
38
  };
37
39
  ```
38
40
 
@@ -6,13 +6,14 @@ Webhook history.
6
6
 
7
7
  Name | Type | Description | Notes
8
8
  ------------ | ------------- | ------------- | -------------
9
- **id** | **number** | Unique identifier. Leave it at 0 for new records as it will be set automatically. | [optional] [default to undefined]
10
- **created** | **string** | Creation date. It is set automatically. | [optional] [default to undefined]
11
- **version** | **number** | Row version, for optimistic concurrency. It is set automatically. | [optional] [default to undefined]
9
+ **id** | **number** | Unique identifier. For POST requests, leave it at &#x60;0&#x60; the server will assign one automatically. For PUT requests, set it to the id of the record you want to update. | [optional] [default to undefined]
10
+ **created** | **string** | Creation date. It is set automatically. | [optional] [readonly] [default to undefined]
11
+ **version** | **number** | Row version, for optimistic concurrency. It is set automatically. | [optional] [readonly] [default to undefined]
12
12
  **web_hook_id** | **number** | Webhook id. | [optional] [default to undefined]
13
13
  **user_id** | **number** | User id. | [optional] [default to undefined]
14
14
  **event** | **string** | Event name. | [optional] [default to undefined]
15
- **status_code** | **number** | Status code. | [optional] [default to undefined]
15
+ **status_code** | **number** | HTTP status code returned by the webhook endpoint. A value of 0 means the request could not be completed due to a network error (e.g., DNS resolution failure, connection refused, or timeout). This typically indicates that the endpoint URL is misconfigured or no longer exists. | [optional] [default to undefined]
16
+ **error** | **string** | Error description, if any. Null when the delivery is successful (2xx). Contains the exception message for network errors (status code 0) or the response body for non-2xx HTTP responses. | [optional] [default to undefined]
16
17
  **date_time** | **string** | Date and time of the request. | [optional] [default to undefined]
17
18
  **success** | **boolean** | Whether the request was successful. | [optional] [readonly] [default to undefined]
18
19
 
@@ -29,6 +30,7 @@ const instance: WebHookHistory = {
29
30
  user_id,
30
31
  event,
31
32
  status_code,
33
+ error,
32
34
  date_time,
33
35
  success,
34
36
  };
@@ -15,7 +15,7 @@ All URIs are relative to *http://localhost*
15
15
  # **webhookGet**
16
16
  > Array<WebHook> webhookGet()
17
17
 
18
- 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/)**.
18
+ 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). A webhook that fails continuously for 7 days (no successful delivery in between) is automatically disabled (`enabled` set to `false`) and the account owner is notified by email. To resume deliveries, set `enabled` back to `true` from the Dashboard or via `PATCH /webhook/{id}`. For more information, see the **[Webhooks documentation page](https://invoicetronic.com/en/docs/webhooks/)**.
19
19
 
20
20
  ### Example
21
21
 
@@ -88,7 +88,7 @@ const { status, data } = await apiInstance.webhookGet(
88
88
  # **webhookIdDelete**
89
89
  > WebHook webhookIdDelete()
90
90
 
91
- 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/)**.
91
+ 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). A webhook that fails continuously for 7 days (no successful delivery in between) is automatically disabled (`enabled` set to `false`) and the account owner is notified by email. To resume deliveries, set `enabled` back to `true` from the Dashboard or via `PATCH /webhook/{id}`. For more information, see the **[Webhooks documentation page](https://invoicetronic.com/en/docs/webhooks/)**.
92
92
 
93
93
  ### Example
94
94
 
@@ -140,7 +140,7 @@ const { status, data } = await apiInstance.webhookIdDelete(
140
140
  # **webhookIdGet**
141
141
  > WebHook webhookIdGet()
142
142
 
143
- 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/)**.
143
+ 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). A webhook that fails continuously for 7 days (no successful delivery in between) is automatically disabled (`enabled` set to `false`) and the account owner is notified by email. To resume deliveries, set `enabled` back to `true` from the Dashboard or via `PATCH /webhook/{id}`. For more information, see the **[Webhooks documentation page](https://invoicetronic.com/en/docs/webhooks/)**.
144
144
 
145
145
  ### Example
146
146
 
@@ -192,7 +192,7 @@ const { status, data } = await apiInstance.webhookIdGet(
192
192
  # **webhookPost**
193
193
  > WebHook webhookPost(webHook)
194
194
 
195
- 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/)**.
195
+ 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). A webhook that fails continuously for 7 days (no successful delivery in between) is automatically disabled (`enabled` set to `false`) and the account owner is notified by email. To resume deliveries, set `enabled` back to `true` from the Dashboard or via `PATCH /webhook/{id}`. For more information, see the **[Webhooks documentation page](https://invoicetronic.com/en/docs/webhooks/)**.
196
196
 
197
197
  ### Example
198
198
 
@@ -245,7 +245,7 @@ const { status, data } = await apiInstance.webhookPost(
245
245
  # **webhookPut**
246
246
  > WebHook webhookPut(webHook)
247
247
 
248
- 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/)**.
248
+ 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). A webhook that fails continuously for 7 days (no successful delivery in between) is automatically disabled (`enabled` set to `false`) and the account owner is notified by email. To resume deliveries, set `enabled` back to `true` from the Dashboard or via `PATCH /webhook/{id}`. For more information, see the **[Webhooks documentation page](https://invoicetronic.com/en/docs/webhooks/)**.
249
249
 
250
250
  ### Example
251
251