@mivis/petmart-api 1.2.215 → 1.2.216
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 +47 -4
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,8 @@ declare namespace Components {
|
|
|
926
929
|
tel: number;
|
|
927
930
|
full_name: string;
|
|
928
931
|
yandex_uuid?: string;
|
|
932
|
+
type?: DeliveryTypes;
|
|
933
|
+
yandex_offer?: OfferDto;
|
|
929
934
|
}
|
|
930
935
|
|
|
931
936
|
export interface IPVZ {
|
|
@@ -1151,8 +1156,8 @@ declare namespace Components {
|
|
|
1151
1156
|
number: number;
|
|
1152
1157
|
createdAt: Date;
|
|
1153
1158
|
updatedAt: Date;
|
|
1154
|
-
type?: DeliveryTypes
|
|
1155
|
-
yandex_offer?: OfferDto
|
|
1159
|
+
type?: DeliveryTypes;
|
|
1160
|
+
yandex_offer?: OfferDto;
|
|
1156
1161
|
}
|
|
1157
1162
|
|
|
1158
1163
|
export interface IAdminMultiOrderResponse
|
|
@@ -1754,6 +1759,7 @@ declare namespace Components {
|
|
|
1754
1759
|
breed: IBreed;
|
|
1755
1760
|
suit: ISuit;
|
|
1756
1761
|
category: IHorseCategory;
|
|
1762
|
+
is_favorite?: boolean;
|
|
1757
1763
|
}
|
|
1758
1764
|
|
|
1759
1765
|
export interface IBreed {
|
|
@@ -1996,13 +2002,50 @@ declare namespace Components {
|
|
|
1996
2002
|
}
|
|
1997
2003
|
|
|
1998
2004
|
export enum DeliveryTypes {
|
|
1999
|
-
CDEK =
|
|
2000
|
-
YANDEX_EXPRESS =
|
|
2005
|
+
CDEK = 'CDEK',
|
|
2006
|
+
YANDEX_EXPRESS = 'YANDEX_EXPRESS',
|
|
2001
2007
|
}
|
|
2008
|
+
|
|
2002
2009
|
export interface GetFastDeliveryPriceDto {
|
|
2003
2010
|
items: IPopulatedOrderItem[];
|
|
2004
2011
|
|
|
2005
2012
|
delivery_info: Partial<IDeliveryFullInfo>;
|
|
2006
2013
|
}
|
|
2014
|
+
|
|
2015
|
+
// Favorites (Избранное) - Начало
|
|
2016
|
+
|
|
2017
|
+
export enum EFavoritesEntityType {
|
|
2018
|
+
PRODUCT = 'PRODUCT',
|
|
2019
|
+
HORSE = 'HORSE',
|
|
2020
|
+
}
|
|
2021
|
+
|
|
2022
|
+
export interface IFavorite {
|
|
2023
|
+
user_id: string; // ID пользователя, который добавил в избранное
|
|
2024
|
+
entity_id: string; // ID сущности, к которой привязано избранное (например, Product или Horse)
|
|
2025
|
+
entity_type: EFavoritesEntityType; // Тип сущности (PRODUCT, HORSE и т.д.)
|
|
2026
|
+
}
|
|
2027
|
+
|
|
2028
|
+
export interface IPopulatedFavorite extends Omit<IFavorite, 'entity_id'> {
|
|
2029
|
+
_id: string;
|
|
2030
|
+
entity_id: IProductResponse | IPopulatedHorse; // В зависимости от entity_type присваивать entity_id as IProductResponse или IPopulatedHorse
|
|
2031
|
+
}
|
|
2032
|
+
|
|
2033
|
+
export enum EFavoriteToggleActions {
|
|
2034
|
+
ADDED = 'ADDED', // Добавлен в базу
|
|
2035
|
+
REMOVED = 'REMOVED', // Убран из базы
|
|
2036
|
+
}
|
|
2037
|
+
|
|
2038
|
+
export interface IToggleFavoriteRequest
|
|
2039
|
+
extends Omit<IFavorite, 'user_id'> {}
|
|
2040
|
+
|
|
2041
|
+
export interface IGetFavoritesRequest
|
|
2042
|
+
extends Omit<IFavorite, 'entity_id' | 'user_id'>,
|
|
2043
|
+
FilterBaseQuery {}
|
|
2044
|
+
|
|
2045
|
+
export interface IToggleFavoriteResponse {
|
|
2046
|
+
action: EFavoriteToggleActions;
|
|
2047
|
+
}
|
|
2048
|
+
|
|
2049
|
+
// Favorites (Избранное) - Конец
|
|
2007
2050
|
}
|
|
2008
2051
|
}
|