@mivis/petmart-api 1.2.216 → 1.2.217
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 +140 -15
package/package.json
CHANGED
package/type.d.ts
CHANGED
|
@@ -929,6 +929,7 @@ declare namespace Components {
|
|
|
929
929
|
tel: number;
|
|
930
930
|
full_name: string;
|
|
931
931
|
yandex_uuid?: string;
|
|
932
|
+
cdek_barcode?: string;
|
|
932
933
|
type?: DeliveryTypes;
|
|
933
934
|
yandex_offer?: OfferDto;
|
|
934
935
|
}
|
|
@@ -1252,36 +1253,62 @@ declare namespace Components {
|
|
|
1252
1253
|
reason: EComplaintsReason;
|
|
1253
1254
|
}
|
|
1254
1255
|
|
|
1256
|
+
export enum EReviewEntityType {
|
|
1257
|
+
PRODUCT = 'PRODUCT',
|
|
1258
|
+
HORSE = 'HORSE',
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
export enum ECreatorType {
|
|
1262
|
+
SELLER = 'SELLER',
|
|
1263
|
+
USER = 'USER',
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1255
1266
|
export interface IReview {
|
|
1256
1267
|
_id: string;
|
|
1257
1268
|
user_id?: string;
|
|
1258
|
-
|
|
1269
|
+
entity_id: string;
|
|
1270
|
+
entity_type: EReviewEntityType;
|
|
1271
|
+
creator_id: string;
|
|
1272
|
+
creator_type: ECreatorType;
|
|
1259
1273
|
rating: number;
|
|
1260
1274
|
text: string;
|
|
1261
1275
|
anonymity: boolean;
|
|
1262
1276
|
}
|
|
1263
1277
|
|
|
1264
|
-
export interface
|
|
1265
|
-
|
|
1278
|
+
export interface IReviewsRequest {
|
|
1279
|
+
entity_id: string;
|
|
1280
|
+
entity_type: EReviewEntityType;
|
|
1281
|
+
creator_id: string;
|
|
1282
|
+
creator_type: ECreatorType;
|
|
1266
1283
|
}
|
|
1267
1284
|
|
|
1285
|
+
export interface IGetReviewsRequest
|
|
1286
|
+
extends Partial<FilterBaseQuery & IReviewsRequest> {}
|
|
1287
|
+
|
|
1268
1288
|
export interface IReviewResponse {
|
|
1269
1289
|
_id: string;
|
|
1270
|
-
user_id
|
|
1290
|
+
user_id: {
|
|
1271
1291
|
_id: string;
|
|
1272
|
-
|
|
1292
|
+
tel: number;
|
|
1293
|
+
name: string;
|
|
1294
|
+
birthday: Date;
|
|
1295
|
+
email: string;
|
|
1296
|
+
full_name: string;
|
|
1297
|
+
patronymic: string;
|
|
1298
|
+
surname: string;
|
|
1273
1299
|
};
|
|
1274
|
-
|
|
1300
|
+
entity_id: string; // ID сущности, к которой привязан отзыв (например, Product или Horse)
|
|
1301
|
+
entity_type: EReviewEntityType; // Тип сущности (Product, Horse и т.д.)
|
|
1302
|
+
creator_id: string; // ID создателя сущности (продавец или пользователь)
|
|
1303
|
+
creator_type: ECreatorType; // Тип создателя (SELLER или USER)
|
|
1275
1304
|
rating: number;
|
|
1276
|
-
text
|
|
1305
|
+
text?: string;
|
|
1277
1306
|
anonymity: boolean;
|
|
1278
1307
|
createdAt: Date;
|
|
1279
1308
|
updatedAt: Date;
|
|
1280
1309
|
}
|
|
1281
1310
|
|
|
1282
|
-
export interface
|
|
1283
|
-
product_id: string;
|
|
1284
|
-
}
|
|
1311
|
+
export interface IGetReviewDataRequest extends Partial<IReviewsRequest> {}
|
|
1285
1312
|
|
|
1286
1313
|
export interface IReviewsData {
|
|
1287
1314
|
count: number;
|
|
@@ -1289,7 +1316,8 @@ declare namespace Components {
|
|
|
1289
1316
|
}
|
|
1290
1317
|
|
|
1291
1318
|
export interface ICreateReviewRequest {
|
|
1292
|
-
|
|
1319
|
+
entity_id: string;
|
|
1320
|
+
entity_type: EReviewEntityType;
|
|
1293
1321
|
text?: string;
|
|
1294
1322
|
anonymity: boolean;
|
|
1295
1323
|
rating: number;
|
|
@@ -1665,11 +1693,11 @@ declare namespace Components {
|
|
|
1665
1693
|
place: string;
|
|
1666
1694
|
}
|
|
1667
1695
|
|
|
1668
|
-
export interface
|
|
1696
|
+
export interface ILocation {
|
|
1669
1697
|
name: string;
|
|
1698
|
+
coordinates?: number[]; // [lng, lat]
|
|
1670
1699
|
lat: number;
|
|
1671
1700
|
lng: number;
|
|
1672
|
-
coordinates?: number[];
|
|
1673
1701
|
}
|
|
1674
1702
|
|
|
1675
1703
|
export interface IPreferredCommunication {
|
|
@@ -1693,7 +1721,7 @@ declare namespace Components {
|
|
|
1693
1721
|
birthDate: string;
|
|
1694
1722
|
withersHeight: number;
|
|
1695
1723
|
price: number;
|
|
1696
|
-
location:
|
|
1724
|
+
location: ILocation;
|
|
1697
1725
|
images: File | File[];
|
|
1698
1726
|
video_cover?: File;
|
|
1699
1727
|
desc?: string;
|
|
@@ -1730,7 +1758,7 @@ declare namespace Components {
|
|
|
1730
1758
|
category: string;
|
|
1731
1759
|
withersHeight: number;
|
|
1732
1760
|
price: number;
|
|
1733
|
-
location:
|
|
1761
|
+
location: ILocation;
|
|
1734
1762
|
images: string[];
|
|
1735
1763
|
video_cover: string | null;
|
|
1736
1764
|
desc: string | null;
|
|
@@ -1792,6 +1820,7 @@ declare namespace Components {
|
|
|
1792
1820
|
export enum EViewCountEntityType {
|
|
1793
1821
|
HORSE = 'horse',
|
|
1794
1822
|
PRODUCT = 'product',
|
|
1823
|
+
SERVICE = 'service',
|
|
1795
1824
|
}
|
|
1796
1825
|
|
|
1797
1826
|
export interface IViewCount {
|
|
@@ -2001,6 +2030,27 @@ declare namespace Components {
|
|
|
2001
2030
|
EXPENSIVE = 'Дороже',
|
|
2002
2031
|
}
|
|
2003
2032
|
|
|
2033
|
+
export interface PriceDto {
|
|
2034
|
+
total_price: string;
|
|
2035
|
+
total_price_with_vat: string;
|
|
2036
|
+
surge_ratio: number;
|
|
2037
|
+
currency: string;
|
|
2038
|
+
}
|
|
2039
|
+
|
|
2040
|
+
export interface IntervalDto {
|
|
2041
|
+
from: string;
|
|
2042
|
+
to: string;
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2045
|
+
export interface OfferDto {
|
|
2046
|
+
price: PriceDto;
|
|
2047
|
+
taxi_class: string;
|
|
2048
|
+
pickup_interval: IntervalDto;
|
|
2049
|
+
delivery_interval: IntervalDto;
|
|
2050
|
+
description: string;
|
|
2051
|
+
payload: string;
|
|
2052
|
+
offer_ttl: string;
|
|
2053
|
+
}
|
|
2004
2054
|
export enum DeliveryTypes {
|
|
2005
2055
|
CDEK = 'CDEK',
|
|
2006
2056
|
YANDEX_EXPRESS = 'YANDEX_EXPRESS',
|
|
@@ -2047,5 +2097,80 @@ declare namespace Components {
|
|
|
2047
2097
|
}
|
|
2048
2098
|
|
|
2049
2099
|
// Favorites (Избранное) - Конец
|
|
2100
|
+
|
|
2101
|
+
// Services (Услуги) - Начало
|
|
2102
|
+
|
|
2103
|
+
export interface IGetServicesQuery extends FilterBaseQuery {
|
|
2104
|
+
user_id?: string;
|
|
2105
|
+
category?: string;
|
|
2106
|
+
priceMin?: string;
|
|
2107
|
+
priceMax?: string;
|
|
2108
|
+
lat?: string; // user lat
|
|
2109
|
+
lng?: string; // user lng
|
|
2110
|
+
radius?: string;
|
|
2111
|
+
}
|
|
2112
|
+
|
|
2113
|
+
export interface ICreateService {
|
|
2114
|
+
name: string;
|
|
2115
|
+
description?: string;
|
|
2116
|
+
category: string;
|
|
2117
|
+
price: number;
|
|
2118
|
+
location: ILocation;
|
|
2119
|
+
communication: ICommunication;
|
|
2120
|
+
photo: File;
|
|
2121
|
+
}
|
|
2122
|
+
|
|
2123
|
+
export interface IUpdateService extends Partial<ICreateService> {}
|
|
2124
|
+
|
|
2125
|
+
export enum EServiceStatus {
|
|
2126
|
+
MODERATION = 'MODERATION',
|
|
2127
|
+
PUBLISHED = 'PUBLISHED',
|
|
2128
|
+
REJECTED = 'REJECTED',
|
|
2129
|
+
ARCHIVED = 'ARCHIVED',
|
|
2130
|
+
}
|
|
2131
|
+
|
|
2132
|
+
export interface IServiceCategory {
|
|
2133
|
+
_id: string;
|
|
2134
|
+
name: string;
|
|
2135
|
+
createdAt: Date;
|
|
2136
|
+
updatedAt: Date;
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2139
|
+
export interface IService {
|
|
2140
|
+
user_id: string;
|
|
2141
|
+
name: string;
|
|
2142
|
+
description?: string;
|
|
2143
|
+
category: string;
|
|
2144
|
+
price: number;
|
|
2145
|
+
status: EServiceStatus;
|
|
2146
|
+
location: ILocation;
|
|
2147
|
+
communication: ICommunication;
|
|
2148
|
+
photo: string;
|
|
2149
|
+
telegram_message_id: number | null;
|
|
2150
|
+
slug: string;
|
|
2151
|
+
number: number;
|
|
2152
|
+
createdAt: Date;
|
|
2153
|
+
updatedAt: Date;
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
export interface IPopulatedServicesWithReviewDataResponse {
|
|
2157
|
+
services: IPopulatedService[];
|
|
2158
|
+
reviewsData: IReviewsData;
|
|
2159
|
+
}
|
|
2160
|
+
|
|
2161
|
+
export interface IPopulatedService
|
|
2162
|
+
extends Omit<IService, 'category' | 'user_id'> {
|
|
2163
|
+
_id: string;
|
|
2164
|
+
category: IServiceCategory;
|
|
2165
|
+
user_id: IPopulatedOrderUserApp;
|
|
2166
|
+
is_favorite?: boolean;
|
|
2167
|
+
reviewsData?: IReviewsData;
|
|
2168
|
+
}
|
|
2169
|
+
|
|
2170
|
+
export interface IPopulatedServiceWViewCount extends IPopulatedService {
|
|
2171
|
+
viewCount: IViewCount;
|
|
2172
|
+
}
|
|
2173
|
+
|
|
2174
|
+
// Services (Услуги) - Конец
|
|
2050
2175
|
}
|
|
2051
2176
|
}
|