@mivis/petmart-api 1.2.77 → 1.2.79
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/package.json +1 -1
- package/type.d.ts +26 -10
package/package.json
CHANGED
package/type.d.ts
CHANGED
|
@@ -303,7 +303,7 @@ declare namespace Components {
|
|
|
303
303
|
_id: string;
|
|
304
304
|
name: string;
|
|
305
305
|
};
|
|
306
|
-
seller_id
|
|
306
|
+
seller_id?: {
|
|
307
307
|
_id: string;
|
|
308
308
|
shop_details: IShopDetails;
|
|
309
309
|
delivery_ways: IDeliveryWays;
|
|
@@ -641,7 +641,8 @@ declare namespace Components {
|
|
|
641
641
|
|
|
642
642
|
export interface IAdminChangeOrderStatus {
|
|
643
643
|
orderId: string;
|
|
644
|
-
status: EOrderStatus
|
|
644
|
+
status: EOrderStatus;
|
|
645
|
+
reason_of_cancel?: string;
|
|
645
646
|
}
|
|
646
647
|
|
|
647
648
|
export interface IAdminOrdersQueryRequest extends FilterBaseQuery {
|
|
@@ -649,9 +650,20 @@ declare namespace Components {
|
|
|
649
650
|
from?: string;
|
|
650
651
|
to?: string;
|
|
651
652
|
number?: string;
|
|
653
|
+
sum?: 'asc' | 'desc';
|
|
654
|
+
status?: EOrderStatus;
|
|
655
|
+
full_name?: string;
|
|
652
656
|
seller_id?: string;
|
|
653
657
|
}
|
|
654
658
|
|
|
659
|
+
export interface IPopulatedOrderSeller {
|
|
660
|
+
seller_id: Pick<ISeller, '_id' | 'shop_details'>;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
export interface IPopulatedOrderUser {
|
|
664
|
+
user_id: Pick<IUser, '_id' | 'name'>;
|
|
665
|
+
}
|
|
666
|
+
|
|
655
667
|
export interface IPopulatedOrderItem
|
|
656
668
|
extends Omit<IOrderItem, 'product_id'> {
|
|
657
669
|
product_id: Pick<
|
|
@@ -660,8 +672,13 @@ declare namespace Components {
|
|
|
660
672
|
>;
|
|
661
673
|
}
|
|
662
674
|
|
|
663
|
-
export type IPopulatedOrder = Omit<
|
|
675
|
+
export type IPopulatedOrder = Omit<
|
|
676
|
+
IOrder,
|
|
677
|
+
'items' | 'seller_id' | 'user_id'
|
|
678
|
+
> & {
|
|
664
679
|
items: IPopulatedOrderItem[];
|
|
680
|
+
seller_id: IPopulatedOrderSeller;
|
|
681
|
+
user_id: IPopulatedOrderUser;
|
|
665
682
|
};
|
|
666
683
|
|
|
667
684
|
export interface IAdminGetOrderResponse {
|
|
@@ -680,14 +697,11 @@ declare namespace Components {
|
|
|
680
697
|
>;
|
|
681
698
|
|
|
682
699
|
export enum EOrderStatus {
|
|
683
|
-
DELIVERED = 'DELIVERED',
|
|
684
|
-
IN_DELIVERY = 'IN_DELIVERY',
|
|
685
700
|
ON_CONFIRMATION = 'ON_CONFIRMATION',
|
|
686
701
|
CONFIRMED_BY_SELLER = 'CONFIRMED_BY_SELLER',
|
|
687
|
-
|
|
702
|
+
IN_DELIVERY = 'IN_DELIVERY',
|
|
703
|
+
FINISHED = 'FINISHED',
|
|
688
704
|
CANCELED = 'CANCELED',
|
|
689
|
-
REFUSING = 'REFUSING',
|
|
690
|
-
DELETED = 'DELETED',
|
|
691
705
|
}
|
|
692
706
|
|
|
693
707
|
export interface IDeliveryAddress extends OrderAddress {
|
|
@@ -848,11 +862,12 @@ declare namespace Components {
|
|
|
848
862
|
}
|
|
849
863
|
|
|
850
864
|
export interface IOrder {
|
|
865
|
+
_id: string;
|
|
851
866
|
sum: number;
|
|
852
867
|
weight: number;
|
|
853
|
-
user_id
|
|
868
|
+
user_id?: string;
|
|
854
869
|
items: IOrderItem[];
|
|
855
|
-
seller_id
|
|
870
|
+
seller_id?: string;
|
|
856
871
|
receive_method: ERecieveMethod;
|
|
857
872
|
delivery_info?: Partial<IDeliveryFullInfo>;
|
|
858
873
|
shop_id?: string;
|
|
@@ -860,6 +875,7 @@ declare namespace Components {
|
|
|
860
875
|
status?: EOrderStatus;
|
|
861
876
|
preparation_date?: Date;
|
|
862
877
|
note?: string;
|
|
878
|
+
reason_of_cancel?: string;
|
|
863
879
|
number?: number;
|
|
864
880
|
createdAt: Date;
|
|
865
881
|
updatedAt: Date;
|