@longvansoftware/service-js-client 1.16.8 → 1.17.1
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
|
|
@@ -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 {
|
|
@@ -135,18 +137,44 @@ exports.GET_ORDER_DETAIL = (0, graphql_tag_1.gql) `
|
|
|
135
137
|
value
|
|
136
138
|
title
|
|
137
139
|
}
|
|
138
|
-
resourceItems {
|
|
139
|
-
name
|
|
140
|
-
quantity
|
|
141
|
-
unit
|
|
142
|
-
productId
|
|
143
|
-
}
|
|
144
140
|
resourceConfigs {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
141
|
+
name
|
|
142
|
+
quantity
|
|
143
|
+
unit
|
|
144
|
+
productId
|
|
145
|
+
giftProductId
|
|
146
|
+
gift
|
|
147
|
+
giftQuantity
|
|
148
|
+
campaignId
|
|
149
|
+
campaignActionId
|
|
150
|
+
qualify
|
|
151
|
+
idParent
|
|
152
|
+
addQuantity
|
|
153
|
+
defaultQuantity
|
|
154
|
+
title
|
|
155
|
+
price
|
|
156
|
+
unitPrice
|
|
157
|
+
totalResource
|
|
158
|
+
}
|
|
159
|
+
resourceItems {
|
|
160
|
+
name
|
|
161
|
+
quantity
|
|
162
|
+
unit
|
|
163
|
+
productId
|
|
164
|
+
giftProductId
|
|
165
|
+
gift
|
|
166
|
+
giftQuantity
|
|
167
|
+
campaignId
|
|
168
|
+
campaignActionId
|
|
169
|
+
qualify
|
|
170
|
+
idParent
|
|
171
|
+
addQuantity
|
|
172
|
+
defaultQuantity
|
|
173
|
+
title
|
|
174
|
+
price
|
|
175
|
+
unitPrice
|
|
176
|
+
totalResource
|
|
177
|
+
}
|
|
150
178
|
itemType
|
|
151
179
|
}
|
|
152
180
|
serviceId
|
|
@@ -181,6 +209,7 @@ exports.GET_QUANTITY_ORDER_LINEITEMS = (0, graphql_tag_1.gql) `
|
|
|
181
209
|
}
|
|
182
210
|
itemType
|
|
183
211
|
orderLineItemParentId
|
|
212
|
+
giftConditionProductId
|
|
184
213
|
}
|
|
185
214
|
}
|
|
186
215
|
}
|
|
@@ -240,6 +269,8 @@ exports.GET_ORDER_LINE_ITEM_BY_SERVICE_ID = (0, graphql_tag_1.gql) `
|
|
|
240
269
|
updatedStamp
|
|
241
270
|
completedAt
|
|
242
271
|
orderLineItemParentId
|
|
272
|
+
giftConditionProductId
|
|
273
|
+
giftQuantity
|
|
243
274
|
orderStatus
|
|
244
275
|
totalVAT {
|
|
245
276
|
amount
|
|
@@ -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;
|