@invoicetronic/ts-sdk 1.1.7 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/README.md +2 -2
  3. package/api.ts +1 -0
  4. package/common.ts +15 -2
  5. package/configuration.ts +1 -1
  6. package/dist/api.d.ts +1 -0
  7. package/dist/api.js +1 -0
  8. package/dist/common.d.ts +6 -0
  9. package/dist/common.js +17 -3
  10. package/dist/configuration.js +1 -1
  11. package/dist/esm/api.d.ts +1 -0
  12. package/dist/esm/api.js +1 -0
  13. package/dist/esm/common.d.ts +6 -0
  14. package/dist/esm/common.js +15 -2
  15. package/dist/esm/configuration.js +1 -1
  16. package/dist/esm/src/api/company-api.d.ts +35 -30
  17. package/dist/esm/src/api/company-api.js +34 -27
  18. package/dist/esm/src/api/export-api.d.ts +115 -0
  19. package/dist/esm/src/api/export-api.js +179 -0
  20. package/dist/esm/src/api/log-api.d.ts +10 -10
  21. package/dist/esm/src/api/log-api.js +8 -8
  22. package/dist/esm/src/api/receive-api.d.ts +15 -15
  23. package/dist/esm/src/api/receive-api.js +12 -12
  24. package/dist/esm/src/api/send-api.d.ts +55 -55
  25. package/dist/esm/src/api/send-api.js +44 -44
  26. package/dist/esm/src/api/status-api.d.ts +5 -5
  27. package/dist/esm/src/api/status-api.js +4 -4
  28. package/dist/esm/src/api/update-api.d.ts +10 -10
  29. package/dist/esm/src/api/update-api.js +8 -8
  30. package/dist/esm/src/api/webhook-api.d.ts +25 -25
  31. package/dist/esm/src/api/webhook-api.js +20 -20
  32. package/dist/esm/src/models/event.d.ts +2 -2
  33. package/dist/esm/src/models/receive.d.ts +3 -3
  34. package/dist/esm/src/models/send.d.ts +2 -2
  35. package/dist/esm/src/models/update.d.ts +2 -2
  36. package/dist/esm/src/models/web-hook-history.d.ts +1 -1
  37. package/dist/esm/src/models/web-hook.d.ts +2 -2
  38. package/dist/src/api/company-api.d.ts +35 -30
  39. package/dist/src/api/company-api.js +34 -27
  40. package/dist/src/api/export-api.d.ts +115 -0
  41. package/dist/src/api/export-api.js +186 -0
  42. package/dist/src/api/log-api.d.ts +10 -10
  43. package/dist/src/api/log-api.js +8 -8
  44. package/dist/src/api/receive-api.d.ts +15 -15
  45. package/dist/src/api/receive-api.js +12 -12
  46. package/dist/src/api/send-api.d.ts +55 -55
  47. package/dist/src/api/send-api.js +44 -44
  48. package/dist/src/api/status-api.d.ts +5 -5
  49. package/dist/src/api/status-api.js +4 -4
  50. package/dist/src/api/update-api.d.ts +10 -10
  51. package/dist/src/api/update-api.js +8 -8
  52. package/dist/src/api/webhook-api.d.ts +25 -25
  53. package/dist/src/api/webhook-api.js +20 -20
  54. package/dist/src/models/event.d.ts +2 -2
  55. package/dist/src/models/receive.d.ts +3 -3
  56. package/dist/src/models/send.d.ts +2 -2
  57. package/dist/src/models/update.d.ts +2 -2
  58. package/dist/src/models/web-hook-history.d.ts +1 -1
  59. package/dist/src/models/web-hook.d.ts +2 -2
  60. package/docs/CompanyApi.md +10 -6
  61. package/docs/Event.md +2 -2
  62. package/docs/ExportApi.md +79 -0
  63. package/docs/LogApi.md +2 -2
  64. package/docs/Receive.md +3 -3
  65. package/docs/ReceiveApi.md +4 -3
  66. package/docs/Send.md +2 -2
  67. package/docs/SendApi.md +11 -11
  68. package/docs/StatusApi.md +1 -1
  69. package/docs/Update.md +2 -2
  70. package/docs/UpdateApi.md +2 -2
  71. package/docs/WebHook.md +2 -2
  72. package/docs/WebHookHistory.md +1 -1
  73. package/docs/WebhookApi.md +6 -5
  74. package/package.json +1 -1
  75. package/src/api/company-api.ts +43 -34
  76. package/src/api/export-api.ts +211 -0
  77. package/src/api/log-api.ts +11 -11
  78. package/src/api/receive-api.ts +16 -16
  79. package/src/api/send-api.ts +56 -56
  80. package/src/api/status-api.ts +6 -6
  81. package/src/api/update-api.ts +11 -11
  82. package/src/api/webhook-api.ts +26 -26
  83. package/src/models/event.ts +2 -2
  84. package/src/models/receive.ts +3 -3
  85. package/src/models/send.ts +2 -2
  86. package/src/models/update.ts +2 -2
  87. package/src/models/web-hook-history.ts +1 -1
  88. package/src/models/web-hook.ts +2 -2
package/docs/SendApi.md CHANGED
@@ -19,7 +19,7 @@ All URIs are relative to *http://localhost*
19
19
  # **sendFilePost**
20
20
  > Send sendFilePost()
21
21
 
22
- Send invoices are the invoices that are sent to the SDI. They are preserved for two years in the live environment and 15 days in the Sandbox.
22
+ 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
23
 
24
24
  ### Example
25
25
 
@@ -78,7 +78,7 @@ const { status, data } = await apiInstance.sendFilePost(
78
78
  # **sendGet**
79
79
  > Array<Send> sendGet()
80
80
 
81
- test **markdown**.
81
+ Retrieve a paginated list of send invoices. Results can be filtered by various criteria such as company, date ranges, and document number. 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
82
 
83
83
  ### Example
84
84
 
@@ -176,7 +176,7 @@ const { status, data } = await apiInstance.sendGet(
176
176
  # **sendIdGet**
177
177
  > Send sendIdGet()
178
178
 
179
- Send invoices are the invoices that are sent to the SDI. They are preserved for two years in the live environment and 15 days in the Sandbox.
179
+ Retrieve a send invoice by its internal id. The `id` is unique and assigned by the system when the invoice is created. 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/).
180
180
 
181
181
  ### Example
182
182
 
@@ -231,7 +231,7 @@ const { status, data } = await apiInstance.sendIdGet(
231
231
  # **sendIdentifierGet**
232
232
  > Send sendIdentifierGet()
233
233
 
234
- Send invoices are the invoices that are sent to the SDI. They are preserved for two years in the live environment and 15 days in the Sandbox.
234
+ Retrieve a send invoice by its SDI identifier. The `identifier` is assigned by the SDI and becomes available after the invoice has been accepted. 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/).
235
235
 
236
236
  ### Example
237
237
 
@@ -287,7 +287,7 @@ const { status, data } = await apiInstance.sendIdentifierGet(
287
287
  # **sendJsonPost**
288
288
  > Send sendJsonPost(fatturaOrdinaria)
289
289
 
290
- Send invoices are the invoices that are sent to the SDI. They are preserved for two years in the live environment and 15 days in the Sandbox.
290
+ 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).
291
291
 
292
292
  ### Example
293
293
 
@@ -347,7 +347,7 @@ const { status, data } = await apiInstance.sendJsonPost(
347
347
  # **sendPost**
348
348
  > Send sendPost(send)
349
349
 
350
- Send invoices are the invoices that are sent to the SDI. They are preserved for two years in the live environment and 15 days in the Sandbox.
350
+ 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).
351
351
 
352
352
  ### Example
353
353
 
@@ -407,7 +407,7 @@ const { status, data } = await apiInstance.sendPost(
407
407
  # **sendValidateFilePost**
408
408
  > sendValidateFilePost()
409
409
 
410
- Send invoices are the invoices that are sent to the SDI. They are preserved for two years in the live environment and 15 days in the Sandbox.
410
+ Validate an invoice file without sending it to SDI. Supported formats are XML (FatturaPA) and P7M (signed). 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/).
411
411
 
412
412
  ### Example
413
413
 
@@ -460,7 +460,7 @@ void (empty response body)
460
460
  # **sendValidateJsonPost**
461
461
  > sendValidateJsonPost(fatturaOrdinaria)
462
462
 
463
- Send invoices are the invoices that are sent to the SDI. They are preserved for two years in the live environment and 15 days in the Sandbox.
463
+ 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/).
464
464
 
465
465
  ### Example
466
466
 
@@ -514,7 +514,7 @@ void (empty response body)
514
514
  # **sendValidatePost**
515
515
  > sendValidatePost(send)
516
516
 
517
- Send invoices are the invoices that are sent to the SDI. They are preserved for two years in the live environment and 15 days in the Sandbox.
517
+ Validate an 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/).
518
518
 
519
519
  ### Example
520
520
 
@@ -568,7 +568,7 @@ void (empty response body)
568
568
  # **sendValidateXmlPost**
569
569
  > sendValidateXmlPost(fatturaOrdinaria)
570
570
 
571
- Send invoices are the invoices that are sent to the SDI. They are preserved for two years in the live environment and 15 days in the Sandbox.
571
+ Validate an XML invoice document 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/).
572
572
 
573
573
  ### Example
574
574
 
@@ -622,7 +622,7 @@ void (empty response body)
622
622
  # **sendXmlPost**
623
623
  > Send sendXmlPost(fatturaOrdinaria)
624
624
 
625
- Send invoices are the invoices that are sent to the SDI. They are preserved for two years in the live environment and 15 days in the Sandbox.
625
+ 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).
626
626
 
627
627
  ### Example
628
628
 
package/docs/StatusApi.md CHANGED
@@ -9,7 +9,7 @@ All URIs are relative to *http://localhost*
9
9
  # **statusGet**
10
10
  > Status statusGet()
11
11
 
12
- This endpoint is used to know how many operations (invoices + validations) and signatures are left on your account. When `signature_left` is 0, you will receive a `403 Forbidden` response if you try to sign an invoice. Likewise, if `operation_left` is 0, you will receive a `403 Forbidden` response when storing or validating an invoice. You can raise the limits by purchasing operations and/or signatures from the [Dashboard](https://dashboard.invoicetronic.com). __Please note__ that these values are not enforced if you are on the Sandbox. See the [API Keys & Sandbox](https://invoicetronic.com/apikeys/) documentation section to learn more about the Sandbox.
12
+ Retrieve the number of operations (invoices + validations) and signatures left on your account. When `signature_left` is 0, you will receive a `403 Forbidden` response when trying to sign an invoice. Likewise, if `operation_left` is 0, you will receive a `403 Forbidden` response when storing or validating an invoice. You can also check your account status from the [Dashboard](https://dashboard.invoicetronic.com), where you can purchase additional operations and/or signatures. **Please note** that these values are not enforced if you are on the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
13
13
 
14
14
  ### Example
15
15
 
package/docs/Update.md CHANGED
@@ -12,11 +12,11 @@ Name | Type | Description | Notes
12
12
  **company_id** | **number** | Company id. | [optional] [default to undefined]
13
13
  **send_id** | **number** | Send id. This is the id of the sent invoice to which this update refers to. | [optional] [default to undefined]
14
14
  **last_update** | **string** | Last update from SDI. | [optional] [default to undefined]
15
- **state** | **string** | State of the document. Theses are the possible values, as per the SDI documentation: | [optional] [default to undefined]
15
+ **state** | **string** | State of the document. These are the possible values, as per the SDI documentation: | [optional] [default to undefined]
16
16
  **description** | **string** | Description for the state. | [optional] [default to undefined]
17
17
  **message_id** | **string** | SDI message id. | [optional] [default to undefined]
18
18
  **errors** | **Array&lt;Error&gt;** | SDI errors, if any. | [optional] [default to undefined]
19
- **is_read** | **boolean** | Wether the item has been read at least once. | [optional] [default to undefined]
19
+ **is_read** | **boolean** | Whether the item has been read at least once. | [optional] [default to undefined]
20
20
  **send** | [**SendReduced**](SendReduced.md) | | [optional] [default to undefined]
21
21
 
22
22
  ## Example
package/docs/UpdateApi.md CHANGED
@@ -10,7 +10,7 @@ All URIs are relative to *http://localhost*
10
10
  # **updateGet**
11
11
  > Array<Update> updateGet()
12
12
 
13
- Updates are notifications sent by the SDI about the status of invoices you sent.
13
+ Retrieve a paginated list of updates. Results can be filtered by various criteria such as company, send item, SDI state, and date ranges. **Updates** are status notifications from Italy\'s SDI (Sistema di Interscambio) about invoices you sent. Multiple updates can exist for the same send item as the invoice progresses through the SDI workflow. The `state` field is the most important property and can have the following values: | Value | Name | Description | |-------|------|-------------| | 2 | `Inviato` | Sent to the SDI. | | 5 | `Consegnato` | Delivered to the recipient. | | 6 | `NonConsegnato` | Not delivered to the recipient. Only relevant for public administration entities. | | 7 | `Scartato` | Rejected by the SDI. | | 8 | `AccettatoDalDestinatario` | Accepted by the recipient. Only relevant for public administration entities. | | 9 | `RifiutatoDalDestinatario` | Rejected by the recipient. Only relevant for public administration entities. | | 10 | `ImpossibilitaDiRecapito` | Available on the recipient\'s tax drawer, but it was not possible to deliver it to the recipient\'s reception system. | | 11 | `DecorrenzaTermini` | A public administration entity has not responded for more than 15 days. The document is considered delivered. | | 12 | `AttestazioneTrasmissioneFattura` | A public administration entity has received the document, but has not yet processed it. | **Important:** Always monitor the state of your sent invoices. A state of `Inviato` only means the invoice has been submitted to SDI, not that it has been delivered. A state like `Scartato` indicates that the invoice was **not** successfully delivered and may require corrective action, such as fixing validation errors and resubmitting. In that case, `description` contains the reason for the rejection.
14
14
 
15
15
  ### Example
16
16
 
@@ -99,7 +99,7 @@ const { status, data } = await apiInstance.updateGet(
99
99
  # **updateIdGet**
100
100
  > Update updateIdGet()
101
101
 
102
- Updates are notifications sent by the SDI about the status of invoices you sent.
102
+ Retrieve an update by its internal id. **Updates** are status notifications from Italy\'s SDI (Sistema di Interscambio) about invoices you sent. Multiple updates can exist for the same send item as the invoice progresses through the SDI workflow. The `state` field is the most important property and can have the following values: | Value | Name | Description | |-------|------|-------------| | 2 | `Inviato` | Sent to the SDI. | | 5 | `Consegnato` | Delivered to the recipient. | | 6 | `NonConsegnato` | Not delivered to the recipient. Only relevant for public administration entities. | | 7 | `Scartato` | Rejected by the SDI. | | 8 | `AccettatoDalDestinatario` | Accepted by the recipient. Only relevant for public administration entities. | | 9 | `RifiutatoDalDestinatario` | Rejected by the recipient. Only relevant for public administration entities. | | 10 | `ImpossibilitaDiRecapito` | Available on the recipient\'s tax drawer, but it was not possible to deliver it to the recipient\'s reception system. | | 11 | `DecorrenzaTermini` | A public administration entity has not responded for more than 15 days. The document is considered delivered. | | 12 | `AttestazioneTrasmissioneFattura` | A public administration entity has received the document, but has not yet processed it. | **Important:** Always monitor the state of your sent invoices. A state of `Inviato` only means the invoice has been submitted to SDI, not that it has been delivered. A state like `Scartato` indicates that the invoice was **not** successfully delivered and may require corrective action, such as fixing validation errors and resubmitting. In that case, `description` contains the reason for the rejection.
103
103
 
104
104
  ### Example
105
105
 
package/docs/WebHook.md CHANGED
@@ -11,10 +11,10 @@ Name | Type | Description | Notes
11
11
  **user_id** | **number** | User id. | [optional] [default to undefined]
12
12
  **company_id** | **number** | Company id. | [optional] [default to undefined]
13
13
  **url** | **string** | The url of your application\&#39;s endpoint that will receive a POST request when the webhook is fired. | [default to undefined]
14
- **enabled** | **boolean** | Wether the webhook is enabled. On creation, this is set to &#x60;true&#x60;. | [optional] [default to undefined]
14
+ **enabled** | **boolean** | Whether the webhook is enabled. On creation, this is set to &#x60;true&#x60;. | [optional] [default to undefined]
15
15
  **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]
16
16
  **description** | **string** | An optional description. | [optional] [default to undefined]
17
- **events** | **Array&lt;string&gt;** | List of events to that trigger the webhook. See Invoicetronic.SupportedEvents.Available for a list of valid event names. | [optional] [default to undefined]
17
+ **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]
18
18
 
19
19
  ## Example
20
20
 
@@ -14,7 +14,7 @@ Name | Type | Description | Notes
14
14
  **event** | **string** | Event name. | [optional] [default to undefined]
15
15
  **status_code** | **number** | Status code. | [optional] [default to undefined]
16
16
  **date_time** | **string** | Date and time of the request. | [optional] [default to undefined]
17
- **success** | **boolean** | Wether the request was successful. | [optional] [readonly] [default to undefined]
17
+ **success** | **boolean** | Whether the request was successful. | [optional] [readonly] [default to undefined]
18
18
 
19
19
  ## Example
20
20
 
@@ -15,7 +15,7 @@ All URIs are relative to *http://localhost*
15
15
  # **webhookGet**
16
16
  > Array<WebHook> webhookGet()
17
17
 
18
- Webhooks are used to notify external services about write events that occur in the API. You can subscribe to specific events and receive a notification when they occur.
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/)**.
19
19
 
20
20
  ### Example
21
21
 
@@ -89,7 +89,7 @@ const { status, data } = await apiInstance.webhookGet(
89
89
  # **webhookIdDelete**
90
90
  > WebHook webhookIdDelete()
91
91
 
92
- Webhooks are used to notify external services about write events that occur in the API. You can subscribe to specific events and receive a notification when they occur.
92
+ 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/)**.
93
93
 
94
94
  ### Example
95
95
 
@@ -136,6 +136,7 @@ const { status, data } = await apiInstance.webhookIdDelete(
136
136
  |**200** | OK | - |
137
137
  |**422** | Unprocessable Content | - |
138
138
  |**400** | Bad Request | - |
139
+ |**409** | Conflict | - |
139
140
  |**404** | Not Found | - |
140
141
 
141
142
  [[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)
@@ -143,7 +144,7 @@ const { status, data } = await apiInstance.webhookIdDelete(
143
144
  # **webhookIdGet**
144
145
  > WebHook webhookIdGet()
145
146
 
146
- Webhooks are used to notify external services about write events that occur in the API. You can subscribe to specific events and receive a notification when they occur.
147
+ 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/)**.
147
148
 
148
149
  ### Example
149
150
 
@@ -195,7 +196,7 @@ const { status, data } = await apiInstance.webhookIdGet(
195
196
  # **webhookPost**
196
197
  > WebHook webhookPost(webHook)
197
198
 
198
- Webhooks are used to notify external services about write events that occur in the API. You can subscribe to specific events and receive a notification when they occur.
199
+ 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/)**.
199
200
 
200
201
  ### Example
201
202
 
@@ -249,7 +250,7 @@ const { status, data } = await apiInstance.webhookPost(
249
250
  # **webhookPut**
250
251
  > WebHook webhookPut(webHook)
251
252
 
252
- Webhooks are used to notify external services about write events that occur in the API. You can subscribe to specific events and receive a notification when they occur.
253
+ 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/)**.
253
254
 
254
255
  ### Example
255
256
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@invoicetronic/ts-sdk",
3
- "version": "1.1.7",
3
+ "version": "1.3.0",
4
4
  "description": "OpenAPI client for @invoicetronic/ts-sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {
@@ -21,7 +21,7 @@ import globalAxios from 'axios';
21
21
  import { URL, URLSearchParams } from 'url';
22
22
  // Some imports not used depending on template conditions
23
23
  // @ts-ignore
24
- import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../../common';
24
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../../common';
25
25
  // @ts-ignore
26
26
  import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../../base';
27
27
  // @ts-ignore
@@ -36,7 +36,7 @@ import type { ProblemHttpResult } from '../../src/models';
36
36
  export const CompanyApiAxiosParamCreator = function (configuration?: Configuration) {
37
37
  return {
38
38
  /**
39
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
39
+ * 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.
40
40
  * @summary List companies
41
41
  * @param {number} [page] Page number.
42
42
  * @param {number} [pageSize] Items per page. Cannot be greater than 200.
@@ -85,13 +85,14 @@ export const CompanyApiAxiosParamCreator = function (configuration?: Configurati
85
85
  };
86
86
  },
87
87
  /**
88
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
88
+ * 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.
89
89
  * @summary Delete a company
90
90
  * @param {number} id Item id
91
+ * @param {boolean} [force] Force delete including all related data.
91
92
  * @param {*} [options] Override http request option.
92
93
  * @throws {RequiredError}
93
94
  */
94
- companyIdDelete: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
95
+ companyIdDelete: async (id: number, force?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
95
96
  // verify required parameter 'id' is not null or undefined
96
97
  assertParamExists('companyIdDelete', 'id', id)
97
98
  const localVarPath = `/company/{id}`
@@ -111,6 +112,10 @@ export const CompanyApiAxiosParamCreator = function (configuration?: Configurati
111
112
  // http basic authentication required
112
113
  setBasicAuthToObject(localVarRequestOptions, configuration)
113
114
 
115
+ if (force !== undefined) {
116
+ localVarQueryParameter['force'] = force;
117
+ }
118
+
114
119
  localVarHeaderParameter['Accept'] = 'application/json';
115
120
 
116
121
  setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -123,7 +128,7 @@ export const CompanyApiAxiosParamCreator = function (configuration?: Configurati
123
128
  };
124
129
  },
125
130
  /**
126
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
131
+ * 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.
127
132
  * @summary Get a company by id
128
133
  * @param {number} id Item id
129
134
  * @param {*} [options] Override http request option.
@@ -161,7 +166,7 @@ export const CompanyApiAxiosParamCreator = function (configuration?: Configurati
161
166
  };
162
167
  },
163
168
  /**
164
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
169
+ * 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.
165
170
  * @summary Add a company
166
171
  * @param {Company} company
167
172
  * @param {*} [options] Override http request option.
@@ -200,7 +205,7 @@ export const CompanyApiAxiosParamCreator = function (configuration?: Configurati
200
205
  };
201
206
  },
202
207
  /**
203
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
208
+ * 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.
204
209
  * @summary Update a company
205
210
  * @param {Company} company
206
211
  * @param {*} [options] Override http request option.
@@ -248,7 +253,7 @@ export const CompanyApiFp = function(configuration?: Configuration) {
248
253
  const localVarAxiosParamCreator = CompanyApiAxiosParamCreator(configuration)
249
254
  return {
250
255
  /**
251
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
256
+ * 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.
252
257
  * @summary List companies
253
258
  * @param {number} [page] Page number.
254
259
  * @param {number} [pageSize] Items per page. Cannot be greater than 200.
@@ -263,20 +268,21 @@ export const CompanyApiFp = function(configuration?: Configuration) {
263
268
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
264
269
  },
265
270
  /**
266
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
271
+ * 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.
267
272
  * @summary Delete a company
268
273
  * @param {number} id Item id
274
+ * @param {boolean} [force] Force delete including all related data.
269
275
  * @param {*} [options] Override http request option.
270
276
  * @throws {RequiredError}
271
277
  */
272
- async companyIdDelete(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Company>> {
273
- const localVarAxiosArgs = await localVarAxiosParamCreator.companyIdDelete(id, options);
278
+ async companyIdDelete(id: number, force?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Company>> {
279
+ const localVarAxiosArgs = await localVarAxiosParamCreator.companyIdDelete(id, force, options);
274
280
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
275
281
  const localVarOperationServerBasePath = operationServerMap['CompanyApi.companyIdDelete']?.[localVarOperationServerIndex]?.url;
276
282
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
277
283
  },
278
284
  /**
279
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
285
+ * 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.
280
286
  * @summary Get a company by id
281
287
  * @param {number} id Item id
282
288
  * @param {*} [options] Override http request option.
@@ -289,7 +295,7 @@ export const CompanyApiFp = function(configuration?: Configuration) {
289
295
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
290
296
  },
291
297
  /**
292
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
298
+ * 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.
293
299
  * @summary Add a company
294
300
  * @param {Company} company
295
301
  * @param {*} [options] Override http request option.
@@ -302,7 +308,7 @@ export const CompanyApiFp = function(configuration?: Configuration) {
302
308
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
303
309
  },
304
310
  /**
305
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
311
+ * 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.
306
312
  * @summary Update a company
307
313
  * @param {Company} company
308
314
  * @param {*} [options] Override http request option.
@@ -324,7 +330,7 @@ export const CompanyApiFactory = function (configuration?: Configuration, basePa
324
330
  const localVarFp = CompanyApiFp(configuration)
325
331
  return {
326
332
  /**
327
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
333
+ * 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.
328
334
  * @summary List companies
329
335
  * @param {number} [page] Page number.
330
336
  * @param {number} [pageSize] Items per page. Cannot be greater than 200.
@@ -336,17 +342,18 @@ export const CompanyApiFactory = function (configuration?: Configuration, basePa
336
342
  return localVarFp.companyGet(page, pageSize, sort, options).then((request) => request(axios, basePath));
337
343
  },
338
344
  /**
339
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
345
+ * 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.
340
346
  * @summary Delete a company
341
347
  * @param {number} id Item id
348
+ * @param {boolean} [force] Force delete including all related data.
342
349
  * @param {*} [options] Override http request option.
343
350
  * @throws {RequiredError}
344
351
  */
345
- companyIdDelete(id: number, options?: RawAxiosRequestConfig): AxiosPromise<Company> {
346
- return localVarFp.companyIdDelete(id, options).then((request) => request(axios, basePath));
352
+ companyIdDelete(id: number, force?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<Company> {
353
+ return localVarFp.companyIdDelete(id, force, options).then((request) => request(axios, basePath));
347
354
  },
348
355
  /**
349
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
356
+ * 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.
350
357
  * @summary Get a company by id
351
358
  * @param {number} id Item id
352
359
  * @param {*} [options] Override http request option.
@@ -356,7 +363,7 @@ export const CompanyApiFactory = function (configuration?: Configuration, basePa
356
363
  return localVarFp.companyIdGet(id, options).then((request) => request(axios, basePath));
357
364
  },
358
365
  /**
359
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
366
+ * 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.
360
367
  * @summary Add a company
361
368
  * @param {Company} company
362
369
  * @param {*} [options] Override http request option.
@@ -366,7 +373,7 @@ export const CompanyApiFactory = function (configuration?: Configuration, basePa
366
373
  return localVarFp.companyPost(company, options).then((request) => request(axios, basePath));
367
374
  },
368
375
  /**
369
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
376
+ * 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.
370
377
  * @summary Update a company
371
378
  * @param {Company} company
372
379
  * @param {*} [options] Override http request option.
@@ -383,7 +390,7 @@ export const CompanyApiFactory = function (configuration?: Configuration, basePa
383
390
  */
384
391
  export interface CompanyApiInterface {
385
392
  /**
386
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
393
+ * 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.
387
394
  * @summary List companies
388
395
  * @param {number} [page] Page number.
389
396
  * @param {number} [pageSize] Items per page. Cannot be greater than 200.
@@ -394,16 +401,17 @@ export interface CompanyApiInterface {
394
401
  companyGet(page?: number, pageSize?: number, sort?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Company>>;
395
402
 
396
403
  /**
397
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
404
+ * 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.
398
405
  * @summary Delete a company
399
406
  * @param {number} id Item id
407
+ * @param {boolean} [force] Force delete including all related data.
400
408
  * @param {*} [options] Override http request option.
401
409
  * @throws {RequiredError}
402
410
  */
403
- companyIdDelete(id: number, options?: RawAxiosRequestConfig): AxiosPromise<Company>;
411
+ companyIdDelete(id: number, force?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<Company>;
404
412
 
405
413
  /**
406
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
414
+ * 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.
407
415
  * @summary Get a company by id
408
416
  * @param {number} id Item id
409
417
  * @param {*} [options] Override http request option.
@@ -412,7 +420,7 @@ export interface CompanyApiInterface {
412
420
  companyIdGet(id: number, options?: RawAxiosRequestConfig): AxiosPromise<Company>;
413
421
 
414
422
  /**
415
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
423
+ * 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.
416
424
  * @summary Add a company
417
425
  * @param {Company} company
418
426
  * @param {*} [options] Override http request option.
@@ -421,7 +429,7 @@ export interface CompanyApiInterface {
421
429
  companyPost(company: Company, options?: RawAxiosRequestConfig): AxiosPromise<Company>;
422
430
 
423
431
  /**
424
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
432
+ * 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.
425
433
  * @summary Update a company
426
434
  * @param {Company} company
427
435
  * @param {*} [options] Override http request option.
@@ -436,7 +444,7 @@ export interface CompanyApiInterface {
436
444
  */
437
445
  export class CompanyApi extends BaseAPI implements CompanyApiInterface {
438
446
  /**
439
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
447
+ * 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.
440
448
  * @summary List companies
441
449
  * @param {number} [page] Page number.
442
450
  * @param {number} [pageSize] Items per page. Cannot be greater than 200.
@@ -449,18 +457,19 @@ export class CompanyApi extends BaseAPI implements CompanyApiInterface {
449
457
  }
450
458
 
451
459
  /**
452
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
460
+ * 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.
453
461
  * @summary Delete a company
454
462
  * @param {number} id Item id
463
+ * @param {boolean} [force] Force delete including all related data.
455
464
  * @param {*} [options] Override http request option.
456
465
  * @throws {RequiredError}
457
466
  */
458
- public companyIdDelete(id: number, options?: RawAxiosRequestConfig) {
459
- return CompanyApiFp(this.configuration).companyIdDelete(id, options).then((request) => request(this.axios, this.basePath));
467
+ public companyIdDelete(id: number, force?: boolean, options?: RawAxiosRequestConfig) {
468
+ return CompanyApiFp(this.configuration).companyIdDelete(id, force, options).then((request) => request(this.axios, this.basePath));
460
469
  }
461
470
 
462
471
  /**
463
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
472
+ * 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.
464
473
  * @summary Get a company by id
465
474
  * @param {number} id Item id
466
475
  * @param {*} [options] Override http request option.
@@ -471,7 +480,7 @@ export class CompanyApi extends BaseAPI implements CompanyApiInterface {
471
480
  }
472
481
 
473
482
  /**
474
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
483
+ * 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.
475
484
  * @summary Add a company
476
485
  * @param {Company} company
477
486
  * @param {*} [options] Override http request option.
@@ -482,7 +491,7 @@ export class CompanyApi extends BaseAPI implements CompanyApiInterface {
482
491
  }
483
492
 
484
493
  /**
485
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
494
+ * 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.
486
495
  * @summary Update a company
487
496
  * @param {Company} company
488
497
  * @param {*} [options] Override http request option.