@longvansoftware/service-js-client 1.16.9 → 1.17.2
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.
|
@@ -113,6 +113,8 @@ exports.GET_ORDER_DETAIL = (0, graphql_tag_1.gql) `
|
|
|
113
113
|
currencyCode
|
|
114
114
|
}
|
|
115
115
|
orderLineItemParentId
|
|
116
|
+
giftConditionProductId
|
|
117
|
+
giftQuantity
|
|
116
118
|
variant {
|
|
117
119
|
id
|
|
118
120
|
price {
|
|
@@ -207,6 +209,7 @@ exports.GET_QUANTITY_ORDER_LINEITEMS = (0, graphql_tag_1.gql) `
|
|
|
207
209
|
}
|
|
208
210
|
itemType
|
|
209
211
|
orderLineItemParentId
|
|
212
|
+
giftConditionProductId
|
|
210
213
|
}
|
|
211
214
|
}
|
|
212
215
|
}
|
|
@@ -266,6 +269,8 @@ exports.GET_ORDER_LINE_ITEM_BY_SERVICE_ID = (0, graphql_tag_1.gql) `
|
|
|
266
269
|
updatedStamp
|
|
267
270
|
completedAt
|
|
268
271
|
orderLineItemParentId
|
|
272
|
+
giftConditionProductId
|
|
273
|
+
giftQuantity
|
|
269
274
|
orderStatus
|
|
270
275
|
totalVAT {
|
|
271
276
|
amount
|
|
@@ -472,4 +472,5 @@ export declare class OrderService extends Service {
|
|
|
472
472
|
findCampaignActionGiftVoucher(): Promise<any>;
|
|
473
473
|
addProductGiftPromotion(orderId: string, updatedBy: string, data: any): Promise<any>;
|
|
474
474
|
removeProductGiftPromotion(orderId: string, orderLineItemId: string): Promise<any>;
|
|
475
|
+
checkNewCustomer(orderId: string, customer_id: string): Promise<any>;
|
|
475
476
|
}
|
|
@@ -1313,5 +1313,22 @@ class OrderService extends serviceSDK_1.Service {
|
|
|
1313
1313
|
}
|
|
1314
1314
|
});
|
|
1315
1315
|
}
|
|
1316
|
+
checkNewCustomer(orderId, customer_id) {
|
|
1317
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1318
|
+
console.log("🚀 ~ OrderService ~ removeProductGiftPromotion ~ orderLineItemId:", customer_id);
|
|
1319
|
+
console.log("🚀 ~ OrderService ~ removeProductGiftPromotion ~ orderId:", orderId);
|
|
1320
|
+
const endpoint = `/front/orders/${this.orgId}/${customer_id}/${orderId}/newCustomer`;
|
|
1321
|
+
const method = "GET";
|
|
1322
|
+
try {
|
|
1323
|
+
const response = yield this.restApiCallWithToken(endpoint, method);
|
|
1324
|
+
console.log(response);
|
|
1325
|
+
return response;
|
|
1326
|
+
}
|
|
1327
|
+
catch (error) {
|
|
1328
|
+
console.log(`Error in removeProductGiftPromotion: ${error}`);
|
|
1329
|
+
throw error;
|
|
1330
|
+
}
|
|
1331
|
+
});
|
|
1332
|
+
}
|
|
1316
1333
|
}
|
|
1317
1334
|
exports.OrderService = OrderService;
|