arky-sdk 0.9.0 → 0.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- import { C as CreateStorefrontConfig, T as TrackParams, a as CustomerSession, b as CustomerToken, A as AuthStateListener, c as CartController, I as IdentifyResponse, V as VerifyResponse, e as extractBlockValues, g as getBlockLabel, f as formatBlockValue, p as prepareBlocksForSubmission, v as validatePhoneNumber, d as findTimeZone, s as slugify, h as humanize, i as categorify, j as formatDate, k as getSvgContentForAstro, l as fetchSvgContent, m as injectSvgIntoElement, n as Activity } from './admin-CfHen7c5.cjs';
2
- export { K as AuthStorage, o as COMMON_ACTIVITY_TYPES, u as CartApi, w as CartControllerAddItemParams, x as CartControllerCheckoutParams, y as CartControllerClearParams, z as CartControllerInitParams, B as CartControllerListener, D as CartControllerQuoteParams, E as CartControllerRefreshParams, F as CartControllerRemoveItemParams, G as CartControllerState, H as CartControllerUpdateParams, t as CommonActivityType, J as HttpClientConfig, r as createCartController, q as createStorefront } from './admin-CfHen7c5.cjs';
1
+ import { C as CreateStorefrontConfig, T as TrackParams, P as ProfileSession, a as ProfileToken, A as AuthStateListener, b as CartController, I as IdentifyResponse, V as VerifyResponse, S as StartSupportConversationParams, c as SupportConversationResponse, d as SendSupportMessageParams, G as GetSupportConversationParams, e as extractBlockValues, g as getBlockLabel, f as formatBlockValue, p as prepareBlocksForSubmission, v as validatePhoneNumber, h as findTimeZone, s as slugify, i as humanize, j as categorify, k as formatDate, l as getSvgContentForAstro, m as fetchSvgContent, n as injectSvgIntoElement, o as Activity } from './admin-DlL8mCxL.cjs';
2
+ export { M as AuthStorage, q as COMMON_ACTIVITY_TYPES, w as CartApi, x as CartControllerAddItemParams, y as CartControllerCheckoutParams, z as CartControllerClearParams, B as CartControllerInitParams, D as CartControllerListener, E as CartControllerQuoteParams, F as CartControllerRefreshParams, H as CartControllerRemoveItemParams, J as CartControllerState, K as CartControllerUpdateParams, u as CommonActivityType, L as HttpClientConfig, t as createCartController, r as createStorefront } from './admin-DlL8mCxL.cjs';
3
3
  import * as nanostores from 'nanostores';
4
- 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';
5
- import { Cart, Node, Form, Product, Service, Provider, AvailabilityResponse, Block, OrderQuote, PaymentMethod, FormEntry, Price, OrderCheckoutResult, EshopCartItem, Address, ZoneLocation, ProductCheckoutItemInput, ServiceCheckoutItemInput, CustomerDetail, RequestOptions, Store, Location, Market, GetNodeParams, TaxonomyEntry, NodeStatus, GetNodesParams, PaginatedResponse, GetNodeChildrenParams, GetFormParams, SubmitFormParams, FormSubmission, GetTaxonomyParams, Taxonomy, GetTaxonomyChildrenParams, GetProductParams, GetProductsParams, GetCurrentCartParams, GetCartParams, UpdateCartParams, AddCartItemParams, RemoveCartItemParams, ClearCartParams, QuoteCartParams, CheckoutCartParams, GetOrderParams, Order, GetOrdersParams, GetServiceParams, GetServicesParams, FindServiceProvidersParams, GetAvailabilityParams, GetProviderParams, GetProvidersParams, GetAudienceParams, Audience, GetAudiencesParams, SubscribeAudienceParams, AudienceSubscribeResponse, AudienceAccessResponse, GetAgentsParams, Agent, AgentChatMessage, AgentChat, FormField, ProductVariant, CheckoutItemInput } from './types.cjs';
4
+ 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';
5
+ import { C as Cart, an as Node, ax as Form, aX as Product, b9 as Service, bm as Provider, bf as AvailabilityResponse, ar as Block, O as OrderQuote, d7 as PaymentMethod, ea as FormEntry, cU as Price, a as OrderCheckoutResult, cO as EshopCartItem, db as Address, dd as ZoneLocation, ff as ProductCheckoutItemInput, fg as ServiceCheckoutItemInput, bu as ProfileDetail, R as RequestOptions, S as Store, L as Location, M as Market, aq as GetNodeParams, as as TaxonomyEntry, at as NodeStatus, au as GetNodesParams, y as PaginatedResponse, av as GetNodeChildrenParams, aA as GetFormParams, aC as SubmitFormParams, aD as FormSubmission, aL as GetTaxonomyParams, aI as Taxonomy, aN as GetTaxonomyChildrenParams, a_ as GetProductParams, a$ as GetProductsParams, G as GetCurrentCartParams, b as GetCartParams, U as UpdateCartParams, A as AddCartItemParams, c as RemoveCartItemParams, d as ClearCartParams, Q as QuoteCartParams, e as CheckoutCartParams, b2 as GetOrderParams, b1 as Order, b3 as GetOrdersParams, bc as GetServiceParams, bd as GetServicesParams, bg as FindServiceProvidersParams, be as GetAvailabilityParams, bp as GetProviderParams, bq as GetProvidersParams, bD as GetProfileListParams, bB as ProfileList, bE as FindProfileListsParams, cJ as SubscribeProfileListParams, cK as ProfileListSubscribeResponse, cL as ProfileListAccessParams, cM as ProfileListAccessResponse, e8 as FormField, e2 as ProductVariant, fi as CheckoutItemInput } from './api-BbBHcd4p.cjs';
6
6
 
7
7
  interface ArkyStoreConfig extends CreateStorefrontConfig {
8
8
  marketForLocale?: (locale: string) => string | null | undefined;
@@ -17,7 +17,7 @@ interface ArkyStoreSetupOptions extends ArkyStoreContext {
17
17
  track?: TrackParams | false | null;
18
18
  }
19
19
  interface ArkyStoreSetupResult {
20
- session: CustomerSession | null;
20
+ session: ProfileSession | null;
21
21
  cart?: Cart;
22
22
  }
23
23
  type ArkyCmsNodeParams = ArkyStoreContext & {
@@ -163,15 +163,15 @@ declare function createArkyStore(config: ArkyStoreConfig): {
163
163
  email?: string;
164
164
  verify?: boolean;
165
165
  market?: string;
166
- }) => Promise<CustomerSession>;
166
+ }) => Promise<ProfileSession>;
167
167
  verify: (params: {
168
168
  code: string;
169
- }) => Promise<CustomerToken>;
169
+ }) => Promise<ProfileToken>;
170
170
  logout: () => Promise<void>;
171
- me: () => Promise<CustomerDetail>;
172
- readonly session: CustomerSession | null;
171
+ me: () => Promise<ProfileDetail>;
172
+ readonly session: ProfileSession | null;
173
173
  readonly isAuthenticated: boolean;
174
- onAuthStateChanged(listener: AuthStateListener<CustomerSession>): () => void;
174
+ onAuthStateChanged(listener: AuthStateListener<ProfileSession>): () => void;
175
175
  store: {
176
176
  getStore(options?: RequestOptions): Promise<Store>;
177
177
  location: {
@@ -264,7 +264,7 @@ declare function createArkyStore(config: ArkyStoreConfig): {
264
264
  };
265
265
  };
266
266
  crm: {
267
- customer: {
267
+ profile: {
268
268
  identify(params?: {
269
269
  email?: string;
270
270
  verify?: boolean;
@@ -274,15 +274,13 @@ declare function createArkyStore(config: ArkyStoreConfig): {
274
274
  code: string;
275
275
  }, options?: RequestOptions): Promise<VerifyResponse>;
276
276
  logout(options?: RequestOptions): Promise<void>;
277
- getMe(options?: RequestOptions): Promise<CustomerDetail>;
277
+ getMe(options?: RequestOptions): Promise<ProfileDetail>;
278
278
  };
279
- audience: {
280
- get(params: GetAudienceParams, options?: RequestOptions): Promise<Audience>;
281
- find(params: GetAudiencesParams, options?: RequestOptions): Promise<PaginatedResponse<Audience>>;
282
- subscribe(params: SubscribeAudienceParams, options?: RequestOptions): Promise<AudienceSubscribeResponse>;
283
- checkAccess(params: {
284
- id: string;
285
- }, options?: RequestOptions): Promise<AudienceAccessResponse>;
279
+ profileList: {
280
+ get(params: GetProfileListParams, options?: RequestOptions): Promise<ProfileList>;
281
+ find(params?: FindProfileListsParams, options?: RequestOptions): Promise<PaginatedResponse<ProfileList>>;
282
+ subscribe(params: SubscribeProfileListParams, options?: RequestOptions): Promise<ProfileListSubscribeResponse>;
283
+ checkAccess(params: ProfileListAccessParams, options?: RequestOptions): Promise<ProfileListAccessResponse>;
286
284
  unsubscribe(token: string, options?: RequestOptions): Promise<{
287
285
  unsubscribed: boolean;
288
286
  }>;
@@ -295,38 +293,10 @@ declare function createArkyStore(config: ArkyStoreConfig): {
295
293
  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"];
296
294
  track(params: TrackParams): Promise<void>;
297
295
  };
298
- automation: {
299
- agent: {
300
- getAgents(params?: GetAgentsParams, options?: RequestOptions): Promise<PaginatedResponse<Agent>>;
301
- getAgent(params: {
302
- id: string;
303
- store_id?: string;
304
- }, options?: RequestOptions): Promise<Agent>;
305
- sendMessage(params: {
306
- id: string;
307
- message: string;
308
- chat_id?: string;
309
- store_id?: string;
310
- }, options?: RequestOptions): Promise<AgentChatMessage>;
311
- getChat(params: {
312
- id: string;
313
- chat_id: string;
314
- store_id?: string;
315
- }, options?: RequestOptions): Promise<AgentChat>;
316
- getChatMessages(params: {
317
- id: string;
318
- chat_id: string;
319
- limit?: number;
320
- store_id?: string;
321
- }, options?: RequestOptions): Promise<PaginatedResponse<AgentChatMessage>>;
322
- rateChat(params: {
323
- id: string;
324
- chat_id: string;
325
- rating: number;
326
- comment?: string;
327
- store_id?: string;
328
- }, options?: RequestOptions): Promise<AgentChat>;
329
- };
296
+ support: {
297
+ startConversation(params?: Omit<StartSupportConversationParams, "store_id">, opts?: RequestOptions): Promise<SupportConversationResponse>;
298
+ sendMessage(params: Omit<SendSupportMessageParams, "store_id">, opts?: RequestOptions): Promise<SupportConversationResponse>;
299
+ getConversation(params: Omit<GetSupportConversationParams, "store_id">, opts?: RequestOptions): Promise<SupportConversationResponse>;
330
300
  };
331
301
  setStoreId: (storeId: string) => void;
332
302
  getStoreId: () => string;
@@ -379,7 +349,7 @@ declare function createArkyStore(config: ArkyStoreConfig): {
379
349
  getFirstAvailableFCId: typeof getFirstAvailableFCId;
380
350
  };
381
351
  };
382
- session: nanostores.PreinitializedWritableAtom<CustomerSession | null> & object;
352
+ session: nanostores.PreinitializedWritableAtom<ProfileSession | null> & object;
383
353
  market: nanostores.ReadableAtom<Market | null>;
384
354
  market_key: nanostores.PreinitializedWritableAtom<string> & object;
385
355
  locale: nanostores.PreinitializedWritableAtom<string> & object;
@@ -395,20 +365,21 @@ declare function createArkyStore(config: ArkyStoreConfig): {
395
365
  email?: string;
396
366
  verify?: boolean;
397
367
  market?: string;
398
- }) => Promise<CustomerSession>;
368
+ }) => Promise<ProfileSession>;
399
369
  verify: (params: {
400
370
  code: string;
401
- }) => Promise<CustomerToken>;
402
- me: () => Promise<CustomerDetail>;
371
+ }) => Promise<ProfileToken>;
372
+ me: () => Promise<ProfileDetail>;
403
373
  logout: () => Promise<void>;
404
- onAuthStateChanged: (listener: AuthStateListener<CustomerSession>) => () => void;
405
- readonly currentSession: CustomerSession | null;
374
+ onAuthStateChanged: (listener: AuthStateListener<ProfileSession>) => () => void;
375
+ readonly currentSession: ProfileSession | null;
406
376
  readonly isAuthenticated: boolean;
407
377
  setMarket: (key: string) => void;
408
378
  setLocale: (value: string, options?: {
409
379
  market?: string;
410
380
  }) => void;
411
381
  setContext: (context: ArkyStoreContext) => void;
382
+ getStoreId: () => string;
412
383
  getMarket: () => string;
413
384
  getLocale: () => string;
414
385
  cms: {
@@ -514,8 +485,10 @@ declare function createArkyStore(config: ArkyStoreConfig): {
514
485
  item_count: number;
515
486
  }>;
516
487
  ensure: () => Promise<Cart>;
517
- hydrate: (response: Cart) => Promise<Cart>;
518
- sync: (input?: ArkyCartInput) => Promise<Cart>;
488
+ hydrate: (response: Cart, options?: {
489
+ ifRevision?: number;
490
+ }) => Promise<Cart>;
491
+ sync: (input?: ArkyCartInput, writeRevision?: number) => Promise<Cart>;
519
492
  addProduct: (product: Product, variant: ProductVariant, quantity?: number) => Promise<Cart>;
520
493
  setProductQuantity: (itemId: string, quantity: number) => Promise<Cart>;
521
494
  removeProduct: (itemId: string) => Promise<Cart | null>;
@@ -534,7 +507,7 @@ declare function createArkyStore(config: ArkyStoreConfig): {
534
507
  };
535
508
  };
536
509
  crm: {
537
- customer: {
510
+ profile: {
538
511
  identify(params?: {
539
512
  email?: string;
540
513
  verify?: boolean;
@@ -544,15 +517,13 @@ declare function createArkyStore(config: ArkyStoreConfig): {
544
517
  code: string;
545
518
  }, options?: RequestOptions): Promise<VerifyResponse>;
546
519
  logout(options?: RequestOptions): Promise<void>;
547
- getMe(options?: RequestOptions): Promise<CustomerDetail>;
520
+ getMe(options?: RequestOptions): Promise<ProfileDetail>;
548
521
  };
549
- audience: {
550
- get(params: GetAudienceParams, options?: RequestOptions): Promise<Audience>;
551
- find(params: GetAudiencesParams, options?: RequestOptions): Promise<PaginatedResponse<Audience>>;
552
- subscribe(params: SubscribeAudienceParams, options?: RequestOptions): Promise<AudienceSubscribeResponse>;
553
- checkAccess(params: {
554
- id: string;
555
- }, options?: RequestOptions): Promise<AudienceAccessResponse>;
522
+ profileList: {
523
+ get(params: GetProfileListParams, options?: RequestOptions): Promise<ProfileList>;
524
+ find(params?: FindProfileListsParams, options?: RequestOptions): Promise<PaginatedResponse<ProfileList>>;
525
+ subscribe(params: SubscribeProfileListParams, options?: RequestOptions): Promise<ProfileListSubscribeResponse>;
526
+ checkAccess(params: ProfileListAccessParams, options?: RequestOptions): Promise<ProfileListAccessResponse>;
556
527
  unsubscribe(token: string, options?: RequestOptions): Promise<{
557
528
  unsubscribed: boolean;
558
529
  }>;
@@ -566,6 +537,11 @@ declare function createArkyStore(config: ArkyStoreConfig): {
566
537
  pageView(payload?: Record<string, unknown>): Promise<void>;
567
538
  state: nanostores.PreinitializedWritableAtom<Activity | null> & object;
568
539
  };
540
+ support: {
541
+ startConversation(params?: Omit<StartSupportConversationParams, "store_id">, opts?: RequestOptions): Promise<SupportConversationResponse>;
542
+ sendMessage(params: Omit<SendSupportMessageParams, "store_id">, opts?: RequestOptions): Promise<SupportConversationResponse>;
543
+ getConversation(params: Omit<GetSupportConversationParams, "store_id">, opts?: RequestOptions): Promise<SupportConversationResponse>;
544
+ };
569
545
  store: {
570
546
  getStore(options?: RequestOptions): Promise<Store>;
571
547
  location: {
@@ -596,39 +572,6 @@ declare function createArkyStore(config: ArkyStoreConfig): {
596
572
  get(id: string, options?: RequestOptions): Promise<Market>;
597
573
  };
598
574
  };
599
- automation: {
600
- agent: {
601
- getAgents(params?: GetAgentsParams, options?: RequestOptions): Promise<PaginatedResponse<Agent>>;
602
- getAgent(params: {
603
- id: string;
604
- store_id?: string;
605
- }, options?: RequestOptions): Promise<Agent>;
606
- sendMessage(params: {
607
- id: string;
608
- message: string;
609
- chat_id?: string;
610
- store_id?: string;
611
- }, options?: RequestOptions): Promise<AgentChatMessage>;
612
- getChat(params: {
613
- id: string;
614
- chat_id: string;
615
- store_id?: string;
616
- }, options?: RequestOptions): Promise<AgentChat>;
617
- getChatMessages(params: {
618
- id: string;
619
- chat_id: string;
620
- limit?: number;
621
- store_id?: string;
622
- }, options?: RequestOptions): Promise<PaginatedResponse<AgentChatMessage>>;
623
- rateChat(params: {
624
- id: string;
625
- chat_id: string;
626
- rating: number;
627
- comment?: string;
628
- store_id?: string;
629
- }, options?: RequestOptions): Promise<AgentChat>;
630
- };
631
- };
632
575
  utils: {
633
576
  getImageUrl: (imageBlock: any, isBlock?: boolean) => any;
634
577
  getBlockValue: (entry: any, blockKey: string) => any;
@@ -678,4 +621,4 @@ type ArkyStore = ReturnType<typeof createArkyStore>;
678
621
  type ArkyCartStore = ArkyStore["eshop"]["cart"];
679
622
  type ArkyServiceStore = ArkyStore["eshop"]["service"];
680
623
 
681
- export { type ArkyCalendarDay as A, Activity, type ArkyCartInput, type ArkyCartSnapshot, type ArkyCartStatus, type ArkyCartStore, type ArkyCmsNodeParams, type ArkyCmsState, type ArkyEshopState, type ArkyLastOrder, type ArkyServiceCartItem, type ArkyServiceStore, type ArkyStore, type ArkyStoreConfig, type ArkyStoreContext, type ArkyStoreSetupOptions, type ArkyStoreSetupResult, AuthStateListener, CartController, CreateStorefrontConfig, CustomerSession, TrackParams, type ArkyServiceSlot as a, type ArkyServiceState as b, createArkyStore };
624
+ export { type ArkyCalendarDay as A, Activity, type ArkyCartInput, type ArkyCartSnapshot, type ArkyCartStatus, type ArkyCartStore, type ArkyCmsNodeParams, type ArkyCmsState, type ArkyEshopState, type ArkyLastOrder, type ArkyServiceCartItem, type ArkyServiceStore, type ArkyStore, type ArkyStoreConfig, type ArkyStoreContext, type ArkyStoreSetupOptions, type ArkyStoreSetupResult, AuthStateListener, CartController, CreateStorefrontConfig, ProfileSession, TrackParams, type ArkyServiceSlot as a, type ArkyServiceState as b, createArkyStore };
@@ -1,8 +1,8 @@
1
- import { C as CreateStorefrontConfig, T as TrackParams, a as CustomerSession, b as CustomerToken, A as AuthStateListener, c as CartController, I as IdentifyResponse, V as VerifyResponse, e as extractBlockValues, g as getBlockLabel, f as formatBlockValue, p as prepareBlocksForSubmission, v as validatePhoneNumber, d as findTimeZone, s as slugify, h as humanize, i as categorify, j as formatDate, k as getSvgContentForAstro, l as fetchSvgContent, m as injectSvgIntoElement, n as Activity } from './admin-ru7pX5bd.js';
2
- export { K as AuthStorage, o as COMMON_ACTIVITY_TYPES, u as CartApi, w as CartControllerAddItemParams, x as CartControllerCheckoutParams, y as CartControllerClearParams, z as CartControllerInitParams, B as CartControllerListener, D as CartControllerQuoteParams, E as CartControllerRefreshParams, F as CartControllerRemoveItemParams, G as CartControllerState, H as CartControllerUpdateParams, t as CommonActivityType, J as HttpClientConfig, r as createCartController, q as createStorefront } from './admin-ru7pX5bd.js';
1
+ import { C as CreateStorefrontConfig, T as TrackParams, P as ProfileSession, a as ProfileToken, A as AuthStateListener, b as CartController, I as IdentifyResponse, V as VerifyResponse, S as StartSupportConversationParams, c as SupportConversationResponse, d as SendSupportMessageParams, G as GetSupportConversationParams, e as extractBlockValues, g as getBlockLabel, f as formatBlockValue, p as prepareBlocksForSubmission, v as validatePhoneNumber, h as findTimeZone, s as slugify, i as humanize, j as categorify, k as formatDate, l as getSvgContentForAstro, m as fetchSvgContent, n as injectSvgIntoElement, o as Activity } from './admin-DjYydKeB.js';
2
+ export { M as AuthStorage, q as COMMON_ACTIVITY_TYPES, w as CartApi, x as CartControllerAddItemParams, y as CartControllerCheckoutParams, z as CartControllerClearParams, B as CartControllerInitParams, D as CartControllerListener, E as CartControllerQuoteParams, F as CartControllerRefreshParams, H as CartControllerRemoveItemParams, J as CartControllerState, K as CartControllerUpdateParams, u as CommonActivityType, L as HttpClientConfig, t as createCartController, r as createStorefront } from './admin-DjYydKeB.js';
3
3
  import * as nanostores from 'nanostores';
4
- 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-MFMjlIfS.js';
5
- import { Cart, Node, Form, Product, Service, Provider, AvailabilityResponse, Block, OrderQuote, PaymentMethod, FormEntry, Price, OrderCheckoutResult, EshopCartItem, Address, ZoneLocation, ProductCheckoutItemInput, ServiceCheckoutItemInput, CustomerDetail, RequestOptions, Store, Location, Market, GetNodeParams, TaxonomyEntry, NodeStatus, GetNodesParams, PaginatedResponse, GetNodeChildrenParams, GetFormParams, SubmitFormParams, FormSubmission, GetTaxonomyParams, Taxonomy, GetTaxonomyChildrenParams, GetProductParams, GetProductsParams, GetCurrentCartParams, GetCartParams, UpdateCartParams, AddCartItemParams, RemoveCartItemParams, ClearCartParams, QuoteCartParams, CheckoutCartParams, GetOrderParams, Order, GetOrdersParams, GetServiceParams, GetServicesParams, FindServiceProvidersParams, GetAvailabilityParams, GetProviderParams, GetProvidersParams, GetAudienceParams, Audience, GetAudiencesParams, SubscribeAudienceParams, AudienceSubscribeResponse, AudienceAccessResponse, GetAgentsParams, Agent, AgentChatMessage, AgentChat, FormField, ProductVariant, CheckoutItemInput } from './types.js';
4
+ 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-CZxubTDA.js';
5
+ import { C as Cart, an as Node, ax as Form, aX as Product, b9 as Service, bm as Provider, bf as AvailabilityResponse, ar as Block, O as OrderQuote, d7 as PaymentMethod, ea as FormEntry, cU as Price, a as OrderCheckoutResult, cO as EshopCartItem, db as Address, dd as ZoneLocation, ff as ProductCheckoutItemInput, fg as ServiceCheckoutItemInput, bu as ProfileDetail, R as RequestOptions, S as Store, L as Location, M as Market, aq as GetNodeParams, as as TaxonomyEntry, at as NodeStatus, au as GetNodesParams, y as PaginatedResponse, av as GetNodeChildrenParams, aA as GetFormParams, aC as SubmitFormParams, aD as FormSubmission, aL as GetTaxonomyParams, aI as Taxonomy, aN as GetTaxonomyChildrenParams, a_ as GetProductParams, a$ as GetProductsParams, G as GetCurrentCartParams, b as GetCartParams, U as UpdateCartParams, A as AddCartItemParams, c as RemoveCartItemParams, d as ClearCartParams, Q as QuoteCartParams, e as CheckoutCartParams, b2 as GetOrderParams, b1 as Order, b3 as GetOrdersParams, bc as GetServiceParams, bd as GetServicesParams, bg as FindServiceProvidersParams, be as GetAvailabilityParams, bp as GetProviderParams, bq as GetProvidersParams, bD as GetProfileListParams, bB as ProfileList, bE as FindProfileListsParams, cJ as SubscribeProfileListParams, cK as ProfileListSubscribeResponse, cL as ProfileListAccessParams, cM as ProfileListAccessResponse, e8 as FormField, e2 as ProductVariant, fi as CheckoutItemInput } from './api-BbBHcd4p.js';
6
6
 
7
7
  interface ArkyStoreConfig extends CreateStorefrontConfig {
8
8
  marketForLocale?: (locale: string) => string | null | undefined;
@@ -17,7 +17,7 @@ interface ArkyStoreSetupOptions extends ArkyStoreContext {
17
17
  track?: TrackParams | false | null;
18
18
  }
19
19
  interface ArkyStoreSetupResult {
20
- session: CustomerSession | null;
20
+ session: ProfileSession | null;
21
21
  cart?: Cart;
22
22
  }
23
23
  type ArkyCmsNodeParams = ArkyStoreContext & {
@@ -163,15 +163,15 @@ declare function createArkyStore(config: ArkyStoreConfig): {
163
163
  email?: string;
164
164
  verify?: boolean;
165
165
  market?: string;
166
- }) => Promise<CustomerSession>;
166
+ }) => Promise<ProfileSession>;
167
167
  verify: (params: {
168
168
  code: string;
169
- }) => Promise<CustomerToken>;
169
+ }) => Promise<ProfileToken>;
170
170
  logout: () => Promise<void>;
171
- me: () => Promise<CustomerDetail>;
172
- readonly session: CustomerSession | null;
171
+ me: () => Promise<ProfileDetail>;
172
+ readonly session: ProfileSession | null;
173
173
  readonly isAuthenticated: boolean;
174
- onAuthStateChanged(listener: AuthStateListener<CustomerSession>): () => void;
174
+ onAuthStateChanged(listener: AuthStateListener<ProfileSession>): () => void;
175
175
  store: {
176
176
  getStore(options?: RequestOptions): Promise<Store>;
177
177
  location: {
@@ -264,7 +264,7 @@ declare function createArkyStore(config: ArkyStoreConfig): {
264
264
  };
265
265
  };
266
266
  crm: {
267
- customer: {
267
+ profile: {
268
268
  identify(params?: {
269
269
  email?: string;
270
270
  verify?: boolean;
@@ -274,15 +274,13 @@ declare function createArkyStore(config: ArkyStoreConfig): {
274
274
  code: string;
275
275
  }, options?: RequestOptions): Promise<VerifyResponse>;
276
276
  logout(options?: RequestOptions): Promise<void>;
277
- getMe(options?: RequestOptions): Promise<CustomerDetail>;
277
+ getMe(options?: RequestOptions): Promise<ProfileDetail>;
278
278
  };
279
- audience: {
280
- get(params: GetAudienceParams, options?: RequestOptions): Promise<Audience>;
281
- find(params: GetAudiencesParams, options?: RequestOptions): Promise<PaginatedResponse<Audience>>;
282
- subscribe(params: SubscribeAudienceParams, options?: RequestOptions): Promise<AudienceSubscribeResponse>;
283
- checkAccess(params: {
284
- id: string;
285
- }, options?: RequestOptions): Promise<AudienceAccessResponse>;
279
+ profileList: {
280
+ get(params: GetProfileListParams, options?: RequestOptions): Promise<ProfileList>;
281
+ find(params?: FindProfileListsParams, options?: RequestOptions): Promise<PaginatedResponse<ProfileList>>;
282
+ subscribe(params: SubscribeProfileListParams, options?: RequestOptions): Promise<ProfileListSubscribeResponse>;
283
+ checkAccess(params: ProfileListAccessParams, options?: RequestOptions): Promise<ProfileListAccessResponse>;
286
284
  unsubscribe(token: string, options?: RequestOptions): Promise<{
287
285
  unsubscribed: boolean;
288
286
  }>;
@@ -295,38 +293,10 @@ declare function createArkyStore(config: ArkyStoreConfig): {
295
293
  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"];
296
294
  track(params: TrackParams): Promise<void>;
297
295
  };
298
- automation: {
299
- agent: {
300
- getAgents(params?: GetAgentsParams, options?: RequestOptions): Promise<PaginatedResponse<Agent>>;
301
- getAgent(params: {
302
- id: string;
303
- store_id?: string;
304
- }, options?: RequestOptions): Promise<Agent>;
305
- sendMessage(params: {
306
- id: string;
307
- message: string;
308
- chat_id?: string;
309
- store_id?: string;
310
- }, options?: RequestOptions): Promise<AgentChatMessage>;
311
- getChat(params: {
312
- id: string;
313
- chat_id: string;
314
- store_id?: string;
315
- }, options?: RequestOptions): Promise<AgentChat>;
316
- getChatMessages(params: {
317
- id: string;
318
- chat_id: string;
319
- limit?: number;
320
- store_id?: string;
321
- }, options?: RequestOptions): Promise<PaginatedResponse<AgentChatMessage>>;
322
- rateChat(params: {
323
- id: string;
324
- chat_id: string;
325
- rating: number;
326
- comment?: string;
327
- store_id?: string;
328
- }, options?: RequestOptions): Promise<AgentChat>;
329
- };
296
+ support: {
297
+ startConversation(params?: Omit<StartSupportConversationParams, "store_id">, opts?: RequestOptions): Promise<SupportConversationResponse>;
298
+ sendMessage(params: Omit<SendSupportMessageParams, "store_id">, opts?: RequestOptions): Promise<SupportConversationResponse>;
299
+ getConversation(params: Omit<GetSupportConversationParams, "store_id">, opts?: RequestOptions): Promise<SupportConversationResponse>;
330
300
  };
331
301
  setStoreId: (storeId: string) => void;
332
302
  getStoreId: () => string;
@@ -379,7 +349,7 @@ declare function createArkyStore(config: ArkyStoreConfig): {
379
349
  getFirstAvailableFCId: typeof getFirstAvailableFCId;
380
350
  };
381
351
  };
382
- session: nanostores.PreinitializedWritableAtom<CustomerSession | null> & object;
352
+ session: nanostores.PreinitializedWritableAtom<ProfileSession | null> & object;
383
353
  market: nanostores.ReadableAtom<Market | null>;
384
354
  market_key: nanostores.PreinitializedWritableAtom<string> & object;
385
355
  locale: nanostores.PreinitializedWritableAtom<string> & object;
@@ -395,20 +365,21 @@ declare function createArkyStore(config: ArkyStoreConfig): {
395
365
  email?: string;
396
366
  verify?: boolean;
397
367
  market?: string;
398
- }) => Promise<CustomerSession>;
368
+ }) => Promise<ProfileSession>;
399
369
  verify: (params: {
400
370
  code: string;
401
- }) => Promise<CustomerToken>;
402
- me: () => Promise<CustomerDetail>;
371
+ }) => Promise<ProfileToken>;
372
+ me: () => Promise<ProfileDetail>;
403
373
  logout: () => Promise<void>;
404
- onAuthStateChanged: (listener: AuthStateListener<CustomerSession>) => () => void;
405
- readonly currentSession: CustomerSession | null;
374
+ onAuthStateChanged: (listener: AuthStateListener<ProfileSession>) => () => void;
375
+ readonly currentSession: ProfileSession | null;
406
376
  readonly isAuthenticated: boolean;
407
377
  setMarket: (key: string) => void;
408
378
  setLocale: (value: string, options?: {
409
379
  market?: string;
410
380
  }) => void;
411
381
  setContext: (context: ArkyStoreContext) => void;
382
+ getStoreId: () => string;
412
383
  getMarket: () => string;
413
384
  getLocale: () => string;
414
385
  cms: {
@@ -514,8 +485,10 @@ declare function createArkyStore(config: ArkyStoreConfig): {
514
485
  item_count: number;
515
486
  }>;
516
487
  ensure: () => Promise<Cart>;
517
- hydrate: (response: Cart) => Promise<Cart>;
518
- sync: (input?: ArkyCartInput) => Promise<Cart>;
488
+ hydrate: (response: Cart, options?: {
489
+ ifRevision?: number;
490
+ }) => Promise<Cart>;
491
+ sync: (input?: ArkyCartInput, writeRevision?: number) => Promise<Cart>;
519
492
  addProduct: (product: Product, variant: ProductVariant, quantity?: number) => Promise<Cart>;
520
493
  setProductQuantity: (itemId: string, quantity: number) => Promise<Cart>;
521
494
  removeProduct: (itemId: string) => Promise<Cart | null>;
@@ -534,7 +507,7 @@ declare function createArkyStore(config: ArkyStoreConfig): {
534
507
  };
535
508
  };
536
509
  crm: {
537
- customer: {
510
+ profile: {
538
511
  identify(params?: {
539
512
  email?: string;
540
513
  verify?: boolean;
@@ -544,15 +517,13 @@ declare function createArkyStore(config: ArkyStoreConfig): {
544
517
  code: string;
545
518
  }, options?: RequestOptions): Promise<VerifyResponse>;
546
519
  logout(options?: RequestOptions): Promise<void>;
547
- getMe(options?: RequestOptions): Promise<CustomerDetail>;
520
+ getMe(options?: RequestOptions): Promise<ProfileDetail>;
548
521
  };
549
- audience: {
550
- get(params: GetAudienceParams, options?: RequestOptions): Promise<Audience>;
551
- find(params: GetAudiencesParams, options?: RequestOptions): Promise<PaginatedResponse<Audience>>;
552
- subscribe(params: SubscribeAudienceParams, options?: RequestOptions): Promise<AudienceSubscribeResponse>;
553
- checkAccess(params: {
554
- id: string;
555
- }, options?: RequestOptions): Promise<AudienceAccessResponse>;
522
+ profileList: {
523
+ get(params: GetProfileListParams, options?: RequestOptions): Promise<ProfileList>;
524
+ find(params?: FindProfileListsParams, options?: RequestOptions): Promise<PaginatedResponse<ProfileList>>;
525
+ subscribe(params: SubscribeProfileListParams, options?: RequestOptions): Promise<ProfileListSubscribeResponse>;
526
+ checkAccess(params: ProfileListAccessParams, options?: RequestOptions): Promise<ProfileListAccessResponse>;
556
527
  unsubscribe(token: string, options?: RequestOptions): Promise<{
557
528
  unsubscribed: boolean;
558
529
  }>;
@@ -566,6 +537,11 @@ declare function createArkyStore(config: ArkyStoreConfig): {
566
537
  pageView(payload?: Record<string, unknown>): Promise<void>;
567
538
  state: nanostores.PreinitializedWritableAtom<Activity | null> & object;
568
539
  };
540
+ support: {
541
+ startConversation(params?: Omit<StartSupportConversationParams, "store_id">, opts?: RequestOptions): Promise<SupportConversationResponse>;
542
+ sendMessage(params: Omit<SendSupportMessageParams, "store_id">, opts?: RequestOptions): Promise<SupportConversationResponse>;
543
+ getConversation(params: Omit<GetSupportConversationParams, "store_id">, opts?: RequestOptions): Promise<SupportConversationResponse>;
544
+ };
569
545
  store: {
570
546
  getStore(options?: RequestOptions): Promise<Store>;
571
547
  location: {
@@ -596,39 +572,6 @@ declare function createArkyStore(config: ArkyStoreConfig): {
596
572
  get(id: string, options?: RequestOptions): Promise<Market>;
597
573
  };
598
574
  };
599
- automation: {
600
- agent: {
601
- getAgents(params?: GetAgentsParams, options?: RequestOptions): Promise<PaginatedResponse<Agent>>;
602
- getAgent(params: {
603
- id: string;
604
- store_id?: string;
605
- }, options?: RequestOptions): Promise<Agent>;
606
- sendMessage(params: {
607
- id: string;
608
- message: string;
609
- chat_id?: string;
610
- store_id?: string;
611
- }, options?: RequestOptions): Promise<AgentChatMessage>;
612
- getChat(params: {
613
- id: string;
614
- chat_id: string;
615
- store_id?: string;
616
- }, options?: RequestOptions): Promise<AgentChat>;
617
- getChatMessages(params: {
618
- id: string;
619
- chat_id: string;
620
- limit?: number;
621
- store_id?: string;
622
- }, options?: RequestOptions): Promise<PaginatedResponse<AgentChatMessage>>;
623
- rateChat(params: {
624
- id: string;
625
- chat_id: string;
626
- rating: number;
627
- comment?: string;
628
- store_id?: string;
629
- }, options?: RequestOptions): Promise<AgentChat>;
630
- };
631
- };
632
575
  utils: {
633
576
  getImageUrl: (imageBlock: any, isBlock?: boolean) => any;
634
577
  getBlockValue: (entry: any, blockKey: string) => any;
@@ -678,4 +621,4 @@ type ArkyStore = ReturnType<typeof createArkyStore>;
678
621
  type ArkyCartStore = ArkyStore["eshop"]["cart"];
679
622
  type ArkyServiceStore = ArkyStore["eshop"]["service"];
680
623
 
681
- export { type ArkyCalendarDay as A, Activity, type ArkyCartInput, type ArkyCartSnapshot, type ArkyCartStatus, type ArkyCartStore, type ArkyCmsNodeParams, type ArkyCmsState, type ArkyEshopState, type ArkyLastOrder, type ArkyServiceCartItem, type ArkyServiceStore, type ArkyStore, type ArkyStoreConfig, type ArkyStoreContext, type ArkyStoreSetupOptions, type ArkyStoreSetupResult, AuthStateListener, CartController, CreateStorefrontConfig, CustomerSession, TrackParams, type ArkyServiceSlot as a, type ArkyServiceState as b, createArkyStore };
624
+ export { type ArkyCalendarDay as A, Activity, type ArkyCartInput, type ArkyCartSnapshot, type ArkyCartStatus, type ArkyCartStore, type ArkyCmsNodeParams, type ArkyCmsState, type ArkyEshopState, type ArkyLastOrder, type ArkyServiceCartItem, type ArkyServiceStore, type ArkyStore, type ArkyStoreConfig, type ArkyStoreContext, type ArkyStoreSetupOptions, type ArkyStoreSetupResult, AuthStateListener, CartController, CreateStorefrontConfig, ProfileSession, TrackParams, type ArkyServiceSlot as a, type ArkyServiceState as b, createArkyStore };