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
@@ -1,1389 +0,0 @@
1
- import { C as Cart, O as OrderQuote, a as OrderCheckoutResult, G as GetCurrentCartParams, b as GetCartParams, R as RequestOptions$1, A as AddCartItemParams, U as UpdateCartParams, c as RemoveCartItemParams, d as ClearCartParams, Q as QuoteCartParams, e as CheckoutCartParams, P as Profile, S as Store, M as Market, f as MagicLinkVerifyParams, g as AuthToken, h as MagicLinkRequestParams, i as UpdateAccountProfileParams, j as AccountUpdateResponse, D as DeleteAccountParams, k as GetMeParams, l as Account, m as SearchAccountsParams, L as Location, n as CreateLocationParams, o as UpdateLocationParams, p as DeleteLocationParams, q as CreateMarketParams, r as UpdateMarketParams, s as DeleteMarketParams, t as CreateStoreParams, u as UpdateStoreParams, v as DeleteStoreParams, w as GetStoreParams, x as GetStoresParams, y as PaginatedResponse, z as GetSubscriptionPlansParams, B as SubscriptionPlan, E as SubscribeParams, F as CreatePortalSessionParams, H as AddMemberParams, I as InviteUserParams, J as RemoveMemberParams, T as TestWebhookParams, K as GetStoreMediaParams2, N as Media, V as OAuthConnectParams, W as Integration, X as OAuthDisconnectParams, Y as ListIntegrationsParams, Z as CreateIntegrationParams, _ as UpdateIntegrationParams, $ as DeleteIntegrationParams, a0 as ListWebhooksParams, a1 as Webhook, a2 as CreateWebhookParams, a3 as UpdateWebhookParams, a4 as DeleteWebhookParams, a5 as GetMediaParams, a6 as UploadStoreMediaParams, a7 as DeleteStoreMediaParams, a8 as GetStoreMediaParams, a9 as UpdateMediaParams, aa as TrackEmailOpenParams, ab as TriggerNotificationParams, ac as CreatePromoCodeParams, ad as PromoCode, ae as UpdatePromoCodeParams, af as DeletePromoCodeParams, ag as GetPromoCodeParams, ah as GetPromoCodesParams, ai as GetShippingRatesParams, aj as ShippingRate, ak as ShipParams, al as ShipResult, am as CreateNodeParams, an as Node, ao as UpdateNodeParams, ap as DeleteNodeParams, aq as GetNodeParams, ar as Block, as as TaxonomyEntry, at as NodeStatus, au as GetNodesParams, av as GetNodeChildrenParams, aw as CreateFormParams, ax as Form, ay as UpdateFormParams, az as DeleteFormParams, aA as GetFormParams, aB as GetFormsParams, aC as SubmitFormParams, aD as FormSubmission, aE as GetFormSubmissionsParams, aF as GetFormSubmissionParams, aG as UpdateFormSubmissionParams, aH as CreateTaxonomyParams, aI as Taxonomy, aJ as UpdateTaxonomyParams, aK as DeleteTaxonomyParams, aL as GetTaxonomyParams, aM as GetTaxonomiesParams, aN as GetTaxonomyChildrenParams, aO as CreateEmailTemplateParams, aP as EmailTemplate, aQ as UpdateEmailTemplateParams, aR as DeleteEmailTemplateParams, aS as GetEmailTemplateParams, aT as GetEmailTemplatesParams, aU as PreviewEmailTemplateParams, aV as PreviewEmailTemplateResponse, aW as CreateProductParams, aX as Product, aY as UpdateProductParams, aZ as DeleteProductParams, a_ as GetProductParams, a$ as GetProductsParams, b0 as UpdateOrderParams, b1 as Order, b2 as GetOrderParams, b3 as GetOrdersParams, b4 as GetQuoteParams, b5 as ProcessOrderRefundParams, b6 as CreateCartParams, b7 as FindCartsParams, b8 as CreateServiceParams, b9 as Service, ba as UpdateServiceParams, bb as DeleteServiceParams, bc as GetServiceParams, bd as GetServicesParams, be as GetAvailabilityParams, bf as AvailabilityResponse, bg as FindServiceProvidersParams, bh as ServiceProvider, bi as CreateServiceProviderParams, bj as UpdateServiceProviderParams, bk as DeleteServiceProviderParams, bl as CreateProviderParams, bm as Provider, bn as UpdateProviderParams, bo as DeleteProviderParams, bp as GetProviderParams, bq as GetProvidersParams, br as CreateProfileParams, bs as Profile$1, bt as GetProfileParams, bu as ProfileDetail, bv as FindProfilesParams, bw as UpdateProfileParams, bx as MergeProfilesParams, by as ImportProfilesParams, bz as ImportProfilesResult, bA as CreateProfileListParams, bB as ProfileList, bC as UpdateProfileListParams, bD as GetProfileListParams, bE as FindProfileListsParams, bF as ImportProfilesIntoProfileListParams, bG as ImportProfilesIntoProfileListResult, bH as ImportProfileListPreviewParams, bI as ImportProfilesPreviewResult, bJ as AddProfileListProfileParams, bK as ProfileListMember, bL as UpdateProfileListProfileParams, bM as RemoveProfileListProfileParams, bN as FindProfileListProfilesParams, bO as CreateMailboxParams, bP as Mailbox, bQ as UpdateMailboxParams, bR as GetMailboxParams, bS as TestMailboxParams, bT as TestMailboxResult, bU as PrepareMailboxParams, bV as FindMailboxesParams, bW as CreateCampaignParams, bX as Campaign, bY as UpdateCampaignParams, bZ as GetCampaignParams, b_ as FindCampaignsParams, b$ as LaunchCampaignParams, c0 as DuplicateCampaignParams, c1 as GetCampaignLaunchReadinessParams, c2 as CampaignLaunchReadiness, c3 as ImportCampaignRecipientsParams, c4 as CampaignRecipientImportResult, c5 as GenerateOutreachPersonalizedDraftsParams, c6 as FindCampaignRecipientsParams, c7 as CampaignRecipient, c8 as GetCampaignRecipientConversationParams, c9 as CampaignRecipientConversationResponse, ca as UpdateCampaignRecipientParams, cb as UpdateCampaignRecipientDraftParams, cc as ReplyCampaignRecipientParams, cd as StopCampaignRecipientParams, ce as FindCampaignMessagesParams, cf as CampaignMessage, cg as UpdateCampaignMessageParams, ch as CreateSuppressionParams, ci as Suppression, cj as UpdateSuppressionParams, ck as GetSuppressionParams, cl as FindSuppressionsParams, cm as CreateLeadResearchRunParams, cn as LeadResearchRun, co as FindLeadResearchRunsParams, cp as GetLeadResearchRunParams, cq as UpdateLeadResearchRunParams, cr as CancelLeadResearchRunParams, cs as SendLeadResearchMessageParams, ct as SendLeadResearchMessageResult, cu as FindLeadResearchMessagesParams, cv as LeadResearchMessage, cw as ValidateLeadEmailParams, cx as LeadEmailValidationResult, cy as FindActivitiesParams, cz as CreateWorkflowParams, cA as Workflow, cB as UpdateWorkflowParams, cC as DeleteWorkflowParams, cD as GetWorkflowParams, cE as GetWorkflowsParams, cF as TriggerWorkflowParams, cG as WorkflowExecution, cH as GetWorkflowExecutionsParams, cI as GetWorkflowExecutionParams, cJ as SubscribeProfileListParams, cK as ProfileListSubscribeResponse, cL as ProfileListAccessParams, cM as ProfileListAccessResponse } from './api-BbBHcd4p.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-nCF3Z6Af.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 ProfileToken = {
58
- id: string;
59
- token: string;
60
- created_at: number;
61
- };
62
- type IdentifyResponse = {
63
- profile: Profile;
64
- token: ProfileToken;
65
- store: Store;
66
- market: Market | null;
67
- code_sent: boolean;
68
- };
69
- type VerifyResponse = ProfileToken;
70
- interface Activity$1 {
71
- store_id: string;
72
- profile_id: string;
73
- type: string;
74
- payload: Record<string, unknown>;
75
- created_at: number;
76
- }
77
- interface TrackParams {
78
- type: string;
79
- payload?: Record<string, unknown>;
80
- }
81
- declare const COMMON_ACTIVITY_TYPES: readonly ["page_view", "product_view", "service_view", "provider_view", "cart_added", "cart_removed", "checkout_started", "purchase", "order_created", "signin", "signup", "verified_email", "search", "share", "wishlist_added"];
82
- type CommonActivityType = (typeof COMMON_ACTIVITY_TYPES)[number];
83
-
84
- interface AnalyticsTimeRange {
85
- from: number;
86
- to: number;
87
- }
88
- type AnalyticsReportKey = "business_overview" | "profile_funnel" | "outreach_overview" | "outreach_funnel" | "outreach_variant_performance" | "activity_by_country" | "top_activity_pages" | "entity_status_overview" | "data_health" | "orders_created" | "profiles_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" | "nodes_by_status" | "profiles_by_status" | "profile_lists_by_status" | "mailboxes_by_status" | "campaigns_by_status" | "campaign_recipients_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_activity";
89
- type ActivityFeedCategory = "orders" | "carts" | "promo_codes" | "submissions" | "profiles" | "profile_lists" | "products" | "services" | "providers" | "cms" | "workflows" | "activities";
90
- interface AnalyticsReportRequest {
91
- key: AnalyticsReportKey;
92
- limit?: number;
93
- category?: ActivityFeedCategory;
94
- cursor_created_at?: number;
95
- cursor_id?: string;
96
- }
97
- interface AnalyticsRequest {
98
- time?: AnalyticsTimeRange;
99
- reports?: AnalyticsReportRequest[];
100
- blocks?: AnalyticsBlockRequest[];
101
- }
102
- interface AnalyticsBlockRequest {
103
- id: string;
104
- time: AnalyticsTimeRange;
105
- reports: AnalyticsReportRequest[];
106
- }
107
- interface AnalyticsMetricData {
108
- value: number;
109
- execution_ms?: number;
110
- }
111
- interface AnalyticsBreakdownItem {
112
- key: string;
113
- label: string;
114
- value: number;
115
- unique_profiles?: number;
116
- unique_visitors?: number;
117
- }
118
- interface AnalyticsBreakdownData {
119
- items: AnalyticsBreakdownItem[];
120
- }
121
- interface BusinessOverviewData {
122
- visitors: number;
123
- new_visitors: number;
124
- known_profiles: number;
125
- new_known_profiles: number;
126
- email_known_profiles: number;
127
- verified_profiles: number;
128
- new_verified_profiles: number;
129
- buyers: number;
130
- orders: number;
131
- revenue: number;
132
- revenue_by_currency: RevenueByCurrencyData[];
133
- average_order_value: number;
134
- carts: number;
135
- abandoned_carts: number;
136
- visitor_to_known_rate: number;
137
- visitor_to_buyer_rate: number;
138
- cart_abandonment_rate: number;
139
- }
140
- interface RevenueByCurrencyData {
141
- currency: string;
142
- orders: number;
143
- revenue: number;
144
- average_order_value: number;
145
- }
146
- interface ProfileFunnelStage {
147
- key: "visitors" | "email_known_profiles" | "verified_profiles" | "buyers" | string;
148
- label: string;
149
- value: number;
150
- }
151
- interface ProfileFunnelData {
152
- stages: ProfileFunnelStage[];
153
- visitor_to_known_rate?: number;
154
- visitor_to_buyer_rate?: number;
155
- }
156
- interface OutreachOverviewData {
157
- profile_lists: number;
158
- active_profile_lists: number;
159
- mailboxes: number;
160
- active_mailboxes: number;
161
- campaigns: number;
162
- active_campaigns: number;
163
- campaign_recipients: number;
164
- new_campaign_recipients: number;
165
- active_campaign_recipients: number;
166
- completed_campaign_recipients: number;
167
- replied_campaign_recipients: number;
168
- suppressed_campaign_recipients: number;
169
- failed_campaign_recipients: number;
170
- campaign_messages_sent: number;
171
- outreach_bounces: number;
172
- campaign_messages_received: number;
173
- suppressions: number;
174
- active_suppressions: number;
175
- new_suppressions: number;
176
- reply_rate: number;
177
- bounce_rate: number;
178
- suppression_rate: number;
179
- }
180
- interface OutreachFunnelStage {
181
- key: "profile_lists" | "campaigns" | "campaign_recipients" | "campaign_messages_sent" | "outreach_bounces" | "campaign_messages_received" | string;
182
- label: string;
183
- value: number;
184
- }
185
- interface OutreachFunnelData {
186
- stages: OutreachFunnelStage[];
187
- reply_rate?: number;
188
- bounce_rate?: number;
189
- suppression_rate?: number;
190
- }
191
- interface OutreachVariantPerformanceItem {
192
- campaign_id: string;
193
- step_id: string;
194
- step_position: number;
195
- step_variant_id: string;
196
- step_variant_name: string;
197
- sent: number;
198
- bounced: number;
199
- failed: number;
200
- replies: number;
201
- reply_rate: number;
202
- bounce_rate: number;
203
- }
204
- interface OutreachVariantPerformanceData {
205
- variants: OutreachVariantPerformanceItem[];
206
- }
207
- interface EntityStatusOverviewData {
208
- entities: Record<string, AnalyticsBreakdownItem[]>;
209
- }
210
- interface DataHealthData {
211
- anonymous_profiles: number;
212
- known_profiles: number;
213
- duplicate_emails: number;
214
- unknown_country_events: number;
215
- unknown_device_events: number;
216
- }
217
- interface ActivityFeedItem {
218
- id: string;
219
- entity: string;
220
- entity_id: string;
221
- action: string;
222
- event_type: string;
223
- status: string;
224
- profile_id: string;
225
- category: string;
226
- title: string;
227
- description: string;
228
- href?: string | null;
229
- data: unknown;
230
- payload: unknown;
231
- created_at: number;
232
- }
233
- interface ActivityFeedSummary {
234
- total: number;
235
- orders: number;
236
- submissions: number;
237
- profiles: number;
238
- profile_lists: number;
239
- abandoned_carts: number;
240
- carts: number;
241
- promo_codes: number;
242
- products: number;
243
- services: number;
244
- providers: number;
245
- cms: number;
246
- workflows: number;
247
- activities: number;
248
- window_start: number;
249
- }
250
- interface ActivityFeedCursor {
251
- created_at: number;
252
- id: string;
253
- }
254
- interface ActivityFeedData {
255
- items: ActivityFeedItem[];
256
- summary: ActivityFeedSummary;
257
- next_cursor?: ActivityFeedCursor | null;
258
- meta: {
259
- row_count: number;
260
- execution_ms: number;
261
- };
262
- }
263
- type AnalyticsMetricReportKey = "orders_created" | "profiles_created" | "form_submissions_created" | "carts_abandoned" | "campaign_messages_sent" | "campaign_messages_received" | "suppressions_created" | "media_count";
264
- type AnalyticsBreakdownReportKey = "activity_by_country" | "top_activity_pages" | "products_by_status" | "services_by_status" | "providers_by_status" | "nodes_by_status" | "profiles_by_status" | "profile_lists_by_status" | "mailboxes_by_status" | "campaigns_by_status" | "campaign_recipients_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";
265
- type AnalyticsActivityReportKey = "recent_activity";
266
- type AnalyticsCompositeReportKey = "business_overview" | "profile_funnel" | "outreach_overview" | "outreach_funnel" | "outreach_variant_performance" | "entity_status_overview" | "data_health";
267
- type AnalyticsReport = {
268
- key: AnalyticsMetricReportKey;
269
- data: AnalyticsMetricData;
270
- } | {
271
- key: AnalyticsBreakdownReportKey;
272
- data: AnalyticsBreakdownData;
273
- } | {
274
- key: "business_overview";
275
- data: BusinessOverviewData;
276
- } | {
277
- key: "profile_funnel";
278
- data: ProfileFunnelData;
279
- } | {
280
- key: "outreach_overview";
281
- data: OutreachOverviewData;
282
- } | {
283
- key: "outreach_funnel";
284
- data: OutreachFunnelData;
285
- } | {
286
- key: "outreach_variant_performance";
287
- data: OutreachVariantPerformanceData;
288
- } | {
289
- key: "entity_status_overview";
290
- data: EntityStatusOverviewData;
291
- } | {
292
- key: "data_health";
293
- data: DataHealthData;
294
- } | {
295
- key: AnalyticsActivityReportKey;
296
- data: ActivityFeedData;
297
- };
298
- interface AnalyticsBlockResponse {
299
- id: string;
300
- time: AnalyticsTimeRange;
301
- reports: AnalyticsReport[];
302
- }
303
- interface AnalyticsResponse {
304
- time?: AnalyticsTimeRange;
305
- reports?: AnalyticsReport[];
306
- blocks?: AnalyticsBlockResponse[];
307
- }
308
-
309
- interface SupportAgentNode {
310
- type: "message" | "input" | "ai_handoff" | "action";
311
- text?: string;
312
- buttons?: string[];
313
- prompt?: string;
314
- field?: string;
315
- input_type?: "text" | "email" | "phone";
316
- validation?: string;
317
- system_prompt_override?: string;
318
- tools?: string[];
319
- action?: SupportAction;
320
- }
321
- interface SupportAction {
322
- type: "end_conversation" | "human_handoff";
323
- message?: string;
324
- }
325
- interface SupportAgentEdge {
326
- source: string;
327
- target: string;
328
- trigger: EdgeTrigger;
329
- }
330
- type EdgeTrigger = {
331
- type: "button";
332
- label: string;
333
- } | {
334
- type: "input";
335
- field: string;
336
- } | {
337
- type: "default";
338
- };
339
- interface SupportAgentAiConfig {
340
- integration_id: string;
341
- system_prompt: string;
342
- tools: string[];
343
- max_context_messages: number;
344
- }
345
- interface SupportAgent {
346
- id: string;
347
- key: string;
348
- store_id: string;
349
- name: string;
350
- status: "draft" | "active" | "archived";
351
- entry_node_id: string;
352
- nodes: Record<string, SupportAgentNode>;
353
- edges: SupportAgentEdge[];
354
- ai_config?: SupportAgentAiConfig;
355
- created_at: number;
356
- updated_at: number;
357
- }
358
- interface SupportConversation {
359
- id: string;
360
- store_id: string;
361
- agent_id?: string;
362
- current_node_id?: string;
363
- profile_id?: string;
364
- assigned_account_id?: string | null;
365
- status: "active" | "ai_mode" | "escalated" | "resolved";
366
- data: Record<string, unknown>;
367
- metadata: Record<string, unknown>;
368
- created_at: number;
369
- updated_at: number;
370
- }
371
- interface SupportMessage {
372
- id: string;
373
- store_id: string;
374
- conversation_id: string;
375
- role: "system" | "user" | "assistant" | "staff" | "activity";
376
- content: string;
377
- buttons?: string[];
378
- metadata: Record<string, unknown>;
379
- created_at: number;
380
- }
381
- interface SupportConversationResponse {
382
- conversation: SupportConversation;
383
- messages: SupportMessage[];
384
- }
385
- interface StartSupportConversationParams {
386
- store_id: string;
387
- agent_key?: string;
388
- metadata?: Record<string, unknown>;
389
- }
390
- interface SendSupportMessageParams {
391
- store_id: string;
392
- conversation_id: string;
393
- input: {
394
- type: "button";
395
- label: string;
396
- } | {
397
- type: "text";
398
- content: string;
399
- };
400
- }
401
- interface ReplySupportConversationParams {
402
- store_id: string;
403
- conversation_id: string;
404
- content: string;
405
- resolve?: boolean;
406
- }
407
- interface ResolveSupportConversationParams {
408
- store_id: string;
409
- conversation_id: string;
410
- }
411
- interface AssignSupportConversationParams {
412
- store_id: string;
413
- conversation_id: string;
414
- account_id?: string | null;
415
- }
416
- interface GetSupportConversationParams {
417
- store_id: string;
418
- conversation_id: string;
419
- message_limit?: number;
420
- after_created_at?: number;
421
- after_id?: string;
422
- }
423
- interface CreateSupportAgentParams {
424
- store_id: string;
425
- key: string;
426
- name: string;
427
- status?: "draft" | "active" | "archived";
428
- entry_node_id: string;
429
- nodes: Record<string, SupportAgentNode>;
430
- edges: SupportAgentEdge[];
431
- ai_config?: SupportAgentAiConfig;
432
- }
433
- interface UpdateSupportAgentParams {
434
- store_id: string;
435
- id: string;
436
- name?: string;
437
- status?: "draft" | "active" | "archived";
438
- entry_node_id?: string;
439
- nodes?: Record<string, SupportAgentNode>;
440
- edges?: SupportAgentEdge[];
441
- ai_config?: SupportAgentAiConfig;
442
- }
443
-
444
- interface Activity {
445
- id: string;
446
- store_id: string;
447
- profile_id: string;
448
- type: string;
449
- payload: Record<string, unknown>;
450
- created_at: number;
451
- country_code?: string | null;
452
- city?: string | null;
453
- region?: string | null;
454
- timezone?: string | null;
455
- device_type?: string | null;
456
- browser?: string | null;
457
- os?: string | null;
458
- language?: string | null;
459
- session_idx?: number | null;
460
- }
461
- interface TimelineParams {
462
- profile_id: string;
463
- store_id?: string;
464
- limit?: number;
465
- cursor?: string;
466
- }
467
-
468
- interface IntegrationOperation {
469
- name: string;
470
- value: string;
471
- description?: string;
472
- method: 'get' | 'post' | 'put' | 'patch' | 'delete';
473
- url: string;
474
- body?: Record<string, unknown> | string;
475
- headers?: Record<string, string>;
476
- }
477
- interface IntegrationResource {
478
- name: string;
479
- value: string;
480
- operations: IntegrationOperation[];
481
- }
482
- interface IntegrationService {
483
- id: string;
484
- name: string;
485
- description: string;
486
- icon: string;
487
- color: string;
488
- category: 'ai' | 'communication' | 'email' | 'productivity' | 'payments' | 'crm' | 'ecommerce' | 'developer' | 'storage' | 'analytics' | 'deploy' | 'core';
489
- configurationRequired: boolean;
490
- website?: string;
491
- docsUrl?: string;
492
- urlPatterns: string[];
493
- resources: IntegrationResource[];
494
- triggers?: Array<{
495
- name: string;
496
- value: string;
497
- description: string;
498
- webhookType: 'incoming' | 'polling';
499
- }>;
500
- }
501
-
502
- interface LocationState {
503
- code: string;
504
- name: string;
505
- }
506
- interface LocationCountry {
507
- code: string;
508
- name: string;
509
- states: LocationState[];
510
- }
511
- interface GetCountriesResponse {
512
- items: LocationCountry[];
513
- cursor: string | null;
514
- }
515
-
516
- interface QueryParams {
517
- [key: string]: string | number | boolean | string[] | number[] | null | undefined;
518
- }
519
-
520
- interface TokenSet {
521
- access_token: string;
522
- refresh_token?: string;
523
- access_expires_at?: number;
524
- }
525
- interface AuthStorage {
526
- getTokens(): TokenSet | null;
527
- onTokensRefreshed(tokens: TokenSet): void;
528
- onForcedLogout(): void;
529
- }
530
- interface RequestSuccessContext<T = unknown> {
531
- data: T;
532
- method: string;
533
- url: string;
534
- status: number;
535
- request?: unknown;
536
- duration_ms?: number;
537
- request_id?: string | null;
538
- }
539
- interface RequestErrorContext {
540
- error: unknown;
541
- method: string;
542
- url: string;
543
- status?: number;
544
- request?: unknown;
545
- response?: unknown;
546
- duration_ms?: number;
547
- request_id?: string | null;
548
- aborted?: boolean;
549
- }
550
- interface RequestOptions<T = unknown> {
551
- headers?: Record<string, string>;
552
- params?: QueryParams | Record<string, any>;
553
- transformRequest?: (data: unknown) => unknown;
554
- onSuccess?: (ctx: RequestSuccessContext<T>) => void | Promise<void>;
555
- onError?: (ctx: RequestErrorContext) => void | Promise<void>;
556
- }
557
- interface HttpClient {
558
- get<T>(path: string, opts?: RequestOptions<T>): Promise<T>;
559
- post<T>(path: string, body: unknown, opts?: RequestOptions<T>): Promise<T>;
560
- put<T>(path: string, body: unknown, opts?: RequestOptions<T>): Promise<T>;
561
- patch<T>(path: string, body: unknown, opts?: RequestOptions<T>): Promise<T>;
562
- delete<T>(path: string, opts?: RequestOptions<T>): Promise<T>;
563
- }
564
- interface HttpClientConfig {
565
- baseUrl: string;
566
- storeId: string;
567
- authStorage: AuthStorage;
568
- refreshPath?: string | (() => string);
569
- navigate?: (path: string) => void;
570
- loginFallbackPath?: string;
571
- }
572
-
573
- declare function getBlockLabel(block: any): string;
574
- declare function formatBlockValue(block: any): string;
575
- declare function prepareBlocksForSubmission(formData: any, blockTypes?: Record<string, string>): any[];
576
- declare function extractBlockValues(blocks: any[]): Record<string, any>;
577
-
578
- interface ValidationResult {
579
- isValid: boolean;
580
- error?: string;
581
- }
582
- declare function validatePhoneNumber(phone: string): ValidationResult;
583
-
584
- declare const tzGroups: {
585
- label: string;
586
- zones: {
587
- label: string;
588
- value: string;
589
- }[];
590
- }[];
591
- declare function findTimeZone(groups: typeof tzGroups): string;
592
-
593
- declare const locales: readonly ["en", "sr-latn"];
594
- declare function slugify(text: string): string;
595
- declare function humanize(text: string): string;
596
- declare function categorify(text: string): string;
597
- declare function formatDate(date: string | number | Date, locale: (typeof locales)[number]): string;
598
-
599
- declare function fetchSvgContent(mediaObject: any): Promise<string | null>;
600
- declare function getSvgContentForAstro(mediaObject: any): Promise<string>;
601
- declare function injectSvgIntoElement(mediaObject: any, targetElement: HTMLElement, className?: string): Promise<void>;
602
-
603
- declare const SDK_VERSION = "0.9.2";
604
- declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
605
-
606
- interface ApiConfig {
607
- httpClient: HttpClient;
608
- storeId: string;
609
- baseUrl: string;
610
- market: string;
611
- locale: string;
612
- authStorage: AuthStorage;
613
- }
614
- interface AdminSessionInternal {
615
- access_token: string;
616
- refresh_token: string;
617
- access_expires_at?: number;
618
- email?: string;
619
- }
620
- interface ProfileSessionInternal {
621
- access_token: string;
622
- profile: Profile;
623
- store: Store;
624
- market: Market | null;
625
- }
626
- interface AdminSession {
627
- email?: string;
628
- }
629
- interface ProfileSession {
630
- profile: Profile;
631
- store: Store;
632
- market: Market | null;
633
- }
634
- type AdminSessionUpdater = (updater: (prev: AdminSessionInternal | null) => AdminSessionInternal | null) => void;
635
- type ProfileSessionUpdater = (updater: (prev: ProfileSessionInternal | null) => ProfileSessionInternal | null) => void;
636
- type AuthStateListener<T> = (session: T | null) => void;
637
-
638
- type CreateAdminConfig = Omit<HttpClientConfig, "authStorage" | "storeId"> & {
639
- storeId: string;
640
- market: string;
641
- locale?: string;
642
- apiToken?: string;
643
- };
644
- declare function createAdmin(config: CreateAdminConfig): {
645
- auth: {
646
- code(params: {
647
- email: string;
648
- }, options?: RequestOptions$1): Promise<{
649
- sent: boolean;
650
- }>;
651
- verify(params: MagicLinkVerifyParams, options?: RequestOptions$1): Promise<AuthToken>;
652
- refresh(params: {
653
- refresh_token: string;
654
- }, options?: RequestOptions$1): Promise<AuthToken>;
655
- storeCode(storeId: string, params: {
656
- email: string;
657
- }, options?: RequestOptions$1): Promise<{
658
- sent: boolean;
659
- }>;
660
- storeVerify(storeId: string, params: MagicLinkVerifyParams, options?: RequestOptions$1): Promise<AuthToken>;
661
- magicLink(params: MagicLinkRequestParams, options?: RequestOptions$1): Promise<{
662
- sent: boolean;
663
- }>;
664
- };
665
- account: {
666
- updateAccount(params: UpdateAccountProfileParams, options?: RequestOptions$1): Promise<AccountUpdateResponse>;
667
- deleteAccount(_params: DeleteAccountParams, options?: RequestOptions$1): Promise<{
668
- deleted: boolean;
669
- }>;
670
- getMe(_params: GetMeParams, options?: RequestOptions$1): Promise<Account>;
671
- searchAccounts(params: SearchAccountsParams, options?: RequestOptions$1): Promise<{
672
- items: Account[];
673
- cursor?: string | null;
674
- }>;
675
- };
676
- store: {
677
- location: {
678
- getCountries(options?: RequestOptions$1): Promise<GetCountriesResponse>;
679
- getCountry(countryCode: string, options?: RequestOptions$1): Promise<LocationCountry>;
680
- list(options?: RequestOptions$1): Promise<Location[]>;
681
- get(id: string, options?: RequestOptions$1): Promise<Location>;
682
- create(params: CreateLocationParams, options?: RequestOptions$1): Promise<Location>;
683
- update(params: UpdateLocationParams, options?: RequestOptions$1): Promise<Location>;
684
- delete(params: DeleteLocationParams, options?: RequestOptions$1): Promise<{
685
- deleted: boolean;
686
- }>;
687
- };
688
- market: {
689
- list(options?: RequestOptions$1): Promise<Market[]>;
690
- get(id: string, options?: RequestOptions$1): Promise<Market>;
691
- create(params: CreateMarketParams, options?: RequestOptions$1): Promise<Market>;
692
- update(params: UpdateMarketParams, options?: RequestOptions$1): Promise<Market>;
693
- delete(params: DeleteMarketParams, options?: RequestOptions$1): Promise<{
694
- deleted: boolean;
695
- }>;
696
- };
697
- createStore(params: CreateStoreParams, options?: RequestOptions$1): Promise<Store>;
698
- updateStore(params: UpdateStoreParams, options?: RequestOptions$1): Promise<Store>;
699
- deleteStore(params: DeleteStoreParams, options?: RequestOptions$1): Promise<{
700
- deleted: boolean;
701
- }>;
702
- getStore(_params: GetStoreParams, options?: RequestOptions$1): Promise<Store>;
703
- getStores(params?: GetStoresParams, options?: RequestOptions$1): Promise<PaginatedResponse<Store>>;
704
- getSubscriptionPlans(_params: GetSubscriptionPlansParams, options?: RequestOptions$1): Promise<PaginatedResponse<SubscriptionPlan>>;
705
- subscribe(params: SubscribeParams, options?: RequestOptions$1): Promise<{
706
- checkout_url?: string;
707
- }>;
708
- createPortalSession(params: CreatePortalSessionParams, options?: RequestOptions$1): Promise<{
709
- portal_url: string;
710
- }>;
711
- addMember(params: AddMemberParams, options?: RequestOptions$1): Promise<boolean>;
712
- inviteUser(params: InviteUserParams, options?: RequestOptions$1): Promise<boolean>;
713
- removeMember(params: RemoveMemberParams, options?: RequestOptions$1): Promise<{
714
- removed: boolean;
715
- }>;
716
- testWebhook(params: TestWebhookParams, options?: RequestOptions$1): Promise<{
717
- tested: boolean;
718
- }>;
719
- getStoreMedia(params: GetStoreMediaParams2, options?: RequestOptions$1): Promise<PaginatedResponse<Media>>;
720
- oauthConnect(params: OAuthConnectParams, options?: RequestOptions$1): Promise<Integration>;
721
- oauthDisconnect(params: OAuthDisconnectParams, options?: RequestOptions$1): Promise<{
722
- disconnected: boolean;
723
- }>;
724
- listIntegrations(params: ListIntegrationsParams, options?: RequestOptions$1): Promise<Integration[]>;
725
- createIntegration(params: CreateIntegrationParams, options?: RequestOptions$1): Promise<Integration>;
726
- updateIntegration(params: UpdateIntegrationParams, options?: RequestOptions$1): Promise<Integration>;
727
- deleteIntegration(params: DeleteIntegrationParams, options?: RequestOptions$1): Promise<{
728
- deleted: boolean;
729
- }>;
730
- getIntegrationConfig(params: {
731
- store_id: string;
732
- type: "payment" | "shipping";
733
- }, options?: RequestOptions$1): Promise<unknown>;
734
- listWebhooks(params: ListWebhooksParams, options?: RequestOptions$1): Promise<Webhook[]>;
735
- createWebhook(params: CreateWebhookParams, options?: RequestOptions$1): Promise<Webhook>;
736
- updateWebhook(params: UpdateWebhookParams, options?: RequestOptions$1): Promise<Webhook>;
737
- deleteWebhook(params: DeleteWebhookParams, options?: RequestOptions$1): Promise<{
738
- deleted: boolean;
739
- }>;
740
- };
741
- media: {
742
- getMedia(params: GetMediaParams, options?: RequestOptions$1): Promise<Media>;
743
- uploadStoreMedia(params: UploadStoreMediaParams, _options?: RequestOptions$1): Promise<Media[]>;
744
- deleteStoreMedia(params: DeleteStoreMediaParams, options?: RequestOptions$1): Promise<{
745
- deleted: boolean;
746
- }>;
747
- getStoreMedia(params: GetStoreMediaParams, _options?: RequestOptions$1): Promise<PaginatedResponse<Media>>;
748
- updateMedia(params: UpdateMediaParams, options?: RequestOptions$1): Promise<Media>;
749
- };
750
- notification: {
751
- trackEmailOpen(params: TrackEmailOpenParams, options?: RequestOptions$1): Promise<void>;
752
- trigger(params: TriggerNotificationParams, options?: RequestOptions$1): Promise<{
753
- success: boolean;
754
- message: string;
755
- }>;
756
- };
757
- promoCode: {
758
- createPromoCode(params: CreatePromoCodeParams, options?: RequestOptions$1): Promise<PromoCode>;
759
- updatePromoCode(params: UpdatePromoCodeParams, options?: RequestOptions$1): Promise<PromoCode>;
760
- deletePromoCode(params: DeletePromoCodeParams, options?: RequestOptions$1): Promise<{
761
- deleted: boolean;
762
- }>;
763
- getPromoCode(params: GetPromoCodeParams, options?: RequestOptions$1): Promise<PromoCode>;
764
- getPromoCodes(params: GetPromoCodesParams, options?: RequestOptions$1): Promise<PaginatedResponse<PromoCode>>;
765
- };
766
- platform: {
767
- getCurrencies(options?: RequestOptions$1): Promise<string[]>;
768
- getIntegrationServices(options?: RequestOptions$1): Promise<IntegrationService[]>;
769
- getWebhookEvents(options?: RequestOptions$1): Promise<{
770
- data: string[];
771
- }>;
772
- data: {
773
- scan(params: {
774
- key: string;
775
- limit?: number;
776
- }, options?: RequestOptions$1): Promise<{
777
- value: Array<{
778
- key: string;
779
- value: unknown;
780
- }>;
781
- }>;
782
- put(params: {
783
- key: string;
784
- value: unknown;
785
- oldKey?: string;
786
- }, options?: RequestOptions$1): Promise<{
787
- ok: boolean;
788
- }>;
789
- delete(params: {
790
- key: string;
791
- }, options?: RequestOptions$1): Promise<{
792
- ok: boolean;
793
- }>;
794
- };
795
- runScript(params: {
796
- name: string;
797
- value?: string;
798
- username?: string;
799
- password?: string;
800
- }, options?: RequestOptions$1): Promise<{
801
- success: boolean;
802
- message: string;
803
- }>;
804
- };
805
- shipping: {
806
- getRates(params: GetShippingRatesParams, options?: RequestOptions$1): Promise<{
807
- rates: ShippingRate[];
808
- }>;
809
- ship(params: ShipParams, options?: RequestOptions$1): Promise<ShipResult>;
810
- };
811
- cms: {
812
- node: {
813
- create: (params: CreateNodeParams, options?: RequestOptions$1) => Promise<Node>;
814
- update: (params: UpdateNodeParams, options?: RequestOptions$1) => Promise<Node>;
815
- delete: (params: DeleteNodeParams, options?: RequestOptions$1) => Promise<{
816
- deleted: boolean;
817
- }>;
818
- get: (params: GetNodeParams, options?: RequestOptions$1) => Promise<{
819
- getBlock(key: string): any;
820
- getBlockValues(key: string): any;
821
- getImage(key: string): any;
822
- id: string;
823
- key: string;
824
- store_id: string;
825
- parent_id?: string | null;
826
- blocks: Block[];
827
- taxonomies: TaxonomyEntry[];
828
- status: NodeStatus;
829
- slug: Record<string, string>;
830
- children: Node[];
831
- created_at: number;
832
- updated_at: number;
833
- }>;
834
- find: (params: GetNodesParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Node>>;
835
- getChildren: (params: GetNodeChildrenParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Node>>;
836
- };
837
- form: {
838
- create: (params: CreateFormParams, options?: RequestOptions$1) => Promise<Form>;
839
- update: (params: UpdateFormParams, options?: RequestOptions$1) => Promise<Form>;
840
- delete: (params: DeleteFormParams, options?: RequestOptions$1) => Promise<{
841
- deleted: boolean;
842
- }>;
843
- get: (params: GetFormParams, options?: RequestOptions$1) => Promise<Form>;
844
- find: (params: GetFormsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Form>>;
845
- submit: (params: SubmitFormParams, options?: RequestOptions$1) => Promise<FormSubmission>;
846
- getSubmissions: (params: GetFormSubmissionsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<FormSubmission>>;
847
- getSubmission: (params: GetFormSubmissionParams, options?: RequestOptions$1) => Promise<FormSubmission>;
848
- updateSubmission: (params: UpdateFormSubmissionParams, options?: RequestOptions$1) => Promise<FormSubmission>;
849
- };
850
- taxonomy: {
851
- create: (params: CreateTaxonomyParams, options?: RequestOptions$1) => Promise<Taxonomy>;
852
- update: (params: UpdateTaxonomyParams, options?: RequestOptions$1) => Promise<Taxonomy>;
853
- delete: (params: DeleteTaxonomyParams, options?: RequestOptions$1) => Promise<{
854
- deleted: boolean;
855
- }>;
856
- get: (params: GetTaxonomyParams, options?: RequestOptions$1) => Promise<Taxonomy>;
857
- find: (params: GetTaxonomiesParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Taxonomy>>;
858
- getChildren: (params: GetTaxonomyChildrenParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Taxonomy>>;
859
- };
860
- emailTemplate: {
861
- create: (params: CreateEmailTemplateParams, options?: RequestOptions$1) => Promise<EmailTemplate>;
862
- update: (params: UpdateEmailTemplateParams, options?: RequestOptions$1) => Promise<EmailTemplate>;
863
- delete: (params: DeleteEmailTemplateParams, options?: RequestOptions$1) => Promise<{
864
- deleted: boolean;
865
- }>;
866
- get: (params: GetEmailTemplateParams, options?: RequestOptions$1) => Promise<EmailTemplate>;
867
- find: (params: GetEmailTemplatesParams, options?: RequestOptions$1) => Promise<PaginatedResponse<EmailTemplate>>;
868
- preview: (params: PreviewEmailTemplateParams, options?: RequestOptions$1) => Promise<PreviewEmailTemplateResponse>;
869
- };
870
- };
871
- eshop: {
872
- product: {
873
- create: (params: CreateProductParams, options?: RequestOptions$1) => Promise<Product>;
874
- update: (params: UpdateProductParams, options?: RequestOptions$1) => Promise<Product>;
875
- delete: (params: DeleteProductParams, options?: RequestOptions$1) => Promise<{
876
- deleted: boolean;
877
- }>;
878
- get: (params: GetProductParams, options?: RequestOptions$1) => Promise<Product>;
879
- find: (params: GetProductsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Product>>;
880
- };
881
- order: {
882
- update: (params: UpdateOrderParams, options?: RequestOptions$1) => Promise<Order>;
883
- get: (params: GetOrderParams, options?: RequestOptions$1) => Promise<Order>;
884
- find: (params: GetOrdersParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Order>>;
885
- getQuote: (params: GetQuoteParams, options?: RequestOptions$1) => Promise<OrderQuote>;
886
- processRefund: (params: ProcessOrderRefundParams, options?: RequestOptions$1) => Promise<Order>;
887
- };
888
- cart: {
889
- create: (params: CreateCartParams, options?: RequestOptions$1) => Promise<Cart>;
890
- update: (params: UpdateCartParams, options?: RequestOptions$1) => Promise<Cart>;
891
- get: (params: GetCartParams, options?: RequestOptions$1) => Promise<Cart>;
892
- find: (params?: FindCartsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Cart>>;
893
- addItem: (params: AddCartItemParams, options?: RequestOptions$1) => Promise<Cart>;
894
- removeItem: (params: RemoveCartItemParams, options?: RequestOptions$1) => Promise<Cart>;
895
- clear: (params: ClearCartParams, options?: RequestOptions$1) => Promise<Cart>;
896
- quote: (params: QuoteCartParams, options?: RequestOptions$1) => Promise<OrderQuote>;
897
- checkout: (params: CheckoutCartParams, options?: RequestOptions$1) => Promise<OrderCheckoutResult>;
898
- };
899
- service: {
900
- create: (params: CreateServiceParams, options?: RequestOptions$1) => Promise<Service>;
901
- update: (params: UpdateServiceParams, options?: RequestOptions$1) => Promise<Service>;
902
- delete: (params: DeleteServiceParams, options?: RequestOptions$1) => Promise<void>;
903
- get: (params: GetServiceParams, options?: RequestOptions$1) => Promise<Service>;
904
- find: (params: GetServicesParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Service>>;
905
- getAvailability: (params: GetAvailabilityParams, options?: RequestOptions$1) => Promise<AvailabilityResponse>;
906
- findProviders: (params: FindServiceProvidersParams, options?: RequestOptions$1) => Promise<ServiceProvider[]>;
907
- createProvider: (params: CreateServiceProviderParams, options?: RequestOptions$1) => Promise<ServiceProvider>;
908
- updateProvider: (params: UpdateServiceProviderParams, options?: RequestOptions$1) => Promise<ServiceProvider>;
909
- deleteProvider: (params: DeleteServiceProviderParams, options?: RequestOptions$1) => Promise<void>;
910
- };
911
- provider: {
912
- create: (params: CreateProviderParams, options?: RequestOptions$1) => Promise<Provider>;
913
- update: (params: UpdateProviderParams, options?: RequestOptions$1) => Promise<Provider>;
914
- delete: (params: DeleteProviderParams, options?: RequestOptions$1) => Promise<void>;
915
- get: (params: GetProviderParams, options?: RequestOptions$1) => Promise<Provider>;
916
- find: (params: GetProvidersParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Provider>>;
917
- };
918
- promoCode: {
919
- createPromoCode(params: CreatePromoCodeParams, options?: RequestOptions$1): Promise<PromoCode>;
920
- updatePromoCode(params: UpdatePromoCodeParams, options?: RequestOptions$1): Promise<PromoCode>;
921
- deletePromoCode(params: DeletePromoCodeParams, options?: RequestOptions$1): Promise<{
922
- deleted: boolean;
923
- }>;
924
- getPromoCode(params: GetPromoCodeParams, options?: RequestOptions$1): Promise<PromoCode>;
925
- getPromoCodes(params: GetPromoCodesParams, options?: RequestOptions$1): Promise<PaginatedResponse<PromoCode>>;
926
- };
927
- };
928
- crm: {
929
- profile: {
930
- create: (params: CreateProfileParams, options?: RequestOptions$1) => Promise<Profile$1>;
931
- get: (params: GetProfileParams, options?: RequestOptions$1) => Promise<ProfileDetail>;
932
- find: (params?: FindProfilesParams, options?: RequestOptions$1) => Promise<{
933
- items: Profile$1[];
934
- cursor?: string;
935
- }>;
936
- update: (params: UpdateProfileParams, options?: RequestOptions$1) => Promise<Profile$1>;
937
- merge: (params: MergeProfilesParams, options?: RequestOptions$1) => Promise<Profile$1>;
938
- import: (params: ImportProfilesParams, options?: RequestOptions$1) => Promise<ImportProfilesResult>;
939
- revokeToken: (params: {
940
- id: string;
941
- token_id: string;
942
- store_id?: string;
943
- }, options?: RequestOptions$1) => Promise<{
944
- deleted: boolean;
945
- }>;
946
- revokeAllTokens: (params: {
947
- id: string;
948
- store_id?: string;
949
- }, options?: RequestOptions$1) => Promise<{
950
- deleted: boolean;
951
- }>;
952
- };
953
- profileList: {
954
- create(params: CreateProfileListParams, options?: RequestOptions$1): Promise<ProfileList>;
955
- update(params: UpdateProfileListParams, options?: RequestOptions$1): Promise<ProfileList>;
956
- get(params: GetProfileListParams, options?: RequestOptions$1): Promise<ProfileList>;
957
- find(params?: FindProfileListsParams, options?: RequestOptions$1): Promise<PaginatedResponse<ProfileList>>;
958
- importProfiles(params: ImportProfilesIntoProfileListParams, options?: RequestOptions$1): Promise<ImportProfilesIntoProfileListResult>;
959
- previewImportProfiles(params: ImportProfileListPreviewParams, options?: RequestOptions$1): Promise<ImportProfilesPreviewResult>;
960
- members: {
961
- add(params: AddProfileListProfileParams, options?: RequestOptions$1): Promise<ProfileListMember>;
962
- update(params: UpdateProfileListProfileParams, options?: RequestOptions$1): Promise<ProfileListMember>;
963
- remove(params: RemoveProfileListProfileParams, options?: RequestOptions$1): Promise<{
964
- deleted: boolean;
965
- }>;
966
- find(params: FindProfileListProfilesParams, options?: RequestOptions$1): Promise<PaginatedResponse<ProfileListMember>>;
967
- };
968
- profiles: {
969
- add(params: AddProfileListProfileParams, options?: RequestOptions$1): Promise<ProfileListMember>;
970
- update(params: UpdateProfileListProfileParams, options?: RequestOptions$1): Promise<ProfileListMember>;
971
- remove(params: RemoveProfileListProfileParams, options?: RequestOptions$1): Promise<{
972
- deleted: boolean;
973
- }>;
974
- find(params: FindProfileListProfilesParams, options?: RequestOptions$1): Promise<PaginatedResponse<ProfileListMember>>;
975
- };
976
- };
977
- mailbox: {
978
- create(params: CreateMailboxParams, options?: RequestOptions$1): Promise<Mailbox>;
979
- update(params: UpdateMailboxParams, options?: RequestOptions$1): Promise<Mailbox>;
980
- get(params: GetMailboxParams, options?: RequestOptions$1): Promise<Mailbox>;
981
- test(params: TestMailboxParams, options?: RequestOptions$1): Promise<TestMailboxResult>;
982
- prepare(params: PrepareMailboxParams, options?: RequestOptions$1): Promise<Mailbox>;
983
- find(params?: FindMailboxesParams, options?: RequestOptions$1): Promise<PaginatedResponse<Mailbox>>;
984
- };
985
- campaign: {
986
- create(params: CreateCampaignParams, options?: RequestOptions$1): Promise<Campaign>;
987
- update(params: UpdateCampaignParams, options?: RequestOptions$1): Promise<Campaign>;
988
- get(params: GetCampaignParams, options?: RequestOptions$1): Promise<Campaign>;
989
- find(params?: FindCampaignsParams, options?: RequestOptions$1): Promise<PaginatedResponse<Campaign>>;
990
- launch(params: LaunchCampaignParams, options?: RequestOptions$1): Promise<Campaign>;
991
- duplicate(params: DuplicateCampaignParams, options?: RequestOptions$1): Promise<Campaign>;
992
- launchReadiness(params: GetCampaignLaunchReadinessParams, options?: RequestOptions$1): Promise<CampaignLaunchReadiness>;
993
- importRecipients(params: ImportCampaignRecipientsParams, options?: RequestOptions$1): Promise<CampaignRecipientImportResult>;
994
- generatePersonalizedDrafts(params: GenerateOutreachPersonalizedDraftsParams, options?: RequestOptions$1): Promise<Campaign>;
995
- };
996
- campaignRecipient: {
997
- find(params?: FindCampaignRecipientsParams, options?: RequestOptions$1): Promise<PaginatedResponse<CampaignRecipient>>;
998
- get(params: GetCampaignRecipientConversationParams, options?: RequestOptions$1): Promise<CampaignRecipientConversationResponse>;
999
- update(params: UpdateCampaignRecipientParams, options?: RequestOptions$1): Promise<CampaignRecipient>;
1000
- updateDraft(params: UpdateCampaignRecipientDraftParams, options?: RequestOptions$1): Promise<CampaignRecipient>;
1001
- reply(params: ReplyCampaignRecipientParams, options?: RequestOptions$1): Promise<CampaignRecipientConversationResponse>;
1002
- stop(params: StopCampaignRecipientParams, options?: RequestOptions$1): Promise<CampaignRecipientConversationResponse>;
1003
- };
1004
- campaignMessage: {
1005
- find(params?: FindCampaignMessagesParams, options?: RequestOptions$1): Promise<PaginatedResponse<CampaignMessage>>;
1006
- update(params: UpdateCampaignMessageParams, options?: RequestOptions$1): Promise<CampaignMessage>;
1007
- };
1008
- suppression: {
1009
- create(params: CreateSuppressionParams, options?: RequestOptions$1): Promise<Suppression>;
1010
- update(params: UpdateSuppressionParams, options?: RequestOptions$1): Promise<Suppression>;
1011
- get(params: GetSuppressionParams, options?: RequestOptions$1): Promise<Suppression>;
1012
- find(params?: FindSuppressionsParams, options?: RequestOptions$1): Promise<PaginatedResponse<Suppression>>;
1013
- };
1014
- leadResearch: {
1015
- run: {
1016
- create: (params: CreateLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
1017
- find: (params?: FindLeadResearchRunsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<LeadResearchRun>>;
1018
- get: (params: GetLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
1019
- update: (params: UpdateLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
1020
- cancel: (params: CancelLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
1021
- sendMessage: (params: SendLeadResearchMessageParams, options?: RequestOptions$1) => Promise<SendLeadResearchMessageResult>;
1022
- findMessages: (params: FindLeadResearchMessagesParams, options?: RequestOptions$1) => Promise<LeadResearchMessage[]>;
1023
- };
1024
- message: {
1025
- send: (params: SendLeadResearchMessageParams, options?: RequestOptions$1) => Promise<SendLeadResearchMessageResult>;
1026
- find: (params: FindLeadResearchMessagesParams, options?: RequestOptions$1) => Promise<LeadResearchMessage[]>;
1027
- };
1028
- email: {
1029
- validate: (params: ValidateLeadEmailParams, options?: RequestOptions$1) => Promise<LeadEmailValidationResult>;
1030
- };
1031
- createRun: (params: CreateLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
1032
- findRuns: (params?: FindLeadResearchRunsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<LeadResearchRun>>;
1033
- getRun: (params: GetLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
1034
- updateRun: (params: UpdateLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
1035
- cancelRun: (params: CancelLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
1036
- sendMessage: (params: SendLeadResearchMessageParams, options?: RequestOptions$1) => Promise<SendLeadResearchMessageResult>;
1037
- findMessages: (params: FindLeadResearchMessagesParams, options?: RequestOptions$1) => Promise<LeadResearchMessage[]>;
1038
- validateEmail: (params: ValidateLeadEmailParams, options?: RequestOptions$1) => Promise<LeadEmailValidationResult>;
1039
- };
1040
- activity: {
1041
- timeline(params: TimelineParams, options?: RequestOptions$1): Promise<{
1042
- items: Activity[];
1043
- cursor: string | null;
1044
- }>;
1045
- find(params: FindActivitiesParams, options?: RequestOptions$1): Promise<{
1046
- items: Activity[];
1047
- cursor: string | null;
1048
- }>;
1049
- };
1050
- };
1051
- leadResearch: {
1052
- run: {
1053
- create: (params: CreateLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
1054
- find: (params?: FindLeadResearchRunsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<LeadResearchRun>>;
1055
- get: (params: GetLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
1056
- update: (params: UpdateLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
1057
- cancel: (params: CancelLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
1058
- sendMessage: (params: SendLeadResearchMessageParams, options?: RequestOptions$1) => Promise<SendLeadResearchMessageResult>;
1059
- findMessages: (params: FindLeadResearchMessagesParams, options?: RequestOptions$1) => Promise<LeadResearchMessage[]>;
1060
- };
1061
- message: {
1062
- send: (params: SendLeadResearchMessageParams, options?: RequestOptions$1) => Promise<SendLeadResearchMessageResult>;
1063
- find: (params: FindLeadResearchMessagesParams, options?: RequestOptions$1) => Promise<LeadResearchMessage[]>;
1064
- };
1065
- email: {
1066
- validate: (params: ValidateLeadEmailParams, options?: RequestOptions$1) => Promise<LeadEmailValidationResult>;
1067
- };
1068
- createRun: (params: CreateLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
1069
- findRuns: (params?: FindLeadResearchRunsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<LeadResearchRun>>;
1070
- getRun: (params: GetLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
1071
- updateRun: (params: UpdateLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
1072
- cancelRun: (params: CancelLeadResearchRunParams, options?: RequestOptions$1) => Promise<LeadResearchRun>;
1073
- sendMessage: (params: SendLeadResearchMessageParams, options?: RequestOptions$1) => Promise<SendLeadResearchMessageResult>;
1074
- findMessages: (params: FindLeadResearchMessagesParams, options?: RequestOptions$1) => Promise<LeadResearchMessage[]>;
1075
- validateEmail: (params: ValidateLeadEmailParams, options?: RequestOptions$1) => Promise<LeadEmailValidationResult>;
1076
- };
1077
- automation: {
1078
- workflow: {
1079
- create: (params: CreateWorkflowParams, options?: RequestOptions$1) => Promise<Workflow>;
1080
- update: (params: UpdateWorkflowParams, options?: RequestOptions$1) => Promise<Workflow>;
1081
- delete: (params: DeleteWorkflowParams, options?: RequestOptions$1) => Promise<{
1082
- deleted: boolean;
1083
- }>;
1084
- get: (params: GetWorkflowParams, options?: RequestOptions$1) => Promise<Workflow>;
1085
- find: (params?: GetWorkflowsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Workflow>>;
1086
- trigger: (params: TriggerWorkflowParams, options?: RequestOptions$1) => Promise<WorkflowExecution>;
1087
- getExecutions: (params: GetWorkflowExecutionsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<WorkflowExecution>>;
1088
- getExecution: (params: GetWorkflowExecutionParams, options?: RequestOptions$1) => Promise<WorkflowExecution>;
1089
- };
1090
- support: {
1091
- agent: {
1092
- create(params: CreateSupportAgentParams, opts?: RequestOptions$1): Promise<SupportAgent>;
1093
- get(params: {
1094
- store_id: string;
1095
- id: string;
1096
- }, opts?: RequestOptions$1): Promise<SupportAgent>;
1097
- find(params: {
1098
- store_id: string;
1099
- status?: string;
1100
- limit?: number;
1101
- cursor?: string;
1102
- }, opts?: RequestOptions$1): Promise<{
1103
- items: SupportAgent[];
1104
- cursor?: string;
1105
- }>;
1106
- update(params: UpdateSupportAgentParams, opts?: RequestOptions$1): Promise<SupportAgent>;
1107
- delete(params: {
1108
- store_id: string;
1109
- id: string;
1110
- }, opts?: RequestOptions$1): Promise<void>;
1111
- };
1112
- conversation: {
1113
- find(params: {
1114
- store_id: string;
1115
- status?: string;
1116
- agent_id?: string;
1117
- limit?: number;
1118
- cursor?: string;
1119
- }, opts?: RequestOptions$1): Promise<{
1120
- items: SupportConversation[];
1121
- cursor?: string;
1122
- }>;
1123
- get(params: GetSupportConversationParams, opts?: RequestOptions$1): Promise<SupportConversationResponse>;
1124
- sendMessage(params: SendSupportMessageParams, opts?: RequestOptions$1): Promise<SupportConversationResponse>;
1125
- reply(params: ReplySupportConversationParams, opts?: RequestOptions$1): Promise<SupportConversationResponse>;
1126
- resolve(params: ResolveSupportConversationParams, opts?: RequestOptions$1): Promise<SupportConversation>;
1127
- assign(params: AssignSupportConversationParams, opts?: RequestOptions$1): Promise<SupportConversation>;
1128
- };
1129
- };
1130
- };
1131
- analytics: {
1132
- get(request: AnalyticsRequest, options?: RequestOptions$1 & {
1133
- store_id?: string;
1134
- }): Promise<AnalyticsResponse>;
1135
- };
1136
- setStoreId: (storeId: string) => void;
1137
- getStoreId: () => string;
1138
- setMarket: (market: string) => void;
1139
- getMarket: () => string;
1140
- setLocale: (locale: string) => void;
1141
- getLocale: () => string;
1142
- readonly session: AdminSession | null;
1143
- readonly isAuthenticated: boolean;
1144
- onAuthStateChanged(listener: AuthStateListener<AdminSession>): () => void;
1145
- logout(): Promise<void>;
1146
- extractBlockValues: typeof extractBlockValues;
1147
- utils: {
1148
- getImageUrl: (imageBlock: any, isBlock?: boolean) => any;
1149
- getBlockValue: (entry: any, blockKey: string) => any;
1150
- getBlockTextValue: (block: any, locale?: string) => string;
1151
- getBlockValues: (entry: any, blockKey: string) => any;
1152
- getBlockLabel: typeof getBlockLabel;
1153
- getBlockObjectValues: (entry: any, blockKey: string, locale?: string) => any;
1154
- getBlockFromArray: (entry: any, blockKey: string, locale?: string) => any;
1155
- formatBlockValue: typeof formatBlockValue;
1156
- prepareBlocksForSubmission: typeof prepareBlocksForSubmission;
1157
- extractBlockValues: typeof extractBlockValues;
1158
- formatPrice: (prices: any[]) => string;
1159
- getPriceAmount: (prices: any[]) => number;
1160
- formatPayment: typeof formatPayment;
1161
- formatMinor: typeof formatMinor;
1162
- getCurrencySymbol: typeof getCurrencySymbol;
1163
- getCurrencyName: typeof getCurrencyName;
1164
- validatePhoneNumber: typeof validatePhoneNumber;
1165
- tzGroups: {
1166
- label: string;
1167
- zones: {
1168
- label: string;
1169
- value: string;
1170
- }[];
1171
- }[];
1172
- findTimeZone: typeof findTimeZone;
1173
- slugify: typeof slugify;
1174
- humanize: typeof humanize;
1175
- categorify: typeof categorify;
1176
- formatDate: typeof formatDate;
1177
- getSvgContentForAstro: typeof getSvgContentForAstro;
1178
- fetchSvgContent: typeof fetchSvgContent;
1179
- injectSvgIntoElement: typeof injectSvgIntoElement;
1180
- isValidKey: typeof isValidKey;
1181
- validateKey: typeof validateKey;
1182
- toKey: typeof toKey;
1183
- nameToKey: typeof nameToKey;
1184
- getAvailableStock: typeof getAvailableStock;
1185
- getReservedStock: typeof getReservedStock;
1186
- hasStock: typeof hasStock;
1187
- getInventoryAt: typeof getInventoryAt;
1188
- getFirstAvailableFCId: typeof getFirstAvailableFCId;
1189
- };
1190
- };
1191
- type CreateStorefrontConfig = Omit<HttpClientConfig, "authStorage" | "storeId"> & {
1192
- storeId: string;
1193
- market?: string;
1194
- locale?: string;
1195
- apiToken?: string;
1196
- };
1197
- declare function createStorefront(config: CreateStorefrontConfig): {
1198
- identify: (params?: {
1199
- email?: string;
1200
- verify?: boolean;
1201
- market?: string;
1202
- }) => Promise<ProfileSession>;
1203
- verify: (params: {
1204
- code: string;
1205
- }) => Promise<ProfileToken>;
1206
- logout: () => Promise<void>;
1207
- me: () => Promise<ProfileDetail>;
1208
- readonly session: ProfileSession | null;
1209
- readonly isAuthenticated: boolean;
1210
- onAuthStateChanged(listener: AuthStateListener<ProfileSession>): () => void;
1211
- store: {
1212
- getStore(options?: RequestOptions$1): Promise<Store>;
1213
- location: {
1214
- getCountries(options?: RequestOptions$1): Promise<{
1215
- items: {
1216
- code: string;
1217
- name: string;
1218
- states: {
1219
- code: string;
1220
- name: string;
1221
- }[];
1222
- }[];
1223
- cursor: string | null;
1224
- }>;
1225
- getCountry(countryCode: string, options?: RequestOptions$1): Promise<{
1226
- code: string;
1227
- name: string;
1228
- states: {
1229
- code: string;
1230
- name: string;
1231
- }[];
1232
- }>;
1233
- list(options?: RequestOptions$1): Promise<Location[]>;
1234
- get(id: string, options?: RequestOptions$1): Promise<Location>;
1235
- };
1236
- market: {
1237
- list(options?: RequestOptions$1): Promise<Market[]>;
1238
- get(id: string, options?: RequestOptions$1): Promise<Market>;
1239
- };
1240
- };
1241
- cart: CartController;
1242
- cms: {
1243
- node: {
1244
- get(params: GetNodeParams, options?: RequestOptions$1): Promise<{
1245
- getBlock(key: string): any;
1246
- getBlockValues(key: string): any;
1247
- getImage(key: string): any;
1248
- id: string;
1249
- key: string;
1250
- store_id: string;
1251
- parent_id?: string | null;
1252
- blocks: Block[];
1253
- taxonomies: TaxonomyEntry[];
1254
- status: NodeStatus;
1255
- slug: Record<string, string>;
1256
- children: Node[];
1257
- created_at: number;
1258
- updated_at: number;
1259
- }>;
1260
- find(params: GetNodesParams, options?: RequestOptions$1): Promise<PaginatedResponse<Node>>;
1261
- getChildren(params: GetNodeChildrenParams, options?: RequestOptions$1): Promise<PaginatedResponse<Node>>;
1262
- };
1263
- form: {
1264
- get(params: GetFormParams, options?: RequestOptions$1): Promise<Form>;
1265
- submit(params: SubmitFormParams, options?: RequestOptions$1): Promise<FormSubmission>;
1266
- };
1267
- taxonomy: {
1268
- get(params: GetTaxonomyParams, options?: RequestOptions$1): Promise<Taxonomy>;
1269
- getChildren(params: GetTaxonomyChildrenParams, options?: RequestOptions$1): Promise<PaginatedResponse<Taxonomy>>;
1270
- };
1271
- };
1272
- eshop: {
1273
- product: {
1274
- get(params: GetProductParams, options?: RequestOptions$1): Promise<Product>;
1275
- find(params: GetProductsParams, options?: RequestOptions$1): Promise<PaginatedResponse<Product>>;
1276
- };
1277
- cart: {
1278
- current(params?: GetCurrentCartParams, options?: RequestOptions$1): Promise<Cart>;
1279
- get(params: GetCartParams, options?: RequestOptions$1): Promise<Cart>;
1280
- update(params: UpdateCartParams, options?: RequestOptions$1): Promise<Cart>;
1281
- addItem(params: AddCartItemParams, options?: RequestOptions$1): Promise<Cart>;
1282
- removeItem(params: RemoveCartItemParams, options?: RequestOptions$1): Promise<Cart>;
1283
- clear(params: ClearCartParams, options?: RequestOptions$1): Promise<Cart>;
1284
- quote(params: QuoteCartParams, options?: RequestOptions$1): Promise<OrderQuote>;
1285
- checkout(params: CheckoutCartParams, options?: RequestOptions$1): Promise<OrderCheckoutResult>;
1286
- };
1287
- order: {
1288
- get(params: GetOrderParams, options?: RequestOptions$1): Promise<Order>;
1289
- find(params: GetOrdersParams, options?: RequestOptions$1): Promise<PaginatedResponse<Order>>;
1290
- };
1291
- service: {
1292
- get(params: GetServiceParams, options?: RequestOptions$1): Promise<Service>;
1293
- find(params: GetServicesParams, options?: RequestOptions$1): Promise<PaginatedResponse<Service>>;
1294
- findProviders(params: FindServiceProvidersParams, options?: RequestOptions$1): Promise<Provider[]>;
1295
- getAvailability(params: GetAvailabilityParams, options?: RequestOptions$1): Promise<AvailabilityResponse>;
1296
- };
1297
- provider: {
1298
- get(params: GetProviderParams, options?: RequestOptions$1): Promise<Provider>;
1299
- find(params: GetProvidersParams, options?: RequestOptions$1): Promise<PaginatedResponse<Provider>>;
1300
- };
1301
- };
1302
- crm: {
1303
- profile: {
1304
- identify(params?: {
1305
- email?: string;
1306
- verify?: boolean;
1307
- market?: string;
1308
- }, options?: RequestOptions$1): Promise<IdentifyResponse>;
1309
- verify(params: {
1310
- code: string;
1311
- }, options?: RequestOptions$1): Promise<VerifyResponse>;
1312
- logout(options?: RequestOptions$1): Promise<void>;
1313
- getMe(options?: RequestOptions$1): Promise<ProfileDetail>;
1314
- };
1315
- profileList: {
1316
- get(params: GetProfileListParams, options?: RequestOptions$1): Promise<ProfileList>;
1317
- find(params?: FindProfileListsParams, options?: RequestOptions$1): Promise<PaginatedResponse<ProfileList>>;
1318
- subscribe(params: SubscribeProfileListParams, options?: RequestOptions$1): Promise<ProfileListSubscribeResponse>;
1319
- checkAccess(params: ProfileListAccessParams, options?: RequestOptions$1): Promise<ProfileListAccessResponse>;
1320
- unsubscribe(token: string, options?: RequestOptions$1): Promise<{
1321
- unsubscribed: boolean;
1322
- }>;
1323
- confirm(token: string, options?: RequestOptions$1): Promise<{
1324
- confirmed: boolean;
1325
- }>;
1326
- };
1327
- };
1328
- activity: {
1329
- COMMON_ACTIVITY_TYPES: readonly ["page_view", "product_view", "service_view", "provider_view", "cart_added", "cart_removed", "checkout_started", "purchase", "order_created", "signin", "signup", "verified_email", "search", "share", "wishlist_added"];
1330
- track(params: TrackParams): Promise<void>;
1331
- };
1332
- support: {
1333
- startConversation(params?: Omit<StartSupportConversationParams, "store_id">, opts?: RequestOptions$1): Promise<SupportConversationResponse>;
1334
- sendMessage(params: Omit<SendSupportMessageParams, "store_id">, opts?: RequestOptions$1): Promise<SupportConversationResponse>;
1335
- getConversation(params: Omit<GetSupportConversationParams, "store_id">, opts?: RequestOptions$1): Promise<SupportConversationResponse>;
1336
- };
1337
- setStoreId: (storeId: string) => void;
1338
- getStoreId: () => string;
1339
- setMarket: (key: string) => void;
1340
- getMarket: () => string;
1341
- setLocale: (l: string) => void;
1342
- getLocale: () => string;
1343
- extractBlockValues: typeof extractBlockValues;
1344
- utils: {
1345
- getImageUrl: (imageBlock: any, isBlock?: boolean) => any;
1346
- getBlockValue: (entry: any, blockKey: string) => any;
1347
- getBlockTextValue: (block: any, locale?: string) => string;
1348
- getBlockValues: (entry: any, blockKey: string) => any;
1349
- getBlockLabel: typeof getBlockLabel;
1350
- getBlockObjectValues: (entry: any, blockKey: string, locale?: string) => any;
1351
- getBlockFromArray: (entry: any, blockKey: string, locale?: string) => any;
1352
- formatBlockValue: typeof formatBlockValue;
1353
- prepareBlocksForSubmission: typeof prepareBlocksForSubmission;
1354
- extractBlockValues: typeof extractBlockValues;
1355
- formatPrice: (prices: any[]) => string;
1356
- getPriceAmount: (prices: any[]) => number;
1357
- formatPayment: typeof formatPayment;
1358
- formatMinor: typeof formatMinor;
1359
- getCurrencySymbol: typeof getCurrencySymbol;
1360
- getCurrencyName: typeof getCurrencyName;
1361
- validatePhoneNumber: typeof validatePhoneNumber;
1362
- tzGroups: {
1363
- label: string;
1364
- zones: {
1365
- label: string;
1366
- value: string;
1367
- }[];
1368
- }[];
1369
- findTimeZone: typeof findTimeZone;
1370
- slugify: typeof slugify;
1371
- humanize: typeof humanize;
1372
- categorify: typeof categorify;
1373
- formatDate: typeof formatDate;
1374
- getSvgContentForAstro: typeof getSvgContentForAstro;
1375
- fetchSvgContent: typeof fetchSvgContent;
1376
- injectSvgIntoElement: typeof injectSvgIntoElement;
1377
- isValidKey: typeof isValidKey;
1378
- validateKey: typeof validateKey;
1379
- toKey: typeof toKey;
1380
- nameToKey: typeof nameToKey;
1381
- getAvailableStock: typeof getAvailableStock;
1382
- getReservedStock: typeof getReservedStock;
1383
- hasStock: typeof hasStock;
1384
- getInventoryAt: typeof getInventoryAt;
1385
- getFirstAvailableFCId: typeof getFirstAvailableFCId;
1386
- };
1387
- };
1388
-
1389
- export { type LocationState as $, type AuthStateListener as A, type CartControllerInitParams as B, type CreateStorefrontConfig as C, type CartControllerListener as D, type CartControllerQuoteParams 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 HttpClientConfig as L, type AuthStorage as M, SDK_VERSION as N, SUPPORTED_FRAMEWORKS as O, type ProfileSession as P, type ApiConfig as Q, type AdminSessionInternal as R, type StartSupportConversationParams as S, type TrackParams as T, type ProfileSessionInternal as U, type VerifyResponse as V, type AdminSession as W, type AdminSessionUpdater as X, type ProfileSessionUpdater as Y, type CreateAdminConfig as Z, createAdmin as _, type ProfileToken as a, type LocationCountry as a0, type GetCountriesResponse as a1, type AnalyticsTimeRange as a2, type AnalyticsReportKey as a3, type AnalyticsMetricReportKey as a4, type AnalyticsBreakdownReportKey as a5, type AnalyticsActivityReportKey as a6, type AnalyticsCompositeReportKey as a7, type AnalyticsReportRequest as a8, type AnalyticsBlockRequest as a9, type SupportMessage as aA, type SupportAgentNode as aB, type SupportAgentEdge as aC, type SupportAgentAiConfig as aD, type EdgeTrigger as aE, type SupportAction as aF, type AssignSupportConversationParams as aG, type ReplySupportConversationParams as aH, type ResolveSupportConversationParams as aI, type IntegrationOperation as aJ, type IntegrationResource as aK, type IntegrationService as aL, type AnalyticsRequest as aa, type AnalyticsMetricData as ab, type AnalyticsBreakdownItem as ac, type AnalyticsBreakdownData as ad, type BusinessOverviewData as ae, type RevenueByCurrencyData as af, type ProfileFunnelStage as ag, type ProfileFunnelData as ah, type OutreachOverviewData as ai, type OutreachFunnelStage as aj, type OutreachFunnelData as ak, type OutreachVariantPerformanceItem as al, type OutreachVariantPerformanceData as am, type EntityStatusOverviewData as an, type DataHealthData as ao, type AnalyticsReport as ap, type AnalyticsBlockResponse as aq, type AnalyticsResponse as ar, type ActivityFeedCategory as as, type ActivityFeedItem as at, type ActivityFeedSummary as au, type ActivityFeedCursor as av, type ActivityFeedData as aw, type TimelineParams as ax, type SupportAgent as ay, type SupportConversation as az, type CartController as b, type SupportConversationResponse as c, type SendSupportMessageParams as d, extractBlockValues as e, formatBlockValue as f, getBlockLabel as g, findTimeZone as h, humanize as i, categorify as j, formatDate as k, getSvgContentForAstro as l, fetchSvgContent as m, injectSvgIntoElement as n, type Activity$1 as o, prepareBlocksForSubmission as p, COMMON_ACTIVITY_TYPES as q, createStorefront as r, slugify as s, createCartController as t, type CommonActivityType as u, validatePhoneNumber as v, type CartApi as w, type CartControllerAddItemParams as x, type CartControllerCheckoutParams as y, type CartControllerClearParams as z };