@serik_lav/api-fe 0.47.0
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/CHANGELOG.md +906 -0
- package/README.md +1100 -0
- package/dist/entities/ad/api/adApi.d.ts +6 -0
- package/dist/entities/ad/api/adApi.d.ts.map +1 -0
- package/dist/entities/ad/api/adApi.js +29 -0
- package/dist/entities/ad/api/adApi.js.map +1 -0
- package/dist/entities/ad/index.d.ts +3 -0
- package/dist/entities/ad/index.d.ts.map +1 -0
- package/dist/entities/ad/index.js +3 -0
- package/dist/entities/ad/index.js.map +1 -0
- package/dist/entities/ad/model/types.d.ts +22 -0
- package/dist/entities/ad/model/types.d.ts.map +1 -0
- package/dist/entities/ad/model/types.js +1 -0
- package/dist/entities/ad/model/types.js.map +1 -0
- package/dist/entities/auth/api/authApi.d.ts +9 -0
- package/dist/entities/auth/api/authApi.d.ts.map +1 -0
- package/dist/entities/auth/api/authApi.js +46 -0
- package/dist/entities/auth/api/authApi.js.map +1 -0
- package/dist/entities/auth/index.d.ts +3 -0
- package/dist/entities/auth/index.d.ts.map +1 -0
- package/dist/entities/auth/index.js +3 -0
- package/dist/entities/auth/index.js.map +1 -0
- package/dist/entities/auth/model/types.d.ts +77 -0
- package/dist/entities/auth/model/types.d.ts.map +1 -0
- package/dist/entities/auth/model/types.js +1 -0
- package/dist/entities/auth/model/types.js.map +1 -0
- package/dist/entities/cart/api/cartApi.d.ts +12 -0
- package/dist/entities/cart/api/cartApi.d.ts.map +1 -0
- package/dist/entities/cart/api/cartApi.js +396 -0
- package/dist/entities/cart/api/cartApi.js.map +1 -0
- package/dist/entities/cart/index.d.ts +3 -0
- package/dist/entities/cart/index.d.ts.map +1 -0
- package/dist/entities/cart/index.js +4 -0
- package/dist/entities/cart/index.js.map +1 -0
- package/dist/entities/cart/model/types.d.ts +91 -0
- package/dist/entities/cart/model/types.d.ts.map +1 -0
- package/dist/entities/cart/model/types.js +1 -0
- package/dist/entities/cart/model/types.js.map +1 -0
- package/dist/entities/category/api/categoryApi.d.ts +8 -0
- package/dist/entities/category/api/categoryApi.d.ts.map +1 -0
- package/dist/entities/category/api/categoryApi.js +33 -0
- package/dist/entities/category/api/categoryApi.js.map +1 -0
- package/dist/entities/category/index.d.ts +4 -0
- package/dist/entities/category/index.d.ts.map +1 -0
- package/dist/entities/category/index.js +4 -0
- package/dist/entities/category/index.js.map +1 -0
- package/dist/entities/category/model/store-category.d.ts +88 -0
- package/dist/entities/category/model/store-category.d.ts.map +1 -0
- package/dist/entities/category/model/store-category.js +24 -0
- package/dist/entities/category/model/store-category.js.map +1 -0
- package/dist/entities/category/model/types.d.ts +155 -0
- package/dist/entities/category/model/types.d.ts.map +1 -0
- package/dist/entities/category/model/types.js +18 -0
- package/dist/entities/category/model/types.js.map +1 -0
- package/dist/entities/category/model/useCategoryBreadcrumbs.d.ts +30 -0
- package/dist/entities/category/model/useCategoryBreadcrumbs.d.ts.map +1 -0
- package/dist/entities/category/model/useCategoryBreadcrumbs.js +72 -0
- package/dist/entities/category/model/useCategoryBreadcrumbs.js.map +1 -0
- package/dist/entities/chat/api/chatApi.d.ts +15 -0
- package/dist/entities/chat/api/chatApi.d.ts.map +1 -0
- package/dist/entities/chat/api/chatApi.js +400 -0
- package/dist/entities/chat/api/chatApi.js.map +1 -0
- package/dist/entities/chat/index.d.ts +3 -0
- package/dist/entities/chat/index.d.ts.map +1 -0
- package/dist/entities/chat/index.js +3 -0
- package/dist/entities/chat/index.js.map +1 -0
- package/dist/entities/chat/model/types.d.ts +439 -0
- package/dist/entities/chat/model/types.d.ts.map +1 -0
- package/dist/entities/chat/model/types.js +1 -0
- package/dist/entities/chat/model/types.js.map +1 -0
- package/dist/entities/country/api/countryApi.d.ts +5 -0
- package/dist/entities/country/api/countryApi.d.ts.map +1 -0
- package/dist/entities/country/api/countryApi.js +21 -0
- package/dist/entities/country/api/countryApi.js.map +1 -0
- package/dist/entities/country/index.d.ts +3 -0
- package/dist/entities/country/index.d.ts.map +1 -0
- package/dist/entities/country/index.js +3 -0
- package/dist/entities/country/index.js.map +1 -0
- package/dist/entities/country/model/types.d.ts +19 -0
- package/dist/entities/country/model/types.d.ts.map +1 -0
- package/dist/entities/country/model/types.js +1 -0
- package/dist/entities/country/model/types.js.map +1 -0
- package/dist/entities/customer/api/customerApi.d.ts +6 -0
- package/dist/entities/customer/api/customerApi.d.ts.map +1 -0
- package/dist/entities/customer/api/customerApi.js +21 -0
- package/dist/entities/customer/api/customerApi.js.map +1 -0
- package/dist/entities/customer/index.d.ts +3 -0
- package/dist/entities/customer/index.d.ts.map +1 -0
- package/dist/entities/customer/index.js +3 -0
- package/dist/entities/customer/index.js.map +1 -0
- package/dist/entities/customer/model/types.d.ts +237 -0
- package/dist/entities/customer/model/types.d.ts.map +1 -0
- package/dist/entities/customer/model/types.js +1 -0
- package/dist/entities/customer/model/types.js.map +1 -0
- package/dist/entities/favorite/api/favoriteApi.d.ts +32 -0
- package/dist/entities/favorite/api/favoriteApi.d.ts.map +1 -0
- package/dist/entities/favorite/api/favoriteApi.js +344 -0
- package/dist/entities/favorite/api/favoriteApi.js.map +1 -0
- package/dist/entities/favorite/index.d.ts +3 -0
- package/dist/entities/favorite/index.d.ts.map +1 -0
- package/dist/entities/favorite/index.js +3 -0
- package/dist/entities/favorite/index.js.map +1 -0
- package/dist/entities/favorite/model/types.d.ts +39 -0
- package/dist/entities/favorite/model/types.d.ts.map +1 -0
- package/dist/entities/favorite/model/types.js +1 -0
- package/dist/entities/favorite/model/types.js.map +1 -0
- package/dist/entities/notification/api/notificationApi.d.ts +12 -0
- package/dist/entities/notification/api/notificationApi.d.ts.map +1 -0
- package/dist/entities/notification/api/notificationApi.js +109 -0
- package/dist/entities/notification/api/notificationApi.js.map +1 -0
- package/dist/entities/notification/index.d.ts +3 -0
- package/dist/entities/notification/index.d.ts.map +1 -0
- package/dist/entities/notification/index.js +3 -0
- package/dist/entities/notification/index.js.map +1 -0
- package/dist/entities/notification/model/types.d.ts +273 -0
- package/dist/entities/notification/model/types.d.ts.map +1 -0
- package/dist/entities/notification/model/types.js +1 -0
- package/dist/entities/notification/model/types.js.map +1 -0
- package/dist/entities/novaposhta/api/novaposhtaApi.d.ts +11 -0
- package/dist/entities/novaposhta/api/novaposhtaApi.d.ts.map +1 -0
- package/dist/entities/novaposhta/api/novaposhtaApi.js +69 -0
- package/dist/entities/novaposhta/api/novaposhtaApi.js.map +1 -0
- package/dist/entities/novaposhta/index.d.ts +6 -0
- package/dist/entities/novaposhta/index.d.ts.map +1 -0
- package/dist/entities/novaposhta/index.js +6 -0
- package/dist/entities/novaposhta/index.js.map +1 -0
- package/dist/entities/novaposhta/model/novaposhtaCity.d.ts +101 -0
- package/dist/entities/novaposhta/model/novaposhtaCity.d.ts.map +1 -0
- package/dist/entities/novaposhta/model/novaposhtaCity.js +16 -0
- package/dist/entities/novaposhta/model/novaposhtaCity.js.map +1 -0
- package/dist/entities/novaposhta/model/novaposhtaSettlement.d.ts +140 -0
- package/dist/entities/novaposhta/model/novaposhtaSettlement.d.ts.map +1 -0
- package/dist/entities/novaposhta/model/novaposhtaSettlement.js +23 -0
- package/dist/entities/novaposhta/model/novaposhtaSettlement.js.map +1 -0
- package/dist/entities/novaposhta/model/novaposhtaStreet.d.ts +123 -0
- package/dist/entities/novaposhta/model/novaposhtaStreet.d.ts.map +1 -0
- package/dist/entities/novaposhta/model/novaposhtaStreet.js +16 -0
- package/dist/entities/novaposhta/model/novaposhtaStreet.js.map +1 -0
- package/dist/entities/novaposhta/model/novaposhtaWarehouse.d.ts +131 -0
- package/dist/entities/novaposhta/model/novaposhtaWarehouse.d.ts.map +1 -0
- package/dist/entities/novaposhta/model/novaposhtaWarehouse.js +19 -0
- package/dist/entities/novaposhta/model/novaposhtaWarehouse.js.map +1 -0
- package/dist/entities/order/api/orderApi.d.ts +18 -0
- package/dist/entities/order/api/orderApi.d.ts.map +1 -0
- package/dist/entities/order/api/orderApi.js +105 -0
- package/dist/entities/order/api/orderApi.js.map +1 -0
- package/dist/entities/order/index.d.ts +3 -0
- package/dist/entities/order/index.d.ts.map +1 -0
- package/dist/entities/order/index.js +3 -0
- package/dist/entities/order/index.js.map +1 -0
- package/dist/entities/order/model/types.d.ts +630 -0
- package/dist/entities/order/model/types.d.ts.map +1 -0
- package/dist/entities/order/model/types.js +27 -0
- package/dist/entities/order/model/types.js.map +1 -0
- package/dist/entities/product/api/productApi.d.ts +27 -0
- package/dist/entities/product/api/productApi.d.ts.map +1 -0
- package/dist/entities/product/api/productApi.js +252 -0
- package/dist/entities/product/api/productApi.js.map +1 -0
- package/dist/entities/product/index.d.ts +3 -0
- package/dist/entities/product/index.d.ts.map +1 -0
- package/dist/entities/product/index.js +3 -0
- package/dist/entities/product/index.js.map +1 -0
- package/dist/entities/product/model/store-product.d.ts +138 -0
- package/dist/entities/product/model/store-product.d.ts.map +1 -0
- package/dist/entities/product/model/store-product.js +9 -0
- package/dist/entities/product/model/store-product.js.map +1 -0
- package/dist/entities/product/model/types.d.ts +898 -0
- package/dist/entities/product/model/types.d.ts.map +1 -0
- package/dist/entities/product/model/types.js +40 -0
- package/dist/entities/product/model/types.js.map +1 -0
- package/dist/entities/referral/api/referralApi.d.ts +7 -0
- package/dist/entities/referral/api/referralApi.d.ts.map +1 -0
- package/dist/entities/referral/api/referralApi.js +41 -0
- package/dist/entities/referral/api/referralApi.js.map +1 -0
- package/dist/entities/referral/index.d.ts +3 -0
- package/dist/entities/referral/index.d.ts.map +1 -0
- package/dist/entities/referral/index.js +3 -0
- package/dist/entities/referral/index.js.map +1 -0
- package/dist/entities/referral/model/types.d.ts +42 -0
- package/dist/entities/referral/model/types.d.ts.map +1 -0
- package/dist/entities/referral/model/types.js +1 -0
- package/dist/entities/referral/model/types.js.map +1 -0
- package/dist/entities/store/api/storeApi.d.ts +14 -0
- package/dist/entities/store/api/storeApi.d.ts.map +1 -0
- package/dist/entities/store/api/storeApi.js +134 -0
- package/dist/entities/store/api/storeApi.js.map +1 -0
- package/dist/entities/store/index.d.ts +3 -0
- package/dist/entities/store/index.d.ts.map +1 -0
- package/dist/entities/store/index.js +3 -0
- package/dist/entities/store/index.js.map +1 -0
- package/dist/entities/store/model/types.d.ts +853 -0
- package/dist/entities/store/model/types.d.ts.map +1 -0
- package/dist/entities/store/model/types.js +1 -0
- package/dist/entities/store/model/types.js.map +1 -0
- package/dist/entities/stories/api/storiesApi.d.ts +12 -0
- package/dist/entities/stories/api/storiesApi.d.ts.map +1 -0
- package/dist/entities/stories/api/storiesApi.js +225 -0
- package/dist/entities/stories/api/storiesApi.js.map +1 -0
- package/dist/entities/stories/index.d.ts +3 -0
- package/dist/entities/stories/index.d.ts.map +1 -0
- package/dist/entities/stories/index.js +3 -0
- package/dist/entities/stories/index.js.map +1 -0
- package/dist/entities/stories/model/types.d.ts +330 -0
- package/dist/entities/stories/model/types.d.ts.map +1 -0
- package/dist/entities/stories/model/types.js +1 -0
- package/dist/entities/stories/model/types.js.map +1 -0
- package/dist/entities/supplier/api/supplierApi.d.ts +20 -0
- package/dist/entities/supplier/api/supplierApi.d.ts.map +1 -0
- package/dist/entities/supplier/api/supplierApi.js +148 -0
- package/dist/entities/supplier/api/supplierApi.js.map +1 -0
- package/dist/entities/supplier/index.d.ts +3 -0
- package/dist/entities/supplier/index.d.ts.map +1 -0
- package/dist/entities/supplier/index.js +3 -0
- package/dist/entities/supplier/index.js.map +1 -0
- package/dist/entities/supplier/model/types.d.ts +295 -0
- package/dist/entities/supplier/model/types.d.ts.map +1 -0
- package/dist/entities/supplier/model/types.js +1 -0
- package/dist/entities/supplier/model/types.js.map +1 -0
- package/dist/entities/system/api/systemApi.d.ts +7 -0
- package/dist/entities/system/api/systemApi.d.ts.map +1 -0
- package/dist/entities/system/api/systemApi.js +60 -0
- package/dist/entities/system/api/systemApi.js.map +1 -0
- package/dist/entities/system/index.d.ts +3 -0
- package/dist/entities/system/index.d.ts.map +1 -0
- package/dist/entities/system/index.js +3 -0
- package/dist/entities/system/index.js.map +1 -0
- package/dist/entities/system/model/types.d.ts +55 -0
- package/dist/entities/system/model/types.d.ts.map +1 -0
- package/dist/entities/system/model/types.js +1 -0
- package/dist/entities/system/model/types.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/shared/api/api.d.ts +18 -0
- package/dist/shared/api/api.d.ts.map +1 -0
- package/dist/shared/api/api.js +74 -0
- package/dist/shared/api/api.js.map +1 -0
- package/dist/shared/api/index.d.ts +3 -0
- package/dist/shared/api/index.d.ts.map +1 -0
- package/dist/shared/api/index.js +3 -0
- package/dist/shared/api/index.js.map +1 -0
- package/dist/shared/api/validation-error/ValidationError.d.ts +7 -0
- package/dist/shared/api/validation-error/ValidationError.d.ts.map +1 -0
- package/dist/shared/api/validation-error/ValidationError.js +1 -0
- package/dist/shared/api/validation-error/ValidationError.js.map +1 -0
- package/dist/shared/api/validation-error/handleValidationError.d.ts +2 -0
- package/dist/shared/api/validation-error/handleValidationError.d.ts.map +1 -0
- package/dist/shared/api/validation-error/handleValidationError.js +24 -0
- package/dist/shared/api/validation-error/handleValidationError.js.map +1 -0
- package/dist/shared/api/validation-error/index.d.ts +3 -0
- package/dist/shared/api/validation-error/index.d.ts.map +1 -0
- package/dist/shared/api/validation-error/index.js +3 -0
- package/dist/shared/api/validation-error/index.js.map +1 -0
- package/dist/shared/api/validation-error/isValidationError.d.ts +3 -0
- package/dist/shared/api/validation-error/isValidationError.d.ts.map +1 -0
- package/dist/shared/api/validation-error/isValidationError.js +11 -0
- package/dist/shared/api/validation-error/isValidationError.js.map +1 -0
- package/dist/shared/lib/getNextPageParam.d.ts +3 -0
- package/dist/shared/lib/getNextPageParam.d.ts.map +1 -0
- package/dist/shared/lib/getNextPageParam.js +4 -0
- package/dist/shared/lib/getNextPageParam.js.map +1 -0
- package/dist/shared/lib/index.d.ts +3 -0
- package/dist/shared/lib/index.d.ts.map +1 -0
- package/dist/shared/lib/index.js +3 -0
- package/dist/shared/lib/index.js.map +1 -0
- package/dist/shared/lib/objectToFormData.d.ts +2 -0
- package/dist/shared/lib/objectToFormData.d.ts.map +1 -0
- package/dist/shared/lib/objectToFormData.js +36 -0
- package/dist/shared/lib/objectToFormData.js.map +1 -0
- package/dist/shared/model/index.d.ts +2 -0
- package/dist/shared/model/index.d.ts.map +1 -0
- package/dist/shared/model/index.js +2 -0
- package/dist/shared/model/index.js.map +1 -0
- package/dist/shared/model/types.d.ts +75 -0
- package/dist/shared/model/types.d.ts.map +1 -0
- package/dist/shared/model/types.js +31 -0
- package/dist/shared/model/types.js.map +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1,898 @@
|
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
import type { PaginatedResponse } from '../../../shared/model';
|
|
3
|
+
export interface BaseProduct {
|
|
4
|
+
/**
|
|
5
|
+
* @example 7175
|
|
6
|
+
*/
|
|
7
|
+
id: number;
|
|
8
|
+
/**
|
|
9
|
+
* 0 для buyme, customer_id для supplier
|
|
10
|
+
*
|
|
11
|
+
* @example 0
|
|
12
|
+
*/
|
|
13
|
+
merchant_id: number;
|
|
14
|
+
/**
|
|
15
|
+
* @example "buyme"
|
|
16
|
+
*/
|
|
17
|
+
product_type: 'buyme' | 'supplier';
|
|
18
|
+
/**
|
|
19
|
+
* @example "тапки Dinamo"
|
|
20
|
+
*/
|
|
21
|
+
name: string;
|
|
22
|
+
/**
|
|
23
|
+
* @example "8245"
|
|
24
|
+
*/
|
|
25
|
+
model: string;
|
|
26
|
+
/**
|
|
27
|
+
* @example false
|
|
28
|
+
*/
|
|
29
|
+
in_favorite: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* @example "100 грн"
|
|
32
|
+
*/
|
|
33
|
+
price: string;
|
|
34
|
+
/**
|
|
35
|
+
* Акційна ціна. null якщо немає акції
|
|
36
|
+
*
|
|
37
|
+
* @example null
|
|
38
|
+
*/
|
|
39
|
+
special: string | null;
|
|
40
|
+
category: {
|
|
41
|
+
/**
|
|
42
|
+
* ID категории
|
|
43
|
+
*
|
|
44
|
+
* @example 138
|
|
45
|
+
*/
|
|
46
|
+
id: number;
|
|
47
|
+
/**
|
|
48
|
+
* Название категории
|
|
49
|
+
*
|
|
50
|
+
* @example "Чоловіче взуття"
|
|
51
|
+
*/
|
|
52
|
+
name: string;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* @example "https://buymeua.xyz/images/no_image.png"
|
|
56
|
+
*/
|
|
57
|
+
thumb: string;
|
|
58
|
+
/**
|
|
59
|
+
* @example "https://buymeua.xyz/images/no_image.png"
|
|
60
|
+
*/
|
|
61
|
+
thumb_small: string;
|
|
62
|
+
/**
|
|
63
|
+
* @example "https://buymeua.xyz/images/no_image.png"
|
|
64
|
+
*/
|
|
65
|
+
thumb_large: string;
|
|
66
|
+
/**
|
|
67
|
+
* URL оригінального зображення для завантаження
|
|
68
|
+
*
|
|
69
|
+
* @example "https://buymeua.xyz/images/original.png"
|
|
70
|
+
*/
|
|
71
|
+
download: string;
|
|
72
|
+
/**
|
|
73
|
+
* URL відео, якщо перша медіа — відео. Поле присутнє тільки при наявності відео
|
|
74
|
+
*/
|
|
75
|
+
video?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Галерея зображень. Присутнє тільки у store-контексті (X-BSTORE-ID)
|
|
78
|
+
*/
|
|
79
|
+
images?: {
|
|
80
|
+
thumb: string;
|
|
81
|
+
popup: string;
|
|
82
|
+
}[];
|
|
83
|
+
/**
|
|
84
|
+
* Buyme-категорія. Присутнє тільки для supplier товарів (product_type=supplier). Може бути null
|
|
85
|
+
*/
|
|
86
|
+
buyme_category?: {
|
|
87
|
+
id: number;
|
|
88
|
+
name: string;
|
|
89
|
+
};
|
|
90
|
+
options: unknown;
|
|
91
|
+
/**
|
|
92
|
+
* Ціна за одиницю. Присутнє тільки при запиті з контексту кошика
|
|
93
|
+
*/
|
|
94
|
+
price_per_unit?: {
|
|
95
|
+
description: string;
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
export declare const baseProductSchema: z.ZodObject<{
|
|
99
|
+
id: z.ZodNumber;
|
|
100
|
+
merchant_id: z.ZodNumber;
|
|
101
|
+
product_type: z.ZodEnum<{
|
|
102
|
+
supplier: "supplier";
|
|
103
|
+
buyme: "buyme";
|
|
104
|
+
}>;
|
|
105
|
+
name: z.ZodString;
|
|
106
|
+
model: z.ZodString;
|
|
107
|
+
in_favorite: z.ZodBoolean;
|
|
108
|
+
price: z.ZodString;
|
|
109
|
+
special: z.ZodNullable<z.ZodString>;
|
|
110
|
+
category: z.ZodObject<{
|
|
111
|
+
id: z.ZodNumber;
|
|
112
|
+
name: z.ZodString;
|
|
113
|
+
}, z.core.$strip>;
|
|
114
|
+
thumb: z.ZodString;
|
|
115
|
+
thumb_small: z.ZodString;
|
|
116
|
+
thumb_large: z.ZodString;
|
|
117
|
+
download: z.ZodString;
|
|
118
|
+
video: z.ZodExactOptional<z.ZodString>;
|
|
119
|
+
images: z.ZodExactOptional<z.ZodArray<z.ZodObject<{
|
|
120
|
+
thumb: z.ZodString;
|
|
121
|
+
popup: z.ZodString;
|
|
122
|
+
}, z.core.$strip>>>;
|
|
123
|
+
buyme_category: z.ZodExactOptional<z.ZodObject<{
|
|
124
|
+
id: z.ZodNumber;
|
|
125
|
+
name: z.ZodString;
|
|
126
|
+
}, z.core.$strip>>;
|
|
127
|
+
options: z.ZodUnknown;
|
|
128
|
+
price_per_unit: z.ZodExactOptional<z.ZodObject<{
|
|
129
|
+
description: z.ZodString;
|
|
130
|
+
}, z.core.$strip>>;
|
|
131
|
+
}, z.core.$strip>;
|
|
132
|
+
/**
|
|
133
|
+
* Поиск товаров с фильтрацией и пагинацией. Использует MeiliSearch для быстрого поиска.
|
|
134
|
+
*/
|
|
135
|
+
export interface GetProductsRequest {
|
|
136
|
+
/**
|
|
137
|
+
* Количество товаров на странице
|
|
138
|
+
*
|
|
139
|
+
* @example 24
|
|
140
|
+
*/
|
|
141
|
+
per_page?: number;
|
|
142
|
+
/**
|
|
143
|
+
* Поисковый запрос (артикул, название товара и т.д.)
|
|
144
|
+
*
|
|
145
|
+
* @example "тапки"
|
|
146
|
+
*/
|
|
147
|
+
core_filter?: string;
|
|
148
|
+
/**
|
|
149
|
+
* Фильтр по акционным товарам
|
|
150
|
+
*
|
|
151
|
+
* @example false
|
|
152
|
+
*/
|
|
153
|
+
filter_has_special?: boolean | null;
|
|
154
|
+
/**
|
|
155
|
+
* Сортировка результатов. Может быть строкой или массивом для множественной сортировки. Формат: "поле|направление". Доступные поля: price (РРЦ), price_drop (дроперская цена), price_cost (себестоимость), price_margin (маржа), top, top_date, quantity, date_added, special, total_sold_quantity (все продажи), sold_last_3_days (продажи за 3 дня), sold_last_7_days (продажи за 7 дней), sold_last_10_days (продажи за 10 дней). Направление: asc или desc.
|
|
156
|
+
*/
|
|
157
|
+
order_by?: string | string[];
|
|
158
|
+
/**
|
|
159
|
+
* Массив ID категорий для фильтрации
|
|
160
|
+
*/
|
|
161
|
+
category_filter?: number[];
|
|
162
|
+
/**
|
|
163
|
+
* Фильтр по значениям опций и складам
|
|
164
|
+
*/
|
|
165
|
+
option_value_filter?: {
|
|
166
|
+
/**
|
|
167
|
+
* @example [10, 20]
|
|
168
|
+
*/
|
|
169
|
+
option_value_ids?: number[];
|
|
170
|
+
/**
|
|
171
|
+
* @example [3, 5]
|
|
172
|
+
*/
|
|
173
|
+
warehouse_ids?: number[];
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
* Фильтр по атрибутам товаров
|
|
177
|
+
*/
|
|
178
|
+
attribute_filter?: {
|
|
179
|
+
/**
|
|
180
|
+
* Массив конкретных значений атрибутов в формате "attribute_id:attribute_value_id". Например: ["12:345", "12:678"] означает "атрибут 12 = значение 345 ИЛИ атрибут 12 = значение 678". ID значений берутся из таблицы attribute_values.
|
|
181
|
+
*
|
|
182
|
+
* @example ["12:345", "12:678", "24:901"]
|
|
183
|
+
*/
|
|
184
|
+
attribute_values?: string[];
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* ID клиента для фильтрации
|
|
188
|
+
*/
|
|
189
|
+
filter_customer_id?: number;
|
|
190
|
+
/**
|
|
191
|
+
* Фильтр по наличию ID клиента
|
|
192
|
+
*/
|
|
193
|
+
filter_has_customer_id?: boolean;
|
|
194
|
+
/**
|
|
195
|
+
* Фильтр по рекламируемым товарам
|
|
196
|
+
*/
|
|
197
|
+
filter_advertised?: boolean;
|
|
198
|
+
/**
|
|
199
|
+
* Массив ID товаров для фильтрации
|
|
200
|
+
*
|
|
201
|
+
* @example [1234, 5678, 9012]
|
|
202
|
+
*/
|
|
203
|
+
filter_product_ids?: number[];
|
|
204
|
+
/**
|
|
205
|
+
* Массив ID товаров для исключения товаров
|
|
206
|
+
*
|
|
207
|
+
* @example [1234, 5678, 9012]
|
|
208
|
+
*/
|
|
209
|
+
filter_exclude_product_ids?: number[];
|
|
210
|
+
/**
|
|
211
|
+
* Фильтр для отображения только бестселлеров (товары, которые покупались хотя бы раз, total_sold_quantity > 0)
|
|
212
|
+
*/
|
|
213
|
+
filter_bestseller?: boolean;
|
|
214
|
+
/**
|
|
215
|
+
* Минимальная цена для фильтрации
|
|
216
|
+
*
|
|
217
|
+
* @example 0
|
|
218
|
+
*/
|
|
219
|
+
price_from?: number;
|
|
220
|
+
/**
|
|
221
|
+
* Максимальная дроперская цена для фильтрации
|
|
222
|
+
*
|
|
223
|
+
* @example 100000
|
|
224
|
+
*/
|
|
225
|
+
price_to?: number;
|
|
226
|
+
/**
|
|
227
|
+
* Минимальная РРЦ (рекомендованная розничная цена) для фильтрации
|
|
228
|
+
*
|
|
229
|
+
* @example 0
|
|
230
|
+
*/
|
|
231
|
+
retail_price_from?: number;
|
|
232
|
+
/**
|
|
233
|
+
* Максимальная РРЦ для фильтрации
|
|
234
|
+
*
|
|
235
|
+
* @example 100000
|
|
236
|
+
*/
|
|
237
|
+
retail_price_to?: number;
|
|
238
|
+
/**
|
|
239
|
+
* Минимальная маржа дропера (разница между РРЦ и дроперской ценой) для фильтрации
|
|
240
|
+
*
|
|
241
|
+
* @example 0
|
|
242
|
+
*/
|
|
243
|
+
margin_from?: number;
|
|
244
|
+
/**
|
|
245
|
+
* Максимальная маржа дропера для фильтрации
|
|
246
|
+
*
|
|
247
|
+
* @example 100000
|
|
248
|
+
*/
|
|
249
|
+
margin_to?: number;
|
|
250
|
+
/**
|
|
251
|
+
* Показывать только товары в корневых категориях
|
|
252
|
+
*/
|
|
253
|
+
only_in_root_category?: boolean;
|
|
254
|
+
/**
|
|
255
|
+
* Тип цены для фильтрации
|
|
256
|
+
*/
|
|
257
|
+
price_type?: 'price' | 'price_drop';
|
|
258
|
+
}
|
|
259
|
+
export interface GetPaginatedProductsRequest extends GetProductsRequest {
|
|
260
|
+
page?: number;
|
|
261
|
+
}
|
|
262
|
+
export interface GetProductsResponse extends PaginatedResponse {
|
|
263
|
+
data: BaseProduct[];
|
|
264
|
+
prices: {
|
|
265
|
+
min: number;
|
|
266
|
+
max: number;
|
|
267
|
+
minFormat: string;
|
|
268
|
+
maxFormat: string;
|
|
269
|
+
};
|
|
270
|
+
/**
|
|
271
|
+
* Диапазон маржи дропера для найденных товаров
|
|
272
|
+
*/
|
|
273
|
+
margins: {
|
|
274
|
+
/**
|
|
275
|
+
* @example 0
|
|
276
|
+
*/
|
|
277
|
+
min: number;
|
|
278
|
+
/**
|
|
279
|
+
* @example 100000
|
|
280
|
+
*/
|
|
281
|
+
max: number;
|
|
282
|
+
/**
|
|
283
|
+
* "0 грн"
|
|
284
|
+
*/
|
|
285
|
+
minFormat: string;
|
|
286
|
+
/**
|
|
287
|
+
* @example "100 000 грн"
|
|
288
|
+
*/
|
|
289
|
+
maxFormat: string;
|
|
290
|
+
};
|
|
291
|
+
/**
|
|
292
|
+
* Диапазон РРЦ (рекомендованная розничная цена) для найденных товаров
|
|
293
|
+
*/
|
|
294
|
+
retail_prices: {
|
|
295
|
+
/**
|
|
296
|
+
* @example 0
|
|
297
|
+
*/
|
|
298
|
+
min: number;
|
|
299
|
+
/**
|
|
300
|
+
* @example 100000
|
|
301
|
+
*/
|
|
302
|
+
max: number;
|
|
303
|
+
/**
|
|
304
|
+
* "0 грн"
|
|
305
|
+
*/
|
|
306
|
+
minFormat: string;
|
|
307
|
+
/**
|
|
308
|
+
* @example "100 000 грн"
|
|
309
|
+
*/
|
|
310
|
+
maxFormat: string;
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Данные товара для QR сканера
|
|
315
|
+
*/
|
|
316
|
+
export interface QRProduct {
|
|
317
|
+
/**
|
|
318
|
+
* ID товара
|
|
319
|
+
*
|
|
320
|
+
* @example 12345
|
|
321
|
+
*/
|
|
322
|
+
product_id: number;
|
|
323
|
+
/**
|
|
324
|
+
* ID варианта опции товара
|
|
325
|
+
*
|
|
326
|
+
* @example 67890
|
|
327
|
+
*/
|
|
328
|
+
product_option_value_id: number;
|
|
329
|
+
/**
|
|
330
|
+
* ID значения опции
|
|
331
|
+
*
|
|
332
|
+
* @example 111
|
|
333
|
+
*/
|
|
334
|
+
option_value_id: number;
|
|
335
|
+
/**
|
|
336
|
+
* ID склада
|
|
337
|
+
*
|
|
338
|
+
* @example 1
|
|
339
|
+
*/
|
|
340
|
+
warehouse_id: number;
|
|
341
|
+
/**
|
|
342
|
+
* Изображение товара
|
|
343
|
+
*
|
|
344
|
+
* @example "https://example.com/image.jpg"
|
|
345
|
+
*/
|
|
346
|
+
thumb: string | null;
|
|
347
|
+
/**
|
|
348
|
+
* Полное название товара с опциями и складом
|
|
349
|
+
*
|
|
350
|
+
* @example "Футболка белая (ABC-123) - размер M - Склад Основной"
|
|
351
|
+
*/
|
|
352
|
+
name: string;
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Поиск товаров по QR коду с возможностью фильтрации.
|
|
356
|
+
*/
|
|
357
|
+
export interface GetProductsByQrRequest {
|
|
358
|
+
/**
|
|
359
|
+
* Штрих-код товара для поиска
|
|
360
|
+
*
|
|
361
|
+
* @example "1234567890123"
|
|
362
|
+
*/
|
|
363
|
+
'filter[barcode]'?: string;
|
|
364
|
+
/**
|
|
365
|
+
* ID товара для фильтрации
|
|
366
|
+
*
|
|
367
|
+
* @example 12345
|
|
368
|
+
*/
|
|
369
|
+
'filter[product_id]'?: number;
|
|
370
|
+
/**
|
|
371
|
+
* ID склада для фильтрации
|
|
372
|
+
*
|
|
373
|
+
* @example 1
|
|
374
|
+
*/
|
|
375
|
+
warehouse_id?: number;
|
|
376
|
+
/**
|
|
377
|
+
* Показать все размеры отдельно (без группировки по product_id)
|
|
378
|
+
*
|
|
379
|
+
* @example true
|
|
380
|
+
*/
|
|
381
|
+
show_sizes?: boolean;
|
|
382
|
+
/**
|
|
383
|
+
* Количество элементов на странице
|
|
384
|
+
*
|
|
385
|
+
* @example 15
|
|
386
|
+
*/
|
|
387
|
+
per_page?: number;
|
|
388
|
+
}
|
|
389
|
+
export interface GetProductsByQrResponse extends PaginatedResponse {
|
|
390
|
+
/**
|
|
391
|
+
* Список товаров для QR сканера
|
|
392
|
+
*
|
|
393
|
+
* @see {@link QRProduct} для описания структуры каждого товара
|
|
394
|
+
*/
|
|
395
|
+
data: QRProduct[];
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* Значение опции товара на складе
|
|
399
|
+
*/
|
|
400
|
+
export interface ProductOptionValue {
|
|
401
|
+
/**
|
|
402
|
+
* ID опции товара
|
|
403
|
+
*
|
|
404
|
+
* @example 0
|
|
405
|
+
*/
|
|
406
|
+
product_option_id: number;
|
|
407
|
+
/**
|
|
408
|
+
* ID значения опции товара
|
|
409
|
+
*
|
|
410
|
+
* @example 138835
|
|
411
|
+
*/
|
|
412
|
+
product_option_value_id: number;
|
|
413
|
+
/**
|
|
414
|
+
* ID склада
|
|
415
|
+
*
|
|
416
|
+
* @example 0
|
|
417
|
+
*/
|
|
418
|
+
warehouse_id: number;
|
|
419
|
+
/**
|
|
420
|
+
* ID значения опции
|
|
421
|
+
*
|
|
422
|
+
* @example 54
|
|
423
|
+
*/
|
|
424
|
+
option_value_id: number;
|
|
425
|
+
/**
|
|
426
|
+
* Название значения опции (например, размер)
|
|
427
|
+
*
|
|
428
|
+
* @example "39"
|
|
429
|
+
*/
|
|
430
|
+
name: string;
|
|
431
|
+
/**
|
|
432
|
+
* Количество на складе
|
|
433
|
+
*
|
|
434
|
+
* @example 99
|
|
435
|
+
*/
|
|
436
|
+
quantity: number;
|
|
437
|
+
/**
|
|
438
|
+
* Отмечен как отсутствующий
|
|
439
|
+
*
|
|
440
|
+
* @example false
|
|
441
|
+
*/
|
|
442
|
+
is_marked_out_stock: boolean;
|
|
443
|
+
}
|
|
444
|
+
export interface ProductWarehouse {
|
|
445
|
+
warehouse_id: number;
|
|
446
|
+
quantity: number;
|
|
447
|
+
name: string;
|
|
448
|
+
options: ProductOptionValue[];
|
|
449
|
+
}
|
|
450
|
+
export interface ProductOption {
|
|
451
|
+
option_id: number;
|
|
452
|
+
value: string | null;
|
|
453
|
+
name: string;
|
|
454
|
+
warehouses: ProductWarehouse[];
|
|
455
|
+
}
|
|
456
|
+
export interface ProductShelf {
|
|
457
|
+
id: number;
|
|
458
|
+
shelving_id: number;
|
|
459
|
+
qr_code: string;
|
|
460
|
+
name: string;
|
|
461
|
+
height: number;
|
|
462
|
+
created_at: string;
|
|
463
|
+
updated_at: string;
|
|
464
|
+
pivot: {
|
|
465
|
+
product_id: number;
|
|
466
|
+
shelf_id: number;
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
export interface Product {
|
|
470
|
+
product_id: number;
|
|
471
|
+
model: string;
|
|
472
|
+
manufacturer: string | null;
|
|
473
|
+
thumb: string | null;
|
|
474
|
+
name: string;
|
|
475
|
+
description: string;
|
|
476
|
+
price_recommended: string;
|
|
477
|
+
price: string;
|
|
478
|
+
special: string | null;
|
|
479
|
+
options: ProductOption[];
|
|
480
|
+
allOptions: ProductOption[];
|
|
481
|
+
minimum: number;
|
|
482
|
+
reviews: number;
|
|
483
|
+
in_wishlist: boolean;
|
|
484
|
+
push_subscribe: boolean;
|
|
485
|
+
subscribe: unknown;
|
|
486
|
+
shelves: ProductShelf[];
|
|
487
|
+
}
|
|
488
|
+
export interface GetProductRequest {
|
|
489
|
+
product: number;
|
|
490
|
+
}
|
|
491
|
+
export interface GetProductResponse {
|
|
492
|
+
data: Product;
|
|
493
|
+
}
|
|
494
|
+
export interface GetProductStatisticsRequest {
|
|
495
|
+
product: number;
|
|
496
|
+
}
|
|
497
|
+
export interface GetProductStatisticsResponse {
|
|
498
|
+
received: {
|
|
499
|
+
total: number;
|
|
500
|
+
percent: number;
|
|
501
|
+
};
|
|
502
|
+
cancelled: {
|
|
503
|
+
total: number;
|
|
504
|
+
percent: number;
|
|
505
|
+
};
|
|
506
|
+
total_count: number;
|
|
507
|
+
}
|
|
508
|
+
export interface ProductSubscribe {
|
|
509
|
+
product_option_value_id: number;
|
|
510
|
+
size: string | null;
|
|
511
|
+
}
|
|
512
|
+
export interface ProductDetails {
|
|
513
|
+
product_id: number;
|
|
514
|
+
customer_id: number;
|
|
515
|
+
model: string;
|
|
516
|
+
external_model: string | null;
|
|
517
|
+
name: string;
|
|
518
|
+
description: string;
|
|
519
|
+
product_type: BaseProduct['product_type'];
|
|
520
|
+
price_recommended: string;
|
|
521
|
+
price: string;
|
|
522
|
+
price_drop: string;
|
|
523
|
+
price_cost: string;
|
|
524
|
+
price_pre_pay: string;
|
|
525
|
+
wholesale_prices: {
|
|
526
|
+
price: number;
|
|
527
|
+
price_format: string;
|
|
528
|
+
quantity: number;
|
|
529
|
+
large_price: number;
|
|
530
|
+
large_price_format: string;
|
|
531
|
+
large_quantity: number;
|
|
532
|
+
individual_quantity: number | null;
|
|
533
|
+
individual_large_quantity: number | null;
|
|
534
|
+
};
|
|
535
|
+
special: string | null;
|
|
536
|
+
price_special_recommended: string | null;
|
|
537
|
+
minimum: number;
|
|
538
|
+
in_stock: boolean;
|
|
539
|
+
in_wishlist: boolean;
|
|
540
|
+
in_favorite: boolean;
|
|
541
|
+
push_subscribe: boolean;
|
|
542
|
+
manufacturer: string | null;
|
|
543
|
+
main_category_id: number | null;
|
|
544
|
+
categories: {
|
|
545
|
+
product_id: number;
|
|
546
|
+
category_id: number;
|
|
547
|
+
main_category: boolean;
|
|
548
|
+
}[];
|
|
549
|
+
reviews: number;
|
|
550
|
+
subscribe: ProductSubscribe | null;
|
|
551
|
+
table_size: string | null;
|
|
552
|
+
images: {
|
|
553
|
+
media_id: number;
|
|
554
|
+
thumb: string;
|
|
555
|
+
original: string;
|
|
556
|
+
download: string;
|
|
557
|
+
path: string;
|
|
558
|
+
size: number;
|
|
559
|
+
mime_type: string;
|
|
560
|
+
video: boolean;
|
|
561
|
+
sort_order: number;
|
|
562
|
+
main: boolean;
|
|
563
|
+
}[];
|
|
564
|
+
options: ProductOption[];
|
|
565
|
+
allOptions: ProductOption[];
|
|
566
|
+
attributes: ProductAttributeGroup[];
|
|
567
|
+
individual_price: number | null;
|
|
568
|
+
count_of_sales: number;
|
|
569
|
+
store_template: unknown;
|
|
570
|
+
}
|
|
571
|
+
export interface GetProductDetailsRequest {
|
|
572
|
+
product: number;
|
|
573
|
+
}
|
|
574
|
+
export interface GetProductDetailsResponse {
|
|
575
|
+
data: ProductDetails;
|
|
576
|
+
}
|
|
577
|
+
export interface GetProductAttributesRequest {
|
|
578
|
+
search?: string;
|
|
579
|
+
product_id?: number;
|
|
580
|
+
category_id?: number;
|
|
581
|
+
attribute_ids?: number[];
|
|
582
|
+
option_value_filter?: GetProductsRequest['option_value_filter'];
|
|
583
|
+
attribute_filter?: GetProductsRequest['attribute_filter'];
|
|
584
|
+
}
|
|
585
|
+
export interface GetProductAttributesResponse {
|
|
586
|
+
data: {
|
|
587
|
+
id: number;
|
|
588
|
+
name: string;
|
|
589
|
+
values: {
|
|
590
|
+
id: number;
|
|
591
|
+
value: string;
|
|
592
|
+
count: number;
|
|
593
|
+
}[];
|
|
594
|
+
values_count: number;
|
|
595
|
+
}[];
|
|
596
|
+
}
|
|
597
|
+
export interface GetProductOptionsRequest {
|
|
598
|
+
search?: string;
|
|
599
|
+
product_id?: number;
|
|
600
|
+
category_id?: number;
|
|
601
|
+
option_id?: number;
|
|
602
|
+
option_value_ids?: number[];
|
|
603
|
+
warehouse_ids?: number[];
|
|
604
|
+
attribute_filter?: GetProductsRequest['attribute_filter'];
|
|
605
|
+
}
|
|
606
|
+
export interface GetProductOptionsResponse {
|
|
607
|
+
data: {
|
|
608
|
+
option_id: number;
|
|
609
|
+
option_name: string;
|
|
610
|
+
values: {
|
|
611
|
+
option_value_id: number;
|
|
612
|
+
value: string;
|
|
613
|
+
quantity: number;
|
|
614
|
+
}[];
|
|
615
|
+
}[];
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* Позволяет искать товары поставщика по фильтрам: строка поиска, категории, опции, диапазон цен и др.
|
|
619
|
+
*/
|
|
620
|
+
export interface GetSupplierProductsRequest {
|
|
621
|
+
/**
|
|
622
|
+
* @example "Кроссовки"
|
|
623
|
+
*/
|
|
624
|
+
core_filter?: string;
|
|
625
|
+
/**
|
|
626
|
+
* @example [1, 5, 9]
|
|
627
|
+
*/
|
|
628
|
+
category_filter?: number[];
|
|
629
|
+
/**
|
|
630
|
+
* @example [1, 5, 9]
|
|
631
|
+
*/
|
|
632
|
+
buyme_category_filter?: number[];
|
|
633
|
+
/**
|
|
634
|
+
* Фильтр по товарам, у которых установлена главная категория BuyMe
|
|
635
|
+
*
|
|
636
|
+
* @example true
|
|
637
|
+
*/
|
|
638
|
+
filter_buyme_category_set_main_category?: boolean;
|
|
639
|
+
/**
|
|
640
|
+
* ID клиента для фильтрации товаров
|
|
641
|
+
*
|
|
642
|
+
* @example 123
|
|
643
|
+
*/
|
|
644
|
+
filter_customer_id?: number;
|
|
645
|
+
/**
|
|
646
|
+
* Массив ID поставщиков, товары которых нужно исключить из результатов
|
|
647
|
+
*
|
|
648
|
+
* @example [456, 789]
|
|
649
|
+
*/
|
|
650
|
+
filter_exclude_supplier_ids?: number[];
|
|
651
|
+
/**
|
|
652
|
+
* Фильтр по рекламируемым товарам
|
|
653
|
+
*
|
|
654
|
+
* @example true
|
|
655
|
+
*/
|
|
656
|
+
filter_advertised?: boolean;
|
|
657
|
+
/**
|
|
658
|
+
* Фильтр только по товарам в корневой категории
|
|
659
|
+
*
|
|
660
|
+
* @example false
|
|
661
|
+
*/
|
|
662
|
+
only_in_root_category?: boolean;
|
|
663
|
+
/**
|
|
664
|
+
* @see {@link GetProductsRequest.option_value_filter} для подробной информации о полях
|
|
665
|
+
*/
|
|
666
|
+
option_value_filter?: GetProductsRequest['option_value_filter'];
|
|
667
|
+
/**
|
|
668
|
+
* @example 100
|
|
669
|
+
*/
|
|
670
|
+
price_from?: number;
|
|
671
|
+
/**
|
|
672
|
+
* @example 1000
|
|
673
|
+
*/
|
|
674
|
+
price_to?: number;
|
|
675
|
+
/**
|
|
676
|
+
* @example 20
|
|
677
|
+
*/
|
|
678
|
+
per_page?: number;
|
|
679
|
+
/**
|
|
680
|
+
* Тип цены для отображения в ответе: price - обычная цена, price_drop - дроп цена
|
|
681
|
+
*
|
|
682
|
+
* @example "price_drop"
|
|
683
|
+
*/
|
|
684
|
+
price_type?: 'price' | 'price_drop';
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
* Позволяет искать товары поставщика с постраничной навигацией по фильтрам: строка поиска, категории, опции, диапазон цен и др.
|
|
688
|
+
*/
|
|
689
|
+
export interface GetPaginatedSupplierProductsRequest extends GetSupplierProductsRequest {
|
|
690
|
+
page?: number;
|
|
691
|
+
}
|
|
692
|
+
/**
|
|
693
|
+
* Успешный ответ с товарами и диапазоном цен
|
|
694
|
+
*/
|
|
695
|
+
export interface GetSupplierProductsResponse extends PaginatedResponse {
|
|
696
|
+
data: BaseProduct[];
|
|
697
|
+
prices: {
|
|
698
|
+
/**
|
|
699
|
+
* @example 99.99
|
|
700
|
+
*/
|
|
701
|
+
min: number;
|
|
702
|
+
/**
|
|
703
|
+
* @example 999.99
|
|
704
|
+
*/
|
|
705
|
+
max: number;
|
|
706
|
+
};
|
|
707
|
+
}
|
|
708
|
+
export interface ProductAttributeGroup {
|
|
709
|
+
id: number;
|
|
710
|
+
group_name: string;
|
|
711
|
+
attributes: ProductAttribute[];
|
|
712
|
+
}
|
|
713
|
+
export interface ProductAttribute {
|
|
714
|
+
attribute_id: number;
|
|
715
|
+
attribute_value_id: number;
|
|
716
|
+
value: string;
|
|
717
|
+
attribute: {
|
|
718
|
+
id: number;
|
|
719
|
+
attribute_group_id: number;
|
|
720
|
+
group_name: string;
|
|
721
|
+
name: string;
|
|
722
|
+
sort_order: number;
|
|
723
|
+
};
|
|
724
|
+
}
|
|
725
|
+
export interface SupplierProductDetails {
|
|
726
|
+
product_id: number;
|
|
727
|
+
customer_id: number;
|
|
728
|
+
model: string;
|
|
729
|
+
external_model: string;
|
|
730
|
+
name: string;
|
|
731
|
+
description: string;
|
|
732
|
+
product_type: BaseProduct['product_type'];
|
|
733
|
+
price: string;
|
|
734
|
+
price_drop: string;
|
|
735
|
+
special: string | null;
|
|
736
|
+
in_stock: boolean;
|
|
737
|
+
in_favorite: boolean;
|
|
738
|
+
images: {
|
|
739
|
+
media_id: number;
|
|
740
|
+
thumb: string;
|
|
741
|
+
original: string;
|
|
742
|
+
download: string;
|
|
743
|
+
main: boolean;
|
|
744
|
+
}[];
|
|
745
|
+
options: ProductOption[];
|
|
746
|
+
allOptions: ProductOption[];
|
|
747
|
+
attributes: ProductAttributeGroup[];
|
|
748
|
+
main_category_id: number;
|
|
749
|
+
categories: {
|
|
750
|
+
product_id: number;
|
|
751
|
+
category_id: number;
|
|
752
|
+
main_category: boolean;
|
|
753
|
+
}[];
|
|
754
|
+
reviews: number;
|
|
755
|
+
subscribe: string | null;
|
|
756
|
+
individual_price: string | null;
|
|
757
|
+
count_of_sales: number | null;
|
|
758
|
+
}
|
|
759
|
+
export interface GetSupplierProductDetailsRequest {
|
|
760
|
+
id: number;
|
|
761
|
+
}
|
|
762
|
+
export interface GetSupplierProductDetailsResponse {
|
|
763
|
+
data: SupplierProductDetails;
|
|
764
|
+
}
|
|
765
|
+
/**
|
|
766
|
+
* Опция товара в заказе
|
|
767
|
+
*/
|
|
768
|
+
export interface OrderProductOption {
|
|
769
|
+
/**
|
|
770
|
+
* ID склада
|
|
771
|
+
*
|
|
772
|
+
* @example 0
|
|
773
|
+
*/
|
|
774
|
+
warehouse_id: number;
|
|
775
|
+
/**
|
|
776
|
+
* ID опции заказа
|
|
777
|
+
*
|
|
778
|
+
* @example 616123
|
|
779
|
+
*/
|
|
780
|
+
order_option_id: number;
|
|
781
|
+
/**
|
|
782
|
+
* ID значения опции
|
|
783
|
+
*
|
|
784
|
+
* @example 54
|
|
785
|
+
*/
|
|
786
|
+
option_value_id: number;
|
|
787
|
+
/**
|
|
788
|
+
* Название опции
|
|
789
|
+
*
|
|
790
|
+
* @example Размер обуви
|
|
791
|
+
*/
|
|
792
|
+
name: string;
|
|
793
|
+
/**
|
|
794
|
+
* Название склада
|
|
795
|
+
*
|
|
796
|
+
* @example Основной склад
|
|
797
|
+
*/
|
|
798
|
+
warehouse_name: string;
|
|
799
|
+
/**
|
|
800
|
+
* Значение опции
|
|
801
|
+
*
|
|
802
|
+
* @example 39
|
|
803
|
+
*/
|
|
804
|
+
value: string;
|
|
805
|
+
/**
|
|
806
|
+
* Черновик (не проведено по складу)
|
|
807
|
+
*
|
|
808
|
+
* @example 0
|
|
809
|
+
*/
|
|
810
|
+
draft: number;
|
|
811
|
+
/**
|
|
812
|
+
* Сброс остатков
|
|
813
|
+
*
|
|
814
|
+
* @example false
|
|
815
|
+
*/
|
|
816
|
+
is_stock_reset: boolean;
|
|
817
|
+
/**
|
|
818
|
+
* Доставлено
|
|
819
|
+
*
|
|
820
|
+
* @example null
|
|
821
|
+
*/
|
|
822
|
+
is_delivered: boolean | null;
|
|
823
|
+
/**
|
|
824
|
+
* Количество
|
|
825
|
+
*
|
|
826
|
+
* @example 1
|
|
827
|
+
*/
|
|
828
|
+
quantity: number;
|
|
829
|
+
/**
|
|
830
|
+
* Сумма к оплате за единицу
|
|
831
|
+
*
|
|
832
|
+
* @example null
|
|
833
|
+
*/
|
|
834
|
+
total_pay_per_unit: number | null;
|
|
835
|
+
/**
|
|
836
|
+
* Тип цены
|
|
837
|
+
*/
|
|
838
|
+
price_type: string;
|
|
839
|
+
/**
|
|
840
|
+
* Ожидается до (дата или текст)
|
|
841
|
+
*
|
|
842
|
+
* @example null
|
|
843
|
+
*/
|
|
844
|
+
waiting_until: string | null;
|
|
845
|
+
}
|
|
846
|
+
/**
|
|
847
|
+
* Расширяет базовый ProductListResource дополнительными полями для заказа
|
|
848
|
+
*/
|
|
849
|
+
export interface OrderProduct extends BaseProduct {
|
|
850
|
+
/**
|
|
851
|
+
* ID товара в заказе
|
|
852
|
+
*
|
|
853
|
+
* @example 616283
|
|
854
|
+
*/
|
|
855
|
+
order_product_id: number;
|
|
856
|
+
/**
|
|
857
|
+
* Количество товара в заказе
|
|
858
|
+
*
|
|
859
|
+
* @example 1
|
|
860
|
+
*/
|
|
861
|
+
quantity: number;
|
|
862
|
+
/**
|
|
863
|
+
* Общая стоимость (форматированная)
|
|
864
|
+
*
|
|
865
|
+
* @example "204 грн"
|
|
866
|
+
*/
|
|
867
|
+
total: string;
|
|
868
|
+
/**
|
|
869
|
+
* Информация о полках хранения товара
|
|
870
|
+
*
|
|
871
|
+
* @example "A1, B2"
|
|
872
|
+
*/
|
|
873
|
+
shelves: string;
|
|
874
|
+
options: OrderProductOption[];
|
|
875
|
+
}
|
|
876
|
+
/**
|
|
877
|
+
* Генерирует описание товара с использованием OpenAI ChatGPT-4.
|
|
878
|
+
*/
|
|
879
|
+
export interface GenerateProductDescriptionRequest {
|
|
880
|
+
/**
|
|
881
|
+
* ID товара для генерации описания
|
|
882
|
+
*
|
|
883
|
+
* @example 12345
|
|
884
|
+
*/
|
|
885
|
+
product: number;
|
|
886
|
+
}
|
|
887
|
+
/**
|
|
888
|
+
* Описание успешно сгенерировано
|
|
889
|
+
*/
|
|
890
|
+
export interface GenerateProductDescriptionResponse {
|
|
891
|
+
/**
|
|
892
|
+
* Сгенерированное описание товара
|
|
893
|
+
*
|
|
894
|
+
* @example "Высококачественный товар с отличными характеристиками..."
|
|
895
|
+
*/
|
|
896
|
+
description: string;
|
|
897
|
+
}
|
|
898
|
+
//# sourceMappingURL=types.d.ts.map
|