@invoicetronic/ts-sdk 1.0.1 → 1.1.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 (234) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/README.md +2 -2
  3. package/base.ts +0 -24
  4. package/common.ts +1 -38
  5. package/configuration.ts +25 -19
  6. package/dist/base.d.ts +0 -24
  7. package/dist/base.js +0 -19
  8. package/dist/common.d.ts +0 -37
  9. package/dist/common.js +0 -37
  10. package/dist/configuration.d.ts +24 -17
  11. package/dist/configuration.js +2 -2
  12. package/dist/esm/base.d.ts +0 -24
  13. package/dist/esm/base.js +0 -19
  14. package/dist/esm/common.d.ts +0 -37
  15. package/dist/esm/common.js +0 -37
  16. package/dist/esm/configuration.d.ts +24 -17
  17. package/dist/esm/configuration.js +2 -2
  18. package/dist/esm/src/api/company-api.d.ts +0 -18
  19. package/dist/esm/src/api/company-api.js +0 -11
  20. package/dist/esm/src/api/log-api.d.ts +0 -12
  21. package/dist/esm/src/api/log-api.js +0 -8
  22. package/dist/esm/src/api/receive-api.d.ts +0 -14
  23. package/dist/esm/src/api/receive-api.js +0 -9
  24. package/dist/esm/src/api/send-api.d.ts +0 -42
  25. package/dist/esm/src/api/send-api.js +0 -29
  26. package/dist/esm/src/api/status-api.d.ts +0 -10
  27. package/dist/esm/src/api/status-api.js +0 -7
  28. package/dist/esm/src/api/update-api.d.ts +0 -15
  29. package/dist/esm/src/api/update-api.js +0 -11
  30. package/dist/esm/src/api/webhook-api.d.ts +0 -22
  31. package/dist/esm/src/api/webhook-api.js +0 -13
  32. package/dist/esm/src/models/allegati.d.ts +0 -30
  33. package/dist/esm/src/models/altri-dati-gestionali.d.ts +0 -25
  34. package/dist/esm/src/models/anagrafica.d.ts +0 -30
  35. package/dist/esm/src/models/cedente-prestatore.d.ts +0 -35
  36. package/dist/esm/src/models/cessionario-committente.d.ts +0 -25
  37. package/dist/esm/src/models/codice-articolo.d.ts +0 -15
  38. package/dist/esm/src/models/company.d.ts +0 -16
  39. package/dist/esm/src/models/contatti-trasmittente.d.ts +0 -15
  40. package/dist/esm/src/models/contatti.d.ts +0 -20
  41. package/dist/esm/src/models/dati-anagrafici-cedente-prestatore.d.ts +0 -45
  42. package/dist/esm/src/models/dati-anagrafici-cessionario-committente.d.ts +0 -20
  43. package/dist/esm/src/models/dati-anagrafici-vettore.d.ts +0 -25
  44. package/dist/esm/src/models/dati-anagrafici.d.ts +0 -20
  45. package/dist/esm/src/models/dati-beni-servizi.d.ts +0 -15
  46. package/dist/esm/src/models/dati-bollo.d.ts +0 -15
  47. package/dist/esm/src/models/dati-cassa-previdenziale.d.ts +0 -45
  48. package/dist/esm/src/models/dati-contratto.d.ts +0 -40
  49. package/dist/esm/src/models/dati-convenzione.d.ts +0 -40
  50. package/dist/esm/src/models/dati-ddt.d.ts +0 -20
  51. package/dist/esm/src/models/dati-fatture-collegate.d.ts +0 -40
  52. package/dist/esm/src/models/dati-generali-documento.d.ts +0 -65
  53. package/dist/esm/src/models/dati-generali.d.ts +0 -55
  54. package/dist/esm/src/models/dati-ordine-acquisto.d.ts +0 -40
  55. package/dist/esm/src/models/dati-pagamento.d.ts +0 -15
  56. package/dist/esm/src/models/dati-ricezione.d.ts +0 -40
  57. package/dist/esm/src/models/dati-riepilogo.d.ts +0 -45
  58. package/dist/esm/src/models/dati-ritenuta.d.ts +0 -25
  59. package/dist/esm/src/models/dati-sal.d.ts +0 -10
  60. package/dist/esm/src/models/dati-trasmissione.d.ts +0 -35
  61. package/dist/esm/src/models/dati-trasporto.d.ts +0 -70
  62. package/dist/esm/src/models/dati-veicoli.d.ts +0 -15
  63. package/dist/esm/src/models/dettaglio-linee.d.ts +0 -85
  64. package/dist/esm/src/models/dettaglio-pagamento.d.ts +0 -110
  65. package/dist/esm/src/models/document-data.d.ts +0 -15
  66. package/dist/esm/src/models/event.d.ts +8 -39
  67. package/dist/esm/src/models/fattura-elettronica-body.d.ts +0 -30
  68. package/dist/esm/src/models/fattura-elettronica-header.d.ts +0 -35
  69. package/dist/esm/src/models/fattura-ordinaria.d.ts +0 -20
  70. package/dist/esm/src/models/fattura-principale.d.ts +0 -15
  71. package/dist/esm/src/models/id-fiscale-iva.d.ts +0 -15
  72. package/dist/esm/src/models/id-trasmittente.d.ts +0 -15
  73. package/dist/esm/src/models/indirizzo-resa.d.ts +0 -35
  74. package/dist/esm/src/models/iscrizione-rea.d.ts +0 -30
  75. package/dist/esm/src/models/model-error.d.ts +0 -8
  76. package/dist/esm/src/models/problem-details.d.ts +0 -30
  77. package/dist/esm/src/models/problem-http-result.d.ts +0 -20
  78. package/dist/esm/src/models/rappresentante-fiscale-cessionario-committente.d.ts +0 -25
  79. package/dist/esm/src/models/rappresentante-fiscale.d.ts +0 -10
  80. package/dist/esm/src/models/receive.d.ts +0 -39
  81. package/dist/esm/src/models/sconto-maggiorazione.d.ts +0 -20
  82. package/dist/esm/src/models/sede-cedente-prestatore.d.ts +0 -35
  83. package/dist/esm/src/models/sede-cessionario-committente.d.ts +0 -35
  84. package/dist/esm/src/models/send-reduced.d.ts +0 -12
  85. package/dist/esm/src/models/send.d.ts +0 -42
  86. package/dist/esm/src/models/stabile-organizzazione.d.ts +0 -35
  87. package/dist/esm/src/models/status.d.ts +0 -9
  88. package/dist/esm/src/models/terzo-intermediario-osoggetto-emittente.d.ts +0 -10
  89. package/dist/esm/src/models/update.d.ts +0 -34
  90. package/dist/esm/src/models/web-hook-history.d.ts +0 -20
  91. package/dist/esm/src/models/web-hook.d.ts +0 -25
  92. package/dist/src/api/company-api.d.ts +0 -18
  93. package/dist/src/api/company-api.js +0 -11
  94. package/dist/src/api/log-api.d.ts +0 -12
  95. package/dist/src/api/log-api.js +0 -8
  96. package/dist/src/api/receive-api.d.ts +0 -14
  97. package/dist/src/api/receive-api.js +0 -9
  98. package/dist/src/api/send-api.d.ts +0 -42
  99. package/dist/src/api/send-api.js +0 -29
  100. package/dist/src/api/status-api.d.ts +0 -10
  101. package/dist/src/api/status-api.js +0 -7
  102. package/dist/src/api/update-api.d.ts +0 -15
  103. package/dist/src/api/update-api.js +0 -11
  104. package/dist/src/api/webhook-api.d.ts +0 -22
  105. package/dist/src/api/webhook-api.js +0 -13
  106. package/dist/src/models/allegati.d.ts +0 -30
  107. package/dist/src/models/altri-dati-gestionali.d.ts +0 -25
  108. package/dist/src/models/anagrafica.d.ts +0 -30
  109. package/dist/src/models/cedente-prestatore.d.ts +0 -35
  110. package/dist/src/models/cessionario-committente.d.ts +0 -25
  111. package/dist/src/models/codice-articolo.d.ts +0 -15
  112. package/dist/src/models/company.d.ts +0 -16
  113. package/dist/src/models/contatti-trasmittente.d.ts +0 -15
  114. package/dist/src/models/contatti.d.ts +0 -20
  115. package/dist/src/models/dati-anagrafici-cedente-prestatore.d.ts +0 -45
  116. package/dist/src/models/dati-anagrafici-cessionario-committente.d.ts +0 -20
  117. package/dist/src/models/dati-anagrafici-vettore.d.ts +0 -25
  118. package/dist/src/models/dati-anagrafici.d.ts +0 -20
  119. package/dist/src/models/dati-beni-servizi.d.ts +0 -15
  120. package/dist/src/models/dati-bollo.d.ts +0 -15
  121. package/dist/src/models/dati-cassa-previdenziale.d.ts +0 -45
  122. package/dist/src/models/dati-contratto.d.ts +0 -40
  123. package/dist/src/models/dati-convenzione.d.ts +0 -40
  124. package/dist/src/models/dati-ddt.d.ts +0 -20
  125. package/dist/src/models/dati-fatture-collegate.d.ts +0 -40
  126. package/dist/src/models/dati-generali-documento.d.ts +0 -65
  127. package/dist/src/models/dati-generali.d.ts +0 -55
  128. package/dist/src/models/dati-ordine-acquisto.d.ts +0 -40
  129. package/dist/src/models/dati-pagamento.d.ts +0 -15
  130. package/dist/src/models/dati-ricezione.d.ts +0 -40
  131. package/dist/src/models/dati-riepilogo.d.ts +0 -45
  132. package/dist/src/models/dati-ritenuta.d.ts +0 -25
  133. package/dist/src/models/dati-sal.d.ts +0 -10
  134. package/dist/src/models/dati-trasmissione.d.ts +0 -35
  135. package/dist/src/models/dati-trasporto.d.ts +0 -70
  136. package/dist/src/models/dati-veicoli.d.ts +0 -15
  137. package/dist/src/models/dettaglio-linee.d.ts +0 -85
  138. package/dist/src/models/dettaglio-pagamento.d.ts +0 -110
  139. package/dist/src/models/document-data.d.ts +0 -15
  140. package/dist/src/models/event.d.ts +8 -39
  141. package/dist/src/models/fattura-elettronica-body.d.ts +0 -30
  142. package/dist/src/models/fattura-elettronica-header.d.ts +0 -35
  143. package/dist/src/models/fattura-ordinaria.d.ts +0 -20
  144. package/dist/src/models/fattura-principale.d.ts +0 -15
  145. package/dist/src/models/id-fiscale-iva.d.ts +0 -15
  146. package/dist/src/models/id-trasmittente.d.ts +0 -15
  147. package/dist/src/models/indirizzo-resa.d.ts +0 -35
  148. package/dist/src/models/iscrizione-rea.d.ts +0 -30
  149. package/dist/src/models/model-error.d.ts +0 -8
  150. package/dist/src/models/problem-details.d.ts +0 -30
  151. package/dist/src/models/problem-http-result.d.ts +0 -20
  152. package/dist/src/models/rappresentante-fiscale-cessionario-committente.d.ts +0 -25
  153. package/dist/src/models/rappresentante-fiscale.d.ts +0 -10
  154. package/dist/src/models/receive.d.ts +0 -39
  155. package/dist/src/models/sconto-maggiorazione.d.ts +0 -20
  156. package/dist/src/models/sede-cedente-prestatore.d.ts +0 -35
  157. package/dist/src/models/sede-cessionario-committente.d.ts +0 -35
  158. package/dist/src/models/send-reduced.d.ts +0 -12
  159. package/dist/src/models/send.d.ts +0 -42
  160. package/dist/src/models/stabile-organizzazione.d.ts +0 -35
  161. package/dist/src/models/status.d.ts +0 -9
  162. package/dist/src/models/terzo-intermediario-osoggetto-emittente.d.ts +0 -10
  163. package/dist/src/models/update.d.ts +0 -34
  164. package/dist/src/models/web-hook-history.d.ts +0 -20
  165. package/dist/src/models/web-hook.d.ts +0 -25
  166. package/docs/Event.md +4 -2
  167. package/package.json +1 -1
  168. package/src/api/company-api.ts +0 -18
  169. package/src/api/log-api.ts +0 -12
  170. package/src/api/receive-api.ts +0 -14
  171. package/src/api/send-api.ts +0 -42
  172. package/src/api/status-api.ts +0 -10
  173. package/src/api/update-api.ts +0 -15
  174. package/src/api/webhook-api.ts +0 -22
  175. package/src/models/allegati.ts +0 -30
  176. package/src/models/altri-dati-gestionali.ts +0 -25
  177. package/src/models/anagrafica.ts +0 -30
  178. package/src/models/cedente-prestatore.ts +0 -35
  179. package/src/models/cessionario-committente.ts +0 -25
  180. package/src/models/codice-articolo.ts +0 -15
  181. package/src/models/company.ts +0 -16
  182. package/src/models/contatti-trasmittente.ts +0 -15
  183. package/src/models/contatti.ts +0 -20
  184. package/src/models/dati-anagrafici-cedente-prestatore.ts +0 -45
  185. package/src/models/dati-anagrafici-cessionario-committente.ts +0 -20
  186. package/src/models/dati-anagrafici-vettore.ts +0 -25
  187. package/src/models/dati-anagrafici.ts +0 -20
  188. package/src/models/dati-beni-servizi.ts +0 -15
  189. package/src/models/dati-bollo.ts +0 -15
  190. package/src/models/dati-cassa-previdenziale.ts +0 -45
  191. package/src/models/dati-contratto.ts +0 -40
  192. package/src/models/dati-convenzione.ts +0 -40
  193. package/src/models/dati-ddt.ts +0 -20
  194. package/src/models/dati-fatture-collegate.ts +0 -40
  195. package/src/models/dati-generali-documento.ts +0 -65
  196. package/src/models/dati-generali.ts +0 -55
  197. package/src/models/dati-ordine-acquisto.ts +0 -40
  198. package/src/models/dati-pagamento.ts +0 -15
  199. package/src/models/dati-ricezione.ts +0 -40
  200. package/src/models/dati-riepilogo.ts +0 -45
  201. package/src/models/dati-ritenuta.ts +0 -25
  202. package/src/models/dati-sal.ts +0 -10
  203. package/src/models/dati-trasmissione.ts +0 -35
  204. package/src/models/dati-trasporto.ts +0 -70
  205. package/src/models/dati-veicoli.ts +0 -15
  206. package/src/models/dettaglio-linee.ts +0 -85
  207. package/src/models/dettaglio-pagamento.ts +0 -110
  208. package/src/models/document-data.ts +0 -15
  209. package/src/models/event.ts +8 -39
  210. package/src/models/fattura-elettronica-body.ts +0 -30
  211. package/src/models/fattura-elettronica-header.ts +0 -35
  212. package/src/models/fattura-ordinaria.ts +0 -20
  213. package/src/models/fattura-principale.ts +0 -15
  214. package/src/models/id-fiscale-iva.ts +0 -15
  215. package/src/models/id-trasmittente.ts +0 -15
  216. package/src/models/indirizzo-resa.ts +0 -35
  217. package/src/models/iscrizione-rea.ts +0 -30
  218. package/src/models/model-error.ts +0 -8
  219. package/src/models/problem-details.ts +0 -30
  220. package/src/models/problem-http-result.ts +0 -20
  221. package/src/models/rappresentante-fiscale-cessionario-committente.ts +0 -25
  222. package/src/models/rappresentante-fiscale.ts +0 -10
  223. package/src/models/receive.ts +0 -39
  224. package/src/models/sconto-maggiorazione.ts +0 -20
  225. package/src/models/sede-cedente-prestatore.ts +0 -35
  226. package/src/models/sede-cessionario-committente.ts +0 -35
  227. package/src/models/send-reduced.ts +0 -12
  228. package/src/models/send.ts +0 -42
  229. package/src/models/stabile-organizzazione.ts +0 -35
  230. package/src/models/status.ts +0 -9
  231. package/src/models/terzo-intermediario-osoggetto-emittente.ts +0 -10
  232. package/src/models/update.ts +0 -34
  233. package/src/models/web-hook-history.ts +0 -20
  234. package/src/models/web-hook.ts +0 -25
package/CHANGELOG.md CHANGED
@@ -1 +1 @@
1
- # Changelog\n\n## [1.0.1.0] - 2025-09-16\nSee main repository changelog for details.
1
+ # Changelog\n\n## [1.1.0] - 2025-12-04\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.0.1
10
+ ## @invoicetronic/ts-sdk@1.1
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.0.1 --save
48
+ npm install @invoicetronic/ts-sdk@1.1 --save
49
49
  ```
50
50
 
51
51
  _unPublished (not recommended):_
package/base.ts CHANGED
@@ -21,10 +21,6 @@ import globalAxios from 'axios';
21
21
 
22
22
  export const BASE_PATH = "http://localhost".replace(/\/+$/, "");
23
23
 
24
- /**
25
- *
26
- * @export
27
- */
28
24
  export const COLLECTION_FORMATS = {
29
25
  csv: ",",
30
26
  ssv: " ",
@@ -32,21 +28,11 @@ export const COLLECTION_FORMATS = {
32
28
  pipes: "|",
33
29
  };
34
30
 
35
- /**
36
- *
37
- * @export
38
- * @interface RequestArgs
39
- */
40
31
  export interface RequestArgs {
41
32
  url: string;
42
33
  options: RawAxiosRequestConfig;
43
34
  }
44
35
 
45
- /**
46
- *
47
- * @export
48
- * @class BaseAPI
49
- */
50
36
  export class BaseAPI {
51
37
  protected configuration: Configuration | undefined;
52
38
 
@@ -58,12 +44,6 @@ export class BaseAPI {
58
44
  }
59
45
  };
60
46
 
61
- /**
62
- *
63
- * @export
64
- * @class RequiredError
65
- * @extends {Error}
66
- */
67
47
  export class RequiredError extends Error {
68
48
  constructor(public field: string, msg?: string) {
69
49
  super(msg);
@@ -78,9 +58,5 @@ interface ServerMap {
78
58
  }[];
79
59
  }
80
60
 
81
- /**
82
- *
83
- * @export
84
- */
85
61
  export const operationServerMap: ServerMap = {
86
62
  }
package/common.ts CHANGED
@@ -12,23 +12,17 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
 
15
-
16
15
  import type { Configuration } from "./configuration";
17
16
  import type { RequestArgs } from "./base";
18
17
  import type { AxiosInstance, AxiosResponse } from 'axios';
19
18
  import { RequiredError } from "./base";
20
19
  import { URL, URLSearchParams } from 'url';
21
20
 
22
- /**
23
- *
24
- * @export
25
- */
26
21
  export const DUMMY_BASE_URL = 'https://example.com'
27
22
 
28
23
  /**
29
24
  *
30
25
  * @throws {RequiredError}
31
- * @export
32
26
  */
33
27
  export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) {
34
28
  if (paramValue === null || paramValue === undefined) {
@@ -36,10 +30,6 @@ export const assertParamExists = function (functionName: string, paramName: stri
36
30
  }
37
31
  }
38
32
 
39
- /**
40
- *
41
- * @export
42
- */
43
33
  export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) {
44
34
  if (configuration && configuration.apiKey) {
45
35
  const localVarApiKeyValue = typeof configuration.apiKey === 'function'
@@ -49,20 +39,12 @@ export const setApiKeyToObject = async function (object: any, keyParamName: stri
49
39
  }
50
40
  }
51
41
 
52
- /**
53
- *
54
- * @export
55
- */
56
42
  export const setBasicAuthToObject = function (object: any, configuration?: Configuration) {
57
43
  if (configuration && (configuration.username || configuration.password)) {
58
44
  object["auth"] = { username: configuration.username, password: configuration.password };
59
45
  }
60
46
  }
61
47
 
62
- /**
63
- *
64
- * @export
65
- */
66
48
  export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) {
67
49
  if (configuration && configuration.accessToken) {
68
50
  const accessToken = typeof configuration.accessToken === 'function'
@@ -72,10 +54,6 @@ export const setBearerAuthToObject = async function (object: any, configuration?
72
54
  }
73
55
  }
74
56
 
75
- /**
76
- *
77
- * @export
78
- */
79
57
  export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) {
80
58
  if (configuration && configuration.accessToken) {
81
59
  const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
@@ -85,6 +63,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope
85
63
  }
86
64
  }
87
65
 
66
+
88
67
  function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
89
68
  if (parameter == null) return;
90
69
  if (typeof parameter === "object") {
@@ -107,20 +86,12 @@ function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: an
107
86
  }
108
87
  }
109
88
 
110
- /**
111
- *
112
- * @export
113
- */
114
89
  export const setSearchParams = function (url: URL, ...objects: any[]) {
115
90
  const searchParams = new URLSearchParams(url.search);
116
91
  setFlattenedQueryParams(searchParams, objects);
117
92
  url.search = searchParams.toString();
118
93
  }
119
94
 
120
- /**
121
- *
122
- * @export
123
- */
124
95
  export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {
125
96
  const nonString = typeof value !== 'string';
126
97
  const needsSerialization = nonString && configuration && configuration.isJsonMime
@@ -131,18 +102,10 @@ export const serializeDataIfNeeded = function (value: any, requestOptions: any,
131
102
  : (value || "");
132
103
  }
133
104
 
134
- /**
135
- *
136
- * @export
137
- */
138
105
  export const toPathString = function (url: URL) {
139
106
  return url.pathname + url.search + url.hash
140
107
  }
141
108
 
142
- /**
143
- *
144
- * @export
145
- */
146
109
  export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
147
110
  return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
148
111
  const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url};
package/configuration.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  /* tslint:disable */
2
- /* eslint-disable */
3
2
  /**
4
3
  * Invoicetronic API
5
4
  * The [Invoicetronic API][2] is a RESTful service that allows you to send and receive invoices through the Italian [Servizio di Interscambio (SDI)][1], or Interchange Service. The API is designed to be simple and easy to use, abstracting away SDI complexity while providing complete control over the invoice send/receive process. It provides advanced features as encryption at rest, multi-language pre-flight invoice validation, multiple upload formats, webhooks, event logging, client SDKs, and CLI tools. For more information, see [Invoicetronic website][2] [1]: https://www.fatturapa.gov.it/it/sistemainterscambio/cose-il-sdi/ [2]: https://invoicetronic.com/
@@ -12,12 +11,24 @@
12
11
  * Do not edit the class manually.
13
12
  */
14
13
 
14
+ interface AWSv4Configuration {
15
+ options?: {
16
+ region?: string
17
+ service?: string
18
+ }
19
+ credentials?: {
20
+ accessKeyId?: string
21
+ secretAccessKey?: string,
22
+ sessionToken?: string
23
+ }
24
+ }
15
25
 
16
26
  export interface ConfigurationParameters {
17
27
  apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
18
28
  username?: string;
19
29
  password?: string;
20
30
  accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
31
+ awsv4?: AWSv4Configuration;
21
32
  basePath?: string;
22
33
  serverIndex?: number;
23
34
  baseOptions?: any;
@@ -28,49 +39,43 @@ export class Configuration {
28
39
  /**
29
40
  * parameter for apiKey security
30
41
  * @param name security name
31
- * @memberof Configuration
32
42
  */
33
43
  apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
34
44
  /**
35
45
  * parameter for basic security
36
- *
37
- * @type {string}
38
- * @memberof Configuration
39
46
  */
40
47
  username?: string;
41
48
  /**
42
49
  * parameter for basic security
43
- *
44
- * @type {string}
45
- * @memberof Configuration
46
50
  */
47
51
  password?: string;
48
52
  /**
49
53
  * parameter for oauth2 security
50
54
  * @param name security name
51
55
  * @param scopes oauth2 scope
52
- * @memberof Configuration
53
56
  */
54
57
  accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
55
58
  /**
56
- * override base path
57
- *
58
- * @type {string}
59
+ * parameter for aws4 signature security
60
+ * @param {Object} AWS4Signature - AWS4 Signature security
61
+ * @param {string} options.region - aws region
62
+ * @param {string} options.service - name of the service.
63
+ * @param {string} credentials.accessKeyId - aws access key id
64
+ * @param {string} credentials.secretAccessKey - aws access key
65
+ * @param {string} credentials.sessionToken - aws session token
59
66
  * @memberof Configuration
60
67
  */
68
+ awsv4?: AWSv4Configuration;
69
+ /**
70
+ * override base path
71
+ */
61
72
  basePath?: string;
62
73
  /**
63
74
  * override server index
64
- *
65
- * @type {number}
66
- * @memberof Configuration
67
75
  */
68
76
  serverIndex?: number;
69
77
  /**
70
78
  * base options for axios calls
71
- *
72
- * @type {any}
73
- * @memberof Configuration
74
79
  */
75
80
  baseOptions?: any;
76
81
  /**
@@ -87,12 +92,13 @@ export class Configuration {
87
92
  this.username = param.username;
88
93
  this.password = param.password;
89
94
  this.accessToken = param.accessToken;
95
+ this.awsv4 = param.awsv4;
90
96
  this.basePath = param.basePath;
91
97
  this.serverIndex = param.serverIndex;
92
98
  this.baseOptions = {
93
99
  ...param.baseOptions,
94
100
  headers: {
95
- 'User-Agent': "Invoicetronic/1.0.1/TypeScript-SDK",
101
+ 'User-Agent': "Invoicetronic/1.1/TypeScript-SDK",
96
102
  ...param.baseOptions?.headers,
97
103
  },
98
104
  };
package/dist/base.d.ts CHANGED
@@ -12,42 +12,22 @@
12
12
  import type { Configuration } from './configuration';
13
13
  import type { AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
14
  export declare const BASE_PATH: string;
15
- /**
16
- *
17
- * @export
18
- */
19
15
  export declare const COLLECTION_FORMATS: {
20
16
  csv: string;
21
17
  ssv: string;
22
18
  tsv: string;
23
19
  pipes: string;
24
20
  };
25
- /**
26
- *
27
- * @export
28
- * @interface RequestArgs
29
- */
30
21
  export interface RequestArgs {
31
22
  url: string;
32
23
  options: RawAxiosRequestConfig;
33
24
  }
34
- /**
35
- *
36
- * @export
37
- * @class BaseAPI
38
- */
39
25
  export declare class BaseAPI {
40
26
  protected basePath: string;
41
27
  protected axios: AxiosInstance;
42
28
  protected configuration: Configuration | undefined;
43
29
  constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
44
30
  }
45
- /**
46
- *
47
- * @export
48
- * @class RequiredError
49
- * @extends {Error}
50
- */
51
31
  export declare class RequiredError extends Error {
52
32
  field: string;
53
33
  constructor(field: string, msg?: string);
@@ -58,9 +38,5 @@ interface ServerMap {
58
38
  description: string;
59
39
  }[];
60
40
  }
61
- /**
62
- *
63
- * @export
64
- */
65
41
  export declare const operationServerMap: ServerMap;
66
42
  export {};
package/dist/base.js CHANGED
@@ -16,21 +16,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
17
17
  const axios_1 = require("axios");
18
18
  exports.BASE_PATH = "http://localhost".replace(/\/+$/, "");
19
- /**
20
- *
21
- * @export
22
- */
23
19
  exports.COLLECTION_FORMATS = {
24
20
  csv: ",",
25
21
  ssv: " ",
26
22
  tsv: "\t",
27
23
  pipes: "|",
28
24
  };
29
- /**
30
- *
31
- * @export
32
- * @class BaseAPI
33
- */
34
25
  class BaseAPI {
35
26
  constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
36
27
  var _a;
@@ -44,12 +35,6 @@ class BaseAPI {
44
35
  }
45
36
  exports.BaseAPI = BaseAPI;
46
37
  ;
47
- /**
48
- *
49
- * @export
50
- * @class RequiredError
51
- * @extends {Error}
52
- */
53
38
  class RequiredError extends Error {
54
39
  constructor(field, msg) {
55
40
  super(msg);
@@ -58,8 +43,4 @@ class RequiredError extends Error {
58
43
  }
59
44
  }
60
45
  exports.RequiredError = RequiredError;
61
- /**
62
- *
63
- * @export
64
- */
65
46
  exports.operationServerMap = {};
package/dist/common.d.ts CHANGED
@@ -13,54 +13,17 @@ import type { Configuration } from "./configuration";
13
13
  import type { RequestArgs } from "./base";
14
14
  import type { AxiosInstance, AxiosResponse } from 'axios';
15
15
  import { URL } from 'url';
16
- /**
17
- *
18
- * @export
19
- */
20
16
  export declare const DUMMY_BASE_URL = "https://example.com";
21
17
  /**
22
18
  *
23
19
  * @throws {RequiredError}
24
- * @export
25
20
  */
26
21
  export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
27
- /**
28
- *
29
- * @export
30
- */
31
22
  export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
32
- /**
33
- *
34
- * @export
35
- */
36
23
  export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
37
- /**
38
- *
39
- * @export
40
- */
41
24
  export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
42
- /**
43
- *
44
- * @export
45
- */
46
25
  export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
47
- /**
48
- *
49
- * @export
50
- */
51
26
  export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
52
- /**
53
- *
54
- * @export
55
- */
56
27
  export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
57
- /**
58
- *
59
- * @export
60
- */
61
28
  export declare const toPathString: (url: URL) => string;
62
- /**
63
- *
64
- * @export
65
- */
66
29
  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
@@ -25,15 +25,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
25
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;
26
26
  const base_1 = require("./base");
27
27
  const url_1 = require("url");
28
- /**
29
- *
30
- * @export
31
- */
32
28
  exports.DUMMY_BASE_URL = 'https://example.com';
33
29
  /**
34
30
  *
35
31
  * @throws {RequiredError}
36
- * @export
37
32
  */
38
33
  const assertParamExists = function (functionName, paramName, paramValue) {
39
34
  if (paramValue === null || paramValue === undefined) {
@@ -41,10 +36,6 @@ const assertParamExists = function (functionName, paramName, paramValue) {
41
36
  }
42
37
  };
43
38
  exports.assertParamExists = assertParamExists;
44
- /**
45
- *
46
- * @export
47
- */
48
39
  const setApiKeyToObject = function (object, keyParamName, configuration) {
49
40
  return __awaiter(this, void 0, void 0, function* () {
50
41
  if (configuration && configuration.apiKey) {
@@ -56,20 +47,12 @@ const setApiKeyToObject = function (object, keyParamName, configuration) {
56
47
  });
57
48
  };
58
49
  exports.setApiKeyToObject = setApiKeyToObject;
59
- /**
60
- *
61
- * @export
62
- */
63
50
  const setBasicAuthToObject = function (object, configuration) {
64
51
  if (configuration && (configuration.username || configuration.password)) {
65
52
  object["auth"] = { username: configuration.username, password: configuration.password };
66
53
  }
67
54
  };
68
55
  exports.setBasicAuthToObject = setBasicAuthToObject;
69
- /**
70
- *
71
- * @export
72
- */
73
56
  const setBearerAuthToObject = function (object, configuration) {
74
57
  return __awaiter(this, void 0, void 0, function* () {
75
58
  if (configuration && configuration.accessToken) {
@@ -81,10 +64,6 @@ const setBearerAuthToObject = function (object, configuration) {
81
64
  });
82
65
  };
83
66
  exports.setBearerAuthToObject = setBearerAuthToObject;
84
- /**
85
- *
86
- * @export
87
- */
88
67
  const setOAuthToObject = function (object, name, scopes, configuration) {
89
68
  return __awaiter(this, void 0, void 0, function* () {
90
69
  if (configuration && configuration.accessToken) {
@@ -116,20 +95,12 @@ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
116
95
  }
117
96
  }
118
97
  }
119
- /**
120
- *
121
- * @export
122
- */
123
98
  const setSearchParams = function (url, ...objects) {
124
99
  const searchParams = new url_1.URLSearchParams(url.search);
125
100
  setFlattenedQueryParams(searchParams, objects);
126
101
  url.search = searchParams.toString();
127
102
  };
128
103
  exports.setSearchParams = setSearchParams;
129
- /**
130
- *
131
- * @export
132
- */
133
104
  const serializeDataIfNeeded = function (value, requestOptions, configuration) {
134
105
  const nonString = typeof value !== 'string';
135
106
  const needsSerialization = nonString && configuration && configuration.isJsonMime
@@ -140,18 +111,10 @@ const serializeDataIfNeeded = function (value, requestOptions, configuration) {
140
111
  : (value || "");
141
112
  };
142
113
  exports.serializeDataIfNeeded = serializeDataIfNeeded;
143
- /**
144
- *
145
- * @export
146
- */
147
114
  const toPathString = function (url) {
148
115
  return url.pathname + url.search + url.hash;
149
116
  };
150
117
  exports.toPathString = toPathString;
151
- /**
152
- *
153
- * @export
154
- */
155
118
  const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
156
119
  return (axios = globalAxios, basePath = BASE_PATH) => {
157
120
  var _a;
@@ -9,11 +9,23 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ interface AWSv4Configuration {
13
+ options?: {
14
+ region?: string;
15
+ service?: string;
16
+ };
17
+ credentials?: {
18
+ accessKeyId?: string;
19
+ secretAccessKey?: string;
20
+ sessionToken?: string;
21
+ };
22
+ }
12
23
  export interface ConfigurationParameters {
13
24
  apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
14
25
  username?: string;
15
26
  password?: string;
16
27
  accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
28
+ awsv4?: AWSv4Configuration;
17
29
  basePath?: string;
18
30
  serverIndex?: number;
19
31
  baseOptions?: any;
@@ -23,49 +35,43 @@ export declare class Configuration {
23
35
  /**
24
36
  * parameter for apiKey security
25
37
  * @param name security name
26
- * @memberof Configuration
27
38
  */
28
39
  apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
29
40
  /**
30
41
  * parameter for basic security
31
- *
32
- * @type {string}
33
- * @memberof Configuration
34
42
  */
35
43
  username?: string;
36
44
  /**
37
45
  * parameter for basic security
38
- *
39
- * @type {string}
40
- * @memberof Configuration
41
46
  */
42
47
  password?: string;
43
48
  /**
44
49
  * parameter for oauth2 security
45
50
  * @param name security name
46
51
  * @param scopes oauth2 scope
47
- * @memberof Configuration
48
52
  */
49
53
  accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
50
54
  /**
51
- * override base path
52
- *
53
- * @type {string}
55
+ * parameter for aws4 signature security
56
+ * @param {Object} AWS4Signature - AWS4 Signature security
57
+ * @param {string} options.region - aws region
58
+ * @param {string} options.service - name of the service.
59
+ * @param {string} credentials.accessKeyId - aws access key id
60
+ * @param {string} credentials.secretAccessKey - aws access key
61
+ * @param {string} credentials.sessionToken - aws session token
54
62
  * @memberof Configuration
55
63
  */
64
+ awsv4?: AWSv4Configuration;
65
+ /**
66
+ * override base path
67
+ */
56
68
  basePath?: string;
57
69
  /**
58
70
  * override server index
59
- *
60
- * @type {number}
61
- * @memberof Configuration
62
71
  */
63
72
  serverIndex?: number;
64
73
  /**
65
74
  * base options for axios calls
66
- *
67
- * @type {any}
68
- * @memberof Configuration
69
75
  */
70
76
  baseOptions?: any;
71
77
  /**
@@ -89,3 +95,4 @@ export declare class Configuration {
89
95
  */
90
96
  isJsonMime(mime: string): boolean;
91
97
  }
98
+ export {};
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  /* tslint:disable */
3
- /* eslint-disable */
4
3
  /**
5
4
  * Invoicetronic API
6
5
  * The [Invoicetronic API][2] is a RESTful service that allows you to send and receive invoices through the Italian [Servizio di Interscambio (SDI)][1], or Interchange Service. The API is designed to be simple and easy to use, abstracting away SDI complexity while providing complete control over the invoice send/receive process. It provides advanced features as encryption at rest, multi-language pre-flight invoice validation, multiple upload formats, webhooks, event logging, client SDKs, and CLI tools. For more information, see [Invoicetronic website][2] [1]: https://www.fatturapa.gov.it/it/sistemainterscambio/cose-il-sdi/ [2]: https://invoicetronic.com/
@@ -21,9 +20,10 @@ class Configuration {
21
20
  this.username = param.username;
22
21
  this.password = param.password;
23
22
  this.accessToken = param.accessToken;
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.0.1/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.1/TypeScript-SDK" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
27
27
  this.formDataCtor = param.formDataCtor;
28
28
  }
29
29
  /**