arky-sdk 0.9.6 → 0.9.12

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 (45) hide show
  1. package/README.md +113 -194
  2. package/dist/admin-D8HiRDCl.d.cts +1536 -0
  3. package/dist/admin-Dnnv18wN.d.ts +1536 -0
  4. package/dist/admin.cjs +832 -375
  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 +832 -375
  9. package/dist/admin.js.map +1 -1
  10. package/dist/api-D4lMmvF0.d.cts +4337 -0
  11. package/dist/api-D4lMmvF0.d.ts +4337 -0
  12. package/dist/{index-nCF3Z6Af.d.cts → index-BS2x278C.d.cts} +1 -1
  13. package/dist/{index-CZxubTDA.d.ts → index-Be8suRwP.d.ts} +1 -1
  14. package/dist/index.cjs +934 -460
  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 +934 -460
  19. package/dist/index.js.map +1 -1
  20. package/dist/storefront.cjs +501 -300
  21. package/dist/storefront.cjs.map +1 -1
  22. package/dist/storefront.d.cts +174 -89
  23. package/dist/storefront.d.ts +174 -89
  24. package/dist/storefront.js +499 -299
  25. package/dist/storefront.js.map +1 -1
  26. package/dist/types.cjs.map +1 -1
  27. package/dist/types.d.cts +1 -1
  28. package/dist/types.d.ts +1 -1
  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 +7 -10
  33. package/scripts/contract-admin.mjs +137 -0
  34. package/scripts/contract-storefront.mjs +296 -0
  35. package/dist/admin-DjYydKeB.d.ts +0 -1389
  36. package/dist/admin-DlL8mCxL.d.cts +0 -1389
  37. package/dist/api-BbBHcd4p.d.cts +0 -3289
  38. package/dist/api-BbBHcd4p.d.ts +0 -3289
  39. package/dist/storefront-store.cjs +0 -2809
  40. package/dist/storefront-store.cjs.map +0 -1
  41. package/dist/storefront-store.d.cts +0 -5
  42. package/dist/storefront-store.d.ts +0 -5
  43. package/dist/storefront-store.js +0 -2807
  44. package/dist/storefront-store.js.map +0 -1
  45. package/scripts/smoke-store.mjs +0 -41
@@ -0,0 +1,1536 @@
1
+ import { w as GetCurrentCartParams, R as RequestOptions$1, C as Cart, x as GetCartParams, U as UpdateCartParams, y as AddCartItemParams, z as RemoveCartItemParams, D as ClearCartParams, Q as QuoteCartParams, f as OrderQuote, H as CheckoutCartParams, O as OrderCheckoutResult, ad as Contact, k as Store, M as Market, ae as UpdateAccountContactParams, af as AccountUpdateResponse, ag as DeleteAccountParams, ah as GetMeParams, ai as Account, aj as SearchAccountsParams, ak as MagicLinkVerifyParams, al as AuthToken, am as CreateStoreParams, an as UpdateStoreParams, ao as DeleteStoreParams, ap as GetStoreParams, aq as GetStoresParams, o as PaginatedResponse, ar as GetSubscriptionPlansParams, as as SubscriptionPlan, at as SubscribeParams, au as CreatePortalSessionParams, av as AddMemberParams, aw as RemoveMemberParams, ax as ListBuildHooksParams, ay as BuildHook, az as CreateBuildHookParams, aA as UpdateBuildHookParams, aB as DeleteBuildHookParams, aC as TestWebhookParams, aD as ListWebhooksParams, aE as Webhook, aF as CreateWebhookParams, aG as UpdateWebhookParams, aH as DeleteWebhookParams, aI as StoreRuntimeConfig, aJ as FindStoreMediaParams, aK as Media, L as Location, aL as CreateLocationParams, aM as UpdateLocationParams, aN as DeleteLocationParams, aO as CreateMarketParams, aP as UpdateMarketParams, aQ as DeleteMarketParams, aR as ListPaymentProvidersParams, aS as PaymentProvider, aT as RefreshPaymentProvidersParams, aU as ConnectStripePaymentProviderParams, aV as StripePaymentProviderConnectResponse, aW as DeletePaymentProviderParams, aX as GetMediaParams, aY as UploadStoreMediaParams, aZ as DeleteStoreMediaParams, a_ as GetStoreMediaParams, a$ as UpdateMediaParams, b0 as TrackEmailOpenParams, b1 as TriggerNotificationParams, b2 as CreateMailboxParams, b3 as Mailbox, b4 as UpdateMailboxParams, b5 as GetMailboxParams, b6 as TestMailboxParams, b7 as TestMailboxResult, b8 as PrepareMailboxParams, b9 as FindMailboxesParams, ba as GetSocialCapabilitiesParams, bb as SocialProviderCapability, bc as ListSocialAccountsParams, bd as SocialAccount, be as ConnectSocialAccountParams, bf as SocialConnectResponse, bg as GetSocialOAuthAttemptParams, bh as SocialOAuthCallbackResponse, bi as SelectSocialDestinationParams, bj as DeleteSocialAccountParams, bk as CreateSocialPublicationParams, bl as SocialPublicationMutationResponse, bm as UpdateSocialPublicationParams, bn as GetSocialPublicationParams, bo as SocialPublication, bp as FindSocialPublicationsParams, bq as ValidateSocialPublicationParams, br as SocialPublicationValidation, bs as ScheduleSocialPublicationParams, bt as CancelSocialPublicationParams, bu as GetSocialPublicationCommentsParams, bv as SocialPublicationComment, bw as SyncSocialPublicationCommentsParams, bx as GetSocialPublicationCommentThreadParams, by as SyncSocialPublicationCommentThreadParams, bz as FindSocialPublicationCommentsParams, bA as ClassifySocialPublicationCommentsParams, bB as SocialPublicationCommentClassificationResult, bC as ReplySocialPublicationCommentParams, bD as SocialPublicationCommentReplyResponse, bE as GetSocialPublicationMetricsParams, bF as SocialPublicationMetricSnapshot, bG as SyncSocialPublicationMetricsParams, bH as SyncSocialEngagementParams, bI as SocialPublicationEngagementSyncResult, bJ as CreateCollectionParams, l as Collection, bK as UpdateCollectionParams, bL as DeleteCollectionParams, G as GetCollectionParams, bM as GetCollectionsParams, bN as CreateEntryParams, a as CollectionEntry, bO as UpdateEntryParams, bP as DeleteEntryParams, m as GetEntryParams, n as GetEntriesParams, bQ as CreateFormParams, b as Form, bR as UpdateFormParams, bS as DeleteFormParams, p as GetFormParams, bT as GetFormsParams, q as SubmitFormParams, r as FormSubmission, bU as GetFormSubmissionsParams, bV as GetFormSubmissionParams, bW as UpdateFormSubmissionParams, bX as CreateTaxonomyParams, T as Taxonomy, bY as UpdateTaxonomyParams, bZ as DeleteTaxonomyParams, s as GetTaxonomyParams, b_ as GetTaxonomiesParams, t as GetTaxonomyChildrenParams, b$ as CreateEmailTemplateParams, c0 as EmailTemplate, c1 as UpdateEmailTemplateParams, c2 as DeleteEmailTemplateParams, c3 as GetEmailTemplateParams, c4 as GetEmailTemplatesParams, c5 as PreviewEmailTemplateParams, c6 as PreviewEmailTemplateResponse, c7 as CreateProductParams, c as Product, c8 as UpdateProductParams, c9 as DeleteProductParams, u as GetProductParams, v as GetProductsParams, ca as UpdateOrderParams, J as Order, I as GetOrderParams, K as GetOrdersParams, cb as GetQuoteParams, cc as ProcessOrderRefundParams, cd as ProcessOrderRefundResponse, N as DownloadDigitalAccessParams, V as DigitalAccessDownloadResponse, ce as GetShippingRatesParams, cf as ShippingRate, cg as ShipParams, ch as ShipResult, ci as RefundShippingLabelParams, cj as ShippingLabelRefund, ck as CreateCartParams, cl as FindCartsParams, cm as CreateServiceParams, S as Service, cn as UpdateServiceParams, co as DeleteServiceParams, W as GetServiceParams, X as GetServicesParams, _ as GetAvailabilityParams, e as AvailabilityResponse, Y as FindServiceProvidersParams, cp as ServiceProvider, cq as CreateServiceProviderParams, cr as UpdateServiceProviderParams, cs as DeleteServiceProviderParams, ct as CreateProviderParams, d as Provider, cu as UpdateProviderParams, cv as DeleteProviderParams, $ as GetProviderParams, a0 as GetProvidersParams, cw as CreatePromoCodeParams, cx as PromoCode, cy as UpdatePromoCodeParams, cz as DeletePromoCodeParams, cA as GetPromoCodeParams, cB as GetPromoCodesParams, cC as CreateContactParams, cD as Contact$1, cE as GetContactParams, j as ContactDetail, cF as FindContactsParams, cG as UpdateContactParams, cH as MergeContactsParams, cI as ImportContactsParams, cJ as ImportContactsResult, cK as CreateContactListParams, a2 as ContactList, cL as UpdateContactListParams, a1 as GetContactListParams, a3 as FindContactListsParams, cM as ImportContactsIntoContactListParams, cN as ImportContactsIntoContactListResult, cO as ImportContactListPreviewParams, cP as ImportContactsPreviewResult, cQ as AddContactListContactParams, cR as ContactListMember, cS as UpdateContactListContactParams, cT as RemoveContactListContactParams, cU as FindContactListContactsParams, cV as Action, cW as FindActionsParams, cX as CreateCampaignParams, cY as Campaign, cZ as UpdateCampaignParams, c_ as GetCampaignParams, c$ as FindCampaignsParams, d0 as LaunchCampaignParams, d1 as DuplicateCampaignParams, d2 as GetCampaignLaunchReadinessParams, d3 as CampaignLaunchReadiness, d4 as ImportCampaignEnrollmentsParams, d5 as CampaignEnrollmentImportResult, d6 as GenerateOutreachPersonalizedDraftsParams, d7 as FindCampaignEnrollmentsParams, d8 as CampaignEnrollment, d9 as GetCampaignEnrollmentConversationParams, da as CampaignEnrollmentConversationResponse, db as UpdateCampaignEnrollmentParams, dc as UpdateCampaignEnrollmentDraftParams, dd as UpdateCampaignEnrollmentStepExecutionParams, de as ReplyCampaignEnrollmentParams, df as StopCampaignEnrollmentParams, dg as FindCampaignMessagesParams, dh as CampaignMessage, di as UpdateCampaignMessageParams, dj as CreateSuppressionParams, dk as Suppression, dl as UpdateSuppressionParams, dm as GetSuppressionParams, dn as FindSuppressionsParams, dp as CreateLeadResearchRunParams, dq as LeadResearchRun, dr as FindLeadResearchRunsParams, ds as GetLeadResearchRunParams, dt as UpdateLeadResearchRunParams, du as CancelLeadResearchRunParams, dv as SendLeadResearchMessageParams, dw as SendLeadResearchMessageResult, dx as FindLeadResearchMessagesParams, dy as LeadResearchMessage, dz as ValidateLeadEmailParams, dA as LeadEmailValidationResult, dB as CreateWorkflowParams, dC as Workflow, dD as UpdateWorkflowParams, dE as DeleteWorkflowParams, dF as GetWorkflowParams, dG as GetWorkflowsParams, dH as TriggerWorkflowParams, dI as WorkflowExecution, dJ as GetWorkflowExecutionsParams, dK as GetWorkflowExecutionParams, dL as GetWorkflowAccountsParams, dM as WorkflowAccount, dN as GetWorkflowAccountConnectUrlParams, dO as WorkflowAccountConnectUrl, dP as ConnectWorkflowAccountParams, dQ as DeleteWorkflowAccountParams, a4 as SubscribeContactListParams, a5 as ContactListSubscribeResponse, a6 as ContactListAccessParams, a7 as ContactListAccessResponse, a8 as ContactListContentAccessParams, a9 as ContactListContentAccessResponse } from './api-D4lMmvF0.cjs';
2
+ import { f as formatPayment, a as formatMinor, g as getCurrencySymbol, b as getCurrencyName, i as isValidKey, v as validateKey, t as toKey, n as nameToKey, c as getAvailableStock, d as getReservedStock, h as hasStock, e as getInventoryAt, j as getFirstAvailableFCId } from './index-BS2x278C.cjs';
3
+
4
+ interface CartApi {
5
+ current(params?: GetCurrentCartParams, options?: RequestOptions$1): Promise<Cart>;
6
+ get(params: GetCartParams, options?: RequestOptions$1): Promise<Cart>;
7
+ update(params: UpdateCartParams, options?: RequestOptions$1): Promise<Cart>;
8
+ addItem(params: AddCartItemParams, options?: RequestOptions$1): Promise<Cart>;
9
+ removeItem(params: RemoveCartItemParams, options?: RequestOptions$1): Promise<Cart>;
10
+ clear(params: ClearCartParams, options?: RequestOptions$1): Promise<Cart>;
11
+ quote(params: QuoteCartParams, options?: RequestOptions$1): Promise<OrderQuote>;
12
+ checkout(params: CheckoutCartParams, options?: RequestOptions$1): Promise<OrderCheckoutResult>;
13
+ }
14
+ interface CartControllerState {
15
+ cart: Cart | null;
16
+ quote: OrderQuote | null;
17
+ checkoutResult: OrderCheckoutResult | null;
18
+ loading: boolean;
19
+ initialized: boolean;
20
+ error: unknown;
21
+ }
22
+ type CartControllerListener = (state: CartControllerState) => void;
23
+ type CartControllerInitParams = GetCurrentCartParams | GetCartParams;
24
+ type CartControllerRefreshParams = GetCurrentCartParams | GetCartParams;
25
+ type CartControllerUpdateParams = Omit<UpdateCartParams, "id"> & {
26
+ id?: string;
27
+ };
28
+ type CartControllerAddItemParams = Omit<AddCartItemParams, "id"> & {
29
+ id?: string;
30
+ };
31
+ type CartControllerRemoveItemParams = Omit<RemoveCartItemParams, "id"> & {
32
+ id?: string;
33
+ };
34
+ type CartControllerClearParams = Omit<ClearCartParams, "id"> & {
35
+ id?: string;
36
+ };
37
+ type CartControllerQuoteParams = Omit<QuoteCartParams, "id"> & {
38
+ id?: string;
39
+ };
40
+ type CartControllerCheckoutParams = Omit<CheckoutCartParams, "id"> & {
41
+ id?: string;
42
+ };
43
+ interface CartController {
44
+ subscribe(listener: CartControllerListener): () => void;
45
+ getState(): CartControllerState;
46
+ init(params?: CartControllerInitParams, options?: RequestOptions$1): Promise<Cart>;
47
+ refresh(params?: CartControllerRefreshParams, options?: RequestOptions$1): Promise<Cart>;
48
+ addItem(params: CartControllerAddItemParams, options?: RequestOptions$1): Promise<Cart>;
49
+ update(params: CartControllerUpdateParams, options?: RequestOptions$1): Promise<Cart>;
50
+ removeItem(params: CartControllerRemoveItemParams, options?: RequestOptions$1): Promise<Cart>;
51
+ clear(params?: CartControllerClearParams, options?: RequestOptions$1): Promise<Cart>;
52
+ quote(params?: CartControllerQuoteParams, options?: RequestOptions$1): Promise<OrderQuote>;
53
+ checkout(params?: CartControllerCheckoutParams, options?: RequestOptions$1): Promise<OrderCheckoutResult>;
54
+ }
55
+ declare function createCartController(cartApi: CartApi): CartController;
56
+
57
+ type ContactToken = {
58
+ id: string;
59
+ token: string;
60
+ created_at: number;
61
+ };
62
+ type IdentifyResponse = {
63
+ contact: Contact;
64
+ token: ContactToken;
65
+ store: Store;
66
+ market: Market | null;
67
+ code_sent: boolean;
68
+ };
69
+ type VerifyResponse = ContactToken;
70
+ interface StorefrontAction {
71
+ store_id: string;
72
+ contact_id: string;
73
+ key: string;
74
+ type?: string;
75
+ payload: Record<string, unknown>;
76
+ created_at: number;
77
+ }
78
+ type TrackActionParams = {
79
+ key: string;
80
+ type?: string;
81
+ payload?: Record<string, unknown>;
82
+ } | {
83
+ type: string;
84
+ key?: string;
85
+ payload?: Record<string, unknown>;
86
+ };
87
+ declare const COMMON_ACTION_KEYS: readonly ["page.view", "product.view", "service.view", "provider.view", "cart.added", "cart.removed", "checkout.started", "order.created", "signin", "signup", "verified.email", "search", "share", "wishlist.added"];
88
+ type CommonActionKey = (typeof COMMON_ACTION_KEYS)[number];
89
+ interface UseExperimentParams {
90
+ key: string;
91
+ store_id?: string;
92
+ }
93
+ interface ExperimentUseResponse {
94
+ experiment_key: string;
95
+ experiment_version: number;
96
+ variant_key: string;
97
+ goal_action_key: string;
98
+ }
99
+
100
+ type ExperimentStatus = "draft" | "running" | "paused" | "completed";
101
+ interface ExperimentVariant {
102
+ key: string;
103
+ weight: number;
104
+ }
105
+ interface Experiment {
106
+ id: string;
107
+ store_id: string;
108
+ key: string;
109
+ status: ExperimentStatus;
110
+ version: number;
111
+ goal_action_key: string;
112
+ variants: ExperimentVariant[];
113
+ created_at: number;
114
+ updated_at: number;
115
+ }
116
+ interface CreateExperimentParams {
117
+ store_id?: string;
118
+ key: string;
119
+ goal_action_key: string;
120
+ variants: ExperimentVariant[];
121
+ status?: ExperimentStatus;
122
+ }
123
+ interface UpdateExperimentParams {
124
+ store_id?: string;
125
+ key: string;
126
+ goal_action_key?: string;
127
+ variants?: ExperimentVariant[];
128
+ status?: ExperimentStatus;
129
+ }
130
+ interface GetExperimentParams {
131
+ store_id?: string;
132
+ key: string;
133
+ }
134
+ interface FindExperimentsParams {
135
+ store_id?: string;
136
+ limit?: number;
137
+ cursor?: string;
138
+ }
139
+ interface ExperimentVariantResult {
140
+ variant_key: string;
141
+ weight: number;
142
+ shown: number;
143
+ wins: number;
144
+ conversion_rate: number;
145
+ }
146
+ interface ExperimentResults {
147
+ experiment: Experiment;
148
+ variants: ExperimentVariantResult[];
149
+ winning_variant_key?: string | null;
150
+ }
151
+
152
+ interface AnalyticsTimeRange {
153
+ from: number;
154
+ to: number;
155
+ }
156
+ type AnalyticsReportKey = "business_overview" | "contact_funnel" | "outreach_overview" | "outreach_funnel" | "action_by_country" | "top_action_pages" | "entity_status_overview" | "data_health" | "orders_created" | "contacts_created" | "form_submissions_created" | "carts_abandoned" | "campaign_messages_sent" | "campaign_messages_received" | "suppressions_created" | "media_count" | "products_by_status" | "services_by_status" | "providers_by_status" | "collections_by_status" | "entries_by_status" | "contacts_by_status" | "contact_lists_by_status" | "mailboxes_by_status" | "campaigns_by_status" | "campaign_enrollments_by_status" | "campaign_messages_by_status" | "support_conversations_by_status" | "lead_research_runs_by_status" | "suppressions_by_status" | "workflows_by_status" | "promo_codes_by_status" | "email_templates_by_status" | "forms_by_status" | "taxonomies_by_status" | "carts_by_status" | "orders_by_status" | "order_items_by_status" | "recent_action";
157
+ type ActionFeedCategory = "orders" | "carts" | "promo_codes" | "submissions" | "contacts" | "contact_lists" | "products" | "services" | "providers" | "cms" | "workflows" | "actions";
158
+ interface AnalyticsReportRequest {
159
+ key: AnalyticsReportKey;
160
+ limit?: number;
161
+ category?: ActionFeedCategory;
162
+ cursor_created_at?: number;
163
+ cursor_id?: string;
164
+ }
165
+ interface AnalyticsRequest {
166
+ time?: AnalyticsTimeRange;
167
+ reports?: AnalyticsReportRequest[];
168
+ blocks?: AnalyticsBlockRequest[];
169
+ }
170
+ interface AnalyticsBlockRequest {
171
+ id: string;
172
+ time: AnalyticsTimeRange;
173
+ reports: AnalyticsReportRequest[];
174
+ }
175
+ interface AnalyticsMetricData {
176
+ value: number;
177
+ execution_ms?: number;
178
+ }
179
+ interface AnalyticsBreakdownItem {
180
+ key: string;
181
+ label: string;
182
+ value: number;
183
+ unique_contacts?: number;
184
+ unique_visitors?: number;
185
+ }
186
+ interface AnalyticsBreakdownData {
187
+ items: AnalyticsBreakdownItem[];
188
+ }
189
+ interface BusinessOverviewData {
190
+ visitors: number;
191
+ new_visitors: number;
192
+ known_contacts: number;
193
+ new_known_contacts: number;
194
+ email_known_contacts: number;
195
+ verified_contacts: number;
196
+ new_verified_contacts: number;
197
+ buyers: number;
198
+ orders: number;
199
+ revenue: number;
200
+ revenue_by_currency: RevenueByCurrencyData[];
201
+ average_order_value: number;
202
+ carts: number;
203
+ abandoned_carts: number;
204
+ visitor_to_known_rate: number;
205
+ visitor_to_buyer_rate: number;
206
+ cart_abandonment_rate: number;
207
+ }
208
+ interface RevenueByCurrencyData {
209
+ currency: string;
210
+ orders: number;
211
+ revenue: number;
212
+ average_order_value: number;
213
+ }
214
+ interface ContactFunnelStage {
215
+ key: "visitors" | "email_known_contacts" | "verified_contacts" | "buyers" | string;
216
+ label: string;
217
+ value: number;
218
+ }
219
+ interface ContactFunnelData {
220
+ stages: ContactFunnelStage[];
221
+ visitor_to_known_rate?: number;
222
+ visitor_to_buyer_rate?: number;
223
+ }
224
+ interface OutreachOverviewData {
225
+ contact_lists: number;
226
+ active_contact_lists: number;
227
+ mailboxes: number;
228
+ active_mailboxes: number;
229
+ campaigns: number;
230
+ active_campaigns: number;
231
+ campaign_enrollments: number;
232
+ new_campaign_enrollments: number;
233
+ active_campaign_enrollments: number;
234
+ completed_campaign_enrollments: number;
235
+ replied_campaign_enrollments: number;
236
+ suppressed_campaign_enrollments: number;
237
+ failed_campaign_enrollments: number;
238
+ campaign_messages_sent: number;
239
+ outreach_bounces: number;
240
+ campaign_messages_received: number;
241
+ suppressions: number;
242
+ active_suppressions: number;
243
+ new_suppressions: number;
244
+ reply_rate: number;
245
+ bounce_rate: number;
246
+ suppression_rate: number;
247
+ }
248
+ interface OutreachFunnelStage {
249
+ key: "contact_lists" | "campaigns" | "campaign_enrollments" | "campaign_messages_sent" | "outreach_bounces" | "campaign_messages_received" | string;
250
+ label: string;
251
+ value: number;
252
+ }
253
+ interface OutreachFunnelData {
254
+ stages: OutreachFunnelStage[];
255
+ reply_rate?: number;
256
+ bounce_rate?: number;
257
+ suppression_rate?: number;
258
+ }
259
+ interface EntityStatusOverviewData {
260
+ entities: Record<string, AnalyticsBreakdownItem[]>;
261
+ }
262
+ interface DataHealthData {
263
+ anonymous_contacts: number;
264
+ known_contacts: number;
265
+ duplicate_emails: number;
266
+ unknown_country_events: number;
267
+ unknown_device_events: number;
268
+ }
269
+ interface ActionFeedItem {
270
+ id: string;
271
+ entity: string;
272
+ entity_id: string;
273
+ action: string;
274
+ event_type: string;
275
+ status: string;
276
+ contact_id: string;
277
+ category: string;
278
+ title: string;
279
+ description: string;
280
+ href?: string | null;
281
+ data: unknown;
282
+ payload: unknown;
283
+ created_at: number;
284
+ }
285
+ interface ActionFeedSummary {
286
+ total: number;
287
+ orders: number;
288
+ submissions: number;
289
+ contacts: number;
290
+ contact_lists: number;
291
+ abandoned_carts: number;
292
+ carts: number;
293
+ promo_codes: number;
294
+ products: number;
295
+ services: number;
296
+ providers: number;
297
+ cms: number;
298
+ workflows: number;
299
+ actions: number;
300
+ window_start: number;
301
+ }
302
+ interface ActionFeedCursor {
303
+ created_at: number;
304
+ id: string;
305
+ }
306
+ interface ActionFeedData {
307
+ items: ActionFeedItem[];
308
+ summary: ActionFeedSummary;
309
+ next_cursor?: ActionFeedCursor | null;
310
+ meta: {
311
+ row_count: number;
312
+ execution_ms: number;
313
+ };
314
+ }
315
+ type AnalyticsMetricReportKey = "orders_created" | "contacts_created" | "form_submissions_created" | "carts_abandoned" | "campaign_messages_sent" | "campaign_messages_received" | "suppressions_created" | "media_count";
316
+ type AnalyticsBreakdownReportKey = "action_by_country" | "top_action_pages" | "products_by_status" | "services_by_status" | "providers_by_status" | "collections_by_status" | "entries_by_status" | "contacts_by_status" | "contact_lists_by_status" | "mailboxes_by_status" | "campaigns_by_status" | "campaign_enrollments_by_status" | "campaign_messages_by_status" | "support_conversations_by_status" | "lead_research_runs_by_status" | "suppressions_by_status" | "workflows_by_status" | "promo_codes_by_status" | "email_templates_by_status" | "forms_by_status" | "taxonomies_by_status" | "carts_by_status" | "orders_by_status" | "order_items_by_status";
317
+ type AnalyticsActionReportKey = "recent_action";
318
+ type AnalyticsCompositeReportKey = "business_overview" | "contact_funnel" | "outreach_overview" | "outreach_funnel" | "entity_status_overview" | "data_health";
319
+ type AnalyticsReport = {
320
+ key: AnalyticsMetricReportKey;
321
+ data: AnalyticsMetricData;
322
+ } | {
323
+ key: AnalyticsBreakdownReportKey;
324
+ data: AnalyticsBreakdownData;
325
+ } | {
326
+ key: "business_overview";
327
+ data: BusinessOverviewData;
328
+ } | {
329
+ key: "contact_funnel";
330
+ data: ContactFunnelData;
331
+ } | {
332
+ key: "outreach_overview";
333
+ data: OutreachOverviewData;
334
+ } | {
335
+ key: "outreach_funnel";
336
+ data: OutreachFunnelData;
337
+ } | {
338
+ key: "entity_status_overview";
339
+ data: EntityStatusOverviewData;
340
+ } | {
341
+ key: "data_health";
342
+ data: DataHealthData;
343
+ } | {
344
+ key: AnalyticsActionReportKey;
345
+ data: ActionFeedData;
346
+ };
347
+ interface AnalyticsBlockResponse {
348
+ id: string;
349
+ time: AnalyticsTimeRange;
350
+ reports: AnalyticsReport[];
351
+ }
352
+ interface AnalyticsResponse {
353
+ time?: AnalyticsTimeRange;
354
+ reports?: AnalyticsReport[];
355
+ blocks?: AnalyticsBlockResponse[];
356
+ }
357
+
358
+ type SupportAgentStatus = "draft" | "active" | "archived";
359
+ type SupportChannelStatus = "draft" | "active" | "disabled" | "archived";
360
+ type SupportChannelType = "web" | "whatsapp" | "instagram" | "email" | "sms" | "viber";
361
+ interface SupportAgentNode {
362
+ type: "message" | "input" | "ai_handoff" | "action";
363
+ text?: string;
364
+ buttons?: string[];
365
+ prompt?: string;
366
+ field?: string;
367
+ input_type?: "text" | "email" | "phone";
368
+ validation?: string;
369
+ system_prompt_override?: string;
370
+ tools?: string[];
371
+ action?: SupportAction;
372
+ }
373
+ interface SupportAction {
374
+ type: "end_conversation" | "human_handoff";
375
+ message?: string;
376
+ }
377
+ interface SupportAgentEdge {
378
+ source: string;
379
+ target: string;
380
+ trigger: EdgeTrigger;
381
+ }
382
+ type EdgeTrigger = {
383
+ type: "button";
384
+ label: string;
385
+ } | {
386
+ type: "input";
387
+ field: string;
388
+ } | {
389
+ type: "default";
390
+ };
391
+ interface SupportAgentAiConfig {
392
+ system_prompt: string;
393
+ tools: string[];
394
+ max_context_messages: number;
395
+ }
396
+ interface SupportAgent {
397
+ id: string;
398
+ key: string;
399
+ store_id: string;
400
+ name: string;
401
+ status: SupportAgentStatus;
402
+ entry_node_id: string;
403
+ nodes: Record<string, SupportAgentNode>;
404
+ edges: SupportAgentEdge[];
405
+ ai_config?: SupportAgentAiConfig;
406
+ channel_ids: string[];
407
+ notes?: string | null;
408
+ created_at: number;
409
+ updated_at: number;
410
+ }
411
+ type SupportChannelConfig = {
412
+ type: "web";
413
+ widget_key: string;
414
+ allowed_origins?: string[];
415
+ } | {
416
+ type: "whatsapp";
417
+ phone_number_id: string;
418
+ business_account_id?: string | null;
419
+ display_phone_number?: string | null;
420
+ webhook_verify_token_secret_id?: string | null;
421
+ access_token_secret_id?: string | null;
422
+ } | {
423
+ type: "instagram";
424
+ page_id: string;
425
+ instagram_business_account_id?: string | null;
426
+ access_token_secret_id?: string | null;
427
+ } | {
428
+ type: "email";
429
+ mailbox_id: string;
430
+ } | {
431
+ type: "sms";
432
+ phone_e164: string;
433
+ account_ref?: string | null;
434
+ access_token_secret_id?: string | null;
435
+ } | {
436
+ type: "viber";
437
+ bot_id: string;
438
+ account_ref?: string | null;
439
+ access_token_secret_id?: string | null;
440
+ };
441
+ interface SupportChannel {
442
+ id: string;
443
+ store_id: string;
444
+ key: string;
445
+ name: string;
446
+ status: SupportChannelStatus;
447
+ channel_type: SupportChannelType;
448
+ config: SupportChannelConfig;
449
+ created_at: number;
450
+ updated_at: number;
451
+ }
452
+ type SupportConversationChannelContext = {
453
+ type: "web";
454
+ visitor_id?: string | null;
455
+ session_id?: string | null;
456
+ } | {
457
+ type: "whatsapp";
458
+ wa_id: string;
459
+ phone_e164?: string | null;
460
+ conversation_id?: string | null;
461
+ } | {
462
+ type: "instagram";
463
+ ig_user_id: string;
464
+ thread_id?: string | null;
465
+ } | {
466
+ type: "email";
467
+ thread_id: string;
468
+ reply_to: string;
469
+ message_id?: string | null;
470
+ references: string[];
471
+ } | {
472
+ type: "sms";
473
+ phone_e164: string;
474
+ } | {
475
+ type: "viber";
476
+ user_id: string;
477
+ conversation_id?: string | null;
478
+ phone_e164?: string | null;
479
+ };
480
+ interface SupportConversation {
481
+ id: string;
482
+ store_id: string;
483
+ agent_id?: string;
484
+ channel_id?: string | null;
485
+ channel_type: SupportChannelType;
486
+ channel_context: SupportConversationChannelContext;
487
+ current_node_id?: string;
488
+ contact_id?: string;
489
+ assigned_account_id?: string | null;
490
+ status: "active" | "ai_mode" | "escalated" | "resolved";
491
+ data: Record<string, unknown>;
492
+ metadata: Record<string, unknown>;
493
+ created_at: number;
494
+ updated_at: number;
495
+ }
496
+ interface SupportMessage {
497
+ id: string;
498
+ store_id: string;
499
+ conversation_id: string;
500
+ role: "system" | "user" | "assistant" | "staff" | "action";
501
+ content: string;
502
+ buttons?: string[];
503
+ metadata: Record<string, unknown>;
504
+ created_at: number;
505
+ }
506
+ interface SupportConversationResponse {
507
+ conversation: SupportConversation;
508
+ messages: SupportMessage[];
509
+ }
510
+ interface StartSupportConversationParams {
511
+ store_id: string;
512
+ agent_key?: string;
513
+ channel_id?: string;
514
+ visitor_id?: string;
515
+ session_id?: string;
516
+ contact_id?: string;
517
+ metadata?: Record<string, unknown>;
518
+ }
519
+ interface SendSupportMessageParams {
520
+ store_id: string;
521
+ conversation_id: string;
522
+ input: {
523
+ type: "button";
524
+ label: string;
525
+ } | {
526
+ type: "text";
527
+ content: string;
528
+ };
529
+ }
530
+ interface ReceiveSupportChannelMessageParams {
531
+ store_id: string;
532
+ channel_id: string;
533
+ channel_context: SupportConversationChannelContext;
534
+ external_message_id?: string;
535
+ content: string;
536
+ metadata?: Record<string, unknown>;
537
+ received_at?: number;
538
+ }
539
+ interface ReplySupportConversationParams {
540
+ store_id: string;
541
+ conversation_id: string;
542
+ content: string;
543
+ resolve?: boolean;
544
+ }
545
+ interface ResolveSupportConversationParams {
546
+ store_id: string;
547
+ conversation_id: string;
548
+ }
549
+ interface AssignSupportConversationParams {
550
+ store_id: string;
551
+ conversation_id: string;
552
+ account_id?: string | null;
553
+ }
554
+ interface GetSupportConversationParams {
555
+ store_id: string;
556
+ conversation_id: string;
557
+ message_limit?: number;
558
+ after_created_at?: number;
559
+ after_id?: string;
560
+ }
561
+ interface FindSupportConversationsParams {
562
+ store_id: string;
563
+ status?: string;
564
+ agent_id?: string;
565
+ channel_id?: string;
566
+ channel_type?: SupportChannelType;
567
+ query?: string;
568
+ limit?: number;
569
+ cursor?: string;
570
+ }
571
+ interface CreateSupportAgentParams {
572
+ store_id: string;
573
+ key: string;
574
+ name: string;
575
+ status?: SupportAgentStatus;
576
+ entry_node_id: string;
577
+ nodes: Record<string, SupportAgentNode>;
578
+ edges: SupportAgentEdge[];
579
+ ai_config?: SupportAgentAiConfig;
580
+ channel_ids?: string[];
581
+ notes?: string | null;
582
+ }
583
+ interface UpdateSupportAgentParams {
584
+ store_id: string;
585
+ id: string;
586
+ name?: string;
587
+ status?: SupportAgentStatus;
588
+ entry_node_id?: string;
589
+ nodes?: Record<string, SupportAgentNode>;
590
+ edges?: SupportAgentEdge[];
591
+ ai_config?: SupportAgentAiConfig;
592
+ channel_ids?: string[];
593
+ notes?: string | null;
594
+ }
595
+ interface CreateSupportChannelParams {
596
+ store_id: string;
597
+ key: string;
598
+ name: string;
599
+ status?: SupportChannelStatus;
600
+ channel_type: SupportChannelType;
601
+ config: SupportChannelConfig;
602
+ }
603
+ interface UpdateSupportChannelParams {
604
+ store_id: string;
605
+ id: string;
606
+ key?: string;
607
+ name?: string;
608
+ status?: SupportChannelStatus;
609
+ channel_type?: SupportChannelType;
610
+ config?: SupportChannelConfig;
611
+ }
612
+ interface FindSupportChannelsParams {
613
+ store_id: string;
614
+ status?: SupportChannelStatus;
615
+ channel_type?: SupportChannelType;
616
+ limit?: number;
617
+ cursor?: string;
618
+ }
619
+
620
+ interface TimelineParams {
621
+ contact_id: string;
622
+ store_id?: string;
623
+ limit?: number;
624
+ cursor?: string;
625
+ }
626
+
627
+ interface WorkflowToolOperation {
628
+ name: string;
629
+ value: string;
630
+ description?: string;
631
+ method: 'get' | 'post' | 'put' | 'patch' | 'delete';
632
+ url: string;
633
+ body?: Record<string, unknown> | string;
634
+ headers?: Record<string, string>;
635
+ }
636
+ interface WorkflowToolResource {
637
+ name: string;
638
+ value: string;
639
+ operations: WorkflowToolOperation[];
640
+ }
641
+ interface WorkflowTool {
642
+ id: string;
643
+ name: string;
644
+ description: string;
645
+ icon: string;
646
+ color: string;
647
+ category: 'ai' | 'communication' | 'email' | 'productivity' | 'payments' | 'crm' | 'ecommerce' | 'developer' | 'storage' | 'analytics' | 'deploy' | 'core';
648
+ configurationRequired: boolean;
649
+ website?: string;
650
+ docsUrl?: string;
651
+ urlPatterns: string[];
652
+ resources: WorkflowToolResource[];
653
+ triggers?: Array<{
654
+ name: string;
655
+ value: string;
656
+ description: string;
657
+ webhookType: 'incoming' | 'polling';
658
+ }>;
659
+ }
660
+
661
+ interface LocationState {
662
+ code: string;
663
+ name: string;
664
+ }
665
+ interface LocationCountry {
666
+ code: string;
667
+ name: string;
668
+ states: LocationState[];
669
+ }
670
+ interface GetCountriesResponse {
671
+ items: LocationCountry[];
672
+ cursor: string | null;
673
+ }
674
+
675
+ interface QueryParams {
676
+ [key: string]: string | number | boolean | string[] | number[] | null | undefined;
677
+ }
678
+
679
+ interface TokenSet {
680
+ access_token: string;
681
+ refresh_token?: string;
682
+ access_expires_at?: number;
683
+ }
684
+ interface AuthStorage {
685
+ getTokens(): TokenSet | null;
686
+ onTokensRefreshed(tokens: TokenSet): void;
687
+ onForcedLogout(): void;
688
+ }
689
+ interface RequestSuccessContext<T = unknown> {
690
+ data: T;
691
+ method: string;
692
+ url: string;
693
+ status: number;
694
+ request?: unknown;
695
+ duration_ms?: number;
696
+ request_id?: string | null;
697
+ }
698
+ interface RequestErrorContext {
699
+ error: unknown;
700
+ method: string;
701
+ url: string;
702
+ status?: number;
703
+ request?: unknown;
704
+ response?: unknown;
705
+ duration_ms?: number;
706
+ request_id?: string | null;
707
+ aborted?: boolean;
708
+ }
709
+ interface RequestOptions<T = unknown> {
710
+ headers?: Record<string, string>;
711
+ params?: QueryParams | Record<string, any>;
712
+ signal?: AbortSignal;
713
+ transformRequest?: (data: unknown) => unknown;
714
+ onSuccess?: (ctx: RequestSuccessContext<T>) => void | Promise<void>;
715
+ onError?: (ctx: RequestErrorContext) => void | Promise<void>;
716
+ }
717
+ interface HttpClient {
718
+ get<T>(path: string, opts?: RequestOptions<T>): Promise<T>;
719
+ post<T>(path: string, body: unknown, opts?: RequestOptions<T>): Promise<T>;
720
+ put<T>(path: string, body: unknown, opts?: RequestOptions<T>): Promise<T>;
721
+ patch<T>(path: string, body: unknown, opts?: RequestOptions<T>): Promise<T>;
722
+ delete<T>(path: string, opts?: RequestOptions<T>): Promise<T>;
723
+ }
724
+ interface HttpClientConfig {
725
+ baseUrl: string;
726
+ storeId: string;
727
+ authStorage: AuthStorage;
728
+ refreshPath?: string | (() => string);
729
+ navigate?: (path: string) => void;
730
+ loginFallbackPath?: string;
731
+ }
732
+
733
+ declare function getBlockLabel(block: any): string;
734
+ declare function formatBlockValue(block: any): string;
735
+ declare function prepareBlocksForSubmission(formData: any, blockTypes?: Record<string, string>): any[];
736
+ declare function extractBlockValues(blocks: any[]): Record<string, any>;
737
+
738
+ interface ValidationResult {
739
+ isValid: boolean;
740
+ error?: string;
741
+ }
742
+ declare function validatePhoneNumber(phone: string): ValidationResult;
743
+
744
+ declare const tzGroups: {
745
+ label: string;
746
+ zones: {
747
+ label: string;
748
+ value: string;
749
+ }[];
750
+ }[];
751
+ declare function findTimeZone(groups: typeof tzGroups): string;
752
+
753
+ declare const locales: readonly ["en", "sr-latn"];
754
+ declare function slugify(text: string): string;
755
+ declare function humanize(text: string): string;
756
+ declare function categorify(text: string): string;
757
+ declare function formatDate(date: string | number | Date, locale: (typeof locales)[number]): string;
758
+
759
+ declare function fetchSvgContent(mediaObject: any): Promise<string | null>;
760
+ declare function getSvgContentForAstro(mediaObject: any): Promise<string>;
761
+ declare function injectSvgIntoElement(mediaObject: any, targetElement: HTMLElement, className?: string): Promise<void>;
762
+
763
+ declare const SDK_VERSION = "0.9.11";
764
+ declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
765
+
766
+ interface ApiConfig {
767
+ httpClient: HttpClient;
768
+ storeId: string;
769
+ baseUrl: string;
770
+ market: string;
771
+ locale: string;
772
+ authStorage: AuthStorage;
773
+ }
774
+ interface AdminSessionInternal {
775
+ access_token: string;
776
+ refresh_token: string;
777
+ access_expires_at?: number;
778
+ email?: string;
779
+ }
780
+ interface ContactSessionInternal {
781
+ access_token: string;
782
+ contact: Contact;
783
+ store: Store;
784
+ market: Market | null;
785
+ }
786
+ interface AdminSession {
787
+ email?: string;
788
+ }
789
+ interface ContactSession {
790
+ contact: Contact;
791
+ store: Store;
792
+ market: Market | null;
793
+ }
794
+ type AdminSessionUpdater = (updater: (prev: AdminSessionInternal | null) => AdminSessionInternal | null) => void;
795
+ type ContactSessionUpdater = (updater: (prev: ContactSessionInternal | null) => ContactSessionInternal | null) => void;
796
+ type AuthStateListener<T> = (session: T | null) => void;
797
+
798
+ type CreateAdminConfig = Omit<HttpClientConfig, "authStorage" | "storeId"> & {
799
+ storeId: string;
800
+ market: string;
801
+ locale?: string;
802
+ apiToken?: string;
803
+ };
804
+ declare function createAdmin(config: CreateAdminConfig): {
805
+ account: {
806
+ update: (params: UpdateAccountContactParams, options?: RequestOptions$1) => Promise<AccountUpdateResponse>;
807
+ delete: (_params: DeleteAccountParams, options?: RequestOptions$1) => Promise<{
808
+ deleted: boolean;
809
+ }>;
810
+ getMe: (_params: GetMeParams, options?: RequestOptions$1) => Promise<Account>;
811
+ search: (params: SearchAccountsParams, options?: RequestOptions$1) => Promise<{
812
+ items: Account[];
813
+ cursor?: string | null;
814
+ }>;
815
+ auth: {
816
+ code(params: {
817
+ email: string;
818
+ }, options?: RequestOptions$1): Promise<{
819
+ sent: boolean;
820
+ }>;
821
+ verify(params: MagicLinkVerifyParams, options?: RequestOptions$1): Promise<AuthToken>;
822
+ refresh(params: {
823
+ refresh_token: string;
824
+ }, options?: RequestOptions$1): Promise<AuthToken>;
825
+ storeCode(storeId: string, params: {
826
+ email: string;
827
+ }, options?: RequestOptions$1): Promise<{
828
+ sent: boolean;
829
+ }>;
830
+ storeVerify(storeId: string, params: MagicLinkVerifyParams, options?: RequestOptions$1): Promise<AuthToken>;
831
+ };
832
+ };
833
+ store: {
834
+ create: (params: CreateStoreParams, options?: RequestOptions$1) => Promise<Store>;
835
+ update: (params: UpdateStoreParams, options?: RequestOptions$1) => Promise<Store>;
836
+ delete: (params: DeleteStoreParams, options?: RequestOptions$1) => Promise<{
837
+ deleted: boolean;
838
+ }>;
839
+ get: (_params: GetStoreParams, options?: RequestOptions$1) => Promise<Store>;
840
+ find: (params?: GetStoresParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Store>>;
841
+ subscription: {
842
+ getPlans: (_params: GetSubscriptionPlansParams, options?: RequestOptions$1) => Promise<PaginatedResponse<SubscriptionPlan>>;
843
+ subscribe: (params: SubscribeParams, options?: RequestOptions$1) => Promise<{
844
+ checkout_url?: string;
845
+ }>;
846
+ createPortalSession: (params: CreatePortalSessionParams, options?: RequestOptions$1) => Promise<{
847
+ portal_url: string;
848
+ }>;
849
+ };
850
+ member: {
851
+ add: (params: AddMemberParams, options?: RequestOptions$1) => Promise<boolean>;
852
+ invite: (params: AddMemberParams, options?: RequestOptions$1) => Promise<boolean>;
853
+ remove: (params: RemoveMemberParams, options?: RequestOptions$1) => Promise<{
854
+ removed: boolean;
855
+ }>;
856
+ };
857
+ buildHook: {
858
+ list: (params: ListBuildHooksParams, options?: RequestOptions$1) => Promise<BuildHook[]>;
859
+ create: (params: CreateBuildHookParams, options?: RequestOptions$1) => Promise<BuildHook>;
860
+ update: (params: UpdateBuildHookParams, options?: RequestOptions$1) => Promise<BuildHook>;
861
+ delete: (params: DeleteBuildHookParams, options?: RequestOptions$1) => Promise<{
862
+ deleted: boolean;
863
+ }>;
864
+ };
865
+ webhook: {
866
+ test: (params: TestWebhookParams, options?: RequestOptions$1) => Promise<{
867
+ tested: boolean;
868
+ }>;
869
+ list: (params: ListWebhooksParams, options?: RequestOptions$1) => Promise<Webhook[]>;
870
+ create: (params: CreateWebhookParams, options?: RequestOptions$1) => Promise<Webhook>;
871
+ update: (params: UpdateWebhookParams, options?: RequestOptions$1) => Promise<Webhook>;
872
+ delete: (params: DeleteWebhookParams, options?: RequestOptions$1) => Promise<{
873
+ deleted: boolean;
874
+ }>;
875
+ };
876
+ config: {
877
+ get: (params: {
878
+ store_id: string;
879
+ type: "payment" | "shipping";
880
+ }, options?: RequestOptions$1) => Promise<StoreRuntimeConfig>;
881
+ };
882
+ media: {
883
+ find: (params: FindStoreMediaParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Media>>;
884
+ };
885
+ location: {
886
+ getCountries(options?: RequestOptions$1): Promise<GetCountriesResponse>;
887
+ getCountry(countryCode: string, options?: RequestOptions$1): Promise<LocationCountry>;
888
+ list(options?: RequestOptions$1): Promise<Location[]>;
889
+ get(id: string, options?: RequestOptions$1): Promise<Location>;
890
+ create(params: CreateLocationParams, options?: RequestOptions$1): Promise<Location>;
891
+ update(params: UpdateLocationParams, options?: RequestOptions$1): Promise<Location>;
892
+ delete(params: DeleteLocationParams, options?: RequestOptions$1): Promise<{
893
+ deleted: boolean;
894
+ }>;
895
+ };
896
+ market: {
897
+ list(options?: RequestOptions$1): Promise<Market[]>;
898
+ get(id: string, options?: RequestOptions$1): Promise<Market>;
899
+ create(params: CreateMarketParams, options?: RequestOptions$1): Promise<Market>;
900
+ update(params: UpdateMarketParams, options?: RequestOptions$1): Promise<Market>;
901
+ delete(params: DeleteMarketParams, options?: RequestOptions$1): Promise<{
902
+ deleted: boolean;
903
+ }>;
904
+ };
905
+ paymentProvider: {
906
+ list: (params?: ListPaymentProvidersParams, options?: RequestOptions$1) => Promise<PaymentProvider[]>;
907
+ refresh: (params?: RefreshPaymentProvidersParams, options?: RequestOptions$1) => Promise<PaymentProvider[]>;
908
+ connectStripe: (params: ConnectStripePaymentProviderParams, options?: RequestOptions$1) => Promise<StripePaymentProviderConnectResponse>;
909
+ delete: (params: DeletePaymentProviderParams, options?: RequestOptions$1) => Promise<{
910
+ deleted: boolean;
911
+ }>;
912
+ };
913
+ };
914
+ media: {
915
+ getMedia(params: GetMediaParams, options?: RequestOptions$1): Promise<Media>;
916
+ uploadStoreMedia(params: UploadStoreMediaParams, options?: RequestOptions$1): Promise<Media[]>;
917
+ deleteStoreMedia(params: DeleteStoreMediaParams, options?: RequestOptions$1): Promise<{
918
+ deleted: boolean;
919
+ }>;
920
+ getStoreMedia(params: GetStoreMediaParams, options?: RequestOptions$1): Promise<PaginatedResponse<Media>>;
921
+ updateMedia(params: UpdateMediaParams, options?: RequestOptions$1): Promise<Media>;
922
+ };
923
+ notification: {
924
+ email: {
925
+ trackOpen: (params: TrackEmailOpenParams, options?: RequestOptions$1) => Promise<void>;
926
+ };
927
+ trigger: {
928
+ send: (params: TriggerNotificationParams, options?: RequestOptions$1) => Promise<{
929
+ success: boolean;
930
+ message: string;
931
+ }>;
932
+ };
933
+ mailbox: {
934
+ create(params: CreateMailboxParams, options?: RequestOptions$1): Promise<Mailbox>;
935
+ update(params: UpdateMailboxParams, options?: RequestOptions$1): Promise<Mailbox>;
936
+ get(params: GetMailboxParams, options?: RequestOptions$1): Promise<Mailbox>;
937
+ test(params: TestMailboxParams, options?: RequestOptions$1): Promise<TestMailboxResult>;
938
+ prepare(params: PrepareMailboxParams, options?: RequestOptions$1): Promise<Mailbox>;
939
+ find(params?: FindMailboxesParams, options?: RequestOptions$1): Promise<PaginatedResponse<Mailbox>>;
940
+ };
941
+ };
942
+ platform: {
943
+ getCurrencies(options?: RequestOptions$1): Promise<string[]>;
944
+ getWorkflowTools(options?: RequestOptions$1): Promise<WorkflowTool[]>;
945
+ getWebhookEvents(options?: RequestOptions$1): Promise<{
946
+ data: string[];
947
+ }>;
948
+ data: {
949
+ scan(params: {
950
+ key: string;
951
+ limit?: number;
952
+ }, options?: RequestOptions$1): Promise<{
953
+ value: Array<{
954
+ key: string;
955
+ value: unknown;
956
+ }>;
957
+ }>;
958
+ put(params: {
959
+ key: string;
960
+ value: unknown;
961
+ previous_key?: string;
962
+ }, options?: RequestOptions$1): Promise<{
963
+ ok: boolean;
964
+ }>;
965
+ delete(params: {
966
+ key: string;
967
+ }, options?: RequestOptions$1): Promise<{
968
+ ok: boolean;
969
+ }>;
970
+ };
971
+ runScript(params: {
972
+ name: string;
973
+ value?: string;
974
+ username?: string;
975
+ password?: string;
976
+ }, options?: RequestOptions$1): Promise<{
977
+ success: boolean;
978
+ message: string;
979
+ }>;
980
+ };
981
+ social: {
982
+ account: {
983
+ getCapabilities: (params?: GetSocialCapabilitiesParams, options?: RequestOptions$1) => Promise<SocialProviderCapability[]>;
984
+ list: (params?: ListSocialAccountsParams, options?: RequestOptions$1) => Promise<SocialAccount[]>;
985
+ connect: (params: ConnectSocialAccountParams, options?: RequestOptions$1) => Promise<SocialConnectResponse>;
986
+ getOAuthAttempt: (params: GetSocialOAuthAttemptParams, options?: RequestOptions$1) => Promise<SocialOAuthCallbackResponse>;
987
+ selectDestination: (params: SelectSocialDestinationParams, options?: RequestOptions$1) => Promise<SocialOAuthCallbackResponse>;
988
+ delete: (params: DeleteSocialAccountParams, options?: RequestOptions$1) => Promise<{
989
+ deleted: boolean;
990
+ }>;
991
+ };
992
+ publication: {
993
+ create: (params: CreateSocialPublicationParams, options?: RequestOptions$1) => Promise<SocialPublicationMutationResponse>;
994
+ update: (params: UpdateSocialPublicationParams, options?: RequestOptions$1) => Promise<SocialPublicationMutationResponse>;
995
+ get: (params: GetSocialPublicationParams, options?: RequestOptions$1) => Promise<SocialPublication>;
996
+ find: (params?: FindSocialPublicationsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<SocialPublication>>;
997
+ validate: (params: ValidateSocialPublicationParams, options?: RequestOptions$1) => Promise<SocialPublicationValidation>;
998
+ schedule: (params: ScheduleSocialPublicationParams, options?: RequestOptions$1) => Promise<SocialPublicationMutationResponse>;
999
+ cancel: (params: CancelSocialPublicationParams, options?: RequestOptions$1) => Promise<SocialPublication>;
1000
+ getComments: (params: GetSocialPublicationCommentsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<SocialPublicationComment>>;
1001
+ syncComments: (params: SyncSocialPublicationCommentsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<SocialPublicationComment>>;
1002
+ getCommentThread: (params: GetSocialPublicationCommentThreadParams, options?: RequestOptions$1) => Promise<PaginatedResponse<SocialPublicationComment>>;
1003
+ syncCommentThread: (params: SyncSocialPublicationCommentThreadParams, options?: RequestOptions$1) => Promise<PaginatedResponse<SocialPublicationComment>>;
1004
+ findComments: (params?: FindSocialPublicationCommentsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<SocialPublicationComment>>;
1005
+ classifyComments: (params?: ClassifySocialPublicationCommentsParams, options?: RequestOptions$1) => Promise<SocialPublicationCommentClassificationResult>;
1006
+ replyToComment: (params: ReplySocialPublicationCommentParams, options?: RequestOptions$1) => Promise<SocialPublicationCommentReplyResponse>;
1007
+ getMetrics: (params: GetSocialPublicationMetricsParams, options?: RequestOptions$1) => Promise<SocialPublicationMetricSnapshot>;
1008
+ syncMetrics: (params: SyncSocialPublicationMetricsParams, options?: RequestOptions$1) => Promise<SocialPublicationMetricSnapshot>;
1009
+ syncEngagement: (params?: SyncSocialEngagementParams, options?: RequestOptions$1) => Promise<SocialPublicationEngagementSyncResult>;
1010
+ };
1011
+ };
1012
+ cms: {
1013
+ collection: {
1014
+ create: (params: CreateCollectionParams, options?: RequestOptions$1) => Promise<Collection>;
1015
+ update: (params: UpdateCollectionParams, options?: RequestOptions$1) => Promise<Collection>;
1016
+ delete: (params: DeleteCollectionParams, options?: RequestOptions$1) => Promise<boolean>;
1017
+ get: (params: GetCollectionParams, options?: RequestOptions$1) => Promise<Collection>;
1018
+ find: (params?: GetCollectionsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Collection>>;
1019
+ };
1020
+ entry: {
1021
+ create: (params: CreateEntryParams, options?: RequestOptions$1) => Promise<CollectionEntry>;
1022
+ update: (params: UpdateEntryParams, options?: RequestOptions$1) => Promise<CollectionEntry>;
1023
+ delete: (params: DeleteEntryParams, options?: RequestOptions$1) => Promise<boolean>;
1024
+ get: (params: GetEntryParams, options?: RequestOptions$1) => Promise<CollectionEntry>;
1025
+ find: (params: GetEntriesParams, options?: RequestOptions$1) => Promise<PaginatedResponse<CollectionEntry>>;
1026
+ };
1027
+ form: {
1028
+ create: (params: CreateFormParams, options?: RequestOptions$1) => Promise<Form>;
1029
+ update: (params: UpdateFormParams, options?: RequestOptions$1) => Promise<Form>;
1030
+ delete: (params: DeleteFormParams, options?: RequestOptions$1) => Promise<{
1031
+ deleted: boolean;
1032
+ }>;
1033
+ get: (params: GetFormParams, options?: RequestOptions$1) => Promise<Form>;
1034
+ find: (params: GetFormsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Form>>;
1035
+ submit: (params: SubmitFormParams, options?: RequestOptions$1) => Promise<FormSubmission>;
1036
+ getSubmissions: (params: GetFormSubmissionsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<FormSubmission>>;
1037
+ getSubmission: (params: GetFormSubmissionParams, options?: RequestOptions$1) => Promise<FormSubmission>;
1038
+ updateSubmission: (params: UpdateFormSubmissionParams, options?: RequestOptions$1) => Promise<FormSubmission>;
1039
+ };
1040
+ taxonomy: {
1041
+ create: (params: CreateTaxonomyParams, options?: RequestOptions$1) => Promise<Taxonomy>;
1042
+ update: (params: UpdateTaxonomyParams, options?: RequestOptions$1) => Promise<Taxonomy>;
1043
+ delete: (params: DeleteTaxonomyParams, options?: RequestOptions$1) => Promise<{
1044
+ deleted: boolean;
1045
+ }>;
1046
+ get: (params: GetTaxonomyParams, options?: RequestOptions$1) => Promise<Taxonomy>;
1047
+ find: (params: GetTaxonomiesParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Taxonomy>>;
1048
+ getChildren: (params: GetTaxonomyChildrenParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Taxonomy>>;
1049
+ };
1050
+ emailTemplate: {
1051
+ create: (params: CreateEmailTemplateParams, options?: RequestOptions$1) => Promise<EmailTemplate>;
1052
+ update: (params: UpdateEmailTemplateParams, options?: RequestOptions$1) => Promise<EmailTemplate>;
1053
+ delete: (params: DeleteEmailTemplateParams, options?: RequestOptions$1) => Promise<{
1054
+ deleted: boolean;
1055
+ }>;
1056
+ get: (params: GetEmailTemplateParams, options?: RequestOptions$1) => Promise<EmailTemplate>;
1057
+ find: (params: GetEmailTemplatesParams, options?: RequestOptions$1) => Promise<PaginatedResponse<EmailTemplate>>;
1058
+ preview: (params: PreviewEmailTemplateParams, options?: RequestOptions$1) => Promise<PreviewEmailTemplateResponse>;
1059
+ };
1060
+ };
1061
+ eshop: {
1062
+ product: {
1063
+ create: (params: CreateProductParams, options?: RequestOptions$1) => Promise<Product>;
1064
+ update: (params: UpdateProductParams, options?: RequestOptions$1) => Promise<Product>;
1065
+ delete: (params: DeleteProductParams, options?: RequestOptions$1) => Promise<{
1066
+ deleted: boolean;
1067
+ }>;
1068
+ get: (params: GetProductParams, options?: RequestOptions$1) => Promise<Product>;
1069
+ find: (params: GetProductsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Product>>;
1070
+ };
1071
+ order: {
1072
+ update: (params: UpdateOrderParams, options?: RequestOptions$1) => Promise<Order>;
1073
+ get: (params: GetOrderParams, options?: RequestOptions$1) => Promise<Order>;
1074
+ find: (params: GetOrdersParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Order>>;
1075
+ getQuote: (params: GetQuoteParams, options?: RequestOptions$1) => Promise<OrderQuote>;
1076
+ processRefund: (params: ProcessOrderRefundParams, options?: RequestOptions$1) => Promise<ProcessOrderRefundResponse>;
1077
+ downloadDigitalAccess: (params: DownloadDigitalAccessParams, options?: RequestOptions$1) => Promise<DigitalAccessDownloadResponse>;
1078
+ getShippingRates: (params: GetShippingRatesParams, options?: RequestOptions$1) => Promise<{
1079
+ rates: ShippingRate[];
1080
+ }>;
1081
+ ship: (params: ShipParams, options?: RequestOptions$1) => Promise<ShipResult>;
1082
+ refundShippingLabel: (params: RefundShippingLabelParams, options?: RequestOptions$1) => Promise<{
1083
+ refund: ShippingLabelRefund;
1084
+ }>;
1085
+ };
1086
+ cart: {
1087
+ create: (params: CreateCartParams, options?: RequestOptions$1) => Promise<Cart>;
1088
+ update: (params: UpdateCartParams, options?: RequestOptions$1) => Promise<Cart>;
1089
+ get: (params: GetCartParams, options?: RequestOptions$1) => Promise<Cart>;
1090
+ find: (params?: FindCartsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Cart>>;
1091
+ addItem: (params: AddCartItemParams, options?: RequestOptions$1) => Promise<Cart>;
1092
+ removeItem: (params: RemoveCartItemParams, options?: RequestOptions$1) => Promise<Cart>;
1093
+ clear: (params: ClearCartParams, options?: RequestOptions$1) => Promise<Cart>;
1094
+ quote: (params: QuoteCartParams, options?: RequestOptions$1) => Promise<OrderQuote>;
1095
+ checkout: (params: CheckoutCartParams, options?: RequestOptions$1) => Promise<OrderCheckoutResult>;
1096
+ };
1097
+ service: {
1098
+ create: (params: CreateServiceParams, options?: RequestOptions$1) => Promise<Service>;
1099
+ update: (params: UpdateServiceParams, options?: RequestOptions$1) => Promise<Service>;
1100
+ delete: (params: DeleteServiceParams, options?: RequestOptions$1) => Promise<void>;
1101
+ get: (params: GetServiceParams, options?: RequestOptions$1) => Promise<Service>;
1102
+ find: (params: GetServicesParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Service>>;
1103
+ getAvailability: (params: GetAvailabilityParams, options?: RequestOptions$1) => Promise<AvailabilityResponse>;
1104
+ findProviders: (params: FindServiceProvidersParams, options?: RequestOptions$1) => Promise<ServiceProvider[]>;
1105
+ createProvider: (params: CreateServiceProviderParams, options?: RequestOptions$1) => Promise<ServiceProvider>;
1106
+ updateProvider: (params: UpdateServiceProviderParams, options?: RequestOptions$1) => Promise<ServiceProvider>;
1107
+ deleteProvider: (params: DeleteServiceProviderParams, options?: RequestOptions$1) => Promise<void>;
1108
+ };
1109
+ provider: {
1110
+ create: (params: CreateProviderParams, options?: RequestOptions$1) => Promise<Provider>;
1111
+ update: (params: UpdateProviderParams, options?: RequestOptions$1) => Promise<Provider>;
1112
+ delete: (params: DeleteProviderParams, options?: RequestOptions$1) => Promise<void>;
1113
+ get: (params: GetProviderParams, options?: RequestOptions$1) => Promise<Provider>;
1114
+ find: (params: GetProvidersParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Provider>>;
1115
+ };
1116
+ promoCode: {
1117
+ createPromoCode(params: CreatePromoCodeParams, options?: RequestOptions$1): Promise<PromoCode>;
1118
+ updatePromoCode(params: UpdatePromoCodeParams, options?: RequestOptions$1): Promise<PromoCode>;
1119
+ deletePromoCode(params: DeletePromoCodeParams, options?: RequestOptions$1): Promise<{
1120
+ deleted: boolean;
1121
+ }>;
1122
+ getPromoCode(params: GetPromoCodeParams, options?: RequestOptions$1): Promise<PromoCode>;
1123
+ getPromoCodes(params: GetPromoCodesParams, options?: RequestOptions$1): Promise<PaginatedResponse<PromoCode>>;
1124
+ };
1125
+ };
1126
+ crm: {
1127
+ contact: {
1128
+ create: (params: CreateContactParams, options?: RequestOptions$1) => Promise<Contact$1>;
1129
+ get: (params: GetContactParams, options?: RequestOptions$1) => Promise<ContactDetail>;
1130
+ find: (params?: FindContactsParams, options?: RequestOptions$1) => Promise<{
1131
+ items: Contact$1[];
1132
+ cursor?: string;
1133
+ }>;
1134
+ update: (params: UpdateContactParams, options?: RequestOptions$1) => Promise<Contact$1>;
1135
+ merge: (params: MergeContactsParams, options?: RequestOptions$1) => Promise<Contact$1>;
1136
+ import: (params: ImportContactsParams, options?: RequestOptions$1) => Promise<ImportContactsResult>;
1137
+ revokeToken: (params: {
1138
+ id: string;
1139
+ token_id: string;
1140
+ store_id?: string;
1141
+ }, options?: RequestOptions$1) => Promise<{
1142
+ deleted: boolean;
1143
+ }>;
1144
+ revokeAllTokens: (params: {
1145
+ id: string;
1146
+ store_id?: string;
1147
+ }, options?: RequestOptions$1) => Promise<{
1148
+ deleted: boolean;
1149
+ }>;
1150
+ };
1151
+ contactList: {
1152
+ create: (params: CreateContactListParams, options?: RequestOptions$1) => Promise<ContactList>;
1153
+ update: (params: UpdateContactListParams, options?: RequestOptions$1) => Promise<ContactList>;
1154
+ get: (params: GetContactListParams, options?: RequestOptions$1) => Promise<ContactList>;
1155
+ find: (params?: FindContactListsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<ContactList>>;
1156
+ importContacts: (params: ImportContactsIntoContactListParams, options?: RequestOptions$1) => Promise<ImportContactsIntoContactListResult>;
1157
+ previewImportContacts: (params: ImportContactListPreviewParams, options?: RequestOptions$1) => Promise<ImportContactsPreviewResult>;
1158
+ addMember: (params: AddContactListContactParams, options?: RequestOptions$1) => Promise<ContactListMember>;
1159
+ updateMember: (params: UpdateContactListContactParams, options?: RequestOptions$1) => Promise<ContactListMember>;
1160
+ removeMember: (params: RemoveContactListContactParams, options?: RequestOptions$1) => Promise<{
1161
+ deleted: boolean;
1162
+ }>;
1163
+ findMembers: (params: FindContactListContactsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<ContactListMember>>;
1164
+ };
1165
+ action: {
1166
+ timeline(params: TimelineParams, options?: RequestOptions$1): Promise<{
1167
+ items: Action[];
1168
+ cursor: string | null;
1169
+ }>;
1170
+ find(params: FindActionsParams, options?: RequestOptions$1): Promise<{
1171
+ items: Action[];
1172
+ cursor: string | null;
1173
+ }>;
1174
+ };
1175
+ };
1176
+ outreach: {
1177
+ campaign: {
1178
+ create(params: CreateCampaignParams, options?: RequestOptions$1): Promise<Campaign>;
1179
+ update(params: UpdateCampaignParams, options?: RequestOptions$1): Promise<Campaign>;
1180
+ get(params: GetCampaignParams, options?: RequestOptions$1): Promise<Campaign>;
1181
+ find(params?: FindCampaignsParams, options?: RequestOptions$1): Promise<PaginatedResponse<Campaign>>;
1182
+ launch(params: LaunchCampaignParams, options?: RequestOptions$1): Promise<Campaign>;
1183
+ duplicate(params: DuplicateCampaignParams, options?: RequestOptions$1): Promise<Campaign>;
1184
+ launchReadiness(params: GetCampaignLaunchReadinessParams, options?: RequestOptions$1): Promise<CampaignLaunchReadiness>;
1185
+ importEnrollments(params: ImportCampaignEnrollmentsParams, options?: RequestOptions$1): Promise<CampaignEnrollmentImportResult>;
1186
+ generatePersonalizedDrafts(params: GenerateOutreachPersonalizedDraftsParams, options?: RequestOptions$1): Promise<Campaign>;
1187
+ };
1188
+ campaignEnrollment: {
1189
+ find(params?: FindCampaignEnrollmentsParams, options?: RequestOptions$1): Promise<PaginatedResponse<CampaignEnrollment>>;
1190
+ get(params: GetCampaignEnrollmentConversationParams, options?: RequestOptions$1): Promise<CampaignEnrollmentConversationResponse>;
1191
+ update(params: UpdateCampaignEnrollmentParams, options?: RequestOptions$1): Promise<CampaignEnrollment>;
1192
+ updateDraft(params: UpdateCampaignEnrollmentDraftParams, options?: RequestOptions$1): Promise<CampaignEnrollment>;
1193
+ updateStepExecution(params: UpdateCampaignEnrollmentStepExecutionParams, options?: RequestOptions$1): Promise<CampaignEnrollmentConversationResponse>;
1194
+ reply(params: ReplyCampaignEnrollmentParams, options?: RequestOptions$1): Promise<CampaignEnrollmentConversationResponse>;
1195
+ stop(params: StopCampaignEnrollmentParams, options?: RequestOptions$1): Promise<CampaignEnrollmentConversationResponse>;
1196
+ };
1197
+ campaignMessage: {
1198
+ find(params?: FindCampaignMessagesParams, options?: RequestOptions$1): Promise<PaginatedResponse<CampaignMessage>>;
1199
+ update(params: UpdateCampaignMessageParams, options?: RequestOptions$1): Promise<CampaignMessage>;
1200
+ };
1201
+ suppression: {
1202
+ create(params: CreateSuppressionParams, options?: RequestOptions$1): Promise<Suppression>;
1203
+ update(params: UpdateSuppressionParams, options?: RequestOptions$1): Promise<Suppression>;
1204
+ get(params: GetSuppressionParams, options?: RequestOptions$1): Promise<Suppression>;
1205
+ find(params?: FindSuppressionsParams, options?: RequestOptions$1): Promise<PaginatedResponse<Suppression>>;
1206
+ };
1207
+ leadResearch: {
1208
+ createRun(params: CreateLeadResearchRunParams, options?: RequestOptions$1): Promise<LeadResearchRun>;
1209
+ findRuns(params?: FindLeadResearchRunsParams, options?: RequestOptions$1): Promise<PaginatedResponse<LeadResearchRun>>;
1210
+ getRun(params: GetLeadResearchRunParams, options?: RequestOptions$1): Promise<LeadResearchRun>;
1211
+ updateRun(params: UpdateLeadResearchRunParams, options?: RequestOptions$1): Promise<LeadResearchRun>;
1212
+ cancelRun(params: CancelLeadResearchRunParams, options?: RequestOptions$1): Promise<LeadResearchRun>;
1213
+ sendMessage(params: SendLeadResearchMessageParams, options?: RequestOptions$1): Promise<SendLeadResearchMessageResult>;
1214
+ findMessages(params: FindLeadResearchMessagesParams, options?: RequestOptions$1): Promise<LeadResearchMessage[]>;
1215
+ validateEmail(params: ValidateLeadEmailParams, options?: RequestOptions$1): Promise<LeadEmailValidationResult>;
1216
+ };
1217
+ };
1218
+ automation: {
1219
+ workflow: {
1220
+ create: (params: CreateWorkflowParams, options?: RequestOptions$1) => Promise<Workflow>;
1221
+ update: (params: UpdateWorkflowParams, options?: RequestOptions$1) => Promise<Workflow>;
1222
+ delete: (params: DeleteWorkflowParams, options?: RequestOptions$1) => Promise<{
1223
+ deleted: boolean;
1224
+ }>;
1225
+ get: (params: GetWorkflowParams, options?: RequestOptions$1) => Promise<Workflow>;
1226
+ find: (params?: GetWorkflowsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Workflow>>;
1227
+ trigger: (params: TriggerWorkflowParams, options?: RequestOptions$1) => Promise<WorkflowExecution>;
1228
+ getExecutions: (params: GetWorkflowExecutionsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<WorkflowExecution>>;
1229
+ getExecution: (params: GetWorkflowExecutionParams, options?: RequestOptions$1) => Promise<WorkflowExecution>;
1230
+ listAccounts: (params?: GetWorkflowAccountsParams, options?: RequestOptions$1) => Promise<WorkflowAccount[]>;
1231
+ getAccountConnectUrl: (params: GetWorkflowAccountConnectUrlParams, options?: RequestOptions$1) => Promise<WorkflowAccountConnectUrl>;
1232
+ connectAccount: (params: ConnectWorkflowAccountParams, options?: RequestOptions$1) => Promise<WorkflowAccount>;
1233
+ deleteAccount: (params: DeleteWorkflowAccountParams, options?: RequestOptions$1) => Promise<boolean>;
1234
+ };
1235
+ support: {
1236
+ createChannel: (params: CreateSupportChannelParams, opts?: RequestOptions$1) => Promise<SupportChannel>;
1237
+ getChannel: (params: {
1238
+ store_id: string;
1239
+ id: string;
1240
+ }, opts?: RequestOptions$1) => Promise<SupportChannel>;
1241
+ findChannels: (params: FindSupportChannelsParams, opts?: RequestOptions$1) => Promise<{
1242
+ items: SupportChannel[];
1243
+ cursor?: string;
1244
+ }>;
1245
+ updateChannel: (params: UpdateSupportChannelParams, opts?: RequestOptions$1) => Promise<SupportChannel>;
1246
+ deleteChannel: (params: {
1247
+ store_id: string;
1248
+ id: string;
1249
+ }, opts?: RequestOptions$1) => Promise<void>;
1250
+ receiveChannelMessage: (params: ReceiveSupportChannelMessageParams, opts?: RequestOptions$1) => Promise<SupportConversationResponse>;
1251
+ createAgent: (params: CreateSupportAgentParams, opts?: RequestOptions$1) => Promise<SupportAgent>;
1252
+ getAgent: (params: {
1253
+ store_id: string;
1254
+ id: string;
1255
+ }, opts?: RequestOptions$1) => Promise<SupportAgent>;
1256
+ findAgents: (params: {
1257
+ store_id: string;
1258
+ status?: string;
1259
+ limit?: number;
1260
+ cursor?: string;
1261
+ }, opts?: RequestOptions$1) => Promise<{
1262
+ items: SupportAgent[];
1263
+ cursor?: string;
1264
+ }>;
1265
+ updateAgent: (params: UpdateSupportAgentParams, opts?: RequestOptions$1) => Promise<SupportAgent>;
1266
+ deleteAgent: (params: {
1267
+ store_id: string;
1268
+ id: string;
1269
+ }, opts?: RequestOptions$1) => Promise<void>;
1270
+ findConversations: (params: FindSupportConversationsParams, opts?: RequestOptions$1) => Promise<{
1271
+ items: SupportConversation[];
1272
+ cursor?: string;
1273
+ }>;
1274
+ getConversation: (params: GetSupportConversationParams, opts?: RequestOptions$1) => Promise<SupportConversationResponse>;
1275
+ sendConversationMessage: (params: SendSupportMessageParams, opts?: RequestOptions$1) => Promise<SupportConversationResponse>;
1276
+ replyToConversation: (params: ReplySupportConversationParams, opts?: RequestOptions$1) => Promise<SupportConversationResponse>;
1277
+ resolveConversation: (params: ResolveSupportConversationParams, opts?: RequestOptions$1) => Promise<SupportConversation>;
1278
+ assignConversation: (params: AssignSupportConversationParams, opts?: RequestOptions$1) => Promise<SupportConversation>;
1279
+ };
1280
+ };
1281
+ analytics: {
1282
+ get(request: AnalyticsRequest, options?: RequestOptions$1 & {
1283
+ store_id?: string;
1284
+ }): Promise<AnalyticsResponse>;
1285
+ };
1286
+ experiments: {
1287
+ create(params: CreateExperimentParams, options?: RequestOptions$1): Promise<Experiment>;
1288
+ update(params: UpdateExperimentParams, options?: RequestOptions$1): Promise<Experiment>;
1289
+ get(params: GetExperimentParams, options?: RequestOptions$1): Promise<Experiment>;
1290
+ find(params?: FindExperimentsParams, options?: RequestOptions$1): Promise<PaginatedResponse<Experiment>>;
1291
+ results(params: GetExperimentParams, options?: RequestOptions$1): Promise<ExperimentResults>;
1292
+ };
1293
+ setStoreId: (storeId: string) => void;
1294
+ getStoreId: () => string;
1295
+ setMarket: (market: string) => void;
1296
+ getMarket: () => string;
1297
+ setLocale: (locale: string) => void;
1298
+ getLocale: () => string;
1299
+ readonly session: AdminSession | null;
1300
+ readonly isAuthenticated: boolean;
1301
+ onAuthStateChanged(listener: AuthStateListener<AdminSession>): () => void;
1302
+ logout(): Promise<void>;
1303
+ utils: {
1304
+ getImageUrl: (imageBlock: any, isBlock?: boolean) => any;
1305
+ getBlockValue: (entry: any, blockKey: string) => any;
1306
+ getBlockTextValue: (block: any, locale?: string) => string;
1307
+ getBlockValues: (entry: any, blockKey: string) => any;
1308
+ getBlockLabel: typeof getBlockLabel;
1309
+ getBlockObjectValues: (entry: any, blockKey: string, locale?: string) => any;
1310
+ getBlockFromArray: (entry: any, blockKey: string, locale?: string) => any;
1311
+ formatBlockValue: typeof formatBlockValue;
1312
+ prepareBlocksForSubmission: typeof prepareBlocksForSubmission;
1313
+ extractBlockValues: typeof extractBlockValues;
1314
+ formatPrice: (prices: any[]) => string;
1315
+ getPriceAmount: (prices: any[]) => number;
1316
+ formatPayment: typeof formatPayment;
1317
+ formatMinor: typeof formatMinor;
1318
+ getCurrencySymbol: typeof getCurrencySymbol;
1319
+ getCurrencyName: typeof getCurrencyName;
1320
+ validatePhoneNumber: typeof validatePhoneNumber;
1321
+ tzGroups: {
1322
+ label: string;
1323
+ zones: {
1324
+ label: string;
1325
+ value: string;
1326
+ }[];
1327
+ }[];
1328
+ findTimeZone: typeof findTimeZone;
1329
+ slugify: typeof slugify;
1330
+ humanize: typeof humanize;
1331
+ categorify: typeof categorify;
1332
+ formatDate: typeof formatDate;
1333
+ getSvgContentForAstro: typeof getSvgContentForAstro;
1334
+ fetchSvgContent: typeof fetchSvgContent;
1335
+ injectSvgIntoElement: typeof injectSvgIntoElement;
1336
+ isValidKey: typeof isValidKey;
1337
+ validateKey: typeof validateKey;
1338
+ toKey: typeof toKey;
1339
+ nameToKey: typeof nameToKey;
1340
+ getAvailableStock: typeof getAvailableStock;
1341
+ getReservedStock: typeof getReservedStock;
1342
+ hasStock: typeof hasStock;
1343
+ getInventoryAt: typeof getInventoryAt;
1344
+ getFirstAvailableFCId: typeof getFirstAvailableFCId;
1345
+ };
1346
+ };
1347
+ type CreateStorefrontConfig = Omit<HttpClientConfig, "authStorage" | "storeId"> & {
1348
+ storeId: string;
1349
+ market?: string;
1350
+ locale?: string;
1351
+ apiToken?: string;
1352
+ };
1353
+ declare function createStorefront(config: CreateStorefrontConfig): {
1354
+ identify: (params?: {
1355
+ email?: string;
1356
+ verify?: boolean;
1357
+ market?: string;
1358
+ }) => Promise<ContactSession>;
1359
+ verify: (params: {
1360
+ code: string;
1361
+ }) => Promise<ContactToken>;
1362
+ logout: () => Promise<void>;
1363
+ me: () => Promise<ContactDetail>;
1364
+ readonly session: ContactSession | null;
1365
+ readonly isAuthenticated: boolean;
1366
+ onAuthStateChanged(listener: AuthStateListener<ContactSession>): () => void;
1367
+ store: {
1368
+ getStore(options?: RequestOptions$1): Promise<Store>;
1369
+ location: {
1370
+ getCountries(options?: RequestOptions$1): Promise<{
1371
+ items: {
1372
+ code: string;
1373
+ name: string;
1374
+ states: {
1375
+ code: string;
1376
+ name: string;
1377
+ }[];
1378
+ }[];
1379
+ cursor: string | null;
1380
+ }>;
1381
+ getCountry(countryCode: string, options?: RequestOptions$1): Promise<{
1382
+ code: string;
1383
+ name: string;
1384
+ states: {
1385
+ code: string;
1386
+ name: string;
1387
+ }[];
1388
+ }>;
1389
+ list(options?: RequestOptions$1): Promise<Location[]>;
1390
+ get(id: string, options?: RequestOptions$1): Promise<Location>;
1391
+ };
1392
+ market: {
1393
+ list(options?: RequestOptions$1): Promise<Market[]>;
1394
+ get(id: string, options?: RequestOptions$1): Promise<Market>;
1395
+ };
1396
+ };
1397
+ cart: CartController;
1398
+ cms: {
1399
+ collection: {
1400
+ get(params: GetCollectionParams, options?: RequestOptions$1): Promise<Collection>;
1401
+ };
1402
+ entry: {
1403
+ get(params: GetEntryParams, options?: RequestOptions$1): Promise<CollectionEntry>;
1404
+ find(params: GetEntriesParams, options?: RequestOptions$1): Promise<PaginatedResponse<CollectionEntry>>;
1405
+ };
1406
+ form: {
1407
+ get(params: GetFormParams, options?: RequestOptions$1): Promise<Form>;
1408
+ submit(params: SubmitFormParams, options?: RequestOptions$1): Promise<FormSubmission>;
1409
+ };
1410
+ taxonomy: {
1411
+ get(params: GetTaxonomyParams, options?: RequestOptions$1): Promise<Taxonomy>;
1412
+ getChildren(params: GetTaxonomyChildrenParams, options?: RequestOptions$1): Promise<PaginatedResponse<Taxonomy>>;
1413
+ };
1414
+ };
1415
+ eshop: {
1416
+ product: {
1417
+ get(params: GetProductParams, options?: RequestOptions$1): Promise<Product>;
1418
+ find(params: GetProductsParams, options?: RequestOptions$1): Promise<PaginatedResponse<Product>>;
1419
+ };
1420
+ cart: {
1421
+ current(params?: GetCurrentCartParams, options?: RequestOptions$1): Promise<Cart>;
1422
+ get(params: GetCartParams, options?: RequestOptions$1): Promise<Cart>;
1423
+ update(params: UpdateCartParams, options?: RequestOptions$1): Promise<Cart>;
1424
+ addItem(params: AddCartItemParams, options?: RequestOptions$1): Promise<Cart>;
1425
+ removeItem(params: RemoveCartItemParams, options?: RequestOptions$1): Promise<Cart>;
1426
+ clear(params: ClearCartParams, options?: RequestOptions$1): Promise<Cart>;
1427
+ quote(params: QuoteCartParams, options?: RequestOptions$1): Promise<OrderQuote>;
1428
+ checkout(params: CheckoutCartParams, options?: RequestOptions$1): Promise<OrderCheckoutResult>;
1429
+ };
1430
+ order: {
1431
+ get(params: GetOrderParams, options?: RequestOptions$1): Promise<Order>;
1432
+ find(params: GetOrdersParams, options?: RequestOptions$1): Promise<PaginatedResponse<Order>>;
1433
+ downloadDigitalAccess(params: DownloadDigitalAccessParams, options?: RequestOptions$1): Promise<DigitalAccessDownloadResponse>;
1434
+ };
1435
+ service: {
1436
+ get(params: GetServiceParams, options?: RequestOptions$1): Promise<Service>;
1437
+ find(params: GetServicesParams, options?: RequestOptions$1): Promise<PaginatedResponse<Service>>;
1438
+ findProviders(params: FindServiceProvidersParams, options?: RequestOptions$1): Promise<Provider[]>;
1439
+ getAvailability(params: GetAvailabilityParams, options?: RequestOptions$1): Promise<AvailabilityResponse>;
1440
+ };
1441
+ provider: {
1442
+ get(params: GetProviderParams, options?: RequestOptions$1): Promise<Provider>;
1443
+ find(params: GetProvidersParams, options?: RequestOptions$1): Promise<PaginatedResponse<Provider>>;
1444
+ };
1445
+ };
1446
+ crm: {
1447
+ contact: {
1448
+ identify(params?: {
1449
+ email?: string;
1450
+ verify?: boolean;
1451
+ market?: string;
1452
+ }, options?: RequestOptions$1): Promise<IdentifyResponse>;
1453
+ verify(params: {
1454
+ code: string;
1455
+ }, options?: RequestOptions$1): Promise<VerifyResponse>;
1456
+ logout(options?: RequestOptions$1): Promise<void>;
1457
+ getMe(options?: RequestOptions$1): Promise<ContactDetail>;
1458
+ };
1459
+ contactList: {
1460
+ get(params: GetContactListParams, options?: RequestOptions$1): Promise<ContactList>;
1461
+ find(params?: FindContactListsParams, options?: RequestOptions$1): Promise<PaginatedResponse<ContactList>>;
1462
+ subscribe(params: SubscribeContactListParams, options?: RequestOptions$1): Promise<ContactListSubscribeResponse>;
1463
+ checkAccess(params: ContactListAccessParams, options?: RequestOptions$1): Promise<ContactListAccessResponse>;
1464
+ checkContentAccess(params: ContactListContentAccessParams, options?: RequestOptions$1): Promise<ContactListContentAccessResponse>;
1465
+ unsubscribe(token: string, options?: RequestOptions$1): Promise<{
1466
+ success: boolean;
1467
+ }>;
1468
+ confirm(token: string, options?: RequestOptions$1): Promise<{
1469
+ success: boolean;
1470
+ }>;
1471
+ };
1472
+ };
1473
+ action: {
1474
+ COMMON_ACTION_KEYS: readonly ["page.view", "product.view", "service.view", "provider.view", "cart.added", "cart.removed", "checkout.started", "order.created", "signin", "signup", "verified.email", "search", "share", "wishlist.added"];
1475
+ track(params: TrackActionParams): Promise<void>;
1476
+ };
1477
+ experiments: {
1478
+ use(params: UseExperimentParams, options?: RequestOptions$1): Promise<ExperimentUseResponse>;
1479
+ };
1480
+ support: {
1481
+ startConversation(params?: Omit<StartSupportConversationParams, "store_id">, opts?: RequestOptions$1): Promise<SupportConversationResponse>;
1482
+ sendMessage(params: Omit<SendSupportMessageParams, "store_id">, opts?: RequestOptions$1): Promise<SupportConversationResponse>;
1483
+ getConversation(params: Omit<GetSupportConversationParams, "store_id">, opts?: RequestOptions$1): Promise<SupportConversationResponse>;
1484
+ };
1485
+ setStoreId: (storeId: string) => void;
1486
+ getStoreId: () => string;
1487
+ setMarket: (key: string) => void;
1488
+ getMarket: () => string;
1489
+ setLocale: (l: string) => void;
1490
+ getLocale: () => string;
1491
+ utils: {
1492
+ getImageUrl: (imageBlock: any, isBlock?: boolean) => any;
1493
+ getBlockValue: (entry: any, blockKey: string) => any;
1494
+ getBlockTextValue: (block: any, locale?: string) => string;
1495
+ getBlockValues: (entry: any, blockKey: string) => any;
1496
+ getBlockLabel: typeof getBlockLabel;
1497
+ getBlockObjectValues: (entry: any, blockKey: string, locale?: string) => any;
1498
+ getBlockFromArray: (entry: any, blockKey: string, locale?: string) => any;
1499
+ formatBlockValue: typeof formatBlockValue;
1500
+ prepareBlocksForSubmission: typeof prepareBlocksForSubmission;
1501
+ extractBlockValues: typeof extractBlockValues;
1502
+ formatPrice: (prices: any[]) => string;
1503
+ getPriceAmount: (prices: any[]) => number;
1504
+ formatPayment: typeof formatPayment;
1505
+ formatMinor: typeof formatMinor;
1506
+ getCurrencySymbol: typeof getCurrencySymbol;
1507
+ getCurrencyName: typeof getCurrencyName;
1508
+ validatePhoneNumber: typeof validatePhoneNumber;
1509
+ tzGroups: {
1510
+ label: string;
1511
+ zones: {
1512
+ label: string;
1513
+ value: string;
1514
+ }[];
1515
+ }[];
1516
+ findTimeZone: typeof findTimeZone;
1517
+ slugify: typeof slugify;
1518
+ humanize: typeof humanize;
1519
+ categorify: typeof categorify;
1520
+ formatDate: typeof formatDate;
1521
+ getSvgContentForAstro: typeof getSvgContentForAstro;
1522
+ fetchSvgContent: typeof fetchSvgContent;
1523
+ injectSvgIntoElement: typeof injectSvgIntoElement;
1524
+ isValidKey: typeof isValidKey;
1525
+ validateKey: typeof validateKey;
1526
+ toKey: typeof toKey;
1527
+ nameToKey: typeof nameToKey;
1528
+ getAvailableStock: typeof getAvailableStock;
1529
+ getReservedStock: typeof getReservedStock;
1530
+ hasStock: typeof hasStock;
1531
+ getInventoryAt: typeof getInventoryAt;
1532
+ getFirstAvailableFCId: typeof getFirstAvailableFCId;
1533
+ };
1534
+ };
1535
+
1536
+ export { type AnalyticsActionReportKey as $, type AuthStateListener as A, type CartControllerListener as B, type CreateStorefrontConfig as C, type CartControllerQuoteParams as D, type ExperimentUseResponse as E, type CartControllerRefreshParams as F, type GetSupportConversationParams as G, type CartControllerRemoveItemParams as H, type IdentifyResponse as I, type CartControllerState as J, type CartControllerUpdateParams as K, type CommonActionKey as L, type HttpClientConfig as M, createCartController as N, createStorefront as O, type ActionFeedCategory as P, type ActionFeedCursor as Q, type ActionFeedData as R, type StartSupportConversationParams as S, type TrackActionParams as T, type UseExperimentParams as U, type VerifyResponse as V, type ActionFeedItem as W, type ActionFeedSummary as X, type AdminSession as Y, type AdminSessionInternal as Z, type AdminSessionUpdater as _, type ContactSession as a, type UpdateSupportChannelParams as a$, type AnalyticsBlockRequest as a0, type AnalyticsBlockResponse as a1, type AnalyticsBreakdownData as a2, type AnalyticsBreakdownItem as a3, type AnalyticsBreakdownReportKey as a4, type AnalyticsCompositeReportKey as a5, type AnalyticsMetricData as a6, type AnalyticsMetricReportKey as a7, type AnalyticsReport as a8, type AnalyticsReportKey as a9, type GetExperimentParams as aA, type LocationCountry as aB, type LocationState as aC, type OutreachFunnelData as aD, type OutreachFunnelStage as aE, type OutreachOverviewData as aF, type ReceiveSupportChannelMessageParams as aG, type ReplySupportConversationParams as aH, type ResolveSupportConversationParams as aI, type RevenueByCurrencyData as aJ, SDK_VERSION as aK, SUPPORTED_FRAMEWORKS as aL, type SupportAction as aM, type SupportAgent as aN, type SupportAgentAiConfig as aO, type SupportAgentEdge as aP, type SupportAgentNode as aQ, type SupportAgentStatus as aR, type SupportChannel as aS, type SupportChannelConfig as aT, type SupportChannelStatus as aU, type SupportChannelType as aV, type SupportConversation as aW, type SupportConversationChannelContext as aX, type SupportMessage as aY, type TimelineParams as aZ, type UpdateExperimentParams as a_, type AnalyticsReportRequest as aa, type AnalyticsRequest as ab, type AnalyticsResponse as ac, type AnalyticsTimeRange as ad, type ApiConfig as ae, type AssignSupportConversationParams as af, type BusinessOverviewData as ag, type ContactFunnelData as ah, type ContactFunnelStage as ai, type ContactSessionInternal as aj, type ContactSessionUpdater as ak, type CreateAdminConfig as al, type CreateExperimentParams as am, type CreateSupportChannelParams as an, type DataHealthData as ao, type EdgeTrigger as ap, type EntityStatusOverviewData as aq, type Experiment as ar, type ExperimentResults as as, type ExperimentStatus as at, type ExperimentVariant as au, type ExperimentVariantResult as av, type FindExperimentsParams as aw, type FindSupportChannelsParams as ax, type FindSupportConversationsParams as ay, type GetCountriesResponse as az, type ContactToken as b, type WorkflowTool as b0, type WorkflowToolOperation as b1, type WorkflowToolResource as b2, createAdmin as b3, type CartController as c, type SupportConversationResponse as d, type SendSupportMessageParams as e, formatBlockValue as f, getBlockLabel as g, extractBlockValues as h, findTimeZone as i, humanize as j, categorify as k, formatDate as l, getSvgContentForAstro as m, fetchSvgContent as n, injectSvgIntoElement as o, prepareBlocksForSubmission as p, type StorefrontAction as q, type AuthStorage as r, slugify as s, COMMON_ACTION_KEYS as t, type CartApi as u, validatePhoneNumber as v, type CartControllerAddItemParams as w, type CartControllerCheckoutParams as x, type CartControllerClearParams as y, type CartControllerInitParams as z };