@mivis/petmart-api 1.2.41 → 1.2.43
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 +93 -27
package/package.json
CHANGED
package/type.d.ts
CHANGED
|
@@ -120,7 +120,6 @@ declare namespace Components {
|
|
|
120
120
|
|
|
121
121
|
export interface IAddress {
|
|
122
122
|
_id: string;
|
|
123
|
-
user_id: string;
|
|
124
123
|
address: string;
|
|
125
124
|
floor: number;
|
|
126
125
|
intercom: number;
|
|
@@ -131,6 +130,10 @@ declare namespace Components {
|
|
|
131
130
|
updatedAt: Date;
|
|
132
131
|
}
|
|
133
132
|
|
|
133
|
+
export interface IUserAddress extends IAddress {
|
|
134
|
+
user_id: string;
|
|
135
|
+
}
|
|
136
|
+
|
|
134
137
|
export interface IUpdateUser {
|
|
135
138
|
name: string;
|
|
136
139
|
tel: number;
|
|
@@ -458,6 +461,13 @@ declare namespace Components {
|
|
|
458
461
|
updatedAt: Date;
|
|
459
462
|
}
|
|
460
463
|
|
|
464
|
+
export interface ISellerShowcaseResponse {
|
|
465
|
+
purchasesCount: number;
|
|
466
|
+
averageRating: number;
|
|
467
|
+
reviewsCount: number;
|
|
468
|
+
seller: ISeller;
|
|
469
|
+
}
|
|
470
|
+
|
|
461
471
|
export interface ISellerQueryRequest {
|
|
462
472
|
name?: string;
|
|
463
473
|
}
|
|
@@ -490,49 +500,105 @@ declare namespace Components {
|
|
|
490
500
|
|
|
491
501
|
export type OrderAddress = Omit<IAddress, 'user_id'>;
|
|
492
502
|
|
|
493
|
-
export enum EDeliveryType {
|
|
494
|
-
PICKUP = 'PICKUP',
|
|
495
|
-
OWN_DELIVERY = 'OWN_DELIVERY',
|
|
496
|
-
DELIVERY_TO_POINT = 'DELIVERY_TO_POINT',
|
|
497
|
-
COURIER = 'COURIER',
|
|
498
|
-
}
|
|
499
|
-
|
|
500
503
|
export enum EOrderStatus {
|
|
501
504
|
DELIVERED = 'DELIVERED',
|
|
505
|
+
IN_DELIVERY = 'IN_DELIVERY',
|
|
506
|
+
ON_CONFIRMATION = 'ON_CONFIRMATION',
|
|
507
|
+
PAID = 'PAID',
|
|
508
|
+
CANCELED = 'CANCELED',
|
|
509
|
+
REFUSING = 'REFUSING',
|
|
510
|
+
DELETED = 'DELETED',
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
export interface IDeliveryAddress extends IAddress {
|
|
514
|
+
lat: number;
|
|
515
|
+
lng: number;
|
|
502
516
|
}
|
|
503
517
|
|
|
504
518
|
export interface IDeliveryInfo {
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
address: OrderAddress;
|
|
519
|
+
delivery_sum: number;
|
|
520
|
+
address: IDeliveryAddress;
|
|
508
521
|
tel: number;
|
|
522
|
+
full_name: string;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
export interface IPVZ {
|
|
526
|
+
code: string;
|
|
509
527
|
name: string;
|
|
528
|
+
location: {
|
|
529
|
+
country_code: string;
|
|
530
|
+
region_code: number;
|
|
531
|
+
region: string;
|
|
532
|
+
city_code: number;
|
|
533
|
+
city: string;
|
|
534
|
+
postal_code: string;
|
|
535
|
+
longitude: number;
|
|
536
|
+
latitude: number;
|
|
537
|
+
address: string;
|
|
538
|
+
address_full: string;
|
|
539
|
+
};
|
|
540
|
+
phones: [
|
|
541
|
+
{
|
|
542
|
+
number: string;
|
|
543
|
+
}
|
|
544
|
+
];
|
|
545
|
+
email: string;
|
|
510
546
|
}
|
|
511
547
|
|
|
512
|
-
export interface
|
|
513
|
-
|
|
514
|
-
delivery_type: EDeliveryType;
|
|
515
|
-
delivery_info: IDeliveryInfo;
|
|
548
|
+
export interface IPickUpPoint {
|
|
549
|
+
shop_id: string;
|
|
516
550
|
}
|
|
517
551
|
|
|
518
|
-
export
|
|
552
|
+
export enum ERecieveMethod {
|
|
553
|
+
PICKUP_POINT = 'PICKUP_POINT',
|
|
554
|
+
COURIER = 'COURIER',
|
|
555
|
+
PVZ = 'PVZ',
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
export interface IOrderItem {
|
|
519
559
|
product_id: string;
|
|
520
560
|
count: number;
|
|
521
561
|
price: number;
|
|
562
|
+
weight: number;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
export interface ICreateOrder {
|
|
566
|
+
items: IOrderItem[];
|
|
567
|
+
receive_method: ERecieveMethod;
|
|
568
|
+
receive_method_data: IDeliveryInfo | IPVZ | IPickUpPoint;
|
|
569
|
+
seller_id: string;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
export interface ICreateMultiOrder {
|
|
573
|
+
orders: ICreateOrder[];
|
|
574
|
+
sum: number;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
export interface IDeliveryFullInfo extends IDeliveryInfo {
|
|
578
|
+
tracking: string;
|
|
579
|
+
invoice: string;
|
|
522
580
|
}
|
|
523
581
|
|
|
524
582
|
export interface IOrder {
|
|
525
|
-
_id: string;
|
|
526
583
|
sum: number;
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
584
|
+
weight: number;
|
|
585
|
+
items: IOrderItem[];
|
|
586
|
+
seller_id: string;
|
|
587
|
+
receive_method: ERecieveMethod;
|
|
588
|
+
delivery_info?: Partial<IDeliveryFullInfo>;
|
|
589
|
+
shop_id?: string;
|
|
590
|
+
pvz?: Partial<IPVZ>;
|
|
591
|
+
status?: EOrderStatus;
|
|
592
|
+
preparation_date?: Date;
|
|
593
|
+
note?: string;
|
|
594
|
+
number?: number;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
export interface IMultiOrder {
|
|
598
|
+
user_id: string;
|
|
599
|
+
sum: number;
|
|
600
|
+
orders: string[];
|
|
601
|
+
number?: number;
|
|
536
602
|
}
|
|
537
603
|
|
|
538
604
|
export enum EComplaintsReason {
|
|
@@ -583,7 +649,7 @@ declare namespace Components {
|
|
|
583
649
|
_id: string;
|
|
584
650
|
user_id: {
|
|
585
651
|
_id: string;
|
|
586
|
-
name
|
|
652
|
+
name?: string;
|
|
587
653
|
};
|
|
588
654
|
product_id: string;
|
|
589
655
|
rating: number;
|