@longvansoftware/service-js-client 1.16.8 → 1.16.9
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.
|
@@ -257,9 +257,12 @@ exports.SEARCH_PRODUCT_GIFT_PROMOTION_RESPONSE = (0, graphql_tag_1.gql) `
|
|
|
257
257
|
productId
|
|
258
258
|
productParentId
|
|
259
259
|
quantityLimit
|
|
260
|
+
newCustomer
|
|
261
|
+
minimumSpend
|
|
260
262
|
giftPromotions {
|
|
261
263
|
fromQuantity
|
|
262
264
|
toProductId
|
|
265
|
+
toProductParentId
|
|
263
266
|
toQuantity
|
|
264
267
|
productName
|
|
265
268
|
sku
|
|
@@ -135,18 +135,44 @@ exports.GET_ORDER_DETAIL = (0, graphql_tag_1.gql) `
|
|
|
135
135
|
value
|
|
136
136
|
title
|
|
137
137
|
}
|
|
138
|
-
resourceItems {
|
|
139
|
-
name
|
|
140
|
-
quantity
|
|
141
|
-
unit
|
|
142
|
-
productId
|
|
143
|
-
}
|
|
144
138
|
resourceConfigs {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
139
|
+
name
|
|
140
|
+
quantity
|
|
141
|
+
unit
|
|
142
|
+
productId
|
|
143
|
+
giftProductId
|
|
144
|
+
gift
|
|
145
|
+
giftQuantity
|
|
146
|
+
campaignId
|
|
147
|
+
campaignActionId
|
|
148
|
+
qualify
|
|
149
|
+
idParent
|
|
150
|
+
addQuantity
|
|
151
|
+
defaultQuantity
|
|
152
|
+
title
|
|
153
|
+
price
|
|
154
|
+
unitPrice
|
|
155
|
+
totalResource
|
|
156
|
+
}
|
|
157
|
+
resourceItems {
|
|
158
|
+
name
|
|
159
|
+
quantity
|
|
160
|
+
unit
|
|
161
|
+
productId
|
|
162
|
+
giftProductId
|
|
163
|
+
gift
|
|
164
|
+
giftQuantity
|
|
165
|
+
campaignId
|
|
166
|
+
campaignActionId
|
|
167
|
+
qualify
|
|
168
|
+
idParent
|
|
169
|
+
addQuantity
|
|
170
|
+
defaultQuantity
|
|
171
|
+
title
|
|
172
|
+
price
|
|
173
|
+
unitPrice
|
|
174
|
+
totalResource
|
|
175
|
+
}
|
|
150
176
|
itemType
|
|
151
177
|
}
|
|
152
178
|
serviceId
|
|
@@ -471,4 +471,5 @@ export declare class OrderService extends Service {
|
|
|
471
471
|
addProductInOrderWithoutLogin(orderId: string, updated_by: string, data: any, store: string): Promise<any>;
|
|
472
472
|
findCampaignActionGiftVoucher(): Promise<any>;
|
|
473
473
|
addProductGiftPromotion(orderId: string, updatedBy: string, data: any): Promise<any>;
|
|
474
|
+
removeProductGiftPromotion(orderId: string, orderLineItemId: string): Promise<any>;
|
|
474
475
|
}
|
|
@@ -1295,5 +1295,23 @@ class OrderService extends serviceSDK_1.Service {
|
|
|
1295
1295
|
}
|
|
1296
1296
|
});
|
|
1297
1297
|
}
|
|
1298
|
+
// https://storefront.dev.longvan.vn/swagger-ui/index.html#/Order%20API/removeGiftQuantity
|
|
1299
|
+
removeProductGiftPromotion(orderId, orderLineItemId) {
|
|
1300
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1301
|
+
console.log("🚀 ~ OrderService ~ removeProductGiftPromotion ~ orderLineItemId:", orderLineItemId);
|
|
1302
|
+
console.log("🚀 ~ OrderService ~ removeProductGiftPromotion ~ orderId:", orderId);
|
|
1303
|
+
const endpoint = `/orders/${this.orgId}/${orderId}/${orderLineItemId}/giftQuantity`;
|
|
1304
|
+
const method = "PUT";
|
|
1305
|
+
try {
|
|
1306
|
+
const response = yield this.restApiCallWithToken(endpoint, method);
|
|
1307
|
+
console.log(response);
|
|
1308
|
+
return response;
|
|
1309
|
+
}
|
|
1310
|
+
catch (error) {
|
|
1311
|
+
console.log(`Error in removeProductGiftPromotion: ${error}`);
|
|
1312
|
+
throw error;
|
|
1313
|
+
}
|
|
1314
|
+
});
|
|
1315
|
+
}
|
|
1298
1316
|
}
|
|
1299
1317
|
exports.OrderService = OrderService;
|