@atomsolution/invoice-sdk-api 1.26.1 → 1.28.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/dist/api.d.ts CHANGED
@@ -252,6 +252,26 @@ export interface CreateInvoiceRequestInv {
252
252
  * @memberof CreateInvoiceRequestInv
253
253
  */
254
254
  type?: string;
255
+ /**
256
+ * Xác định có gửi mail khi hóa đơn phát hành có hiệu lực hay không:
257
+ * - true: Gửi mail khi hóa đơn phát hành có hiệu lực
258
+ * - false: không gửi mail khi hóa đơn phát hành có hiệu lực
259
+ * @type {boolean}
260
+ * @memberof CreateInvoiceRequestInv
261
+ */
262
+ is_send_mail?: boolean;
263
+ /**
264
+ * Tên người nhận
265
+ * @type {string}
266
+ * @memberof CreateInvoiceRequestInv
267
+ */
268
+ receiver_name?: string;
269
+ /**
270
+ * Email người nhận
271
+ * @type {string}
272
+ * @memberof CreateInvoiceRequestInv
273
+ */
274
+ receiver_email?: string;
255
275
  /**
256
276
  *
257
277
  * @type {Array<CreateInvoiceItem>}
@@ -434,7 +454,31 @@ export interface GetInvoiceRequest {
434
454
  * @type {string}
435
455
  * @memberof GetInvoiceRequest
436
456
  */
437
- stax: string;
457
+ stax?: string;
458
+ /**
459
+ * Ngày bắt đầu lọc hóa đơn (định dạng yyyy-MM-dd)
460
+ * @type {string}
461
+ * @memberof GetInvoiceRequest
462
+ */
463
+ from_date?: string;
464
+ /**
465
+ * Ngày kết thúc lọc hóa đơn (định dạng yyyy-MM-dd)
466
+ * @type {string}
467
+ * @memberof GetInvoiceRequest
468
+ */
469
+ to_date?: string;
470
+ /**
471
+ * Số dòng cần lấy
472
+ * @type {number}
473
+ * @memberof GetInvoiceRequest
474
+ */
475
+ start?: number;
476
+ /**
477
+ * Vị trí bắt đầu lấy
478
+ * @type {number}
479
+ * @memberof GetInvoiceRequest
480
+ */
481
+ count?: number;
438
482
  }
439
483
  /**
440
484
  *
@@ -504,6 +548,24 @@ export interface GetInvoicesRequest {
504
548
  * @memberof GetInvoicesRequest
505
549
  */
506
550
  to_date?: string;
551
+ /**
552
+ * Số dòng cần lấy
553
+ * @type {number}
554
+ * @memberof GetInvoiceRequest
555
+ */
556
+ start?: number;
557
+ /**
558
+ * Vị trí bắt đầu lấy
559
+ * @type {number}
560
+ * @memberof GetInvoiceRequest
561
+ */
562
+ count?: number;
563
+ /**
564
+ * Mã số thuế của người bán
565
+ * @type {string}
566
+ * @memberof GetInvoiceRequest
567
+ */
568
+ stax?: string;
507
569
  }
508
570
  /**
509
571
  *
@@ -582,14 +644,6 @@ export interface SignContractRequest {
582
644
  * @interface SignContractRequestInv
583
645
  */
584
646
  export interface SignContractRequestInv {
585
- /**
586
- * Sid hóa đơn. Bắt buộc nếu không truyền form-serial-seq
587
- * - M-Invoice -> hoadon68_id
588
- * - FPT -> inv.sid
589
- * @type {string}
590
- * @memberof SignContractRequestInv
591
- */
592
- sid?: string;
593
647
  /**
594
648
  * Ký hiệu hóa đơn. Bắt buộc nếu không truyền sid
595
649
  * FPT Only
@@ -609,6 +663,14 @@ export interface SignContractRequestInv {
609
663
  * @memberof SignContractRequestInv
610
664
  */
611
665
  stax: string;
666
+ /**
667
+ * Xác định đính kèm file (PDF, XML) khi gửi mail:
668
+ * - 1: Gửi mail có đính kèm file
669
+ * - Không có thẻ sendfile: mặc định gửi mail không đính kèm file
670
+ * @type {number}
671
+ * @memberof SignContractRequestInv
672
+ */
673
+ sendfile?: number;
612
674
  /**
613
675
  * Thẻ xác định KHÔNG gửi email:
614
676
  * - 1: KHÔNG tự động gửi email khi hóa đơn phát hành có hiệu lực
@@ -618,13 +680,17 @@ export interface SignContractRequestInv {
618
680
  */
619
681
  notsendmail?: number;
620
682
  /**
621
- * Xác định đính kèm file (PDF, XML) khi gửi mail:
622
- * - 1: Gửi mail có đính kèm file
623
- * - Không có thẻ sendfile: mặc định gửi mail không đính kèm file
624
- * @type {number}
683
+ * Ngày bắt đầu lọc hóa đơn (định dạng yyyy-MM-dd)
684
+ * @type {string}
625
685
  * @memberof SignContractRequestInv
626
686
  */
627
- sendfile?: number;
687
+ start_date?: string;
688
+ /**
689
+ * Ngày kết thúc lọc hóa đơn (định dạng yyyy-MM-dd)
690
+ * @type {string}
691
+ * @memberof SignContractRequestInv
692
+ */
693
+ end_date?: string;
628
694
  }
629
695
  /**
630
696
  *
@@ -972,6 +1038,12 @@ export interface GetInvoiceSerialsRequest {
972
1038
  * @memberof GetInvoiceSerialsRequest
973
1039
  */
974
1040
  inv_type: string;
1041
+ /**
1042
+ * Mã số thuế bên bán
1043
+ * @type {string}
1044
+ * @memberof GetInvoiceSerialsRequest
1045
+ */
1046
+ stax?: string;
975
1047
  }
976
1048
  /**
977
1049
  *
@@ -1032,20 +1104,15 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
1032
1104
  * @param {*} [options] Override http request option.
1033
1105
  * @throws {RequiredError}
1034
1106
  */
1035
- getInvoice: (id: string, stax?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1107
+ getInvoice: (params: GetInvoiceRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1036
1108
  /**
1037
1109
  * Lấy danh sách tất cả hóa đơn dựa trên bộ lọc được cung cấp.
1038
1110
  * @summary API lấy danh sách hóa đơn
1039
- * @param {string} fromDate Ngày bắt đầu lọc hóa đơn (định dạng yyyy-MM-dd)
1040
- * @param {string} toDate Ngày kết thúc lọc hóa đơn (định dạng yyyy-MM-dd)
1041
- * @param {string} stax mã số thuế bên bán
1042
- * @param {number} [start] Vị trí bắt đầu của danh sách hóa đơn (phân trang)
1043
- * @param {number} [count] Số lượng hóa đơn cần lấy (phân trang)
1044
- * @param {string} [serial] Ký hiệu hóa đơn để lọc
1111
+ * @param {GetInvoicesRequest} params
1045
1112
  * @param {*} [options] Override http request option.
1046
1113
  * @throws {RequiredError}
1047
1114
  */
1048
- getInvoices: (fromDate: string, toDate: string, stax?: string, start?: number, count?: number, serial?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1115
+ getInvoices: (params: GetInvoicesRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1049
1116
  /**
1050
1117
  * Ký hợp đồng điện tử với thông tin hợp đồng được cung cấp.
1051
1118
  * @summary API ký hóa đơn
@@ -1070,7 +1137,7 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
1070
1137
  * @param {*} [options] Override http request option.
1071
1138
  * @throws {RequiredError}
1072
1139
  */
1073
- viewPrintInvoice: (id: string, stax?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1140
+ viewPrintInvoice: (id: string, stax?: string, template_code?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1074
1141
  /**
1075
1142
  * 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.
1076
1143
  * @summary API lấy thông tin mã số thuế
@@ -1146,7 +1213,7 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
1146
1213
  * @param {*} [options] Override http request option.
1147
1214
  * @throws {RequiredError}
1148
1215
  */
1149
- getInvoice(id: string, stax?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetInvoiceResponse>>;
1216
+ getInvoice(params: GetInvoiceRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetInvoiceResponse>>;
1150
1217
  /**
1151
1218
  * Lấy danh sách tất cả hóa đơn dựa trên bộ lọc được cung cấp.
1152
1219
  * @summary API lấy danh sách hóa đơn
@@ -1159,7 +1226,7 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
1159
1226
  * @param {*} [options] Override http request option.
1160
1227
  * @throws {RequiredError}
1161
1228
  */
1162
- getInvoices(fromDate: string, toDate: string, stax?: string, start?: number, count?: number, serial?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetInvoicesSuccess>>;
1229
+ getInvoices(params: GetInvoicesRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetInvoicesSuccess>>;
1163
1230
  /**
1164
1231
  * Ký hợp đồng điện tử với thông tin hợp đồng được cung cấp.
1165
1232
  * @summary API ký hóa đơn
@@ -1184,7 +1251,7 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
1184
1251
  * @param {*} [options] Override http request option.
1185
1252
  * @throws {RequiredError}
1186
1253
  */
1187
- viewPrintInvoice(id: string, stax?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ViewPrintInvoiceResponse>>;
1254
+ viewPrintInvoice(id: string, stax?: string, template_code?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ViewPrintInvoiceResponse>>;
1188
1255
  /**
1189
1256
  * 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.
1190
1257
  * @summary API lấy thông tin mã số thuế
@@ -1264,7 +1331,7 @@ export declare class DefaultApi extends BaseAPI {
1264
1331
  * @throws {RequiredError}
1265
1332
  * @memberof DefaultApi
1266
1333
  */
1267
- getInvoice(id: string, stax?: string, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<GetInvoiceResponse, any>>;
1334
+ getInvoice(params: GetInvoiceRequest, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<GetInvoiceResponse, any>>;
1268
1335
  /**
1269
1336
  * Lấy danh sách tất cả hóa đơn dựa trên bộ lọc được cung cấp.
1270
1337
  * @summary API lấy danh sách hóa đơn
@@ -1278,7 +1345,7 @@ export declare class DefaultApi extends BaseAPI {
1278
1345
  * @throws {RequiredError}
1279
1346
  * @memberof DefaultApi
1280
1347
  */
1281
- getInvoices(fromDate: string, toDate: string, stax?: string, start?: number, count?: number, serial?: string, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<GetInvoicesSuccess, any>>;
1348
+ getInvoices(params: GetInvoicesRequest, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<GetInvoicesSuccess, any>>;
1282
1349
  /**
1283
1350
  * Ký hợp đồng điện tử với thông tin hợp đồng được cung cấp.
1284
1351
  * @summary API ký hóa đơn
@@ -1306,7 +1373,7 @@ export declare class DefaultApi extends BaseAPI {
1306
1373
  * @throws {RequiredError}
1307
1374
  * @memberof DefaultApi
1308
1375
  */
1309
- viewPrintInvoice(id: string, stax?: string, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<ViewPrintInvoiceResponse, any>>;
1376
+ viewPrintInvoice(id: string, stax?: string, template_code?: string, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<ViewPrintInvoiceResponse, any>>;
1310
1377
  /**
1311
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.
1312
1379
  * @summary API lấy thông tin mã số thuế
@@ -1344,14 +1411,7 @@ export declare class DefaultApi extends BaseAPI {
1344
1411
  /**
1345
1412
  * Check customer declaration status with filtering options.
1346
1413
  * @summary API check customer declaration status
1347
- * @param {string} provider Provider identifier (required)
1348
- * @param {string} taxCode Tax code for merchant (required)
1349
- * @param {number} [maxResultCount] Tổng số bản ghi muốn lấy
1350
- * @param {string} [sorting] Sắp xếp theo trường (tên trường)
1351
- * @param {string} [sortType] Kiểu sắp xếp (DESCEND: Giảm dần, ASCEND: Tăng dần)
1352
- * @param {string} [fromDate] Ngày lập từ ngày (2025-06-23T00:00:00)
1353
- * @param {string} [toDate] Ngày lập đến ngày (2025-06-23T00:00:00)
1354
- * @param {number} [taxAuthorityFeedback] Phản hồi của CQT (1: Tiếp nhận, 2: Không tiếp nhận, 3: Chập nhận, 4: Không chấp nhận)
1414
+ * @param {CheckCustomerDeclarationStatusRequest} params
1355
1415
  * @param {*} [options] Override http request option.
1356
1416
  * @throws {RequiredError}
1357
1417
  * @memberof DefaultApi
@@ -1381,21 +1441,11 @@ export declare const InvoiceApi: (configuration?: Configuration, basePath?: stri
1381
1441
  /**
1382
1442
  * Get Invoice (Unified)
1383
1443
  */
1384
- getInvoice(params: {
1385
- id: string;
1386
- stax?: string;
1387
- }, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<GetInvoiceResponse, any>>;
1444
+ getInvoice(params: GetInvoiceRequest, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<GetInvoiceResponse, any>>;
1388
1445
  /**
1389
1446
  * Get Invoices (Unified)
1390
1447
  */
1391
- getInvoices(params: {
1392
- fromDate: string;
1393
- toDate: string;
1394
- stax?: string;
1395
- start?: number;
1396
- count?: number;
1397
- serial?: string;
1398
- }, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<GetInvoicesSuccess, any>>;
1448
+ getInvoices(params: GetInvoicesRequest, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<GetInvoicesSuccess, any>>;
1399
1449
  /**
1400
1450
  * Sign Contract (Unified)
1401
1451
  */
@@ -1410,6 +1460,7 @@ export declare const InvoiceApi: (configuration?: Configuration, basePath?: stri
1410
1460
  viewPrintInvoice(params: {
1411
1461
  id: string;
1412
1462
  stax?: string;
1463
+ template_code?: string;
1413
1464
  }, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<ViewPrintInvoiceResponse, any>>;
1414
1465
  /**
1415
1466
  * Tax Info (Unified)
package/dist/auth.d.ts CHANGED
@@ -11,7 +11,7 @@ export declare const PROVIDERS: IProvider[];
11
11
  * Returns a list of available providers
12
12
  * @returns {IProvider[]}
13
13
  */
14
- export declare function getListProviders(bank: string, mode: string): Promise<IProvider[]>;
14
+ export declare function getListProviders(mode: string, bank: string): Promise<IProvider[]>;
15
15
  /**
16
16
  * Save one provider info (encrypted)
17
17
  */
@@ -1,7 +1,8 @@
1
1
  export declare enum Provider {
2
2
  MInvoice = "m-invoice",
3
3
  FPT = "fpt",
4
- MISA = "misa"
4
+ MISA = "misa",
5
+ Viettel = "viettel"
5
6
  }
6
7
  export interface ConfigurationParameters {
7
8
  clientId?: string;