arky-sdk 0.9.0 → 0.9.6

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.
@@ -0,0 +1,3289 @@
1
+ declare enum PaymentMethodType {
2
+ Cash = "cash",
3
+ CreditCard = "credit_card"
4
+ }
5
+ interface PaymentTaxLine {
6
+ rate_bps: number;
7
+ amount: number;
8
+ label?: string;
9
+ scope?: string;
10
+ }
11
+ interface OrderPaymentTax {
12
+ amount: number;
13
+ mode_snapshot?: string;
14
+ rate_bps: number;
15
+ lines: OrderPaymentTaxLine[];
16
+ }
17
+ interface OrderPaymentTaxLine {
18
+ rate_bps: number;
19
+ amount: number;
20
+ label?: string;
21
+ scope?: string;
22
+ }
23
+ interface OrderPaymentPromoCode {
24
+ id: string;
25
+ code: string;
26
+ type: string;
27
+ value: number;
28
+ }
29
+ type OrderPaymentProvider = {
30
+ type: "stripe";
31
+ profile_id: string;
32
+ payment_intent_id?: string;
33
+ };
34
+ interface OrderPaymentRefund {
35
+ id: string;
36
+ total: number;
37
+ provider_refund_id?: string;
38
+ status: string;
39
+ created_at: number;
40
+ }
41
+ interface OrderPayment {
42
+ currency: string;
43
+ market: string;
44
+ subtotal: number;
45
+ shipping: number;
46
+ discount: number;
47
+ total: number;
48
+ paid: number;
49
+ tax?: OrderPaymentTax;
50
+ promo_code?: OrderPaymentPromoCode;
51
+ provider?: OrderPaymentProvider;
52
+ refunds: OrderPaymentRefund[];
53
+ zone_id?: string;
54
+ payment_method_id?: string;
55
+ shipping_method_id?: string;
56
+ method_type: PaymentMethodType;
57
+ }
58
+ interface PromoCodeValidation {
59
+ promo_code_id: string;
60
+ code: string;
61
+ discounts: Discount[];
62
+ conditions: Condition[];
63
+ }
64
+ interface OrderQuote {
65
+ id?: string;
66
+ expires_at?: number;
67
+ market: string;
68
+ zone: Zone | null;
69
+ items: QuoteLine[];
70
+ subtotal: number;
71
+ shipping: number;
72
+ discount: number;
73
+ tax: number;
74
+ total: number;
75
+ shipping_method: ShippingMethod | null;
76
+ payment_method: PaymentMethod | null;
77
+ payment_methods: PaymentMethod[];
78
+ promo_code: PromoCodeValidation | null;
79
+ payment: OrderPayment;
80
+ charge_amount: number;
81
+ }
82
+ interface Price {
83
+ currency: string;
84
+ market: string;
85
+ amount: number;
86
+ compare_at?: number;
87
+ profile_list_id?: string;
88
+ }
89
+ type IntervalPeriod = "month" | "year";
90
+ interface SubscriptionInterval {
91
+ period: IntervalPeriod;
92
+ count: number;
93
+ }
94
+ interface PriceProvider {
95
+ type: string;
96
+ id: string;
97
+ }
98
+ interface SubscriptionPrice {
99
+ currency: string;
100
+ amount: number;
101
+ compare_at?: number;
102
+ interval?: SubscriptionInterval;
103
+ providers: PriceProvider[];
104
+ }
105
+ interface Address {
106
+ name?: string | null;
107
+ company?: string | null;
108
+ street1?: string | null;
109
+ street2?: string | null;
110
+ city?: string | null;
111
+ state?: string | null;
112
+ postal_code?: string | null;
113
+ country?: string | null;
114
+ phone?: string | null;
115
+ email?: string | null;
116
+ }
117
+ interface GeoLocation {
118
+ coordinates?: {
119
+ lat: number;
120
+ lon: number;
121
+ } | null;
122
+ label?: string | null;
123
+ }
124
+ interface ZoneLocation {
125
+ country?: string | null;
126
+ state?: string | null;
127
+ city?: string | null;
128
+ postal_code?: string | null;
129
+ }
130
+ interface EshopCartItem {
131
+ id: string;
132
+ product_id: string;
133
+ variant_id: string;
134
+ product_name: string;
135
+ product_slug: string;
136
+ variant_attributes: Record<string, any>;
137
+ price: Price;
138
+ quantity: number;
139
+ added_at: number;
140
+ max_stock?: number;
141
+ }
142
+ type CartStatus = "active" | "abandoned" | "converted" | "expired";
143
+ type CartOrigin = "storefront" | "admin";
144
+ interface Cart {
145
+ id: string;
146
+ store_id: string;
147
+ profile_id: string;
148
+ token: string;
149
+ status: CartStatus;
150
+ origin: CartOrigin;
151
+ created_by_account_id?: string | null;
152
+ market: string;
153
+ items: OrderCheckoutItemInput[];
154
+ shipping_address?: Address | null;
155
+ billing_address?: Address | null;
156
+ forms: FormEntry[];
157
+ promo_code?: string | null;
158
+ payment_method_id?: string | null;
159
+ shipping_method_id?: string | null;
160
+ quote_snapshot?: OrderQuote | null;
161
+ converted_order_id?: string | null;
162
+ item_count: number;
163
+ last_activity_at: number;
164
+ abandoned_at?: number | null;
165
+ recovery_sent_at?: number | null;
166
+ created_at: number;
167
+ updated_at: number;
168
+ }
169
+ type IntegrationProvider = {
170
+ type: "stripe";
171
+ secret_key?: string;
172
+ publishable_key: string;
173
+ webhook_secret?: string;
174
+ currency: string;
175
+ } | {
176
+ type: "shippo";
177
+ api_token?: string;
178
+ } | {
179
+ type: "google";
180
+ client_id?: string;
181
+ client_secret?: string;
182
+ access_token?: string;
183
+ refresh_token?: string;
184
+ token_expires_at?: number;
185
+ scopes: string[];
186
+ account_email?: string | null;
187
+ connected_at: number;
188
+ } | {
189
+ type: "telegram_bot";
190
+ bot_token?: string;
191
+ } | {
192
+ type: "deep_seek";
193
+ api_key?: string;
194
+ model?: string;
195
+ } | {
196
+ type: "brave_search";
197
+ api_key?: string;
198
+ } | {
199
+ type: "open_ai";
200
+ api_key?: string;
201
+ model?: string;
202
+ } | {
203
+ type: "slack";
204
+ api_key?: string;
205
+ } | {
206
+ type: "discord";
207
+ api_key?: string;
208
+ } | {
209
+ type: "whats_app";
210
+ api_key?: string;
211
+ } | {
212
+ type: "resend";
213
+ api_key?: string;
214
+ } | {
215
+ type: "send_grid";
216
+ api_key?: string;
217
+ } | {
218
+ type: "airtable";
219
+ api_key?: string;
220
+ } | {
221
+ type: "linear";
222
+ api_key?: string;
223
+ } | {
224
+ type: "git_hub";
225
+ api_key?: string;
226
+ } | {
227
+ type: "git_lab";
228
+ api_key?: string;
229
+ } | {
230
+ type: "dropbox";
231
+ api_key?: string;
232
+ } | {
233
+ type: "hub_spot";
234
+ api_key?: string;
235
+ } | {
236
+ type: "monday";
237
+ api_key?: string;
238
+ } | {
239
+ type: "click_up";
240
+ api_key?: string;
241
+ } | {
242
+ type: "pipedrive";
243
+ api_key?: string;
244
+ } | {
245
+ type: "calendly";
246
+ api_key?: string;
247
+ } | {
248
+ type: "typeform";
249
+ api_key?: string;
250
+ } | {
251
+ type: "webflow";
252
+ api_key?: string;
253
+ } | {
254
+ type: "trello";
255
+ api_key?: string;
256
+ } | {
257
+ type: "replicate";
258
+ api_key?: string;
259
+ } | {
260
+ type: "asana";
261
+ api_key?: string;
262
+ } | {
263
+ type: "brevo";
264
+ api_key?: string;
265
+ } | {
266
+ type: "intercom";
267
+ api_key?: string;
268
+ } | {
269
+ type: "notion";
270
+ api_key?: string;
271
+ } | {
272
+ type: "eleven_labs";
273
+ api_key?: string;
274
+ } | {
275
+ type: "active_campaign";
276
+ api_key?: string;
277
+ account_url: string;
278
+ } | {
279
+ type: "shopify";
280
+ api_key?: string;
281
+ store_domain: string;
282
+ } | {
283
+ type: "supabase";
284
+ api_key?: string;
285
+ project_url: string;
286
+ } | {
287
+ type: "mailchimp";
288
+ api_key?: string;
289
+ } | {
290
+ type: "twilio";
291
+ account_sid?: string;
292
+ auth_token?: string;
293
+ } | {
294
+ type: "jira";
295
+ email?: string;
296
+ api_token?: string;
297
+ domain: string;
298
+ } | {
299
+ type: "woo_commerce";
300
+ consumer_key?: string;
301
+ consumer_secret?: string;
302
+ store_url: string;
303
+ } | {
304
+ type: "freshdesk";
305
+ api_key?: string;
306
+ domain: string;
307
+ } | {
308
+ type: "zendesk";
309
+ api_token?: string;
310
+ email?: string;
311
+ subdomain: string;
312
+ } | {
313
+ type: "salesforce";
314
+ access_token?: string;
315
+ instance_url: string;
316
+ } | {
317
+ type: "zoom";
318
+ api_key?: string;
319
+ } | {
320
+ type: "microsoft_teams";
321
+ api_key?: string;
322
+ } | {
323
+ type: "firebase";
324
+ api_key?: string;
325
+ } | {
326
+ type: "arky";
327
+ api_key?: string;
328
+ } | {
329
+ type: "vercel_deploy_hook";
330
+ url?: string;
331
+ } | {
332
+ type: "netlify_deploy_hook";
333
+ url?: string;
334
+ } | {
335
+ type: "cloudflare_deploy_hook";
336
+ url?: string;
337
+ } | {
338
+ type: "custom_deploy_hook";
339
+ url?: string;
340
+ };
341
+ interface Integration {
342
+ id: string;
343
+ store_id: string;
344
+ key: string;
345
+ provider: IntegrationProvider;
346
+ created_at: number;
347
+ updated_at: number;
348
+ }
349
+ interface ShippingWeightTier {
350
+ up_to_grams: number;
351
+ amount: number;
352
+ }
353
+ interface PaymentMethod {
354
+ id: string;
355
+ integration_id?: string;
356
+ }
357
+ interface ShippingMethod {
358
+ id: string;
359
+ taxable: boolean;
360
+ eta_text: string;
361
+ location_id?: string;
362
+ integration_id?: string;
363
+ amount: number;
364
+ free_above?: number;
365
+ weight_tiers?: ShippingWeightTier[];
366
+ }
367
+ interface Location {
368
+ id: string;
369
+ store_id: string;
370
+ key: string;
371
+ address: Address;
372
+ is_pickup_location: boolean;
373
+ created_at: number;
374
+ updated_at: number;
375
+ }
376
+ interface InventoryLevel {
377
+ location_id: string;
378
+ available: number;
379
+ reserved: number;
380
+ }
381
+ interface ProductInventory {
382
+ id: string;
383
+ store_id: string;
384
+ product_id: string;
385
+ variant_id: string;
386
+ location_id: string;
387
+ available: number;
388
+ reserved: number;
389
+ updated_at: number;
390
+ }
391
+ interface ProductVariant {
392
+ id: string;
393
+ sku?: string;
394
+ prices: Price[];
395
+ inventory: ProductInventory[];
396
+ attributes: Block[];
397
+ weight?: number;
398
+ }
399
+ interface Product {
400
+ id: string;
401
+ store_id: string;
402
+ key: string;
403
+ slug: Record<string, string>;
404
+ blocks: Block[];
405
+ taxonomies: TaxonomyEntry[];
406
+ filters?: TaxonomyEntry[];
407
+ variants: ProductVariant[];
408
+ status: ProductStatus;
409
+ created_at: number;
410
+ updated_at: number;
411
+ }
412
+ interface GalleryItem {
413
+ id: string;
414
+ url: string;
415
+ alt?: string;
416
+ caption?: string;
417
+ }
418
+ interface ProductLineItemSnapshot {
419
+ product_key: string;
420
+ variant_sku?: string;
421
+ variant_attributes: Block[];
422
+ price: Price;
423
+ }
424
+ interface ServiceLineItemSnapshot {
425
+ service_key: string;
426
+ provider_key: string;
427
+ price: Price;
428
+ }
429
+ type OrderItemSnapshot = ProductLineItemSnapshot | ServiceLineItemSnapshot;
430
+ type ProductQuoteLineAvailability = {
431
+ ok: true;
432
+ available?: number;
433
+ } | {
434
+ ok: false;
435
+ reason: string;
436
+ };
437
+ type ServiceQuoteLineAvailability = {
438
+ ok: true;
439
+ spots: number;
440
+ } | {
441
+ ok: false;
442
+ reason: string;
443
+ };
444
+ interface ProductQuoteLine {
445
+ type: "product";
446
+ line_id: string;
447
+ product_id: string;
448
+ variant_id: string;
449
+ quantity: number;
450
+ unit_price: number;
451
+ subtotal: number;
452
+ discount: number;
453
+ tax: number;
454
+ total: number;
455
+ snapshot: ProductLineItemSnapshot;
456
+ availability: ProductQuoteLineAvailability;
457
+ }
458
+ interface ServiceQuoteLine {
459
+ type: "service";
460
+ line_id: string;
461
+ service_id: string;
462
+ provider_id: string;
463
+ from: number;
464
+ to: number;
465
+ quantity: 1;
466
+ unit_price: number;
467
+ subtotal: number;
468
+ discount: number;
469
+ tax: number;
470
+ total: number;
471
+ snapshot: ServiceLineItemSnapshot;
472
+ availability: ServiceQuoteLineAvailability;
473
+ }
474
+ type QuoteLine = ProductQuoteLine | ServiceQuoteLine;
475
+ interface ProductLineItem {
476
+ type: "product";
477
+ id: string;
478
+ product_id: string;
479
+ variant_id: string;
480
+ quantity: number;
481
+ location_id?: string;
482
+ snapshot: ProductLineItemSnapshot;
483
+ status: OrderItemStatus;
484
+ }
485
+ interface ServiceLineItem {
486
+ type: "service";
487
+ id: string;
488
+ service_id: string;
489
+ provider_id: string;
490
+ from: number;
491
+ to: number;
492
+ forms: FormEntry[];
493
+ snapshot: ServiceLineItemSnapshot;
494
+ status: OrderItemStatus;
495
+ }
496
+ type OrderItem = ProductLineItem | ServiceLineItem;
497
+ interface HistoryEntry {
498
+ action: string;
499
+ reason?: string;
500
+ timestamp: number;
501
+ }
502
+ interface Order {
503
+ id: string;
504
+ number: string;
505
+ store_id: string;
506
+ source_cart_id: string;
507
+ profile_id: string;
508
+ status: OrderStatus;
509
+ verified: boolean;
510
+ items: OrderItem[];
511
+ payment: OrderPayment;
512
+ shipping_address?: Address;
513
+ billing_address?: Address;
514
+ forms: FormEntry[];
515
+ shipments: Shipment[];
516
+ history: HistoryEntry[];
517
+ profile_list_id?: string;
518
+ fired_reminders: number[];
519
+ created_at: number;
520
+ updated_at: number;
521
+ }
522
+ interface OrderCheckoutResult {
523
+ order_id: string;
524
+ number: string;
525
+ client_secret: string | null;
526
+ payment: OrderPayment;
527
+ }
528
+ interface Zone {
529
+ id: string;
530
+ store_id: string;
531
+ market_id: string;
532
+ countries: string[];
533
+ states: string[];
534
+ postal_codes: string[];
535
+ tax_bps: number;
536
+ shipping_methods: ShippingMethod[];
537
+ }
538
+ interface Market {
539
+ id: string;
540
+ store_id: string;
541
+ key: string;
542
+ currency: string;
543
+ tax_mode: "exclusive" | "inclusive";
544
+ payment_methods: PaymentMethod[];
545
+ zones: Zone[];
546
+ created_at: number;
547
+ updated_at: number;
548
+ }
549
+ interface Language {
550
+ id: string;
551
+ }
552
+ interface StoreEmails {
553
+ billing: string;
554
+ support: string;
555
+ }
556
+ type WebhookEventSubscription = {
557
+ event: "node.created";
558
+ parent_id?: string;
559
+ } | {
560
+ event: "node.updated";
561
+ key?: string;
562
+ } | {
563
+ event: "node.deleted";
564
+ key?: string;
565
+ } | {
566
+ event: "order.created";
567
+ } | {
568
+ event: "order.updated";
569
+ } | {
570
+ event: "order.confirmed";
571
+ } | {
572
+ event: "order.payment_received";
573
+ } | {
574
+ event: "order.payment_failed";
575
+ } | {
576
+ event: "order.refunded";
577
+ } | {
578
+ event: "order.cancelled";
579
+ } | {
580
+ event: "order.reminder";
581
+ } | {
582
+ event: "order.shipment_created";
583
+ } | {
584
+ event: "order.shipment_in_transit";
585
+ } | {
586
+ event: "order.shipment_out_for_delivery";
587
+ } | {
588
+ event: "order.shipment_delivered";
589
+ } | {
590
+ event: "order.shipment_failed";
591
+ } | {
592
+ event: "order.shipment_returned";
593
+ } | {
594
+ event: "order.shipment_status_changed";
595
+ } | {
596
+ event: "cart.created";
597
+ } | {
598
+ event: "cart.updated";
599
+ } | {
600
+ event: "cart.abandoned";
601
+ } | {
602
+ event: "cart.converted";
603
+ } | {
604
+ event: "product.created";
605
+ } | {
606
+ event: "product.updated";
607
+ } | {
608
+ event: "product.deleted";
609
+ } | {
610
+ event: "provider.created";
611
+ } | {
612
+ event: "provider.updated";
613
+ } | {
614
+ event: "provider.deleted";
615
+ } | {
616
+ event: "service.created";
617
+ } | {
618
+ event: "service.updated";
619
+ } | {
620
+ event: "service.deleted";
621
+ } | {
622
+ event: "media.created";
623
+ } | {
624
+ event: "media.deleted";
625
+ } | {
626
+ event: "store.created";
627
+ } | {
628
+ event: "store.updated";
629
+ } | {
630
+ event: "store.deleted";
631
+ } | {
632
+ event: "profile_list.created";
633
+ } | {
634
+ event: "profile_list.updated";
635
+ } | {
636
+ event: "profile_list.profile_added";
637
+ } | {
638
+ event: "profile_list.profile_pending";
639
+ } | {
640
+ event: "profile_list.profile_confirmed";
641
+ } | {
642
+ event: "profile_list.profile_cancelled";
643
+ } | {
644
+ event: "account.updated";
645
+ };
646
+ interface Webhook {
647
+ id: string;
648
+ store_id: string;
649
+ key: string;
650
+ url: string;
651
+ events: WebhookEventSubscription[];
652
+ headers: Record<string, string>;
653
+ secret: string;
654
+ enabled: boolean;
655
+ created_at: number;
656
+ updated_at: number;
657
+ }
658
+ type StoreSubscriptionStatus = "pending" | "active" | "cancellation_scheduled" | "cancelled" | "expired";
659
+ type StoreSubscriptionSource = "signup" | "admin" | "import";
660
+ type StoreSubscriptionProvider = {
661
+ type: "stripe";
662
+ profile_id: string;
663
+ subscription_id?: string;
664
+ price_id?: string;
665
+ };
666
+ interface StoreSubscriptionPayment {
667
+ currency: string;
668
+ market: string;
669
+ provider?: StoreSubscriptionProvider;
670
+ }
671
+ interface StoreSubscription {
672
+ id: string;
673
+ target: string;
674
+ plan_id: string;
675
+ pending_plan_id: string | null;
676
+ payment: StoreSubscriptionPayment;
677
+ status: StoreSubscriptionStatus;
678
+ start_date: number;
679
+ end_date: number;
680
+ token: string;
681
+ source: StoreSubscriptionSource;
682
+ }
683
+ type ProfileListMembershipProvider = {
684
+ type: "stripe";
685
+ stripe_customer_id: string;
686
+ subscription_id?: string;
687
+ price_id?: string;
688
+ };
689
+ interface ProfileListMembershipPayment {
690
+ currency: string;
691
+ market: string;
692
+ provider?: ProfileListMembershipProvider;
693
+ }
694
+ interface Store {
695
+ id: string;
696
+ key: string;
697
+ timezone: string;
698
+ languages?: Language[];
699
+ emails?: StoreEmails;
700
+ subscription?: StoreSubscription;
701
+ counts?: Record<string, number>;
702
+ }
703
+ interface EshopStoreState {
704
+ store_id: string;
705
+ selected_shipping_method_id: string | null;
706
+ user_token: string | null;
707
+ processing_checkout: boolean;
708
+ loading: boolean;
709
+ error: string | null;
710
+ }
711
+ interface Block {
712
+ id: string;
713
+ key: string;
714
+ type: string;
715
+ properties?: any;
716
+ value?: any;
717
+ }
718
+ type TaxonomySchemaType = "text" | "number" | "boolean" | "geo_location";
719
+ interface TaxonomySchema {
720
+ id: string;
721
+ key: string;
722
+ type: TaxonomySchemaType;
723
+ value?: string[];
724
+ min?: number | null;
725
+ max?: number | null;
726
+ }
727
+ interface TaxonomyField {
728
+ id: string;
729
+ key: string;
730
+ type: TaxonomySchemaType;
731
+ value: any;
732
+ }
733
+ interface TaxonomyFieldQuery {
734
+ key: string;
735
+ type: TaxonomySchemaType;
736
+ operation?: string;
737
+ value: any;
738
+ center?: {
739
+ lat: number;
740
+ lon: number;
741
+ };
742
+ radius?: number;
743
+ }
744
+ interface TaxonomyEntry {
745
+ taxonomy_id: string;
746
+ fields: TaxonomyField[];
747
+ }
748
+ interface TaxonomyQuery {
749
+ taxonomy_id: string;
750
+ query: TaxonomyFieldQuery[];
751
+ }
752
+ type FormSchemaType = "text" | "number" | "boolean" | "date" | "geo_location" | "select";
753
+ interface FormSchema {
754
+ id: string;
755
+ key: string;
756
+ type: FormSchemaType;
757
+ required?: boolean;
758
+ min?: number | null;
759
+ max?: number | null;
760
+ options?: string[];
761
+ }
762
+ type FormFieldType = "text" | "number" | "boolean" | "date" | "geo_location" | "select";
763
+ interface FormField {
764
+ id: string;
765
+ key: string;
766
+ type: FormFieldType;
767
+ value?: any;
768
+ }
769
+ interface FormEntry {
770
+ form_id: string;
771
+ fields: FormField[];
772
+ }
773
+ type BlockType = "text" | "localized_text" | "number" | "boolean" | "list" | "map" | "relationship_entry" | "relationship_media" | "markdown" | "geo_location";
774
+ interface GeoLocationBlockProperties {
775
+ }
776
+ type GeoLocationValue = GeoLocation;
777
+ interface GeoLocationBlock extends Block {
778
+ type: "geo_location";
779
+ properties: GeoLocationBlockProperties;
780
+ value: GeoLocation | null;
781
+ }
782
+ type Access = "public" | "private";
783
+ interface MediaResolution {
784
+ id: string;
785
+ size: string;
786
+ url: string;
787
+ }
788
+ interface Media {
789
+ id: string;
790
+ resolutions: {
791
+ [key: string]: MediaResolution;
792
+ };
793
+ mime_type: string;
794
+ title?: string | null;
795
+ description?: string | null;
796
+ alt?: string | null;
797
+ store_id: string;
798
+ entity?: string;
799
+ metadata?: string | null;
800
+ created_at: number;
801
+ slug: Record<string, string>;
802
+ }
803
+ interface SubscriptionPlan {
804
+ id: string;
805
+ provider_price_id?: string | null;
806
+ provider_product_id?: string | null;
807
+ name: string;
808
+ tier: number;
809
+ amount: number;
810
+ currency: string;
811
+ interval: string;
812
+ interval_count: number;
813
+ trial_period_days: number;
814
+ }
815
+ interface AccountToken {
816
+ id: string;
817
+ value?: string;
818
+ name?: string | null;
819
+ created_at: number;
820
+ expires_at?: number | null;
821
+ type?: string;
822
+ }
823
+ interface StoreMembership {
824
+ store_id: string;
825
+ role: StoreRole;
826
+ invitation_token?: AccountToken | null;
827
+ joined_at?: number | null;
828
+ }
829
+ interface AccountLifecycle {
830
+ last_login_at?: number | null;
831
+ onboarding_completed: boolean;
832
+ }
833
+ interface Account {
834
+ id: string;
835
+ email: string;
836
+ memberships: StoreMembership[];
837
+ api_tokens: AccountToken[];
838
+ auth_tokens?: AuthToken[];
839
+ verification_codes?: unknown[];
840
+ lifecycle?: AccountLifecycle;
841
+ }
842
+ interface AccountUpdateResponse {
843
+ success: boolean;
844
+ newly_created_tokens: AccountToken[];
845
+ }
846
+ interface ApiResponse<T> {
847
+ success: boolean;
848
+ data?: T;
849
+ error?: string;
850
+ cursor?: string;
851
+ total?: number;
852
+ }
853
+ interface PaginatedResponse<T> {
854
+ items: T[];
855
+ cursor: string | null;
856
+ data?: T[];
857
+ meta?: {
858
+ total: number;
859
+ page: number;
860
+ per_page: number;
861
+ };
862
+ }
863
+ type ServiceStatus = "active" | "draft" | "archived";
864
+ type ProviderStatus = "active" | "draft" | "archived";
865
+ type ProductStatus = "active" | "draft" | "archived";
866
+ type ProfileStatus = "active" | "archived";
867
+ type ProfileListStatus = "active" | "draft" | "archived";
868
+ type ProfileListSource = "manual" | "import" | "signup" | "admin" | "system" | "lead_research";
869
+ type ProfileListMembershipStatus = "pending" | "active" | "cancellation_scheduled" | "cancelled" | "expired" | "archived";
870
+ type MailboxStatus = "active" | "draft" | "archived";
871
+ type MailboxPreset = "gmail" | "zoho" | "microsoft" | "custom";
872
+ type MailboxConnectionSecurity = "tls" | "start_tls";
873
+ type MailboxSyncStatus = "not_ready" | "ready" | "failed";
874
+ type SmtpImapMailboxProvider = {
875
+ type: "smtp_imap";
876
+ preset: MailboxPreset;
877
+ smtp_host: string;
878
+ smtp_port: number;
879
+ smtp_security: MailboxConnectionSecurity;
880
+ imap_host: string;
881
+ imap_port: number;
882
+ imap_security: MailboxConnectionSecurity;
883
+ username: string;
884
+ password_configured: boolean;
885
+ sync_enabled: boolean;
886
+ sync_interval_seconds: number;
887
+ sync_status?: MailboxSyncStatus;
888
+ sync_error?: string | null;
889
+ sync_ready_at?: number | null;
890
+ last_synced_at?: number | null;
891
+ last_seen_uid?: number | null;
892
+ };
893
+ type MailboxProvider = {
894
+ type: "fake";
895
+ } | SmtpImapMailboxProvider;
896
+ type CampaignStatus = "draft" | "active" | "paused" | "completed" | "archived";
897
+ type CampaignRecipientStatus = "pending" | "active" | "replied" | "completed" | "suppressed" | "failed" | "stopped";
898
+ type CampaignRecipientImportSource = "profile_list" | "profile" | "manual";
899
+ type CampaignMessageStatus = "pending" | "sending" | "sent" | "received" | "bounced" | "failed" | "skipped";
900
+ type CampaignMessageKind = "campaign_step" | "manual_reply" | "inbound_reply" | "delivery_failure" | "activity";
901
+ type CampaignMessageDirection = "outbound" | "inbound" | "activity";
902
+ type CampaignMessageCopySource = "template" | "generated" | "edited";
903
+ type OutreachThreadMode = "new_thread" | "same_thread";
904
+ type OutreachStepVariantStatus = "active" | "archived";
905
+ type OutreachPersonalizationStatus = "idle" | "running" | "completed" | "failed";
906
+ type SuppressionStatus = "active" | "archived";
907
+ type SuppressionTargetType = "email" | "domain" | "profile";
908
+ type SuppressionScopeType = "store" | "campaign";
909
+ type SuppressionReason = "manual" | "unsubscribed" | "bounced" | "complained" | "replied";
910
+ type SuppressionSource = "admin" | "import" | "reply" | "system";
911
+ type WorkflowStatus = "active" | "draft" | "archived";
912
+ type PromoCodeStatus = "active" | "draft" | "archived";
913
+ type NodeStatus = "active" | "draft" | "archived";
914
+ type EmailTemplateStatus = "active" | "draft" | "archived";
915
+ type FormStatus = "active" | "draft" | "archived";
916
+ type TaxonomyStatus = "active" | "draft" | "archived";
917
+ type OrderCancellationReason = "admin_rejected" | "profile_cancelled" | "payment_failed" | "expired" | "other";
918
+ type OrderItemStatus = {
919
+ status: "pending";
920
+ expires_at: number;
921
+ } | {
922
+ status: "confirmed";
923
+ } | {
924
+ status: "cancelled";
925
+ reason: OrderCancellationReason;
926
+ };
927
+ type OrderStatus = "pending" | "partially_confirmed" | "confirmed" | "partially_cancelled" | "cancelled";
928
+ type OrderPaymentStatus = {
929
+ status: "pending";
930
+ at: number;
931
+ } | {
932
+ status: "authorized";
933
+ at: number;
934
+ amount: number;
935
+ } | {
936
+ status: "captured";
937
+ at: number;
938
+ amount: number;
939
+ } | {
940
+ status: "failed";
941
+ at: number;
942
+ reason?: string;
943
+ };
944
+ interface TimeRange {
945
+ from: number;
946
+ to: number;
947
+ }
948
+ interface Node {
949
+ id: string;
950
+ key: string;
951
+ store_id: string;
952
+ parent_id?: string | null;
953
+ blocks: Block[];
954
+ taxonomies: TaxonomyEntry[];
955
+ status: NodeStatus;
956
+ slug: Record<string, string>;
957
+ children: Node[];
958
+ created_at: number;
959
+ updated_at: number;
960
+ }
961
+ interface EmailTemplate {
962
+ id: string;
963
+ key: string;
964
+ store_id: string;
965
+ subject: Record<string, string>;
966
+ body: string;
967
+ from_name: string;
968
+ from_email: string;
969
+ reply_to?: string;
970
+ preheader?: string;
971
+ variables: EmailTemplateVariable[];
972
+ sample_data: Record<string, unknown>;
973
+ status: EmailTemplateStatus;
974
+ created_at: number;
975
+ updated_at: number;
976
+ }
977
+ interface EmailTemplateVariable {
978
+ key: string;
979
+ }
980
+ interface Form {
981
+ id: string;
982
+ key: string;
983
+ store_id: string;
984
+ schema: FormSchema[];
985
+ status: FormStatus;
986
+ created_at: number;
987
+ updated_at: number;
988
+ }
989
+ interface FormSubmission {
990
+ id: string;
991
+ form_id: string;
992
+ store_id: string;
993
+ profile_id: string;
994
+ fields: FormField[];
995
+ created_at: number;
996
+ }
997
+ interface Taxonomy {
998
+ id: string;
999
+ key: string;
1000
+ store_id: string;
1001
+ parent_id?: string | null;
1002
+ schema?: TaxonomySchema[];
1003
+ status: TaxonomyStatus;
1004
+ created_at: number;
1005
+ updated_at: number;
1006
+ }
1007
+ interface ServiceDuration {
1008
+ duration: number;
1009
+ is_pause: boolean;
1010
+ }
1011
+ interface WorkingHour {
1012
+ from: number;
1013
+ to: number;
1014
+ }
1015
+ interface WorkingDay {
1016
+ day: string;
1017
+ working_hours: WorkingHour[];
1018
+ }
1019
+ interface SpecificDate {
1020
+ date: number;
1021
+ working_hours: WorkingHour[];
1022
+ }
1023
+ interface ServiceProvider {
1024
+ id: string;
1025
+ service_id: string;
1026
+ provider_id: string;
1027
+ store_id: string;
1028
+ working_days: WorkingDay[];
1029
+ specific_dates: SpecificDate[];
1030
+ prices: Price[];
1031
+ durations: ServiceDuration[];
1032
+ slot_interval: number;
1033
+ forms: FormEntry[];
1034
+ reminders: number[];
1035
+ min_advance: number;
1036
+ max_advance: number;
1037
+ created_at: number;
1038
+ updated_at: number;
1039
+ }
1040
+ interface Service {
1041
+ id: string;
1042
+ key: string;
1043
+ slug: Record<string, string>;
1044
+ store_id: string;
1045
+ blocks: Block[];
1046
+ taxonomies: TaxonomyEntry[];
1047
+ filters?: TaxonomyEntry[];
1048
+ created_at: number;
1049
+ updated_at: number;
1050
+ status: ServiceStatus;
1051
+ }
1052
+ interface ProviderTimelinePoint {
1053
+ timestamp: number;
1054
+ booked: number;
1055
+ }
1056
+ interface Provider {
1057
+ id: string;
1058
+ key: string;
1059
+ slug: Record<string, string>;
1060
+ store_id: string;
1061
+ status: ProviderStatus;
1062
+ blocks: Block[];
1063
+ taxonomies: TaxonomyEntry[];
1064
+ filters?: TaxonomyEntry[];
1065
+ timeline: ProviderTimelinePoint[];
1066
+ created_at: number;
1067
+ updated_at: number;
1068
+ }
1069
+ interface WorkflowEdge {
1070
+ source: string;
1071
+ target: string;
1072
+ output: string;
1073
+ back_edge: boolean;
1074
+ }
1075
+ interface Workflow {
1076
+ id: string;
1077
+ key: string;
1078
+ store_id: string;
1079
+ secret: string;
1080
+ status: WorkflowStatus;
1081
+ nodes: Record<string, WorkflowNode>;
1082
+ edges: WorkflowEdge[];
1083
+ schedule?: string;
1084
+ created_at: number;
1085
+ updated_at: number;
1086
+ }
1087
+ type WorkflowNode = WorkflowTriggerNode | WorkflowHttpNode | WorkflowSwitchNode | WorkflowTransformNode | WorkflowLoopNode;
1088
+ interface WorkflowTriggerNode {
1089
+ type: "trigger";
1090
+ event?: string;
1091
+ delay_ms?: number;
1092
+ schema?: Block[];
1093
+ }
1094
+ interface WorkflowHttpNode {
1095
+ type: "http";
1096
+ method: WorkflowHttpMethod;
1097
+ url: string;
1098
+ headers?: Record<string, string>;
1099
+ body?: any;
1100
+ timeout_ms?: number;
1101
+ integration_id?: string;
1102
+ integration_provider_id?: string;
1103
+ delay_ms?: number;
1104
+ retries?: number;
1105
+ retry_delay_ms?: number;
1106
+ }
1107
+ interface WorkflowSwitchRule {
1108
+ condition: string;
1109
+ }
1110
+ interface WorkflowSwitchNode {
1111
+ type: "switch";
1112
+ rules: WorkflowSwitchRule[];
1113
+ delay_ms?: number;
1114
+ }
1115
+ interface WorkflowTransformNode {
1116
+ type: "transform";
1117
+ code: string;
1118
+ delay_ms?: number;
1119
+ }
1120
+ interface WorkflowLoopNode {
1121
+ type: "loop";
1122
+ expression: string;
1123
+ delay_ms?: number;
1124
+ }
1125
+ type WorkflowHttpMethod = "get" | "post" | "put" | "patch" | "delete";
1126
+ type ExecutionStatus = "pending" | "running" | "completed" | "failed" | "cancelled";
1127
+ interface NodeResult {
1128
+ output: any;
1129
+ route: string;
1130
+ started_at: number;
1131
+ completed_at: number;
1132
+ duration_ms: number;
1133
+ error?: string;
1134
+ }
1135
+ interface WorkflowExecution {
1136
+ id: string;
1137
+ workflow_id: string;
1138
+ store_id: string;
1139
+ status: ExecutionStatus;
1140
+ input: Record<string, any>;
1141
+ results: Record<string, NodeResult>;
1142
+ error?: string;
1143
+ scheduled_at: number;
1144
+ started_at: number;
1145
+ completed_at?: number;
1146
+ created_at: number;
1147
+ updated_at: number;
1148
+ }
1149
+ type ProfileListType = {
1150
+ type: "standard";
1151
+ } | {
1152
+ type: "confirmation";
1153
+ confirm_template_id?: string | null;
1154
+ } | {
1155
+ type: "paid";
1156
+ prices: SubscriptionPrice[];
1157
+ payment_integration_id?: string | null;
1158
+ };
1159
+ interface ProfileAuthToken$1 {
1160
+ id: string;
1161
+ token: string;
1162
+ created_at: number;
1163
+ }
1164
+ interface ProfileVerificationCode$1 {
1165
+ code: string;
1166
+ created_at: number;
1167
+ used: boolean;
1168
+ store_id?: string | null;
1169
+ }
1170
+ interface PromoUsage$1 {
1171
+ promo_code_id: string;
1172
+ uses: number;
1173
+ }
1174
+ interface Profile$1 {
1175
+ id: string;
1176
+ store_id: string;
1177
+ email: string | null;
1178
+ verified: boolean;
1179
+ status: ProfileStatus;
1180
+ promo_usage: PromoUsage$1[];
1181
+ lists: ProfileListMembership[];
1182
+ taxonomies: TaxonomyEntry[];
1183
+ auth_tokens: ProfileAuthToken$1[];
1184
+ verification_codes: ProfileVerificationCode$1[];
1185
+ created_at: number;
1186
+ updated_at: number;
1187
+ }
1188
+ interface ProfileListAccessResponse {
1189
+ has_access: boolean;
1190
+ membership?: ProfileListMembership | null;
1191
+ }
1192
+ interface ProfileListSubscribeResponse {
1193
+ checkout_url?: string | null;
1194
+ membership?: ProfileListMembership | null;
1195
+ }
1196
+ interface ProfileList {
1197
+ id: string;
1198
+ store_id: string;
1199
+ key: string;
1200
+ name: string;
1201
+ description?: string | null;
1202
+ status: ProfileListStatus;
1203
+ type: ProfileListType;
1204
+ source: ProfileListSource;
1205
+ member_count: number;
1206
+ created_at: number;
1207
+ updated_at: number;
1208
+ }
1209
+ interface ProfileListMembership {
1210
+ id: string;
1211
+ store_id: string;
1212
+ profile_id: string;
1213
+ profile_list_id: string;
1214
+ source: ProfileListSource;
1215
+ fields: Record<string, unknown>;
1216
+ lead_description?: string | null;
1217
+ status: ProfileListMembershipStatus;
1218
+ plan_id: string;
1219
+ pending_plan_id: string | null;
1220
+ payment: ProfileListMembershipPayment;
1221
+ start_date: number;
1222
+ end_date: number;
1223
+ token: string;
1224
+ created_at: number;
1225
+ updated_at: number;
1226
+ }
1227
+ interface ProfileListMember {
1228
+ profile: Profile$1;
1229
+ membership: ProfileListMembership;
1230
+ }
1231
+ interface Mailbox {
1232
+ id: string;
1233
+ store_id: string;
1234
+ key: string;
1235
+ email: string;
1236
+ from_name: string;
1237
+ reply_to_email?: string | null;
1238
+ provider: MailboxProvider;
1239
+ status: MailboxStatus;
1240
+ daily_limit: number;
1241
+ sent_today: number;
1242
+ last_sent_at?: number | null;
1243
+ created_at: number;
1244
+ updated_at: number;
1245
+ }
1246
+ interface OutreachStepVariant {
1247
+ id?: string;
1248
+ position?: number;
1249
+ weight: number;
1250
+ name?: string;
1251
+ template_id?: string | null;
1252
+ template_vars?: Record<string, unknown>;
1253
+ status?: OutreachStepVariantStatus;
1254
+ }
1255
+ interface OutreachStep {
1256
+ id?: string;
1257
+ position?: number;
1258
+ delay_seconds?: number;
1259
+ variants: OutreachStepVariant[];
1260
+ thread_mode?: OutreachThreadMode;
1261
+ attachments?: string[];
1262
+ }
1263
+ interface OutreachPersonalizationCounters {
1264
+ total_profiles: number;
1265
+ draft_messages: number;
1266
+ generated_messages: number;
1267
+ template_messages: number;
1268
+ failed_messages: number;
1269
+ }
1270
+ interface OutreachPersonalizationState {
1271
+ status: OutreachPersonalizationStatus;
1272
+ model_integration_id?: string | null;
1273
+ step_position?: number | null;
1274
+ profile_ids: string[];
1275
+ overwrite: boolean;
1276
+ instructions?: string | null;
1277
+ error?: string | null;
1278
+ counters: OutreachPersonalizationCounters;
1279
+ started_at?: number | null;
1280
+ completed_at?: number | null;
1281
+ }
1282
+ interface Campaign {
1283
+ id: string;
1284
+ store_id: string;
1285
+ key: string;
1286
+ name: string;
1287
+ mailbox_ids: string[];
1288
+ status: CampaignStatus;
1289
+ steps: OutreachStep[];
1290
+ personalization: OutreachPersonalizationState;
1291
+ launched_at?: number | null;
1292
+ created_at: number;
1293
+ updated_at: number;
1294
+ }
1295
+ interface CampaignLaunchReadiness {
1296
+ ready: boolean;
1297
+ blockers: string[];
1298
+ warnings: string[];
1299
+ profile_count: number;
1300
+ sender_count: number;
1301
+ step_count: number;
1302
+ daily_capacity: number;
1303
+ expected_drafts: number;
1304
+ draft_count: number;
1305
+ pending_drafts: number;
1306
+ generated_drafts: number;
1307
+ template_drafts: number;
1308
+ edited_drafts: number;
1309
+ personalization_errors: number;
1310
+ stale_drafts: number;
1311
+ suppression_count: number;
1312
+ }
1313
+ interface CampaignRecipientImportResult$1 {
1314
+ imported_count: number;
1315
+ existing_count: number;
1316
+ skipped_count: number;
1317
+ draft_count: number;
1318
+ }
1319
+ interface CampaignRecipientDraft {
1320
+ id: string;
1321
+ step_id?: string | null;
1322
+ step_position: number;
1323
+ step_variant_id?: string | null;
1324
+ step_variant_position?: number | null;
1325
+ step_variant_name?: string | null;
1326
+ template_copy_hash?: string | null;
1327
+ copy_source: CampaignMessageCopySource;
1328
+ personalized_at?: number | null;
1329
+ edited_at?: number | null;
1330
+ personalization_error?: string | null;
1331
+ mailbox_id?: string | null;
1332
+ from_email?: string | null;
1333
+ to_email: string;
1334
+ subject: string;
1335
+ body: string;
1336
+ body_html?: string | null;
1337
+ template_id?: string | null;
1338
+ template_vars: Record<string, unknown>;
1339
+ created_at: number;
1340
+ updated_at: number;
1341
+ }
1342
+ interface CampaignRecipient {
1343
+ id: string;
1344
+ store_id: string;
1345
+ campaign_id: string;
1346
+ profile_id: string;
1347
+ profile_list_membership_id?: string | null;
1348
+ import_source: CampaignRecipientImportSource;
1349
+ import_source_id?: string | null;
1350
+ imported_at?: number | null;
1351
+ mailbox_id?: string | null;
1352
+ lead_description?: string | null;
1353
+ fields: Record<string, unknown>;
1354
+ drafts: CampaignRecipientDraft[];
1355
+ status: CampaignRecipientStatus;
1356
+ current_step_position: number;
1357
+ next_send_at?: number | null;
1358
+ created_at: number;
1359
+ updated_at: number;
1360
+ }
1361
+ interface CampaignMessage {
1362
+ id: string;
1363
+ store_id: string;
1364
+ campaign_id: string;
1365
+ campaign_recipient_id: string;
1366
+ profile_id: string;
1367
+ mailbox_id: string;
1368
+ direction: CampaignMessageDirection;
1369
+ kind: CampaignMessageKind;
1370
+ step_id?: string | null;
1371
+ step_position?: number | null;
1372
+ step_variant_id?: string | null;
1373
+ step_variant_position?: number | null;
1374
+ step_variant_name?: string | null;
1375
+ template_copy_hash?: string | null;
1376
+ copy_source: CampaignMessageCopySource;
1377
+ personalized_at?: number | null;
1378
+ edited_at?: number | null;
1379
+ personalization_error?: string | null;
1380
+ in_reply_to_message_id?: string | null;
1381
+ status: CampaignMessageStatus;
1382
+ to_email: string;
1383
+ from_email: string;
1384
+ subject: string;
1385
+ body: string;
1386
+ body_html?: string | null;
1387
+ template_id?: string | null;
1388
+ template_vars: Record<string, unknown>;
1389
+ rendered_subject?: string | null;
1390
+ rendered_html?: string | null;
1391
+ rendered_text?: string | null;
1392
+ attachments: string[];
1393
+ provider_message_id?: string | null;
1394
+ provider_thread_id?: string | null;
1395
+ error?: string | null;
1396
+ sent_at?: number | null;
1397
+ received_at?: number | null;
1398
+ created_at: number;
1399
+ updated_at: number;
1400
+ }
1401
+ interface CampaignRecipientConversationResponse {
1402
+ recipient: CampaignRecipient;
1403
+ messages: CampaignMessage[];
1404
+ }
1405
+ interface Suppression {
1406
+ id: string;
1407
+ store_id: string;
1408
+ campaign_id?: string | null;
1409
+ profile_id?: string | null;
1410
+ email?: string | null;
1411
+ domain?: string | null;
1412
+ target_type: SuppressionTargetType;
1413
+ target_key: string;
1414
+ scope_type: SuppressionScopeType;
1415
+ scope_key: string;
1416
+ reason: SuppressionReason;
1417
+ status: SuppressionStatus;
1418
+ source: SuppressionSource;
1419
+ created_at: number;
1420
+ updated_at: number;
1421
+ }
1422
+ type LeadResearchRunStatus = "draft" | "running" | "completed" | "failed" | "cancelled";
1423
+ type LeadEmailClassification = "official_domain" | "role_official" | "personal_official" | "free_mail" | "unusable" | "unknown";
1424
+ type LeadValidationCheckStatus = "passed" | "warning" | "failed" | "unknown";
1425
+ interface LeadResearchRun {
1426
+ id: string;
1427
+ store_id: string;
1428
+ integration_id: string;
1429
+ profile_list_id: string;
1430
+ title?: string | null;
1431
+ status: LeadResearchRunStatus;
1432
+ error?: string | null;
1433
+ started_at?: number | null;
1434
+ completed_at?: number | null;
1435
+ created_at: number;
1436
+ updated_at: number;
1437
+ }
1438
+ interface LeadValidationCheck {
1439
+ key: string;
1440
+ status: LeadValidationCheckStatus;
1441
+ message: string;
1442
+ }
1443
+ interface LeadEmailValidationResult {
1444
+ email: string;
1445
+ normalized_email?: string | null;
1446
+ domain?: string | null;
1447
+ classification: LeadEmailClassification;
1448
+ confidence: number;
1449
+ importable: boolean;
1450
+ hard_blockers: string[];
1451
+ checks: LeadValidationCheck[];
1452
+ }
1453
+ interface LeadResearchMessage {
1454
+ id: string;
1455
+ role: string;
1456
+ content: string;
1457
+ created_at: number;
1458
+ }
1459
+ interface ResearchProfileListMember {
1460
+ profile: Profile$1;
1461
+ membership: ProfileListMembership;
1462
+ }
1463
+ interface SendLeadResearchMessageResult {
1464
+ response: string;
1465
+ run: LeadResearchRun;
1466
+ profile_list_members: ResearchProfileListMember[];
1467
+ }
1468
+ type EventAction = {
1469
+ action: "order_created";
1470
+ } | {
1471
+ action: "order_updated";
1472
+ } | {
1473
+ action: "order_confirmed";
1474
+ } | {
1475
+ action: "order_payment_received";
1476
+ data: {
1477
+ amount: number;
1478
+ currency: string;
1479
+ };
1480
+ } | {
1481
+ action: "order_payment_failed";
1482
+ data: {
1483
+ reason?: string;
1484
+ };
1485
+ } | {
1486
+ action: "order_refunded";
1487
+ data: {
1488
+ amount: number;
1489
+ currency: string;
1490
+ reason?: string;
1491
+ };
1492
+ } | {
1493
+ action: "order_cancelled";
1494
+ data: {
1495
+ reason?: string;
1496
+ };
1497
+ } | {
1498
+ action: "order_shipment_created";
1499
+ data: {
1500
+ shipment_id: string;
1501
+ };
1502
+ } | {
1503
+ action: "order_shipment_in_transit";
1504
+ data: {
1505
+ shipment_id: string;
1506
+ };
1507
+ } | {
1508
+ action: "order_shipment_out_for_delivery";
1509
+ data: {
1510
+ shipment_id: string;
1511
+ };
1512
+ } | {
1513
+ action: "order_shipment_delivered";
1514
+ data: {
1515
+ shipment_id: string;
1516
+ };
1517
+ } | {
1518
+ action: "order_shipment_failed";
1519
+ data: {
1520
+ shipment_id: string;
1521
+ reason?: string;
1522
+ };
1523
+ } | {
1524
+ action: "order_shipment_returned";
1525
+ data: {
1526
+ shipment_id: string;
1527
+ };
1528
+ } | {
1529
+ action: "order_shipment_status_changed";
1530
+ data: {
1531
+ shipment_id: string;
1532
+ from: string;
1533
+ to: string;
1534
+ };
1535
+ } | {
1536
+ action: "product_created";
1537
+ } | {
1538
+ action: "product_updated";
1539
+ } | {
1540
+ action: "product_deleted";
1541
+ } | {
1542
+ action: "node_created";
1543
+ } | {
1544
+ action: "node_updated";
1545
+ } | {
1546
+ action: "node_deleted";
1547
+ } | {
1548
+ action: "provider_created";
1549
+ } | {
1550
+ action: "provider_updated";
1551
+ } | {
1552
+ action: "provider_deleted";
1553
+ } | {
1554
+ action: "service_created";
1555
+ } | {
1556
+ action: "service_updated";
1557
+ } | {
1558
+ action: "service_deleted";
1559
+ } | {
1560
+ action: "account_created";
1561
+ } | {
1562
+ action: "account_updated";
1563
+ } | {
1564
+ action: "account_deleted";
1565
+ } | {
1566
+ action: "media_created";
1567
+ } | {
1568
+ action: "media_deleted";
1569
+ } | {
1570
+ action: "store_created";
1571
+ } | {
1572
+ action: "store_updated";
1573
+ } | {
1574
+ action: "store_deleted";
1575
+ } | {
1576
+ action: "profile_list_created";
1577
+ } | {
1578
+ action: "profile_list_updated";
1579
+ } | {
1580
+ action: "profile_list_profile_added";
1581
+ } | {
1582
+ action: "profile_list_profile_removed";
1583
+ } | {
1584
+ action: "profile_list_profile_pending";
1585
+ } | {
1586
+ action: "profile_list_profile_confirmed";
1587
+ } | {
1588
+ action: "profile_list_profile_cancelled";
1589
+ };
1590
+ interface Event {
1591
+ id: string;
1592
+ entity: string;
1593
+ event: EventAction;
1594
+ actor: string;
1595
+ created_at: number;
1596
+ }
1597
+ type ShippingStatus = "pending" | "label_created" | "in_transit" | "out_for_delivery" | "delivered" | "failed" | "returned";
1598
+ interface OrderShipping {
1599
+ carrier: string;
1600
+ service: string;
1601
+ tracking_number?: string | null;
1602
+ tracking_url?: string | null;
1603
+ label_url?: string | null;
1604
+ status: ShippingStatus;
1605
+ }
1606
+ interface ShipmentLine {
1607
+ order_item_id: string;
1608
+ quantity: number;
1609
+ }
1610
+ interface Shipment {
1611
+ id: string;
1612
+ location_id: string;
1613
+ lines: ShipmentLine[];
1614
+ carrier?: string | null;
1615
+ service?: string | null;
1616
+ tracking_number?: string | null;
1617
+ tracking_url?: string | null;
1618
+ label_url?: string | null;
1619
+ status: ShippingStatus;
1620
+ created_at: number;
1621
+ updated_at: number;
1622
+ }
1623
+ interface ShippingRate {
1624
+ id: string;
1625
+ provider: string;
1626
+ carrier: string;
1627
+ service: string;
1628
+ display_name: string;
1629
+ amount: number;
1630
+ currency: string;
1631
+ estimated_days?: number | null;
1632
+ }
1633
+ type ShippingAddress = Address;
1634
+ interface Parcel {
1635
+ length: number;
1636
+ width: number;
1637
+ height: number;
1638
+ weight: number;
1639
+ distance_unit: "in" | "cm";
1640
+ mass_unit: "oz" | "lb" | "g" | "kg";
1641
+ }
1642
+ interface PurchaseLabelResult {
1643
+ tracking_number: string;
1644
+ tracking_url?: string | null;
1645
+ label_url: string;
1646
+ carrier: string;
1647
+ service: string;
1648
+ }
1649
+ interface ShipResult {
1650
+ shipment_id: string;
1651
+ tracking_number: string;
1652
+ tracking_url?: string | null;
1653
+ label_url: string;
1654
+ }
1655
+ interface CustomsItem {
1656
+ description: string;
1657
+ quantity: number;
1658
+ net_weight: string;
1659
+ mass_unit: string;
1660
+ value_amount: string;
1661
+ value_currency: string;
1662
+ origin_country: string;
1663
+ tariff_number?: string | null;
1664
+ }
1665
+ interface CustomsDeclaration {
1666
+ contents_type: string;
1667
+ contents_explanation?: string | null;
1668
+ non_delivery_option: string;
1669
+ certify: boolean;
1670
+ certify_signer: string;
1671
+ items: CustomsItem[];
1672
+ }
1673
+ interface PromoCode {
1674
+ id: string;
1675
+ store_id: string;
1676
+ code: string;
1677
+ discounts: Discount[];
1678
+ conditions: Condition[];
1679
+ status: PromoCodeStatus;
1680
+ uses: number;
1681
+ created_at: number;
1682
+ updated_at: number;
1683
+ }
1684
+
1685
+ interface CreateLocationParams {
1686
+ key: string;
1687
+ address: Address;
1688
+ is_pickup_location?: boolean;
1689
+ }
1690
+ interface UpdateLocationParams {
1691
+ id: string;
1692
+ key: string;
1693
+ address: Address;
1694
+ is_pickup_location?: boolean;
1695
+ }
1696
+ interface DeleteLocationParams {
1697
+ id: string;
1698
+ }
1699
+ interface CreateMarketParams {
1700
+ key: string;
1701
+ currency: string;
1702
+ tax_mode: "inclusive" | "exclusive";
1703
+ payment_methods?: PaymentMethod[];
1704
+ zones?: Zone[];
1705
+ }
1706
+ interface UpdateMarketParams {
1707
+ id: string;
1708
+ key?: string;
1709
+ currency?: string;
1710
+ tax_mode?: "inclusive" | "exclusive";
1711
+ payment_methods?: PaymentMethod[];
1712
+ zones?: Zone[];
1713
+ }
1714
+ interface DeleteMarketParams {
1715
+ id: string;
1716
+ }
1717
+ interface RequestOptions<T = any> {
1718
+ headers?: Record<string, string>;
1719
+ params?: Record<string, any>;
1720
+ transformRequest?: (data: any) => any;
1721
+ onSuccess?: (ctx: {
1722
+ data: T;
1723
+ method: string;
1724
+ url: string;
1725
+ status: number;
1726
+ request?: any;
1727
+ duration_ms?: number;
1728
+ request_id?: string | null;
1729
+ }) => void | Promise<void>;
1730
+ onError?: (ctx: {
1731
+ error: any;
1732
+ method: string;
1733
+ url: string;
1734
+ status?: number;
1735
+ request?: any;
1736
+ response?: any;
1737
+ duration_ms?: number;
1738
+ request_id?: string | null;
1739
+ aborted?: boolean;
1740
+ }) => void | Promise<void>;
1741
+ }
1742
+ interface EshopItem {
1743
+ product_id: string;
1744
+ variant_id: string;
1745
+ quantity: number;
1746
+ }
1747
+ interface EshopQuoteItem {
1748
+ product_id: string;
1749
+ variant_id: string;
1750
+ quantity: number;
1751
+ price?: Price;
1752
+ }
1753
+ interface SlotRange {
1754
+ from: number;
1755
+ to: number;
1756
+ }
1757
+ interface ServiceQuoteItem {
1758
+ service_id: string;
1759
+ provider_id: string;
1760
+ slots: SlotRange[];
1761
+ forms?: FormEntry[];
1762
+ price?: Price;
1763
+ }
1764
+ interface ServiceCheckoutPart {
1765
+ service_id: string;
1766
+ provider_id: string;
1767
+ slots: SlotRange[];
1768
+ forms: FormEntry[];
1769
+ }
1770
+ interface ProductQuoteItemInput extends EshopQuoteItem {
1771
+ type: "product";
1772
+ }
1773
+ interface ServiceQuoteItemInput extends ServiceQuoteItem {
1774
+ type: "service";
1775
+ }
1776
+ type OrderQuoteItemInput = ProductQuoteItemInput | ServiceQuoteItemInput;
1777
+ type QuoteItemInput = OrderQuoteItemInput;
1778
+ type OrderQuoteCompatibleItemInput = OrderQuoteItemInput | EshopQuoteItem | ServiceQuoteItem;
1779
+ interface ProductCheckoutItemInput extends EshopItem {
1780
+ type: "product";
1781
+ id?: string;
1782
+ }
1783
+ interface ServiceCheckoutItemInput {
1784
+ type: "service";
1785
+ id?: string;
1786
+ service_id: string;
1787
+ provider_id: string;
1788
+ slots: SlotRange[];
1789
+ forms?: FormEntry[];
1790
+ }
1791
+ type OrderCheckoutItemInput = ProductCheckoutItemInput | ServiceCheckoutItemInput;
1792
+ type CheckoutItemInput = OrderCheckoutItemInput;
1793
+ type OrderCheckoutCompatibleItemInput = OrderCheckoutItemInput | EshopItem | ServiceCheckoutPart;
1794
+ interface TrustedProductCheckoutItemInput extends ProductCheckoutItemInput {
1795
+ price?: Price;
1796
+ }
1797
+ interface TrustedServiceCheckoutItemInput extends ServiceCheckoutItemInput {
1798
+ price?: Price;
1799
+ }
1800
+ type TrustedOrderCheckoutItemInput = TrustedProductCheckoutItemInput | TrustedServiceCheckoutItemInput;
1801
+ type TrustedOrderCheckoutCompatibleItemInput = TrustedOrderCheckoutItemInput | EshopItem | ServiceCheckoutPart;
1802
+ interface GetQuoteParams {
1803
+ store_id?: string;
1804
+ market?: string;
1805
+ items: OrderQuoteCompatibleItemInput[];
1806
+ shipping_address?: Address;
1807
+ billing_address?: Address;
1808
+ forms?: FormEntry[];
1809
+ payment_method_id?: string;
1810
+ promo_code?: string;
1811
+ shipping_method_id?: string;
1812
+ location?: ZoneLocation;
1813
+ }
1814
+ interface OrderCheckoutParams {
1815
+ store_id?: string;
1816
+ market?: string;
1817
+ items: OrderCheckoutCompatibleItemInput[];
1818
+ payment_method_id?: string;
1819
+ shipping_address?: Address;
1820
+ billing_address?: Address;
1821
+ forms?: FormEntry[];
1822
+ promo_code_id?: string;
1823
+ shipping_method_id?: string;
1824
+ }
1825
+ interface GetCurrentCartParams {
1826
+ store_id?: string;
1827
+ market?: string;
1828
+ }
1829
+ interface GetCartParams {
1830
+ id: string;
1831
+ store_id?: string;
1832
+ token?: string;
1833
+ }
1834
+ interface FindCartsParams {
1835
+ store_id?: string;
1836
+ profile_id?: string;
1837
+ statuses?: CartStatus[];
1838
+ origins?: CartOrigin[];
1839
+ has_items?: boolean;
1840
+ limit?: number;
1841
+ cursor?: string;
1842
+ }
1843
+ interface CreateCartParams {
1844
+ store_id?: string;
1845
+ profile_id: string;
1846
+ market: string;
1847
+ items?: TrustedOrderCheckoutCompatibleItemInput[];
1848
+ shipping_address?: Address | null;
1849
+ billing_address?: Address | null;
1850
+ forms?: FormEntry[];
1851
+ promo_code?: string | null;
1852
+ payment_method_id?: string | null;
1853
+ shipping_method_id?: string | null;
1854
+ }
1855
+ interface UpdateCartParams {
1856
+ id: string;
1857
+ store_id?: string;
1858
+ market?: string;
1859
+ items?: OrderCheckoutCompatibleItemInput[];
1860
+ shipping_address?: Address;
1861
+ billing_address?: Address;
1862
+ forms?: FormEntry[];
1863
+ promo_code?: string;
1864
+ payment_method_id?: string;
1865
+ shipping_method_id?: string;
1866
+ }
1867
+ interface AddCartItemParams {
1868
+ id: string;
1869
+ store_id?: string;
1870
+ item: OrderCheckoutCompatibleItemInput;
1871
+ }
1872
+ interface RemoveCartItemParams {
1873
+ id: string;
1874
+ store_id?: string;
1875
+ item_id?: string;
1876
+ product_id?: string;
1877
+ variant_id?: string;
1878
+ }
1879
+ interface ClearCartParams {
1880
+ id: string;
1881
+ store_id?: string;
1882
+ }
1883
+ interface QuoteCartParams {
1884
+ id: string;
1885
+ store_id?: string;
1886
+ }
1887
+ interface CheckoutCartParams {
1888
+ id: string;
1889
+ store_id?: string;
1890
+ payment_method_id?: string;
1891
+ }
1892
+ interface GetProductsParams {
1893
+ store_id?: string;
1894
+ ids?: string[];
1895
+ taxonomy_query?: TaxonomyQuery[];
1896
+ match_all?: boolean;
1897
+ status?: ProductStatus;
1898
+ query?: string | number;
1899
+ limit?: number;
1900
+ cursor?: string;
1901
+ sort_field?: string;
1902
+ sort_direction?: "asc" | "desc";
1903
+ created_at_from?: number | null;
1904
+ created_at_to?: number | null;
1905
+ }
1906
+ interface GetNodesParams {
1907
+ store_id?: string;
1908
+ ids?: string[];
1909
+ parent_id?: string;
1910
+ key?: string;
1911
+ limit?: number;
1912
+ cursor?: string;
1913
+ query?: string | number;
1914
+ status?: NodeStatus;
1915
+ sort_field?: string;
1916
+ sort_direction?: "asc" | "desc";
1917
+ created_at_from?: number;
1918
+ created_at_to?: number;
1919
+ }
1920
+ interface CreateNodeParams {
1921
+ store_id?: string;
1922
+ key: string;
1923
+ parent_id?: string | null;
1924
+ blocks?: Block[];
1925
+ taxonomies?: TaxonomyEntry[];
1926
+ slug?: Record<string, string>;
1927
+ }
1928
+ interface UpdateNodeParams {
1929
+ id: string;
1930
+ store_id?: string;
1931
+ key?: string;
1932
+ parent_id?: string | null;
1933
+ blocks?: Block[];
1934
+ taxonomies?: TaxonomyEntry[];
1935
+ status?: NodeStatus;
1936
+ slug?: Record<string, string>;
1937
+ }
1938
+ interface GetNodeParams {
1939
+ id?: string;
1940
+ slug?: string;
1941
+ key?: string;
1942
+ store_id?: string;
1943
+ }
1944
+ interface DeleteNodeParams {
1945
+ id: string;
1946
+ store_id?: string;
1947
+ }
1948
+ interface GetNodeChildrenParams {
1949
+ id: string;
1950
+ store_id?: string;
1951
+ limit?: number;
1952
+ cursor?: string;
1953
+ }
1954
+ interface UploadStoreMediaParams {
1955
+ store_id?: string;
1956
+ files?: File[];
1957
+ urls?: string[];
1958
+ }
1959
+ interface DeleteStoreMediaParams {
1960
+ id: string;
1961
+ media_id: string;
1962
+ }
1963
+ interface GetMediaParams {
1964
+ media_id: string;
1965
+ store_id?: string;
1966
+ }
1967
+ interface UpdateMediaParams {
1968
+ media_id: string;
1969
+ store_id?: string;
1970
+ slug?: Record<string, string>;
1971
+ }
1972
+ interface GetStoreMediaParams {
1973
+ store_id?: string;
1974
+ cursor?: string | null;
1975
+ limit: number;
1976
+ ids?: string[];
1977
+ query?: string;
1978
+ mime_type?: string;
1979
+ sort_field?: string;
1980
+ sort_direction?: "asc" | "desc";
1981
+ }
1982
+ interface LoginAccountParams {
1983
+ email?: string;
1984
+ provider: string;
1985
+ token?: string;
1986
+ }
1987
+ interface MagicLinkRequestParams {
1988
+ email: string;
1989
+ store_id?: string;
1990
+ }
1991
+ interface MagicLinkVerifyParams {
1992
+ email: string;
1993
+ code: string;
1994
+ }
1995
+ interface GetServicesParams {
1996
+ store_id?: string;
1997
+ ids?: string[];
1998
+ provider_id?: string;
1999
+ limit?: number;
2000
+ cursor?: string;
2001
+ query?: string | number;
2002
+ status?: ServiceStatus;
2003
+ sort_field?: string;
2004
+ sort_direction?: "asc" | "desc";
2005
+ created_at_from?: number;
2006
+ created_at_to?: number;
2007
+ taxonomy_query?: TaxonomyQuery[];
2008
+ match_all?: boolean;
2009
+ from?: number;
2010
+ to?: number;
2011
+ }
2012
+ interface TimelinePoint {
2013
+ timestamp: number;
2014
+ booked: number;
2015
+ }
2016
+ interface ProviderWithTimeline {
2017
+ id: string;
2018
+ key: string;
2019
+ store_id: string;
2020
+ slug: Record<string, string>;
2021
+ status: ProviderStatus;
2022
+ blocks: Block[];
2023
+ taxonomies: TaxonomyEntry[];
2024
+ created_at: number;
2025
+ updated_at: number;
2026
+ working_days?: WorkingDay[];
2027
+ specific_dates?: SpecificDate[];
2028
+ timeline: TimelinePoint[];
2029
+ }
2030
+ interface GetAnalyticsParams {
2031
+ metrics?: string[];
2032
+ period?: string;
2033
+ start_date?: string;
2034
+ end_date?: string;
2035
+ interval?: string;
2036
+ }
2037
+ interface GetAnalyticsHealthParams {
2038
+ }
2039
+ interface TrackEmailOpenParams {
2040
+ tracking_pixel_id: string;
2041
+ }
2042
+ interface GetDeliveryStatsParams {
2043
+ }
2044
+ type StoreRole = "admin" | "owner" | "super";
2045
+ type Discount = {
2046
+ type: "items_percentage";
2047
+ market_id: string;
2048
+ bps: number;
2049
+ } | {
2050
+ type: "items_fixed";
2051
+ market_id: string;
2052
+ amount: number;
2053
+ } | {
2054
+ type: "shipping_percentage";
2055
+ market_id: string;
2056
+ bps: number;
2057
+ };
2058
+ type ConditionValue = {
2059
+ type: "ids";
2060
+ value: string[];
2061
+ } | {
2062
+ type: "amount";
2063
+ value: number;
2064
+ } | {
2065
+ type: "count";
2066
+ value: number;
2067
+ } | {
2068
+ type: "date_range";
2069
+ value: {
2070
+ start?: number;
2071
+ end?: number;
2072
+ };
2073
+ };
2074
+ interface Condition {
2075
+ type: "products" | "services" | "min_order_amount" | "date_range" | "max_uses" | "max_uses_per_user";
2076
+ value: ConditionValue;
2077
+ }
2078
+ interface CreatePromoCodeParams {
2079
+ store_id?: string;
2080
+ code: string;
2081
+ discounts: Discount[];
2082
+ conditions: Condition[];
2083
+ }
2084
+ interface UpdatePromoCodeParams {
2085
+ id: string;
2086
+ store_id?: string;
2087
+ code?: string;
2088
+ discounts?: Discount[];
2089
+ conditions?: Condition[];
2090
+ status?: PromoCodeStatus;
2091
+ }
2092
+ interface DeletePromoCodeParams {
2093
+ id: string;
2094
+ store_id?: string;
2095
+ }
2096
+ interface GetPromoCodeParams {
2097
+ id: string;
2098
+ store_id?: string;
2099
+ }
2100
+ interface GetPromoCodesParams {
2101
+ store_id?: string;
2102
+ ids?: string[];
2103
+ query?: string | number;
2104
+ status?: PromoCodeStatus;
2105
+ limit?: number;
2106
+ cursor?: string;
2107
+ sort_field?: string;
2108
+ sort_direction?: "asc" | "desc";
2109
+ created_at_from?: number;
2110
+ created_at_to?: number;
2111
+ starts_at_from?: number;
2112
+ starts_at_to?: number;
2113
+ expires_at_from?: number;
2114
+ expires_at_to?: number;
2115
+ }
2116
+ interface CreateStoreParams {
2117
+ key: string;
2118
+ timezone: string;
2119
+ billing_email: string;
2120
+ languages?: Language[];
2121
+ emails?: StoreEmails;
2122
+ }
2123
+ interface UpdateStoreParams {
2124
+ id: string;
2125
+ key?: string;
2126
+ timezone?: string;
2127
+ languages?: Language[];
2128
+ emails?: StoreEmails;
2129
+ }
2130
+ interface DeleteStoreParams {
2131
+ id: string;
2132
+ }
2133
+ interface GetStoreParams {
2134
+ }
2135
+ interface SubscribeParams {
2136
+ store_id?: string;
2137
+ plan_id: string;
2138
+ success_url: string;
2139
+ cancel_url: string;
2140
+ }
2141
+ interface CreatePortalSessionParams {
2142
+ store_id?: string;
2143
+ return_url: string;
2144
+ }
2145
+ interface AddMemberParams {
2146
+ email: string;
2147
+ role?: StoreRole;
2148
+ store_id?: string;
2149
+ }
2150
+ interface InviteUserParams extends AddMemberParams {
2151
+ }
2152
+ interface RemoveMemberParams {
2153
+ account_id: string;
2154
+ }
2155
+ interface TestWebhookParams {
2156
+ webhook: Webhook;
2157
+ }
2158
+ interface CreateProductVariantInput {
2159
+ sku?: string;
2160
+ prices: Price[];
2161
+ inventory: ProductInventory[];
2162
+ attributes: Block[];
2163
+ weight?: number;
2164
+ }
2165
+ interface UpdateProductVariantInput {
2166
+ id: string;
2167
+ sku?: string | null;
2168
+ prices?: Price[];
2169
+ inventory?: ProductInventory[];
2170
+ attributes?: Block[];
2171
+ weight?: number | null;
2172
+ }
2173
+ interface CreateProductParams {
2174
+ store_id?: string;
2175
+ key: string;
2176
+ slug?: Record<string, string>;
2177
+ blocks?: Block[];
2178
+ taxonomies?: TaxonomyEntry[];
2179
+ filters?: TaxonomyEntry[];
2180
+ variants?: CreateProductVariantInput[];
2181
+ }
2182
+ interface UpdateProductParams {
2183
+ id: string;
2184
+ store_id?: string;
2185
+ key?: string;
2186
+ slug?: Record<string, string>;
2187
+ blocks?: Block[];
2188
+ taxonomies?: TaxonomyEntry[];
2189
+ filters?: TaxonomyEntry[];
2190
+ variants?: UpdateProductVariantInput[];
2191
+ status?: ProductStatus;
2192
+ }
2193
+ interface DeleteProductParams {
2194
+ id: string;
2195
+ store_id?: string;
2196
+ }
2197
+ interface GetProductParams {
2198
+ id?: string;
2199
+ slug?: string;
2200
+ store_id?: string;
2201
+ }
2202
+ interface GetOrderParams {
2203
+ id: string;
2204
+ store_id?: string;
2205
+ }
2206
+ interface GetOrdersParams {
2207
+ store_id?: string;
2208
+ profile_id?: string;
2209
+ statuses?: string[];
2210
+ item_statuses?: string[];
2211
+ product_ids?: string[];
2212
+ verified?: boolean;
2213
+ query?: string | number | null;
2214
+ limit?: number | null;
2215
+ cursor?: string | null;
2216
+ sort_field?: string | null;
2217
+ sort_direction?: "asc" | "desc" | null;
2218
+ created_at_from?: number | null;
2219
+ created_at_to?: number | null;
2220
+ profile_list_id?: string;
2221
+ }
2222
+ interface OrderUpdateItem extends EshopItem {
2223
+ }
2224
+ interface UpdateOrderParams {
2225
+ id: string;
2226
+ store_id?: string;
2227
+ confirm?: boolean;
2228
+ cancel?: boolean;
2229
+ shipping_address?: Address | null;
2230
+ billing_address?: Address | null;
2231
+ forms?: FormEntry[];
2232
+ items?: TrustedOrderCheckoutCompatibleItemInput[];
2233
+ payment?: OrderPayment;
2234
+ }
2235
+ interface CreateProviderParams {
2236
+ store_id?: string;
2237
+ key: string;
2238
+ slug?: Record<string, string>;
2239
+ status?: ProviderStatus;
2240
+ blocks?: Block[];
2241
+ taxonomies?: TaxonomyEntry[];
2242
+ filters?: TaxonomyEntry[];
2243
+ }
2244
+ interface UpdateProviderParams {
2245
+ id: string;
2246
+ store_id?: string;
2247
+ key?: string;
2248
+ slug?: Record<string, string>;
2249
+ status?: ProviderStatus;
2250
+ blocks?: Block[];
2251
+ taxonomies?: TaxonomyEntry[];
2252
+ filters?: TaxonomyEntry[];
2253
+ }
2254
+ interface DeleteProviderParams {
2255
+ id: string;
2256
+ store_id?: string;
2257
+ }
2258
+ interface ServiceProviderInput {
2259
+ provider_id: string;
2260
+ store_id?: string;
2261
+ prices?: Price[];
2262
+ durations?: ServiceDuration[];
2263
+ working_days: WorkingDay[];
2264
+ specific_dates: SpecificDate[];
2265
+ }
2266
+ interface CreateServiceParams {
2267
+ store_id?: string;
2268
+ key: string;
2269
+ slug?: Record<string, string>;
2270
+ blocks?: Block[];
2271
+ taxonomies?: TaxonomyEntry[];
2272
+ filters?: TaxonomyEntry[];
2273
+ location?: ZoneLocation;
2274
+ status?: ServiceStatus;
2275
+ }
2276
+ interface UpdateServiceParams {
2277
+ id: string;
2278
+ store_id?: string;
2279
+ key?: string;
2280
+ slug?: Record<string, string>;
2281
+ blocks?: Block[];
2282
+ taxonomies?: TaxonomyEntry[];
2283
+ filters?: TaxonomyEntry[];
2284
+ location?: ZoneLocation | null;
2285
+ status?: ServiceStatus;
2286
+ }
2287
+ interface CreateServiceProviderParams {
2288
+ store_id?: string;
2289
+ service_id: string;
2290
+ provider_id: string;
2291
+ working_days: WorkingDay[];
2292
+ specific_dates: SpecificDate[];
2293
+ prices?: Price[];
2294
+ durations?: ServiceDuration[];
2295
+ slot_interval: number;
2296
+ forms?: FormEntry[];
2297
+ reminders?: number[];
2298
+ min_advance?: number;
2299
+ max_advance?: number;
2300
+ }
2301
+ interface UpdateServiceProviderParams {
2302
+ store_id?: string;
2303
+ id: string;
2304
+ working_days?: WorkingDay[];
2305
+ specific_dates?: SpecificDate[];
2306
+ prices?: Price[];
2307
+ durations?: ServiceDuration[];
2308
+ slot_interval?: number;
2309
+ forms?: FormEntry[];
2310
+ reminders?: number[];
2311
+ min_advance?: number;
2312
+ max_advance?: number;
2313
+ }
2314
+ interface DeleteServiceProviderParams {
2315
+ store_id?: string;
2316
+ id: string;
2317
+ }
2318
+ interface FindServiceProvidersParams {
2319
+ store_id?: string;
2320
+ service_id?: string;
2321
+ provider_id?: string;
2322
+ }
2323
+ interface DeleteServiceParams {
2324
+ id: string;
2325
+ store_id?: string;
2326
+ }
2327
+ interface GetServiceParams {
2328
+ id?: string;
2329
+ slug?: string;
2330
+ store_id?: string;
2331
+ }
2332
+ interface GetProvidersParams {
2333
+ store_id?: string;
2334
+ service_id?: string;
2335
+ ids?: string[];
2336
+ taxonomy_query?: TaxonomyQuery[];
2337
+ match_all?: boolean;
2338
+ query?: string | number | null;
2339
+ status?: ProviderStatus;
2340
+ limit?: number;
2341
+ cursor?: string;
2342
+ sort_field?: string | null;
2343
+ sort_direction?: "asc" | "desc" | null;
2344
+ created_at_from?: number | null;
2345
+ created_at_to?: number | null;
2346
+ from?: number;
2347
+ to?: number;
2348
+ }
2349
+ interface GetProviderParams {
2350
+ id?: string;
2351
+ slug?: string;
2352
+ store_id?: string;
2353
+ }
2354
+ interface SearchOrderServiceItemsParams {
2355
+ store_id?: string;
2356
+ profile_id?: string;
2357
+ service_ids?: string[];
2358
+ provider_ids?: string[];
2359
+ from?: number;
2360
+ to?: number;
2361
+ item_statuses?: string[];
2362
+ sort_field?: string;
2363
+ sort_order?: string;
2364
+ limit?: number;
2365
+ cursor?: string;
2366
+ verified?: boolean;
2367
+ query?: string | number;
2368
+ profile_list_id?: string;
2369
+ }
2370
+ interface AccountAddress {
2371
+ label?: string;
2372
+ address: Address;
2373
+ }
2374
+ interface AccountApiToken {
2375
+ id: string | null;
2376
+ value?: string;
2377
+ name?: string | null;
2378
+ created_at?: number;
2379
+ expires_at?: number | null;
2380
+ type?: string;
2381
+ }
2382
+ interface UpdateAccountProfileParams {
2383
+ phone_numbers?: string[];
2384
+ addresses?: AccountAddress[];
2385
+ api_tokens?: AccountApiToken[] | null;
2386
+ }
2387
+ interface SearchAccountsParams {
2388
+ limit?: number;
2389
+ cursor?: string | null;
2390
+ query?: string | number;
2391
+ owner?: string;
2392
+ store_id?: string;
2393
+ sort_field?: string | null;
2394
+ sort_direction?: "asc" | "desc" | null;
2395
+ }
2396
+ interface DeleteAccountParams {
2397
+ }
2398
+ interface TriggerNotificationParams {
2399
+ channel: string;
2400
+ store_id: string;
2401
+ email_template_id: string;
2402
+ mailbox_id: string;
2403
+ recipients: string[];
2404
+ vars?: Record<string, any>;
2405
+ }
2406
+ interface GetEmailTemplatesParams {
2407
+ store_id?: string;
2408
+ ids?: string[];
2409
+ key?: string;
2410
+ limit?: number;
2411
+ cursor?: string;
2412
+ query?: string | number;
2413
+ status?: EmailTemplateStatus;
2414
+ sort_field?: string;
2415
+ sort_direction?: "asc" | "desc";
2416
+ created_at_from?: number;
2417
+ created_at_to?: number;
2418
+ }
2419
+ interface CreateEmailTemplateParams {
2420
+ store_id?: string;
2421
+ key: string;
2422
+ subject?: Record<string, string>;
2423
+ body?: string;
2424
+ from_name?: string;
2425
+ from_email?: string;
2426
+ reply_to?: string;
2427
+ preheader?: string;
2428
+ variables?: EmailTemplateVariable[];
2429
+ sample_data?: Record<string, unknown>;
2430
+ }
2431
+ interface UpdateEmailTemplateParams {
2432
+ id: string;
2433
+ store_id?: string;
2434
+ key?: string;
2435
+ subject?: Record<string, string>;
2436
+ body?: string;
2437
+ from_name?: string;
2438
+ from_email?: string;
2439
+ reply_to?: string;
2440
+ preheader?: string;
2441
+ variables?: EmailTemplateVariable[];
2442
+ sample_data?: Record<string, unknown>;
2443
+ status?: EmailTemplateStatus;
2444
+ }
2445
+ interface PreviewEmailTemplateParams {
2446
+ id: string;
2447
+ store_id?: string;
2448
+ subject?: Record<string, string>;
2449
+ body?: string;
2450
+ preheader?: string | null;
2451
+ vars?: Record<string, any>;
2452
+ }
2453
+ interface PreviewEmailTemplateWarning {
2454
+ kind: string;
2455
+ variable: string;
2456
+ message: string;
2457
+ }
2458
+ interface PreviewEmailTemplateResponse {
2459
+ subject: string;
2460
+ html: string;
2461
+ warnings: PreviewEmailTemplateWarning[];
2462
+ }
2463
+ interface GetEmailTemplateParams {
2464
+ id?: string;
2465
+ key?: string;
2466
+ store_id?: string;
2467
+ }
2468
+ interface DeleteEmailTemplateParams {
2469
+ id: string;
2470
+ store_id?: string;
2471
+ }
2472
+ interface GetFormsParams {
2473
+ store_id?: string;
2474
+ ids?: string[];
2475
+ key?: string;
2476
+ limit?: number;
2477
+ cursor?: string;
2478
+ query?: string | number;
2479
+ status?: FormStatus;
2480
+ sort_field?: string;
2481
+ sort_direction?: "asc" | "desc";
2482
+ created_at_from?: number;
2483
+ created_at_to?: number;
2484
+ }
2485
+ interface CreateFormParams {
2486
+ store_id?: string;
2487
+ key: string;
2488
+ schema?: FormSchema[];
2489
+ }
2490
+ interface UpdateFormParams {
2491
+ id: string;
2492
+ store_id?: string;
2493
+ key?: string;
2494
+ schema?: FormSchema[];
2495
+ status?: FormStatus;
2496
+ }
2497
+ interface GetFormParams {
2498
+ id?: string;
2499
+ key?: string;
2500
+ store_id?: string;
2501
+ }
2502
+ interface DeleteFormParams {
2503
+ id: string;
2504
+ store_id?: string;
2505
+ }
2506
+ interface SubmitFormParams {
2507
+ form_id: string;
2508
+ store_id?: string;
2509
+ fields: FormField[];
2510
+ }
2511
+ interface GetFormSubmissionsParams {
2512
+ form_ids?: string[];
2513
+ store_id?: string;
2514
+ profile_id?: string;
2515
+ query?: string | number;
2516
+ limit?: number;
2517
+ cursor?: string;
2518
+ sort_field?: string;
2519
+ sort_direction?: "asc" | "desc";
2520
+ created_at_from?: number;
2521
+ created_at_to?: number;
2522
+ }
2523
+ interface FindActivitiesParams {
2524
+ store_id?: string;
2525
+ profile_id?: string;
2526
+ types?: string[];
2527
+ from?: number;
2528
+ to?: number;
2529
+ limit?: number;
2530
+ cursor?: string;
2531
+ }
2532
+ interface GetFormSubmissionParams {
2533
+ id: string;
2534
+ form_id: string;
2535
+ store_id?: string;
2536
+ }
2537
+ interface UpdateFormSubmissionParams {
2538
+ id: string;
2539
+ form_id: string;
2540
+ store_id?: string;
2541
+ fields: FormField[];
2542
+ }
2543
+ interface GetTaxonomiesParams {
2544
+ store_id?: string;
2545
+ parent_id?: string;
2546
+ ids?: string[];
2547
+ key?: string;
2548
+ limit?: number;
2549
+ cursor?: string;
2550
+ query?: string | number;
2551
+ status?: TaxonomyStatus;
2552
+ sort_field?: string;
2553
+ sort_direction?: "asc" | "desc";
2554
+ created_at_from?: number;
2555
+ created_at_to?: number;
2556
+ }
2557
+ interface CreateTaxonomyParams {
2558
+ store_id?: string;
2559
+ key: string;
2560
+ parent_id?: string | null;
2561
+ schema?: TaxonomySchema[];
2562
+ }
2563
+ interface UpdateTaxonomyParams {
2564
+ id: string;
2565
+ store_id?: string;
2566
+ key?: string;
2567
+ parent_id?: string | null;
2568
+ schema?: TaxonomySchema[];
2569
+ status?: TaxonomyStatus;
2570
+ }
2571
+ interface GetTaxonomyParams {
2572
+ id?: string;
2573
+ key?: string;
2574
+ store_id?: string;
2575
+ }
2576
+ interface DeleteTaxonomyParams {
2577
+ id: string;
2578
+ store_id?: string;
2579
+ }
2580
+ interface GetTaxonomyChildrenParams {
2581
+ id: string;
2582
+ store_id?: string;
2583
+ }
2584
+ interface GetMeParams {
2585
+ }
2586
+ interface LogoutParams {
2587
+ }
2588
+ interface GetStoresParams {
2589
+ query?: string | number;
2590
+ limit?: number;
2591
+ cursor?: string;
2592
+ sort_field?: string;
2593
+ sort_direction?: "asc" | "desc";
2594
+ }
2595
+ interface GetSubscriptionPlansParams {
2596
+ }
2597
+ interface SetupAnalyticsParams {
2598
+ store_id?: string;
2599
+ }
2600
+ interface GetStoreMediaParams2 {
2601
+ id: string;
2602
+ cursor?: string | null;
2603
+ limit: number;
2604
+ ids?: string[];
2605
+ query?: string | number;
2606
+ mime_type?: string;
2607
+ sort_field?: string;
2608
+ sort_direction?: "asc" | "desc";
2609
+ }
2610
+ interface ProcessOrderRefundParams {
2611
+ id: string;
2612
+ amount: number;
2613
+ }
2614
+ type SystemTemplateKey = "system:order-status-update" | "system:user-confirmation" | "system:forgot-password";
2615
+ interface GetAvailabilityParams {
2616
+ store_id?: string;
2617
+ service_id: string;
2618
+ from: number;
2619
+ to: number;
2620
+ provider_id?: string;
2621
+ }
2622
+ interface AvailabilitySlot {
2623
+ from: number;
2624
+ to: number;
2625
+ spots: number;
2626
+ }
2627
+ interface DaySlots {
2628
+ date: string;
2629
+ slots: AvailabilitySlot[];
2630
+ }
2631
+ interface ProviderAvailability {
2632
+ provider_id: string;
2633
+ provider_key: string;
2634
+ days: DaySlots[];
2635
+ }
2636
+ interface AvailabilityResponse {
2637
+ from: number;
2638
+ to: number;
2639
+ providers: ProviderAvailability[];
2640
+ }
2641
+ interface Slot {
2642
+ id: string;
2643
+ service_id: string;
2644
+ provider_id: string;
2645
+ from: number;
2646
+ to: number;
2647
+ time_text: string;
2648
+ date_text: string;
2649
+ }
2650
+ interface CreateWorkflowParams {
2651
+ store_id?: string;
2652
+ key: string;
2653
+ status?: WorkflowStatus;
2654
+ nodes: Record<string, WorkflowNode>;
2655
+ edges: WorkflowEdge[];
2656
+ schedule?: string;
2657
+ }
2658
+ interface UpdateWorkflowParams {
2659
+ id: string;
2660
+ store_id?: string;
2661
+ key: string;
2662
+ status?: WorkflowStatus;
2663
+ nodes: Record<string, WorkflowNode>;
2664
+ edges: WorkflowEdge[];
2665
+ schedule?: string;
2666
+ }
2667
+ interface DeleteWorkflowParams {
2668
+ id: string;
2669
+ store_id?: string;
2670
+ }
2671
+ interface GetWorkflowParams {
2672
+ id: string;
2673
+ store_id?: string;
2674
+ }
2675
+ interface GetWorkflowsParams {
2676
+ store_id?: string;
2677
+ ids?: string[];
2678
+ query?: string | number;
2679
+ status?: WorkflowStatus;
2680
+ limit?: number;
2681
+ cursor?: string;
2682
+ sort_field?: string;
2683
+ sort_direction?: "asc" | "desc";
2684
+ created_at_from?: number;
2685
+ created_at_to?: number;
2686
+ }
2687
+ interface TriggerWorkflowParams {
2688
+ secret: string;
2689
+ input?: Record<string, unknown>;
2690
+ }
2691
+ interface GetWorkflowExecutionsParams {
2692
+ workflow_id: string;
2693
+ store_id?: string;
2694
+ status?: ExecutionStatus;
2695
+ limit?: number;
2696
+ cursor?: string;
2697
+ }
2698
+ interface GetWorkflowExecutionParams {
2699
+ workflow_id: string;
2700
+ execution_id: string;
2701
+ store_id?: string;
2702
+ }
2703
+ interface CreateProfileListParams {
2704
+ store_id?: string;
2705
+ key: string;
2706
+ name?: string;
2707
+ description?: string | null;
2708
+ type?: ProfileListType;
2709
+ source?: ProfileListSource;
2710
+ }
2711
+ interface UpdateProfileListParams {
2712
+ id: string;
2713
+ store_id?: string;
2714
+ key?: string;
2715
+ name?: string;
2716
+ description?: string | null;
2717
+ status?: ProfileListStatus;
2718
+ type?: ProfileListType;
2719
+ }
2720
+ interface FindProfileListsParams {
2721
+ store_id?: string;
2722
+ ids?: string[];
2723
+ status?: ProfileListStatus;
2724
+ query?: string | number;
2725
+ limit?: number;
2726
+ cursor?: string;
2727
+ sort_field?: string;
2728
+ sort_direction?: "asc" | "desc";
2729
+ }
2730
+ interface GetProfileListParams {
2731
+ id: string;
2732
+ store_id?: string;
2733
+ }
2734
+ interface AddProfileListProfileParams {
2735
+ store_id?: string;
2736
+ profile_list_id: string;
2737
+ profile_id: string;
2738
+ fields?: Record<string, unknown>;
2739
+ lead_description?: string | null;
2740
+ }
2741
+ interface UpdateProfileListProfileParams {
2742
+ store_id?: string;
2743
+ profile_list_id: string;
2744
+ profile_id: string;
2745
+ status?: ProfileListMembershipStatus;
2746
+ fields?: Record<string, unknown>;
2747
+ lead_description?: string | null;
2748
+ }
2749
+ interface RemoveProfileListProfileParams {
2750
+ store_id?: string;
2751
+ profile_list_id: string;
2752
+ profile_id: string;
2753
+ }
2754
+ interface FindProfileListProfilesParams {
2755
+ store_id?: string;
2756
+ profile_list_id?: string;
2757
+ profile_id?: string;
2758
+ status?: ProfileListMembershipStatus;
2759
+ limit?: number;
2760
+ cursor?: string;
2761
+ }
2762
+ interface ImportProfileRowInput {
2763
+ email: string;
2764
+ profile_id?: string;
2765
+ fields?: Record<string, unknown>;
2766
+ lead_description?: string;
2767
+ }
2768
+ interface ImportProfilesParams {
2769
+ store_id?: string;
2770
+ csv?: string;
2771
+ spreadsheet_base64?: string;
2772
+ sheet_name?: string | null;
2773
+ email_column?: string | null;
2774
+ field_mappings?: ImportFieldMapping[];
2775
+ rows?: ImportProfileRowInput[];
2776
+ }
2777
+ interface ImportProfilesIntoProfileListParams {
2778
+ store_id?: string;
2779
+ profile_list_id: string;
2780
+ csv?: string;
2781
+ spreadsheet_base64?: string;
2782
+ sheet_name?: string | null;
2783
+ email_column?: string | null;
2784
+ field_mappings?: ImportFieldMapping[];
2785
+ rows?: ImportProfileRowInput[];
2786
+ }
2787
+ interface ImportProfilesPreviewParams {
2788
+ store_id?: string;
2789
+ csv?: string;
2790
+ spreadsheet_base64?: string;
2791
+ sheet_name?: string | null;
2792
+ }
2793
+ interface ImportProfileListPreviewParams extends ImportProfilesPreviewParams {
2794
+ profile_list_id: string;
2795
+ }
2796
+ interface ImportFieldMapping {
2797
+ source: string;
2798
+ field: string;
2799
+ }
2800
+ interface ImportPreviewRow {
2801
+ row: number;
2802
+ values: Record<string, unknown>;
2803
+ }
2804
+ interface ImportProfilesPreviewResult {
2805
+ sheets: string[];
2806
+ selected_sheet?: string | null;
2807
+ header_row: number;
2808
+ headers: string[];
2809
+ detected_email_column?: string | null;
2810
+ rows_total: number;
2811
+ sample_rows: ImportPreviewRow[];
2812
+ suggested_field_mappings: ImportFieldMapping[];
2813
+ }
2814
+ interface ImportProfileRowError {
2815
+ row: number;
2816
+ field: string;
2817
+ message: string;
2818
+ }
2819
+ interface ImportProfileRowResult {
2820
+ row: number;
2821
+ email: string;
2822
+ profile_id?: string | null;
2823
+ created: boolean;
2824
+ updated: boolean;
2825
+ error?: string | null;
2826
+ }
2827
+ interface ImportProfilesResult {
2828
+ rows_total: number;
2829
+ profiles_created: number;
2830
+ profiles_updated: number;
2831
+ rows_failed: number;
2832
+ errors: ImportProfileRowError[];
2833
+ rows: ImportProfileRowResult[];
2834
+ }
2835
+ interface ImportProfileListRowResult {
2836
+ row: number;
2837
+ email: string;
2838
+ profile_id?: string | null;
2839
+ profile_created: boolean;
2840
+ profile_updated: boolean;
2841
+ added_to_list: boolean;
2842
+ updated_in_list: boolean;
2843
+ error?: string | null;
2844
+ }
2845
+ interface ImportProfilesIntoProfileListResult {
2846
+ rows_total: number;
2847
+ profiles_created: number;
2848
+ profiles_updated: number;
2849
+ profiles_added: number;
2850
+ profiles_updated_in_list: number;
2851
+ profiles_failed_to_add: number;
2852
+ rows_failed: number;
2853
+ errors: ImportProfileRowError[];
2854
+ rows: ImportProfileListRowResult[];
2855
+ }
2856
+ interface SubscribeProfileListParams {
2857
+ store_id?: string;
2858
+ id: string;
2859
+ profile_id: string;
2860
+ price_id?: string;
2861
+ success_url?: string;
2862
+ cancel_url?: string;
2863
+ confirm_url?: string;
2864
+ }
2865
+ interface ProfileListAccessParams {
2866
+ store_id?: string;
2867
+ id: string;
2868
+ }
2869
+ interface CreateMailboxParams {
2870
+ store_id?: string;
2871
+ key: string;
2872
+ email: string;
2873
+ from_name?: string;
2874
+ reply_to_email?: string | null;
2875
+ provider: MailboxProvider;
2876
+ password?: string;
2877
+ daily_limit?: number;
2878
+ }
2879
+ interface UpdateMailboxParams {
2880
+ id: string;
2881
+ store_id?: string;
2882
+ key?: string;
2883
+ email?: string;
2884
+ from_name?: string;
2885
+ reply_to_email?: string | null;
2886
+ provider?: MailboxProvider;
2887
+ password?: string;
2888
+ status?: MailboxStatus;
2889
+ daily_limit?: number;
2890
+ }
2891
+ interface FindMailboxesParams {
2892
+ store_id?: string;
2893
+ ids?: string[];
2894
+ status?: MailboxStatus;
2895
+ provider_type?: "fake" | "smtp_imap";
2896
+ query?: string | number;
2897
+ limit?: number;
2898
+ cursor?: string;
2899
+ sort_field?: string;
2900
+ sort_direction?: "asc" | "desc";
2901
+ }
2902
+ interface GetMailboxParams {
2903
+ id: string;
2904
+ store_id?: string;
2905
+ }
2906
+ interface TestMailboxParams {
2907
+ id: string;
2908
+ store_id?: string;
2909
+ }
2910
+ interface PrepareMailboxParams {
2911
+ id: string;
2912
+ store_id?: string;
2913
+ }
2914
+ interface TestMailboxResult {
2915
+ ok: boolean;
2916
+ smtp_ok: boolean;
2917
+ imap_ok: boolean;
2918
+ skipped: boolean;
2919
+ smtp_error?: string | null;
2920
+ imap_error?: string | null;
2921
+ }
2922
+ interface CreateCampaignParams {
2923
+ store_id?: string;
2924
+ key: string;
2925
+ name?: string;
2926
+ mailbox_ids: string[];
2927
+ steps: OutreachStep[];
2928
+ }
2929
+ interface UpdateCampaignParams {
2930
+ id: string;
2931
+ store_id?: string;
2932
+ key?: string;
2933
+ name?: string;
2934
+ mailbox_ids?: string[];
2935
+ status?: CampaignStatus;
2936
+ steps?: OutreachStep[];
2937
+ }
2938
+ interface FindCampaignsParams {
2939
+ store_id?: string;
2940
+ ids?: string[];
2941
+ status?: CampaignStatus;
2942
+ mailbox_id?: string;
2943
+ query?: string | number;
2944
+ limit?: number;
2945
+ cursor?: string;
2946
+ sort_field?: string;
2947
+ sort_direction?: "asc" | "desc";
2948
+ }
2949
+ interface GetCampaignParams {
2950
+ id: string;
2951
+ store_id?: string;
2952
+ }
2953
+ interface LaunchCampaignParams {
2954
+ id: string;
2955
+ store_id?: string;
2956
+ }
2957
+ interface DuplicateCampaignParams {
2958
+ id: string;
2959
+ store_id?: string;
2960
+ key?: string;
2961
+ name?: string;
2962
+ copy_recipients?: boolean;
2963
+ }
2964
+ interface GetCampaignLaunchReadinessParams {
2965
+ id: string;
2966
+ store_id?: string;
2967
+ }
2968
+ interface ImportCampaignRecipientsParams {
2969
+ id: string;
2970
+ store_id?: string;
2971
+ profile_list_id?: string;
2972
+ profile_list_ids?: string[];
2973
+ profile_ids?: string[];
2974
+ emails?: string[];
2975
+ }
2976
+ interface CampaignRecipientImportResult {
2977
+ imported_count: number;
2978
+ existing_count: number;
2979
+ skipped_count: number;
2980
+ draft_count: number;
2981
+ }
2982
+ interface GenerateOutreachPersonalizedDraftsParams {
2983
+ id: string;
2984
+ store_id?: string;
2985
+ step_position?: number;
2986
+ profile_ids?: string[];
2987
+ overwrite?: boolean;
2988
+ model_integration_id?: string;
2989
+ instructions?: string;
2990
+ }
2991
+ interface FindCampaignRecipientsParams {
2992
+ store_id?: string;
2993
+ campaign_id?: string;
2994
+ profile_id?: string;
2995
+ mailbox_id?: string;
2996
+ status?: CampaignRecipientStatus;
2997
+ limit?: number;
2998
+ cursor?: string;
2999
+ }
3000
+ interface UpdateCampaignRecipientParams {
3001
+ store_id?: string;
3002
+ id: string;
3003
+ mailbox_id?: string | null;
3004
+ lead_description?: string | null;
3005
+ fields?: Record<string, unknown>;
3006
+ }
3007
+ interface UpdateCampaignRecipientDraftParams {
3008
+ store_id?: string;
3009
+ id: string;
3010
+ draft_id: string;
3011
+ template_vars?: Record<string, any>;
3012
+ }
3013
+ interface FindCampaignMessagesParams {
3014
+ store_id?: string;
3015
+ campaign_id?: string;
3016
+ campaign_recipient_id?: string;
3017
+ profile_id?: string;
3018
+ mailbox_id?: string;
3019
+ direction?: CampaignMessageDirection;
3020
+ kind?: CampaignMessageKind;
3021
+ status?: CampaignMessageStatus;
3022
+ copy_source?: CampaignMessageCopySource;
3023
+ step_position?: number;
3024
+ query?: string;
3025
+ limit?: number;
3026
+ cursor?: string;
3027
+ }
3028
+ interface GetCampaignRecipientConversationParams {
3029
+ store_id?: string;
3030
+ id: string;
3031
+ message_limit?: number;
3032
+ after_created_at?: number;
3033
+ after_id?: string;
3034
+ }
3035
+ interface ReplyCampaignRecipientParams {
3036
+ store_id?: string;
3037
+ id: string;
3038
+ subject?: string | null;
3039
+ body: string;
3040
+ attachments?: string[];
3041
+ }
3042
+ interface StopCampaignRecipientParams {
3043
+ store_id?: string;
3044
+ id: string;
3045
+ }
3046
+ interface UpdateCampaignMessageParams {
3047
+ id: string;
3048
+ store_id?: string;
3049
+ template_vars?: Record<string, any>;
3050
+ }
3051
+ interface CreateSuppressionParams {
3052
+ store_id?: string;
3053
+ campaign_id?: string;
3054
+ profile_id?: string;
3055
+ email?: string;
3056
+ domain?: string;
3057
+ reason?: SuppressionReason;
3058
+ source?: SuppressionSource;
3059
+ }
3060
+ interface UpdateSuppressionParams {
3061
+ id: string;
3062
+ store_id?: string;
3063
+ status?: SuppressionStatus;
3064
+ reason?: SuppressionReason;
3065
+ }
3066
+ interface FindSuppressionsParams {
3067
+ store_id?: string;
3068
+ status?: SuppressionStatus;
3069
+ profile_id?: string;
3070
+ email?: string;
3071
+ domain?: string;
3072
+ campaign_id?: string;
3073
+ reason?: SuppressionReason;
3074
+ query?: string | number;
3075
+ limit?: number;
3076
+ cursor?: string;
3077
+ sort_field?: string;
3078
+ sort_direction?: "asc" | "desc";
3079
+ }
3080
+ interface GetSuppressionParams {
3081
+ id: string;
3082
+ store_id?: string;
3083
+ }
3084
+ interface CreateLeadResearchRunParams {
3085
+ store_id?: string;
3086
+ integration_id: string;
3087
+ profile_list_id?: string;
3088
+ title?: string;
3089
+ }
3090
+ interface FindLeadResearchRunsParams {
3091
+ store_id?: string;
3092
+ status?: LeadResearchRunStatus;
3093
+ profile_list_id?: string;
3094
+ limit?: number;
3095
+ cursor?: string;
3096
+ }
3097
+ interface GetLeadResearchRunParams {
3098
+ id: string;
3099
+ store_id?: string;
3100
+ }
3101
+ interface UpdateLeadResearchRunParams {
3102
+ id: string;
3103
+ store_id?: string;
3104
+ integration_id: string;
3105
+ }
3106
+ interface CancelLeadResearchRunParams {
3107
+ id: string;
3108
+ store_id?: string;
3109
+ }
3110
+ interface SendLeadResearchMessageParams {
3111
+ run_id: string;
3112
+ store_id?: string;
3113
+ message: string;
3114
+ }
3115
+ interface FindLeadResearchMessagesParams {
3116
+ run_id: string;
3117
+ store_id?: string;
3118
+ limit?: number;
3119
+ after_created_at?: number;
3120
+ after_id?: string;
3121
+ }
3122
+ interface ValidateLeadEmailParams {
3123
+ store_id?: string;
3124
+ email: string;
3125
+ website_url?: string;
3126
+ email_source_url?: string;
3127
+ }
3128
+ interface OAuthConnectParams {
3129
+ store_id: string;
3130
+ provider: string;
3131
+ code: string;
3132
+ redirect_uri: string;
3133
+ }
3134
+ interface OAuthDisconnectParams {
3135
+ store_id: string;
3136
+ provider: string;
3137
+ }
3138
+ interface ListIntegrationsParams {
3139
+ store_id: string;
3140
+ }
3141
+ interface GetIntegrationParams {
3142
+ store_id: string;
3143
+ id: string;
3144
+ }
3145
+ interface CreateIntegrationParams {
3146
+ store_id: string;
3147
+ key: string;
3148
+ provider: IntegrationProvider;
3149
+ }
3150
+ interface UpdateIntegrationParams {
3151
+ store_id: string;
3152
+ id: string;
3153
+ key?: string;
3154
+ provider?: IntegrationProvider;
3155
+ }
3156
+ interface DeleteIntegrationParams {
3157
+ store_id: string;
3158
+ id: string;
3159
+ }
3160
+ interface ListWebhooksParams {
3161
+ store_id: string;
3162
+ }
3163
+ interface CreateWebhookParams {
3164
+ store_id: string;
3165
+ key: string;
3166
+ url: string;
3167
+ events: WebhookEventSubscription[];
3168
+ headers: Record<string, string>;
3169
+ secret: string;
3170
+ enabled: boolean;
3171
+ }
3172
+ interface UpdateWebhookParams {
3173
+ store_id: string;
3174
+ id: string;
3175
+ key: string;
3176
+ url: string;
3177
+ events: WebhookEventSubscription[];
3178
+ headers: Record<string, string>;
3179
+ secret: string;
3180
+ enabled: boolean;
3181
+ }
3182
+ interface DeleteWebhookParams {
3183
+ store_id: string;
3184
+ id: string;
3185
+ }
3186
+ interface GetShippingRatesParams {
3187
+ order_id: string;
3188
+ shipping_provider_id: string;
3189
+ from_address: Address;
3190
+ to_address: Address;
3191
+ parcel: Parcel;
3192
+ customs_declaration?: CustomsDeclaration;
3193
+ }
3194
+ interface ShipParams {
3195
+ order_id: string;
3196
+ rate_id: string;
3197
+ carrier: string;
3198
+ service: string;
3199
+ location_id: string;
3200
+ lines: ShipmentLine[];
3201
+ }
3202
+ interface AuthToken {
3203
+ id: string;
3204
+ access_token: string;
3205
+ refresh_token: string;
3206
+ access_expires_at: number;
3207
+ refresh_expires_at: number;
3208
+ created_at: number;
3209
+ is_verified: boolean;
3210
+ }
3211
+ interface ProfileInfo {
3212
+ id: string;
3213
+ verified: boolean;
3214
+ }
3215
+ interface ProfileAuthToken {
3216
+ id: string;
3217
+ token: string;
3218
+ created_at: number;
3219
+ }
3220
+ interface ProfileVerificationCode {
3221
+ code: string;
3222
+ created_at: number;
3223
+ used: boolean;
3224
+ store_id?: string | null;
3225
+ }
3226
+ interface PromoUsage {
3227
+ promo_code_id: string;
3228
+ uses: number;
3229
+ }
3230
+ interface Profile {
3231
+ id: string;
3232
+ store_id: string;
3233
+ email: string | null;
3234
+ verified: boolean;
3235
+ status: ProfileStatus;
3236
+ promo_usage: PromoUsage[];
3237
+ lists: ProfileListMembership[];
3238
+ taxonomies: TaxonomyEntry[];
3239
+ auth_tokens: ProfileAuthToken[];
3240
+ verification_codes: ProfileVerificationCode[];
3241
+ created_at: number;
3242
+ updated_at: number;
3243
+ }
3244
+ interface ProfileDetail {
3245
+ profile: Profile;
3246
+ carts: Cart[];
3247
+ orders: Order[];
3248
+ form_submissions: FormSubmission[];
3249
+ }
3250
+ interface SetProfileEmailParams {
3251
+ email: string;
3252
+ store_id?: string;
3253
+ }
3254
+ interface CreateProfileParams {
3255
+ store_id?: string;
3256
+ email: string;
3257
+ taxonomies?: TaxonomyEntry[];
3258
+ }
3259
+ interface UpdateProfileParams {
3260
+ id: string;
3261
+ store_id?: string;
3262
+ email?: string;
3263
+ taxonomies?: TaxonomyEntry[];
3264
+ status?: ProfileStatus;
3265
+ }
3266
+ interface GetProfileParams {
3267
+ id: string;
3268
+ store_id?: string;
3269
+ }
3270
+ interface FindProfilesParams {
3271
+ store_id?: string;
3272
+ ids?: string[];
3273
+ query?: string | number;
3274
+ taxonomy_query?: TaxonomyQuery[];
3275
+ status?: ProfileStatus;
3276
+ has_activity?: boolean;
3277
+ has_cart?: boolean;
3278
+ limit?: number;
3279
+ cursor?: string;
3280
+ sort_field?: string;
3281
+ sort_direction?: "asc" | "desc";
3282
+ }
3283
+ interface MergeProfilesParams {
3284
+ target_id: string;
3285
+ source_id: string;
3286
+ store_id?: string;
3287
+ }
3288
+
3289
+ export { type DeleteIntegrationParams as $, type AddCartItemParams as A, type SubscriptionPlan as B, type Cart as C, type DeleteAccountParams as D, type SubscribeParams as E, type CreatePortalSessionParams as F, type GetCurrentCartParams as G, type AddMemberParams as H, type InviteUserParams as I, type RemoveMemberParams as J, type GetStoreMediaParams2 as K, type Location as L, type Market as M, type Media as N, type OrderQuote as O, type Profile$1 as P, type QuoteCartParams as Q, type RequestOptions as R, type Store as S, type TestWebhookParams as T, type UpdateCartParams as U, type OAuthConnectParams as V, type Integration as W, type OAuthDisconnectParams as X, type ListIntegrationsParams as Y, type CreateIntegrationParams as Z, type UpdateIntegrationParams as _, type OrderCheckoutResult as a, type GetProductsParams as a$, type ListWebhooksParams as a0, type Webhook as a1, type CreateWebhookParams as a2, type UpdateWebhookParams as a3, type DeleteWebhookParams as a4, type GetMediaParams as a5, type UploadStoreMediaParams as a6, type DeleteStoreMediaParams as a7, type GetStoreMediaParams as a8, type UpdateMediaParams as a9, type GetFormParams as aA, type GetFormsParams as aB, type SubmitFormParams as aC, type FormSubmission as aD, type GetFormSubmissionsParams as aE, type GetFormSubmissionParams as aF, type UpdateFormSubmissionParams as aG, type CreateTaxonomyParams as aH, type Taxonomy as aI, type UpdateTaxonomyParams as aJ, type DeleteTaxonomyParams as aK, type GetTaxonomyParams as aL, type GetTaxonomiesParams as aM, type GetTaxonomyChildrenParams as aN, type CreateEmailTemplateParams as aO, type EmailTemplate as aP, type UpdateEmailTemplateParams as aQ, type DeleteEmailTemplateParams as aR, type GetEmailTemplateParams as aS, type GetEmailTemplatesParams as aT, type PreviewEmailTemplateParams as aU, type PreviewEmailTemplateResponse as aV, type CreateProductParams as aW, type Product as aX, type UpdateProductParams as aY, type DeleteProductParams as aZ, type GetProductParams as a_, type TrackEmailOpenParams as aa, type TriggerNotificationParams as ab, type CreatePromoCodeParams as ac, type PromoCode as ad, type UpdatePromoCodeParams as ae, type DeletePromoCodeParams as af, type GetPromoCodeParams as ag, type GetPromoCodesParams as ah, type GetShippingRatesParams as ai, type ShippingRate as aj, type ShipParams as ak, type ShipResult as al, type CreateNodeParams as am, type Node as an, type UpdateNodeParams as ao, type DeleteNodeParams as ap, type GetNodeParams as aq, type Block as ar, type TaxonomyEntry as as, type NodeStatus as at, type GetNodesParams as au, type GetNodeChildrenParams as av, type CreateFormParams as aw, type Form as ax, type UpdateFormParams as ay, type DeleteFormParams as az, type GetCartParams as b, type LaunchCampaignParams as b$, type UpdateOrderParams as b0, type Order as b1, type GetOrderParams as b2, type GetOrdersParams as b3, type GetQuoteParams as b4, type ProcessOrderRefundParams as b5, type CreateCartParams as b6, type FindCartsParams as b7, type CreateServiceParams as b8, type Service as b9, type CreateProfileListParams as bA, type ProfileList as bB, type UpdateProfileListParams as bC, type GetProfileListParams as bD, type FindProfileListsParams as bE, type ImportProfilesIntoProfileListParams as bF, type ImportProfilesIntoProfileListResult as bG, type ImportProfileListPreviewParams as bH, type ImportProfilesPreviewResult as bI, type AddProfileListProfileParams as bJ, type ProfileListMember as bK, type UpdateProfileListProfileParams as bL, type RemoveProfileListProfileParams as bM, type FindProfileListProfilesParams as bN, type CreateMailboxParams as bO, type Mailbox as bP, type UpdateMailboxParams as bQ, type GetMailboxParams as bR, type TestMailboxParams as bS, type TestMailboxResult as bT, type PrepareMailboxParams as bU, type FindMailboxesParams as bV, type CreateCampaignParams as bW, type Campaign as bX, type UpdateCampaignParams as bY, type GetCampaignParams as bZ, type FindCampaignsParams as b_, type UpdateServiceParams as ba, type DeleteServiceParams as bb, type GetServiceParams as bc, type GetServicesParams as bd, type GetAvailabilityParams as be, type AvailabilityResponse as bf, type FindServiceProvidersParams as bg, type ServiceProvider as bh, type CreateServiceProviderParams as bi, type UpdateServiceProviderParams as bj, type DeleteServiceProviderParams as bk, type CreateProviderParams as bl, type Provider as bm, type UpdateProviderParams as bn, type DeleteProviderParams as bo, type GetProviderParams as bp, type GetProvidersParams as bq, type CreateProfileParams as br, type Profile as bs, type GetProfileParams as bt, type ProfileDetail as bu, type FindProfilesParams as bv, type UpdateProfileParams as bw, type MergeProfilesParams as bx, type ImportProfilesParams as by, type ImportProfilesResult as bz, type RemoveCartItemParams as c, type StoreSubscription as c$, type DuplicateCampaignParams as c0, type GetCampaignLaunchReadinessParams as c1, type CampaignLaunchReadiness as c2, type ImportCampaignRecipientsParams as c3, type CampaignRecipientImportResult as c4, type GenerateOutreachPersonalizedDraftsParams as c5, type FindCampaignRecipientsParams as c6, type CampaignRecipient as c7, type GetCampaignRecipientConversationParams as c8, type CampaignRecipientConversationResponse as c9, type Workflow as cA, type UpdateWorkflowParams as cB, type DeleteWorkflowParams as cC, type GetWorkflowParams as cD, type GetWorkflowsParams as cE, type TriggerWorkflowParams as cF, type WorkflowExecution as cG, type GetWorkflowExecutionsParams as cH, type GetWorkflowExecutionParams as cI, type SubscribeProfileListParams as cJ, type ProfileListSubscribeResponse as cK, type ProfileListAccessParams as cL, type ProfileListAccessResponse as cM, type ApiResponse as cN, type EshopCartItem as cO, type CartOrigin as cP, type CartStatus as cQ, type EshopStoreState as cR, type WebhookEventSubscription as cS, type IntegrationProvider as cT, type Price as cU, type OrderPayment as cV, type OrderPaymentTax as cW, type OrderPaymentTaxLine as cX, type OrderPaymentPromoCode as cY, type OrderPaymentProvider as cZ, type OrderPaymentRefund as c_, type UpdateCampaignRecipientParams as ca, type UpdateCampaignRecipientDraftParams as cb, type ReplyCampaignRecipientParams as cc, type StopCampaignRecipientParams as cd, type FindCampaignMessagesParams as ce, type CampaignMessage as cf, type UpdateCampaignMessageParams as cg, type CreateSuppressionParams as ch, type Suppression as ci, type UpdateSuppressionParams as cj, type GetSuppressionParams as ck, type FindSuppressionsParams as cl, type CreateLeadResearchRunParams as cm, type LeadResearchRun as cn, type FindLeadResearchRunsParams as co, type GetLeadResearchRunParams as cp, type UpdateLeadResearchRunParams as cq, type CancelLeadResearchRunParams as cr, type SendLeadResearchMessageParams as cs, type SendLeadResearchMessageResult as ct, type FindLeadResearchMessagesParams as cu, type LeadResearchMessage as cv, type ValidateLeadEmailParams as cw, type LeadEmailValidationResult as cx, type FindActivitiesParams as cy, type CreateWorkflowParams as cz, type ClearCartParams as d, type OrderPaymentStatus as d$, type StoreSubscriptionPayment as d0, type StoreSubscriptionProvider as d1, type StoreSubscriptionStatus as d2, type StoreSubscriptionSource as d3, type SubscriptionPrice as d4, type ProfileListMembershipPayment as d5, type ProfileListMembershipProvider as d6, type PaymentMethod as d7, type ShippingMethod as d8, type ShippingWeightTier as d9, type ShippingAddress as dA, type Parcel as dB, type PurchaseLabelResult as dC, type ShipmentLine as dD, type Shipment as dE, type CustomsItem as dF, type CustomsDeclaration as dG, type GeoLocationBlock as dH, type ServiceDuration as dI, type ProviderTimelinePoint as dJ, type TimelinePoint as dK, type WorkingHour as dL, type WorkingDay as dM, type SpecificDate as dN, type OrderItem as dO, type OrderItemSnapshot as dP, type ProductLineItem as dQ, type ServiceLineItem as dR, type ProductLineItemSnapshot as dS, type ServiceLineItemSnapshot as dT, type QuoteLine as dU, type ProductQuoteLine as dV, type ServiceQuoteLine as dW, type ProductQuoteLineAvailability as dX, type ServiceQuoteLineAvailability as dY, type OrderItemStatus as dZ, type OrderStatus as d_, type Zone as da, type Address as db, type GeoLocation as dc, type ZoneLocation as dd, type PromoCodeValidation as de, type Language as df, type Access as dg, type MediaResolution as dh, type ProviderWithTimeline as di, type WorkflowNode as dj, type WorkflowEdge as dk, type WorkflowTriggerNode as dl, type WorkflowHttpNode as dm, type WorkflowSwitchNode as dn, type WorkflowSwitchRule as dp, type WorkflowTransformNode as dq, type WorkflowLoopNode as dr, type WorkflowHttpMethod as ds, type ExecutionStatus as dt, type NodeResult as du, type ProfileListType as dv, type Event as dw, type EventAction as dx, type ShippingStatus as dy, type OrderShipping as dz, type CheckoutCartParams as e, PaymentMethodType as e$, type OrderCancellationReason as e0, type HistoryEntry as e1, type ProductVariant as e2, type ProductInventory as e3, type InventoryLevel as e4, type GalleryItem as e5, type FormSchema as e6, type FormSchemaType as e7, type FormField as e8, type FormFieldType as e9, type ServiceStatus as eA, type ProviderStatus as eB, type ProductStatus as eC, type ProfileStatus as eD, type ProfileListStatus as eE, type ProfileListSource as eF, type ProfileListMembershipStatus as eG, type MailboxStatus as eH, type CampaignStatus as eI, type CampaignRecipientStatus as eJ, type CampaignMessageDirection as eK, type CampaignMessageKind as eL, type CampaignMessageStatus as eM, type OutreachPersonalizationStatus as eN, type OutreachStepVariantStatus as eO, type OutreachThreadMode as eP, type SuppressionStatus as eQ, type SuppressionTargetType as eR, type SuppressionScopeType as eS, type SuppressionReason as eT, type SuppressionSource as eU, type WorkflowStatus as eV, type PromoCodeStatus as eW, type EmailTemplateStatus as eX, type EmailTemplateVariable as eY, type FormStatus as eZ, type TaxonomyStatus as e_, type FormEntry as ea, type TaxonomyQuery as eb, type TaxonomySchema as ec, type TaxonomySchemaType as ed, type TaxonomyField as ee, type TaxonomyFieldQuery as ef, type ProfileListMembership as eg, type MailboxConnectionSecurity as eh, type MailboxProvider as ei, type MailboxPreset as ej, type MailboxSyncStatus as ek, type SmtpImapMailboxProvider as el, type OutreachStep as em, type OutreachStepVariant as en, type OutreachPersonalizationCounters as eo, type OutreachPersonalizationState as ep, type CampaignRecipientDraft as eq, type LeadResearchRunStatus as er, type LeadEmailClassification as es, type LeadValidationCheck as et, type LeadValidationCheckStatus as eu, type ResearchProfileListMember as ev, type AccountToken as ew, type StoreMembership as ex, type Discount as ey, type Condition as ez, type MagicLinkVerifyParams as f, type SetupAnalyticsParams as f$, type AvailabilitySlot as f0, type DaySlots as f1, type ProviderAvailability as f2, type Slot as f3, type SlotRange as f4, type EshopItem as f5, type EshopQuoteItem as f6, type ServiceCheckoutPart as f7, type ServiceQuoteItem as f8, type ConditionValue as f9, type StoreEmails as fA, type BlockType as fB, type GeoLocationBlockProperties as fC, type GeoLocationValue as fD, type AccountLifecycle as fE, type CampaignRecipientImportSource as fF, type CampaignMessageCopySource as fG, type TimeRange as fH, type ProfileAuthToken$1 as fI, type ProfileVerificationCode$1 as fJ, type PromoUsage$1 as fK, type CampaignRecipientImportResult$1 as fL, type OrderCheckoutParams as fM, type LoginAccountParams as fN, type GetAnalyticsParams as fO, type GetAnalyticsHealthParams as fP, type GetDeliveryStatsParams as fQ, type StoreRole as fR, type CreateProductVariantInput as fS, type UpdateProductVariantInput as fT, type OrderUpdateItem as fU, type ServiceProviderInput as fV, type SearchOrderServiceItemsParams as fW, type AccountAddress as fX, type AccountApiToken as fY, type PreviewEmailTemplateWarning as fZ, type LogoutParams as f_, type ProductQuoteItemInput as fa, type ServiceQuoteItemInput as fb, type OrderQuoteItemInput as fc, type QuoteItemInput as fd, type OrderQuoteCompatibleItemInput as fe, type ProductCheckoutItemInput as ff, type ServiceCheckoutItemInput as fg, type OrderCheckoutItemInput as fh, type CheckoutItemInput as fi, type OrderCheckoutCompatibleItemInput as fj, type TrustedProductCheckoutItemInput as fk, type TrustedServiceCheckoutItemInput as fl, type TrustedOrderCheckoutItemInput as fm, type TrustedOrderCheckoutCompatibleItemInput as fn, type SystemTemplateKey as fo, type ImportFieldMapping as fp, type ImportPreviewRow as fq, type ImportProfilesPreviewParams as fr, type ImportProfileRowInput as fs, type ImportProfileRowError as ft, type ImportProfileRowResult as fu, type ImportProfileListRowResult as fv, type PaymentTaxLine as fw, type IntervalPeriod as fx, type SubscriptionInterval as fy, type PriceProvider as fz, type AuthToken as g, type GetIntegrationParams as g0, type ProfileInfo as g1, type SetProfileEmailParams as g2, type MagicLinkRequestParams as h, type UpdateAccountProfileParams as i, type AccountUpdateResponse as j, type GetMeParams as k, type Account as l, type SearchAccountsParams as m, type CreateLocationParams as n, type UpdateLocationParams as o, type DeleteLocationParams as p, type CreateMarketParams as q, type UpdateMarketParams as r, type DeleteMarketParams as s, type CreateStoreParams as t, type UpdateStoreParams as u, type DeleteStoreParams as v, type GetStoreParams as w, type GetStoresParams as x, type PaginatedResponse as y, type GetSubscriptionPlansParams as z };