arky-sdk 0.7.95 → 0.7.102
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/README.md +14 -0
- package/dist/admin.cjs +29 -26
- package/dist/admin.cjs.map +1 -1
- package/dist/admin.js +29 -26
- package/dist/admin.js.map +1 -1
- package/dist/index.cjs +98 -97
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +424 -251
- package/dist/index.d.ts +424 -251
- package/dist/index.js +98 -97
- package/dist/index.js.map +1 -1
- package/dist/storefront.cjs +77 -84
- package/dist/storefront.cjs.map +1 -1
- package/dist/storefront.js +77 -84
- package/dist/storefront.js.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +2275 -2112
- package/dist/types.d.ts +2275 -2112
- package/dist/types.js.map +1 -1
- package/package.json +2 -1
package/dist/types.d.ts
CHANGED
|
@@ -1,2477 +1,2640 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
interface CreateLocationParams {
|
|
2
|
+
key: string;
|
|
3
|
+
address: Address;
|
|
4
|
+
is_pickup_location?: boolean;
|
|
4
5
|
}
|
|
5
|
-
interface
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
interface UpdateLocationParams {
|
|
7
|
+
id: string;
|
|
8
|
+
key: string;
|
|
9
|
+
address: Address;
|
|
10
|
+
is_pickup_location?: boolean;
|
|
10
11
|
}
|
|
11
|
-
interface
|
|
12
|
-
|
|
13
|
-
mode_snapshot?: string;
|
|
14
|
-
rate_bps: number;
|
|
15
|
-
lines: BookingPaymentTaxLine[];
|
|
12
|
+
interface DeleteLocationParams {
|
|
13
|
+
id: string;
|
|
16
14
|
}
|
|
17
|
-
interface
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
interface CreateMarketParams {
|
|
16
|
+
key: string;
|
|
17
|
+
currency: string;
|
|
18
|
+
tax_mode: 'inclusive' | 'exclusive';
|
|
19
|
+
payment_methods?: PaymentMethod[];
|
|
20
|
+
zones?: Zone[];
|
|
22
21
|
}
|
|
23
|
-
interface
|
|
22
|
+
interface UpdateMarketParams {
|
|
24
23
|
id: string;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
key?: string;
|
|
25
|
+
currency?: string;
|
|
26
|
+
tax_mode?: 'inclusive' | 'exclusive';
|
|
27
|
+
payment_methods?: PaymentMethod[];
|
|
28
|
+
zones?: Zone[];
|
|
28
29
|
}
|
|
29
|
-
|
|
30
|
-
type: 'stripe';
|
|
31
|
-
customer_id: string;
|
|
32
|
-
payment_intent_id?: string;
|
|
33
|
-
};
|
|
34
|
-
interface BookingPaymentRefund {
|
|
30
|
+
interface DeleteMarketParams {
|
|
35
31
|
id: string;
|
|
36
|
-
total: number;
|
|
37
|
-
provider_refund_id?: string;
|
|
38
|
-
status: string;
|
|
39
|
-
created_at: number;
|
|
40
|
-
}
|
|
41
|
-
interface BookingPayment {
|
|
42
|
-
currency: string;
|
|
43
|
-
market: string;
|
|
44
|
-
subtotal: number;
|
|
45
|
-
discount: number;
|
|
46
|
-
total: number;
|
|
47
|
-
paid: number;
|
|
48
|
-
tax?: BookingPaymentTax;
|
|
49
|
-
promo_code?: BookingPaymentPromoCode;
|
|
50
|
-
provider?: BookingPaymentProvider;
|
|
51
|
-
refunds: BookingPaymentRefund[];
|
|
52
|
-
payment_method_id?: string;
|
|
53
|
-
method_type: PaymentMethodType;
|
|
54
32
|
}
|
|
55
|
-
interface
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
33
|
+
interface RequestOptions<T = any> {
|
|
34
|
+
headers?: Record<string, string>;
|
|
35
|
+
params?: Record<string, any>;
|
|
36
|
+
transformRequest?: (data: any) => any;
|
|
37
|
+
onSuccess?: (ctx: {
|
|
38
|
+
data: T;
|
|
39
|
+
method: string;
|
|
40
|
+
url: string;
|
|
41
|
+
status: number;
|
|
42
|
+
request?: any;
|
|
43
|
+
duration_ms?: number;
|
|
44
|
+
request_id?: string | null;
|
|
45
|
+
}) => void | Promise<void>;
|
|
46
|
+
onError?: (ctx: {
|
|
47
|
+
error: any;
|
|
48
|
+
method: string;
|
|
49
|
+
url: string;
|
|
50
|
+
status?: number;
|
|
51
|
+
request?: any;
|
|
52
|
+
response?: any;
|
|
53
|
+
duration_ms?: number;
|
|
54
|
+
request_id?: string | null;
|
|
55
|
+
aborted?: boolean;
|
|
56
|
+
}) => void | Promise<void>;
|
|
60
57
|
}
|
|
61
|
-
interface
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
scope?: string;
|
|
58
|
+
interface EshopItem {
|
|
59
|
+
product_id: string;
|
|
60
|
+
variant_id: string;
|
|
61
|
+
quantity: number;
|
|
66
62
|
}
|
|
67
|
-
interface
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
63
|
+
interface EshopQuoteItem {
|
|
64
|
+
product_id: string;
|
|
65
|
+
variant_id: string;
|
|
66
|
+
quantity: number;
|
|
67
|
+
price?: Price;
|
|
72
68
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
created_at: number;
|
|
69
|
+
interface GetQuoteParams {
|
|
70
|
+
store_id?: string;
|
|
71
|
+
market?: string;
|
|
72
|
+
items: EshopQuoteItem[];
|
|
73
|
+
shipping_address?: Address;
|
|
74
|
+
forms?: FormEntry[];
|
|
75
|
+
payment_method_id?: string;
|
|
76
|
+
promo_code?: string;
|
|
77
|
+
shipping_method_id?: string;
|
|
78
|
+
location?: ZoneLocation;
|
|
84
79
|
}
|
|
85
|
-
interface
|
|
86
|
-
|
|
87
|
-
market
|
|
88
|
-
|
|
89
|
-
shipping: number;
|
|
90
|
-
discount: number;
|
|
91
|
-
total: number;
|
|
92
|
-
paid: number;
|
|
93
|
-
tax?: OrderPaymentTax;
|
|
94
|
-
promo_code?: OrderPaymentPromoCode;
|
|
95
|
-
provider?: OrderPaymentProvider;
|
|
96
|
-
refunds: OrderPaymentRefund[];
|
|
97
|
-
zone_id?: string;
|
|
80
|
+
interface OrderCheckoutParams {
|
|
81
|
+
store_id?: string;
|
|
82
|
+
market?: string;
|
|
83
|
+
items: EshopItem[];
|
|
98
84
|
payment_method_id?: string;
|
|
85
|
+
shipping_address?: Address;
|
|
86
|
+
billing_address?: Address;
|
|
87
|
+
forms?: FormEntry[];
|
|
88
|
+
promo_code_id?: string;
|
|
99
89
|
shipping_method_id?: string;
|
|
100
|
-
method_type: PaymentMethodType;
|
|
101
90
|
}
|
|
102
|
-
interface
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
91
|
+
interface GetProductsParams {
|
|
92
|
+
store_id?: string;
|
|
93
|
+
ids?: string[];
|
|
94
|
+
taxonomy_query?: TaxonomyQuery[];
|
|
95
|
+
match_all?: boolean;
|
|
96
|
+
status?: ProductStatus;
|
|
97
|
+
query?: string | number;
|
|
98
|
+
limit?: number;
|
|
99
|
+
cursor?: string;
|
|
100
|
+
sort_field?: string;
|
|
101
|
+
sort_direction?: 'asc' | 'desc';
|
|
102
|
+
created_at_from?: number | null;
|
|
103
|
+
created_at_to?: number | null;
|
|
107
104
|
}
|
|
108
|
-
interface
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
expires_at?: number;
|
|
105
|
+
interface GetNodesParams {
|
|
106
|
+
store_id?: string;
|
|
107
|
+
ids?: string[];
|
|
108
|
+
parent_id?: string;
|
|
109
|
+
key?: string;
|
|
110
|
+
limit?: number;
|
|
111
|
+
cursor?: string;
|
|
112
|
+
query?: string | number;
|
|
113
|
+
status?: NodeStatus;
|
|
114
|
+
sort_field?: string;
|
|
115
|
+
sort_direction?: 'asc' | 'desc';
|
|
116
|
+
created_at_from?: number;
|
|
117
|
+
created_at_to?: number;
|
|
122
118
|
}
|
|
123
|
-
interface
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
total: number;
|
|
131
|
-
shipping_method: ShippingMethod | null;
|
|
132
|
-
payment_method: PaymentMethod | null;
|
|
133
|
-
payment_methods: PaymentMethod[];
|
|
134
|
-
promo_code: PromoCodeValidation | null;
|
|
135
|
-
payment: OrderPayment;
|
|
136
|
-
charge_amount: number;
|
|
137
|
-
id?: string;
|
|
138
|
-
expires_at?: number;
|
|
119
|
+
interface CreateNodeParams {
|
|
120
|
+
store_id?: string;
|
|
121
|
+
key: string;
|
|
122
|
+
parent_id?: string | null;
|
|
123
|
+
blocks?: Block[];
|
|
124
|
+
taxonomies?: TaxonomyEntry[];
|
|
125
|
+
slug?: Record<string, string>;
|
|
139
126
|
}
|
|
140
|
-
interface
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
127
|
+
interface UpdateNodeParams {
|
|
128
|
+
id: string;
|
|
129
|
+
store_id?: string;
|
|
130
|
+
key?: string;
|
|
131
|
+
parent_id?: string | null;
|
|
132
|
+
blocks?: Block[];
|
|
133
|
+
taxonomies?: TaxonomyEntry[];
|
|
134
|
+
status?: NodeStatus;
|
|
135
|
+
slug?: Record<string, string>;
|
|
146
136
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
137
|
+
interface GetNodeParams {
|
|
138
|
+
id?: string;
|
|
139
|
+
slug?: string;
|
|
140
|
+
key?: string;
|
|
141
|
+
store_id?: string;
|
|
151
142
|
}
|
|
152
|
-
interface
|
|
153
|
-
type: string;
|
|
143
|
+
interface DeleteNodeParams {
|
|
154
144
|
id: string;
|
|
145
|
+
store_id?: string;
|
|
155
146
|
}
|
|
156
|
-
interface
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
providers: PriceProvider[];
|
|
147
|
+
interface GetNodeChildrenParams {
|
|
148
|
+
id: string;
|
|
149
|
+
store_id?: string;
|
|
150
|
+
limit?: number;
|
|
151
|
+
cursor?: string;
|
|
162
152
|
}
|
|
163
|
-
interface
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
street2?: string | null;
|
|
168
|
-
city: string;
|
|
169
|
-
state: string;
|
|
170
|
-
postal_code: string;
|
|
171
|
-
country: string;
|
|
172
|
-
phone?: string | null;
|
|
173
|
-
email?: string | null;
|
|
153
|
+
interface UploadStoreMediaParams {
|
|
154
|
+
store_id?: string;
|
|
155
|
+
files?: File[];
|
|
156
|
+
urls?: string[];
|
|
174
157
|
}
|
|
175
|
-
interface
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
lon: number;
|
|
179
|
-
} | null;
|
|
180
|
-
label?: string | null;
|
|
158
|
+
interface DeleteStoreMediaParams {
|
|
159
|
+
id: string;
|
|
160
|
+
media_id: string;
|
|
181
161
|
}
|
|
182
|
-
interface
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
city?: string | null;
|
|
186
|
-
postal_code?: string | null;
|
|
162
|
+
interface GetMediaParams {
|
|
163
|
+
media_id: string;
|
|
164
|
+
store_id?: string;
|
|
187
165
|
}
|
|
188
|
-
interface
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
product_name: string;
|
|
193
|
-
product_slug: string;
|
|
194
|
-
variant_attributes: Record<string, any>;
|
|
195
|
-
price: Price;
|
|
196
|
-
quantity: number;
|
|
197
|
-
added_at: number;
|
|
198
|
-
max_stock?: number;
|
|
166
|
+
interface UpdateMediaParams {
|
|
167
|
+
media_id: string;
|
|
168
|
+
store_id?: string;
|
|
169
|
+
slug?: Record<string, string>;
|
|
199
170
|
}
|
|
200
|
-
interface
|
|
201
|
-
|
|
171
|
+
interface GetStoreMediaParams {
|
|
172
|
+
store_id?: string;
|
|
173
|
+
cursor?: string | null;
|
|
174
|
+
limit: number;
|
|
175
|
+
ids?: string[];
|
|
176
|
+
query?: string;
|
|
177
|
+
mime_type?: string;
|
|
178
|
+
sort_field?: string;
|
|
179
|
+
sort_direction?: 'asc' | 'desc';
|
|
180
|
+
}
|
|
181
|
+
interface LoginAccountParams {
|
|
182
|
+
email?: string;
|
|
183
|
+
provider: string;
|
|
184
|
+
token?: string;
|
|
185
|
+
}
|
|
186
|
+
interface MagicLinkRequestParams {
|
|
187
|
+
email: string;
|
|
188
|
+
store_id?: string;
|
|
189
|
+
}
|
|
190
|
+
interface MagicLinkVerifyParams {
|
|
191
|
+
email: string;
|
|
192
|
+
code: string;
|
|
193
|
+
}
|
|
194
|
+
interface GetServicesParams {
|
|
195
|
+
store_id?: string;
|
|
196
|
+
ids?: string[];
|
|
197
|
+
provider_id?: string;
|
|
198
|
+
limit?: number;
|
|
199
|
+
cursor?: string;
|
|
200
|
+
query?: string | number;
|
|
201
|
+
status?: BookingServiceStatus;
|
|
202
|
+
sort_field?: string;
|
|
203
|
+
sort_direction?: 'asc' | 'desc';
|
|
204
|
+
created_at_from?: number;
|
|
205
|
+
created_at_to?: number;
|
|
206
|
+
taxonomy_query?: TaxonomyQuery[];
|
|
207
|
+
match_all?: boolean;
|
|
208
|
+
from?: number;
|
|
209
|
+
to?: number;
|
|
210
|
+
}
|
|
211
|
+
interface BookingCreatePart {
|
|
202
212
|
service_id: string;
|
|
203
|
-
|
|
204
|
-
|
|
213
|
+
provider_id: string;
|
|
214
|
+
slots: SlotRange[];
|
|
215
|
+
forms: FormEntry[];
|
|
216
|
+
}
|
|
217
|
+
interface BookingCheckoutParams {
|
|
218
|
+
store_id?: string;
|
|
219
|
+
market?: string;
|
|
220
|
+
items: BookingCreatePart[];
|
|
221
|
+
payment_method_id?: string;
|
|
222
|
+
forms?: FormEntry[];
|
|
223
|
+
promo_code_id?: string;
|
|
224
|
+
}
|
|
225
|
+
interface SlotRange {
|
|
205
226
|
from: number;
|
|
206
227
|
to: number;
|
|
207
|
-
time_text: string;
|
|
208
|
-
provider_id?: string;
|
|
209
|
-
forms: any[];
|
|
210
228
|
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
connected_at: number;
|
|
230
|
-
} | {
|
|
231
|
-
type: 'telegram_bot';
|
|
232
|
-
bot_token?: string;
|
|
233
|
-
} | {
|
|
234
|
-
type: 'deep_seek';
|
|
235
|
-
api_key?: string;
|
|
236
|
-
model?: string;
|
|
237
|
-
} | {
|
|
238
|
-
type: 'open_ai';
|
|
239
|
-
api_key?: string;
|
|
240
|
-
model?: string;
|
|
241
|
-
} | {
|
|
242
|
-
type: 'slack';
|
|
243
|
-
api_key?: string;
|
|
244
|
-
} | {
|
|
245
|
-
type: 'discord';
|
|
246
|
-
api_key?: string;
|
|
247
|
-
} | {
|
|
248
|
-
type: 'whats_app';
|
|
249
|
-
api_key?: string;
|
|
250
|
-
} | {
|
|
251
|
-
type: 'resend';
|
|
252
|
-
api_key?: string;
|
|
253
|
-
} | {
|
|
254
|
-
type: 'send_grid';
|
|
255
|
-
api_key?: string;
|
|
256
|
-
} | {
|
|
257
|
-
type: 'airtable';
|
|
258
|
-
api_key?: string;
|
|
259
|
-
} | {
|
|
260
|
-
type: 'linear';
|
|
261
|
-
api_key?: string;
|
|
262
|
-
} | {
|
|
263
|
-
type: 'git_hub';
|
|
264
|
-
api_key?: string;
|
|
265
|
-
} | {
|
|
266
|
-
type: 'git_lab';
|
|
267
|
-
api_key?: string;
|
|
268
|
-
} | {
|
|
269
|
-
type: 'dropbox';
|
|
270
|
-
api_key?: string;
|
|
271
|
-
} | {
|
|
272
|
-
type: 'hub_spot';
|
|
273
|
-
api_key?: string;
|
|
274
|
-
} | {
|
|
275
|
-
type: 'monday';
|
|
276
|
-
api_key?: string;
|
|
277
|
-
} | {
|
|
278
|
-
type: 'click_up';
|
|
279
|
-
api_key?: string;
|
|
280
|
-
} | {
|
|
281
|
-
type: 'pipedrive';
|
|
282
|
-
api_key?: string;
|
|
283
|
-
} | {
|
|
284
|
-
type: 'calendly';
|
|
285
|
-
api_key?: string;
|
|
286
|
-
} | {
|
|
287
|
-
type: 'typeform';
|
|
288
|
-
api_key?: string;
|
|
289
|
-
} | {
|
|
290
|
-
type: 'webflow';
|
|
291
|
-
api_key?: string;
|
|
292
|
-
} | {
|
|
293
|
-
type: 'trello';
|
|
294
|
-
api_key?: string;
|
|
295
|
-
} | {
|
|
296
|
-
type: 'replicate';
|
|
297
|
-
api_key?: string;
|
|
298
|
-
} | {
|
|
299
|
-
type: 'asana';
|
|
300
|
-
api_key?: string;
|
|
301
|
-
} | {
|
|
302
|
-
type: 'brevo';
|
|
303
|
-
api_key?: string;
|
|
304
|
-
} | {
|
|
305
|
-
type: 'intercom';
|
|
306
|
-
api_key?: string;
|
|
307
|
-
} | {
|
|
308
|
-
type: 'notion';
|
|
309
|
-
api_key?: string;
|
|
310
|
-
} | {
|
|
311
|
-
type: 'eleven_labs';
|
|
312
|
-
api_key?: string;
|
|
313
|
-
} | {
|
|
314
|
-
type: 'active_campaign';
|
|
315
|
-
api_key?: string;
|
|
316
|
-
account_url: string;
|
|
317
|
-
} | {
|
|
318
|
-
type: 'shopify';
|
|
319
|
-
api_key?: string;
|
|
320
|
-
store_domain: string;
|
|
321
|
-
} | {
|
|
322
|
-
type: 'supabase';
|
|
323
|
-
api_key?: string;
|
|
324
|
-
project_url: string;
|
|
325
|
-
} | {
|
|
326
|
-
type: 'mailchimp';
|
|
327
|
-
api_key?: string;
|
|
328
|
-
} | {
|
|
329
|
-
type: 'twilio';
|
|
330
|
-
account_sid?: string;
|
|
331
|
-
auth_token?: string;
|
|
332
|
-
} | {
|
|
333
|
-
type: 'jira';
|
|
334
|
-
email?: string;
|
|
335
|
-
api_token?: string;
|
|
336
|
-
domain: string;
|
|
337
|
-
} | {
|
|
338
|
-
type: 'woo_commerce';
|
|
339
|
-
consumer_key?: string;
|
|
340
|
-
consumer_secret?: string;
|
|
341
|
-
store_url: string;
|
|
342
|
-
} | {
|
|
343
|
-
type: 'freshdesk';
|
|
344
|
-
api_key?: string;
|
|
345
|
-
domain: string;
|
|
346
|
-
} | {
|
|
347
|
-
type: 'zendesk';
|
|
348
|
-
api_token?: string;
|
|
349
|
-
email?: string;
|
|
350
|
-
subdomain: string;
|
|
351
|
-
} | {
|
|
352
|
-
type: 'salesforce';
|
|
353
|
-
access_token?: string;
|
|
354
|
-
instance_url: string;
|
|
355
|
-
} | {
|
|
356
|
-
type: 'zoom';
|
|
357
|
-
api_key?: string;
|
|
358
|
-
} | {
|
|
359
|
-
type: 'microsoft_teams';
|
|
360
|
-
api_key?: string;
|
|
361
|
-
} | {
|
|
362
|
-
type: 'firebase';
|
|
363
|
-
api_key?: string;
|
|
364
|
-
} | {
|
|
365
|
-
type: 'arky';
|
|
366
|
-
api_key?: string;
|
|
367
|
-
} | {
|
|
368
|
-
type: 'vercel_deploy_hook';
|
|
369
|
-
url?: string;
|
|
370
|
-
} | {
|
|
371
|
-
type: 'netlify_deploy_hook';
|
|
372
|
-
url?: string;
|
|
373
|
-
} | {
|
|
374
|
-
type: 'cloudflare_deploy_hook';
|
|
375
|
-
url?: string;
|
|
376
|
-
} | {
|
|
377
|
-
type: 'custom_deploy_hook';
|
|
378
|
-
url?: string;
|
|
379
|
-
};
|
|
380
|
-
interface Integration {
|
|
229
|
+
interface BookingQuoteItem {
|
|
230
|
+
service_id: string;
|
|
231
|
+
provider_id: string;
|
|
232
|
+
slots: SlotRange[];
|
|
233
|
+
price?: Price;
|
|
234
|
+
}
|
|
235
|
+
interface GetBookingQuoteParams {
|
|
236
|
+
store_id?: string;
|
|
237
|
+
market?: string;
|
|
238
|
+
items: BookingQuoteItem[];
|
|
239
|
+
payment_method_id?: string;
|
|
240
|
+
promo_code?: string;
|
|
241
|
+
}
|
|
242
|
+
interface TimelinePoint {
|
|
243
|
+
timestamp: number;
|
|
244
|
+
booked: number;
|
|
245
|
+
}
|
|
246
|
+
interface ProviderWithTimeline {
|
|
381
247
|
id: string;
|
|
382
|
-
store_id: string;
|
|
383
248
|
key: string;
|
|
384
|
-
|
|
249
|
+
store_id: string;
|
|
250
|
+
slug: Record<string, string>;
|
|
251
|
+
status: BookingProviderStatus;
|
|
252
|
+
blocks: Block[];
|
|
253
|
+
taxonomies: TaxonomyEntry[];
|
|
385
254
|
created_at: number;
|
|
386
255
|
updated_at: number;
|
|
256
|
+
working_days?: WorkingDay[];
|
|
257
|
+
specific_dates?: SpecificDate[];
|
|
258
|
+
timeline: TimelinePoint[];
|
|
387
259
|
}
|
|
388
|
-
interface
|
|
389
|
-
|
|
390
|
-
|
|
260
|
+
interface GetAnalyticsParams {
|
|
261
|
+
metrics?: string[];
|
|
262
|
+
period?: string;
|
|
263
|
+
start_date?: string;
|
|
264
|
+
end_date?: string;
|
|
265
|
+
interval?: string;
|
|
391
266
|
}
|
|
392
|
-
interface
|
|
267
|
+
interface GetAnalyticsHealthParams {
|
|
268
|
+
}
|
|
269
|
+
interface TrackEmailOpenParams {
|
|
270
|
+
tracking_pixel_id: string;
|
|
271
|
+
}
|
|
272
|
+
interface GetDeliveryStatsParams {
|
|
273
|
+
}
|
|
274
|
+
type StoreRole = 'admin' | 'owner' | 'super';
|
|
275
|
+
interface Discount {
|
|
276
|
+
type: "items_percentage" | "items_fixed" | "shipping_percentage";
|
|
277
|
+
market_id: string;
|
|
278
|
+
bps?: number;
|
|
279
|
+
amount?: number;
|
|
280
|
+
}
|
|
281
|
+
interface Condition {
|
|
282
|
+
type: "products" | "services" | "min_order_amount" | "date_range" | "max_uses" | "max_uses_per_user";
|
|
283
|
+
value: string[] | number | {
|
|
284
|
+
start?: number;
|
|
285
|
+
end?: number;
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
interface CreatePromoCodeParams {
|
|
289
|
+
store_id?: string;
|
|
290
|
+
code: string;
|
|
291
|
+
discounts: Discount[];
|
|
292
|
+
conditions: Condition[];
|
|
293
|
+
}
|
|
294
|
+
interface UpdatePromoCodeParams {
|
|
393
295
|
id: string;
|
|
394
|
-
|
|
296
|
+
store_id?: string;
|
|
297
|
+
code: string;
|
|
298
|
+
discounts: Discount[];
|
|
299
|
+
conditions: Condition[];
|
|
300
|
+
status?: PromoCodeStatus;
|
|
395
301
|
}
|
|
396
|
-
interface
|
|
302
|
+
interface DeletePromoCodeParams {
|
|
397
303
|
id: string;
|
|
398
|
-
|
|
399
|
-
eta_text: string;
|
|
400
|
-
location_id?: string;
|
|
401
|
-
integration_id?: string;
|
|
402
|
-
amount: number;
|
|
403
|
-
free_above?: number;
|
|
404
|
-
weight_tiers?: ShippingWeightTier[];
|
|
304
|
+
store_id?: string;
|
|
405
305
|
}
|
|
406
|
-
interface
|
|
306
|
+
interface GetPromoCodeParams {
|
|
407
307
|
id: string;
|
|
408
|
-
store_id
|
|
409
|
-
key: string;
|
|
410
|
-
address: Address;
|
|
411
|
-
is_pickup_location: boolean;
|
|
412
|
-
created_at: number;
|
|
413
|
-
updated_at: number;
|
|
308
|
+
store_id?: string;
|
|
414
309
|
}
|
|
415
|
-
interface
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
310
|
+
interface GetPromoCodesParams {
|
|
311
|
+
store_id?: string;
|
|
312
|
+
query?: string | number;
|
|
313
|
+
status?: PromoCodeStatus;
|
|
314
|
+
limit?: number;
|
|
315
|
+
cursor?: string;
|
|
316
|
+
sort_field?: string;
|
|
317
|
+
sort_direction?: 'asc' | 'desc';
|
|
318
|
+
created_at_from?: number;
|
|
319
|
+
created_at_to?: number;
|
|
320
|
+
starts_at_from?: number;
|
|
321
|
+
starts_at_to?: number;
|
|
322
|
+
expires_at_from?: number;
|
|
323
|
+
expires_at_to?: number;
|
|
419
324
|
}
|
|
420
|
-
interface
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
postal_codes: string[];
|
|
427
|
-
tax_bps: number;
|
|
428
|
-
shipping_methods: ShippingMethod[];
|
|
325
|
+
interface CreateStoreParams {
|
|
326
|
+
key: string;
|
|
327
|
+
timezone: string;
|
|
328
|
+
billing_email: string;
|
|
329
|
+
languages?: Language[];
|
|
330
|
+
emails?: StoreEmails;
|
|
429
331
|
}
|
|
430
|
-
interface
|
|
332
|
+
interface UpdateStoreParams {
|
|
431
333
|
id: string;
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
payment_methods: PaymentMethod[];
|
|
437
|
-
zones: Zone[];
|
|
438
|
-
created_at: number;
|
|
439
|
-
updated_at: number;
|
|
334
|
+
key?: string;
|
|
335
|
+
timezone?: string;
|
|
336
|
+
languages?: Language[];
|
|
337
|
+
emails?: StoreEmails;
|
|
440
338
|
}
|
|
441
|
-
interface
|
|
339
|
+
interface DeleteStoreParams {
|
|
442
340
|
id: string;
|
|
443
341
|
}
|
|
444
|
-
interface
|
|
445
|
-
billing: string;
|
|
446
|
-
support: string;
|
|
342
|
+
interface GetStoreParams {
|
|
447
343
|
}
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
} | {
|
|
482
|
-
event: 'order.shipment_returned';
|
|
483
|
-
} | {
|
|
484
|
-
event: 'order.shipment_status_changed';
|
|
485
|
-
} | {
|
|
486
|
-
event: 'booking.created';
|
|
487
|
-
} | {
|
|
488
|
-
event: 'booking.updated';
|
|
489
|
-
} | {
|
|
490
|
-
event: 'booking.payment_received';
|
|
491
|
-
} | {
|
|
492
|
-
event: 'booking.payment_failed';
|
|
493
|
-
} | {
|
|
494
|
-
event: 'booking.refunded';
|
|
495
|
-
} | {
|
|
496
|
-
event: 'booking.cancelled';
|
|
497
|
-
} | {
|
|
498
|
-
event: 'booking.item_cancelled';
|
|
499
|
-
} | {
|
|
500
|
-
event: 'booking.reminder';
|
|
501
|
-
} | {
|
|
502
|
-
event: 'product.created';
|
|
503
|
-
} | {
|
|
504
|
-
event: 'product.updated';
|
|
505
|
-
} | {
|
|
506
|
-
event: 'product.deleted';
|
|
507
|
-
} | {
|
|
508
|
-
event: 'provider.created';
|
|
509
|
-
} | {
|
|
510
|
-
event: 'provider.updated';
|
|
511
|
-
} | {
|
|
512
|
-
event: 'provider.deleted';
|
|
513
|
-
} | {
|
|
514
|
-
event: 'service.created';
|
|
515
|
-
} | {
|
|
516
|
-
event: 'service.updated';
|
|
517
|
-
} | {
|
|
518
|
-
event: 'service.deleted';
|
|
519
|
-
} | {
|
|
520
|
-
event: 'media.created';
|
|
521
|
-
} | {
|
|
522
|
-
event: 'media.deleted';
|
|
523
|
-
} | {
|
|
524
|
-
event: 'store.created';
|
|
525
|
-
} | {
|
|
526
|
-
event: 'store.updated';
|
|
527
|
-
} | {
|
|
528
|
-
event: 'store.deleted';
|
|
529
|
-
} | {
|
|
530
|
-
event: 'audience.created';
|
|
531
|
-
} | {
|
|
532
|
-
event: 'audience.updated';
|
|
533
|
-
} | {
|
|
534
|
-
event: 'audience.deleted';
|
|
535
|
-
};
|
|
536
|
-
interface Webhook {
|
|
344
|
+
interface SubscribeParams {
|
|
345
|
+
store_id?: string;
|
|
346
|
+
plan_id: string;
|
|
347
|
+
success_url: string;
|
|
348
|
+
cancel_url: string;
|
|
349
|
+
}
|
|
350
|
+
interface CreatePortalSessionParams {
|
|
351
|
+
store_id?: string;
|
|
352
|
+
return_url: string;
|
|
353
|
+
}
|
|
354
|
+
interface InviteUserParams {
|
|
355
|
+
email: string;
|
|
356
|
+
role?: StoreRole;
|
|
357
|
+
}
|
|
358
|
+
interface RemoveMemberParams {
|
|
359
|
+
account_id: string;
|
|
360
|
+
}
|
|
361
|
+
interface HandleInvitationParams {
|
|
362
|
+
token: string;
|
|
363
|
+
action: string;
|
|
364
|
+
store_id?: string;
|
|
365
|
+
}
|
|
366
|
+
interface TestWebhookParams {
|
|
367
|
+
webhook: Webhook;
|
|
368
|
+
}
|
|
369
|
+
interface CreateProductVariantInput {
|
|
370
|
+
sku?: string;
|
|
371
|
+
prices: Price[];
|
|
372
|
+
inventory: ProductInventory[];
|
|
373
|
+
attributes: Block[];
|
|
374
|
+
weight?: number;
|
|
375
|
+
}
|
|
376
|
+
interface UpdateProductVariantInput {
|
|
537
377
|
id: string;
|
|
538
|
-
|
|
378
|
+
sku?: string | null;
|
|
379
|
+
prices?: Price[];
|
|
380
|
+
inventory?: ProductInventory[];
|
|
381
|
+
attributes?: Block[];
|
|
382
|
+
weight?: number | null;
|
|
383
|
+
}
|
|
384
|
+
interface CreateProductParams {
|
|
385
|
+
store_id?: string;
|
|
539
386
|
key: string;
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
enabled: boolean;
|
|
545
|
-
created_at: number;
|
|
546
|
-
updated_at: number;
|
|
387
|
+
slug?: Record<string, string>;
|
|
388
|
+
blocks?: Block[];
|
|
389
|
+
taxonomies?: TaxonomyEntry[];
|
|
390
|
+
variants?: CreateProductVariantInput[];
|
|
547
391
|
}
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
currency: string;
|
|
558
|
-
market: string;
|
|
559
|
-
provider?: StoreSubscriptionProvider;
|
|
392
|
+
interface UpdateProductParams {
|
|
393
|
+
id: string;
|
|
394
|
+
store_id?: string;
|
|
395
|
+
key?: string;
|
|
396
|
+
slug?: Record<string, string>;
|
|
397
|
+
blocks?: Block[];
|
|
398
|
+
taxonomies?: TaxonomyEntry[];
|
|
399
|
+
variants?: UpdateProductVariantInput[];
|
|
400
|
+
status?: ProductStatus;
|
|
560
401
|
}
|
|
561
|
-
interface
|
|
402
|
+
interface DeleteProductParams {
|
|
562
403
|
id: string;
|
|
563
|
-
|
|
564
|
-
plan_id: string;
|
|
565
|
-
pending_plan_id: string | null;
|
|
566
|
-
payment: StoreSubscriptionPayment;
|
|
567
|
-
status: StoreSubscriptionStatus;
|
|
568
|
-
start_date: number;
|
|
569
|
-
end_date: number;
|
|
570
|
-
token: string;
|
|
571
|
-
source: StoreSubscriptionSource;
|
|
404
|
+
store_id?: string;
|
|
572
405
|
}
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
customer_id: string;
|
|
578
|
-
subscription_id?: string;
|
|
579
|
-
price_id?: string;
|
|
580
|
-
};
|
|
581
|
-
interface AudienceSubscriptionPayment {
|
|
582
|
-
currency: string;
|
|
583
|
-
market: string;
|
|
584
|
-
provider?: AudienceSubscriptionProvider;
|
|
406
|
+
interface GetProductParams {
|
|
407
|
+
id?: string;
|
|
408
|
+
slug?: string;
|
|
409
|
+
store_id?: string;
|
|
585
410
|
}
|
|
586
|
-
interface
|
|
411
|
+
interface GetOrderParams {
|
|
587
412
|
id: string;
|
|
588
|
-
store_id
|
|
589
|
-
customer_id: string;
|
|
590
|
-
audience_id: string;
|
|
591
|
-
plan_id: string;
|
|
592
|
-
pending_plan_id: string | null;
|
|
593
|
-
payment: AudienceSubscriptionPayment;
|
|
594
|
-
status: AudienceSubscriptionStatus;
|
|
595
|
-
start_date: number;
|
|
596
|
-
end_date: number;
|
|
597
|
-
token: string;
|
|
598
|
-
source: AudienceSubscriptionSource;
|
|
599
|
-
created_at: number;
|
|
600
|
-
updated_at: number;
|
|
413
|
+
store_id?: string;
|
|
601
414
|
}
|
|
602
|
-
interface
|
|
415
|
+
interface GetOrdersParams {
|
|
416
|
+
store_id?: string;
|
|
417
|
+
customer_id?: string;
|
|
418
|
+
item_statuses?: string[];
|
|
419
|
+
product_ids?: string[];
|
|
420
|
+
verified?: boolean;
|
|
421
|
+
query?: string | number | null;
|
|
422
|
+
limit?: number | null;
|
|
423
|
+
cursor?: string | null;
|
|
424
|
+
sort_field?: string | null;
|
|
425
|
+
sort_direction?: 'asc' | 'desc' | null;
|
|
426
|
+
created_at_from?: number | null;
|
|
427
|
+
created_at_to?: number | null;
|
|
428
|
+
audience_id?: string;
|
|
429
|
+
}
|
|
430
|
+
interface OrderUpdateItem {
|
|
431
|
+
product_id: string;
|
|
432
|
+
variant_id: string;
|
|
433
|
+
quantity: number;
|
|
434
|
+
}
|
|
435
|
+
interface UpdateOrderParams {
|
|
603
436
|
id: string;
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
437
|
+
store_id?: string;
|
|
438
|
+
confirm?: boolean;
|
|
439
|
+
cancel?: boolean;
|
|
440
|
+
shipping_address?: Address | null;
|
|
441
|
+
billing_address?: Address | null;
|
|
442
|
+
forms?: FormEntry[];
|
|
443
|
+
items?: OrderUpdateItem[];
|
|
444
|
+
payment?: OrderPayment;
|
|
610
445
|
}
|
|
611
|
-
interface
|
|
612
|
-
store_id
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
446
|
+
interface CreateOrderParams {
|
|
447
|
+
store_id?: string;
|
|
448
|
+
market?: string;
|
|
449
|
+
customer_id?: string;
|
|
450
|
+
forms?: FormEntry[];
|
|
451
|
+
items: OrderUpdateItem[];
|
|
452
|
+
shipping_address?: Address;
|
|
453
|
+
billing_address?: Address;
|
|
618
454
|
}
|
|
619
|
-
interface
|
|
455
|
+
interface CreateBookingParams {
|
|
456
|
+
store_id?: string;
|
|
457
|
+
market?: string;
|
|
458
|
+
customer_id?: string;
|
|
459
|
+
forms?: FormEntry[];
|
|
460
|
+
items: BookingCreatePart[];
|
|
461
|
+
payment_method_id?: string;
|
|
462
|
+
promo_code?: string;
|
|
463
|
+
}
|
|
464
|
+
interface BookingUpdateItem {
|
|
620
465
|
id: string;
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
466
|
+
service_id: string;
|
|
467
|
+
provider_id: string;
|
|
468
|
+
from: number;
|
|
469
|
+
to: number;
|
|
470
|
+
forms: FormEntry[];
|
|
625
471
|
}
|
|
626
|
-
|
|
627
|
-
interface TaxonomySchema {
|
|
472
|
+
interface UpdateBookingParams {
|
|
628
473
|
id: string;
|
|
474
|
+
store_id?: string;
|
|
475
|
+
forms?: FormEntry[];
|
|
476
|
+
items?: BookingUpdateItem[];
|
|
477
|
+
payment?: BookingPayment;
|
|
478
|
+
}
|
|
479
|
+
interface CreateProviderParams {
|
|
480
|
+
store_id?: string;
|
|
629
481
|
key: string;
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
482
|
+
slug?: Record<string, string>;
|
|
483
|
+
status?: BookingProviderStatus;
|
|
484
|
+
blocks?: Block[];
|
|
485
|
+
taxonomies?: TaxonomyEntry[];
|
|
634
486
|
}
|
|
635
|
-
interface
|
|
487
|
+
interface UpdateProviderParams {
|
|
636
488
|
id: string;
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
489
|
+
store_id?: string;
|
|
490
|
+
key?: string;
|
|
491
|
+
slug?: Record<string, string>;
|
|
492
|
+
status?: BookingProviderStatus;
|
|
493
|
+
blocks?: Block[];
|
|
494
|
+
taxonomies?: TaxonomyEntry[];
|
|
640
495
|
}
|
|
641
|
-
interface
|
|
496
|
+
interface DeleteProviderParams {
|
|
497
|
+
id: string;
|
|
498
|
+
store_id?: string;
|
|
499
|
+
}
|
|
500
|
+
interface ServiceProviderInput {
|
|
501
|
+
provider_id: string;
|
|
502
|
+
store_id?: string;
|
|
503
|
+
prices?: Price[];
|
|
504
|
+
durations?: ServiceDuration[];
|
|
505
|
+
working_days: WorkingDay[];
|
|
506
|
+
specific_dates: SpecificDate[];
|
|
507
|
+
}
|
|
508
|
+
interface CreateServiceParams {
|
|
509
|
+
store_id?: string;
|
|
642
510
|
key: string;
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
lon: number;
|
|
649
|
-
};
|
|
650
|
-
radius?: number;
|
|
511
|
+
slug?: Record<string, string>;
|
|
512
|
+
blocks?: Block[];
|
|
513
|
+
taxonomies?: TaxonomyEntry[];
|
|
514
|
+
location?: ZoneLocation;
|
|
515
|
+
status?: BookingServiceStatus;
|
|
651
516
|
}
|
|
652
|
-
interface
|
|
653
|
-
|
|
654
|
-
|
|
517
|
+
interface UpdateServiceParams {
|
|
518
|
+
id: string;
|
|
519
|
+
store_id?: string;
|
|
520
|
+
key?: string;
|
|
521
|
+
slug?: Record<string, string>;
|
|
522
|
+
blocks?: Block[];
|
|
523
|
+
taxonomies?: TaxonomyEntry[];
|
|
524
|
+
location?: ZoneLocation | null;
|
|
525
|
+
status?: BookingServiceStatus;
|
|
655
526
|
}
|
|
656
|
-
interface
|
|
657
|
-
|
|
658
|
-
|
|
527
|
+
interface CreateServiceProviderParams {
|
|
528
|
+
store_id?: string;
|
|
529
|
+
service_id: string;
|
|
530
|
+
provider_id: string;
|
|
531
|
+
working_days: WorkingDay[];
|
|
532
|
+
specific_dates: SpecificDate[];
|
|
533
|
+
prices?: Price[];
|
|
534
|
+
durations?: ServiceDuration[];
|
|
535
|
+
slot_interval: number;
|
|
536
|
+
forms?: FormEntry[];
|
|
537
|
+
reminders?: number[];
|
|
538
|
+
min_advance?: number;
|
|
539
|
+
max_advance?: number;
|
|
659
540
|
}
|
|
660
|
-
|
|
661
|
-
|
|
541
|
+
interface UpdateServiceProviderParams {
|
|
542
|
+
store_id?: string;
|
|
662
543
|
id: string;
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
544
|
+
working_days?: WorkingDay[];
|
|
545
|
+
specific_dates?: SpecificDate[];
|
|
546
|
+
prices?: Price[];
|
|
547
|
+
durations?: ServiceDuration[];
|
|
548
|
+
slot_interval?: number;
|
|
549
|
+
forms?: FormEntry[];
|
|
550
|
+
reminders?: number[];
|
|
551
|
+
min_advance?: number;
|
|
552
|
+
max_advance?: number;
|
|
669
553
|
}
|
|
670
|
-
|
|
671
|
-
|
|
554
|
+
interface DeleteServiceProviderParams {
|
|
555
|
+
store_id?: string;
|
|
556
|
+
id: string;
|
|
557
|
+
}
|
|
558
|
+
interface FindServiceProvidersParams {
|
|
559
|
+
store_id?: string;
|
|
560
|
+
service_id?: string;
|
|
561
|
+
provider_id?: string;
|
|
562
|
+
}
|
|
563
|
+
interface DeleteServiceParams {
|
|
672
564
|
id: string;
|
|
673
|
-
|
|
674
|
-
type: FormFieldType;
|
|
675
|
-
value?: any;
|
|
565
|
+
store_id?: string;
|
|
676
566
|
}
|
|
677
|
-
interface
|
|
678
|
-
|
|
679
|
-
|
|
567
|
+
interface GetServiceParams {
|
|
568
|
+
id?: string;
|
|
569
|
+
slug?: string;
|
|
570
|
+
store_id?: string;
|
|
680
571
|
}
|
|
681
|
-
|
|
682
|
-
|
|
572
|
+
interface GetProvidersParams {
|
|
573
|
+
store_id?: string;
|
|
574
|
+
service_id?: string;
|
|
575
|
+
ids?: string[];
|
|
576
|
+
taxonomy_query?: TaxonomyQuery[];
|
|
577
|
+
match_all?: boolean;
|
|
578
|
+
query?: string | number | null;
|
|
579
|
+
status?: BookingProviderStatus;
|
|
580
|
+
limit?: number;
|
|
581
|
+
cursor?: string;
|
|
582
|
+
sort_field?: string | null;
|
|
583
|
+
sort_direction?: 'asc' | 'desc' | null;
|
|
584
|
+
created_at_from?: number | null;
|
|
585
|
+
created_at_to?: number | null;
|
|
586
|
+
from?: number;
|
|
587
|
+
to?: number;
|
|
683
588
|
}
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
value: GeoLocation | null;
|
|
589
|
+
interface GetProviderParams {
|
|
590
|
+
id?: string;
|
|
591
|
+
slug?: string;
|
|
592
|
+
store_id?: string;
|
|
689
593
|
}
|
|
690
|
-
|
|
691
|
-
interface MediaResolution {
|
|
594
|
+
interface GetBookingParams {
|
|
692
595
|
id: string;
|
|
693
|
-
|
|
694
|
-
url: string;
|
|
596
|
+
store_id?: string;
|
|
695
597
|
}
|
|
696
|
-
interface
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
mime_type: string;
|
|
702
|
-
title?: string | null;
|
|
703
|
-
description?: string | null;
|
|
704
|
-
alt?: string | null;
|
|
705
|
-
entity: string;
|
|
706
|
-
metadata?: string | null;
|
|
707
|
-
created_at: number;
|
|
708
|
-
slug: Record<string, string>;
|
|
598
|
+
interface CancelBookingItemParams {
|
|
599
|
+
store_id?: string;
|
|
600
|
+
booking_id: string;
|
|
601
|
+
item_id: string;
|
|
602
|
+
reason?: string;
|
|
709
603
|
}
|
|
710
|
-
interface
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
604
|
+
interface SearchBookingsParams {
|
|
605
|
+
store_id?: string;
|
|
606
|
+
customer_id?: string;
|
|
607
|
+
service_ids?: string[];
|
|
608
|
+
provider_ids?: string[];
|
|
609
|
+
from?: number;
|
|
610
|
+
to?: number;
|
|
611
|
+
item_statuses?: string[];
|
|
612
|
+
sort_field?: string;
|
|
613
|
+
sort_order?: string;
|
|
614
|
+
limit?: number;
|
|
714
615
|
cursor?: string;
|
|
715
|
-
|
|
616
|
+
verified?: boolean;
|
|
617
|
+
query?: string | number;
|
|
618
|
+
audience_id?: string;
|
|
716
619
|
}
|
|
717
|
-
interface
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
total: number;
|
|
721
|
-
page: number;
|
|
722
|
-
per_page: number;
|
|
723
|
-
};
|
|
620
|
+
interface AccountAddress {
|
|
621
|
+
label?: string;
|
|
622
|
+
address: Address;
|
|
724
623
|
}
|
|
725
|
-
interface
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
}>;
|
|
732
|
-
weekdays: string[];
|
|
733
|
-
month_year: string;
|
|
734
|
-
days: any[];
|
|
735
|
-
current: Date;
|
|
736
|
-
selected_date: string | null;
|
|
737
|
-
slots: any[];
|
|
738
|
-
selected_slot: any | null;
|
|
739
|
-
selected_provider: any | null;
|
|
740
|
-
providers: any[];
|
|
741
|
-
loading: boolean;
|
|
742
|
-
start_date: string | null;
|
|
743
|
-
end_date: string | null;
|
|
744
|
-
guest_token: string | null;
|
|
745
|
-
service: any | null;
|
|
746
|
-
store: Store | null;
|
|
747
|
-
currency: string;
|
|
748
|
-
booking_forms: FormEntry[];
|
|
749
|
-
api_url: string;
|
|
750
|
-
store_id: string;
|
|
751
|
-
timezone: string;
|
|
752
|
-
tz_groups: any;
|
|
753
|
-
items: BookingCartItem[];
|
|
754
|
-
allowed_payment_methods: string[];
|
|
755
|
-
payment_config: {
|
|
756
|
-
provider: {
|
|
757
|
-
publishable_key: string;
|
|
758
|
-
currency: string;
|
|
759
|
-
} | null;
|
|
760
|
-
enabled: boolean;
|
|
761
|
-
};
|
|
624
|
+
interface AccountApiToken {
|
|
625
|
+
id: string;
|
|
626
|
+
name: string;
|
|
627
|
+
token: string;
|
|
628
|
+
created_at: number;
|
|
629
|
+
last_used_at?: number;
|
|
762
630
|
}
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
type AudienceStatus = 'active' | 'draft' | 'archived';
|
|
768
|
-
type AgentChatStatus = 'active' | 'draft' | 'archived';
|
|
769
|
-
type WorkflowStatus = 'active' | 'draft' | 'archived';
|
|
770
|
-
type PromoCodeStatus = 'active' | 'draft' | 'archived';
|
|
771
|
-
type NodeStatus = 'active' | 'draft' | 'archived';
|
|
772
|
-
type EmailTemplateStatus = 'active' | 'draft' | 'archived';
|
|
773
|
-
type FormStatus = 'active' | 'draft' | 'archived';
|
|
774
|
-
type TaxonomyStatus = 'active' | 'draft' | 'archived';
|
|
775
|
-
type BookingCancellationReason = 'admin_rejected' | 'customer_cancelled' | 'payment_failed' | 'expired' | 'other';
|
|
776
|
-
type OrderCancellationReason = 'admin_rejected' | 'customer_cancelled' | 'payment_failed' | 'expired' | 'other';
|
|
777
|
-
type BookingItemStatus = {
|
|
778
|
-
status: 'pending';
|
|
779
|
-
expires_at: number;
|
|
780
|
-
} | {
|
|
781
|
-
status: 'confirmed';
|
|
782
|
-
} | {
|
|
783
|
-
status: 'cancelled';
|
|
784
|
-
reason: BookingCancellationReason;
|
|
785
|
-
};
|
|
786
|
-
type OrderItemStatus = {
|
|
787
|
-
status: 'pending';
|
|
788
|
-
expires_at: number;
|
|
789
|
-
} | {
|
|
790
|
-
status: 'confirmed';
|
|
791
|
-
} | {
|
|
792
|
-
status: 'cancelled';
|
|
793
|
-
reason: OrderCancellationReason;
|
|
794
|
-
};
|
|
795
|
-
type BookingPaymentStatus = {
|
|
796
|
-
status: 'pending';
|
|
797
|
-
at: number;
|
|
798
|
-
} | {
|
|
799
|
-
status: 'authorized';
|
|
800
|
-
at: number;
|
|
801
|
-
amount: number;
|
|
802
|
-
} | {
|
|
803
|
-
status: 'captured';
|
|
804
|
-
at: number;
|
|
805
|
-
amount: number;
|
|
806
|
-
} | {
|
|
807
|
-
status: 'failed';
|
|
808
|
-
at: number;
|
|
809
|
-
reason?: string;
|
|
810
|
-
};
|
|
811
|
-
type OrderPaymentStatus = {
|
|
812
|
-
status: 'pending';
|
|
813
|
-
at: number;
|
|
814
|
-
} | {
|
|
815
|
-
status: 'authorized';
|
|
816
|
-
at: number;
|
|
817
|
-
amount: number;
|
|
818
|
-
} | {
|
|
819
|
-
status: 'captured';
|
|
820
|
-
at: number;
|
|
821
|
-
amount: number;
|
|
822
|
-
} | {
|
|
823
|
-
status: 'failed';
|
|
824
|
-
at: number;
|
|
825
|
-
reason?: string;
|
|
826
|
-
};
|
|
827
|
-
interface BookingItemSnapshot {
|
|
828
|
-
service_key: string;
|
|
829
|
-
provider_key: string;
|
|
830
|
-
price: Price;
|
|
631
|
+
interface UpdateAccountProfileParams {
|
|
632
|
+
phone_numbers?: string[];
|
|
633
|
+
addresses?: AccountAddress[];
|
|
634
|
+
api_tokens?: AccountApiToken[] | null;
|
|
831
635
|
}
|
|
832
|
-
interface
|
|
833
|
-
|
|
834
|
-
|
|
636
|
+
interface SearchAccountsParams {
|
|
637
|
+
limit?: number;
|
|
638
|
+
cursor?: string | null;
|
|
639
|
+
query?: string | number;
|
|
640
|
+
owner?: string;
|
|
835
641
|
}
|
|
836
|
-
interface
|
|
837
|
-
id: string;
|
|
838
|
-
service_id: string;
|
|
839
|
-
provider_id: string;
|
|
840
|
-
store_id: string;
|
|
841
|
-
booking_id: string;
|
|
842
|
-
from: number;
|
|
843
|
-
to: number;
|
|
844
|
-
forms: FormEntry[];
|
|
845
|
-
snapshot: BookingItemSnapshot;
|
|
846
|
-
status: BookingItemStatus;
|
|
642
|
+
interface DeleteAccountParams {
|
|
847
643
|
}
|
|
848
|
-
interface
|
|
849
|
-
|
|
850
|
-
number: string;
|
|
851
|
-
customer_id: string;
|
|
852
|
-
verified: boolean;
|
|
853
|
-
forms: FormEntry[];
|
|
644
|
+
interface TriggerNotificationParams {
|
|
645
|
+
channel: string;
|
|
854
646
|
store_id: string;
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
payment: BookingPayment;
|
|
858
|
-
store?: Store;
|
|
859
|
-
account?: any;
|
|
860
|
-
items: BookingItem[];
|
|
647
|
+
email_template_id?: string;
|
|
648
|
+
recipients?: string[];
|
|
861
649
|
audience_id?: string;
|
|
862
|
-
|
|
863
|
-
action: string;
|
|
864
|
-
reason?: string;
|
|
865
|
-
timestamp: number;
|
|
866
|
-
}[];
|
|
867
|
-
fired_reminders: number[];
|
|
868
|
-
created_at: number;
|
|
869
|
-
last_modified: number;
|
|
650
|
+
vars?: Record<string, any>;
|
|
870
651
|
}
|
|
871
|
-
interface
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
status
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
652
|
+
interface GetEmailTemplatesParams {
|
|
653
|
+
store_id?: string;
|
|
654
|
+
ids?: string[];
|
|
655
|
+
key?: string;
|
|
656
|
+
limit?: number;
|
|
657
|
+
cursor?: string;
|
|
658
|
+
query?: string | number;
|
|
659
|
+
status?: EmailTemplateStatus;
|
|
660
|
+
sort_field?: string;
|
|
661
|
+
sort_direction?: "asc" | "desc";
|
|
662
|
+
created_at_from?: number;
|
|
663
|
+
created_at_to?: number;
|
|
883
664
|
}
|
|
884
|
-
interface
|
|
885
|
-
|
|
665
|
+
interface CreateEmailTemplateParams {
|
|
666
|
+
store_id?: string;
|
|
886
667
|
key: string;
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
body: string;
|
|
668
|
+
subject?: Record<string, string>;
|
|
669
|
+
body?: string;
|
|
890
670
|
from_name: string;
|
|
891
671
|
from_email: string;
|
|
892
672
|
reply_to?: string;
|
|
893
673
|
preheader?: string;
|
|
894
|
-
status: EmailTemplateStatus;
|
|
895
|
-
created_at: number;
|
|
896
|
-
updated_at: number;
|
|
897
674
|
}
|
|
898
|
-
interface
|
|
675
|
+
interface UpdateEmailTemplateParams {
|
|
676
|
+
id: string;
|
|
677
|
+
store_id?: string;
|
|
678
|
+
key?: string;
|
|
679
|
+
subject?: Record<string, string>;
|
|
680
|
+
body?: string;
|
|
681
|
+
from_name?: string;
|
|
682
|
+
from_email?: string;
|
|
683
|
+
reply_to?: string;
|
|
684
|
+
preheader?: string;
|
|
685
|
+
status?: EmailTemplateStatus;
|
|
686
|
+
}
|
|
687
|
+
interface GetEmailTemplateParams {
|
|
688
|
+
id?: string;
|
|
689
|
+
key?: string;
|
|
690
|
+
store_id?: string;
|
|
691
|
+
}
|
|
692
|
+
interface DeleteEmailTemplateParams {
|
|
899
693
|
id: string;
|
|
694
|
+
store_id?: string;
|
|
695
|
+
}
|
|
696
|
+
interface GetFormsParams {
|
|
697
|
+
store_id?: string;
|
|
698
|
+
ids?: string[];
|
|
699
|
+
key?: string;
|
|
700
|
+
limit?: number;
|
|
701
|
+
cursor?: string;
|
|
702
|
+
query?: string | number;
|
|
703
|
+
status?: FormStatus;
|
|
704
|
+
sort_field?: string;
|
|
705
|
+
sort_direction?: "asc" | "desc";
|
|
706
|
+
created_at_from?: number;
|
|
707
|
+
created_at_to?: number;
|
|
708
|
+
}
|
|
709
|
+
interface CreateFormParams {
|
|
710
|
+
store_id?: string;
|
|
900
711
|
key: string;
|
|
901
|
-
|
|
902
|
-
schema: FormSchema[];
|
|
903
|
-
status: FormStatus;
|
|
904
|
-
created_at: number;
|
|
905
|
-
updated_at: number;
|
|
712
|
+
schema?: FormSchema[];
|
|
906
713
|
}
|
|
907
|
-
interface
|
|
714
|
+
interface UpdateFormParams {
|
|
715
|
+
id: string;
|
|
716
|
+
store_id?: string;
|
|
717
|
+
key?: string;
|
|
718
|
+
schema?: FormSchema[];
|
|
719
|
+
status?: FormStatus;
|
|
720
|
+
}
|
|
721
|
+
interface GetFormParams {
|
|
722
|
+
id?: string;
|
|
723
|
+
key?: string;
|
|
724
|
+
store_id?: string;
|
|
725
|
+
}
|
|
726
|
+
interface DeleteFormParams {
|
|
908
727
|
id: string;
|
|
728
|
+
store_id?: string;
|
|
729
|
+
}
|
|
730
|
+
interface SubmitFormParams {
|
|
909
731
|
form_id: string;
|
|
910
|
-
store_id
|
|
732
|
+
store_id?: string;
|
|
911
733
|
fields: FormField[];
|
|
912
|
-
created_at: number;
|
|
913
734
|
}
|
|
914
|
-
interface
|
|
735
|
+
interface GetFormSubmissionsParams {
|
|
736
|
+
form_id: string;
|
|
737
|
+
store_id?: string;
|
|
738
|
+
query?: string | number;
|
|
739
|
+
limit?: number;
|
|
740
|
+
cursor?: string;
|
|
741
|
+
sort_field?: string;
|
|
742
|
+
sort_direction?: "asc" | "desc";
|
|
743
|
+
created_at_from?: number;
|
|
744
|
+
created_at_to?: number;
|
|
745
|
+
}
|
|
746
|
+
interface GetFormSubmissionParams {
|
|
747
|
+
id: string;
|
|
748
|
+
form_id: string;
|
|
749
|
+
store_id?: string;
|
|
750
|
+
}
|
|
751
|
+
interface UpdateFormSubmissionParams {
|
|
915
752
|
id: string;
|
|
753
|
+
form_id: string;
|
|
754
|
+
store_id?: string;
|
|
755
|
+
fields: FormField[];
|
|
756
|
+
}
|
|
757
|
+
interface GetTaxonomiesParams {
|
|
758
|
+
store_id?: string;
|
|
759
|
+
parent_id?: string;
|
|
760
|
+
ids?: string[];
|
|
761
|
+
key?: string;
|
|
762
|
+
limit?: number;
|
|
763
|
+
cursor?: string;
|
|
764
|
+
query?: string | number;
|
|
765
|
+
status?: TaxonomyStatus;
|
|
766
|
+
sort_field?: string;
|
|
767
|
+
sort_direction?: "asc" | "desc";
|
|
768
|
+
created_at_from?: number;
|
|
769
|
+
created_at_to?: number;
|
|
770
|
+
}
|
|
771
|
+
interface CreateTaxonomyParams {
|
|
772
|
+
store_id?: string;
|
|
916
773
|
key: string;
|
|
917
|
-
store_id: string;
|
|
918
774
|
parent_id?: string | null;
|
|
919
775
|
schema?: TaxonomySchema[];
|
|
920
|
-
status: TaxonomyStatus;
|
|
921
|
-
created_at: number;
|
|
922
|
-
updated_at: number;
|
|
923
776
|
}
|
|
924
|
-
interface
|
|
925
|
-
|
|
926
|
-
|
|
777
|
+
interface UpdateTaxonomyParams {
|
|
778
|
+
id: string;
|
|
779
|
+
store_id?: string;
|
|
780
|
+
key?: string;
|
|
781
|
+
parent_id?: string | null;
|
|
782
|
+
schema?: TaxonomySchema[];
|
|
783
|
+
status?: TaxonomyStatus;
|
|
927
784
|
}
|
|
928
|
-
interface
|
|
785
|
+
interface GetTaxonomyParams {
|
|
786
|
+
id?: string;
|
|
787
|
+
key?: string;
|
|
788
|
+
store_id?: string;
|
|
789
|
+
}
|
|
790
|
+
interface DeleteTaxonomyParams {
|
|
929
791
|
id: string;
|
|
930
|
-
|
|
931
|
-
prices: Price[];
|
|
932
|
-
durations: ServiceDuration[];
|
|
933
|
-
audience_ids: string[];
|
|
934
|
-
working_days: Array<{
|
|
935
|
-
day: string;
|
|
936
|
-
working_hours: Array<{
|
|
937
|
-
from: number;
|
|
938
|
-
to: number;
|
|
939
|
-
}>;
|
|
940
|
-
}>;
|
|
941
|
-
specific_dates: Array<{
|
|
942
|
-
date: number;
|
|
943
|
-
working_hours: Array<{
|
|
944
|
-
from: number;
|
|
945
|
-
to: number;
|
|
946
|
-
}>;
|
|
947
|
-
}>;
|
|
948
|
-
slot_interval: number;
|
|
949
|
-
min_advance: number;
|
|
950
|
-
max_advance: number;
|
|
951
|
-
reminders: number[];
|
|
952
|
-
forms?: FormEntry[];
|
|
792
|
+
store_id?: string;
|
|
953
793
|
}
|
|
954
|
-
interface
|
|
794
|
+
interface GetTaxonomyChildrenParams {
|
|
955
795
|
id: string;
|
|
956
|
-
|
|
957
|
-
slug: Record<string, string>;
|
|
958
|
-
store_id: string;
|
|
959
|
-
blocks: Block[];
|
|
960
|
-
taxonomies: TaxonomyEntry[];
|
|
961
|
-
created_at: number;
|
|
962
|
-
updated_at: number;
|
|
963
|
-
status: BookingServiceStatus;
|
|
796
|
+
store_id?: string;
|
|
964
797
|
}
|
|
965
|
-
interface
|
|
966
|
-
|
|
967
|
-
|
|
798
|
+
interface GetMeParams {
|
|
799
|
+
}
|
|
800
|
+
interface LogoutParams {
|
|
801
|
+
}
|
|
802
|
+
interface GetStoresParams {
|
|
803
|
+
query?: string | number;
|
|
804
|
+
limit?: number;
|
|
805
|
+
cursor?: string;
|
|
806
|
+
sort_field?: string;
|
|
807
|
+
sort_direction?: "asc" | "desc";
|
|
808
|
+
}
|
|
809
|
+
interface GetSubscriptionPlansParams {
|
|
810
|
+
}
|
|
811
|
+
interface SetupAnalyticsParams {
|
|
812
|
+
store_id?: string;
|
|
968
813
|
}
|
|
969
|
-
interface
|
|
814
|
+
interface GetStoreMediaParams2 {
|
|
970
815
|
id: string;
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
timeline: ProviderTimelinePoint[];
|
|
979
|
-
created_at: number;
|
|
980
|
-
updated_at: number;
|
|
816
|
+
cursor?: string | null;
|
|
817
|
+
limit: number;
|
|
818
|
+
ids?: string[];
|
|
819
|
+
query?: string | number;
|
|
820
|
+
mime_type?: string;
|
|
821
|
+
sort_field?: string;
|
|
822
|
+
sort_direction?: 'asc' | 'desc';
|
|
981
823
|
}
|
|
982
|
-
interface
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
output: string;
|
|
986
|
-
back_edge: boolean;
|
|
824
|
+
interface ProcessBookingRefundParams {
|
|
825
|
+
id: string;
|
|
826
|
+
amount: number;
|
|
987
827
|
}
|
|
988
|
-
interface
|
|
828
|
+
interface ProcessOrderRefundParams {
|
|
989
829
|
id: string;
|
|
990
|
-
|
|
991
|
-
store_id: string;
|
|
992
|
-
secret: string;
|
|
993
|
-
status: WorkflowStatus;
|
|
994
|
-
nodes: Record<string, WorkflowNode>;
|
|
995
|
-
edges: WorkflowEdge[];
|
|
996
|
-
schedule?: string;
|
|
997
|
-
created_at: number;
|
|
998
|
-
updated_at: number;
|
|
830
|
+
amount: number;
|
|
999
831
|
}
|
|
1000
|
-
type
|
|
1001
|
-
interface
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
832
|
+
type SystemTemplateKey = "system:booking-store-update" | "system:booking-customer-update" | "system:user-invitation" | "system:order-status-update" | "system:user-confirmation" | "system:forgot-password";
|
|
833
|
+
interface GetAvailabilityParams {
|
|
834
|
+
store_id?: string;
|
|
835
|
+
service_id: string;
|
|
836
|
+
from: number;
|
|
837
|
+
to: number;
|
|
838
|
+
provider_id?: string;
|
|
1006
839
|
}
|
|
1007
|
-
interface
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
840
|
+
interface AvailabilitySlot {
|
|
841
|
+
from: number;
|
|
842
|
+
to: number;
|
|
843
|
+
spots: number;
|
|
844
|
+
}
|
|
845
|
+
interface DaySlots {
|
|
846
|
+
date: string;
|
|
847
|
+
slots: AvailabilitySlot[];
|
|
848
|
+
}
|
|
849
|
+
interface ProviderAvailability {
|
|
850
|
+
provider_id: string;
|
|
851
|
+
provider_key: string;
|
|
852
|
+
days: DaySlots[];
|
|
853
|
+
}
|
|
854
|
+
interface AvailabilityResponse {
|
|
855
|
+
from: number;
|
|
856
|
+
to: number;
|
|
857
|
+
providers: ProviderAvailability[];
|
|
858
|
+
}
|
|
859
|
+
interface Slot {
|
|
860
|
+
id: string;
|
|
861
|
+
service_id: string;
|
|
862
|
+
provider_id: string;
|
|
863
|
+
from: number;
|
|
864
|
+
to: number;
|
|
865
|
+
time_text: string;
|
|
866
|
+
date_text: string;
|
|
867
|
+
}
|
|
868
|
+
interface CreateWorkflowParams {
|
|
869
|
+
store_id?: string;
|
|
870
|
+
key: string;
|
|
871
|
+
status?: WorkflowStatus;
|
|
872
|
+
nodes: Record<string, WorkflowNode>;
|
|
873
|
+
edges: WorkflowEdge[];
|
|
874
|
+
schedule?: string;
|
|
1019
875
|
}
|
|
1020
|
-
interface
|
|
1021
|
-
|
|
876
|
+
interface UpdateWorkflowParams {
|
|
877
|
+
id: string;
|
|
878
|
+
store_id?: string;
|
|
879
|
+
key: string;
|
|
880
|
+
status?: WorkflowStatus;
|
|
881
|
+
nodes: Record<string, WorkflowNode>;
|
|
882
|
+
edges: WorkflowEdge[];
|
|
883
|
+
schedule?: string;
|
|
1022
884
|
}
|
|
1023
|
-
interface
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
delay_ms?: number;
|
|
885
|
+
interface DeleteWorkflowParams {
|
|
886
|
+
id: string;
|
|
887
|
+
store_id?: string;
|
|
1027
888
|
}
|
|
1028
|
-
interface
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
delay_ms?: number;
|
|
889
|
+
interface GetWorkflowParams {
|
|
890
|
+
id: string;
|
|
891
|
+
store_id?: string;
|
|
1032
892
|
}
|
|
1033
|
-
interface
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
893
|
+
interface GetWorkflowsParams {
|
|
894
|
+
store_id?: string;
|
|
895
|
+
ids?: string[];
|
|
896
|
+
query?: string | number;
|
|
897
|
+
status?: WorkflowStatus;
|
|
898
|
+
limit?: number;
|
|
899
|
+
cursor?: string;
|
|
900
|
+
sort_field?: string;
|
|
901
|
+
sort_direction?: 'asc' | 'desc';
|
|
902
|
+
created_at_from?: number;
|
|
903
|
+
created_at_to?: number;
|
|
1037
904
|
}
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
output: any;
|
|
1042
|
-
route: string;
|
|
1043
|
-
started_at: number;
|
|
1044
|
-
completed_at: number;
|
|
1045
|
-
duration_ms: number;
|
|
1046
|
-
error?: string;
|
|
905
|
+
interface TriggerWorkflowParams {
|
|
906
|
+
secret: string;
|
|
907
|
+
input?: Record<string, unknown>;
|
|
1047
908
|
}
|
|
1048
|
-
interface
|
|
1049
|
-
id: string;
|
|
909
|
+
interface GetWorkflowExecutionsParams {
|
|
1050
910
|
workflow_id: string;
|
|
1051
|
-
store_id
|
|
1052
|
-
status
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
error?: string;
|
|
1056
|
-
scheduled_at: number;
|
|
1057
|
-
started_at: number;
|
|
1058
|
-
completed_at?: number;
|
|
1059
|
-
created_at: number;
|
|
1060
|
-
updated_at: number;
|
|
911
|
+
store_id?: string;
|
|
912
|
+
status?: ExecutionStatus;
|
|
913
|
+
limit?: number;
|
|
914
|
+
cursor?: string;
|
|
1061
915
|
}
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
type: 'paid';
|
|
1069
|
-
prices: SubscriptionPrice[];
|
|
1070
|
-
payment_integration_id?: string;
|
|
1071
|
-
};
|
|
1072
|
-
interface Audience {
|
|
1073
|
-
id: string;
|
|
1074
|
-
store_id: string;
|
|
916
|
+
interface GetWorkflowExecutionParams {
|
|
917
|
+
workflow_id: string;
|
|
918
|
+
execution_id: string;
|
|
919
|
+
store_id?: string;
|
|
920
|
+
}
|
|
921
|
+
interface CreateAudienceParams {
|
|
1075
922
|
key: string;
|
|
1076
|
-
|
|
1077
|
-
|
|
923
|
+
type?: AudienceType;
|
|
924
|
+
confirm_template_id?: string;
|
|
1078
925
|
}
|
|
1079
|
-
interface
|
|
1080
|
-
|
|
1081
|
-
|
|
926
|
+
interface UpdateAudienceParams {
|
|
927
|
+
id: string;
|
|
928
|
+
key?: string;
|
|
929
|
+
status?: AudienceStatus;
|
|
930
|
+
confirm_template_id?: string;
|
|
1082
931
|
}
|
|
1083
|
-
interface
|
|
1084
|
-
|
|
1085
|
-
|
|
932
|
+
interface GetAudienceParams {
|
|
933
|
+
id?: string;
|
|
934
|
+
key?: string;
|
|
1086
935
|
}
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
amount: number;
|
|
1097
|
-
currency: string;
|
|
1098
|
-
};
|
|
1099
|
-
} | {
|
|
1100
|
-
action: 'order_payment_failed';
|
|
1101
|
-
data: {
|
|
1102
|
-
reason?: string;
|
|
1103
|
-
};
|
|
1104
|
-
} | {
|
|
1105
|
-
action: 'order_refunded';
|
|
1106
|
-
data: {
|
|
1107
|
-
amount: number;
|
|
1108
|
-
currency: string;
|
|
1109
|
-
reason?: string;
|
|
1110
|
-
};
|
|
1111
|
-
} | {
|
|
1112
|
-
action: 'order_cancelled';
|
|
1113
|
-
data: {
|
|
1114
|
-
reason?: string;
|
|
1115
|
-
};
|
|
1116
|
-
} | {
|
|
1117
|
-
action: 'order_shipment_created';
|
|
1118
|
-
data: {
|
|
1119
|
-
shipment_id: string;
|
|
1120
|
-
};
|
|
1121
|
-
} | {
|
|
1122
|
-
action: 'order_shipment_in_transit';
|
|
1123
|
-
data: {
|
|
1124
|
-
shipment_id: string;
|
|
1125
|
-
};
|
|
1126
|
-
} | {
|
|
1127
|
-
action: 'order_shipment_out_for_delivery';
|
|
1128
|
-
data: {
|
|
1129
|
-
shipment_id: string;
|
|
1130
|
-
};
|
|
1131
|
-
} | {
|
|
1132
|
-
action: 'order_shipment_delivered';
|
|
1133
|
-
data: {
|
|
1134
|
-
shipment_id: string;
|
|
1135
|
-
};
|
|
1136
|
-
} | {
|
|
1137
|
-
action: 'order_shipment_failed';
|
|
1138
|
-
data: {
|
|
1139
|
-
shipment_id: string;
|
|
1140
|
-
reason?: string;
|
|
1141
|
-
};
|
|
1142
|
-
} | {
|
|
1143
|
-
action: 'order_shipment_returned';
|
|
1144
|
-
data: {
|
|
1145
|
-
shipment_id: string;
|
|
1146
|
-
};
|
|
1147
|
-
} | {
|
|
1148
|
-
action: 'order_shipment_status_changed';
|
|
1149
|
-
data: {
|
|
1150
|
-
shipment_id: string;
|
|
1151
|
-
from: string;
|
|
1152
|
-
to: string;
|
|
1153
|
-
};
|
|
1154
|
-
} | {
|
|
1155
|
-
action: 'booking_created';
|
|
1156
|
-
} | {
|
|
1157
|
-
action: 'booking_updated';
|
|
1158
|
-
} | {
|
|
1159
|
-
action: 'booking_payment_received';
|
|
1160
|
-
data: {
|
|
1161
|
-
amount: number;
|
|
1162
|
-
currency: string;
|
|
1163
|
-
};
|
|
1164
|
-
} | {
|
|
1165
|
-
action: 'booking_payment_failed';
|
|
1166
|
-
data: {
|
|
1167
|
-
reason?: string;
|
|
1168
|
-
};
|
|
1169
|
-
} | {
|
|
1170
|
-
action: 'booking_refunded';
|
|
1171
|
-
data: {
|
|
1172
|
-
amount: number;
|
|
1173
|
-
currency: string;
|
|
1174
|
-
reason?: string;
|
|
1175
|
-
};
|
|
1176
|
-
} | {
|
|
1177
|
-
action: 'booking_cancelled';
|
|
1178
|
-
data: {
|
|
1179
|
-
reason?: string;
|
|
1180
|
-
};
|
|
1181
|
-
} | {
|
|
1182
|
-
action: 'booking_item_cancelled';
|
|
1183
|
-
data: {
|
|
1184
|
-
item_id: string;
|
|
1185
|
-
refund_amount: number;
|
|
1186
|
-
};
|
|
1187
|
-
} | {
|
|
1188
|
-
action: 'product_created';
|
|
1189
|
-
} | {
|
|
1190
|
-
action: 'product_updated';
|
|
1191
|
-
} | {
|
|
1192
|
-
action: 'product_deleted';
|
|
1193
|
-
} | {
|
|
1194
|
-
action: 'node_created';
|
|
1195
|
-
} | {
|
|
1196
|
-
action: 'node_updated';
|
|
1197
|
-
} | {
|
|
1198
|
-
action: 'node_deleted';
|
|
1199
|
-
} | {
|
|
1200
|
-
action: 'provider_created';
|
|
1201
|
-
} | {
|
|
1202
|
-
action: 'provider_updated';
|
|
1203
|
-
} | {
|
|
1204
|
-
action: 'provider_deleted';
|
|
1205
|
-
} | {
|
|
1206
|
-
action: 'service_created';
|
|
1207
|
-
} | {
|
|
1208
|
-
action: 'service_updated';
|
|
1209
|
-
} | {
|
|
1210
|
-
action: 'service_deleted';
|
|
1211
|
-
} | {
|
|
1212
|
-
action: 'account_created';
|
|
1213
|
-
} | {
|
|
1214
|
-
action: 'account_updated';
|
|
1215
|
-
} | {
|
|
1216
|
-
action: 'account_deleted';
|
|
1217
|
-
} | {
|
|
1218
|
-
action: 'media_created';
|
|
1219
|
-
} | {
|
|
1220
|
-
action: 'media_deleted';
|
|
1221
|
-
} | {
|
|
1222
|
-
action: 'store_created';
|
|
1223
|
-
} | {
|
|
1224
|
-
action: 'store_updated';
|
|
1225
|
-
} | {
|
|
1226
|
-
action: 'store_deleted';
|
|
1227
|
-
} | {
|
|
1228
|
-
action: 'audience_created';
|
|
1229
|
-
} | {
|
|
1230
|
-
action: 'audience_updated';
|
|
1231
|
-
} | {
|
|
1232
|
-
action: 'audience_deleted';
|
|
1233
|
-
};
|
|
1234
|
-
interface Event {
|
|
936
|
+
interface GetAudiencesParams {
|
|
937
|
+
store_id?: string;
|
|
938
|
+
ids?: string[];
|
|
939
|
+
status?: AudienceStatus;
|
|
940
|
+
query?: string | number;
|
|
941
|
+
limit?: number;
|
|
942
|
+
cursor?: string;
|
|
943
|
+
}
|
|
944
|
+
interface SubscribeAudienceParams {
|
|
1235
945
|
id: string;
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
946
|
+
customer_id: string;
|
|
947
|
+
price_id?: string;
|
|
948
|
+
success_url?: string;
|
|
949
|
+
cancel_url?: string;
|
|
950
|
+
confirm_url?: string;
|
|
1240
951
|
}
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
carrier: string;
|
|
1244
|
-
service: string;
|
|
1245
|
-
tracking_number?: string | null;
|
|
1246
|
-
tracking_url?: string | null;
|
|
1247
|
-
label_url?: string | null;
|
|
1248
|
-
status: ShippingStatus;
|
|
952
|
+
interface DeleteAudienceParams {
|
|
953
|
+
id: string;
|
|
1249
954
|
}
|
|
1250
|
-
interface
|
|
1251
|
-
|
|
1252
|
-
|
|
955
|
+
interface GetAudienceSubscribersParams {
|
|
956
|
+
id: string;
|
|
957
|
+
limit?: number;
|
|
958
|
+
cursor?: string;
|
|
1253
959
|
}
|
|
1254
|
-
interface
|
|
960
|
+
interface AudienceSubscriber {
|
|
961
|
+
customer_id: string;
|
|
962
|
+
email: string;
|
|
963
|
+
subscribed_at?: number;
|
|
964
|
+
source?: AudienceSubscriptionSource;
|
|
965
|
+
status?: AudienceSubscriptionStatus;
|
|
966
|
+
}
|
|
967
|
+
interface RemoveAudienceSubscriberParams {
|
|
1255
968
|
id: string;
|
|
1256
|
-
|
|
1257
|
-
lines: ShipmentLine[];
|
|
1258
|
-
carrier?: string | null;
|
|
1259
|
-
service?: string | null;
|
|
1260
|
-
tracking_number?: string | null;
|
|
1261
|
-
tracking_url?: string | null;
|
|
1262
|
-
label_url?: string | null;
|
|
1263
|
-
status: ShippingStatus;
|
|
1264
|
-
created_at: number;
|
|
1265
|
-
updated_at: number;
|
|
969
|
+
customer_id: string;
|
|
1266
970
|
}
|
|
1267
|
-
interface
|
|
971
|
+
interface AddAudienceSubscriberParams {
|
|
1268
972
|
id: string;
|
|
973
|
+
customer_id: string;
|
|
974
|
+
}
|
|
975
|
+
interface AddAudienceSubscriberResponse {
|
|
976
|
+
subscriber: AudienceSubscriber | null;
|
|
977
|
+
skipped: boolean;
|
|
978
|
+
}
|
|
979
|
+
interface OAuthConnectParams {
|
|
980
|
+
store_id: string;
|
|
1269
981
|
provider: string;
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
display_name: string;
|
|
1273
|
-
amount: number;
|
|
1274
|
-
currency: string;
|
|
1275
|
-
estimated_days?: number | null;
|
|
982
|
+
code: string;
|
|
983
|
+
redirect_uri: string;
|
|
1276
984
|
}
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
width: number;
|
|
1281
|
-
height: number;
|
|
1282
|
-
weight: number;
|
|
1283
|
-
distance_unit: 'in' | 'cm';
|
|
1284
|
-
mass_unit: 'oz' | 'lb' | 'g' | 'kg';
|
|
985
|
+
interface OAuthDisconnectParams {
|
|
986
|
+
store_id: string;
|
|
987
|
+
provider: string;
|
|
1285
988
|
}
|
|
1286
|
-
interface
|
|
1287
|
-
|
|
1288
|
-
tracking_url?: string | null;
|
|
1289
|
-
label_url: string;
|
|
1290
|
-
carrier: string;
|
|
1291
|
-
service: string;
|
|
989
|
+
interface ListIntegrationsParams {
|
|
990
|
+
store_id: string;
|
|
1292
991
|
}
|
|
1293
|
-
interface
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
tracking_url?: string | null;
|
|
1297
|
-
label_url: string;
|
|
992
|
+
interface GetIntegrationParams {
|
|
993
|
+
store_id: string;
|
|
994
|
+
id: string;
|
|
1298
995
|
}
|
|
1299
|
-
interface
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
mass_unit: string;
|
|
1304
|
-
value_amount: string;
|
|
1305
|
-
value_currency: string;
|
|
1306
|
-
origin_country: string;
|
|
1307
|
-
tariff_number?: string | null;
|
|
996
|
+
interface CreateIntegrationParams {
|
|
997
|
+
store_id: string;
|
|
998
|
+
key: string;
|
|
999
|
+
provider: IntegrationProvider;
|
|
1308
1000
|
}
|
|
1309
|
-
interface
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
certify_signer: string;
|
|
1315
|
-
items: CustomsItem[];
|
|
1001
|
+
interface UpdateIntegrationParams {
|
|
1002
|
+
store_id: string;
|
|
1003
|
+
id: string;
|
|
1004
|
+
key?: string;
|
|
1005
|
+
provider?: IntegrationProvider;
|
|
1316
1006
|
}
|
|
1317
|
-
|
|
1318
|
-
|
|
1007
|
+
interface DeleteIntegrationParams {
|
|
1008
|
+
store_id: string;
|
|
1009
|
+
id: string;
|
|
1010
|
+
}
|
|
1011
|
+
interface ListWebhooksParams {
|
|
1012
|
+
store_id: string;
|
|
1013
|
+
}
|
|
1014
|
+
interface CreateWebhookParams {
|
|
1015
|
+
store_id: string;
|
|
1319
1016
|
key: string;
|
|
1320
|
-
|
|
1321
|
-
|
|
1017
|
+
url: string;
|
|
1018
|
+
events: WebhookEventSubscription[];
|
|
1019
|
+
headers: Record<string, string>;
|
|
1020
|
+
secret: string;
|
|
1021
|
+
enabled: boolean;
|
|
1322
1022
|
}
|
|
1323
|
-
interface
|
|
1023
|
+
interface UpdateWebhookParams {
|
|
1024
|
+
store_id: string;
|
|
1324
1025
|
id: string;
|
|
1325
1026
|
key: string;
|
|
1326
|
-
|
|
1327
|
-
|
|
1027
|
+
url: string;
|
|
1028
|
+
events: WebhookEventSubscription[];
|
|
1029
|
+
headers: Record<string, string>;
|
|
1030
|
+
secret: string;
|
|
1031
|
+
enabled: boolean;
|
|
1328
1032
|
}
|
|
1329
|
-
interface
|
|
1033
|
+
interface DeleteWebhookParams {
|
|
1034
|
+
store_id: string;
|
|
1330
1035
|
id: string;
|
|
1331
1036
|
}
|
|
1332
|
-
interface
|
|
1037
|
+
interface GetShippingRatesParams {
|
|
1038
|
+
order_id: string;
|
|
1039
|
+
shipping_provider_id: string;
|
|
1040
|
+
from_address: Address;
|
|
1041
|
+
to_address: Address;
|
|
1042
|
+
parcel: Parcel;
|
|
1043
|
+
customs_declaration?: CustomsDeclaration;
|
|
1044
|
+
}
|
|
1045
|
+
interface ShipParams {
|
|
1046
|
+
order_id: string;
|
|
1047
|
+
rate_id: string;
|
|
1048
|
+
carrier: string;
|
|
1049
|
+
service: string;
|
|
1050
|
+
location_id: string;
|
|
1051
|
+
lines: ShipmentLine[];
|
|
1052
|
+
}
|
|
1053
|
+
type AgentStatus = 'active' | 'draft' | 'archived';
|
|
1054
|
+
interface CreateAgentParams {
|
|
1055
|
+
store_id?: string;
|
|
1333
1056
|
key: string;
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1057
|
+
prompt: string;
|
|
1058
|
+
status?: AgentStatus;
|
|
1059
|
+
model_id: string;
|
|
1060
|
+
channel_ids?: string[];
|
|
1338
1061
|
}
|
|
1339
|
-
interface
|
|
1062
|
+
interface UpdateAgentParams {
|
|
1340
1063
|
id: string;
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1064
|
+
store_id?: string;
|
|
1065
|
+
key: string;
|
|
1066
|
+
prompt: string;
|
|
1067
|
+
status: AgentStatus;
|
|
1068
|
+
model_id: string;
|
|
1069
|
+
channel_ids?: string[];
|
|
1346
1070
|
}
|
|
1347
|
-
interface
|
|
1071
|
+
interface DeleteAgentParams {
|
|
1348
1072
|
id: string;
|
|
1073
|
+
store_id?: string;
|
|
1349
1074
|
}
|
|
1350
|
-
interface
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
transformRequest?: (data: any) => any;
|
|
1354
|
-
onSuccess?: (ctx: {
|
|
1355
|
-
data: T;
|
|
1356
|
-
method: string;
|
|
1357
|
-
url: string;
|
|
1358
|
-
status: number;
|
|
1359
|
-
request?: any;
|
|
1360
|
-
duration_ms?: number;
|
|
1361
|
-
request_id?: string | null;
|
|
1362
|
-
}) => void | Promise<void>;
|
|
1363
|
-
onError?: (ctx: {
|
|
1364
|
-
error: any;
|
|
1365
|
-
method: string;
|
|
1366
|
-
url: string;
|
|
1367
|
-
status?: number;
|
|
1368
|
-
request?: any;
|
|
1369
|
-
response?: any;
|
|
1370
|
-
duration_ms?: number;
|
|
1371
|
-
request_id?: string | null;
|
|
1372
|
-
aborted?: boolean;
|
|
1373
|
-
}) => void | Promise<void>;
|
|
1374
|
-
}
|
|
1375
|
-
interface EshopItem {
|
|
1376
|
-
product_id: string;
|
|
1377
|
-
variant_id: string;
|
|
1378
|
-
quantity: number;
|
|
1075
|
+
interface GetAgentParams {
|
|
1076
|
+
id: string;
|
|
1077
|
+
store_id?: string;
|
|
1379
1078
|
}
|
|
1380
|
-
interface
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
promo_code?: string;
|
|
1385
|
-
blocks?: any[];
|
|
1386
|
-
location?: ZoneLocation;
|
|
1079
|
+
interface GetAgentsParams {
|
|
1080
|
+
store_id?: string;
|
|
1081
|
+
limit?: number;
|
|
1082
|
+
cursor?: string;
|
|
1387
1083
|
}
|
|
1388
|
-
interface
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
shipping_address?: Address;
|
|
1395
|
-
billing_address?: Address;
|
|
1084
|
+
interface RunAgentParams {
|
|
1085
|
+
id: string;
|
|
1086
|
+
store_id?: string;
|
|
1087
|
+
message: string;
|
|
1088
|
+
chat_id?: string;
|
|
1089
|
+
direct?: boolean;
|
|
1396
1090
|
}
|
|
1397
|
-
interface
|
|
1091
|
+
interface GetAgentChatsParams {
|
|
1092
|
+
id: string;
|
|
1398
1093
|
store_id?: string;
|
|
1399
|
-
ids?: string[];
|
|
1400
|
-
taxonomy_query?: any[];
|
|
1401
|
-
status?: string;
|
|
1402
1094
|
limit?: number;
|
|
1403
1095
|
cursor?: string;
|
|
1404
|
-
query?: string;
|
|
1405
|
-
statuses?: string[];
|
|
1406
|
-
sort_field?: string;
|
|
1407
|
-
sort_direction?: string;
|
|
1408
|
-
created_at_from?: number | null;
|
|
1409
|
-
created_at_to?: number | null;
|
|
1410
1096
|
}
|
|
1411
|
-
interface
|
|
1097
|
+
interface GetStoreChatsParams {
|
|
1412
1098
|
store_id?: string;
|
|
1413
|
-
|
|
1099
|
+
agent_id?: string;
|
|
1100
|
+
status?: AgentChatStatus;
|
|
1101
|
+
query?: string | number;
|
|
1102
|
+
sort_field?: string;
|
|
1103
|
+
sort_direction?: 'asc' | 'desc';
|
|
1414
1104
|
limit?: number;
|
|
1415
1105
|
cursor?: string;
|
|
1416
|
-
ids?: string[];
|
|
1417
|
-
query?: string;
|
|
1418
|
-
type?: string;
|
|
1419
|
-
key?: string;
|
|
1420
|
-
statuses?: string[];
|
|
1421
|
-
sort_field?: string;
|
|
1422
|
-
sort_direction?: string;
|
|
1423
|
-
created_at_from?: string;
|
|
1424
|
-
created_at_to?: string;
|
|
1425
1106
|
}
|
|
1426
|
-
interface
|
|
1107
|
+
interface GetAgentChatParams {
|
|
1108
|
+
id: string;
|
|
1427
1109
|
store_id?: string;
|
|
1428
|
-
|
|
1429
|
-
parent_id?: string | null;
|
|
1430
|
-
blocks?: any[];
|
|
1431
|
-
filters?: any[];
|
|
1432
|
-
slug?: Record<string, string>;
|
|
1433
|
-
audience_ids?: string[];
|
|
1434
|
-
status?: string;
|
|
1110
|
+
chat_id: string;
|
|
1435
1111
|
}
|
|
1436
|
-
interface
|
|
1112
|
+
interface UpdateAgentChatParams {
|
|
1437
1113
|
id: string;
|
|
1438
1114
|
store_id?: string;
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
blocks?: any[];
|
|
1442
|
-
filters?: any[];
|
|
1443
|
-
slug?: Record<string, string>;
|
|
1444
|
-
audience_ids?: string[];
|
|
1445
|
-
status?: string;
|
|
1115
|
+
chat_id: string;
|
|
1116
|
+
status: 'active' | 'archived';
|
|
1446
1117
|
}
|
|
1447
|
-
interface
|
|
1448
|
-
id
|
|
1449
|
-
slug?: string;
|
|
1450
|
-
key?: string;
|
|
1118
|
+
interface RateAgentChatParams {
|
|
1119
|
+
id: string;
|
|
1451
1120
|
store_id?: string;
|
|
1121
|
+
chat_id: string;
|
|
1122
|
+
rating: number;
|
|
1123
|
+
comment?: string;
|
|
1452
1124
|
}
|
|
1453
|
-
interface
|
|
1125
|
+
interface AuthToken {
|
|
1454
1126
|
id: string;
|
|
1455
|
-
|
|
1127
|
+
access_token: string;
|
|
1128
|
+
refresh_token: string;
|
|
1129
|
+
access_expires_at: number;
|
|
1130
|
+
refresh_expires_at: number;
|
|
1131
|
+
created_at: number;
|
|
1132
|
+
is_verified: boolean;
|
|
1456
1133
|
}
|
|
1457
|
-
interface
|
|
1134
|
+
interface CustomerInfo {
|
|
1458
1135
|
id: string;
|
|
1459
|
-
|
|
1460
|
-
limit?: number;
|
|
1461
|
-
cursor?: string;
|
|
1136
|
+
verified: boolean;
|
|
1462
1137
|
}
|
|
1463
|
-
interface
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1138
|
+
interface CustomerAuthToken {
|
|
1139
|
+
id: string;
|
|
1140
|
+
token: string;
|
|
1141
|
+
created_at: number;
|
|
1467
1142
|
}
|
|
1468
|
-
interface
|
|
1143
|
+
interface CustomerVerificationCode {
|
|
1144
|
+
code: string;
|
|
1145
|
+
created_at: number;
|
|
1146
|
+
used: boolean;
|
|
1147
|
+
store_id?: string | null;
|
|
1148
|
+
}
|
|
1149
|
+
interface PromoUsage {
|
|
1150
|
+
promo_code_id: string;
|
|
1151
|
+
uses: number;
|
|
1152
|
+
}
|
|
1153
|
+
interface Customer {
|
|
1469
1154
|
id: string;
|
|
1470
|
-
|
|
1155
|
+
store_id: string;
|
|
1156
|
+
email: string | null;
|
|
1157
|
+
verified: boolean;
|
|
1158
|
+
status: CustomerStatus;
|
|
1159
|
+
promo_usage: PromoUsage[];
|
|
1160
|
+
taxonomies: TaxonomyEntry[];
|
|
1161
|
+
auth_tokens: CustomerAuthToken[];
|
|
1162
|
+
verification_codes: CustomerVerificationCode[];
|
|
1163
|
+
created_at: number;
|
|
1164
|
+
updated_at: number;
|
|
1471
1165
|
}
|
|
1472
|
-
interface
|
|
1473
|
-
|
|
1474
|
-
|
|
1166
|
+
interface CustomerDetail extends Customer {
|
|
1167
|
+
orders: Order[];
|
|
1168
|
+
bookings: Booking[];
|
|
1169
|
+
audience_subscriptions: AudienceSubscription[];
|
|
1475
1170
|
}
|
|
1476
|
-
interface
|
|
1477
|
-
|
|
1171
|
+
interface SetCustomerEmailParams {
|
|
1172
|
+
email: string;
|
|
1478
1173
|
store_id?: string;
|
|
1479
|
-
slug?: Record<string, string>;
|
|
1480
1174
|
}
|
|
1481
|
-
interface
|
|
1175
|
+
interface CreateCustomerParams {
|
|
1482
1176
|
store_id?: string;
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
ids?: string[];
|
|
1486
|
-
query?: string;
|
|
1487
|
-
mime_type?: string;
|
|
1488
|
-
sort_field?: string;
|
|
1489
|
-
sort_direction?: 'asc' | 'desc';
|
|
1177
|
+
email: string;
|
|
1178
|
+
taxonomies?: TaxonomyEntry[];
|
|
1490
1179
|
}
|
|
1491
|
-
interface
|
|
1180
|
+
interface UpdateCustomerParams {
|
|
1181
|
+
id: string;
|
|
1182
|
+
store_id?: string;
|
|
1492
1183
|
email?: string;
|
|
1493
|
-
|
|
1494
|
-
|
|
1184
|
+
taxonomies?: TaxonomyEntry[];
|
|
1185
|
+
status?: CustomerStatus;
|
|
1495
1186
|
}
|
|
1496
|
-
interface
|
|
1497
|
-
|
|
1187
|
+
interface GetCustomerParams {
|
|
1188
|
+
id: string;
|
|
1498
1189
|
store_id?: string;
|
|
1499
1190
|
}
|
|
1500
|
-
interface
|
|
1501
|
-
email: string;
|
|
1502
|
-
code: string;
|
|
1503
|
-
}
|
|
1504
|
-
interface GetServicesParams {
|
|
1191
|
+
interface FindCustomersParams {
|
|
1505
1192
|
store_id?: string;
|
|
1506
|
-
|
|
1507
|
-
taxonomy_query?: any[];
|
|
1193
|
+
query?: string | number;
|
|
1508
1194
|
limit?: number;
|
|
1509
1195
|
cursor?: string;
|
|
1510
|
-
query?: string;
|
|
1511
|
-
ids?: string[];
|
|
1512
|
-
statuses?: string[];
|
|
1513
1196
|
sort_field?: string;
|
|
1514
|
-
sort_direction?:
|
|
1197
|
+
sort_direction?: 'asc' | 'desc';
|
|
1515
1198
|
}
|
|
1516
|
-
interface
|
|
1199
|
+
interface MergeCustomersParams {
|
|
1200
|
+
target_id: string;
|
|
1201
|
+
source_id: string;
|
|
1517
1202
|
store_id?: string;
|
|
1518
|
-
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
declare enum PaymentMethodType {
|
|
1206
|
+
Cash = "cash",
|
|
1207
|
+
CreditCard = "credit_card"
|
|
1208
|
+
}
|
|
1209
|
+
interface PaymentTaxLine {
|
|
1210
|
+
rate_bps: number;
|
|
1211
|
+
amount: number;
|
|
1212
|
+
label?: string;
|
|
1213
|
+
scope?: string;
|
|
1214
|
+
}
|
|
1215
|
+
interface BookingPaymentTax {
|
|
1216
|
+
amount: number;
|
|
1217
|
+
mode_snapshot?: string;
|
|
1218
|
+
rate_bps: number;
|
|
1219
|
+
lines: BookingPaymentTaxLine[];
|
|
1220
|
+
}
|
|
1221
|
+
interface BookingPaymentTaxLine {
|
|
1222
|
+
rate_bps: number;
|
|
1223
|
+
amount: number;
|
|
1224
|
+
label?: string;
|
|
1225
|
+
scope?: string;
|
|
1226
|
+
}
|
|
1227
|
+
interface BookingPaymentPromoCode {
|
|
1228
|
+
id: string;
|
|
1229
|
+
code: string;
|
|
1230
|
+
type: string;
|
|
1231
|
+
value: number;
|
|
1232
|
+
}
|
|
1233
|
+
type BookingPaymentProvider = {
|
|
1234
|
+
type: 'stripe';
|
|
1235
|
+
customer_id: string;
|
|
1236
|
+
payment_intent_id?: string;
|
|
1237
|
+
};
|
|
1238
|
+
interface BookingPaymentRefund {
|
|
1239
|
+
id: string;
|
|
1240
|
+
total: number;
|
|
1241
|
+
provider_refund_id?: string;
|
|
1242
|
+
status: string;
|
|
1243
|
+
created_at: number;
|
|
1244
|
+
}
|
|
1245
|
+
interface BookingPayment {
|
|
1246
|
+
currency: string;
|
|
1247
|
+
market: string;
|
|
1248
|
+
subtotal: number;
|
|
1249
|
+
discount: number;
|
|
1250
|
+
total: number;
|
|
1251
|
+
paid: number;
|
|
1252
|
+
tax?: BookingPaymentTax;
|
|
1253
|
+
promo_code?: BookingPaymentPromoCode;
|
|
1254
|
+
provider?: BookingPaymentProvider;
|
|
1255
|
+
refunds: BookingPaymentRefund[];
|
|
1519
1256
|
payment_method_id?: string;
|
|
1520
|
-
|
|
1521
|
-
promo_code_id?: string;
|
|
1257
|
+
method_type: PaymentMethodType;
|
|
1522
1258
|
}
|
|
1523
|
-
interface
|
|
1524
|
-
|
|
1525
|
-
|
|
1259
|
+
interface OrderPaymentTax {
|
|
1260
|
+
amount: number;
|
|
1261
|
+
mode_snapshot?: string;
|
|
1262
|
+
rate_bps: number;
|
|
1263
|
+
lines: OrderPaymentTaxLine[];
|
|
1526
1264
|
}
|
|
1527
|
-
interface
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1265
|
+
interface OrderPaymentTaxLine {
|
|
1266
|
+
rate_bps: number;
|
|
1267
|
+
amount: number;
|
|
1268
|
+
label?: string;
|
|
1269
|
+
scope?: string;
|
|
1531
1270
|
}
|
|
1532
|
-
interface
|
|
1533
|
-
|
|
1534
|
-
|
|
1271
|
+
interface OrderPaymentPromoCode {
|
|
1272
|
+
id: string;
|
|
1273
|
+
code: string;
|
|
1274
|
+
type: string;
|
|
1275
|
+
value: number;
|
|
1276
|
+
}
|
|
1277
|
+
type OrderPaymentProvider = {
|
|
1278
|
+
type: 'stripe';
|
|
1279
|
+
customer_id: string;
|
|
1280
|
+
payment_intent_id?: string;
|
|
1281
|
+
};
|
|
1282
|
+
interface OrderPaymentRefund {
|
|
1283
|
+
id: string;
|
|
1284
|
+
total: number;
|
|
1285
|
+
provider_refund_id?: string;
|
|
1286
|
+
status: string;
|
|
1287
|
+
created_at: number;
|
|
1288
|
+
}
|
|
1289
|
+
interface OrderPayment {
|
|
1290
|
+
currency: string;
|
|
1291
|
+
market: string;
|
|
1292
|
+
subtotal: number;
|
|
1293
|
+
shipping: number;
|
|
1294
|
+
discount: number;
|
|
1295
|
+
total: number;
|
|
1296
|
+
paid: number;
|
|
1297
|
+
tax?: OrderPaymentTax;
|
|
1298
|
+
promo_code?: OrderPaymentPromoCode;
|
|
1299
|
+
provider?: OrderPaymentProvider;
|
|
1300
|
+
refunds: OrderPaymentRefund[];
|
|
1301
|
+
zone_id?: string;
|
|
1535
1302
|
payment_method_id?: string;
|
|
1536
|
-
|
|
1303
|
+
shipping_method_id?: string;
|
|
1304
|
+
method_type: PaymentMethodType;
|
|
1537
1305
|
}
|
|
1538
|
-
interface
|
|
1539
|
-
|
|
1540
|
-
|
|
1306
|
+
interface PromoCodeValidation {
|
|
1307
|
+
promo_code_id: string;
|
|
1308
|
+
code: string;
|
|
1309
|
+
discounts: Discount[];
|
|
1310
|
+
conditions: Condition[];
|
|
1311
|
+
}
|
|
1312
|
+
interface BookingQuote {
|
|
1313
|
+
market: string;
|
|
1314
|
+
zone: Zone | null;
|
|
1315
|
+
subtotal: number;
|
|
1316
|
+
discount: number;
|
|
1317
|
+
tax: number;
|
|
1318
|
+
total: number;
|
|
1319
|
+
payment_method: PaymentMethod | null;
|
|
1320
|
+
payment_methods: PaymentMethod[];
|
|
1321
|
+
promo_code: PromoCodeValidation | null;
|
|
1322
|
+
payment: BookingPayment;
|
|
1323
|
+
charge_amount: number;
|
|
1324
|
+
id?: string;
|
|
1325
|
+
expires_at?: number;
|
|
1541
1326
|
}
|
|
1542
|
-
interface
|
|
1543
|
-
|
|
1544
|
-
|
|
1327
|
+
interface OrderQuote {
|
|
1328
|
+
market: string;
|
|
1329
|
+
zone: Zone | null;
|
|
1330
|
+
subtotal: number;
|
|
1331
|
+
shipping: number;
|
|
1332
|
+
discount: number;
|
|
1333
|
+
tax: number;
|
|
1334
|
+
total: number;
|
|
1335
|
+
shipping_method: ShippingMethod | null;
|
|
1336
|
+
payment_method: PaymentMethod | null;
|
|
1337
|
+
payment_methods: PaymentMethod[];
|
|
1338
|
+
promo_code: PromoCodeValidation | null;
|
|
1339
|
+
payment: OrderPayment;
|
|
1340
|
+
charge_amount: number;
|
|
1341
|
+
id?: string;
|
|
1342
|
+
expires_at?: number;
|
|
1545
1343
|
}
|
|
1546
|
-
interface
|
|
1547
|
-
|
|
1548
|
-
|
|
1344
|
+
interface Price {
|
|
1345
|
+
currency: string;
|
|
1346
|
+
market: string;
|
|
1347
|
+
amount: number;
|
|
1348
|
+
compare_at?: number;
|
|
1349
|
+
audience_id?: string;
|
|
1549
1350
|
}
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1351
|
+
type IntervalPeriod = 'month' | 'year';
|
|
1352
|
+
interface SubscriptionInterval {
|
|
1353
|
+
period: IntervalPeriod;
|
|
1354
|
+
count: number;
|
|
1553
1355
|
}
|
|
1554
|
-
interface
|
|
1356
|
+
interface PriceProvider {
|
|
1357
|
+
type: string;
|
|
1555
1358
|
id: string;
|
|
1556
|
-
key: string;
|
|
1557
|
-
store_id: string;
|
|
1558
|
-
seo: any;
|
|
1559
|
-
status: BookingProviderStatus;
|
|
1560
|
-
audience_ids: string[];
|
|
1561
|
-
blocks: Block[];
|
|
1562
|
-
created_at: number;
|
|
1563
|
-
updated_at: number;
|
|
1564
|
-
working_days?: WorkingDay[];
|
|
1565
|
-
specific_dates?: SpecificDate[];
|
|
1566
|
-
timeline: TimelinePoint[];
|
|
1567
1359
|
}
|
|
1568
|
-
interface
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
}
|
|
1575
|
-
interface GetAnalyticsHealthParams {
|
|
1576
|
-
}
|
|
1577
|
-
interface GetDeliveryStatsParams {
|
|
1578
|
-
}
|
|
1579
|
-
type StoreRole = 'admin' | 'owner' | 'super';
|
|
1580
|
-
interface Discount {
|
|
1581
|
-
type: "items_percentage" | "items_fixed" | "shipping_percentage";
|
|
1582
|
-
market_id: string;
|
|
1583
|
-
bps?: number;
|
|
1584
|
-
amount?: number;
|
|
1360
|
+
interface SubscriptionPrice {
|
|
1361
|
+
currency: string;
|
|
1362
|
+
amount: number;
|
|
1363
|
+
compare_at?: number;
|
|
1364
|
+
interval?: SubscriptionInterval;
|
|
1365
|
+
providers: PriceProvider[];
|
|
1585
1366
|
}
|
|
1586
|
-
interface
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1367
|
+
interface Address {
|
|
1368
|
+
name?: string | null;
|
|
1369
|
+
company?: string | null;
|
|
1370
|
+
street1?: string | null;
|
|
1371
|
+
street2?: string | null;
|
|
1372
|
+
city?: string | null;
|
|
1373
|
+
state?: string | null;
|
|
1374
|
+
postal_code?: string | null;
|
|
1375
|
+
country?: string | null;
|
|
1376
|
+
phone?: string | null;
|
|
1377
|
+
email?: string | null;
|
|
1592
1378
|
}
|
|
1593
|
-
interface
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1379
|
+
interface GeoLocation {
|
|
1380
|
+
coordinates?: {
|
|
1381
|
+
lat: number;
|
|
1382
|
+
lon: number;
|
|
1383
|
+
} | null;
|
|
1384
|
+
label?: string | null;
|
|
1598
1385
|
}
|
|
1599
|
-
interface
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
conditions: Condition[];
|
|
1605
|
-
status?: PromoCodeStatus;
|
|
1386
|
+
interface ZoneLocation {
|
|
1387
|
+
country?: string | null;
|
|
1388
|
+
state?: string | null;
|
|
1389
|
+
city?: string | null;
|
|
1390
|
+
postal_code?: string | null;
|
|
1606
1391
|
}
|
|
1607
|
-
interface
|
|
1392
|
+
interface EshopCartItem {
|
|
1608
1393
|
id: string;
|
|
1609
|
-
|
|
1394
|
+
product_id: string;
|
|
1395
|
+
variant_id: string;
|
|
1396
|
+
product_name: string;
|
|
1397
|
+
product_slug: string;
|
|
1398
|
+
variant_attributes: Record<string, any>;
|
|
1399
|
+
price: Price;
|
|
1400
|
+
quantity: number;
|
|
1401
|
+
added_at: number;
|
|
1402
|
+
max_stock?: number;
|
|
1610
1403
|
}
|
|
1611
|
-
interface
|
|
1404
|
+
interface BookingCartItem {
|
|
1612
1405
|
id: string;
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
sort_field?: string;
|
|
1622
|
-
sort_direction?: string;
|
|
1623
|
-
created_at_from?: string;
|
|
1624
|
-
created_at_to?: string;
|
|
1625
|
-
starts_at_from?: string;
|
|
1626
|
-
starts_at_to?: string;
|
|
1627
|
-
expires_at_from?: string;
|
|
1628
|
-
expires_at_to?: string;
|
|
1406
|
+
service_id: string;
|
|
1407
|
+
service_name: string;
|
|
1408
|
+
date: string;
|
|
1409
|
+
from: number;
|
|
1410
|
+
to: number;
|
|
1411
|
+
time_text: string;
|
|
1412
|
+
provider_id?: string;
|
|
1413
|
+
forms: FormEntry[];
|
|
1629
1414
|
}
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1415
|
+
type IntegrationProvider = {
|
|
1416
|
+
type: 'stripe';
|
|
1417
|
+
secret_key?: string;
|
|
1418
|
+
publishable_key: string;
|
|
1419
|
+
webhook_secret?: string;
|
|
1420
|
+
currency: string;
|
|
1421
|
+
} | {
|
|
1422
|
+
type: 'shippo';
|
|
1423
|
+
api_token?: string;
|
|
1424
|
+
} | {
|
|
1425
|
+
type: 'google';
|
|
1426
|
+
client_id?: string;
|
|
1427
|
+
client_secret?: string;
|
|
1428
|
+
access_token?: string;
|
|
1429
|
+
refresh_token?: string;
|
|
1430
|
+
token_expires_at?: number;
|
|
1431
|
+
scopes: string[];
|
|
1432
|
+
account_email?: string | null;
|
|
1433
|
+
connected_at: number;
|
|
1434
|
+
} | {
|
|
1435
|
+
type: 'telegram_bot';
|
|
1436
|
+
bot_token?: string;
|
|
1437
|
+
} | {
|
|
1438
|
+
type: 'deep_seek';
|
|
1439
|
+
api_key?: string;
|
|
1440
|
+
model?: string;
|
|
1441
|
+
} | {
|
|
1442
|
+
type: 'open_ai';
|
|
1443
|
+
api_key?: string;
|
|
1444
|
+
model?: string;
|
|
1445
|
+
} | {
|
|
1446
|
+
type: 'slack';
|
|
1447
|
+
api_key?: string;
|
|
1448
|
+
} | {
|
|
1449
|
+
type: 'discord';
|
|
1450
|
+
api_key?: string;
|
|
1451
|
+
} | {
|
|
1452
|
+
type: 'whats_app';
|
|
1453
|
+
api_key?: string;
|
|
1454
|
+
} | {
|
|
1455
|
+
type: 'resend';
|
|
1456
|
+
api_key?: string;
|
|
1457
|
+
} | {
|
|
1458
|
+
type: 'send_grid';
|
|
1459
|
+
api_key?: string;
|
|
1460
|
+
} | {
|
|
1461
|
+
type: 'airtable';
|
|
1462
|
+
api_key?: string;
|
|
1463
|
+
} | {
|
|
1464
|
+
type: 'linear';
|
|
1465
|
+
api_key?: string;
|
|
1466
|
+
} | {
|
|
1467
|
+
type: 'git_hub';
|
|
1468
|
+
api_key?: string;
|
|
1469
|
+
} | {
|
|
1470
|
+
type: 'git_lab';
|
|
1471
|
+
api_key?: string;
|
|
1472
|
+
} | {
|
|
1473
|
+
type: 'dropbox';
|
|
1474
|
+
api_key?: string;
|
|
1475
|
+
} | {
|
|
1476
|
+
type: 'hub_spot';
|
|
1477
|
+
api_key?: string;
|
|
1478
|
+
} | {
|
|
1479
|
+
type: 'monday';
|
|
1480
|
+
api_key?: string;
|
|
1481
|
+
} | {
|
|
1482
|
+
type: 'click_up';
|
|
1483
|
+
api_key?: string;
|
|
1484
|
+
} | {
|
|
1485
|
+
type: 'pipedrive';
|
|
1486
|
+
api_key?: string;
|
|
1487
|
+
} | {
|
|
1488
|
+
type: 'calendly';
|
|
1489
|
+
api_key?: string;
|
|
1490
|
+
} | {
|
|
1491
|
+
type: 'typeform';
|
|
1492
|
+
api_key?: string;
|
|
1493
|
+
} | {
|
|
1494
|
+
type: 'webflow';
|
|
1495
|
+
api_key?: string;
|
|
1496
|
+
} | {
|
|
1497
|
+
type: 'trello';
|
|
1498
|
+
api_key?: string;
|
|
1499
|
+
} | {
|
|
1500
|
+
type: 'replicate';
|
|
1501
|
+
api_key?: string;
|
|
1502
|
+
} | {
|
|
1503
|
+
type: 'asana';
|
|
1504
|
+
api_key?: string;
|
|
1505
|
+
} | {
|
|
1506
|
+
type: 'brevo';
|
|
1507
|
+
api_key?: string;
|
|
1508
|
+
} | {
|
|
1509
|
+
type: 'intercom';
|
|
1510
|
+
api_key?: string;
|
|
1511
|
+
} | {
|
|
1512
|
+
type: 'notion';
|
|
1513
|
+
api_key?: string;
|
|
1514
|
+
} | {
|
|
1515
|
+
type: 'eleven_labs';
|
|
1516
|
+
api_key?: string;
|
|
1517
|
+
} | {
|
|
1518
|
+
type: 'active_campaign';
|
|
1519
|
+
api_key?: string;
|
|
1520
|
+
account_url: string;
|
|
1521
|
+
} | {
|
|
1522
|
+
type: 'shopify';
|
|
1523
|
+
api_key?: string;
|
|
1524
|
+
store_domain: string;
|
|
1525
|
+
} | {
|
|
1526
|
+
type: 'supabase';
|
|
1527
|
+
api_key?: string;
|
|
1528
|
+
project_url: string;
|
|
1529
|
+
} | {
|
|
1530
|
+
type: 'mailchimp';
|
|
1531
|
+
api_key?: string;
|
|
1532
|
+
} | {
|
|
1533
|
+
type: 'twilio';
|
|
1534
|
+
account_sid?: string;
|
|
1535
|
+
auth_token?: string;
|
|
1536
|
+
} | {
|
|
1537
|
+
type: 'jira';
|
|
1634
1538
|
email?: string;
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
}
|
|
1647
|
-
|
|
1539
|
+
api_token?: string;
|
|
1540
|
+
domain: string;
|
|
1541
|
+
} | {
|
|
1542
|
+
type: 'woo_commerce';
|
|
1543
|
+
consumer_key?: string;
|
|
1544
|
+
consumer_secret?: string;
|
|
1545
|
+
store_url: string;
|
|
1546
|
+
} | {
|
|
1547
|
+
type: 'freshdesk';
|
|
1548
|
+
api_key?: string;
|
|
1549
|
+
domain: string;
|
|
1550
|
+
} | {
|
|
1551
|
+
type: 'zendesk';
|
|
1552
|
+
api_token?: string;
|
|
1553
|
+
email?: string;
|
|
1554
|
+
subdomain: string;
|
|
1555
|
+
} | {
|
|
1556
|
+
type: 'salesforce';
|
|
1557
|
+
access_token?: string;
|
|
1558
|
+
instance_url: string;
|
|
1559
|
+
} | {
|
|
1560
|
+
type: 'zoom';
|
|
1561
|
+
api_key?: string;
|
|
1562
|
+
} | {
|
|
1563
|
+
type: 'microsoft_teams';
|
|
1564
|
+
api_key?: string;
|
|
1565
|
+
} | {
|
|
1566
|
+
type: 'firebase';
|
|
1567
|
+
api_key?: string;
|
|
1568
|
+
} | {
|
|
1569
|
+
type: 'arky';
|
|
1570
|
+
api_key?: string;
|
|
1571
|
+
} | {
|
|
1572
|
+
type: 'vercel_deploy_hook';
|
|
1573
|
+
url?: string;
|
|
1574
|
+
} | {
|
|
1575
|
+
type: 'netlify_deploy_hook';
|
|
1576
|
+
url?: string;
|
|
1577
|
+
} | {
|
|
1578
|
+
type: 'cloudflare_deploy_hook';
|
|
1579
|
+
url?: string;
|
|
1580
|
+
} | {
|
|
1581
|
+
type: 'custom_deploy_hook';
|
|
1582
|
+
url?: string;
|
|
1583
|
+
};
|
|
1584
|
+
interface Integration {
|
|
1648
1585
|
id: string;
|
|
1649
|
-
|
|
1650
|
-
interface GetStoreParams {
|
|
1651
|
-
}
|
|
1652
|
-
interface SubscribeParams {
|
|
1653
|
-
store_id?: string;
|
|
1654
|
-
plan_id: string;
|
|
1655
|
-
success_url: string;
|
|
1656
|
-
cancel_url: string;
|
|
1657
|
-
}
|
|
1658
|
-
interface CreatePortalSessionParams {
|
|
1659
|
-
store_id?: string;
|
|
1660
|
-
return_url: string;
|
|
1661
|
-
}
|
|
1662
|
-
interface InviteUserParams {
|
|
1663
|
-
email: string;
|
|
1664
|
-
role?: StoreRole;
|
|
1665
|
-
}
|
|
1666
|
-
interface RemoveMemberParams {
|
|
1667
|
-
account_id: string;
|
|
1668
|
-
}
|
|
1669
|
-
interface HandleInvitationParams {
|
|
1670
|
-
token: string;
|
|
1671
|
-
action: string;
|
|
1672
|
-
store_id?: string;
|
|
1673
|
-
}
|
|
1674
|
-
interface TestWebhookParams {
|
|
1675
|
-
webhook: any;
|
|
1676
|
-
}
|
|
1677
|
-
interface CreateProductParams {
|
|
1678
|
-
store_id?: string;
|
|
1586
|
+
store_id: string;
|
|
1679
1587
|
key: string;
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
taxonomies?: any[];
|
|
1684
|
-
variants?: any[];
|
|
1685
|
-
status?: string;
|
|
1686
|
-
[key: string]: any;
|
|
1687
|
-
}
|
|
1688
|
-
interface UpdateProductParams {
|
|
1689
|
-
id: string;
|
|
1690
|
-
store_id?: string;
|
|
1691
|
-
key?: string;
|
|
1692
|
-
description?: string;
|
|
1693
|
-
audience_ids?: string[];
|
|
1694
|
-
blocks?: any[];
|
|
1695
|
-
taxonomies?: any[];
|
|
1696
|
-
variants?: any[];
|
|
1697
|
-
status?: string;
|
|
1698
|
-
[key: string]: any;
|
|
1699
|
-
}
|
|
1700
|
-
interface GetProductParams {
|
|
1701
|
-
id?: string;
|
|
1702
|
-
slug?: string;
|
|
1703
|
-
store_id?: string;
|
|
1704
|
-
}
|
|
1705
|
-
interface GetOrderParams {
|
|
1706
|
-
id: string;
|
|
1707
|
-
store_id?: string;
|
|
1708
|
-
}
|
|
1709
|
-
interface GetOrdersParams {
|
|
1710
|
-
store_id?: string;
|
|
1711
|
-
item_statuses?: string[] | null;
|
|
1712
|
-
product_ids?: string[];
|
|
1713
|
-
verified?: boolean;
|
|
1714
|
-
query?: string | null;
|
|
1715
|
-
limit?: number | null;
|
|
1716
|
-
cursor?: string | null;
|
|
1717
|
-
sort_field?: string | null;
|
|
1718
|
-
sort_direction?: string | null;
|
|
1719
|
-
created_at_from?: string | null;
|
|
1720
|
-
created_at_to?: string | null;
|
|
1721
|
-
}
|
|
1722
|
-
interface UpdateOrderParams {
|
|
1723
|
-
id: string;
|
|
1724
|
-
store_id?: string;
|
|
1725
|
-
status: string;
|
|
1726
|
-
blocks: any[];
|
|
1727
|
-
items: any[];
|
|
1728
|
-
address?: any | null;
|
|
1729
|
-
billing_address?: any | null;
|
|
1730
|
-
payment?: Partial<OrderPayment> | null;
|
|
1731
|
-
confirm?: boolean;
|
|
1732
|
-
cancel?: boolean;
|
|
1733
|
-
}
|
|
1734
|
-
interface CreateOrderParams {
|
|
1735
|
-
store_id?: string;
|
|
1736
|
-
[key: string]: any;
|
|
1588
|
+
provider: IntegrationProvider;
|
|
1589
|
+
created_at: number;
|
|
1590
|
+
updated_at: number;
|
|
1737
1591
|
}
|
|
1738
|
-
interface
|
|
1739
|
-
|
|
1740
|
-
|
|
1592
|
+
interface ShippingWeightTier {
|
|
1593
|
+
up_to_grams: number;
|
|
1594
|
+
amount: number;
|
|
1741
1595
|
}
|
|
1742
|
-
interface
|
|
1596
|
+
interface PaymentMethod {
|
|
1743
1597
|
id: string;
|
|
1744
|
-
|
|
1745
|
-
forms?: any;
|
|
1746
|
-
items?: any;
|
|
1747
|
-
payment?: Partial<BookingPayment> | null;
|
|
1748
|
-
[key: string]: any;
|
|
1749
|
-
}
|
|
1750
|
-
interface CreateProviderParams {
|
|
1751
|
-
store_id?: string;
|
|
1752
|
-
key: string;
|
|
1753
|
-
audience_ids?: string[];
|
|
1754
|
-
blocks?: any[];
|
|
1755
|
-
taxonomies?: any[];
|
|
1756
|
-
status?: BookingProviderStatus;
|
|
1757
|
-
[key: string]: any;
|
|
1598
|
+
integration_id?: string;
|
|
1758
1599
|
}
|
|
1759
|
-
interface
|
|
1600
|
+
interface ShippingMethod {
|
|
1760
1601
|
id: string;
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
[
|
|
1602
|
+
taxable: boolean;
|
|
1603
|
+
eta_text: string;
|
|
1604
|
+
location_id?: string;
|
|
1605
|
+
integration_id?: string;
|
|
1606
|
+
amount: number;
|
|
1607
|
+
free_above?: number;
|
|
1608
|
+
weight_tiers?: ShippingWeightTier[];
|
|
1768
1609
|
}
|
|
1769
|
-
interface
|
|
1610
|
+
interface Location {
|
|
1770
1611
|
id: string;
|
|
1771
|
-
store_id
|
|
1772
|
-
}
|
|
1773
|
-
interface ServiceProviderInput {
|
|
1774
|
-
provider_id: string;
|
|
1775
|
-
store_id?: string;
|
|
1776
|
-
prices?: any[];
|
|
1777
|
-
durations?: any[];
|
|
1778
|
-
working_days: WorkingDay[];
|
|
1779
|
-
specific_dates: SpecificDate[];
|
|
1780
|
-
}
|
|
1781
|
-
interface CreateServiceParams {
|
|
1782
|
-
store_id?: string;
|
|
1612
|
+
store_id: string;
|
|
1783
1613
|
key: string;
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
}
|
|
1789
|
-
interface UpdateServiceParams {
|
|
1790
|
-
id: string;
|
|
1791
|
-
store_id?: string;
|
|
1792
|
-
key?: string;
|
|
1793
|
-
blocks?: any[];
|
|
1794
|
-
taxonomies?: any[];
|
|
1795
|
-
status?: BookingServiceStatus;
|
|
1796
|
-
[key: string]: any;
|
|
1797
|
-
}
|
|
1798
|
-
interface CreateServiceProviderParams {
|
|
1799
|
-
store_id?: string;
|
|
1800
|
-
service_id: string;
|
|
1801
|
-
provider_id: string;
|
|
1802
|
-
working_days: WorkingDay[];
|
|
1803
|
-
specific_dates: SpecificDate[];
|
|
1804
|
-
prices?: any[];
|
|
1805
|
-
durations?: any[];
|
|
1806
|
-
slot_interval: number;
|
|
1807
|
-
min_advance?: number;
|
|
1808
|
-
max_advance?: number;
|
|
1809
|
-
reminders?: number[];
|
|
1810
|
-
}
|
|
1811
|
-
interface UpdateServiceProviderParams {
|
|
1812
|
-
store_id?: string;
|
|
1813
|
-
id: string;
|
|
1814
|
-
working_days: WorkingDay[];
|
|
1815
|
-
specific_dates: SpecificDate[];
|
|
1816
|
-
prices?: any[];
|
|
1817
|
-
durations?: any[];
|
|
1818
|
-
slot_interval: number;
|
|
1819
|
-
min_advance?: number;
|
|
1820
|
-
max_advance?: number;
|
|
1821
|
-
reminders?: number[];
|
|
1822
|
-
}
|
|
1823
|
-
interface DeleteServiceProviderParams {
|
|
1824
|
-
store_id?: string;
|
|
1825
|
-
id: string;
|
|
1826
|
-
}
|
|
1827
|
-
interface FindServiceProvidersParams {
|
|
1828
|
-
store_id?: string;
|
|
1829
|
-
service_id?: string;
|
|
1830
|
-
provider_id?: string;
|
|
1831
|
-
}
|
|
1832
|
-
interface DeleteServiceParams {
|
|
1833
|
-
id: string;
|
|
1834
|
-
store_id?: string;
|
|
1835
|
-
}
|
|
1836
|
-
interface GetServiceParams {
|
|
1837
|
-
id?: string;
|
|
1838
|
-
slug?: string;
|
|
1839
|
-
store_id?: string;
|
|
1840
|
-
}
|
|
1841
|
-
interface GetProvidersParams {
|
|
1842
|
-
store_id?: string;
|
|
1843
|
-
service_id?: string;
|
|
1844
|
-
taxonomy_query?: any[];
|
|
1845
|
-
ids?: string[];
|
|
1846
|
-
query?: string | null;
|
|
1847
|
-
statuses?: string[] | null;
|
|
1848
|
-
limit?: number;
|
|
1849
|
-
cursor?: string;
|
|
1850
|
-
sort_field?: string | null;
|
|
1851
|
-
sort_direction?: string | null;
|
|
1852
|
-
created_at_from?: string | null;
|
|
1853
|
-
created_at_to?: string | null;
|
|
1614
|
+
address: Address;
|
|
1615
|
+
is_pickup_location: boolean;
|
|
1616
|
+
created_at: number;
|
|
1617
|
+
updated_at: number;
|
|
1854
1618
|
}
|
|
1855
|
-
interface
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1619
|
+
interface InventoryLevel {
|
|
1620
|
+
location_id: string;
|
|
1621
|
+
available: number;
|
|
1622
|
+
reserved: number;
|
|
1859
1623
|
}
|
|
1860
|
-
interface
|
|
1624
|
+
interface ProductInventory {
|
|
1861
1625
|
id: string;
|
|
1862
|
-
store_id
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
}
|
|
1870
|
-
interface SearchBookingsParams {
|
|
1871
|
-
store_id?: string;
|
|
1872
|
-
query?: string;
|
|
1873
|
-
service_ids?: string[];
|
|
1874
|
-
provider_ids?: string[];
|
|
1875
|
-
from?: number;
|
|
1876
|
-
to?: number;
|
|
1877
|
-
item_statuses?: string[];
|
|
1878
|
-
verified?: boolean;
|
|
1879
|
-
limit?: number;
|
|
1880
|
-
cursor?: string;
|
|
1881
|
-
sort_field?: string;
|
|
1882
|
-
sort_order?: string;
|
|
1626
|
+
store_id: string;
|
|
1627
|
+
product_id: string;
|
|
1628
|
+
variant_id: string;
|
|
1629
|
+
location_id: string;
|
|
1630
|
+
available: number;
|
|
1631
|
+
reserved: number;
|
|
1632
|
+
updated_at: number;
|
|
1883
1633
|
}
|
|
1884
|
-
interface
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1634
|
+
interface ProductVariant {
|
|
1635
|
+
id: string;
|
|
1636
|
+
sku?: string;
|
|
1637
|
+
prices: Price[];
|
|
1638
|
+
inventory: ProductInventory[];
|
|
1639
|
+
attributes: Block[];
|
|
1640
|
+
weight?: number;
|
|
1888
1641
|
}
|
|
1889
|
-
interface
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1642
|
+
interface Product {
|
|
1643
|
+
id: string;
|
|
1644
|
+
store_id: string;
|
|
1645
|
+
key: string;
|
|
1646
|
+
slug: Record<string, string>;
|
|
1647
|
+
blocks: Block[];
|
|
1648
|
+
taxonomies: TaxonomyEntry[];
|
|
1649
|
+
variants: ProductVariant[];
|
|
1650
|
+
status: ProductStatus;
|
|
1651
|
+
created_at: number;
|
|
1652
|
+
updated_at: number;
|
|
1894
1653
|
}
|
|
1895
|
-
interface
|
|
1654
|
+
interface GalleryItem {
|
|
1655
|
+
id: string;
|
|
1656
|
+
url: string;
|
|
1657
|
+
alt?: string;
|
|
1658
|
+
caption?: string;
|
|
1896
1659
|
}
|
|
1897
|
-
interface
|
|
1898
|
-
|
|
1660
|
+
interface OrderItemSnapshot {
|
|
1661
|
+
product_key: string;
|
|
1662
|
+
variant_sku?: string;
|
|
1663
|
+
variant_attributes: Block[];
|
|
1664
|
+
price: Price;
|
|
1899
1665
|
}
|
|
1900
|
-
interface
|
|
1901
|
-
|
|
1666
|
+
interface OrderItem {
|
|
1667
|
+
id: string;
|
|
1668
|
+
product_id: string;
|
|
1669
|
+
variant_id: string;
|
|
1670
|
+
quantity: number;
|
|
1671
|
+
location_id?: string;
|
|
1672
|
+
snapshot: OrderItemSnapshot;
|
|
1673
|
+
status: OrderItemStatus;
|
|
1902
1674
|
}
|
|
1903
|
-
interface
|
|
1904
|
-
|
|
1675
|
+
interface HistoryEntry {
|
|
1676
|
+
action: string;
|
|
1677
|
+
reason?: string;
|
|
1678
|
+
timestamp: number;
|
|
1679
|
+
}
|
|
1680
|
+
interface Order {
|
|
1681
|
+
id: string;
|
|
1682
|
+
number: string;
|
|
1905
1683
|
store_id: string;
|
|
1906
|
-
|
|
1907
|
-
|
|
1684
|
+
customer_id: string;
|
|
1685
|
+
verified: boolean;
|
|
1686
|
+
items: OrderItem[];
|
|
1687
|
+
payment: OrderPayment;
|
|
1688
|
+
shipping_address?: Address;
|
|
1689
|
+
billing_address?: Address;
|
|
1690
|
+
forms: FormEntry[];
|
|
1691
|
+
shipments: Shipment[];
|
|
1692
|
+
history: HistoryEntry[];
|
|
1908
1693
|
audience_id?: string;
|
|
1909
|
-
|
|
1694
|
+
created_at: number;
|
|
1695
|
+
updated_at: number;
|
|
1910
1696
|
}
|
|
1911
|
-
interface
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
sort_direction?: "asc" | "desc";
|
|
1921
|
-
created_at_from?: number;
|
|
1922
|
-
created_at_to?: number;
|
|
1697
|
+
interface Zone {
|
|
1698
|
+
id: string;
|
|
1699
|
+
store_id: string;
|
|
1700
|
+
market_id: string;
|
|
1701
|
+
countries: string[];
|
|
1702
|
+
states: string[];
|
|
1703
|
+
postal_codes: string[];
|
|
1704
|
+
tax_bps: number;
|
|
1705
|
+
shipping_methods: ShippingMethod[];
|
|
1923
1706
|
}
|
|
1924
|
-
interface
|
|
1925
|
-
|
|
1707
|
+
interface Market {
|
|
1708
|
+
id: string;
|
|
1709
|
+
store_id: string;
|
|
1926
1710
|
key: string;
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1711
|
+
currency: string;
|
|
1712
|
+
tax_mode: "exclusive" | "inclusive";
|
|
1713
|
+
payment_methods: PaymentMethod[];
|
|
1714
|
+
zones: Zone[];
|
|
1715
|
+
created_at: number;
|
|
1716
|
+
updated_at: number;
|
|
1933
1717
|
}
|
|
1934
|
-
interface
|
|
1718
|
+
interface Language {
|
|
1935
1719
|
id: string;
|
|
1936
|
-
store_id?: string;
|
|
1937
|
-
key?: string;
|
|
1938
|
-
subject?: Record<string, string>;
|
|
1939
|
-
body?: string;
|
|
1940
|
-
from_name?: string;
|
|
1941
|
-
from_email?: string;
|
|
1942
|
-
reply_to?: string;
|
|
1943
|
-
preheader?: string;
|
|
1944
|
-
status?: string;
|
|
1945
|
-
}
|
|
1946
|
-
interface GetEmailTemplateParams {
|
|
1947
|
-
id?: string;
|
|
1948
|
-
key?: string;
|
|
1949
|
-
store_id?: string;
|
|
1950
1720
|
}
|
|
1951
|
-
interface
|
|
1952
|
-
|
|
1953
|
-
|
|
1721
|
+
interface StoreEmails {
|
|
1722
|
+
billing: string;
|
|
1723
|
+
support: string;
|
|
1954
1724
|
}
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
query?: string;
|
|
1725
|
+
type WebhookEventSubscription = {
|
|
1726
|
+
event: 'node.created';
|
|
1727
|
+
parent_id?: string;
|
|
1728
|
+
} | {
|
|
1729
|
+
event: 'node.updated';
|
|
1961
1730
|
key?: string;
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
}
|
|
1968
|
-
|
|
1969
|
-
|
|
1731
|
+
} | {
|
|
1732
|
+
event: 'node.deleted';
|
|
1733
|
+
key?: string;
|
|
1734
|
+
} | {
|
|
1735
|
+
event: 'order.created';
|
|
1736
|
+
} | {
|
|
1737
|
+
event: 'order.updated';
|
|
1738
|
+
} | {
|
|
1739
|
+
event: 'order.confirmed';
|
|
1740
|
+
} | {
|
|
1741
|
+
event: 'order.payment_received';
|
|
1742
|
+
} | {
|
|
1743
|
+
event: 'order.payment_failed';
|
|
1744
|
+
} | {
|
|
1745
|
+
event: 'order.refunded';
|
|
1746
|
+
} | {
|
|
1747
|
+
event: 'order.cancelled';
|
|
1748
|
+
} | {
|
|
1749
|
+
event: 'order.shipment_created';
|
|
1750
|
+
} | {
|
|
1751
|
+
event: 'order.shipment_in_transit';
|
|
1752
|
+
} | {
|
|
1753
|
+
event: 'order.shipment_out_for_delivery';
|
|
1754
|
+
} | {
|
|
1755
|
+
event: 'order.shipment_delivered';
|
|
1756
|
+
} | {
|
|
1757
|
+
event: 'order.shipment_failed';
|
|
1758
|
+
} | {
|
|
1759
|
+
event: 'order.shipment_returned';
|
|
1760
|
+
} | {
|
|
1761
|
+
event: 'order.shipment_status_changed';
|
|
1762
|
+
} | {
|
|
1763
|
+
event: 'booking.created';
|
|
1764
|
+
} | {
|
|
1765
|
+
event: 'booking.updated';
|
|
1766
|
+
} | {
|
|
1767
|
+
event: 'booking.payment_received';
|
|
1768
|
+
} | {
|
|
1769
|
+
event: 'booking.payment_failed';
|
|
1770
|
+
} | {
|
|
1771
|
+
event: 'booking.refunded';
|
|
1772
|
+
} | {
|
|
1773
|
+
event: 'booking.cancelled';
|
|
1774
|
+
} | {
|
|
1775
|
+
event: 'booking.item_cancelled';
|
|
1776
|
+
} | {
|
|
1777
|
+
event: 'booking.reminder';
|
|
1778
|
+
} | {
|
|
1779
|
+
event: 'product.created';
|
|
1780
|
+
} | {
|
|
1781
|
+
event: 'product.updated';
|
|
1782
|
+
} | {
|
|
1783
|
+
event: 'product.deleted';
|
|
1784
|
+
} | {
|
|
1785
|
+
event: 'provider.created';
|
|
1786
|
+
} | {
|
|
1787
|
+
event: 'provider.updated';
|
|
1788
|
+
} | {
|
|
1789
|
+
event: 'provider.deleted';
|
|
1790
|
+
} | {
|
|
1791
|
+
event: 'service.created';
|
|
1792
|
+
} | {
|
|
1793
|
+
event: 'service.updated';
|
|
1794
|
+
} | {
|
|
1795
|
+
event: 'service.deleted';
|
|
1796
|
+
} | {
|
|
1797
|
+
event: 'media.created';
|
|
1798
|
+
} | {
|
|
1799
|
+
event: 'media.deleted';
|
|
1800
|
+
} | {
|
|
1801
|
+
event: 'store.created';
|
|
1802
|
+
} | {
|
|
1803
|
+
event: 'store.updated';
|
|
1804
|
+
} | {
|
|
1805
|
+
event: 'store.deleted';
|
|
1806
|
+
} | {
|
|
1807
|
+
event: 'audience.created';
|
|
1808
|
+
} | {
|
|
1809
|
+
event: 'audience.updated';
|
|
1810
|
+
} | {
|
|
1811
|
+
event: 'audience.deleted';
|
|
1812
|
+
};
|
|
1813
|
+
interface Webhook {
|
|
1814
|
+
id: string;
|
|
1815
|
+
store_id: string;
|
|
1970
1816
|
key: string;
|
|
1971
|
-
|
|
1817
|
+
url: string;
|
|
1818
|
+
events: WebhookEventSubscription[];
|
|
1819
|
+
headers: Record<string, string>;
|
|
1820
|
+
secret: string;
|
|
1821
|
+
enabled: boolean;
|
|
1822
|
+
created_at: number;
|
|
1823
|
+
updated_at: number;
|
|
1972
1824
|
}
|
|
1973
|
-
|
|
1825
|
+
type StoreSubscriptionStatus = 'pending' | 'active' | 'cancellation_scheduled' | 'cancelled' | 'expired';
|
|
1826
|
+
type StoreSubscriptionSource = 'signup' | 'admin' | 'import';
|
|
1827
|
+
type StoreSubscriptionProvider = {
|
|
1828
|
+
type: 'stripe';
|
|
1829
|
+
customer_id: string;
|
|
1830
|
+
subscription_id?: string;
|
|
1831
|
+
price_id?: string;
|
|
1832
|
+
};
|
|
1833
|
+
interface StoreSubscriptionPayment {
|
|
1834
|
+
currency: string;
|
|
1835
|
+
market: string;
|
|
1836
|
+
provider?: StoreSubscriptionProvider;
|
|
1837
|
+
}
|
|
1838
|
+
interface StoreSubscription {
|
|
1974
1839
|
id: string;
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1840
|
+
target: string;
|
|
1841
|
+
plan_id: string;
|
|
1842
|
+
pending_plan_id: string | null;
|
|
1843
|
+
payment: StoreSubscriptionPayment;
|
|
1844
|
+
status: StoreSubscriptionStatus;
|
|
1845
|
+
start_date: number;
|
|
1846
|
+
end_date: number;
|
|
1847
|
+
token: string;
|
|
1848
|
+
source: StoreSubscriptionSource;
|
|
1979
1849
|
}
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1850
|
+
type AudienceSubscriptionStatus = 'pending' | 'active' | 'cancellation_scheduled' | 'cancelled' | 'expired';
|
|
1851
|
+
type AudienceSubscriptionSource = 'signup' | 'admin' | 'import';
|
|
1852
|
+
type AudienceSubscriptionProvider = {
|
|
1853
|
+
type: 'stripe';
|
|
1854
|
+
customer_id: string;
|
|
1855
|
+
subscription_id?: string;
|
|
1856
|
+
price_id?: string;
|
|
1857
|
+
};
|
|
1858
|
+
interface AudienceSubscriptionPayment {
|
|
1859
|
+
currency: string;
|
|
1860
|
+
market: string;
|
|
1861
|
+
provider?: AudienceSubscriptionProvider;
|
|
1984
1862
|
}
|
|
1985
|
-
interface
|
|
1863
|
+
interface AudienceSubscription {
|
|
1986
1864
|
id: string;
|
|
1987
|
-
store_id
|
|
1865
|
+
store_id: string;
|
|
1866
|
+
customer_id: string;
|
|
1867
|
+
audience_id: string;
|
|
1868
|
+
plan_id: string;
|
|
1869
|
+
pending_plan_id: string | null;
|
|
1870
|
+
payment: AudienceSubscriptionPayment;
|
|
1871
|
+
status: AudienceSubscriptionStatus;
|
|
1872
|
+
start_date: number;
|
|
1873
|
+
end_date: number;
|
|
1874
|
+
token: string;
|
|
1875
|
+
source: AudienceSubscriptionSource;
|
|
1876
|
+
created_at: number;
|
|
1877
|
+
updated_at: number;
|
|
1988
1878
|
}
|
|
1989
|
-
interface
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1879
|
+
interface Store {
|
|
1880
|
+
id: string;
|
|
1881
|
+
key: string;
|
|
1882
|
+
timezone: string;
|
|
1883
|
+
languages?: Language[];
|
|
1884
|
+
emails?: StoreEmails;
|
|
1885
|
+
subscription?: StoreSubscription;
|
|
1886
|
+
counts?: Record<string, number>;
|
|
1993
1887
|
}
|
|
1994
|
-
interface
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
sort_direction?: "asc" | "desc";
|
|
2002
|
-
created_at_from?: number;
|
|
2003
|
-
created_at_to?: number;
|
|
1888
|
+
interface EshopStoreState {
|
|
1889
|
+
store_id: string;
|
|
1890
|
+
selected_shipping_method_id: string | null;
|
|
1891
|
+
user_token: string | null;
|
|
1892
|
+
processing_checkout: boolean;
|
|
1893
|
+
loading: boolean;
|
|
1894
|
+
error: string | null;
|
|
2004
1895
|
}
|
|
2005
|
-
interface
|
|
1896
|
+
interface Block {
|
|
2006
1897
|
id: string;
|
|
2007
|
-
|
|
2008
|
-
|
|
1898
|
+
key: string;
|
|
1899
|
+
type: string;
|
|
1900
|
+
properties?: any;
|
|
1901
|
+
value?: any;
|
|
2009
1902
|
}
|
|
2010
|
-
|
|
1903
|
+
type TaxonomySchemaType = "text" | "number" | "boolean" | "geo_location";
|
|
1904
|
+
interface TaxonomySchema {
|
|
2011
1905
|
id: string;
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
1906
|
+
key: string;
|
|
1907
|
+
type: TaxonomySchemaType;
|
|
1908
|
+
value?: string[];
|
|
1909
|
+
min?: number | null;
|
|
1910
|
+
max?: number | null;
|
|
2015
1911
|
}
|
|
2016
|
-
interface
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
ids?: string[];
|
|
2022
|
-
query?: string;
|
|
2023
|
-
key?: string;
|
|
2024
|
-
status?: string;
|
|
2025
|
-
sort_field?: string;
|
|
2026
|
-
sort_direction?: "asc" | "desc";
|
|
2027
|
-
created_at_from?: number;
|
|
2028
|
-
created_at_to?: number;
|
|
1912
|
+
interface TaxonomyField {
|
|
1913
|
+
id: string;
|
|
1914
|
+
key: string;
|
|
1915
|
+
type: TaxonomySchemaType;
|
|
1916
|
+
value: any;
|
|
2029
1917
|
}
|
|
2030
|
-
interface
|
|
2031
|
-
store_id?: string;
|
|
1918
|
+
interface TaxonomyFieldQuery {
|
|
2032
1919
|
key: string;
|
|
2033
|
-
|
|
2034
|
-
|
|
1920
|
+
type: TaxonomySchemaType;
|
|
1921
|
+
operation?: string;
|
|
1922
|
+
value: any;
|
|
1923
|
+
center?: {
|
|
1924
|
+
lat: number;
|
|
1925
|
+
lon: number;
|
|
1926
|
+
};
|
|
1927
|
+
radius?: number;
|
|
2035
1928
|
}
|
|
2036
|
-
interface
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
key?: string;
|
|
2040
|
-
parent_id?: string | null;
|
|
2041
|
-
schema?: any[];
|
|
2042
|
-
status?: string;
|
|
1929
|
+
interface TaxonomyEntry {
|
|
1930
|
+
taxonomy_id: string;
|
|
1931
|
+
fields: TaxonomyField[];
|
|
2043
1932
|
}
|
|
2044
|
-
interface
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
store_id?: string;
|
|
1933
|
+
interface TaxonomyQuery {
|
|
1934
|
+
taxonomy_id: string;
|
|
1935
|
+
query: TaxonomyFieldQuery[];
|
|
2048
1936
|
}
|
|
2049
|
-
|
|
1937
|
+
type FormSchemaType = "text" | "number" | "boolean" | "date" | "geo_location" | "select";
|
|
1938
|
+
interface FormSchema {
|
|
2050
1939
|
id: string;
|
|
2051
|
-
|
|
1940
|
+
key: string;
|
|
1941
|
+
type: FormSchemaType;
|
|
1942
|
+
required?: boolean;
|
|
1943
|
+
min?: number | null;
|
|
1944
|
+
max?: number | null;
|
|
1945
|
+
options?: string[];
|
|
2052
1946
|
}
|
|
2053
|
-
|
|
1947
|
+
type FormFieldType = "text" | "number" | "boolean" | "date" | "geo_location" | "select";
|
|
1948
|
+
interface FormField {
|
|
2054
1949
|
id: string;
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
}
|
|
2059
|
-
interface LogoutParams {
|
|
1950
|
+
key: string;
|
|
1951
|
+
type: FormFieldType;
|
|
1952
|
+
value?: any;
|
|
2060
1953
|
}
|
|
2061
|
-
interface
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
cursor?: string;
|
|
2065
|
-
sort_field?: string;
|
|
2066
|
-
sort_direction?: "asc" | "desc";
|
|
1954
|
+
interface FormEntry {
|
|
1955
|
+
form_id: string;
|
|
1956
|
+
fields: FormField[];
|
|
2067
1957
|
}
|
|
2068
|
-
|
|
1958
|
+
type BlockType = "text" | "localized_text" | "number" | "boolean" | "list" | "map" | "relationship_entry" | "relationship_media" | "markdown" | "geo_location";
|
|
1959
|
+
interface GeoLocationBlockProperties {
|
|
2069
1960
|
}
|
|
2070
|
-
|
|
2071
|
-
|
|
1961
|
+
type GeoLocationValue = GeoLocation;
|
|
1962
|
+
interface GeoLocationBlock extends Block {
|
|
1963
|
+
type: "geo_location";
|
|
1964
|
+
properties: GeoLocationBlockProperties;
|
|
1965
|
+
value: GeoLocation | null;
|
|
2072
1966
|
}
|
|
2073
|
-
|
|
1967
|
+
type Access = 'public' | 'private';
|
|
1968
|
+
interface MediaResolution {
|
|
2074
1969
|
id: string;
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
ids?: string[];
|
|
2078
|
-
query?: string;
|
|
2079
|
-
mime_type?: string;
|
|
2080
|
-
sort_field?: string;
|
|
2081
|
-
sort_direction?: 'asc' | 'desc';
|
|
1970
|
+
size: string;
|
|
1971
|
+
url: string;
|
|
2082
1972
|
}
|
|
2083
|
-
interface
|
|
1973
|
+
interface Media {
|
|
2084
1974
|
id: string;
|
|
2085
|
-
|
|
1975
|
+
resolutions: {
|
|
1976
|
+
[key: string]: MediaResolution;
|
|
1977
|
+
};
|
|
1978
|
+
mime_type: string;
|
|
1979
|
+
title?: string | null;
|
|
1980
|
+
description?: string | null;
|
|
1981
|
+
alt?: string | null;
|
|
1982
|
+
entity: string;
|
|
1983
|
+
metadata?: string | null;
|
|
1984
|
+
created_at: number;
|
|
1985
|
+
slug: Record<string, string>;
|
|
2086
1986
|
}
|
|
2087
|
-
interface
|
|
2088
|
-
|
|
1987
|
+
interface ApiResponse<T> {
|
|
1988
|
+
success: boolean;
|
|
1989
|
+
data?: T;
|
|
1990
|
+
error?: string;
|
|
1991
|
+
cursor?: string;
|
|
1992
|
+
total?: number;
|
|
2089
1993
|
}
|
|
2090
|
-
interface
|
|
2091
|
-
|
|
1994
|
+
interface PaginatedResponse<T> {
|
|
1995
|
+
data: T[];
|
|
1996
|
+
meta?: {
|
|
1997
|
+
total: number;
|
|
1998
|
+
page: number;
|
|
1999
|
+
per_page: number;
|
|
2000
|
+
};
|
|
2001
|
+
}
|
|
2002
|
+
interface BookingStoreState {
|
|
2003
|
+
current_step: number;
|
|
2004
|
+
total_steps: number;
|
|
2005
|
+
steps: Record<number, {
|
|
2006
|
+
name: string;
|
|
2007
|
+
label_key: string;
|
|
2008
|
+
}>;
|
|
2009
|
+
weekdays: string[];
|
|
2010
|
+
month_year: string;
|
|
2011
|
+
days: any[];
|
|
2012
|
+
current: Date;
|
|
2013
|
+
selected_date: string | null;
|
|
2014
|
+
slots: any[];
|
|
2015
|
+
selected_slot: any | null;
|
|
2016
|
+
selected_provider: any | null;
|
|
2017
|
+
providers: any[];
|
|
2018
|
+
loading: boolean;
|
|
2019
|
+
start_date: string | null;
|
|
2020
|
+
end_date: string | null;
|
|
2021
|
+
guest_token: string | null;
|
|
2022
|
+
service: any | null;
|
|
2023
|
+
store: Store | null;
|
|
2024
|
+
currency: string;
|
|
2025
|
+
booking_forms: FormEntry[];
|
|
2026
|
+
api_url: string;
|
|
2027
|
+
store_id: string;
|
|
2028
|
+
timezone: string;
|
|
2029
|
+
tz_groups: any;
|
|
2030
|
+
items: BookingCartItem[];
|
|
2031
|
+
allowed_payment_methods: string[];
|
|
2032
|
+
payment_config: {
|
|
2033
|
+
provider: {
|
|
2034
|
+
publishable_key: string;
|
|
2035
|
+
currency: string;
|
|
2036
|
+
} | null;
|
|
2037
|
+
enabled: boolean;
|
|
2038
|
+
};
|
|
2039
|
+
}
|
|
2040
|
+
type BookingServiceStatus = 'active' | 'draft' | 'archived';
|
|
2041
|
+
type BookingProviderStatus = 'active' | 'draft' | 'archived';
|
|
2042
|
+
type ProductStatus = 'active' | 'draft' | 'archived';
|
|
2043
|
+
type CustomerStatus = 'active' | 'draft' | 'archived';
|
|
2044
|
+
type AudienceStatus = 'active' | 'draft' | 'archived';
|
|
2045
|
+
type AgentChatStatus = 'active' | 'draft' | 'archived';
|
|
2046
|
+
type WorkflowStatus = 'active' | 'draft' | 'archived';
|
|
2047
|
+
type PromoCodeStatus = 'active' | 'draft' | 'archived';
|
|
2048
|
+
type NodeStatus = 'active' | 'draft' | 'archived';
|
|
2049
|
+
type EmailTemplateStatus = 'active' | 'draft' | 'archived';
|
|
2050
|
+
type FormStatus = 'active' | 'draft' | 'archived';
|
|
2051
|
+
type TaxonomyStatus = 'active' | 'draft' | 'archived';
|
|
2052
|
+
type BookingCancellationReason = 'admin_rejected' | 'customer_cancelled' | 'payment_failed' | 'expired' | 'other';
|
|
2053
|
+
type OrderCancellationReason = 'admin_rejected' | 'customer_cancelled' | 'payment_failed' | 'expired' | 'other';
|
|
2054
|
+
type BookingItemStatus = {
|
|
2055
|
+
status: 'pending';
|
|
2056
|
+
expires_at: number;
|
|
2057
|
+
} | {
|
|
2058
|
+
status: 'confirmed';
|
|
2059
|
+
} | {
|
|
2060
|
+
status: 'cancelled';
|
|
2061
|
+
reason: BookingCancellationReason;
|
|
2062
|
+
};
|
|
2063
|
+
type OrderItemStatus = {
|
|
2064
|
+
status: 'pending';
|
|
2065
|
+
expires_at: number;
|
|
2066
|
+
} | {
|
|
2067
|
+
status: 'confirmed';
|
|
2068
|
+
} | {
|
|
2069
|
+
status: 'cancelled';
|
|
2070
|
+
reason: OrderCancellationReason;
|
|
2071
|
+
};
|
|
2072
|
+
type BookingPaymentStatus = {
|
|
2073
|
+
status: 'pending';
|
|
2074
|
+
at: number;
|
|
2075
|
+
} | {
|
|
2076
|
+
status: 'authorized';
|
|
2077
|
+
at: number;
|
|
2092
2078
|
amount: number;
|
|
2093
|
-
}
|
|
2094
|
-
|
|
2095
|
-
|
|
2079
|
+
} | {
|
|
2080
|
+
status: 'captured';
|
|
2081
|
+
at: number;
|
|
2096
2082
|
amount: number;
|
|
2097
|
-
}
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
}
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2083
|
+
} | {
|
|
2084
|
+
status: 'failed';
|
|
2085
|
+
at: number;
|
|
2086
|
+
reason?: string;
|
|
2087
|
+
};
|
|
2088
|
+
type OrderPaymentStatus = {
|
|
2089
|
+
status: 'pending';
|
|
2090
|
+
at: number;
|
|
2091
|
+
} | {
|
|
2092
|
+
status: 'authorized';
|
|
2093
|
+
at: number;
|
|
2094
|
+
amount: number;
|
|
2095
|
+
} | {
|
|
2096
|
+
status: 'captured';
|
|
2097
|
+
at: number;
|
|
2098
|
+
amount: number;
|
|
2099
|
+
} | {
|
|
2100
|
+
status: 'failed';
|
|
2101
|
+
at: number;
|
|
2102
|
+
reason?: string;
|
|
2103
|
+
};
|
|
2104
|
+
interface BookingItemSnapshot {
|
|
2105
|
+
service_key: string;
|
|
2117
2106
|
provider_key: string;
|
|
2118
|
-
|
|
2107
|
+
price: Price;
|
|
2119
2108
|
}
|
|
2120
|
-
interface
|
|
2109
|
+
interface TimeRange {
|
|
2121
2110
|
from: number;
|
|
2122
2111
|
to: number;
|
|
2123
|
-
providers: ProviderAvailability[];
|
|
2124
2112
|
}
|
|
2125
|
-
interface
|
|
2113
|
+
interface BookingItem {
|
|
2126
2114
|
id: string;
|
|
2127
2115
|
service_id: string;
|
|
2128
2116
|
provider_id: string;
|
|
2117
|
+
store_id: string;
|
|
2118
|
+
booking_id: string;
|
|
2129
2119
|
from: number;
|
|
2130
2120
|
to: number;
|
|
2131
|
-
|
|
2132
|
-
|
|
2121
|
+
forms: FormEntry[];
|
|
2122
|
+
snapshot: BookingItemSnapshot;
|
|
2123
|
+
status: BookingItemStatus;
|
|
2133
2124
|
}
|
|
2134
|
-
interface
|
|
2135
|
-
|
|
2125
|
+
interface Booking {
|
|
2126
|
+
id: string;
|
|
2127
|
+
number: string;
|
|
2128
|
+
customer_id: string;
|
|
2129
|
+
verified: boolean;
|
|
2130
|
+
forms: FormEntry[];
|
|
2131
|
+
store_id: string;
|
|
2132
|
+
service_ids: string[];
|
|
2133
|
+
provider_ids: string[];
|
|
2134
|
+
payment: BookingPayment;
|
|
2135
|
+
store?: Store;
|
|
2136
|
+
account?: any;
|
|
2137
|
+
items: BookingItem[];
|
|
2138
|
+
audience_id?: string;
|
|
2139
|
+
history?: {
|
|
2140
|
+
action: string;
|
|
2141
|
+
reason?: string;
|
|
2142
|
+
timestamp: number;
|
|
2143
|
+
}[];
|
|
2144
|
+
fired_reminders: number[];
|
|
2145
|
+
created_at: number;
|
|
2146
|
+
last_modified: number;
|
|
2147
|
+
}
|
|
2148
|
+
interface Node {
|
|
2149
|
+
id: string;
|
|
2136
2150
|
key: string;
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2151
|
+
store_id: string;
|
|
2152
|
+
parent_id?: string | null;
|
|
2153
|
+
blocks: Block[];
|
|
2154
|
+
taxonomies: TaxonomyEntry[];
|
|
2155
|
+
status: NodeStatus;
|
|
2156
|
+
slug: Record<string, string>;
|
|
2157
|
+
children: Node[];
|
|
2158
|
+
created_at: number;
|
|
2159
|
+
updated_at: number;
|
|
2141
2160
|
}
|
|
2142
|
-
interface
|
|
2161
|
+
interface EmailTemplate {
|
|
2143
2162
|
id: string;
|
|
2144
|
-
store_id?: string;
|
|
2145
2163
|
key: string;
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2164
|
+
store_id: string;
|
|
2165
|
+
subject: Record<string, string>;
|
|
2166
|
+
body: string;
|
|
2167
|
+
from_name: string;
|
|
2168
|
+
from_email: string;
|
|
2169
|
+
reply_to?: string;
|
|
2170
|
+
preheader?: string;
|
|
2171
|
+
status: EmailTemplateStatus;
|
|
2172
|
+
created_at: number;
|
|
2173
|
+
updated_at: number;
|
|
2150
2174
|
}
|
|
2151
|
-
interface
|
|
2175
|
+
interface Form {
|
|
2152
2176
|
id: string;
|
|
2153
|
-
|
|
2177
|
+
key: string;
|
|
2178
|
+
store_id: string;
|
|
2179
|
+
schema: FormSchema[];
|
|
2180
|
+
status: FormStatus;
|
|
2181
|
+
created_at: number;
|
|
2182
|
+
updated_at: number;
|
|
2154
2183
|
}
|
|
2155
|
-
interface
|
|
2184
|
+
interface FormSubmission {
|
|
2156
2185
|
id: string;
|
|
2157
|
-
|
|
2186
|
+
form_id: string;
|
|
2187
|
+
store_id: string;
|
|
2188
|
+
fields: FormField[];
|
|
2189
|
+
created_at: number;
|
|
2158
2190
|
}
|
|
2159
|
-
interface
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
created_at_from?: number;
|
|
2169
|
-
created_at_to?: number;
|
|
2191
|
+
interface Taxonomy {
|
|
2192
|
+
id: string;
|
|
2193
|
+
key: string;
|
|
2194
|
+
store_id: string;
|
|
2195
|
+
parent_id?: string | null;
|
|
2196
|
+
schema?: TaxonomySchema[];
|
|
2197
|
+
status: TaxonomyStatus;
|
|
2198
|
+
created_at: number;
|
|
2199
|
+
updated_at: number;
|
|
2170
2200
|
}
|
|
2171
|
-
interface
|
|
2172
|
-
|
|
2173
|
-
|
|
2201
|
+
interface ServiceDuration {
|
|
2202
|
+
duration: number;
|
|
2203
|
+
is_pause: boolean;
|
|
2174
2204
|
}
|
|
2175
|
-
interface
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
status?: string;
|
|
2179
|
-
limit?: number;
|
|
2180
|
-
cursor?: string;
|
|
2205
|
+
interface WorkingHour {
|
|
2206
|
+
from: number;
|
|
2207
|
+
to: number;
|
|
2181
2208
|
}
|
|
2182
|
-
interface
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
store_id?: string;
|
|
2209
|
+
interface WorkingDay {
|
|
2210
|
+
day: string;
|
|
2211
|
+
working_hours: WorkingHour[];
|
|
2186
2212
|
}
|
|
2187
|
-
interface
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
confirm_template_id?: string;
|
|
2213
|
+
interface SpecificDate {
|
|
2214
|
+
date: number;
|
|
2215
|
+
working_hours: WorkingHour[];
|
|
2191
2216
|
}
|
|
2192
|
-
interface
|
|
2217
|
+
interface ServiceProvider {
|
|
2193
2218
|
id: string;
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2219
|
+
service_id: string;
|
|
2220
|
+
provider_id: string;
|
|
2221
|
+
store_id: string;
|
|
2222
|
+
working_days: WorkingDay[];
|
|
2223
|
+
specific_dates: SpecificDate[];
|
|
2224
|
+
prices: Price[];
|
|
2225
|
+
durations: ServiceDuration[];
|
|
2226
|
+
slot_interval: number;
|
|
2227
|
+
forms: FormEntry[];
|
|
2228
|
+
reminders: number[];
|
|
2229
|
+
min_advance: number;
|
|
2230
|
+
max_advance: number;
|
|
2231
|
+
created_at: number;
|
|
2232
|
+
updated_at: number;
|
|
2197
2233
|
}
|
|
2198
|
-
interface
|
|
2199
|
-
id
|
|
2200
|
-
key
|
|
2234
|
+
interface BookingService {
|
|
2235
|
+
id: string;
|
|
2236
|
+
key: string;
|
|
2237
|
+
slug: Record<string, string>;
|
|
2238
|
+
store_id: string;
|
|
2239
|
+
blocks: Block[];
|
|
2240
|
+
taxonomies: TaxonomyEntry[];
|
|
2241
|
+
created_at: number;
|
|
2242
|
+
updated_at: number;
|
|
2243
|
+
status: BookingServiceStatus;
|
|
2201
2244
|
}
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
limit?: number;
|
|
2207
|
-
cursor?: string;
|
|
2245
|
+
type Service = BookingService;
|
|
2246
|
+
interface ProviderTimelinePoint {
|
|
2247
|
+
timestamp: number;
|
|
2248
|
+
booked: number;
|
|
2208
2249
|
}
|
|
2209
|
-
interface
|
|
2250
|
+
interface BookingProvider {
|
|
2210
2251
|
id: string;
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2252
|
+
key: string;
|
|
2253
|
+
slug: Record<string, string>;
|
|
2254
|
+
store_id: string;
|
|
2255
|
+
status: BookingProviderStatus;
|
|
2256
|
+
blocks: Block[];
|
|
2257
|
+
taxonomies: TaxonomyEntry[];
|
|
2258
|
+
timeline: ProviderTimelinePoint[];
|
|
2259
|
+
created_at: number;
|
|
2260
|
+
updated_at: number;
|
|
2216
2261
|
}
|
|
2217
|
-
|
|
2218
|
-
|
|
2262
|
+
type Provider = BookingProvider;
|
|
2263
|
+
interface WorkflowEdge {
|
|
2264
|
+
source: string;
|
|
2265
|
+
target: string;
|
|
2266
|
+
output: string;
|
|
2267
|
+
back_edge: boolean;
|
|
2219
2268
|
}
|
|
2220
|
-
interface
|
|
2269
|
+
interface Workflow {
|
|
2221
2270
|
id: string;
|
|
2222
|
-
|
|
2223
|
-
|
|
2271
|
+
key: string;
|
|
2272
|
+
store_id: string;
|
|
2273
|
+
secret: string;
|
|
2274
|
+
status: WorkflowStatus;
|
|
2275
|
+
nodes: Record<string, WorkflowNode>;
|
|
2276
|
+
edges: WorkflowEdge[];
|
|
2277
|
+
schedule?: string;
|
|
2278
|
+
created_at: number;
|
|
2279
|
+
updated_at: number;
|
|
2224
2280
|
}
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2281
|
+
type WorkflowNode = WorkflowTriggerNode | WorkflowHttpNode | WorkflowSwitchNode | WorkflowTransformNode | WorkflowLoopNode;
|
|
2282
|
+
interface WorkflowTriggerNode {
|
|
2283
|
+
type: 'trigger';
|
|
2284
|
+
event?: string;
|
|
2285
|
+
delay_ms?: number;
|
|
2286
|
+
schema?: Block[];
|
|
2231
2287
|
}
|
|
2232
|
-
interface
|
|
2233
|
-
|
|
2234
|
-
|
|
2288
|
+
interface WorkflowHttpNode {
|
|
2289
|
+
type: 'http';
|
|
2290
|
+
method: WorkflowHttpMethod;
|
|
2291
|
+
url: string;
|
|
2292
|
+
headers?: Record<string, string>;
|
|
2293
|
+
body?: any;
|
|
2294
|
+
timeout_ms?: number;
|
|
2295
|
+
integration_id?: string;
|
|
2296
|
+
integration_provider_id?: string;
|
|
2297
|
+
delay_ms?: number;
|
|
2298
|
+
retries?: number;
|
|
2299
|
+
retry_delay_ms?: number;
|
|
2235
2300
|
}
|
|
2236
|
-
interface
|
|
2237
|
-
|
|
2238
|
-
customer_id: string;
|
|
2301
|
+
interface WorkflowSwitchRule {
|
|
2302
|
+
condition: string;
|
|
2239
2303
|
}
|
|
2240
|
-
interface
|
|
2241
|
-
|
|
2242
|
-
|
|
2304
|
+
interface WorkflowSwitchNode {
|
|
2305
|
+
type: 'switch';
|
|
2306
|
+
rules: WorkflowSwitchRule[];
|
|
2307
|
+
delay_ms?: number;
|
|
2243
2308
|
}
|
|
2244
|
-
interface
|
|
2245
|
-
|
|
2246
|
-
provider: string;
|
|
2309
|
+
interface WorkflowTransformNode {
|
|
2310
|
+
type: 'transform';
|
|
2247
2311
|
code: string;
|
|
2248
|
-
|
|
2312
|
+
delay_ms?: number;
|
|
2249
2313
|
}
|
|
2250
|
-
interface
|
|
2251
|
-
|
|
2252
|
-
|
|
2314
|
+
interface WorkflowLoopNode {
|
|
2315
|
+
type: 'loop';
|
|
2316
|
+
expression: string;
|
|
2317
|
+
delay_ms?: number;
|
|
2253
2318
|
}
|
|
2254
|
-
|
|
2255
|
-
|
|
2319
|
+
type WorkflowHttpMethod = 'get' | 'post' | 'put' | 'patch' | 'delete';
|
|
2320
|
+
type ExecutionStatus = 'pending' | 'running' | 'completed' | 'failed' | 'cancelled';
|
|
2321
|
+
interface NodeResult {
|
|
2322
|
+
output: any;
|
|
2323
|
+
route: string;
|
|
2324
|
+
started_at: number;
|
|
2325
|
+
completed_at: number;
|
|
2326
|
+
duration_ms: number;
|
|
2327
|
+
error?: string;
|
|
2256
2328
|
}
|
|
2257
|
-
interface
|
|
2258
|
-
store_id: string;
|
|
2329
|
+
interface WorkflowExecution {
|
|
2259
2330
|
id: string;
|
|
2331
|
+
workflow_id: string;
|
|
2332
|
+
store_id: string;
|
|
2333
|
+
status: ExecutionStatus;
|
|
2334
|
+
input: Record<string, any>;
|
|
2335
|
+
results: Record<string, NodeResult>;
|
|
2336
|
+
error?: string;
|
|
2337
|
+
scheduled_at: number;
|
|
2338
|
+
started_at: number;
|
|
2339
|
+
completed_at?: number;
|
|
2340
|
+
created_at: number;
|
|
2341
|
+
updated_at: number;
|
|
2260
2342
|
}
|
|
2261
|
-
|
|
2343
|
+
type AudienceType = {
|
|
2344
|
+
type: 'standard';
|
|
2345
|
+
} | {
|
|
2346
|
+
type: 'confirmation';
|
|
2347
|
+
confirm_template_id: string;
|
|
2348
|
+
} | {
|
|
2349
|
+
type: 'paid';
|
|
2350
|
+
prices: SubscriptionPrice[];
|
|
2351
|
+
payment_integration_id?: string;
|
|
2352
|
+
};
|
|
2353
|
+
interface Audience {
|
|
2354
|
+
id: string;
|
|
2262
2355
|
store_id: string;
|
|
2263
2356
|
key: string;
|
|
2264
|
-
|
|
2357
|
+
status: AudienceStatus;
|
|
2358
|
+
type: AudienceType;
|
|
2265
2359
|
}
|
|
2266
|
-
interface
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
key?: string;
|
|
2270
|
-
provider?: IntegrationProvider;
|
|
2360
|
+
interface AudienceAccessResponse {
|
|
2361
|
+
has_access: boolean;
|
|
2362
|
+
subscription?: AudienceSubscription;
|
|
2271
2363
|
}
|
|
2272
|
-
interface
|
|
2273
|
-
|
|
2364
|
+
interface AudienceSubscribeResponse {
|
|
2365
|
+
checkout_url?: string;
|
|
2366
|
+
subscription?: AudienceSubscription;
|
|
2367
|
+
}
|
|
2368
|
+
type EventAction = {
|
|
2369
|
+
action: 'order_created';
|
|
2370
|
+
} | {
|
|
2371
|
+
action: 'order_updated';
|
|
2372
|
+
} | {
|
|
2373
|
+
action: 'order_confirmed';
|
|
2374
|
+
} | {
|
|
2375
|
+
action: 'order_payment_received';
|
|
2376
|
+
data: {
|
|
2377
|
+
amount: number;
|
|
2378
|
+
currency: string;
|
|
2379
|
+
};
|
|
2380
|
+
} | {
|
|
2381
|
+
action: 'order_payment_failed';
|
|
2382
|
+
data: {
|
|
2383
|
+
reason?: string;
|
|
2384
|
+
};
|
|
2385
|
+
} | {
|
|
2386
|
+
action: 'order_refunded';
|
|
2387
|
+
data: {
|
|
2388
|
+
amount: number;
|
|
2389
|
+
currency: string;
|
|
2390
|
+
reason?: string;
|
|
2391
|
+
};
|
|
2392
|
+
} | {
|
|
2393
|
+
action: 'order_cancelled';
|
|
2394
|
+
data: {
|
|
2395
|
+
reason?: string;
|
|
2396
|
+
};
|
|
2397
|
+
} | {
|
|
2398
|
+
action: 'order_shipment_created';
|
|
2399
|
+
data: {
|
|
2400
|
+
shipment_id: string;
|
|
2401
|
+
};
|
|
2402
|
+
} | {
|
|
2403
|
+
action: 'order_shipment_in_transit';
|
|
2404
|
+
data: {
|
|
2405
|
+
shipment_id: string;
|
|
2406
|
+
};
|
|
2407
|
+
} | {
|
|
2408
|
+
action: 'order_shipment_out_for_delivery';
|
|
2409
|
+
data: {
|
|
2410
|
+
shipment_id: string;
|
|
2411
|
+
};
|
|
2412
|
+
} | {
|
|
2413
|
+
action: 'order_shipment_delivered';
|
|
2414
|
+
data: {
|
|
2415
|
+
shipment_id: string;
|
|
2416
|
+
};
|
|
2417
|
+
} | {
|
|
2418
|
+
action: 'order_shipment_failed';
|
|
2419
|
+
data: {
|
|
2420
|
+
shipment_id: string;
|
|
2421
|
+
reason?: string;
|
|
2422
|
+
};
|
|
2423
|
+
} | {
|
|
2424
|
+
action: 'order_shipment_returned';
|
|
2425
|
+
data: {
|
|
2426
|
+
shipment_id: string;
|
|
2427
|
+
};
|
|
2428
|
+
} | {
|
|
2429
|
+
action: 'order_shipment_status_changed';
|
|
2430
|
+
data: {
|
|
2431
|
+
shipment_id: string;
|
|
2432
|
+
from: string;
|
|
2433
|
+
to: string;
|
|
2434
|
+
};
|
|
2435
|
+
} | {
|
|
2436
|
+
action: 'booking_created';
|
|
2437
|
+
} | {
|
|
2438
|
+
action: 'booking_updated';
|
|
2439
|
+
} | {
|
|
2440
|
+
action: 'booking_payment_received';
|
|
2441
|
+
data: {
|
|
2442
|
+
amount: number;
|
|
2443
|
+
currency: string;
|
|
2444
|
+
};
|
|
2445
|
+
} | {
|
|
2446
|
+
action: 'booking_payment_failed';
|
|
2447
|
+
data: {
|
|
2448
|
+
reason?: string;
|
|
2449
|
+
};
|
|
2450
|
+
} | {
|
|
2451
|
+
action: 'booking_refunded';
|
|
2452
|
+
data: {
|
|
2453
|
+
amount: number;
|
|
2454
|
+
currency: string;
|
|
2455
|
+
reason?: string;
|
|
2456
|
+
};
|
|
2457
|
+
} | {
|
|
2458
|
+
action: 'booking_cancelled';
|
|
2459
|
+
data: {
|
|
2460
|
+
reason?: string;
|
|
2461
|
+
};
|
|
2462
|
+
} | {
|
|
2463
|
+
action: 'booking_item_cancelled';
|
|
2464
|
+
data: {
|
|
2465
|
+
item_id: string;
|
|
2466
|
+
refund_amount: number;
|
|
2467
|
+
};
|
|
2468
|
+
} | {
|
|
2469
|
+
action: 'product_created';
|
|
2470
|
+
} | {
|
|
2471
|
+
action: 'product_updated';
|
|
2472
|
+
} | {
|
|
2473
|
+
action: 'product_deleted';
|
|
2474
|
+
} | {
|
|
2475
|
+
action: 'node_created';
|
|
2476
|
+
} | {
|
|
2477
|
+
action: 'node_updated';
|
|
2478
|
+
} | {
|
|
2479
|
+
action: 'node_deleted';
|
|
2480
|
+
} | {
|
|
2481
|
+
action: 'provider_created';
|
|
2482
|
+
} | {
|
|
2483
|
+
action: 'provider_updated';
|
|
2484
|
+
} | {
|
|
2485
|
+
action: 'provider_deleted';
|
|
2486
|
+
} | {
|
|
2487
|
+
action: 'service_created';
|
|
2488
|
+
} | {
|
|
2489
|
+
action: 'service_updated';
|
|
2490
|
+
} | {
|
|
2491
|
+
action: 'service_deleted';
|
|
2492
|
+
} | {
|
|
2493
|
+
action: 'account_created';
|
|
2494
|
+
} | {
|
|
2495
|
+
action: 'account_updated';
|
|
2496
|
+
} | {
|
|
2497
|
+
action: 'account_deleted';
|
|
2498
|
+
} | {
|
|
2499
|
+
action: 'media_created';
|
|
2500
|
+
} | {
|
|
2501
|
+
action: 'media_deleted';
|
|
2502
|
+
} | {
|
|
2503
|
+
action: 'store_created';
|
|
2504
|
+
} | {
|
|
2505
|
+
action: 'store_updated';
|
|
2506
|
+
} | {
|
|
2507
|
+
action: 'store_deleted';
|
|
2508
|
+
} | {
|
|
2509
|
+
action: 'audience_created';
|
|
2510
|
+
} | {
|
|
2511
|
+
action: 'audience_updated';
|
|
2512
|
+
} | {
|
|
2513
|
+
action: 'audience_deleted';
|
|
2514
|
+
};
|
|
2515
|
+
interface Event {
|
|
2274
2516
|
id: string;
|
|
2517
|
+
entity: string;
|
|
2518
|
+
event: EventAction;
|
|
2519
|
+
actor: string;
|
|
2520
|
+
created_at: number;
|
|
2275
2521
|
}
|
|
2276
|
-
|
|
2277
|
-
|
|
2522
|
+
type ShippingStatus = 'pending' | 'label_created' | 'in_transit' | 'out_for_delivery' | 'delivered' | 'failed' | 'returned';
|
|
2523
|
+
interface OrderShipping {
|
|
2524
|
+
carrier: string;
|
|
2525
|
+
service: string;
|
|
2526
|
+
tracking_number?: string | null;
|
|
2527
|
+
tracking_url?: string | null;
|
|
2528
|
+
label_url?: string | null;
|
|
2529
|
+
status: ShippingStatus;
|
|
2278
2530
|
}
|
|
2279
|
-
interface
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
url: string;
|
|
2283
|
-
events: WebhookEventSubscription[];
|
|
2284
|
-
headers: Record<string, string>;
|
|
2285
|
-
secret: string;
|
|
2286
|
-
enabled: boolean;
|
|
2531
|
+
interface ShipmentLine {
|
|
2532
|
+
order_item_id: string;
|
|
2533
|
+
quantity: number;
|
|
2287
2534
|
}
|
|
2288
|
-
interface
|
|
2289
|
-
store_id: string;
|
|
2535
|
+
interface Shipment {
|
|
2290
2536
|
id: string;
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2537
|
+
location_id: string;
|
|
2538
|
+
lines: ShipmentLine[];
|
|
2539
|
+
carrier?: string | null;
|
|
2540
|
+
service?: string | null;
|
|
2541
|
+
tracking_number?: string | null;
|
|
2542
|
+
tracking_url?: string | null;
|
|
2543
|
+
label_url?: string | null;
|
|
2544
|
+
status: ShippingStatus;
|
|
2545
|
+
created_at: number;
|
|
2546
|
+
updated_at: number;
|
|
2297
2547
|
}
|
|
2298
|
-
interface
|
|
2299
|
-
store_id: string;
|
|
2548
|
+
interface ShippingRate {
|
|
2300
2549
|
id: string;
|
|
2550
|
+
provider: string;
|
|
2551
|
+
carrier: string;
|
|
2552
|
+
service: string;
|
|
2553
|
+
display_name: string;
|
|
2554
|
+
amount: number;
|
|
2555
|
+
currency: string;
|
|
2556
|
+
estimated_days?: number | null;
|
|
2301
2557
|
}
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2558
|
+
type ShippingAddress = Address;
|
|
2559
|
+
interface Parcel {
|
|
2560
|
+
length: number;
|
|
2561
|
+
width: number;
|
|
2562
|
+
height: number;
|
|
2563
|
+
weight: number;
|
|
2564
|
+
distance_unit: 'in' | 'cm';
|
|
2565
|
+
mass_unit: 'oz' | 'lb' | 'g' | 'kg';
|
|
2309
2566
|
}
|
|
2310
|
-
interface
|
|
2311
|
-
|
|
2312
|
-
|
|
2567
|
+
interface PurchaseLabelResult {
|
|
2568
|
+
tracking_number: string;
|
|
2569
|
+
tracking_url?: string | null;
|
|
2570
|
+
label_url: string;
|
|
2313
2571
|
carrier: string;
|
|
2314
2572
|
service: string;
|
|
2315
|
-
location_id: string;
|
|
2316
|
-
lines: ShipmentLine[];
|
|
2317
2573
|
}
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
status?: AgentStatus;
|
|
2324
|
-
model_id: string;
|
|
2325
|
-
channel_ids?: string[];
|
|
2574
|
+
interface ShipResult {
|
|
2575
|
+
shipment_id: string;
|
|
2576
|
+
tracking_number: string;
|
|
2577
|
+
tracking_url?: string | null;
|
|
2578
|
+
label_url: string;
|
|
2326
2579
|
}
|
|
2327
|
-
interface
|
|
2580
|
+
interface CustomsItem {
|
|
2581
|
+
description: string;
|
|
2582
|
+
quantity: number;
|
|
2583
|
+
net_weight: string;
|
|
2584
|
+
mass_unit: string;
|
|
2585
|
+
value_amount: string;
|
|
2586
|
+
value_currency: string;
|
|
2587
|
+
origin_country: string;
|
|
2588
|
+
tariff_number?: string | null;
|
|
2589
|
+
}
|
|
2590
|
+
interface CustomsDeclaration {
|
|
2591
|
+
contents_type: string;
|
|
2592
|
+
contents_explanation?: string | null;
|
|
2593
|
+
non_delivery_option: string;
|
|
2594
|
+
certify: boolean;
|
|
2595
|
+
certify_signer: string;
|
|
2596
|
+
items: CustomsItem[];
|
|
2597
|
+
}
|
|
2598
|
+
interface Agent {
|
|
2328
2599
|
id: string;
|
|
2329
|
-
store_id
|
|
2600
|
+
store_id: string;
|
|
2330
2601
|
key: string;
|
|
2331
2602
|
prompt: string;
|
|
2332
2603
|
status: AgentStatus;
|
|
2333
2604
|
model_id: string;
|
|
2334
|
-
channel_ids
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
id: string;
|
|
2338
|
-
store_id?: string;
|
|
2339
|
-
}
|
|
2340
|
-
interface GetAgentParams {
|
|
2341
|
-
id: string;
|
|
2342
|
-
store_id?: string;
|
|
2343
|
-
}
|
|
2344
|
-
interface GetAgentsParams {
|
|
2345
|
-
store_id?: string;
|
|
2346
|
-
limit?: number;
|
|
2347
|
-
cursor?: string;
|
|
2605
|
+
channel_ids: string[];
|
|
2606
|
+
created_at: number;
|
|
2607
|
+
updated_at: number;
|
|
2348
2608
|
}
|
|
2349
|
-
interface
|
|
2609
|
+
interface AgentChat {
|
|
2350
2610
|
id: string;
|
|
2351
|
-
store_id
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2611
|
+
store_id: string;
|
|
2612
|
+
agent_id: string;
|
|
2613
|
+
account_id: string;
|
|
2614
|
+
status: AgentChatStatus;
|
|
2615
|
+
rating?: number;
|
|
2616
|
+
rating_comment?: string;
|
|
2617
|
+
created_at: number;
|
|
2618
|
+
updated_at: number;
|
|
2355
2619
|
}
|
|
2356
|
-
interface
|
|
2620
|
+
interface AgentChatMessage {
|
|
2357
2621
|
id: string;
|
|
2358
|
-
store_id
|
|
2359
|
-
limit?: number;
|
|
2360
|
-
cursor?: string;
|
|
2361
|
-
}
|
|
2362
|
-
interface GetStoreChatsParams {
|
|
2363
|
-
store_id?: string;
|
|
2622
|
+
store_id: string;
|
|
2364
2623
|
agent_id?: string;
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
sort_field?: string;
|
|
2368
|
-
sort_direction?: 'asc' | 'desc';
|
|
2369
|
-
limit?: number;
|
|
2370
|
-
cursor?: string;
|
|
2371
|
-
}
|
|
2372
|
-
interface GetAgentChatParams {
|
|
2373
|
-
id: string;
|
|
2374
|
-
store_id?: string;
|
|
2375
|
-
chat_id: string;
|
|
2376
|
-
}
|
|
2377
|
-
interface UpdateAgentChatParams {
|
|
2378
|
-
id: string;
|
|
2379
|
-
store_id?: string;
|
|
2380
|
-
chat_id: string;
|
|
2381
|
-
status: 'active' | 'archived';
|
|
2382
|
-
}
|
|
2383
|
-
interface RateAgentChatParams {
|
|
2384
|
-
id: string;
|
|
2385
|
-
store_id?: string;
|
|
2386
|
-
chat_id: string;
|
|
2387
|
-
rating: number;
|
|
2388
|
-
comment?: string;
|
|
2389
|
-
}
|
|
2390
|
-
interface AuthToken {
|
|
2391
|
-
id: string;
|
|
2392
|
-
access_token: string;
|
|
2393
|
-
refresh_token: string;
|
|
2394
|
-
access_expires_at: number;
|
|
2395
|
-
refresh_expires_at: number;
|
|
2624
|
+
chat_id?: string;
|
|
2625
|
+
message: string;
|
|
2396
2626
|
created_at: number;
|
|
2397
|
-
last_used_at: number;
|
|
2398
|
-
is_verified: boolean;
|
|
2399
|
-
}
|
|
2400
|
-
interface CustomerInfo {
|
|
2401
|
-
id: string;
|
|
2402
|
-
verified: boolean;
|
|
2403
2627
|
}
|
|
2404
|
-
interface
|
|
2628
|
+
interface PromoCode {
|
|
2405
2629
|
id: string;
|
|
2406
|
-
|
|
2407
|
-
refresh_token: string;
|
|
2408
|
-
access_expires_at: number;
|
|
2409
|
-
refresh_expires_at: number;
|
|
2410
|
-
created_at: number;
|
|
2411
|
-
last_used_at: number;
|
|
2412
|
-
is_verified: boolean;
|
|
2413
|
-
user_agent?: string | null;
|
|
2414
|
-
}
|
|
2415
|
-
interface CustomerVerificationCode {
|
|
2630
|
+
store_id: string;
|
|
2416
2631
|
code: string;
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
}
|
|
2421
|
-
interface PromoUsage {
|
|
2422
|
-
promo_code_id: string;
|
|
2632
|
+
discounts: Discount[];
|
|
2633
|
+
conditions: Condition[];
|
|
2634
|
+
status: PromoCodeStatus;
|
|
2423
2635
|
uses: number;
|
|
2424
|
-
}
|
|
2425
|
-
interface Customer {
|
|
2426
|
-
id: string;
|
|
2427
|
-
store_id: string;
|
|
2428
|
-
emails: string[];
|
|
2429
|
-
status: 'active' | 'archived';
|
|
2430
|
-
promo_usage: PromoUsage[];
|
|
2431
|
-
blocks: Block[];
|
|
2432
|
-
taxonomies: TaxonomyEntry[];
|
|
2433
|
-
auth_tokens: CustomerAuthToken[];
|
|
2434
|
-
verification_codes: CustomerVerificationCode[];
|
|
2435
|
-
addresses: Address[];
|
|
2436
|
-
audience_subscriptions: any[];
|
|
2437
2636
|
created_at: number;
|
|
2438
2637
|
updated_at: number;
|
|
2439
2638
|
}
|
|
2440
|
-
interface ConnectCustomerParams {
|
|
2441
|
-
email: string;
|
|
2442
|
-
store_id?: string;
|
|
2443
|
-
}
|
|
2444
|
-
interface CreateCustomerParams {
|
|
2445
|
-
store_id?: string;
|
|
2446
|
-
email: string;
|
|
2447
|
-
blocks?: Block[];
|
|
2448
|
-
taxonomies?: TaxonomyEntry[];
|
|
2449
|
-
}
|
|
2450
|
-
interface UpdateCustomerParams {
|
|
2451
|
-
id: string;
|
|
2452
|
-
store_id?: string;
|
|
2453
|
-
emails?: string[];
|
|
2454
|
-
blocks?: Block[];
|
|
2455
|
-
taxonomies?: TaxonomyEntry[];
|
|
2456
|
-
status?: 'active' | 'archived';
|
|
2457
|
-
addresses?: Address[];
|
|
2458
|
-
}
|
|
2459
|
-
interface GetCustomerParams {
|
|
2460
|
-
id: string;
|
|
2461
|
-
store_id?: string;
|
|
2462
|
-
}
|
|
2463
|
-
interface FindCustomersParams {
|
|
2464
|
-
store_id?: string;
|
|
2465
|
-
query?: string;
|
|
2466
|
-
limit?: number;
|
|
2467
|
-
cursor?: string;
|
|
2468
|
-
sort_field?: string;
|
|
2469
|
-
sort_direction?: string;
|
|
2470
|
-
}
|
|
2471
|
-
interface MergeCustomersParams {
|
|
2472
|
-
target_id: string;
|
|
2473
|
-
source_id: string;
|
|
2474
|
-
store_id?: string;
|
|
2475
|
-
}
|
|
2476
2639
|
|
|
2477
|
-
export { type Access, type AddAudienceSubscriberParams, type AddAudienceSubscriberResponse, type Address, type AgentChatStatus, type AgentStatus, type ApiResponse, type Audience, type AudienceAccessResponse, type AudienceStatus, type AudienceSubscribeResponse, type AudienceSubscriber, type AudienceSubscription, type AudienceSubscriptionPayment, type AudienceSubscriptionProvider, type AudienceSubscriptionSource, type AudienceSubscriptionStatus, type AudienceType, type AuthToken, type AvailabilityResponse, type AvailabilitySlot, type Block, type BlockType, type Booking, type BookingCancellationReason, type BookingCartItem, type BookingCheckoutParams, type BookingItem, type BookingItemSnapshot, type BookingItemStatus, type BookingPayment, type BookingPaymentPromoCode, type BookingPaymentProvider, type BookingPaymentRefund, type BookingPaymentStatus, type BookingPaymentTax, type BookingPaymentTaxLine, type BookingProviderStatus, type BookingQuote, type BookingQuoteItem, type BookingServiceStatus, type BookingStoreState, type
|
|
2640
|
+
export { type Access, type AccountAddress, type AccountApiToken, type AddAudienceSubscriberParams, type AddAudienceSubscriberResponse, type Address, type Agent, type AgentChat, type AgentChatMessage, type AgentChatStatus, type AgentStatus, type ApiResponse, type Audience, type AudienceAccessResponse, type AudienceStatus, type AudienceSubscribeResponse, type AudienceSubscriber, type AudienceSubscription, type AudienceSubscriptionPayment, type AudienceSubscriptionProvider, type AudienceSubscriptionSource, type AudienceSubscriptionStatus, type AudienceType, type AuthToken, type AvailabilityResponse, type AvailabilitySlot, type Block, type BlockType, type Booking, type BookingCancellationReason, type BookingCartItem, type BookingCheckoutParams, type BookingCreatePart, type BookingItem, type BookingItemSnapshot, type BookingItemStatus, type BookingPayment, type BookingPaymentPromoCode, type BookingPaymentProvider, type BookingPaymentRefund, type BookingPaymentStatus, type BookingPaymentTax, type BookingPaymentTaxLine, type BookingProvider, type BookingProviderStatus, type BookingQuote, type BookingQuoteItem, type BookingService, type BookingServiceStatus, type BookingStoreState, type BookingUpdateItem, type CancelBookingItemParams, type Condition, type CreateAgentParams, type CreateAudienceParams, type CreateBookingParams, type CreateCustomerParams, type CreateEmailTemplateParams, type CreateFormParams, type CreateIntegrationParams, type CreateLocationParams, type CreateMarketParams, type CreateNodeParams, type CreateOrderParams, type CreatePortalSessionParams, type CreateProductParams, type CreateProductVariantInput, type CreatePromoCodeParams, type CreateProviderParams, type CreateServiceParams, type CreateServiceProviderParams, type CreateStoreParams, type CreateTaxonomyParams, type CreateWebhookParams, type CreateWorkflowParams, type Customer, type CustomerAuthToken, type CustomerDetail, type CustomerInfo, type CustomerStatus, type CustomerVerificationCode, type CustomsDeclaration, type CustomsItem, type DaySlots, type DeleteAccountParams, type DeleteAgentParams, type DeleteAudienceParams, type DeleteEmailTemplateParams, type DeleteFormParams, type DeleteIntegrationParams, type DeleteLocationParams, type DeleteMarketParams, type DeleteNodeParams, type DeleteProductParams, type DeletePromoCodeParams, type DeleteProviderParams, type DeleteServiceParams, type DeleteServiceProviderParams, type DeleteStoreMediaParams, type DeleteStoreParams, type DeleteTaxonomyParams, type DeleteWebhookParams, type DeleteWorkflowParams, type Discount, type EmailTemplate, type EmailTemplateStatus, type EshopCartItem, type EshopItem, type EshopQuoteItem, type EshopStoreState, type Event, type EventAction, type ExecutionStatus, type FindCustomersParams, type FindServiceProvidersParams, type Form, type FormEntry, type FormField, type FormFieldType, type FormSchema, type FormSchemaType, type FormStatus, type FormSubmission, type GalleryItem, type GeoLocation, type GeoLocationBlock, type GeoLocationBlockProperties, type GeoLocationValue, type GetAgentChatParams, type GetAgentChatsParams, type GetAgentParams, type GetAgentsParams, type GetAnalyticsHealthParams, type GetAnalyticsParams, type GetAudienceParams, type GetAudienceSubscribersParams, type GetAudiencesParams, type GetAvailabilityParams, type GetBookingParams, type GetBookingQuoteParams, type GetCustomerParams, type GetDeliveryStatsParams, type GetEmailTemplateParams, type GetEmailTemplatesParams, type GetFormParams, type GetFormSubmissionParams, type GetFormSubmissionsParams, type GetFormsParams, type GetIntegrationParams, type GetMeParams, type GetMediaParams, type GetNodeChildrenParams, type GetNodeParams, type GetNodesParams, type GetOrderParams, type GetOrdersParams, type GetProductParams, type GetProductsParams, type GetPromoCodeParams, type GetPromoCodesParams, type GetProviderParams, type GetProvidersParams, type GetQuoteParams, type GetServiceParams, type GetServicesParams, type GetShippingRatesParams, type GetStoreChatsParams, type GetStoreMediaParams, type GetStoreMediaParams2, type GetStoreParams, type GetStoresParams, type GetSubscriptionPlansParams, type GetTaxonomiesParams, type GetTaxonomyChildrenParams, type GetTaxonomyParams, type GetWorkflowExecutionParams, type GetWorkflowExecutionsParams, type GetWorkflowParams, type GetWorkflowsParams, type HandleInvitationParams, type HistoryEntry, type Integration, type IntegrationProvider, type IntervalPeriod, type InventoryLevel, type InviteUserParams, type Language, type ListIntegrationsParams, type ListWebhooksParams, type Location, type LoginAccountParams, type LogoutParams, type MagicLinkRequestParams, type MagicLinkVerifyParams, type Market, type Media, type MediaResolution, type MergeCustomersParams, type Node, type NodeResult, type NodeStatus, type OAuthConnectParams, type OAuthDisconnectParams, type Order, type OrderCancellationReason, type OrderCheckoutParams, type OrderItem, type OrderItemSnapshot, type OrderItemStatus, type OrderPayment, type OrderPaymentPromoCode, type OrderPaymentProvider, type OrderPaymentRefund, type OrderPaymentStatus, type OrderPaymentTax, type OrderPaymentTaxLine, type OrderQuote, type OrderShipping, type OrderUpdateItem, type PaginatedResponse, type Parcel, type PaymentMethod, PaymentMethodType, type PaymentTaxLine, type Price, type PriceProvider, type ProcessBookingRefundParams, type ProcessOrderRefundParams, type Product, type ProductInventory, type ProductStatus, type ProductVariant, type PromoCode, type PromoCodeStatus, type PromoCodeValidation, type PromoUsage, type Provider, type ProviderAvailability, type ProviderTimelinePoint, type ProviderWithTimeline, type PurchaseLabelResult, type RateAgentChatParams, type RemoveAudienceSubscriberParams, type RemoveMemberParams, type RequestOptions, type RunAgentParams, type SearchAccountsParams, type SearchBookingsParams, type Service, type ServiceDuration, type ServiceProvider, type ServiceProviderInput, type SetCustomerEmailParams, type SetupAnalyticsParams, type ShipParams, type ShipResult, type Shipment, type ShipmentLine, type ShippingAddress, type ShippingMethod, type ShippingRate, type ShippingStatus, type ShippingWeightTier, type Slot, type SlotRange, type SpecificDate, type Store, type StoreEmails, type StoreRole, type StoreSubscription, type StoreSubscriptionPayment, type StoreSubscriptionProvider, type StoreSubscriptionSource, type StoreSubscriptionStatus, type SubmitFormParams, type SubscribeAudienceParams, type SubscribeParams, type SubscriptionInterval, type SubscriptionPrice, type SystemTemplateKey, type Taxonomy, type TaxonomyEntry, type TaxonomyField, type TaxonomyFieldQuery, type TaxonomyQuery, type TaxonomySchema, type TaxonomySchemaType, type TaxonomyStatus, type TestWebhookParams, type TimeRange, type TimelinePoint, type TrackEmailOpenParams, type TriggerNotificationParams, type TriggerWorkflowParams, type UpdateAccountProfileParams, type UpdateAgentChatParams, type UpdateAgentParams, type UpdateAudienceParams, type UpdateBookingParams, type UpdateCustomerParams, type UpdateEmailTemplateParams, type UpdateFormParams, type UpdateFormSubmissionParams, type UpdateIntegrationParams, type UpdateLocationParams, type UpdateMarketParams, type UpdateMediaParams, type UpdateNodeParams, type UpdateOrderParams, type UpdateProductParams, type UpdateProductVariantInput, type UpdatePromoCodeParams, type UpdateProviderParams, type UpdateServiceParams, type UpdateServiceProviderParams, type UpdateStoreParams, type UpdateTaxonomyParams, type UpdateWebhookParams, type UpdateWorkflowParams, type UploadStoreMediaParams, type Webhook, type WebhookEventSubscription, type Workflow, type WorkflowEdge, type WorkflowExecution, type WorkflowHttpMethod, type WorkflowHttpNode, type WorkflowLoopNode, type WorkflowNode, type WorkflowStatus, type WorkflowSwitchNode, type WorkflowSwitchRule, type WorkflowTransformNode, type WorkflowTriggerNode, type WorkingDay, type WorkingHour, type Zone, type ZoneLocation };
|