@zenky/storefront-api 0.0.16 → 0.0.18
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/dist/index.d.ts +1069 -1082
- package/dist/zenky-storefront-api.es.js +2 -2
- package/dist/zenky-storefront-api.umd.js +1 -1
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,1301 +1,1288 @@
|
|
|
1
|
-
|
|
2
|
-
export interface ClientConfig {
|
|
3
|
-
baseUrl?: string;
|
|
4
|
-
token?: string;
|
|
5
|
-
client?: string;
|
|
6
|
-
timezone?: string;
|
|
7
|
-
fetchOptions?: any;
|
|
8
|
-
}
|
|
9
|
-
export interface InclusionRequest {
|
|
10
|
-
with?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface PaginationRequest {
|
|
13
|
-
count?: number;
|
|
14
|
-
page?: number;
|
|
15
|
-
}
|
|
16
|
-
export interface SearchRequest {
|
|
17
|
-
search?: string;
|
|
18
|
-
}
|
|
19
|
-
export interface OrderingRequest {
|
|
20
|
-
order_by?: string;
|
|
21
|
-
}
|
|
22
|
-
export interface ListRequest extends PaginationRequest, InclusionRequest, SearchRequest, OrderingRequest {
|
|
23
|
-
}
|
|
24
|
-
export interface Pagination {
|
|
25
|
-
total: number;
|
|
26
|
-
count: number;
|
|
27
|
-
per_page: number;
|
|
28
|
-
current_page: number;
|
|
29
|
-
total_pages: number;
|
|
30
|
-
links: {
|
|
31
|
-
previous?: string | null;
|
|
32
|
-
next?: string | null;
|
|
33
|
-
};
|
|
34
|
-
has_previous_page: boolean;
|
|
35
|
-
has_next_page: boolean;
|
|
36
|
-
elements: {
|
|
37
|
-
type: 'page' | 'placeholder';
|
|
38
|
-
page: number | null;
|
|
39
|
-
active: boolean;
|
|
40
|
-
}[];
|
|
41
|
-
}
|
|
42
|
-
export interface PaginatedResponse<T> {
|
|
43
|
-
items: T[];
|
|
44
|
-
pagination: Pagination;
|
|
45
|
-
}
|
|
46
|
-
export declare class Client {
|
|
47
|
-
private readonly baseUrl;
|
|
48
|
-
private token;
|
|
49
|
-
private readonly client;
|
|
50
|
-
private readonly timezone;
|
|
51
|
-
private readonly fetchFunction;
|
|
52
|
-
private readonly fetchOptions;
|
|
53
|
-
static build(config?: ClientConfig | null | undefined, fetcher?: any): Client;
|
|
54
|
-
private constructor();
|
|
55
|
-
setToken(token: string | null): Client;
|
|
56
|
-
request(method: string, path: string, body?: any, apiToken?: string | null): Promise<any>;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export declare abstract class AbstractResource {
|
|
60
|
-
protected client: Client;
|
|
61
|
-
constructor(client: Client);
|
|
62
|
-
protected getStoreUrl(storeId: string, path: string, query?: any): string;
|
|
63
|
-
protected getUrl(path: string, query?: any): string;
|
|
64
|
-
protected getPaginatedResponse<T>(response: any): PaginatedResponse<T>;
|
|
65
|
-
protected getResponse<T>(response: any): T;
|
|
66
|
-
}
|
|
67
|
-
export declare class ZenkyError extends Error {
|
|
68
|
-
readonly err: ApiError | null;
|
|
69
|
-
constructor(message: string, error: ApiError | null);
|
|
70
|
-
}
|
|
71
|
-
export declare class ZenkyStorefront {
|
|
72
|
-
protected readonly client: Client;
|
|
73
|
-
readonly store: StoreResource;
|
|
74
|
-
readonly auth: AuthenticationResource;
|
|
75
|
-
readonly customer: CustomersResource;
|
|
76
|
-
readonly categories: CategoriesResource;
|
|
77
|
-
readonly products: ProductsResource;
|
|
78
|
-
readonly addresses: AddressesResource;
|
|
79
|
-
readonly orders: OrdersResource;
|
|
80
|
-
readonly collections: CollectionsResource;
|
|
81
|
-
readonly offers: OffersResource;
|
|
82
|
-
readonly articles: ArticlesResource;
|
|
83
|
-
readonly feedback: FeedbackResource;
|
|
84
|
-
constructor(config?: ClientConfig, fetcher?: any);
|
|
85
|
-
setApiToken(token: string | null): ZenkyStorefront;
|
|
86
|
-
}
|
|
1
|
+
// Generated by dts-bundle-generator v8.0.1
|
|
87
2
|
|
|
88
3
|
export interface Phone {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
4
|
+
number: string;
|
|
5
|
+
country: string;
|
|
6
|
+
national: string;
|
|
92
7
|
}
|
|
93
8
|
export interface GeoLocation {
|
|
94
|
-
|
|
95
|
-
|
|
9
|
+
latitude: number;
|
|
10
|
+
longitude: number;
|
|
96
11
|
}
|
|
97
12
|
export interface Discount {
|
|
98
|
-
|
|
99
|
-
|
|
13
|
+
difference: number;
|
|
14
|
+
percentage: number;
|
|
100
15
|
}
|
|
101
16
|
export declare enum DiscountType {
|
|
102
|
-
|
|
103
|
-
|
|
17
|
+
Amount = "amount",
|
|
18
|
+
Percentage = "percentage"
|
|
104
19
|
}
|
|
105
20
|
export declare enum ContactType {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
21
|
+
Email = "email",
|
|
22
|
+
Website = "website",
|
|
23
|
+
Vk = "vk",
|
|
24
|
+
Facebook = "facebook",
|
|
25
|
+
Instagram = "instagram",
|
|
26
|
+
Twitter = "twitter",
|
|
27
|
+
Ok = "ok",
|
|
28
|
+
Tiktok = "tiktok"
|
|
114
29
|
}
|
|
115
30
|
export interface Contact {
|
|
116
|
-
|
|
117
|
-
|
|
31
|
+
type: ContactType;
|
|
32
|
+
value: string;
|
|
118
33
|
}
|
|
119
34
|
export interface ScheduleDay {
|
|
120
|
-
|
|
35
|
+
hours: string;
|
|
121
36
|
}
|
|
122
37
|
export declare enum TernaryFilter {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
38
|
+
Yes = "yes",
|
|
39
|
+
No = "no",
|
|
40
|
+
Both = "both"
|
|
126
41
|
}
|
|
127
42
|
export interface Schedule {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
43
|
+
is_open_now: boolean;
|
|
44
|
+
opening_at: string | null;
|
|
45
|
+
closing_at: string | null;
|
|
46
|
+
days: {
|
|
47
|
+
monday: ScheduleDay | null;
|
|
48
|
+
tuesday: ScheduleDay | null;
|
|
49
|
+
wednesday: ScheduleDay | null;
|
|
50
|
+
thursday: ScheduleDay | null;
|
|
51
|
+
friday: ScheduleDay | null;
|
|
52
|
+
saturday: ScheduleDay | null;
|
|
53
|
+
sunday: ScheduleDay | null;
|
|
54
|
+
};
|
|
140
55
|
}
|
|
141
56
|
export interface ApiError {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
57
|
+
message: string;
|
|
58
|
+
original_message: string;
|
|
59
|
+
http_code: number;
|
|
60
|
+
error_code: string;
|
|
61
|
+
meta: any;
|
|
147
62
|
}
|
|
148
63
|
export declare enum OrderAuthenticationMethod {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
64
|
+
Disabled = "disabled",
|
|
65
|
+
Preauth = "preauth",
|
|
66
|
+
Confirmation = "confirmation"
|
|
152
67
|
}
|
|
153
68
|
export declare enum AddressesProvider {
|
|
154
|
-
|
|
155
|
-
|
|
69
|
+
Dadata = "dadata",
|
|
70
|
+
Manual = "manual"
|
|
156
71
|
}
|
|
157
72
|
export declare enum RecaptchaAction {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
73
|
+
Registration = "registration",
|
|
74
|
+
ResendRegistrationCode = "resend_registration_code",
|
|
75
|
+
ResetPassword = "reset_password",
|
|
76
|
+
OrderSubmission = "order_submission",
|
|
77
|
+
FeedbackRequest = "feedback_request",
|
|
78
|
+
CallbackRequest = "callback_request"
|
|
164
79
|
}
|
|
165
80
|
export interface PhoneRequest {
|
|
166
|
-
|
|
167
|
-
|
|
81
|
+
number: string;
|
|
82
|
+
country: string;
|
|
168
83
|
}
|
|
169
|
-
|
|
170
84
|
export interface DeliveryAddress {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
85
|
+
id: string;
|
|
86
|
+
resolver: AddressesProvider;
|
|
87
|
+
name: string | null;
|
|
88
|
+
address: string;
|
|
89
|
+
coordinates: GeoLocation | null;
|
|
90
|
+
country: string | null;
|
|
91
|
+
city: string | null;
|
|
92
|
+
settlement: string | null;
|
|
93
|
+
street: string | null;
|
|
94
|
+
house: string | null;
|
|
95
|
+
block: string | null;
|
|
96
|
+
apartment: string | null;
|
|
97
|
+
entrance: string | null;
|
|
98
|
+
floor: string | null;
|
|
99
|
+
has_intercom: boolean;
|
|
186
100
|
}
|
|
187
101
|
export interface ExistedDeliveryAddressRequest {
|
|
188
|
-
|
|
102
|
+
id: string;
|
|
189
103
|
}
|
|
190
104
|
export interface DadataDeliveryAddressRequest {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
105
|
+
name?: string;
|
|
106
|
+
address: string;
|
|
107
|
+
house?: string;
|
|
108
|
+
block?: string;
|
|
109
|
+
apartment?: string;
|
|
110
|
+
entrance?: string;
|
|
111
|
+
floor?: string;
|
|
112
|
+
has_intercom?: boolean;
|
|
199
113
|
}
|
|
200
114
|
export interface ManualDeliveryAddressRequest {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
115
|
+
name?: string;
|
|
116
|
+
city?: string;
|
|
117
|
+
street?: string;
|
|
118
|
+
house?: string;
|
|
119
|
+
block?: string;
|
|
120
|
+
apartment?: string;
|
|
121
|
+
entrance?: string;
|
|
122
|
+
floor?: string;
|
|
123
|
+
has_intercom?: boolean;
|
|
210
124
|
}
|
|
211
|
-
export interface
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
125
|
+
export interface DadataAddressSuggestion {
|
|
126
|
+
value: string | null;
|
|
127
|
+
unrestricted_value: string | null;
|
|
128
|
+
data: {
|
|
129
|
+
postal_code: string | null;
|
|
130
|
+
country: string | null;
|
|
131
|
+
country_code: string | null;
|
|
132
|
+
federal_district: string | null;
|
|
133
|
+
region_fias_id: string | null;
|
|
134
|
+
region_kladr_id: string | null;
|
|
135
|
+
region_iso_code: string | null;
|
|
136
|
+
region_with_type: string | null;
|
|
137
|
+
region_type: string | null;
|
|
138
|
+
region_type_full: string | null;
|
|
139
|
+
region: string | null;
|
|
140
|
+
area_fias_id: string | null;
|
|
141
|
+
area_kladr_id: string | null;
|
|
142
|
+
area_with_type: string | null;
|
|
143
|
+
area_type: string | null;
|
|
144
|
+
area_type_full: string | null;
|
|
145
|
+
area: string | null;
|
|
146
|
+
city_fias_id: string | null;
|
|
147
|
+
city_kladr_id: string | null;
|
|
148
|
+
city_with_type: string | null;
|
|
149
|
+
city_type: string | null;
|
|
150
|
+
city_type_full: string | null;
|
|
151
|
+
city: string | null;
|
|
152
|
+
city_area: string | null;
|
|
153
|
+
city_district_fias_id: string | null;
|
|
154
|
+
city_district_with_type: string | null;
|
|
155
|
+
city_district_type: string | null;
|
|
156
|
+
city_district_type_full: string | null;
|
|
157
|
+
city_district: string | null;
|
|
158
|
+
settlement_fias_id: string | null;
|
|
159
|
+
settlement_kladr_id: string | null;
|
|
160
|
+
settlement_with_type: string | null;
|
|
161
|
+
settlement_type: string | null;
|
|
162
|
+
settlement_type_full: string | null;
|
|
163
|
+
settlement: string | null;
|
|
164
|
+
street_fias_id: string | null;
|
|
165
|
+
street_kladr_id: string | null;
|
|
166
|
+
street_with_type: string | null;
|
|
167
|
+
street_type: string | null;
|
|
168
|
+
street_type_full: string | null;
|
|
169
|
+
street: string | null;
|
|
170
|
+
stead_fias_id: string | null;
|
|
171
|
+
stead_cadnum: string | null;
|
|
172
|
+
stead_type: string | null;
|
|
173
|
+
stead_type_full: string | null;
|
|
174
|
+
stead: string | null;
|
|
175
|
+
house_fias_id: string | null;
|
|
176
|
+
house_kladr_id: string | null;
|
|
177
|
+
house_cadnum: string | null;
|
|
178
|
+
house_type: string | null;
|
|
179
|
+
house_type_full: string | null;
|
|
180
|
+
house: string | null;
|
|
181
|
+
block_type: string | null;
|
|
182
|
+
block_type_full: string | null;
|
|
183
|
+
block: string | null;
|
|
184
|
+
flat_fias_id: string | null;
|
|
185
|
+
flat_cadnum: string | null;
|
|
186
|
+
flat_type: string | null;
|
|
187
|
+
flat_type_full: string | null;
|
|
188
|
+
flat: string | null;
|
|
189
|
+
flat_area: string | null;
|
|
190
|
+
square_meter_price: string | null;
|
|
191
|
+
flat_price: string | null;
|
|
192
|
+
room_fias_id: string | null;
|
|
193
|
+
room_cadnum: string | null;
|
|
194
|
+
room_type: string | null;
|
|
195
|
+
room_type_full: string | null;
|
|
196
|
+
postal_box: string | null;
|
|
197
|
+
fias_id: string | null;
|
|
198
|
+
fias_level: string | null;
|
|
199
|
+
fias_actuality_state: string | null;
|
|
200
|
+
kladr_id: string | null;
|
|
201
|
+
geoname_id: string | null;
|
|
202
|
+
capital_marker: string | null;
|
|
203
|
+
okato: string | null;
|
|
204
|
+
oktmo: string | null;
|
|
205
|
+
tax_office: string | null;
|
|
206
|
+
tax_office_legal: string | null;
|
|
207
|
+
timezone: string | null;
|
|
208
|
+
geo_lat: string | null;
|
|
209
|
+
geo_lon: string | null;
|
|
210
|
+
qc_geo: string | null;
|
|
211
|
+
beltway_hit: string | null;
|
|
212
|
+
beltway_distance: string | null;
|
|
213
|
+
metro?: {
|
|
214
|
+
name: string | null;
|
|
215
|
+
line: string | null;
|
|
216
|
+
distance: string | null;
|
|
217
|
+
}[] | null;
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
export declare enum AddressSuggestionsProvider {
|
|
221
|
+
DADATA = "dadata"
|
|
216
222
|
}
|
|
217
|
-
export interface
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
slug: string | null;
|
|
221
|
-
title: string | null;
|
|
222
|
-
intro: string | null;
|
|
223
|
-
body: string | null;
|
|
224
|
-
updated_at: string;
|
|
225
|
-
cover: Media | null;
|
|
226
|
-
category?: ArticleCategory | null;
|
|
223
|
+
export interface AddressSuggestions {
|
|
224
|
+
provider: AddressSuggestionsProvider;
|
|
225
|
+
suggestions: DadataAddressSuggestion[];
|
|
227
226
|
}
|
|
228
|
-
export interface
|
|
229
|
-
|
|
227
|
+
export interface AddressSuggestionsRequest {
|
|
228
|
+
query: string;
|
|
229
|
+
city_id?: string;
|
|
230
|
+
count?: number;
|
|
230
231
|
}
|
|
231
|
-
export
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
getArticle(storeId: string, articleId: string, request?: InclusionRequest): Promise<ArticleCategory>;
|
|
232
|
+
export interface Image {
|
|
233
|
+
url: string;
|
|
234
|
+
width: number;
|
|
235
|
+
height: number;
|
|
236
236
|
}
|
|
237
|
-
export interface
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
237
|
+
export interface Media {
|
|
238
|
+
placeholder: Image | null;
|
|
239
|
+
medium: Image | null;
|
|
240
|
+
large: Image | null;
|
|
241
|
+
xlarge: Image | null;
|
|
242
|
+
hd: Image | null;
|
|
242
243
|
}
|
|
243
|
-
export
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
Text = "text"
|
|
244
|
+
export interface ClientConfig {
|
|
245
|
+
baseUrl?: string;
|
|
246
|
+
token?: string;
|
|
247
|
+
client?: string;
|
|
248
|
+
timezone?: string;
|
|
249
|
+
fetchOptions?: any;
|
|
250
250
|
}
|
|
251
|
-
export
|
|
252
|
-
|
|
253
|
-
Float = "float"
|
|
251
|
+
export interface InclusionRequest {
|
|
252
|
+
with?: string;
|
|
254
253
|
}
|
|
255
|
-
export interface
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
name: string | null;
|
|
259
|
-
filterable: boolean;
|
|
260
|
-
type: FeatureType;
|
|
261
|
-
range: FeatureRange | null;
|
|
262
|
-
values: FeatureValue[];
|
|
254
|
+
export interface PaginationRequest {
|
|
255
|
+
count?: number;
|
|
256
|
+
page?: number;
|
|
263
257
|
}
|
|
264
|
-
export interface
|
|
265
|
-
|
|
266
|
-
name: string | null;
|
|
267
|
-
description: string | null;
|
|
268
|
-
features: Feature[];
|
|
258
|
+
export interface SearchRequest {
|
|
259
|
+
search?: string;
|
|
269
260
|
}
|
|
270
|
-
export
|
|
271
|
-
|
|
272
|
-
getCategoriesTree(storeId: string, request?: InclusionRequest): Promise<NestedCategory[]>;
|
|
273
|
-
getCategory(storeId: string, categoryId: string, request?: InclusionRequest): Promise<Category>;
|
|
274
|
-
getFeaturesGroups(storeId: string, categoryId: string): Promise<FeaturesGroup[]>;
|
|
275
|
-
getFeatures(storeId: string, categoryId: string): Promise<Feature[]>;
|
|
261
|
+
export interface OrderingRequest {
|
|
262
|
+
order_by?: string;
|
|
276
263
|
}
|
|
277
|
-
export interface
|
|
278
|
-
id: string;
|
|
279
|
-
short_id: string;
|
|
280
|
-
parent_id: string | null;
|
|
281
|
-
is_featured: boolean;
|
|
282
|
-
slug: string | null;
|
|
283
|
-
name: string | null;
|
|
284
|
-
description: string | null;
|
|
285
|
-
cover?: Media | null;
|
|
286
|
-
seo?: Seo | null;
|
|
264
|
+
export interface ListRequest extends PaginationRequest, InclusionRequest, SearchRequest, OrderingRequest {
|
|
287
265
|
}
|
|
288
|
-
export interface
|
|
289
|
-
|
|
266
|
+
export interface Pagination {
|
|
267
|
+
total: number;
|
|
268
|
+
count: number;
|
|
269
|
+
per_page: number;
|
|
270
|
+
current_page: number;
|
|
271
|
+
total_pages: number;
|
|
272
|
+
links: {
|
|
273
|
+
previous?: string | null;
|
|
274
|
+
next?: string | null;
|
|
275
|
+
};
|
|
276
|
+
has_previous_page: boolean;
|
|
277
|
+
has_next_page: boolean;
|
|
278
|
+
elements: {
|
|
279
|
+
type: "page" | "placeholder";
|
|
280
|
+
page: number | null;
|
|
281
|
+
active: boolean;
|
|
282
|
+
}[];
|
|
290
283
|
}
|
|
291
|
-
export interface
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
attribute: string;
|
|
295
|
-
value: string;
|
|
284
|
+
export interface PaginatedResponse<T> {
|
|
285
|
+
items: T[];
|
|
286
|
+
pagination: Pagination;
|
|
296
287
|
}
|
|
297
|
-
export interface
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
288
|
+
export interface ArticleCategory {
|
|
289
|
+
id: string;
|
|
290
|
+
short_id: string;
|
|
291
|
+
slug: string | null;
|
|
292
|
+
name: string | null;
|
|
301
293
|
}
|
|
302
|
-
export interface
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
294
|
+
export interface Article {
|
|
295
|
+
id: string;
|
|
296
|
+
short_id: string;
|
|
297
|
+
slug: string | null;
|
|
298
|
+
title: string | null;
|
|
299
|
+
intro: string | null;
|
|
300
|
+
body: string | null;
|
|
301
|
+
updated_at: string;
|
|
302
|
+
cover: Media | null;
|
|
303
|
+
category?: ArticleCategory | null;
|
|
306
304
|
}
|
|
307
|
-
export interface
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
305
|
+
export interface ListArticlesRequest extends ListRequest {
|
|
306
|
+
category_id?: string;
|
|
307
|
+
}
|
|
308
|
+
declare class Client {
|
|
309
|
+
private readonly baseUrl;
|
|
310
|
+
private token;
|
|
311
|
+
private readonly client;
|
|
312
|
+
private readonly timezone;
|
|
313
|
+
private readonly fetchFunction;
|
|
314
|
+
private readonly fetchOptions;
|
|
315
|
+
static build(config?: ClientConfig | null | undefined, fetcher?: any): Client;
|
|
316
|
+
private constructor();
|
|
317
|
+
setToken(token: string | null): Client;
|
|
318
|
+
request(method: string, path: string, body?: any, apiToken?: string | null): Promise<any>;
|
|
319
|
+
}
|
|
320
|
+
declare abstract class AbstractResource {
|
|
321
|
+
protected client: Client;
|
|
322
|
+
constructor(client: Client);
|
|
323
|
+
protected getStoreUrl(storeId: string, path: string, query?: any): string;
|
|
324
|
+
protected getUrl(path: string, query?: any): string;
|
|
325
|
+
protected getPaginatedResponse<T>(response: any): PaginatedResponse<T>;
|
|
326
|
+
protected getResponse<T>(response: any): T;
|
|
311
327
|
}
|
|
312
|
-
export
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
hd: Image | null;
|
|
328
|
+
export declare class ArticlesResource extends AbstractResource {
|
|
329
|
+
getArticleCategories(storeId: string): Promise<PaginatedResponse<ArticleCategory>>;
|
|
330
|
+
getArticleCategory(storeId: string, categoryId: string): Promise<ArticleCategory>;
|
|
331
|
+
getArticles(storeId: string, request?: ListArticlesRequest): Promise<PaginatedResponse<ArticleCategory>>;
|
|
332
|
+
getArticle(storeId: string, articleId: string, request?: InclusionRequest): Promise<ArticleCategory>;
|
|
318
333
|
}
|
|
319
|
-
export interface
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
description: string | null;
|
|
323
|
-
cover: Media | null;
|
|
334
|
+
export interface SeoMetaTagAttribute {
|
|
335
|
+
attribute: string;
|
|
336
|
+
value: string;
|
|
324
337
|
}
|
|
325
|
-
export interface
|
|
338
|
+
export interface SeoMetaTag {
|
|
339
|
+
name: SeoMetaTagAttribute;
|
|
340
|
+
value: SeoMetaTagAttribute;
|
|
341
|
+
additional: SeoMetaTagAttribute[];
|
|
326
342
|
}
|
|
327
|
-
export
|
|
328
|
-
|
|
329
|
-
|
|
343
|
+
export interface Seo {
|
|
344
|
+
title: string | null;
|
|
345
|
+
description: string | null;
|
|
346
|
+
meta: SeoMetaTag[];
|
|
330
347
|
}
|
|
331
|
-
export interface
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
348
|
+
export interface Category {
|
|
349
|
+
id: string;
|
|
350
|
+
short_id: string;
|
|
351
|
+
parent_id: string | null;
|
|
352
|
+
is_featured: boolean;
|
|
353
|
+
slug: string | null;
|
|
354
|
+
name: string | null;
|
|
355
|
+
description: string | null;
|
|
356
|
+
cover?: Media | null;
|
|
357
|
+
seo?: Seo | null;
|
|
337
358
|
}
|
|
338
|
-
export interface
|
|
339
|
-
|
|
340
|
-
payment: number | null;
|
|
359
|
+
export interface NestedCategory extends Category {
|
|
360
|
+
children: NestedCategory[];
|
|
341
361
|
}
|
|
342
|
-
export
|
|
343
|
-
|
|
344
|
-
Decrease = "decrease"
|
|
362
|
+
export interface CategoriesListRequest extends ListRequest {
|
|
363
|
+
featured?: boolean;
|
|
345
364
|
}
|
|
346
|
-
export
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
Refunded = "refunded",
|
|
352
|
-
PartiallyRefunded = "partially_refunded"
|
|
365
|
+
export interface FeatureValue {
|
|
366
|
+
id: string;
|
|
367
|
+
alias: string;
|
|
368
|
+
name: string | null;
|
|
369
|
+
range: number | null;
|
|
353
370
|
}
|
|
354
|
-
export declare enum
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
Refund = "refund",
|
|
362
|
-
Adjustment = "adjustment",
|
|
363
|
-
WelcomeBonuses = "welcome_bonuses",
|
|
364
|
-
PromotionReward = "promotion_reward",
|
|
365
|
-
External = "external"
|
|
371
|
+
export declare enum FeatureType {
|
|
372
|
+
Select = "select",
|
|
373
|
+
MutipleSelect = "mutiple_select",
|
|
374
|
+
Checkboxes = "checkboxes",
|
|
375
|
+
Radios = "radios",
|
|
376
|
+
Range = "range",
|
|
377
|
+
Text = "text"
|
|
366
378
|
}
|
|
367
|
-
export
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
type: BonusesTransactionType;
|
|
371
|
-
status: BonusesTransactionStatus;
|
|
372
|
-
reason: BonusesTransactionReason;
|
|
373
|
-
amount: number;
|
|
374
|
-
source_amount: number | null;
|
|
375
|
-
created_at: string;
|
|
376
|
-
confirmed_at: string | null;
|
|
377
|
-
cancelled_at: string | null;
|
|
379
|
+
export declare enum FeatureRange {
|
|
380
|
+
Integer = "integer",
|
|
381
|
+
Float = "float"
|
|
378
382
|
}
|
|
379
|
-
export interface
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
+
export interface Feature {
|
|
384
|
+
id: string;
|
|
385
|
+
alias: string;
|
|
386
|
+
name: string | null;
|
|
387
|
+
filterable: boolean;
|
|
388
|
+
type: FeatureType;
|
|
389
|
+
range: FeatureRange | null;
|
|
390
|
+
values: FeatureValue[];
|
|
383
391
|
}
|
|
384
|
-
export interface
|
|
385
|
-
|
|
392
|
+
export interface FeaturesGroup {
|
|
393
|
+
id: string;
|
|
394
|
+
name: string | null;
|
|
395
|
+
description: string | null;
|
|
396
|
+
features: Feature[];
|
|
386
397
|
}
|
|
387
|
-
export declare
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
398
|
+
export declare class CategoriesResource extends AbstractResource {
|
|
399
|
+
getCategories(storeId: string, request?: CategoriesListRequest): Promise<PaginatedResponse<Category>>;
|
|
400
|
+
getCategoriesTree(storeId: string, request?: InclusionRequest): Promise<NestedCategory[]>;
|
|
401
|
+
getCategory(storeId: string, categoryId: string, request?: InclusionRequest): Promise<Category>;
|
|
402
|
+
getFeaturesGroups(storeId: string, categoryId: string): Promise<FeaturesGroup[]>;
|
|
403
|
+
getFeatures(storeId: string, categoryId: string): Promise<Feature[]>;
|
|
391
404
|
}
|
|
392
|
-
export
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
device_token: string | null;
|
|
396
|
-
device_os: string | null;
|
|
397
|
-
barcode: string | null;
|
|
398
|
-
qrcode: string | null;
|
|
405
|
+
export declare class ZenkyError extends Error {
|
|
406
|
+
readonly err: ApiError | null;
|
|
407
|
+
constructor(message: string, error: ApiError | null);
|
|
399
408
|
}
|
|
400
|
-
export
|
|
401
|
-
|
|
402
|
-
code: string;
|
|
403
|
-
join_url: string;
|
|
404
|
-
invite_url: string;
|
|
405
|
-
};
|
|
406
|
-
balance: number;
|
|
407
|
-
bonuses_level: BonusesLevel | null;
|
|
408
|
-
rates: LoyaltyRates | null;
|
|
409
|
-
settings?: CustomerSettings;
|
|
410
|
-
avatar?: Media | null;
|
|
409
|
+
export declare class ZenkyErrorBuilder {
|
|
410
|
+
static build(response: any): Promise<ZenkyError>;
|
|
411
411
|
}
|
|
412
|
-
export interface
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
loyalty: CustomerLoyaltyProfile | null;
|
|
412
|
+
export interface Stock {
|
|
413
|
+
id: string;
|
|
414
|
+
name: string | null;
|
|
415
|
+
description: string | null;
|
|
416
|
+
address: string | null;
|
|
417
|
+
coordinates: GeoLocation | null;
|
|
418
|
+
links: Contact[];
|
|
419
|
+
phones: Phone[];
|
|
420
|
+
schedule: Schedule | null;
|
|
422
421
|
}
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
422
|
+
export interface DeliveryZone {
|
|
423
|
+
id: string;
|
|
424
|
+
name: string | null;
|
|
425
|
+
coordinates: GeoLocation[];
|
|
426
|
+
description: string | null;
|
|
427
|
+
color: string | null;
|
|
428
|
+
min_price: number | null;
|
|
429
|
+
free_delivery_price: number | null;
|
|
430
|
+
delivery_price: number | null;
|
|
431
|
+
delivery_time: string | null;
|
|
431
432
|
}
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
433
|
+
export interface City {
|
|
434
|
+
id: string;
|
|
435
|
+
is_default: boolean;
|
|
436
|
+
name: string | null;
|
|
437
|
+
timezone: string;
|
|
438
|
+
coordinates: GeoLocation | null;
|
|
439
|
+
stocks: Stock[];
|
|
440
|
+
delivery_zones: DeliveryZone[];
|
|
435
441
|
}
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
442
|
+
export interface StoreSettings {
|
|
443
|
+
country: string;
|
|
444
|
+
currency: string;
|
|
445
|
+
orders: {
|
|
446
|
+
authentication_method: OrderAuthenticationMethod;
|
|
447
|
+
use_early_delivery: boolean;
|
|
448
|
+
addresses_provider: AddressesProvider;
|
|
449
|
+
};
|
|
450
|
+
products: {
|
|
451
|
+
use_stock_filter: boolean;
|
|
452
|
+
};
|
|
453
|
+
loyalty: {
|
|
454
|
+
enabled: boolean;
|
|
455
|
+
bonuses: {
|
|
456
|
+
on_demand_balance_enabled: boolean;
|
|
457
|
+
pin_enabled: boolean;
|
|
458
|
+
};
|
|
459
|
+
};
|
|
460
|
+
recaptcha: {
|
|
461
|
+
actions: RecaptchaAction[];
|
|
462
|
+
key: string;
|
|
463
|
+
} | null;
|
|
464
|
+
websockets: {
|
|
465
|
+
app_id: string;
|
|
466
|
+
app_key: string;
|
|
467
|
+
options: {
|
|
468
|
+
host: string;
|
|
469
|
+
port: number;
|
|
470
|
+
};
|
|
471
|
+
} | null;
|
|
444
472
|
}
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
473
|
+
export interface Store {
|
|
474
|
+
id: string;
|
|
475
|
+
name: string;
|
|
476
|
+
domain: string | null;
|
|
477
|
+
app_store_url: string | null;
|
|
478
|
+
google_play_url: string | null;
|
|
479
|
+
logo: Media | null;
|
|
480
|
+
square_logo: Media | null;
|
|
481
|
+
links: Contact[];
|
|
482
|
+
phones: Phone[];
|
|
483
|
+
cities: City[];
|
|
484
|
+
settings: StoreSettings;
|
|
448
485
|
}
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
486
|
+
export declare class StoreResource extends AbstractResource {
|
|
487
|
+
getStore(storeId: string): Promise<Store>;
|
|
488
|
+
getStoreByBundleId(bundleId: string): Promise<Store>;
|
|
452
489
|
}
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
Maestro = 'maestro',
|
|
459
|
-
AmericanExpress = 'american-express',
|
|
460
|
-
DinersClub = 'diners-club',
|
|
461
|
-
Discover = 'discover',
|
|
462
|
-
JCB = 'jcb',
|
|
463
|
-
UnionPay = 'union-pay',
|
|
490
|
+
export interface ProductsCollection {
|
|
491
|
+
id: string;
|
|
492
|
+
name: string | null;
|
|
493
|
+
description: string | null;
|
|
494
|
+
cover: Media | null;
|
|
464
495
|
}
|
|
465
|
-
|
|
466
|
-
export interface PaymentSystem {
|
|
467
|
-
id: PaymentSystemType;
|
|
468
|
-
name: string;
|
|
469
|
-
logos: {
|
|
470
|
-
black: string | null;
|
|
471
|
-
white: string | null;
|
|
472
|
-
colored: string | null;
|
|
473
|
-
};
|
|
496
|
+
export interface CollectionsListRequest extends PaginationRequest, SearchRequest, OrderingRequest {
|
|
474
497
|
}
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
name: string;
|
|
479
|
-
url: string;
|
|
480
|
-
background_colors: string[];
|
|
481
|
-
primary_background_color: string;
|
|
482
|
-
background_style: 'dark' | 'white';
|
|
483
|
-
logo_style: 'dark' | 'white';
|
|
484
|
-
text_color: string;
|
|
485
|
-
logos: {
|
|
486
|
-
png: string | null;
|
|
487
|
-
svg: string | null;
|
|
488
|
-
};
|
|
489
|
-
payment_system: PaymentSystem;
|
|
498
|
+
export declare class CollectionsResource extends AbstractResource {
|
|
499
|
+
getCollections(storeId: string, request?: CollectionsListRequest): Promise<PaginatedResponse<ProductsCollection>>;
|
|
500
|
+
getCollection(storeId: string, id: string): Promise<ProductsCollection>;
|
|
490
501
|
}
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
card_type: PaymentSystemType;
|
|
496
|
-
card_first_six: string;
|
|
497
|
-
card_last_four: string;
|
|
498
|
-
name: string;
|
|
499
|
-
bank: BankInfo | null;
|
|
502
|
+
export interface OfferBanner {
|
|
503
|
+
title: string | null;
|
|
504
|
+
description: string | null;
|
|
505
|
+
image: Media | null;
|
|
500
506
|
}
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
507
|
+
export interface OfferArticle {
|
|
508
|
+
title: string | null;
|
|
509
|
+
intro: string | null;
|
|
510
|
+
body: string | null;
|
|
511
|
+
cover: Media | null;
|
|
512
|
+
}
|
|
513
|
+
export interface Offer {
|
|
514
|
+
id: string;
|
|
515
|
+
short_id: string;
|
|
516
|
+
slug: string | null;
|
|
517
|
+
banners: {
|
|
518
|
+
desktop: OfferBanner | null;
|
|
519
|
+
mobile: OfferBanner | null;
|
|
520
|
+
};
|
|
521
|
+
article?: OfferArticle | null;
|
|
522
|
+
}
|
|
523
|
+
export declare class OffersResource extends AbstractResource {
|
|
524
|
+
getOffers(storeId: string, request?: ListRequest): Promise<PaginatedResponse<Offer>>;
|
|
525
|
+
getOffer(storeId: string, offerId: string, request?: InclusionRequest): Promise<Offer>;
|
|
515
526
|
}
|
|
516
527
|
export interface Feedback {
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
528
|
+
id: string;
|
|
529
|
+
name: string | null;
|
|
530
|
+
email: string | null;
|
|
531
|
+
phone: Phone | null;
|
|
532
|
+
comment: string | null;
|
|
533
|
+
created_at: string;
|
|
523
534
|
}
|
|
524
535
|
export interface FeedbackRequest {
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
536
|
+
name?: string;
|
|
537
|
+
email?: string;
|
|
538
|
+
phone?: PhoneRequest;
|
|
539
|
+
comment?: string;
|
|
529
540
|
}
|
|
530
541
|
export interface CallbackRequest {
|
|
531
|
-
|
|
542
|
+
phone: PhoneRequest;
|
|
532
543
|
}
|
|
533
544
|
export declare class FeedbackResource extends AbstractResource {
|
|
534
|
-
|
|
535
|
-
|
|
545
|
+
createFeedback(storeId: string, request: FeedbackRequest): Promise<Feedback>;
|
|
546
|
+
createCallback(storeId: string, request: CallbackRequest): Promise<boolean>;
|
|
536
547
|
}
|
|
537
548
|
export interface Modifier {
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
549
|
+
id: string;
|
|
550
|
+
sku: string | null;
|
|
551
|
+
name: string | null;
|
|
552
|
+
price: number | null;
|
|
542
553
|
}
|
|
543
554
|
export interface BasicModifiersGroup {
|
|
544
|
-
|
|
545
|
-
|
|
555
|
+
id: string;
|
|
556
|
+
name: string | null;
|
|
546
557
|
}
|
|
547
558
|
export interface ModifiersGroup extends BasicModifiersGroup {
|
|
548
|
-
|
|
559
|
+
modifiers: Modifier[];
|
|
549
560
|
}
|
|
550
561
|
export interface ProductModifier {
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
562
|
+
modifier: Modifier;
|
|
563
|
+
is_required: boolean;
|
|
564
|
+
min_quantity: number | null;
|
|
565
|
+
max_quantity: number | null;
|
|
555
566
|
}
|
|
556
567
|
export interface ProductModifiersGroup {
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
}
|
|
562
|
-
export interface OfferBanner {
|
|
563
|
-
title: string | null;
|
|
564
|
-
description: string | null;
|
|
565
|
-
image: Media | null;
|
|
566
|
-
}
|
|
567
|
-
export interface OfferArticle {
|
|
568
|
-
title: string | null;
|
|
569
|
-
intro: string | null;
|
|
570
|
-
body: string | null;
|
|
571
|
-
cover: Media | null;
|
|
572
|
-
}
|
|
573
|
-
export interface Offer {
|
|
574
|
-
id: string;
|
|
575
|
-
short_id: string;
|
|
576
|
-
slug: string | null;
|
|
577
|
-
banners: {
|
|
578
|
-
desktop: OfferBanner | null;
|
|
579
|
-
mobile: OfferBanner | null;
|
|
580
|
-
};
|
|
581
|
-
article?: OfferArticle | null;
|
|
582
|
-
}
|
|
583
|
-
export declare class OffersResource extends AbstractResource {
|
|
584
|
-
getOffers(storeId: string, request?: ListRequest): Promise<PaginatedResponse<Offer>>;
|
|
585
|
-
getOffer(storeId: string, offerId: string, request?: InclusionRequest): Promise<Offer>;
|
|
568
|
+
group: ModifiersGroup;
|
|
569
|
+
is_required: boolean;
|
|
570
|
+
min_quantity: number | null;
|
|
571
|
+
max_quantity: number | null;
|
|
586
572
|
}
|
|
587
573
|
export declare enum UnitType {
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
574
|
+
Piece = "piece",
|
|
575
|
+
Gram = "gram",
|
|
576
|
+
Kilogram = "kilogram",
|
|
577
|
+
Meter = "meter"
|
|
592
578
|
}
|
|
593
579
|
export declare enum Dimension {
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
580
|
+
Weight = "weight",
|
|
581
|
+
Width = "width",
|
|
582
|
+
Height = "height",
|
|
583
|
+
Length = "length"
|
|
598
584
|
}
|
|
599
585
|
export declare enum DimensionType {
|
|
600
|
-
|
|
601
|
-
|
|
586
|
+
Netto = "netto",
|
|
587
|
+
Brutto = "brutto"
|
|
602
588
|
}
|
|
603
589
|
export declare enum VariantOptionType {
|
|
604
|
-
|
|
590
|
+
Color = "color"
|
|
605
591
|
}
|
|
606
592
|
export declare enum ProductContextType {
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
593
|
+
Category = "category",
|
|
594
|
+
Group = "group",
|
|
595
|
+
VariantOption = "variant_option",
|
|
596
|
+
VariantOptionValue = "variant_option_value"
|
|
611
597
|
}
|
|
612
598
|
export interface ProductVariantPrice {
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
599
|
+
stock_id: string | null;
|
|
600
|
+
price: number;
|
|
601
|
+
original_price: number | null;
|
|
602
|
+
discount: Discount | null;
|
|
617
603
|
}
|
|
618
604
|
export interface ProductVariantDimension {
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
605
|
+
dimension: Dimension;
|
|
606
|
+
type: DimensionType;
|
|
607
|
+
value: number;
|
|
622
608
|
}
|
|
623
609
|
export interface ProductVariantRemainder {
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
610
|
+
stock_id: string;
|
|
611
|
+
quantity: number;
|
|
612
|
+
label: string | null;
|
|
627
613
|
}
|
|
628
614
|
export interface ProductVariantOptionValue {
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
615
|
+
id: string;
|
|
616
|
+
name: string | null;
|
|
617
|
+
color: string | null;
|
|
632
618
|
}
|
|
633
619
|
export interface ProductVariantOption {
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
620
|
+
id: string;
|
|
621
|
+
name: string | null;
|
|
622
|
+
type: VariantOptionType | null;
|
|
623
|
+
value: ProductVariantOptionValue;
|
|
638
624
|
}
|
|
639
625
|
export interface ProductVariant {
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
626
|
+
id: string;
|
|
627
|
+
sku: string | null;
|
|
628
|
+
barcode: string | null;
|
|
629
|
+
name: string | null;
|
|
630
|
+
price: number;
|
|
631
|
+
original_price: number | null;
|
|
632
|
+
discount: Discount | null;
|
|
633
|
+
default_modifiers?: {
|
|
634
|
+
modifiers: {
|
|
635
|
+
modifier_id: string;
|
|
636
|
+
modifiers_group_id: string | null;
|
|
637
|
+
quantity: number;
|
|
638
|
+
}[];
|
|
639
|
+
hash: string | null;
|
|
640
|
+
} | null;
|
|
641
|
+
prices?: ProductVariantPrice[];
|
|
642
|
+
dimensions?: ProductVariantDimension[];
|
|
643
|
+
remainders?: ProductVariantRemainder[];
|
|
644
|
+
options?: ProductVariantOption[];
|
|
659
645
|
}
|
|
660
646
|
export interface Product {
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
647
|
+
id: string;
|
|
648
|
+
short_id: string;
|
|
649
|
+
slug: string | null;
|
|
650
|
+
name: string | null;
|
|
651
|
+
description: string | null;
|
|
652
|
+
unit_type: UnitType;
|
|
653
|
+
weight: number | null;
|
|
654
|
+
quantity_step: number | null;
|
|
655
|
+
is_promotion_reward: boolean;
|
|
656
|
+
categories: Category[];
|
|
657
|
+
images: Media[];
|
|
658
|
+
variants?: ProductVariant[];
|
|
659
|
+
features?: Feature[];
|
|
660
|
+
features_groups: FeaturesGroup[];
|
|
661
|
+
modifiers?: ProductModifier[];
|
|
662
|
+
modifiers_groups?: ProductModifiersGroup[];
|
|
663
|
+
seo?: Seo;
|
|
678
664
|
}
|
|
679
665
|
export interface ListProductsRequest extends ListRequest {
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
666
|
+
category_id?: string;
|
|
667
|
+
features?: {
|
|
668
|
+
[key: string]: string;
|
|
669
|
+
};
|
|
670
|
+
f?: {
|
|
671
|
+
[key: string]: string;
|
|
672
|
+
};
|
|
673
|
+
city_id?: string;
|
|
674
|
+
stock_id?: string;
|
|
675
|
+
collection_id?: string;
|
|
676
|
+
min_price?: number | string;
|
|
677
|
+
max_price?: number | string;
|
|
678
|
+
featured_categories?: boolean;
|
|
679
|
+
promotion_reward?: TernaryFilter;
|
|
680
|
+
context_type?: ProductContextType;
|
|
681
|
+
context_id?: string;
|
|
696
682
|
}
|
|
697
683
|
export interface ViewProductRequest extends InclusionRequest {
|
|
698
|
-
|
|
684
|
+
stock_id?: string;
|
|
699
685
|
}
|
|
700
686
|
export interface ProductVariantPriceCalculation {
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
687
|
+
price: number;
|
|
688
|
+
original_price: number | null;
|
|
689
|
+
discount: Discount | null;
|
|
690
|
+
modifiers_hash: string | null;
|
|
705
691
|
}
|
|
706
692
|
export interface ProductModifiersRequest {
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
693
|
+
modifier_id: string;
|
|
694
|
+
modifiers_group_id?: string | null;
|
|
695
|
+
quantity: number;
|
|
710
696
|
}
|
|
711
697
|
export interface ProductVariantPriceCalculationRequest {
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
698
|
+
city_id?: string;
|
|
699
|
+
stock_id?: string;
|
|
700
|
+
modifiers?: ProductModifiersRequest[];
|
|
715
701
|
}
|
|
716
702
|
export declare class ProductsResource extends AbstractResource {
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
703
|
+
getProducts(storeId: string, request?: ListProductsRequest): Promise<PaginatedResponse<Product>>;
|
|
704
|
+
getProduct(storeId: string, productId: string, request?: ViewProductRequest): Promise<Product>;
|
|
705
|
+
getProductVariantPrice(storeId: string, productId: string, variantId: string, request: ProductVariantPriceCalculationRequest): Promise<ProductVariantPriceCalculation>;
|
|
720
706
|
}
|
|
721
|
-
export interface
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
links: Contact[];
|
|
728
|
-
phones: Phone[];
|
|
729
|
-
schedule: Schedule | null;
|
|
707
|
+
export interface BonusesLevel {
|
|
708
|
+
id: string;
|
|
709
|
+
name: string;
|
|
710
|
+
expenses: number;
|
|
711
|
+
cashback_rate: number | null;
|
|
712
|
+
payment_rate: number | null;
|
|
730
713
|
}
|
|
731
|
-
export interface
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
coordinates: GeoLocation[];
|
|
735
|
-
description: string | null;
|
|
736
|
-
color: string | null;
|
|
737
|
-
min_price: number | null;
|
|
738
|
-
free_delivery_price: number | null;
|
|
739
|
-
delivery_price: number | null;
|
|
740
|
-
delivery_time: string | null;
|
|
714
|
+
export interface LoyaltyRates {
|
|
715
|
+
cashback: number | null;
|
|
716
|
+
payment: number | null;
|
|
741
717
|
}
|
|
742
|
-
export
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
name: string | null;
|
|
746
|
-
timezone: string;
|
|
747
|
-
coordinates: GeoLocation | null;
|
|
748
|
-
stocks: Stock[];
|
|
749
|
-
delivery_zones: DeliveryZone[];
|
|
718
|
+
export declare enum BonusesTransactionType {
|
|
719
|
+
Increase = "increase",
|
|
720
|
+
Decrease = "decrease"
|
|
750
721
|
}
|
|
751
|
-
export
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
};
|
|
759
|
-
products: {
|
|
760
|
-
use_stock_filter: boolean;
|
|
761
|
-
};
|
|
762
|
-
loyalty: {
|
|
763
|
-
enabled: boolean;
|
|
764
|
-
};
|
|
765
|
-
recaptcha: {
|
|
766
|
-
actions: RecaptchaAction[];
|
|
767
|
-
key: string;
|
|
768
|
-
} | null;
|
|
769
|
-
websockets: {
|
|
770
|
-
app_id: string;
|
|
771
|
-
app_key: string;
|
|
772
|
-
options: {
|
|
773
|
-
host: string;
|
|
774
|
-
port: number;
|
|
775
|
-
};
|
|
776
|
-
} | null;
|
|
722
|
+
export declare enum BonusesTransactionStatus {
|
|
723
|
+
Pending = "pending",
|
|
724
|
+
Confirmed = "confirmed",
|
|
725
|
+
Cancelled = "cancelled",
|
|
726
|
+
Rejected = "rejected",
|
|
727
|
+
Refunded = "refunded",
|
|
728
|
+
PartiallyRefunded = "partially_refunded"
|
|
777
729
|
}
|
|
778
|
-
export
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
730
|
+
export declare enum BonusesTransactionReason {
|
|
731
|
+
Manual = "manual",
|
|
732
|
+
Cashback = "cashback",
|
|
733
|
+
ReferralReward = "referral_reward",
|
|
734
|
+
RecruitReward = "recruit_reward",
|
|
735
|
+
Payment = "payment",
|
|
736
|
+
Cancellation = "cancellation",
|
|
737
|
+
Refund = "refund",
|
|
738
|
+
Adjustment = "adjustment",
|
|
739
|
+
WelcomeBonuses = "welcome_bonuses",
|
|
740
|
+
PromotionReward = "promotion_reward",
|
|
741
|
+
External = "external"
|
|
790
742
|
}
|
|
791
|
-
export
|
|
792
|
-
|
|
793
|
-
|
|
743
|
+
export interface BonusesTransaction {
|
|
744
|
+
id: string;
|
|
745
|
+
order_id: string | null;
|
|
746
|
+
type: BonusesTransactionType;
|
|
747
|
+
status: BonusesTransactionStatus;
|
|
748
|
+
reason: BonusesTransactionReason;
|
|
749
|
+
amount: number;
|
|
750
|
+
source_amount: number | null;
|
|
751
|
+
created_at: string;
|
|
752
|
+
confirmed_at: string | null;
|
|
753
|
+
cancelled_at: string | null;
|
|
754
|
+
}
|
|
755
|
+
export interface ListBonusesTransactionsRequest extends PaginationRequest {
|
|
756
|
+
type?: BonusesTransactionType;
|
|
757
|
+
status?: BonusesTransactionStatus;
|
|
758
|
+
reason?: BonusesTransactionReason;
|
|
759
|
+
}
|
|
760
|
+
export interface ListCustomerBonusesTransactionsRequest extends ListBonusesTransactionsRequest {
|
|
761
|
+
order_id?: string;
|
|
762
|
+
}
|
|
763
|
+
export declare enum Gender {
|
|
764
|
+
Female = "female",
|
|
765
|
+
Male = "male",
|
|
766
|
+
Other = "other"
|
|
767
|
+
}
|
|
768
|
+
export interface CustomerLoyaltyProfile {
|
|
769
|
+
referral_program: {
|
|
770
|
+
code: string;
|
|
771
|
+
join_url: string;
|
|
772
|
+
invite_url: string;
|
|
773
|
+
};
|
|
774
|
+
balance: number;
|
|
775
|
+
bonuses_level: BonusesLevel | null;
|
|
776
|
+
rates: LoyaltyRates | null;
|
|
777
|
+
}
|
|
778
|
+
export interface CustomerSettings {
|
|
779
|
+
onesignal_id: string | null;
|
|
780
|
+
device_id: string | null;
|
|
781
|
+
device_token: string | null;
|
|
782
|
+
device_os: string | null;
|
|
783
|
+
barcode: string | null;
|
|
784
|
+
qrcode: string | null;
|
|
785
|
+
}
|
|
786
|
+
export interface Customer {
|
|
787
|
+
id: string;
|
|
788
|
+
store_profile_id: string;
|
|
789
|
+
first_name: string | null;
|
|
790
|
+
last_name: string | null;
|
|
791
|
+
phone: Phone;
|
|
792
|
+
gender: Gender;
|
|
793
|
+
birth_date: string | null;
|
|
794
|
+
registered_at: string;
|
|
795
|
+
loyalty: CustomerLoyaltyProfile | null;
|
|
796
|
+
settings?: CustomerSettings;
|
|
797
|
+
avatar?: Media | null;
|
|
798
|
+
}
|
|
799
|
+
export interface UpdateCustomerProfileRequest {
|
|
800
|
+
first_name?: string;
|
|
801
|
+
last_name?: string;
|
|
802
|
+
gender?: Gender;
|
|
803
|
+
birth_date?: string;
|
|
804
|
+
password?: string;
|
|
805
|
+
current_password?: string;
|
|
806
|
+
}
|
|
807
|
+
export interface RemoveCustomerProfileRequest {
|
|
808
|
+
password: string;
|
|
809
|
+
}
|
|
810
|
+
export interface UpdateCustomerSettingsRequest {
|
|
811
|
+
onesignal_id?: string;
|
|
812
|
+
device_id?: string;
|
|
813
|
+
device_token?: string;
|
|
814
|
+
device_os?: string;
|
|
815
|
+
barcode?: string;
|
|
816
|
+
qrcode?: string;
|
|
817
|
+
}
|
|
818
|
+
export interface DeliveryAddressRequest {
|
|
819
|
+
delivery_address: DadataDeliveryAddressRequest | ManualDeliveryAddressRequest;
|
|
820
|
+
}
|
|
821
|
+
export declare enum AcquiringType {
|
|
822
|
+
CloudPayments = "cloudpayments"
|
|
823
|
+
}
|
|
824
|
+
export declare enum PaymentSystemType {
|
|
825
|
+
Visa = "visa",
|
|
826
|
+
MasterCard = "master-card",
|
|
827
|
+
MIR = "mir",
|
|
828
|
+
Maestro = "maestro",
|
|
829
|
+
AmericanExpress = "american-express",
|
|
830
|
+
DinersClub = "diners-club",
|
|
831
|
+
Discover = "discover",
|
|
832
|
+
JCB = "jcb",
|
|
833
|
+
UnionPay = "union-pay"
|
|
834
|
+
}
|
|
835
|
+
export interface PaymentSystem {
|
|
836
|
+
id: PaymentSystemType;
|
|
837
|
+
name: string;
|
|
838
|
+
logos: {
|
|
839
|
+
black: string | null;
|
|
840
|
+
white: string | null;
|
|
841
|
+
colored: string | null;
|
|
842
|
+
};
|
|
843
|
+
}
|
|
844
|
+
export interface BankInfo {
|
|
845
|
+
id: string;
|
|
846
|
+
name: string;
|
|
847
|
+
url: string;
|
|
848
|
+
background_colors: string[];
|
|
849
|
+
primary_background_color: string;
|
|
850
|
+
background_style: "dark" | "white";
|
|
851
|
+
logo_style: "dark" | "white";
|
|
852
|
+
text_color: string;
|
|
853
|
+
logos: {
|
|
854
|
+
png: string | null;
|
|
855
|
+
svg: string | null;
|
|
856
|
+
};
|
|
857
|
+
payment_system: PaymentSystem;
|
|
858
|
+
}
|
|
859
|
+
export interface CustomerPaymentMethod {
|
|
860
|
+
id: string;
|
|
861
|
+
acquiring_type: AcquiringType;
|
|
862
|
+
card_type: PaymentSystemType;
|
|
863
|
+
card_first_six: string;
|
|
864
|
+
card_last_four: string;
|
|
865
|
+
name: string;
|
|
866
|
+
bank: BankInfo | null;
|
|
867
|
+
}
|
|
868
|
+
declare enum ConfirmationMethod {
|
|
869
|
+
Sms = "sms",
|
|
870
|
+
Call = "call"
|
|
871
|
+
}
|
|
872
|
+
export interface AbstractRegistrationRequest {
|
|
873
|
+
phone: PhoneRequest;
|
|
874
|
+
password?: string;
|
|
875
|
+
first_name?: string;
|
|
876
|
+
last_name?: string;
|
|
877
|
+
gender?: Gender;
|
|
878
|
+
birth_date?: string;
|
|
879
|
+
}
|
|
880
|
+
export interface RegistrationRequest extends AbstractRegistrationRequest {
|
|
881
|
+
referrer_code?: string;
|
|
882
|
+
referrer_id?: string;
|
|
883
|
+
}
|
|
884
|
+
export interface ConfirmRegistrationRequest extends AbstractRegistrationRequest {
|
|
885
|
+
code: string | number;
|
|
886
|
+
}
|
|
887
|
+
export interface AuthConfirmationStatus {
|
|
888
|
+
confirmation_required: boolean;
|
|
889
|
+
queued_to: string;
|
|
890
|
+
method: ConfirmationMethod;
|
|
891
|
+
}
|
|
892
|
+
export interface AuthResult {
|
|
893
|
+
token: string;
|
|
894
|
+
}
|
|
895
|
+
export interface ResendAuthConfirmationRequest {
|
|
896
|
+
phone: PhoneRequest;
|
|
897
|
+
}
|
|
898
|
+
export interface DispatchPasswordResetRequest {
|
|
899
|
+
phone: PhoneRequest;
|
|
900
|
+
}
|
|
901
|
+
export interface ResetPasswordRequest {
|
|
902
|
+
phone: PhoneRequest;
|
|
903
|
+
code: string | number;
|
|
904
|
+
password: string;
|
|
905
|
+
}
|
|
906
|
+
export interface LoginRequest {
|
|
907
|
+
phone: PhoneRequest;
|
|
908
|
+
password: string;
|
|
909
|
+
}
|
|
910
|
+
export interface CheckPhoneRequest {
|
|
911
|
+
phone: PhoneRequest;
|
|
912
|
+
}
|
|
913
|
+
export interface PhoneCheckResult {
|
|
914
|
+
registered: boolean;
|
|
915
|
+
confirmed: boolean;
|
|
794
916
|
}
|
|
795
917
|
export type OrderCredentials = string | {
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
918
|
+
id: string;
|
|
919
|
+
token: string;
|
|
920
|
+
api_token?: string;
|
|
799
921
|
};
|
|
800
922
|
export declare enum DeliveryMethod {
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
923
|
+
Delivery = "delivery",
|
|
924
|
+
Pickup = "pickup",
|
|
925
|
+
OnPremise = "on_premise"
|
|
804
926
|
}
|
|
805
927
|
export interface OrderStatusKind {
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
928
|
+
Pending: "pending";
|
|
929
|
+
AwaitingPayment: "awaiting_payment";
|
|
930
|
+
Submitted: "submitted";
|
|
931
|
+
Exported: "exported";
|
|
932
|
+
Packing: "packing";
|
|
933
|
+
Ready: "ready";
|
|
934
|
+
AwaitingDelivery: "awaiting_delivery";
|
|
935
|
+
Delivering: "delivering";
|
|
936
|
+
Delivered: "delivered";
|
|
937
|
+
Rejected: "rejected";
|
|
938
|
+
Cancelled: "cancelled";
|
|
939
|
+
Completed: "completed";
|
|
940
|
+
Custom: "custom";
|
|
819
941
|
}
|
|
820
942
|
export declare enum OrderPaymentTransactionType {
|
|
821
|
-
|
|
822
|
-
|
|
943
|
+
Payment = "payment",
|
|
944
|
+
Refund = "refund"
|
|
823
945
|
}
|
|
824
946
|
export declare enum PaymentMethod {
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
947
|
+
Cash = "cash",
|
|
948
|
+
CreditCard = "credit-card",
|
|
949
|
+
CloudPayments = "cloudpayments",
|
|
950
|
+
CardToken = "card_token",
|
|
951
|
+
Bonuses = "bonuses"
|
|
830
952
|
}
|
|
831
953
|
export declare enum OrderPaymentTransactionStatus {
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
954
|
+
Pending = "pending",
|
|
955
|
+
Confirmed = "confirmed",
|
|
956
|
+
Cancelled = "cancelled",
|
|
957
|
+
PendingRefund = "pending_refund",
|
|
958
|
+
Refunding = "refunding",
|
|
959
|
+
Refunded = "refunded"
|
|
838
960
|
}
|
|
839
961
|
export interface OrderStatus {
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
962
|
+
id: string;
|
|
963
|
+
kind: OrderStatusKind;
|
|
964
|
+
name: string | null;
|
|
843
965
|
}
|
|
844
966
|
export interface OrderStatusChange extends OrderStatus {
|
|
845
|
-
|
|
967
|
+
transitioned_at: string;
|
|
846
968
|
}
|
|
847
969
|
export interface OrderStatusProgress extends OrderStatus {
|
|
848
|
-
|
|
970
|
+
transitioned_at: string | null;
|
|
849
971
|
}
|
|
850
972
|
export interface CashPaymentMeta {
|
|
851
|
-
|
|
852
|
-
|
|
973
|
+
change?: number | null;
|
|
974
|
+
bill?: number | null;
|
|
853
975
|
}
|
|
854
976
|
export declare enum CloudpaymentsChargeType {
|
|
855
|
-
|
|
856
|
-
|
|
977
|
+
Auth = "auth",
|
|
978
|
+
Charge = "charge"
|
|
857
979
|
}
|
|
858
980
|
export interface CloudpaymentsPaymentMeta {
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
981
|
+
widget: {
|
|
982
|
+
publicId: string;
|
|
983
|
+
description: string;
|
|
984
|
+
amount: number;
|
|
985
|
+
currency: string;
|
|
986
|
+
invoiceId: string;
|
|
987
|
+
accountId?: string;
|
|
988
|
+
skin: string;
|
|
989
|
+
};
|
|
990
|
+
payment_page_url: string;
|
|
991
|
+
charge_type: CloudpaymentsChargeType;
|
|
992
|
+
charged_as: CloudpaymentsChargeType | null;
|
|
871
993
|
}
|
|
872
994
|
export interface OrderPaymentTransaction {
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
995
|
+
id: string;
|
|
996
|
+
type: OrderPaymentTransactionType;
|
|
997
|
+
status: OrderPaymentTransactionStatus;
|
|
998
|
+
method: PaymentMethod;
|
|
999
|
+
amount: number;
|
|
1000
|
+
created_at: string;
|
|
1001
|
+
confirmed_at: string | null;
|
|
1002
|
+
authorization_confirmed_at: string | null;
|
|
1003
|
+
cancelled_at: string | null;
|
|
1004
|
+
refunded_at: string | null;
|
|
1005
|
+
refund_failed_at: string | null;
|
|
1006
|
+
transaction_meta: CashPaymentMeta | CloudpaymentsPaymentMeta | null;
|
|
885
1007
|
}
|
|
886
1008
|
export interface OrderProductVariantModifier {
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
1009
|
+
id: string;
|
|
1010
|
+
modifiers_group_id: string | null;
|
|
1011
|
+
quantity: number;
|
|
1012
|
+
total_price: number | null;
|
|
1013
|
+
unit_price: number | null;
|
|
1014
|
+
original_price: number | null;
|
|
1015
|
+
original_unit_price: number | null;
|
|
1016
|
+
modifier?: Modifier | null;
|
|
1017
|
+
modifiers_group?: BasicModifiersGroup | null;
|
|
896
1018
|
}
|
|
897
1019
|
export interface OrderProductVariant {
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
1020
|
+
id: string;
|
|
1021
|
+
product_id: string;
|
|
1022
|
+
product_variant_id: string;
|
|
1023
|
+
stock_id: string | null;
|
|
1024
|
+
promotion: {
|
|
1025
|
+
id: string;
|
|
1026
|
+
reward_id: string;
|
|
1027
|
+
} | null;
|
|
1028
|
+
quantity: number;
|
|
1029
|
+
has_measured_quantity: boolean;
|
|
1030
|
+
measured_quantity: number | null;
|
|
1031
|
+
total_price: number;
|
|
1032
|
+
original_total_price: number | null;
|
|
1033
|
+
unit_price: number;
|
|
1034
|
+
original_unit_price: number | null;
|
|
1035
|
+
discount: Discount | null;
|
|
1036
|
+
modifiers_hash: string | null;
|
|
1037
|
+
product?: Product;
|
|
1038
|
+
variant?: ProductVariant;
|
|
1039
|
+
modifiers?: OrderProductVariantModifier[];
|
|
918
1040
|
}
|
|
919
1041
|
export interface Order {
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
1042
|
+
id: string;
|
|
1043
|
+
token: string;
|
|
1044
|
+
number: string | null;
|
|
1045
|
+
delivery_method: DeliveryMethod | null;
|
|
1046
|
+
total_price: number;
|
|
1047
|
+
original_total_price: number | null;
|
|
1048
|
+
discount: Discount | null;
|
|
1049
|
+
notes: string | null;
|
|
1050
|
+
created_at: string;
|
|
1051
|
+
submitted_at: string | null;
|
|
1052
|
+
deliver_at: string | null;
|
|
1053
|
+
meta_data: {
|
|
1054
|
+
deliver_at?: string | null;
|
|
1055
|
+
on_premise?: {
|
|
1056
|
+
table: string | null;
|
|
1057
|
+
} | null;
|
|
1058
|
+
} | null;
|
|
1059
|
+
status: OrderStatusChange | null;
|
|
1060
|
+
variants: OrderProductVariant[];
|
|
1061
|
+
city: City | null;
|
|
1062
|
+
stock: Stock | null;
|
|
1063
|
+
customer?: Customer | null;
|
|
1064
|
+
delivery_address?: DeliveryAddress | null;
|
|
1065
|
+
delivery_zone?: DeliveryZone;
|
|
1066
|
+
statuses?: OrderStatus[];
|
|
1067
|
+
progress?: OrderStatusProgress[];
|
|
1068
|
+
payments?: OrderPaymentTransaction[];
|
|
947
1069
|
}
|
|
948
1070
|
export interface OrderPaymentMethod {
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
1071
|
+
id: PaymentMethod;
|
|
1072
|
+
name: string;
|
|
1073
|
+
meta?: {
|
|
1074
|
+
payment_page_url?: string;
|
|
1075
|
+
};
|
|
1076
|
+
token?: {
|
|
1077
|
+
id: string;
|
|
1078
|
+
type: string;
|
|
1079
|
+
first_six: string;
|
|
1080
|
+
last_four: string;
|
|
1081
|
+
};
|
|
960
1082
|
}
|
|
961
1083
|
export interface OrderDeliveryMethod {
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
1084
|
+
id: DeliveryMethod;
|
|
1085
|
+
name: string;
|
|
1086
|
+
min_price: number | null;
|
|
1087
|
+
delivery_price: number | null;
|
|
1088
|
+
discount: {
|
|
1089
|
+
type: DiscountType;
|
|
1090
|
+
value: number;
|
|
1091
|
+
} | null;
|
|
970
1092
|
}
|
|
971
1093
|
export declare enum OrderOptionKind {
|
|
972
|
-
|
|
973
|
-
|
|
1094
|
+
PersonsCount = "persons_count",
|
|
1095
|
+
DeliveryTime = "delivery_time"
|
|
974
1096
|
}
|
|
975
1097
|
export interface OrderOption {
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
1098
|
+
id: string;
|
|
1099
|
+
kind: OrderOptionKind;
|
|
1100
|
+
meta: any;
|
|
979
1101
|
}
|
|
980
1102
|
export interface OrderSettings {
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
1103
|
+
payment_methods: OrderPaymentMethod[];
|
|
1104
|
+
delivery_methods: OrderDeliveryMethod[];
|
|
1105
|
+
options: OrderOption[];
|
|
984
1106
|
}
|
|
985
1107
|
export declare enum OrderCartCheckerResultReason {
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
1108
|
+
PriceMismatch = "price_mismatch",
|
|
1109
|
+
OutOfStock = "out_of_stock",
|
|
1110
|
+
Unavailable = "unavailable"
|
|
989
1111
|
}
|
|
990
1112
|
export declare enum OrderCartCheckerResultAction {
|
|
991
|
-
|
|
992
|
-
|
|
1113
|
+
None = "none",
|
|
1114
|
+
Cleanup = "cleanup"
|
|
993
1115
|
}
|
|
994
1116
|
export interface OrderCartCheckerResult {
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1117
|
+
order_variants: {
|
|
1118
|
+
id: string;
|
|
1119
|
+
product_variant_id: string;
|
|
1120
|
+
quantity: number;
|
|
1121
|
+
reasons: OrderCartCheckerResultReason[];
|
|
1122
|
+
}[];
|
|
1123
|
+
action: OrderCartCheckerResultAction;
|
|
1002
1124
|
}
|
|
1003
1125
|
export interface ListOrdersRequest extends ListRequest {
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1126
|
+
submitted_from?: string;
|
|
1127
|
+
submitted_till?: string;
|
|
1128
|
+
order_status_id?: string;
|
|
1129
|
+
city_id?: string;
|
|
1130
|
+
submission_period?: string;
|
|
1009
1131
|
}
|
|
1010
1132
|
export interface CreateOrderRequest {
|
|
1011
|
-
|
|
1133
|
+
city_id: string;
|
|
1012
1134
|
}
|
|
1013
1135
|
export interface OrderProductVariantRequest {
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1136
|
+
product_variant_id: string;
|
|
1137
|
+
quantity: number;
|
|
1138
|
+
promotion_id?: string;
|
|
1139
|
+
promotion_reward_id?: string;
|
|
1140
|
+
modifiers?: ProductModifiersRequest[];
|
|
1019
1141
|
}
|
|
1020
1142
|
export interface SetOrderCustomerRequest {
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1143
|
+
phone?: PhoneRequest;
|
|
1144
|
+
first_name?: string;
|
|
1145
|
+
last_name?: string;
|
|
1146
|
+
gender?: Gender;
|
|
1147
|
+
birth_date?: string;
|
|
1026
1148
|
}
|
|
1027
1149
|
export interface SetOrderDeliveryRequest {
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1150
|
+
delivery_method: DeliveryMethod;
|
|
1151
|
+
delivery_address?: ExistedDeliveryAddressRequest | DadataDeliveryAddressRequest | ManualDeliveryAddressRequest;
|
|
1152
|
+
stock_id?: string;
|
|
1153
|
+
on_premise?: {
|
|
1154
|
+
table: string;
|
|
1155
|
+
};
|
|
1156
|
+
deliver_at?: string;
|
|
1035
1157
|
}
|
|
1036
1158
|
export interface OrderPaymentMethodRequest {
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1159
|
+
method: PaymentMethod;
|
|
1160
|
+
amount?: number | string;
|
|
1161
|
+
bill?: number | string;
|
|
1162
|
+
save_card?: boolean;
|
|
1163
|
+
card_token_id?: string;
|
|
1042
1164
|
}
|
|
1043
1165
|
export interface SetOrderPaymentsRequest {
|
|
1044
|
-
|
|
1166
|
+
payments: OrderPaymentMethodRequest[];
|
|
1045
1167
|
}
|
|
1046
1168
|
export interface OrderCheckoutBonusesPreview {
|
|
1047
|
-
|
|
1048
|
-
|
|
1169
|
+
bonuses: number;
|
|
1170
|
+
unpaid: number;
|
|
1049
1171
|
}
|
|
1050
1172
|
export interface OrderCheckoutTotalPayment {
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1173
|
+
id: string;
|
|
1174
|
+
method: PaymentMethod;
|
|
1175
|
+
amount: number;
|
|
1176
|
+
bill?: number;
|
|
1177
|
+
change?: number;
|
|
1178
|
+
save_card?: boolean;
|
|
1179
|
+
card_token_id?: string;
|
|
1058
1180
|
}
|
|
1059
1181
|
export interface OrderCheckoutTotal {
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1182
|
+
min_price: number | null;
|
|
1183
|
+
subtotal: number;
|
|
1184
|
+
original_subtotal: number | null;
|
|
1185
|
+
delivery_price: number | null;
|
|
1186
|
+
delivery_discount: number | null;
|
|
1187
|
+
discount: Discount | null;
|
|
1188
|
+
total: number;
|
|
1189
|
+
original_total: number | null;
|
|
1190
|
+
max_bonuses_payment: number | null;
|
|
1191
|
+
cashback: number | null;
|
|
1192
|
+
payments: OrderCheckoutTotalPayment[];
|
|
1071
1193
|
}
|
|
1072
1194
|
export interface OrderCheckoutRequest {
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
}
|
|
1076
|
-
export declare enum ConfirmationMethod {
|
|
1077
|
-
Sms = "sms",
|
|
1078
|
-
Call = "call"
|
|
1195
|
+
notes?: string;
|
|
1196
|
+
persons_count?: string | number;
|
|
1079
1197
|
}
|
|
1080
1198
|
export interface OrderCheckoutResult {
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1199
|
+
confirmation: {
|
|
1200
|
+
required: boolean;
|
|
1201
|
+
method: ConfirmationMethod | null;
|
|
1202
|
+
phone: Phone | null;
|
|
1203
|
+
};
|
|
1204
|
+
online_payment: {
|
|
1205
|
+
required: boolean;
|
|
1206
|
+
payment_page_url: string | null;
|
|
1207
|
+
};
|
|
1208
|
+
order: Order;
|
|
1091
1209
|
}
|
|
1092
1210
|
export interface ConfirmOrderRequest {
|
|
1093
|
-
|
|
1211
|
+
code: string | number;
|
|
1094
1212
|
}
|
|
1095
1213
|
export interface OrderPromotionReward {
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1214
|
+
id: string;
|
|
1215
|
+
promotion_id: string;
|
|
1216
|
+
promotion_reward_id: string;
|
|
1217
|
+
item_id: string | null;
|
|
1218
|
+
amount: number | null;
|
|
1219
|
+
total_amount: number | null;
|
|
1220
|
+
count: number;
|
|
1103
1221
|
}
|
|
1104
1222
|
export declare class OrdersResource extends AbstractResource {
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
city_kladr_id: string | null;
|
|
1153
|
-
city_with_type: string | null;
|
|
1154
|
-
city_type: string | null;
|
|
1155
|
-
city_type_full: string | null;
|
|
1156
|
-
city: string | null;
|
|
1157
|
-
city_area: string | null;
|
|
1158
|
-
city_district_fias_id: string | null;
|
|
1159
|
-
city_district_with_type: string | null;
|
|
1160
|
-
city_district_type: string | null;
|
|
1161
|
-
city_district_type_full: string | null;
|
|
1162
|
-
city_district: string | null;
|
|
1163
|
-
settlement_fias_id: string | null;
|
|
1164
|
-
settlement_kladr_id: string | null;
|
|
1165
|
-
settlement_with_type: string | null;
|
|
1166
|
-
settlement_type: string | null;
|
|
1167
|
-
settlement_type_full: string | null;
|
|
1168
|
-
settlement: string | null;
|
|
1169
|
-
street_fias_id: string | null;
|
|
1170
|
-
street_kladr_id: string | null;
|
|
1171
|
-
street_with_type: string | null;
|
|
1172
|
-
street_type: string | null;
|
|
1173
|
-
street_type_full: string | null;
|
|
1174
|
-
street: string | null;
|
|
1175
|
-
stead_fias_id: string | null;
|
|
1176
|
-
stead_cadnum: string | null;
|
|
1177
|
-
stead_type: string | null;
|
|
1178
|
-
stead_type_full: string | null;
|
|
1179
|
-
stead: string | null;
|
|
1180
|
-
house_fias_id: string | null;
|
|
1181
|
-
house_kladr_id: string | null;
|
|
1182
|
-
house_cadnum: string | null;
|
|
1183
|
-
house_type: string | null;
|
|
1184
|
-
house_type_full: string | null;
|
|
1185
|
-
house: string | null;
|
|
1186
|
-
block_type: string | null;
|
|
1187
|
-
block_type_full: string | null;
|
|
1188
|
-
block: string | null;
|
|
1189
|
-
flat_fias_id: string | null;
|
|
1190
|
-
flat_cadnum: string | null;
|
|
1191
|
-
flat_type: string | null;
|
|
1192
|
-
flat_type_full: string | null;
|
|
1193
|
-
flat: string | null;
|
|
1194
|
-
flat_area: string | null;
|
|
1195
|
-
square_meter_price: string | null;
|
|
1196
|
-
flat_price: string | null;
|
|
1197
|
-
room_fias_id: string | null;
|
|
1198
|
-
room_cadnum: string | null;
|
|
1199
|
-
room_type: string | null;
|
|
1200
|
-
room_type_full: string | null;
|
|
1201
|
-
postal_box: string | null;
|
|
1202
|
-
fias_id: string | null;
|
|
1203
|
-
fias_level: string | null;
|
|
1204
|
-
fias_actuality_state: string | null;
|
|
1205
|
-
kladr_id: string | null;
|
|
1206
|
-
geoname_id: string | null;
|
|
1207
|
-
capital_marker: string | null;
|
|
1208
|
-
okato: string | null;
|
|
1209
|
-
oktmo: string | null;
|
|
1210
|
-
tax_office: string | null;
|
|
1211
|
-
tax_office_legal: string | null;
|
|
1212
|
-
timezone: string | null;
|
|
1213
|
-
geo_lat: string | null;
|
|
1214
|
-
geo_lon: string | null;
|
|
1215
|
-
qc_geo: string | null;
|
|
1216
|
-
beltway_hit: string | null;
|
|
1217
|
-
beltway_distance: string | null;
|
|
1218
|
-
metro?: {
|
|
1219
|
-
name: string | null;
|
|
1220
|
-
line: string | null;
|
|
1221
|
-
distance: string | null;
|
|
1222
|
-
}[] | null;
|
|
1223
|
-
};
|
|
1224
|
-
}
|
|
1225
|
-
export interface AddressSuggestions {
|
|
1226
|
-
provider: AddressSuggestionsProvider;
|
|
1227
|
-
suggestions: DadataAddressSuggestion[];
|
|
1228
|
-
}
|
|
1229
|
-
export interface AddressSuggestionsRequest {
|
|
1230
|
-
query: string;
|
|
1231
|
-
city_id?: string;
|
|
1232
|
-
count?: number;
|
|
1233
|
-
}
|
|
1234
|
-
export declare class AddressesResource extends AbstractResource {
|
|
1235
|
-
getAddressSuggestions(storeId: string, request: AddressSuggestionsRequest): Promise<AddressSuggestions>;
|
|
1236
|
-
}
|
|
1237
|
-
export interface AbstractRegistrationRequest {
|
|
1238
|
-
phone: PhoneRequest;
|
|
1239
|
-
password?: string;
|
|
1240
|
-
first_name?: string;
|
|
1241
|
-
last_name?: string;
|
|
1242
|
-
gender?: Gender;
|
|
1243
|
-
birth_date?: string;
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1246
|
-
export interface RegistrationRequest extends AbstractRegistrationRequest {
|
|
1247
|
-
referrer_code?: string;
|
|
1248
|
-
referrer_id?: string;
|
|
1223
|
+
protected getOrderUrl(storeId: string, credentials: OrderCredentials, path: string, request?: any): string;
|
|
1224
|
+
protected getApiToken(credentials: OrderCredentials): undefined | string;
|
|
1225
|
+
getOrders(storeId: string, request?: ListOrdersRequest, apiToken?: string | null): Promise<PaginatedResponse<Order>>;
|
|
1226
|
+
createOrder(storeId: string, request: CreateOrderRequest, apiToken?: string | null): Promise<Order>;
|
|
1227
|
+
getOrder(storeId: string, credentials: OrderCredentials, request?: InclusionRequest): Promise<Order>;
|
|
1228
|
+
getOrderSettings(storeId: string, credentials: OrderCredentials): Promise<OrderSettings>;
|
|
1229
|
+
addProductVariantToOrder(storeId: string, credentials: OrderCredentials, request: OrderProductVariantRequest): Promise<Order>;
|
|
1230
|
+
removeProductVariantFromOrder(storeId: string, credentials: OrderCredentials, request: OrderProductVariantRequest): Promise<Order>;
|
|
1231
|
+
checkProducts(storeId: string, credentials: OrderCredentials): Promise<OrderCartCheckerResult>;
|
|
1232
|
+
setOrderCustomer(storeId: string, credentials: OrderCredentials, request: SetOrderCustomerRequest): Promise<boolean>;
|
|
1233
|
+
setOrderDeliveryMethod(storeId: string, credentials: OrderCredentials, request: SetOrderDeliveryRequest): Promise<Order>;
|
|
1234
|
+
setOrderPayments(storeId: string, credentials: OrderCredentials, request: SetOrderPaymentsRequest): Promise<Order>;
|
|
1235
|
+
getOrderBonusesPreview(storeId: string, credentials: OrderCredentials, amount: number | string): Promise<OrderCheckoutBonusesPreview>;
|
|
1236
|
+
getOrderTotal(storeId: string, credentials: OrderCredentials): Promise<OrderCheckoutTotal>;
|
|
1237
|
+
checkoutOrder(storeId: string, credentials: OrderCredentials, request: OrderCheckoutRequest): Promise<OrderCheckoutResult>;
|
|
1238
|
+
confirmOrder(storeId: string, credentials: OrderCredentials, request: ConfirmOrderRequest): Promise<boolean>;
|
|
1239
|
+
resendOrderConfirmationCode(storeId: string, credentials: OrderCredentials): Promise<boolean>;
|
|
1240
|
+
getOrderBonusesTransactions(storeId: string, credentials: OrderCredentials, request?: ListBonusesTransactionsRequest): Promise<PaginatedResponse<BonusesTransaction>>;
|
|
1241
|
+
getOrderCashbackTransaction(storeId: string, credentials: OrderCredentials): Promise<BonusesTransaction>;
|
|
1242
|
+
dispatchPromotionsChecker(storeId: string, credentials: OrderCredentials): Promise<boolean>;
|
|
1243
|
+
getOrderPromotionRewards(storeId: string, credentials: OrderCredentials): Promise<OrderPromotionReward>;
|
|
1244
|
+
}
|
|
1245
|
+
declare class AddressesResource extends AbstractResource {
|
|
1246
|
+
getAddressSuggestions(storeId: string, request: AddressSuggestionsRequest): Promise<AddressSuggestions>;
|
|
1247
|
+
}
|
|
1248
|
+
declare class CustomersResource extends AbstractResource {
|
|
1249
|
+
getProfile(storeId: string, request?: InclusionRequest, apiToken?: string): Promise<Customer>;
|
|
1250
|
+
updateProfile(storeId: string, request: UpdateCustomerProfileRequest, apiToken?: string): Promise<Customer>;
|
|
1251
|
+
removeProfile(storeId: string, request: RemoveCustomerProfileRequest, apiToken?: string): Promise<boolean>;
|
|
1252
|
+
getSettings(storeId: string, apiToken?: string): Promise<CustomerSettings>;
|
|
1253
|
+
updateSettings(storeId: string, request: UpdateCustomerSettingsRequest, apiToken?: string): Promise<CustomerSettings>;
|
|
1254
|
+
getAddresses(storeId: string, request?: ListRequest, apiToken?: string): Promise<PaginatedResponse<DeliveryAddress>>;
|
|
1255
|
+
createAddress(storeId: string, request: DeliveryAddressRequest, apiToken?: string): Promise<DeliveryAddress>;
|
|
1256
|
+
updateAddress(storeId: string, addressId: string, request: DeliveryAddressRequest, apiToken?: string): Promise<DeliveryAddress>;
|
|
1257
|
+
deleteAddress(storeId: string, addressId: string, apiToken?: string): Promise<boolean>;
|
|
1258
|
+
getPaymentMethods(storeId: string, request?: PaginationRequest, apiToken?: string): Promise<PaginatedResponse<CustomerPaymentMethod>>;
|
|
1259
|
+
deletePaymentMethod(storeId: string, paymentMethodId: string, apiToken?: string): Promise<boolean>;
|
|
1260
|
+
getBonusesTransactions(storeId: string, request?: ListCustomerBonusesTransactionsRequest, apiToken?: string): Promise<PaginatedResponse<BonusesTransaction>>;
|
|
1261
|
+
}
|
|
1262
|
+
declare class AuthenticationResource extends AbstractResource {
|
|
1263
|
+
checkPhone(storeId: string, request: CheckPhoneRequest): Promise<PhoneCheckResult>;
|
|
1264
|
+
register(storeId: string, request: RegistrationRequest): Promise<AuthConfirmationStatus>;
|
|
1265
|
+
confirmRegistration(storeId: string, request: ConfirmRegistrationRequest): Promise<AuthResult>;
|
|
1266
|
+
resendRegistrationConfirmation(storeId: string, request: ResendAuthConfirmationRequest): Promise<AuthConfirmationStatus>;
|
|
1267
|
+
login(storeId: string, request: LoginRequest): Promise<AuthResult>;
|
|
1268
|
+
dispatchPasswordReset(storeId: string, request: DispatchPasswordResetRequest): Promise<AuthConfirmationStatus>;
|
|
1269
|
+
resetPassword(storeId: string, request: ResetPasswordRequest): Promise<AuthResult>;
|
|
1249
1270
|
}
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
export interface ResendAuthConfirmationRequest {
|
|
1266
|
-
phone: PhoneRequest;
|
|
1267
|
-
}
|
|
1268
|
-
|
|
1269
|
-
export interface DispatchPasswordResetRequest {
|
|
1270
|
-
phone: PhoneRequest;
|
|
1271
|
-
}
|
|
1272
|
-
|
|
1273
|
-
export interface ResetPasswordRequest {
|
|
1274
|
-
phone: PhoneRequest;
|
|
1275
|
-
code: string | number;
|
|
1276
|
-
password: string;
|
|
1277
|
-
}
|
|
1278
|
-
|
|
1279
|
-
export interface LoginRequest {
|
|
1280
|
-
phone: PhoneRequest;
|
|
1281
|
-
password: string;
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
|
-
export interface CheckPhoneRequest {
|
|
1285
|
-
phone: PhoneRequest;
|
|
1286
|
-
}
|
|
1287
|
-
|
|
1288
|
-
export interface PhoneCheckResult {
|
|
1289
|
-
registered: boolean;
|
|
1290
|
-
confirmed: boolean;
|
|
1271
|
+
export declare class ZenkyStorefront {
|
|
1272
|
+
protected readonly client: Client;
|
|
1273
|
+
readonly store: StoreResource;
|
|
1274
|
+
readonly auth: AuthenticationResource;
|
|
1275
|
+
readonly customer: CustomersResource;
|
|
1276
|
+
readonly categories: CategoriesResource;
|
|
1277
|
+
readonly products: ProductsResource;
|
|
1278
|
+
readonly addresses: AddressesResource;
|
|
1279
|
+
readonly orders: OrdersResource;
|
|
1280
|
+
readonly collections: CollectionsResource;
|
|
1281
|
+
readonly offers: OffersResource;
|
|
1282
|
+
readonly articles: ArticlesResource;
|
|
1283
|
+
readonly feedback: FeedbackResource;
|
|
1284
|
+
constructor(config?: ClientConfig, fetcher?: any);
|
|
1285
|
+
setApiToken(token: string | null): ZenkyStorefront;
|
|
1291
1286
|
}
|
|
1292
1287
|
|
|
1293
|
-
export
|
|
1294
|
-
checkPhone(storeId: string, request: CheckPhoneRequest): Promise<PhoneCheckResult>;
|
|
1295
|
-
register(storeId: string, request: RegistrationRequest): Promise<AuthConfirmationStatus>;
|
|
1296
|
-
confirmRegistration(storeId: string, request: ConfirmRegistrationRequest): Promise<AuthResult>;
|
|
1297
|
-
resendRegistrationConfirmation(storeId: string, request: ResendAuthConfirmationRequest): Promise<AuthConfirmationStatus>;
|
|
1298
|
-
login(storeId: string, request: LoginRequest): Promise<AuthResult>;
|
|
1299
|
-
dispatchPasswordReset(storeId: string, request: DispatchPasswordResetRequest): Promise<AuthConfirmationStatus>;
|
|
1300
|
-
resetPassword(storeId: string, request: ResetPasswordRequest): Promise<AuthResult>;
|
|
1301
|
-
}
|
|
1288
|
+
export {};
|