@mivis/petmart-api 1.2.71 → 1.2.73
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 +52 -17
package/package.json
CHANGED
package/type.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
declare namespace Components {
|
|
2
2
|
namespace Schemas {
|
|
3
|
+
export interface FilterBaseQuery {
|
|
4
|
+
skip: string;
|
|
5
|
+
limit: string;
|
|
6
|
+
}
|
|
3
7
|
export interface ITokensResponse {
|
|
4
8
|
access_token: string;
|
|
5
9
|
refresh_token: string;
|
|
@@ -134,9 +138,7 @@ declare namespace Components {
|
|
|
134
138
|
count: number;
|
|
135
139
|
}
|
|
136
140
|
|
|
137
|
-
export interface IAdminUsersQueryRequest {
|
|
138
|
-
skip: string;
|
|
139
|
-
limit: string;
|
|
141
|
+
export interface IAdminUsersQueryRequest extends FilterBaseQuery {
|
|
140
142
|
tel?: string;
|
|
141
143
|
name?: string;
|
|
142
144
|
email?: string;
|
|
@@ -256,9 +258,7 @@ declare namespace Components {
|
|
|
256
258
|
updatedAt: Date;
|
|
257
259
|
}
|
|
258
260
|
|
|
259
|
-
export interface IProductQueryRequest {
|
|
260
|
-
skip: string;
|
|
261
|
-
limit: string;
|
|
261
|
+
export interface IProductQueryRequest extends FilterBaseQuery {
|
|
262
262
|
category_id?: string;
|
|
263
263
|
subCategory_id?: string;
|
|
264
264
|
seller_id?: string;
|
|
@@ -267,9 +267,7 @@ declare namespace Components {
|
|
|
267
267
|
all_fields?: string;
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
-
export interface IUserProductQueryRequest {
|
|
271
|
-
skip: string;
|
|
272
|
-
limit: string;
|
|
270
|
+
export interface IUserProductQueryRequest extends FilterBaseQuery {
|
|
273
271
|
subCategory_id?: string;
|
|
274
272
|
seller_id?: string;
|
|
275
273
|
name?: string;
|
|
@@ -549,9 +547,7 @@ declare namespace Components {
|
|
|
549
547
|
name?: string;
|
|
550
548
|
}
|
|
551
549
|
|
|
552
|
-
export interface IAdminSellersQueryRequest {
|
|
553
|
-
skip: string;
|
|
554
|
-
limit: string;
|
|
550
|
+
export interface IAdminSellersQueryRequest extends FilterBaseQuery {
|
|
555
551
|
number?: string;
|
|
556
552
|
name?: string;
|
|
557
553
|
shop_name?: string;
|
|
@@ -609,8 +605,8 @@ declare namespace Components {
|
|
|
609
605
|
export interface ICreateSellerShopRequest {
|
|
610
606
|
seller_id: string;
|
|
611
607
|
name: string;
|
|
612
|
-
address:
|
|
613
|
-
|
|
608
|
+
address: {
|
|
609
|
+
name: string;
|
|
614
610
|
lat: number;
|
|
615
611
|
lng: number;
|
|
616
612
|
};
|
|
@@ -620,6 +616,40 @@ declare namespace Components {
|
|
|
620
616
|
seller_id: string;
|
|
621
617
|
}
|
|
622
618
|
|
|
619
|
+
export interface IAdminChangeOrderStatus {
|
|
620
|
+
orderId: string;
|
|
621
|
+
status: EOrderStatus.CONFIRMED_BY_SELLER | EOrderStatus.CANCELED;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
export interface IAdminOrdersQueryRequest extends FilterBaseQuery {
|
|
625
|
+
name?: string;
|
|
626
|
+
from?: string;
|
|
627
|
+
to?: string;
|
|
628
|
+
number?: string;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
export interface IPopulatedOrderItem
|
|
632
|
+
extends Omit<IOrderItem, 'product_id'> {
|
|
633
|
+
product_id: Pick<
|
|
634
|
+
IProduct,
|
|
635
|
+
'_id' | 'name' | 'vendor_code' | 'photo' | 'discount'
|
|
636
|
+
>;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
export type IPopulatedOrder = Omit<IOrder, 'items'> & {
|
|
640
|
+
items: IPopulatedOrderItem[];
|
|
641
|
+
};
|
|
642
|
+
|
|
643
|
+
export interface IAdminGetOrderResponse {
|
|
644
|
+
order: IPopulatedOrder;
|
|
645
|
+
sellerCommission: number | null;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
export interface IAdminOrdersQueryResponse {
|
|
649
|
+
orders: IPopulatedOrder[];
|
|
650
|
+
count: number;
|
|
651
|
+
}
|
|
652
|
+
|
|
623
653
|
export type OrderAddress = Omit<
|
|
624
654
|
IAddress,
|
|
625
655
|
'user_id' | '_id' | 'createdAt' | 'updatedAt'
|
|
@@ -629,6 +659,7 @@ declare namespace Components {
|
|
|
629
659
|
DELIVERED = 'DELIVERED',
|
|
630
660
|
IN_DELIVERY = 'IN_DELIVERY',
|
|
631
661
|
ON_CONFIRMATION = 'ON_CONFIRMATION',
|
|
662
|
+
CONFIRMED_BY_SELLER = 'CONFIRMED_BY_SELLER',
|
|
632
663
|
PAID = 'PAID',
|
|
633
664
|
CANCELED = 'CANCELED',
|
|
634
665
|
REFUSING = 'REFUSING',
|
|
@@ -681,11 +712,17 @@ declare namespace Components {
|
|
|
681
712
|
PVZ = 'PVZ',
|
|
682
713
|
}
|
|
683
714
|
|
|
715
|
+
export enum EOrderItemsStatus {
|
|
716
|
+
AGREED = 'AGREED',
|
|
717
|
+
DENIED = 'DENIED',
|
|
718
|
+
}
|
|
719
|
+
|
|
684
720
|
export interface IOrderItem {
|
|
685
721
|
product_id: string;
|
|
686
722
|
count: number;
|
|
687
723
|
price: number;
|
|
688
724
|
dimension: IDimension;
|
|
725
|
+
items_status: EOrderItemsStatus;
|
|
689
726
|
}
|
|
690
727
|
|
|
691
728
|
export interface ICheckIsAlsoInStock {
|
|
@@ -895,10 +932,8 @@ declare namespace Components {
|
|
|
895
932
|
anonymity: boolean;
|
|
896
933
|
}
|
|
897
934
|
|
|
898
|
-
export interface IGetReviews {
|
|
935
|
+
export interface IGetReviews extends FilterBaseQuery {
|
|
899
936
|
id: string;
|
|
900
|
-
skip: string;
|
|
901
|
-
limit: string;
|
|
902
937
|
}
|
|
903
938
|
|
|
904
939
|
export interface IReviewResponse {
|