@mivis/petmart-api 1.2.214 → 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 +141 -0
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 {
|
|
@@ -925,6 +928,9 @@ declare namespace Components {
|
|
|
925
928
|
address: IDeliveryAddress;
|
|
926
929
|
tel: number;
|
|
927
930
|
full_name: string;
|
|
931
|
+
yandex_uuid?: string;
|
|
932
|
+
type?: DeliveryTypes;
|
|
933
|
+
yandex_offer?: OfferDto;
|
|
928
934
|
}
|
|
929
935
|
|
|
930
936
|
export interface IPVZ {
|
|
@@ -959,6 +965,7 @@ declare namespace Components {
|
|
|
959
965
|
PICKUP_POINT = 'PICKUP_POINT',
|
|
960
966
|
COURIER = 'COURIER',
|
|
961
967
|
PVZ = 'PVZ',
|
|
968
|
+
EXPRESS = 'EXPRESS',
|
|
962
969
|
}
|
|
963
970
|
|
|
964
971
|
export enum EOrderItemsStatus {
|
|
@@ -1149,6 +1156,8 @@ declare namespace Components {
|
|
|
1149
1156
|
number: number;
|
|
1150
1157
|
createdAt: Date;
|
|
1151
1158
|
updatedAt: Date;
|
|
1159
|
+
type?: DeliveryTypes;
|
|
1160
|
+
yandex_offer?: OfferDto;
|
|
1152
1161
|
}
|
|
1153
1162
|
|
|
1154
1163
|
export interface IAdminMultiOrderResponse
|
|
@@ -1750,6 +1759,7 @@ declare namespace Components {
|
|
|
1750
1759
|
breed: IBreed;
|
|
1751
1760
|
suit: ISuit;
|
|
1752
1761
|
category: IHorseCategory;
|
|
1762
|
+
is_favorite?: boolean;
|
|
1753
1763
|
}
|
|
1754
1764
|
|
|
1755
1765
|
export interface IBreed {
|
|
@@ -1844,6 +1854,10 @@ declare namespace Components {
|
|
|
1844
1854
|
lat?: string; // user lat
|
|
1845
1855
|
lng?: string; // user lng
|
|
1846
1856
|
}
|
|
1857
|
+
export interface IPriceHistorySearch {
|
|
1858
|
+
priceMin?: number;
|
|
1859
|
+
priceMax?: number;
|
|
1860
|
+
}
|
|
1847
1861
|
|
|
1848
1862
|
export enum ECollectionStatus {
|
|
1849
1863
|
PUBLISHED = 'PUBLISHED',
|
|
@@ -1899,6 +1913,86 @@ declare namespace Components {
|
|
|
1899
1913
|
status: ECollectionStatus;
|
|
1900
1914
|
position: number;
|
|
1901
1915
|
}
|
|
1916
|
+
export interface IPickupPoints {
|
|
1917
|
+
lat: string;
|
|
1918
|
+
|
|
1919
|
+
lng: string;
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
export interface ICalculateFastDeliveryPrice {
|
|
1923
|
+
lat: string;
|
|
1924
|
+
|
|
1925
|
+
lng: string;
|
|
1926
|
+
|
|
1927
|
+
items: IOrderItem[];
|
|
1928
|
+
}
|
|
1929
|
+
|
|
1930
|
+
export interface ItemSizeDto {
|
|
1931
|
+
// product.dimension: length, width, height
|
|
1932
|
+
length: number;
|
|
1933
|
+
width: number;
|
|
1934
|
+
height: number;
|
|
1935
|
+
}
|
|
1936
|
+
|
|
1937
|
+
export interface ItemDto {
|
|
1938
|
+
size?: ItemSizeDto;
|
|
1939
|
+
weight?: number;
|
|
1940
|
+
quantity: number;
|
|
1941
|
+
pickup_point: number;
|
|
1942
|
+
dropoff_point: number;
|
|
1943
|
+
}
|
|
1944
|
+
|
|
1945
|
+
export interface RoutePointDto {
|
|
1946
|
+
id: number; // 1, 2, 3...
|
|
1947
|
+
fullname?: string;
|
|
1948
|
+
coordinates: number[]; // 37.617298, 55.755825
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
export interface DeliveryInterval {
|
|
1952
|
+
from: string;
|
|
1953
|
+
to: string;
|
|
1954
|
+
}
|
|
1955
|
+
export interface SameDayData {
|
|
1956
|
+
delivery_interval: DeliveryInterval;
|
|
1957
|
+
}
|
|
1958
|
+
export interface RequirementsDto {
|
|
1959
|
+
taxi_classes?: string[];
|
|
1960
|
+
cargo_type?: string;
|
|
1961
|
+
cargo_loaders?: number;
|
|
1962
|
+
pro_courier?: boolean;
|
|
1963
|
+
cargo_options?: string[];
|
|
1964
|
+
skip_door_to_door?: boolean;
|
|
1965
|
+
due?: string;
|
|
1966
|
+
same_day_data?: SameDayData;
|
|
1967
|
+
delivery_interval: DeliveryInterval;
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1970
|
+
export interface YandexDeliveryRequestDto {
|
|
1971
|
+
items: ItemDto[];
|
|
1972
|
+
route_points: RoutePointDto[];
|
|
1973
|
+
requirements: RequirementsDto;
|
|
1974
|
+
}
|
|
1975
|
+
export interface PriceDto {
|
|
1976
|
+
total_price: string;
|
|
1977
|
+
total_price_with_vat: string;
|
|
1978
|
+
surge_ratio: number;
|
|
1979
|
+
currency: string;
|
|
1980
|
+
}
|
|
1981
|
+
|
|
1982
|
+
export interface IntervalDto {
|
|
1983
|
+
from: string;
|
|
1984
|
+
to: string;
|
|
1985
|
+
}
|
|
1986
|
+
|
|
1987
|
+
export interface OfferDto {
|
|
1988
|
+
price: PriceDto;
|
|
1989
|
+
taxi_class: string;
|
|
1990
|
+
pickup_interval: IntervalDto;
|
|
1991
|
+
delivery_interval: IntervalDto;
|
|
1992
|
+
description: string;
|
|
1993
|
+
payload: string;
|
|
1994
|
+
offer_ttl: string;
|
|
1995
|
+
}
|
|
1902
1996
|
|
|
1903
1997
|
export enum EProductsSortOptions {
|
|
1904
1998
|
NEWEST = 'Новинки',
|
|
@@ -1906,5 +2000,52 @@ declare namespace Components {
|
|
|
1906
2000
|
CHEAPEST = 'Дешевле',
|
|
1907
2001
|
EXPENSIVE = 'Дороже',
|
|
1908
2002
|
}
|
|
2003
|
+
|
|
2004
|
+
export enum DeliveryTypes {
|
|
2005
|
+
CDEK = 'CDEK',
|
|
2006
|
+
YANDEX_EXPRESS = 'YANDEX_EXPRESS',
|
|
2007
|
+
}
|
|
2008
|
+
|
|
2009
|
+
export interface GetFastDeliveryPriceDto {
|
|
2010
|
+
items: IPopulatedOrderItem[];
|
|
2011
|
+
|
|
2012
|
+
delivery_info: Partial<IDeliveryFullInfo>;
|
|
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 (Избранное) - Конец
|
|
1909
2050
|
}
|
|
1910
2051
|
}
|