@ontemper/edi 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 (129) hide show
  1. package/README.md +321 -0
  2. package/dist/control-numbers.d.ts +20 -0
  3. package/dist/control-numbers.js +77 -0
  4. package/dist/edination-client/api/edi-model-api.d.ts +268 -0
  5. package/dist/edination-client/api/edi-model-api.js +326 -0
  6. package/dist/edination-client/api/edifact-api.d.ts +453 -0
  7. package/dist/edination-client/api/edifact-api.js +448 -0
  8. package/dist/edination-client/api/hl7-api.d.ts +294 -0
  9. package/dist/edination-client/api/hl7-api.js +315 -0
  10. package/dist/edination-client/api/ncpdp-api.d.ts +278 -0
  11. package/dist/edination-client/api/ncpdp-api.js +305 -0
  12. package/dist/edination-client/api/vda-api.d.ts +262 -0
  13. package/dist/edination-client/api/vda-api.js +295 -0
  14. package/dist/edination-client/api/x12-api.d.ts +437 -0
  15. package/dist/edination-client/api/x12-api.js +438 -0
  16. package/dist/edination-client/api.d.ts +17 -0
  17. package/dist/edination-client/api.js +35 -0
  18. package/dist/edination-client/base.d.ts +66 -0
  19. package/dist/edination-client/base.js +70 -0
  20. package/dist/edination-client/common.d.ts +65 -0
  21. package/dist/edination-client/common.js +142 -0
  22. package/dist/edination-client/configuration.d.ts +91 -0
  23. package/dist/edination-client/configuration.js +104 -0
  24. package/dist/edination-client/index.d.ts +14 -0
  25. package/dist/edination-client/index.js +32 -0
  26. package/dist/edination-client/model/batch-receiving-application.d.ts +36 -0
  27. package/dist/edination-client/model/batch-receiving-application.js +15 -0
  28. package/dist/edination-client/model/batch-receiving-facility.d.ts +36 -0
  29. package/dist/edination-client/model/batch-receiving-facility.js +15 -0
  30. package/dist/edination-client/model/batch-receiving-network-address.d.ts +36 -0
  31. package/dist/edination-client/model/batch-receiving-network-address.js +15 -0
  32. package/dist/edination-client/model/batch-sending-application.d.ts +36 -0
  33. package/dist/edination-client/model/batch-sending-application.js +15 -0
  34. package/dist/edination-client/model/batch-sending-facility.d.ts +36 -0
  35. package/dist/edination-client/model/batch-sending-facility.js +15 -0
  36. package/dist/edination-client/model/batch-sending-network-address.d.ts +36 -0
  37. package/dist/edination-client/model/batch-sending-network-address.js +15 -0
  38. package/dist/edination-client/model/bhs.d.ts +108 -0
  39. package/dist/edination-client/model/bhs.js +15 -0
  40. package/dist/edination-client/model/bts.d.ts +36 -0
  41. package/dist/edination-client/model/bts.js +15 -0
  42. package/dist/edination-client/model/edi-model.d.ts +37 -0
  43. package/dist/edination-client/model/edi-model.js +15 -0
  44. package/dist/edination-client/model/edifact-group.d.ts +38 -0
  45. package/dist/edination-client/model/edifact-group.js +15 -0
  46. package/dist/edination-client/model/edifact-interchange.d.ts +53 -0
  47. package/dist/edination-client/model/edifact-interchange.js +15 -0
  48. package/dist/edination-client/model/error-details.d.ts +30 -0
  49. package/dist/edination-client/model/error-details.js +15 -0
  50. package/dist/edination-client/model/fhs.d.ts +108 -0
  51. package/dist/edination-client/model/fhs.js +15 -0
  52. package/dist/edination-client/model/file-receiving-application.d.ts +36 -0
  53. package/dist/edination-client/model/file-receiving-application.js +15 -0
  54. package/dist/edination-client/model/file-receiving-facility.d.ts +36 -0
  55. package/dist/edination-client/model/file-receiving-facility.js +15 -0
  56. package/dist/edination-client/model/file-receiving-network-address.d.ts +36 -0
  57. package/dist/edination-client/model/file-receiving-network-address.js +15 -0
  58. package/dist/edination-client/model/file-sending-application.d.ts +36 -0
  59. package/dist/edination-client/model/file-sending-application.js +15 -0
  60. package/dist/edination-client/model/file-sending-facility.d.ts +36 -0
  61. package/dist/edination-client/model/file-sending-facility.js +15 -0
  62. package/dist/edination-client/model/file-sending-network-address.d.ts +36 -0
  63. package/dist/edination-client/model/file-sending-network-address.js +15 -0
  64. package/dist/edination-client/model/flat-message.d.ts +37 -0
  65. package/dist/edination-client/model/flat-message.js +15 -0
  66. package/dist/edination-client/model/fts.d.ts +30 -0
  67. package/dist/edination-client/model/fts.js +15 -0
  68. package/dist/edination-client/model/ge.d.ts +30 -0
  69. package/dist/edination-client/model/ge.js +15 -0
  70. package/dist/edination-client/model/gs.d.ts +66 -0
  71. package/dist/edination-client/model/gs.js +15 -0
  72. package/dist/edination-client/model/hl7-group.d.ts +38 -0
  73. package/dist/edination-client/model/hl7-group.js +15 -0
  74. package/dist/edination-client/model/hl7-interchange.d.ts +46 -0
  75. package/dist/edination-client/model/hl7-interchange.js +15 -0
  76. package/dist/edination-client/model/iea.d.ts +30 -0
  77. package/dist/edination-client/model/iea.js +15 -0
  78. package/dist/edination-client/model/index.d.ts +49 -0
  79. package/dist/edination-client/model/index.js +65 -0
  80. package/dist/edination-client/model/isa.d.ts +114 -0
  81. package/dist/edination-client/model/isa.js +15 -0
  82. package/dist/edination-client/model/link.d.ts +36 -0
  83. package/dist/edination-client/model/link.js +15 -0
  84. package/dist/edination-client/model/ncpdp-transmission.d.ts +45 -0
  85. package/dist/edination-client/model/ncpdp-transmission.js +15 -0
  86. package/dist/edination-client/model/operation-detail.d.ts +90 -0
  87. package/dist/edination-client/model/operation-detail.js +15 -0
  88. package/dist/edination-client/model/operation-result.d.ts +37 -0
  89. package/dist/edination-client/model/operation-result.js +15 -0
  90. package/dist/edination-client/model/s001.d.ts +42 -0
  91. package/dist/edination-client/model/s001.js +15 -0
  92. package/dist/edination-client/model/s002.d.ts +42 -0
  93. package/dist/edination-client/model/s002.js +15 -0
  94. package/dist/edination-client/model/s003.d.ts +42 -0
  95. package/dist/edination-client/model/s003.js +15 -0
  96. package/dist/edination-client/model/s004.d.ts +30 -0
  97. package/dist/edination-client/model/s004.js +15 -0
  98. package/dist/edination-client/model/s005.d.ts +30 -0
  99. package/dist/edination-client/model/s005.js +15 -0
  100. package/dist/edination-client/model/s006.d.ts +30 -0
  101. package/dist/edination-client/model/s006.js +15 -0
  102. package/dist/edination-client/model/s007.d.ts +30 -0
  103. package/dist/edination-client/model/s007.js +15 -0
  104. package/dist/edination-client/model/s008.d.ts +36 -0
  105. package/dist/edination-client/model/s008.js +15 -0
  106. package/dist/edination-client/model/ta1.d.ts +48 -0
  107. package/dist/edination-client/model/ta1.js +15 -0
  108. package/dist/edination-client/model/transmission-header.d.ts +66 -0
  109. package/dist/edination-client/model/transmission-header.js +15 -0
  110. package/dist/edination-client/model/transmission-trailer.d.ts +36 -0
  111. package/dist/edination-client/model/transmission-trailer.js +15 -0
  112. package/dist/edination-client/model/una.d.ts +54 -0
  113. package/dist/edination-client/model/una.js +15 -0
  114. package/dist/edination-client/model/unb.d.ts +89 -0
  115. package/dist/edination-client/model/unb.js +15 -0
  116. package/dist/edination-client/model/une.d.ts +30 -0
  117. package/dist/edination-client/model/une.js +15 -0
  118. package/dist/edination-client/model/ung.d.ts +70 -0
  119. package/dist/edination-client/model/ung.js +15 -0
  120. package/dist/edination-client/model/unz.d.ts +30 -0
  121. package/dist/edination-client/model/unz.js +15 -0
  122. package/dist/edination-client/model/x12-group.d.ts +38 -0
  123. package/dist/edination-client/model/x12-group.js +15 -0
  124. package/dist/edination-client/model/x12-interchange.d.ts +65 -0
  125. package/dist/edination-client/model/x12-interchange.js +15 -0
  126. package/dist/index.d.ts +45 -0
  127. package/dist/index.js +197 -0
  128. package/examples/node-edi.ts +58 -0
  129. package/package.json +49 -0
@@ -0,0 +1,262 @@
1
+ /**
2
+ * EdiNation API
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 2
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { AxiosInstance, AxiosPromise, RawAxiosRequestConfig } from 'axios';
13
+ import { BaseAPI, type RequestArgs } from '../base';
14
+ import type { Configuration } from '../configuration';
15
+ import type { FlatMessage } from '../model';
16
+ import type { OperationResult } from '../model';
17
+ /**
18
+ * VdaApi - axios parameter creator
19
+ * @export
20
+ */
21
+ export declare const VdaApiAxiosParamCreator: (configuration?: Configuration) => {
22
+ /**
23
+ *
24
+ * @summary Convert VDA files to JSON
25
+ * @param {boolean} [ignoreNullValues] Whether to ignore all null values in the response. The default is false.
26
+ * @param {boolean} [continueOnError] Whether to continue reading if a corrupt interchange is encountered. The default is false.
27
+ * @param {string} [charSet] The encoding of the file contents. The default is utf-8. The available values are: unicodeFFFE, utf-32, utf-32BE, us-ascii, iso-8859-1, utf-7, utf-8, utf-16.
28
+ * @param {string} [model] The model to use. By default, the API will infer the model based on the transaction and version identifiers.
29
+ * @param {File} [body]
30
+ * @param {*} [options] Override http request option.
31
+ * @throws {RequiredError}
32
+ */
33
+ vdaReadPost: (ignoreNullValues?: boolean, continueOnError?: boolean, charSet?: string, model?: string, body?: File, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
34
+ /**
35
+ *
36
+ * @summary Validate VDA messages
37
+ * @param {FlatMessage} [flatMessage] The VDA object to validate.
38
+ * @param {*} [options] Override http request option.
39
+ * @throws {RequiredError}
40
+ */
41
+ vdaValidatePost: (flatMessage?: FlatMessage, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
42
+ /**
43
+ *
44
+ * @summary Convert JSON to VDA files
45
+ * @param {string} [charSet] The encoding of the file contents. The default is utf-8. The available values are: unicodeFFFE, utf-32, utf-32BE, us-ascii, iso-8859-1, utf-7, utf-8, utf-16.
46
+ * @param {string} [postfix] The postfix to be applied at the end of each segment, just after the segment separator. This is usually a carriage return (CR), line feed (LF) or both. By default, there is no postfix.
47
+ * @param {FlatMessage} [flatMessage] The VDA object to translate to raw VDA.
48
+ * @param {*} [options] Override http request option.
49
+ * @throws {RequiredError}
50
+ */
51
+ vdaWritePost: (charSet?: string, postfix?: string, flatMessage?: FlatMessage, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
52
+ };
53
+ /**
54
+ * VdaApi - functional programming interface
55
+ * @export
56
+ */
57
+ export declare const VdaApiFp: (configuration?: Configuration) => {
58
+ /**
59
+ *
60
+ * @summary Convert VDA files to JSON
61
+ * @param {boolean} [ignoreNullValues] Whether to ignore all null values in the response. The default is false.
62
+ * @param {boolean} [continueOnError] Whether to continue reading if a corrupt interchange is encountered. The default is false.
63
+ * @param {string} [charSet] The encoding of the file contents. The default is utf-8. The available values are: unicodeFFFE, utf-32, utf-32BE, us-ascii, iso-8859-1, utf-7, utf-8, utf-16.
64
+ * @param {string} [model] The model to use. By default, the API will infer the model based on the transaction and version identifiers.
65
+ * @param {File} [body]
66
+ * @param {*} [options] Override http request option.
67
+ * @throws {RequiredError}
68
+ */
69
+ vdaReadPost(ignoreNullValues?: boolean, continueOnError?: boolean, charSet?: string, model?: string, body?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<FlatMessage>>>;
70
+ /**
71
+ *
72
+ * @summary Validate VDA messages
73
+ * @param {FlatMessage} [flatMessage] The VDA object to validate.
74
+ * @param {*} [options] Override http request option.
75
+ * @throws {RequiredError}
76
+ */
77
+ vdaValidatePost(flatMessage?: FlatMessage, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OperationResult>>;
78
+ /**
79
+ *
80
+ * @summary Convert JSON to VDA files
81
+ * @param {string} [charSet] The encoding of the file contents. The default is utf-8. The available values are: unicodeFFFE, utf-32, utf-32BE, us-ascii, iso-8859-1, utf-7, utf-8, utf-16.
82
+ * @param {string} [postfix] The postfix to be applied at the end of each segment, just after the segment separator. This is usually a carriage return (CR), line feed (LF) or both. By default, there is no postfix.
83
+ * @param {FlatMessage} [flatMessage] The VDA object to translate to raw VDA.
84
+ * @param {*} [options] Override http request option.
85
+ * @throws {RequiredError}
86
+ */
87
+ vdaWritePost(charSet?: string, postfix?: string, flatMessage?: FlatMessage, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>>;
88
+ };
89
+ /**
90
+ * VdaApi - factory interface
91
+ * @export
92
+ */
93
+ export declare const VdaApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
94
+ /**
95
+ *
96
+ * @summary Convert VDA files to JSON
97
+ * @param {VdaApiVdaReadPostRequest} requestParameters Request parameters.
98
+ * @param {*} [options] Override http request option.
99
+ * @throws {RequiredError}
100
+ */
101
+ vdaReadPost(requestParameters?: VdaApiVdaReadPostRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<FlatMessage>>;
102
+ /**
103
+ *
104
+ * @summary Validate VDA messages
105
+ * @param {VdaApiVdaValidatePostRequest} requestParameters Request parameters.
106
+ * @param {*} [options] Override http request option.
107
+ * @throws {RequiredError}
108
+ */
109
+ vdaValidatePost(requestParameters?: VdaApiVdaValidatePostRequest, options?: RawAxiosRequestConfig): AxiosPromise<OperationResult>;
110
+ /**
111
+ *
112
+ * @summary Convert JSON to VDA files
113
+ * @param {VdaApiVdaWritePostRequest} requestParameters Request parameters.
114
+ * @param {*} [options] Override http request option.
115
+ * @throws {RequiredError}
116
+ */
117
+ vdaWritePost(requestParameters?: VdaApiVdaWritePostRequest, options?: RawAxiosRequestConfig): AxiosPromise<File>;
118
+ };
119
+ /**
120
+ * VdaApi - interface
121
+ * @export
122
+ * @interface VdaApi
123
+ */
124
+ export interface VdaApiInterface {
125
+ /**
126
+ *
127
+ * @summary Convert VDA files to JSON
128
+ * @param {VdaApiVdaReadPostRequest} requestParameters Request parameters.
129
+ * @param {*} [options] Override http request option.
130
+ * @throws {RequiredError}
131
+ * @memberof VdaApiInterface
132
+ */
133
+ vdaReadPost(requestParameters?: VdaApiVdaReadPostRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<FlatMessage>>;
134
+ /**
135
+ *
136
+ * @summary Validate VDA messages
137
+ * @param {VdaApiVdaValidatePostRequest} requestParameters Request parameters.
138
+ * @param {*} [options] Override http request option.
139
+ * @throws {RequiredError}
140
+ * @memberof VdaApiInterface
141
+ */
142
+ vdaValidatePost(requestParameters?: VdaApiVdaValidatePostRequest, options?: RawAxiosRequestConfig): AxiosPromise<OperationResult>;
143
+ /**
144
+ *
145
+ * @summary Convert JSON to VDA files
146
+ * @param {VdaApiVdaWritePostRequest} requestParameters Request parameters.
147
+ * @param {*} [options] Override http request option.
148
+ * @throws {RequiredError}
149
+ * @memberof VdaApiInterface
150
+ */
151
+ vdaWritePost(requestParameters?: VdaApiVdaWritePostRequest, options?: RawAxiosRequestConfig): AxiosPromise<File>;
152
+ }
153
+ /**
154
+ * Request parameters for vdaReadPost operation in VdaApi.
155
+ * @export
156
+ * @interface VdaApiVdaReadPostRequest
157
+ */
158
+ export interface VdaApiVdaReadPostRequest {
159
+ /**
160
+ * Whether to ignore all null values in the response. The default is false.
161
+ * @type {boolean}
162
+ * @memberof VdaApiVdaReadPost
163
+ */
164
+ readonly ignoreNullValues?: boolean;
165
+ /**
166
+ * Whether to continue reading if a corrupt interchange is encountered. The default is false.
167
+ * @type {boolean}
168
+ * @memberof VdaApiVdaReadPost
169
+ */
170
+ readonly continueOnError?: boolean;
171
+ /**
172
+ * The encoding of the file contents. The default is utf-8. The available values are: unicodeFFFE, utf-32, utf-32BE, us-ascii, iso-8859-1, utf-7, utf-8, utf-16.
173
+ * @type {string}
174
+ * @memberof VdaApiVdaReadPost
175
+ */
176
+ readonly charSet?: string;
177
+ /**
178
+ * The model to use. By default, the API will infer the model based on the transaction and version identifiers.
179
+ * @type {string}
180
+ * @memberof VdaApiVdaReadPost
181
+ */
182
+ readonly model?: string;
183
+ /**
184
+ *
185
+ * @type {File}
186
+ * @memberof VdaApiVdaReadPost
187
+ */
188
+ readonly body?: File;
189
+ }
190
+ /**
191
+ * Request parameters for vdaValidatePost operation in VdaApi.
192
+ * @export
193
+ * @interface VdaApiVdaValidatePostRequest
194
+ */
195
+ export interface VdaApiVdaValidatePostRequest {
196
+ /**
197
+ * The VDA object to validate.
198
+ * @type {FlatMessage}
199
+ * @memberof VdaApiVdaValidatePost
200
+ */
201
+ readonly flatMessage?: FlatMessage;
202
+ }
203
+ /**
204
+ * Request parameters for vdaWritePost operation in VdaApi.
205
+ * @export
206
+ * @interface VdaApiVdaWritePostRequest
207
+ */
208
+ export interface VdaApiVdaWritePostRequest {
209
+ /**
210
+ * The encoding of the file contents. The default is utf-8. The available values are: unicodeFFFE, utf-32, utf-32BE, us-ascii, iso-8859-1, utf-7, utf-8, utf-16.
211
+ * @type {string}
212
+ * @memberof VdaApiVdaWritePost
213
+ */
214
+ readonly charSet?: string;
215
+ /**
216
+ * The postfix to be applied at the end of each segment, just after the segment separator. This is usually a carriage return (CR), line feed (LF) or both. By default, there is no postfix.
217
+ * @type {string}
218
+ * @memberof VdaApiVdaWritePost
219
+ */
220
+ readonly postfix?: string;
221
+ /**
222
+ * The VDA object to translate to raw VDA.
223
+ * @type {FlatMessage}
224
+ * @memberof VdaApiVdaWritePost
225
+ */
226
+ readonly flatMessage?: FlatMessage;
227
+ }
228
+ /**
229
+ * VdaApi - object-oriented interface
230
+ * @export
231
+ * @class VdaApi
232
+ * @extends {BaseAPI}
233
+ */
234
+ export declare class VdaApi extends BaseAPI implements VdaApiInterface {
235
+ /**
236
+ *
237
+ * @summary Convert VDA files to JSON
238
+ * @param {VdaApiVdaReadPostRequest} requestParameters Request parameters.
239
+ * @param {*} [options] Override http request option.
240
+ * @throws {RequiredError}
241
+ * @memberof VdaApi
242
+ */
243
+ vdaReadPost(requestParameters?: VdaApiVdaReadPostRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<FlatMessage[], any, {}>>;
244
+ /**
245
+ *
246
+ * @summary Validate VDA messages
247
+ * @param {VdaApiVdaValidatePostRequest} requestParameters Request parameters.
248
+ * @param {*} [options] Override http request option.
249
+ * @throws {RequiredError}
250
+ * @memberof VdaApi
251
+ */
252
+ vdaValidatePost(requestParameters?: VdaApiVdaValidatePostRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<OperationResult, any, {}>>;
253
+ /**
254
+ *
255
+ * @summary Convert JSON to VDA files
256
+ * @param {VdaApiVdaWritePostRequest} requestParameters Request parameters.
257
+ * @param {*} [options] Override http request option.
258
+ * @throws {RequiredError}
259
+ * @memberof VdaApi
260
+ */
261
+ vdaWritePost(requestParameters?: VdaApiVdaWritePostRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<File, any, {}>>;
262
+ }
@@ -0,0 +1,295 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EdiNation API
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: 2
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.VdaApi = exports.VdaApiFactory = exports.VdaApiFp = exports.VdaApiAxiosParamCreator = void 0;
20
+ const axios_1 = __importDefault(require("axios"));
21
+ // @ts-ignore
22
+ const base_1 = require("../base");
23
+ // Some imports not used depending on template conditions
24
+ // @ts-ignore
25
+ const common_1 = require("../common");
26
+ /**
27
+ * VdaApi - axios parameter creator
28
+ * @export
29
+ */
30
+ const VdaApiAxiosParamCreator = (configuration) => ({
31
+ /**
32
+ *
33
+ * @summary Convert VDA files to JSON
34
+ * @param {boolean} [ignoreNullValues] Whether to ignore all null values in the response. The default is false.
35
+ * @param {boolean} [continueOnError] Whether to continue reading if a corrupt interchange is encountered. The default is false.
36
+ * @param {string} [charSet] The encoding of the file contents. The default is utf-8. The available values are: unicodeFFFE, utf-32, utf-32BE, us-ascii, iso-8859-1, utf-7, utf-8, utf-16.
37
+ * @param {string} [model] The model to use. By default, the API will infer the model based on the transaction and version identifiers.
38
+ * @param {File} [body]
39
+ * @param {*} [options] Override http request option.
40
+ * @throws {RequiredError}
41
+ */
42
+ vdaReadPost: async (ignoreNullValues, continueOnError, charSet, model, body, options = {}) => {
43
+ const localVarPath = '/vda/read';
44
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
45
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
46
+ let baseOptions;
47
+ if (configuration) {
48
+ baseOptions = configuration.baseOptions;
49
+ }
50
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
51
+ const localVarHeaderParameter = {};
52
+ const localVarQueryParameter = {};
53
+ // authentication ApiKey required
54
+ await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, 'Ocp-Apim-Subscription-Key', configuration);
55
+ if (ignoreNullValues !== undefined) {
56
+ localVarQueryParameter.ignoreNullValues = ignoreNullValues;
57
+ }
58
+ if (continueOnError !== undefined) {
59
+ localVarQueryParameter.continueOnError = continueOnError;
60
+ }
61
+ if (charSet !== undefined) {
62
+ localVarQueryParameter.charSet = charSet;
63
+ }
64
+ if (model !== undefined) {
65
+ localVarQueryParameter.model = model;
66
+ }
67
+ localVarHeaderParameter['Content-Type'] = 'application/octet-stream';
68
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
69
+ const headersFromBaseOptions = baseOptions?.headers ? baseOptions.headers : {};
70
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
71
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
72
+ return {
73
+ url: (0, common_1.toPathString)(localVarUrlObj),
74
+ options: localVarRequestOptions,
75
+ };
76
+ },
77
+ /**
78
+ *
79
+ * @summary Validate VDA messages
80
+ * @param {FlatMessage} [flatMessage] The VDA object to validate.
81
+ * @param {*} [options] Override http request option.
82
+ * @throws {RequiredError}
83
+ */
84
+ vdaValidatePost: async (flatMessage, options = {}) => {
85
+ const localVarPath = '/vda/validate';
86
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
87
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
88
+ let baseOptions;
89
+ if (configuration) {
90
+ baseOptions = configuration.baseOptions;
91
+ }
92
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
93
+ const localVarHeaderParameter = {};
94
+ const localVarQueryParameter = {};
95
+ // authentication ApiKey required
96
+ await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, 'Ocp-Apim-Subscription-Key', configuration);
97
+ localVarHeaderParameter['Content-Type'] = 'application/json';
98
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
99
+ const headersFromBaseOptions = baseOptions?.headers ? baseOptions.headers : {};
100
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
101
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(flatMessage, localVarRequestOptions, configuration);
102
+ return {
103
+ url: (0, common_1.toPathString)(localVarUrlObj),
104
+ options: localVarRequestOptions,
105
+ };
106
+ },
107
+ /**
108
+ *
109
+ * @summary Convert JSON to VDA files
110
+ * @param {string} [charSet] The encoding of the file contents. The default is utf-8. The available values are: unicodeFFFE, utf-32, utf-32BE, us-ascii, iso-8859-1, utf-7, utf-8, utf-16.
111
+ * @param {string} [postfix] The postfix to be applied at the end of each segment, just after the segment separator. This is usually a carriage return (CR), line feed (LF) or both. By default, there is no postfix.
112
+ * @param {FlatMessage} [flatMessage] The VDA object to translate to raw VDA.
113
+ * @param {*} [options] Override http request option.
114
+ * @throws {RequiredError}
115
+ */
116
+ vdaWritePost: async (charSet, postfix, flatMessage, options = {}) => {
117
+ const localVarPath = '/vda/write';
118
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
119
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
120
+ let baseOptions;
121
+ if (configuration) {
122
+ baseOptions = configuration.baseOptions;
123
+ }
124
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
125
+ const localVarHeaderParameter = {};
126
+ const localVarQueryParameter = {};
127
+ // authentication ApiKey required
128
+ await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, 'Ocp-Apim-Subscription-Key', configuration);
129
+ if (charSet !== undefined) {
130
+ localVarQueryParameter.charSet = charSet;
131
+ }
132
+ if (postfix !== undefined) {
133
+ localVarQueryParameter.postfix = postfix;
134
+ }
135
+ localVarHeaderParameter['Content-Type'] = 'application/json';
136
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
137
+ const headersFromBaseOptions = baseOptions?.headers ? baseOptions.headers : {};
138
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
139
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(flatMessage, localVarRequestOptions, configuration);
140
+ return {
141
+ url: (0, common_1.toPathString)(localVarUrlObj),
142
+ options: localVarRequestOptions,
143
+ };
144
+ },
145
+ });
146
+ exports.VdaApiAxiosParamCreator = VdaApiAxiosParamCreator;
147
+ /**
148
+ * VdaApi - functional programming interface
149
+ * @export
150
+ */
151
+ const VdaApiFp = (configuration) => {
152
+ const localVarAxiosParamCreator = (0, exports.VdaApiAxiosParamCreator)(configuration);
153
+ return {
154
+ /**
155
+ *
156
+ * @summary Convert VDA files to JSON
157
+ * @param {boolean} [ignoreNullValues] Whether to ignore all null values in the response. The default is false.
158
+ * @param {boolean} [continueOnError] Whether to continue reading if a corrupt interchange is encountered. The default is false.
159
+ * @param {string} [charSet] The encoding of the file contents. The default is utf-8. The available values are: unicodeFFFE, utf-32, utf-32BE, us-ascii, iso-8859-1, utf-7, utf-8, utf-16.
160
+ * @param {string} [model] The model to use. By default, the API will infer the model based on the transaction and version identifiers.
161
+ * @param {File} [body]
162
+ * @param {*} [options] Override http request option.
163
+ * @throws {RequiredError}
164
+ */
165
+ async vdaReadPost(ignoreNullValues, continueOnError, charSet, model, body, options) {
166
+ const localVarAxiosArgs = await localVarAxiosParamCreator.vdaReadPost(ignoreNullValues, continueOnError, charSet, model, body, options);
167
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
168
+ const localVarOperationServerBasePath = base_1.operationServerMap['VdaApi.vdaReadPost']?.[localVarOperationServerIndex]?.url;
169
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
170
+ },
171
+ /**
172
+ *
173
+ * @summary Validate VDA messages
174
+ * @param {FlatMessage} [flatMessage] The VDA object to validate.
175
+ * @param {*} [options] Override http request option.
176
+ * @throws {RequiredError}
177
+ */
178
+ async vdaValidatePost(flatMessage, options) {
179
+ const localVarAxiosArgs = await localVarAxiosParamCreator.vdaValidatePost(flatMessage, options);
180
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
181
+ const localVarOperationServerBasePath = base_1.operationServerMap['VdaApi.vdaValidatePost']?.[localVarOperationServerIndex]?.url;
182
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
183
+ },
184
+ /**
185
+ *
186
+ * @summary Convert JSON to VDA files
187
+ * @param {string} [charSet] The encoding of the file contents. The default is utf-8. The available values are: unicodeFFFE, utf-32, utf-32BE, us-ascii, iso-8859-1, utf-7, utf-8, utf-16.
188
+ * @param {string} [postfix] The postfix to be applied at the end of each segment, just after the segment separator. This is usually a carriage return (CR), line feed (LF) or both. By default, there is no postfix.
189
+ * @param {FlatMessage} [flatMessage] The VDA object to translate to raw VDA.
190
+ * @param {*} [options] Override http request option.
191
+ * @throws {RequiredError}
192
+ */
193
+ async vdaWritePost(charSet, postfix, flatMessage, options) {
194
+ const localVarAxiosArgs = await localVarAxiosParamCreator.vdaWritePost(charSet, postfix, flatMessage, options);
195
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
196
+ const localVarOperationServerBasePath = base_1.operationServerMap['VdaApi.vdaWritePost']?.[localVarOperationServerIndex]?.url;
197
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
198
+ },
199
+ };
200
+ };
201
+ exports.VdaApiFp = VdaApiFp;
202
+ /**
203
+ * VdaApi - factory interface
204
+ * @export
205
+ */
206
+ const VdaApiFactory = (configuration, basePath, axios) => {
207
+ const localVarFp = (0, exports.VdaApiFp)(configuration);
208
+ return {
209
+ /**
210
+ *
211
+ * @summary Convert VDA files to JSON
212
+ * @param {VdaApiVdaReadPostRequest} requestParameters Request parameters.
213
+ * @param {*} [options] Override http request option.
214
+ * @throws {RequiredError}
215
+ */
216
+ vdaReadPost(requestParameters = {}, options) {
217
+ return localVarFp
218
+ .vdaReadPost(requestParameters.ignoreNullValues, requestParameters.continueOnError, requestParameters.charSet, requestParameters.model, requestParameters.body, options)
219
+ .then((request) => request(axios, basePath));
220
+ },
221
+ /**
222
+ *
223
+ * @summary Validate VDA messages
224
+ * @param {VdaApiVdaValidatePostRequest} requestParameters Request parameters.
225
+ * @param {*} [options] Override http request option.
226
+ * @throws {RequiredError}
227
+ */
228
+ vdaValidatePost(requestParameters = {}, options) {
229
+ return localVarFp
230
+ .vdaValidatePost(requestParameters.flatMessage, options)
231
+ .then((request) => request(axios, basePath));
232
+ },
233
+ /**
234
+ *
235
+ * @summary Convert JSON to VDA files
236
+ * @param {VdaApiVdaWritePostRequest} requestParameters Request parameters.
237
+ * @param {*} [options] Override http request option.
238
+ * @throws {RequiredError}
239
+ */
240
+ vdaWritePost(requestParameters = {}, options) {
241
+ return localVarFp
242
+ .vdaWritePost(requestParameters.charSet, requestParameters.postfix, requestParameters.flatMessage, options)
243
+ .then((request) => request(axios, basePath));
244
+ },
245
+ };
246
+ };
247
+ exports.VdaApiFactory = VdaApiFactory;
248
+ /**
249
+ * VdaApi - object-oriented interface
250
+ * @export
251
+ * @class VdaApi
252
+ * @extends {BaseAPI}
253
+ */
254
+ class VdaApi extends base_1.BaseAPI {
255
+ /**
256
+ *
257
+ * @summary Convert VDA files to JSON
258
+ * @param {VdaApiVdaReadPostRequest} requestParameters Request parameters.
259
+ * @param {*} [options] Override http request option.
260
+ * @throws {RequiredError}
261
+ * @memberof VdaApi
262
+ */
263
+ vdaReadPost(requestParameters = {}, options) {
264
+ return (0, exports.VdaApiFp)(this.configuration)
265
+ .vdaReadPost(requestParameters.ignoreNullValues, requestParameters.continueOnError, requestParameters.charSet, requestParameters.model, requestParameters.body, options)
266
+ .then((request) => request(this.axios, this.basePath));
267
+ }
268
+ /**
269
+ *
270
+ * @summary Validate VDA messages
271
+ * @param {VdaApiVdaValidatePostRequest} requestParameters Request parameters.
272
+ * @param {*} [options] Override http request option.
273
+ * @throws {RequiredError}
274
+ * @memberof VdaApi
275
+ */
276
+ vdaValidatePost(requestParameters = {}, options) {
277
+ return (0, exports.VdaApiFp)(this.configuration)
278
+ .vdaValidatePost(requestParameters.flatMessage, options)
279
+ .then((request) => request(this.axios, this.basePath));
280
+ }
281
+ /**
282
+ *
283
+ * @summary Convert JSON to VDA files
284
+ * @param {VdaApiVdaWritePostRequest} requestParameters Request parameters.
285
+ * @param {*} [options] Override http request option.
286
+ * @throws {RequiredError}
287
+ * @memberof VdaApi
288
+ */
289
+ vdaWritePost(requestParameters = {}, options) {
290
+ return (0, exports.VdaApiFp)(this.configuration)
291
+ .vdaWritePost(requestParameters.charSet, requestParameters.postfix, requestParameters.flatMessage, options)
292
+ .then((request) => request(this.axios, this.basePath));
293
+ }
294
+ }
295
+ exports.VdaApi = VdaApi;