@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.
- package/README.md +321 -0
- package/dist/control-numbers.d.ts +20 -0
- package/dist/control-numbers.js +77 -0
- package/dist/edination-client/api/edi-model-api.d.ts +268 -0
- package/dist/edination-client/api/edi-model-api.js +326 -0
- package/dist/edination-client/api/edifact-api.d.ts +453 -0
- package/dist/edination-client/api/edifact-api.js +448 -0
- package/dist/edination-client/api/hl7-api.d.ts +294 -0
- package/dist/edination-client/api/hl7-api.js +315 -0
- package/dist/edination-client/api/ncpdp-api.d.ts +278 -0
- package/dist/edination-client/api/ncpdp-api.js +305 -0
- package/dist/edination-client/api/vda-api.d.ts +262 -0
- package/dist/edination-client/api/vda-api.js +295 -0
- package/dist/edination-client/api/x12-api.d.ts +437 -0
- package/dist/edination-client/api/x12-api.js +438 -0
- package/dist/edination-client/api.d.ts +17 -0
- package/dist/edination-client/api.js +35 -0
- package/dist/edination-client/base.d.ts +66 -0
- package/dist/edination-client/base.js +70 -0
- package/dist/edination-client/common.d.ts +65 -0
- package/dist/edination-client/common.js +142 -0
- package/dist/edination-client/configuration.d.ts +91 -0
- package/dist/edination-client/configuration.js +104 -0
- package/dist/edination-client/index.d.ts +14 -0
- package/dist/edination-client/index.js +32 -0
- package/dist/edination-client/model/batch-receiving-application.d.ts +36 -0
- package/dist/edination-client/model/batch-receiving-application.js +15 -0
- package/dist/edination-client/model/batch-receiving-facility.d.ts +36 -0
- package/dist/edination-client/model/batch-receiving-facility.js +15 -0
- package/dist/edination-client/model/batch-receiving-network-address.d.ts +36 -0
- package/dist/edination-client/model/batch-receiving-network-address.js +15 -0
- package/dist/edination-client/model/batch-sending-application.d.ts +36 -0
- package/dist/edination-client/model/batch-sending-application.js +15 -0
- package/dist/edination-client/model/batch-sending-facility.d.ts +36 -0
- package/dist/edination-client/model/batch-sending-facility.js +15 -0
- package/dist/edination-client/model/batch-sending-network-address.d.ts +36 -0
- package/dist/edination-client/model/batch-sending-network-address.js +15 -0
- package/dist/edination-client/model/bhs.d.ts +108 -0
- package/dist/edination-client/model/bhs.js +15 -0
- package/dist/edination-client/model/bts.d.ts +36 -0
- package/dist/edination-client/model/bts.js +15 -0
- package/dist/edination-client/model/edi-model.d.ts +37 -0
- package/dist/edination-client/model/edi-model.js +15 -0
- package/dist/edination-client/model/edifact-group.d.ts +38 -0
- package/dist/edination-client/model/edifact-group.js +15 -0
- package/dist/edination-client/model/edifact-interchange.d.ts +53 -0
- package/dist/edination-client/model/edifact-interchange.js +15 -0
- package/dist/edination-client/model/error-details.d.ts +30 -0
- package/dist/edination-client/model/error-details.js +15 -0
- package/dist/edination-client/model/fhs.d.ts +108 -0
- package/dist/edination-client/model/fhs.js +15 -0
- package/dist/edination-client/model/file-receiving-application.d.ts +36 -0
- package/dist/edination-client/model/file-receiving-application.js +15 -0
- package/dist/edination-client/model/file-receiving-facility.d.ts +36 -0
- package/dist/edination-client/model/file-receiving-facility.js +15 -0
- package/dist/edination-client/model/file-receiving-network-address.d.ts +36 -0
- package/dist/edination-client/model/file-receiving-network-address.js +15 -0
- package/dist/edination-client/model/file-sending-application.d.ts +36 -0
- package/dist/edination-client/model/file-sending-application.js +15 -0
- package/dist/edination-client/model/file-sending-facility.d.ts +36 -0
- package/dist/edination-client/model/file-sending-facility.js +15 -0
- package/dist/edination-client/model/file-sending-network-address.d.ts +36 -0
- package/dist/edination-client/model/file-sending-network-address.js +15 -0
- package/dist/edination-client/model/flat-message.d.ts +37 -0
- package/dist/edination-client/model/flat-message.js +15 -0
- package/dist/edination-client/model/fts.d.ts +30 -0
- package/dist/edination-client/model/fts.js +15 -0
- package/dist/edination-client/model/ge.d.ts +30 -0
- package/dist/edination-client/model/ge.js +15 -0
- package/dist/edination-client/model/gs.d.ts +66 -0
- package/dist/edination-client/model/gs.js +15 -0
- package/dist/edination-client/model/hl7-group.d.ts +38 -0
- package/dist/edination-client/model/hl7-group.js +15 -0
- package/dist/edination-client/model/hl7-interchange.d.ts +46 -0
- package/dist/edination-client/model/hl7-interchange.js +15 -0
- package/dist/edination-client/model/iea.d.ts +30 -0
- package/dist/edination-client/model/iea.js +15 -0
- package/dist/edination-client/model/index.d.ts +49 -0
- package/dist/edination-client/model/index.js +65 -0
- package/dist/edination-client/model/isa.d.ts +114 -0
- package/dist/edination-client/model/isa.js +15 -0
- package/dist/edination-client/model/link.d.ts +36 -0
- package/dist/edination-client/model/link.js +15 -0
- package/dist/edination-client/model/ncpdp-transmission.d.ts +45 -0
- package/dist/edination-client/model/ncpdp-transmission.js +15 -0
- package/dist/edination-client/model/operation-detail.d.ts +90 -0
- package/dist/edination-client/model/operation-detail.js +15 -0
- package/dist/edination-client/model/operation-result.d.ts +37 -0
- package/dist/edination-client/model/operation-result.js +15 -0
- package/dist/edination-client/model/s001.d.ts +42 -0
- package/dist/edination-client/model/s001.js +15 -0
- package/dist/edination-client/model/s002.d.ts +42 -0
- package/dist/edination-client/model/s002.js +15 -0
- package/dist/edination-client/model/s003.d.ts +42 -0
- package/dist/edination-client/model/s003.js +15 -0
- package/dist/edination-client/model/s004.d.ts +30 -0
- package/dist/edination-client/model/s004.js +15 -0
- package/dist/edination-client/model/s005.d.ts +30 -0
- package/dist/edination-client/model/s005.js +15 -0
- package/dist/edination-client/model/s006.d.ts +30 -0
- package/dist/edination-client/model/s006.js +15 -0
- package/dist/edination-client/model/s007.d.ts +30 -0
- package/dist/edination-client/model/s007.js +15 -0
- package/dist/edination-client/model/s008.d.ts +36 -0
- package/dist/edination-client/model/s008.js +15 -0
- package/dist/edination-client/model/ta1.d.ts +48 -0
- package/dist/edination-client/model/ta1.js +15 -0
- package/dist/edination-client/model/transmission-header.d.ts +66 -0
- package/dist/edination-client/model/transmission-header.js +15 -0
- package/dist/edination-client/model/transmission-trailer.d.ts +36 -0
- package/dist/edination-client/model/transmission-trailer.js +15 -0
- package/dist/edination-client/model/una.d.ts +54 -0
- package/dist/edination-client/model/una.js +15 -0
- package/dist/edination-client/model/unb.d.ts +89 -0
- package/dist/edination-client/model/unb.js +15 -0
- package/dist/edination-client/model/une.d.ts +30 -0
- package/dist/edination-client/model/une.js +15 -0
- package/dist/edination-client/model/ung.d.ts +70 -0
- package/dist/edination-client/model/ung.js +15 -0
- package/dist/edination-client/model/unz.d.ts +30 -0
- package/dist/edination-client/model/unz.js +15 -0
- package/dist/edination-client/model/x12-group.d.ts +38 -0
- package/dist/edination-client/model/x12-group.js +15 -0
- package/dist/edination-client/model/x12-interchange.d.ts +65 -0
- package/dist/edination-client/model/x12-interchange.js +15 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.js +197 -0
- package/examples/node-edi.ts +58 -0
- package/package.json +49 -0
|
@@ -0,0 +1,448 @@
|
|
|
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.EdifactApi = exports.EdifactApiFactory = exports.EdifactApiFp = exports.EdifactApiAxiosParamCreator = 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
|
+
* EdifactApi - axios parameter creator
|
|
28
|
+
* @export
|
|
29
|
+
*/
|
|
30
|
+
const EdifactApiAxiosParamCreator = (configuration) => ({
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @summary Generate EDIFACT acknowledments
|
|
34
|
+
* @param {string} [syntaxSet] In case you need to validate against a syntax set, different than UNOA and UNOB, populate this filed with all of the allowed symbols, url-escaped. All data elements with alpha (A) or alphanumeric (AN) data types are validated against a syntax set of allowed characters. The supported syntax sets are UNOA and UNOB. The validator infers the correct syntax set from EdifactInterchange.UNB.SYNTAXIDENTIFIER_1.SyntaxIdentifier_1. The symbols added to this field will override the corresponding sets in both UNOA and UNOB.
|
|
35
|
+
* @param {boolean} [detectDuplicates] If you need to detect duplicates as in functional groups or transactions with the same reference number, set this flag to true. The default is false.
|
|
36
|
+
* @param {number} [tranRefNumber] The default is 1. Set this to whatever the CONTRL UNH.MessageReferenceNumber_01 needs to be.
|
|
37
|
+
* @param {number} [interchangeRefNumber] The default is 1. Set this to whatever the CONTRL EdifactInterchange.UNB.InterchangeControlReference_5 needs to be.
|
|
38
|
+
* @param {boolean} [ackForValidTrans] The default is false. Set this to true if you need UCM loops included for all valid transaction as well. By default UCM loops are generated only for invalid transactions.
|
|
39
|
+
* @param {boolean} [batchAcks] The default is true. Set this to false if you need to generate separate EdifactInterchange for each acknowledgment. By default all acknowledgments are batched in the same EdifactInterchange.
|
|
40
|
+
* @param {string} [technicalAck] The default technical acknowledgment CONTRL is generated according to EdifactInterchange.UNB.AcknowledgementRequest_9. You can either enforce it to always generate technical CONTRLs or supress it to never generate any technical CONTRLs. This will override the flag in EdifactInterchange.UNB.AcknowledgementRequest_9. The available values are: default, enforce, suppress.
|
|
41
|
+
* @param {boolean} [eancomS3] The default syntax for EANCOM transactions. By default all EANCOM transactions will be validated according to the rules of Syntax 4. Set this flag to true if you need Syntax 3 to be used.
|
|
42
|
+
* @param {EdifactInterchange} [edifactInterchange] The EdifactInterchange object to acknowledge.
|
|
43
|
+
* @param {*} [options] Override http request option.
|
|
44
|
+
* @throws {RequiredError}
|
|
45
|
+
*/
|
|
46
|
+
edifactAckPost: async (syntaxSet, detectDuplicates, tranRefNumber, interchangeRefNumber, ackForValidTrans, batchAcks, technicalAck, eancomS3, edifactInterchange, options = {}) => {
|
|
47
|
+
const localVarPath = '/edifact/ack';
|
|
48
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
49
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
50
|
+
let baseOptions;
|
|
51
|
+
if (configuration) {
|
|
52
|
+
baseOptions = configuration.baseOptions;
|
|
53
|
+
}
|
|
54
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
55
|
+
const localVarHeaderParameter = {};
|
|
56
|
+
const localVarQueryParameter = {};
|
|
57
|
+
// authentication ApiKey required
|
|
58
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, 'Ocp-Apim-Subscription-Key', configuration);
|
|
59
|
+
if (syntaxSet !== undefined) {
|
|
60
|
+
localVarQueryParameter.syntaxSet = syntaxSet;
|
|
61
|
+
}
|
|
62
|
+
if (detectDuplicates !== undefined) {
|
|
63
|
+
localVarQueryParameter.detectDuplicates = detectDuplicates;
|
|
64
|
+
}
|
|
65
|
+
if (tranRefNumber !== undefined) {
|
|
66
|
+
localVarQueryParameter.tranRefNumber = tranRefNumber;
|
|
67
|
+
}
|
|
68
|
+
if (interchangeRefNumber !== undefined) {
|
|
69
|
+
localVarQueryParameter.interchangeRefNumber = interchangeRefNumber;
|
|
70
|
+
}
|
|
71
|
+
if (ackForValidTrans !== undefined) {
|
|
72
|
+
localVarQueryParameter.ackForValidTrans = ackForValidTrans;
|
|
73
|
+
}
|
|
74
|
+
if (batchAcks !== undefined) {
|
|
75
|
+
localVarQueryParameter.batchAcks = batchAcks;
|
|
76
|
+
}
|
|
77
|
+
if (technicalAck !== undefined) {
|
|
78
|
+
localVarQueryParameter.technicalAck = technicalAck;
|
|
79
|
+
}
|
|
80
|
+
if (eancomS3 !== undefined) {
|
|
81
|
+
localVarQueryParameter.eancomS3 = eancomS3;
|
|
82
|
+
}
|
|
83
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
84
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
85
|
+
const headersFromBaseOptions = baseOptions?.headers ? baseOptions.headers : {};
|
|
86
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
87
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(edifactInterchange, localVarRequestOptions, configuration);
|
|
88
|
+
return {
|
|
89
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
90
|
+
options: localVarRequestOptions,
|
|
91
|
+
};
|
|
92
|
+
},
|
|
93
|
+
/**
|
|
94
|
+
*
|
|
95
|
+
* @summary Convert EDIFACT files to JSON
|
|
96
|
+
* @param {boolean} [ignoreNullValues] Whether to ignore all null values in the response. The default is false.
|
|
97
|
+
* @param {boolean} [continueOnError] Whether to continue reading if a corrupt interchange is encountered. The default is false.
|
|
98
|
+
* @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.
|
|
99
|
+
* @param {string} [model] The model to use. By default, the API will infer the model based on the transaction and version identifiers.
|
|
100
|
+
* @param {boolean} [eancomS3] The default syntax for EANCOM transactions. By default all EANCOM transactions will be translated and validated according to the rules of Syntax 4. Set this flag to true if you need Syntax 3 to be used.
|
|
101
|
+
* @param {File} [body]
|
|
102
|
+
* @param {*} [options] Override http request option.
|
|
103
|
+
* @throws {RequiredError}
|
|
104
|
+
*/
|
|
105
|
+
edifactReadPost: async (ignoreNullValues, continueOnError, charSet, model, eancomS3, body, options = {}) => {
|
|
106
|
+
const localVarPath = '/edifact/read';
|
|
107
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
108
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
109
|
+
let baseOptions;
|
|
110
|
+
if (configuration) {
|
|
111
|
+
baseOptions = configuration.baseOptions;
|
|
112
|
+
}
|
|
113
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
114
|
+
const localVarHeaderParameter = {};
|
|
115
|
+
const localVarQueryParameter = {};
|
|
116
|
+
// authentication ApiKey required
|
|
117
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, 'Ocp-Apim-Subscription-Key', configuration);
|
|
118
|
+
if (ignoreNullValues !== undefined) {
|
|
119
|
+
localVarQueryParameter.ignoreNullValues = ignoreNullValues;
|
|
120
|
+
}
|
|
121
|
+
if (continueOnError !== undefined) {
|
|
122
|
+
localVarQueryParameter.continueOnError = continueOnError;
|
|
123
|
+
}
|
|
124
|
+
if (charSet !== undefined) {
|
|
125
|
+
localVarQueryParameter.charSet = charSet;
|
|
126
|
+
}
|
|
127
|
+
if (model !== undefined) {
|
|
128
|
+
localVarQueryParameter.model = model;
|
|
129
|
+
}
|
|
130
|
+
if (eancomS3 !== undefined) {
|
|
131
|
+
localVarQueryParameter.eancomS3 = eancomS3;
|
|
132
|
+
}
|
|
133
|
+
localVarHeaderParameter['Content-Type'] = 'application/octet-stream';
|
|
134
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
135
|
+
const headersFromBaseOptions = baseOptions?.headers ? baseOptions.headers : {};
|
|
136
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
137
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
|
|
138
|
+
return {
|
|
139
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
140
|
+
options: localVarRequestOptions,
|
|
141
|
+
};
|
|
142
|
+
},
|
|
143
|
+
/**
|
|
144
|
+
*
|
|
145
|
+
* @summary Validate EDIFACT messages
|
|
146
|
+
* @param {string} [syntaxSet] In case you need to validate against a syntax set, different than UNOA and UNOB, populate this filed with all of the allowed symbols, url-escaped. All data elements with alpha (A) or alphanumeric (AN) data types are validated against a syntax set of allowed characters. The supported syntax sets are UNOA and UNOB. The validator infers the correct syntax set from EdifactInterchange.UNB.SYNTAXIDENTIFIER_1.SyntaxIdentifier_1. The symbols added to this field will override the corresponding sets in both UNOA and UNOB.
|
|
147
|
+
* @param {boolean} [skipTrailer] You are allowed to validate an EdifactInterchange with missing interchange, functional group or transaction trailers (UNZ, UNE, UNT). This is because these will be automatically applied during the Write oprtaion so you don\'t have to worry about counting the items. By default it is expected that all trailers are present when you validate the EdifactInterchange and by default, this is set to false. To skip all trailer validation, set this to true.
|
|
148
|
+
* @param {boolean} [structureOnly] This is equivalent to HIPAA Snip level 1, where only the structure and control segments are validated. By default, this is set to false, however if you want to not validate things such as data types, number of repeteitions or dates, set this to true.
|
|
149
|
+
* @param {string} [decimalPoint] This could be either point . (default) or comma ,.
|
|
150
|
+
* @param {boolean} [eancomS3] The default syntax for EANCOM transactions. By default all EANCOM transactions will be validated according to the rules of Syntax 4. Set this flag to true if you need Syntax 3 to be used.
|
|
151
|
+
* @param {EdifactInterchange} [edifactInterchange] The EdifactInterchange object to validate.
|
|
152
|
+
* @param {*} [options] Override http request option.
|
|
153
|
+
* @throws {RequiredError}
|
|
154
|
+
*/
|
|
155
|
+
edifactValidatePost: async (syntaxSet, skipTrailer, structureOnly, decimalPoint, eancomS3, edifactInterchange, options = {}) => {
|
|
156
|
+
const localVarPath = '/edifact/validate';
|
|
157
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
158
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
159
|
+
let baseOptions;
|
|
160
|
+
if (configuration) {
|
|
161
|
+
baseOptions = configuration.baseOptions;
|
|
162
|
+
}
|
|
163
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
164
|
+
const localVarHeaderParameter = {};
|
|
165
|
+
const localVarQueryParameter = {};
|
|
166
|
+
// authentication ApiKey required
|
|
167
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, 'Ocp-Apim-Subscription-Key', configuration);
|
|
168
|
+
if (syntaxSet !== undefined) {
|
|
169
|
+
localVarQueryParameter.syntaxSet = syntaxSet;
|
|
170
|
+
}
|
|
171
|
+
if (skipTrailer !== undefined) {
|
|
172
|
+
localVarQueryParameter.skipTrailer = skipTrailer;
|
|
173
|
+
}
|
|
174
|
+
if (structureOnly !== undefined) {
|
|
175
|
+
localVarQueryParameter.structureOnly = structureOnly;
|
|
176
|
+
}
|
|
177
|
+
if (decimalPoint !== undefined) {
|
|
178
|
+
localVarQueryParameter.decimalPoint = decimalPoint;
|
|
179
|
+
}
|
|
180
|
+
if (eancomS3 !== undefined) {
|
|
181
|
+
localVarQueryParameter.eancomS3 = eancomS3;
|
|
182
|
+
}
|
|
183
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
184
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
185
|
+
const headersFromBaseOptions = baseOptions?.headers ? baseOptions.headers : {};
|
|
186
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
187
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(edifactInterchange, localVarRequestOptions, configuration);
|
|
188
|
+
return {
|
|
189
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
190
|
+
options: localVarRequestOptions,
|
|
191
|
+
};
|
|
192
|
+
},
|
|
193
|
+
/**
|
|
194
|
+
*
|
|
195
|
+
* @summary Convert JSON to EDIFACT files
|
|
196
|
+
* @param {boolean} [preserveWhitespace] Whether to preserve blank data elements so the output contains multiple delimiters instead of omitting any excess delimiters. The default is false.
|
|
197
|
+
* @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.
|
|
198
|
+
* @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.
|
|
199
|
+
* @param {boolean} [sameRepetionAndDataElement] Sometimes the same delimiter is used to denote data element separator and repetition separator as in IATA transactions. By default, this is false.
|
|
200
|
+
* @param {boolean} [eancomS3] The default syntax for EANCOM transactions. By default all EANCOM transactions will be translated and validated according to the rules of Syntax 4. Set this flag to true if you need Syntax 3 to be used.
|
|
201
|
+
* @param {EdifactInterchange} [edifactInterchange] The EdifactInterchange object to translate to raw EDIFACT.
|
|
202
|
+
* @param {*} [options] Override http request option.
|
|
203
|
+
* @throws {RequiredError}
|
|
204
|
+
*/
|
|
205
|
+
edifactWritePost: async (preserveWhitespace, charSet, postfix, sameRepetionAndDataElement, eancomS3, edifactInterchange, options = {}) => {
|
|
206
|
+
const localVarPath = '/edifact/write';
|
|
207
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
208
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
209
|
+
let baseOptions;
|
|
210
|
+
if (configuration) {
|
|
211
|
+
baseOptions = configuration.baseOptions;
|
|
212
|
+
}
|
|
213
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
214
|
+
const localVarHeaderParameter = {};
|
|
215
|
+
const localVarQueryParameter = {};
|
|
216
|
+
// authentication ApiKey required
|
|
217
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, 'Ocp-Apim-Subscription-Key', configuration);
|
|
218
|
+
if (preserveWhitespace !== undefined) {
|
|
219
|
+
localVarQueryParameter.preserveWhitespace = preserveWhitespace;
|
|
220
|
+
}
|
|
221
|
+
if (charSet !== undefined) {
|
|
222
|
+
localVarQueryParameter.charSet = charSet;
|
|
223
|
+
}
|
|
224
|
+
if (postfix !== undefined) {
|
|
225
|
+
localVarQueryParameter.postfix = postfix;
|
|
226
|
+
}
|
|
227
|
+
if (sameRepetionAndDataElement !== undefined) {
|
|
228
|
+
localVarQueryParameter.sameRepetionAndDataElement = sameRepetionAndDataElement;
|
|
229
|
+
}
|
|
230
|
+
if (eancomS3 !== undefined) {
|
|
231
|
+
localVarQueryParameter.eancomS3 = eancomS3;
|
|
232
|
+
}
|
|
233
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
234
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
235
|
+
const headersFromBaseOptions = baseOptions?.headers ? baseOptions.headers : {};
|
|
236
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
237
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(edifactInterchange, localVarRequestOptions, configuration);
|
|
238
|
+
return {
|
|
239
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
240
|
+
options: localVarRequestOptions,
|
|
241
|
+
};
|
|
242
|
+
},
|
|
243
|
+
});
|
|
244
|
+
exports.EdifactApiAxiosParamCreator = EdifactApiAxiosParamCreator;
|
|
245
|
+
/**
|
|
246
|
+
* EdifactApi - functional programming interface
|
|
247
|
+
* @export
|
|
248
|
+
*/
|
|
249
|
+
const EdifactApiFp = (configuration) => {
|
|
250
|
+
const localVarAxiosParamCreator = (0, exports.EdifactApiAxiosParamCreator)(configuration);
|
|
251
|
+
return {
|
|
252
|
+
/**
|
|
253
|
+
*
|
|
254
|
+
* @summary Generate EDIFACT acknowledments
|
|
255
|
+
* @param {string} [syntaxSet] In case you need to validate against a syntax set, different than UNOA and UNOB, populate this filed with all of the allowed symbols, url-escaped. All data elements with alpha (A) or alphanumeric (AN) data types are validated against a syntax set of allowed characters. The supported syntax sets are UNOA and UNOB. The validator infers the correct syntax set from EdifactInterchange.UNB.SYNTAXIDENTIFIER_1.SyntaxIdentifier_1. The symbols added to this field will override the corresponding sets in both UNOA and UNOB.
|
|
256
|
+
* @param {boolean} [detectDuplicates] If you need to detect duplicates as in functional groups or transactions with the same reference number, set this flag to true. The default is false.
|
|
257
|
+
* @param {number} [tranRefNumber] The default is 1. Set this to whatever the CONTRL UNH.MessageReferenceNumber_01 needs to be.
|
|
258
|
+
* @param {number} [interchangeRefNumber] The default is 1. Set this to whatever the CONTRL EdifactInterchange.UNB.InterchangeControlReference_5 needs to be.
|
|
259
|
+
* @param {boolean} [ackForValidTrans] The default is false. Set this to true if you need UCM loops included for all valid transaction as well. By default UCM loops are generated only for invalid transactions.
|
|
260
|
+
* @param {boolean} [batchAcks] The default is true. Set this to false if you need to generate separate EdifactInterchange for each acknowledgment. By default all acknowledgments are batched in the same EdifactInterchange.
|
|
261
|
+
* @param {string} [technicalAck] The default technical acknowledgment CONTRL is generated according to EdifactInterchange.UNB.AcknowledgementRequest_9. You can either enforce it to always generate technical CONTRLs or supress it to never generate any technical CONTRLs. This will override the flag in EdifactInterchange.UNB.AcknowledgementRequest_9. The available values are: default, enforce, suppress.
|
|
262
|
+
* @param {boolean} [eancomS3] The default syntax for EANCOM transactions. By default all EANCOM transactions will be validated according to the rules of Syntax 4. Set this flag to true if you need Syntax 3 to be used.
|
|
263
|
+
* @param {EdifactInterchange} [edifactInterchange] The EdifactInterchange object to acknowledge.
|
|
264
|
+
* @param {*} [options] Override http request option.
|
|
265
|
+
* @throws {RequiredError}
|
|
266
|
+
*/
|
|
267
|
+
async edifactAckPost(syntaxSet, detectDuplicates, tranRefNumber, interchangeRefNumber, ackForValidTrans, batchAcks, technicalAck, eancomS3, edifactInterchange, options) {
|
|
268
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.edifactAckPost(syntaxSet, detectDuplicates, tranRefNumber, interchangeRefNumber, ackForValidTrans, batchAcks, technicalAck, eancomS3, edifactInterchange, options);
|
|
269
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
270
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['EdifactApi.edifactAckPost']?.[localVarOperationServerIndex]?.url;
|
|
271
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
272
|
+
},
|
|
273
|
+
/**
|
|
274
|
+
*
|
|
275
|
+
* @summary Convert EDIFACT files to JSON
|
|
276
|
+
* @param {boolean} [ignoreNullValues] Whether to ignore all null values in the response. The default is false.
|
|
277
|
+
* @param {boolean} [continueOnError] Whether to continue reading if a corrupt interchange is encountered. The default is false.
|
|
278
|
+
* @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.
|
|
279
|
+
* @param {string} [model] The model to use. By default, the API will infer the model based on the transaction and version identifiers.
|
|
280
|
+
* @param {boolean} [eancomS3] The default syntax for EANCOM transactions. By default all EANCOM transactions will be translated and validated according to the rules of Syntax 4. Set this flag to true if you need Syntax 3 to be used.
|
|
281
|
+
* @param {File} [body]
|
|
282
|
+
* @param {*} [options] Override http request option.
|
|
283
|
+
* @throws {RequiredError}
|
|
284
|
+
*/
|
|
285
|
+
async edifactReadPost(ignoreNullValues, continueOnError, charSet, model, eancomS3, body, options) {
|
|
286
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.edifactReadPost(ignoreNullValues, continueOnError, charSet, model, eancomS3, body, options);
|
|
287
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
288
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['EdifactApi.edifactReadPost']?.[localVarOperationServerIndex]?.url;
|
|
289
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
290
|
+
},
|
|
291
|
+
/**
|
|
292
|
+
*
|
|
293
|
+
* @summary Validate EDIFACT messages
|
|
294
|
+
* @param {string} [syntaxSet] In case you need to validate against a syntax set, different than UNOA and UNOB, populate this filed with all of the allowed symbols, url-escaped. All data elements with alpha (A) or alphanumeric (AN) data types are validated against a syntax set of allowed characters. The supported syntax sets are UNOA and UNOB. The validator infers the correct syntax set from EdifactInterchange.UNB.SYNTAXIDENTIFIER_1.SyntaxIdentifier_1. The symbols added to this field will override the corresponding sets in both UNOA and UNOB.
|
|
295
|
+
* @param {boolean} [skipTrailer] You are allowed to validate an EdifactInterchange with missing interchange, functional group or transaction trailers (UNZ, UNE, UNT). This is because these will be automatically applied during the Write oprtaion so you don\'t have to worry about counting the items. By default it is expected that all trailers are present when you validate the EdifactInterchange and by default, this is set to false. To skip all trailer validation, set this to true.
|
|
296
|
+
* @param {boolean} [structureOnly] This is equivalent to HIPAA Snip level 1, where only the structure and control segments are validated. By default, this is set to false, however if you want to not validate things such as data types, number of repeteitions or dates, set this to true.
|
|
297
|
+
* @param {string} [decimalPoint] This could be either point . (default) or comma ,.
|
|
298
|
+
* @param {boolean} [eancomS3] The default syntax for EANCOM transactions. By default all EANCOM transactions will be validated according to the rules of Syntax 4. Set this flag to true if you need Syntax 3 to be used.
|
|
299
|
+
* @param {EdifactInterchange} [edifactInterchange] The EdifactInterchange object to validate.
|
|
300
|
+
* @param {*} [options] Override http request option.
|
|
301
|
+
* @throws {RequiredError}
|
|
302
|
+
*/
|
|
303
|
+
async edifactValidatePost(syntaxSet, skipTrailer, structureOnly, decimalPoint, eancomS3, edifactInterchange, options) {
|
|
304
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.edifactValidatePost(syntaxSet, skipTrailer, structureOnly, decimalPoint, eancomS3, edifactInterchange, options);
|
|
305
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
306
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['EdifactApi.edifactValidatePost']?.[localVarOperationServerIndex]?.url;
|
|
307
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
308
|
+
},
|
|
309
|
+
/**
|
|
310
|
+
*
|
|
311
|
+
* @summary Convert JSON to EDIFACT files
|
|
312
|
+
* @param {boolean} [preserveWhitespace] Whether to preserve blank data elements so the output contains multiple delimiters instead of omitting any excess delimiters. The default is false.
|
|
313
|
+
* @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.
|
|
314
|
+
* @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.
|
|
315
|
+
* @param {boolean} [sameRepetionAndDataElement] Sometimes the same delimiter is used to denote data element separator and repetition separator as in IATA transactions. By default, this is false.
|
|
316
|
+
* @param {boolean} [eancomS3] The default syntax for EANCOM transactions. By default all EANCOM transactions will be translated and validated according to the rules of Syntax 4. Set this flag to true if you need Syntax 3 to be used.
|
|
317
|
+
* @param {EdifactInterchange} [edifactInterchange] The EdifactInterchange object to translate to raw EDIFACT.
|
|
318
|
+
* @param {*} [options] Override http request option.
|
|
319
|
+
* @throws {RequiredError}
|
|
320
|
+
*/
|
|
321
|
+
async edifactWritePost(preserveWhitespace, charSet, postfix, sameRepetionAndDataElement, eancomS3, edifactInterchange, options) {
|
|
322
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.edifactWritePost(preserveWhitespace, charSet, postfix, sameRepetionAndDataElement, eancomS3, edifactInterchange, options);
|
|
323
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
324
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['EdifactApi.edifactWritePost']?.[localVarOperationServerIndex]?.url;
|
|
325
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
326
|
+
},
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
exports.EdifactApiFp = EdifactApiFp;
|
|
330
|
+
/**
|
|
331
|
+
* EdifactApi - factory interface
|
|
332
|
+
* @export
|
|
333
|
+
*/
|
|
334
|
+
const EdifactApiFactory = (configuration, basePath, axios) => {
|
|
335
|
+
const localVarFp = (0, exports.EdifactApiFp)(configuration);
|
|
336
|
+
return {
|
|
337
|
+
/**
|
|
338
|
+
*
|
|
339
|
+
* @summary Generate EDIFACT acknowledments
|
|
340
|
+
* @param {EdifactApiEdifactAckPostRequest} requestParameters Request parameters.
|
|
341
|
+
* @param {*} [options] Override http request option.
|
|
342
|
+
* @throws {RequiredError}
|
|
343
|
+
*/
|
|
344
|
+
edifactAckPost(requestParameters = {}, options) {
|
|
345
|
+
return localVarFp
|
|
346
|
+
.edifactAckPost(requestParameters.syntaxSet, requestParameters.detectDuplicates, requestParameters.tranRefNumber, requestParameters.interchangeRefNumber, requestParameters.ackForValidTrans, requestParameters.batchAcks, requestParameters.technicalAck, requestParameters.eancomS3, requestParameters.edifactInterchange, options)
|
|
347
|
+
.then((request) => request(axios, basePath));
|
|
348
|
+
},
|
|
349
|
+
/**
|
|
350
|
+
*
|
|
351
|
+
* @summary Convert EDIFACT files to JSON
|
|
352
|
+
* @param {EdifactApiEdifactReadPostRequest} requestParameters Request parameters.
|
|
353
|
+
* @param {*} [options] Override http request option.
|
|
354
|
+
* @throws {RequiredError}
|
|
355
|
+
*/
|
|
356
|
+
edifactReadPost(requestParameters = {}, options) {
|
|
357
|
+
return localVarFp
|
|
358
|
+
.edifactReadPost(requestParameters.ignoreNullValues, requestParameters.continueOnError, requestParameters.charSet, requestParameters.model, requestParameters.eancomS3, requestParameters.body, options)
|
|
359
|
+
.then((request) => request(axios, basePath));
|
|
360
|
+
},
|
|
361
|
+
/**
|
|
362
|
+
*
|
|
363
|
+
* @summary Validate EDIFACT messages
|
|
364
|
+
* @param {EdifactApiEdifactValidatePostRequest} requestParameters Request parameters.
|
|
365
|
+
* @param {*} [options] Override http request option.
|
|
366
|
+
* @throws {RequiredError}
|
|
367
|
+
*/
|
|
368
|
+
edifactValidatePost(requestParameters = {}, options) {
|
|
369
|
+
return localVarFp
|
|
370
|
+
.edifactValidatePost(requestParameters.syntaxSet, requestParameters.skipTrailer, requestParameters.structureOnly, requestParameters.decimalPoint, requestParameters.eancomS3, requestParameters.edifactInterchange, options)
|
|
371
|
+
.then((request) => request(axios, basePath));
|
|
372
|
+
},
|
|
373
|
+
/**
|
|
374
|
+
*
|
|
375
|
+
* @summary Convert JSON to EDIFACT files
|
|
376
|
+
* @param {EdifactApiEdifactWritePostRequest} requestParameters Request parameters.
|
|
377
|
+
* @param {*} [options] Override http request option.
|
|
378
|
+
* @throws {RequiredError}
|
|
379
|
+
*/
|
|
380
|
+
edifactWritePost(requestParameters = {}, options) {
|
|
381
|
+
return localVarFp
|
|
382
|
+
.edifactWritePost(requestParameters.preserveWhitespace, requestParameters.charSet, requestParameters.postfix, requestParameters.sameRepetionAndDataElement, requestParameters.eancomS3, requestParameters.edifactInterchange, options)
|
|
383
|
+
.then((request) => request(axios, basePath));
|
|
384
|
+
},
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
exports.EdifactApiFactory = EdifactApiFactory;
|
|
388
|
+
/**
|
|
389
|
+
* EdifactApi - object-oriented interface
|
|
390
|
+
* @export
|
|
391
|
+
* @class EdifactApi
|
|
392
|
+
* @extends {BaseAPI}
|
|
393
|
+
*/
|
|
394
|
+
class EdifactApi extends base_1.BaseAPI {
|
|
395
|
+
/**
|
|
396
|
+
*
|
|
397
|
+
* @summary Generate EDIFACT acknowledments
|
|
398
|
+
* @param {EdifactApiEdifactAckPostRequest} requestParameters Request parameters.
|
|
399
|
+
* @param {*} [options] Override http request option.
|
|
400
|
+
* @throws {RequiredError}
|
|
401
|
+
* @memberof EdifactApi
|
|
402
|
+
*/
|
|
403
|
+
edifactAckPost(requestParameters = {}, options) {
|
|
404
|
+
return (0, exports.EdifactApiFp)(this.configuration)
|
|
405
|
+
.edifactAckPost(requestParameters.syntaxSet, requestParameters.detectDuplicates, requestParameters.tranRefNumber, requestParameters.interchangeRefNumber, requestParameters.ackForValidTrans, requestParameters.batchAcks, requestParameters.technicalAck, requestParameters.eancomS3, requestParameters.edifactInterchange, options)
|
|
406
|
+
.then((request) => request(this.axios, this.basePath));
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
*
|
|
410
|
+
* @summary Convert EDIFACT files to JSON
|
|
411
|
+
* @param {EdifactApiEdifactReadPostRequest} requestParameters Request parameters.
|
|
412
|
+
* @param {*} [options] Override http request option.
|
|
413
|
+
* @throws {RequiredError}
|
|
414
|
+
* @memberof EdifactApi
|
|
415
|
+
*/
|
|
416
|
+
edifactReadPost(requestParameters = {}, options) {
|
|
417
|
+
return (0, exports.EdifactApiFp)(this.configuration)
|
|
418
|
+
.edifactReadPost(requestParameters.ignoreNullValues, requestParameters.continueOnError, requestParameters.charSet, requestParameters.model, requestParameters.eancomS3, requestParameters.body, options)
|
|
419
|
+
.then((request) => request(this.axios, this.basePath));
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
*
|
|
423
|
+
* @summary Validate EDIFACT messages
|
|
424
|
+
* @param {EdifactApiEdifactValidatePostRequest} requestParameters Request parameters.
|
|
425
|
+
* @param {*} [options] Override http request option.
|
|
426
|
+
* @throws {RequiredError}
|
|
427
|
+
* @memberof EdifactApi
|
|
428
|
+
*/
|
|
429
|
+
edifactValidatePost(requestParameters = {}, options) {
|
|
430
|
+
return (0, exports.EdifactApiFp)(this.configuration)
|
|
431
|
+
.edifactValidatePost(requestParameters.syntaxSet, requestParameters.skipTrailer, requestParameters.structureOnly, requestParameters.decimalPoint, requestParameters.eancomS3, requestParameters.edifactInterchange, options)
|
|
432
|
+
.then((request) => request(this.axios, this.basePath));
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
*
|
|
436
|
+
* @summary Convert JSON to EDIFACT files
|
|
437
|
+
* @param {EdifactApiEdifactWritePostRequest} requestParameters Request parameters.
|
|
438
|
+
* @param {*} [options] Override http request option.
|
|
439
|
+
* @throws {RequiredError}
|
|
440
|
+
* @memberof EdifactApi
|
|
441
|
+
*/
|
|
442
|
+
edifactWritePost(requestParameters = {}, options) {
|
|
443
|
+
return (0, exports.EdifactApiFp)(this.configuration)
|
|
444
|
+
.edifactWritePost(requestParameters.preserveWhitespace, requestParameters.charSet, requestParameters.postfix, requestParameters.sameRepetionAndDataElement, requestParameters.eancomS3, requestParameters.edifactInterchange, options)
|
|
445
|
+
.then((request) => request(this.axios, this.basePath));
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
exports.EdifactApi = EdifactApi;
|