@mivis/petmart-api 1.2.215 → 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 +187 -19
package/package.json
CHANGED
package/type.d.ts
CHANGED
|
@@ -289,6 +289,7 @@ declare namespace Components {
|
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
export interface IUserProductQueryRequest extends FilterBaseQuery {
|
|
292
|
+
user_id?: string;
|
|
292
293
|
category_id?: string;
|
|
293
294
|
subCategory_id?: string;
|
|
294
295
|
seller_id?: string;
|
|
@@ -359,6 +360,7 @@ declare namespace Components {
|
|
|
359
360
|
slug: string;
|
|
360
361
|
createdAt: Date;
|
|
361
362
|
updatedAt: Date;
|
|
363
|
+
is_favorite?: boolean;
|
|
362
364
|
}
|
|
363
365
|
|
|
364
366
|
type OptionalDimension = {
|
|
@@ -612,6 +614,7 @@ declare namespace Components {
|
|
|
612
614
|
// own_delivery: boolean; // Появится в ближайшем будущем
|
|
613
615
|
delivery_to_point: boolean;
|
|
614
616
|
courier: boolean;
|
|
617
|
+
yandex_express: boolean
|
|
615
618
|
}
|
|
616
619
|
|
|
617
620
|
export enum ESellerStatus {
|
|
@@ -926,6 +929,9 @@ declare namespace Components {
|
|
|
926
929
|
tel: number;
|
|
927
930
|
full_name: string;
|
|
928
931
|
yandex_uuid?: string;
|
|
932
|
+
cdek_barcode?: string;
|
|
933
|
+
type?: DeliveryTypes;
|
|
934
|
+
yandex_offer?: OfferDto;
|
|
929
935
|
}
|
|
930
936
|
|
|
931
937
|
export interface IPVZ {
|
|
@@ -1151,8 +1157,8 @@ declare namespace Components {
|
|
|
1151
1157
|
number: number;
|
|
1152
1158
|
createdAt: Date;
|
|
1153
1159
|
updatedAt: Date;
|
|
1154
|
-
type?: DeliveryTypes
|
|
1155
|
-
yandex_offer?: OfferDto
|
|
1160
|
+
type?: DeliveryTypes;
|
|
1161
|
+
yandex_offer?: OfferDto;
|
|
1156
1162
|
}
|
|
1157
1163
|
|
|
1158
1164
|
export interface IAdminMultiOrderResponse
|
|
@@ -1247,36 +1253,62 @@ declare namespace Components {
|
|
|
1247
1253
|
reason: EComplaintsReason;
|
|
1248
1254
|
}
|
|
1249
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
|
+
|
|
1250
1266
|
export interface IReview {
|
|
1251
1267
|
_id: string;
|
|
1252
1268
|
user_id?: string;
|
|
1253
|
-
|
|
1269
|
+
entity_id: string;
|
|
1270
|
+
entity_type: EReviewEntityType;
|
|
1271
|
+
creator_id: string;
|
|
1272
|
+
creator_type: ECreatorType;
|
|
1254
1273
|
rating: number;
|
|
1255
1274
|
text: string;
|
|
1256
1275
|
anonymity: boolean;
|
|
1257
1276
|
}
|
|
1258
1277
|
|
|
1259
|
-
export interface
|
|
1260
|
-
|
|
1278
|
+
export interface IReviewsRequest {
|
|
1279
|
+
entity_id: string;
|
|
1280
|
+
entity_type: EReviewEntityType;
|
|
1281
|
+
creator_id: string;
|
|
1282
|
+
creator_type: ECreatorType;
|
|
1261
1283
|
}
|
|
1262
1284
|
|
|
1285
|
+
export interface IGetReviewsRequest
|
|
1286
|
+
extends Partial<FilterBaseQuery & IReviewsRequest> {}
|
|
1287
|
+
|
|
1263
1288
|
export interface IReviewResponse {
|
|
1264
1289
|
_id: string;
|
|
1265
|
-
user_id
|
|
1290
|
+
user_id: {
|
|
1266
1291
|
_id: string;
|
|
1267
|
-
|
|
1292
|
+
tel: number;
|
|
1293
|
+
name: string;
|
|
1294
|
+
birthday: Date;
|
|
1295
|
+
email: string;
|
|
1296
|
+
full_name: string;
|
|
1297
|
+
patronymic: string;
|
|
1298
|
+
surname: string;
|
|
1268
1299
|
};
|
|
1269
|
-
|
|
1300
|
+
entity_id: string; // ID сущности, к которой привязан отзыв (например, Product или Horse)
|
|
1301
|
+
entity_type: EReviewEntityType; // Тип сущности (Product, Horse и т.д.)
|
|
1302
|
+
creator_id: string; // ID создателя сущности (продавец или пользователь)
|
|
1303
|
+
creator_type: ECreatorType; // Тип создателя (SELLER или USER)
|
|
1270
1304
|
rating: number;
|
|
1271
|
-
text
|
|
1305
|
+
text?: string;
|
|
1272
1306
|
anonymity: boolean;
|
|
1273
1307
|
createdAt: Date;
|
|
1274
1308
|
updatedAt: Date;
|
|
1275
1309
|
}
|
|
1276
1310
|
|
|
1277
|
-
export interface
|
|
1278
|
-
product_id: string;
|
|
1279
|
-
}
|
|
1311
|
+
export interface IGetReviewDataRequest extends Partial<IReviewsRequest> {}
|
|
1280
1312
|
|
|
1281
1313
|
export interface IReviewsData {
|
|
1282
1314
|
count: number;
|
|
@@ -1284,7 +1316,8 @@ declare namespace Components {
|
|
|
1284
1316
|
}
|
|
1285
1317
|
|
|
1286
1318
|
export interface ICreateReviewRequest {
|
|
1287
|
-
|
|
1319
|
+
entity_id: string;
|
|
1320
|
+
entity_type: EReviewEntityType;
|
|
1288
1321
|
text?: string;
|
|
1289
1322
|
anonymity: boolean;
|
|
1290
1323
|
rating: number;
|
|
@@ -1660,11 +1693,11 @@ declare namespace Components {
|
|
|
1660
1693
|
place: string;
|
|
1661
1694
|
}
|
|
1662
1695
|
|
|
1663
|
-
export interface
|
|
1696
|
+
export interface ILocation {
|
|
1664
1697
|
name: string;
|
|
1698
|
+
coordinates?: number[]; // [lng, lat]
|
|
1665
1699
|
lat: number;
|
|
1666
1700
|
lng: number;
|
|
1667
|
-
coordinates?: number[];
|
|
1668
1701
|
}
|
|
1669
1702
|
|
|
1670
1703
|
export interface IPreferredCommunication {
|
|
@@ -1688,7 +1721,7 @@ declare namespace Components {
|
|
|
1688
1721
|
birthDate: string;
|
|
1689
1722
|
withersHeight: number;
|
|
1690
1723
|
price: number;
|
|
1691
|
-
location:
|
|
1724
|
+
location: ILocation;
|
|
1692
1725
|
images: File | File[];
|
|
1693
1726
|
video_cover?: File;
|
|
1694
1727
|
desc?: string;
|
|
@@ -1725,7 +1758,7 @@ declare namespace Components {
|
|
|
1725
1758
|
category: string;
|
|
1726
1759
|
withersHeight: number;
|
|
1727
1760
|
price: number;
|
|
1728
|
-
location:
|
|
1761
|
+
location: ILocation;
|
|
1729
1762
|
images: string[];
|
|
1730
1763
|
video_cover: string | null;
|
|
1731
1764
|
desc: string | null;
|
|
@@ -1754,6 +1787,7 @@ declare namespace Components {
|
|
|
1754
1787
|
breed: IBreed;
|
|
1755
1788
|
suit: ISuit;
|
|
1756
1789
|
category: IHorseCategory;
|
|
1790
|
+
is_favorite?: boolean;
|
|
1757
1791
|
}
|
|
1758
1792
|
|
|
1759
1793
|
export interface IBreed {
|
|
@@ -1786,6 +1820,7 @@ declare namespace Components {
|
|
|
1786
1820
|
export enum EViewCountEntityType {
|
|
1787
1821
|
HORSE = 'horse',
|
|
1788
1822
|
PRODUCT = 'product',
|
|
1823
|
+
SERVICE = 'service',
|
|
1789
1824
|
}
|
|
1790
1825
|
|
|
1791
1826
|
export interface IViewCount {
|
|
@@ -1995,14 +2030,147 @@ declare namespace Components {
|
|
|
1995
2030
|
EXPENSIVE = 'Дороже',
|
|
1996
2031
|
}
|
|
1997
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
|
+
}
|
|
1998
2054
|
export enum DeliveryTypes {
|
|
1999
|
-
CDEK =
|
|
2000
|
-
YANDEX_EXPRESS =
|
|
2055
|
+
CDEK = 'CDEK',
|
|
2056
|
+
YANDEX_EXPRESS = 'YANDEX_EXPRESS',
|
|
2001
2057
|
}
|
|
2058
|
+
|
|
2002
2059
|
export interface GetFastDeliveryPriceDto {
|
|
2003
2060
|
items: IPopulatedOrderItem[];
|
|
2004
2061
|
|
|
2005
2062
|
delivery_info: Partial<IDeliveryFullInfo>;
|
|
2006
2063
|
}
|
|
2064
|
+
|
|
2065
|
+
// Favorites (Избранное) - Начало
|
|
2066
|
+
|
|
2067
|
+
export enum EFavoritesEntityType {
|
|
2068
|
+
PRODUCT = 'PRODUCT',
|
|
2069
|
+
HORSE = 'HORSE',
|
|
2070
|
+
}
|
|
2071
|
+
|
|
2072
|
+
export interface IFavorite {
|
|
2073
|
+
user_id: string; // ID пользователя, который добавил в избранное
|
|
2074
|
+
entity_id: string; // ID сущности, к которой привязано избранное (например, Product или Horse)
|
|
2075
|
+
entity_type: EFavoritesEntityType; // Тип сущности (PRODUCT, HORSE и т.д.)
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
export interface IPopulatedFavorite extends Omit<IFavorite, 'entity_id'> {
|
|
2079
|
+
_id: string;
|
|
2080
|
+
entity_id: IProductResponse | IPopulatedHorse; // В зависимости от entity_type присваивать entity_id as IProductResponse или IPopulatedHorse
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2083
|
+
export enum EFavoriteToggleActions {
|
|
2084
|
+
ADDED = 'ADDED', // Добавлен в базу
|
|
2085
|
+
REMOVED = 'REMOVED', // Убран из базы
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
export interface IToggleFavoriteRequest
|
|
2089
|
+
extends Omit<IFavorite, 'user_id'> {}
|
|
2090
|
+
|
|
2091
|
+
export interface IGetFavoritesRequest
|
|
2092
|
+
extends Omit<IFavorite, 'entity_id' | 'user_id'>,
|
|
2093
|
+
FilterBaseQuery {}
|
|
2094
|
+
|
|
2095
|
+
export interface IToggleFavoriteResponse {
|
|
2096
|
+
action: EFavoriteToggleActions;
|
|
2097
|
+
}
|
|
2098
|
+
|
|
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 (Услуги) - Конец
|
|
2007
2175
|
}
|
|
2008
2176
|
}
|