gap-nodejs-sdk 1.0.438 → 1.0.440
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.
|
@@ -38,7 +38,7 @@ export default class SMS extends Base {
|
|
|
38
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
39
|
const response = yield this.client.post({
|
|
40
40
|
path: sms.SEND_SMS_VERIFY,
|
|
41
|
-
|
|
41
|
+
data: data
|
|
42
42
|
});
|
|
43
43
|
return Model.SendSMSVerifyModel((_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data);
|
|
44
44
|
});
|
|
@@ -48,7 +48,7 @@ export default class SMS extends Base {
|
|
|
48
48
|
return __awaiter(this, void 0, void 0, function* () {
|
|
49
49
|
const response = yield this.client.post({
|
|
50
50
|
path: sms.SUBMIT_VERIFY_CODE,
|
|
51
|
-
|
|
51
|
+
data: data
|
|
52
52
|
});
|
|
53
53
|
return Model.SubmitVerifyCodeModel((_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data);
|
|
54
54
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gift_card.d.ts","sourceRoot":"","sources":["../../../../../src/api/pos_client_api/1.0.0/api/gift_card.ts"],"names":[],"mappings":"AACA,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,IAAI,MAAM,uBAAuB,CAAC;AACzC,OAAO,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAG9C,OAAO,EAAC,oBAAoB,EAAC,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"gift_card.d.ts","sourceRoot":"","sources":["../../../../../src/api/pos_client_api/1.0.0/api/gift_card.ts"],"names":[],"mappings":"AACA,OAAO,qBAAqB,MAAM,yBAAy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
|
import { objectToFormData } from "../../../../utils/form-data";
|
|
8
|
+
import fileDownload from "js-file-download";
|
|
9
|
+
import { formatExportDateString } from "../../../../utils/date-time";
|
|
10
|
+
import dayjs from "dayjs";
|
|
8
11
|
export default class GiftCard extends Base {
|
|
9
12
|
static getCheckGiftCard(data) {
|
|
10
13
|
var _a;
|
|
@@ -68,13 +71,15 @@ export default class GiftCard extends Base {
|
|
|
68
71
|
});
|
|
69
72
|
}
|
|
70
73
|
static fileImportGiftCard(data) {
|
|
71
|
-
var _a;
|
|
72
74
|
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
-
const response = yield this.client.
|
|
75
|
+
const response = yield this.client.get({
|
|
74
76
|
path: gift_card.FILE_IMPORT_GIFT_CARD,
|
|
75
|
-
|
|
77
|
+
query: data,
|
|
78
|
+
responseType: "blob"
|
|
76
79
|
});
|
|
77
|
-
|
|
80
|
+
let dateFormat = formatExportDateString();
|
|
81
|
+
fileDownload(response, `download-template-${dayjs().format(dateFormat)}.xls`);
|
|
82
|
+
return null;
|
|
78
83
|
});
|
|
79
84
|
}
|
|
80
85
|
static getGiftCardDetail(data) {
|