@atomsolution/invoice-sdk-api 1.20.0 → 1.22.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 +7 -7
- package/dist/index.esm.js +451 -460
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,3 +1,42 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __async = (__this, __arguments, generator) => {
|
|
21
|
+
return new Promise((resolve, reject) => {
|
|
22
|
+
var fulfilled = (value) => {
|
|
23
|
+
try {
|
|
24
|
+
step(generator.next(value));
|
|
25
|
+
} catch (e) {
|
|
26
|
+
reject(e);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var rejected = (value) => {
|
|
30
|
+
try {
|
|
31
|
+
step(generator.throw(value));
|
|
32
|
+
} catch (e) {
|
|
33
|
+
reject(e);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
37
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
38
|
+
});
|
|
39
|
+
};
|
|
1
40
|
import CryptoJS from "crypto-js";
|
|
2
41
|
import globalAxios from "axios";
|
|
3
42
|
var Provider = /* @__PURE__ */ ((Provider2) => {
|
|
@@ -10,6 +49,7 @@ class Configuration {
|
|
|
10
49
|
constructor(param = {
|
|
11
50
|
provider: ""
|
|
12
51
|
}) {
|
|
52
|
+
var _a;
|
|
13
53
|
this.clientId = param.clientId;
|
|
14
54
|
this.clientSecret = param.clientSecret;
|
|
15
55
|
this.mode = param.mode;
|
|
@@ -17,12 +57,9 @@ class Configuration {
|
|
|
17
57
|
this.basePath = param.basePath;
|
|
18
58
|
this.provider = param.provider;
|
|
19
59
|
this.serverIndex = param.serverIndex;
|
|
20
|
-
this.baseOptions = {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
...param.baseOptions?.headers
|
|
24
|
-
}
|
|
25
|
-
};
|
|
60
|
+
this.baseOptions = __spreadProps(__spreadValues({}, param.baseOptions), {
|
|
61
|
+
headers: __spreadValues({}, (_a = param.baseOptions) == null ? void 0 : _a.headers)
|
|
62
|
+
});
|
|
26
63
|
this.formDataCtor = param.formDataCtor;
|
|
27
64
|
}
|
|
28
65
|
/**
|
|
@@ -74,7 +111,7 @@ function readEncryptedStore() {
|
|
|
74
111
|
const bytes = CryptoJS.AES.decrypt(cipher, SECRET);
|
|
75
112
|
const json = bytes.toString(CryptoJS.enc.Utf8);
|
|
76
113
|
return json ? JSON.parse(json) : {};
|
|
77
|
-
} catch {
|
|
114
|
+
} catch (e) {
|
|
78
115
|
console.error("Failed to decrypt token store");
|
|
79
116
|
return {};
|
|
80
117
|
}
|
|
@@ -86,7 +123,7 @@ function writeEncryptedStore(store) {
|
|
|
86
123
|
}
|
|
87
124
|
function saveProviderInfo(provider, detailInfo) {
|
|
88
125
|
const store = readEncryptedStore();
|
|
89
|
-
store[provider] = {
|
|
126
|
+
store[provider] = __spreadProps(__spreadValues({}, detailInfo), { isDefault: false });
|
|
90
127
|
writeEncryptedStore(store);
|
|
91
128
|
}
|
|
92
129
|
function getProviderInfo(provider) {
|
|
@@ -121,10 +158,10 @@ class BaseAPI {
|
|
|
121
158
|
this.axios = axios;
|
|
122
159
|
if (configuration) {
|
|
123
160
|
this.configuration = configuration;
|
|
124
|
-
this.basePath = configuration.basePath ?
|
|
161
|
+
this.basePath = configuration.basePath ? "".concat(configuration.basePath.replace(
|
|
125
162
|
/\/+$/,
|
|
126
163
|
""
|
|
127
|
-
)
|
|
164
|
+
), "/").concat(configuration.provider.replace(/^\/+|\/+$/g, "")) : "".concat(basePath, "/").concat(configuration.provider.replace(/^\/+|\/+$/g, ""));
|
|
128
165
|
}
|
|
129
166
|
}
|
|
130
167
|
}
|
|
@@ -141,7 +178,7 @@ const assertParamExists = function(functionName, paramName, paramValue) {
|
|
|
141
178
|
if (paramValue === null || paramValue === void 0) {
|
|
142
179
|
throw new RequiredError(
|
|
143
180
|
paramName,
|
|
144
|
-
|
|
181
|
+
"Required parameter ".concat(paramName, " was null or undefined when calling ").concat(functionName, ".")
|
|
145
182
|
);
|
|
146
183
|
}
|
|
147
184
|
};
|
|
@@ -153,11 +190,13 @@ const setApiKeysToObject = function(object, configuration) {
|
|
|
153
190
|
object["X-Secret-Key"] = configuration.clientSecret;
|
|
154
191
|
}
|
|
155
192
|
};
|
|
156
|
-
const setBearerAuthToObject =
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
193
|
+
const setBearerAuthToObject = function(object, configuration) {
|
|
194
|
+
return __async(this, null, function* () {
|
|
195
|
+
if (configuration && configuration.accessToken) {
|
|
196
|
+
const accessToken = typeof configuration.accessToken === "function" ? yield configuration.accessToken() : yield configuration.accessToken;
|
|
197
|
+
object["Authorization"] = "Bearer " + accessToken;
|
|
198
|
+
}
|
|
199
|
+
});
|
|
161
200
|
};
|
|
162
201
|
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
163
202
|
if (parameter == null) return;
|
|
@@ -171,7 +210,7 @@ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
|
171
210
|
(currentKey) => setFlattenedQueryParams(
|
|
172
211
|
urlSearchParams,
|
|
173
212
|
parameter[currentKey],
|
|
174
|
-
|
|
213
|
+
"".concat(key).concat(key !== "" ? "." : "").concat(currentKey)
|
|
175
214
|
)
|
|
176
215
|
);
|
|
177
216
|
}
|
|
@@ -198,10 +237,10 @@ const toPathString = function(url) {
|
|
|
198
237
|
};
|
|
199
238
|
const createRequestFunction = function(axiosArgs, globalAxios2, BASE_PATH, configuration) {
|
|
200
239
|
return (axios = globalAxios2, basePath = BASE_PATH) => {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
url: (axios.defaults.baseURL ? "" : configuration
|
|
204
|
-
};
|
|
240
|
+
var _a;
|
|
241
|
+
const axiosRequestArgs = __spreadProps(__spreadValues({}, axiosArgs.options), {
|
|
242
|
+
url: (axios.defaults.baseURL ? "" : (_a = configuration == null ? void 0 : configuration.basePath) != null ? _a : basePath) + axiosArgs.url
|
|
243
|
+
});
|
|
205
244
|
return axios.request(axiosRequestArgs);
|
|
206
245
|
};
|
|
207
246
|
};
|
|
@@ -214,38 +253,32 @@ const DefaultApiAxiosParamCreator = function(configuration) {
|
|
|
214
253
|
* @param {*} [options] Override http request option.
|
|
215
254
|
* @throws {RequiredError}
|
|
216
255
|
*/
|
|
217
|
-
fptCreateInvoice:
|
|
256
|
+
fptCreateInvoice: (_0, ..._1) => __async(null, [_0, ..._1], function* (fptCreateInvoiceRequest, options = {}) {
|
|
218
257
|
assertParamExists(
|
|
219
258
|
"fptCreateInvoice",
|
|
220
259
|
"fptCreateInvoiceRequest",
|
|
221
260
|
fptCreateInvoiceRequest
|
|
222
261
|
);
|
|
223
|
-
const localVarPath =
|
|
262
|
+
const localVarPath = "/fpt/create-invoice";
|
|
224
263
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
225
264
|
let baseOptions;
|
|
226
265
|
if (configuration) {
|
|
227
266
|
baseOptions = configuration.baseOptions;
|
|
228
267
|
}
|
|
229
|
-
const localVarRequestOptions = {
|
|
230
|
-
method: "POST"
|
|
231
|
-
|
|
232
|
-
...options
|
|
233
|
-
};
|
|
268
|
+
const localVarRequestOptions = __spreadValues(__spreadValues({
|
|
269
|
+
method: "POST"
|
|
270
|
+
}, baseOptions), options);
|
|
234
271
|
const localVarHeaderParameter = {};
|
|
235
272
|
const localVarQueryParameter = {};
|
|
236
|
-
|
|
237
|
-
|
|
273
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
274
|
+
yield setApiKeysToObject(
|
|
238
275
|
localVarHeaderParameter,
|
|
239
276
|
configuration
|
|
240
277
|
);
|
|
241
278
|
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
242
279
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
243
280
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
244
|
-
localVarRequestOptions.headers = {
|
|
245
|
-
...localVarHeaderParameter,
|
|
246
|
-
...headersFromBaseOptions,
|
|
247
|
-
...options.headers
|
|
248
|
-
};
|
|
281
|
+
localVarRequestOptions.headers = __spreadValues(__spreadValues(__spreadValues({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
249
282
|
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
250
283
|
fptCreateInvoiceRequest,
|
|
251
284
|
localVarRequestOptions,
|
|
@@ -255,7 +288,7 @@ const DefaultApiAxiosParamCreator = function(configuration) {
|
|
|
255
288
|
url: toPathString(localVarUrlObj),
|
|
256
289
|
options: localVarRequestOptions
|
|
257
290
|
};
|
|
258
|
-
},
|
|
291
|
+
}),
|
|
259
292
|
/**
|
|
260
293
|
* Lấy thông tin chi tiết của một hóa đơn dựa trên ID hóa đơn.
|
|
261
294
|
* @summary API lấy thông tin hóa đơn
|
|
@@ -264,23 +297,21 @@ const DefaultApiAxiosParamCreator = function(configuration) {
|
|
|
264
297
|
* @param {*} [options] Override http request option.
|
|
265
298
|
* @throws {RequiredError}
|
|
266
299
|
*/
|
|
267
|
-
fptGetInvoice:
|
|
300
|
+
fptGetInvoice: (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], function* (id, stax, options = {}) {
|
|
268
301
|
assertParamExists("fptGetInvoice", "id", id);
|
|
269
302
|
assertParamExists("fptGetInvoice", "stax", stax);
|
|
270
|
-
const localVarPath =
|
|
303
|
+
const localVarPath = "/fpt/get-invoice";
|
|
271
304
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
272
305
|
let baseOptions;
|
|
273
306
|
if (configuration) {
|
|
274
307
|
baseOptions = configuration.baseOptions;
|
|
275
308
|
}
|
|
276
|
-
const localVarRequestOptions = {
|
|
277
|
-
method: "GET"
|
|
278
|
-
|
|
279
|
-
...options
|
|
280
|
-
};
|
|
309
|
+
const localVarRequestOptions = __spreadValues(__spreadValues({
|
|
310
|
+
method: "GET"
|
|
311
|
+
}, baseOptions), options);
|
|
281
312
|
const localVarHeaderParameter = {};
|
|
282
313
|
const localVarQueryParameter = {};
|
|
283
|
-
|
|
314
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
284
315
|
if (id !== void 0) {
|
|
285
316
|
localVarQueryParameter["id"] = id;
|
|
286
317
|
}
|
|
@@ -289,16 +320,12 @@ const DefaultApiAxiosParamCreator = function(configuration) {
|
|
|
289
320
|
}
|
|
290
321
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
291
322
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
292
|
-
localVarRequestOptions.headers = {
|
|
293
|
-
...localVarHeaderParameter,
|
|
294
|
-
...headersFromBaseOptions,
|
|
295
|
-
...options.headers
|
|
296
|
-
};
|
|
323
|
+
localVarRequestOptions.headers = __spreadValues(__spreadValues(__spreadValues({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
297
324
|
return {
|
|
298
325
|
url: toPathString(localVarUrlObj),
|
|
299
326
|
options: localVarRequestOptions
|
|
300
327
|
};
|
|
301
|
-
},
|
|
328
|
+
}),
|
|
302
329
|
/**
|
|
303
330
|
* Lấy danh sách tất cả hóa đơn dựa trên bộ lọc được cung cấp.
|
|
304
331
|
* @summary API lấy danh sách hóa đơn
|
|
@@ -311,24 +338,22 @@ const DefaultApiAxiosParamCreator = function(configuration) {
|
|
|
311
338
|
* @param {*} [options] Override http request option.
|
|
312
339
|
* @throws {RequiredError}
|
|
313
340
|
*/
|
|
314
|
-
fptGetInvoices:
|
|
341
|
+
fptGetInvoices: (_0, _1, _2, _3, _4, _5, ..._6) => __async(null, [_0, _1, _2, _3, _4, _5, ..._6], function* (fromDate, toDate, stax, start, count, serial, options = {}) {
|
|
315
342
|
assertParamExists("fptGetInvoices", "fromDate", fromDate);
|
|
316
343
|
assertParamExists("fptGetInvoices", "toDate", toDate);
|
|
317
344
|
assertParamExists("fptGetInvoices", "stax", stax);
|
|
318
|
-
const localVarPath =
|
|
345
|
+
const localVarPath = "/fpt/get-invoices";
|
|
319
346
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
320
347
|
let baseOptions;
|
|
321
348
|
if (configuration) {
|
|
322
349
|
baseOptions = configuration.baseOptions;
|
|
323
350
|
}
|
|
324
|
-
const localVarRequestOptions = {
|
|
325
|
-
method: "GET"
|
|
326
|
-
|
|
327
|
-
...options
|
|
328
|
-
};
|
|
351
|
+
const localVarRequestOptions = __spreadValues(__spreadValues({
|
|
352
|
+
method: "GET"
|
|
353
|
+
}, baseOptions), options);
|
|
329
354
|
const localVarHeaderParameter = {};
|
|
330
355
|
const localVarQueryParameter = {};
|
|
331
|
-
|
|
356
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
332
357
|
if (start !== void 0) {
|
|
333
358
|
localVarQueryParameter["start"] = start;
|
|
334
359
|
}
|
|
@@ -349,16 +374,12 @@ const DefaultApiAxiosParamCreator = function(configuration) {
|
|
|
349
374
|
}
|
|
350
375
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
351
376
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
352
|
-
localVarRequestOptions.headers = {
|
|
353
|
-
...localVarHeaderParameter,
|
|
354
|
-
...headersFromBaseOptions,
|
|
355
|
-
...options.headers
|
|
356
|
-
};
|
|
377
|
+
localVarRequestOptions.headers = __spreadValues(__spreadValues(__spreadValues({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
357
378
|
return {
|
|
358
379
|
url: toPathString(localVarUrlObj),
|
|
359
380
|
options: localVarRequestOptions
|
|
360
381
|
};
|
|
361
|
-
},
|
|
382
|
+
}),
|
|
362
383
|
/**
|
|
363
384
|
* Ký hợp đồng điện tử với thông tin hợp đồng được cung cấp.
|
|
364
385
|
* @summary API ký hóa đơn
|
|
@@ -366,34 +387,28 @@ const DefaultApiAxiosParamCreator = function(configuration) {
|
|
|
366
387
|
* @param {*} [options] Override http request option.
|
|
367
388
|
* @throws {RequiredError}
|
|
368
389
|
*/
|
|
369
|
-
fptSignContract:
|
|
390
|
+
fptSignContract: (_0, ..._1) => __async(null, [_0, ..._1], function* (fptSignContractRequest, options = {}) {
|
|
370
391
|
assertParamExists(
|
|
371
392
|
"fptSignContract",
|
|
372
393
|
"fptSignContractRequest",
|
|
373
394
|
fptSignContractRequest
|
|
374
395
|
);
|
|
375
|
-
const localVarPath =
|
|
396
|
+
const localVarPath = "/fpt/sign-contract";
|
|
376
397
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
377
398
|
let baseOptions;
|
|
378
399
|
if (configuration) {
|
|
379
400
|
baseOptions = configuration.baseOptions;
|
|
380
401
|
}
|
|
381
|
-
const localVarRequestOptions = {
|
|
382
|
-
method: "POST"
|
|
383
|
-
|
|
384
|
-
...options
|
|
385
|
-
};
|
|
402
|
+
const localVarRequestOptions = __spreadValues(__spreadValues({
|
|
403
|
+
method: "POST"
|
|
404
|
+
}, baseOptions), options);
|
|
386
405
|
const localVarHeaderParameter = {};
|
|
387
406
|
const localVarQueryParameter = {};
|
|
388
|
-
|
|
407
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
389
408
|
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
390
409
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
391
410
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
392
|
-
localVarRequestOptions.headers = {
|
|
393
|
-
...localVarHeaderParameter,
|
|
394
|
-
...headersFromBaseOptions,
|
|
395
|
-
...options.headers
|
|
396
|
-
};
|
|
411
|
+
localVarRequestOptions.headers = __spreadValues(__spreadValues(__spreadValues({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
397
412
|
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
398
413
|
fptSignContractRequest,
|
|
399
414
|
localVarRequestOptions,
|
|
@@ -403,7 +418,7 @@ const DefaultApiAxiosParamCreator = function(configuration) {
|
|
|
403
418
|
url: toPathString(localVarUrlObj),
|
|
404
419
|
options: localVarRequestOptions
|
|
405
420
|
};
|
|
406
|
-
},
|
|
421
|
+
}),
|
|
407
422
|
/**
|
|
408
423
|
* Đăng nhập vào hệ thống với thông tin tài khoản người dùng.
|
|
409
424
|
* @summary API đăng nhập
|
|
@@ -411,29 +426,23 @@ const DefaultApiAxiosParamCreator = function(configuration) {
|
|
|
411
426
|
* @param {*} [options] Override http request option.
|
|
412
427
|
* @throws {RequiredError}
|
|
413
428
|
*/
|
|
414
|
-
fptSignIn:
|
|
429
|
+
fptSignIn: (_0, ..._1) => __async(null, [_0, ..._1], function* (signInRequest, options = {}) {
|
|
415
430
|
assertParamExists("fptSignIn", "signInRequest", signInRequest);
|
|
416
|
-
const localVarPath =
|
|
431
|
+
const localVarPath = "/fpt/sign-in";
|
|
417
432
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
418
433
|
let baseOptions;
|
|
419
434
|
if (configuration) {
|
|
420
435
|
baseOptions = configuration.baseOptions;
|
|
421
436
|
}
|
|
422
|
-
const localVarRequestOptions = {
|
|
423
|
-
method: "POST"
|
|
424
|
-
|
|
425
|
-
...options
|
|
426
|
-
};
|
|
437
|
+
const localVarRequestOptions = __spreadValues(__spreadValues({
|
|
438
|
+
method: "POST"
|
|
439
|
+
}, baseOptions), options);
|
|
427
440
|
const localVarHeaderParameter = {};
|
|
428
441
|
const localVarQueryParameter = {};
|
|
429
442
|
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
430
443
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
431
444
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
432
|
-
localVarRequestOptions.headers = {
|
|
433
|
-
...localVarHeaderParameter,
|
|
434
|
-
...headersFromBaseOptions,
|
|
435
|
-
...options.headers
|
|
436
|
-
};
|
|
445
|
+
localVarRequestOptions.headers = __spreadValues(__spreadValues(__spreadValues({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
437
446
|
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
438
447
|
signInRequest,
|
|
439
448
|
localVarRequestOptions,
|
|
@@ -443,7 +452,7 @@ const DefaultApiAxiosParamCreator = function(configuration) {
|
|
|
443
452
|
url: toPathString(localVarUrlObj),
|
|
444
453
|
options: localVarRequestOptions
|
|
445
454
|
};
|
|
446
|
-
},
|
|
455
|
+
}),
|
|
447
456
|
/**
|
|
448
457
|
* Lấy thông tin hóa đơn dưới định dạng sẵn sàng để in.
|
|
449
458
|
* @summary API xem in hóa đơn
|
|
@@ -452,23 +461,21 @@ const DefaultApiAxiosParamCreator = function(configuration) {
|
|
|
452
461
|
* @param {*} [options] Override http request option.
|
|
453
462
|
* @throws {RequiredError}
|
|
454
463
|
*/
|
|
455
|
-
fptViewPrintInvoice:
|
|
464
|
+
fptViewPrintInvoice: (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], function* (id, stax, options = {}) {
|
|
456
465
|
assertParamExists("fptViewPrintInvoice", "id", id);
|
|
457
466
|
assertParamExists("fptViewPrintInvoice", "stax", stax);
|
|
458
|
-
const localVarPath =
|
|
467
|
+
const localVarPath = "/fpt/view-print-invoice";
|
|
459
468
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
460
469
|
let baseOptions;
|
|
461
470
|
if (configuration) {
|
|
462
471
|
baseOptions = configuration.baseOptions;
|
|
463
472
|
}
|
|
464
|
-
const localVarRequestOptions = {
|
|
465
|
-
method: "GET"
|
|
466
|
-
|
|
467
|
-
...options
|
|
468
|
-
};
|
|
473
|
+
const localVarRequestOptions = __spreadValues(__spreadValues({
|
|
474
|
+
method: "GET"
|
|
475
|
+
}, baseOptions), options);
|
|
469
476
|
const localVarHeaderParameter = {};
|
|
470
477
|
const localVarQueryParameter = {};
|
|
471
|
-
|
|
478
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
472
479
|
if (id !== void 0) {
|
|
473
480
|
localVarQueryParameter["id"] = id;
|
|
474
481
|
}
|
|
@@ -477,16 +484,12 @@ const DefaultApiAxiosParamCreator = function(configuration) {
|
|
|
477
484
|
}
|
|
478
485
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
479
486
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
480
|
-
localVarRequestOptions.headers = {
|
|
481
|
-
...localVarHeaderParameter,
|
|
482
|
-
...headersFromBaseOptions,
|
|
483
|
-
...options.headers
|
|
484
|
-
};
|
|
487
|
+
localVarRequestOptions.headers = __spreadValues(__spreadValues(__spreadValues({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
485
488
|
return {
|
|
486
489
|
url: toPathString(localVarUrlObj),
|
|
487
490
|
options: localVarRequestOptions
|
|
488
491
|
};
|
|
489
|
-
},
|
|
492
|
+
}),
|
|
490
493
|
/**
|
|
491
494
|
* Tạo một hóa đơn mới dựa trên thông tin được cung cấp.
|
|
492
495
|
* @summary API tạo hóa đơn
|
|
@@ -494,34 +497,28 @@ const DefaultApiAxiosParamCreator = function(configuration) {
|
|
|
494
497
|
* @param {*} [options] Override http request option.
|
|
495
498
|
* @throws {RequiredError}
|
|
496
499
|
*/
|
|
497
|
-
mInvoiceCreateInvoice:
|
|
500
|
+
mInvoiceCreateInvoice: (_0, ..._1) => __async(null, [_0, ..._1], function* (createInvoiceRequest, options = {}) {
|
|
498
501
|
assertParamExists(
|
|
499
502
|
"mInvoiceCreateInvoice",
|
|
500
503
|
"createInvoiceRequest",
|
|
501
504
|
createInvoiceRequest
|
|
502
505
|
);
|
|
503
|
-
const localVarPath =
|
|
506
|
+
const localVarPath = "/m-invoice/create-invoice";
|
|
504
507
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
505
508
|
let baseOptions;
|
|
506
509
|
if (configuration) {
|
|
507
510
|
baseOptions = configuration.baseOptions;
|
|
508
511
|
}
|
|
509
|
-
const localVarRequestOptions = {
|
|
510
|
-
method: "POST"
|
|
511
|
-
|
|
512
|
-
...options
|
|
513
|
-
};
|
|
512
|
+
const localVarRequestOptions = __spreadValues(__spreadValues({
|
|
513
|
+
method: "POST"
|
|
514
|
+
}, baseOptions), options);
|
|
514
515
|
const localVarHeaderParameter = {};
|
|
515
516
|
const localVarQueryParameter = {};
|
|
516
|
-
|
|
517
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
517
518
|
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
518
519
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
519
520
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
520
|
-
localVarRequestOptions.headers = {
|
|
521
|
-
...localVarHeaderParameter,
|
|
522
|
-
...headersFromBaseOptions,
|
|
523
|
-
...options.headers
|
|
524
|
-
};
|
|
521
|
+
localVarRequestOptions.headers = __spreadValues(__spreadValues(__spreadValues({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
525
522
|
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
526
523
|
createInvoiceRequest,
|
|
527
524
|
localVarRequestOptions,
|
|
@@ -531,7 +528,7 @@ const DefaultApiAxiosParamCreator = function(configuration) {
|
|
|
531
528
|
url: toPathString(localVarUrlObj),
|
|
532
529
|
options: localVarRequestOptions
|
|
533
530
|
};
|
|
534
|
-
},
|
|
531
|
+
}),
|
|
535
532
|
/**
|
|
536
533
|
* Lấy thông tin chi tiết của một hóa đơn dựa trên ID hóa đơn.
|
|
537
534
|
* @summary API lấy thông tin hóa đơn
|
|
@@ -539,37 +536,31 @@ const DefaultApiAxiosParamCreator = function(configuration) {
|
|
|
539
536
|
* @param {*} [options] Override http request option.
|
|
540
537
|
* @throws {RequiredError}
|
|
541
538
|
*/
|
|
542
|
-
mInvoiceGetInvoice:
|
|
539
|
+
mInvoiceGetInvoice: (_0, ..._1) => __async(null, [_0, ..._1], function* (id, options = {}) {
|
|
543
540
|
assertParamExists("mInvoiceGetInvoice", "id", id);
|
|
544
|
-
const localVarPath =
|
|
541
|
+
const localVarPath = "/m-invoice/get-invoice";
|
|
545
542
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
546
543
|
let baseOptions;
|
|
547
544
|
if (configuration) {
|
|
548
545
|
baseOptions = configuration.baseOptions;
|
|
549
546
|
}
|
|
550
|
-
const localVarRequestOptions = {
|
|
551
|
-
method: "GET"
|
|
552
|
-
|
|
553
|
-
...options
|
|
554
|
-
};
|
|
547
|
+
const localVarRequestOptions = __spreadValues(__spreadValues({
|
|
548
|
+
method: "GET"
|
|
549
|
+
}, baseOptions), options);
|
|
555
550
|
const localVarHeaderParameter = {};
|
|
556
551
|
const localVarQueryParameter = {};
|
|
557
|
-
|
|
552
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
558
553
|
if (id !== void 0) {
|
|
559
554
|
localVarQueryParameter["id"] = id;
|
|
560
555
|
}
|
|
561
556
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
562
557
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
563
|
-
localVarRequestOptions.headers = {
|
|
564
|
-
...localVarHeaderParameter,
|
|
565
|
-
...headersFromBaseOptions,
|
|
566
|
-
...options.headers
|
|
567
|
-
};
|
|
558
|
+
localVarRequestOptions.headers = __spreadValues(__spreadValues(__spreadValues({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
568
559
|
return {
|
|
569
560
|
url: toPathString(localVarUrlObj),
|
|
570
561
|
options: localVarRequestOptions
|
|
571
562
|
};
|
|
572
|
-
},
|
|
563
|
+
}),
|
|
573
564
|
/**
|
|
574
565
|
* Lấy danh sách tất cả hóa đơn dựa trên bộ lọc được cung cấp.
|
|
575
566
|
* @summary API lấy danh sách hóa đơn
|
|
@@ -581,23 +572,21 @@ const DefaultApiAxiosParamCreator = function(configuration) {
|
|
|
581
572
|
* @param {*} [options] Override http request option.
|
|
582
573
|
* @throws {RequiredError}
|
|
583
574
|
*/
|
|
584
|
-
mInvoiceGetInvoices:
|
|
575
|
+
mInvoiceGetInvoices: (_0, _1, _2, _3, _4, ..._5) => __async(null, [_0, _1, _2, _3, _4, ..._5], function* (fromDate, toDate, start, count, serial, options = {}) {
|
|
585
576
|
assertParamExists("mInvoiceGetInvoices", "fromDate", fromDate);
|
|
586
577
|
assertParamExists("mInvoiceGetInvoices", "toDate", toDate);
|
|
587
|
-
const localVarPath =
|
|
578
|
+
const localVarPath = "/m-invoice/get-invoices";
|
|
588
579
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
589
580
|
let baseOptions;
|
|
590
581
|
if (configuration) {
|
|
591
582
|
baseOptions = configuration.baseOptions;
|
|
592
583
|
}
|
|
593
|
-
const localVarRequestOptions = {
|
|
594
|
-
method: "GET"
|
|
595
|
-
|
|
596
|
-
...options
|
|
597
|
-
};
|
|
584
|
+
const localVarRequestOptions = __spreadValues(__spreadValues({
|
|
585
|
+
method: "GET"
|
|
586
|
+
}, baseOptions), options);
|
|
598
587
|
const localVarHeaderParameter = {};
|
|
599
588
|
const localVarQueryParameter = {};
|
|
600
|
-
|
|
589
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
601
590
|
if (start !== void 0) {
|
|
602
591
|
localVarQueryParameter["start"] = start;
|
|
603
592
|
}
|
|
@@ -615,16 +604,12 @@ const DefaultApiAxiosParamCreator = function(configuration) {
|
|
|
615
604
|
}
|
|
616
605
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
617
606
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
618
|
-
localVarRequestOptions.headers = {
|
|
619
|
-
...localVarHeaderParameter,
|
|
620
|
-
...headersFromBaseOptions,
|
|
621
|
-
...options.headers
|
|
622
|
-
};
|
|
607
|
+
localVarRequestOptions.headers = __spreadValues(__spreadValues(__spreadValues({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
623
608
|
return {
|
|
624
609
|
url: toPathString(localVarUrlObj),
|
|
625
610
|
options: localVarRequestOptions
|
|
626
611
|
};
|
|
627
|
-
},
|
|
612
|
+
}),
|
|
628
613
|
/**
|
|
629
614
|
* Ký hợp đồng điện tử với thông tin hợp đồng được cung cấp.
|
|
630
615
|
* @summary API ký hóa đơn
|
|
@@ -632,34 +617,28 @@ const DefaultApiAxiosParamCreator = function(configuration) {
|
|
|
632
617
|
* @param {*} [options] Override http request option.
|
|
633
618
|
* @throws {RequiredError}
|
|
634
619
|
*/
|
|
635
|
-
mInvoiceSignContract:
|
|
620
|
+
mInvoiceSignContract: (_0, ..._1) => __async(null, [_0, ..._1], function* (signContractRequest, options = {}) {
|
|
636
621
|
assertParamExists(
|
|
637
622
|
"mInvoiceSignContract",
|
|
638
623
|
"signContractRequest",
|
|
639
624
|
signContractRequest
|
|
640
625
|
);
|
|
641
|
-
const localVarPath =
|
|
626
|
+
const localVarPath = "/m-invoice/sign-contract";
|
|
642
627
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
643
628
|
let baseOptions;
|
|
644
629
|
if (configuration) {
|
|
645
630
|
baseOptions = configuration.baseOptions;
|
|
646
631
|
}
|
|
647
|
-
const localVarRequestOptions = {
|
|
648
|
-
method: "POST"
|
|
649
|
-
|
|
650
|
-
...options
|
|
651
|
-
};
|
|
632
|
+
const localVarRequestOptions = __spreadValues(__spreadValues({
|
|
633
|
+
method: "POST"
|
|
634
|
+
}, baseOptions), options);
|
|
652
635
|
const localVarHeaderParameter = {};
|
|
653
636
|
const localVarQueryParameter = {};
|
|
654
|
-
|
|
637
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
655
638
|
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
656
639
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
657
640
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
658
|
-
localVarRequestOptions.headers = {
|
|
659
|
-
...localVarHeaderParameter,
|
|
660
|
-
...headersFromBaseOptions,
|
|
661
|
-
...options.headers
|
|
662
|
-
};
|
|
641
|
+
localVarRequestOptions.headers = __spreadValues(__spreadValues(__spreadValues({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
663
642
|
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
664
643
|
signContractRequest,
|
|
665
644
|
localVarRequestOptions,
|
|
@@ -669,7 +648,7 @@ const DefaultApiAxiosParamCreator = function(configuration) {
|
|
|
669
648
|
url: toPathString(localVarUrlObj),
|
|
670
649
|
options: localVarRequestOptions
|
|
671
650
|
};
|
|
672
|
-
},
|
|
651
|
+
}),
|
|
673
652
|
/**
|
|
674
653
|
* Đăng nhập vào hệ thống với thông tin tài khoản người dùng.
|
|
675
654
|
* @summary API đăng nhập
|
|
@@ -677,29 +656,23 @@ const DefaultApiAxiosParamCreator = function(configuration) {
|
|
|
677
656
|
* @param {*} [options] Override http request option.
|
|
678
657
|
* @throws {RequiredError}
|
|
679
658
|
*/
|
|
680
|
-
mInvoiceSignIn:
|
|
659
|
+
mInvoiceSignIn: (_0, ..._1) => __async(null, [_0, ..._1], function* (signInRequest, options = {}) {
|
|
681
660
|
assertParamExists("mInvoiceSignIn", "signInRequest", signInRequest);
|
|
682
|
-
const localVarPath =
|
|
661
|
+
const localVarPath = "/m-invoice/sign-in";
|
|
683
662
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
684
663
|
let baseOptions;
|
|
685
664
|
if (configuration) {
|
|
686
665
|
baseOptions = configuration.baseOptions;
|
|
687
666
|
}
|
|
688
|
-
const localVarRequestOptions = {
|
|
689
|
-
method: "POST"
|
|
690
|
-
|
|
691
|
-
...options
|
|
692
|
-
};
|
|
667
|
+
const localVarRequestOptions = __spreadValues(__spreadValues({
|
|
668
|
+
method: "POST"
|
|
669
|
+
}, baseOptions), options);
|
|
693
670
|
const localVarHeaderParameter = {};
|
|
694
671
|
const localVarQueryParameter = {};
|
|
695
672
|
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
696
673
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
697
674
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
698
|
-
localVarRequestOptions.headers = {
|
|
699
|
-
...localVarHeaderParameter,
|
|
700
|
-
...headersFromBaseOptions,
|
|
701
|
-
...options.headers
|
|
702
|
-
};
|
|
675
|
+
localVarRequestOptions.headers = __spreadValues(__spreadValues(__spreadValues({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
703
676
|
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
704
677
|
signInRequest,
|
|
705
678
|
localVarRequestOptions,
|
|
@@ -709,7 +682,7 @@ const DefaultApiAxiosParamCreator = function(configuration) {
|
|
|
709
682
|
url: toPathString(localVarUrlObj),
|
|
710
683
|
options: localVarRequestOptions
|
|
711
684
|
};
|
|
712
|
-
},
|
|
685
|
+
}),
|
|
713
686
|
/**
|
|
714
687
|
* Lấy thông tin hóa đơn dưới định dạng sẵn sàng để in.
|
|
715
688
|
* @summary API xem in hóa đơn
|
|
@@ -717,37 +690,31 @@ const DefaultApiAxiosParamCreator = function(configuration) {
|
|
|
717
690
|
* @param {*} [options] Override http request option.
|
|
718
691
|
* @throws {RequiredError}
|
|
719
692
|
*/
|
|
720
|
-
mInvoiceViewPrintInvoice:
|
|
693
|
+
mInvoiceViewPrintInvoice: (_0, ..._1) => __async(null, [_0, ..._1], function* (id, options = {}) {
|
|
721
694
|
assertParamExists("mInvoiceViewPrintInvoice", "id", id);
|
|
722
|
-
const localVarPath =
|
|
695
|
+
const localVarPath = "/m-invoice/view-print-invoice";
|
|
723
696
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
724
697
|
let baseOptions;
|
|
725
698
|
if (configuration) {
|
|
726
699
|
baseOptions = configuration.baseOptions;
|
|
727
700
|
}
|
|
728
|
-
const localVarRequestOptions = {
|
|
729
|
-
method: "GET"
|
|
730
|
-
|
|
731
|
-
...options
|
|
732
|
-
};
|
|
701
|
+
const localVarRequestOptions = __spreadValues(__spreadValues({
|
|
702
|
+
method: "GET"
|
|
703
|
+
}, baseOptions), options);
|
|
733
704
|
const localVarHeaderParameter = {};
|
|
734
705
|
const localVarQueryParameter = {};
|
|
735
|
-
|
|
706
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
736
707
|
if (id !== void 0) {
|
|
737
708
|
localVarQueryParameter["id"] = id;
|
|
738
709
|
}
|
|
739
710
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
740
711
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
741
|
-
localVarRequestOptions.headers = {
|
|
742
|
-
...localVarHeaderParameter,
|
|
743
|
-
...headersFromBaseOptions,
|
|
744
|
-
...options.headers
|
|
745
|
-
};
|
|
712
|
+
localVarRequestOptions.headers = __spreadValues(__spreadValues(__spreadValues({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
746
713
|
return {
|
|
747
714
|
url: toPathString(localVarUrlObj),
|
|
748
715
|
options: localVarRequestOptions
|
|
749
716
|
};
|
|
750
|
-
},
|
|
717
|
+
}),
|
|
751
718
|
/**
|
|
752
719
|
* Lấy thông tin chi tiết của một mã số thuế (MST) dựa trên mã số thuế được cung cấp.
|
|
753
720
|
* @summary API lấy thông tin mã số thuế
|
|
@@ -755,19 +722,17 @@ const DefaultApiAxiosParamCreator = function(configuration) {
|
|
|
755
722
|
* @param {*} [options] Override http request option.
|
|
756
723
|
* @throws {RequiredError}
|
|
757
724
|
*/
|
|
758
|
-
taxInfo:
|
|
725
|
+
taxInfo: (_0, ..._1) => __async(null, [_0, ..._1], function* (tax, options = {}) {
|
|
759
726
|
assertParamExists("taxInfo", "tax", tax);
|
|
760
|
-
const localVarPath =
|
|
727
|
+
const localVarPath = "/tax-code";
|
|
761
728
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
762
729
|
let baseOptions;
|
|
763
730
|
if (configuration) {
|
|
764
731
|
baseOptions = configuration.baseOptions;
|
|
765
732
|
}
|
|
766
|
-
const localVarRequestOptions = {
|
|
767
|
-
method: "GET"
|
|
768
|
-
|
|
769
|
-
...options
|
|
770
|
-
};
|
|
733
|
+
const localVarRequestOptions = __spreadValues(__spreadValues({
|
|
734
|
+
method: "GET"
|
|
735
|
+
}, baseOptions), options);
|
|
771
736
|
const localVarHeaderParameter = {};
|
|
772
737
|
const localVarQueryParameter = {};
|
|
773
738
|
if (tax !== void 0) {
|
|
@@ -775,16 +740,12 @@ const DefaultApiAxiosParamCreator = function(configuration) {
|
|
|
775
740
|
}
|
|
776
741
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
777
742
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
778
|
-
localVarRequestOptions.headers = {
|
|
779
|
-
...localVarHeaderParameter,
|
|
780
|
-
...headersFromBaseOptions,
|
|
781
|
-
...options.headers
|
|
782
|
-
};
|
|
743
|
+
localVarRequestOptions.headers = __spreadValues(__spreadValues(__spreadValues({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
783
744
|
return {
|
|
784
745
|
url: toPathString(localVarUrlObj),
|
|
785
746
|
options: localVarRequestOptions
|
|
786
747
|
};
|
|
787
|
-
},
|
|
748
|
+
}),
|
|
788
749
|
/**
|
|
789
750
|
* Single Sign-On login for merchants using provider and tax code.
|
|
790
751
|
* @summary API merchant SSO login
|
|
@@ -792,29 +753,23 @@ const DefaultApiAxiosParamCreator = function(configuration) {
|
|
|
792
753
|
* @param {*} [options] Override http request option.
|
|
793
754
|
* @throws {RequiredError}
|
|
794
755
|
*/
|
|
795
|
-
signInSSO:
|
|
756
|
+
signInSSO: (_0, ..._1) => __async(null, [_0, ..._1], function* (signInSSORequest, options = {}) {
|
|
796
757
|
assertParamExists("signInSSO", "signInSSORequest", signInSSORequest);
|
|
797
|
-
const localVarPath =
|
|
758
|
+
const localVarPath = "/core-api/auth/merchant-login";
|
|
798
759
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
799
760
|
let baseOptions;
|
|
800
761
|
if (configuration) {
|
|
801
762
|
baseOptions = configuration.baseOptions;
|
|
802
763
|
}
|
|
803
|
-
const localVarRequestOptions = {
|
|
804
|
-
method: "POST"
|
|
805
|
-
|
|
806
|
-
...options
|
|
807
|
-
};
|
|
764
|
+
const localVarRequestOptions = __spreadValues(__spreadValues({
|
|
765
|
+
method: "POST"
|
|
766
|
+
}, baseOptions), options);
|
|
808
767
|
const localVarHeaderParameter = {};
|
|
809
768
|
const localVarQueryParameter = {};
|
|
810
769
|
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
811
770
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
812
771
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
813
|
-
localVarRequestOptions.headers = {
|
|
814
|
-
...localVarHeaderParameter,
|
|
815
|
-
...headersFromBaseOptions,
|
|
816
|
-
...options.headers
|
|
817
|
-
};
|
|
772
|
+
localVarRequestOptions.headers = __spreadValues(__spreadValues(__spreadValues({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
818
773
|
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
819
774
|
signInSSORequest,
|
|
820
775
|
localVarRequestOptions,
|
|
@@ -824,35 +779,29 @@ const DefaultApiAxiosParamCreator = function(configuration) {
|
|
|
824
779
|
url: toPathString(localVarUrlObj),
|
|
825
780
|
options: localVarRequestOptions
|
|
826
781
|
};
|
|
827
|
-
},
|
|
782
|
+
}),
|
|
828
783
|
/**
|
|
829
784
|
* Single Sign-On logout for merchants using provider and tax code.
|
|
830
785
|
* @summary API merchant SSO logout
|
|
831
786
|
* @param {*} [options] Override http request option.
|
|
832
787
|
* @throws {RequiredError}
|
|
833
788
|
*/
|
|
834
|
-
signOutSSO:
|
|
835
|
-
const localVarPath =
|
|
789
|
+
signOutSSO: (..._0) => __async(null, [..._0], function* (options = {}) {
|
|
790
|
+
const localVarPath = "/core-api/auth/merchant-logout";
|
|
836
791
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
837
792
|
let baseOptions;
|
|
838
793
|
if (configuration) {
|
|
839
794
|
baseOptions = configuration.baseOptions;
|
|
840
795
|
}
|
|
841
|
-
const localVarRequestOptions = {
|
|
842
|
-
method: "POST"
|
|
843
|
-
|
|
844
|
-
...options
|
|
845
|
-
};
|
|
796
|
+
const localVarRequestOptions = __spreadValues(__spreadValues({
|
|
797
|
+
method: "POST"
|
|
798
|
+
}, baseOptions), options);
|
|
846
799
|
const localVarHeaderParameter = {};
|
|
847
800
|
const localVarQueryParameter = {};
|
|
848
801
|
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
849
802
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
850
803
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
851
|
-
localVarRequestOptions.headers = {
|
|
852
|
-
...localVarHeaderParameter,
|
|
853
|
-
...headersFromBaseOptions,
|
|
854
|
-
...options.headers
|
|
855
|
-
};
|
|
804
|
+
localVarRequestOptions.headers = __spreadValues(__spreadValues(__spreadValues({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
856
805
|
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
857
806
|
localVarRequestOptions,
|
|
858
807
|
configuration
|
|
@@ -861,44 +810,38 @@ const DefaultApiAxiosParamCreator = function(configuration) {
|
|
|
861
810
|
url: toPathString(localVarUrlObj),
|
|
862
811
|
options: localVarRequestOptions
|
|
863
812
|
};
|
|
864
|
-
},
|
|
813
|
+
}),
|
|
865
814
|
/**
|
|
866
815
|
* Check authentication status for merchants using provider and tax code.
|
|
867
816
|
* @summary API check auth
|
|
868
817
|
* @param {*} [options] Override http request option.
|
|
869
818
|
* @throws {RequiredError}
|
|
870
819
|
*/
|
|
871
|
-
checkAuth:
|
|
872
|
-
const localVarPath =
|
|
820
|
+
checkAuth: (..._0) => __async(null, [..._0], function* (options = {}) {
|
|
821
|
+
const localVarPath = "/core-api/auth/me";
|
|
873
822
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
874
823
|
let baseOptions;
|
|
875
824
|
if (configuration) {
|
|
876
825
|
baseOptions = configuration.baseOptions;
|
|
877
826
|
}
|
|
878
|
-
const localVarRequestOptions = {
|
|
879
|
-
method: "GET"
|
|
880
|
-
|
|
881
|
-
...options
|
|
882
|
-
};
|
|
827
|
+
const localVarRequestOptions = __spreadValues(__spreadValues({
|
|
828
|
+
method: "GET"
|
|
829
|
+
}, baseOptions), options);
|
|
883
830
|
const localVarHeaderParameter = {};
|
|
884
831
|
const localVarQueryParameter = {};
|
|
885
832
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
886
833
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
887
|
-
localVarRequestOptions.headers = {
|
|
888
|
-
...localVarHeaderParameter,
|
|
889
|
-
...headersFromBaseOptions,
|
|
890
|
-
...options.headers
|
|
891
|
-
};
|
|
834
|
+
localVarRequestOptions.headers = __spreadValues(__spreadValues(__spreadValues({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
892
835
|
return {
|
|
893
836
|
url: toPathString(localVarUrlObj),
|
|
894
837
|
options: localVarRequestOptions
|
|
895
838
|
};
|
|
896
|
-
}
|
|
839
|
+
})
|
|
897
840
|
};
|
|
898
841
|
};
|
|
899
842
|
const DefaultApiFp = function(configuration) {
|
|
900
843
|
const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration);
|
|
901
|
-
const BASE_PATH = configuration
|
|
844
|
+
const BASE_PATH = (configuration == null ? void 0 : configuration.mode) === "development" ? "https://stag-invoice-hub.atomsolution.vn".replace(/\/+$/, "") : "https://invoice-hub.atomsolution.vn".replace(/\/+$/, "");
|
|
902
845
|
return {
|
|
903
846
|
/**
|
|
904
847
|
* Tạo một hóa đơn mới theo định dạng FPT dựa trên thông tin được cung cấp.
|
|
@@ -907,19 +850,22 @@ const DefaultApiFp = function(configuration) {
|
|
|
907
850
|
* @param {*} [options] Override http request option.
|
|
908
851
|
* @throws {RequiredError}
|
|
909
852
|
*/
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
853
|
+
fptCreateInvoice(fptCreateInvoiceRequest, options) {
|
|
854
|
+
return __async(this, null, function* () {
|
|
855
|
+
var _a2, _b, _c;
|
|
856
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.fptCreateInvoice(
|
|
857
|
+
fptCreateInvoiceRequest,
|
|
858
|
+
options
|
|
859
|
+
);
|
|
860
|
+
const localVarOperationServerIndex = (_a2 = configuration == null ? void 0 : configuration.serverIndex) != null ? _a2 : 0;
|
|
861
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap["DefaultApi.fptCreateInvoice"]) == null ? void 0 : _b[localVarOperationServerIndex]) == null ? void 0 : _c.url;
|
|
862
|
+
return (axios, basePath) => createRequestFunction(
|
|
863
|
+
localVarAxiosArgs,
|
|
864
|
+
globalAxios,
|
|
865
|
+
BASE_PATH,
|
|
866
|
+
configuration
|
|
867
|
+
)(axios, localVarOperationServerBasePath || basePath);
|
|
868
|
+
});
|
|
923
869
|
},
|
|
924
870
|
/**
|
|
925
871
|
* Lấy thông tin chi tiết của một hóa đơn dựa trên ID hóa đơn.
|
|
@@ -929,20 +875,23 @@ const DefaultApiFp = function(configuration) {
|
|
|
929
875
|
* @param {*} [options] Override http request option.
|
|
930
876
|
* @throws {RequiredError}
|
|
931
877
|
*/
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
878
|
+
fptGetInvoice(id, stax, options) {
|
|
879
|
+
return __async(this, null, function* () {
|
|
880
|
+
var _a2, _b, _c;
|
|
881
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.fptGetInvoice(
|
|
882
|
+
id,
|
|
883
|
+
stax,
|
|
884
|
+
options
|
|
885
|
+
);
|
|
886
|
+
const localVarOperationServerIndex = (_a2 = configuration == null ? void 0 : configuration.serverIndex) != null ? _a2 : 0;
|
|
887
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap["DefaultApi.fptGetInvoice"]) == null ? void 0 : _b[localVarOperationServerIndex]) == null ? void 0 : _c.url;
|
|
888
|
+
return (axios, basePath) => createRequestFunction(
|
|
889
|
+
localVarAxiosArgs,
|
|
890
|
+
globalAxios,
|
|
891
|
+
BASE_PATH,
|
|
892
|
+
configuration
|
|
893
|
+
)(axios, localVarOperationServerBasePath || basePath);
|
|
894
|
+
});
|
|
946
895
|
},
|
|
947
896
|
/**
|
|
948
897
|
* Lấy danh sách tất cả hóa đơn dựa trên bộ lọc được cung cấp.
|
|
@@ -956,24 +905,27 @@ const DefaultApiFp = function(configuration) {
|
|
|
956
905
|
* @param {*} [options] Override http request option.
|
|
957
906
|
* @throws {RequiredError}
|
|
958
907
|
*/
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
908
|
+
fptGetInvoices(fromDate, toDate, stax, start, count, serial, options) {
|
|
909
|
+
return __async(this, null, function* () {
|
|
910
|
+
var _a2, _b, _c;
|
|
911
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.fptGetInvoices(
|
|
912
|
+
fromDate,
|
|
913
|
+
toDate,
|
|
914
|
+
stax,
|
|
915
|
+
start,
|
|
916
|
+
count,
|
|
917
|
+
serial,
|
|
918
|
+
options
|
|
919
|
+
);
|
|
920
|
+
const localVarOperationServerIndex = (_a2 = configuration == null ? void 0 : configuration.serverIndex) != null ? _a2 : 0;
|
|
921
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap["DefaultApi.fptGetInvoices"]) == null ? void 0 : _b[localVarOperationServerIndex]) == null ? void 0 : _c.url;
|
|
922
|
+
return (axios, basePath) => createRequestFunction(
|
|
923
|
+
localVarAxiosArgs,
|
|
924
|
+
globalAxios,
|
|
925
|
+
BASE_PATH,
|
|
926
|
+
configuration
|
|
927
|
+
)(axios, localVarOperationServerBasePath || basePath);
|
|
928
|
+
});
|
|
977
929
|
},
|
|
978
930
|
/**
|
|
979
931
|
* Ký hợp đồng điện tử với thông tin hợp đồng được cung cấp.
|
|
@@ -982,19 +934,22 @@ const DefaultApiFp = function(configuration) {
|
|
|
982
934
|
* @param {*} [options] Override http request option.
|
|
983
935
|
* @throws {RequiredError}
|
|
984
936
|
*/
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
937
|
+
fptSignContract(fptSignContractRequest, options) {
|
|
938
|
+
return __async(this, null, function* () {
|
|
939
|
+
var _a2, _b, _c;
|
|
940
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.fptSignContract(
|
|
941
|
+
fptSignContractRequest,
|
|
942
|
+
options
|
|
943
|
+
);
|
|
944
|
+
const localVarOperationServerIndex = (_a2 = configuration == null ? void 0 : configuration.serverIndex) != null ? _a2 : 0;
|
|
945
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap["DefaultApi.fptSignContract"]) == null ? void 0 : _b[localVarOperationServerIndex]) == null ? void 0 : _c.url;
|
|
946
|
+
return (axios, basePath) => createRequestFunction(
|
|
947
|
+
localVarAxiosArgs,
|
|
948
|
+
globalAxios,
|
|
949
|
+
BASE_PATH,
|
|
950
|
+
configuration
|
|
951
|
+
)(axios, localVarOperationServerBasePath || basePath);
|
|
952
|
+
});
|
|
998
953
|
},
|
|
999
954
|
/**
|
|
1000
955
|
* Đăng nhập vào hệ thống với thông tin tài khoản người dùng.
|
|
@@ -1003,19 +958,22 @@ const DefaultApiFp = function(configuration) {
|
|
|
1003
958
|
* @param {*} [options] Override http request option.
|
|
1004
959
|
* @throws {RequiredError}
|
|
1005
960
|
*/
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
961
|
+
fptSignIn(signInRequest, options) {
|
|
962
|
+
return __async(this, null, function* () {
|
|
963
|
+
var _a2, _b, _c;
|
|
964
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.fptSignIn(
|
|
965
|
+
signInRequest,
|
|
966
|
+
options
|
|
967
|
+
);
|
|
968
|
+
const localVarOperationServerIndex = (_a2 = configuration == null ? void 0 : configuration.serverIndex) != null ? _a2 : 0;
|
|
969
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap["DefaultApi.fptSignIn"]) == null ? void 0 : _b[localVarOperationServerIndex]) == null ? void 0 : _c.url;
|
|
970
|
+
return (axios, basePath) => createRequestFunction(
|
|
971
|
+
localVarAxiosArgs,
|
|
972
|
+
globalAxios,
|
|
973
|
+
BASE_PATH,
|
|
974
|
+
configuration
|
|
975
|
+
)(axios, localVarOperationServerBasePath || basePath);
|
|
976
|
+
});
|
|
1019
977
|
},
|
|
1020
978
|
/**
|
|
1021
979
|
* Lấy thông tin hóa đơn dưới định dạng sẵn sàng để in.
|
|
@@ -1025,16 +983,19 @@ const DefaultApiFp = function(configuration) {
|
|
|
1025
983
|
* @param {*} [options] Override http request option.
|
|
1026
984
|
* @throws {RequiredError}
|
|
1027
985
|
*/
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
986
|
+
fptViewPrintInvoice(id, stax, options) {
|
|
987
|
+
return __async(this, null, function* () {
|
|
988
|
+
var _a2, _b, _c;
|
|
989
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.fptViewPrintInvoice(id, stax, options);
|
|
990
|
+
const localVarOperationServerIndex = (_a2 = configuration == null ? void 0 : configuration.serverIndex) != null ? _a2 : 0;
|
|
991
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap["DefaultApi.fptViewPrintInvoice"]) == null ? void 0 : _b[localVarOperationServerIndex]) == null ? void 0 : _c.url;
|
|
992
|
+
return (axios, basePath) => createRequestFunction(
|
|
993
|
+
localVarAxiosArgs,
|
|
994
|
+
globalAxios,
|
|
995
|
+
BASE_PATH,
|
|
996
|
+
configuration
|
|
997
|
+
)(axios, localVarOperationServerBasePath || basePath);
|
|
998
|
+
});
|
|
1038
999
|
},
|
|
1039
1000
|
/**
|
|
1040
1001
|
* Tạo một hóa đơn mới dựa trên thông tin được cung cấp.
|
|
@@ -1043,19 +1004,22 @@ const DefaultApiFp = function(configuration) {
|
|
|
1043
1004
|
* @param {*} [options] Override http request option.
|
|
1044
1005
|
* @throws {RequiredError}
|
|
1045
1006
|
*/
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1007
|
+
mInvoiceCreateInvoice(createInvoiceRequest, options) {
|
|
1008
|
+
return __async(this, null, function* () {
|
|
1009
|
+
var _a2, _b, _c;
|
|
1010
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.mInvoiceCreateInvoice(
|
|
1011
|
+
createInvoiceRequest,
|
|
1012
|
+
options
|
|
1013
|
+
);
|
|
1014
|
+
const localVarOperationServerIndex = (_a2 = configuration == null ? void 0 : configuration.serverIndex) != null ? _a2 : 0;
|
|
1015
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap["DefaultApi.mInvoiceCreateInvoice"]) == null ? void 0 : _b[localVarOperationServerIndex]) == null ? void 0 : _c.url;
|
|
1016
|
+
return (axios, basePath) => createRequestFunction(
|
|
1017
|
+
localVarAxiosArgs,
|
|
1018
|
+
globalAxios,
|
|
1019
|
+
BASE_PATH,
|
|
1020
|
+
configuration
|
|
1021
|
+
)(axios, localVarOperationServerBasePath || basePath);
|
|
1022
|
+
});
|
|
1059
1023
|
},
|
|
1060
1024
|
/**
|
|
1061
1025
|
* Lấy thông tin chi tiết của một hóa đơn dựa trên ID hóa đơn.
|
|
@@ -1064,16 +1028,19 @@ const DefaultApiFp = function(configuration) {
|
|
|
1064
1028
|
* @param {*} [options] Override http request option.
|
|
1065
1029
|
* @throws {RequiredError}
|
|
1066
1030
|
*/
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1031
|
+
mInvoiceGetInvoice(id, options) {
|
|
1032
|
+
return __async(this, null, function* () {
|
|
1033
|
+
var _a2, _b, _c;
|
|
1034
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.mInvoiceGetInvoice(id, options);
|
|
1035
|
+
const localVarOperationServerIndex = (_a2 = configuration == null ? void 0 : configuration.serverIndex) != null ? _a2 : 0;
|
|
1036
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap["DefaultApi.mInvoiceGetInvoice"]) == null ? void 0 : _b[localVarOperationServerIndex]) == null ? void 0 : _c.url;
|
|
1037
|
+
return (axios, basePath) => createRequestFunction(
|
|
1038
|
+
localVarAxiosArgs,
|
|
1039
|
+
globalAxios,
|
|
1040
|
+
BASE_PATH,
|
|
1041
|
+
configuration
|
|
1042
|
+
)(axios, localVarOperationServerBasePath || basePath);
|
|
1043
|
+
});
|
|
1077
1044
|
},
|
|
1078
1045
|
/**
|
|
1079
1046
|
* Lấy danh sách tất cả hóa đơn dựa trên bộ lọc được cung cấp.
|
|
@@ -1086,23 +1053,26 @@ const DefaultApiFp = function(configuration) {
|
|
|
1086
1053
|
* @param {*} [options] Override http request option.
|
|
1087
1054
|
* @throws {RequiredError}
|
|
1088
1055
|
*/
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1056
|
+
mInvoiceGetInvoices(fromDate, toDate, start, count, serial, options) {
|
|
1057
|
+
return __async(this, null, function* () {
|
|
1058
|
+
var _a2, _b, _c;
|
|
1059
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.mInvoiceGetInvoices(
|
|
1060
|
+
fromDate,
|
|
1061
|
+
toDate,
|
|
1062
|
+
start,
|
|
1063
|
+
count,
|
|
1064
|
+
serial,
|
|
1065
|
+
options
|
|
1066
|
+
);
|
|
1067
|
+
const localVarOperationServerIndex = (_a2 = configuration == null ? void 0 : configuration.serverIndex) != null ? _a2 : 0;
|
|
1068
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap["DefaultApi.mInvoiceGetInvoices"]) == null ? void 0 : _b[localVarOperationServerIndex]) == null ? void 0 : _c.url;
|
|
1069
|
+
return (axios, basePath) => createRequestFunction(
|
|
1070
|
+
localVarAxiosArgs,
|
|
1071
|
+
globalAxios,
|
|
1072
|
+
BASE_PATH,
|
|
1073
|
+
configuration
|
|
1074
|
+
)(axios, localVarOperationServerBasePath || basePath);
|
|
1075
|
+
});
|
|
1106
1076
|
},
|
|
1107
1077
|
/**
|
|
1108
1078
|
* Ký hợp đồng điện tử với thông tin hợp đồng được cung cấp.
|
|
@@ -1111,19 +1081,22 @@ const DefaultApiFp = function(configuration) {
|
|
|
1111
1081
|
* @param {*} [options] Override http request option.
|
|
1112
1082
|
* @throws {RequiredError}
|
|
1113
1083
|
*/
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1084
|
+
mInvoiceSignContract(signContractRequest, options) {
|
|
1085
|
+
return __async(this, null, function* () {
|
|
1086
|
+
var _a2, _b, _c;
|
|
1087
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.mInvoiceSignContract(
|
|
1088
|
+
signContractRequest,
|
|
1089
|
+
options
|
|
1090
|
+
);
|
|
1091
|
+
const localVarOperationServerIndex = (_a2 = configuration == null ? void 0 : configuration.serverIndex) != null ? _a2 : 0;
|
|
1092
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap["DefaultApi.mInvoiceSignContract"]) == null ? void 0 : _b[localVarOperationServerIndex]) == null ? void 0 : _c.url;
|
|
1093
|
+
return (axios, basePath) => createRequestFunction(
|
|
1094
|
+
localVarAxiosArgs,
|
|
1095
|
+
globalAxios,
|
|
1096
|
+
BASE_PATH,
|
|
1097
|
+
configuration
|
|
1098
|
+
)(axios, localVarOperationServerBasePath || basePath);
|
|
1099
|
+
});
|
|
1127
1100
|
},
|
|
1128
1101
|
/**
|
|
1129
1102
|
* Đăng nhập vào hệ thống với thông tin tài khoản người dùng.
|
|
@@ -1132,19 +1105,22 @@ const DefaultApiFp = function(configuration) {
|
|
|
1132
1105
|
* @param {*} [options] Override http request option.
|
|
1133
1106
|
* @throws {RequiredError}
|
|
1134
1107
|
*/
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1108
|
+
mInvoiceSignIn(signInRequest, options) {
|
|
1109
|
+
return __async(this, null, function* () {
|
|
1110
|
+
var _a2, _b, _c;
|
|
1111
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.mInvoiceSignIn(
|
|
1112
|
+
signInRequest,
|
|
1113
|
+
options
|
|
1114
|
+
);
|
|
1115
|
+
const localVarOperationServerIndex = (_a2 = configuration == null ? void 0 : configuration.serverIndex) != null ? _a2 : 0;
|
|
1116
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap["DefaultApi.mInvoiceSignIn"]) == null ? void 0 : _b[localVarOperationServerIndex]) == null ? void 0 : _c.url;
|
|
1117
|
+
return (axios, basePath) => createRequestFunction(
|
|
1118
|
+
localVarAxiosArgs,
|
|
1119
|
+
globalAxios,
|
|
1120
|
+
BASE_PATH,
|
|
1121
|
+
configuration
|
|
1122
|
+
)(axios, localVarOperationServerBasePath || basePath);
|
|
1123
|
+
});
|
|
1148
1124
|
},
|
|
1149
1125
|
/**
|
|
1150
1126
|
* Lấy thông tin hóa đơn dưới định dạng sẵn sàng để in.
|
|
@@ -1153,16 +1129,19 @@ const DefaultApiFp = function(configuration) {
|
|
|
1153
1129
|
* @param {*} [options] Override http request option.
|
|
1154
1130
|
* @throws {RequiredError}
|
|
1155
1131
|
*/
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1132
|
+
mInvoiceViewPrintInvoice(id, options) {
|
|
1133
|
+
return __async(this, null, function* () {
|
|
1134
|
+
var _a2, _b, _c;
|
|
1135
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.mInvoiceViewPrintInvoice(id, options);
|
|
1136
|
+
const localVarOperationServerIndex = (_a2 = configuration == null ? void 0 : configuration.serverIndex) != null ? _a2 : 0;
|
|
1137
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap["DefaultApi.mInvoiceViewPrintInvoice"]) == null ? void 0 : _b[localVarOperationServerIndex]) == null ? void 0 : _c.url;
|
|
1138
|
+
return (axios, basePath) => createRequestFunction(
|
|
1139
|
+
localVarAxiosArgs,
|
|
1140
|
+
globalAxios,
|
|
1141
|
+
BASE_PATH,
|
|
1142
|
+
configuration
|
|
1143
|
+
)(axios, localVarOperationServerBasePath || basePath);
|
|
1144
|
+
});
|
|
1166
1145
|
},
|
|
1167
1146
|
/**
|
|
1168
1147
|
* Lấy thông tin chi tiết của một mã số thuế (MST) dựa trên mã số thuế được cung cấp.
|
|
@@ -1171,19 +1150,22 @@ const DefaultApiFp = function(configuration) {
|
|
|
1171
1150
|
* @param {*} [options] Override http request option.
|
|
1172
1151
|
* @throws {RequiredError}
|
|
1173
1152
|
*/
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1153
|
+
taxInfo(tax, options) {
|
|
1154
|
+
return __async(this, null, function* () {
|
|
1155
|
+
var _a2, _b, _c;
|
|
1156
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.taxInfo(
|
|
1157
|
+
tax,
|
|
1158
|
+
options
|
|
1159
|
+
);
|
|
1160
|
+
const localVarOperationServerIndex = (_a2 = configuration == null ? void 0 : configuration.serverIndex) != null ? _a2 : 0;
|
|
1161
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap["DefaultApi.taxInfo"]) == null ? void 0 : _b[localVarOperationServerIndex]) == null ? void 0 : _c.url;
|
|
1162
|
+
return (axios, basePath) => createRequestFunction(
|
|
1163
|
+
localVarAxiosArgs,
|
|
1164
|
+
globalAxios,
|
|
1165
|
+
BASE_PATH,
|
|
1166
|
+
configuration
|
|
1167
|
+
)(axios, localVarOperationServerBasePath || basePath);
|
|
1168
|
+
});
|
|
1187
1169
|
},
|
|
1188
1170
|
/**
|
|
1189
1171
|
* Single Sign-On login for merchants using provider and tax code.
|
|
@@ -1192,19 +1174,22 @@ const DefaultApiFp = function(configuration) {
|
|
|
1192
1174
|
* @param {*} [options] Override http request option.
|
|
1193
1175
|
* @throws {RequiredError}
|
|
1194
1176
|
*/
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1177
|
+
signInSSO(signInSSORequest, options) {
|
|
1178
|
+
return __async(this, null, function* () {
|
|
1179
|
+
var _a2, _b, _c;
|
|
1180
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.signInSSO(
|
|
1181
|
+
signInSSORequest,
|
|
1182
|
+
options
|
|
1183
|
+
);
|
|
1184
|
+
const localVarOperationServerIndex = (_a2 = configuration == null ? void 0 : configuration.serverIndex) != null ? _a2 : 0;
|
|
1185
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap["DefaultApi.signInSSO"]) == null ? void 0 : _b[localVarOperationServerIndex]) == null ? void 0 : _c.url;
|
|
1186
|
+
return (axios, basePath) => createRequestFunction(
|
|
1187
|
+
localVarAxiosArgs,
|
|
1188
|
+
globalAxios,
|
|
1189
|
+
BASE_PATH,
|
|
1190
|
+
configuration
|
|
1191
|
+
)(axios, localVarOperationServerBasePath || basePath);
|
|
1192
|
+
});
|
|
1208
1193
|
},
|
|
1209
1194
|
/**
|
|
1210
1195
|
* Single Sign-On logout for merchants using provider and tax code.
|
|
@@ -1212,18 +1197,21 @@ const DefaultApiFp = function(configuration) {
|
|
|
1212
1197
|
* @param {*} [options] Override http request option.
|
|
1213
1198
|
* @throws {RequiredError}
|
|
1214
1199
|
*/
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1200
|
+
signOutSSO(options) {
|
|
1201
|
+
return __async(this, null, function* () {
|
|
1202
|
+
var _a2, _b, _c;
|
|
1203
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.signOutSSO(
|
|
1204
|
+
options
|
|
1205
|
+
);
|
|
1206
|
+
const localVarOperationServerIndex = (_a2 = configuration == null ? void 0 : configuration.serverIndex) != null ? _a2 : 0;
|
|
1207
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap["DefaultApi.signOutSSO"]) == null ? void 0 : _b[localVarOperationServerIndex]) == null ? void 0 : _c.url;
|
|
1208
|
+
return (axios, basePath) => createRequestFunction(
|
|
1209
|
+
localVarAxiosArgs,
|
|
1210
|
+
globalAxios,
|
|
1211
|
+
BASE_PATH,
|
|
1212
|
+
configuration
|
|
1213
|
+
)(axios, localVarOperationServerBasePath || basePath);
|
|
1214
|
+
});
|
|
1227
1215
|
},
|
|
1228
1216
|
/**
|
|
1229
1217
|
* Check authentication status for merchants using provider and tax code.
|
|
@@ -1231,18 +1219,21 @@ const DefaultApiFp = function(configuration) {
|
|
|
1231
1219
|
* @param {*} [options] Override http request option.
|
|
1232
1220
|
* @throws {RequiredError}
|
|
1233
1221
|
*/
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1222
|
+
checkAuth(options) {
|
|
1223
|
+
return __async(this, null, function* () {
|
|
1224
|
+
var _a2, _b, _c;
|
|
1225
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.checkAuth(
|
|
1226
|
+
options
|
|
1227
|
+
);
|
|
1228
|
+
const localVarOperationServerIndex = (_a2 = configuration == null ? void 0 : configuration.serverIndex) != null ? _a2 : 0;
|
|
1229
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap["DefaultApi.checkAuth"]) == null ? void 0 : _b[localVarOperationServerIndex]) == null ? void 0 : _c.url;
|
|
1230
|
+
return (axios, basePath) => createRequestFunction(
|
|
1231
|
+
localVarAxiosArgs,
|
|
1232
|
+
globalAxios,
|
|
1233
|
+
BASE_PATH,
|
|
1234
|
+
configuration
|
|
1235
|
+
)(axios, localVarOperationServerBasePath || basePath);
|
|
1236
|
+
});
|
|
1246
1237
|
}
|
|
1247
1238
|
};
|
|
1248
1239
|
};
|
|
@@ -1588,9 +1579,9 @@ const InvoiceApi = function(configuration, basePath, axios) {
|
|
|
1588
1579
|
* @param {*} [options] - Override http request option.
|
|
1589
1580
|
*/
|
|
1590
1581
|
createInvoice(data, options) {
|
|
1591
|
-
if (configuration
|
|
1582
|
+
if ((configuration == null ? void 0 : configuration.provider) === Provider.FPT) {
|
|
1592
1583
|
return localVarFp.fptCreateInvoice(data, options).then((request) => request(axios, basePath));
|
|
1593
|
-
} else if (configuration
|
|
1584
|
+
} else if ((configuration == null ? void 0 : configuration.provider) === Provider.MInvoice) {
|
|
1594
1585
|
return localVarFp.mInvoiceCreateInvoice(data, options).then((request) => request(axios, basePath));
|
|
1595
1586
|
} else {
|
|
1596
1587
|
throw new Error("Unknown provider");
|
|
@@ -1600,10 +1591,10 @@ const InvoiceApi = function(configuration, basePath, axios) {
|
|
|
1600
1591
|
* Get Invoice (Unified)
|
|
1601
1592
|
*/
|
|
1602
1593
|
getInvoice(params, options) {
|
|
1603
|
-
if (configuration
|
|
1594
|
+
if ((configuration == null ? void 0 : configuration.provider) === Provider.FPT) {
|
|
1604
1595
|
if (!params.stax) throw new Error("stax is required for FPT provider");
|
|
1605
1596
|
return localVarFp.fptGetInvoice(params.id, params.stax, options).then((request) => request(axios, basePath));
|
|
1606
|
-
} else if (configuration
|
|
1597
|
+
} else if ((configuration == null ? void 0 : configuration.provider) === Provider.MInvoice) {
|
|
1607
1598
|
return localVarFp.mInvoiceGetInvoice(params.id, options).then((request) => request(axios, basePath));
|
|
1608
1599
|
} else {
|
|
1609
1600
|
throw new Error("Unknown provider");
|
|
@@ -1613,7 +1604,7 @@ const InvoiceApi = function(configuration, basePath, axios) {
|
|
|
1613
1604
|
* Get Invoices (Unified)
|
|
1614
1605
|
*/
|
|
1615
1606
|
getInvoices(params, options) {
|
|
1616
|
-
if (configuration
|
|
1607
|
+
if ((configuration == null ? void 0 : configuration.provider) === Provider.FPT) {
|
|
1617
1608
|
if (!params.stax) throw new Error("stax is required for FPT provider");
|
|
1618
1609
|
return localVarFp.fptGetInvoices(
|
|
1619
1610
|
params.fromDate,
|
|
@@ -1624,7 +1615,7 @@ const InvoiceApi = function(configuration, basePath, axios) {
|
|
|
1624
1615
|
params.serial,
|
|
1625
1616
|
options
|
|
1626
1617
|
).then((request) => request(axios, basePath));
|
|
1627
|
-
} else if (configuration
|
|
1618
|
+
} else if ((configuration == null ? void 0 : configuration.provider) === Provider.MInvoice) {
|
|
1628
1619
|
return localVarFp.mInvoiceGetInvoices(
|
|
1629
1620
|
params.fromDate,
|
|
1630
1621
|
params.toDate,
|
|
@@ -1641,9 +1632,9 @@ const InvoiceApi = function(configuration, basePath, axios) {
|
|
|
1641
1632
|
* Sign Contract (Unified)
|
|
1642
1633
|
*/
|
|
1643
1634
|
signContract(data, options) {
|
|
1644
|
-
if (configuration
|
|
1635
|
+
if ((configuration == null ? void 0 : configuration.provider) === Provider.FPT) {
|
|
1645
1636
|
return localVarFp.fptSignContract(data, options).then((request) => request(axios, basePath));
|
|
1646
|
-
} else if (configuration
|
|
1637
|
+
} else if ((configuration == null ? void 0 : configuration.provider) === Provider.MInvoice) {
|
|
1647
1638
|
return localVarFp.mInvoiceSignContract(data, options).then((request) => request(axios, basePath));
|
|
1648
1639
|
} else {
|
|
1649
1640
|
throw new Error("Unknown provider");
|
|
@@ -1653,9 +1644,9 @@ const InvoiceApi = function(configuration, basePath, axios) {
|
|
|
1653
1644
|
* Sign In (Unified)
|
|
1654
1645
|
*/
|
|
1655
1646
|
signIn(data, options) {
|
|
1656
|
-
if (configuration
|
|
1647
|
+
if ((configuration == null ? void 0 : configuration.provider) === Provider.FPT) {
|
|
1657
1648
|
return localVarFp.fptSignIn(data, options).then((request) => request(axios, basePath));
|
|
1658
|
-
} else if (configuration
|
|
1649
|
+
} else if ((configuration == null ? void 0 : configuration.provider) === Provider.MInvoice) {
|
|
1659
1650
|
return localVarFp.mInvoiceSignIn(data, options).then((request) => request(axios, basePath));
|
|
1660
1651
|
} else {
|
|
1661
1652
|
throw new Error("Unknown provider");
|
|
@@ -1665,10 +1656,10 @@ const InvoiceApi = function(configuration, basePath, axios) {
|
|
|
1665
1656
|
* View Print Invoice (Unified)
|
|
1666
1657
|
*/
|
|
1667
1658
|
viewPrintInvoice(params, options) {
|
|
1668
|
-
if (configuration
|
|
1659
|
+
if ((configuration == null ? void 0 : configuration.provider) === Provider.FPT) {
|
|
1669
1660
|
if (!params.stax) throw new Error("stax is required for FPT provider");
|
|
1670
1661
|
return localVarFp.fptViewPrintInvoice(params.id, params.stax, options).then((request) => request(axios, basePath));
|
|
1671
|
-
} else if (configuration
|
|
1662
|
+
} else if ((configuration == null ? void 0 : configuration.provider) === Provider.MInvoice) {
|
|
1672
1663
|
return localVarFp.mInvoiceViewPrintInvoice(params.id, options).then((request) => request(axios, basePath));
|
|
1673
1664
|
} else {
|
|
1674
1665
|
throw new Error("Unknown provider");
|