arky-sdk 0.7.93 → 0.7.102

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.
package/dist/index.d.cts CHANGED
@@ -1,41 +1,34 @@
1
- import * as nanostores from 'nanostores';
2
- import { atom, computed } from 'nanostores';
3
- import { RequestOptions, MagicLinkVerifyParams, MagicLinkRequestParams, UpdateAccountProfileParams, DeleteAccountParams, GetMeParams, SearchAccountsParams, Location, CreateLocationParams, UpdateLocationParams, DeleteLocationParams, Market, CreateMarketParams, UpdateMarketParams, DeleteMarketParams, CreateBusinessParams, UpdateBusinessParams, DeleteBusinessParams, GetBusinessParams, GetBusinessesParams, GetSubscriptionPlansParams, SubscribeParams, CreatePortalSessionParams, InviteUserParams, RemoveMemberParams, HandleInvitationParams, TestWebhookParams, GetBusinessMediaParams2, OAuthConnectParams, OAuthDisconnectParams, ListIntegrationsParams, CreateIntegrationParams, UpdateIntegrationParams, DeleteIntegrationParams, ListWebhooksParams, CreateWebhookParams, UpdateWebhookParams, DeleteWebhookParams, GetMediaParams, UploadBusinessMediaParams, DeleteBusinessMediaParams, GetBusinessMediaParams, UpdateMediaParams, TrackEmailOpenParams, TriggerNotificationParams, CreatePromoCodeParams, UpdatePromoCodeParams, DeletePromoCodeParams, GetPromoCodeParams, GetPromoCodesParams, GetShippingRatesParams, ShippingRate, ShipParams, ShipResult, CreateNodeParams, UpdateNodeParams, DeleteNodeParams, GetNodeParams, GetNodesParams, GetNodeChildrenParams, CreateFormParams, UpdateFormParams, DeleteFormParams, GetFormParams, GetFormsParams, SubmitFormParams, GetFormSubmissionsParams, GetFormSubmissionParams, UpdateFormSubmissionParams, CreateTaxonomyParams, UpdateTaxonomyParams, DeleteTaxonomyParams, GetTaxonomyParams, GetTaxonomiesParams, GetTaxonomyChildrenParams, CreateEmailTemplateParams, UpdateEmailTemplateParams, DeleteEmailTemplateParams, GetEmailTemplateParams, GetEmailTemplatesParams, CreateProductParams, UpdateProductParams, DeleteProductParams, GetProductParams, GetProductsParams, CreateOrderParams, UpdateOrderParams, GetOrderParams, GetOrdersParams, GetQuoteParams, ProcessOrderRefundParams, Slot, CreateBookingParams, UpdateBookingParams, GetBookingParams, SearchBookingsParams, GetBookingQuoteParams, ProcessBookingRefundParams, GetAvailabilityParams, AvailabilityResponse, CancelBookingItemParams, CreateServiceParams, UpdateServiceParams, DeleteServiceParams, GetServiceParams, GetServicesParams, FindServiceProvidersParams, CreateServiceProviderParams, UpdateServiceProviderParams, DeleteServiceProviderParams, CreateProviderParams, UpdateProviderParams, DeleteProviderParams, GetProviderParams, GetProvidersParams, CreateCustomerParams, Customer, GetCustomerParams, FindCustomersParams, UpdateCustomerParams, MergeCustomersParams, CreateAudienceParams, UpdateAudienceParams, GetAudienceParams, GetAudiencesParams, GetAudienceSubscribersParams, AddAudienceSubscriberParams, RemoveAudienceSubscriberParams, CreateAgentParams, UpdateAgentParams, DeleteAgentParams, GetAgentParams, GetAgentsParams, RunAgentParams, GetAgentChatsParams, GetAgentChatParams, UpdateAgentChatParams, RateAgentChatParams, GetBusinessChatsParams, CreateWorkflowParams, UpdateWorkflowParams, DeleteWorkflowParams, GetWorkflowParams, GetWorkflowsParams, TriggerWorkflowParams, GetWorkflowExecutionsParams, GetWorkflowExecutionParams } from './types.cjs';
4
- export { Access, Address, AgentChatStatus, AgentStatus, ApiResponse, Audience, AudienceAccessResponse, AudienceStatus, AudienceSubscribeResponse, AudienceSubscriber, AudienceSubscription, AudienceSubscriptionPayment, AudienceSubscriptionProvider, AudienceSubscriptionSource, AudienceSubscriptionStatus, AvailabilitySlot, Block, BookingCartItem, BookingPayment, BookingPaymentPromoCode, BookingPaymentProvider, BookingPaymentRefund, BookingPaymentTax, BookingPaymentTaxLine, BookingProviderStatus, BookingQuote, BookingServiceStatus, BookingStoreState, Business, BusinessSubscription, BusinessSubscriptionPayment, BusinessSubscriptionProvider, BusinessSubscriptionSource, BusinessSubscriptionStatus, CustomerStatus, CustomsDeclaration, CustomsItem, DaySlots, EmailTemplateStatus, EshopCartItem, EshopStoreState, Event, EventAction, ExecutionStatus, FormStatus, GeoLocation, GeoLocationBlock, Integration, IntegrationProvider, Language, Media, MediaResolution, Node, NodeResult, NodeStatus, OrderPayment, OrderPaymentPromoCode, OrderPaymentProvider, OrderPaymentRefund, OrderPaymentTax, OrderPaymentTaxLine, OrderQuote, OrderShipping, PaginatedResponse, Parcel, PaymentMethod, PaymentMethodType, Price, ProductStatus, PromoCodeStatus, PromoCodeValidation, ProviderAvailability, ProviderWithTimeline, PurchaseLabelResult, Shipment, ShipmentLine, ShippingAddress, ShippingMethod, ShippingStatus, ShippingWeightTier, SystemTemplateKey, TaxonomyStatus, Webhook, WebhookEventSubscription, Workflow, WorkflowEdge, WorkflowExecution, WorkflowHttpMethod, WorkflowHttpNode, WorkflowNode, WorkflowStatus, WorkflowSwitchNode, WorkflowTransformNode, WorkflowTriggerNode, Zone, ZoneLocation } from './types.cjs';
1
+ import { Customer, Store, Market, RequestOptions as RequestOptions$1, MagicLinkVerifyParams, AuthToken, MagicLinkRequestParams, UpdateAccountProfileParams, DeleteAccountParams, GetMeParams, SearchAccountsParams, Location, CreateLocationParams, UpdateLocationParams, DeleteLocationParams, CreateMarketParams, UpdateMarketParams, DeleteMarketParams, CreateStoreParams, UpdateStoreParams, DeleteStoreParams, GetStoreParams, GetStoresParams, PaginatedResponse, GetSubscriptionPlansParams, 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, CreateOrderParams, Order, UpdateOrderParams, GetOrderParams, GetOrdersParams, GetQuoteParams, OrderQuote, ProcessOrderRefundParams, Slot, CreateBookingParams, Booking, UpdateBookingParams, GetBookingParams, SearchBookingsParams, GetBookingQuoteParams, BookingQuote, ProcessBookingRefundParams, GetAvailabilityParams, AvailabilityResponse, CancelBookingItemParams, CreateServiceParams, Service, UpdateServiceParams, DeleteServiceParams, GetServiceParams, GetServicesParams, FindServiceProvidersParams, ServiceProvider, CreateServiceProviderParams, UpdateServiceProviderParams, DeleteServiceProviderParams, CreateProviderParams, Provider, UpdateProviderParams, DeleteProviderParams, GetProviderParams, GetProvidersParams, CreateCustomerParams, GetCustomerParams, FindCustomersParams, UpdateCustomerParams, MergeCustomersParams, CreateAudienceParams, Audience, UpdateAudienceParams, GetAudienceParams, GetAudiencesParams, GetAudienceSubscribersParams, AudienceSubscriber, AddAudienceSubscriberParams, AddAudienceSubscriberResponse, RemoveAudienceSubscriberParams, CreateAgentParams, Agent, UpdateAgentParams, DeleteAgentParams, GetAgentParams, GetAgentsParams, RunAgentParams, AgentChatMessage, GetAgentChatsParams, AgentChat, GetAgentChatParams, UpdateAgentChatParams, RateAgentChatParams, GetStoreChatsParams, CreateWorkflowParams, Workflow, UpdateWorkflowParams, DeleteWorkflowParams, GetWorkflowParams, GetWorkflowsParams, TriggerWorkflowParams, WorkflowExecution, GetWorkflowExecutionsParams, GetWorkflowExecutionParams, CustomerDetail, OrderCheckoutParams, BookingCheckoutParams, SubscribeAudienceParams, AudienceSubscribeResponse, AudienceAccessResponse } from './types.cjs';
2
+ export { Access, Address, AgentChatStatus, AgentStatus, ApiResponse, AudienceStatus, AudienceSubscription, AudienceSubscriptionPayment, AudienceSubscriptionProvider, AudienceSubscriptionSource, AudienceSubscriptionStatus, AudienceType, AvailabilitySlot, BookingCancellationReason, BookingCartItem, BookingItem, BookingItemSnapshot, BookingItemStatus, BookingPayment, BookingPaymentPromoCode, BookingPaymentProvider, BookingPaymentRefund, BookingPaymentStatus, BookingPaymentTax, BookingPaymentTaxLine, BookingProvider, BookingProviderStatus, BookingService, BookingServiceStatus, BookingStoreState, Condition, CustomerStatus, CustomsDeclaration, CustomsItem, DaySlots, Discount, EmailTemplateStatus, EshopCartItem, EshopStoreState, Event, EventAction, ExecutionStatus, FormEntry, FormField, FormFieldType, FormSchema, FormSchemaType, FormStatus, GalleryItem, GeoLocation, GeoLocationBlock, HistoryEntry, IntegrationProvider, InventoryLevel, Language, MediaResolution, NodeResult, OrderCancellationReason, OrderItem, OrderItemSnapshot, OrderItemStatus, OrderPayment, OrderPaymentPromoCode, OrderPaymentProvider, OrderPaymentRefund, OrderPaymentStatus, OrderPaymentTax, OrderPaymentTaxLine, OrderShipping, Parcel, PaymentMethod, PaymentMethodType, Price, ProductInventory, ProductStatus, ProductVariant, PromoCodeStatus, PromoCodeValidation, ProviderAvailability, ProviderTimelinePoint, ProviderWithTimeline, PurchaseLabelResult, ServiceDuration, Shipment, ShipmentLine, ShippingAddress, ShippingMethod, ShippingStatus, ShippingWeightTier, SpecificDate, StoreSubscription, StoreSubscriptionPayment, StoreSubscriptionProvider, StoreSubscriptionSource, StoreSubscriptionStatus, SystemTemplateKey, TaxonomyField, TaxonomyFieldQuery, TaxonomyQuery, TaxonomySchema, TaxonomySchemaType, TaxonomyStatus, TimelinePoint, WebhookEventSubscription, WorkflowEdge, WorkflowHttpMethod, WorkflowHttpNode, WorkflowLoopNode, WorkflowNode, WorkflowStatus, WorkflowSwitchNode, WorkflowSwitchRule, WorkflowTransformNode, WorkflowTriggerNode, WorkingDay, WorkingHour, Zone, ZoneLocation } from './types.cjs';
5
3
  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-BCAQZOwm.cjs';
6
4
 
5
+ type CustomerToken = {
6
+ id: string;
7
+ token: string;
8
+ created_at: number;
9
+ };
10
+ type IdentifyResponse = {
11
+ customer: Customer;
12
+ token: CustomerToken;
13
+ store: Store;
14
+ market: Market | null;
15
+ code_sent: boolean;
16
+ };
17
+ type VerifyResponse = CustomerToken;
7
18
  interface Activity$1 {
8
- business_id: string;
19
+ store_id: string;
9
20
  customer_id: string;
10
21
  type: string;
11
- payload: Record<string, any>;
22
+ payload: Record<string, unknown>;
12
23
  created_at: number;
13
24
  }
14
25
  interface TrackParams {
15
26
  type: string;
16
- payload?: Record<string, any>;
27
+ payload?: Record<string, unknown>;
17
28
  }
18
29
  declare const COMMON_ACTIVITY_TYPES: readonly ["page_view", "product_view", "service_view", "provider_view", "cart_added", "cart_removed", "checkout_started", "purchase", "booking_created", "signin", "signup", "verified_email", "search", "share", "wishlist_added"];
19
30
  type CommonActivityType = (typeof COMMON_ACTIVITY_TYPES)[number];
20
31
 
21
- interface AuthTokens {
22
- access_token: string;
23
- refresh_token?: string;
24
- access_expires_at?: number;
25
- account_id?: string;
26
- }
27
- interface HttpClientConfig {
28
- baseUrl: string;
29
- businessId: string;
30
- refreshPath?: string | (() => string);
31
- getToken?: () => Promise<AuthTokens> | AuthTokens;
32
- setToken?: (tokens: AuthTokens) => void;
33
- logout?: () => void;
34
- navigate?: (path: string) => void;
35
- loginFallbackPath?: string;
36
- isAuthenticated?: () => boolean;
37
- }
38
-
39
32
  type EntityKind = "product" | "service" | "provider" | "node" | "customer" | "audience" | "agent" | "workflow" | "promo_code" | "email_template" | "form" | "taxonomy" | "media" | "order" | "booking";
40
33
  type Granularity = "hour" | "day" | "week" | "month" | {
41
34
  minutes: 5 | 10 | 15 | 30;
@@ -92,10 +85,10 @@ interface AnalyticsQueryResponse {
92
85
  }
93
86
 
94
87
  interface Activity {
95
- business_id: string;
88
+ store_id: string;
96
89
  customer_id: string;
97
90
  type: string;
98
- payload: Record<string, any>;
91
+ payload: Record<string, unknown>;
99
92
  created_at: number;
100
93
  country_code?: string | null;
101
94
  city?: string | null;
@@ -109,7 +102,7 @@ interface Activity {
109
102
  }
110
103
  interface TimelineParams {
111
104
  customer_id: string;
112
- business_id?: string;
105
+ store_id?: string;
113
106
  limit?: number;
114
107
  cursor?: string;
115
108
  }
@@ -128,18 +121,60 @@ interface GetCountriesResponse {
128
121
  cursor: string | null;
129
122
  }
130
123
 
131
- interface StorefrontStores {
132
- customer: ReturnType<typeof atom<any>>;
133
- business: ReturnType<typeof atom<any>>;
134
- market: ReturnType<typeof atom<any>>;
135
- loading: ReturnType<typeof atom<boolean>>;
136
- error: ReturnType<typeof atom<string | null>>;
137
- isLoggedIn: ReturnType<typeof computed>;
138
- currency: ReturnType<typeof computed>;
139
- currencySymbol: ReturnType<typeof computed>;
140
- paymentMethods: ReturnType<typeof computed>;
141
- paymentConfig: ReturnType<typeof computed>;
142
- zones: ReturnType<typeof computed>;
124
+ interface QueryParams {
125
+ [key: string]: string | number | boolean | string[] | number[] | null | undefined;
126
+ }
127
+
128
+ interface AuthTokens {
129
+ access_token: string;
130
+ refresh_token?: string;
131
+ access_expires_at?: number;
132
+ account_id?: string;
133
+ }
134
+ interface RequestSuccessContext<T = unknown> {
135
+ data: T;
136
+ method: string;
137
+ url: string;
138
+ status: number;
139
+ request?: unknown;
140
+ duration_ms?: number;
141
+ request_id?: string | null;
142
+ }
143
+ interface RequestErrorContext {
144
+ error: unknown;
145
+ method: string;
146
+ url: string;
147
+ status?: number;
148
+ request?: unknown;
149
+ response?: unknown;
150
+ duration_ms?: number;
151
+ request_id?: string | null;
152
+ aborted?: boolean;
153
+ }
154
+ interface RequestOptions<T = unknown> {
155
+ headers?: Record<string, string>;
156
+ params?: QueryParams | Record<string, any>;
157
+ transformRequest?: (data: unknown) => unknown;
158
+ onSuccess?: (ctx: RequestSuccessContext<T>) => void | Promise<void>;
159
+ onError?: (ctx: RequestErrorContext) => void | Promise<void>;
160
+ }
161
+ interface HttpClient {
162
+ get<T>(path: string, opts?: RequestOptions<T>): Promise<T>;
163
+ post<T>(path: string, body: unknown, opts?: RequestOptions<T>): Promise<T>;
164
+ put<T>(path: string, body: unknown, opts?: RequestOptions<T>): Promise<T>;
165
+ patch<T>(path: string, body: unknown, opts?: RequestOptions<T>): Promise<T>;
166
+ delete<T>(path: string, opts?: RequestOptions<T>): Promise<T>;
167
+ }
168
+ interface HttpClientConfig {
169
+ baseUrl: string;
170
+ storeId: string;
171
+ refreshPath?: string | (() => string);
172
+ getToken?: () => Promise<AuthTokens> | AuthTokens;
173
+ setToken?: (tokens: AuthTokens) => void;
174
+ logout?: () => void;
175
+ navigate?: (path: string) => void;
176
+ loginFallbackPath?: string;
177
+ isAuthenticated?: () => boolean;
143
178
  }
144
179
 
145
180
  declare function getBlockLabel(block: any): string;
@@ -172,173 +207,235 @@ declare function fetchSvgContent(mediaObject: any): Promise<string | null>;
172
207
  declare function getSvgContentForAstro(mediaObject: any): Promise<string>;
173
208
  declare function injectSvgIntoElement(mediaObject: any, targetElement: HTMLElement, className?: string): Promise<void>;
174
209
 
175
- declare const SDK_VERSION = "0.7.93";
210
+ declare const SDK_VERSION = "0.7.102";
176
211
  declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
177
212
  interface ApiConfig {
178
- httpClient: any;
179
- businessId: string;
213
+ httpClient: HttpClient;
214
+ storeId: string;
180
215
  baseUrl: string;
181
216
  market: string;
182
217
  locale: string;
183
- setToken: (tokens: any) => void;
184
- getToken: () => Promise<any> | any;
218
+ setToken: (tokens: AuthTokens) => void;
219
+ getToken: () => Promise<AuthTokens> | AuthTokens;
185
220
  }
186
221
 
187
222
  declare function createAdmin(config: HttpClientConfig & {
188
223
  market: string;
189
224
  locale?: string;
190
- }): Promise<{
225
+ }): {
191
226
  auth: {
192
227
  code(params: {
193
228
  email: string;
194
- }, options?: RequestOptions): Promise<any>;
195
- verify(params: MagicLinkVerifyParams, options?: RequestOptions): Promise<any>;
229
+ }, options?: RequestOptions$1): Promise<{
230
+ sent: boolean;
231
+ }>;
232
+ verify(params: MagicLinkVerifyParams, options?: RequestOptions$1): Promise<AuthToken>;
196
233
  refresh(params: {
197
234
  refresh_token: string;
198
- }, options?: RequestOptions): Promise<any>;
199
- businessCode(businessId: string, params: {
235
+ }, options?: RequestOptions$1): Promise<AuthToken>;
236
+ storeCode(storeId: string, params: {
200
237
  email: string;
201
- }, options?: RequestOptions): Promise<any>;
202
- businessVerify(businessId: string, params: MagicLinkVerifyParams, options?: RequestOptions): Promise<any>;
203
- magicLink(params: MagicLinkRequestParams, options?: RequestOptions): Promise<any>;
238
+ }, options?: RequestOptions$1): Promise<{
239
+ sent: boolean;
240
+ }>;
241
+ storeVerify(storeId: string, params: MagicLinkVerifyParams, options?: RequestOptions$1): Promise<AuthToken>;
242
+ magicLink(params: MagicLinkRequestParams, options?: RequestOptions$1): Promise<{
243
+ sent: boolean;
244
+ }>;
204
245
  };
205
246
  account: {
206
- updateAccount(params: UpdateAccountProfileParams, options?: RequestOptions): Promise<any>;
207
- deleteAccount(params: DeleteAccountParams, options?: RequestOptions): Promise<any>;
208
- getMe(params: GetMeParams, options?: RequestOptions): Promise<any>;
209
- searchAccounts(params: SearchAccountsParams, options?: RequestOptions): Promise<any>;
247
+ updateAccount(params: UpdateAccountProfileParams, options?: RequestOptions$1): Promise<unknown>;
248
+ deleteAccount(_params: DeleteAccountParams, options?: RequestOptions$1): Promise<{
249
+ deleted: boolean;
250
+ }>;
251
+ getMe(_params: GetMeParams, options?: RequestOptions$1): Promise<unknown>;
252
+ searchAccounts(params: SearchAccountsParams, options?: RequestOptions$1): Promise<{
253
+ items: unknown[];
254
+ cursor?: string | null;
255
+ }>;
210
256
  };
211
- business: {
257
+ store: {
212
258
  location: {
213
- getCountries(options?: RequestOptions): Promise<GetCountriesResponse>;
214
- getCountry(countryCode: string, options?: RequestOptions): Promise<LocationCountry>;
215
- list(options?: RequestOptions): Promise<Location[]>;
216
- get(id: string, options?: RequestOptions): Promise<Location>;
217
- create(params: CreateLocationParams, options?: RequestOptions): Promise<Location>;
218
- update(params: UpdateLocationParams, options?: RequestOptions): Promise<Location>;
219
- delete(params: DeleteLocationParams, options?: RequestOptions): Promise<{
259
+ getCountries(options?: RequestOptions$1): Promise<GetCountriesResponse>;
260
+ getCountry(countryCode: string, options?: RequestOptions$1): Promise<LocationCountry>;
261
+ list(options?: RequestOptions$1): Promise<Location[]>;
262
+ get(id: string, options?: RequestOptions$1): Promise<Location>;
263
+ create(params: CreateLocationParams, options?: RequestOptions$1): Promise<Location>;
264
+ update(params: UpdateLocationParams, options?: RequestOptions$1): Promise<Location>;
265
+ delete(params: DeleteLocationParams, options?: RequestOptions$1): Promise<{
220
266
  deleted: boolean;
221
267
  }>;
222
268
  };
223
269
  market: {
224
- list(options?: RequestOptions): Promise<Market[]>;
225
- get(id: string, options?: RequestOptions): Promise<Market>;
226
- create(params: CreateMarketParams, options?: RequestOptions): Promise<Market>;
227
- update(params: UpdateMarketParams, options?: RequestOptions): Promise<Market>;
228
- delete(params: DeleteMarketParams, options?: RequestOptions): Promise<{
270
+ list(options?: RequestOptions$1): Promise<Market[]>;
271
+ get(id: string, options?: RequestOptions$1): Promise<Market>;
272
+ create(params: CreateMarketParams, options?: RequestOptions$1): Promise<Market>;
273
+ update(params: UpdateMarketParams, options?: RequestOptions$1): Promise<Market>;
274
+ delete(params: DeleteMarketParams, options?: RequestOptions$1): Promise<{
229
275
  deleted: boolean;
230
276
  }>;
231
277
  };
232
- createBusiness(params: CreateBusinessParams, options?: RequestOptions): Promise<any>;
233
- updateBusiness(params: UpdateBusinessParams, options?: RequestOptions): Promise<any>;
234
- deleteBusiness(params: DeleteBusinessParams, options?: RequestOptions): Promise<any>;
235
- getBusiness(params: GetBusinessParams, options?: RequestOptions): Promise<any>;
236
- getBusinesses(params?: GetBusinessesParams, options?: RequestOptions): Promise<any>;
237
- getSubscriptionPlans(params: GetSubscriptionPlansParams, options?: RequestOptions): Promise<any>;
238
- subscribe(params: SubscribeParams, options?: RequestOptions): Promise<any>;
239
- createPortalSession(params: CreatePortalSessionParams, options?: RequestOptions): Promise<any>;
240
- inviteUser(params: InviteUserParams, options?: RequestOptions): Promise<any>;
241
- removeMember(params: RemoveMemberParams, options?: RequestOptions): Promise<any>;
242
- handleInvitation(params: HandleInvitationParams, options?: RequestOptions): Promise<any>;
243
- testWebhook(params: TestWebhookParams, options?: RequestOptions): Promise<any>;
244
- getBusinessMedia(params: GetBusinessMediaParams2, options?: RequestOptions): Promise<any>;
245
- oauthConnect(params: OAuthConnectParams, options?: RequestOptions): Promise<any>;
246
- oauthDisconnect(params: OAuthDisconnectParams, options?: RequestOptions): Promise<any>;
247
- listIntegrations(params: ListIntegrationsParams, options?: RequestOptions): Promise<any>;
248
- createIntegration(params: CreateIntegrationParams, options?: RequestOptions): Promise<any>;
249
- updateIntegration(params: UpdateIntegrationParams, options?: RequestOptions): Promise<any>;
250
- deleteIntegration(params: DeleteIntegrationParams, options?: RequestOptions): Promise<any>;
278
+ createStore(params: CreateStoreParams, options?: RequestOptions$1): Promise<Store>;
279
+ updateStore(params: UpdateStoreParams, options?: RequestOptions$1): Promise<Store>;
280
+ deleteStore(params: DeleteStoreParams, options?: RequestOptions$1): Promise<{
281
+ deleted: boolean;
282
+ }>;
283
+ getStore(_params: GetStoreParams, options?: RequestOptions$1): Promise<Store>;
284
+ getStores(params?: GetStoresParams, options?: RequestOptions$1): Promise<PaginatedResponse<Store>>;
285
+ getSubscriptionPlans(_params: GetSubscriptionPlansParams, options?: RequestOptions$1): Promise<unknown[]>;
286
+ subscribe(params: SubscribeParams, options?: RequestOptions$1): Promise<{
287
+ checkout_url?: string;
288
+ }>;
289
+ createPortalSession(params: CreatePortalSessionParams, options?: RequestOptions$1): Promise<{
290
+ url: string;
291
+ }>;
292
+ inviteUser(params: InviteUserParams, options?: RequestOptions$1): Promise<{
293
+ invited: boolean;
294
+ }>;
295
+ removeMember(params: RemoveMemberParams, options?: RequestOptions$1): Promise<{
296
+ removed: boolean;
297
+ }>;
298
+ handleInvitation(params: HandleInvitationParams, options?: RequestOptions$1): Promise<{
299
+ handled: boolean;
300
+ }>;
301
+ testWebhook(params: TestWebhookParams, options?: RequestOptions$1): Promise<{
302
+ tested: boolean;
303
+ }>;
304
+ getStoreMedia(params: GetStoreMediaParams2, options?: RequestOptions$1): Promise<PaginatedResponse<Media>>;
305
+ oauthConnect(params: OAuthConnectParams, options?: RequestOptions$1): Promise<Integration>;
306
+ oauthDisconnect(params: OAuthDisconnectParams, options?: RequestOptions$1): Promise<{
307
+ disconnected: boolean;
308
+ }>;
309
+ listIntegrations(params: ListIntegrationsParams, options?: RequestOptions$1): Promise<Integration[]>;
310
+ createIntegration(params: CreateIntegrationParams, options?: RequestOptions$1): Promise<Integration>;
311
+ updateIntegration(params: UpdateIntegrationParams, options?: RequestOptions$1): Promise<Integration>;
312
+ deleteIntegration(params: DeleteIntegrationParams, options?: RequestOptions$1): Promise<{
313
+ deleted: boolean;
314
+ }>;
251
315
  getIntegrationConfig(params: {
252
- business_id: string;
316
+ store_id: string;
253
317
  type: "payment" | "shipping";
254
- }, options?: RequestOptions): Promise<any>;
255
- listWebhooks(params: ListWebhooksParams, options?: RequestOptions): Promise<any>;
256
- createWebhook(params: CreateWebhookParams, options?: RequestOptions): Promise<any>;
257
- updateWebhook(params: UpdateWebhookParams, options?: RequestOptions): Promise<any>;
258
- deleteWebhook(params: DeleteWebhookParams, options?: RequestOptions): Promise<any>;
318
+ }, options?: RequestOptions$1): Promise<unknown>;
319
+ listWebhooks(params: ListWebhooksParams, options?: RequestOptions$1): Promise<Webhook[]>;
320
+ createWebhook(params: CreateWebhookParams, options?: RequestOptions$1): Promise<Webhook>;
321
+ updateWebhook(params: UpdateWebhookParams, options?: RequestOptions$1): Promise<Webhook>;
322
+ deleteWebhook(params: DeleteWebhookParams, options?: RequestOptions$1): Promise<{
323
+ deleted: boolean;
324
+ }>;
259
325
  };
260
326
  media: {
261
- getMedia(params: GetMediaParams, options?: RequestOptions): Promise<any>;
262
- uploadBusinessMedia(params: UploadBusinessMediaParams, options?: RequestOptions): Promise<any>;
263
- deleteBusinessMedia(params: DeleteBusinessMediaParams, options?: RequestOptions): Promise<any>;
264
- getBusinessMedia(params: GetBusinessMediaParams, options?: RequestOptions): Promise<any>;
265
- updateMedia(params: UpdateMediaParams, options?: RequestOptions): Promise<any>;
327
+ getMedia(params: GetMediaParams, options?: RequestOptions$1): Promise<Media>;
328
+ uploadStoreMedia(params: UploadStoreMediaParams, _options?: RequestOptions$1): Promise<Media[]>;
329
+ deleteStoreMedia(params: DeleteStoreMediaParams, options?: RequestOptions$1): Promise<{
330
+ deleted: boolean;
331
+ }>;
332
+ getStoreMedia(params: GetStoreMediaParams, _options?: RequestOptions$1): Promise<PaginatedResponse<Media>>;
333
+ updateMedia(params: UpdateMediaParams, options?: RequestOptions$1): Promise<Media>;
266
334
  };
267
335
  notification: {
268
- trackEmailOpen(params: TrackEmailOpenParams, options?: RequestOptions): Promise<any>;
269
- trigger(params: TriggerNotificationParams, options?: RequestOptions): Promise<any>;
336
+ trackEmailOpen(params: TrackEmailOpenParams, options?: RequestOptions$1): Promise<void>;
337
+ trigger(params: TriggerNotificationParams, options?: RequestOptions$1): Promise<{
338
+ triggered: boolean;
339
+ }>;
270
340
  };
271
341
  promoCode: {
272
- createPromoCode(params: CreatePromoCodeParams, options?: RequestOptions): Promise<any>;
273
- updatePromoCode(params: UpdatePromoCodeParams, options?: RequestOptions): Promise<any>;
274
- deletePromoCode(params: DeletePromoCodeParams, options?: RequestOptions): Promise<any>;
275
- getPromoCode(params: GetPromoCodeParams, options?: RequestOptions): Promise<any>;
276
- getPromoCodes(params: GetPromoCodesParams, options?: RequestOptions): Promise<any>;
342
+ createPromoCode(params: CreatePromoCodeParams, options?: RequestOptions$1): Promise<PromoCode>;
343
+ updatePromoCode(params: UpdatePromoCodeParams, options?: RequestOptions$1): Promise<PromoCode>;
344
+ deletePromoCode(params: DeletePromoCodeParams, options?: RequestOptions$1): Promise<{
345
+ deleted: boolean;
346
+ }>;
347
+ getPromoCode(params: GetPromoCodeParams, options?: RequestOptions$1): Promise<PromoCode>;
348
+ getPromoCodes(params: GetPromoCodesParams, options?: RequestOptions$1): Promise<PaginatedResponse<PromoCode>>;
277
349
  };
278
350
  platform: {
279
- getCurrencies(options?: RequestOptions): Promise<string[]>;
280
- getIntegrationServices(options?: RequestOptions): Promise<any[]>;
281
- getWebhookEvents(options?: RequestOptions): Promise<{
351
+ getCurrencies(options?: RequestOptions$1): Promise<string[]>;
352
+ getIntegrationServices(options?: RequestOptions$1): Promise<unknown[]>;
353
+ getWebhookEvents(options?: RequestOptions$1): Promise<{
282
354
  data: string[];
283
355
  }>;
284
356
  };
285
357
  shipping: {
286
- getRates(params: GetShippingRatesParams, options?: RequestOptions): Promise<{
358
+ getRates(params: GetShippingRatesParams, options?: RequestOptions$1): Promise<{
287
359
  rates: ShippingRate[];
288
360
  }>;
289
- ship(params: ShipParams, options?: RequestOptions): Promise<ShipResult>;
361
+ ship(params: ShipParams, options?: RequestOptions$1): Promise<ShipResult>;
290
362
  };
291
363
  cms: {
292
364
  node: {
293
- create: (params: CreateNodeParams, options?: RequestOptions) => Promise<any>;
294
- update: (params: UpdateNodeParams, options?: RequestOptions) => Promise<any>;
295
- delete: (params: DeleteNodeParams, options?: RequestOptions) => Promise<any>;
296
- get: (params: GetNodeParams, options?: RequestOptions) => Promise<any>;
297
- find: (params: GetNodesParams, options?: RequestOptions) => Promise<any>;
298
- getChildren: (params: GetNodeChildrenParams, options?: RequestOptions) => Promise<any>;
365
+ create: (params: CreateNodeParams, options?: RequestOptions$1) => Promise<Node>;
366
+ update: (params: UpdateNodeParams, options?: RequestOptions$1) => Promise<Node>;
367
+ delete: (params: DeleteNodeParams, options?: RequestOptions$1) => Promise<{
368
+ deleted: boolean;
369
+ }>;
370
+ get: (params: GetNodeParams, options?: RequestOptions$1) => Promise<{
371
+ getBlock(key: string): any;
372
+ getBlockValues(key: string): any;
373
+ getImage(key: string): any;
374
+ id: string;
375
+ key: string;
376
+ store_id: string;
377
+ parent_id?: string | null;
378
+ blocks: Block[];
379
+ taxonomies: TaxonomyEntry[];
380
+ status: NodeStatus;
381
+ slug: Record<string, string>;
382
+ children: Node[];
383
+ created_at: number;
384
+ updated_at: number;
385
+ }>;
386
+ find: (params: GetNodesParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Node>>;
387
+ getChildren: (params: GetNodeChildrenParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Node>>;
299
388
  };
300
389
  form: {
301
- create: (params: CreateFormParams, options?: RequestOptions) => Promise<any>;
302
- update: (params: UpdateFormParams, options?: RequestOptions) => Promise<any>;
303
- delete: (params: DeleteFormParams, options?: RequestOptions) => Promise<any>;
304
- get: (params: GetFormParams, options?: RequestOptions) => Promise<any>;
305
- find: (params: GetFormsParams, options?: RequestOptions) => Promise<any>;
306
- submit: (params: SubmitFormParams, options?: RequestOptions) => Promise<any>;
307
- getSubmissions: (params: GetFormSubmissionsParams, options?: RequestOptions) => Promise<any>;
308
- getSubmission: (params: GetFormSubmissionParams, options?: RequestOptions) => Promise<any>;
309
- updateSubmission: (params: UpdateFormSubmissionParams, options?: RequestOptions) => Promise<any>;
390
+ create: (params: CreateFormParams, options?: RequestOptions$1) => Promise<Form>;
391
+ update: (params: UpdateFormParams, options?: RequestOptions$1) => Promise<Form>;
392
+ delete: (params: DeleteFormParams, options?: RequestOptions$1) => Promise<{
393
+ deleted: boolean;
394
+ }>;
395
+ get: (params: GetFormParams, options?: RequestOptions$1) => Promise<Form>;
396
+ find: (params: GetFormsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Form>>;
397
+ submit: (params: SubmitFormParams, options?: RequestOptions$1) => Promise<FormSubmission>;
398
+ getSubmissions: (params: GetFormSubmissionsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<FormSubmission>>;
399
+ getSubmission: (params: GetFormSubmissionParams, options?: RequestOptions$1) => Promise<FormSubmission>;
400
+ updateSubmission: (params: UpdateFormSubmissionParams, options?: RequestOptions$1) => Promise<FormSubmission>;
310
401
  };
311
402
  taxonomy: {
312
- create: (params: CreateTaxonomyParams, options?: RequestOptions) => Promise<any>;
313
- update: (params: UpdateTaxonomyParams, options?: RequestOptions) => Promise<any>;
314
- delete: (params: DeleteTaxonomyParams, options?: RequestOptions) => Promise<any>;
315
- get: (params: GetTaxonomyParams, options?: RequestOptions) => Promise<any>;
316
- find: (params: GetTaxonomiesParams, options?: RequestOptions) => Promise<any>;
317
- getChildren: (params: GetTaxonomyChildrenParams, options?: RequestOptions) => Promise<any>;
403
+ create: (params: CreateTaxonomyParams, options?: RequestOptions$1) => Promise<Taxonomy>;
404
+ update: (params: UpdateTaxonomyParams, options?: RequestOptions$1) => Promise<Taxonomy>;
405
+ delete: (params: DeleteTaxonomyParams, options?: RequestOptions$1) => Promise<{
406
+ deleted: boolean;
407
+ }>;
408
+ get: (params: GetTaxonomyParams, options?: RequestOptions$1) => Promise<Taxonomy>;
409
+ find: (params: GetTaxonomiesParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Taxonomy>>;
410
+ getChildren: (params: GetTaxonomyChildrenParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Taxonomy>>;
318
411
  };
319
412
  emailTemplate: {
320
- create: (params: CreateEmailTemplateParams, options?: RequestOptions) => Promise<any>;
321
- update: (params: UpdateEmailTemplateParams, options?: RequestOptions) => Promise<any>;
322
- delete: (params: DeleteEmailTemplateParams, options?: RequestOptions) => Promise<any>;
323
- get: (params: GetEmailTemplateParams, options?: RequestOptions) => Promise<any>;
324
- find: (params: GetEmailTemplatesParams, options?: RequestOptions) => Promise<any>;
413
+ create: (params: CreateEmailTemplateParams, options?: RequestOptions$1) => Promise<EmailTemplate>;
414
+ update: (params: UpdateEmailTemplateParams, options?: RequestOptions$1) => Promise<EmailTemplate>;
415
+ delete: (params: DeleteEmailTemplateParams, options?: RequestOptions$1) => Promise<{
416
+ deleted: boolean;
417
+ }>;
418
+ get: (params: GetEmailTemplateParams, options?: RequestOptions$1) => Promise<EmailTemplate>;
419
+ find: (params: GetEmailTemplatesParams, options?: RequestOptions$1) => Promise<PaginatedResponse<EmailTemplate>>;
325
420
  };
326
421
  };
327
422
  eshop: {
328
423
  product: {
329
- create: (params: CreateProductParams, options?: RequestOptions) => Promise<any>;
330
- update: (params: UpdateProductParams, options?: RequestOptions) => Promise<any>;
331
- delete: (params: DeleteProductParams, options?: RequestOptions) => Promise<any>;
332
- get: (params: GetProductParams, options?: RequestOptions) => Promise<any>;
333
- find: (params: GetProductsParams, options?: RequestOptions) => Promise<any>;
424
+ create: (params: CreateProductParams, options?: RequestOptions$1) => Promise<Product>;
425
+ update: (params: UpdateProductParams, options?: RequestOptions$1) => Promise<Product>;
426
+ delete: (params: DeleteProductParams, options?: RequestOptions$1) => Promise<{
427
+ deleted: boolean;
428
+ }>;
429
+ get: (params: GetProductParams, options?: RequestOptions$1) => Promise<Product>;
430
+ find: (params: GetProductsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Product>>;
334
431
  };
335
432
  order: {
336
- create: (params: CreateOrderParams, options?: RequestOptions) => Promise<any>;
337
- update: (params: UpdateOrderParams, options?: RequestOptions) => Promise<any>;
338
- get: (params: GetOrderParams, options?: RequestOptions) => Promise<any>;
339
- find: (params: GetOrdersParams, options?: RequestOptions) => Promise<any>;
340
- getQuote: (params: GetQuoteParams, options?: RequestOptions) => Promise<any>;
341
- processRefund: (params: ProcessOrderRefundParams, options?: RequestOptions) => Promise<any>;
433
+ create: (params: CreateOrderParams, options?: RequestOptions$1) => Promise<Order>;
434
+ update: (params: UpdateOrderParams, options?: RequestOptions$1) => Promise<Order>;
435
+ get: (params: GetOrderParams, options?: RequestOptions$1) => Promise<Order>;
436
+ find: (params: GetOrdersParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Order>>;
437
+ getQuote: (params: GetQuoteParams, options?: RequestOptions$1) => Promise<OrderQuote>;
438
+ processRefund: (params: ProcessOrderRefundParams, options?: RequestOptions$1) => Promise<Order>;
342
439
  };
343
440
  };
344
441
  booking: {
@@ -346,64 +443,73 @@ declare function createAdmin(config: HttpClientConfig & {
346
443
  removeFromCart: (slotId: string) => void;
347
444
  getCart: () => Slot[];
348
445
  clearCart: () => void;
349
- create: (params: CreateBookingParams, options?: RequestOptions) => Promise<any>;
350
- update: (params: UpdateBookingParams, options?: RequestOptions) => Promise<any>;
351
- get: (params: GetBookingParams, options?: RequestOptions) => Promise<any>;
352
- find: (params: SearchBookingsParams, options?: RequestOptions) => Promise<any>;
353
- getQuote: (params: GetBookingQuoteParams, options?: RequestOptions) => Promise<any>;
354
- processRefund: (params: ProcessBookingRefundParams, options?: RequestOptions) => Promise<any>;
355
- getAvailability: (params: GetAvailabilityParams, options?: RequestOptions) => Promise<AvailabilityResponse>;
356
- cancelItem: (params: CancelBookingItemParams, options?: RequestOptions) => Promise<any>;
446
+ create: (params: CreateBookingParams, options?: RequestOptions$1) => Promise<Booking>;
447
+ update: (params: UpdateBookingParams, options?: RequestOptions$1) => Promise<Booking>;
448
+ get: (params: GetBookingParams, options?: RequestOptions$1) => Promise<Booking>;
449
+ find: (params: SearchBookingsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Booking>>;
450
+ getQuote: (params: GetBookingQuoteParams, options?: RequestOptions$1) => Promise<BookingQuote>;
451
+ processRefund: (params: ProcessBookingRefundParams, options?: RequestOptions$1) => Promise<Booking>;
452
+ getAvailability: (params: GetAvailabilityParams, options?: RequestOptions$1) => Promise<AvailabilityResponse>;
453
+ cancelItem: (params: CancelBookingItemParams, options?: RequestOptions$1) => Promise<Booking>;
357
454
  service: {
358
- create: (params: CreateServiceParams, options?: RequestOptions) => Promise<any>;
359
- update: (params: UpdateServiceParams, options?: RequestOptions) => Promise<any>;
360
- delete: (params: DeleteServiceParams, options?: RequestOptions) => Promise<any>;
361
- get: (params: GetServiceParams, options?: RequestOptions) => Promise<any>;
362
- find: (params: GetServicesParams, options?: RequestOptions) => Promise<any>;
363
- findProviders: (params: FindServiceProvidersParams, options?: RequestOptions) => Promise<any>;
364
- createProvider: (params: CreateServiceProviderParams, options?: RequestOptions) => Promise<any>;
365
- updateProvider: (params: UpdateServiceProviderParams, options?: RequestOptions) => Promise<any>;
366
- deleteProvider: (params: DeleteServiceProviderParams, options?: RequestOptions) => Promise<any>;
455
+ create: (params: CreateServiceParams, options?: RequestOptions$1) => Promise<Service>;
456
+ update: (params: UpdateServiceParams, options?: RequestOptions$1) => Promise<Service>;
457
+ delete: (params: DeleteServiceParams, options?: RequestOptions$1) => Promise<void>;
458
+ get: (params: GetServiceParams, options?: RequestOptions$1) => Promise<Service>;
459
+ find: (params: GetServicesParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Service>>;
460
+ findProviders: (params: FindServiceProvidersParams, options?: RequestOptions$1) => Promise<ServiceProvider[]>;
461
+ createProvider: (params: CreateServiceProviderParams, options?: RequestOptions$1) => Promise<ServiceProvider>;
462
+ updateProvider: (params: UpdateServiceProviderParams, options?: RequestOptions$1) => Promise<ServiceProvider>;
463
+ deleteProvider: (params: DeleteServiceProviderParams, options?: RequestOptions$1) => Promise<void>;
367
464
  };
368
465
  provider: {
369
- create: (params: CreateProviderParams, options?: RequestOptions) => Promise<any>;
370
- update: (params: UpdateProviderParams, options?: RequestOptions) => Promise<any>;
371
- delete: (params: DeleteProviderParams, options?: RequestOptions) => Promise<any>;
372
- get: (params: GetProviderParams, options?: RequestOptions) => Promise<any>;
373
- find: (params: GetProvidersParams, options?: RequestOptions) => Promise<any>;
466
+ create: (params: CreateProviderParams, options?: RequestOptions$1) => Promise<Provider>;
467
+ update: (params: UpdateProviderParams, options?: RequestOptions$1) => Promise<Provider>;
468
+ delete: (params: DeleteProviderParams, options?: RequestOptions$1) => Promise<void>;
469
+ get: (params: GetProviderParams, options?: RequestOptions$1) => Promise<Provider>;
470
+ find: (params: GetProvidersParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Provider>>;
374
471
  };
375
472
  };
376
473
  crm: {
377
474
  customer: {
378
- create: (params: CreateCustomerParams, options?: RequestOptions) => Promise<Customer>;
379
- get: (params: GetCustomerParams, options?: RequestOptions) => Promise<Customer>;
380
- find: (params?: FindCustomersParams, options?: RequestOptions) => Promise<{
475
+ create: (params: CreateCustomerParams, options?: RequestOptions$1) => Promise<Customer>;
476
+ get: (params: GetCustomerParams, options?: RequestOptions$1) => Promise<Customer>;
477
+ find: (params?: FindCustomersParams, options?: RequestOptions$1) => Promise<{
381
478
  items: Customer[];
382
479
  cursor?: string;
383
480
  }>;
384
- update: (params: UpdateCustomerParams, options?: RequestOptions) => Promise<Customer>;
385
- merge: (params: MergeCustomersParams, options?: RequestOptions) => Promise<Customer>;
481
+ update: (params: UpdateCustomerParams, options?: RequestOptions$1) => Promise<Customer>;
482
+ merge: (params: MergeCustomersParams, options?: RequestOptions$1) => Promise<Customer>;
386
483
  revokeToken: (params: {
387
484
  id: string;
388
485
  token_id: string;
389
- business_id?: string;
390
- }, options?: RequestOptions) => Promise<any>;
486
+ store_id?: string;
487
+ }, options?: RequestOptions$1) => Promise<{
488
+ deleted: boolean;
489
+ }>;
391
490
  revokeAllTokens: (params: {
392
491
  id: string;
393
- business_id?: string;
394
- }, options?: RequestOptions) => Promise<any>;
492
+ store_id?: string;
493
+ }, options?: RequestOptions$1) => Promise<{
494
+ deleted: boolean;
495
+ }>;
395
496
  };
396
497
  audience: {
397
- create: (params: CreateAudienceParams, options?: RequestOptions) => Promise<any>;
398
- update: (params: UpdateAudienceParams, options?: RequestOptions) => Promise<any>;
399
- get: (params: GetAudienceParams, options?: RequestOptions) => Promise<any>;
400
- find: (params: GetAudiencesParams, options?: RequestOptions) => Promise<any>;
401
- getSubscribers: (params: GetAudienceSubscribersParams, options?: RequestOptions) => Promise<any>;
402
- addSubscriber: (params: AddAudienceSubscriberParams, options?: RequestOptions) => Promise<any>;
403
- removeSubscriber: (params: RemoveAudienceSubscriberParams, options?: RequestOptions) => Promise<any>;
498
+ create: (params: CreateAudienceParams, options?: RequestOptions$1) => Promise<Audience>;
499
+ update: (params: UpdateAudienceParams, options?: RequestOptions$1) => Promise<Audience>;
500
+ get: (params: GetAudienceParams, options?: RequestOptions$1) => Promise<Audience>;
501
+ find: (params: GetAudiencesParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Audience>>;
502
+ getSubscribers: (params: GetAudienceSubscribersParams, options?: RequestOptions$1) => Promise<{
503
+ items: AudienceSubscriber[];
504
+ cursor?: string | null;
505
+ }>;
506
+ addSubscriber: (params: AddAudienceSubscriberParams, options?: RequestOptions$1) => Promise<AddAudienceSubscriberResponse>;
507
+ removeSubscriber: (params: RemoveAudienceSubscriberParams, options?: RequestOptions$1) => Promise<{
508
+ deleted: boolean;
509
+ }>;
404
510
  };
405
511
  activity: {
406
- timeline(params: TimelineParams, options?: RequestOptions): Promise<{
512
+ timeline(params: TimelineParams, options?: RequestOptions$1): Promise<{
407
513
  items: Activity[];
408
514
  cursor: string | null;
409
515
  }>;
@@ -411,39 +517,43 @@ declare function createAdmin(config: HttpClientConfig & {
411
517
  };
412
518
  automation: {
413
519
  agent: {
414
- create: (params: CreateAgentParams, options?: RequestOptions) => Promise<any>;
415
- update: (params: UpdateAgentParams, options?: RequestOptions) => Promise<any>;
416
- delete: (params: DeleteAgentParams, options?: RequestOptions) => Promise<any>;
417
- get: (params: GetAgentParams, options?: RequestOptions) => Promise<any>;
418
- find: (params?: GetAgentsParams, options?: RequestOptions) => Promise<any>;
419
- sendMessage: (params: RunAgentParams, options?: RequestOptions) => Promise<any>;
420
- getChats: (params: GetAgentChatsParams, options?: RequestOptions) => Promise<any>;
421
- getChat: (params: GetAgentChatParams, options?: RequestOptions) => Promise<any>;
422
- updateChat: (params: UpdateAgentChatParams, options?: RequestOptions) => Promise<any>;
423
- rateChat: (params: RateAgentChatParams, options?: RequestOptions) => Promise<any>;
424
- getBusinessChats: (params: GetBusinessChatsParams, options?: RequestOptions) => Promise<any>;
520
+ create: (params: CreateAgentParams, options?: RequestOptions$1) => Promise<Agent>;
521
+ update: (params: UpdateAgentParams, options?: RequestOptions$1) => Promise<Agent>;
522
+ delete: (params: DeleteAgentParams, options?: RequestOptions$1) => Promise<{
523
+ deleted: boolean;
524
+ }>;
525
+ get: (params: GetAgentParams, options?: RequestOptions$1) => Promise<Agent>;
526
+ find: (params?: GetAgentsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Agent>>;
527
+ sendMessage: (params: RunAgentParams, options?: RequestOptions$1) => Promise<AgentChatMessage>;
528
+ getChats: (params: GetAgentChatsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<AgentChat>>;
529
+ getChat: (params: GetAgentChatParams, options?: RequestOptions$1) => Promise<AgentChat>;
530
+ updateChat: (params: UpdateAgentChatParams, options?: RequestOptions$1) => Promise<AgentChat>;
531
+ rateChat: (params: RateAgentChatParams, options?: RequestOptions$1) => Promise<AgentChat>;
532
+ getStoreChats: (params: GetStoreChatsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<AgentChat>>;
425
533
  getChatMessages: (params: GetAgentChatParams & {
426
534
  limit?: number;
427
- }, options?: RequestOptions) => Promise<any>;
535
+ }, options?: RequestOptions$1) => Promise<PaginatedResponse<AgentChatMessage>>;
428
536
  };
429
537
  workflow: {
430
- create: (params: CreateWorkflowParams, options?: RequestOptions) => Promise<any>;
431
- update: (params: UpdateWorkflowParams, options?: RequestOptions) => Promise<any>;
432
- delete: (params: DeleteWorkflowParams, options?: RequestOptions) => Promise<any>;
433
- get: (params: GetWorkflowParams, options?: RequestOptions) => Promise<any>;
434
- find: (params?: GetWorkflowsParams, options?: RequestOptions) => Promise<any>;
435
- trigger: (params: TriggerWorkflowParams, options?: RequestOptions) => Promise<any>;
436
- getExecutions: (params: GetWorkflowExecutionsParams, options?: RequestOptions) => Promise<any>;
437
- getExecution: (params: GetWorkflowExecutionParams, options?: RequestOptions) => Promise<any>;
538
+ create: (params: CreateWorkflowParams, options?: RequestOptions$1) => Promise<Workflow>;
539
+ update: (params: UpdateWorkflowParams, options?: RequestOptions$1) => Promise<Workflow>;
540
+ delete: (params: DeleteWorkflowParams, options?: RequestOptions$1) => Promise<{
541
+ deleted: boolean;
542
+ }>;
543
+ get: (params: GetWorkflowParams, options?: RequestOptions$1) => Promise<Workflow>;
544
+ find: (params?: GetWorkflowsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Workflow>>;
545
+ trigger: (params: TriggerWorkflowParams, options?: RequestOptions$1) => Promise<WorkflowExecution>;
546
+ getExecutions: (params: GetWorkflowExecutionsParams, options?: RequestOptions$1) => Promise<PaginatedResponse<WorkflowExecution>>;
547
+ getExecution: (params: GetWorkflowExecutionParams, options?: RequestOptions$1) => Promise<WorkflowExecution>;
438
548
  };
439
549
  };
440
550
  analytics: {
441
- query: (spec: AnalyticsQuery, options?: RequestOptions & {
442
- business_id?: string;
551
+ query: (spec: AnalyticsQuery, options?: RequestOptions$1 & {
552
+ store_id?: string;
443
553
  }) => Promise<AnalyticsQueryResponse>;
444
554
  };
445
- setBusinessId: (businessId: string) => void;
446
- getBusinessId: () => string;
555
+ setStoreId: (storeId: string) => void;
556
+ getStoreId: () => string;
447
557
  setMarket: (market: string) => void;
448
558
  getMarket: () => string;
449
559
  setLocale: (locale: string) => void;
@@ -495,71 +605,104 @@ declare function createAdmin(config: HttpClientConfig & {
495
605
  getInventoryAt: typeof getInventoryAt;
496
606
  getFirstAvailableFCId: typeof getFirstAvailableFCId;
497
607
  };
498
- }>;
608
+ };
609
+
499
610
  interface StorefrontSession {
500
- customer: any;
501
- business: any;
502
- market: any;
611
+ customer: Customer;
612
+ store: Store;
613
+ market: Market | null;
503
614
  }
615
+ type StorefrontSessionListener = (session: StorefrontSession | null) => void;
504
616
  declare function createStorefront(config: HttpClientConfig & {
505
617
  market?: string;
506
618
  locale?: string;
507
619
  }): {
508
- session: (market?: string) => Promise<StorefrontSession>;
509
- stores: {
510
- customer: nanostores.PreinitializedWritableAtom<any> & object;
511
- business: nanostores.PreinitializedWritableAtom<any> & object;
512
- market: nanostores.PreinitializedWritableAtom<any> & object;
513
- loading: nanostores.PreinitializedWritableAtom<boolean> & object;
514
- error: nanostores.PreinitializedWritableAtom<string> & object;
515
- isLoggedIn: nanostores.ReadableAtom<boolean>;
516
- currency: nanostores.ReadableAtom<any>;
517
- currencySymbol: nanostores.ReadableAtom<any>;
518
- paymentMethods: nanostores.ReadableAtom<any>;
519
- paymentConfig: nanostores.ReadableAtom<{
520
- provider: any;
521
- enabled: boolean;
522
- }>;
523
- zones: nanostores.ReadableAtom<any>;
524
- };
525
- business: {
526
- getBusiness(options?: RequestOptions): any;
620
+ identify: (params?: {
621
+ email?: string;
622
+ verify?: boolean;
623
+ market?: string;
624
+ }) => Promise<StorefrontSession>;
625
+ verify: (params: {
626
+ code: string;
627
+ }) => Promise<CustomerToken>;
628
+ me: () => Promise<CustomerDetail>;
629
+ logout: () => Promise<void>;
630
+ getSession: () => StorefrontSession | null;
631
+ onSessionChange: (listener: StorefrontSessionListener) => () => void;
632
+ store: {
633
+ getStore(options?: RequestOptions$1): Promise<Store>;
527
634
  location: {
528
- getCountries(options?: RequestOptions): any;
529
- getCountry(countryCode: string, options?: RequestOptions): any;
530
- list(options?: RequestOptions): any;
531
- get(id: string, options?: RequestOptions): any;
635
+ getCountries(options?: RequestOptions$1): Promise<{
636
+ items: {
637
+ code: string;
638
+ name: string;
639
+ states: {
640
+ code: string;
641
+ name: string;
642
+ }[];
643
+ }[];
644
+ cursor: string | null;
645
+ }>;
646
+ getCountry(countryCode: string, options?: RequestOptions$1): Promise<{
647
+ code: string;
648
+ name: string;
649
+ states: {
650
+ code: string;
651
+ name: string;
652
+ }[];
653
+ }>;
654
+ list(options?: RequestOptions$1): Promise<Location[]>;
655
+ get(id: string, options?: RequestOptions$1): Promise<Location>;
532
656
  };
533
657
  market: {
534
- list(options?: RequestOptions): any;
535
- get(id: string, options?: RequestOptions): any;
658
+ list(options?: RequestOptions$1): Promise<Market[]>;
659
+ get(id: string, options?: RequestOptions$1): Promise<Market>;
536
660
  };
537
661
  };
538
662
  cms: {
539
663
  node: {
540
- get(params: any, options?: RequestOptions): Promise<any>;
541
- find(params: any, options?: RequestOptions): any;
542
- getChildren(params: any, options?: RequestOptions): any;
664
+ get(params: GetNodeParams, options?: RequestOptions$1): Promise<{
665
+ getBlock(key: string): any;
666
+ getBlockValues(key: string): any;
667
+ getImage(key: string): any;
668
+ id: string;
669
+ key: string;
670
+ store_id: string;
671
+ parent_id?: string | null;
672
+ blocks: Block[];
673
+ taxonomies: TaxonomyEntry[];
674
+ status: NodeStatus;
675
+ slug: Record<string, string>;
676
+ children: Node[];
677
+ created_at: number;
678
+ updated_at: number;
679
+ }>;
680
+ find(params: GetNodesParams, options?: RequestOptions$1): Promise<PaginatedResponse<Node>>;
681
+ getChildren(params: GetNodeChildrenParams, options?: RequestOptions$1): Promise<PaginatedResponse<Node>>;
543
682
  };
544
683
  form: {
545
- get(params: any, options?: RequestOptions): any;
546
- submit(params: any, options?: RequestOptions): any;
684
+ get(params: GetFormParams, options?: RequestOptions$1): Promise<Form>;
685
+ submit(params: SubmitFormParams, options?: RequestOptions$1): Promise<FormSubmission>;
547
686
  };
548
687
  taxonomy: {
549
- get(params: any, options?: RequestOptions): any;
550
- getChildren(params: any, options?: RequestOptions): any;
688
+ get(params: GetTaxonomyParams, options?: RequestOptions$1): Promise<Taxonomy>;
689
+ getChildren(params: GetTaxonomyChildrenParams, options?: RequestOptions$1): Promise<PaginatedResponse<Taxonomy>>;
551
690
  };
552
691
  };
553
692
  eshop: {
554
693
  product: {
555
- get(params: any, options?: RequestOptions): any;
556
- find(params: any, options?: RequestOptions): any;
694
+ get(params: GetProductParams, options?: RequestOptions$1): Promise<Product>;
695
+ find(params: GetProductsParams, options?: RequestOptions$1): Promise<PaginatedResponse<Product>>;
557
696
  };
558
697
  order: {
559
- getQuote(params: any, options?: RequestOptions): any;
560
- checkout(params: any, options?: RequestOptions): any;
561
- get(params: any, options?: RequestOptions): any;
562
- find(params: any, options?: RequestOptions): any;
698
+ getQuote(params: GetQuoteParams & {
699
+ store_id?: string;
700
+ }, options?: RequestOptions$1): Promise<OrderQuote>;
701
+ checkout(params: OrderCheckoutParams & {
702
+ store_id?: string;
703
+ }, options?: RequestOptions$1): Promise<Order>;
704
+ get(params: GetOrderParams, options?: RequestOptions$1): Promise<Order>;
705
+ find(params: GetOrdersParams, options?: RequestOptions$1): Promise<PaginatedResponse<Order>>;
563
706
  };
564
707
  };
565
708
  booking: {
@@ -567,101 +710,100 @@ declare function createStorefront(config: HttpClientConfig & {
567
710
  removeFromCart(slotId: string): void;
568
711
  getCart(): Slot[];
569
712
  clearCart(): void;
570
- checkout(params?: any, options?: RequestOptions): any;
571
- get(params: any, options?: RequestOptions): any;
572
- find(params: any, options?: RequestOptions): any;
573
- getQuote(params: any, options?: RequestOptions): any;
574
- getAvailability(params: any, options?: RequestOptions): any;
575
- cancelItem(params: any, options?: RequestOptions): any;
713
+ checkout(params?: Partial<BookingCheckoutParams>, options?: RequestOptions$1): Promise<Booking>;
714
+ get(params: GetBookingParams, options?: RequestOptions$1): Promise<Booking>;
715
+ find(params: SearchBookingsParams, options?: RequestOptions$1): Promise<PaginatedResponse<Booking>>;
716
+ getQuote(params: GetBookingQuoteParams, options?: RequestOptions$1): Promise<BookingQuote>;
717
+ getAvailability(params: GetAvailabilityParams, options?: RequestOptions$1): Promise<AvailabilityResponse>;
718
+ cancelItem(params: CancelBookingItemParams, options?: RequestOptions$1): Promise<Booking>;
576
719
  service: {
577
- get(params: any, options?: RequestOptions): any;
578
- find(params: any, options?: RequestOptions): any;
579
- findProviders(params: any, options?: RequestOptions): any;
720
+ get(params: GetServiceParams, options?: RequestOptions$1): Promise<Service>;
721
+ find(params: GetServicesParams, options?: RequestOptions$1): Promise<PaginatedResponse<Service>>;
722
+ findProviders(params: FindServiceProvidersParams, options?: RequestOptions$1): Promise<Provider[]>;
580
723
  };
581
724
  provider: {
582
- get(params: any, options?: RequestOptions): any;
583
- find(params: any, options?: RequestOptions): any;
725
+ get(params: GetProviderParams, options?: RequestOptions$1): Promise<Provider>;
726
+ find(params: GetProvidersParams, options?: RequestOptions$1): Promise<PaginatedResponse<Provider>>;
584
727
  };
585
728
  };
586
729
  crm: {
587
730
  customer: {
588
- session(params?: {
589
- business_id?: string;
731
+ identify(params?: Parameters<(params?: {
732
+ email?: string;
733
+ verify?: boolean;
734
+ market?: string;
735
+ }, options?: RequestOptions$1) => Promise<IdentifyResponse>>[0], options?: Parameters<(params?: {
736
+ email?: string;
737
+ verify?: boolean;
590
738
  market?: string;
591
- }, options?: RequestOptions): Promise<any>;
592
- connect(params: any, options?: RequestOptions): Promise<any>;
593
- requestCode(params: {
594
- email: string;
595
- business_id?: string;
596
- }, options?: RequestOptions): any;
597
- verify(params: {
598
- email: string;
739
+ }, options?: RequestOptions$1) => Promise<IdentifyResponse>>[1]): Promise<IdentifyResponse>;
740
+ verify: (params: Parameters<(params: {
741
+ code: string;
742
+ }, options?: RequestOptions$1) => Promise<VerifyResponse>>[0], options?: Parameters<(params: {
599
743
  code: string;
600
- business_id?: string;
601
- }, options?: RequestOptions): Promise<any>;
602
- refreshToken(params: {
603
- refresh_token: string;
604
- business_id?: string;
605
- }, options?: RequestOptions): Promise<any>;
606
- getMe(options?: RequestOptions): any;
744
+ }, options?: RequestOptions$1) => Promise<VerifyResponse>>[1]) => Promise<CustomerToken>;
745
+ logout(options?: RequestOptions$1): Promise<void>;
746
+ getMe(options?: RequestOptions$1): Promise<CustomerDetail>;
607
747
  };
608
748
  audience: {
609
- get(params: any, options?: RequestOptions): any;
610
- find(params: any, options?: RequestOptions): any;
611
- subscribe(params: any, options?: RequestOptions): any;
749
+ get(params: GetAudienceParams, options?: RequestOptions$1): Promise<Audience>;
750
+ find(params: GetAudiencesParams, options?: RequestOptions$1): Promise<PaginatedResponse<Audience>>;
751
+ subscribe(params: SubscribeAudienceParams, options?: RequestOptions$1): Promise<AudienceSubscribeResponse>;
612
752
  checkAccess(params: {
613
753
  id: string;
614
- }, options?: RequestOptions): any;
615
- unsubscribe(token: string, options?: RequestOptions): any;
616
- confirm(token: string, options?: RequestOptions): any;
754
+ }, options?: RequestOptions$1): Promise<AudienceAccessResponse>;
755
+ unsubscribe(token: string, options?: RequestOptions$1): Promise<{
756
+ unsubscribed: boolean;
757
+ }>;
758
+ confirm(token: string, options?: RequestOptions$1): Promise<{
759
+ confirmed: boolean;
760
+ }>;
617
761
  };
618
762
  };
619
763
  activity: {
620
764
  COMMON_ACTIVITY_TYPES: readonly ["page_view", "product_view", "service_view", "provider_view", "cart_added", "cart_removed", "checkout_started", "purchase", "booking_created", "signin", "signup", "verified_email", "search", "share", "wishlist_added"];
621
765
  track(params: TrackParams): Promise<void>;
622
766
  };
623
- ready: Promise<void>;
624
767
  automation: {
625
768
  agent: {
626
- getAgents(params?: any, options?: RequestOptions): any;
769
+ getAgents(params?: GetAgentsParams, options?: RequestOptions$1): Promise<PaginatedResponse<Agent>>;
627
770
  getAgent(params: {
628
771
  id: string;
629
- business_id?: string;
630
- }, options?: RequestOptions): any;
772
+ store_id?: string;
773
+ }, options?: RequestOptions$1): Promise<Agent>;
631
774
  sendMessage(params: {
632
775
  id: string;
633
776
  message: string;
634
777
  chat_id?: string;
635
- business_id?: string;
636
- }, options?: RequestOptions): any;
778
+ store_id?: string;
779
+ }, options?: RequestOptions$1): Promise<AgentChatMessage>;
637
780
  getChat(params: {
638
781
  id: string;
639
782
  chat_id: string;
640
- business_id?: string;
641
- }, options?: RequestOptions): any;
783
+ store_id?: string;
784
+ }, options?: RequestOptions$1): Promise<AgentChat>;
642
785
  getChatMessages(params: {
643
786
  id: string;
644
787
  chat_id: string;
645
788
  limit?: number;
646
- business_id?: string;
647
- }, options?: RequestOptions): any;
789
+ store_id?: string;
790
+ }, options?: RequestOptions$1): Promise<PaginatedResponse<AgentChatMessage>>;
648
791
  rateChat(params: {
649
792
  id: string;
650
793
  chat_id: string;
651
794
  rating: number;
652
795
  comment?: string;
653
- business_id?: string;
654
- }, options?: RequestOptions): any;
796
+ store_id?: string;
797
+ }, options?: RequestOptions$1): Promise<AgentChat>;
655
798
  };
656
799
  };
657
- setBusinessId: (businessId: string) => void;
658
- getBusinessId: () => string;
659
- setMarket: (key: string) => Promise<StorefrontSession>;
800
+ setStoreId: (storeId: string) => void;
801
+ getStoreId: () => string;
802
+ setMarket: (key: string) => void;
660
803
  getMarket: () => string;
661
804
  setLocale: (locale: string) => void;
662
805
  getLocale: () => string;
663
806
  isAuthenticated: () => boolean;
664
- logout: () => void;
665
807
  setToken: (tokens: AuthTokens) => void;
666
808
  extractBlockValues: typeof extractBlockValues;
667
809
  utils: {
@@ -709,4 +851,4 @@ declare function createStorefront(config: HttpClientConfig & {
709
851
  };
710
852
  };
711
853
 
712
- export { type Activity$1 as Activity, type AnalyticsQuery, type AnalyticsQueryResponse, type AnalyticsRow, type ApiConfig, AvailabilityResponse, COMMON_ACTIVITY_TYPES, type CommonActivityType, CreateAgentParams, CreateLocationParams, DeleteLocationParams, type Dimension, type EntityKind, type Filter, type FilterField, type FilterOp, GetAgentParams, GetAgentsParams, GetAvailabilityParams, type GetCountriesResponse, GetShippingRatesParams, type Granularity, type HttpClientConfig, Location, type LocationCountry, type LocationState, Market, type Measure, type OrderBy, SDK_VERSION, SUPPORTED_FRAMEWORKS, ShipParams, ShipResult, ShippingRate, Slot, type StorefrontSession, type StorefrontStores, type TimeRange, type TimeUnit, type TimelineParams, type TrackParams, UpdateAgentParams, UpdateLocationParams, createAdmin, createStorefront };
854
+ export { type Activity$1 as Activity, Agent, AgentChat, AgentChatMessage, type AnalyticsQuery, type AnalyticsQueryResponse, type AnalyticsRow, type ApiConfig, Audience, AudienceAccessResponse, AudienceSubscribeResponse, AudienceSubscriber, AvailabilityResponse, Block, Booking, BookingQuote, COMMON_ACTIVITY_TYPES, type CommonActivityType, CreateAgentParams, CreateLocationParams, Customer, DeleteLocationParams, type Dimension, EmailTemplate, type EntityKind, type Filter, type FilterField, type FilterOp, Form, FormSubmission, GetAgentParams, GetAgentsParams, GetAvailabilityParams, type GetCountriesResponse, GetShippingRatesParams, type Granularity, type HttpClientConfig, Integration, Location, type LocationCountry, type LocationState, Market, type Measure, Media, Node, NodeStatus, Order, type OrderBy, OrderQuote, PaginatedResponse, Product, PromoCode, Provider, SDK_VERSION, SUPPORTED_FRAMEWORKS, Service, ServiceProvider, ShipParams, ShipResult, ShippingRate, Slot, Store, type StorefrontSession, type StorefrontSessionListener, Taxonomy, TaxonomyEntry, type TimeRange, type TimeUnit, type TimelineParams, type TrackParams, UpdateAgentParams, UpdateLocationParams, Webhook, Workflow, WorkflowExecution, createAdmin, createStorefront };