@mivis/petmart-api 1.2.42 → 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 +85 -26
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;
|
|
@@ -497,49 +500,105 @@ declare namespace Components {
|
|
|
497
500
|
|
|
498
501
|
export type OrderAddress = Omit<IAddress, 'user_id'>;
|
|
499
502
|
|
|
500
|
-
export enum EDeliveryType {
|
|
501
|
-
PICKUP = 'PICKUP',
|
|
502
|
-
OWN_DELIVERY = 'OWN_DELIVERY',
|
|
503
|
-
DELIVERY_TO_POINT = 'DELIVERY_TO_POINT',
|
|
504
|
-
COURIER = 'COURIER',
|
|
505
|
-
}
|
|
506
|
-
|
|
507
503
|
export enum EOrderStatus {
|
|
508
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;
|
|
509
516
|
}
|
|
510
517
|
|
|
511
518
|
export interface IDeliveryInfo {
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
address: OrderAddress;
|
|
519
|
+
delivery_sum: number;
|
|
520
|
+
address: IDeliveryAddress;
|
|
515
521
|
tel: number;
|
|
522
|
+
full_name: string;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
export interface IPVZ {
|
|
526
|
+
code: string;
|
|
516
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;
|
|
517
546
|
}
|
|
518
547
|
|
|
519
|
-
export interface
|
|
520
|
-
|
|
521
|
-
delivery_type: EDeliveryType;
|
|
522
|
-
delivery_info: IDeliveryInfo;
|
|
548
|
+
export interface IPickUpPoint {
|
|
549
|
+
shop_id: string;
|
|
523
550
|
}
|
|
524
551
|
|
|
525
|
-
export
|
|
552
|
+
export enum ERecieveMethod {
|
|
553
|
+
PICKUP_POINT = 'PICKUP_POINT',
|
|
554
|
+
COURIER = 'COURIER',
|
|
555
|
+
PVZ = 'PVZ',
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
export interface IOrderItem {
|
|
526
559
|
product_id: string;
|
|
527
560
|
count: number;
|
|
528
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;
|
|
529
580
|
}
|
|
530
581
|
|
|
531
582
|
export interface IOrder {
|
|
532
|
-
_id: string;
|
|
533
583
|
sum: number;
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
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;
|
|
543
602
|
}
|
|
544
603
|
|
|
545
604
|
export enum EComplaintsReason {
|