arky-sdk 0.7.93 → 0.7.95
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/README.md +19 -19
- package/dist/admin.cjs +2324 -0
- package/dist/admin.cjs.map +1 -0
- package/dist/admin.d.cts +3 -0
- package/dist/admin.d.ts +3 -0
- package/dist/admin.js +2322 -0
- package/dist/admin.js.map +1 -0
- package/dist/index.cjs +518 -523
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +55 -86
- package/dist/index.d.ts +55 -86
- package/dist/index.js +518 -523
- package/dist/index.js.map +1 -1
- package/dist/storefront.cjs +1359 -0
- package/dist/storefront.cjs.map +1 -0
- package/dist/storefront.d.cts +3 -0
- package/dist/storefront.d.ts +3 -0
- package/dist/storefront.js +1356 -0
- package/dist/storefront.js.map +1 -0
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +164 -164
- package/dist/types.d.ts +164 -164
- package/dist/types.js.map +1 -1
- package/package.json +12 -5
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
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 { 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';
|
|
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
|
|
|
7
5
|
interface Activity$1 {
|
|
8
|
-
|
|
6
|
+
store_id: string;
|
|
9
7
|
customer_id: string;
|
|
10
8
|
type: string;
|
|
11
9
|
payload: Record<string, any>;
|
|
@@ -26,7 +24,7 @@ interface AuthTokens {
|
|
|
26
24
|
}
|
|
27
25
|
interface HttpClientConfig {
|
|
28
26
|
baseUrl: string;
|
|
29
|
-
|
|
27
|
+
storeId: string;
|
|
30
28
|
refreshPath?: string | (() => string);
|
|
31
29
|
getToken?: () => Promise<AuthTokens> | AuthTokens;
|
|
32
30
|
setToken?: (tokens: AuthTokens) => void;
|
|
@@ -92,7 +90,7 @@ interface AnalyticsQueryResponse {
|
|
|
92
90
|
}
|
|
93
91
|
|
|
94
92
|
interface Activity {
|
|
95
|
-
|
|
93
|
+
store_id: string;
|
|
96
94
|
customer_id: string;
|
|
97
95
|
type: string;
|
|
98
96
|
payload: Record<string, any>;
|
|
@@ -109,7 +107,7 @@ interface Activity {
|
|
|
109
107
|
}
|
|
110
108
|
interface TimelineParams {
|
|
111
109
|
customer_id: string;
|
|
112
|
-
|
|
110
|
+
store_id?: string;
|
|
113
111
|
limit?: number;
|
|
114
112
|
cursor?: string;
|
|
115
113
|
}
|
|
@@ -128,20 +126,6 @@ interface GetCountriesResponse {
|
|
|
128
126
|
cursor: string | null;
|
|
129
127
|
}
|
|
130
128
|
|
|
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>;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
129
|
declare function getBlockLabel(block: any): string;
|
|
146
130
|
declare function formatBlockValue(block: any): string;
|
|
147
131
|
declare function prepareBlocksForSubmission(formData: any, blockTypes?: Record<string, string>): any[];
|
|
@@ -172,11 +156,11 @@ declare function fetchSvgContent(mediaObject: any): Promise<string | null>;
|
|
|
172
156
|
declare function getSvgContentForAstro(mediaObject: any): Promise<string>;
|
|
173
157
|
declare function injectSvgIntoElement(mediaObject: any, targetElement: HTMLElement, className?: string): Promise<void>;
|
|
174
158
|
|
|
175
|
-
declare const SDK_VERSION = "0.7.
|
|
159
|
+
declare const SDK_VERSION = "0.7.95";
|
|
176
160
|
declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
|
|
177
161
|
interface ApiConfig {
|
|
178
162
|
httpClient: any;
|
|
179
|
-
|
|
163
|
+
storeId: string;
|
|
180
164
|
baseUrl: string;
|
|
181
165
|
market: string;
|
|
182
166
|
locale: string;
|
|
@@ -187,7 +171,7 @@ interface ApiConfig {
|
|
|
187
171
|
declare function createAdmin(config: HttpClientConfig & {
|
|
188
172
|
market: string;
|
|
189
173
|
locale?: string;
|
|
190
|
-
}):
|
|
174
|
+
}): {
|
|
191
175
|
auth: {
|
|
192
176
|
code(params: {
|
|
193
177
|
email: string;
|
|
@@ -196,10 +180,10 @@ declare function createAdmin(config: HttpClientConfig & {
|
|
|
196
180
|
refresh(params: {
|
|
197
181
|
refresh_token: string;
|
|
198
182
|
}, options?: RequestOptions): Promise<any>;
|
|
199
|
-
|
|
183
|
+
storeCode(storeId: string, params: {
|
|
200
184
|
email: string;
|
|
201
185
|
}, options?: RequestOptions): Promise<any>;
|
|
202
|
-
|
|
186
|
+
storeVerify(storeId: string, params: MagicLinkVerifyParams, options?: RequestOptions): Promise<any>;
|
|
203
187
|
magicLink(params: MagicLinkRequestParams, options?: RequestOptions): Promise<any>;
|
|
204
188
|
};
|
|
205
189
|
account: {
|
|
@@ -208,7 +192,7 @@ declare function createAdmin(config: HttpClientConfig & {
|
|
|
208
192
|
getMe(params: GetMeParams, options?: RequestOptions): Promise<any>;
|
|
209
193
|
searchAccounts(params: SearchAccountsParams, options?: RequestOptions): Promise<any>;
|
|
210
194
|
};
|
|
211
|
-
|
|
195
|
+
store: {
|
|
212
196
|
location: {
|
|
213
197
|
getCountries(options?: RequestOptions): Promise<GetCountriesResponse>;
|
|
214
198
|
getCountry(countryCode: string, options?: RequestOptions): Promise<LocationCountry>;
|
|
@@ -229,11 +213,11 @@ declare function createAdmin(config: HttpClientConfig & {
|
|
|
229
213
|
deleted: boolean;
|
|
230
214
|
}>;
|
|
231
215
|
};
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
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>;
|
|
237
221
|
getSubscriptionPlans(params: GetSubscriptionPlansParams, options?: RequestOptions): Promise<any>;
|
|
238
222
|
subscribe(params: SubscribeParams, options?: RequestOptions): Promise<any>;
|
|
239
223
|
createPortalSession(params: CreatePortalSessionParams, options?: RequestOptions): Promise<any>;
|
|
@@ -241,7 +225,7 @@ declare function createAdmin(config: HttpClientConfig & {
|
|
|
241
225
|
removeMember(params: RemoveMemberParams, options?: RequestOptions): Promise<any>;
|
|
242
226
|
handleInvitation(params: HandleInvitationParams, options?: RequestOptions): Promise<any>;
|
|
243
227
|
testWebhook(params: TestWebhookParams, options?: RequestOptions): Promise<any>;
|
|
244
|
-
|
|
228
|
+
getStoreMedia(params: GetStoreMediaParams2, options?: RequestOptions): Promise<any>;
|
|
245
229
|
oauthConnect(params: OAuthConnectParams, options?: RequestOptions): Promise<any>;
|
|
246
230
|
oauthDisconnect(params: OAuthDisconnectParams, options?: RequestOptions): Promise<any>;
|
|
247
231
|
listIntegrations(params: ListIntegrationsParams, options?: RequestOptions): Promise<any>;
|
|
@@ -249,7 +233,7 @@ declare function createAdmin(config: HttpClientConfig & {
|
|
|
249
233
|
updateIntegration(params: UpdateIntegrationParams, options?: RequestOptions): Promise<any>;
|
|
250
234
|
deleteIntegration(params: DeleteIntegrationParams, options?: RequestOptions): Promise<any>;
|
|
251
235
|
getIntegrationConfig(params: {
|
|
252
|
-
|
|
236
|
+
store_id: string;
|
|
253
237
|
type: "payment" | "shipping";
|
|
254
238
|
}, options?: RequestOptions): Promise<any>;
|
|
255
239
|
listWebhooks(params: ListWebhooksParams, options?: RequestOptions): Promise<any>;
|
|
@@ -259,9 +243,9 @@ declare function createAdmin(config: HttpClientConfig & {
|
|
|
259
243
|
};
|
|
260
244
|
media: {
|
|
261
245
|
getMedia(params: GetMediaParams, options?: RequestOptions): Promise<any>;
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
246
|
+
uploadStoreMedia(params: UploadStoreMediaParams, options?: RequestOptions): Promise<any>;
|
|
247
|
+
deleteStoreMedia(params: DeleteStoreMediaParams, options?: RequestOptions): Promise<any>;
|
|
248
|
+
getStoreMedia(params: GetStoreMediaParams, options?: RequestOptions): Promise<any>;
|
|
265
249
|
updateMedia(params: UpdateMediaParams, options?: RequestOptions): Promise<any>;
|
|
266
250
|
};
|
|
267
251
|
notification: {
|
|
@@ -386,11 +370,11 @@ declare function createAdmin(config: HttpClientConfig & {
|
|
|
386
370
|
revokeToken: (params: {
|
|
387
371
|
id: string;
|
|
388
372
|
token_id: string;
|
|
389
|
-
|
|
373
|
+
store_id?: string;
|
|
390
374
|
}, options?: RequestOptions) => Promise<any>;
|
|
391
375
|
revokeAllTokens: (params: {
|
|
392
376
|
id: string;
|
|
393
|
-
|
|
377
|
+
store_id?: string;
|
|
394
378
|
}, options?: RequestOptions) => Promise<any>;
|
|
395
379
|
};
|
|
396
380
|
audience: {
|
|
@@ -421,7 +405,7 @@ declare function createAdmin(config: HttpClientConfig & {
|
|
|
421
405
|
getChat: (params: GetAgentChatParams, options?: RequestOptions) => Promise<any>;
|
|
422
406
|
updateChat: (params: UpdateAgentChatParams, options?: RequestOptions) => Promise<any>;
|
|
423
407
|
rateChat: (params: RateAgentChatParams, options?: RequestOptions) => Promise<any>;
|
|
424
|
-
|
|
408
|
+
getStoreChats: (params: GetStoreChatsParams, options?: RequestOptions) => Promise<any>;
|
|
425
409
|
getChatMessages: (params: GetAgentChatParams & {
|
|
426
410
|
limit?: number;
|
|
427
411
|
}, options?: RequestOptions) => Promise<any>;
|
|
@@ -439,11 +423,11 @@ declare function createAdmin(config: HttpClientConfig & {
|
|
|
439
423
|
};
|
|
440
424
|
analytics: {
|
|
441
425
|
query: (spec: AnalyticsQuery, options?: RequestOptions & {
|
|
442
|
-
|
|
426
|
+
store_id?: string;
|
|
443
427
|
}) => Promise<AnalyticsQueryResponse>;
|
|
444
428
|
};
|
|
445
|
-
|
|
446
|
-
|
|
429
|
+
setStoreId: (storeId: string) => void;
|
|
430
|
+
getStoreId: () => string;
|
|
447
431
|
setMarket: (market: string) => void;
|
|
448
432
|
getMarket: () => string;
|
|
449
433
|
setLocale: (locale: string) => void;
|
|
@@ -495,35 +479,22 @@ declare function createAdmin(config: HttpClientConfig & {
|
|
|
495
479
|
getInventoryAt: typeof getInventoryAt;
|
|
496
480
|
getFirstAvailableFCId: typeof getFirstAvailableFCId;
|
|
497
481
|
};
|
|
498
|
-
}
|
|
482
|
+
};
|
|
499
483
|
interface StorefrontSession {
|
|
500
484
|
customer: any;
|
|
501
|
-
|
|
485
|
+
store: any;
|
|
502
486
|
market: any;
|
|
503
487
|
}
|
|
488
|
+
type StorefrontSessionListener = (session: StorefrontSession | null) => void;
|
|
504
489
|
declare function createStorefront(config: HttpClientConfig & {
|
|
505
490
|
market?: string;
|
|
506
491
|
locale?: string;
|
|
507
492
|
}): {
|
|
508
493
|
session: (market?: string) => Promise<StorefrontSession>;
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
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;
|
|
494
|
+
getSession: () => StorefrontSession | null;
|
|
495
|
+
onSessionChange: (listener: StorefrontSessionListener) => () => void;
|
|
496
|
+
store: {
|
|
497
|
+
getStore(options?: RequestOptions): any;
|
|
527
498
|
location: {
|
|
528
499
|
getCountries(options?: RequestOptions): any;
|
|
529
500
|
getCountry(countryCode: string, options?: RequestOptions): any;
|
|
@@ -585,23 +556,22 @@ declare function createStorefront(config: HttpClientConfig & {
|
|
|
585
556
|
};
|
|
586
557
|
crm: {
|
|
587
558
|
customer: {
|
|
588
|
-
session(params?: {
|
|
589
|
-
|
|
559
|
+
session(params?: Parameters<(params?: {
|
|
560
|
+
store_id?: string;
|
|
590
561
|
market?: string;
|
|
591
|
-
}, options?: RequestOptions)
|
|
592
|
-
|
|
562
|
+
}, options?: RequestOptions) => Promise<any>>[0], options?: Parameters<(params?: {
|
|
563
|
+
store_id?: string;
|
|
564
|
+
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>;
|
|
593
568
|
requestCode(params: {
|
|
594
569
|
email: string;
|
|
595
|
-
|
|
570
|
+
store_id?: string;
|
|
596
571
|
}, options?: RequestOptions): any;
|
|
597
|
-
verify(params: {
|
|
598
|
-
email: string;
|
|
599
|
-
code: string;
|
|
600
|
-
business_id?: string;
|
|
601
|
-
}, options?: RequestOptions): Promise<any>;
|
|
602
572
|
refreshToken(params: {
|
|
603
573
|
refresh_token: string;
|
|
604
|
-
|
|
574
|
+
store_id?: string;
|
|
605
575
|
}, options?: RequestOptions): Promise<any>;
|
|
606
576
|
getMe(options?: RequestOptions): any;
|
|
607
577
|
};
|
|
@@ -620,49 +590,48 @@ declare function createStorefront(config: HttpClientConfig & {
|
|
|
620
590
|
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
591
|
track(params: TrackParams): Promise<void>;
|
|
622
592
|
};
|
|
623
|
-
ready: Promise<void>;
|
|
624
593
|
automation: {
|
|
625
594
|
agent: {
|
|
626
595
|
getAgents(params?: any, options?: RequestOptions): any;
|
|
627
596
|
getAgent(params: {
|
|
628
597
|
id: string;
|
|
629
|
-
|
|
598
|
+
store_id?: string;
|
|
630
599
|
}, options?: RequestOptions): any;
|
|
631
600
|
sendMessage(params: {
|
|
632
601
|
id: string;
|
|
633
602
|
message: string;
|
|
634
603
|
chat_id?: string;
|
|
635
|
-
|
|
604
|
+
store_id?: string;
|
|
636
605
|
}, options?: RequestOptions): any;
|
|
637
606
|
getChat(params: {
|
|
638
607
|
id: string;
|
|
639
608
|
chat_id: string;
|
|
640
|
-
|
|
609
|
+
store_id?: string;
|
|
641
610
|
}, options?: RequestOptions): any;
|
|
642
611
|
getChatMessages(params: {
|
|
643
612
|
id: string;
|
|
644
613
|
chat_id: string;
|
|
645
614
|
limit?: number;
|
|
646
|
-
|
|
615
|
+
store_id?: string;
|
|
647
616
|
}, options?: RequestOptions): any;
|
|
648
617
|
rateChat(params: {
|
|
649
618
|
id: string;
|
|
650
619
|
chat_id: string;
|
|
651
620
|
rating: number;
|
|
652
621
|
comment?: string;
|
|
653
|
-
|
|
622
|
+
store_id?: string;
|
|
654
623
|
}, options?: RequestOptions): any;
|
|
655
624
|
};
|
|
656
625
|
};
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
setMarket: (key: string) =>
|
|
626
|
+
setStoreId: (storeId: string) => void;
|
|
627
|
+
getStoreId: () => string;
|
|
628
|
+
setMarket: (key: string) => void;
|
|
660
629
|
getMarket: () => string;
|
|
661
630
|
setLocale: (locale: string) => void;
|
|
662
631
|
getLocale: () => string;
|
|
663
632
|
isAuthenticated: () => boolean;
|
|
664
633
|
logout: () => void;
|
|
665
|
-
setToken: (tokens:
|
|
634
|
+
setToken: (tokens: any) => void;
|
|
666
635
|
extractBlockValues: typeof extractBlockValues;
|
|
667
636
|
utils: {
|
|
668
637
|
getImageUrl: (imageBlock: any, isBlock?: boolean) => any;
|
|
@@ -709,4 +678,4 @@ declare function createStorefront(config: HttpClientConfig & {
|
|
|
709
678
|
};
|
|
710
679
|
};
|
|
711
680
|
|
|
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
|
|
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 };
|