arky-sdk 0.7.95 → 0.7.104

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