@atomsolution/invoice-sdk-api 1.29.0 → 1.29.1
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/dist/api.d.ts +1 -122
- package/dist/base.d.ts +1 -23
- package/dist/index.esm.js +0 -153
- 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/api.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
2
2
|
import { Configuration } from './configuration';
|
|
3
|
-
import {
|
|
3
|
+
import { RequestArgs } from './base';
|
|
4
4
|
/**
|
|
5
5
|
*
|
|
6
6
|
* @export
|
|
@@ -1306,127 +1306,6 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
|
|
|
1306
1306
|
*/
|
|
1307
1307
|
getInvoiceSerials(params: GetInvoiceSerialsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetInvoiceSerialsResponse>>;
|
|
1308
1308
|
};
|
|
1309
|
-
/**
|
|
1310
|
-
* DefaultApi - object-oriented interface
|
|
1311
|
-
* @export
|
|
1312
|
-
* @class DefaultApi
|
|
1313
|
-
* @extends {BaseAPI}
|
|
1314
|
-
*/
|
|
1315
|
-
export declare class DefaultApi extends BaseAPI {
|
|
1316
|
-
/**
|
|
1317
|
-
* Tạo một hóa đơn mới theo định dạng dựa trên thông tin được cung cấp.
|
|
1318
|
-
* @summary Create invoice
|
|
1319
|
-
* @param {CreateInvoiceRequest} createInvoiceRequest
|
|
1320
|
-
* @param {*} [options] Override http request option.
|
|
1321
|
-
* @throws {RequiredError}
|
|
1322
|
-
* @memberof DefaultApi
|
|
1323
|
-
*/
|
|
1324
|
-
createInvoice(createInvoiceRequest: CreateInvoiceRequest, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<CreateInvoiceSuccess, any>>;
|
|
1325
|
-
/**
|
|
1326
|
-
* Lấy thông tin chi tiết của một hóa đơn dựa trên ID hóa đơn.
|
|
1327
|
-
* @summary API lấy thông tin hóa đơn
|
|
1328
|
-
* @param {string} id id hóa đơn.
|
|
1329
|
-
* @param {string} stax mã số thuế bên bán
|
|
1330
|
-
* @param {*} [options] Override http request option.
|
|
1331
|
-
* @throws {RequiredError}
|
|
1332
|
-
* @memberof DefaultApi
|
|
1333
|
-
*/
|
|
1334
|
-
getInvoice(params: GetInvoiceRequest, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<GetInvoiceResponse, any>>;
|
|
1335
|
-
/**
|
|
1336
|
-
* Lấy danh sách tất cả hóa đơn dựa trên bộ lọc được cung cấp.
|
|
1337
|
-
* @summary API lấy danh sách hóa đơn
|
|
1338
|
-
* @param {string} fromDate Ngày bắt đầu lọc hóa đơn (định dạng yyyy-MM-dd)
|
|
1339
|
-
* @param {string} toDate Ngày kết thúc lọc hóa đơn (định dạng yyyy-MM-dd)
|
|
1340
|
-
* @param {string} stax mã số thuế bên bán
|
|
1341
|
-
* @param {number} [start] Vị trí bắt đầu của danh sách hóa đơn (phân trang)
|
|
1342
|
-
* @param {number} [count] Số lượng hóa đơn cần lấy (phân trang)
|
|
1343
|
-
* @param {string} [serial] Ký hiệu hóa đơn để lọc
|
|
1344
|
-
* @param {*} [options] Override http request option.
|
|
1345
|
-
* @throws {RequiredError}
|
|
1346
|
-
* @memberof DefaultApi
|
|
1347
|
-
*/
|
|
1348
|
-
getInvoices(params: GetInvoicesRequest, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<GetInvoicesSuccess, any>>;
|
|
1349
|
-
/**
|
|
1350
|
-
* Ký hợp đồng điện tử với thông tin hợp đồng được cung cấp.
|
|
1351
|
-
* @summary API ký hóa đơn
|
|
1352
|
-
* @param {SignContractRequest} signContractRequest
|
|
1353
|
-
* @param {*} [options] Override http request option.
|
|
1354
|
-
* @throws {RequiredError}
|
|
1355
|
-
* @memberof DefaultApi
|
|
1356
|
-
*/
|
|
1357
|
-
signContract(signContractRequest: SignContractRequest, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<SignContractResponse, any>>;
|
|
1358
|
-
/**
|
|
1359
|
-
* Đăng nhập vào hệ thống với thông tin tài khoản người dùng.
|
|
1360
|
-
* @summary API đăng nhập
|
|
1361
|
-
* @param {SignInRequest} signInRequest
|
|
1362
|
-
* @param {*} [options] Override http request option.
|
|
1363
|
-
* @throws {RequiredError}
|
|
1364
|
-
* @memberof DefaultApi
|
|
1365
|
-
*/
|
|
1366
|
-
signIn(signInRequest: SignInRequest, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<SignInResponse, any>>;
|
|
1367
|
-
/**
|
|
1368
|
-
* Lấy thông tin hóa đơn dưới định dạng sẵn sàng để in.
|
|
1369
|
-
* @summary API xem in hóa đơn
|
|
1370
|
-
* @param {string} id id hóa đơn.
|
|
1371
|
-
* @param {string} stax mã số thuế bên bán
|
|
1372
|
-
* @param {*} [options] Override http request option.
|
|
1373
|
-
* @throws {RequiredError}
|
|
1374
|
-
* @memberof DefaultApi
|
|
1375
|
-
*/
|
|
1376
|
-
viewPrintInvoice(id: string, stax?: string, template_code?: string, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<ViewPrintInvoiceResponse, any>>;
|
|
1377
|
-
/**
|
|
1378
|
-
* 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.
|
|
1379
|
-
* @summary API lấy thông tin mã số thuế
|
|
1380
|
-
* @param {string} tax Mã số thuế cần tra cứu
|
|
1381
|
-
* @param {*} [options] Override http request option.
|
|
1382
|
-
* @throws {RequiredError}
|
|
1383
|
-
* @memberof DefaultApi
|
|
1384
|
-
*/
|
|
1385
|
-
taxInfo(tax: string, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<TaxInfoResponse, any>>;
|
|
1386
|
-
/**
|
|
1387
|
-
* Single Sign-On login for merchants using provider and tax code.
|
|
1388
|
-
* @summary API merchant SSO login
|
|
1389
|
-
* @param {SignInSSORequest} signInSSORequest
|
|
1390
|
-
* @param {*} [options] Override http request option.
|
|
1391
|
-
* @throws {RequiredError}
|
|
1392
|
-
* @memberof DefaultApi
|
|
1393
|
-
*/
|
|
1394
|
-
signInSSO(signInSSORequest: SignInSSORequest, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<SignInSSOResponse, any>>;
|
|
1395
|
-
/**
|
|
1396
|
-
* Single Sign-On logout for merchants using provider and tax code.
|
|
1397
|
-
* @summary API merchant SSO logout
|
|
1398
|
-
* @param {*} [options] Override http request option.
|
|
1399
|
-
* @throws {RequiredError}
|
|
1400
|
-
* @memberof DefaultApi
|
|
1401
|
-
*/
|
|
1402
|
-
signOutSSO(options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<SignOutSSOResponse, any>>;
|
|
1403
|
-
/**
|
|
1404
|
-
* Check authentication status for merchants using provider and tax code.
|
|
1405
|
-
* @summary API check auth
|
|
1406
|
-
* @param {*} [options] Override http request option.
|
|
1407
|
-
* @throws {RequiredError}
|
|
1408
|
-
* @memberof DefaultApi
|
|
1409
|
-
*/
|
|
1410
|
-
checkAuth(options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<CheckAuthResponse, any>>;
|
|
1411
|
-
/**
|
|
1412
|
-
* Check customer declaration status with filtering options.
|
|
1413
|
-
* @summary API check customer declaration status
|
|
1414
|
-
* @param {CheckCustomerDeclarationStatusRequest} params
|
|
1415
|
-
* @param {*} [options] Override http request option.
|
|
1416
|
-
* @throws {RequiredError}
|
|
1417
|
-
* @memberof DefaultApi
|
|
1418
|
-
*/
|
|
1419
|
-
checkCustomerDeclarationStatus(params: CheckCustomerDeclarationStatusRequest, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<CheckCustomerDeclarationStatusResponse, any>>;
|
|
1420
|
-
/**
|
|
1421
|
-
* Check authentication status for merchants using provider and tax code.
|
|
1422
|
-
* @summary API check auth
|
|
1423
|
-
* @param {number} [invType]
|
|
1424
|
-
* @param {*} [options] Override http request option.
|
|
1425
|
-
* @throws {RequiredError}
|
|
1426
|
-
* @memberof DefaultApi
|
|
1427
|
-
*/
|
|
1428
|
-
getInvoiceSerials(params: GetInvoiceSerialsRequest, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<GetInvoiceSerialsResponse, any>>;
|
|
1429
|
-
}
|
|
1430
1309
|
/**
|
|
1431
1310
|
* Unified API functions distinguished by provider in configuration
|
|
1432
1311
|
* @export
|
package/dist/base.d.ts
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* @export
|
|
6
|
-
*/
|
|
7
|
-
export declare const COLLECTION_FORMATS: {
|
|
8
|
-
csv: string;
|
|
9
|
-
ssv: string;
|
|
10
|
-
tsv: string;
|
|
11
|
-
pipes: string;
|
|
12
|
-
};
|
|
1
|
+
import { RawAxiosRequestConfig } from 'axios';
|
|
13
2
|
/**
|
|
14
3
|
*
|
|
15
4
|
* @export
|
|
@@ -19,17 +8,6 @@ export interface RequestArgs {
|
|
|
19
8
|
url: string;
|
|
20
9
|
options: RawAxiosRequestConfig;
|
|
21
10
|
}
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @export
|
|
25
|
-
* @class BaseAPI
|
|
26
|
-
*/
|
|
27
|
-
export declare class BaseAPI {
|
|
28
|
-
protected basePath: string;
|
|
29
|
-
protected axios: AxiosInstance;
|
|
30
|
-
protected configuration: Configuration | undefined;
|
|
31
|
-
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
32
|
-
}
|
|
33
11
|
/**
|
|
34
12
|
*
|
|
35
13
|
* @export
|
package/dist/index.esm.js
CHANGED
|
@@ -194,19 +194,6 @@ function clearProvider(provider, merchantId) {
|
|
|
194
194
|
function clearAllProviders(merchantId) {
|
|
195
195
|
localStorage.removeItem("".concat(STORAGE_KEY, "_").concat(merchantId));
|
|
196
196
|
}
|
|
197
|
-
class BaseAPI {
|
|
198
|
-
constructor(configuration, basePath = "", axios = globalAxios) {
|
|
199
|
-
this.basePath = basePath;
|
|
200
|
-
this.axios = axios;
|
|
201
|
-
if (configuration) {
|
|
202
|
-
this.configuration = configuration;
|
|
203
|
-
this.basePath = configuration.basePath ? "".concat(configuration.basePath.replace(
|
|
204
|
-
/\/+$/,
|
|
205
|
-
""
|
|
206
|
-
), "/").concat(configuration.provider.replace(/^\/+|\/+$/g, "")) : "".concat(basePath, "/").concat(configuration.provider.replace(/^\/+|\/+$/g, ""));
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
197
|
class RequiredError extends Error {
|
|
211
198
|
constructor(field, msg) {
|
|
212
199
|
super(msg);
|
|
@@ -1103,145 +1090,6 @@ const DefaultApiFp = function(configuration) {
|
|
|
1103
1090
|
}
|
|
1104
1091
|
};
|
|
1105
1092
|
};
|
|
1106
|
-
class DefaultApi extends BaseAPI {
|
|
1107
|
-
/**
|
|
1108
|
-
* Tạo một hóa đơn mới theo định dạng dựa trên thông tin được cung cấp.
|
|
1109
|
-
* @summary Create invoice
|
|
1110
|
-
* @param {CreateInvoiceRequest} createInvoiceRequest
|
|
1111
|
-
* @param {*} [options] Override http request option.
|
|
1112
|
-
* @throws {RequiredError}
|
|
1113
|
-
* @memberof DefaultApi
|
|
1114
|
-
*/
|
|
1115
|
-
createInvoice(createInvoiceRequest, options) {
|
|
1116
|
-
return DefaultApiFp(this.configuration).createInvoice(createInvoiceRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1117
|
-
}
|
|
1118
|
-
/**
|
|
1119
|
-
* Lấy thông tin chi tiết của một hóa đơn dựa trên ID hóa đơn.
|
|
1120
|
-
* @summary API lấy thông tin hóa đơn
|
|
1121
|
-
* @param {string} id id hóa đơn.
|
|
1122
|
-
* @param {string} stax mã số thuế bên bán
|
|
1123
|
-
* @param {*} [options] Override http request option.
|
|
1124
|
-
* @throws {RequiredError}
|
|
1125
|
-
* @memberof DefaultApi
|
|
1126
|
-
*/
|
|
1127
|
-
getInvoice(params, options) {
|
|
1128
|
-
return DefaultApiFp(this.configuration).getInvoice(params, options).then((request) => request(this.axios, this.basePath));
|
|
1129
|
-
}
|
|
1130
|
-
/**
|
|
1131
|
-
* Lấy danh sách tất cả hóa đơn dựa trên bộ lọc được cung cấp.
|
|
1132
|
-
* @summary API lấy danh sách hóa đơn
|
|
1133
|
-
* @param {string} fromDate Ngày bắt đầu lọc hóa đơn (định dạng yyyy-MM-dd)
|
|
1134
|
-
* @param {string} toDate Ngày kết thúc lọc hóa đơn (định dạng yyyy-MM-dd)
|
|
1135
|
-
* @param {string} stax mã số thuế bên bán
|
|
1136
|
-
* @param {number} [start] Vị trí bắt đầu của danh sách hóa đơn (phân trang)
|
|
1137
|
-
* @param {number} [count] Số lượng hóa đơn cần lấy (phân trang)
|
|
1138
|
-
* @param {string} [serial] Ký hiệu hóa đơn để lọc
|
|
1139
|
-
* @param {*} [options] Override http request option.
|
|
1140
|
-
* @throws {RequiredError}
|
|
1141
|
-
* @memberof DefaultApi
|
|
1142
|
-
*/
|
|
1143
|
-
getInvoices(params, options) {
|
|
1144
|
-
return DefaultApiFp(this.configuration).getInvoices(params, options).then((request) => request(this.axios, this.basePath));
|
|
1145
|
-
}
|
|
1146
|
-
/**
|
|
1147
|
-
* Ký hợp đồng điện tử với thông tin hợp đồng được cung cấp.
|
|
1148
|
-
* @summary API ký hóa đơn
|
|
1149
|
-
* @param {SignContractRequest} signContractRequest
|
|
1150
|
-
* @param {*} [options] Override http request option.
|
|
1151
|
-
* @throws {RequiredError}
|
|
1152
|
-
* @memberof DefaultApi
|
|
1153
|
-
*/
|
|
1154
|
-
signContract(signContractRequest, options) {
|
|
1155
|
-
return DefaultApiFp(this.configuration).signContract(signContractRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1156
|
-
}
|
|
1157
|
-
/**
|
|
1158
|
-
* Đăng nhập vào hệ thống với thông tin tài khoản người dùng.
|
|
1159
|
-
* @summary API đăng nhập
|
|
1160
|
-
* @param {SignInRequest} signInRequest
|
|
1161
|
-
* @param {*} [options] Override http request option.
|
|
1162
|
-
* @throws {RequiredError}
|
|
1163
|
-
* @memberof DefaultApi
|
|
1164
|
-
*/
|
|
1165
|
-
signIn(signInRequest, options) {
|
|
1166
|
-
return DefaultApiFp(this.configuration).signIn(signInRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1167
|
-
}
|
|
1168
|
-
/**
|
|
1169
|
-
* Lấy thông tin hóa đơn dưới định dạng sẵn sàng để in.
|
|
1170
|
-
* @summary API xem in hóa đơn
|
|
1171
|
-
* @param {string} id id hóa đơn.
|
|
1172
|
-
* @param {string} stax mã số thuế bên bán
|
|
1173
|
-
* @param {*} [options] Override http request option.
|
|
1174
|
-
* @throws {RequiredError}
|
|
1175
|
-
* @memberof DefaultApi
|
|
1176
|
-
*/
|
|
1177
|
-
viewPrintInvoice(id, stax, template_code, options) {
|
|
1178
|
-
return DefaultApiFp(this.configuration).viewPrintInvoice(id, stax, template_code, options).then((request) => request(this.axios, this.basePath));
|
|
1179
|
-
}
|
|
1180
|
-
/**
|
|
1181
|
-
* 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.
|
|
1182
|
-
* @summary API lấy thông tin mã số thuế
|
|
1183
|
-
* @param {string} tax Mã số thuế cần tra cứu
|
|
1184
|
-
* @param {*} [options] Override http request option.
|
|
1185
|
-
* @throws {RequiredError}
|
|
1186
|
-
* @memberof DefaultApi
|
|
1187
|
-
*/
|
|
1188
|
-
taxInfo(tax, options) {
|
|
1189
|
-
return DefaultApiFp(this.configuration).taxInfo(tax, options).then((request) => request(this.axios, this.basePath));
|
|
1190
|
-
}
|
|
1191
|
-
/**
|
|
1192
|
-
* Single Sign-On login for merchants using provider and tax code.
|
|
1193
|
-
* @summary API merchant SSO login
|
|
1194
|
-
* @param {SignInSSORequest} signInSSORequest
|
|
1195
|
-
* @param {*} [options] Override http request option.
|
|
1196
|
-
* @throws {RequiredError}
|
|
1197
|
-
* @memberof DefaultApi
|
|
1198
|
-
*/
|
|
1199
|
-
signInSSO(signInSSORequest, options) {
|
|
1200
|
-
return DefaultApiFp(this.configuration).signInSSO(signInSSORequest, options).then((request) => request(this.axios, this.basePath));
|
|
1201
|
-
}
|
|
1202
|
-
/**
|
|
1203
|
-
* Single Sign-On logout for merchants using provider and tax code.
|
|
1204
|
-
* @summary API merchant SSO logout
|
|
1205
|
-
* @param {*} [options] Override http request option.
|
|
1206
|
-
* @throws {RequiredError}
|
|
1207
|
-
* @memberof DefaultApi
|
|
1208
|
-
*/
|
|
1209
|
-
signOutSSO(options) {
|
|
1210
|
-
return DefaultApiFp(this.configuration).signOutSSO(options).then((request) => request(this.axios, this.basePath));
|
|
1211
|
-
}
|
|
1212
|
-
/**
|
|
1213
|
-
* Check authentication status for merchants using provider and tax code.
|
|
1214
|
-
* @summary API check auth
|
|
1215
|
-
* @param {*} [options] Override http request option.
|
|
1216
|
-
* @throws {RequiredError}
|
|
1217
|
-
* @memberof DefaultApi
|
|
1218
|
-
*/
|
|
1219
|
-
checkAuth(options) {
|
|
1220
|
-
return DefaultApiFp(this.configuration).checkAuth(options).then((request) => request(this.axios, this.basePath));
|
|
1221
|
-
}
|
|
1222
|
-
/**
|
|
1223
|
-
* Check customer declaration status with filtering options.
|
|
1224
|
-
* @summary API check customer declaration status
|
|
1225
|
-
* @param {CheckCustomerDeclarationStatusRequest} params
|
|
1226
|
-
* @param {*} [options] Override http request option.
|
|
1227
|
-
* @throws {RequiredError}
|
|
1228
|
-
* @memberof DefaultApi
|
|
1229
|
-
*/
|
|
1230
|
-
checkCustomerDeclarationStatus(params, options) {
|
|
1231
|
-
return DefaultApiFp(this.configuration).checkCustomerDeclarationStatus(params, options).then((request) => request(this.axios, this.basePath));
|
|
1232
|
-
}
|
|
1233
|
-
/**
|
|
1234
|
-
* Check authentication status for merchants using provider and tax code.
|
|
1235
|
-
* @summary API check auth
|
|
1236
|
-
* @param {number} [invType]
|
|
1237
|
-
* @param {*} [options] Override http request option.
|
|
1238
|
-
* @throws {RequiredError}
|
|
1239
|
-
* @memberof DefaultApi
|
|
1240
|
-
*/
|
|
1241
|
-
getInvoiceSerials(params, options) {
|
|
1242
|
-
return DefaultApiFp(this.configuration).getInvoiceSerials(params, options).then((request) => request(this.axios, this.basePath));
|
|
1243
|
-
}
|
|
1244
|
-
}
|
|
1245
1093
|
const InvoiceApi = function(configuration, basePath, axios) {
|
|
1246
1094
|
const localVarFp = DefaultApiFp(configuration);
|
|
1247
1095
|
return {
|
|
@@ -1326,7 +1174,6 @@ const InvoiceApi = function(configuration, basePath, axios) {
|
|
|
1326
1174
|
};
|
|
1327
1175
|
export {
|
|
1328
1176
|
Configuration,
|
|
1329
|
-
DefaultApi,
|
|
1330
1177
|
DefaultApiAxiosParamCreator,
|
|
1331
1178
|
DefaultApiFp,
|
|
1332
1179
|
InvoiceApi,
|