@longvansoftware/storefront-js-client 3.1.9 → 3.2.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.
|
@@ -267,12 +267,16 @@ exports.SUGGEST_VOUCHER = (0, graphql_tag_1.gql) `
|
|
|
267
267
|
$partyId: String
|
|
268
268
|
$customerId: String
|
|
269
269
|
$excludeExpired: Boolean
|
|
270
|
+
$campaignId:String
|
|
271
|
+
$campaignActionId:String
|
|
270
272
|
) {
|
|
271
273
|
suggestVoucher(
|
|
272
274
|
searchVoucherRequest: {
|
|
273
275
|
partyId: $partyId
|
|
274
276
|
customerId: $customerId
|
|
275
277
|
excludeExpired: $excludeExpired
|
|
278
|
+
campaignId:$campaignId
|
|
279
|
+
campaignActionId:$campaignActionId
|
|
276
280
|
}
|
|
277
281
|
) {
|
|
278
282
|
total
|
|
@@ -14,7 +14,7 @@ export declare class CampaignService extends Service {
|
|
|
14
14
|
getPromotionProductPrice(productId: String, productPrice: number): Promise<any>;
|
|
15
15
|
getVoucherAvailableForCustomer(campaignId: string, campaignActionId: string, customerId: string, excludeExpired: Boolean, isPageAble: Boolean): Promise<any>;
|
|
16
16
|
addCustomerToVoucher(voucherCode: string, userId: string, affiliateId: string): Promise<any>;
|
|
17
|
-
suggestVoucher(customerId: string): Promise<any>;
|
|
17
|
+
suggestVoucher(customerId: string, campaignId: string, campaignActionId: string): Promise<any>;
|
|
18
18
|
getCampaignActionById(id: string): Promise<any>;
|
|
19
19
|
searchProductGiftPromotionResponse(productIds: string[], campaignActionId: string): Promise<any>;
|
|
20
20
|
}
|
|
@@ -160,12 +160,14 @@ class CampaignService extends serviceSDK_1.Service {
|
|
|
160
160
|
}
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
|
-
suggestVoucher(customerId) {
|
|
163
|
+
suggestVoucher(customerId, campaignId, campaignActionId) {
|
|
164
164
|
return __awaiter(this, void 0, void 0, function* () {
|
|
165
165
|
const query = queries_1.SUGGEST_VOUCHER;
|
|
166
166
|
const variables = {
|
|
167
167
|
partyId: this.orgId,
|
|
168
168
|
customerId: customerId,
|
|
169
|
+
campaignId: campaignId,
|
|
170
|
+
campaignActionId: campaignActionId,
|
|
169
171
|
excludeExpired: true,
|
|
170
172
|
};
|
|
171
173
|
try {
|