arky-sdk 0.7.121 → 0.7.123

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,996 @@
1
+ import { Cart, OrderQuote, OrderCheckoutResult, GetCurrentCartParams, GetCartParams, RequestOptions as RequestOptions$1, AddCartItemParams, UpdateCartParams, RemoveCartItemParams, ClearCartParams, QuoteCartParams, CheckoutCartParams, Customer, Store, Market, AuthToken, MagicLinkVerifyParams, MagicLinkRequestParams, UpdateAccountProfileParams, AccountUpdateResponse, DeleteAccountParams, GetMeParams, Account, SearchAccountsParams, Location, CreateLocationParams, UpdateLocationParams, DeleteLocationParams, CreateMarketParams, UpdateMarketParams, DeleteMarketParams, CreateStoreParams, UpdateStoreParams, DeleteStoreParams, GetStoreParams, GetStoresParams, PaginatedResponse, GetSubscriptionPlansParams, SubscriptionPlan, SubscribeParams, CreatePortalSessionParams, InviteUserParams, RemoveMemberParams, HandleInvitationParams, TestWebhookParams, GetStoreMediaParams2, Media, OAuthConnectParams, Integration, OAuthDisconnectParams, ListIntegrationsParams, CreateIntegrationParams, UpdateIntegrationParams, DeleteIntegrationParams, ListWebhooksParams, Webhook, CreateWebhookParams, UpdateWebhookParams, DeleteWebhookParams, GetMediaParams, UploadStoreMediaParams, DeleteStoreMediaParams, GetStoreMediaParams, UpdateMediaParams, TrackEmailOpenParams, TriggerNotificationParams, CreatePromoCodeParams, PromoCode, UpdatePromoCodeParams, DeletePromoCodeParams, GetPromoCodeParams, GetPromoCodesParams, GetShippingRatesParams, ShippingRate, ShipParams, ShipResult, CreateNodeParams, Node, UpdateNodeParams, DeleteNodeParams, GetNodeParams, Block, TaxonomyEntry, NodeStatus, GetNodesParams, GetNodeChildrenParams, CreateFormParams, Form, UpdateFormParams, DeleteFormParams, GetFormParams, GetFormsParams, SubmitFormParams, FormSubmission, GetFormSubmissionsParams, GetFormSubmissionParams, UpdateFormSubmissionParams, CreateTaxonomyParams, Taxonomy, UpdateTaxonomyParams, DeleteTaxonomyParams, GetTaxonomyParams, GetTaxonomiesParams, GetTaxonomyChildrenParams, CreateEmailTemplateParams, EmailTemplate, UpdateEmailTemplateParams, DeleteEmailTemplateParams, GetEmailTemplateParams, GetEmailTemplatesParams, CreateProductParams, Product, UpdateProductParams, DeleteProductParams, GetProductParams, GetProductsParams, UpdateOrderParams, Order, GetOrderParams, GetOrdersParams, GetQuoteParams, ProcessOrderRefundParams, CreateCartParams, FindCartsParams, CreateServiceParams, Service, UpdateServiceParams, DeleteServiceParams, GetServiceParams, GetServicesParams, GetAvailabilityParams, AvailabilityResponse, FindServiceProvidersParams, ServiceProvider, CreateServiceProviderParams, UpdateServiceProviderParams, DeleteServiceProviderParams, CreateProviderParams, Provider, UpdateProviderParams, DeleteProviderParams, GetProviderParams, GetProvidersParams, CreateCustomerParams, GetCustomerParams, CustomerDetail, FindCustomersParams, UpdateCustomerParams, MergeCustomersParams, CreateAudienceParams, Audience, UpdateAudienceParams, GetAudienceParams, GetAudiencesParams, GetAudienceSubscribersParams, AudienceSubscriber, AddAudienceSubscriberParams, AddAudienceSubscriberResponse, RemoveAudienceSubscriberParams, FindActivitiesParams, CreateAgentParams, Agent, UpdateAgentParams, DeleteAgentParams, GetAgentParams, GetAgentsParams, RunAgentParams, AgentChatMessage, GetAgentChatsParams, AgentChat, GetAgentChatParams, UpdateAgentChatParams, RateAgentChatParams, GetStoreChatsParams, CreateWorkflowParams, Workflow, UpdateWorkflowParams, DeleteWorkflowParams, GetWorkflowParams, GetWorkflowsParams, TriggerWorkflowParams, WorkflowExecution, GetWorkflowExecutionsParams, GetWorkflowExecutionParams, SubscribeAudienceParams, AudienceSubscribeResponse, AudienceAccessResponse } from './types.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-C5gikdBg.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 CustomerToken = {
58
+ id: string;
59
+ token: string;
60
+ created_at: number;
61
+ };
62
+ type IdentifyResponse = {
63
+ customer: Customer;
64
+ token: CustomerToken;
65
+ store: Store;
66
+ market: Market | null;
67
+ code_sent: boolean;
68
+ };
69
+ type VerifyResponse = CustomerToken;
70
+ interface Activity$1 {
71
+ store_id: string;
72
+ customer_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
+ type EntityKind = "product" | "service" | "provider" | "node" | "customer" | "audience" | "agent" | "workflow" | "promo_code" | "email_template" | "form" | "taxonomy" | "media" | "order";
85
+ type Granularity = "hour" | "day" | "week" | "month" | {
86
+ minutes: 5 | 10 | 15 | 30;
87
+ };
88
+ type Measure = "count" | "uniq_customers" | "orders_created" | "new_customers" | "form_submissions" | {
89
+ entity_state: {
90
+ entity: EntityKind;
91
+ status: string;
92
+ };
93
+ };
94
+ type Dimension = "country_code" | "city" | "device_type" | "browser" | "os" | "language" | "activity_type" | "entity" | "entity_status" | {
95
+ time_bucket: {
96
+ granularity: Granularity;
97
+ };
98
+ };
99
+ type FilterField = "type" | "country_code" | "device_type" | "browser" | "os" | "language" | "entity" | "action" | "customer_id";
100
+ type FilterOp = "eq" | "neq" | "in" | "not_in" | "contains";
101
+ interface Filter {
102
+ field: FilterField;
103
+ op: FilterOp;
104
+ values: string[];
105
+ }
106
+ type TimeUnit = "hour" | "day" | "week" | "month";
107
+ type TimeRange = {
108
+ from: number;
109
+ unit: TimeUnit;
110
+ to?: number;
111
+ } | {
112
+ from: number;
113
+ to: number;
114
+ };
115
+ interface OrderBy {
116
+ field: string;
117
+ dir: "asc" | "desc";
118
+ }
119
+ interface AnalyticsQuery {
120
+ measures: Measure[];
121
+ dimensions?: Dimension[];
122
+ filters?: Filter[];
123
+ time_range: TimeRange;
124
+ granularity?: Granularity;
125
+ order_by?: OrderBy[];
126
+ limit?: number;
127
+ }
128
+ interface AnalyticsRow {
129
+ [key: string]: string | number | null;
130
+ }
131
+ interface AnalyticsQueryResponse {
132
+ rows: AnalyticsRow[];
133
+ meta: {
134
+ row_count: number;
135
+ execution_ms: number;
136
+ };
137
+ }
138
+
139
+ interface Activity {
140
+ id: string;
141
+ store_id: string;
142
+ customer_id: string;
143
+ type: string;
144
+ payload: Record<string, unknown>;
145
+ created_at: number;
146
+ country_code?: string | null;
147
+ city?: string | null;
148
+ region?: string | null;
149
+ timezone?: string | null;
150
+ device_type?: string | null;
151
+ browser?: string | null;
152
+ os?: string | null;
153
+ language?: string | null;
154
+ session_idx?: number | null;
155
+ }
156
+ interface TimelineParams {
157
+ customer_id: string;
158
+ store_id?: string;
159
+ limit?: number;
160
+ cursor?: string;
161
+ }
162
+
163
+ interface IntegrationOperation {
164
+ name: string;
165
+ value: string;
166
+ description?: string;
167
+ method: 'get' | 'post' | 'put' | 'patch' | 'delete';
168
+ url: string;
169
+ body?: Record<string, unknown> | string;
170
+ headers?: Record<string, string>;
171
+ }
172
+ interface IntegrationResource {
173
+ name: string;
174
+ value: string;
175
+ operations: IntegrationOperation[];
176
+ }
177
+ interface IntegrationService {
178
+ id: string;
179
+ name: string;
180
+ description: string;
181
+ icon: string;
182
+ color: string;
183
+ category: 'ai' | 'communication' | 'email' | 'productivity' | 'payments' | 'crm' | 'ecommerce' | 'developer' | 'storage' | 'analytics' | 'deploy' | 'core';
184
+ configurationRequired: boolean;
185
+ website?: string;
186
+ docsUrl?: string;
187
+ urlPatterns: string[];
188
+ resources: IntegrationResource[];
189
+ triggers?: Array<{
190
+ name: string;
191
+ value: string;
192
+ description: string;
193
+ webhookType: 'incoming' | 'polling';
194
+ }>;
195
+ }
196
+
197
+ interface InvitationTokenData {
198
+ auth: AuthToken;
199
+ store_id?: string | null;
200
+ }
201
+
202
+ interface LocationState {
203
+ code: string;
204
+ name: string;
205
+ }
206
+ interface LocationCountry {
207
+ code: string;
208
+ name: string;
209
+ states: LocationState[];
210
+ }
211
+ interface GetCountriesResponse {
212
+ items: LocationCountry[];
213
+ cursor: string | null;
214
+ }
215
+
216
+ interface QueryParams {
217
+ [key: string]: string | number | boolean | string[] | number[] | null | undefined;
218
+ }
219
+
220
+ interface TokenSet {
221
+ access_token: string;
222
+ refresh_token?: string;
223
+ access_expires_at?: number;
224
+ }
225
+ interface AuthStorage {
226
+ getTokens(): TokenSet | null;
227
+ onTokensRefreshed(tokens: TokenSet): void;
228
+ onForcedLogout(): void;
229
+ }
230
+ interface RequestSuccessContext<T = unknown> {
231
+ data: T;
232
+ method: string;
233
+ url: string;
234
+ status: number;
235
+ request?: unknown;
236
+ duration_ms?: number;
237
+ request_id?: string | null;
238
+ }
239
+ interface RequestErrorContext {
240
+ error: unknown;
241
+ method: string;
242
+ url: string;
243
+ status?: number;
244
+ request?: unknown;
245
+ response?: unknown;
246
+ duration_ms?: number;
247
+ request_id?: string | null;
248
+ aborted?: boolean;
249
+ }
250
+ interface RequestOptions<T = unknown> {
251
+ headers?: Record<string, string>;
252
+ params?: QueryParams | Record<string, any>;
253
+ transformRequest?: (data: unknown) => unknown;
254
+ onSuccess?: (ctx: RequestSuccessContext<T>) => void | Promise<void>;
255
+ onError?: (ctx: RequestErrorContext) => void | Promise<void>;
256
+ }
257
+ interface HttpClient {
258
+ get<T>(path: string, opts?: RequestOptions<T>): Promise<T>;
259
+ post<T>(path: string, body: unknown, opts?: RequestOptions<T>): Promise<T>;
260
+ put<T>(path: string, body: unknown, opts?: RequestOptions<T>): Promise<T>;
261
+ patch<T>(path: string, body: unknown, opts?: RequestOptions<T>): Promise<T>;
262
+ delete<T>(path: string, opts?: RequestOptions<T>): Promise<T>;
263
+ }
264
+ interface HttpClientConfig {
265
+ baseUrl: string;
266
+ storeId: string;
267
+ authStorage: AuthStorage;
268
+ refreshPath?: string | (() => string);
269
+ navigate?: (path: string) => void;
270
+ loginFallbackPath?: string;
271
+ }
272
+
273
+ declare function getBlockLabel(block: any): string;
274
+ declare function formatBlockValue(block: any): string;
275
+ declare function prepareBlocksForSubmission(formData: any, blockTypes?: Record<string, string>): any[];
276
+ declare function extractBlockValues(blocks: any[]): Record<string, any>;
277
+
278
+ interface ValidationResult {
279
+ isValid: boolean;
280
+ error?: string;
281
+ }
282
+ declare function validatePhoneNumber(phone: string): ValidationResult;
283
+
284
+ declare const tzGroups: {
285
+ label: string;
286
+ zones: {
287
+ label: string;
288
+ value: string;
289
+ }[];
290
+ }[];
291
+ declare function findTimeZone(groups: typeof tzGroups): string;
292
+
293
+ declare const locales: readonly ["en", "sr-latn"];
294
+ declare function slugify(text: string): string;
295
+ declare function humanize(text: string): string;
296
+ declare function categorify(text: string): string;
297
+ declare function formatDate(date: string | number | Date, locale: (typeof locales)[number]): string;
298
+
299
+ declare function fetchSvgContent(mediaObject: any): Promise<string | null>;
300
+ declare function getSvgContentForAstro(mediaObject: any): Promise<string>;
301
+ declare function injectSvgIntoElement(mediaObject: any, targetElement: HTMLElement, className?: string): Promise<void>;
302
+
303
+ declare const SDK_VERSION = "0.7.120";
304
+ declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
305
+
306
+ interface ApiConfig {
307
+ httpClient: HttpClient;
308
+ storeId: string;
309
+ baseUrl: string;
310
+ market: string;
311
+ locale: string;
312
+ authStorage: AuthStorage;
313
+ }
314
+ interface AdminSessionInternal {
315
+ access_token: string;
316
+ refresh_token: string;
317
+ access_expires_at?: number;
318
+ email?: string;
319
+ }
320
+ interface CustomerSessionInternal {
321
+ access_token: string;
322
+ customer: Customer;
323
+ store: Store;
324
+ market: Market | null;
325
+ }
326
+ interface AdminSession {
327
+ email?: string;
328
+ }
329
+ interface CustomerSession {
330
+ customer: Customer;
331
+ store: Store;
332
+ market: Market | null;
333
+ }
334
+ type AdminSessionUpdater = (updater: (prev: AdminSessionInternal | null) => AdminSessionInternal | null) => void;
335
+ type CustomerSessionUpdater = (updater: (prev: CustomerSessionInternal | null) => CustomerSessionInternal | null) => void;
336
+ type AuthStateListener<T> = (session: T | null) => void;
337
+
338
+ type CreateAdminConfig = Omit<HttpClientConfig, "authStorage" | "storeId"> & {
339
+ storeId: string;
340
+ market: string;
341
+ locale?: string;
342
+ apiToken?: string;
343
+ };
344
+ declare function createAdmin(config: CreateAdminConfig): {
345
+ auth: {
346
+ code(params: {
347
+ email: string;
348
+ }, options?: RequestOptions$1): Promise<{
349
+ sent: boolean;
350
+ }>;
351
+ verify(params: MagicLinkVerifyParams, options?: RequestOptions$1): Promise<AuthToken>;
352
+ refresh(params: {
353
+ refresh_token: string;
354
+ }, options?: RequestOptions$1): Promise<AuthToken>;
355
+ storeCode(storeId: string, params: {
356
+ email: string;
357
+ }, options?: RequestOptions$1): Promise<{
358
+ sent: boolean;
359
+ }>;
360
+ storeVerify(storeId: string, params: MagicLinkVerifyParams, options?: RequestOptions$1): Promise<AuthToken>;
361
+ magicLink(params: MagicLinkRequestParams, options?: RequestOptions$1): Promise<{
362
+ sent: boolean;
363
+ }>;
364
+ };
365
+ account: {
366
+ updateAccount(params: UpdateAccountProfileParams, options?: RequestOptions$1): Promise<AccountUpdateResponse>;
367
+ deleteAccount(_params: DeleteAccountParams, options?: RequestOptions$1): Promise<{
368
+ deleted: boolean;
369
+ }>;
370
+ getMe(_params: GetMeParams, options?: RequestOptions$1): Promise<Account>;
371
+ searchAccounts(params: SearchAccountsParams, options?: RequestOptions$1): Promise<{
372
+ items: Account[];
373
+ cursor?: string | null;
374
+ }>;
375
+ };
376
+ store: {
377
+ location: {
378
+ getCountries(options?: RequestOptions$1): Promise<GetCountriesResponse>;
379
+ getCountry(countryCode: string, options?: RequestOptions$1): Promise<LocationCountry>;
380
+ list(options?: RequestOptions$1): Promise<Location[]>;
381
+ get(id: string, options?: RequestOptions$1): Promise<Location>;
382
+ create(params: CreateLocationParams, options?: RequestOptions$1): Promise<Location>;
383
+ update(params: UpdateLocationParams, options?: RequestOptions$1): Promise<Location>;
384
+ delete(params: DeleteLocationParams, options?: RequestOptions$1): Promise<{
385
+ deleted: boolean;
386
+ }>;
387
+ };
388
+ market: {
389
+ list(options?: RequestOptions$1): Promise<Market[]>;
390
+ get(id: string, options?: RequestOptions$1): Promise<Market>;
391
+ create(params: CreateMarketParams, options?: RequestOptions$1): Promise<Market>;
392
+ update(params: UpdateMarketParams, options?: RequestOptions$1): Promise<Market>;
393
+ delete(params: DeleteMarketParams, options?: RequestOptions$1): Promise<{
394
+ deleted: boolean;
395
+ }>;
396
+ };
397
+ createStore(params: CreateStoreParams, options?: RequestOptions$1): Promise<Store>;
398
+ updateStore(params: UpdateStoreParams, options?: RequestOptions$1): Promise<Store>;
399
+ deleteStore(params: DeleteStoreParams, options?: RequestOptions$1): Promise<{
400
+ deleted: boolean;
401
+ }>;
402
+ getStore(_params: GetStoreParams, options?: RequestOptions$1): Promise<Store>;
403
+ getStores(params?: GetStoresParams, options?: RequestOptions$1): Promise<PaginatedResponse<Store>>;
404
+ getSubscriptionPlans(_params: GetSubscriptionPlansParams, options?: RequestOptions$1): Promise<PaginatedResponse<SubscriptionPlan>>;
405
+ subscribe(params: SubscribeParams, options?: RequestOptions$1): Promise<{
406
+ checkout_url?: string;
407
+ }>;
408
+ createPortalSession(params: CreatePortalSessionParams, options?: RequestOptions$1): Promise<{
409
+ portal_url: string;
410
+ }>;
411
+ inviteUser(params: InviteUserParams, options?: RequestOptions$1): Promise<{
412
+ invited: boolean;
413
+ }>;
414
+ removeMember(params: RemoveMemberParams, options?: RequestOptions$1): Promise<{
415
+ removed: boolean;
416
+ }>;
417
+ handleInvitation(params: HandleInvitationParams, options?: RequestOptions$1): Promise<InvitationTokenData>;
418
+ testWebhook(params: TestWebhookParams, options?: RequestOptions$1): Promise<{
419
+ tested: boolean;
420
+ }>;
421
+ getStoreMedia(params: GetStoreMediaParams2, options?: RequestOptions$1): Promise<PaginatedResponse<Media>>;
422
+ oauthConnect(params: OAuthConnectParams, options?: RequestOptions$1): Promise<Integration>;
423
+ oauthDisconnect(params: OAuthDisconnectParams, options?: RequestOptions$1): Promise<{
424
+ disconnected: boolean;
425
+ }>;
426
+ listIntegrations(params: ListIntegrationsParams, options?: RequestOptions$1): Promise<Integration[]>;
427
+ createIntegration(params: CreateIntegrationParams, options?: RequestOptions$1): Promise<Integration>;
428
+ updateIntegration(params: UpdateIntegrationParams, options?: RequestOptions$1): Promise<Integration>;
429
+ deleteIntegration(params: DeleteIntegrationParams, options?: RequestOptions$1): Promise<{
430
+ deleted: boolean;
431
+ }>;
432
+ getIntegrationConfig(params: {
433
+ store_id: string;
434
+ type: "payment" | "shipping";
435
+ }, options?: RequestOptions$1): Promise<unknown>;
436
+ listWebhooks(params: ListWebhooksParams, options?: RequestOptions$1): Promise<Webhook[]>;
437
+ createWebhook(params: CreateWebhookParams, options?: RequestOptions$1): Promise<Webhook>;
438
+ updateWebhook(params: UpdateWebhookParams, options?: RequestOptions$1): Promise<Webhook>;
439
+ deleteWebhook(params: DeleteWebhookParams, options?: RequestOptions$1): Promise<{
440
+ deleted: boolean;
441
+ }>;
442
+ };
443
+ media: {
444
+ getMedia(params: GetMediaParams, options?: RequestOptions$1): Promise<Media>;
445
+ uploadStoreMedia(params: UploadStoreMediaParams, _options?: RequestOptions$1): Promise<Media[]>;
446
+ deleteStoreMedia(params: DeleteStoreMediaParams, options?: RequestOptions$1): Promise<{
447
+ deleted: boolean;
448
+ }>;
449
+ getStoreMedia(params: GetStoreMediaParams, _options?: RequestOptions$1): Promise<PaginatedResponse<Media>>;
450
+ updateMedia(params: UpdateMediaParams, options?: RequestOptions$1): Promise<Media>;
451
+ };
452
+ notification: {
453
+ trackEmailOpen(params: TrackEmailOpenParams, options?: RequestOptions$1): Promise<void>;
454
+ trigger(params: TriggerNotificationParams, options?: RequestOptions$1): Promise<{
455
+ triggered: boolean;
456
+ }>;
457
+ };
458
+ promoCode: {
459
+ createPromoCode(params: CreatePromoCodeParams, options?: RequestOptions$1): Promise<PromoCode>;
460
+ updatePromoCode(params: UpdatePromoCodeParams, options?: RequestOptions$1): Promise<PromoCode>;
461
+ deletePromoCode(params: DeletePromoCodeParams, options?: RequestOptions$1): Promise<{
462
+ deleted: boolean;
463
+ }>;
464
+ getPromoCode(params: GetPromoCodeParams, options?: RequestOptions$1): Promise<PromoCode>;
465
+ getPromoCodes(params: GetPromoCodesParams, options?: RequestOptions$1): Promise<PaginatedResponse<PromoCode>>;
466
+ };
467
+ platform: {
468
+ getCurrencies(options?: RequestOptions$1): Promise<string[]>;
469
+ getIntegrationServices(options?: RequestOptions$1): Promise<IntegrationService[]>;
470
+ getWebhookEvents(options?: RequestOptions$1): Promise<{
471
+ data: string[];
472
+ }>;
473
+ data: {
474
+ scan(params: {
475
+ key: string;
476
+ limit?: number;
477
+ }, options?: RequestOptions$1): Promise<{
478
+ value: Array<{
479
+ key: string;
480
+ value: unknown;
481
+ }>;
482
+ }>;
483
+ put(params: {
484
+ key: string;
485
+ value: unknown;
486
+ oldKey?: string;
487
+ }, options?: RequestOptions$1): Promise<{
488
+ ok: boolean;
489
+ }>;
490
+ delete(params: {
491
+ key: string;
492
+ }, options?: RequestOptions$1): Promise<{
493
+ ok: boolean;
494
+ }>;
495
+ };
496
+ runScript(params: {
497
+ name: string;
498
+ value?: string;
499
+ username?: string;
500
+ password?: string;
501
+ }, options?: RequestOptions$1): Promise<{
502
+ message: string;
503
+ }>;
504
+ };
505
+ shipping: {
506
+ getRates(params: GetShippingRatesParams, options?: RequestOptions$1): Promise<{
507
+ rates: ShippingRate[];
508
+ }>;
509
+ ship(params: ShipParams, options?: RequestOptions$1): Promise<ShipResult>;
510
+ };
511
+ cms: {
512
+ node: {
513
+ create: (params: CreateNodeParams, options?: RequestOptions$1) => Promise<Node>;
514
+ update: (params: UpdateNodeParams, options?: RequestOptions$1) => Promise<Node>;
515
+ delete: (params: DeleteNodeParams, options?: RequestOptions$1) => Promise<{
516
+ deleted: boolean;
517
+ }>;
518
+ get: (params: GetNodeParams, options?: RequestOptions$1) => Promise<{
519
+ getBlock(key: string): any;
520
+ getBlockValues(key: string): any;
521
+ getImage(key: string): any;
522
+ id: string;
523
+ key: string;
524
+ store_id: string;
525
+ parent_id?: string | null;
526
+ blocks: Block[];
527
+ taxonomies: TaxonomyEntry[];
528
+ status: NodeStatus;
529
+ slug: Record<string, string>;
530
+ children: Node[];
531
+ created_at: number;
532
+ updated_at: number;
533
+ }>;
534
+ find: (params: GetNodesParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Node>>;
535
+ getChildren: (params: GetNodeChildrenParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Node>>;
536
+ };
537
+ form: {
538
+ create: (params: CreateFormParams, options?: RequestOptions$1) => Promise<Form>;
539
+ update: (params: UpdateFormParams, options?: RequestOptions$1) => Promise<Form>;
540
+ delete: (params: DeleteFormParams, options?: RequestOptions$1) => Promise<{
541
+ deleted: boolean;
542
+ }>;
543
+ get: (params: GetFormParams, options?: RequestOptions$1) => Promise<Form>;
544
+ find: (params: GetFormsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Form>>;
545
+ submit: (params: SubmitFormParams, options?: RequestOptions$1) => Promise<FormSubmission>;
546
+ getSubmissions: (params: GetFormSubmissionsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<FormSubmission>>;
547
+ getSubmission: (params: GetFormSubmissionParams, options?: RequestOptions$1) => Promise<FormSubmission>;
548
+ updateSubmission: (params: UpdateFormSubmissionParams, options?: RequestOptions$1) => Promise<FormSubmission>;
549
+ };
550
+ taxonomy: {
551
+ create: (params: CreateTaxonomyParams, options?: RequestOptions$1) => Promise<Taxonomy>;
552
+ update: (params: UpdateTaxonomyParams, options?: RequestOptions$1) => Promise<Taxonomy>;
553
+ delete: (params: DeleteTaxonomyParams, options?: RequestOptions$1) => Promise<{
554
+ deleted: boolean;
555
+ }>;
556
+ get: (params: GetTaxonomyParams, options?: RequestOptions$1) => Promise<Taxonomy>;
557
+ find: (params: GetTaxonomiesParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Taxonomy>>;
558
+ getChildren: (params: GetTaxonomyChildrenParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Taxonomy>>;
559
+ };
560
+ emailTemplate: {
561
+ create: (params: CreateEmailTemplateParams, options?: RequestOptions$1) => Promise<EmailTemplate>;
562
+ update: (params: UpdateEmailTemplateParams, options?: RequestOptions$1) => Promise<EmailTemplate>;
563
+ delete: (params: DeleteEmailTemplateParams, options?: RequestOptions$1) => Promise<{
564
+ deleted: boolean;
565
+ }>;
566
+ get: (params: GetEmailTemplateParams, options?: RequestOptions$1) => Promise<EmailTemplate>;
567
+ find: (params: GetEmailTemplatesParams, options?: RequestOptions$1) => Promise<PaginatedResponse<EmailTemplate>>;
568
+ };
569
+ };
570
+ eshop: {
571
+ product: {
572
+ create: (params: CreateProductParams, options?: RequestOptions$1) => Promise<Product>;
573
+ update: (params: UpdateProductParams, options?: RequestOptions$1) => Promise<Product>;
574
+ delete: (params: DeleteProductParams, options?: RequestOptions$1) => Promise<{
575
+ deleted: boolean;
576
+ }>;
577
+ get: (params: GetProductParams, options?: RequestOptions$1) => Promise<Product>;
578
+ find: (params: GetProductsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Product>>;
579
+ };
580
+ order: {
581
+ update: (params: UpdateOrderParams, options?: RequestOptions$1) => Promise<Order>;
582
+ get: (params: GetOrderParams, options?: RequestOptions$1) => Promise<Order>;
583
+ find: (params: GetOrdersParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Order>>;
584
+ getQuote: (params: GetQuoteParams, options?: RequestOptions$1) => Promise<OrderQuote>;
585
+ processRefund: (params: ProcessOrderRefundParams, options?: RequestOptions$1) => Promise<Order>;
586
+ };
587
+ cart: {
588
+ create: (params: CreateCartParams, options?: RequestOptions$1) => Promise<Cart>;
589
+ update: (params: UpdateCartParams, options?: RequestOptions$1) => Promise<Cart>;
590
+ get: (params: GetCartParams, options?: RequestOptions$1) => Promise<Cart>;
591
+ find: (params?: FindCartsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Cart>>;
592
+ addItem: (params: AddCartItemParams, options?: RequestOptions$1) => Promise<Cart>;
593
+ removeItem: (params: RemoveCartItemParams, options?: RequestOptions$1) => Promise<Cart>;
594
+ clear: (params: ClearCartParams, options?: RequestOptions$1) => Promise<Cart>;
595
+ quote: (params: QuoteCartParams, options?: RequestOptions$1) => Promise<OrderQuote>;
596
+ checkout: (params: CheckoutCartParams, options?: RequestOptions$1) => Promise<OrderCheckoutResult>;
597
+ };
598
+ service: {
599
+ create: (params: CreateServiceParams, options?: RequestOptions$1) => Promise<Service>;
600
+ update: (params: UpdateServiceParams, options?: RequestOptions$1) => Promise<Service>;
601
+ delete: (params: DeleteServiceParams, options?: RequestOptions$1) => Promise<void>;
602
+ get: (params: GetServiceParams, options?: RequestOptions$1) => Promise<Service>;
603
+ find: (params: GetServicesParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Service>>;
604
+ getAvailability: (params: GetAvailabilityParams, options?: RequestOptions$1) => Promise<AvailabilityResponse>;
605
+ findProviders: (params: FindServiceProvidersParams, options?: RequestOptions$1) => Promise<ServiceProvider[]>;
606
+ createProvider: (params: CreateServiceProviderParams, options?: RequestOptions$1) => Promise<ServiceProvider>;
607
+ updateProvider: (params: UpdateServiceProviderParams, options?: RequestOptions$1) => Promise<ServiceProvider>;
608
+ deleteProvider: (params: DeleteServiceProviderParams, options?: RequestOptions$1) => Promise<void>;
609
+ };
610
+ provider: {
611
+ create: (params: CreateProviderParams, options?: RequestOptions$1) => Promise<Provider>;
612
+ update: (params: UpdateProviderParams, options?: RequestOptions$1) => Promise<Provider>;
613
+ delete: (params: DeleteProviderParams, options?: RequestOptions$1) => Promise<void>;
614
+ get: (params: GetProviderParams, options?: RequestOptions$1) => Promise<Provider>;
615
+ find: (params: GetProvidersParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Provider>>;
616
+ };
617
+ promoCode: {
618
+ createPromoCode(params: CreatePromoCodeParams, options?: RequestOptions$1): Promise<PromoCode>;
619
+ updatePromoCode(params: UpdatePromoCodeParams, options?: RequestOptions$1): Promise<PromoCode>;
620
+ deletePromoCode(params: DeletePromoCodeParams, options?: RequestOptions$1): Promise<{
621
+ deleted: boolean;
622
+ }>;
623
+ getPromoCode(params: GetPromoCodeParams, options?: RequestOptions$1): Promise<PromoCode>;
624
+ getPromoCodes(params: GetPromoCodesParams, options?: RequestOptions$1): Promise<PaginatedResponse<PromoCode>>;
625
+ };
626
+ };
627
+ crm: {
628
+ customer: {
629
+ create: (params: CreateCustomerParams, options?: RequestOptions$1) => Promise<Customer>;
630
+ get: (params: GetCustomerParams, options?: RequestOptions$1) => Promise<CustomerDetail>;
631
+ find: (params?: FindCustomersParams, options?: RequestOptions$1) => Promise<{
632
+ items: Customer[];
633
+ cursor?: string;
634
+ }>;
635
+ update: (params: UpdateCustomerParams, options?: RequestOptions$1) => Promise<Customer>;
636
+ merge: (params: MergeCustomersParams, options?: RequestOptions$1) => Promise<Customer>;
637
+ revokeToken: (params: {
638
+ id: string;
639
+ token_id: string;
640
+ store_id?: string;
641
+ }, options?: RequestOptions$1) => Promise<{
642
+ deleted: boolean;
643
+ }>;
644
+ revokeAllTokens: (params: {
645
+ id: string;
646
+ store_id?: string;
647
+ }, options?: RequestOptions$1) => Promise<{
648
+ deleted: boolean;
649
+ }>;
650
+ };
651
+ audience: {
652
+ create: (params: CreateAudienceParams, options?: RequestOptions$1) => Promise<Audience>;
653
+ update: (params: UpdateAudienceParams, options?: RequestOptions$1) => Promise<Audience>;
654
+ get: (params: GetAudienceParams, options?: RequestOptions$1) => Promise<Audience>;
655
+ find: (params: GetAudiencesParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Audience>>;
656
+ getSubscribers: (params: GetAudienceSubscribersParams, options?: RequestOptions$1) => Promise<{
657
+ items: AudienceSubscriber[];
658
+ cursor?: string | null;
659
+ }>;
660
+ addSubscriber: (params: AddAudienceSubscriberParams, options?: RequestOptions$1) => Promise<AddAudienceSubscriberResponse>;
661
+ removeSubscriber: (params: RemoveAudienceSubscriberParams, options?: RequestOptions$1) => Promise<{
662
+ deleted: boolean;
663
+ }>;
664
+ };
665
+ activity: {
666
+ timeline(params: TimelineParams, options?: RequestOptions$1): Promise<{
667
+ items: Activity[];
668
+ cursor: string | null;
669
+ }>;
670
+ find(params: FindActivitiesParams, options?: RequestOptions$1): Promise<{
671
+ items: Activity[];
672
+ cursor: string | null;
673
+ }>;
674
+ };
675
+ };
676
+ automation: {
677
+ agent: {
678
+ create: (params: CreateAgentParams, options?: RequestOptions$1) => Promise<Agent>;
679
+ update: (params: UpdateAgentParams, options?: RequestOptions$1) => Promise<Agent>;
680
+ delete: (params: DeleteAgentParams, options?: RequestOptions$1) => Promise<{
681
+ deleted: boolean;
682
+ }>;
683
+ get: (params: GetAgentParams, options?: RequestOptions$1) => Promise<Agent>;
684
+ find: (params?: GetAgentsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Agent>>;
685
+ sendMessage: (params: RunAgentParams, options?: RequestOptions$1) => Promise<AgentChatMessage>;
686
+ getChats: (params: GetAgentChatsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<AgentChat>>;
687
+ getChat: (params: GetAgentChatParams, options?: RequestOptions$1) => Promise<AgentChat>;
688
+ updateChat: (params: UpdateAgentChatParams, options?: RequestOptions$1) => Promise<AgentChat>;
689
+ rateChat: (params: RateAgentChatParams, options?: RequestOptions$1) => Promise<AgentChat>;
690
+ getStoreChats: (params: GetStoreChatsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<AgentChat>>;
691
+ getChatMessages: (params: GetAgentChatParams & {
692
+ limit?: number;
693
+ }, options?: RequestOptions$1) => Promise<PaginatedResponse<AgentChatMessage>>;
694
+ };
695
+ workflow: {
696
+ create: (params: CreateWorkflowParams, options?: RequestOptions$1) => Promise<Workflow>;
697
+ update: (params: UpdateWorkflowParams, options?: RequestOptions$1) => Promise<Workflow>;
698
+ delete: (params: DeleteWorkflowParams, options?: RequestOptions$1) => Promise<{
699
+ deleted: boolean;
700
+ }>;
701
+ get: (params: GetWorkflowParams, options?: RequestOptions$1) => Promise<Workflow>;
702
+ find: (params?: GetWorkflowsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Workflow>>;
703
+ trigger: (params: TriggerWorkflowParams, options?: RequestOptions$1) => Promise<WorkflowExecution>;
704
+ getExecutions: (params: GetWorkflowExecutionsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<WorkflowExecution>>;
705
+ getExecution: (params: GetWorkflowExecutionParams, options?: RequestOptions$1) => Promise<WorkflowExecution>;
706
+ };
707
+ };
708
+ analytics: {
709
+ query: (spec: AnalyticsQuery, options?: RequestOptions$1 & {
710
+ store_id?: string;
711
+ }) => Promise<AnalyticsQueryResponse>;
712
+ };
713
+ setStoreId: (storeId: string) => void;
714
+ getStoreId: () => string;
715
+ setMarket: (market: string) => void;
716
+ getMarket: () => string;
717
+ setLocale: (locale: string) => void;
718
+ getLocale: () => string;
719
+ readonly session: AdminSession | null;
720
+ readonly isAuthenticated: boolean;
721
+ onAuthStateChanged(listener: AuthStateListener<AdminSession>): () => void;
722
+ logout(): Promise<void>;
723
+ extractBlockValues: typeof extractBlockValues;
724
+ utils: {
725
+ getImageUrl: (imageBlock: any, isBlock?: boolean) => any;
726
+ getBlockValue: (entry: any, blockKey: string) => any;
727
+ getBlockTextValue: (block: any, locale?: string) => string;
728
+ getBlockValues: (entry: any, blockKey: string) => any;
729
+ getBlockLabel: typeof getBlockLabel;
730
+ getBlockObjectValues: (entry: any, blockKey: string, locale?: string) => any;
731
+ getBlockFromArray: (entry: any, blockKey: string, locale?: string) => any;
732
+ formatBlockValue: typeof formatBlockValue;
733
+ prepareBlocksForSubmission: typeof prepareBlocksForSubmission;
734
+ extractBlockValues: typeof extractBlockValues;
735
+ formatPrice: (prices: any[]) => string;
736
+ getPriceAmount: (prices: any[]) => number;
737
+ formatPayment: typeof formatPayment;
738
+ formatMinor: typeof formatMinor;
739
+ getCurrencySymbol: typeof getCurrencySymbol;
740
+ getCurrencyName: typeof getCurrencyName;
741
+ validatePhoneNumber: typeof validatePhoneNumber;
742
+ tzGroups: {
743
+ label: string;
744
+ zones: {
745
+ label: string;
746
+ value: string;
747
+ }[];
748
+ }[];
749
+ findTimeZone: typeof findTimeZone;
750
+ slugify: typeof slugify;
751
+ humanize: typeof humanize;
752
+ categorify: typeof categorify;
753
+ formatDate: typeof formatDate;
754
+ getSvgContentForAstro: typeof getSvgContentForAstro;
755
+ fetchSvgContent: typeof fetchSvgContent;
756
+ injectSvgIntoElement: typeof injectSvgIntoElement;
757
+ isValidKey: typeof isValidKey;
758
+ validateKey: typeof validateKey;
759
+ toKey: typeof toKey;
760
+ nameToKey: typeof nameToKey;
761
+ getAvailableStock: typeof getAvailableStock;
762
+ getReservedStock: typeof getReservedStock;
763
+ hasStock: typeof hasStock;
764
+ getInventoryAt: typeof getInventoryAt;
765
+ getFirstAvailableFCId: typeof getFirstAvailableFCId;
766
+ };
767
+ };
768
+ type CreateStorefrontConfig = Omit<HttpClientConfig, "authStorage" | "storeId"> & {
769
+ storeId: string;
770
+ market?: string;
771
+ locale?: string;
772
+ apiToken?: string;
773
+ };
774
+ declare function createStorefront(config: CreateStorefrontConfig): {
775
+ identify: (params?: {
776
+ email?: string;
777
+ verify?: boolean;
778
+ market?: string;
779
+ }) => Promise<CustomerSession>;
780
+ verify: (params: {
781
+ code: string;
782
+ }) => Promise<CustomerToken>;
783
+ logout: () => Promise<void>;
784
+ me: () => Promise<CustomerDetail>;
785
+ readonly session: CustomerSession | null;
786
+ readonly isAuthenticated: boolean;
787
+ onAuthStateChanged(listener: AuthStateListener<CustomerSession>): () => void;
788
+ store: {
789
+ getStore(options?: RequestOptions$1): Promise<Store>;
790
+ location: {
791
+ getCountries(options?: RequestOptions$1): Promise<{
792
+ items: {
793
+ code: string;
794
+ name: string;
795
+ states: {
796
+ code: string;
797
+ name: string;
798
+ }[];
799
+ }[];
800
+ cursor: string | null;
801
+ }>;
802
+ getCountry(countryCode: string, options?: RequestOptions$1): Promise<{
803
+ code: string;
804
+ name: string;
805
+ states: {
806
+ code: string;
807
+ name: string;
808
+ }[];
809
+ }>;
810
+ list(options?: RequestOptions$1): Promise<Location[]>;
811
+ get(id: string, options?: RequestOptions$1): Promise<Location>;
812
+ };
813
+ market: {
814
+ list(options?: RequestOptions$1): Promise<Market[]>;
815
+ get(id: string, options?: RequestOptions$1): Promise<Market>;
816
+ };
817
+ };
818
+ cart: CartController;
819
+ cms: {
820
+ node: {
821
+ get(params: GetNodeParams, options?: RequestOptions$1): Promise<{
822
+ getBlock(key: string): any;
823
+ getBlockValues(key: string): any;
824
+ getImage(key: string): any;
825
+ id: string;
826
+ key: string;
827
+ store_id: string;
828
+ parent_id?: string | null;
829
+ blocks: Block[];
830
+ taxonomies: TaxonomyEntry[];
831
+ status: NodeStatus;
832
+ slug: Record<string, string>;
833
+ children: Node[];
834
+ created_at: number;
835
+ updated_at: number;
836
+ }>;
837
+ find(params: GetNodesParams, options?: RequestOptions$1): Promise<PaginatedResponse<Node>>;
838
+ getChildren(params: GetNodeChildrenParams, options?: RequestOptions$1): Promise<PaginatedResponse<Node>>;
839
+ };
840
+ form: {
841
+ get(params: GetFormParams, options?: RequestOptions$1): Promise<Form>;
842
+ submit(params: SubmitFormParams, options?: RequestOptions$1): Promise<FormSubmission>;
843
+ };
844
+ taxonomy: {
845
+ get(params: GetTaxonomyParams, options?: RequestOptions$1): Promise<Taxonomy>;
846
+ getChildren(params: GetTaxonomyChildrenParams, options?: RequestOptions$1): Promise<PaginatedResponse<Taxonomy>>;
847
+ };
848
+ };
849
+ eshop: {
850
+ product: {
851
+ get(params: GetProductParams, options?: RequestOptions$1): Promise<Product>;
852
+ find(params: GetProductsParams, options?: RequestOptions$1): Promise<PaginatedResponse<Product>>;
853
+ };
854
+ cart: {
855
+ current(params?: GetCurrentCartParams, options?: RequestOptions$1): Promise<Cart>;
856
+ get(params: GetCartParams, options?: RequestOptions$1): Promise<Cart>;
857
+ update(params: UpdateCartParams, options?: RequestOptions$1): Promise<Cart>;
858
+ addItem(params: AddCartItemParams, options?: RequestOptions$1): Promise<Cart>;
859
+ removeItem(params: RemoveCartItemParams, options?: RequestOptions$1): Promise<Cart>;
860
+ clear(params: ClearCartParams, options?: RequestOptions$1): Promise<Cart>;
861
+ quote(params: QuoteCartParams, options?: RequestOptions$1): Promise<OrderQuote>;
862
+ checkout(params: CheckoutCartParams, options?: RequestOptions$1): Promise<OrderCheckoutResult>;
863
+ };
864
+ order: {
865
+ get(params: GetOrderParams, options?: RequestOptions$1): Promise<Order>;
866
+ find(params: GetOrdersParams, options?: RequestOptions$1): Promise<PaginatedResponse<Order>>;
867
+ };
868
+ service: {
869
+ get(params: GetServiceParams, options?: RequestOptions$1): Promise<Service>;
870
+ find(params: GetServicesParams, options?: RequestOptions$1): Promise<PaginatedResponse<Service>>;
871
+ findProviders(params: FindServiceProvidersParams, options?: RequestOptions$1): Promise<Provider[]>;
872
+ getAvailability(params: GetAvailabilityParams, options?: RequestOptions$1): Promise<AvailabilityResponse>;
873
+ };
874
+ provider: {
875
+ get(params: GetProviderParams, options?: RequestOptions$1): Promise<Provider>;
876
+ find(params: GetProvidersParams, options?: RequestOptions$1): Promise<PaginatedResponse<Provider>>;
877
+ };
878
+ };
879
+ crm: {
880
+ customer: {
881
+ identify(params?: {
882
+ email?: string;
883
+ verify?: boolean;
884
+ market?: string;
885
+ }, options?: RequestOptions$1): Promise<IdentifyResponse>;
886
+ verify(params: {
887
+ code: string;
888
+ }, options?: RequestOptions$1): Promise<VerifyResponse>;
889
+ logout(options?: RequestOptions$1): Promise<void>;
890
+ getMe(options?: RequestOptions$1): Promise<CustomerDetail>;
891
+ };
892
+ audience: {
893
+ get(params: GetAudienceParams, options?: RequestOptions$1): Promise<Audience>;
894
+ find(params: GetAudiencesParams, options?: RequestOptions$1): Promise<PaginatedResponse<Audience>>;
895
+ subscribe(params: SubscribeAudienceParams, options?: RequestOptions$1): Promise<AudienceSubscribeResponse>;
896
+ checkAccess(params: {
897
+ id: string;
898
+ }, options?: RequestOptions$1): Promise<AudienceAccessResponse>;
899
+ unsubscribe(token: string, options?: RequestOptions$1): Promise<{
900
+ unsubscribed: boolean;
901
+ }>;
902
+ confirm(token: string, options?: RequestOptions$1): Promise<{
903
+ confirmed: boolean;
904
+ }>;
905
+ };
906
+ };
907
+ activity: {
908
+ 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"];
909
+ track(params: TrackParams): Promise<void>;
910
+ };
911
+ automation: {
912
+ agent: {
913
+ getAgents(params?: GetAgentsParams, options?: RequestOptions$1): Promise<PaginatedResponse<Agent>>;
914
+ getAgent(params: {
915
+ id: string;
916
+ store_id?: string;
917
+ }, options?: RequestOptions$1): Promise<Agent>;
918
+ sendMessage(params: {
919
+ id: string;
920
+ message: string;
921
+ chat_id?: string;
922
+ store_id?: string;
923
+ }, options?: RequestOptions$1): Promise<AgentChatMessage>;
924
+ getChat(params: {
925
+ id: string;
926
+ chat_id: string;
927
+ store_id?: string;
928
+ }, options?: RequestOptions$1): Promise<AgentChat>;
929
+ getChatMessages(params: {
930
+ id: string;
931
+ chat_id: string;
932
+ limit?: number;
933
+ store_id?: string;
934
+ }, options?: RequestOptions$1): Promise<PaginatedResponse<AgentChatMessage>>;
935
+ rateChat(params: {
936
+ id: string;
937
+ chat_id: string;
938
+ rating: number;
939
+ comment?: string;
940
+ store_id?: string;
941
+ }, options?: RequestOptions$1): Promise<AgentChat>;
942
+ };
943
+ };
944
+ setStoreId: (storeId: string) => void;
945
+ getStoreId: () => string;
946
+ setMarket: (key: string) => void;
947
+ getMarket: () => string;
948
+ setLocale: (l: string) => void;
949
+ getLocale: () => string;
950
+ extractBlockValues: typeof extractBlockValues;
951
+ utils: {
952
+ getImageUrl: (imageBlock: any, isBlock?: boolean) => any;
953
+ getBlockValue: (entry: any, blockKey: string) => any;
954
+ getBlockTextValue: (block: any, locale?: string) => string;
955
+ getBlockValues: (entry: any, blockKey: string) => any;
956
+ getBlockLabel: typeof getBlockLabel;
957
+ getBlockObjectValues: (entry: any, blockKey: string, locale?: string) => any;
958
+ getBlockFromArray: (entry: any, blockKey: string, locale?: string) => any;
959
+ formatBlockValue: typeof formatBlockValue;
960
+ prepareBlocksForSubmission: typeof prepareBlocksForSubmission;
961
+ extractBlockValues: typeof extractBlockValues;
962
+ formatPrice: (prices: any[]) => string;
963
+ getPriceAmount: (prices: any[]) => number;
964
+ formatPayment: typeof formatPayment;
965
+ formatMinor: typeof formatMinor;
966
+ getCurrencySymbol: typeof getCurrencySymbol;
967
+ getCurrencyName: typeof getCurrencyName;
968
+ validatePhoneNumber: typeof validatePhoneNumber;
969
+ tzGroups: {
970
+ label: string;
971
+ zones: {
972
+ label: string;
973
+ value: string;
974
+ }[];
975
+ }[];
976
+ findTimeZone: typeof findTimeZone;
977
+ slugify: typeof slugify;
978
+ humanize: typeof humanize;
979
+ categorify: typeof categorify;
980
+ formatDate: typeof formatDate;
981
+ getSvgContentForAstro: typeof getSvgContentForAstro;
982
+ fetchSvgContent: typeof fetchSvgContent;
983
+ injectSvgIntoElement: typeof injectSvgIntoElement;
984
+ isValidKey: typeof isValidKey;
985
+ validateKey: typeof validateKey;
986
+ toKey: typeof toKey;
987
+ nameToKey: typeof nameToKey;
988
+ getAvailableStock: typeof getAvailableStock;
989
+ getReservedStock: typeof getReservedStock;
990
+ hasStock: typeof hasStock;
991
+ getInventoryAt: typeof getInventoryAt;
992
+ getFirstAvailableFCId: typeof getFirstAvailableFCId;
993
+ };
994
+ };
995
+
996
+ export { type Activity$1 as A, type CreateAdminConfig as B, type CustomerSession as C, createAdmin as D, type LocationCountry as E, type AnalyticsQuery as F, type GetCountriesResponse as G, type HttpClientConfig as H, type AnalyticsQueryResponse as I, type AnalyticsRow as J, type Dimension as K, type LocationState as L, type Measure as M, type Filter as N, type FilterField as O, type FilterOp as P, type Granularity as Q, type EntityKind as R, SDK_VERSION as S, type TrackParams as T, type TimeRange as U, type TimeUnit as V, type OrderBy as W, type TimelineParams as X, type IntegrationOperation as Y, type IntegrationResource as Z, type IntegrationService as _, type CartController as a, COMMON_ACTIVITY_TYPES as b, createStorefront as c, createCartController as d, type CommonActivityType as e, type CartApi as f, type CartControllerAddItemParams as g, type CartControllerCheckoutParams as h, type CartControllerClearParams as i, type CartControllerInitParams as j, type CartControllerListener as k, type CartControllerQuoteParams as l, type CartControllerRefreshParams as m, type CartControllerRemoveItemParams as n, type CartControllerState as o, type CartControllerUpdateParams as p, type AuthStateListener as q, type CreateStorefrontConfig as r, type AuthStorage as s, SUPPORTED_FRAMEWORKS as t, type ApiConfig as u, type AdminSessionInternal as v, type CustomerSessionInternal as w, type AdminSession as x, type AdminSessionUpdater as y, type CustomerSessionUpdater as z };