arky-sdk 0.9.0 → 0.9.11

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.
Files changed (43) hide show
  1. package/README.md +113 -194
  2. package/dist/admin-BKXmDIVk.d.ts +1396 -0
  3. package/dist/admin-CAwQrMOX.d.cts +1396 -0
  4. package/dist/admin.cjs +1239 -455
  5. package/dist/admin.cjs.map +1 -1
  6. package/dist/admin.d.cts +3 -3
  7. package/dist/admin.d.ts +3 -3
  8. package/dist/admin.js +1239 -455
  9. package/dist/admin.js.map +1 -1
  10. package/dist/api-DJI3S6XA.d.cts +4204 -0
  11. package/dist/api-DJI3S6XA.d.ts +4204 -0
  12. package/dist/{index-C5gikdBg.d.cts → index-BaSBPLdF.d.ts} +1 -1
  13. package/dist/{index-MFMjlIfS.d.ts → index-u-gjHnKs.d.cts} +1 -1
  14. package/dist/index.cjs +1360 -610
  15. package/dist/index.cjs.map +1 -1
  16. package/dist/index.d.cts +3 -3
  17. package/dist/index.d.ts +3 -3
  18. package/dist/index.js +1360 -610
  19. package/dist/index.js.map +1 -1
  20. package/dist/storefront.cjs +590 -382
  21. package/dist/storefront.cjs.map +1 -1
  22. package/dist/storefront.d.cts +182 -156
  23. package/dist/storefront.d.ts +182 -156
  24. package/dist/storefront.js +588 -381
  25. package/dist/storefront.js.map +1 -1
  26. package/dist/types.cjs.map +1 -1
  27. package/dist/types.d.cts +1 -2666
  28. package/dist/types.d.ts +1 -2666
  29. package/dist/types.js.map +1 -1
  30. package/dist/utils.d.cts +2 -2
  31. package/dist/utils.d.ts +2 -2
  32. package/package.json +9 -11
  33. package/scripts/contract-admin.mjs +137 -0
  34. package/scripts/contract-storefront.mjs +296 -0
  35. package/dist/admin-CfHen7c5.d.cts +0 -1036
  36. package/dist/admin-ru7pX5bd.d.ts +0 -1036
  37. package/dist/storefront-store.cjs +0 -2794
  38. package/dist/storefront-store.cjs.map +0 -1
  39. package/dist/storefront-store.d.cts +0 -5
  40. package/dist/storefront-store.d.ts +0 -5
  41. package/dist/storefront-store.js +0 -2792
  42. package/dist/storefront-store.js.map +0 -1
  43. package/scripts/smoke-store.mjs +0 -41
@@ -0,0 +1,4204 @@
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
+ stripe_customer_id: string;
32
+ payment_intent_id?: string | null;
33
+ payment_provider_id?: string | null;
34
+ connected_account_id?: string | null;
35
+ };
36
+ type PaymentTransactionProvider = "manual" | "stripe" | "gift_card" | "store_credit";
37
+ type PaymentCaptureMethod = "automatic" | "manual";
38
+ type PaymentTransactionType = "authorize" | "capture" | "sale" | "void" | "cancel" | "refund" | "mark_paid" | "adjustment";
39
+ type PaymentTransactionStatus = "pending" | "requires_action" | "processing" | "succeeded" | "failed" | "cancelled";
40
+ interface PaymentTransaction {
41
+ id: string;
42
+ payment_id?: string | null;
43
+ order_id?: string | null;
44
+ parent_transaction_id?: string | null;
45
+ type: PaymentTransactionType;
46
+ status: PaymentTransactionStatus;
47
+ amount: number;
48
+ currency: string;
49
+ provider: PaymentTransactionProvider;
50
+ provider_transaction_id?: string | null;
51
+ provider_payment_id?: string | null;
52
+ provider_status?: string | null;
53
+ error_code?: string | null;
54
+ error_message?: string | null;
55
+ fee_amount?: number | null;
56
+ net_amount?: number | null;
57
+ settlement_currency?: string | null;
58
+ settlement_exchange_rate?: number | null;
59
+ payout_id?: string | null;
60
+ idempotency_key?: string | null;
61
+ raw_provider_status?: string | null;
62
+ processed_at?: number | null;
63
+ created_at: number;
64
+ }
65
+ interface OrderPaymentRefund {
66
+ id: string;
67
+ type: RefundType;
68
+ total: number;
69
+ tax_amount: number;
70
+ shipping_amount?: number | null;
71
+ provider_refund_id?: string | null;
72
+ status: RefundStatus;
73
+ error?: OrderRefundError | null;
74
+ reason?: string | null;
75
+ lines: RefundLine[];
76
+ transaction_ids: string[];
77
+ created_at: number;
78
+ }
79
+ type OrderRefundError = {
80
+ type: "provider_rejected";
81
+ message: string;
82
+ provider_code?: string | null;
83
+ provider_status?: number | null;
84
+ at: number;
85
+ } | {
86
+ type: "unknown_outcome";
87
+ message: string;
88
+ at: number;
89
+ } | {
90
+ type: "missing_payment_intent";
91
+ message: string;
92
+ at: number;
93
+ };
94
+ interface OrderPayment {
95
+ status: OrderPaymentStatus;
96
+ currency: string;
97
+ market: string;
98
+ subtotal: number;
99
+ shipping: number;
100
+ discount: number;
101
+ total: number;
102
+ paid: number;
103
+ authorized_amount: number;
104
+ captured_amount: number;
105
+ refunded_amount: number;
106
+ voided_amount: number;
107
+ capture_method: PaymentCaptureMethod;
108
+ tax?: OrderPaymentTax;
109
+ promo_code?: OrderPaymentPromoCode;
110
+ provider?: OrderPaymentProvider;
111
+ refunds: OrderPaymentRefund[];
112
+ transactions: PaymentTransaction[];
113
+ provider_payment_id?: string | null;
114
+ provider_customer_id?: string | null;
115
+ provider_payment_method_id?: string | null;
116
+ provider_status?: string | null;
117
+ next_action?: string | null;
118
+ failure_code?: string | null;
119
+ failure_message?: string | null;
120
+ idempotency_key?: string | null;
121
+ zone_id?: string;
122
+ payment_method_key?: string;
123
+ shipping_method_id?: string;
124
+ method_type: PaymentMethodType;
125
+ }
126
+ interface PromoCodeValidation {
127
+ promo_code_id: string;
128
+ code: string;
129
+ discounts: Discount[];
130
+ conditions: Condition[];
131
+ }
132
+ interface OrderQuote {
133
+ id?: string;
134
+ expires_at?: number;
135
+ market: string;
136
+ zone: Zone | null;
137
+ items: QuoteLine[];
138
+ shipping_lines: ShippingLine[];
139
+ subtotal: number;
140
+ shipping: number;
141
+ discount: number;
142
+ tax: number;
143
+ total: number;
144
+ shipping_method: ShippingMethod | null;
145
+ payment_method: PaymentMethod | null;
146
+ payment_methods: PaymentMethod[];
147
+ promo_code: PromoCodeValidation | null;
148
+ payment: OrderPayment;
149
+ charge_amount: number;
150
+ }
151
+ interface Price {
152
+ currency: string;
153
+ market: string;
154
+ amount: number;
155
+ compare_at?: number;
156
+ contact_list_id?: string;
157
+ }
158
+ type IntervalPeriod = "month" | "year";
159
+ interface SubscriptionInterval {
160
+ period: IntervalPeriod;
161
+ count: number;
162
+ }
163
+ interface PriceProvider {
164
+ type: string;
165
+ id: string;
166
+ }
167
+ interface SubscriptionPrice {
168
+ currency: string;
169
+ amount: number;
170
+ compare_at?: number;
171
+ interval?: SubscriptionInterval;
172
+ providers: PriceProvider[];
173
+ }
174
+ interface Address {
175
+ name?: string | null;
176
+ company?: string | null;
177
+ street1?: string | null;
178
+ street2?: string | null;
179
+ city?: string | null;
180
+ state?: string | null;
181
+ postal_code?: string | null;
182
+ country?: string | null;
183
+ phone?: string | null;
184
+ email?: string | null;
185
+ }
186
+ interface Coordinates {
187
+ lat: number;
188
+ lon: number;
189
+ }
190
+ interface GeoLocation {
191
+ coordinates?: Coordinates | null;
192
+ label?: string | null;
193
+ }
194
+ interface ZoneLocation {
195
+ country?: string | null;
196
+ state?: string | null;
197
+ city?: string | null;
198
+ postal_code?: string | null;
199
+ }
200
+ interface EshopCartItem {
201
+ id: string;
202
+ product_id: string;
203
+ variant_id: string;
204
+ product_name: string;
205
+ product_slug: string;
206
+ variant_attributes: Record<string, any>;
207
+ requires_shipping: boolean;
208
+ price: Price;
209
+ quantity: number;
210
+ added_at: number;
211
+ max_stock?: number;
212
+ }
213
+ type CartStatus = "active" | "abandoned" | "converted" | "expired";
214
+ type CartOrigin = "storefront" | "admin";
215
+ interface Cart {
216
+ id: string;
217
+ store_id: string;
218
+ contact_id: string;
219
+ token: string;
220
+ status: CartStatus;
221
+ origin: CartOrigin;
222
+ created_by_account_id?: string | null;
223
+ market: string;
224
+ items: OrderCheckoutItemInput[];
225
+ shipping_address?: Address | null;
226
+ billing_address?: Address | null;
227
+ forms: FormEntry[];
228
+ promo_code?: string | null;
229
+ payment_method_key?: string | null;
230
+ shipping_method_id?: string | null;
231
+ quote_snapshot?: OrderQuote | null;
232
+ converted_order_id?: string | null;
233
+ item_count: number;
234
+ last_action_at: number;
235
+ abandoned_at?: number | null;
236
+ recovery_sent_at?: number | null;
237
+ created_at: number;
238
+ updated_at: number;
239
+ }
240
+ interface SocialOAuthCredential {
241
+ access_token?: string;
242
+ refresh_token?: string | null;
243
+ expires_at?: number | null;
244
+ scopes: string[];
245
+ }
246
+ interface SocialDestinationMetadata {
247
+ external_account_id: string;
248
+ external_account_name: string;
249
+ handle?: string | null;
250
+ avatar_url?: string | null;
251
+ }
252
+ type SocialProviderType = "facebook_page" | "instagram_business" | "youtube_channel" | "tiktok_account" | "x_account";
253
+ type SocialPublicationStatus = "draft" | "scheduled" | "publishing" | "published" | "failed" | "unknown" | "cancelled";
254
+ type YoutubePrivacy = "public" | "unlisted" | "private";
255
+ type TiktokPrivacy = "public" | "friends" | "private";
256
+ type InstagramPlacement = "feed" | "reel" | "story";
257
+ interface FacebookPageContent {
258
+ type: "facebook_page";
259
+ text?: string | null;
260
+ media_ids: string[];
261
+ link_url?: string | null;
262
+ }
263
+ interface InstagramBusinessContent {
264
+ type: "instagram_business";
265
+ placement?: InstagramPlacement | null;
266
+ share_to_feed?: boolean | null;
267
+ caption?: string | null;
268
+ media_ids: string[];
269
+ }
270
+ interface YoutubeChannelContent {
271
+ type: "youtube_channel";
272
+ title: string;
273
+ description?: string | null;
274
+ video_media_id: string;
275
+ privacy: YoutubePrivacy;
276
+ }
277
+ interface TiktokAccountContent {
278
+ type: "tiktok_account";
279
+ caption?: string | null;
280
+ video_media_id: string;
281
+ privacy: TiktokPrivacy;
282
+ }
283
+ interface XAccountContent {
284
+ type: "x_account";
285
+ text?: string | null;
286
+ media_ids: string[];
287
+ }
288
+ type SocialPublicationContent = FacebookPageContent | InstagramBusinessContent | YoutubeChannelContent | TiktokAccountContent | XAccountContent;
289
+ interface ValidationError {
290
+ field: string;
291
+ error: string;
292
+ }
293
+ interface SocialPublicationValidation {
294
+ valid: boolean;
295
+ errors: ValidationError[];
296
+ warnings: ValidationError[];
297
+ }
298
+ interface SocialPublication {
299
+ id: string;
300
+ store_id: string;
301
+ social_account_id: string;
302
+ key: string;
303
+ status: SocialPublicationStatus;
304
+ content: SocialPublicationContent;
305
+ scheduled_at: number;
306
+ published_at?: number | null;
307
+ provider_post_id?: string | null;
308
+ provider_post_url?: string | null;
309
+ error_code?: string | null;
310
+ error_message?: string | null;
311
+ attempt_count: number;
312
+ last_attempt_at?: number | null;
313
+ created_at: number;
314
+ updated_at: number;
315
+ }
316
+ interface SocialPublicationMutationResponse {
317
+ publication: SocialPublication;
318
+ validation: SocialPublicationValidation;
319
+ publish_requested: boolean;
320
+ }
321
+ type SocialPublicationCommentStatus = "open" | "replied" | "hidden" | "deleted";
322
+ type SocialPublicationCommentReplyStatus = "none" | "requested" | "processing" | "succeeded" | "failed" | "unknown";
323
+ type SocialPublicationCommentReplyError = {
324
+ type: "provider_rejected";
325
+ message: string;
326
+ provider_code?: string | null;
327
+ provider_status?: number | null;
328
+ at: number;
329
+ } | {
330
+ type: "unknown_outcome";
331
+ message: string;
332
+ at: number;
333
+ };
334
+ type SocialPublicationCommentIntent = "lead" | "support" | "complaint" | "question" | "praise" | "spam" | "general";
335
+ type SocialPublicationCommentPriority = "urgent" | "high" | "normal" | "low";
336
+ interface SocialPublicationComment {
337
+ id: string;
338
+ store_id: string;
339
+ publication_id: string;
340
+ social_account_id: string;
341
+ provider_type: SocialProviderType;
342
+ provider_post_id?: string | null;
343
+ provider_comment_id: string;
344
+ provider_parent_comment_id?: string | null;
345
+ parent_comment_id?: string | null;
346
+ root_comment_id?: string | null;
347
+ depth: number;
348
+ provider_reply_count?: number | null;
349
+ synced_reply_count: number;
350
+ has_more_replies: boolean;
351
+ thread_last_synced_at?: number | null;
352
+ author_is_channel: boolean;
353
+ contact_id?: string | null;
354
+ action_id?: string | null;
355
+ opportunity_action_id?: string | null;
356
+ author_name?: string | null;
357
+ author_handle?: string | null;
358
+ author_provider_user_id?: string | null;
359
+ text: string;
360
+ status: SocialPublicationCommentStatus;
361
+ reply_status: SocialPublicationCommentReplyStatus;
362
+ reply_error?: SocialPublicationCommentReplyError | null;
363
+ reply_requested_text?: string | null;
364
+ reply_provider_comment_id?: string | null;
365
+ reply_provider_comment_url?: string | null;
366
+ reply_error_code?: string | null;
367
+ reply_error_message?: string | null;
368
+ provider_created_at?: number | null;
369
+ last_synced_at: number;
370
+ replied_at?: number | null;
371
+ classification_intent?: SocialPublicationCommentIntent | null;
372
+ classification_priority?: SocialPublicationCommentPriority | null;
373
+ classification_confidence?: number | null;
374
+ classification_summary?: string | null;
375
+ classification_reason?: string | null;
376
+ suggested_reply?: string | null;
377
+ classified_at?: number | null;
378
+ classification_model?: string | null;
379
+ created_at: number;
380
+ updated_at: number;
381
+ }
382
+ interface SocialPublicationMetricSnapshot {
383
+ id: string;
384
+ store_id: string;
385
+ publication_id: string;
386
+ social_account_id: string;
387
+ provider_type: SocialProviderType;
388
+ provider_post_id?: string | null;
389
+ metrics: Record<string, number>;
390
+ collected_at: number;
391
+ created_at: number;
392
+ updated_at: number;
393
+ }
394
+ interface SocialPublicationCommentReply {
395
+ provider_comment_id: string;
396
+ provider_comment_url?: string | null;
397
+ }
398
+ interface SocialPublicationCommentReplyResponse {
399
+ comment: SocialPublicationComment;
400
+ reply: SocialPublicationCommentReply;
401
+ }
402
+ interface SocialPublicationEngagementSyncResult {
403
+ publications_scanned: number;
404
+ comment_pages_scanned: number;
405
+ comments_synced: number;
406
+ metrics_synced: number;
407
+ comments: SocialPublicationComment[];
408
+ metrics: SocialPublicationMetricSnapshot[];
409
+ skipped_publication_ids: string[];
410
+ errors: string[];
411
+ }
412
+ interface SocialPublicationCommentClassificationResult {
413
+ comments_scanned: number;
414
+ comments_classified: number;
415
+ comments_skipped: number;
416
+ comments: SocialPublicationComment[];
417
+ skipped_comment_ids: string[];
418
+ errors: string[];
419
+ }
420
+ interface SocialEngagementCapabilities {
421
+ read_comments: boolean;
422
+ reply_to_comments: boolean;
423
+ }
424
+ interface SocialAnalyticsCapabilities {
425
+ read_post_metrics: boolean;
426
+ }
427
+ interface SocialProviderCapability {
428
+ provider_type: SocialProviderType;
429
+ display_name: string;
430
+ icon_key: string;
431
+ required_scopes: string[];
432
+ media_requirements: string[];
433
+ engagement: SocialEngagementCapabilities;
434
+ analytics: SocialAnalyticsCapabilities;
435
+ }
436
+ interface SocialConnectResponse {
437
+ authorization_url: string;
438
+ state: string;
439
+ }
440
+ type SocialOAuthCallbackStatus = "code_received" | "connected" | "selection_required";
441
+ interface SocialOAuthDestinationOption extends SocialDestinationMetadata {
442
+ candidate_id: string;
443
+ }
444
+ interface SocialOAuthCallbackResponse {
445
+ status: SocialOAuthCallbackStatus;
446
+ store_id: string;
447
+ provider_type: SocialProviderType;
448
+ account_id: string;
449
+ attempt_id?: string | null;
450
+ social_account_id?: string | null;
451
+ destination?: SocialDestinationMetadata | null;
452
+ options: SocialOAuthDestinationOption[];
453
+ message: string;
454
+ }
455
+ type BuildHookType = "vercel" | "netlify" | "cloudflare" | "custom";
456
+ interface BuildHook {
457
+ id: string;
458
+ store_id: string;
459
+ key: string;
460
+ type: BuildHookType;
461
+ url: string;
462
+ headers: Record<string, string>;
463
+ active: boolean;
464
+ created_at: number;
465
+ updated_at: number;
466
+ }
467
+ interface SocialAccount {
468
+ id: string;
469
+ store_id: string;
470
+ key: string;
471
+ provider_type: SocialProviderType;
472
+ credential: SocialOAuthCredential;
473
+ destination: SocialDestinationMetadata;
474
+ created_at: number;
475
+ updated_at: number;
476
+ }
477
+ interface PaymentProvider {
478
+ id: string;
479
+ store_id: string;
480
+ key: string;
481
+ provider: {
482
+ type: "stripe";
483
+ onboarding_status: string;
484
+ charges_enabled: boolean;
485
+ payouts_enabled: boolean;
486
+ details_submitted: boolean;
487
+ application_fee_bps?: number | null;
488
+ currency: string;
489
+ };
490
+ created_at: number;
491
+ updated_at: number;
492
+ }
493
+ interface PaymentStoreConfig {
494
+ provider: "stripe";
495
+ publishable_key: string;
496
+ currency: string;
497
+ }
498
+ type StoreRuntimeConfig = PaymentStoreConfig | [] | null;
499
+ interface StripePaymentProviderConnectResponse {
500
+ provider: PaymentProvider;
501
+ onboarding_url: string;
502
+ }
503
+ interface ShippingWeightTier {
504
+ up_to_grams: number;
505
+ amount: number;
506
+ }
507
+ type PaymentMethod = {
508
+ type: "cash";
509
+ id: string;
510
+ key: string;
511
+ } | {
512
+ type: "credit_card";
513
+ id: string;
514
+ key: string;
515
+ payment_provider_id: string;
516
+ };
517
+ interface ShippingMethod {
518
+ id: string;
519
+ taxable: boolean;
520
+ eta_text: string;
521
+ location_id?: string;
522
+ amount: number;
523
+ free_above?: number;
524
+ weight_tiers?: ShippingWeightTier[];
525
+ }
526
+ interface Location {
527
+ id: string;
528
+ store_id: string;
529
+ key: string;
530
+ address: Address;
531
+ is_pickup_location: boolean;
532
+ created_at: number;
533
+ updated_at: number;
534
+ }
535
+ interface InventoryLevel {
536
+ location_id: string;
537
+ available: number;
538
+ reserved: number;
539
+ }
540
+ interface ProductInventory {
541
+ id: string;
542
+ store_id: string;
543
+ product_id: string;
544
+ variant_id: string;
545
+ location_id: string;
546
+ available: number;
547
+ reserved: number;
548
+ updated_at: number;
549
+ }
550
+ type DigitalAssetType = "file" | "external_link";
551
+ type DigitalAssetStatus = "active" | "archived";
552
+ type DigitalDeliveryPolicy = "automatic_after_payment" | "manual";
553
+ interface DigitalAsset {
554
+ id: string;
555
+ name: string;
556
+ type: DigitalAssetType;
557
+ storage_ref?: string | null;
558
+ external_url?: string | null;
559
+ status: DigitalAssetStatus;
560
+ }
561
+ interface TaxLineReversal {
562
+ tax_line_id: string;
563
+ amount: number;
564
+ }
565
+ interface RefundLine {
566
+ order_item_id: string;
567
+ quantity: number;
568
+ subtotal_amount: number;
569
+ discount_amount: number;
570
+ taxable_base: number;
571
+ amount: number;
572
+ tax_amount: number;
573
+ tax_line_reversals: TaxLineReversal[];
574
+ restock: boolean;
575
+ }
576
+ type RefundType = "item" | "shipping" | "goodwill" | "correction";
577
+ interface ProductVariant {
578
+ id: string;
579
+ sku?: string;
580
+ prices: Price[];
581
+ inventory: ProductInventory[];
582
+ attributes: Block[];
583
+ requires_shipping: boolean;
584
+ digital_delivery_policy: DigitalDeliveryPolicy;
585
+ digital_assets: DigitalAsset[];
586
+ download_limit?: number | null;
587
+ access_expires_after_days?: number | null;
588
+ tax_category_id?: string | null;
589
+ weight?: number;
590
+ }
591
+ interface Product {
592
+ id: string;
593
+ store_id: string;
594
+ key: string;
595
+ slug: Record<string, string>;
596
+ blocks: Block[];
597
+ taxonomies: TaxonomyEntry[];
598
+ variants: ProductVariant[];
599
+ status: ProductStatus;
600
+ created_at: number;
601
+ updated_at: number;
602
+ }
603
+ interface GalleryItem {
604
+ id: string;
605
+ url: string;
606
+ alt?: string;
607
+ caption?: string;
608
+ }
609
+ interface ProductLineItemSnapshot {
610
+ product_key: string;
611
+ variant_sku?: string;
612
+ variant_attributes: Block[];
613
+ requires_shipping: boolean;
614
+ tax_category_id?: string | null;
615
+ price: Price;
616
+ }
617
+ interface ServiceLineItemSnapshot {
618
+ service_key: string;
619
+ provider_key: string;
620
+ tax_category_id?: string | null;
621
+ price: Price;
622
+ }
623
+ interface DiscountAllocation {
624
+ discount_application_id?: string | null;
625
+ amount: number;
626
+ }
627
+ interface TaxLine {
628
+ id: string;
629
+ title: string;
630
+ rate_bps: number;
631
+ amount: number;
632
+ taxable_base: number;
633
+ included_in_price: boolean;
634
+ jurisdiction_country?: string | null;
635
+ jurisdiction_region?: string | null;
636
+ jurisdiction_city?: string | null;
637
+ jurisdiction_postal_code?: string | null;
638
+ tax_category_id?: string | null;
639
+ tax_rate_id?: string | null;
640
+ source: string;
641
+ provider_tax_id?: string | null;
642
+ provider_tax_line_id?: string | null;
643
+ }
644
+ interface LineMoneySnapshot {
645
+ unit_price: number;
646
+ subtotal: number;
647
+ discount_allocations: DiscountAllocation[];
648
+ discount_total: number;
649
+ taxable_base: number;
650
+ tax_lines: TaxLine[];
651
+ tax_total: number;
652
+ total: number;
653
+ }
654
+ type OrderItemFulfillmentStatus = "unfulfilled" | "partially_fulfilled" | "fulfilled" | "not_required";
655
+ type BookingOrderItemStatus = "scheduled" | "completed" | "no_show" | "cancelled";
656
+ type OrderItemSnapshot = ProductLineItemSnapshot | ServiceLineItemSnapshot;
657
+ type ProductQuoteLineAvailability = {
658
+ ok: true;
659
+ available?: number;
660
+ } | {
661
+ ok: false;
662
+ reason: string;
663
+ };
664
+ type ServiceQuoteLineAvailability = {
665
+ ok: true;
666
+ spots: number;
667
+ } | {
668
+ ok: false;
669
+ reason: string;
670
+ };
671
+ interface ProductQuoteLine {
672
+ type: "product";
673
+ line_id: string;
674
+ product_id: string;
675
+ variant_id: string;
676
+ quantity: number;
677
+ unit_price: number;
678
+ subtotal: number;
679
+ discount: number;
680
+ tax: number;
681
+ total: number;
682
+ money: LineMoneySnapshot;
683
+ snapshot: ProductLineItemSnapshot;
684
+ availability: ProductQuoteLineAvailability;
685
+ }
686
+ interface ServiceQuoteLine {
687
+ type: "service";
688
+ line_id: string;
689
+ service_id: string;
690
+ provider_id: string;
691
+ from: number;
692
+ to: number;
693
+ quantity: 1;
694
+ unit_price: number;
695
+ subtotal: number;
696
+ discount: number;
697
+ tax: number;
698
+ total: number;
699
+ money: LineMoneySnapshot;
700
+ snapshot: ServiceLineItemSnapshot;
701
+ availability: ServiceQuoteLineAvailability;
702
+ }
703
+ type QuoteLine = ProductQuoteLine | ServiceQuoteLine;
704
+ interface ProductLineItem {
705
+ type: "product";
706
+ id: string;
707
+ product_id: string;
708
+ variant_id: string;
709
+ quantity: number;
710
+ cancelled_quantity: number;
711
+ fulfilled_quantity: number;
712
+ returned_quantity: number;
713
+ refunded_quantity: number;
714
+ location_id?: string;
715
+ snapshot: ProductLineItemSnapshot;
716
+ status: OrderItemStatus;
717
+ fulfillment_status: OrderItemFulfillmentStatus;
718
+ money: LineMoneySnapshot;
719
+ }
720
+ interface ServiceLineItem {
721
+ type: "service";
722
+ id: string;
723
+ service_id: string;
724
+ provider_id: string;
725
+ from: number;
726
+ to: number;
727
+ quantity: number;
728
+ cancelled_quantity: number;
729
+ fulfilled_quantity: number;
730
+ refunded_quantity: number;
731
+ forms: FormEntry[];
732
+ snapshot: ServiceLineItemSnapshot;
733
+ status: OrderItemStatus;
734
+ booking_status: BookingOrderItemStatus;
735
+ fulfillment_status: OrderItemFulfillmentStatus;
736
+ money: LineMoneySnapshot;
737
+ }
738
+ type OrderItem = ProductLineItem | ServiceLineItem;
739
+ type OrderPaymentSummaryStatus = "unpaid" | "pending" | "authorized" | "partially_paid" | "paid" | "partially_refunded" | "refunded" | "failed" | "voided" | "expired";
740
+ type OrderFulfillmentStatus = "unfulfilled" | "scheduled" | "on_hold" | "in_progress" | "partially_fulfilled" | "fulfilled" | "incomplete" | "not_required";
741
+ interface HistoryEntry {
742
+ action: string;
743
+ reason?: string;
744
+ timestamp: number;
745
+ }
746
+ type DigitalAccessGrantStatus = "pending" | "active" | "exhausted" | "revoked" | "expired";
747
+ interface DigitalAccessGrant {
748
+ id: string;
749
+ order_id: string;
750
+ order_item_id: string;
751
+ product_id: string;
752
+ variant_id: string;
753
+ contact_id: string;
754
+ asset_id: string;
755
+ asset_name_snapshot: string;
756
+ type: DigitalAssetType;
757
+ access_url?: string | null;
758
+ storage_ref?: string | null;
759
+ status: DigitalAccessGrantStatus;
760
+ delivery_policy_snapshot: DigitalDeliveryPolicy;
761
+ download_limit?: number | null;
762
+ download_count: number;
763
+ expires_at?: number | null;
764
+ granted_at?: number | null;
765
+ revoked_at?: number | null;
766
+ }
767
+ interface DigitalAccessDownloadResponse {
768
+ url: string;
769
+ url_expires_at?: number | null;
770
+ grant: DigitalAccessGrant;
771
+ }
772
+ interface ShippingLine {
773
+ id: string;
774
+ shipping_method_id?: string | null;
775
+ title: string;
776
+ code?: string | null;
777
+ source: string;
778
+ carrier_identifier?: string | null;
779
+ money: LineMoneySnapshot;
780
+ created_at: number;
781
+ updated_at: number;
782
+ }
783
+ type FulfillmentOrderStatus = "open" | "in_progress" | "closed" | "incomplete" | "on_hold" | "scheduled" | "cancelled";
784
+ type FulfillmentOrderRequestStatus = "unsubmitted" | "submitted" | "accepted" | "rejected" | "cancellation_requested" | "cancellation_accepted";
785
+ interface FulfillmentOrderLine {
786
+ id: string;
787
+ order_item_id: string;
788
+ quantity: number;
789
+ fulfilled_quantity: number;
790
+ }
791
+ interface FulfillmentOrder {
792
+ id: string;
793
+ order_id: string;
794
+ assigned_location_id: string;
795
+ status: FulfillmentOrderStatus;
796
+ request_status: FulfillmentOrderRequestStatus;
797
+ fulfill_at?: number | null;
798
+ fulfill_by?: number | null;
799
+ destination?: Address | null;
800
+ lines: FulfillmentOrderLine[];
801
+ created_at: number;
802
+ updated_at: number;
803
+ }
804
+ interface Order {
805
+ id: string;
806
+ number: string;
807
+ store_id: string;
808
+ source_cart_id: string;
809
+ contact_id: string;
810
+ status: OrderStatus;
811
+ payment_status: OrderPaymentSummaryStatus;
812
+ fulfillment_status: OrderFulfillmentStatus;
813
+ verified: boolean;
814
+ items: OrderItem[];
815
+ payment: OrderPayment;
816
+ shipping_lines: ShippingLine[];
817
+ fulfillment_orders: FulfillmentOrder[];
818
+ shipping_address?: Address;
819
+ billing_address?: Address;
820
+ forms: FormEntry[];
821
+ shipments: Shipment[];
822
+ digital_access_grants: DigitalAccessGrant[];
823
+ history: HistoryEntry[];
824
+ contact_list_id?: string;
825
+ fired_reminders: number[];
826
+ created_at: number;
827
+ updated_at: number;
828
+ }
829
+ type CheckoutPaymentAction = {
830
+ type: "none";
831
+ } | {
832
+ type: "handle_next_action";
833
+ client_secret: string;
834
+ };
835
+ interface OrderCheckoutResult {
836
+ order_id: string;
837
+ number: string;
838
+ payment_action: CheckoutPaymentAction;
839
+ payment: OrderPayment;
840
+ }
841
+ interface Zone {
842
+ id: string;
843
+ store_id: string;
844
+ market_id: string;
845
+ countries: string[];
846
+ states: string[];
847
+ postal_codes: string[];
848
+ tax_bps: number;
849
+ shipping_methods: ShippingMethod[];
850
+ }
851
+ interface Market {
852
+ id: string;
853
+ store_id: string;
854
+ key: string;
855
+ currency: string;
856
+ tax_mode: "exclusive" | "inclusive";
857
+ payment_methods: PaymentMethod[];
858
+ zones: Zone[];
859
+ created_at: number;
860
+ updated_at: number;
861
+ }
862
+ interface Language {
863
+ id: string;
864
+ }
865
+ interface StoreEmails {
866
+ billing: string;
867
+ support: string;
868
+ }
869
+ type WebhookEventSubscription = {
870
+ event: "collection.created";
871
+ key?: string;
872
+ } | {
873
+ event: "collection.updated";
874
+ key?: string;
875
+ } | {
876
+ event: "collection.deleted";
877
+ key?: string;
878
+ } | {
879
+ event: "entry.created";
880
+ collection_id?: string;
881
+ key?: string;
882
+ } | {
883
+ event: "entry.updated";
884
+ collection_id?: string;
885
+ key?: string;
886
+ } | {
887
+ event: "entry.deleted";
888
+ collection_id?: string;
889
+ key?: string;
890
+ } | {
891
+ event: "order.created";
892
+ } | {
893
+ event: "order.updated";
894
+ } | {
895
+ event: "order.confirmed";
896
+ } | {
897
+ event: "order.payment_received";
898
+ } | {
899
+ event: "order.payment_failed";
900
+ } | {
901
+ event: "order.refunded";
902
+ } | {
903
+ event: "order.digital_access_activated";
904
+ } | {
905
+ event: "order.digital_access_downloaded";
906
+ } | {
907
+ event: "order.cancelled";
908
+ } | {
909
+ event: "order.reminder";
910
+ } | {
911
+ event: "order.shipment_created";
912
+ } | {
913
+ event: "order.shipment_in_transit";
914
+ } | {
915
+ event: "order.shipment_out_for_delivery";
916
+ } | {
917
+ event: "order.shipment_delivered";
918
+ } | {
919
+ event: "order.shipment_failed";
920
+ } | {
921
+ event: "order.shipment_returned";
922
+ } | {
923
+ event: "order.shipment_status_changed";
924
+ } | {
925
+ event: "cart.created";
926
+ } | {
927
+ event: "cart.updated";
928
+ } | {
929
+ event: "cart.abandoned";
930
+ } | {
931
+ event: "cart.converted";
932
+ } | {
933
+ event: "product.created";
934
+ } | {
935
+ event: "product.updated";
936
+ } | {
937
+ event: "product.deleted";
938
+ } | {
939
+ event: "provider.created";
940
+ } | {
941
+ event: "provider.updated";
942
+ } | {
943
+ event: "provider.deleted";
944
+ } | {
945
+ event: "service.created";
946
+ } | {
947
+ event: "service.updated";
948
+ } | {
949
+ event: "service.deleted";
950
+ } | {
951
+ event: "media.created";
952
+ } | {
953
+ event: "media.deleted";
954
+ } | {
955
+ event: "store.created";
956
+ } | {
957
+ event: "store.updated";
958
+ } | {
959
+ event: "store.deleted";
960
+ } | {
961
+ event: "contact_list.created";
962
+ } | {
963
+ event: "contact_list.updated";
964
+ } | {
965
+ event: "contact_list.contact_added";
966
+ } | {
967
+ event: "contact_list.contact_pending";
968
+ } | {
969
+ event: "contact_list.contact_confirmed";
970
+ } | {
971
+ event: "contact_list.contact_cancelled";
972
+ } | {
973
+ event: "account.updated";
974
+ };
975
+ interface Webhook {
976
+ id: string;
977
+ store_id: string;
978
+ key: string;
979
+ url: string;
980
+ events: WebhookEventSubscription[];
981
+ headers: Record<string, string>;
982
+ secret: string;
983
+ enabled: boolean;
984
+ created_at: number;
985
+ updated_at: number;
986
+ }
987
+ type StoreSubscriptionStatus = "pending" | "active" | "cancellation_scheduled" | "cancelled" | "expired";
988
+ type StoreSubscriptionSource = "signup" | "admin" | "import";
989
+ type StoreSubscriptionProvider = {
990
+ type: "stripe";
991
+ stripe_customer_id: string;
992
+ subscription_id?: string | null;
993
+ price_id?: string | null;
994
+ };
995
+ type StoreSubscriptionProviderLifecycleStatus = "requested" | "processing" | "succeeded" | "rejected" | "unknown";
996
+ type StoreSubscriptionProviderOperation = {
997
+ type: "cancel_at_period_end";
998
+ } | {
999
+ type: "cancel_immediately";
1000
+ plan_id?: string | null;
1001
+ } | {
1002
+ type: "reactivate";
1003
+ } | {
1004
+ type: "update_plan";
1005
+ plan_id: string;
1006
+ price_id: string;
1007
+ proration_behavior: string;
1008
+ } | {
1009
+ type: "schedule_plan_change";
1010
+ plan_id: string;
1011
+ price_id: string;
1012
+ };
1013
+ type StoreSubscriptionProviderError = {
1014
+ type: "provider_rejected";
1015
+ message: string;
1016
+ provider_code?: string | null;
1017
+ provider_status?: number | null;
1018
+ at: number;
1019
+ } | {
1020
+ type: "unknown_outcome";
1021
+ message: string;
1022
+ at: number;
1023
+ } | {
1024
+ type: "missing_configuration";
1025
+ message: string;
1026
+ at: number;
1027
+ };
1028
+ interface StoreSubscriptionProviderLifecycle {
1029
+ operation_id?: string | null;
1030
+ status: StoreSubscriptionProviderLifecycleStatus;
1031
+ operation?: StoreSubscriptionProviderOperation | null;
1032
+ error?: StoreSubscriptionProviderError | null;
1033
+ updated_at: number;
1034
+ }
1035
+ interface StoreSubscriptionPayment {
1036
+ currency: string;
1037
+ market: string;
1038
+ provider?: StoreSubscriptionProvider | null;
1039
+ }
1040
+ interface StoreSubscription {
1041
+ id: string;
1042
+ target: string;
1043
+ plan_id: string;
1044
+ pending_plan_id: string | null;
1045
+ payment: StoreSubscriptionPayment;
1046
+ status: StoreSubscriptionStatus;
1047
+ provider_lifecycle: StoreSubscriptionProviderLifecycle;
1048
+ start_date: number;
1049
+ end_date: number;
1050
+ token: string;
1051
+ source: StoreSubscriptionSource;
1052
+ }
1053
+ type ContactListMembershipProvider = {
1054
+ type: "stripe";
1055
+ stripe_customer_id: string;
1056
+ subscription_id?: string;
1057
+ price_id?: string;
1058
+ };
1059
+ interface ContactListMembershipPayment {
1060
+ currency: string;
1061
+ market: string;
1062
+ provider?: ContactListMembershipProvider;
1063
+ }
1064
+ type ContactListMembershipProviderCancellationStatus = "requested" | "processing" | "succeeded" | "rejected" | "unknown";
1065
+ type ContactListMembershipProviderCancellationError = {
1066
+ type: "provider_rejected";
1067
+ message: string;
1068
+ provider_code?: string | null;
1069
+ provider_status?: number | null;
1070
+ at: number;
1071
+ } | {
1072
+ type: "unknown_outcome";
1073
+ message: string;
1074
+ at: number;
1075
+ } | {
1076
+ type: "missing_configuration";
1077
+ message: string;
1078
+ at: number;
1079
+ };
1080
+ interface ContactListMembershipProviderCancellation {
1081
+ operation_id?: string | null;
1082
+ status: ContactListMembershipProviderCancellationStatus;
1083
+ error?: ContactListMembershipProviderCancellationError | null;
1084
+ updated_at: number;
1085
+ }
1086
+ interface Store {
1087
+ id: string;
1088
+ key: string;
1089
+ timezone: string;
1090
+ languages?: Language[];
1091
+ emails?: StoreEmails;
1092
+ subscription?: StoreSubscription;
1093
+ counts?: Record<string, number>;
1094
+ }
1095
+ interface EshopStoreState {
1096
+ store_id: string;
1097
+ selected_shipping_method_id: string | null;
1098
+ user_token: string | null;
1099
+ processing_checkout: boolean;
1100
+ loading: boolean;
1101
+ error: string | null;
1102
+ }
1103
+ interface Block {
1104
+ id: string;
1105
+ key: string;
1106
+ type: string;
1107
+ properties?: any;
1108
+ value?: any;
1109
+ }
1110
+ type TaxonomySchemaType = "text" | "number" | "boolean" | "geo_location";
1111
+ interface TaxonomySchema {
1112
+ id: string;
1113
+ key: string;
1114
+ type: TaxonomySchemaType;
1115
+ value?: string[];
1116
+ min?: number | null;
1117
+ max?: number | null;
1118
+ }
1119
+ interface TaxonomyField {
1120
+ id: string;
1121
+ key: string;
1122
+ type: TaxonomySchemaType;
1123
+ value: any;
1124
+ }
1125
+ interface TaxonomyFieldQuery {
1126
+ key: string;
1127
+ type: TaxonomySchemaType;
1128
+ operation?: string;
1129
+ value: any;
1130
+ center?: {
1131
+ lat: number;
1132
+ lon: number;
1133
+ };
1134
+ radius?: number;
1135
+ }
1136
+ interface TaxonomyEntry {
1137
+ taxonomy_id: string;
1138
+ fields: TaxonomyField[];
1139
+ }
1140
+ interface TaxonomyQuery {
1141
+ taxonomy_id: string;
1142
+ query: TaxonomyFieldQuery[];
1143
+ }
1144
+ type FormSchemaType = "text" | "number" | "boolean" | "date" | "geo_location" | "select";
1145
+ interface FormSchema {
1146
+ id: string;
1147
+ key: string;
1148
+ type: FormSchemaType;
1149
+ required?: boolean;
1150
+ min?: number | null;
1151
+ max?: number | null;
1152
+ options?: string[];
1153
+ }
1154
+ type FormFieldType = "text" | "number" | "boolean" | "date" | "geo_location" | "select";
1155
+ interface FormField {
1156
+ id: string;
1157
+ key: string;
1158
+ type: FormFieldType;
1159
+ value?: any;
1160
+ }
1161
+ interface FormEntry {
1162
+ form_id: string;
1163
+ fields: FormField[];
1164
+ }
1165
+ type BlockType = "text" | "localized_text" | "number" | "boolean" | "date" | "array" | "object" | "media" | "entry" | "markdown" | "geo_location";
1166
+ interface GeoLocationBlockProperties {
1167
+ }
1168
+ interface GeoLocationBlock extends Block {
1169
+ type: "geo_location";
1170
+ properties: GeoLocationBlockProperties;
1171
+ value: GeoLocation | null;
1172
+ }
1173
+ type Access = "public" | "private";
1174
+ interface MediaResolution {
1175
+ id: string;
1176
+ size: string;
1177
+ url: string;
1178
+ }
1179
+ interface Media {
1180
+ id: string;
1181
+ resolutions: {
1182
+ [key: string]: MediaResolution;
1183
+ };
1184
+ mime_type: string;
1185
+ title?: string | null;
1186
+ description?: string | null;
1187
+ alt?: string | null;
1188
+ store_id: string;
1189
+ entity?: string;
1190
+ metadata?: string | null;
1191
+ created_at: number;
1192
+ slug: Record<string, string>;
1193
+ }
1194
+ interface SubscriptionPlan {
1195
+ id: string;
1196
+ provider_price_id?: string | null;
1197
+ provider_product_id?: string | null;
1198
+ name: string;
1199
+ tier: number;
1200
+ amount: number;
1201
+ currency: string;
1202
+ interval: string;
1203
+ interval_count: number;
1204
+ trial_period_days: number;
1205
+ }
1206
+ interface AccountToken {
1207
+ id: string;
1208
+ value?: string;
1209
+ name?: string | null;
1210
+ created_at: number;
1211
+ expires_at?: number | null;
1212
+ type?: string;
1213
+ }
1214
+ interface StoreMembership {
1215
+ store_id: string;
1216
+ role: StoreRole;
1217
+ invitation_token?: AccountToken | null;
1218
+ joined_at?: number | null;
1219
+ }
1220
+ interface AccountLifecycle {
1221
+ last_login_at?: number | null;
1222
+ onboarding_completed: boolean;
1223
+ }
1224
+ interface Account {
1225
+ id: string;
1226
+ email: string;
1227
+ memberships: StoreMembership[];
1228
+ api_tokens: AccountToken[];
1229
+ auth_tokens?: AuthToken[];
1230
+ verification_codes?: unknown[];
1231
+ lifecycle?: AccountLifecycle;
1232
+ }
1233
+ interface AccountUpdateResponse {
1234
+ success: boolean;
1235
+ newly_created_tokens: AccountToken[];
1236
+ }
1237
+ interface ApiResponse<T> {
1238
+ success: boolean;
1239
+ data?: T;
1240
+ error?: string;
1241
+ cursor?: string;
1242
+ total?: number;
1243
+ }
1244
+ interface PaginatedResponse<T> {
1245
+ items: T[];
1246
+ cursor: string | null;
1247
+ data?: T[];
1248
+ meta?: {
1249
+ total: number;
1250
+ page: number;
1251
+ per_page: number;
1252
+ };
1253
+ }
1254
+ type ServiceStatus = "active" | "draft" | "archived";
1255
+ type ProviderStatus = "active" | "draft" | "archived";
1256
+ type ProductStatus = "active" | "draft" | "archived";
1257
+ type ContactStatus = "active" | "archived";
1258
+ type ContactListStatus = "active" | "draft" | "archived";
1259
+ type ContactListSource = "manual" | "import" | "signup" | "admin" | "system" | "lead_research";
1260
+ type ContactListMembershipStatus = "pending" | "active" | "cancellation_scheduled" | "cancelled" | "expired" | "archived";
1261
+ type MailboxStatus = "active" | "draft" | "archived";
1262
+ type MailboxPreset = "gmail" | "zoho" | "microsoft" | "custom";
1263
+ type MailboxConnectionSecurity = "tls" | "start_tls";
1264
+ type MailboxSyncStatus = "not_ready" | "ready" | "failed";
1265
+ type SmtpImapMailboxProvider = {
1266
+ type: "smtp_imap";
1267
+ preset: MailboxPreset;
1268
+ smtp_host: string;
1269
+ smtp_port: number;
1270
+ smtp_security: MailboxConnectionSecurity;
1271
+ imap_host: string;
1272
+ imap_port: number;
1273
+ imap_security: MailboxConnectionSecurity;
1274
+ username: string;
1275
+ password_configured: boolean;
1276
+ sync_enabled: boolean;
1277
+ sync_interval_seconds: number;
1278
+ sync_status?: MailboxSyncStatus;
1279
+ sync_error?: string | null;
1280
+ sync_ready_at?: number | null;
1281
+ last_synced_at?: number | null;
1282
+ last_seen_uid?: number | null;
1283
+ };
1284
+ type CampaignStatus = "draft" | "active" | "paused" | "completed" | "archived";
1285
+ type CampaignEnrollmentStatus = "pending" | "active" | "action_required" | "replied" | "completed" | "suppressed" | "failed" | "stopped";
1286
+ type CampaignEnrollmentImportSource = "contact_list" | "contact" | "manual";
1287
+ type CampaignMessageStatus = "draft" | "scheduled" | "pending" | "sending" | "sent" | "received" | "action_required" | "completed" | "bounced" | "failed" | "unknown" | "skipped" | "stopped" | "superseded";
1288
+ type CampaignMessageType = "campaign_step_email" | "manual_task" | "manual_reply" | "inbound_reply" | "delivery_failure" | "action";
1289
+ type CampaignMessageDirection = "outbound" | "inbound" | "action";
1290
+ type CampaignMessageCopySource = "template" | "generated" | "edited";
1291
+ type OutreachThreadMode = "new_thread" | "same_thread";
1292
+ type ManualTaskContinueBehavior = "continue_after_delay" | "wait_until_completed";
1293
+ type OutreachStepType = {
1294
+ type: "email";
1295
+ template_id: string;
1296
+ template_vars?: Record<string, unknown>;
1297
+ body?: string | null;
1298
+ thread_mode?: OutreachThreadMode;
1299
+ attachments?: string[];
1300
+ } | {
1301
+ type: "manual_task";
1302
+ target_channel_type?: ChannelType | null;
1303
+ title: string;
1304
+ instructions: string;
1305
+ suggested_message?: string | null;
1306
+ external_url?: string | null;
1307
+ continue_behavior: ManualTaskContinueBehavior;
1308
+ };
1309
+ type CampaignManualTaskOutcome = "done" | "skipped" | "got_reply" | "do_not_contact";
1310
+ type OutreachPersonalizationStatus = "idle" | "running" | "completed" | "failed";
1311
+ type SuppressionStatus = "active" | "archived";
1312
+ type SuppressionTargetType = "email" | "domain" | "contact" | "phone";
1313
+ type SuppressionScopeType = "store" | "campaign";
1314
+ type SuppressionReason = "manual" | "unsubscribed" | "bounced" | "complained" | "replied";
1315
+ type SuppressionSource = "admin" | "import" | "reply" | "system";
1316
+ type WorkflowStatus = "active" | "draft" | "archived";
1317
+ type PromoCodeStatus = "active" | "draft" | "archived";
1318
+ type CollectionStatus = "active" | "draft" | "archived";
1319
+ type EntryStatus = "active" | "draft" | "archived";
1320
+ type EmailTemplateStatus = "active" | "draft" | "archived";
1321
+ type FormStatus = "active" | "draft" | "archived";
1322
+ type TaxonomyStatus = "active" | "draft" | "archived";
1323
+ type OrderCancellationReason = "admin_rejected" | "contact_cancelled" | "payment_failed" | "expired" | "other";
1324
+ type OrderItemStatus = {
1325
+ status: "pending";
1326
+ expires_at: number;
1327
+ } | {
1328
+ status: "confirmed";
1329
+ } | {
1330
+ status: "cancelled";
1331
+ reason: OrderCancellationReason;
1332
+ };
1333
+ type OrderStatus = "pending" | "partially_confirmed" | "confirmed" | "partially_cancelled" | "cancelled" | "completed";
1334
+ type OrderPaymentStatus = {
1335
+ status: "pending";
1336
+ at: number;
1337
+ } | {
1338
+ status: "requires_action";
1339
+ at: number;
1340
+ reason?: string | null;
1341
+ } | {
1342
+ status: "processing";
1343
+ at: number;
1344
+ } | {
1345
+ status: "authorized";
1346
+ at: number;
1347
+ amount: number;
1348
+ } | {
1349
+ status: "partially_captured";
1350
+ at: number;
1351
+ amount: number;
1352
+ } | {
1353
+ status: "captured";
1354
+ at: number;
1355
+ amount: number;
1356
+ } | {
1357
+ status: "partially_refunded";
1358
+ at: number;
1359
+ amount: number;
1360
+ } | {
1361
+ status: "refunded";
1362
+ at: number;
1363
+ amount: number;
1364
+ } | {
1365
+ status: "voided";
1366
+ at: number;
1367
+ amount: number;
1368
+ } | {
1369
+ status: "cancelled";
1370
+ at: number;
1371
+ reason?: string | null;
1372
+ } | {
1373
+ status: "expired";
1374
+ at: number;
1375
+ } | {
1376
+ status: "failed";
1377
+ at: number;
1378
+ reason?: string | null;
1379
+ };
1380
+ interface TimeRange {
1381
+ from: number;
1382
+ to: number;
1383
+ }
1384
+ type BlockSchemaType = "text" | "localized_text" | "number" | "boolean" | "date" | "geo_location" | "markdown" | "media" | "entry" | "array" | "object";
1385
+ interface BlockSchemaProperties {
1386
+ min_values?: number | null;
1387
+ max_values?: number | null;
1388
+ min_length?: number | null;
1389
+ max_length?: number | null;
1390
+ pattern?: string | null;
1391
+ min?: number | null;
1392
+ max?: number | null;
1393
+ collection_id?: string | null;
1394
+ on_delete?: "restrict" | "set_null" | null;
1395
+ }
1396
+ interface BlockSchema {
1397
+ id: string;
1398
+ key: string;
1399
+ type: BlockSchemaType;
1400
+ required: boolean;
1401
+ properties: BlockSchemaProperties;
1402
+ children: BlockSchema[];
1403
+ }
1404
+ interface Collection {
1405
+ id: string;
1406
+ store_id: string;
1407
+ key: string;
1408
+ schema: BlockSchema[];
1409
+ blocks: Block[];
1410
+ status: CollectionStatus;
1411
+ created_at: number;
1412
+ updated_at: number;
1413
+ }
1414
+ interface MediaRef {
1415
+ media_id: string;
1416
+ url?: string | null;
1417
+ mime_type?: string | null;
1418
+ alt?: string | null;
1419
+ }
1420
+ type FieldOperation = "equals" | "not_equals" | "contains" | "in" | "greater_than" | "greater_than_or_equal" | "less_than" | "less_than_or_equal";
1421
+ type EntryBlockQuery = {
1422
+ type: "text";
1423
+ key: string;
1424
+ values: string[];
1425
+ } | {
1426
+ type: "number";
1427
+ key: string;
1428
+ operation: FieldOperation;
1429
+ value: number;
1430
+ } | {
1431
+ type: "boolean";
1432
+ key: string;
1433
+ value: boolean;
1434
+ } | {
1435
+ type: "date";
1436
+ key: string;
1437
+ operation: FieldOperation;
1438
+ value: number;
1439
+ };
1440
+ interface CollectionEntry {
1441
+ id: string;
1442
+ store_id: string;
1443
+ collection_id: string;
1444
+ key: string;
1445
+ slug: Record<string, string>;
1446
+ blocks: Block[];
1447
+ status: EntryStatus;
1448
+ created_at: number;
1449
+ updated_at: number;
1450
+ }
1451
+ interface EmailTemplate {
1452
+ id: string;
1453
+ key: string;
1454
+ store_id: string;
1455
+ subject: Record<string, string>;
1456
+ body: string;
1457
+ from_name: string;
1458
+ from_email: string;
1459
+ reply_to?: string;
1460
+ preheader?: string;
1461
+ variables: EmailTemplateVariable[];
1462
+ sample_data: Record<string, unknown>;
1463
+ status: EmailTemplateStatus;
1464
+ created_at: number;
1465
+ updated_at: number;
1466
+ }
1467
+ interface EmailTemplateVariable {
1468
+ key: string;
1469
+ }
1470
+ interface Form {
1471
+ id: string;
1472
+ key: string;
1473
+ store_id: string;
1474
+ schema: FormSchema[];
1475
+ status: FormStatus;
1476
+ created_at: number;
1477
+ updated_at: number;
1478
+ }
1479
+ interface FormSubmission {
1480
+ id: string;
1481
+ form_id: string;
1482
+ store_id: string;
1483
+ contact_id: string;
1484
+ fields: FormField[];
1485
+ created_at: number;
1486
+ }
1487
+ interface Taxonomy {
1488
+ id: string;
1489
+ key: string;
1490
+ store_id: string;
1491
+ parent_id?: string | null;
1492
+ schema?: TaxonomySchema[];
1493
+ status: TaxonomyStatus;
1494
+ created_at: number;
1495
+ updated_at: number;
1496
+ }
1497
+ interface ServiceDuration {
1498
+ duration: number;
1499
+ is_pause: boolean;
1500
+ }
1501
+ interface WorkingHour {
1502
+ from: number;
1503
+ to: number;
1504
+ }
1505
+ interface WorkingDay {
1506
+ day: string;
1507
+ working_hours: WorkingHour[];
1508
+ }
1509
+ interface SpecificDate {
1510
+ date: number;
1511
+ working_hours: WorkingHour[];
1512
+ }
1513
+ interface ServiceProvider {
1514
+ id: string;
1515
+ service_id: string;
1516
+ provider_id: string;
1517
+ store_id: string;
1518
+ working_days: WorkingDay[];
1519
+ specific_dates: SpecificDate[];
1520
+ prices: Price[];
1521
+ durations: ServiceDuration[];
1522
+ slot_interval: number;
1523
+ forms: FormEntry[];
1524
+ reminders: number[];
1525
+ min_advance: number;
1526
+ max_advance: number;
1527
+ created_at: number;
1528
+ updated_at: number;
1529
+ }
1530
+ interface Service {
1531
+ id: string;
1532
+ key: string;
1533
+ slug: Record<string, string>;
1534
+ store_id: string;
1535
+ blocks: Block[];
1536
+ taxonomies: TaxonomyEntry[];
1537
+ created_at: number;
1538
+ updated_at: number;
1539
+ status: ServiceStatus;
1540
+ }
1541
+ interface ProviderTimelinePoint {
1542
+ timestamp: number;
1543
+ booked: number;
1544
+ }
1545
+ interface Provider {
1546
+ id: string;
1547
+ key: string;
1548
+ slug: Record<string, string>;
1549
+ store_id: string;
1550
+ status: ProviderStatus;
1551
+ blocks: Block[];
1552
+ taxonomies: TaxonomyEntry[];
1553
+ timeline: ProviderTimelinePoint[];
1554
+ created_at: number;
1555
+ updated_at: number;
1556
+ }
1557
+ interface WorkflowEdge {
1558
+ source: string;
1559
+ target: string;
1560
+ output: string;
1561
+ back_edge: boolean;
1562
+ }
1563
+ interface Workflow {
1564
+ id: string;
1565
+ key: string;
1566
+ store_id: string;
1567
+ secret: string;
1568
+ status: WorkflowStatus;
1569
+ nodes: Record<string, WorkflowNode>;
1570
+ edges: WorkflowEdge[];
1571
+ schedule?: string;
1572
+ created_at: number;
1573
+ updated_at: number;
1574
+ }
1575
+ type WorkflowNode = WorkflowTriggerNode | WorkflowHttpNode | WorkflowDeployWebhookNode | WorkflowGoogleDriveUploadNode | WorkflowSwitchNode | WorkflowTransformNode | WorkflowLoopNode;
1576
+ interface WorkflowTriggerNode {
1577
+ type: "trigger";
1578
+ event?: string;
1579
+ delay_ms?: number;
1580
+ schema?: Block[];
1581
+ }
1582
+ interface WorkflowHttpNode {
1583
+ type: "http";
1584
+ method: WorkflowHttpMethod;
1585
+ url: string;
1586
+ headers?: Record<string, string>;
1587
+ body?: any;
1588
+ timeout_ms?: number;
1589
+ delay_ms?: number;
1590
+ retries?: number;
1591
+ retry_delay_ms?: number;
1592
+ }
1593
+ interface WorkflowDeployWebhookNode {
1594
+ type: "deploy_webhook";
1595
+ build_hook_id: string;
1596
+ timeout_ms?: number;
1597
+ delay_ms?: number;
1598
+ retries?: number;
1599
+ retry_delay_ms?: number;
1600
+ }
1601
+ type WorkflowAccountType = "google_drive";
1602
+ interface WorkflowAccountProfile {
1603
+ external_account_id: string;
1604
+ display_name: string;
1605
+ email?: string | null;
1606
+ }
1607
+ interface WorkflowAccount {
1608
+ id: string;
1609
+ store_id: string;
1610
+ key: string;
1611
+ type: WorkflowAccountType;
1612
+ profile: WorkflowAccountProfile;
1613
+ created_at: number;
1614
+ updated_at: number;
1615
+ }
1616
+ interface WorkflowAccountConnectUrl {
1617
+ authorization_url: string;
1618
+ state: string;
1619
+ }
1620
+ interface WorkflowGoogleDriveUploadNode {
1621
+ type: "google_drive_upload";
1622
+ workflow_account_id: string;
1623
+ name: string;
1624
+ mime_type: string;
1625
+ content?: any;
1626
+ parent_folder_id?: string | null;
1627
+ timeout_ms?: number;
1628
+ delay_ms?: number;
1629
+ retries?: number;
1630
+ retry_delay_ms?: number;
1631
+ }
1632
+ interface WorkflowSwitchRule {
1633
+ condition: string;
1634
+ }
1635
+ interface WorkflowSwitchNode {
1636
+ type: "switch";
1637
+ rules: WorkflowSwitchRule[];
1638
+ delay_ms?: number;
1639
+ }
1640
+ interface WorkflowTransformNode {
1641
+ type: "transform";
1642
+ code: string;
1643
+ delay_ms?: number;
1644
+ }
1645
+ interface WorkflowLoopNode {
1646
+ type: "loop";
1647
+ expression: string;
1648
+ delay_ms?: number;
1649
+ }
1650
+ type WorkflowHttpMethod = "get" | "post" | "put" | "patch" | "delete";
1651
+ type ExecutionStatus = "pending" | "running" | "completed" | "failed" | "cancelled";
1652
+ interface NodeResult {
1653
+ output: any;
1654
+ route: string;
1655
+ started_at: number;
1656
+ completed_at: number;
1657
+ duration_ms: number;
1658
+ error?: string;
1659
+ }
1660
+ interface WorkflowExecution {
1661
+ id: string;
1662
+ workflow_id: string;
1663
+ store_id: string;
1664
+ status: ExecutionStatus;
1665
+ input: Record<string, any>;
1666
+ results: Record<string, NodeResult>;
1667
+ error?: string;
1668
+ scheduled_at: number;
1669
+ started_at: number;
1670
+ completed_at?: number;
1671
+ created_at: number;
1672
+ updated_at: number;
1673
+ }
1674
+ type ContactListType = {
1675
+ type: "standard";
1676
+ } | {
1677
+ type: "confirmation";
1678
+ confirm_template_id?: string | null;
1679
+ } | {
1680
+ type: "paid";
1681
+ prices: SubscriptionPrice[];
1682
+ payment_provider_id?: string | null;
1683
+ };
1684
+ interface ContactSessionToken$1 {
1685
+ id: string;
1686
+ token: string;
1687
+ created_at: number;
1688
+ }
1689
+ interface ContactVerificationCode$1 {
1690
+ code: string;
1691
+ created_at: number;
1692
+ used: boolean;
1693
+ store_id?: string | null;
1694
+ }
1695
+ interface PromoUsage$1 {
1696
+ promo_code_id: string;
1697
+ uses: number;
1698
+ }
1699
+ type ChannelType = "email" | "phone" | "whatsapp" | "instagram" | "facebook" | "messenger" | "linkedin_company" | "linkedin_person" | "contact_form" | "booking_link" | "telegram" | "tiktok" | "youtube" | "other";
1700
+ interface ContactChannel {
1701
+ type: ChannelType;
1702
+ label?: string | null;
1703
+ value: string;
1704
+ normalized_value?: string | null;
1705
+ provider?: string | null;
1706
+ provider_user_id?: string | null;
1707
+ verified_at?: number | null;
1708
+ is_primary?: boolean;
1709
+ consent_status?: ContactChannelConsentStatus;
1710
+ subscribed_at?: number | null;
1711
+ unsubscribed_at?: number | null;
1712
+ source_url?: string | null;
1713
+ confidence?: number | null;
1714
+ notes?: string | null;
1715
+ created_at: number;
1716
+ updated_at: number;
1717
+ }
1718
+ type ContactChannelConsentStatus = "unknown" | "subscribed" | "unsubscribed" | "bounced" | "blocked";
1719
+ interface Contact$1 {
1720
+ id: string;
1721
+ store_id: string;
1722
+ email: string | null;
1723
+ verified: boolean;
1724
+ status: ContactStatus;
1725
+ channels: ContactChannel[];
1726
+ promo_usage: PromoUsage$1[];
1727
+ lists: ContactListMembership[];
1728
+ taxonomies: TaxonomyEntry[];
1729
+ auth_tokens: ContactSessionToken$1[];
1730
+ verification_codes: ContactVerificationCode$1[];
1731
+ created_at: number;
1732
+ updated_at: number;
1733
+ }
1734
+ interface ContactListAccessResponse {
1735
+ has_access: boolean;
1736
+ membership?: ContactListMembership | null;
1737
+ }
1738
+ interface ContactListSubscribeResponse {
1739
+ checkout_url?: string | null;
1740
+ membership?: ContactListMembership | null;
1741
+ }
1742
+ interface ContactList {
1743
+ id: string;
1744
+ store_id: string;
1745
+ key: string;
1746
+ name: string;
1747
+ description?: string | null;
1748
+ status: ContactListStatus;
1749
+ type: ContactListType;
1750
+ source: ContactListSource;
1751
+ member_count: number;
1752
+ created_at: number;
1753
+ updated_at: number;
1754
+ }
1755
+ interface ContactListMembership {
1756
+ id: string;
1757
+ store_id: string;
1758
+ contact_id: string;
1759
+ contact_list_id: string;
1760
+ source: ContactListSource;
1761
+ fields: Record<string, unknown>;
1762
+ lead_description?: string | null;
1763
+ lead?: LeadInsight | null;
1764
+ status: ContactListMembershipStatus;
1765
+ plan_id: string;
1766
+ pending_plan_id: string | null;
1767
+ payment: ContactListMembershipPayment;
1768
+ provider_cancellation: ContactListMembershipProviderCancellation;
1769
+ start_date: number;
1770
+ end_date: number;
1771
+ token: string;
1772
+ created_at: number;
1773
+ updated_at: number;
1774
+ }
1775
+ interface ContactListMember {
1776
+ contact: Contact$1;
1777
+ membership: ContactListMembership;
1778
+ }
1779
+ interface ActionLocation {
1780
+ country_code?: string | null;
1781
+ city?: string | null;
1782
+ region?: string | null;
1783
+ timezone?: string | null;
1784
+ }
1785
+ interface ActionDevice {
1786
+ device_type?: string | null;
1787
+ browser?: string | null;
1788
+ os?: string | null;
1789
+ language?: string | null;
1790
+ }
1791
+ interface ActionSession {
1792
+ idx?: number | null;
1793
+ }
1794
+ interface ActionContext {
1795
+ location?: ActionLocation | null;
1796
+ device?: ActionDevice | null;
1797
+ session?: ActionSession | null;
1798
+ }
1799
+ interface SocialActionAuthor {
1800
+ provider_user_id?: string | null;
1801
+ name?: string | null;
1802
+ handle?: string | null;
1803
+ }
1804
+ type OpportunityType = "lead" | "support" | "complaint" | "question" | "upsell" | "partnership" | "engagement";
1805
+ type OpportunityStage = "new" | "reviewing" | "contacted" | "won" | "lost" | "dismissed";
1806
+ type OpportunitySource = {
1807
+ type: "social_comment";
1808
+ publication_id: string;
1809
+ comment_id: string;
1810
+ action_id?: string | null;
1811
+ } | {
1812
+ type: "form_submission";
1813
+ form_id: string;
1814
+ submission_id: string;
1815
+ } | {
1816
+ type: "tracked";
1817
+ key: string;
1818
+ action_id?: string | null;
1819
+ } | {
1820
+ type: "manual";
1821
+ };
1822
+ type ActionData = {
1823
+ type: "tracked";
1824
+ value: {
1825
+ key: string;
1826
+ payload: Record<string, unknown>;
1827
+ context?: ActionContext | null;
1828
+ };
1829
+ } | {
1830
+ type: "form_submission";
1831
+ value: {
1832
+ form_id: string;
1833
+ form_key: string;
1834
+ submission_id: string;
1835
+ field_keys: string[];
1836
+ context?: ActionContext | null;
1837
+ };
1838
+ } | {
1839
+ type: "social_comment";
1840
+ value: {
1841
+ social_account_id: string;
1842
+ provider_type: SocialProviderType;
1843
+ publication_id: string;
1844
+ comment_id: string;
1845
+ provider_comment_id: string;
1846
+ provider_parent_comment_id?: string | null;
1847
+ author: SocialActionAuthor;
1848
+ text: string;
1849
+ };
1850
+ } | {
1851
+ type: "social_reply";
1852
+ value: {
1853
+ social_account_id: string;
1854
+ provider_type: SocialProviderType;
1855
+ publication_id: string;
1856
+ comment_id: string;
1857
+ provider_comment_id?: string | null;
1858
+ provider_comment_url?: string | null;
1859
+ text: string;
1860
+ };
1861
+ } | {
1862
+ type: "order";
1863
+ value: {
1864
+ order_id: string;
1865
+ status: string;
1866
+ total?: number | null;
1867
+ };
1868
+ } | {
1869
+ type: "campaign_reply";
1870
+ value: {
1871
+ campaign_id: string;
1872
+ enrollment_id: string;
1873
+ message_id: string;
1874
+ text: string;
1875
+ };
1876
+ } | {
1877
+ type: "direct_message";
1878
+ value: {
1879
+ social_account_id: string;
1880
+ provider_type: SocialProviderType;
1881
+ thread_id: string;
1882
+ message_id: string;
1883
+ text: string;
1884
+ };
1885
+ } | {
1886
+ type: "manual";
1887
+ value: {
1888
+ text: string;
1889
+ account_id?: string | null;
1890
+ };
1891
+ } | {
1892
+ type: "opportunity";
1893
+ value: {
1894
+ type: OpportunityType;
1895
+ stage: OpportunityStage;
1896
+ score?: number | null;
1897
+ reason?: string | null;
1898
+ suggested_next_action?: string | null;
1899
+ source: OpportunitySource;
1900
+ lead?: LeadInsight | null;
1901
+ };
1902
+ };
1903
+ interface Action {
1904
+ id: string;
1905
+ store_id: string;
1906
+ contact_id: string;
1907
+ key: string;
1908
+ type: ActionData["type"];
1909
+ preview_text?: string | null;
1910
+ occurred_at: number;
1911
+ created_at: number;
1912
+ updated_at: number;
1913
+ data: ActionData;
1914
+ }
1915
+ interface Mailbox {
1916
+ id: string;
1917
+ store_id: string;
1918
+ key: string;
1919
+ email: string;
1920
+ from_name: string;
1921
+ reply_to_email?: string | null;
1922
+ provider: SmtpImapMailboxProvider;
1923
+ status: MailboxStatus;
1924
+ daily_limit: number;
1925
+ sent_today: number;
1926
+ last_sent_at?: number | null;
1927
+ created_at: number;
1928
+ updated_at: number;
1929
+ }
1930
+ interface OutreachStep {
1931
+ id?: string;
1932
+ position?: number;
1933
+ delay_seconds?: number;
1934
+ type?: OutreachStepType;
1935
+ }
1936
+ interface OutreachPersonalizationCounters {
1937
+ total_contacts: number;
1938
+ draft_messages: number;
1939
+ generated_messages: number;
1940
+ template_messages: number;
1941
+ failed_messages: number;
1942
+ }
1943
+ interface OutreachPersonalizationState {
1944
+ status: OutreachPersonalizationStatus;
1945
+ step_position?: number | null;
1946
+ contact_ids: string[];
1947
+ overwrite: boolean;
1948
+ instructions?: string | null;
1949
+ error?: string | null;
1950
+ counters: OutreachPersonalizationCounters;
1951
+ started_at?: number | null;
1952
+ completed_at?: number | null;
1953
+ }
1954
+ interface Campaign {
1955
+ id: string;
1956
+ store_id: string;
1957
+ key: string;
1958
+ name: string;
1959
+ mailbox_ids: string[];
1960
+ status: CampaignStatus;
1961
+ steps: OutreachStep[];
1962
+ personalization: OutreachPersonalizationState;
1963
+ launched_at?: number | null;
1964
+ created_at: number;
1965
+ updated_at: number;
1966
+ }
1967
+ interface CampaignLaunchReadiness {
1968
+ ready: boolean;
1969
+ blockers: string[];
1970
+ warnings: string[];
1971
+ contact_count: number;
1972
+ sender_count: number;
1973
+ step_count: number;
1974
+ daily_capacity: number;
1975
+ expected_drafts: number;
1976
+ draft_count: number;
1977
+ pending_drafts: number;
1978
+ generated_drafts: number;
1979
+ template_drafts: number;
1980
+ edited_drafts: number;
1981
+ personalization_errors: number;
1982
+ stale_drafts: number;
1983
+ suppression_count: number;
1984
+ }
1985
+ interface CampaignEnrollmentImportResult$1 {
1986
+ imported_count: number;
1987
+ existing_count: number;
1988
+ skipped_count: number;
1989
+ draft_count: number;
1990
+ }
1991
+ interface CampaignEnrollment {
1992
+ id: string;
1993
+ store_id: string;
1994
+ campaign_id: string;
1995
+ contact_id: string;
1996
+ contact_list_membership_id?: string | null;
1997
+ import_source: CampaignEnrollmentImportSource;
1998
+ import_source_id?: string | null;
1999
+ imported_at?: number | null;
2000
+ mailbox_id?: string | null;
2001
+ lead_description?: string | null;
2002
+ fields: Record<string, unknown>;
2003
+ status: CampaignEnrollmentStatus;
2004
+ current_step_position: number;
2005
+ next_action_at?: number | null;
2006
+ created_at: number;
2007
+ updated_at: number;
2008
+ }
2009
+ interface CampaignMessage {
2010
+ id: string;
2011
+ store_id: string;
2012
+ campaign_id: string;
2013
+ campaign_enrollment_id: string;
2014
+ contact_id: string;
2015
+ mailbox_id: string;
2016
+ direction: CampaignMessageDirection;
2017
+ type: CampaignMessageType;
2018
+ step_id?: string | null;
2019
+ step_position?: number | null;
2020
+ template_copy_hash?: string | null;
2021
+ copy_source: CampaignMessageCopySource;
2022
+ personalized_at?: number | null;
2023
+ edited_at?: number | null;
2024
+ personalization_error?: string | null;
2025
+ in_reply_to_message_id?: string | null;
2026
+ status: CampaignMessageStatus;
2027
+ to_email: string;
2028
+ from_email: string;
2029
+ subject: string;
2030
+ body: string;
2031
+ body_html?: string | null;
2032
+ template_id?: string | null;
2033
+ template_vars: Record<string, unknown>;
2034
+ rendered_subject?: string | null;
2035
+ rendered_html?: string | null;
2036
+ rendered_text?: string | null;
2037
+ attachments: string[];
2038
+ target_channel_type?: ChannelType | null;
2039
+ resolved_channel?: ContactChannel | null;
2040
+ title?: string | null;
2041
+ instructions?: string | null;
2042
+ suggested_message?: string | null;
2043
+ external_url?: string | null;
2044
+ continue_behavior?: ManualTaskContinueBehavior | null;
2045
+ outcome?: CampaignManualTaskOutcome | null;
2046
+ note?: string | null;
2047
+ provider_message_id?: string | null;
2048
+ provider_thread_id?: string | null;
2049
+ error?: string | null;
2050
+ due_at?: number | null;
2051
+ completed_at?: number | null;
2052
+ sent_at?: number | null;
2053
+ received_at?: number | null;
2054
+ created_at: number;
2055
+ updated_at: number;
2056
+ }
2057
+ interface CampaignEnrollmentConversationResponse {
2058
+ enrollment: CampaignEnrollment;
2059
+ messages: CampaignMessage[];
2060
+ }
2061
+ interface Suppression {
2062
+ id: string;
2063
+ store_id: string;
2064
+ campaign_id?: string | null;
2065
+ contact_id?: string | null;
2066
+ email?: string | null;
2067
+ domain?: string | null;
2068
+ target_type: SuppressionTargetType;
2069
+ target_key: string;
2070
+ scope_type: SuppressionScopeType;
2071
+ scope_key: string;
2072
+ reason: SuppressionReason;
2073
+ status: SuppressionStatus;
2074
+ source: SuppressionSource;
2075
+ created_at: number;
2076
+ updated_at: number;
2077
+ }
2078
+ type LeadResearchRunStatus = "draft" | "running" | "completed" | "failed" | "cancelled";
2079
+ type LeadEmailClassification = "official_domain" | "role_official" | "personal_official" | "free_mail" | "unusable" | "unknown";
2080
+ type LeadValidationCheckStatus = "passed" | "warning" | "failed" | "unknown";
2081
+ type CampaignRoute = "email_only" | "email_manual_followup" | "manual_only" | "needs_review";
2082
+ interface LeadScores {
2083
+ fit: number;
2084
+ problem: number;
2085
+ channel: number;
2086
+ intent: number;
2087
+ data_quality: number;
2088
+ }
2089
+ interface ChannelMessage {
2090
+ type: ChannelType;
2091
+ subject?: string | null;
2092
+ body: string;
2093
+ }
2094
+ interface LeadInsight {
2095
+ company?: string | null;
2096
+ contact_name?: string | null;
2097
+ website?: string | null;
2098
+ industry?: string | null;
2099
+ location?: string | null;
2100
+ description?: string | null;
2101
+ pain_points: string[];
2102
+ fit_reason?: string | null;
2103
+ scores: LeadScores;
2104
+ best_channel?: ChannelType | null;
2105
+ backup_channel?: ChannelType | null;
2106
+ route: CampaignRoute;
2107
+ first_messages: ChannelMessage[];
2108
+ run_id?: string | null;
2109
+ source_url?: string | null;
2110
+ source_excerpt?: string | null;
2111
+ reasoning_summary?: string | null;
2112
+ }
2113
+ interface LeadResearchRun {
2114
+ id: string;
2115
+ store_id: string;
2116
+ contact_list_id: string;
2117
+ title?: string | null;
2118
+ status: LeadResearchRunStatus;
2119
+ error?: string | null;
2120
+ started_at?: number | null;
2121
+ completed_at?: number | null;
2122
+ created_at: number;
2123
+ updated_at: number;
2124
+ }
2125
+ interface LeadValidationCheck {
2126
+ key: string;
2127
+ status: LeadValidationCheckStatus;
2128
+ message: string;
2129
+ }
2130
+ interface LeadEmailValidationResult {
2131
+ email: string;
2132
+ normalized_email?: string | null;
2133
+ domain?: string | null;
2134
+ classification: LeadEmailClassification;
2135
+ confidence: number;
2136
+ importable: boolean;
2137
+ hard_blockers: string[];
2138
+ checks: LeadValidationCheck[];
2139
+ }
2140
+ type LeadResearchMessageRole = "system" | "user" | "assistant" | "action" | "tool";
2141
+ interface LeadResearchMessage {
2142
+ id: string;
2143
+ role: LeadResearchMessageRole;
2144
+ content: string;
2145
+ metadata?: Record<string, unknown> | null;
2146
+ created_at: number;
2147
+ }
2148
+ interface ResearchContactListMember {
2149
+ contact: Contact$1;
2150
+ membership: ContactListMembership;
2151
+ }
2152
+ interface SendLeadResearchMessageResult {
2153
+ response: string;
2154
+ run: LeadResearchRun;
2155
+ contact_list_members: ResearchContactListMember[];
2156
+ }
2157
+ type EventAction = {
2158
+ action: "order_created";
2159
+ } | {
2160
+ action: "order_updated";
2161
+ } | {
2162
+ action: "order_confirmed";
2163
+ } | {
2164
+ action: "order_payment_received";
2165
+ data: {
2166
+ amount: number;
2167
+ currency: string;
2168
+ };
2169
+ } | {
2170
+ action: "order_payment_failed";
2171
+ data: {
2172
+ reason?: string;
2173
+ };
2174
+ } | {
2175
+ action: "order_refunded";
2176
+ data: {
2177
+ amount: number;
2178
+ currency: string;
2179
+ reason?: string;
2180
+ };
2181
+ } | {
2182
+ action: "order_cancelled";
2183
+ data: {
2184
+ reason?: string;
2185
+ };
2186
+ } | {
2187
+ action: "order_shipment_created";
2188
+ data: {
2189
+ shipment_id: string;
2190
+ };
2191
+ } | {
2192
+ action: "order_shipment_in_transit";
2193
+ data: {
2194
+ shipment_id: string;
2195
+ };
2196
+ } | {
2197
+ action: "order_shipment_out_for_delivery";
2198
+ data: {
2199
+ shipment_id: string;
2200
+ };
2201
+ } | {
2202
+ action: "order_shipment_delivered";
2203
+ data: {
2204
+ shipment_id: string;
2205
+ };
2206
+ } | {
2207
+ action: "order_shipment_failed";
2208
+ data: {
2209
+ shipment_id: string;
2210
+ reason?: string;
2211
+ };
2212
+ } | {
2213
+ action: "order_shipment_returned";
2214
+ data: {
2215
+ shipment_id: string;
2216
+ };
2217
+ } | {
2218
+ action: "order_shipment_status_changed";
2219
+ data: {
2220
+ shipment_id: string;
2221
+ from: string;
2222
+ to: string;
2223
+ };
2224
+ } | {
2225
+ action: "product_created";
2226
+ } | {
2227
+ action: "product_updated";
2228
+ } | {
2229
+ action: "product_deleted";
2230
+ } | {
2231
+ action: "collection_created";
2232
+ } | {
2233
+ action: "collection_updated";
2234
+ } | {
2235
+ action: "collection_deleted";
2236
+ } | {
2237
+ action: "entry_created";
2238
+ } | {
2239
+ action: "entry_updated";
2240
+ } | {
2241
+ action: "entry_deleted";
2242
+ } | {
2243
+ action: "provider_created";
2244
+ } | {
2245
+ action: "provider_updated";
2246
+ } | {
2247
+ action: "provider_deleted";
2248
+ } | {
2249
+ action: "service_created";
2250
+ } | {
2251
+ action: "service_updated";
2252
+ } | {
2253
+ action: "service_deleted";
2254
+ } | {
2255
+ action: "account_created";
2256
+ } | {
2257
+ action: "account_updated";
2258
+ } | {
2259
+ action: "account_deleted";
2260
+ } | {
2261
+ action: "media_created";
2262
+ } | {
2263
+ action: "media_deleted";
2264
+ } | {
2265
+ action: "store_created";
2266
+ } | {
2267
+ action: "store_updated";
2268
+ } | {
2269
+ action: "store_deleted";
2270
+ } | {
2271
+ action: "contact_list_created";
2272
+ } | {
2273
+ action: "contact_list_updated";
2274
+ } | {
2275
+ action: "contact_list_contact_added";
2276
+ } | {
2277
+ action: "contact_list_contact_removed";
2278
+ } | {
2279
+ action: "contact_list_contact_pending";
2280
+ } | {
2281
+ action: "contact_list_contact_confirmed";
2282
+ } | {
2283
+ action: "contact_list_contact_cancelled";
2284
+ };
2285
+ interface Event {
2286
+ id: string;
2287
+ entity: string;
2288
+ event: EventAction;
2289
+ actor: string;
2290
+ created_at: number;
2291
+ }
2292
+ type ShippingStatus = "pending" | "label_created" | "in_transit" | "out_for_delivery" | "delivered" | "failed" | "returned";
2293
+ interface OrderShipping {
2294
+ carrier: string;
2295
+ service: string;
2296
+ tracking_number?: string | null;
2297
+ tracking_url?: string | null;
2298
+ label_url?: string | null;
2299
+ status: ShippingStatus;
2300
+ }
2301
+ interface ShipmentLine {
2302
+ order_item_id: string;
2303
+ fulfillment_order_line_id?: string | null;
2304
+ quantity: number;
2305
+ }
2306
+ type ShipmentLabelStatus = "requested" | "processing" | "succeeded" | "failed" | "unknown";
2307
+ type ShipmentLabelError = {
2308
+ type: "provider_rejected";
2309
+ message: string;
2310
+ provider_code?: string | null;
2311
+ provider_status?: number | null;
2312
+ at: number;
2313
+ } | {
2314
+ type: "unknown_outcome";
2315
+ message: string;
2316
+ at: number;
2317
+ } | {
2318
+ type: "missing_configuration";
2319
+ message: string;
2320
+ at: number;
2321
+ };
2322
+ interface Shipment {
2323
+ id: string;
2324
+ fulfillment_order_id?: string | null;
2325
+ location_id: string;
2326
+ rate_id?: string | null;
2327
+ lines: ShipmentLine[];
2328
+ carrier?: string | null;
2329
+ service?: string | null;
2330
+ tracking_number?: string | null;
2331
+ tracking_url?: string | null;
2332
+ label_url?: string | null;
2333
+ status: ShippingStatus;
2334
+ label_status: ShipmentLabelStatus;
2335
+ label_error?: ShipmentLabelError | null;
2336
+ created_at: number;
2337
+ updated_at: number;
2338
+ }
2339
+ interface ShippingRate {
2340
+ id: string;
2341
+ carrier: string;
2342
+ service: string;
2343
+ display_name: string;
2344
+ amount: number;
2345
+ currency: string;
2346
+ estimated_days?: number | null;
2347
+ }
2348
+ interface Parcel {
2349
+ length: number;
2350
+ width: number;
2351
+ height: number;
2352
+ weight: number;
2353
+ distance_unit: "in" | "cm";
2354
+ mass_unit: "oz" | "lb" | "g" | "kg";
2355
+ }
2356
+ interface PurchaseLabelResult {
2357
+ tracking_number: string;
2358
+ tracking_url?: string | null;
2359
+ label_url: string;
2360
+ carrier: string;
2361
+ service: string;
2362
+ }
2363
+ interface ShipResult {
2364
+ shipment_id: string;
2365
+ tracking_number?: string | null;
2366
+ tracking_url?: string | null;
2367
+ label_url?: string | null;
2368
+ label_status: ShipmentLabelStatus;
2369
+ }
2370
+ interface CustomsItem {
2371
+ description: string;
2372
+ quantity: number;
2373
+ net_weight: string;
2374
+ mass_unit: string;
2375
+ value_amount: string;
2376
+ value_currency: string;
2377
+ origin_country: string;
2378
+ tariff_number?: string | null;
2379
+ }
2380
+ interface CustomsDeclaration {
2381
+ contents_type: string;
2382
+ contents_explanation?: string | null;
2383
+ non_delivery_option: string;
2384
+ certify: boolean;
2385
+ certify_signer: string;
2386
+ items: CustomsItem[];
2387
+ }
2388
+ interface PromoCode {
2389
+ id: string;
2390
+ store_id: string;
2391
+ code: string;
2392
+ discounts: Discount[];
2393
+ conditions: Condition[];
2394
+ status: PromoCodeStatus;
2395
+ uses: number;
2396
+ created_at: number;
2397
+ updated_at: number;
2398
+ }
2399
+
2400
+ interface CreateLocationParams {
2401
+ key: string;
2402
+ address: Address;
2403
+ is_pickup_location?: boolean;
2404
+ }
2405
+ interface UpdateLocationParams {
2406
+ id: string;
2407
+ key: string;
2408
+ address: Address;
2409
+ is_pickup_location?: boolean;
2410
+ }
2411
+ interface DeleteLocationParams {
2412
+ id: string;
2413
+ }
2414
+ interface CreateMarketParams {
2415
+ key: string;
2416
+ currency: string;
2417
+ tax_mode: "inclusive" | "exclusive";
2418
+ payment_methods?: PaymentMethod[];
2419
+ zones?: Zone[];
2420
+ }
2421
+ interface UpdateMarketParams {
2422
+ id: string;
2423
+ key?: string;
2424
+ currency?: string;
2425
+ tax_mode?: "inclusive" | "exclusive";
2426
+ payment_methods?: PaymentMethod[];
2427
+ zones?: Zone[];
2428
+ }
2429
+ interface DeleteMarketParams {
2430
+ id: string;
2431
+ }
2432
+ interface RequestOptions<T = any> {
2433
+ headers?: Record<string, string>;
2434
+ params?: Record<string, any>;
2435
+ signal?: AbortSignal;
2436
+ transformRequest?: (data: any) => any;
2437
+ onSuccess?: (ctx: {
2438
+ data: T;
2439
+ method: string;
2440
+ url: string;
2441
+ status: number;
2442
+ request?: any;
2443
+ duration_ms?: number;
2444
+ request_id?: string | null;
2445
+ }) => void | Promise<void>;
2446
+ onError?: (ctx: {
2447
+ error: any;
2448
+ method: string;
2449
+ url: string;
2450
+ status?: number;
2451
+ request?: any;
2452
+ response?: any;
2453
+ duration_ms?: number;
2454
+ request_id?: string | null;
2455
+ aborted?: boolean;
2456
+ }) => void | Promise<void>;
2457
+ }
2458
+ interface EshopItem {
2459
+ product_id: string;
2460
+ variant_id: string;
2461
+ quantity: number;
2462
+ }
2463
+ interface EshopQuoteItem {
2464
+ product_id: string;
2465
+ variant_id: string;
2466
+ quantity: number;
2467
+ price?: Price;
2468
+ }
2469
+ interface SlotRange {
2470
+ from: number;
2471
+ to: number;
2472
+ }
2473
+ interface ServiceQuoteItem {
2474
+ service_id: string;
2475
+ provider_id: string;
2476
+ slots: SlotRange[];
2477
+ forms?: FormEntry[];
2478
+ price?: Price;
2479
+ }
2480
+ interface ServiceCheckoutPart {
2481
+ service_id: string;
2482
+ provider_id: string;
2483
+ slots: SlotRange[];
2484
+ forms: FormEntry[];
2485
+ }
2486
+ interface ProductQuoteItemInput extends EshopQuoteItem {
2487
+ type: "product";
2488
+ }
2489
+ interface ServiceQuoteItemInput extends ServiceQuoteItem {
2490
+ type: "service";
2491
+ }
2492
+ type OrderQuoteItemInput = ProductQuoteItemInput | ServiceQuoteItemInput;
2493
+ type OrderQuoteCompatibleItemInput = OrderQuoteItemInput | EshopQuoteItem | ServiceQuoteItem;
2494
+ interface ProductCheckoutItemInput extends EshopItem {
2495
+ type: "product";
2496
+ id?: string;
2497
+ }
2498
+ interface ServiceCheckoutItemInput {
2499
+ type: "service";
2500
+ id?: string;
2501
+ service_id: string;
2502
+ provider_id: string;
2503
+ slots: SlotRange[];
2504
+ forms?: FormEntry[];
2505
+ }
2506
+ type OrderCheckoutItemInput = ProductCheckoutItemInput | ServiceCheckoutItemInput;
2507
+ type OrderCheckoutCompatibleItemInput = OrderCheckoutItemInput | EshopItem | ServiceCheckoutPart;
2508
+ interface TrustedProductCheckoutItemInput extends ProductCheckoutItemInput {
2509
+ price?: Price;
2510
+ }
2511
+ interface TrustedServiceCheckoutItemInput extends ServiceCheckoutItemInput {
2512
+ price?: Price;
2513
+ }
2514
+ type TrustedOrderCheckoutItemInput = TrustedProductCheckoutItemInput | TrustedServiceCheckoutItemInput;
2515
+ type TrustedOrderCheckoutCompatibleItemInput = TrustedOrderCheckoutItemInput | EshopItem | ServiceCheckoutPart;
2516
+ interface GetQuoteParams {
2517
+ store_id?: string;
2518
+ market?: string;
2519
+ items: OrderQuoteCompatibleItemInput[];
2520
+ shipping_address?: Address;
2521
+ billing_address?: Address;
2522
+ forms?: FormEntry[];
2523
+ payment_method_key?: string;
2524
+ promo_code?: string;
2525
+ shipping_method_id?: string;
2526
+ location?: ZoneLocation;
2527
+ }
2528
+ interface OrderCheckoutParams {
2529
+ store_id?: string;
2530
+ market?: string;
2531
+ items: OrderCheckoutCompatibleItemInput[];
2532
+ payment_method_key?: string;
2533
+ shipping_address?: Address;
2534
+ billing_address?: Address;
2535
+ forms?: FormEntry[];
2536
+ promo_code_id?: string;
2537
+ shipping_method_id?: string;
2538
+ }
2539
+ interface GetCurrentCartParams {
2540
+ store_id?: string;
2541
+ market?: string;
2542
+ }
2543
+ interface GetCartParams {
2544
+ id: string;
2545
+ store_id?: string;
2546
+ token?: string;
2547
+ }
2548
+ interface FindCartsParams {
2549
+ store_id?: string;
2550
+ contact_id?: string;
2551
+ statuses?: CartStatus[];
2552
+ origins?: CartOrigin[];
2553
+ has_items?: boolean;
2554
+ limit?: number;
2555
+ cursor?: string;
2556
+ }
2557
+ interface CreateCartParams {
2558
+ store_id?: string;
2559
+ contact_id: string;
2560
+ market: string;
2561
+ items?: TrustedOrderCheckoutCompatibleItemInput[];
2562
+ shipping_address?: Address | null;
2563
+ billing_address?: Address | null;
2564
+ forms?: FormEntry[];
2565
+ promo_code?: string | null;
2566
+ payment_method_key?: string | null;
2567
+ shipping_method_id?: string | null;
2568
+ }
2569
+ interface UpdateCartParams {
2570
+ id: string;
2571
+ store_id?: string;
2572
+ market?: string;
2573
+ items?: OrderCheckoutCompatibleItemInput[];
2574
+ shipping_address?: Address;
2575
+ billing_address?: Address;
2576
+ forms?: FormEntry[];
2577
+ promo_code?: string;
2578
+ payment_method_key?: string;
2579
+ shipping_method_id?: string;
2580
+ }
2581
+ interface AddCartItemParams {
2582
+ id: string;
2583
+ store_id?: string;
2584
+ item: OrderCheckoutCompatibleItemInput;
2585
+ }
2586
+ interface RemoveCartItemParams {
2587
+ id: string;
2588
+ store_id?: string;
2589
+ item_id?: string;
2590
+ product_id?: string;
2591
+ variant_id?: string;
2592
+ }
2593
+ interface ClearCartParams {
2594
+ id: string;
2595
+ store_id?: string;
2596
+ }
2597
+ interface QuoteCartParams {
2598
+ id: string;
2599
+ store_id?: string;
2600
+ }
2601
+ interface CheckoutCartParams {
2602
+ id: string;
2603
+ store_id?: string;
2604
+ payment_method_key?: string;
2605
+ confirmation_token_id?: string;
2606
+ return_url?: string;
2607
+ }
2608
+ interface GetProductsParams {
2609
+ store_id?: string;
2610
+ ids?: string[];
2611
+ taxonomy_query?: TaxonomyQuery[];
2612
+ match_all?: boolean;
2613
+ status?: ProductStatus;
2614
+ query?: string | number;
2615
+ limit?: number;
2616
+ cursor?: string;
2617
+ sort_field?: string;
2618
+ sort_direction?: "asc" | "desc";
2619
+ created_at_from?: number | null;
2620
+ created_at_to?: number | null;
2621
+ }
2622
+ interface GetCollectionsParams {
2623
+ store_id?: string;
2624
+ ids?: string[];
2625
+ key?: string;
2626
+ limit?: number;
2627
+ cursor?: string;
2628
+ query?: string | number;
2629
+ status?: CollectionStatus;
2630
+ sort_field?: string;
2631
+ sort_direction?: "asc" | "desc";
2632
+ created_at_from?: number;
2633
+ created_at_to?: number;
2634
+ }
2635
+ interface CreateCollectionParams {
2636
+ store_id?: string;
2637
+ key: string;
2638
+ schema?: BlockSchema[];
2639
+ blocks?: Block[];
2640
+ }
2641
+ interface UpdateCollectionParams {
2642
+ id: string;
2643
+ store_id?: string;
2644
+ key?: string;
2645
+ schema?: BlockSchema[];
2646
+ blocks?: Block[];
2647
+ status?: CollectionStatus;
2648
+ }
2649
+ interface GetCollectionParams {
2650
+ id?: string;
2651
+ key?: string;
2652
+ store_id?: string;
2653
+ }
2654
+ interface DeleteCollectionParams {
2655
+ id: string;
2656
+ store_id?: string;
2657
+ }
2658
+ interface GetEntriesParams {
2659
+ store_id?: string;
2660
+ collection_id: string;
2661
+ ids?: string[];
2662
+ key?: string;
2663
+ status?: EntryStatus;
2664
+ query?: string | number;
2665
+ filters?: EntryBlockQuery[];
2666
+ limit?: number;
2667
+ cursor?: string;
2668
+ sort_field?: string;
2669
+ sort_direction?: "asc" | "desc";
2670
+ created_at_from?: number;
2671
+ created_at_to?: number;
2672
+ }
2673
+ interface CreateEntryParams {
2674
+ store_id?: string;
2675
+ collection_id: string;
2676
+ key: string;
2677
+ slug?: Record<string, string>;
2678
+ blocks?: Block[];
2679
+ }
2680
+ interface UpdateEntryParams {
2681
+ id: string;
2682
+ store_id?: string;
2683
+ key?: string;
2684
+ slug?: Record<string, string>;
2685
+ blocks?: Block[];
2686
+ status?: EntryStatus;
2687
+ }
2688
+ interface GetEntryParams {
2689
+ id?: string;
2690
+ store_id?: string;
2691
+ }
2692
+ interface DeleteEntryParams {
2693
+ id: string;
2694
+ store_id?: string;
2695
+ }
2696
+ interface UploadStoreMediaParams {
2697
+ store_id?: string;
2698
+ files?: File[];
2699
+ urls?: string[];
2700
+ }
2701
+ interface DeleteStoreMediaParams {
2702
+ id: string;
2703
+ media_id: string;
2704
+ }
2705
+ interface GetMediaParams {
2706
+ media_id: string;
2707
+ store_id?: string;
2708
+ }
2709
+ interface UpdateMediaParams {
2710
+ media_id: string;
2711
+ store_id?: string;
2712
+ slug?: Record<string, string>;
2713
+ }
2714
+ interface GetStoreMediaParams {
2715
+ store_id?: string;
2716
+ cursor?: string | null;
2717
+ limit: number;
2718
+ ids?: string[];
2719
+ query?: string;
2720
+ mime_type?: string;
2721
+ sort_field?: string;
2722
+ sort_direction?: "asc" | "desc";
2723
+ }
2724
+ interface LoginAccountParams {
2725
+ email?: string;
2726
+ provider: string;
2727
+ token?: string;
2728
+ }
2729
+ interface MagicLinkVerifyParams {
2730
+ email: string;
2731
+ code: string;
2732
+ }
2733
+ interface GetServicesParams {
2734
+ store_id?: string;
2735
+ ids?: string[];
2736
+ provider_id?: string;
2737
+ limit?: number;
2738
+ cursor?: string;
2739
+ query?: string | number;
2740
+ status?: ServiceStatus;
2741
+ sort_field?: string;
2742
+ sort_direction?: "asc" | "desc";
2743
+ created_at_from?: number;
2744
+ created_at_to?: number;
2745
+ taxonomy_query?: TaxonomyQuery[];
2746
+ match_all?: boolean;
2747
+ from?: number;
2748
+ to?: number;
2749
+ }
2750
+ interface TimelinePoint {
2751
+ timestamp: number;
2752
+ booked: number;
2753
+ }
2754
+ interface ProviderWithTimeline {
2755
+ id: string;
2756
+ key: string;
2757
+ store_id: string;
2758
+ slug: Record<string, string>;
2759
+ status: ProviderStatus;
2760
+ blocks: Block[];
2761
+ taxonomies: TaxonomyEntry[];
2762
+ created_at: number;
2763
+ updated_at: number;
2764
+ working_days?: WorkingDay[];
2765
+ specific_dates?: SpecificDate[];
2766
+ timeline: TimelinePoint[];
2767
+ }
2768
+ interface GetAnalyticsParams {
2769
+ metrics?: string[];
2770
+ period?: string;
2771
+ start_date?: string;
2772
+ end_date?: string;
2773
+ interval?: string;
2774
+ }
2775
+ interface GetAnalyticsHealthParams {
2776
+ }
2777
+ interface TrackEmailOpenParams {
2778
+ tracking_pixel_id: string;
2779
+ }
2780
+ interface GetDeliveryStatsParams {
2781
+ }
2782
+ type StoreRole = "admin" | "owner" | "super";
2783
+ type Discount = {
2784
+ type: "items_percentage";
2785
+ market_id: string;
2786
+ bps: number;
2787
+ } | {
2788
+ type: "items_fixed";
2789
+ market_id: string;
2790
+ amount: number;
2791
+ } | {
2792
+ type: "shipping_percentage";
2793
+ market_id: string;
2794
+ bps: number;
2795
+ };
2796
+ type ConditionValue = {
2797
+ type: "ids";
2798
+ value: string[];
2799
+ } | {
2800
+ type: "amount";
2801
+ value: number;
2802
+ } | {
2803
+ type: "count";
2804
+ value: number;
2805
+ } | {
2806
+ type: "date_range";
2807
+ value: {
2808
+ start?: number;
2809
+ end?: number;
2810
+ };
2811
+ };
2812
+ interface Condition {
2813
+ type: "products" | "services" | "min_order_amount" | "date_range" | "max_uses" | "max_uses_per_user";
2814
+ value: ConditionValue;
2815
+ }
2816
+ interface CreatePromoCodeParams {
2817
+ store_id?: string;
2818
+ code: string;
2819
+ discounts: Discount[];
2820
+ conditions: Condition[];
2821
+ }
2822
+ interface UpdatePromoCodeParams {
2823
+ id: string;
2824
+ store_id?: string;
2825
+ code?: string;
2826
+ discounts?: Discount[];
2827
+ conditions?: Condition[];
2828
+ status?: PromoCodeStatus;
2829
+ }
2830
+ interface DeletePromoCodeParams {
2831
+ id: string;
2832
+ store_id?: string;
2833
+ }
2834
+ interface GetPromoCodeParams {
2835
+ id: string;
2836
+ store_id?: string;
2837
+ }
2838
+ interface GetPromoCodesParams {
2839
+ store_id?: string;
2840
+ ids?: string[];
2841
+ query?: string | number;
2842
+ status?: PromoCodeStatus;
2843
+ limit?: number;
2844
+ cursor?: string;
2845
+ sort_field?: string;
2846
+ sort_direction?: "asc" | "desc";
2847
+ created_at_from?: number;
2848
+ created_at_to?: number;
2849
+ starts_at_from?: number;
2850
+ starts_at_to?: number;
2851
+ expires_at_from?: number;
2852
+ expires_at_to?: number;
2853
+ }
2854
+ interface CreateStoreParams {
2855
+ key: string;
2856
+ timezone: string;
2857
+ billing_email: string;
2858
+ languages?: Language[];
2859
+ emails?: StoreEmails;
2860
+ }
2861
+ interface UpdateStoreParams {
2862
+ id: string;
2863
+ key?: string;
2864
+ timezone?: string;
2865
+ languages?: Language[];
2866
+ emails?: StoreEmails;
2867
+ }
2868
+ interface DeleteStoreParams {
2869
+ id: string;
2870
+ }
2871
+ interface GetStoreParams {
2872
+ }
2873
+ type SubscriptionAction = "select_plan" | "cancel_at_period_end" | "reactivate";
2874
+ interface SubscribeParams {
2875
+ store_id?: string;
2876
+ plan_id: string;
2877
+ action: SubscriptionAction;
2878
+ success_url: string;
2879
+ cancel_url: string;
2880
+ }
2881
+ interface CreatePortalSessionParams {
2882
+ store_id?: string;
2883
+ return_url: string;
2884
+ }
2885
+ interface AddMemberParams {
2886
+ email: string;
2887
+ role?: StoreRole;
2888
+ store_id?: string;
2889
+ }
2890
+ interface RemoveMemberParams {
2891
+ account_id: string;
2892
+ }
2893
+ interface TestWebhookParams {
2894
+ webhook: Webhook;
2895
+ }
2896
+ interface CreateProductVariantInput {
2897
+ sku?: string;
2898
+ prices: Price[];
2899
+ inventory: ProductInventory[];
2900
+ attributes: Block[];
2901
+ requires_shipping?: boolean;
2902
+ digital_delivery_policy?: DigitalDeliveryPolicy;
2903
+ digital_assets?: DigitalAsset[];
2904
+ download_limit?: number | null;
2905
+ access_expires_after_days?: number | null;
2906
+ tax_category_id?: string | null;
2907
+ weight?: number;
2908
+ }
2909
+ interface UpdateProductVariantInput {
2910
+ id: string;
2911
+ sku?: string | null;
2912
+ prices?: Price[];
2913
+ inventory?: ProductInventory[];
2914
+ attributes?: Block[];
2915
+ requires_shipping?: boolean;
2916
+ digital_delivery_policy?: DigitalDeliveryPolicy;
2917
+ digital_assets?: DigitalAsset[];
2918
+ download_limit?: number | null;
2919
+ access_expires_after_days?: number | null;
2920
+ tax_category_id?: string | null;
2921
+ weight?: number | null;
2922
+ }
2923
+ interface CreateProductParams {
2924
+ store_id?: string;
2925
+ key: string;
2926
+ slug?: Record<string, string>;
2927
+ blocks?: Block[];
2928
+ taxonomies?: TaxonomyEntry[];
2929
+ variants?: CreateProductVariantInput[];
2930
+ }
2931
+ interface UpdateProductParams {
2932
+ id: string;
2933
+ store_id?: string;
2934
+ key?: string;
2935
+ slug?: Record<string, string>;
2936
+ blocks?: Block[];
2937
+ taxonomies?: TaxonomyEntry[];
2938
+ variants?: UpdateProductVariantInput[];
2939
+ status?: ProductStatus;
2940
+ }
2941
+ interface DeleteProductParams {
2942
+ id: string;
2943
+ store_id?: string;
2944
+ }
2945
+ interface GetProductParams {
2946
+ id?: string;
2947
+ slug?: string;
2948
+ store_id?: string;
2949
+ }
2950
+ interface GetOrderParams {
2951
+ id: string;
2952
+ store_id?: string;
2953
+ }
2954
+ interface GetOrdersParams {
2955
+ store_id?: string;
2956
+ contact_id?: string;
2957
+ statuses?: string[];
2958
+ item_statuses?: string[];
2959
+ product_ids?: string[];
2960
+ service_ids?: string[];
2961
+ provider_ids?: string[];
2962
+ verified?: boolean;
2963
+ query?: string | number | null;
2964
+ limit?: number | null;
2965
+ cursor?: string | null;
2966
+ sort_field?: string | null;
2967
+ sort_direction?: "asc" | "desc" | null;
2968
+ created_at_from?: number | null;
2969
+ created_at_to?: number | null;
2970
+ contact_list_id?: string;
2971
+ }
2972
+ interface UpdateOrderParams {
2973
+ id: string;
2974
+ store_id?: string;
2975
+ confirm?: boolean;
2976
+ cancel?: boolean;
2977
+ shipping_address?: Address | null;
2978
+ billing_address?: Address | null;
2979
+ forms?: FormEntry[];
2980
+ items?: TrustedOrderCheckoutCompatibleItemInput[];
2981
+ payment?: OrderPayment;
2982
+ }
2983
+ interface CreateProviderParams {
2984
+ store_id?: string;
2985
+ key: string;
2986
+ slug?: Record<string, string>;
2987
+ status?: ProviderStatus;
2988
+ blocks?: Block[];
2989
+ taxonomies?: TaxonomyEntry[];
2990
+ }
2991
+ interface UpdateProviderParams {
2992
+ id: string;
2993
+ store_id?: string;
2994
+ key?: string;
2995
+ slug?: Record<string, string>;
2996
+ status?: ProviderStatus;
2997
+ blocks?: Block[];
2998
+ taxonomies?: TaxonomyEntry[];
2999
+ }
3000
+ interface DeleteProviderParams {
3001
+ id: string;
3002
+ store_id?: string;
3003
+ }
3004
+ interface ServiceProviderInput {
3005
+ provider_id: string;
3006
+ store_id?: string;
3007
+ prices?: Price[];
3008
+ durations?: ServiceDuration[];
3009
+ working_days: WorkingDay[];
3010
+ specific_dates: SpecificDate[];
3011
+ }
3012
+ interface CreateServiceParams {
3013
+ store_id?: string;
3014
+ key: string;
3015
+ slug?: Record<string, string>;
3016
+ blocks?: Block[];
3017
+ taxonomies?: TaxonomyEntry[];
3018
+ location?: ZoneLocation;
3019
+ status?: ServiceStatus;
3020
+ }
3021
+ interface UpdateServiceParams {
3022
+ id: string;
3023
+ store_id?: string;
3024
+ key?: string;
3025
+ slug?: Record<string, string>;
3026
+ blocks?: Block[];
3027
+ taxonomies?: TaxonomyEntry[];
3028
+ location?: ZoneLocation | null;
3029
+ status?: ServiceStatus;
3030
+ }
3031
+ interface CreateServiceProviderParams {
3032
+ store_id?: string;
3033
+ service_id: string;
3034
+ provider_id: string;
3035
+ working_days: WorkingDay[];
3036
+ specific_dates: SpecificDate[];
3037
+ prices?: Price[];
3038
+ durations?: ServiceDuration[];
3039
+ slot_interval: number;
3040
+ forms?: FormEntry[];
3041
+ reminders?: number[];
3042
+ min_advance?: number;
3043
+ max_advance?: number;
3044
+ }
3045
+ interface UpdateServiceProviderParams {
3046
+ store_id?: string;
3047
+ id: string;
3048
+ working_days?: WorkingDay[];
3049
+ specific_dates?: SpecificDate[];
3050
+ prices?: Price[];
3051
+ durations?: ServiceDuration[];
3052
+ slot_interval?: number;
3053
+ forms?: FormEntry[];
3054
+ reminders?: number[];
3055
+ min_advance?: number;
3056
+ max_advance?: number;
3057
+ }
3058
+ interface DeleteServiceProviderParams {
3059
+ store_id?: string;
3060
+ id: string;
3061
+ }
3062
+ interface FindServiceProvidersParams {
3063
+ store_id?: string;
3064
+ service_id?: string;
3065
+ provider_id?: string;
3066
+ }
3067
+ interface DeleteServiceParams {
3068
+ id: string;
3069
+ store_id?: string;
3070
+ }
3071
+ interface GetServiceParams {
3072
+ id?: string;
3073
+ slug?: string;
3074
+ store_id?: string;
3075
+ }
3076
+ interface GetProvidersParams {
3077
+ store_id?: string;
3078
+ service_id?: string;
3079
+ ids?: string[];
3080
+ taxonomy_query?: TaxonomyQuery[];
3081
+ match_all?: boolean;
3082
+ query?: string | number | null;
3083
+ status?: ProviderStatus;
3084
+ limit?: number;
3085
+ cursor?: string;
3086
+ sort_field?: string | null;
3087
+ sort_direction?: "asc" | "desc" | null;
3088
+ created_at_from?: number | null;
3089
+ created_at_to?: number | null;
3090
+ from?: number;
3091
+ to?: number;
3092
+ }
3093
+ interface GetProviderParams {
3094
+ id?: string;
3095
+ slug?: string;
3096
+ store_id?: string;
3097
+ }
3098
+ interface SearchOrderServiceItemsParams {
3099
+ store_id?: string;
3100
+ contact_id?: string;
3101
+ service_ids?: string[];
3102
+ provider_ids?: string[];
3103
+ from?: number;
3104
+ to?: number;
3105
+ item_statuses?: string[];
3106
+ sort_field?: string;
3107
+ sort_order?: string;
3108
+ limit?: number;
3109
+ cursor?: string;
3110
+ verified?: boolean;
3111
+ query?: string | number;
3112
+ contact_list_id?: string;
3113
+ }
3114
+ interface DownloadDigitalAccessParams {
3115
+ id: string;
3116
+ grant_id: string;
3117
+ store_id?: string;
3118
+ }
3119
+ interface AccountAddress {
3120
+ label?: string;
3121
+ address: Address;
3122
+ }
3123
+ interface AccountApiToken {
3124
+ id: string | null;
3125
+ value?: string;
3126
+ name?: string | null;
3127
+ created_at?: number;
3128
+ expires_at?: number | null;
3129
+ type?: string;
3130
+ }
3131
+ interface UpdateAccountContactParams {
3132
+ phone_numbers?: string[];
3133
+ addresses?: AccountAddress[];
3134
+ api_tokens?: AccountApiToken[] | null;
3135
+ }
3136
+ interface SearchAccountsParams {
3137
+ limit?: number;
3138
+ cursor?: string | null;
3139
+ query?: string | number;
3140
+ owner?: string;
3141
+ store_id?: string;
3142
+ sort_field?: string | null;
3143
+ sort_direction?: "asc" | "desc" | null;
3144
+ }
3145
+ interface DeleteAccountParams {
3146
+ }
3147
+ interface TriggerNotificationParams {
3148
+ channel: string;
3149
+ store_id: string;
3150
+ email_template_id: string;
3151
+ mailbox_id: string;
3152
+ recipients: string[];
3153
+ vars?: Record<string, any>;
3154
+ }
3155
+ interface GetEmailTemplatesParams {
3156
+ store_id?: string;
3157
+ ids?: string[];
3158
+ key?: string;
3159
+ limit?: number;
3160
+ cursor?: string;
3161
+ query?: string | number;
3162
+ status?: EmailTemplateStatus;
3163
+ sort_field?: string;
3164
+ sort_direction?: "asc" | "desc";
3165
+ created_at_from?: number;
3166
+ created_at_to?: number;
3167
+ }
3168
+ interface CreateEmailTemplateParams {
3169
+ store_id?: string;
3170
+ key: string;
3171
+ subject?: Record<string, string>;
3172
+ body?: string;
3173
+ from_name?: string;
3174
+ from_email?: string;
3175
+ reply_to?: string;
3176
+ preheader?: string;
3177
+ variables?: EmailTemplateVariable[];
3178
+ sample_data?: Record<string, unknown>;
3179
+ }
3180
+ interface UpdateEmailTemplateParams {
3181
+ id: string;
3182
+ store_id?: string;
3183
+ key?: string;
3184
+ subject?: Record<string, string>;
3185
+ body?: string;
3186
+ from_name?: string;
3187
+ from_email?: string;
3188
+ reply_to?: string;
3189
+ preheader?: string;
3190
+ variables?: EmailTemplateVariable[];
3191
+ sample_data?: Record<string, unknown>;
3192
+ status?: EmailTemplateStatus;
3193
+ }
3194
+ interface PreviewEmailTemplateParams {
3195
+ id: string;
3196
+ store_id?: string;
3197
+ subject?: Record<string, string>;
3198
+ body?: string;
3199
+ preheader?: string | null;
3200
+ vars?: Record<string, any>;
3201
+ }
3202
+ interface PreviewEmailTemplateWarning {
3203
+ kind: string;
3204
+ variable: string;
3205
+ message: string;
3206
+ }
3207
+ interface PreviewEmailTemplateResponse {
3208
+ subject: string;
3209
+ html: string;
3210
+ warnings: PreviewEmailTemplateWarning[];
3211
+ }
3212
+ interface GetEmailTemplateParams {
3213
+ id?: string;
3214
+ key?: string;
3215
+ store_id?: string;
3216
+ }
3217
+ interface DeleteEmailTemplateParams {
3218
+ id: string;
3219
+ store_id?: string;
3220
+ }
3221
+ interface GetFormsParams {
3222
+ store_id?: string;
3223
+ ids?: string[];
3224
+ key?: string;
3225
+ limit?: number;
3226
+ cursor?: string;
3227
+ query?: string | number;
3228
+ status?: FormStatus;
3229
+ sort_field?: string;
3230
+ sort_direction?: "asc" | "desc";
3231
+ created_at_from?: number;
3232
+ created_at_to?: number;
3233
+ }
3234
+ interface CreateFormParams {
3235
+ store_id?: string;
3236
+ key: string;
3237
+ schema?: FormSchema[];
3238
+ }
3239
+ interface UpdateFormParams {
3240
+ id: string;
3241
+ store_id?: string;
3242
+ key?: string;
3243
+ schema?: FormSchema[];
3244
+ status?: FormStatus;
3245
+ }
3246
+ interface GetFormParams {
3247
+ id?: string;
3248
+ key?: string;
3249
+ store_id?: string;
3250
+ }
3251
+ interface DeleteFormParams {
3252
+ id: string;
3253
+ store_id?: string;
3254
+ }
3255
+ interface SubmitFormParams {
3256
+ form_id: string;
3257
+ store_id?: string;
3258
+ fields: FormField[];
3259
+ }
3260
+ interface GetFormSubmissionsParams {
3261
+ form_ids?: string[];
3262
+ store_id?: string;
3263
+ contact_id?: string;
3264
+ query?: string | number;
3265
+ limit?: number;
3266
+ cursor?: string;
3267
+ sort_field?: string;
3268
+ sort_direction?: "asc" | "desc";
3269
+ created_at_from?: number;
3270
+ created_at_to?: number;
3271
+ }
3272
+ interface FindActionsParams {
3273
+ store_id?: string;
3274
+ query?: string | number;
3275
+ contact_id?: string;
3276
+ types?: string[];
3277
+ from?: number;
3278
+ to?: number;
3279
+ limit?: number;
3280
+ cursor?: string;
3281
+ }
3282
+ interface GetFormSubmissionParams {
3283
+ id: string;
3284
+ form_id: string;
3285
+ store_id?: string;
3286
+ }
3287
+ interface UpdateFormSubmissionParams {
3288
+ id: string;
3289
+ form_id: string;
3290
+ store_id?: string;
3291
+ fields: FormField[];
3292
+ }
3293
+ interface GetTaxonomiesParams {
3294
+ store_id?: string;
3295
+ parent_id?: string;
3296
+ ids?: string[];
3297
+ key?: string;
3298
+ limit?: number;
3299
+ cursor?: string;
3300
+ query?: string | number;
3301
+ status?: TaxonomyStatus;
3302
+ sort_field?: string;
3303
+ sort_direction?: "asc" | "desc";
3304
+ created_at_from?: number;
3305
+ created_at_to?: number;
3306
+ }
3307
+ interface CreateTaxonomyParams {
3308
+ store_id?: string;
3309
+ key: string;
3310
+ parent_id?: string | null;
3311
+ schema?: TaxonomySchema[];
3312
+ }
3313
+ interface UpdateTaxonomyParams {
3314
+ id: string;
3315
+ store_id?: string;
3316
+ key?: string;
3317
+ parent_id?: string | null;
3318
+ schema?: TaxonomySchema[];
3319
+ status?: TaxonomyStatus;
3320
+ }
3321
+ interface GetTaxonomyParams {
3322
+ id?: string;
3323
+ key?: string;
3324
+ store_id?: string;
3325
+ }
3326
+ interface DeleteTaxonomyParams {
3327
+ id: string;
3328
+ store_id?: string;
3329
+ }
3330
+ interface GetTaxonomyChildrenParams {
3331
+ id: string;
3332
+ store_id?: string;
3333
+ }
3334
+ interface GetMeParams {
3335
+ }
3336
+ interface LogoutParams {
3337
+ }
3338
+ interface GetStoresParams {
3339
+ query?: string | number;
3340
+ limit?: number;
3341
+ cursor?: string;
3342
+ sort_field?: string;
3343
+ sort_direction?: "asc" | "desc";
3344
+ }
3345
+ interface GetSubscriptionPlansParams {
3346
+ }
3347
+ interface SetupAnalyticsParams {
3348
+ store_id?: string;
3349
+ }
3350
+ interface FindStoreMediaParams {
3351
+ id: string;
3352
+ cursor?: string | null;
3353
+ limit: number;
3354
+ ids?: string[];
3355
+ query?: string | number;
3356
+ mime_type?: string;
3357
+ sort_field?: string;
3358
+ sort_direction?: "asc" | "desc";
3359
+ }
3360
+ interface ProcessOrderRefundParams {
3361
+ id: string;
3362
+ amount: number;
3363
+ }
3364
+ type RefundStatus = "requested" | "processing" | "succeeded" | "failed" | "unknown";
3365
+ interface ProcessOrderRefundResponse {
3366
+ refund_id: string;
3367
+ amount: number;
3368
+ status: RefundStatus;
3369
+ }
3370
+ type SystemTemplateKey = "system:order-status-update" | "system:user-confirmation" | "system:forgot-password";
3371
+ interface GetAvailabilityParams {
3372
+ store_id?: string;
3373
+ service_id: string;
3374
+ from: number;
3375
+ to: number;
3376
+ provider_id?: string;
3377
+ }
3378
+ interface AvailabilitySlot {
3379
+ from: number;
3380
+ to: number;
3381
+ spots: number;
3382
+ }
3383
+ interface DaySlots {
3384
+ date: string;
3385
+ slots: AvailabilitySlot[];
3386
+ }
3387
+ interface ProviderAvailability {
3388
+ provider_id: string;
3389
+ provider_key: string;
3390
+ days: DaySlots[];
3391
+ }
3392
+ interface AvailabilityResponse {
3393
+ from: number;
3394
+ to: number;
3395
+ providers: ProviderAvailability[];
3396
+ }
3397
+ interface Slot {
3398
+ id: string;
3399
+ service_id: string;
3400
+ provider_id: string;
3401
+ from: number;
3402
+ to: number;
3403
+ time_text: string;
3404
+ date_text: string;
3405
+ }
3406
+ interface CreateWorkflowParams {
3407
+ store_id?: string;
3408
+ key: string;
3409
+ status?: WorkflowStatus;
3410
+ nodes: Record<string, WorkflowNode>;
3411
+ edges: WorkflowEdge[];
3412
+ schedule?: string;
3413
+ }
3414
+ interface UpdateWorkflowParams {
3415
+ id: string;
3416
+ store_id?: string;
3417
+ key: string;
3418
+ status?: WorkflowStatus;
3419
+ nodes: Record<string, WorkflowNode>;
3420
+ edges: WorkflowEdge[];
3421
+ schedule?: string;
3422
+ }
3423
+ interface DeleteWorkflowParams {
3424
+ id: string;
3425
+ store_id?: string;
3426
+ }
3427
+ interface GetWorkflowParams {
3428
+ id: string;
3429
+ store_id?: string;
3430
+ }
3431
+ interface GetWorkflowsParams {
3432
+ store_id?: string;
3433
+ ids?: string[];
3434
+ query?: string | number;
3435
+ status?: WorkflowStatus;
3436
+ limit?: number;
3437
+ cursor?: string;
3438
+ sort_field?: string;
3439
+ sort_direction?: "asc" | "desc";
3440
+ created_at_from?: number;
3441
+ created_at_to?: number;
3442
+ }
3443
+ interface TriggerWorkflowParams {
3444
+ secret: string;
3445
+ input?: Record<string, unknown>;
3446
+ }
3447
+ interface GetWorkflowExecutionsParams {
3448
+ workflow_id: string;
3449
+ store_id?: string;
3450
+ status?: ExecutionStatus;
3451
+ limit?: number;
3452
+ cursor?: string;
3453
+ }
3454
+ interface GetWorkflowExecutionParams {
3455
+ workflow_id: string;
3456
+ execution_id: string;
3457
+ store_id?: string;
3458
+ }
3459
+ interface ConnectWorkflowAccountParams {
3460
+ store_id?: string;
3461
+ type: WorkflowAccountType;
3462
+ key?: string;
3463
+ code: string;
3464
+ redirect_uri: string;
3465
+ }
3466
+ interface GetWorkflowAccountConnectUrlParams {
3467
+ store_id?: string;
3468
+ type: WorkflowAccountType;
3469
+ redirect_uri: string;
3470
+ }
3471
+ interface GetWorkflowAccountsParams {
3472
+ store_id?: string;
3473
+ }
3474
+ interface DeleteWorkflowAccountParams {
3475
+ id: string;
3476
+ store_id?: string;
3477
+ }
3478
+ interface CreateContactListParams {
3479
+ store_id?: string;
3480
+ key: string;
3481
+ name?: string;
3482
+ description?: string | null;
3483
+ type?: ContactListType;
3484
+ source?: ContactListSource;
3485
+ }
3486
+ interface UpdateContactListParams {
3487
+ id: string;
3488
+ store_id?: string;
3489
+ key?: string;
3490
+ name?: string;
3491
+ description?: string | null;
3492
+ status?: ContactListStatus;
3493
+ type?: ContactListType;
3494
+ }
3495
+ interface FindContactListsParams {
3496
+ store_id?: string;
3497
+ ids?: string[];
3498
+ status?: ContactListStatus;
3499
+ query?: string | number;
3500
+ limit?: number;
3501
+ cursor?: string;
3502
+ sort_field?: string;
3503
+ sort_direction?: "asc" | "desc";
3504
+ }
3505
+ interface GetContactListParams {
3506
+ id: string;
3507
+ store_id?: string;
3508
+ }
3509
+ interface AddContactListContactParams {
3510
+ store_id?: string;
3511
+ contact_list_id: string;
3512
+ contact_id: string;
3513
+ fields?: Record<string, unknown>;
3514
+ lead_description?: string | null;
3515
+ }
3516
+ interface UpdateContactListContactParams {
3517
+ store_id?: string;
3518
+ contact_list_id: string;
3519
+ contact_id: string;
3520
+ status?: ContactListMembershipStatus;
3521
+ fields?: Record<string, unknown>;
3522
+ lead_description?: string | null;
3523
+ }
3524
+ interface RemoveContactListContactParams {
3525
+ store_id?: string;
3526
+ contact_list_id: string;
3527
+ contact_id: string;
3528
+ }
3529
+ interface FindContactListContactsParams {
3530
+ store_id?: string;
3531
+ contact_list_id?: string;
3532
+ contact_id?: string;
3533
+ status?: ContactListMembershipStatus;
3534
+ limit?: number;
3535
+ cursor?: string;
3536
+ }
3537
+ interface ImportContactRowInput {
3538
+ email: string;
3539
+ contact_id?: string;
3540
+ fields?: Record<string, unknown>;
3541
+ lead_description?: string;
3542
+ }
3543
+ interface ImportContactsParams {
3544
+ store_id?: string;
3545
+ csv?: string;
3546
+ spreadsheet_base64?: string;
3547
+ sheet_name?: string | null;
3548
+ email_column?: string | null;
3549
+ field_mappings?: ImportFieldMapping[];
3550
+ rows?: ImportContactRowInput[];
3551
+ }
3552
+ interface ImportContactsIntoContactListParams {
3553
+ store_id?: string;
3554
+ contact_list_id: string;
3555
+ csv?: string;
3556
+ spreadsheet_base64?: string;
3557
+ sheet_name?: string | null;
3558
+ email_column?: string | null;
3559
+ field_mappings?: ImportFieldMapping[];
3560
+ rows?: ImportContactRowInput[];
3561
+ }
3562
+ interface ImportContactsPreviewParams {
3563
+ store_id?: string;
3564
+ csv?: string;
3565
+ spreadsheet_base64?: string;
3566
+ sheet_name?: string | null;
3567
+ }
3568
+ interface ImportContactListPreviewParams extends ImportContactsPreviewParams {
3569
+ contact_list_id: string;
3570
+ }
3571
+ interface ImportFieldMapping {
3572
+ source: string;
3573
+ field: string;
3574
+ }
3575
+ interface ImportPreviewRow {
3576
+ row: number;
3577
+ values: Record<string, unknown>;
3578
+ }
3579
+ interface ImportContactsPreviewResult {
3580
+ sheets: string[];
3581
+ selected_sheet?: string | null;
3582
+ header_row: number;
3583
+ headers: string[];
3584
+ detected_email_column?: string | null;
3585
+ rows_total: number;
3586
+ sample_rows: ImportPreviewRow[];
3587
+ suggested_field_mappings: ImportFieldMapping[];
3588
+ }
3589
+ interface ImportContactRowError {
3590
+ row: number;
3591
+ field: string;
3592
+ message: string;
3593
+ }
3594
+ interface ImportContactRowResult {
3595
+ row: number;
3596
+ email: string;
3597
+ contact_id?: string | null;
3598
+ created: boolean;
3599
+ updated: boolean;
3600
+ error?: string | null;
3601
+ }
3602
+ interface ImportContactsResult {
3603
+ rows_total: number;
3604
+ contacts_created: number;
3605
+ contacts_updated: number;
3606
+ rows_failed: number;
3607
+ errors: ImportContactRowError[];
3608
+ rows: ImportContactRowResult[];
3609
+ }
3610
+ interface ImportContactListRowResult {
3611
+ row: number;
3612
+ email: string;
3613
+ contact_id?: string | null;
3614
+ contact_created: boolean;
3615
+ contact_updated: boolean;
3616
+ added_to_list: boolean;
3617
+ updated_in_list: boolean;
3618
+ error?: string | null;
3619
+ }
3620
+ interface ImportContactsIntoContactListResult {
3621
+ rows_total: number;
3622
+ contacts_created: number;
3623
+ contacts_updated: number;
3624
+ contacts_added: number;
3625
+ contacts_updated_in_list: number;
3626
+ contacts_failed_to_add: number;
3627
+ rows_failed: number;
3628
+ errors: ImportContactRowError[];
3629
+ rows: ImportContactListRowResult[];
3630
+ }
3631
+ interface SubscribeContactListParams {
3632
+ store_id?: string;
3633
+ id: string;
3634
+ contact_id: string;
3635
+ price_id?: string;
3636
+ success_url?: string;
3637
+ cancel_url?: string;
3638
+ confirm_url?: string;
3639
+ }
3640
+ interface ContactListAccessParams {
3641
+ store_id?: string;
3642
+ id: string;
3643
+ }
3644
+ interface CreateMailboxParams {
3645
+ store_id?: string;
3646
+ key: string;
3647
+ email: string;
3648
+ from_name?: string;
3649
+ reply_to_email?: string | null;
3650
+ provider: SmtpImapMailboxProvider;
3651
+ password?: string;
3652
+ daily_limit?: number;
3653
+ }
3654
+ interface UpdateMailboxParams {
3655
+ id: string;
3656
+ store_id?: string;
3657
+ key?: string;
3658
+ email?: string;
3659
+ from_name?: string;
3660
+ reply_to_email?: string | null;
3661
+ provider?: SmtpImapMailboxProvider;
3662
+ password?: string;
3663
+ status?: MailboxStatus;
3664
+ daily_limit?: number;
3665
+ }
3666
+ interface FindMailboxesParams {
3667
+ store_id?: string;
3668
+ ids?: string[];
3669
+ status?: MailboxStatus;
3670
+ provider_type?: "smtp_imap";
3671
+ query?: string | number;
3672
+ limit?: number;
3673
+ cursor?: string;
3674
+ sort_field?: string;
3675
+ sort_direction?: "asc" | "desc";
3676
+ }
3677
+ interface GetMailboxParams {
3678
+ id: string;
3679
+ store_id?: string;
3680
+ }
3681
+ interface TestMailboxParams {
3682
+ id: string;
3683
+ store_id?: string;
3684
+ }
3685
+ interface PrepareMailboxParams {
3686
+ id: string;
3687
+ store_id?: string;
3688
+ }
3689
+ interface TestMailboxResult {
3690
+ ok: boolean;
3691
+ smtp_ok: boolean;
3692
+ imap_ok: boolean;
3693
+ skipped: boolean;
3694
+ smtp_error?: string | null;
3695
+ imap_error?: string | null;
3696
+ }
3697
+ interface CreateCampaignParams {
3698
+ store_id?: string;
3699
+ key: string;
3700
+ name?: string;
3701
+ mailbox_ids: string[];
3702
+ steps: OutreachStep[];
3703
+ }
3704
+ interface UpdateCampaignParams {
3705
+ id: string;
3706
+ store_id?: string;
3707
+ key?: string;
3708
+ name?: string;
3709
+ mailbox_ids?: string[];
3710
+ status?: CampaignStatus;
3711
+ steps?: OutreachStep[];
3712
+ }
3713
+ interface FindCampaignsParams {
3714
+ store_id?: string;
3715
+ ids?: string[];
3716
+ status?: CampaignStatus;
3717
+ mailbox_id?: string;
3718
+ query?: string | number;
3719
+ limit?: number;
3720
+ cursor?: string;
3721
+ sort_field?: string;
3722
+ sort_direction?: "asc" | "desc";
3723
+ }
3724
+ interface GetCampaignParams {
3725
+ id: string;
3726
+ store_id?: string;
3727
+ }
3728
+ interface LaunchCampaignParams {
3729
+ id: string;
3730
+ store_id?: string;
3731
+ }
3732
+ interface DuplicateCampaignParams {
3733
+ id: string;
3734
+ store_id?: string;
3735
+ key?: string;
3736
+ name?: string;
3737
+ copy_enrollments?: boolean;
3738
+ }
3739
+ interface GetCampaignLaunchReadinessParams {
3740
+ id: string;
3741
+ store_id?: string;
3742
+ }
3743
+ interface ImportCampaignEnrollmentsParams {
3744
+ id: string;
3745
+ store_id?: string;
3746
+ contact_list_id?: string;
3747
+ contact_list_ids?: string[];
3748
+ contact_ids?: string[];
3749
+ emails?: string[];
3750
+ }
3751
+ interface CampaignEnrollmentImportResult {
3752
+ imported_count: number;
3753
+ existing_count: number;
3754
+ skipped_count: number;
3755
+ draft_count: number;
3756
+ }
3757
+ interface GenerateOutreachPersonalizedDraftsParams {
3758
+ id: string;
3759
+ store_id?: string;
3760
+ step_position?: number;
3761
+ contact_ids?: string[];
3762
+ overwrite?: boolean;
3763
+ instructions?: string;
3764
+ }
3765
+ interface FindCampaignEnrollmentsParams {
3766
+ store_id?: string;
3767
+ campaign_id?: string;
3768
+ contact_id?: string;
3769
+ mailbox_id?: string;
3770
+ status?: CampaignEnrollmentStatus;
3771
+ limit?: number;
3772
+ cursor?: string;
3773
+ }
3774
+ interface UpdateCampaignEnrollmentParams {
3775
+ store_id?: string;
3776
+ id: string;
3777
+ mailbox_id?: string | null;
3778
+ lead_description?: string | null;
3779
+ fields?: Record<string, unknown>;
3780
+ }
3781
+ interface UpdateCampaignEnrollmentDraftParams {
3782
+ store_id?: string;
3783
+ id: string;
3784
+ draft_id: string;
3785
+ template_vars?: Record<string, any>;
3786
+ body?: string;
3787
+ suggested_message?: string;
3788
+ }
3789
+ interface UpdateCampaignEnrollmentStepExecutionParams {
3790
+ store_id?: string;
3791
+ id: string;
3792
+ execution_id: string;
3793
+ outcome: CampaignManualTaskOutcome;
3794
+ note?: string;
3795
+ }
3796
+ interface FindCampaignMessagesParams {
3797
+ store_id?: string;
3798
+ campaign_id?: string;
3799
+ campaign_enrollment_id?: string;
3800
+ contact_id?: string;
3801
+ mailbox_id?: string;
3802
+ direction?: CampaignMessageDirection;
3803
+ type?: CampaignMessageType;
3804
+ status?: CampaignMessageStatus;
3805
+ copy_source?: CampaignMessageCopySource;
3806
+ step_position?: number;
3807
+ query?: string;
3808
+ limit?: number;
3809
+ cursor?: string;
3810
+ }
3811
+ interface GetCampaignEnrollmentConversationParams {
3812
+ store_id?: string;
3813
+ id: string;
3814
+ message_limit?: number;
3815
+ after_created_at?: number;
3816
+ after_id?: string;
3817
+ }
3818
+ interface ReplyCampaignEnrollmentParams {
3819
+ store_id?: string;
3820
+ id: string;
3821
+ subject?: string | null;
3822
+ body: string;
3823
+ attachments?: string[];
3824
+ }
3825
+ interface StopCampaignEnrollmentParams {
3826
+ store_id?: string;
3827
+ id: string;
3828
+ }
3829
+ interface UpdateCampaignMessageParams {
3830
+ id: string;
3831
+ store_id?: string;
3832
+ template_vars?: Record<string, any>;
3833
+ }
3834
+ interface CreateSuppressionParams {
3835
+ store_id?: string;
3836
+ campaign_id?: string;
3837
+ contact_id?: string;
3838
+ email?: string;
3839
+ domain?: string;
3840
+ reason?: SuppressionReason;
3841
+ source?: SuppressionSource;
3842
+ }
3843
+ interface UpdateSuppressionParams {
3844
+ id: string;
3845
+ store_id?: string;
3846
+ status?: SuppressionStatus;
3847
+ reason?: SuppressionReason;
3848
+ }
3849
+ interface FindSuppressionsParams {
3850
+ store_id?: string;
3851
+ status?: SuppressionStatus;
3852
+ contact_id?: string;
3853
+ email?: string;
3854
+ domain?: string;
3855
+ campaign_id?: string;
3856
+ reason?: SuppressionReason;
3857
+ query?: string | number;
3858
+ limit?: number;
3859
+ cursor?: string;
3860
+ sort_field?: string;
3861
+ sort_direction?: "asc" | "desc";
3862
+ }
3863
+ interface GetSuppressionParams {
3864
+ id: string;
3865
+ store_id?: string;
3866
+ }
3867
+ interface CreateLeadResearchRunParams {
3868
+ store_id?: string;
3869
+ contact_list_id?: string;
3870
+ title?: string;
3871
+ }
3872
+ interface FindLeadResearchRunsParams {
3873
+ store_id?: string;
3874
+ status?: LeadResearchRunStatus;
3875
+ contact_list_id?: string;
3876
+ limit?: number;
3877
+ cursor?: string;
3878
+ }
3879
+ interface GetLeadResearchRunParams {
3880
+ id: string;
3881
+ store_id?: string;
3882
+ }
3883
+ interface UpdateLeadResearchRunParams {
3884
+ id: string;
3885
+ store_id?: string;
3886
+ title?: string;
3887
+ }
3888
+ interface CancelLeadResearchRunParams {
3889
+ id: string;
3890
+ store_id?: string;
3891
+ }
3892
+ interface SendLeadResearchMessageParams {
3893
+ run_id: string;
3894
+ store_id?: string;
3895
+ message: string;
3896
+ }
3897
+ interface FindLeadResearchMessagesParams {
3898
+ run_id: string;
3899
+ store_id?: string;
3900
+ limit?: number;
3901
+ after_created_at?: number;
3902
+ after_id?: string;
3903
+ }
3904
+ interface ValidateLeadEmailParams {
3905
+ store_id?: string;
3906
+ email: string;
3907
+ website_url?: string;
3908
+ email_source_url?: string;
3909
+ }
3910
+ interface ListBuildHooksParams {
3911
+ store_id: string;
3912
+ }
3913
+ interface CreateBuildHookParams {
3914
+ store_id: string;
3915
+ key: string;
3916
+ type: BuildHookType;
3917
+ url: string;
3918
+ headers?: Record<string, string>;
3919
+ active?: boolean;
3920
+ }
3921
+ interface UpdateBuildHookParams {
3922
+ store_id: string;
3923
+ id: string;
3924
+ key?: string;
3925
+ type?: BuildHookType;
3926
+ url?: string;
3927
+ headers?: Record<string, string>;
3928
+ active?: boolean;
3929
+ }
3930
+ interface DeleteBuildHookParams {
3931
+ store_id: string;
3932
+ id: string;
3933
+ }
3934
+ interface ListSocialAccountsParams {
3935
+ store_id?: string;
3936
+ }
3937
+ interface DeleteSocialAccountParams {
3938
+ store_id: string;
3939
+ id: string;
3940
+ }
3941
+ interface ListPaymentProvidersParams {
3942
+ store_id?: string;
3943
+ }
3944
+ interface RefreshPaymentProvidersParams {
3945
+ store_id?: string;
3946
+ }
3947
+ interface ConnectStripePaymentProviderParams {
3948
+ store_id?: string;
3949
+ return_url: string;
3950
+ refresh_url: string;
3951
+ email?: string | null;
3952
+ country?: string | null;
3953
+ connected_account_id?: string | null;
3954
+ }
3955
+ interface DeletePaymentProviderParams {
3956
+ store_id: string;
3957
+ id: string;
3958
+ }
3959
+ interface FindSocialPublicationsParams {
3960
+ store_id?: string;
3961
+ status?: SocialPublicationStatus;
3962
+ query?: string;
3963
+ limit?: number;
3964
+ cursor?: string;
3965
+ }
3966
+ interface GetSocialPublicationParams {
3967
+ store_id?: string;
3968
+ id: string;
3969
+ }
3970
+ interface ValidateSocialPublicationParams {
3971
+ store_id?: string;
3972
+ social_account_id: string;
3973
+ scheduled_at?: number | null;
3974
+ content: SocialPublicationContent;
3975
+ }
3976
+ interface CreateSocialPublicationParams {
3977
+ store_id?: string;
3978
+ social_account_id: string;
3979
+ key?: string | null;
3980
+ scheduled_at?: number | null;
3981
+ content: SocialPublicationContent;
3982
+ }
3983
+ interface UpdateSocialPublicationParams {
3984
+ store_id?: string;
3985
+ id: string;
3986
+ social_account_id?: string | null;
3987
+ key?: string | null;
3988
+ scheduled_at?: number | null;
3989
+ content?: SocialPublicationContent | null;
3990
+ }
3991
+ interface ScheduleSocialPublicationParams {
3992
+ store_id?: string;
3993
+ id: string;
3994
+ scheduled_at: number;
3995
+ }
3996
+ interface CancelSocialPublicationParams {
3997
+ store_id?: string;
3998
+ id: string;
3999
+ }
4000
+ interface GetSocialPublicationCommentsParams {
4001
+ store_id?: string;
4002
+ publication_id: string;
4003
+ limit?: number;
4004
+ cursor?: string | null;
4005
+ }
4006
+ type SyncSocialPublicationCommentsParams = GetSocialPublicationCommentsParams;
4007
+ interface GetSocialPublicationCommentThreadParams {
4008
+ store_id?: string;
4009
+ publication_id: string;
4010
+ comment_id: string;
4011
+ limit?: number;
4012
+ cursor?: string | null;
4013
+ }
4014
+ type SyncSocialPublicationCommentThreadParams = GetSocialPublicationCommentThreadParams;
4015
+ interface FindSocialPublicationCommentsParams {
4016
+ store_id?: string;
4017
+ publication_id?: string;
4018
+ social_account_id?: string;
4019
+ provider_type?: SocialProviderType;
4020
+ status?: SocialPublicationCommentStatus;
4021
+ intent?: SocialPublicationCommentIntent;
4022
+ priority?: SocialPublicationCommentPriority;
4023
+ include_replies?: boolean;
4024
+ limit?: number;
4025
+ cursor?: string | null;
4026
+ }
4027
+ interface ClassifySocialPublicationCommentsParams {
4028
+ store_id?: string;
4029
+ publication_id?: string;
4030
+ social_account_id?: string;
4031
+ provider_type?: SocialProviderType;
4032
+ status?: SocialPublicationCommentStatus;
4033
+ intent?: SocialPublicationCommentIntent;
4034
+ priority?: SocialPublicationCommentPriority;
4035
+ limit?: number;
4036
+ force?: boolean;
4037
+ }
4038
+ interface ReplySocialPublicationCommentParams {
4039
+ store_id?: string;
4040
+ publication_id: string;
4041
+ comment_id: string;
4042
+ text: string;
4043
+ }
4044
+ interface GetSocialPublicationMetricsParams {
4045
+ store_id?: string;
4046
+ publication_id: string;
4047
+ }
4048
+ type SyncSocialPublicationMetricsParams = GetSocialPublicationMetricsParams;
4049
+ interface SyncSocialEngagementParams {
4050
+ store_id?: string;
4051
+ publication_ids?: string[];
4052
+ max_publications?: number;
4053
+ max_comment_pages_per_publication?: number;
4054
+ max_comments_per_publication?: number;
4055
+ sync_metrics?: boolean;
4056
+ }
4057
+ interface GetSocialCapabilitiesParams {
4058
+ store_id?: string;
4059
+ }
4060
+ interface ConnectSocialAccountParams {
4061
+ store_id?: string;
4062
+ provider_type: SocialProviderType;
4063
+ }
4064
+ interface SelectSocialDestinationParams {
4065
+ store_id?: string;
4066
+ provider_type: SocialProviderType;
4067
+ attempt_id: string;
4068
+ candidate_id: string;
4069
+ }
4070
+ interface GetSocialOAuthAttemptParams {
4071
+ store_id?: string;
4072
+ attempt_id: string;
4073
+ }
4074
+ interface ListWebhooksParams {
4075
+ store_id: string;
4076
+ }
4077
+ interface CreateWebhookParams {
4078
+ store_id: string;
4079
+ key: string;
4080
+ url: string;
4081
+ events: WebhookEventSubscription[];
4082
+ headers: Record<string, string>;
4083
+ secret: string;
4084
+ enabled: boolean;
4085
+ }
4086
+ interface UpdateWebhookParams {
4087
+ store_id: string;
4088
+ id: string;
4089
+ key: string;
4090
+ url: string;
4091
+ events: WebhookEventSubscription[];
4092
+ headers: Record<string, string>;
4093
+ secret: string;
4094
+ enabled: boolean;
4095
+ }
4096
+ interface DeleteWebhookParams {
4097
+ store_id: string;
4098
+ id: string;
4099
+ }
4100
+ interface GetShippingRatesParams {
4101
+ order_id: string;
4102
+ from_address: Address;
4103
+ to_address: Address;
4104
+ parcel: Parcel;
4105
+ customs_declaration?: CustomsDeclaration;
4106
+ }
4107
+ interface ShipParams {
4108
+ order_id: string;
4109
+ rate_id: string;
4110
+ carrier: string;
4111
+ service: string;
4112
+ location_id: string;
4113
+ fulfillment_order_id?: string | null;
4114
+ lines: ShipmentLine[];
4115
+ }
4116
+ interface AuthToken {
4117
+ id: string;
4118
+ access_token: string;
4119
+ refresh_token: string;
4120
+ access_expires_at: number;
4121
+ refresh_expires_at: number;
4122
+ created_at: number;
4123
+ is_verified: boolean;
4124
+ }
4125
+ interface ContactInfo {
4126
+ id: string;
4127
+ verified: boolean;
4128
+ }
4129
+ interface ContactSessionToken {
4130
+ id: string;
4131
+ token: string;
4132
+ created_at: number;
4133
+ }
4134
+ interface ContactVerificationCode {
4135
+ code: string;
4136
+ created_at: number;
4137
+ used: boolean;
4138
+ store_id?: string | null;
4139
+ }
4140
+ interface PromoUsage {
4141
+ promo_code_id: string;
4142
+ uses: number;
4143
+ }
4144
+ interface Contact {
4145
+ id: string;
4146
+ store_id: string;
4147
+ email: string | null;
4148
+ verified: boolean;
4149
+ status: ContactStatus;
4150
+ channels: ContactChannel[];
4151
+ promo_usage: PromoUsage[];
4152
+ lists: ContactListMembership[];
4153
+ taxonomies: TaxonomyEntry[];
4154
+ auth_tokens: ContactSessionToken[];
4155
+ verification_codes: ContactVerificationCode[];
4156
+ created_at: number;
4157
+ updated_at: number;
4158
+ }
4159
+ interface ContactDetail {
4160
+ contact: Contact;
4161
+ carts: Cart[];
4162
+ orders: Order[];
4163
+ form_submissions: FormSubmission[];
4164
+ }
4165
+ interface SetContactEmailParams {
4166
+ email: string;
4167
+ store_id?: string;
4168
+ }
4169
+ interface CreateContactParams {
4170
+ store_id?: string;
4171
+ email: string;
4172
+ taxonomies?: TaxonomyEntry[];
4173
+ }
4174
+ interface UpdateContactParams {
4175
+ id: string;
4176
+ store_id?: string;
4177
+ email?: string;
4178
+ taxonomies?: TaxonomyEntry[];
4179
+ status?: ContactStatus;
4180
+ }
4181
+ interface GetContactParams {
4182
+ id: string;
4183
+ store_id?: string;
4184
+ }
4185
+ interface FindContactsParams {
4186
+ store_id?: string;
4187
+ ids?: string[];
4188
+ query?: string | number;
4189
+ taxonomy_query?: TaxonomyQuery[];
4190
+ status?: ContactStatus;
4191
+ has_action?: boolean;
4192
+ has_cart?: boolean;
4193
+ limit?: number;
4194
+ cursor?: string;
4195
+ sort_field?: string;
4196
+ sort_direction?: "asc" | "desc";
4197
+ }
4198
+ interface MergeContactsParams {
4199
+ target_id: string;
4200
+ source_id: string;
4201
+ store_id?: string;
4202
+ }
4203
+
4204
+ export { type GetProviderParams as $, type Address as A, type Block as B, type Cart as C, type ClearCartParams as D, type EshopCartItem as E, type FormEntry as F, type GetCollectionParams as G, type CheckoutCartParams as H, type GetOrderParams as I, type Order as J, type GetOrdersParams as K, type Location as L, type Market as M, type DownloadDigitalAccessParams as N, type OrderCheckoutResult as O, type Price as P, type QuoteCartParams as Q, type RequestOptions as R, type Service as S, type Taxonomy as T, type UpdateCartParams as U, type DigitalAccessDownloadResponse as V, type GetServiceParams as W, type GetServicesParams as X, type FindServiceProvidersParams as Y, type ZoneLocation as Z, type GetAvailabilityParams as _, type CollectionEntry as a, type TriggerNotificationParams as a$, type GetProvidersParams as a0, type GetContactListParams as a1, type ContactList as a2, type FindContactListsParams as a3, type SubscribeContactListParams as a4, type ContactListSubscribeResponse as a5, type ContactListAccessParams as a6, type ContactListAccessResponse as a7, type ProductVariant as a8, type OrderCheckoutItemInput as a9, type TestWebhookParams as aA, type ListWebhooksParams as aB, type Webhook as aC, type CreateWebhookParams as aD, type UpdateWebhookParams as aE, type DeleteWebhookParams as aF, type StoreRuntimeConfig as aG, type FindStoreMediaParams as aH, type Media as aI, type CreateLocationParams as aJ, type UpdateLocationParams as aK, type DeleteLocationParams as aL, type CreateMarketParams as aM, type UpdateMarketParams as aN, type DeleteMarketParams as aO, type ListPaymentProvidersParams as aP, type PaymentProvider as aQ, type RefreshPaymentProvidersParams as aR, type ConnectStripePaymentProviderParams as aS, type StripePaymentProviderConnectResponse as aT, type DeletePaymentProviderParams as aU, type GetMediaParams as aV, type UploadStoreMediaParams as aW, type DeleteStoreMediaParams as aX, type GetStoreMediaParams as aY, type UpdateMediaParams as aZ, type TrackEmailOpenParams as a_, type FormField as aa, type Contact$1 as ab, type UpdateAccountContactParams as ac, type AccountUpdateResponse as ad, type DeleteAccountParams as ae, type GetMeParams as af, type Account as ag, type SearchAccountsParams as ah, type MagicLinkVerifyParams as ai, type AuthToken as aj, type CreateStoreParams as ak, type UpdateStoreParams as al, type DeleteStoreParams as am, type GetStoreParams as an, type GetStoresParams as ao, type GetSubscriptionPlansParams as ap, type SubscriptionPlan as aq, type SubscribeParams as ar, type CreatePortalSessionParams as as, type AddMemberParams as at, type RemoveMemberParams as au, type ListBuildHooksParams as av, type BuildHook as aw, type CreateBuildHookParams as ax, type UpdateBuildHookParams as ay, type DeleteBuildHookParams as az, type Form as b, type UpdateEmailTemplateParams as b$, type CreateMailboxParams as b0, type Mailbox as b1, type UpdateMailboxParams as b2, type GetMailboxParams as b3, type TestMailboxParams as b4, type TestMailboxResult as b5, type PrepareMailboxParams as b6, type FindMailboxesParams as b7, type GetSocialCapabilitiesParams as b8, type SocialProviderCapability as b9, type ReplySocialPublicationCommentParams as bA, type SocialPublicationCommentReplyResponse as bB, type GetSocialPublicationMetricsParams as bC, type SocialPublicationMetricSnapshot as bD, type SyncSocialPublicationMetricsParams as bE, type SyncSocialEngagementParams as bF, type SocialPublicationEngagementSyncResult as bG, type CreateCollectionParams as bH, type UpdateCollectionParams as bI, type DeleteCollectionParams as bJ, type GetCollectionsParams as bK, type CreateEntryParams as bL, type UpdateEntryParams as bM, type DeleteEntryParams as bN, type CreateFormParams as bO, type UpdateFormParams as bP, type DeleteFormParams as bQ, type GetFormsParams as bR, type GetFormSubmissionsParams as bS, type GetFormSubmissionParams as bT, type UpdateFormSubmissionParams as bU, type CreateTaxonomyParams as bV, type UpdateTaxonomyParams as bW, type DeleteTaxonomyParams as bX, type GetTaxonomiesParams as bY, type CreateEmailTemplateParams as bZ, type EmailTemplate as b_, type ListSocialAccountsParams as ba, type SocialAccount as bb, type ConnectSocialAccountParams as bc, type SocialConnectResponse as bd, type GetSocialOAuthAttemptParams as be, type SocialOAuthCallbackResponse as bf, type SelectSocialDestinationParams as bg, type DeleteSocialAccountParams as bh, type CreateSocialPublicationParams as bi, type SocialPublicationMutationResponse as bj, type UpdateSocialPublicationParams as bk, type GetSocialPublicationParams as bl, type SocialPublication as bm, type FindSocialPublicationsParams as bn, type ValidateSocialPublicationParams as bo, type SocialPublicationValidation as bp, type ScheduleSocialPublicationParams as bq, type CancelSocialPublicationParams as br, type GetSocialPublicationCommentsParams as bs, type SocialPublicationComment as bt, type SyncSocialPublicationCommentsParams as bu, type GetSocialPublicationCommentThreadParams as bv, type SyncSocialPublicationCommentThreadParams as bw, type FindSocialPublicationCommentsParams as bx, type ClassifySocialPublicationCommentsParams as by, type SocialPublicationCommentClassificationResult as bz, type Product as c, type CampaignLaunchReadiness as c$, type DeleteEmailTemplateParams as c0, type GetEmailTemplateParams as c1, type GetEmailTemplatesParams as c2, type PreviewEmailTemplateParams as c3, type PreviewEmailTemplateResponse as c4, type CreateProductParams as c5, type UpdateProductParams as c6, type DeleteProductParams as c7, type UpdateOrderParams as c8, type GetQuoteParams as c9, type GetContactParams as cA, type FindContactsParams as cB, type UpdateContactParams as cC, type MergeContactsParams as cD, type ImportContactsParams as cE, type ImportContactsResult as cF, type CreateContactListParams as cG, type UpdateContactListParams as cH, type ImportContactsIntoContactListParams as cI, type ImportContactsIntoContactListResult as cJ, type ImportContactListPreviewParams as cK, type ImportContactsPreviewResult as cL, type AddContactListContactParams as cM, type ContactListMember as cN, type UpdateContactListContactParams as cO, type RemoveContactListContactParams as cP, type FindContactListContactsParams as cQ, type Action as cR, type FindActionsParams as cS, type CreateCampaignParams as cT, type Campaign as cU, type UpdateCampaignParams as cV, type GetCampaignParams as cW, type FindCampaignsParams as cX, type LaunchCampaignParams as cY, type DuplicateCampaignParams as cZ, type GetCampaignLaunchReadinessParams as c_, type ProcessOrderRefundParams as ca, type ProcessOrderRefundResponse as cb, type GetShippingRatesParams as cc, type ShippingRate as cd, type ShipParams as ce, type ShipResult as cf, type CreateCartParams as cg, type FindCartsParams as ch, type CreateServiceParams as ci, type UpdateServiceParams as cj, type DeleteServiceParams as ck, type ServiceProvider as cl, type CreateServiceProviderParams as cm, type UpdateServiceProviderParams as cn, type DeleteServiceProviderParams as co, type CreateProviderParams as cp, type UpdateProviderParams as cq, type DeleteProviderParams as cr, type CreatePromoCodeParams as cs, type PromoCode as ct, type UpdatePromoCodeParams as cu, type DeletePromoCodeParams as cv, type GetPromoCodeParams as cw, type GetPromoCodesParams as cx, type CreateContactParams as cy, type Contact as cz, type Provider as d, type CampaignManualTaskOutcome as d$, type ImportCampaignEnrollmentsParams as d0, type CampaignEnrollmentImportResult as d1, type GenerateOutreachPersonalizedDraftsParams as d2, type FindCampaignEnrollmentsParams as d3, type CampaignEnrollment as d4, type GetCampaignEnrollmentConversationParams as d5, type CampaignEnrollmentConversationResponse as d6, type UpdateCampaignEnrollmentParams as d7, type UpdateCampaignEnrollmentDraftParams as d8, type UpdateCampaignEnrollmentStepExecutionParams as d9, type DeleteWorkflowParams as dA, type GetWorkflowParams as dB, type GetWorkflowsParams as dC, type TriggerWorkflowParams as dD, type WorkflowExecution as dE, type GetWorkflowExecutionsParams as dF, type GetWorkflowExecutionParams as dG, type GetWorkflowAccountsParams as dH, type WorkflowAccount as dI, type GetWorkflowAccountConnectUrlParams as dJ, type WorkflowAccountConnectUrl as dK, type ConnectWorkflowAccountParams as dL, type DeleteWorkflowAccountParams as dM, type Access as dN, type AccountToken as dO, type ActionContext as dP, type ActionData as dQ, type ApiResponse as dR, type AvailabilitySlot as dS, type BlockSchema as dT, type BlockSchemaProperties as dU, type BlockSchemaType as dV, type BookingOrderItemStatus as dW, type BuildHookType as dX, type CampaignEnrollmentImportResult$1 as dY, type CampaignEnrollmentImportSource as dZ, type CampaignEnrollmentStatus as d_, type ReplyCampaignEnrollmentParams as da, type StopCampaignEnrollmentParams as db, type FindCampaignMessagesParams as dc, type CampaignMessage as dd, type UpdateCampaignMessageParams as de, type CreateSuppressionParams as df, type Suppression as dg, type UpdateSuppressionParams as dh, type GetSuppressionParams as di, type FindSuppressionsParams as dj, type CreateLeadResearchRunParams as dk, type LeadResearchRun as dl, type FindLeadResearchRunsParams as dm, type GetLeadResearchRunParams as dn, type UpdateLeadResearchRunParams as dp, type CancelLeadResearchRunParams as dq, type SendLeadResearchMessageParams as dr, type SendLeadResearchMessageResult as ds, type FindLeadResearchMessagesParams as dt, type LeadResearchMessage as du, type ValidateLeadEmailParams as dv, type LeadEmailValidationResult as dw, type CreateWorkflowParams as dx, type Workflow as dy, type UpdateWorkflowParams as dz, type AvailabilityResponse as e, type ImportContactRowInput as e$, type CampaignMessageCopySource as e0, type CampaignMessageDirection as e1, type CampaignMessageStatus as e2, type CampaignMessageType as e3, type CampaignRoute as e4, type CampaignStatus as e5, type CartOrigin as e6, type CartStatus as e7, type ChannelMessage as e8, type ChannelType as e9, type Discount as eA, type DiscountAllocation as eB, type EmailTemplateStatus as eC, type EmailTemplateVariable as eD, type EntryBlockQuery as eE, type EntryStatus as eF, type EshopItem as eG, type EshopQuoteItem as eH, type EshopStoreState as eI, type Event as eJ, type EventAction as eK, type ExecutionStatus as eL, type FieldOperation as eM, type FormFieldType as eN, type FormSchema as eO, type FormSchemaType as eP, type FormStatus as eQ, type FulfillmentOrder as eR, type FulfillmentOrderLine as eS, type FulfillmentOrderRequestStatus as eT, type FulfillmentOrderStatus as eU, type GalleryItem as eV, type GeoLocation as eW, type GeoLocationBlock as eX, type HistoryEntry as eY, type ImportContactListRowResult as eZ, type ImportContactRowError as e_, type CheckoutPaymentAction as ea, type CollectionStatus as eb, type Condition as ec, type ConditionValue as ed, type ContactChannel as ee, type ContactListMembership as ef, type ContactListMembershipPayment as eg, type ContactListMembershipProvider as eh, type ContactListMembershipProviderCancellation as ei, type ContactListMembershipProviderCancellationError as ej, type ContactListMembershipProviderCancellationStatus as ek, type ContactListMembershipStatus as el, type ContactListSource as em, type ContactListStatus as en, type ContactListType as eo, type ContactStatus as ep, type Coordinates as eq, type CustomsDeclaration as er, type CustomsItem as es, type DaySlots as et, type DigitalAccessGrant as eu, type DigitalAccessGrantStatus as ev, type DigitalAsset as ew, type DigitalAssetStatus as ex, type DigitalAssetType as ey, type DigitalDeliveryPolicy as ez, type OrderQuote as f, type ProductQuoteLine as f$, type ImportContactRowResult as f0, type ImportContactsPreviewParams as f1, type ImportFieldMapping as f2, type ImportPreviewRow as f3, type InstagramPlacement as f4, type InventoryLevel as f5, type Language as f6, type LeadEmailClassification as f7, type LeadInsight as f8, type LeadResearchMessageRole as f9, type OrderPaymentRefund as fA, type OrderPaymentStatus as fB, type OrderPaymentSummaryStatus as fC, type OrderPaymentTax as fD, type OrderPaymentTaxLine as fE, type OrderQuoteCompatibleItemInput as fF, type OrderQuoteItemInput as fG, type OrderShipping as fH, type OrderStatus as fI, type OutreachPersonalizationCounters as fJ, type OutreachPersonalizationState as fK, type OutreachPersonalizationStatus as fL, type OutreachStep as fM, type OutreachStepType as fN, type OutreachThreadMode as fO, type Parcel as fP, type PaymentCaptureMethod as fQ, PaymentMethodType as fR, type PaymentStoreConfig as fS, type PaymentTransaction as fT, type PaymentTransactionProvider as fU, type PaymentTransactionStatus as fV, type PaymentTransactionType as fW, type ProductInventory as fX, type ProductLineItem as fY, type ProductLineItemSnapshot as fZ, type ProductQuoteItemInput as f_, type LeadResearchRunStatus as fa, type LeadScores as fb, type LeadValidationCheck as fc, type LeadValidationCheckStatus as fd, type LineMoneySnapshot as fe, type MailboxConnectionSecurity as ff, type MailboxPreset as fg, type MailboxStatus as fh, type MailboxSyncStatus as fi, type ManualTaskContinueBehavior as fj, type MediaRef as fk, type MediaResolution as fl, type NodeResult as fm, type OpportunitySource as fn, type OpportunityStage as fo, type OpportunityType as fp, type OrderCancellationReason as fq, type OrderCheckoutCompatibleItemInput as fr, type OrderFulfillmentStatus as fs, type OrderItem as ft, type OrderItemFulfillmentStatus as fu, type OrderItemSnapshot as fv, type OrderItemStatus as fw, type OrderPayment as fx, type OrderPaymentPromoCode as fy, type OrderPaymentProvider as fz, type PaymentMethod as g, type SuppressionStatus as g$, type ProductQuoteLineAvailability as g0, type ProductStatus as g1, type PromoCodeStatus as g2, type PromoCodeValidation as g3, type ProviderAvailability as g4, type ProviderStatus as g5, type ProviderTimelinePoint as g6, type ProviderWithTimeline as g7, type PurchaseLabelResult as g8, type QuoteLine as g9, type SocialOAuthCallbackStatus as gA, type SocialOAuthCredential as gB, type SocialOAuthDestinationOption as gC, type SocialProviderType as gD, type SocialPublicationCommentIntent as gE, type SocialPublicationCommentPriority as gF, type SocialPublicationCommentReply as gG, type SocialPublicationCommentReplyError as gH, type SocialPublicationCommentReplyStatus as gI, type SocialPublicationCommentStatus as gJ, type SocialPublicationContent as gK, type SocialPublicationStatus as gL, type SpecificDate as gM, type StoreMembership as gN, type StoreSubscription as gO, type StoreSubscriptionPayment as gP, type StoreSubscriptionProvider as gQ, type StoreSubscriptionProviderError as gR, type StoreSubscriptionProviderLifecycle as gS, type StoreSubscriptionProviderLifecycleStatus as gT, type StoreSubscriptionProviderOperation as gU, type StoreSubscriptionSource as gV, type StoreSubscriptionStatus as gW, type SubscriptionPrice as gX, type SuppressionReason as gY, type SuppressionScopeType as gZ, type SuppressionSource as g_, type RefundLine as ga, type RefundStatus as gb, type RefundType as gc, type ResearchContactListMember as gd, type ServiceCheckoutPart as ge, type ServiceDuration as gf, type ServiceLineItem as gg, type ServiceLineItemSnapshot as gh, type ServiceQuoteItem as gi, type ServiceQuoteItemInput as gj, type ServiceQuoteLine as gk, type ServiceQuoteLineAvailability as gl, type ServiceStatus as gm, type Shipment as gn, type ShipmentLabelStatus as go, type ShipmentLine as gp, type ShippingLine as gq, type ShippingMethod as gr, type ShippingStatus as gs, type ShippingWeightTier as gt, type Slot as gu, type SlotRange as gv, type SmtpImapMailboxProvider as gw, type SocialAnalyticsCapabilities as gx, type SocialDestinationMetadata as gy, type SocialEngagementCapabilities as gz, type ProductCheckoutItemInput as h, type PromoUsage$1 as h$, type SuppressionTargetType as h0, type SystemTemplateKey as h1, type TaxLine as h2, type TaxLineReversal as h3, type TaxonomyEntry as h4, type TaxonomyField as h5, type TaxonomyFieldQuery as h6, type TaxonomyQuery as h7, type TaxonomySchema as h8, type TaxonomySchemaType as h9, type Zone as hA, type AccountAddress as hB, type AccountApiToken as hC, type AccountLifecycle as hD, type ActionDevice as hE, type ActionLocation as hF, type ActionSession as hG, type BlockType as hH, type ContactChannelConsentStatus as hI, type ContactInfo as hJ, type ContactSessionToken$1 as hK, type ContactVerificationCode$1 as hL, type CreateProductVariantInput as hM, type FacebookPageContent as hN, type GeoLocationBlockProperties as hO, type GetAnalyticsHealthParams as hP, type GetAnalyticsParams as hQ, type GetDeliveryStatsParams as hR, type InstagramBusinessContent as hS, type IntervalPeriod as hT, type LoginAccountParams as hU, type LogoutParams as hV, type OrderCheckoutParams as hW, type OrderRefundError as hX, type PaymentTaxLine as hY, type PreviewEmailTemplateWarning as hZ, type PriceProvider as h_, type TaxonomyStatus as ha, type TiktokPrivacy as hb, type TimelinePoint as hc, type TrustedOrderCheckoutCompatibleItemInput as hd, type TrustedOrderCheckoutItemInput as he, type TrustedProductCheckoutItemInput as hf, type TrustedServiceCheckoutItemInput as hg, type ValidationError as hh, type WebhookEventSubscription as hi, type WorkflowAccountProfile as hj, type WorkflowAccountType as hk, type WorkflowDeployWebhookNode as hl, type WorkflowEdge as hm, type WorkflowGoogleDriveUploadNode as hn, type WorkflowHttpMethod as ho, type WorkflowHttpNode as hp, type WorkflowLoopNode as hq, type WorkflowNode as hr, type WorkflowStatus as hs, type WorkflowSwitchNode as ht, type WorkflowSwitchRule as hu, type WorkflowTransformNode as hv, type WorkflowTriggerNode as hw, type WorkingDay as hx, type WorkingHour as hy, type YoutubePrivacy as hz, type ServiceCheckoutItemInput as i, type SearchOrderServiceItemsParams as i0, type ServiceProviderInput as i1, type SetContactEmailParams as i2, type SetupAnalyticsParams as i3, type ShipmentLabelError as i4, type SocialActionAuthor as i5, type StoreEmails as i6, type StoreRole as i7, type SubscriptionAction as i8, type SubscriptionInterval as i9, type TiktokAccountContent as ia, type TimeRange as ib, type UpdateProductVariantInput as ic, type XAccountContent as id, type YoutubeChannelContent as ie, type ContactDetail as j, type Store as k, type Collection as l, type GetEntryParams as m, type GetEntriesParams as n, type PaginatedResponse as o, type GetFormParams as p, type SubmitFormParams as q, type FormSubmission as r, type GetTaxonomyParams as s, type GetTaxonomyChildrenParams as t, type GetProductParams as u, type GetProductsParams as v, type GetCurrentCartParams as w, type GetCartParams as x, type AddCartItemParams as y, type RemoveCartItemParams as z };