arky-sdk 0.9.20 → 0.11.0
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 +179 -105
- package/dist/admin.cjs +55 -5
- package/dist/admin.cjs.map +1 -1
- package/dist/admin.d.cts +5 -3
- package/dist/admin.d.ts +5 -3
- package/dist/admin.js +55 -5
- package/dist/admin.js.map +1 -1
- package/dist/{api-C_2AMzmc.d.cts → index-B0Pd1s-2.d.cts} +4457 -4451
- package/dist/{api-C_2AMzmc.d.ts → index-B0Pd1s-2.d.ts} +4457 -4451
- package/dist/index.cjs +2360 -546
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3829 -3
- package/dist/index.d.ts +3829 -3
- package/dist/index.js +2356 -547
- package/dist/index.js.map +1 -1
- package/dist/{inventory-DdgZ5MI_.d.ts → inventory-C2EZEnV9.d.ts} +1 -1
- package/dist/{inventory-DgPpeRWU.d.cts → inventory-t9OBR0CC.d.cts} +1 -1
- package/dist/storefront.cjs +692 -686
- package/dist/storefront.cjs.map +1 -1
- package/dist/storefront.d.cts +5 -512
- package/dist/storefront.d.ts +5 -512
- package/dist/storefront.js +692 -686
- package/dist/storefront.js.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils.d.cts +2 -2
- package/dist/utils.d.ts +2 -2
- package/package.json +1 -1
- package/dist/admin-CTtJoarO.d.ts +0 -1543
- package/dist/admin-DB_GYW2b.d.cts +0 -1543
package/dist/storefront.d.ts
CHANGED
|
@@ -1,512 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import * as nanostores from 'nanostores';
|
|
7
|
-
import { StripeElementsOptions, Stripe } from '@stripe/stripe-js';
|
|
8
|
-
|
|
9
|
-
interface StripeConfirmationTokenControllerConfig {
|
|
10
|
-
publishableKey: string;
|
|
11
|
-
connectedAccountId?: string;
|
|
12
|
-
amount: number;
|
|
13
|
-
currency: string;
|
|
14
|
-
appearance?: StripeElementsOptions["appearance"];
|
|
15
|
-
}
|
|
16
|
-
interface StripeConfirmationTokenOptions {
|
|
17
|
-
return_url?: string;
|
|
18
|
-
billing_details?: {
|
|
19
|
-
name?: string | null;
|
|
20
|
-
email?: string | null;
|
|
21
|
-
phone?: string | null;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
interface StripeConfirmationTokenResult {
|
|
25
|
-
confirmation_token_id: string;
|
|
26
|
-
return_url?: string;
|
|
27
|
-
}
|
|
28
|
-
interface StripeConfirmationTokenController {
|
|
29
|
-
mount(target: string | HTMLElement): void;
|
|
30
|
-
update(input: {
|
|
31
|
-
amount?: number;
|
|
32
|
-
currency?: string;
|
|
33
|
-
}): void;
|
|
34
|
-
createConfirmationToken(options?: StripeConfirmationTokenOptions): Promise<StripeConfirmationTokenResult>;
|
|
35
|
-
handleNextAction(clientSecret: string): Promise<void>;
|
|
36
|
-
destroy(): void;
|
|
37
|
-
}
|
|
38
|
-
type StripeLoader = (publishableKey: string, options?: {
|
|
39
|
-
stripeAccount: string;
|
|
40
|
-
}) => PromiseLike<Stripe | null>;
|
|
41
|
-
declare function createStripeConfirmationTokenController(config: StripeConfirmationTokenControllerConfig, stripeLoader?: StripeLoader): Promise<StripeConfirmationTokenController>;
|
|
42
|
-
|
|
43
|
-
type ArkyPaymentController = StripeConfirmationTokenController;
|
|
44
|
-
type ArkyStripePaymentMountOptions = Partial<StripeConfirmationTokenControllerConfig>;
|
|
45
|
-
interface ArkyStoreConfig extends CreateStorefrontConfig {
|
|
46
|
-
marketForLocale?: (locale: string) => string | null | undefined;
|
|
47
|
-
}
|
|
48
|
-
interface ArkyStoreContext {
|
|
49
|
-
locale?: string;
|
|
50
|
-
market?: string;
|
|
51
|
-
}
|
|
52
|
-
type ArkyCmsEntryParams = ArkyStoreContext & {
|
|
53
|
-
id?: string;
|
|
54
|
-
collection_id?: string;
|
|
55
|
-
key?: string;
|
|
56
|
-
store_id?: string;
|
|
57
|
-
};
|
|
58
|
-
interface ArkySubmitFormByKeyParams {
|
|
59
|
-
key: string;
|
|
60
|
-
store_id?: string;
|
|
61
|
-
values: FormValues;
|
|
62
|
-
}
|
|
63
|
-
interface ArkyServiceCartItem {
|
|
64
|
-
id: string;
|
|
65
|
-
service_id: string;
|
|
66
|
-
provider_id: string;
|
|
67
|
-
slots: SlotRange[];
|
|
68
|
-
forms: FormEntry[];
|
|
69
|
-
price?: Price;
|
|
70
|
-
service_name?: string;
|
|
71
|
-
provider_name?: string;
|
|
72
|
-
date_text?: string;
|
|
73
|
-
time_text?: string;
|
|
74
|
-
is_multi_day?: boolean;
|
|
75
|
-
}
|
|
76
|
-
interface ArkyCartSnapshot {
|
|
77
|
-
cart: Cart | null;
|
|
78
|
-
product_items: EshopCartItem[];
|
|
79
|
-
service_items: ArkyServiceCartItem[];
|
|
80
|
-
item_count: number;
|
|
81
|
-
}
|
|
82
|
-
interface ArkyCartStatus {
|
|
83
|
-
loading: boolean;
|
|
84
|
-
syncing: boolean;
|
|
85
|
-
fetching_quote: boolean;
|
|
86
|
-
processing_checkout: boolean;
|
|
87
|
-
error: string | null;
|
|
88
|
-
quote_error: string | null;
|
|
89
|
-
selected_shipping_method_id: string | null;
|
|
90
|
-
user_token: string | null;
|
|
91
|
-
}
|
|
92
|
-
interface ArkyLastOrder {
|
|
93
|
-
order_id: string;
|
|
94
|
-
number: string;
|
|
95
|
-
payment_action: OrderCheckoutResult["payment_action"];
|
|
96
|
-
payment: OrderCheckoutResult["payment"];
|
|
97
|
-
product_items?: EshopCartItem[];
|
|
98
|
-
service_items?: ArkyServiceCartItem[];
|
|
99
|
-
shipping_address?: Address | null;
|
|
100
|
-
billing_address?: Address | null;
|
|
101
|
-
total?: number;
|
|
102
|
-
currency?: string | null;
|
|
103
|
-
payment_method_key?: string | null;
|
|
104
|
-
created_at: number;
|
|
105
|
-
}
|
|
106
|
-
interface ArkyCartInput {
|
|
107
|
-
product_items?: EshopCartItem[];
|
|
108
|
-
service_items?: ArkyServiceCartItem[];
|
|
109
|
-
shipping_address?: Address | null;
|
|
110
|
-
billing_address?: Address | null;
|
|
111
|
-
forms?: FormEntry[];
|
|
112
|
-
promo_code?: string | null;
|
|
113
|
-
payment_method_key?: string | null;
|
|
114
|
-
shipping_method_id?: string | null;
|
|
115
|
-
payment?: ArkyPaymentController | null;
|
|
116
|
-
return_url?: string;
|
|
117
|
-
billing_details?: {
|
|
118
|
-
name?: string | null;
|
|
119
|
-
email?: string | null;
|
|
120
|
-
phone?: string | null;
|
|
121
|
-
};
|
|
122
|
-
clear_after_checkout?: boolean;
|
|
123
|
-
}
|
|
124
|
-
interface ArkyCmsState {
|
|
125
|
-
entries: Record<string, CollectionEntry>;
|
|
126
|
-
forms: Record<string, Form>;
|
|
127
|
-
loading: boolean;
|
|
128
|
-
error: string | null;
|
|
129
|
-
}
|
|
130
|
-
interface ArkyEshopState {
|
|
131
|
-
products: Product[];
|
|
132
|
-
services: Service[];
|
|
133
|
-
providers: Provider[];
|
|
134
|
-
product_cursor: string | null;
|
|
135
|
-
service_cursor: string | null;
|
|
136
|
-
provider_cursor: string | null;
|
|
137
|
-
availability: unknown | null;
|
|
138
|
-
loading_products: boolean;
|
|
139
|
-
loading_services: boolean;
|
|
140
|
-
loading_providers: boolean;
|
|
141
|
-
loading_availability: boolean;
|
|
142
|
-
error: string | null;
|
|
143
|
-
}
|
|
144
|
-
interface ArkyCalendarDay {
|
|
145
|
-
date: Date;
|
|
146
|
-
iso: string;
|
|
147
|
-
available: boolean;
|
|
148
|
-
isSelected: boolean;
|
|
149
|
-
isInRange: boolean;
|
|
150
|
-
isToday: boolean;
|
|
151
|
-
blank: boolean;
|
|
152
|
-
}
|
|
153
|
-
interface ArkyServiceSlot {
|
|
154
|
-
id: string;
|
|
155
|
-
serviceId: string;
|
|
156
|
-
providerId: string;
|
|
157
|
-
from: number;
|
|
158
|
-
to: number;
|
|
159
|
-
timeText: string;
|
|
160
|
-
dateText: string;
|
|
161
|
-
isMultiDay?: boolean;
|
|
162
|
-
serviceName?: string;
|
|
163
|
-
date?: string;
|
|
164
|
-
serviceBlocks?: Block[];
|
|
165
|
-
}
|
|
166
|
-
interface ArkyServiceFormGroup {
|
|
167
|
-
form: Form;
|
|
168
|
-
blocks: Block[];
|
|
169
|
-
}
|
|
170
|
-
interface ArkyServiceFormState {
|
|
171
|
-
provider_id: string | null;
|
|
172
|
-
groups: ArkyServiceFormGroup[];
|
|
173
|
-
loading: boolean;
|
|
174
|
-
error: string | null;
|
|
175
|
-
}
|
|
176
|
-
interface ArkyServiceState {
|
|
177
|
-
service: Service | null;
|
|
178
|
-
availability: AvailabilityResponse | null;
|
|
179
|
-
providers: Provider[];
|
|
180
|
-
serviceProviders: ServiceProvider[];
|
|
181
|
-
selectedProviderId: string | null;
|
|
182
|
-
currentMonth: Date;
|
|
183
|
-
calendar: ArkyCalendarDay[];
|
|
184
|
-
selectedDate: string | null;
|
|
185
|
-
slots: ArkyServiceSlot[];
|
|
186
|
-
selectedSlot: ArkyServiceSlot | null;
|
|
187
|
-
timezone: string;
|
|
188
|
-
tzGroups: Record<string, {
|
|
189
|
-
zone: string;
|
|
190
|
-
name: string;
|
|
191
|
-
}[]>;
|
|
192
|
-
loading: boolean;
|
|
193
|
-
weekdays: string[];
|
|
194
|
-
quote: OrderQuote | null;
|
|
195
|
-
fetchingQuote: boolean;
|
|
196
|
-
quoteError: string | null;
|
|
197
|
-
currency: Currency | null;
|
|
198
|
-
dateTimeConfirmed: boolean;
|
|
199
|
-
availablePaymentMethods: PaymentMethod[];
|
|
200
|
-
cartId: string | null;
|
|
201
|
-
promoCode: string | null;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
declare function locationToAddress(location: ZoneLocation): Address;
|
|
205
|
-
declare function createFormEntry(formId: string, fields: FormField[]): FormEntry;
|
|
206
|
-
declare function toProductCheckoutItems(items: EshopCartItem[]): ProductCheckoutItemInput[];
|
|
207
|
-
declare function toServiceCheckoutItems(items: ArkyServiceCartItem[]): ServiceCheckoutItemInput[];
|
|
208
|
-
declare function buildFormFields(schema: FormSchema[], values: FormValues): FormField[];
|
|
209
|
-
declare function createFormEntryFromValues(form: Pick<Form, "id" | "schema">, values: FormValues): FormEntry;
|
|
210
|
-
|
|
211
|
-
declare function initializeStore(config: ArkyStoreConfig): {
|
|
212
|
-
client: StorefrontClient;
|
|
213
|
-
session: nanostores.PreinitializedWritableAtom<ContactSession | null> & object;
|
|
214
|
-
market: nanostores.ReadableAtom<Market | null>;
|
|
215
|
-
market_key: nanostores.PreinitializedWritableAtom<string> & object;
|
|
216
|
-
locale: nanostores.PreinitializedWritableAtom<string> & object;
|
|
217
|
-
currency: nanostores.ReadableAtom<Currency | null>;
|
|
218
|
-
allowed_payment_methods: nanostores.ReadableAtom<PaymentMethod[]>;
|
|
219
|
-
payment_config: nanostores.ReadableAtom<{
|
|
220
|
-
provider: PaymentStoreConfig | null;
|
|
221
|
-
enabled: boolean;
|
|
222
|
-
}>;
|
|
223
|
-
identify: (params?: {
|
|
224
|
-
email?: string;
|
|
225
|
-
verify?: boolean;
|
|
226
|
-
market?: string;
|
|
227
|
-
}) => Promise<StorefrontIdentifyResult>;
|
|
228
|
-
identifyContactEmailIfMissing: (email: string) => Promise<ContactSession>;
|
|
229
|
-
verify: (params: {
|
|
230
|
-
challenge_id: string;
|
|
231
|
-
code: string;
|
|
232
|
-
}) => Promise<VerifyResponse>;
|
|
233
|
-
me: () => Promise<Contact>;
|
|
234
|
-
logout: () => Promise<void>;
|
|
235
|
-
onAuthStateChanged: (listener: AuthStateListener<ContactSession>) => () => void;
|
|
236
|
-
readonly isAuthenticated: boolean;
|
|
237
|
-
setMarket: (key: string) => void;
|
|
238
|
-
setLocale: (value: string, options?: {
|
|
239
|
-
market?: string;
|
|
240
|
-
}) => void;
|
|
241
|
-
setContext: (context: ArkyStoreContext) => void;
|
|
242
|
-
getStoreId: () => string;
|
|
243
|
-
getMarket: () => string;
|
|
244
|
-
getLocale: () => string;
|
|
245
|
-
cms: {
|
|
246
|
-
state: nanostores.PreinitializedMapStore<ArkyCmsState> & object;
|
|
247
|
-
collection: {
|
|
248
|
-
get: (params: GetCollectionParams, options?: RequestOptions) => Promise<Collection>;
|
|
249
|
-
};
|
|
250
|
-
entry: {
|
|
251
|
-
get: (params: ArkyCmsEntryParams, options?: RequestOptions) => Promise<CollectionEntry>;
|
|
252
|
-
find: (params: GetEntriesParams, options?: RequestOptions) => Promise<PaginatedResponse<CollectionEntry>>;
|
|
253
|
-
};
|
|
254
|
-
form: {
|
|
255
|
-
get: (params: GetFormParams, options?: RequestOptions) => Promise<Form>;
|
|
256
|
-
submit: (params: SubmitFormParams, options?: RequestOptions) => Promise<FormSubmission>;
|
|
257
|
-
submitByKey: (params: ArkySubmitFormByKeyParams, options?: RequestOptions) => Promise<FormSubmission>;
|
|
258
|
-
};
|
|
259
|
-
taxonomy: {
|
|
260
|
-
get(params: GetTaxonomyParams, options?: RequestOptions): Promise<Taxonomy>;
|
|
261
|
-
getChildren(params: GetTaxonomyChildrenParams, options?: RequestOptions): Promise<PaginatedResponse<Taxonomy>>;
|
|
262
|
-
};
|
|
263
|
-
};
|
|
264
|
-
eshop: {
|
|
265
|
-
state: nanostores.PreinitializedMapStore<ArkyEshopState> & object;
|
|
266
|
-
product: {
|
|
267
|
-
get: (params: GetProductParams, options?: RequestOptions) => Promise<Product>;
|
|
268
|
-
list: (params?: GetProductsParams, options?: RequestOptions) => Promise<PaginatedResponse<Product>>;
|
|
269
|
-
};
|
|
270
|
-
service: {
|
|
271
|
-
get: (params: GetServiceParams, options?: RequestOptions) => Promise<Service>;
|
|
272
|
-
list: (params?: GetServicesParams, options?: RequestOptions) => Promise<PaginatedResponse<Service>>;
|
|
273
|
-
listProviders: (params: FindServiceProvidersParams, options?: RequestOptions) => Promise<ServiceProvider[]>;
|
|
274
|
-
getAvailability: (params: GetAvailabilityParams, options?: RequestOptions) => Promise<AvailabilityResponse>;
|
|
275
|
-
state: nanostores.PreinitializedMapStore<ArkyServiceState> & object;
|
|
276
|
-
form_state: nanostores.PreinitializedMapStore<ArkyServiceFormState> & object;
|
|
277
|
-
form_groups: nanostores.ReadableAtom<ArkyServiceFormGroup[]>;
|
|
278
|
-
form_blocks: nanostores.ReadableAtom<Block[]>;
|
|
279
|
-
current_step_name: nanostores.ReadableAtom<string>;
|
|
280
|
-
can_proceed: nanostores.ReadableAtom<boolean>;
|
|
281
|
-
month_year: nanostores.ReadableAtom<string>;
|
|
282
|
-
chain_start: nanostores.ReadableAtom<number | null>;
|
|
283
|
-
total_steps: nanostores.ReadableAtom<0 | 2>;
|
|
284
|
-
steps: nanostores.ReadableAtom<{
|
|
285
|
-
1: {
|
|
286
|
-
name: string;
|
|
287
|
-
};
|
|
288
|
-
2: {
|
|
289
|
-
name: string;
|
|
290
|
-
};
|
|
291
|
-
}>;
|
|
292
|
-
current_step: nanostores.ReadableAtom<number>;
|
|
293
|
-
initialize: () => Promise<void>;
|
|
294
|
-
select: (service: Service) => Promise<void>;
|
|
295
|
-
setTimezone: (tz: string) => void;
|
|
296
|
-
loadMonth: () => Promise<void>;
|
|
297
|
-
prevMonth: () => void;
|
|
298
|
-
nextMonth: () => void;
|
|
299
|
-
selectProvider: (providerId: string | null) => void;
|
|
300
|
-
selectDate: (cell: ArkyCalendarDay) => void;
|
|
301
|
-
selectTimeSlot: (slot: ArkyServiceSlot | null) => void;
|
|
302
|
-
resetDateSelection: () => void;
|
|
303
|
-
updateCalendar: () => void;
|
|
304
|
-
findFirstAvailable: () => void;
|
|
305
|
-
addToCart: (explicitSlots?: ArkyServiceSlot[]) => Promise<void>;
|
|
306
|
-
removeFromCart: (bookingId: string) => Promise<void>;
|
|
307
|
-
clearCart: () => Promise<void>;
|
|
308
|
-
getProvidersList: () => Provider[];
|
|
309
|
-
prevStep: () => void;
|
|
310
|
-
nextStep: () => void;
|
|
311
|
-
getServicePrice: () => string;
|
|
312
|
-
formatDateDisplay: (value: string | null) => string;
|
|
313
|
-
serviceItemsFromSlots: (slots: ArkyServiceSlot[], forms?: FormEntry[]) => ArkyServiceCartItem[];
|
|
314
|
-
};
|
|
315
|
-
provider: {
|
|
316
|
-
get: (params: GetProviderParams, options?: RequestOptions) => Promise<Provider>;
|
|
317
|
-
list: (params?: GetProvidersParams, options?: RequestOptions) => Promise<PaginatedResponse<Provider>>;
|
|
318
|
-
};
|
|
319
|
-
order: {
|
|
320
|
-
get(params: GetOrderParams, options?: RequestOptions): Promise<Order>;
|
|
321
|
-
find(params: GetOrdersParams, options?: RequestOptions): Promise<PaginatedResponse<Order>>;
|
|
322
|
-
downloadDigitalAccess(params: DownloadDigitalAccessParams, options?: RequestOptions): Promise<DigitalAccessDownloadResponse>;
|
|
323
|
-
findDigitalAccess(params: FindDigitalAccessGrantsParams, options?: RequestOptions): Promise<PaginatedResponse<DigitalAccessGrant>>;
|
|
324
|
-
getDigitalAccess(params: GetDigitalAccessGrantParams, options?: RequestOptions): Promise<DigitalAccessGrant>;
|
|
325
|
-
};
|
|
326
|
-
cart: {
|
|
327
|
-
cart: nanostores.PreinitializedWritableAtom<Cart | null> & object;
|
|
328
|
-
product_items: nanostores.PreinitializedWritableAtom<EshopCartItem[]> & object;
|
|
329
|
-
service_items: nanostores.PreinitializedWritableAtom<ArkyServiceCartItem[]> & object;
|
|
330
|
-
quote_result: nanostores.PreinitializedWritableAtom<OrderQuote | null> & object;
|
|
331
|
-
promo_code: nanostores.PreinitializedWritableAtom<string | null> & object;
|
|
332
|
-
last_order: nanostores.PreinitializedWritableAtom<ArkyLastOrder | null> & object;
|
|
333
|
-
status: nanostores.PreinitializedMapStore<ArkyCartStatus> & object;
|
|
334
|
-
product_item_count: nanostores.ReadableAtom<number>;
|
|
335
|
-
service_item_count: nanostores.ReadableAtom<number>;
|
|
336
|
-
item_count: nanostores.ReadableAtom<number>;
|
|
337
|
-
snapshot: nanostores.ReadableAtom<{
|
|
338
|
-
cart: Cart | null;
|
|
339
|
-
product_items: EshopCartItem[];
|
|
340
|
-
service_items: ArkyServiceCartItem[];
|
|
341
|
-
item_count: number;
|
|
342
|
-
}>;
|
|
343
|
-
load: () => Promise<Cart>;
|
|
344
|
-
refresh: (input?: ArkyCartInput, writeRevision?: number) => Promise<Cart>;
|
|
345
|
-
addProduct: (product: Product, variant: ProductVariant, quantity?: number) => Promise<Cart>;
|
|
346
|
-
setProductQuantity: (itemId: string, quantity: number) => Promise<Cart>;
|
|
347
|
-
removeProduct: (itemId: string) => Promise<Cart | null>;
|
|
348
|
-
addServiceItem: (item: ArkyServiceCartItem) => Promise<Cart>;
|
|
349
|
-
removeServiceItem: (itemId: string) => Promise<Cart>;
|
|
350
|
-
clear: () => Promise<Cart | null>;
|
|
351
|
-
clearLocal: () => void;
|
|
352
|
-
quote: (input?: ArkyCartInput) => Promise<OrderQuote | null>;
|
|
353
|
-
checkout: (input?: ArkyCartInput) => Promise<OrderCheckoutResult>;
|
|
354
|
-
payment: {
|
|
355
|
-
controller: nanostores.PreinitializedWritableAtom<StripeConfirmationTokenController | null> & object;
|
|
356
|
-
ready: nanostores.ReadableAtom<boolean>;
|
|
357
|
-
setController: (controller: StripeConfirmationTokenController | null) => StripeConfirmationTokenController | null;
|
|
358
|
-
getController: () => StripeConfirmationTokenController | null;
|
|
359
|
-
mountStripe: (target: string | HTMLElement, options?: ArkyStripePaymentMountOptions) => Promise<StripeConfirmationTokenController>;
|
|
360
|
-
update: (input: {
|
|
361
|
-
amount?: number;
|
|
362
|
-
currency?: string;
|
|
363
|
-
}) => void;
|
|
364
|
-
destroy: () => void;
|
|
365
|
-
};
|
|
366
|
-
applyPromoCode(code: string, input?: Omit<ArkyCartInput, "promo_code">): Promise<OrderQuote | null>;
|
|
367
|
-
removePromoCode(input?: Omit<ArkyCartInput, "promo_code">): Promise<OrderQuote | null>;
|
|
368
|
-
selectShippingMethod(id: string | null): void;
|
|
369
|
-
locationToAddress: typeof locationToAddress;
|
|
370
|
-
createFormEntry: typeof createFormEntry;
|
|
371
|
-
buildItems: (input?: ArkyCartInput) => OrderCheckoutItemInput[];
|
|
372
|
-
buildProductItems: typeof toProductCheckoutItems;
|
|
373
|
-
buildServiceItems: typeof toServiceCheckoutItems;
|
|
374
|
-
};
|
|
375
|
-
};
|
|
376
|
-
crm: {
|
|
377
|
-
contact: {
|
|
378
|
-
identify(params?: {
|
|
379
|
-
email?: string;
|
|
380
|
-
market?: string;
|
|
381
|
-
}, options?: RequestOptions): Promise<IdentifyResponse>;
|
|
382
|
-
requestCode(params?: {
|
|
383
|
-
email?: string;
|
|
384
|
-
market?: string;
|
|
385
|
-
}, options?: RequestOptions): Promise<IdentifyResponse>;
|
|
386
|
-
verify(params: {
|
|
387
|
-
challenge_id: string;
|
|
388
|
-
code: string;
|
|
389
|
-
}, options?: RequestOptions): Promise<VerifyResponse>;
|
|
390
|
-
logout(options?: RequestOptions): Promise<void>;
|
|
391
|
-
getMe(options?: RequestOptions): Promise<Contact>;
|
|
392
|
-
};
|
|
393
|
-
contactList: {
|
|
394
|
-
get(params: GetContactListParams, options?: RequestOptions): Promise<StorefrontContactList>;
|
|
395
|
-
find(params?: FindStorefrontContactListsParams, options?: RequestOptions): Promise<PaginatedResponse<StorefrontContactList>>;
|
|
396
|
-
plans: {
|
|
397
|
-
find(params: FindStorefrontContactListPlansParams, options?: RequestOptions): Promise<PaginatedResponse<StorefrontContactListPlan>>;
|
|
398
|
-
};
|
|
399
|
-
memberships: {
|
|
400
|
-
find(params?: FindStorefrontContactListMembershipsParams, options?: RequestOptions): Promise<PaginatedResponse<StorefrontContactListMembership>>;
|
|
401
|
-
};
|
|
402
|
-
subscribe(params: SubscribeContactListParams, options?: RequestOptions): Promise<ContactListSubscribeResponse>;
|
|
403
|
-
checkAccess(params: ContactListAccessParams, options?: RequestOptions): Promise<ContactListAccessResponse>;
|
|
404
|
-
checkContentAccess(params: ContactListContentAccessParams, options?: RequestOptions): Promise<ContactListContentAccessResponse>;
|
|
405
|
-
manage(token: string, options?: RequestOptions): Promise<ContactListManagementResponse>;
|
|
406
|
-
unsubscribe(token: string, options?: RequestOptions): Promise<{
|
|
407
|
-
success: boolean;
|
|
408
|
-
}>;
|
|
409
|
-
confirm(token: string, options?: RequestOptions): Promise<{
|
|
410
|
-
success: boolean;
|
|
411
|
-
}>;
|
|
412
|
-
};
|
|
413
|
-
};
|
|
414
|
-
action: {
|
|
415
|
-
track(params: TrackActionParams): Promise<void>;
|
|
416
|
-
pageView(payload?: Record<string, unknown>): Promise<void>;
|
|
417
|
-
state: nanostores.PreinitializedWritableAtom<StorefrontAction | null> & object;
|
|
418
|
-
};
|
|
419
|
-
experiments: {
|
|
420
|
-
use: (params: string | UseExperimentParams) => Promise<ExperimentUseResponse>;
|
|
421
|
-
};
|
|
422
|
-
support: {
|
|
423
|
-
startConversation(params?: Omit<StartSupportConversationParams, "store_id">, opts?: RequestOptions): Promise<SupportConversationStartResponse>;
|
|
424
|
-
sendMessage(params: StorefrontSendSupportMessageParams, opts?: RequestOptions): Promise<SupportConversationResponse>;
|
|
425
|
-
getConversation(params: StorefrontGetSupportConversationParams, opts?: RequestOptions): Promise<SupportConversationResponse>;
|
|
426
|
-
};
|
|
427
|
-
store: {
|
|
428
|
-
getStore(options?: RequestOptions): Promise<Store>;
|
|
429
|
-
location: {
|
|
430
|
-
getCountries(options?: RequestOptions): Promise<{
|
|
431
|
-
items: {
|
|
432
|
-
code: string;
|
|
433
|
-
name: string;
|
|
434
|
-
states: {
|
|
435
|
-
code: string;
|
|
436
|
-
name: string;
|
|
437
|
-
}[];
|
|
438
|
-
}[];
|
|
439
|
-
cursor: string | null;
|
|
440
|
-
}>;
|
|
441
|
-
getCountry(countryCode: string, options?: RequestOptions): Promise<{
|
|
442
|
-
code: string;
|
|
443
|
-
name: string;
|
|
444
|
-
states: {
|
|
445
|
-
code: string;
|
|
446
|
-
name: string;
|
|
447
|
-
}[];
|
|
448
|
-
}>;
|
|
449
|
-
list(options?: RequestOptions): Promise<Location[]>;
|
|
450
|
-
get(id: string, options?: RequestOptions): Promise<Location>;
|
|
451
|
-
};
|
|
452
|
-
market: {
|
|
453
|
-
list(options?: RequestOptions): Promise<Market[]>;
|
|
454
|
-
get(id: string, options?: RequestOptions): Promise<Market>;
|
|
455
|
-
};
|
|
456
|
-
};
|
|
457
|
-
utils: {
|
|
458
|
-
getImageUrl: (imageBlock: unknown, isBlock?: boolean) => string | null;
|
|
459
|
-
getBlockValue: typeof getBlockValue;
|
|
460
|
-
getBlockTextValue: typeof getBlockTextValue;
|
|
461
|
-
getBlockContentValue: typeof getBlockContentValue;
|
|
462
|
-
getBlockValues: typeof getBlockValues;
|
|
463
|
-
getBlockLabel: typeof getBlockLabel;
|
|
464
|
-
getBlockObjectValues: typeof getBlockObjectValues;
|
|
465
|
-
getBlockFromArray: typeof getBlockFromArray;
|
|
466
|
-
formatBlockValue: typeof formatBlockValue;
|
|
467
|
-
prepareBlocksForSubmission: typeof prepareBlocksForSubmission;
|
|
468
|
-
extractBlockValues: typeof extractBlockValues;
|
|
469
|
-
formatPrice: (prices: Price[]) => string;
|
|
470
|
-
getPriceAmount: (prices: Price[]) => number | null;
|
|
471
|
-
formatPayment: typeof formatPayment;
|
|
472
|
-
formatMinor: typeof formatMinor;
|
|
473
|
-
getCurrencySymbol: typeof getCurrencySymbol;
|
|
474
|
-
getCurrencyName: typeof getCurrencyName;
|
|
475
|
-
validatePhoneNumber: typeof validatePhoneNumber;
|
|
476
|
-
tzGroups: {
|
|
477
|
-
label: string;
|
|
478
|
-
zones: {
|
|
479
|
-
label: string;
|
|
480
|
-
value: string;
|
|
481
|
-
}[];
|
|
482
|
-
}[];
|
|
483
|
-
findTimeZone: typeof findTimeZone;
|
|
484
|
-
slugify: typeof slugify;
|
|
485
|
-
humanize: typeof humanize;
|
|
486
|
-
categorify: typeof categorify;
|
|
487
|
-
formatDate: typeof formatDate;
|
|
488
|
-
getSvgContentForAstro: typeof getSvgContentForAstro;
|
|
489
|
-
fetchSvgContent: typeof fetchSvgContent;
|
|
490
|
-
injectSvgIntoElement: typeof injectSvgIntoElement;
|
|
491
|
-
isValidKey: typeof isValidKey;
|
|
492
|
-
validateKey: typeof validateKey;
|
|
493
|
-
toKey: typeof toKey;
|
|
494
|
-
nameToKey: typeof nameToKey;
|
|
495
|
-
getAvailableStock: typeof getAvailableStock;
|
|
496
|
-
getReservedStock: typeof getReservedStock;
|
|
497
|
-
hasStock: typeof hasStock;
|
|
498
|
-
getInventoryAt: typeof getInventoryAt;
|
|
499
|
-
getFirstAvailableFCId: typeof getFirstAvailableFCId;
|
|
500
|
-
};
|
|
501
|
-
};
|
|
502
|
-
type InitializedStoreBase = ReturnType<typeof initializeStore>;
|
|
503
|
-
type InitializedStore = InitializedStoreBase & {
|
|
504
|
-
forStore(storeId: string): InitializedStore;
|
|
505
|
-
};
|
|
506
|
-
declare function initialize(config: ArkyStoreConfig): InitializedStore;
|
|
507
|
-
|
|
508
|
-
type ArkyStore = ReturnType<typeof initialize>;
|
|
509
|
-
type ArkyCartStore = ArkyStore["eshop"]["cart"];
|
|
510
|
-
type ArkyServiceStore = ArkyStore["eshop"]["service"];
|
|
511
|
-
|
|
512
|
-
export { type ArkyCartInput, type ArkyCartSnapshot, type ArkyCartStatus, type ArkyCartStore, type ArkyCmsEntryParams, type ArkyCmsState, type ArkyEshopState, type ArkyLastOrder, type ArkyPaymentController, type ArkyServiceCartItem, type ArkyServiceFormGroup, type ArkyServiceFormState, type ArkyServiceSlot, type ArkyServiceState, type ArkyServiceStore, type ArkyStore, type ArkyStoreConfig, type ArkyStoreContext, type ArkyStripePaymentMountOptions, type ArkySubmitFormByKeyParams, AuthStateListener, ContactSession, CreateStorefrontConfig, ExperimentUseResponse, FormField, FormSchema, FormValues, StorefrontAction, StorefrontClient, StorefrontIdentifyResult, type StripeConfirmationTokenController, type StripeConfirmationTokenControllerConfig, type StripeConfirmationTokenOptions, type StripeConfirmationTokenResult, TrackActionParams, UseExperimentParams, buildFormFields, createFormEntry, createFormEntryFromValues, createStripeConfirmationTokenController, getBlockContentValue, initialize };
|
|
1
|
+
export { A as ArkyCartInput, e as ArkyCartSnapshot, f as ArkyCartStatus, ArkyCartStore, h as ArkyCmsEntryParams, i as ArkyCmsState, j as ArkyEshopState, k as ArkyLastOrder, l as ArkyPaymentController, m as ArkyServiceCartItem, n as ArkyServiceFormGroup, o as ArkyServiceFormState, p as ArkyServiceSlot, q as ArkyServiceState, ArkyServiceStore, ArkyStore, ArkyStoreConfig, ArkyStoreContext, ArkyStripePaymentMountOptions, r as ArkySubmitFormByKeyParams, AuthStateListener, COMMON_ACTION_KEYS, CartApi, CartController, CartControllerAddItemParams, CartControllerCheckoutParams, CartControllerClearParams, CartControllerInitParams, CartControllerListener, CartControllerQuoteParams, CartControllerRefreshParams, CartControllerRemoveItemParams, CartControllerState, CartControllerUpdateParams, CommonActionKey, ContactSession, ExperimentUseResponse, StorefrontAction, StorefrontClient, StorefrontContact, StorefrontContext, StorefrontDto, StorefrontIdentifyResult, StorefrontLocation, StorefrontMarket, StorefrontOptions, StorefrontSessionStorage, StorefrontSetup, StorefrontSupportConversationResponse, StorefrontSupportConversationStartResponse, StorefrontVerifyResult, StorefrontZone, S as StripeConfirmationTokenController, a as StripeConfirmationTokenControllerConfig, b as StripeConfirmationTokenOptions, d as StripeConfirmationTokenResult, TrackActionParams, UseExperimentParams, buildFormFields, createCartController, createFormEntry, createFormEntryFromValues, createStorefront, c as createStripeConfirmationTokenController, g as getBlockContentValue, initialize } from './index.js';
|
|
2
|
+
export { u as FormField, t as FormSchema, iq as FormValue, i as FormValues } from './index-B0Pd1s-2.js';
|
|
3
|
+
import './inventory-C2EZEnV9.js';
|
|
4
|
+
import 'nanostores';
|
|
5
|
+
import '@stripe/stripe-js';
|