@longvansoftware/storefront-js-client 2.2.7-beta.4 → 2.2.7-beta.6
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.
|
@@ -92,12 +92,12 @@ exports.CHECK_VALID_VOUCHER = (0, graphql_tag_1.gql) `
|
|
|
92
92
|
query CheckValidVoucher(
|
|
93
93
|
$partyId: String
|
|
94
94
|
$customerId: String
|
|
95
|
-
$
|
|
95
|
+
$campaignActionId: String!
|
|
96
96
|
) {
|
|
97
97
|
checkValidVoucher(
|
|
98
98
|
checkValidVoucherRequest: {
|
|
99
99
|
customerId: $customerId
|
|
100
|
-
|
|
100
|
+
campaignActionId: $campaignActionId
|
|
101
101
|
}
|
|
102
102
|
partyId: $partyId
|
|
103
103
|
) {
|
|
@@ -9,9 +9,9 @@ export declare class CampaignService extends Service {
|
|
|
9
9
|
constructor(endpoint: string, orgId: string, storeId: string);
|
|
10
10
|
getCampaignActionActiveNow(customerId: string, campaignActionType: string): Promise<any>;
|
|
11
11
|
searchVouchers(campaignId: String, campaignActionId: String, campaignActionType: String, customerId: String, excludeExpired: Boolean, pageNumber: number, pageSize: number): Promise<any>;
|
|
12
|
-
checkValidVoucher(customerId: string,
|
|
12
|
+
checkValidVoucher(customerId: string, campaignActionId: string): Promise<any>;
|
|
13
13
|
getCampaignActiveNow(campaignActionType: string, customerId: string): Promise<any>;
|
|
14
14
|
getPromotionProductPrice(productId: String, productPrice: number): Promise<any>;
|
|
15
15
|
getVoucherAvailableForCustomer(campaignId: string, customerId: string, excludeExpired: Boolean): Promise<any>;
|
|
16
|
-
addCustomerIdIntoVoucher(
|
|
16
|
+
addCustomerIdIntoVoucher(customerId: string, voucherCode: string): Promise<any>;
|
|
17
17
|
}
|
|
@@ -66,13 +66,13 @@ class CampaignService extends serviceSDK_1.Service {
|
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
checkValidVoucher(customerId,
|
|
69
|
+
checkValidVoucher(customerId, campaignActionId) {
|
|
70
70
|
return __awaiter(this, void 0, void 0, function* () {
|
|
71
71
|
const query = queries_1.CHECK_VALID_VOUCHER;
|
|
72
72
|
const variables = {
|
|
73
73
|
partyId: this.orgId,
|
|
74
74
|
customerId,
|
|
75
|
-
|
|
75
|
+
campaignActionId,
|
|
76
76
|
};
|
|
77
77
|
try {
|
|
78
78
|
const response = yield this.graphqlQuery(query, variables);
|
|
@@ -139,7 +139,7 @@ class CampaignService extends serviceSDK_1.Service {
|
|
|
139
139
|
}
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
|
-
addCustomerIdIntoVoucher(
|
|
142
|
+
addCustomerIdIntoVoucher(customerId, voucherCode) {
|
|
143
143
|
return __awaiter(this, void 0, void 0, function* () {
|
|
144
144
|
const query = mutations_1.ADD_CUSTOMER_ID_INTO_VOUCHER;
|
|
145
145
|
const variables = {
|
|
@@ -459,4 +459,5 @@ export declare class OrderService extends Service {
|
|
|
459
459
|
enableProductDiary(orderId: string, orderItemId: string): Promise<any>;
|
|
460
460
|
removeMemberDiscount(orderId: string): Promise<any>;
|
|
461
461
|
getInfoChatApp(attributesName: string): Promise<any>;
|
|
462
|
+
getCustomerInfo(orderId: string): Promise<any>;
|
|
462
463
|
}
|
|
@@ -1343,5 +1343,18 @@ class OrderService extends serviceSDK_1.Service {
|
|
|
1343
1343
|
}
|
|
1344
1344
|
});
|
|
1345
1345
|
}
|
|
1346
|
+
getCustomerInfo(orderId) {
|
|
1347
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1348
|
+
const endpoint = `/front/orders/${this.orgId}/${this.storeId}/${orderId}/customerInfo`;
|
|
1349
|
+
const method = "GET";
|
|
1350
|
+
try {
|
|
1351
|
+
const response = yield this.restApiCallWithToken(endpoint, method);
|
|
1352
|
+
return response;
|
|
1353
|
+
}
|
|
1354
|
+
catch (error) {
|
|
1355
|
+
throw error;
|
|
1356
|
+
}
|
|
1357
|
+
});
|
|
1358
|
+
}
|
|
1346
1359
|
}
|
|
1347
1360
|
exports.OrderService = OrderService;
|