arky-sdk 0.7.95 → 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,39 +1,34 @@
1
- import { RequestOptions, MagicLinkVerifyParams, MagicLinkRequestParams, UpdateAccountProfileParams, DeleteAccountParams, GetMeParams, SearchAccountsParams, Location, CreateLocationParams, UpdateLocationParams, DeleteLocationParams, Market, CreateMarketParams, UpdateMarketParams, DeleteMarketParams, CreateStoreParams, UpdateStoreParams, DeleteStoreParams, GetStoreParams, GetStoresParams, GetSubscriptionPlansParams, SubscribeParams, CreatePortalSessionParams, InviteUserParams, RemoveMemberParams, HandleInvitationParams, TestWebhookParams, GetStoreMediaParams2, OAuthConnectParams, OAuthDisconnectParams, ListIntegrationsParams, CreateIntegrationParams, UpdateIntegrationParams, DeleteIntegrationParams, ListWebhooksParams, CreateWebhookParams, UpdateWebhookParams, DeleteWebhookParams, GetMediaParams, UploadStoreMediaParams, DeleteStoreMediaParams, GetStoreMediaParams, 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, GetStoreChatsParams, CreateWorkflowParams, UpdateWorkflowParams, DeleteWorkflowParams, GetWorkflowParams, GetWorkflowsParams, TriggerWorkflowParams, GetWorkflowExecutionsParams, GetWorkflowExecutionParams } from './types.cjs';
2
- 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, 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, Store, StoreSubscription, StoreSubscriptionPayment, StoreSubscriptionProvider, StoreSubscriptionSource, StoreSubscriptionStatus, 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';
3
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';
4
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;
5
18
  interface Activity$1 {
6
19
  store_id: string;
7
20
  customer_id: string;
8
21
  type: string;
9
- payload: Record<string, any>;
22
+ payload: Record<string, unknown>;
10
23
  created_at: number;
11
24
  }
12
25
  interface TrackParams {
13
26
  type: string;
14
- payload?: Record<string, any>;
27
+ payload?: Record<string, unknown>;
15
28
  }
16
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"];
17
30
  type CommonActivityType = (typeof COMMON_ACTIVITY_TYPES)[number];
18
31
 
19
- interface AuthTokens {
20
- access_token: string;
21
- refresh_token?: string;
22
- access_expires_at?: number;
23
- account_id?: string;
24
- }
25
- interface HttpClientConfig {
26
- baseUrl: string;
27
- storeId: string;
28
- refreshPath?: string | (() => string);
29
- getToken?: () => Promise<AuthTokens> | AuthTokens;
30
- setToken?: (tokens: AuthTokens) => void;
31
- logout?: () => void;
32
- navigate?: (path: string) => void;
33
- loginFallbackPath?: string;
34
- isAuthenticated?: () => boolean;
35
- }
36
-
37
32
  type EntityKind = "product" | "service" | "provider" | "node" | "customer" | "audience" | "agent" | "workflow" | "promo_code" | "email_template" | "form" | "taxonomy" | "media" | "order" | "booking";
38
33
  type Granularity = "hour" | "day" | "week" | "month" | {
39
34
  minutes: 5 | 10 | 15 | 30;
@@ -93,7 +88,7 @@ interface Activity {
93
88
  store_id: string;
94
89
  customer_id: string;
95
90
  type: string;
96
- payload: Record<string, any>;
91
+ payload: Record<string, unknown>;
97
92
  created_at: number;
98
93
  country_code?: string | null;
99
94
  city?: string | null;
@@ -126,6 +121,62 @@ interface GetCountriesResponse {
126
121
  cursor: string | null;
127
122
  }
128
123
 
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;
178
+ }
179
+
129
180
  declare function getBlockLabel(block: any): string;
130
181
  declare function formatBlockValue(block: any): string;
131
182
  declare function prepareBlocksForSubmission(formData: any, blockTypes?: Record<string, string>): any[];
@@ -156,16 +207,16 @@ declare function fetchSvgContent(mediaObject: any): Promise<string | null>;
156
207
  declare function getSvgContentForAstro(mediaObject: any): Promise<string>;
157
208
  declare function injectSvgIntoElement(mediaObject: any, targetElement: HTMLElement, className?: string): Promise<void>;
158
209
 
159
- declare const SDK_VERSION = "0.7.95";
210
+ declare const SDK_VERSION = "0.7.102";
160
211
  declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
161
212
  interface ApiConfig {
162
- httpClient: any;
213
+ httpClient: HttpClient;
163
214
  storeId: string;
164
215
  baseUrl: string;
165
216
  market: string;
166
217
  locale: string;
167
- setToken: (tokens: any) => void;
168
- getToken: () => Promise<any> | any;
218
+ setToken: (tokens: AuthTokens) => void;
219
+ getToken: () => Promise<AuthTokens> | AuthTokens;
169
220
  }
170
221
 
171
222
  declare function createAdmin(config: HttpClientConfig & {
@@ -175,154 +226,216 @@ declare function createAdmin(config: HttpClientConfig & {
175
226
  auth: {
176
227
  code(params: {
177
228
  email: string;
178
- }, options?: RequestOptions): Promise<any>;
179
- 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>;
180
233
  refresh(params: {
181
234
  refresh_token: string;
182
- }, options?: RequestOptions): Promise<any>;
235
+ }, options?: RequestOptions$1): Promise<AuthToken>;
183
236
  storeCode(storeId: string, params: {
184
237
  email: string;
185
- }, options?: RequestOptions): Promise<any>;
186
- storeVerify(storeId: string, params: MagicLinkVerifyParams, options?: RequestOptions): Promise<any>;
187
- 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
+ }>;
188
245
  };
189
246
  account: {
190
- updateAccount(params: UpdateAccountProfileParams, options?: RequestOptions): Promise<any>;
191
- deleteAccount(params: DeleteAccountParams, options?: RequestOptions): Promise<any>;
192
- getMe(params: GetMeParams, options?: RequestOptions): Promise<any>;
193
- 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
+ }>;
194
256
  };
195
257
  store: {
196
258
  location: {
197
- getCountries(options?: RequestOptions): Promise<GetCountriesResponse>;
198
- getCountry(countryCode: string, options?: RequestOptions): Promise<LocationCountry>;
199
- list(options?: RequestOptions): Promise<Location[]>;
200
- get(id: string, options?: RequestOptions): Promise<Location>;
201
- create(params: CreateLocationParams, options?: RequestOptions): Promise<Location>;
202
- update(params: UpdateLocationParams, options?: RequestOptions): Promise<Location>;
203
- 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<{
204
266
  deleted: boolean;
205
267
  }>;
206
268
  };
207
269
  market: {
208
- list(options?: RequestOptions): Promise<Market[]>;
209
- get(id: string, options?: RequestOptions): Promise<Market>;
210
- create(params: CreateMarketParams, options?: RequestOptions): Promise<Market>;
211
- update(params: UpdateMarketParams, options?: RequestOptions): Promise<Market>;
212
- 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<{
213
275
  deleted: boolean;
214
276
  }>;
215
277
  };
216
- createStore(params: CreateStoreParams, options?: RequestOptions): Promise<any>;
217
- updateStore(params: UpdateStoreParams, options?: RequestOptions): Promise<any>;
218
- deleteStore(params: DeleteStoreParams, options?: RequestOptions): Promise<any>;
219
- getStore(params: GetStoreParams, options?: RequestOptions): Promise<any>;
220
- getStores(params?: GetStoresParams, options?: RequestOptions): Promise<any>;
221
- getSubscriptionPlans(params: GetSubscriptionPlansParams, options?: RequestOptions): Promise<any>;
222
- subscribe(params: SubscribeParams, options?: RequestOptions): Promise<any>;
223
- createPortalSession(params: CreatePortalSessionParams, options?: RequestOptions): Promise<any>;
224
- inviteUser(params: InviteUserParams, options?: RequestOptions): Promise<any>;
225
- removeMember(params: RemoveMemberParams, options?: RequestOptions): Promise<any>;
226
- handleInvitation(params: HandleInvitationParams, options?: RequestOptions): Promise<any>;
227
- testWebhook(params: TestWebhookParams, options?: RequestOptions): Promise<any>;
228
- getStoreMedia(params: GetStoreMediaParams2, options?: RequestOptions): Promise<any>;
229
- oauthConnect(params: OAuthConnectParams, options?: RequestOptions): Promise<any>;
230
- oauthDisconnect(params: OAuthDisconnectParams, options?: RequestOptions): Promise<any>;
231
- listIntegrations(params: ListIntegrationsParams, options?: RequestOptions): Promise<any>;
232
- createIntegration(params: CreateIntegrationParams, options?: RequestOptions): Promise<any>;
233
- updateIntegration(params: UpdateIntegrationParams, options?: RequestOptions): Promise<any>;
234
- 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
+ }>;
235
315
  getIntegrationConfig(params: {
236
316
  store_id: string;
237
317
  type: "payment" | "shipping";
238
- }, options?: RequestOptions): Promise<any>;
239
- listWebhooks(params: ListWebhooksParams, options?: RequestOptions): Promise<any>;
240
- createWebhook(params: CreateWebhookParams, options?: RequestOptions): Promise<any>;
241
- updateWebhook(params: UpdateWebhookParams, options?: RequestOptions): Promise<any>;
242
- 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
+ }>;
243
325
  };
244
326
  media: {
245
- getMedia(params: GetMediaParams, options?: RequestOptions): Promise<any>;
246
- uploadStoreMedia(params: UploadStoreMediaParams, options?: RequestOptions): Promise<any>;
247
- deleteStoreMedia(params: DeleteStoreMediaParams, options?: RequestOptions): Promise<any>;
248
- getStoreMedia(params: GetStoreMediaParams, options?: RequestOptions): Promise<any>;
249
- 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>;
250
334
  };
251
335
  notification: {
252
- trackEmailOpen(params: TrackEmailOpenParams, options?: RequestOptions): Promise<any>;
253
- 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
+ }>;
254
340
  };
255
341
  promoCode: {
256
- createPromoCode(params: CreatePromoCodeParams, options?: RequestOptions): Promise<any>;
257
- updatePromoCode(params: UpdatePromoCodeParams, options?: RequestOptions): Promise<any>;
258
- deletePromoCode(params: DeletePromoCodeParams, options?: RequestOptions): Promise<any>;
259
- getPromoCode(params: GetPromoCodeParams, options?: RequestOptions): Promise<any>;
260
- 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>>;
261
349
  };
262
350
  platform: {
263
- getCurrencies(options?: RequestOptions): Promise<string[]>;
264
- getIntegrationServices(options?: RequestOptions): Promise<any[]>;
265
- getWebhookEvents(options?: RequestOptions): Promise<{
351
+ getCurrencies(options?: RequestOptions$1): Promise<string[]>;
352
+ getIntegrationServices(options?: RequestOptions$1): Promise<unknown[]>;
353
+ getWebhookEvents(options?: RequestOptions$1): Promise<{
266
354
  data: string[];
267
355
  }>;
268
356
  };
269
357
  shipping: {
270
- getRates(params: GetShippingRatesParams, options?: RequestOptions): Promise<{
358
+ getRates(params: GetShippingRatesParams, options?: RequestOptions$1): Promise<{
271
359
  rates: ShippingRate[];
272
360
  }>;
273
- ship(params: ShipParams, options?: RequestOptions): Promise<ShipResult>;
361
+ ship(params: ShipParams, options?: RequestOptions$1): Promise<ShipResult>;
274
362
  };
275
363
  cms: {
276
364
  node: {
277
- create: (params: CreateNodeParams, options?: RequestOptions) => Promise<any>;
278
- update: (params: UpdateNodeParams, options?: RequestOptions) => Promise<any>;
279
- delete: (params: DeleteNodeParams, options?: RequestOptions) => Promise<any>;
280
- get: (params: GetNodeParams, options?: RequestOptions) => Promise<any>;
281
- find: (params: GetNodesParams, options?: RequestOptions) => Promise<any>;
282
- 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>>;
283
388
  };
284
389
  form: {
285
- create: (params: CreateFormParams, options?: RequestOptions) => Promise<any>;
286
- update: (params: UpdateFormParams, options?: RequestOptions) => Promise<any>;
287
- delete: (params: DeleteFormParams, options?: RequestOptions) => Promise<any>;
288
- get: (params: GetFormParams, options?: RequestOptions) => Promise<any>;
289
- find: (params: GetFormsParams, options?: RequestOptions) => Promise<any>;
290
- submit: (params: SubmitFormParams, options?: RequestOptions) => Promise<any>;
291
- getSubmissions: (params: GetFormSubmissionsParams, options?: RequestOptions) => Promise<any>;
292
- getSubmission: (params: GetFormSubmissionParams, options?: RequestOptions) => Promise<any>;
293
- 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>;
294
401
  };
295
402
  taxonomy: {
296
- create: (params: CreateTaxonomyParams, options?: RequestOptions) => Promise<any>;
297
- update: (params: UpdateTaxonomyParams, options?: RequestOptions) => Promise<any>;
298
- delete: (params: DeleteTaxonomyParams, options?: RequestOptions) => Promise<any>;
299
- get: (params: GetTaxonomyParams, options?: RequestOptions) => Promise<any>;
300
- find: (params: GetTaxonomiesParams, options?: RequestOptions) => Promise<any>;
301
- 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>>;
302
411
  };
303
412
  emailTemplate: {
304
- create: (params: CreateEmailTemplateParams, options?: RequestOptions) => Promise<any>;
305
- update: (params: UpdateEmailTemplateParams, options?: RequestOptions) => Promise<any>;
306
- delete: (params: DeleteEmailTemplateParams, options?: RequestOptions) => Promise<any>;
307
- get: (params: GetEmailTemplateParams, options?: RequestOptions) => Promise<any>;
308
- 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>>;
309
420
  };
310
421
  };
311
422
  eshop: {
312
423
  product: {
313
- create: (params: CreateProductParams, options?: RequestOptions) => Promise<any>;
314
- update: (params: UpdateProductParams, options?: RequestOptions) => Promise<any>;
315
- delete: (params: DeleteProductParams, options?: RequestOptions) => Promise<any>;
316
- get: (params: GetProductParams, options?: RequestOptions) => Promise<any>;
317
- 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>>;
318
431
  };
319
432
  order: {
320
- create: (params: CreateOrderParams, options?: RequestOptions) => Promise<any>;
321
- update: (params: UpdateOrderParams, options?: RequestOptions) => Promise<any>;
322
- get: (params: GetOrderParams, options?: RequestOptions) => Promise<any>;
323
- find: (params: GetOrdersParams, options?: RequestOptions) => Promise<any>;
324
- getQuote: (params: GetQuoteParams, options?: RequestOptions) => Promise<any>;
325
- 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>;
326
439
  };
327
440
  };
328
441
  booking: {
@@ -330,64 +443,73 @@ declare function createAdmin(config: HttpClientConfig & {
330
443
  removeFromCart: (slotId: string) => void;
331
444
  getCart: () => Slot[];
332
445
  clearCart: () => void;
333
- create: (params: CreateBookingParams, options?: RequestOptions) => Promise<any>;
334
- update: (params: UpdateBookingParams, options?: RequestOptions) => Promise<any>;
335
- get: (params: GetBookingParams, options?: RequestOptions) => Promise<any>;
336
- find: (params: SearchBookingsParams, options?: RequestOptions) => Promise<any>;
337
- getQuote: (params: GetBookingQuoteParams, options?: RequestOptions) => Promise<any>;
338
- processRefund: (params: ProcessBookingRefundParams, options?: RequestOptions) => Promise<any>;
339
- getAvailability: (params: GetAvailabilityParams, options?: RequestOptions) => Promise<AvailabilityResponse>;
340
- 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>;
341
454
  service: {
342
- create: (params: CreateServiceParams, options?: RequestOptions) => Promise<any>;
343
- update: (params: UpdateServiceParams, options?: RequestOptions) => Promise<any>;
344
- delete: (params: DeleteServiceParams, options?: RequestOptions) => Promise<any>;
345
- get: (params: GetServiceParams, options?: RequestOptions) => Promise<any>;
346
- find: (params: GetServicesParams, options?: RequestOptions) => Promise<any>;
347
- findProviders: (params: FindServiceProvidersParams, options?: RequestOptions) => Promise<any>;
348
- createProvider: (params: CreateServiceProviderParams, options?: RequestOptions) => Promise<any>;
349
- updateProvider: (params: UpdateServiceProviderParams, options?: RequestOptions) => Promise<any>;
350
- 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>;
351
464
  };
352
465
  provider: {
353
- create: (params: CreateProviderParams, options?: RequestOptions) => Promise<any>;
354
- update: (params: UpdateProviderParams, options?: RequestOptions) => Promise<any>;
355
- delete: (params: DeleteProviderParams, options?: RequestOptions) => Promise<any>;
356
- get: (params: GetProviderParams, options?: RequestOptions) => Promise<any>;
357
- 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>>;
358
471
  };
359
472
  };
360
473
  crm: {
361
474
  customer: {
362
- create: (params: CreateCustomerParams, options?: RequestOptions) => Promise<Customer>;
363
- get: (params: GetCustomerParams, options?: RequestOptions) => Promise<Customer>;
364
- 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<{
365
478
  items: Customer[];
366
479
  cursor?: string;
367
480
  }>;
368
- update: (params: UpdateCustomerParams, options?: RequestOptions) => Promise<Customer>;
369
- 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>;
370
483
  revokeToken: (params: {
371
484
  id: string;
372
485
  token_id: string;
373
486
  store_id?: string;
374
- }, options?: RequestOptions) => Promise<any>;
487
+ }, options?: RequestOptions$1) => Promise<{
488
+ deleted: boolean;
489
+ }>;
375
490
  revokeAllTokens: (params: {
376
491
  id: string;
377
492
  store_id?: string;
378
- }, options?: RequestOptions) => Promise<any>;
493
+ }, options?: RequestOptions$1) => Promise<{
494
+ deleted: boolean;
495
+ }>;
379
496
  };
380
497
  audience: {
381
- create: (params: CreateAudienceParams, options?: RequestOptions) => Promise<any>;
382
- update: (params: UpdateAudienceParams, options?: RequestOptions) => Promise<any>;
383
- get: (params: GetAudienceParams, options?: RequestOptions) => Promise<any>;
384
- find: (params: GetAudiencesParams, options?: RequestOptions) => Promise<any>;
385
- getSubscribers: (params: GetAudienceSubscribersParams, options?: RequestOptions) => Promise<any>;
386
- addSubscriber: (params: AddAudienceSubscriberParams, options?: RequestOptions) => Promise<any>;
387
- 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
+ }>;
388
510
  };
389
511
  activity: {
390
- timeline(params: TimelineParams, options?: RequestOptions): Promise<{
512
+ timeline(params: TimelineParams, options?: RequestOptions$1): Promise<{
391
513
  items: Activity[];
392
514
  cursor: string | null;
393
515
  }>;
@@ -395,34 +517,38 @@ declare function createAdmin(config: HttpClientConfig & {
395
517
  };
396
518
  automation: {
397
519
  agent: {
398
- create: (params: CreateAgentParams, options?: RequestOptions) => Promise<any>;
399
- update: (params: UpdateAgentParams, options?: RequestOptions) => Promise<any>;
400
- delete: (params: DeleteAgentParams, options?: RequestOptions) => Promise<any>;
401
- get: (params: GetAgentParams, options?: RequestOptions) => Promise<any>;
402
- find: (params?: GetAgentsParams, options?: RequestOptions) => Promise<any>;
403
- sendMessage: (params: RunAgentParams, options?: RequestOptions) => Promise<any>;
404
- getChats: (params: GetAgentChatsParams, options?: RequestOptions) => Promise<any>;
405
- getChat: (params: GetAgentChatParams, options?: RequestOptions) => Promise<any>;
406
- updateChat: (params: UpdateAgentChatParams, options?: RequestOptions) => Promise<any>;
407
- rateChat: (params: RateAgentChatParams, options?: RequestOptions) => Promise<any>;
408
- getStoreChats: (params: GetStoreChatsParams, 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>>;
409
533
  getChatMessages: (params: GetAgentChatParams & {
410
534
  limit?: number;
411
- }, options?: RequestOptions) => Promise<any>;
535
+ }, options?: RequestOptions$1) => Promise<PaginatedResponse<AgentChatMessage>>;
412
536
  };
413
537
  workflow: {
414
- create: (params: CreateWorkflowParams, options?: RequestOptions) => Promise<any>;
415
- update: (params: UpdateWorkflowParams, options?: RequestOptions) => Promise<any>;
416
- delete: (params: DeleteWorkflowParams, options?: RequestOptions) => Promise<any>;
417
- get: (params: GetWorkflowParams, options?: RequestOptions) => Promise<any>;
418
- find: (params?: GetWorkflowsParams, options?: RequestOptions) => Promise<any>;
419
- trigger: (params: TriggerWorkflowParams, options?: RequestOptions) => Promise<any>;
420
- getExecutions: (params: GetWorkflowExecutionsParams, options?: RequestOptions) => Promise<any>;
421
- 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>;
422
548
  };
423
549
  };
424
550
  analytics: {
425
- query: (spec: AnalyticsQuery, options?: RequestOptions & {
551
+ query: (spec: AnalyticsQuery, options?: RequestOptions$1 & {
426
552
  store_id?: string;
427
553
  }) => Promise<AnalyticsQueryResponse>;
428
554
  };
@@ -480,57 +606,103 @@ declare function createAdmin(config: HttpClientConfig & {
480
606
  getFirstAvailableFCId: typeof getFirstAvailableFCId;
481
607
  };
482
608
  };
609
+
483
610
  interface StorefrontSession {
484
- customer: any;
485
- store: any;
486
- market: any;
611
+ customer: Customer;
612
+ store: Store;
613
+ market: Market | null;
487
614
  }
488
615
  type StorefrontSessionListener = (session: StorefrontSession | null) => void;
489
616
  declare function createStorefront(config: HttpClientConfig & {
490
617
  market?: string;
491
618
  locale?: string;
492
619
  }): {
493
- session: (market?: string) => Promise<StorefrontSession>;
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>;
494
630
  getSession: () => StorefrontSession | null;
495
631
  onSessionChange: (listener: StorefrontSessionListener) => () => void;
496
632
  store: {
497
- getStore(options?: RequestOptions): any;
633
+ getStore(options?: RequestOptions$1): Promise<Store>;
498
634
  location: {
499
- getCountries(options?: RequestOptions): any;
500
- getCountry(countryCode: string, options?: RequestOptions): any;
501
- list(options?: RequestOptions): any;
502
- 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>;
503
656
  };
504
657
  market: {
505
- list(options?: RequestOptions): any;
506
- get(id: string, options?: RequestOptions): any;
658
+ list(options?: RequestOptions$1): Promise<Market[]>;
659
+ get(id: string, options?: RequestOptions$1): Promise<Market>;
507
660
  };
508
661
  };
509
662
  cms: {
510
663
  node: {
511
- get(params: any, options?: RequestOptions): Promise<any>;
512
- find(params: any, options?: RequestOptions): any;
513
- 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>>;
514
682
  };
515
683
  form: {
516
- get(params: any, options?: RequestOptions): any;
517
- submit(params: any, options?: RequestOptions): any;
684
+ get(params: GetFormParams, options?: RequestOptions$1): Promise<Form>;
685
+ submit(params: SubmitFormParams, options?: RequestOptions$1): Promise<FormSubmission>;
518
686
  };
519
687
  taxonomy: {
520
- get(params: any, options?: RequestOptions): any;
521
- 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>>;
522
690
  };
523
691
  };
524
692
  eshop: {
525
693
  product: {
526
- get(params: any, options?: RequestOptions): any;
527
- 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>>;
528
696
  };
529
697
  order: {
530
- getQuote(params: any, options?: RequestOptions): any;
531
- checkout(params: any, options?: RequestOptions): any;
532
- get(params: any, options?: RequestOptions): any;
533
- 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>>;
534
706
  };
535
707
  };
536
708
  booking: {
@@ -538,52 +710,54 @@ declare function createStorefront(config: HttpClientConfig & {
538
710
  removeFromCart(slotId: string): void;
539
711
  getCart(): Slot[];
540
712
  clearCart(): void;
541
- checkout(params?: any, options?: RequestOptions): any;
542
- get(params: any, options?: RequestOptions): any;
543
- find(params: any, options?: RequestOptions): any;
544
- getQuote(params: any, options?: RequestOptions): any;
545
- getAvailability(params: any, options?: RequestOptions): any;
546
- 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>;
547
719
  service: {
548
- get(params: any, options?: RequestOptions): any;
549
- find(params: any, options?: RequestOptions): any;
550
- 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[]>;
551
723
  };
552
724
  provider: {
553
- get(params: any, options?: RequestOptions): any;
554
- 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>>;
555
727
  };
556
728
  };
557
729
  crm: {
558
730
  customer: {
559
- session(params?: Parameters<(params?: {
560
- store_id?: string;
731
+ identify(params?: Parameters<(params?: {
732
+ email?: string;
733
+ verify?: boolean;
561
734
  market?: string;
562
- }, options?: RequestOptions) => Promise<any>>[0], options?: Parameters<(params?: {
563
- store_id?: string;
735
+ }, options?: RequestOptions$1) => Promise<IdentifyResponse>>[0], options?: Parameters<(params?: {
736
+ email?: string;
737
+ verify?: boolean;
564
738
  market?: string;
565
- }, options?: RequestOptions) => Promise<any>>[1]): Promise<any>;
566
- connect: (params: any, options?: any) => Promise<any>;
567
- verify: (params: any, options?: any) => Promise<any>;
568
- requestCode(params: {
569
- email: string;
570
- store_id?: string;
571
- }, options?: RequestOptions): any;
572
- refreshToken(params: {
573
- refresh_token: string;
574
- store_id?: string;
575
- }, options?: RequestOptions): Promise<any>;
576
- getMe(options?: RequestOptions): any;
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: {
743
+ code: string;
744
+ }, options?: RequestOptions$1) => Promise<VerifyResponse>>[1]) => Promise<CustomerToken>;
745
+ logout(options?: RequestOptions$1): Promise<void>;
746
+ getMe(options?: RequestOptions$1): Promise<CustomerDetail>;
577
747
  };
578
748
  audience: {
579
- get(params: any, options?: RequestOptions): any;
580
- find(params: any, options?: RequestOptions): any;
581
- 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>;
582
752
  checkAccess(params: {
583
753
  id: string;
584
- }, options?: RequestOptions): any;
585
- unsubscribe(token: string, options?: RequestOptions): any;
586
- 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
+ }>;
587
761
  };
588
762
  };
589
763
  activity: {
@@ -592,35 +766,35 @@ declare function createStorefront(config: HttpClientConfig & {
592
766
  };
593
767
  automation: {
594
768
  agent: {
595
- getAgents(params?: any, options?: RequestOptions): any;
769
+ getAgents(params?: GetAgentsParams, options?: RequestOptions$1): Promise<PaginatedResponse<Agent>>;
596
770
  getAgent(params: {
597
771
  id: string;
598
772
  store_id?: string;
599
- }, options?: RequestOptions): any;
773
+ }, options?: RequestOptions$1): Promise<Agent>;
600
774
  sendMessage(params: {
601
775
  id: string;
602
776
  message: string;
603
777
  chat_id?: string;
604
778
  store_id?: string;
605
- }, options?: RequestOptions): any;
779
+ }, options?: RequestOptions$1): Promise<AgentChatMessage>;
606
780
  getChat(params: {
607
781
  id: string;
608
782
  chat_id: string;
609
783
  store_id?: string;
610
- }, options?: RequestOptions): any;
784
+ }, options?: RequestOptions$1): Promise<AgentChat>;
611
785
  getChatMessages(params: {
612
786
  id: string;
613
787
  chat_id: string;
614
788
  limit?: number;
615
789
  store_id?: string;
616
- }, options?: RequestOptions): any;
790
+ }, options?: RequestOptions$1): Promise<PaginatedResponse<AgentChatMessage>>;
617
791
  rateChat(params: {
618
792
  id: string;
619
793
  chat_id: string;
620
794
  rating: number;
621
795
  comment?: string;
622
796
  store_id?: string;
623
- }, options?: RequestOptions): any;
797
+ }, options?: RequestOptions$1): Promise<AgentChat>;
624
798
  };
625
799
  };
626
800
  setStoreId: (storeId: string) => void;
@@ -630,8 +804,7 @@ declare function createStorefront(config: HttpClientConfig & {
630
804
  setLocale: (locale: string) => void;
631
805
  getLocale: () => string;
632
806
  isAuthenticated: () => boolean;
633
- logout: () => void;
634
- setToken: (tokens: any) => void;
807
+ setToken: (tokens: AuthTokens) => void;
635
808
  extractBlockValues: typeof extractBlockValues;
636
809
  utils: {
637
810
  getImageUrl: (imageBlock: any, isBlock?: boolean) => any;
@@ -678,4 +851,4 @@ declare function createStorefront(config: HttpClientConfig & {
678
851
  };
679
852
  };
680
853
 
681
- 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 StorefrontSessionListener, 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 };