@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/CHANGELOG.md CHANGED
@@ -1 +1 @@
1
- # Changelog\n\n## [1.1.7.0] - 2026-01-07\nSee main repository changelog for details.
1
+ # Changelog\n\n## [1.2.0] - 2026-02-10\nSee main repository changelog for details.
package/README.md CHANGED
@@ -7,7 +7,7 @@ For more information, see [Invoicetronic website][2]
7
7
  [1]: https://www.fatturapa.gov.it/it/sistemainterscambio/cose-il-sdi/
8
8
  [2]: https://invoicetronic.com/
9
9
 
10
- ## @invoicetronic/ts-sdk@1.1.7
10
+ ## @invoicetronic/ts-sdk@1.2
11
11
 
12
12
  This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
13
13
 
@@ -45,7 +45,7 @@ navigate to the folder of your consuming project and run one of the following co
45
45
  _published:_
46
46
 
47
47
  ```
48
- npm install @invoicetronic/ts-sdk@1.1.7 --save
48
+ npm install @invoicetronic/ts-sdk@1.2 --save
49
49
  ```
50
50
 
51
51
  _unPublished (not recommended):_
package/api.ts CHANGED
@@ -15,6 +15,7 @@
15
15
 
16
16
 
17
17
  export * from './src/api/company-api';
18
+ export * from './src/api/export-api';
18
19
  export * from './src/api/log-api';
19
20
  export * from './src/api/receive-api';
20
21
  export * from './src/api/send-api';
package/common.ts CHANGED
@@ -67,7 +67,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope
67
67
  function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
68
68
  if (parameter == null) return;
69
69
  if (typeof parameter === "object") {
70
- if (Array.isArray(parameter)) {
70
+ if (Array.isArray(parameter) || parameter instanceof Set) {
71
71
  (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
72
72
  }
73
73
  else {
@@ -92,13 +92,26 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
92
92
  url.search = searchParams.toString();
93
93
  }
94
94
 
95
+ /**
96
+ * JSON serialization helper function which replaces instances of unserializable types with serializable ones.
97
+ * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
98
+ * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
99
+ */
100
+ export const replaceWithSerializableTypeIfNeeded = function(key: any, value: any) {
101
+ if (value instanceof Set) {
102
+ return Array.from(value);
103
+ } else {
104
+ return value;
105
+ }
106
+ }
107
+
95
108
  export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {
96
109
  const nonString = typeof value !== 'string';
97
110
  const needsSerialization = nonString && configuration && configuration.isJsonMime
98
111
  ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
99
112
  : nonString;
100
113
  return needsSerialization
101
- ? JSON.stringify(value !== undefined ? value : {})
114
+ ? JSON.stringify(value !== undefined ? value : {}, replaceWithSerializableTypeIfNeeded)
102
115
  : (value || "");
103
116
  }
104
117
 
package/configuration.ts CHANGED
@@ -98,7 +98,7 @@ export class Configuration {
98
98
  this.baseOptions = {
99
99
  ...param.baseOptions,
100
100
  headers: {
101
- 'User-Agent': "Invoicetronic/1.1.7/TypeScript-SDK",
101
+ 'User-Agent': "Invoicetronic/1.2/TypeScript-SDK",
102
102
  ...param.baseOptions?.headers,
103
103
  },
104
104
  };
package/dist/api.d.ts CHANGED
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  export * from './src/api/company-api';
13
+ export * from './src/api/export-api';
13
14
  export * from './src/api/log-api';
14
15
  export * from './src/api/receive-api';
15
16
  export * from './src/api/send-api';
package/dist/api.js CHANGED
@@ -28,6 +28,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  __exportStar(require("./src/api/company-api"), exports);
31
+ __exportStar(require("./src/api/export-api"), exports);
31
32
  __exportStar(require("./src/api/log-api"), exports);
32
33
  __exportStar(require("./src/api/receive-api"), exports);
33
34
  __exportStar(require("./src/api/send-api"), exports);
package/dist/common.d.ts CHANGED
@@ -24,6 +24,12 @@ export declare const setBasicAuthToObject: (object: any, configuration?: Configu
24
24
  export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
25
25
  export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
26
26
  export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
27
+ /**
28
+ * JSON serialization helper function which replaces instances of unserializable types with serializable ones.
29
+ * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
30
+ * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
31
+ */
32
+ export declare const replaceWithSerializableTypeIfNeeded: (key: any, value: any) => any;
27
33
  export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
28
34
  export declare const toPathString: (url: URL) => string;
29
35
  export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
package/dist/common.js CHANGED
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  });
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
25
+ exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.replaceWithSerializableTypeIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
26
26
  const base_1 = require("./base");
27
27
  const url_1 = require("url");
28
28
  exports.DUMMY_BASE_URL = 'https://example.com';
@@ -79,7 +79,7 @@ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
79
79
  if (parameter == null)
80
80
  return;
81
81
  if (typeof parameter === "object") {
82
- if (Array.isArray(parameter)) {
82
+ if (Array.isArray(parameter) || parameter instanceof Set) {
83
83
  parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
84
84
  }
85
85
  else {
@@ -101,13 +101,27 @@ const setSearchParams = function (url, ...objects) {
101
101
  url.search = searchParams.toString();
102
102
  };
103
103
  exports.setSearchParams = setSearchParams;
104
+ /**
105
+ * JSON serialization helper function which replaces instances of unserializable types with serializable ones.
106
+ * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
107
+ * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
108
+ */
109
+ const replaceWithSerializableTypeIfNeeded = function (key, value) {
110
+ if (value instanceof Set) {
111
+ return Array.from(value);
112
+ }
113
+ else {
114
+ return value;
115
+ }
116
+ };
117
+ exports.replaceWithSerializableTypeIfNeeded = replaceWithSerializableTypeIfNeeded;
104
118
  const serializeDataIfNeeded = function (value, requestOptions, configuration) {
105
119
  const nonString = typeof value !== 'string';
106
120
  const needsSerialization = nonString && configuration && configuration.isJsonMime
107
121
  ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
108
122
  : nonString;
109
123
  return needsSerialization
110
- ? JSON.stringify(value !== undefined ? value : {})
124
+ ? JSON.stringify(value !== undefined ? value : {}, exports.replaceWithSerializableTypeIfNeeded)
111
125
  : (value || "");
112
126
  };
113
127
  exports.serializeDataIfNeeded = serializeDataIfNeeded;
@@ -23,7 +23,7 @@ class Configuration {
23
23
  this.awsv4 = param.awsv4;
24
24
  this.basePath = param.basePath;
25
25
  this.serverIndex = param.serverIndex;
26
- this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "Invoicetronic/1.1.7/TypeScript-SDK" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
26
+ this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "Invoicetronic/1.2/TypeScript-SDK" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
27
27
  this.formDataCtor = param.formDataCtor;
28
28
  }
29
29
  /**
package/dist/esm/api.d.ts CHANGED
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  export * from './src/api/company-api';
13
+ export * from './src/api/export-api';
13
14
  export * from './src/api/log-api';
14
15
  export * from './src/api/receive-api';
15
16
  export * from './src/api/send-api';
package/dist/esm/api.js CHANGED
@@ -12,6 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  export * from './src/api/company-api';
15
+ export * from './src/api/export-api';
15
16
  export * from './src/api/log-api';
16
17
  export * from './src/api/receive-api';
17
18
  export * from './src/api/send-api';
@@ -24,6 +24,12 @@ export declare const setBasicAuthToObject: (object: any, configuration?: Configu
24
24
  export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
25
25
  export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
26
26
  export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
27
+ /**
28
+ * JSON serialization helper function which replaces instances of unserializable types with serializable ones.
29
+ * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
30
+ * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
31
+ */
32
+ export declare const replaceWithSerializableTypeIfNeeded: (key: any, value: any) => any;
27
33
  export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
28
34
  export declare const toPathString: (url: URL) => string;
29
35
  export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
@@ -71,7 +71,7 @@ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
71
71
  if (parameter == null)
72
72
  return;
73
73
  if (typeof parameter === "object") {
74
- if (Array.isArray(parameter)) {
74
+ if (Array.isArray(parameter) || parameter instanceof Set) {
75
75
  parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
76
76
  }
77
77
  else {
@@ -92,13 +92,26 @@ export const setSearchParams = function (url, ...objects) {
92
92
  setFlattenedQueryParams(searchParams, objects);
93
93
  url.search = searchParams.toString();
94
94
  };
95
+ /**
96
+ * JSON serialization helper function which replaces instances of unserializable types with serializable ones.
97
+ * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
98
+ * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
99
+ */
100
+ export const replaceWithSerializableTypeIfNeeded = function (key, value) {
101
+ if (value instanceof Set) {
102
+ return Array.from(value);
103
+ }
104
+ else {
105
+ return value;
106
+ }
107
+ };
95
108
  export const serializeDataIfNeeded = function (value, requestOptions, configuration) {
96
109
  const nonString = typeof value !== 'string';
97
110
  const needsSerialization = nonString && configuration && configuration.isJsonMime
98
111
  ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
99
112
  : nonString;
100
113
  return needsSerialization
101
- ? JSON.stringify(value !== undefined ? value : {})
114
+ ? JSON.stringify(value !== undefined ? value : {}, replaceWithSerializableTypeIfNeeded)
102
115
  : (value || "");
103
116
  };
104
117
  export const toPathString = function (url) {
@@ -20,7 +20,7 @@ export class Configuration {
20
20
  this.awsv4 = param.awsv4;
21
21
  this.basePath = param.basePath;
22
22
  this.serverIndex = param.serverIndex;
23
- this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "Invoicetronic/1.1.7/TypeScript-SDK" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
23
+ this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "Invoicetronic/1.2/TypeScript-SDK" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
24
24
  this.formDataCtor = param.formDataCtor;
25
25
  }
26
26
  /**
@@ -18,7 +18,7 @@ import type { Company } from '../../src/models';
18
18
  */
19
19
  export declare const CompanyApiAxiosParamCreator: (configuration?: Configuration) => {
20
20
  /**
21
- * 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**.
21
+ * 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.
22
22
  * @summary List companies
23
23
  * @param {number} [page] Page number.
24
24
  * @param {number} [pageSize] Items per page. Cannot be greater than 200.
@@ -28,15 +28,16 @@ export declare const CompanyApiAxiosParamCreator: (configuration?: Configuration
28
28
  */
29
29
  companyGet: (page?: number, pageSize?: number, sort?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
30
30
  /**
31
- * 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**.
31
+ * 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.
32
32
  * @summary Delete a company
33
33
  * @param {number} id Item id
34
+ * @param {boolean} [force] Force delete including all related data.
34
35
  * @param {*} [options] Override http request option.
35
36
  * @throws {RequiredError}
36
37
  */
37
- companyIdDelete: (id: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
38
+ companyIdDelete: (id: number, force?: boolean, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
38
39
  /**
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**.
40
+ * 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.
40
41
  * @summary Get a company by id
41
42
  * @param {number} id Item id
42
43
  * @param {*} [options] Override http request option.
@@ -44,7 +45,7 @@ export declare const CompanyApiAxiosParamCreator: (configuration?: Configuration
44
45
  */
45
46
  companyIdGet: (id: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
46
47
  /**
47
- * 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**.
48
+ * 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.
48
49
  * @summary Add a company
49
50
  * @param {Company} company
50
51
  * @param {*} [options] Override http request option.
@@ -52,7 +53,7 @@ export declare const CompanyApiAxiosParamCreator: (configuration?: Configuration
52
53
  */
53
54
  companyPost: (company: Company, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
54
55
  /**
55
- * 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**.
56
+ * 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.
56
57
  * @summary Update a company
57
58
  * @param {Company} company
58
59
  * @param {*} [options] Override http request option.
@@ -65,7 +66,7 @@ export declare const CompanyApiAxiosParamCreator: (configuration?: Configuration
65
66
  */
66
67
  export declare const CompanyApiFp: (configuration?: Configuration) => {
67
68
  /**
68
- * 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**.
69
+ * 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.
69
70
  * @summary List companies
70
71
  * @param {number} [page] Page number.
71
72
  * @param {number} [pageSize] Items per page. Cannot be greater than 200.
@@ -75,15 +76,16 @@ export declare const CompanyApiFp: (configuration?: Configuration) => {
75
76
  */
76
77
  companyGet(page?: number, pageSize?: number, sort?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Company>>>;
77
78
  /**
78
- * 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**.
79
+ * 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.
79
80
  * @summary Delete a company
80
81
  * @param {number} id Item id
82
+ * @param {boolean} [force] Force delete including all related data.
81
83
  * @param {*} [options] Override http request option.
82
84
  * @throws {RequiredError}
83
85
  */
84
- companyIdDelete(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Company>>;
86
+ companyIdDelete(id: number, force?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Company>>;
85
87
  /**
86
- * 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
+ * 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.
87
89
  * @summary Get a company by id
88
90
  * @param {number} id Item id
89
91
  * @param {*} [options] Override http request option.
@@ -91,7 +93,7 @@ export declare const CompanyApiFp: (configuration?: Configuration) => {
91
93
  */
92
94
  companyIdGet(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Company>>;
93
95
  /**
94
- * 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**.
96
+ * 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.
95
97
  * @summary Add a company
96
98
  * @param {Company} company
97
99
  * @param {*} [options] Override http request option.
@@ -99,7 +101,7 @@ export declare const CompanyApiFp: (configuration?: Configuration) => {
99
101
  */
100
102
  companyPost(company: Company, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Company>>;
101
103
  /**
102
- * 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**.
104
+ * 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.
103
105
  * @summary Update a company
104
106
  * @param {Company} company
105
107
  * @param {*} [options] Override http request option.
@@ -112,7 +114,7 @@ export declare const CompanyApiFp: (configuration?: Configuration) => {
112
114
  */
113
115
  export declare const CompanyApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
114
116
  /**
115
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
117
+ * 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.
116
118
  * @summary List companies
117
119
  * @param {number} [page] Page number.
118
120
  * @param {number} [pageSize] Items per page. Cannot be greater than 200.
@@ -122,15 +124,16 @@ export declare const CompanyApiFactory: (configuration?: Configuration, basePath
122
124
  */
123
125
  companyGet(page?: number, pageSize?: number, sort?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Company>>;
124
126
  /**
125
- * 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**.
127
+ * 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.
126
128
  * @summary Delete a company
127
129
  * @param {number} id Item id
130
+ * @param {boolean} [force] Force delete including all related data.
128
131
  * @param {*} [options] Override http request option.
129
132
  * @throws {RequiredError}
130
133
  */
131
- companyIdDelete(id: number, options?: RawAxiosRequestConfig): AxiosPromise<Company>;
134
+ companyIdDelete(id: number, force?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<Company>;
132
135
  /**
133
- * 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**.
136
+ * 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.
134
137
  * @summary Get a company by id
135
138
  * @param {number} id Item id
136
139
  * @param {*} [options] Override http request option.
@@ -138,7 +141,7 @@ export declare const CompanyApiFactory: (configuration?: Configuration, basePath
138
141
  */
139
142
  companyIdGet(id: number, options?: RawAxiosRequestConfig): AxiosPromise<Company>;
140
143
  /**
141
- * 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**.
144
+ * 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.
142
145
  * @summary Add a company
143
146
  * @param {Company} company
144
147
  * @param {*} [options] Override http request option.
@@ -146,7 +149,7 @@ export declare const CompanyApiFactory: (configuration?: Configuration, basePath
146
149
  */
147
150
  companyPost(company: Company, options?: RawAxiosRequestConfig): AxiosPromise<Company>;
148
151
  /**
149
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
152
+ * 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.
150
153
  * @summary Update a company
151
154
  * @param {Company} company
152
155
  * @param {*} [options] Override http request option.
@@ -159,7 +162,7 @@ export declare const CompanyApiFactory: (configuration?: Configuration, basePath
159
162
  */
160
163
  export interface CompanyApiInterface {
161
164
  /**
162
- * 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**.
165
+ * 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.
163
166
  * @summary List companies
164
167
  * @param {number} [page] Page number.
165
168
  * @param {number} [pageSize] Items per page. Cannot be greater than 200.
@@ -169,15 +172,16 @@ export interface CompanyApiInterface {
169
172
  */
170
173
  companyGet(page?: number, pageSize?: number, sort?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Company>>;
171
174
  /**
172
- * 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**.
175
+ * 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.
173
176
  * @summary Delete a company
174
177
  * @param {number} id Item id
178
+ * @param {boolean} [force] Force delete including all related data.
175
179
  * @param {*} [options] Override http request option.
176
180
  * @throws {RequiredError}
177
181
  */
178
- companyIdDelete(id: number, options?: RawAxiosRequestConfig): AxiosPromise<Company>;
182
+ companyIdDelete(id: number, force?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<Company>;
179
183
  /**
180
- * 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**.
184
+ * 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.
181
185
  * @summary Get a company by id
182
186
  * @param {number} id Item id
183
187
  * @param {*} [options] Override http request option.
@@ -185,7 +189,7 @@ export interface CompanyApiInterface {
185
189
  */
186
190
  companyIdGet(id: number, options?: RawAxiosRequestConfig): AxiosPromise<Company>;
187
191
  /**
188
- * 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**.
192
+ * 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.
189
193
  * @summary Add a company
190
194
  * @param {Company} company
191
195
  * @param {*} [options] Override http request option.
@@ -193,7 +197,7 @@ export interface CompanyApiInterface {
193
197
  */
194
198
  companyPost(company: Company, options?: RawAxiosRequestConfig): AxiosPromise<Company>;
195
199
  /**
196
- * 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**.
200
+ * 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.
197
201
  * @summary Update a company
198
202
  * @param {Company} company
199
203
  * @param {*} [options] Override http request option.
@@ -206,7 +210,7 @@ export interface CompanyApiInterface {
206
210
  */
207
211
  export declare class CompanyApi extends BaseAPI implements CompanyApiInterface {
208
212
  /**
209
- * 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**.
213
+ * 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.
210
214
  * @summary List companies
211
215
  * @param {number} [page] Page number.
212
216
  * @param {number} [pageSize] Items per page. Cannot be greater than 200.
@@ -216,15 +220,16 @@ export declare class CompanyApi extends BaseAPI implements CompanyApiInterface {
216
220
  */
217
221
  companyGet(page?: number, pageSize?: number, sort?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Company[], any, {}>>;
218
222
  /**
219
- * 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**.
223
+ * 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.
220
224
  * @summary Delete a company
221
225
  * @param {number} id Item id
226
+ * @param {boolean} [force] Force delete including all related data.
222
227
  * @param {*} [options] Override http request option.
223
228
  * @throws {RequiredError}
224
229
  */
225
- companyIdDelete(id: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Company, any, {}>>;
230
+ companyIdDelete(id: number, force?: boolean, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Company, any, {}>>;
226
231
  /**
227
- * 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**.
232
+ * 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.
228
233
  * @summary Get a company by id
229
234
  * @param {number} id Item id
230
235
  * @param {*} [options] Override http request option.
@@ -232,7 +237,7 @@ export declare class CompanyApi extends BaseAPI implements CompanyApiInterface {
232
237
  */
233
238
  companyIdGet(id: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Company, any, {}>>;
234
239
  /**
235
- * 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**.
240
+ * 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.
236
241
  * @summary Add a company
237
242
  * @param {Company} company
238
243
  * @param {*} [options] Override http request option.
@@ -240,7 +245,7 @@ export declare class CompanyApi extends BaseAPI implements CompanyApiInterface {
240
245
  */
241
246
  companyPost(company: Company, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Company, any, {}>>;
242
247
  /**
243
- * Companies are the entities that send and receive invoices. As you send invoices, companies are added as needed (company details are extrapolated). **You can only receive invoices for existing companies, so ensure they exist**.
248
+ * 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.
244
249
  * @summary Update a company
245
250
  * @param {Company} company
246
251
  * @param {*} [options] Override http request option.