@ecomiq/storefront 0.1.2 → 1.0.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 +159 -53
- package/dist/index-C-xqLr1g.d.ts +6551 -0
- package/dist/nextjs/api.d.ts +10 -14
- package/dist/nextjs/api.js +74 -41
- package/dist/nextjs/api.js.map +1 -1
- package/dist/nextjs.d.ts +21 -3193
- package/dist/nextjs.js +1759 -588
- package/dist/nextjs.js.map +1 -1
- package/dist/store-proxy-handler-CNzKlTFA.d.ts +10 -0
- package/dist/tanstack/api.d.ts +41 -0
- package/dist/tanstack/api.js +196 -0
- package/dist/tanstack/api.js.map +1 -0
- package/dist/tanstack.d.ts +30 -0
- package/dist/{react.js → tanstack.js} +2466 -2172
- package/dist/tanstack.js.map +1 -0
- package/package.json +21 -13
- package/dist/collection-anMkdWa7.d.ts +0 -4333
- package/dist/core.d.ts +0 -3396
- package/dist/core.js +0 -1239
- package/dist/core.js.map +0 -1
- package/dist/find-storefront-cms-page-DNwLo1iV.d.ts +0 -178
- package/dist/react.d.ts +0 -964
- package/dist/react.js.map +0 -1
package/dist/react.d.ts
DELETED
|
@@ -1,964 +0,0 @@
|
|
|
1
|
-
import { GeoItem } from './core.js';
|
|
2
|
-
export { CartAddressesRequest, CartAddressesRequestSchema, CartBuyerRequest, CartBuyerRequestSchema, CartCheckoutPayment, CartCheckoutPaymentAction, CartCheckoutPaymentActionSchema, CartCheckoutPaymentSchema, CartCheckoutReadResponse, CartCheckoutReadResponseSchema, CartCheckoutRequest, CartCheckoutRequestSchema, CartCheckoutResponse, CartCheckoutResponseSchema, CartCouponRequest, CartCouponRequestSchema, CartCreateRequest, CartCreateRequestSchema, CartItemModifierRequest, CartItemModifierRequestSchema, CartItemRequest, CartItemRequestSchema, CartPaymentMethod, CartPaymentMethodSchema, CartPaymentMethodsResponse, CartPaymentMethodsResponseSchema, CartPaymentReceiptResponse, CartPaymentReceiptResponseSchema, CartResponse, CartResponseBundleItemSchema, CartResponseItemSchema, CartResponseSchema, CartShippingMethodPutRequest, CartShippingMethodPutRequestSchema, CustomerAddressUpsertInput, CustomerOrderDetail, CustomerOrderLineItem, CustomerOrderListItem, CustomerOrderShippingAddress, CustomerProfile, CustomerProfilePatch, CustomerSavedAddress, EcomiqOAuthIdentityHeaders, STOREFRONT_API_PATH_PREFIX, STOREFRONT_ECOMIQ_OAUTH_COOKIE_NAME, STOREFRONT_ECOMIQ_OAUTH_COOKIE_PATH, ShippingOptionGroup, ShippingOptionGroupSchema, ShippingOptionsResponse, ShippingOptionsResponseSchema, ShippingRate, ShippingRateSchema, StoreTheme, StorefrontPageBlock, StorefrontPageDetail, StorefrontPageDetailSchema, StorefrontPageListItem, StorefrontPageListItemSchema, StorefrontPageSection, apiClient, buildEcomiqOAuthIdentityHeaders, cartService, collectionService, countryCurrency, customerOrderStatusTone, fetchStorefrontGeoDistricts, fetchStorefrontGeoProvinces, formatCurrency, formatCustomerOrderStatus, formatOrderDate, formatOrderDateTime, loadStorefrontGeoDepartments, pageService, productService, resolveIneiCodesFromLabels, storeService, toGeoItems } from './core.js';
|
|
3
|
-
import { P as ProductsFilters, a as StorefrontProductsParamsInput } from './collection-anMkdWa7.js';
|
|
4
|
-
export { b as Product, t as ProductSchema, c as ProductVariant, u as ProductVariantSchema, w as ProductsFiltersSchema, d as ProductsResponse, v as ProductsResponseSchema, l as StorefrontBundleItem, C as StorefrontBundleItemSchema, I as StorefrontCheckoutSettingsSchema, r as StorefrontCmsPage, q as StorefrontCmsSettings, m as StorefrontCollection, o as StorefrontCollectionDetail, F as StorefrontCollectionDetailSchema, D as StorefrontCollectionSchema, n as StorefrontCollectionsResponse, E as StorefrontCollectionsResponseSchema, k as StorefrontPriceTier, B as StorefrontPriceTierSchema, e as StorefrontProduct, g as StorefrontProductDetail, A as StorefrontProductDetailSchema, j as StorefrontProductImage, x as StorefrontProductSchema, z as StorefrontProductsParamsSchema, f as StorefrontProductsResponse, y as StorefrontProductsResponseSchema, S as StorefrontSettings, s as StorefrontSettingsLegacyFlat, J as StorefrontSettingsLegacyFlatSchema, G as StorefrontSettingsSchema, p as StorefrontStore, H as StorefrontStoreSchema, h as StorefrontVariant, i as StorefrontVariantOption, N as normalizeStorefrontSettingsPayload, L as storefrontFaviconUrl, M as storefrontOgImageUrl, K as storefrontStoreRecord } from './collection-anMkdWa7.js';
|
|
5
|
-
export { EcomiqConfig, EcomiqConfigSchema, clearEcomiqConfigCache, hasEcomiqSlugStoreConfig, loadEcomiqConfig, resolvePublicStoreKey } from './index.js';
|
|
6
|
-
import * as React from 'react';
|
|
7
|
-
import { ReactNode } from 'react';
|
|
8
|
-
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
9
|
-
import { DehydratedState } from '@tanstack/react-query';
|
|
10
|
-
export { E as EcomiqProvider, e as EcomiqProviderProps, g as EcomiqSignInCredentials, O as OptionGroup, P as ProductVariantSelector, j as ProductVariantSelectorProps, l as ProductVariantSelectorRenderProps, k as SelectedOptions, c as StorefrontAuthClientInstance, S as StorefrontAuthProvider, d as StorefrontSessionUser, h as findStorefrontCmsPageBySlug, f as signInWithEcomiqCredentials, s as storefrontAccessTokenNeedsRefresh, a as storefrontSessionEndsSoon, i as useStore, u as useStorefrontAuthClient, b as useStorefrontSession } from './find-storefront-cms-page-DNwLo1iV.js';
|
|
11
|
-
import * as zod from 'zod';
|
|
12
|
-
import { UseFormReturn } from 'react-hook-form';
|
|
13
|
-
import * as zustand_middleware from 'zustand/middleware';
|
|
14
|
-
import * as zustand from 'zustand';
|
|
15
|
-
import { BetterAuthPlugin } from 'better-auth';
|
|
16
|
-
import { BetterAuthClientPlugin } from 'better-auth/client';
|
|
17
|
-
import 'axios';
|
|
18
|
-
import 'better-auth/react';
|
|
19
|
-
import '@ecomiq/storefront/react';
|
|
20
|
-
|
|
21
|
-
interface QueryProviderProps {
|
|
22
|
-
children: ReactNode;
|
|
23
|
-
dehydratedState?: DehydratedState;
|
|
24
|
-
}
|
|
25
|
-
declare function QueryProvider({ children, dehydratedState }: QueryProviderProps): React.JSX.Element;
|
|
26
|
-
|
|
27
|
-
declare function useUser(): {};
|
|
28
|
-
|
|
29
|
-
declare function useConfig(): {};
|
|
30
|
-
|
|
31
|
-
declare const useProducts: (storeId?: string) => {
|
|
32
|
-
useProductsList: (filters?: ProductsFilters) => _tanstack_react_query.UseQueryResult<{
|
|
33
|
-
items: {
|
|
34
|
-
name: string;
|
|
35
|
-
id: string;
|
|
36
|
-
slug: string;
|
|
37
|
-
images: {
|
|
38
|
-
url: string;
|
|
39
|
-
name?: string | undefined;
|
|
40
|
-
isPrimary?: boolean | undefined;
|
|
41
|
-
}[];
|
|
42
|
-
description?: string | undefined;
|
|
43
|
-
basePrice?: number | undefined;
|
|
44
|
-
salePrice?: number | undefined;
|
|
45
|
-
categories?: {
|
|
46
|
-
name: string;
|
|
47
|
-
id: string;
|
|
48
|
-
slug: string;
|
|
49
|
-
logo?: string | undefined;
|
|
50
|
-
icon?: string | undefined;
|
|
51
|
-
}[] | undefined;
|
|
52
|
-
tags?: string[] | undefined;
|
|
53
|
-
inStock?: boolean | undefined;
|
|
54
|
-
variants?: {
|
|
55
|
-
name: string;
|
|
56
|
-
id: string;
|
|
57
|
-
storeId: string;
|
|
58
|
-
productId: string;
|
|
59
|
-
weight: number | null;
|
|
60
|
-
order: number | null;
|
|
61
|
-
status?: string | null | undefined;
|
|
62
|
-
updatedOn?: string | null | undefined;
|
|
63
|
-
createdOn?: string | null | undefined;
|
|
64
|
-
basePrice?: number | null | undefined;
|
|
65
|
-
comparePrice?: number | null | undefined;
|
|
66
|
-
originalPrice?: number | null | undefined;
|
|
67
|
-
costPrice?: number | null | undefined;
|
|
68
|
-
isDefault?: boolean | null | undefined;
|
|
69
|
-
reserveStock?: number | null | undefined;
|
|
70
|
-
width?: number | null | undefined;
|
|
71
|
-
height?: number | null | undefined;
|
|
72
|
-
unitOfMeasure?: string | null | undefined;
|
|
73
|
-
sku?: string | null | undefined;
|
|
74
|
-
stock?: number | null | undefined;
|
|
75
|
-
leadTime?: string | null | undefined;
|
|
76
|
-
barCode?: string | null | undefined;
|
|
77
|
-
shippingWeight?: number | null | undefined;
|
|
78
|
-
images?: string[] | null | undefined;
|
|
79
|
-
attributes?: string[] | null | undefined;
|
|
80
|
-
variantStatus?: string | null | undefined;
|
|
81
|
-
deletedOn?: string | null | undefined;
|
|
82
|
-
}[] | undefined;
|
|
83
|
-
}[];
|
|
84
|
-
meta: {
|
|
85
|
-
total: number;
|
|
86
|
-
page: number;
|
|
87
|
-
pageSize: number;
|
|
88
|
-
hasNextPage: boolean;
|
|
89
|
-
};
|
|
90
|
-
}, Error>;
|
|
91
|
-
useInfiniteProducts: (filters?: Omit<ProductsFilters, "page">) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<{
|
|
92
|
-
items: {
|
|
93
|
-
name: string;
|
|
94
|
-
id: string;
|
|
95
|
-
slug: string;
|
|
96
|
-
images: {
|
|
97
|
-
url: string;
|
|
98
|
-
name?: string | undefined;
|
|
99
|
-
isPrimary?: boolean | undefined;
|
|
100
|
-
}[];
|
|
101
|
-
description?: string | undefined;
|
|
102
|
-
basePrice?: number | undefined;
|
|
103
|
-
salePrice?: number | undefined;
|
|
104
|
-
categories?: {
|
|
105
|
-
name: string;
|
|
106
|
-
id: string;
|
|
107
|
-
slug: string;
|
|
108
|
-
logo?: string | undefined;
|
|
109
|
-
icon?: string | undefined;
|
|
110
|
-
}[] | undefined;
|
|
111
|
-
tags?: string[] | undefined;
|
|
112
|
-
inStock?: boolean | undefined;
|
|
113
|
-
variants?: {
|
|
114
|
-
name: string;
|
|
115
|
-
id: string;
|
|
116
|
-
storeId: string;
|
|
117
|
-
productId: string;
|
|
118
|
-
weight: number | null;
|
|
119
|
-
order: number | null;
|
|
120
|
-
status?: string | null | undefined;
|
|
121
|
-
updatedOn?: string | null | undefined;
|
|
122
|
-
createdOn?: string | null | undefined;
|
|
123
|
-
basePrice?: number | null | undefined;
|
|
124
|
-
comparePrice?: number | null | undefined;
|
|
125
|
-
originalPrice?: number | null | undefined;
|
|
126
|
-
costPrice?: number | null | undefined;
|
|
127
|
-
isDefault?: boolean | null | undefined;
|
|
128
|
-
reserveStock?: number | null | undefined;
|
|
129
|
-
width?: number | null | undefined;
|
|
130
|
-
height?: number | null | undefined;
|
|
131
|
-
unitOfMeasure?: string | null | undefined;
|
|
132
|
-
sku?: string | null | undefined;
|
|
133
|
-
stock?: number | null | undefined;
|
|
134
|
-
leadTime?: string | null | undefined;
|
|
135
|
-
barCode?: string | null | undefined;
|
|
136
|
-
shippingWeight?: number | null | undefined;
|
|
137
|
-
images?: string[] | null | undefined;
|
|
138
|
-
attributes?: string[] | null | undefined;
|
|
139
|
-
variantStatus?: string | null | undefined;
|
|
140
|
-
deletedOn?: string | null | undefined;
|
|
141
|
-
}[] | undefined;
|
|
142
|
-
}[];
|
|
143
|
-
meta: {
|
|
144
|
-
total: number;
|
|
145
|
-
page: number;
|
|
146
|
-
pageSize: number;
|
|
147
|
-
hasNextPage: boolean;
|
|
148
|
-
};
|
|
149
|
-
}, unknown>, Error>;
|
|
150
|
-
useProduct: (id: string) => _tanstack_react_query.UseQueryResult<{
|
|
151
|
-
name: string;
|
|
152
|
-
id: string;
|
|
153
|
-
slug: string;
|
|
154
|
-
images: {
|
|
155
|
-
url: string;
|
|
156
|
-
name?: string | undefined;
|
|
157
|
-
isPrimary?: boolean | undefined;
|
|
158
|
-
}[];
|
|
159
|
-
description?: string | undefined;
|
|
160
|
-
basePrice?: number | undefined;
|
|
161
|
-
salePrice?: number | undefined;
|
|
162
|
-
categories?: {
|
|
163
|
-
name: string;
|
|
164
|
-
id: string;
|
|
165
|
-
slug: string;
|
|
166
|
-
logo?: string | undefined;
|
|
167
|
-
icon?: string | undefined;
|
|
168
|
-
}[] | undefined;
|
|
169
|
-
tags?: string[] | undefined;
|
|
170
|
-
inStock?: boolean | undefined;
|
|
171
|
-
variants?: {
|
|
172
|
-
name: string;
|
|
173
|
-
id: string;
|
|
174
|
-
storeId: string;
|
|
175
|
-
productId: string;
|
|
176
|
-
weight: number | null;
|
|
177
|
-
order: number | null;
|
|
178
|
-
status?: string | null | undefined;
|
|
179
|
-
updatedOn?: string | null | undefined;
|
|
180
|
-
createdOn?: string | null | undefined;
|
|
181
|
-
basePrice?: number | null | undefined;
|
|
182
|
-
comparePrice?: number | null | undefined;
|
|
183
|
-
originalPrice?: number | null | undefined;
|
|
184
|
-
costPrice?: number | null | undefined;
|
|
185
|
-
isDefault?: boolean | null | undefined;
|
|
186
|
-
reserveStock?: number | null | undefined;
|
|
187
|
-
width?: number | null | undefined;
|
|
188
|
-
height?: number | null | undefined;
|
|
189
|
-
unitOfMeasure?: string | null | undefined;
|
|
190
|
-
sku?: string | null | undefined;
|
|
191
|
-
stock?: number | null | undefined;
|
|
192
|
-
leadTime?: string | null | undefined;
|
|
193
|
-
barCode?: string | null | undefined;
|
|
194
|
-
shippingWeight?: number | null | undefined;
|
|
195
|
-
images?: string[] | null | undefined;
|
|
196
|
-
attributes?: string[] | null | undefined;
|
|
197
|
-
variantStatus?: string | null | undefined;
|
|
198
|
-
deletedOn?: string | null | undefined;
|
|
199
|
-
}[] | undefined;
|
|
200
|
-
}, Error>;
|
|
201
|
-
useProductBySlug: (slug: string) => _tanstack_react_query.UseQueryResult<{
|
|
202
|
-
name: string;
|
|
203
|
-
id: string;
|
|
204
|
-
slug: string;
|
|
205
|
-
images: {
|
|
206
|
-
url: string;
|
|
207
|
-
name?: string | undefined;
|
|
208
|
-
isPrimary?: boolean | undefined;
|
|
209
|
-
}[];
|
|
210
|
-
description?: string | undefined;
|
|
211
|
-
basePrice?: number | undefined;
|
|
212
|
-
salePrice?: number | undefined;
|
|
213
|
-
categories?: {
|
|
214
|
-
name: string;
|
|
215
|
-
id: string;
|
|
216
|
-
slug: string;
|
|
217
|
-
logo?: string | undefined;
|
|
218
|
-
icon?: string | undefined;
|
|
219
|
-
}[] | undefined;
|
|
220
|
-
tags?: string[] | undefined;
|
|
221
|
-
inStock?: boolean | undefined;
|
|
222
|
-
variants?: {
|
|
223
|
-
name: string;
|
|
224
|
-
id: string;
|
|
225
|
-
storeId: string;
|
|
226
|
-
productId: string;
|
|
227
|
-
weight: number | null;
|
|
228
|
-
order: number | null;
|
|
229
|
-
status?: string | null | undefined;
|
|
230
|
-
updatedOn?: string | null | undefined;
|
|
231
|
-
createdOn?: string | null | undefined;
|
|
232
|
-
basePrice?: number | null | undefined;
|
|
233
|
-
comparePrice?: number | null | undefined;
|
|
234
|
-
originalPrice?: number | null | undefined;
|
|
235
|
-
costPrice?: number | null | undefined;
|
|
236
|
-
isDefault?: boolean | null | undefined;
|
|
237
|
-
reserveStock?: number | null | undefined;
|
|
238
|
-
width?: number | null | undefined;
|
|
239
|
-
height?: number | null | undefined;
|
|
240
|
-
unitOfMeasure?: string | null | undefined;
|
|
241
|
-
sku?: string | null | undefined;
|
|
242
|
-
stock?: number | null | undefined;
|
|
243
|
-
leadTime?: string | null | undefined;
|
|
244
|
-
barCode?: string | null | undefined;
|
|
245
|
-
shippingWeight?: number | null | undefined;
|
|
246
|
-
images?: string[] | null | undefined;
|
|
247
|
-
attributes?: string[] | null | undefined;
|
|
248
|
-
variantStatus?: string | null | undefined;
|
|
249
|
-
deletedOn?: string | null | undefined;
|
|
250
|
-
}[] | undefined;
|
|
251
|
-
}, Error>;
|
|
252
|
-
useSearchProducts: (query: string, filters?: Omit<ProductsFilters, "search">) => _tanstack_react_query.UseQueryResult<{
|
|
253
|
-
items: {
|
|
254
|
-
name: string;
|
|
255
|
-
id: string;
|
|
256
|
-
slug: string;
|
|
257
|
-
images: {
|
|
258
|
-
url: string;
|
|
259
|
-
name?: string | undefined;
|
|
260
|
-
isPrimary?: boolean | undefined;
|
|
261
|
-
}[];
|
|
262
|
-
description?: string | undefined;
|
|
263
|
-
basePrice?: number | undefined;
|
|
264
|
-
salePrice?: number | undefined;
|
|
265
|
-
categories?: {
|
|
266
|
-
name: string;
|
|
267
|
-
id: string;
|
|
268
|
-
slug: string;
|
|
269
|
-
logo?: string | undefined;
|
|
270
|
-
icon?: string | undefined;
|
|
271
|
-
}[] | undefined;
|
|
272
|
-
tags?: string[] | undefined;
|
|
273
|
-
inStock?: boolean | undefined;
|
|
274
|
-
variants?: {
|
|
275
|
-
name: string;
|
|
276
|
-
id: string;
|
|
277
|
-
storeId: string;
|
|
278
|
-
productId: string;
|
|
279
|
-
weight: number | null;
|
|
280
|
-
order: number | null;
|
|
281
|
-
status?: string | null | undefined;
|
|
282
|
-
updatedOn?: string | null | undefined;
|
|
283
|
-
createdOn?: string | null | undefined;
|
|
284
|
-
basePrice?: number | null | undefined;
|
|
285
|
-
comparePrice?: number | null | undefined;
|
|
286
|
-
originalPrice?: number | null | undefined;
|
|
287
|
-
costPrice?: number | null | undefined;
|
|
288
|
-
isDefault?: boolean | null | undefined;
|
|
289
|
-
reserveStock?: number | null | undefined;
|
|
290
|
-
width?: number | null | undefined;
|
|
291
|
-
height?: number | null | undefined;
|
|
292
|
-
unitOfMeasure?: string | null | undefined;
|
|
293
|
-
sku?: string | null | undefined;
|
|
294
|
-
stock?: number | null | undefined;
|
|
295
|
-
leadTime?: string | null | undefined;
|
|
296
|
-
barCode?: string | null | undefined;
|
|
297
|
-
shippingWeight?: number | null | undefined;
|
|
298
|
-
images?: string[] | null | undefined;
|
|
299
|
-
attributes?: string[] | null | undefined;
|
|
300
|
-
variantStatus?: string | null | undefined;
|
|
301
|
-
deletedOn?: string | null | undefined;
|
|
302
|
-
}[] | undefined;
|
|
303
|
-
}[];
|
|
304
|
-
meta: {
|
|
305
|
-
total: number;
|
|
306
|
-
page: number;
|
|
307
|
-
pageSize: number;
|
|
308
|
-
hasNextPage: boolean;
|
|
309
|
-
};
|
|
310
|
-
}, Error>;
|
|
311
|
-
useProductsByCategory: (category: string, filters?: Omit<ProductsFilters, "category">) => _tanstack_react_query.UseQueryResult<{
|
|
312
|
-
items: {
|
|
313
|
-
name: string;
|
|
314
|
-
id: string;
|
|
315
|
-
slug: string;
|
|
316
|
-
images: {
|
|
317
|
-
url: string;
|
|
318
|
-
name?: string | undefined;
|
|
319
|
-
isPrimary?: boolean | undefined;
|
|
320
|
-
}[];
|
|
321
|
-
description?: string | undefined;
|
|
322
|
-
basePrice?: number | undefined;
|
|
323
|
-
salePrice?: number | undefined;
|
|
324
|
-
categories?: {
|
|
325
|
-
name: string;
|
|
326
|
-
id: string;
|
|
327
|
-
slug: string;
|
|
328
|
-
logo?: string | undefined;
|
|
329
|
-
icon?: string | undefined;
|
|
330
|
-
}[] | undefined;
|
|
331
|
-
tags?: string[] | undefined;
|
|
332
|
-
inStock?: boolean | undefined;
|
|
333
|
-
variants?: {
|
|
334
|
-
name: string;
|
|
335
|
-
id: string;
|
|
336
|
-
storeId: string;
|
|
337
|
-
productId: string;
|
|
338
|
-
weight: number | null;
|
|
339
|
-
order: number | null;
|
|
340
|
-
status?: string | null | undefined;
|
|
341
|
-
updatedOn?: string | null | undefined;
|
|
342
|
-
createdOn?: string | null | undefined;
|
|
343
|
-
basePrice?: number | null | undefined;
|
|
344
|
-
comparePrice?: number | null | undefined;
|
|
345
|
-
originalPrice?: number | null | undefined;
|
|
346
|
-
costPrice?: number | null | undefined;
|
|
347
|
-
isDefault?: boolean | null | undefined;
|
|
348
|
-
reserveStock?: number | null | undefined;
|
|
349
|
-
width?: number | null | undefined;
|
|
350
|
-
height?: number | null | undefined;
|
|
351
|
-
unitOfMeasure?: string | null | undefined;
|
|
352
|
-
sku?: string | null | undefined;
|
|
353
|
-
stock?: number | null | undefined;
|
|
354
|
-
leadTime?: string | null | undefined;
|
|
355
|
-
barCode?: string | null | undefined;
|
|
356
|
-
shippingWeight?: number | null | undefined;
|
|
357
|
-
images?: string[] | null | undefined;
|
|
358
|
-
attributes?: string[] | null | undefined;
|
|
359
|
-
variantStatus?: string | null | undefined;
|
|
360
|
-
deletedOn?: string | null | undefined;
|
|
361
|
-
}[] | undefined;
|
|
362
|
-
}[];
|
|
363
|
-
meta: {
|
|
364
|
-
total: number;
|
|
365
|
-
page: number;
|
|
366
|
-
pageSize: number;
|
|
367
|
-
hasNextPage: boolean;
|
|
368
|
-
};
|
|
369
|
-
}, Error>;
|
|
370
|
-
useProductsOnSale: (filters?: Omit<ProductsFilters, "minPrice" | "maxPrice">) => _tanstack_react_query.UseQueryResult<{
|
|
371
|
-
items: {
|
|
372
|
-
name: string;
|
|
373
|
-
id: string;
|
|
374
|
-
slug: string;
|
|
375
|
-
images: {
|
|
376
|
-
url: string;
|
|
377
|
-
name?: string | undefined;
|
|
378
|
-
isPrimary?: boolean | undefined;
|
|
379
|
-
}[];
|
|
380
|
-
description?: string | undefined;
|
|
381
|
-
basePrice?: number | undefined;
|
|
382
|
-
salePrice?: number | undefined;
|
|
383
|
-
categories?: {
|
|
384
|
-
name: string;
|
|
385
|
-
id: string;
|
|
386
|
-
slug: string;
|
|
387
|
-
logo?: string | undefined;
|
|
388
|
-
icon?: string | undefined;
|
|
389
|
-
}[] | undefined;
|
|
390
|
-
tags?: string[] | undefined;
|
|
391
|
-
inStock?: boolean | undefined;
|
|
392
|
-
variants?: {
|
|
393
|
-
name: string;
|
|
394
|
-
id: string;
|
|
395
|
-
storeId: string;
|
|
396
|
-
productId: string;
|
|
397
|
-
weight: number | null;
|
|
398
|
-
order: number | null;
|
|
399
|
-
status?: string | null | undefined;
|
|
400
|
-
updatedOn?: string | null | undefined;
|
|
401
|
-
createdOn?: string | null | undefined;
|
|
402
|
-
basePrice?: number | null | undefined;
|
|
403
|
-
comparePrice?: number | null | undefined;
|
|
404
|
-
originalPrice?: number | null | undefined;
|
|
405
|
-
costPrice?: number | null | undefined;
|
|
406
|
-
isDefault?: boolean | null | undefined;
|
|
407
|
-
reserveStock?: number | null | undefined;
|
|
408
|
-
width?: number | null | undefined;
|
|
409
|
-
height?: number | null | undefined;
|
|
410
|
-
unitOfMeasure?: string | null | undefined;
|
|
411
|
-
sku?: string | null | undefined;
|
|
412
|
-
stock?: number | null | undefined;
|
|
413
|
-
leadTime?: string | null | undefined;
|
|
414
|
-
barCode?: string | null | undefined;
|
|
415
|
-
shippingWeight?: number | null | undefined;
|
|
416
|
-
images?: string[] | null | undefined;
|
|
417
|
-
attributes?: string[] | null | undefined;
|
|
418
|
-
variantStatus?: string | null | undefined;
|
|
419
|
-
deletedOn?: string | null | undefined;
|
|
420
|
-
}[] | undefined;
|
|
421
|
-
}[];
|
|
422
|
-
meta: {
|
|
423
|
-
total: number;
|
|
424
|
-
page: number;
|
|
425
|
-
pageSize: number;
|
|
426
|
-
hasNextPage: boolean;
|
|
427
|
-
};
|
|
428
|
-
}, Error>;
|
|
429
|
-
useProductsInStock: (filters?: Omit<ProductsFilters, "inStock">) => _tanstack_react_query.UseQueryResult<{
|
|
430
|
-
items: {
|
|
431
|
-
name: string;
|
|
432
|
-
id: string;
|
|
433
|
-
slug: string;
|
|
434
|
-
images: {
|
|
435
|
-
url: string;
|
|
436
|
-
name?: string | undefined;
|
|
437
|
-
isPrimary?: boolean | undefined;
|
|
438
|
-
}[];
|
|
439
|
-
description?: string | undefined;
|
|
440
|
-
basePrice?: number | undefined;
|
|
441
|
-
salePrice?: number | undefined;
|
|
442
|
-
categories?: {
|
|
443
|
-
name: string;
|
|
444
|
-
id: string;
|
|
445
|
-
slug: string;
|
|
446
|
-
logo?: string | undefined;
|
|
447
|
-
icon?: string | undefined;
|
|
448
|
-
}[] | undefined;
|
|
449
|
-
tags?: string[] | undefined;
|
|
450
|
-
inStock?: boolean | undefined;
|
|
451
|
-
variants?: {
|
|
452
|
-
name: string;
|
|
453
|
-
id: string;
|
|
454
|
-
storeId: string;
|
|
455
|
-
productId: string;
|
|
456
|
-
weight: number | null;
|
|
457
|
-
order: number | null;
|
|
458
|
-
status?: string | null | undefined;
|
|
459
|
-
updatedOn?: string | null | undefined;
|
|
460
|
-
createdOn?: string | null | undefined;
|
|
461
|
-
basePrice?: number | null | undefined;
|
|
462
|
-
comparePrice?: number | null | undefined;
|
|
463
|
-
originalPrice?: number | null | undefined;
|
|
464
|
-
costPrice?: number | null | undefined;
|
|
465
|
-
isDefault?: boolean | null | undefined;
|
|
466
|
-
reserveStock?: number | null | undefined;
|
|
467
|
-
width?: number | null | undefined;
|
|
468
|
-
height?: number | null | undefined;
|
|
469
|
-
unitOfMeasure?: string | null | undefined;
|
|
470
|
-
sku?: string | null | undefined;
|
|
471
|
-
stock?: number | null | undefined;
|
|
472
|
-
leadTime?: string | null | undefined;
|
|
473
|
-
barCode?: string | null | undefined;
|
|
474
|
-
shippingWeight?: number | null | undefined;
|
|
475
|
-
images?: string[] | null | undefined;
|
|
476
|
-
attributes?: string[] | null | undefined;
|
|
477
|
-
variantStatus?: string | null | undefined;
|
|
478
|
-
deletedOn?: string | null | undefined;
|
|
479
|
-
}[] | undefined;
|
|
480
|
-
}[];
|
|
481
|
-
meta: {
|
|
482
|
-
total: number;
|
|
483
|
-
page: number;
|
|
484
|
-
pageSize: number;
|
|
485
|
-
hasNextPage: boolean;
|
|
486
|
-
};
|
|
487
|
-
}, Error>;
|
|
488
|
-
useRefreshProducts: () => _tanstack_react_query.UseMutationResult<unknown, Error, void, unknown>;
|
|
489
|
-
useStorefrontProductsList: (params?: StorefrontProductsParamsInput) => _tanstack_react_query.UseQueryResult<{
|
|
490
|
-
categories: {
|
|
491
|
-
value: string;
|
|
492
|
-
count: number;
|
|
493
|
-
}[];
|
|
494
|
-
pageSize: number;
|
|
495
|
-
pageIndex: number;
|
|
496
|
-
totalCount: number;
|
|
497
|
-
totalPages: number;
|
|
498
|
-
products: {
|
|
499
|
-
name: string;
|
|
500
|
-
id: string;
|
|
501
|
-
slug: string;
|
|
502
|
-
price: number;
|
|
503
|
-
variantCount: number;
|
|
504
|
-
isAvailable: boolean;
|
|
505
|
-
totalInventory: number;
|
|
506
|
-
bundleItemsCount: number;
|
|
507
|
-
status?: string | null | undefined;
|
|
508
|
-
tags?: string[] | null | undefined;
|
|
509
|
-
category?: string | null | undefined;
|
|
510
|
-
productType?: string | null | undefined;
|
|
511
|
-
imageUrl?: string | null | undefined;
|
|
512
|
-
compareAtPrice?: number | null | undefined;
|
|
513
|
-
brand?: string | null | undefined;
|
|
514
|
-
}[];
|
|
515
|
-
brands: {
|
|
516
|
-
value: string;
|
|
517
|
-
count: number;
|
|
518
|
-
}[];
|
|
519
|
-
minPrice?: number | null | undefined;
|
|
520
|
-
maxPrice?: number | null | undefined;
|
|
521
|
-
}, Error>;
|
|
522
|
-
useStorefrontInfiniteProducts: (params?: Omit<StorefrontProductsParamsInput, "page">) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<{
|
|
523
|
-
categories: {
|
|
524
|
-
value: string;
|
|
525
|
-
count: number;
|
|
526
|
-
}[];
|
|
527
|
-
pageSize: number;
|
|
528
|
-
pageIndex: number;
|
|
529
|
-
totalCount: number;
|
|
530
|
-
totalPages: number;
|
|
531
|
-
products: {
|
|
532
|
-
name: string;
|
|
533
|
-
id: string;
|
|
534
|
-
slug: string;
|
|
535
|
-
price: number;
|
|
536
|
-
variantCount: number;
|
|
537
|
-
isAvailable: boolean;
|
|
538
|
-
totalInventory: number;
|
|
539
|
-
bundleItemsCount: number;
|
|
540
|
-
status?: string | null | undefined;
|
|
541
|
-
tags?: string[] | null | undefined;
|
|
542
|
-
category?: string | null | undefined;
|
|
543
|
-
productType?: string | null | undefined;
|
|
544
|
-
imageUrl?: string | null | undefined;
|
|
545
|
-
compareAtPrice?: number | null | undefined;
|
|
546
|
-
brand?: string | null | undefined;
|
|
547
|
-
}[];
|
|
548
|
-
brands: {
|
|
549
|
-
value: string;
|
|
550
|
-
count: number;
|
|
551
|
-
}[];
|
|
552
|
-
minPrice?: number | null | undefined;
|
|
553
|
-
maxPrice?: number | null | undefined;
|
|
554
|
-
}, unknown>, Error>;
|
|
555
|
-
useRefreshStorefrontProducts: () => _tanstack_react_query.UseMutationResult<{
|
|
556
|
-
categories: {
|
|
557
|
-
value: string;
|
|
558
|
-
count: number;
|
|
559
|
-
}[];
|
|
560
|
-
pageSize: number;
|
|
561
|
-
pageIndex: number;
|
|
562
|
-
totalCount: number;
|
|
563
|
-
totalPages: number;
|
|
564
|
-
products: {
|
|
565
|
-
name: string;
|
|
566
|
-
id: string;
|
|
567
|
-
slug: string;
|
|
568
|
-
price: number;
|
|
569
|
-
variantCount: number;
|
|
570
|
-
isAvailable: boolean;
|
|
571
|
-
totalInventory: number;
|
|
572
|
-
bundleItemsCount: number;
|
|
573
|
-
status?: string | null | undefined;
|
|
574
|
-
tags?: string[] | null | undefined;
|
|
575
|
-
category?: string | null | undefined;
|
|
576
|
-
productType?: string | null | undefined;
|
|
577
|
-
imageUrl?: string | null | undefined;
|
|
578
|
-
compareAtPrice?: number | null | undefined;
|
|
579
|
-
brand?: string | null | undefined;
|
|
580
|
-
}[];
|
|
581
|
-
brands: {
|
|
582
|
-
value: string;
|
|
583
|
-
count: number;
|
|
584
|
-
}[];
|
|
585
|
-
minPrice?: number | null | undefined;
|
|
586
|
-
maxPrice?: number | null | undefined;
|
|
587
|
-
}, Error, {
|
|
588
|
-
sort?: "price_asc" | "price_desc" | "name_asc" | "name_desc" | "newest" | undefined;
|
|
589
|
-
sellerId?: string | undefined;
|
|
590
|
-
inStock?: boolean | undefined;
|
|
591
|
-
page?: number | undefined;
|
|
592
|
-
pageSize?: number | undefined;
|
|
593
|
-
category?: string | undefined;
|
|
594
|
-
search?: string | undefined;
|
|
595
|
-
minPrice?: number | undefined;
|
|
596
|
-
maxPrice?: number | undefined;
|
|
597
|
-
productType?: string | undefined;
|
|
598
|
-
brand?: string | undefined;
|
|
599
|
-
collection?: string | undefined;
|
|
600
|
-
} | undefined, unknown>;
|
|
601
|
-
};
|
|
602
|
-
|
|
603
|
-
declare const useCollections: (storeId?: string) => {
|
|
604
|
-
useStorefrontCollectionsList: () => _tanstack_react_query.UseQueryResult<{
|
|
605
|
-
type: string;
|
|
606
|
-
name: string;
|
|
607
|
-
id: string;
|
|
608
|
-
slug: string;
|
|
609
|
-
productCount: number;
|
|
610
|
-
description?: string | null | undefined;
|
|
611
|
-
imageUrl?: string | null | undefined;
|
|
612
|
-
}[], Error>;
|
|
613
|
-
useStorefrontCollectionBySlug: (slug: string) => _tanstack_react_query.UseQueryResult<{
|
|
614
|
-
type: string;
|
|
615
|
-
name: string;
|
|
616
|
-
id: string;
|
|
617
|
-
slug: string;
|
|
618
|
-
productCount: number;
|
|
619
|
-
description?: string | null | undefined;
|
|
620
|
-
imageUrl?: string | null | undefined;
|
|
621
|
-
}, Error>;
|
|
622
|
-
useRefreshStorefrontCollections: () => _tanstack_react_query.UseMutationResult<{
|
|
623
|
-
type: string;
|
|
624
|
-
name: string;
|
|
625
|
-
id: string;
|
|
626
|
-
slug: string;
|
|
627
|
-
productCount: number;
|
|
628
|
-
description?: string | null | undefined;
|
|
629
|
-
imageUrl?: string | null | undefined;
|
|
630
|
-
}[], Error, void, unknown>;
|
|
631
|
-
};
|
|
632
|
-
|
|
633
|
-
declare const usePages: (storeId?: string) => {
|
|
634
|
-
usePagesList: () => _tanstack_react_query.UseQueryResult<{
|
|
635
|
-
name: string;
|
|
636
|
-
id: string;
|
|
637
|
-
slug: string;
|
|
638
|
-
layout: string;
|
|
639
|
-
}[], Error>;
|
|
640
|
-
usePageBySlug: (slug: string) => _tanstack_react_query.UseQueryResult<{
|
|
641
|
-
name: string;
|
|
642
|
-
id: string;
|
|
643
|
-
slug: string;
|
|
644
|
-
layout: string;
|
|
645
|
-
settings?: zod.objectOutputType<{
|
|
646
|
-
seo: zod.ZodOptional<zod.ZodObject<{
|
|
647
|
-
title: zod.ZodOptional<zod.ZodString>;
|
|
648
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
649
|
-
}, "strip", zod.ZodTypeAny, {
|
|
650
|
-
description?: string | undefined;
|
|
651
|
-
title?: string | undefined;
|
|
652
|
-
}, {
|
|
653
|
-
description?: string | undefined;
|
|
654
|
-
title?: string | undefined;
|
|
655
|
-
}>>;
|
|
656
|
-
html: zod.ZodOptional<zod.ZodString>;
|
|
657
|
-
title: zod.ZodOptional<zod.ZodString>;
|
|
658
|
-
}, zod.ZodUnknown, "strip"> | undefined;
|
|
659
|
-
sections?: {
|
|
660
|
-
type: string;
|
|
661
|
-
id: string;
|
|
662
|
-
order: number;
|
|
663
|
-
blocks: {
|
|
664
|
-
type: string;
|
|
665
|
-
id: string;
|
|
666
|
-
order: number;
|
|
667
|
-
settings?: Record<string, unknown> | undefined;
|
|
668
|
-
}[];
|
|
669
|
-
settings?: Record<string, unknown> | undefined;
|
|
670
|
-
}[] | undefined;
|
|
671
|
-
}, Error>;
|
|
672
|
-
useRefreshPages: () => _tanstack_react_query.UseMutationResult<{
|
|
673
|
-
name: string;
|
|
674
|
-
id: string;
|
|
675
|
-
slug: string;
|
|
676
|
-
layout: string;
|
|
677
|
-
}[], Error, void, unknown>;
|
|
678
|
-
};
|
|
679
|
-
|
|
680
|
-
declare const useCartAddresses: () => _tanstack_react_query.UseMutationResult<{
|
|
681
|
-
id: string;
|
|
682
|
-
items: {
|
|
683
|
-
id: string;
|
|
684
|
-
quantity: number;
|
|
685
|
-
variantId: string;
|
|
686
|
-
unitPrice: number;
|
|
687
|
-
bundleItems: {
|
|
688
|
-
productId: string;
|
|
689
|
-
quantity: number;
|
|
690
|
-
variantId: string;
|
|
691
|
-
productName: string;
|
|
692
|
-
sku?: string | null | undefined;
|
|
693
|
-
imageUrl?: string | null | undefined;
|
|
694
|
-
brand?: string | null | undefined;
|
|
695
|
-
variantName?: string | null | undefined;
|
|
696
|
-
}[];
|
|
697
|
-
title: string;
|
|
698
|
-
variantLabel?: string | null | undefined;
|
|
699
|
-
thumbnail?: string | null | undefined;
|
|
700
|
-
variantSku?: string | null | undefined;
|
|
701
|
-
}[];
|
|
702
|
-
currencyCode: string;
|
|
703
|
-
metadata: Record<string, unknown>;
|
|
704
|
-
promotionCodes: string[];
|
|
705
|
-
shippingMethods: unknown[];
|
|
706
|
-
totals: {
|
|
707
|
-
total: number;
|
|
708
|
-
subtotal: number;
|
|
709
|
-
discountTotal: number;
|
|
710
|
-
shippingTotal: number;
|
|
711
|
-
taxTotal: number;
|
|
712
|
-
warrantyTotal: number;
|
|
713
|
-
};
|
|
714
|
-
phone?: string | null | undefined;
|
|
715
|
-
email?: string | null | undefined;
|
|
716
|
-
firstName?: string | null | undefined;
|
|
717
|
-
lastName?: string | null | undefined;
|
|
718
|
-
salesChannelId?: string | null | undefined;
|
|
719
|
-
shippingAddress?: unknown;
|
|
720
|
-
billingAddress?: unknown;
|
|
721
|
-
regionId?: string | null | undefined;
|
|
722
|
-
completedAt?: string | null | undefined;
|
|
723
|
-
}, Error, {
|
|
724
|
-
shippingAddress: {
|
|
725
|
-
name: string;
|
|
726
|
-
address1: string;
|
|
727
|
-
city: string;
|
|
728
|
-
countryCode: string;
|
|
729
|
-
phone?: string | null | undefined;
|
|
730
|
-
company?: string | null | undefined;
|
|
731
|
-
address2?: string | null | undefined;
|
|
732
|
-
province?: string | null | undefined;
|
|
733
|
-
postalCode?: string | null | undefined;
|
|
734
|
-
district?: string | null | undefined;
|
|
735
|
-
latitude?: number | null | undefined;
|
|
736
|
-
longitude?: number | null | undefined;
|
|
737
|
-
geo?: {
|
|
738
|
-
departmentCode?: string | null | undefined;
|
|
739
|
-
provinceCode?: string | null | undefined;
|
|
740
|
-
districtCode?: string | null | undefined;
|
|
741
|
-
} | null | undefined;
|
|
742
|
-
};
|
|
743
|
-
billingAddress: {
|
|
744
|
-
name: string;
|
|
745
|
-
address1: string;
|
|
746
|
-
city: string;
|
|
747
|
-
countryCode: string;
|
|
748
|
-
phone?: string | null | undefined;
|
|
749
|
-
company?: string | null | undefined;
|
|
750
|
-
address2?: string | null | undefined;
|
|
751
|
-
province?: string | null | undefined;
|
|
752
|
-
postalCode?: string | null | undefined;
|
|
753
|
-
district?: string | null | undefined;
|
|
754
|
-
latitude?: number | null | undefined;
|
|
755
|
-
longitude?: number | null | undefined;
|
|
756
|
-
geo?: {
|
|
757
|
-
departmentCode?: string | null | undefined;
|
|
758
|
-
provinceCode?: string | null | undefined;
|
|
759
|
-
districtCode?: string | null | undefined;
|
|
760
|
-
} | null | undefined;
|
|
761
|
-
};
|
|
762
|
-
}, unknown>;
|
|
763
|
-
|
|
764
|
-
declare const useCartGet: () => _tanstack_react_query.UseQueryResult<{
|
|
765
|
-
id: string;
|
|
766
|
-
items: {
|
|
767
|
-
id: string;
|
|
768
|
-
quantity: number;
|
|
769
|
-
variantId: string;
|
|
770
|
-
unitPrice: number;
|
|
771
|
-
bundleItems: {
|
|
772
|
-
productId: string;
|
|
773
|
-
quantity: number;
|
|
774
|
-
variantId: string;
|
|
775
|
-
productName: string;
|
|
776
|
-
sku?: string | null | undefined;
|
|
777
|
-
imageUrl?: string | null | undefined;
|
|
778
|
-
brand?: string | null | undefined;
|
|
779
|
-
variantName?: string | null | undefined;
|
|
780
|
-
}[];
|
|
781
|
-
title: string;
|
|
782
|
-
variantLabel?: string | null | undefined;
|
|
783
|
-
thumbnail?: string | null | undefined;
|
|
784
|
-
variantSku?: string | null | undefined;
|
|
785
|
-
}[];
|
|
786
|
-
currencyCode: string;
|
|
787
|
-
metadata: Record<string, unknown>;
|
|
788
|
-
promotionCodes: string[];
|
|
789
|
-
shippingMethods: unknown[];
|
|
790
|
-
totals: {
|
|
791
|
-
total: number;
|
|
792
|
-
subtotal: number;
|
|
793
|
-
discountTotal: number;
|
|
794
|
-
shippingTotal: number;
|
|
795
|
-
taxTotal: number;
|
|
796
|
-
warrantyTotal: number;
|
|
797
|
-
};
|
|
798
|
-
phone?: string | null | undefined;
|
|
799
|
-
email?: string | null | undefined;
|
|
800
|
-
firstName?: string | null | undefined;
|
|
801
|
-
lastName?: string | null | undefined;
|
|
802
|
-
salesChannelId?: string | null | undefined;
|
|
803
|
-
shippingAddress?: unknown;
|
|
804
|
-
billingAddress?: unknown;
|
|
805
|
-
regionId?: string | null | undefined;
|
|
806
|
-
completedAt?: string | null | undefined;
|
|
807
|
-
}, Error>;
|
|
808
|
-
|
|
809
|
-
declare const useCartCreate: () => _tanstack_react_query.UseMutationResult<{
|
|
810
|
-
id: string;
|
|
811
|
-
items: {
|
|
812
|
-
id: string;
|
|
813
|
-
quantity: number;
|
|
814
|
-
variantId: string;
|
|
815
|
-
unitPrice: number;
|
|
816
|
-
bundleItems: {
|
|
817
|
-
productId: string;
|
|
818
|
-
quantity: number;
|
|
819
|
-
variantId: string;
|
|
820
|
-
productName: string;
|
|
821
|
-
sku?: string | null | undefined;
|
|
822
|
-
imageUrl?: string | null | undefined;
|
|
823
|
-
brand?: string | null | undefined;
|
|
824
|
-
variantName?: string | null | undefined;
|
|
825
|
-
}[];
|
|
826
|
-
title: string;
|
|
827
|
-
variantLabel?: string | null | undefined;
|
|
828
|
-
thumbnail?: string | null | undefined;
|
|
829
|
-
variantSku?: string | null | undefined;
|
|
830
|
-
}[];
|
|
831
|
-
currencyCode: string;
|
|
832
|
-
metadata: Record<string, unknown>;
|
|
833
|
-
promotionCodes: string[];
|
|
834
|
-
shippingMethods: unknown[];
|
|
835
|
-
totals: {
|
|
836
|
-
total: number;
|
|
837
|
-
subtotal: number;
|
|
838
|
-
discountTotal: number;
|
|
839
|
-
shippingTotal: number;
|
|
840
|
-
taxTotal: number;
|
|
841
|
-
warrantyTotal: number;
|
|
842
|
-
};
|
|
843
|
-
phone?: string | null | undefined;
|
|
844
|
-
email?: string | null | undefined;
|
|
845
|
-
firstName?: string | null | undefined;
|
|
846
|
-
lastName?: string | null | undefined;
|
|
847
|
-
salesChannelId?: string | null | undefined;
|
|
848
|
-
shippingAddress?: unknown;
|
|
849
|
-
billingAddress?: unknown;
|
|
850
|
-
regionId?: string | null | undefined;
|
|
851
|
-
completedAt?: string | null | undefined;
|
|
852
|
-
}, Error, {
|
|
853
|
-
email: string;
|
|
854
|
-
currencyCode: string;
|
|
855
|
-
salesChannelId: string;
|
|
856
|
-
}, unknown>;
|
|
857
|
-
|
|
858
|
-
/** Campos mínimos que el hook sincroniza (checkout y direcciones de cuenta). */
|
|
859
|
-
type GeoIneiFormFields = {
|
|
860
|
-
countryCode: string;
|
|
861
|
-
departmentCode: string;
|
|
862
|
-
departmentName: string;
|
|
863
|
-
provinceCode: string;
|
|
864
|
-
provinceName: string;
|
|
865
|
-
districtCode: string;
|
|
866
|
-
districtName: string;
|
|
867
|
-
};
|
|
868
|
-
declare function useStorefrontGeoInei<T extends GeoIneiFormFields>(storeId: string, form: Pick<UseFormReturn<T>, "watch" | "setValue">): {
|
|
869
|
-
departments: GeoItem[];
|
|
870
|
-
provinces: GeoItem[];
|
|
871
|
-
districts: GeoItem[];
|
|
872
|
-
loadingDepartments: boolean;
|
|
873
|
-
loadingProvinces: boolean;
|
|
874
|
-
loadingDistricts: boolean;
|
|
875
|
-
departmentCode: string;
|
|
876
|
-
provinceCode: string;
|
|
877
|
-
districtCode: string;
|
|
878
|
-
selectedDepartment: GeoItem | undefined;
|
|
879
|
-
selectedProvince: GeoItem | undefined;
|
|
880
|
-
selectedDistrict: GeoItem | undefined;
|
|
881
|
-
storeRequestHeaders: {
|
|
882
|
-
readonly "X-Store-Id": string;
|
|
883
|
-
} | null;
|
|
884
|
-
};
|
|
885
|
-
|
|
886
|
-
type CartItemVariant = {
|
|
887
|
-
/** Identifier of the selected variant (if any) */
|
|
888
|
-
variantId?: string;
|
|
889
|
-
/** Optional SKU of the variant */
|
|
890
|
-
variantSku?: string;
|
|
891
|
-
/** Human readable label for the variant (e.g. "Color: Black • Size: M") */
|
|
892
|
-
variantLabel?: string;
|
|
893
|
-
};
|
|
894
|
-
type CartItem = CartItemVariant & {
|
|
895
|
-
id: string;
|
|
896
|
-
title: string;
|
|
897
|
-
image: string;
|
|
898
|
-
/** Backwards‑compatible size field; usually covered by variantLabel */
|
|
899
|
-
size: string;
|
|
900
|
-
price: number;
|
|
901
|
-
quantity: number;
|
|
902
|
-
};
|
|
903
|
-
type CheckoutStep = 'customer' | 'shipping' | 'shippingOptions' | 'payment';
|
|
904
|
-
type CheckoutCustomerLocal = {
|
|
905
|
-
email: string;
|
|
906
|
-
firstName: string;
|
|
907
|
-
lastName: string;
|
|
908
|
-
phone: string;
|
|
909
|
-
};
|
|
910
|
-
type CartState = {
|
|
911
|
-
count: number;
|
|
912
|
-
cart: CartItem[];
|
|
913
|
-
/** Token/id del carrito en backend (ownerId) */
|
|
914
|
-
cartTokenId: string | null;
|
|
915
|
-
setCartTokenId: (token: string | null) => void;
|
|
916
|
-
checkoutStep: CheckoutStep | null;
|
|
917
|
-
setCheckoutStep: (step: CheckoutStep | null) => void;
|
|
918
|
-
/**
|
|
919
|
-
* Customer guardado localmente para poder recrear el carrito si el backend
|
|
920
|
-
* devuelve 404 por token inválido.
|
|
921
|
-
*/
|
|
922
|
-
checkoutCustomerLocal: {
|
|
923
|
-
cartTokenId: string;
|
|
924
|
-
customer: CheckoutCustomerLocal;
|
|
925
|
-
} | null;
|
|
926
|
-
setCheckoutCustomerLocal: (customer: CheckoutCustomerLocal) => void;
|
|
927
|
-
clearCheckoutCustomerLocal: () => void;
|
|
928
|
-
addCart: (item: CartItem) => void;
|
|
929
|
-
removeCart: (id: string) => void;
|
|
930
|
-
/** Carrito/token inválido en servidor (ej. eliminado): limpia estado local y checkout. */
|
|
931
|
-
clearCartSession: () => void;
|
|
932
|
-
};
|
|
933
|
-
declare const useCart: zustand.UseBoundStore<Omit<zustand.StoreApi<CartState>, "setState" | "persist"> & {
|
|
934
|
-
setState(partial: CartState | Partial<CartState> | ((state: CartState) => CartState | Partial<CartState>), replace?: false | undefined): unknown;
|
|
935
|
-
setState(state: CartState | ((state: CartState) => CartState), replace: true): unknown;
|
|
936
|
-
persist: {
|
|
937
|
-
setOptions: (options: Partial<zustand_middleware.PersistOptions<CartState, CartState, unknown>>) => void;
|
|
938
|
-
clearStorage: () => void;
|
|
939
|
-
rehydrate: () => Promise<void> | void;
|
|
940
|
-
hasHydrated: () => boolean;
|
|
941
|
-
onHydrate: (fn: (state: CartState) => void) => () => void;
|
|
942
|
-
onFinishHydration: (fn: (state: CartState) => void) => () => void;
|
|
943
|
-
getOptions: () => Partial<zustand_middleware.PersistOptions<CartState, CartState, unknown>>;
|
|
944
|
-
};
|
|
945
|
-
}>;
|
|
946
|
-
|
|
947
|
-
/**
|
|
948
|
-
* Inicia sesión contra el OAuth (resource owner password), obtiene el perfil por userinfo
|
|
949
|
-
* y crea/actualiza el usuario en Better Auth.
|
|
950
|
-
* La caducidad de la sesión Better Auth sigue `expires_in` de Ecomiq (sin `refresh_token`).
|
|
951
|
-
* El bearer OAuth solo va en cookie HttpOnly acotada a `/api/store` (no en JSON de sesión).
|
|
952
|
-
*/
|
|
953
|
-
declare function ecomiqOAuthPassword(): BetterAuthPlugin;
|
|
954
|
-
|
|
955
|
-
/**
|
|
956
|
-
* Cliente Better Auth para el plugin `ecomiqOAuthPassword`.
|
|
957
|
-
* Tras añadirlo a `createAuthClient`, refresca la sesión al llamar al sign-in.
|
|
958
|
-
*
|
|
959
|
-
* Ejemplo:
|
|
960
|
-
* `authClient.$fetch("/ecomiq-oauth/sign-in", { method: "POST", headers, body: { email, password } })`
|
|
961
|
-
*/
|
|
962
|
-
declare function ecomiqOAuthPasswordClient(): BetterAuthClientPlugin;
|
|
963
|
-
|
|
964
|
-
export { type CartItem, type CheckoutCustomerLocal, type GeoIneiFormFields, GeoItem, ProductsFilters, QueryProvider, StorefrontProductsParamsInput, ecomiqOAuthPassword, ecomiqOAuthPasswordClient, useCart, useCartAddresses, useCartCreate, useCartGet, useCollections, useConfig, usePages, useProducts, useStorefrontGeoInei, useUser };
|