@longvansoftware/storefront-js-client 1.1.7 → 1.1.8
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.
- package/dist/src/lib/order/index.d.ts +62 -3
- package/dist/src/lib/order/index.js +128 -6
- package/package.json +1 -1
|
@@ -304,7 +304,7 @@ export declare class OrderService extends Service {
|
|
|
304
304
|
*/
|
|
305
305
|
updateListShippingCarrier(): Promise<any>;
|
|
306
306
|
/**
|
|
307
|
-
*
|
|
307
|
+
* Get list sell order
|
|
308
308
|
* @param orderId
|
|
309
309
|
* @param status
|
|
310
310
|
* @param statusIgnore
|
|
@@ -317,11 +317,70 @@ export declare class OrderService extends Service {
|
|
|
317
317
|
* @param productMultiValue
|
|
318
318
|
* @param customerId
|
|
319
319
|
* @param createdBy
|
|
320
|
+
* @param dateCreateFrom
|
|
320
321
|
* @param dateCreateTo
|
|
322
|
+
* @param dateUpdateFrom
|
|
323
|
+
* @param dateUpdateTo
|
|
324
|
+
* @param employeeAssign
|
|
325
|
+
* @param currentPage
|
|
326
|
+
* @param maxResult
|
|
327
|
+
* @returns A promise that resolves when the customer and shipping address are updated.
|
|
328
|
+
* @throws If an error occurs while updating the customer and shipping address.
|
|
329
|
+
*/
|
|
330
|
+
getListSellOrder(orderId: string, status: [number], statusIgnore: [number], subStatus: string, ffmStatus: string, subType: string, paymentMethod: string, keyword: string, customerMultiValue: string, productMultiValue: string, customerId: string, createdBy: string, dateCreateFrom: number, dateCreateTo: number, dateUpdateFrom: number, dateUpdateTo: number, employeeAssign: string, currentPage: 1, maxResult: 20): Promise<any>;
|
|
331
|
+
/**
|
|
332
|
+
* Get list sale order status
|
|
333
|
+
* @returns A promise that resolves when the customer and shipping address are updated.
|
|
334
|
+
* @throws If an error occurs while updating the customer and shipping address.
|
|
335
|
+
*/
|
|
336
|
+
getListSaleOrderStatus(): Promise<any>;
|
|
337
|
+
/**
|
|
338
|
+
* Get list return order
|
|
339
|
+
* @param orderId
|
|
340
|
+
* @param status
|
|
341
|
+
* @param statusIgnore
|
|
342
|
+
* @param subStatus
|
|
343
|
+
* @param ffmStatus
|
|
344
|
+
* @param subType
|
|
345
|
+
* @param paymentMethod
|
|
346
|
+
* @param keyword
|
|
347
|
+
* @param customerMultiValue
|
|
348
|
+
* @param productMultiValue
|
|
349
|
+
* @param customerId
|
|
350
|
+
* @param createdBy
|
|
321
351
|
* @param dateCreateFrom
|
|
322
|
-
* @param
|
|
352
|
+
* @param dateCreateTo
|
|
353
|
+
* @param dateUpdateFrom
|
|
354
|
+
* @param dateUpdateTo
|
|
355
|
+
* @param employeeAssign
|
|
356
|
+
* @param currentPage
|
|
357
|
+
* @param maxResult
|
|
358
|
+
* @returns A promise that resolves when the customer and shipping address are updated.
|
|
359
|
+
* @throws If an error occurs while updating the customer and shipping address.
|
|
360
|
+
*/
|
|
361
|
+
getListReturnorder(orderId: string, status: [number], statusIgnore: [number], subStatus: string, ffmStatus: string, subType: string, paymentMethod: string, keyword: string, customerMultiValue: string, productMultiValue: string, customerId: string, createdBy: string, dateCreateFrom: number, dateCreateTo: number, dateUpdateFrom: number, dateUpdateTo: number, employeeAssign: string, currentPage: 1, maxResult: 20): Promise<any>;
|
|
362
|
+
/**
|
|
363
|
+
* Get list sale order status
|
|
364
|
+
* @returns A promise that resolves when the customer and shipping address are updated.
|
|
365
|
+
* @throws If an error occurs while updating the customer and shipping address.
|
|
366
|
+
*/
|
|
367
|
+
getListReturnOrderStatus(): Promise<any>;
|
|
368
|
+
/**
|
|
369
|
+
* Get list sale order status
|
|
370
|
+
* @param storeId - The id of store
|
|
371
|
+
* @param orderId - The id of order
|
|
372
|
+
* @param updatedBy - Thi id of person update
|
|
373
|
+
* @returns A promise that resolves when the customer and shipping address are updated.
|
|
374
|
+
* @throws If an error occurs while updating the customer and shipping address.
|
|
375
|
+
*/
|
|
376
|
+
removeDraftOrder(storeId: string, orderId: string, updatedBy: string): Promise<any>;
|
|
377
|
+
/**
|
|
378
|
+
* Get list sale order status
|
|
379
|
+
* @param orderId - The id of order
|
|
380
|
+
* @param orderItemId - Thi id of item order
|
|
381
|
+
* @param reason - The reason of remove product in order
|
|
323
382
|
* @returns A promise that resolves when the customer and shipping address are updated.
|
|
324
383
|
* @throws If an error occurs while updating the customer and shipping address.
|
|
325
384
|
*/
|
|
326
|
-
|
|
385
|
+
removeProductInOrder(orderId: string, orderItemId: string): Promise<void>;
|
|
327
386
|
}
|
|
@@ -140,7 +140,7 @@ class OrderService extends service_1.Service {
|
|
|
140
140
|
*/
|
|
141
141
|
updateVAT(orderId, vatFee, vatType) {
|
|
142
142
|
return __awaiter(this, void 0, void 0, function* () {
|
|
143
|
-
const endpoint = `/
|
|
143
|
+
const endpoint = `/orders/${this.orgId}/${orderId}/vat?vat_fee=${vatFee}&vat_type=${vatType}`;
|
|
144
144
|
const method = "PUT";
|
|
145
145
|
try {
|
|
146
146
|
const response = yield this.restApiCallWithToken(endpoint, method);
|
|
@@ -193,7 +193,7 @@ class OrderService extends service_1.Service {
|
|
|
193
193
|
*/
|
|
194
194
|
addOrderLineItems(orderId, lineItems) {
|
|
195
195
|
return __awaiter(this, void 0, void 0, function* () {
|
|
196
|
-
const endpoint = `/
|
|
196
|
+
const endpoint = `/orders/${this.orgId}/${this.storeId}/${orderId}/orderLineItem`;
|
|
197
197
|
const method = "POST";
|
|
198
198
|
try {
|
|
199
199
|
const response = yield this.restApiCallWithToken(endpoint, method, lineItems);
|
|
@@ -782,7 +782,7 @@ class OrderService extends service_1.Service {
|
|
|
782
782
|
});
|
|
783
783
|
}
|
|
784
784
|
/**
|
|
785
|
-
*
|
|
785
|
+
* Get list sell order
|
|
786
786
|
* @param orderId
|
|
787
787
|
* @param status
|
|
788
788
|
* @param statusIgnore
|
|
@@ -795,16 +795,138 @@ class OrderService extends service_1.Service {
|
|
|
795
795
|
* @param productMultiValue
|
|
796
796
|
* @param customerId
|
|
797
797
|
* @param createdBy
|
|
798
|
+
* @param dateCreateFrom
|
|
798
799
|
* @param dateCreateTo
|
|
800
|
+
* @param dateUpdateFrom
|
|
801
|
+
* @param dateUpdateTo
|
|
802
|
+
* @param employeeAssign
|
|
803
|
+
* @param currentPage
|
|
804
|
+
* @param maxResult
|
|
805
|
+
* @returns A promise that resolves when the customer and shipping address are updated.
|
|
806
|
+
* @throws If an error occurs while updating the customer and shipping address.
|
|
807
|
+
*/
|
|
808
|
+
getListSellOrder(orderId, status, statusIgnore, subStatus, ffmStatus, subType, paymentMethod, keyword, customerMultiValue, productMultiValue, customerId, createdBy, dateCreateFrom, dateCreateTo, dateUpdateFrom, dateUpdateTo, employeeAssign, currentPage, maxResult) {
|
|
809
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
810
|
+
const endpoint = `/orders/${this.orgId}/${this.storeId}/sell_order?order_id=${orderId}&status=${status}&status_ignore=${statusIgnore}&sub_status=${subStatus}&ffm_status=${ffmStatus}&sub_type=${subType}&payment_method=${paymentMethod}&keyword=${keyword}&customer_multi_value=${customerMultiValue}&product_multi_value=${productMultiValue}&customer_id=${customerId}&created_by=${createdBy}&date_create_from=${dateCreateFrom}&date_create_to=${dateCreateTo}&date_update_from=${dateUpdateFrom}&date_update_to=${dateUpdateTo}&employee_assign=${employeeAssign}¤tPage=${currentPage}&maxResult=${maxResult}`;
|
|
811
|
+
const method = "GET";
|
|
812
|
+
try {
|
|
813
|
+
const response = yield this.restApiCallWithToken(endpoint, method);
|
|
814
|
+
return response;
|
|
815
|
+
}
|
|
816
|
+
catch (error) {
|
|
817
|
+
console.log(`Error in getListSellOrder: ${error}`);
|
|
818
|
+
throw error;
|
|
819
|
+
}
|
|
820
|
+
});
|
|
821
|
+
}
|
|
822
|
+
/**
|
|
823
|
+
* Get list sale order status
|
|
824
|
+
* @returns A promise that resolves when the customer and shipping address are updated.
|
|
825
|
+
* @throws If an error occurs while updating the customer and shipping address.
|
|
826
|
+
*/
|
|
827
|
+
getListSaleOrderStatus() {
|
|
828
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
829
|
+
const endpoint = `/orders/${this.orgId}/${this.storeId}/saleOrderStatus`;
|
|
830
|
+
const method = "GET";
|
|
831
|
+
try {
|
|
832
|
+
const response = yield this.restApiCallWithToken(endpoint, method);
|
|
833
|
+
return response;
|
|
834
|
+
}
|
|
835
|
+
catch (error) {
|
|
836
|
+
console.log(`Error in getListSaleOrderStatus:${error}`);
|
|
837
|
+
throw error;
|
|
838
|
+
}
|
|
839
|
+
});
|
|
840
|
+
}
|
|
841
|
+
/**
|
|
842
|
+
* Get list return order
|
|
843
|
+
* @param orderId
|
|
844
|
+
* @param status
|
|
845
|
+
* @param statusIgnore
|
|
846
|
+
* @param subStatus
|
|
847
|
+
* @param ffmStatus
|
|
848
|
+
* @param subType
|
|
849
|
+
* @param paymentMethod
|
|
850
|
+
* @param keyword
|
|
851
|
+
* @param customerMultiValue
|
|
852
|
+
* @param productMultiValue
|
|
853
|
+
* @param customerId
|
|
854
|
+
* @param createdBy
|
|
799
855
|
* @param dateCreateFrom
|
|
800
|
-
* @param
|
|
856
|
+
* @param dateCreateTo
|
|
857
|
+
* @param dateUpdateFrom
|
|
858
|
+
* @param dateUpdateTo
|
|
859
|
+
* @param employeeAssign
|
|
860
|
+
* @param currentPage
|
|
861
|
+
* @param maxResult
|
|
862
|
+
* @returns A promise that resolves when the customer and shipping address are updated.
|
|
863
|
+
* @throws If an error occurs while updating the customer and shipping address.
|
|
864
|
+
*/
|
|
865
|
+
getListReturnorder(orderId, status, statusIgnore, subStatus, ffmStatus, subType, paymentMethod, keyword, customerMultiValue, productMultiValue, customerId, createdBy, dateCreateFrom, dateCreateTo, dateUpdateFrom, dateUpdateTo, employeeAssign, currentPage, maxResult) {
|
|
866
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
867
|
+
const endpoint = `/orders/${this.orgId}/${this.storeId}/return_order?order_id=${orderId}&status=${status}&status_ignore=${statusIgnore}&sub_status=${subStatus}&ffm_status=${ffmStatus}&sub_type=${subType}&payment_method=${paymentMethod}&keyword=${keyword}&customer_multi_value=${customerMultiValue}&product_multi_value=${productMultiValue}&customer_id=${customerId}&created_by=${createdBy}&date_create_from=${dateCreateFrom}&date_create_to=${dateCreateTo}&date_update_from=${dateUpdateFrom}&date_update_to=${dateUpdateTo}&employee_assign=${employeeAssign}¤tPage=${currentPage}&maxResult=${maxResult}`;
|
|
868
|
+
const method = "GET";
|
|
869
|
+
try {
|
|
870
|
+
const response = yield this.restApiCallWithToken(endpoint, method);
|
|
871
|
+
return response;
|
|
872
|
+
}
|
|
873
|
+
catch (error) {
|
|
874
|
+
console.log(`Error in getListReturnorder: ${error}`);
|
|
875
|
+
throw error;
|
|
876
|
+
}
|
|
877
|
+
});
|
|
878
|
+
}
|
|
879
|
+
/**
|
|
880
|
+
* Get list sale order status
|
|
881
|
+
* @returns A promise that resolves when the customer and shipping address are updated.
|
|
882
|
+
* @throws If an error occurs while updating the customer and shipping address.
|
|
883
|
+
*/
|
|
884
|
+
getListReturnOrderStatus() {
|
|
885
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
886
|
+
const endpoint = `/orders/${this.orgId}/${this.storeId}/returnOrderStatus`;
|
|
887
|
+
const method = "GET";
|
|
888
|
+
try {
|
|
889
|
+
const response = yield this.restApiCallWithToken(endpoint, method);
|
|
890
|
+
return response;
|
|
891
|
+
}
|
|
892
|
+
catch (error) {
|
|
893
|
+
console.log(`Error in getListReturnOrderStatus: ${error}`);
|
|
894
|
+
throw error;
|
|
895
|
+
}
|
|
896
|
+
});
|
|
897
|
+
}
|
|
898
|
+
/**
|
|
899
|
+
* Get list sale order status
|
|
900
|
+
* @param storeId - The id of store
|
|
901
|
+
* @param orderId - The id of order
|
|
902
|
+
* @param updatedBy - Thi id of person update
|
|
801
903
|
* @returns A promise that resolves when the customer and shipping address are updated.
|
|
802
904
|
* @throws If an error occurs while updating the customer and shipping address.
|
|
803
905
|
*/
|
|
804
|
-
|
|
906
|
+
removeDraftOrder(storeId, orderId, updatedBy) {
|
|
805
907
|
return __awaiter(this, void 0, void 0, function* () {
|
|
806
|
-
const endpoint = `/orders/${this.orgId}/${
|
|
908
|
+
const endpoint = `/orders/${this.orgId}/${storeId}/${orderId}/draft?updated_by=${updatedBy}`;
|
|
909
|
+
const method = "GET";
|
|
910
|
+
try {
|
|
911
|
+
const response = yield this.restApiCallWithToken(endpoint, method);
|
|
912
|
+
return response;
|
|
913
|
+
}
|
|
914
|
+
catch (error) {
|
|
915
|
+
console.log(`Error in removeDraftOrder: ${error}`);
|
|
916
|
+
throw error;
|
|
917
|
+
}
|
|
807
918
|
});
|
|
808
919
|
}
|
|
920
|
+
/**
|
|
921
|
+
* Get list sale order status
|
|
922
|
+
* @param orderId - The id of order
|
|
923
|
+
* @param orderItemId - Thi id of item order
|
|
924
|
+
* @param reason - The reason of remove product in order
|
|
925
|
+
* @returns A promise that resolves when the customer and shipping address are updated.
|
|
926
|
+
* @throws If an error occurs while updating the customer and shipping address.
|
|
927
|
+
*/
|
|
928
|
+
removeProductInOrder(orderId, orderItemId) {
|
|
929
|
+
return __awaiter(this, void 0, void 0, function* () { });
|
|
930
|
+
}
|
|
809
931
|
}
|
|
810
932
|
exports.OrderService = OrderService;
|