@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,853 @@
|
|
|
1
|
+
import type { PaginatedResponse } from '../../../shared/model';
|
|
2
|
+
import type { BaseProduct } from '../../product';
|
|
3
|
+
/**
|
|
4
|
+
* Базовая схема для магазина
|
|
5
|
+
*/
|
|
6
|
+
export interface BaseStore {
|
|
7
|
+
/**
|
|
8
|
+
* @example 12
|
|
9
|
+
*/
|
|
10
|
+
id: number;
|
|
11
|
+
/**
|
|
12
|
+
* @example 5
|
|
13
|
+
*/
|
|
14
|
+
category_id: number;
|
|
15
|
+
/**
|
|
16
|
+
* @example "Zvytyaga Tactical"
|
|
17
|
+
*/
|
|
18
|
+
name: string;
|
|
19
|
+
/**
|
|
20
|
+
* @example "zvytyaga"
|
|
21
|
+
*/
|
|
22
|
+
link: string;
|
|
23
|
+
/**
|
|
24
|
+
* @example "active"
|
|
25
|
+
*/
|
|
26
|
+
status: string;
|
|
27
|
+
/**
|
|
28
|
+
* @example "zvytyaga.shop"
|
|
29
|
+
*/
|
|
30
|
+
full_domain: string | null;
|
|
31
|
+
/**
|
|
32
|
+
* @example "https://zvytyaga.shop"
|
|
33
|
+
*/
|
|
34
|
+
store_url: string | null;
|
|
35
|
+
}
|
|
36
|
+
export interface StoreTemplate {
|
|
37
|
+
/**
|
|
38
|
+
* @example 1
|
|
39
|
+
*/
|
|
40
|
+
id: number;
|
|
41
|
+
/**
|
|
42
|
+
* @example 12345
|
|
43
|
+
*/
|
|
44
|
+
product_id: number;
|
|
45
|
+
/**
|
|
46
|
+
* @example "Default Template"
|
|
47
|
+
*/
|
|
48
|
+
name: string;
|
|
49
|
+
/**
|
|
50
|
+
* @example "template-repo"
|
|
51
|
+
*/
|
|
52
|
+
repository: string;
|
|
53
|
+
/**
|
|
54
|
+
* @example "https://example.com/placeholder.png"
|
|
55
|
+
*/
|
|
56
|
+
placeholder: string | null;
|
|
57
|
+
gallery: string[] | null;
|
|
58
|
+
/**
|
|
59
|
+
* @example "web"
|
|
60
|
+
*/
|
|
61
|
+
type: string;
|
|
62
|
+
}
|
|
63
|
+
export interface StorePhone {
|
|
64
|
+
/**
|
|
65
|
+
* @example "0931234567"
|
|
66
|
+
*/
|
|
67
|
+
original: string;
|
|
68
|
+
/**
|
|
69
|
+
* @example "+380931234567"
|
|
70
|
+
*/
|
|
71
|
+
e164: string;
|
|
72
|
+
/**
|
|
73
|
+
* @example "+380 93 123 45 67"
|
|
74
|
+
*/
|
|
75
|
+
international: string;
|
|
76
|
+
/**
|
|
77
|
+
* @example "093 123 45 67"
|
|
78
|
+
*/
|
|
79
|
+
national: string;
|
|
80
|
+
/**
|
|
81
|
+
* @example "093 123 45 67"
|
|
82
|
+
*/
|
|
83
|
+
mobile: string;
|
|
84
|
+
}
|
|
85
|
+
export interface StoreBanner {
|
|
86
|
+
/**
|
|
87
|
+
* @example 324841
|
|
88
|
+
*/
|
|
89
|
+
media_id: number;
|
|
90
|
+
/**
|
|
91
|
+
* @example "https://cdn.example.com/banner-gallery.jpg"
|
|
92
|
+
*/
|
|
93
|
+
thumb: string | null;
|
|
94
|
+
/**
|
|
95
|
+
* @example "https://cdn.example.com/banner.jpg"
|
|
96
|
+
*/
|
|
97
|
+
original: string | null;
|
|
98
|
+
/**
|
|
99
|
+
* @example "324841/banner.jpg"
|
|
100
|
+
*/
|
|
101
|
+
path: string | null;
|
|
102
|
+
/**
|
|
103
|
+
* @example "94663"
|
|
104
|
+
*/
|
|
105
|
+
size: number;
|
|
106
|
+
/**
|
|
107
|
+
* @example "image/jpeg"
|
|
108
|
+
*/
|
|
109
|
+
mime_type: string;
|
|
110
|
+
/**
|
|
111
|
+
* @example false
|
|
112
|
+
*/
|
|
113
|
+
video: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* @example 0
|
|
116
|
+
*/
|
|
117
|
+
sort_order: number;
|
|
118
|
+
/**
|
|
119
|
+
* @example false
|
|
120
|
+
*/
|
|
121
|
+
main: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* @example 12345
|
|
124
|
+
*/
|
|
125
|
+
product_id: number | null;
|
|
126
|
+
product_type: BaseProduct['product_type'] | null;
|
|
127
|
+
/**
|
|
128
|
+
* @example 100
|
|
129
|
+
*/
|
|
130
|
+
category_id: number | null;
|
|
131
|
+
category_type: BaseProduct['product_type'] | null;
|
|
132
|
+
/**
|
|
133
|
+
* @example "Великий розпродаж"
|
|
134
|
+
*/
|
|
135
|
+
h1: string | null;
|
|
136
|
+
/**
|
|
137
|
+
* @example "Знижки до 50%"
|
|
138
|
+
*/
|
|
139
|
+
description: string | null;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Дані власника магазину
|
|
143
|
+
*/
|
|
144
|
+
export interface StoreUser {
|
|
145
|
+
/**
|
|
146
|
+
* ID клієнта
|
|
147
|
+
*
|
|
148
|
+
* @example 14717
|
|
149
|
+
*/
|
|
150
|
+
customer_id: number;
|
|
151
|
+
/**
|
|
152
|
+
* Чи є постачальником
|
|
153
|
+
*
|
|
154
|
+
* @example true
|
|
155
|
+
*/
|
|
156
|
+
is_supplier: boolean;
|
|
157
|
+
}
|
|
158
|
+
export interface StoreCategory {
|
|
159
|
+
/**
|
|
160
|
+
* @example 1
|
|
161
|
+
*/
|
|
162
|
+
id: number;
|
|
163
|
+
/**
|
|
164
|
+
* @example 0
|
|
165
|
+
*/
|
|
166
|
+
parent_id: number;
|
|
167
|
+
/**
|
|
168
|
+
* @example "Електроніка"
|
|
169
|
+
*/
|
|
170
|
+
name: string;
|
|
171
|
+
icon: string;
|
|
172
|
+
thumb: string;
|
|
173
|
+
thumb_small: string;
|
|
174
|
+
thumb_large: string;
|
|
175
|
+
/**
|
|
176
|
+
* @example "all"
|
|
177
|
+
*/
|
|
178
|
+
mode: 'all' | 'only' | 'exclude';
|
|
179
|
+
products: number[];
|
|
180
|
+
price_markup_type: 'percent' | 'fixed' | null;
|
|
181
|
+
price_markup_value: number | null;
|
|
182
|
+
excluded_supplier_ids: number[];
|
|
183
|
+
childrens: StoreCategory[];
|
|
184
|
+
}
|
|
185
|
+
export type StoreType = 'web' | 'mobile';
|
|
186
|
+
export interface StoreArticle {
|
|
187
|
+
/**
|
|
188
|
+
* @example 1
|
|
189
|
+
*/
|
|
190
|
+
id: number;
|
|
191
|
+
/**
|
|
192
|
+
* @example 1
|
|
193
|
+
*/
|
|
194
|
+
store_id: number;
|
|
195
|
+
/**
|
|
196
|
+
* @example 0
|
|
197
|
+
*/
|
|
198
|
+
sort_order: number;
|
|
199
|
+
/**
|
|
200
|
+
* @example true
|
|
201
|
+
*/
|
|
202
|
+
show_in_header: boolean;
|
|
203
|
+
/**
|
|
204
|
+
* @example true
|
|
205
|
+
*/
|
|
206
|
+
show_in_footer: boolean;
|
|
207
|
+
/**
|
|
208
|
+
* @example "page"
|
|
209
|
+
*/
|
|
210
|
+
type: string | null;
|
|
211
|
+
/**
|
|
212
|
+
* Статус статті
|
|
213
|
+
*
|
|
214
|
+
* @example "draft"
|
|
215
|
+
*/
|
|
216
|
+
status: 'published' | 'draft';
|
|
217
|
+
/**
|
|
218
|
+
* Дата створення
|
|
219
|
+
*
|
|
220
|
+
* @example "2026-02-03T12:00:00.000Z"
|
|
221
|
+
*/
|
|
222
|
+
created_at: string;
|
|
223
|
+
/**
|
|
224
|
+
* Дата оновлення
|
|
225
|
+
*
|
|
226
|
+
* @example "2026-02-03T12:00:00.000Z"
|
|
227
|
+
*/
|
|
228
|
+
updated_at: string;
|
|
229
|
+
translation: StoreTranslation;
|
|
230
|
+
translations: StoreTranslation[];
|
|
231
|
+
}
|
|
232
|
+
export interface Store {
|
|
233
|
+
/**
|
|
234
|
+
* @example 1
|
|
235
|
+
*/
|
|
236
|
+
id: number;
|
|
237
|
+
main_info: {
|
|
238
|
+
/**
|
|
239
|
+
* @example 1
|
|
240
|
+
*/
|
|
241
|
+
store_template_id: number;
|
|
242
|
+
/**
|
|
243
|
+
* @example 12345
|
|
244
|
+
*/
|
|
245
|
+
product_id: number | null;
|
|
246
|
+
/**
|
|
247
|
+
* @example "my-shop"
|
|
248
|
+
*/
|
|
249
|
+
name: string;
|
|
250
|
+
/**
|
|
251
|
+
* @example "my-shop"
|
|
252
|
+
*/
|
|
253
|
+
link: string;
|
|
254
|
+
/**
|
|
255
|
+
* @example "https://example.com/logo.png"
|
|
256
|
+
*/
|
|
257
|
+
logo: string | null;
|
|
258
|
+
/**
|
|
259
|
+
* @example 1
|
|
260
|
+
*/
|
|
261
|
+
logo_media_id: number | null;
|
|
262
|
+
/**
|
|
263
|
+
* @example "https://example.com/icon.png"
|
|
264
|
+
*/
|
|
265
|
+
icon_mobile: string | null;
|
|
266
|
+
/**
|
|
267
|
+
* @example 2
|
|
268
|
+
*/
|
|
269
|
+
icon_mobile_media_id: number | null;
|
|
270
|
+
/**
|
|
271
|
+
* @example "https://example.com/favicon.ico"
|
|
272
|
+
*/
|
|
273
|
+
favicon: string | null;
|
|
274
|
+
/**
|
|
275
|
+
* @example 3
|
|
276
|
+
*/
|
|
277
|
+
favicon_media_id: number | null;
|
|
278
|
+
head: unknown;
|
|
279
|
+
body: unknown;
|
|
280
|
+
/**
|
|
281
|
+
* @example "active"
|
|
282
|
+
*/
|
|
283
|
+
status: 'draft' | 'unpaid' | 'in_process' | 'active' | 'inactive' | 'failed';
|
|
284
|
+
/**
|
|
285
|
+
* @example ['web', 'mobile']
|
|
286
|
+
*/
|
|
287
|
+
store_types: StoreType[] | null;
|
|
288
|
+
/**
|
|
289
|
+
* @example 1
|
|
290
|
+
*/
|
|
291
|
+
current_step: number;
|
|
292
|
+
/**
|
|
293
|
+
* @see {@link StoreUser}
|
|
294
|
+
*/
|
|
295
|
+
user: StoreUser;
|
|
296
|
+
/**
|
|
297
|
+
* @see {@link StoreTemplate}
|
|
298
|
+
*/
|
|
299
|
+
store_template: StoreTemplate | null;
|
|
300
|
+
category: StoreCategory;
|
|
301
|
+
/**
|
|
302
|
+
* Тип ціни магазину
|
|
303
|
+
*
|
|
304
|
+
* @example "price_drop"
|
|
305
|
+
*/
|
|
306
|
+
price_type: 'price' | 'price_drop';
|
|
307
|
+
additional_categories: number[] | null;
|
|
308
|
+
domain: {
|
|
309
|
+
/**
|
|
310
|
+
* @example 1
|
|
311
|
+
*/
|
|
312
|
+
id: number;
|
|
313
|
+
/**
|
|
314
|
+
* @example "buyme.com.ua"
|
|
315
|
+
*/
|
|
316
|
+
domain: string;
|
|
317
|
+
/**
|
|
318
|
+
* @example false
|
|
319
|
+
*/
|
|
320
|
+
is_custom: boolean;
|
|
321
|
+
} | null;
|
|
322
|
+
};
|
|
323
|
+
/**
|
|
324
|
+
* @see {@link StoreBanner}
|
|
325
|
+
*/
|
|
326
|
+
banners: {
|
|
327
|
+
/**
|
|
328
|
+
* @see {@link StoreBanner}
|
|
329
|
+
*/
|
|
330
|
+
desktop: StoreBanner[];
|
|
331
|
+
/**
|
|
332
|
+
* @see {@link StoreBanner}
|
|
333
|
+
*/
|
|
334
|
+
mobile: StoreBanner[];
|
|
335
|
+
};
|
|
336
|
+
contacts: {
|
|
337
|
+
/**
|
|
338
|
+
* @see {@link StorePhone}
|
|
339
|
+
*/
|
|
340
|
+
phone: StorePhone;
|
|
341
|
+
/**
|
|
342
|
+
* @example "shop@example.com"
|
|
343
|
+
*/
|
|
344
|
+
email: string | null;
|
|
345
|
+
description: string | null;
|
|
346
|
+
/**
|
|
347
|
+
* @example "My Shop - Best Products"
|
|
348
|
+
*/
|
|
349
|
+
seo_title: string | null;
|
|
350
|
+
/**
|
|
351
|
+
* @example "Find the best products at My Shop"
|
|
352
|
+
*/
|
|
353
|
+
seo_description: string | null;
|
|
354
|
+
/**
|
|
355
|
+
* @example ["одяг", "взуття"]
|
|
356
|
+
*/
|
|
357
|
+
seo_tags: string[] | null;
|
|
358
|
+
instagram_url: string | null;
|
|
359
|
+
facebook_url: string | null;
|
|
360
|
+
telegram_url: string | null;
|
|
361
|
+
viber_url: string | null;
|
|
362
|
+
tiktok_url: string | null;
|
|
363
|
+
whatsapp_phone: string | null;
|
|
364
|
+
};
|
|
365
|
+
/**
|
|
366
|
+
* @see {@link StoreCategory}
|
|
367
|
+
*/
|
|
368
|
+
categories: StoreCategory[];
|
|
369
|
+
analytics: {
|
|
370
|
+
/**
|
|
371
|
+
* @example "GTM-XXXXXXX"
|
|
372
|
+
*/
|
|
373
|
+
gtm_id: string | null;
|
|
374
|
+
fb_pixel_id: string | null;
|
|
375
|
+
ga_tracking_id: string | null;
|
|
376
|
+
tt_pixel_id: string | null;
|
|
377
|
+
facebook_domain_verification: string | null;
|
|
378
|
+
google_domain_verification: string | null;
|
|
379
|
+
google_merchant_id: string | null;
|
|
380
|
+
/**
|
|
381
|
+
* @example false
|
|
382
|
+
*/
|
|
383
|
+
enable_cookie_consent: boolean;
|
|
384
|
+
};
|
|
385
|
+
/**
|
|
386
|
+
* @see {@link StoreArticle}
|
|
387
|
+
*/
|
|
388
|
+
informations: StoreArticle[];
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* Повертає детальну інформацію про магазин за його ID.
|
|
392
|
+
*
|
|
393
|
+
* Авторизація:
|
|
394
|
+
*
|
|
395
|
+
* Власник магазину — бачить магазин у будь-якому статусі
|
|
396
|
+
* Неавторизований / інший користувач — тільки магазини зі статусом active
|
|
397
|
+
*/
|
|
398
|
+
export interface GetStoreRequest {
|
|
399
|
+
/**
|
|
400
|
+
* ID магазину
|
|
401
|
+
*
|
|
402
|
+
* @example 1
|
|
403
|
+
*/
|
|
404
|
+
store: number;
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Успішна відповідь
|
|
408
|
+
*/
|
|
409
|
+
export interface GetStoreResponse {
|
|
410
|
+
/**
|
|
411
|
+
* @see {@link Store}
|
|
412
|
+
*/
|
|
413
|
+
data: Store;
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Повертає список магазинів поточного користувача зі статусами: draft, unpaid, in_process, active.
|
|
417
|
+
*/
|
|
418
|
+
export interface GetStoresRequest {
|
|
419
|
+
per_page?: number;
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* Список магазинів успішно отримано
|
|
423
|
+
*/
|
|
424
|
+
export interface GetStoresResponse extends PaginatedResponse {
|
|
425
|
+
/**
|
|
426
|
+
* @see {@link Store}
|
|
427
|
+
*/
|
|
428
|
+
data: Store[];
|
|
429
|
+
}
|
|
430
|
+
export interface StoreTranslation {
|
|
431
|
+
/**
|
|
432
|
+
* @example "Про нас"
|
|
433
|
+
*/
|
|
434
|
+
title: string;
|
|
435
|
+
/**
|
|
436
|
+
* @example "Інформація про компанію"
|
|
437
|
+
*/
|
|
438
|
+
description: string;
|
|
439
|
+
/**
|
|
440
|
+
* @example 1
|
|
441
|
+
*/
|
|
442
|
+
language_id: number;
|
|
443
|
+
}
|
|
444
|
+
export interface StoreDomain {
|
|
445
|
+
/**
|
|
446
|
+
* @example 1
|
|
447
|
+
*/
|
|
448
|
+
id: number;
|
|
449
|
+
/**
|
|
450
|
+
* @example "buymeua.com"
|
|
451
|
+
*/
|
|
452
|
+
domain: string;
|
|
453
|
+
/**
|
|
454
|
+
* @example false
|
|
455
|
+
*/
|
|
456
|
+
is_custom: boolean;
|
|
457
|
+
/**
|
|
458
|
+
* @example "2024-01-15T10:30:00.000000Z"
|
|
459
|
+
*/
|
|
460
|
+
created_at: string;
|
|
461
|
+
/**
|
|
462
|
+
* @example "2024-01-15T10:30:00.000000Z"
|
|
463
|
+
*/
|
|
464
|
+
updated_at: string;
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Возвращает список доступных доменов для создания магазина. Показывает только общие (не кастомные) домены, которые установлены по умолчанию. Эти домены используются при создании нового магазина. Результат кэшируется для быстрого доступа.
|
|
468
|
+
*
|
|
469
|
+
* Список доменов успешно получен
|
|
470
|
+
*
|
|
471
|
+
* @see {@link StoreDomain}
|
|
472
|
+
*/
|
|
473
|
+
export interface GetStoreDomainsResponse {
|
|
474
|
+
/**
|
|
475
|
+
* @see {@link StoreDomain}
|
|
476
|
+
*/
|
|
477
|
+
data: StoreDomain[];
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* Перевіряє доступність посилання (link) для магазину. Якщо передано store_domain_id — унікальність перевіряється в межах цього домену.
|
|
481
|
+
*/
|
|
482
|
+
export interface ValidateStoreDomainRequest {
|
|
483
|
+
/**
|
|
484
|
+
* Посилання магазину (a-z, 0-9, дефіс)
|
|
485
|
+
*
|
|
486
|
+
* @example "my-store"
|
|
487
|
+
*/
|
|
488
|
+
link: string;
|
|
489
|
+
/**
|
|
490
|
+
* ID домену для перевірки унікальності в його межах
|
|
491
|
+
*
|
|
492
|
+
* @example 1
|
|
493
|
+
*/
|
|
494
|
+
store_domain_id?: number;
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* Домен доступний
|
|
498
|
+
*/
|
|
499
|
+
export interface ValidateStoreDomainResponse {
|
|
500
|
+
/**
|
|
501
|
+
* @example true
|
|
502
|
+
*/
|
|
503
|
+
available: boolean;
|
|
504
|
+
/**
|
|
505
|
+
* @example "Домен доступен для регистрации"
|
|
506
|
+
*/
|
|
507
|
+
message: string;
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* Not present in swagger docs
|
|
511
|
+
*/
|
|
512
|
+
export interface StorePlatform {
|
|
513
|
+
/**
|
|
514
|
+
* @example "web"
|
|
515
|
+
*/
|
|
516
|
+
type: string;
|
|
517
|
+
/**
|
|
518
|
+
* @example 3500
|
|
519
|
+
*/
|
|
520
|
+
price: number;
|
|
521
|
+
/**
|
|
522
|
+
* @example "3 500 грн/міс"
|
|
523
|
+
*/
|
|
524
|
+
price_formatted: string;
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* Повертає список доступних платформ (web, mobile) з цінами підписки.
|
|
528
|
+
*
|
|
529
|
+
* Список платформ
|
|
530
|
+
*
|
|
531
|
+
* @see {@link StorePlatform}
|
|
532
|
+
*/
|
|
533
|
+
export type GetStorePlatformsResponse = StorePlatform[];
|
|
534
|
+
/**
|
|
535
|
+
* Оплачує створення магазину з сервісного балансу. Змінює статус магазину з 'unpaid' на 'in_process' та запускає процес створення сайту.
|
|
536
|
+
*/
|
|
537
|
+
export interface PayStoreCreationRequest {
|
|
538
|
+
/**
|
|
539
|
+
* ID магазину
|
|
540
|
+
*
|
|
541
|
+
* @example 1
|
|
542
|
+
*/
|
|
543
|
+
store: number;
|
|
544
|
+
}
|
|
545
|
+
/**
|
|
546
|
+
* Магазин успішно оплачено
|
|
547
|
+
*/
|
|
548
|
+
export interface PayStoreCreationResponse {
|
|
549
|
+
/**
|
|
550
|
+
* @see {@link Store}
|
|
551
|
+
*/
|
|
552
|
+
data: Store;
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* Створює новий магазин (Step 1 wizard).
|
|
556
|
+
*
|
|
557
|
+
* Магазин створюється зі статусом 'draft'.
|
|
558
|
+
*
|
|
559
|
+
* Подальше налаштування виконується через storeApi.useUpdateStoreWizardMutation.
|
|
560
|
+
*
|
|
561
|
+
* Після завершення всіх кроків статус змінюється на 'unpaid'.
|
|
562
|
+
*/
|
|
563
|
+
export interface CreateStoreRequest {
|
|
564
|
+
/**
|
|
565
|
+
* Типи магазину
|
|
566
|
+
*
|
|
567
|
+
* @see {@link StoreType}
|
|
568
|
+
*/
|
|
569
|
+
store_types: StoreType[];
|
|
570
|
+
/**
|
|
571
|
+
* Назва магазину
|
|
572
|
+
*/
|
|
573
|
+
name: string;
|
|
574
|
+
/**
|
|
575
|
+
* Субдомен магазину. Обов'язковий без custom_domain_name
|
|
576
|
+
*/
|
|
577
|
+
link?: string;
|
|
578
|
+
/**
|
|
579
|
+
* ID домену. Обов'язковий з link
|
|
580
|
+
*/
|
|
581
|
+
store_domain_id?: number;
|
|
582
|
+
/**
|
|
583
|
+
* Власний домен. Обов'язковий без link
|
|
584
|
+
*/
|
|
585
|
+
custom_domain_name?: string;
|
|
586
|
+
/**
|
|
587
|
+
* ID шаблону магазину
|
|
588
|
+
*/
|
|
589
|
+
store_template_id?: number;
|
|
590
|
+
/**
|
|
591
|
+
* Логотип магазину
|
|
592
|
+
*/
|
|
593
|
+
logo?: File;
|
|
594
|
+
/**
|
|
595
|
+
* Іконка для мобільного
|
|
596
|
+
*/
|
|
597
|
+
icon_mobile?: File;
|
|
598
|
+
/**
|
|
599
|
+
* Фавікон
|
|
600
|
+
*/
|
|
601
|
+
favicon?: File;
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* Магазин успішно створено зі статусом draft
|
|
605
|
+
*/
|
|
606
|
+
export interface CreateStoreResponse {
|
|
607
|
+
/**
|
|
608
|
+
* @see {@link Store}
|
|
609
|
+
*/
|
|
610
|
+
data: Store;
|
|
611
|
+
}
|
|
612
|
+
export interface StoreWizardStep1 {
|
|
613
|
+
/**
|
|
614
|
+
* product_type тепер залежить від типу користувача:
|
|
615
|
+
*
|
|
616
|
+
* Дропшипер: required — обов'язково передавати
|
|
617
|
+
*
|
|
618
|
+
* Постачальник: prohibited — не передавати взагалі
|
|
619
|
+
*/
|
|
620
|
+
product_type?: BaseProduct['product_type'];
|
|
621
|
+
store_types: StoreType[];
|
|
622
|
+
name: string;
|
|
623
|
+
link?: string;
|
|
624
|
+
store_domain_id?: number;
|
|
625
|
+
custom_domain_name?: string;
|
|
626
|
+
store_template_id?: number;
|
|
627
|
+
logo?: File;
|
|
628
|
+
icon_mobile?: File;
|
|
629
|
+
favicon?: File;
|
|
630
|
+
}
|
|
631
|
+
export interface StoreWizardStep2 {
|
|
632
|
+
banners?: {
|
|
633
|
+
/**
|
|
634
|
+
* Обов'язковий без media_id_desktop
|
|
635
|
+
*/
|
|
636
|
+
image_desktop?: File;
|
|
637
|
+
/**
|
|
638
|
+
* Обов'язковий без media_id_mobile
|
|
639
|
+
*/
|
|
640
|
+
image_mobile?: File;
|
|
641
|
+
/**
|
|
642
|
+
* ID існуючого медіа
|
|
643
|
+
*/
|
|
644
|
+
media_id_desktop?: number;
|
|
645
|
+
/**
|
|
646
|
+
* ID існуючого медіа
|
|
647
|
+
*/
|
|
648
|
+
media_id_mobile?: number;
|
|
649
|
+
product_id?: number;
|
|
650
|
+
product_type?: BaseProduct['product_type'];
|
|
651
|
+
category_id?: number;
|
|
652
|
+
category_type?: BaseProduct['product_type'];
|
|
653
|
+
/**
|
|
654
|
+
* Максимум 255 символів
|
|
655
|
+
*/
|
|
656
|
+
h1?: string;
|
|
657
|
+
/**
|
|
658
|
+
* Максимум 1000 символів
|
|
659
|
+
*/
|
|
660
|
+
description?: string;
|
|
661
|
+
/**
|
|
662
|
+
* Мінімум 0
|
|
663
|
+
*/
|
|
664
|
+
sort_order?: number;
|
|
665
|
+
}[];
|
|
666
|
+
}
|
|
667
|
+
export interface StoreWizardStep3 {
|
|
668
|
+
/**
|
|
669
|
+
* Мінімум один тег, максимум 50
|
|
670
|
+
*
|
|
671
|
+
* @example ["одяг"]
|
|
672
|
+
*/
|
|
673
|
+
seo_tags?: string[];
|
|
674
|
+
description?: string;
|
|
675
|
+
/**
|
|
676
|
+
* Мобільний номер
|
|
677
|
+
*
|
|
678
|
+
* @example "0931234567"
|
|
679
|
+
*/
|
|
680
|
+
phone?: string;
|
|
681
|
+
email?: string;
|
|
682
|
+
instagram_url?: string;
|
|
683
|
+
facebook_url?: string;
|
|
684
|
+
telegram_url?: string;
|
|
685
|
+
viber_url?: string;
|
|
686
|
+
tiktok_url?: string;
|
|
687
|
+
whatsapp_phone?: string;
|
|
688
|
+
}
|
|
689
|
+
export interface StoreWizardStep4 {
|
|
690
|
+
price_type: Store['main_info']['price_type'];
|
|
691
|
+
categories: Pick<StoreCategory, 'id'> & Partial<Pick<StoreCategory, 'mode' | 'products' | 'price_markup_type' | 'price_markup_value' | 'excluded_supplier_ids' | 'childrens'>>[];
|
|
692
|
+
/**
|
|
693
|
+
* Глобально виключені постачальники
|
|
694
|
+
*/
|
|
695
|
+
excluded_supplier_ids?: number[];
|
|
696
|
+
}
|
|
697
|
+
export interface StoreWizardStep5 {
|
|
698
|
+
/**
|
|
699
|
+
* Google Tag Manager ID
|
|
700
|
+
*
|
|
701
|
+
* pattern: ^GTM-[A-Z0-9]+$
|
|
702
|
+
*/
|
|
703
|
+
gtm_id?: string;
|
|
704
|
+
/**
|
|
705
|
+
* Facebook Pixel ID (15-16 цифр)
|
|
706
|
+
*
|
|
707
|
+
* pattern: ^\d{15,16}$
|
|
708
|
+
*/
|
|
709
|
+
fb_pixel_id?: string;
|
|
710
|
+
facebook_domain_verification?: string;
|
|
711
|
+
/**
|
|
712
|
+
* TikTok Pixel ID
|
|
713
|
+
*
|
|
714
|
+
* pattern: ^C[A-Z0-9]+$
|
|
715
|
+
*/
|
|
716
|
+
tt_pixel_id?: string;
|
|
717
|
+
/**
|
|
718
|
+
* @example false
|
|
719
|
+
*/
|
|
720
|
+
enable_cookie_consent?: boolean;
|
|
721
|
+
gtm_custom_enabled: boolean;
|
|
722
|
+
gtm_custom_script_url?: string;
|
|
723
|
+
gtm_custom_noscript_url?: string;
|
|
724
|
+
/**
|
|
725
|
+
* Google Analytics ID
|
|
726
|
+
*/
|
|
727
|
+
ga_tracking_id?: string;
|
|
728
|
+
google_domain_verification?: string;
|
|
729
|
+
google_merchant_id?: string;
|
|
730
|
+
}
|
|
731
|
+
export interface StoreWizardStep6 {
|
|
732
|
+
informations?: {
|
|
733
|
+
title: string;
|
|
734
|
+
description: string;
|
|
735
|
+
status: StoreArticle['status'];
|
|
736
|
+
}[];
|
|
737
|
+
}
|
|
738
|
+
interface StoreWizardStepMap {
|
|
739
|
+
1: StoreWizardStep1;
|
|
740
|
+
2: StoreWizardStep2;
|
|
741
|
+
3: StoreWizardStep3;
|
|
742
|
+
4: StoreWizardStep4;
|
|
743
|
+
5: StoreWizardStep5;
|
|
744
|
+
6: StoreWizardStep6;
|
|
745
|
+
}
|
|
746
|
+
/**
|
|
747
|
+
* Покроковий wizard оновлення магазину. Тіло запиту залежить від current_step (1-6).
|
|
748
|
+
*
|
|
749
|
+
* Step 1 — Загальне: назва, домен, шаблон, логотип, іконка, фавікон
|
|
750
|
+
*
|
|
751
|
+
* Step 2 — Банери: масив банерів з медіа-файлами
|
|
752
|
+
*
|
|
753
|
+
* Step 3 — Контакти: опис, SEO-теги, телефон, email, соцмережі
|
|
754
|
+
*
|
|
755
|
+
* Step 4 — Категорії: тип продукту та масив категорій
|
|
756
|
+
*
|
|
757
|
+
* Step 5 — Аналітика: піксели, GTM, верифікація домену, cookie consent
|
|
758
|
+
*
|
|
759
|
+
* Step 6 — Інформаційні сторінки: масив сторінок з title/description
|
|
760
|
+
*
|
|
761
|
+
* Захист від перескакування кроків: для магазинів у статусі draft/unpaid неможливо відправити крок, більший за поточний (current_step). Для активних магазинів обмеження немає — доступне редагування будь-якого кроку.
|
|
762
|
+
*/
|
|
763
|
+
export type UpdateStoreWizardRequest<CurrentStep extends keyof StoreWizardStepMap = keyof StoreWizardStepMap> = {
|
|
764
|
+
/**
|
|
765
|
+
* ID магазину
|
|
766
|
+
*
|
|
767
|
+
* @example 1
|
|
768
|
+
*/
|
|
769
|
+
store: number;
|
|
770
|
+
} & {
|
|
771
|
+
[Step in CurrentStep]: {
|
|
772
|
+
/**
|
|
773
|
+
* @example 1
|
|
774
|
+
*/
|
|
775
|
+
current_step: Step;
|
|
776
|
+
} & StoreWizardStepMap[Step];
|
|
777
|
+
}[CurrentStep];
|
|
778
|
+
/**
|
|
779
|
+
* Крок успішно збережено
|
|
780
|
+
*/
|
|
781
|
+
export interface UpdateStoreWizardResponse {
|
|
782
|
+
/**
|
|
783
|
+
* @see {@link Store}
|
|
784
|
+
*/
|
|
785
|
+
data: Store;
|
|
786
|
+
}
|
|
787
|
+
/**
|
|
788
|
+
* Оновлення аналітичних налаштувань магазину (GTM, пікселі, cookie consent, кастомний loader).
|
|
789
|
+
*/
|
|
790
|
+
export interface UpdateStoreAnalyticsRequest {
|
|
791
|
+
/**
|
|
792
|
+
* @example 1
|
|
793
|
+
*/
|
|
794
|
+
store: number;
|
|
795
|
+
/**
|
|
796
|
+
* Google Tag Manager ID
|
|
797
|
+
*/
|
|
798
|
+
gtm_id?: string;
|
|
799
|
+
/** Facebook Pixel ID (15-16 цифр)
|
|
800
|
+
*/
|
|
801
|
+
fb_pixel_id?: string;
|
|
802
|
+
/**
|
|
803
|
+
* TikTok Pixel ID
|
|
804
|
+
*/
|
|
805
|
+
tt_pixel_id?: string;
|
|
806
|
+
/**
|
|
807
|
+
* Google Analytics ID
|
|
808
|
+
*/
|
|
809
|
+
ga_tracking_id?: string;
|
|
810
|
+
facebook_domain_verification?: string;
|
|
811
|
+
google_domain_verification?: string;
|
|
812
|
+
google_merchant_id?: string;
|
|
813
|
+
/**
|
|
814
|
+
* @example false
|
|
815
|
+
*/
|
|
816
|
+
enable_cookie_consent?: boolean;
|
|
817
|
+
gtm_custom_enabled: boolean;
|
|
818
|
+
gtm_custom_script_url?: string;
|
|
819
|
+
gtm_custom_noscript_url?: string;
|
|
820
|
+
}
|
|
821
|
+
/**
|
|
822
|
+
* Аналітика успішно збережена
|
|
823
|
+
*/
|
|
824
|
+
export interface UpdateStoreAnalyticsResponse {
|
|
825
|
+
/**
|
|
826
|
+
* @see {@link Store}
|
|
827
|
+
*/
|
|
828
|
+
data: Store;
|
|
829
|
+
}
|
|
830
|
+
/**
|
|
831
|
+
* Удаляет магазин. Удаление возможно только для магазина, принадлежащего текущему пользователю.
|
|
832
|
+
*/
|
|
833
|
+
export interface DeleteStoreRequest {
|
|
834
|
+
/**
|
|
835
|
+
* ID магазина для удаления
|
|
836
|
+
*
|
|
837
|
+
* @example 123
|
|
838
|
+
*/
|
|
839
|
+
store: number;
|
|
840
|
+
}
|
|
841
|
+
/**
|
|
842
|
+
* Магазин успешно удален
|
|
843
|
+
*/
|
|
844
|
+
export interface DeleteStoreResponse {
|
|
845
|
+
/**
|
|
846
|
+
* Статус успешного выполнения
|
|
847
|
+
*
|
|
848
|
+
* @example true
|
|
849
|
+
*/
|
|
850
|
+
success: boolean;
|
|
851
|
+
}
|
|
852
|
+
export {};
|
|
853
|
+
//# sourceMappingURL=types.d.ts.map
|