@cimplify/sdk 0.52.1 → 0.53.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/dist/{ads-BxbWrwqp.d.mts → ads-C2c2Aald.d.mts} +1 -1
- package/dist/{ads-BxbWrwqp.d.ts → ads-C2c2Aald.d.ts} +1 -1
- package/dist/advanced.d.mts +3 -3
- package/dist/advanced.d.ts +3 -3
- package/dist/advanced.js +20 -20
- package/dist/advanced.mjs +1 -1
- package/dist/{chunk-R3F55BRN.mjs → chunk-3G4QCENX.mjs} +42 -22
- package/dist/{chunk-4QDCMYYB.mjs → chunk-6QZQQRBB.mjs} +21 -10
- package/dist/{chunk-GLAVTDDE.mjs → chunk-B3Y4C4A7.mjs} +56 -53
- package/dist/{chunk-7A3D3LFI.js → chunk-EJUKGJTZ.js} +4 -4
- package/dist/{chunk-Q5VGDCQF.js → chunk-HCZTBWU4.js} +42 -22
- package/dist/{chunk-W6CCBNGL.js → chunk-IJ32BXKZ.js} +55 -44
- package/dist/{chunk-RDORJT7Y.mjs → chunk-NEK7CVE2.mjs} +2 -2
- package/dist/{chunk-EQLT46ZR.js → chunk-YJLOOC3L.js} +56 -53
- package/dist/{client-C6J_RGlr.d.mts → client-306peWZ0.d.ts} +47 -29
- package/dist/{client-CX7IFIkL.d.ts → client-Bj2apl_y.d.mts} +47 -29
- package/dist/{client-Lt7uGLmT.d.ts → client-C2bKMy5g.d.ts} +2 -2
- package/dist/{client-DdefKjcs.d.mts → client-D1Gknspz.d.mts} +2 -2
- package/dist/{index-Bo0NjgR6.d.mts → index-D8vnKlOQ.d.mts} +4 -4
- package/dist/{index-BAohYhdg.d.ts → index-DIIlPUOC.d.ts} +4 -4
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +61 -61
- package/dist/index.mjs +2 -2
- package/dist/mock/cli.mjs +42 -22
- package/dist/mock/library.js +42 -22
- package/dist/mock/library.mjs +42 -22
- package/dist/mock/msw.js +42 -22
- package/dist/mock/msw.mjs +42 -22
- package/dist/{payment-_e99nSRj.d.ts → payment-DVS7ZUEp.d.mts} +2 -2
- package/dist/{payment-9L_-GWqQ.d.mts → payment-sn-yGL7v.d.ts} +2 -2
- package/dist/{price-BjehlIhG.d.mts → price-9T1Y47oS.d.ts} +2 -2
- package/dist/{price-CWQ5TQmk.d.ts → price-Cm0tU0V5.d.mts} +2 -2
- package/dist/{product-C-xLzh7Q.d.mts → product-B_kS4Oxa.d.mts} +1 -1
- package/dist/{product-C-xLzh7Q.d.ts → product-B_kS4Oxa.d.ts} +1 -1
- package/dist/react.d.mts +6 -6
- package/dist/react.d.ts +6 -6
- package/dist/react.js +16 -16
- package/dist/react.mjs +2 -2
- package/dist/{server-72rzvJ4Y.d.ts → server-BQzz921M.d.ts} +1 -1
- package/dist/{server-BgccqOLT.d.mts → server-D8rwqZQ6.d.mts} +1 -1
- package/dist/server.d.mts +20 -12
- package/dist/server.d.ts +20 -12
- package/dist/server.js +3 -3
- package/dist/server.mjs +2 -2
- package/dist/testing/msw.d.mts +2 -2
- package/dist/testing/msw.d.ts +2 -2
- package/dist/testing/msw.js +2 -2
- package/dist/testing/msw.mjs +1 -1
- package/dist/testing/suite.d.mts +6 -6
- package/dist/testing/suite.d.ts +6 -6
- package/dist/testing/suite.js +23 -23
- package/dist/testing/suite.mjs +4 -4
- package/dist/testing.d.mts +5 -5
- package/dist/testing.d.ts +5 -5
- package/dist/testing.js +79 -79
- package/dist/testing.mjs +5 -5
- package/dist/utils.d.mts +4 -4
- package/dist/utils.d.ts +4 -4
- package/package.json +1 -1
|
@@ -254,12 +254,12 @@ var CatalogueQueries = class {
|
|
|
254
254
|
constructor(client) {
|
|
255
255
|
this.client = client;
|
|
256
256
|
}
|
|
257
|
-
async getCatalogue() {
|
|
258
|
-
const result = await safe(this.client.get("/api/v1/catalogue"));
|
|
257
|
+
async getCatalogue(opts) {
|
|
258
|
+
const result = await safe(this.client.get("/api/v1/catalogue", opts));
|
|
259
259
|
if (!result.ok) return result;
|
|
260
260
|
return ok(normalizeCatalogueSnapshot(result.value));
|
|
261
261
|
}
|
|
262
|
-
async getProducts(options) {
|
|
262
|
+
async getProducts(options, opts) {
|
|
263
263
|
const path = withQuery("/api/v1/catalogue/products", {
|
|
264
264
|
category_id: options?.category,
|
|
265
265
|
taxonomy_id: options?.taxonomy,
|
|
@@ -277,13 +277,13 @@ var CatalogueQueries = class {
|
|
|
277
277
|
cursor: options?.cursor,
|
|
278
278
|
properties: options?.properties ? JSON.stringify(options.properties) : void 0
|
|
279
279
|
});
|
|
280
|
-
const result = await safe(this.client.get(path));
|
|
280
|
+
const result = await safe(this.client.get(path, opts));
|
|
281
281
|
if (!result.ok) return result;
|
|
282
282
|
return ok(normalizeCatalogueResult(result.value));
|
|
283
283
|
}
|
|
284
|
-
async getProduct(id) {
|
|
284
|
+
async getProduct(id, opts) {
|
|
285
285
|
const encodedId = encodeURIComponent(id);
|
|
286
|
-
const result = await safe(this.client.get(`/api/v1/catalogue/products/${encodedId}
|
|
286
|
+
const result = await safe(this.client.get(`/api/v1/catalogue/products/${encodedId}`, opts));
|
|
287
287
|
if (!result.ok) return result;
|
|
288
288
|
const payload = result.value;
|
|
289
289
|
const rawProduct = isRecord(payload.item) ? payload.item : payload;
|
|
@@ -293,15 +293,15 @@ var CatalogueQueries = class {
|
|
|
293
293
|
}
|
|
294
294
|
const addOnIds = rawProduct.add_on_ids;
|
|
295
295
|
if (Array.isArray(addOnIds) && addOnIds.length > 0) {
|
|
296
|
-
const addOnsResult = await this.getAddOns(product.id);
|
|
296
|
+
const addOnsResult = await this.getAddOns(product.id, opts);
|
|
297
297
|
if (addOnsResult.ok) {
|
|
298
298
|
product.add_ons = addOnsResult.value;
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
return ok(product);
|
|
302
302
|
}
|
|
303
|
-
async getProductBySlug(slug) {
|
|
304
|
-
return this.getProduct(slug);
|
|
303
|
+
async getProductBySlug(slug, opts) {
|
|
304
|
+
return this.getProduct(slug, opts);
|
|
305
305
|
}
|
|
306
306
|
async getVariants(productId) {
|
|
307
307
|
const encodedId = encodeURIComponent(productId);
|
|
@@ -329,45 +329,45 @@ var CatalogueQueries = class {
|
|
|
329
329
|
)
|
|
330
330
|
);
|
|
331
331
|
}
|
|
332
|
-
async getAddOns(productId) {
|
|
332
|
+
async getAddOns(productId, opts) {
|
|
333
333
|
const encodedId = encodeURIComponent(productId);
|
|
334
|
-
return safe(this.client.get(`/api/v1/catalogue/products/${encodedId}/add-ons
|
|
334
|
+
return safe(this.client.get(`/api/v1/catalogue/products/${encodedId}/add-ons`, opts));
|
|
335
335
|
}
|
|
336
|
-
async getCategories() {
|
|
337
|
-
return safe(this.client.get("/api/v1/catalogue/categories"));
|
|
336
|
+
async getCategories(opts) {
|
|
337
|
+
return safe(this.client.get("/api/v1/catalogue/categories", opts));
|
|
338
338
|
}
|
|
339
|
-
async getCategory(id) {
|
|
339
|
+
async getCategory(id, opts) {
|
|
340
340
|
const encodedId = encodeURIComponent(id);
|
|
341
|
-
return safe(this.client.get(`/api/v1/catalogue/categories/${encodedId}
|
|
341
|
+
return safe(this.client.get(`/api/v1/catalogue/categories/${encodedId}`, opts));
|
|
342
342
|
}
|
|
343
|
-
async getCategoryBySlug(slug) {
|
|
344
|
-
return this.getCategory(slug);
|
|
343
|
+
async getCategoryBySlug(slug, opts) {
|
|
344
|
+
return this.getCategory(slug, opts);
|
|
345
345
|
}
|
|
346
|
-
async getCategoryProducts(categoryId, options) {
|
|
346
|
+
async getCategoryProducts(categoryId, options, opts) {
|
|
347
347
|
const encodedId = encodeURIComponent(categoryId);
|
|
348
348
|
const path = withQuery(`/api/v1/catalogue/categories/${encodedId}/products`, {
|
|
349
349
|
limit: options?.limit,
|
|
350
350
|
offset: options?.offset
|
|
351
351
|
});
|
|
352
|
-
return safe(this.client.get(path));
|
|
352
|
+
return safe(this.client.get(path, opts));
|
|
353
353
|
}
|
|
354
|
-
async getCollections() {
|
|
355
|
-
return safe(this.client.get("/api/v1/catalogue/collections"));
|
|
354
|
+
async getCollections(opts) {
|
|
355
|
+
return safe(this.client.get("/api/v1/catalogue/collections", opts));
|
|
356
356
|
}
|
|
357
|
-
async getCollection(id) {
|
|
357
|
+
async getCollection(id, opts) {
|
|
358
358
|
const encodedId = encodeURIComponent(id);
|
|
359
|
-
return safe(this.client.get(`/api/v1/catalogue/collections/${encodedId}
|
|
359
|
+
return safe(this.client.get(`/api/v1/catalogue/collections/${encodedId}`, opts));
|
|
360
360
|
}
|
|
361
|
-
async getCollectionBySlug(slug) {
|
|
362
|
-
return this.getCollection(slug);
|
|
361
|
+
async getCollectionBySlug(slug, opts) {
|
|
362
|
+
return this.getCollection(slug, opts);
|
|
363
363
|
}
|
|
364
|
-
async getCollectionProducts(collectionId, options) {
|
|
364
|
+
async getCollectionProducts(collectionId, options, opts) {
|
|
365
365
|
const encodedId = encodeURIComponent(collectionId);
|
|
366
366
|
const path = withQuery(`/api/v1/catalogue/collections/${encodedId}/products`, {
|
|
367
367
|
limit: options?.limit,
|
|
368
368
|
offset: options?.offset
|
|
369
369
|
});
|
|
370
|
-
return safe(this.client.get(path));
|
|
370
|
+
return safe(this.client.get(path, opts));
|
|
371
371
|
}
|
|
372
372
|
async searchCollections(query, limit = 20) {
|
|
373
373
|
const path = withQuery("/api/v1/catalogue/collections", { search: query, limit });
|
|
@@ -492,17 +492,20 @@ var CatalogueQueries = class {
|
|
|
492
492
|
})
|
|
493
493
|
);
|
|
494
494
|
}
|
|
495
|
-
async search(query, options) {
|
|
496
|
-
const result = await this.getProducts(
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
495
|
+
async search(query, options, opts) {
|
|
496
|
+
const result = await this.getProducts(
|
|
497
|
+
{
|
|
498
|
+
...options,
|
|
499
|
+
search: query,
|
|
500
|
+
limit: options?.limit ?? 20
|
|
501
|
+
},
|
|
502
|
+
opts
|
|
503
|
+
);
|
|
501
504
|
if (!result.ok) return result;
|
|
502
505
|
return ok(result.value.items);
|
|
503
506
|
}
|
|
504
|
-
async searchProducts(query, options) {
|
|
505
|
-
return this.search(query, options);
|
|
507
|
+
async searchProducts(query, options, opts) {
|
|
508
|
+
return this.search(query, options, opts);
|
|
506
509
|
}
|
|
507
510
|
async getMenu(options) {
|
|
508
511
|
const path = withQuery("/api/v1/catalogue/menu", {
|
|
@@ -1957,25 +1960,25 @@ var BusinessService = class {
|
|
|
1957
1960
|
constructor(client) {
|
|
1958
1961
|
this.client = client;
|
|
1959
1962
|
}
|
|
1960
|
-
async getInfo() {
|
|
1961
|
-
return safe(this.client.get("/api/v1/business"));
|
|
1963
|
+
async getInfo(opts) {
|
|
1964
|
+
return safe(this.client.get("/api/v1/business", opts));
|
|
1962
1965
|
}
|
|
1963
|
-
async getByHandle(handle) {
|
|
1966
|
+
async getByHandle(handle, opts) {
|
|
1964
1967
|
const encodedHandle = encodeURIComponent(handle);
|
|
1965
|
-
return safe(this.client.get(`/api/v1/business/by-handle/${encodedHandle}
|
|
1968
|
+
return safe(this.client.get(`/api/v1/business/by-handle/${encodedHandle}`, opts));
|
|
1966
1969
|
}
|
|
1967
|
-
async getByDomain(domain) {
|
|
1970
|
+
async getByDomain(domain, opts) {
|
|
1968
1971
|
const encodedDomain = encodeURIComponent(domain);
|
|
1969
|
-
return safe(this.client.get(`/api/v1/business/by-domain?domain=${encodedDomain}
|
|
1972
|
+
return safe(this.client.get(`/api/v1/business/by-domain?domain=${encodedDomain}`, opts));
|
|
1970
1973
|
}
|
|
1971
|
-
async getSettings() {
|
|
1972
|
-
return safe(this.client.get("/api/v1/business/settings"));
|
|
1974
|
+
async getSettings(opts) {
|
|
1975
|
+
return safe(this.client.get("/api/v1/business/settings", opts));
|
|
1973
1976
|
}
|
|
1974
|
-
async getLocations() {
|
|
1975
|
-
return safe(this.client.get("/api/v1/business/locations"));
|
|
1977
|
+
async getLocations(opts) {
|
|
1978
|
+
return safe(this.client.get("/api/v1/business/locations", opts));
|
|
1976
1979
|
}
|
|
1977
|
-
async getLocation(locationId) {
|
|
1978
|
-
const result = await this.getLocations();
|
|
1980
|
+
async getLocation(locationId, opts) {
|
|
1981
|
+
const result = await this.getLocations(opts);
|
|
1979
1982
|
if (!result.ok) return err(result.error);
|
|
1980
1983
|
const location = result.value.find((item) => item.id === locationId);
|
|
1981
1984
|
if (!location) {
|
|
@@ -1983,16 +1986,16 @@ var BusinessService = class {
|
|
|
1983
1986
|
}
|
|
1984
1987
|
return ok(location);
|
|
1985
1988
|
}
|
|
1986
|
-
async getHours() {
|
|
1987
|
-
return safe(this.client.get("/api/v1/business/hours"));
|
|
1989
|
+
async getHours(opts) {
|
|
1990
|
+
return safe(this.client.get("/api/v1/business/hours", opts));
|
|
1988
1991
|
}
|
|
1989
|
-
async getLocationHours(locationId) {
|
|
1990
|
-
const result = await this.getHours();
|
|
1992
|
+
async getLocationHours(locationId, opts) {
|
|
1993
|
+
const result = await this.getHours(opts);
|
|
1991
1994
|
if (!result.ok) return result;
|
|
1992
1995
|
return ok(result.value.filter((hour) => hour.location_id === locationId));
|
|
1993
1996
|
}
|
|
1994
|
-
async getBootstrap() {
|
|
1995
|
-
return safe(this.client.get("/api/v1/bootstrap"));
|
|
1997
|
+
async getBootstrap(opts) {
|
|
1998
|
+
return safe(this.client.get("/api/v1/bootstrap", opts));
|
|
1996
1999
|
}
|
|
1997
2000
|
};
|
|
1998
2001
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { T as CimplifyError, Q as Category, aX as Product, f as AddOnWithOptions, aO as Pagination, b9 as ProductWithDetails, b7 as ProductVariant, bA as VariantAxis, bB as VariantAxisSelection, A as AddOn, U as Collection, E as BundleSummary, s as Bundle, a1 as Composite, $ as ComponentSelectionInput, a6 as CompositePriceResult, S as ChosenPrice, b4 as ProductTaxonomy, bt as TaxonomyWithChildren, av as EligiblePlansQuery, a$ as ProductBillingPlan, b5 as ProductTimeProfile, a_ as ProductAvailabilityNow, ah as Deal, b0 as ProductDealInfo, an as DiscountValidation, bq as TagsResponse, ac as CustomAttributeDefinition, ad as CustomAttributeValue, ba as PropertyFacet, bs as TaxonomyAttributeTemplate, aH as KnowledgeArticle, bu as UICart, J as CartItem, O as CartSummary, g as AddToCartInput, L as CartMutationResult, bz as UpdateCartItemInput, am as DiscountDetails, aM as Money, ab as CurrencyCode, aI as LineConfiguration, bg as SchedulingMode, at as DurationUnit, bk as Subscription, bo as SubscriptionWithDetails } from './product-B_kS4Oxa.js';
|
|
2
|
+
import { a as AuthorizationType, c as PaymentMethod, I as InitializePaymentResult, S as SubmitAuthorizationInput, i as PaymentStatusResponse } from './payment-sn-yGL7v.js';
|
|
3
3
|
|
|
4
4
|
interface RequestContext {
|
|
5
5
|
method: "GET" | "POST" | "PATCH" | "DELETE";
|
|
@@ -224,29 +224,29 @@ interface RefreshQuoteResult {
|
|
|
224
224
|
declare class CatalogueQueries {
|
|
225
225
|
private client;
|
|
226
226
|
constructor(client: CimplifyClient);
|
|
227
|
-
getCatalogue(): Promise<Result<CatalogueSnapshot, CimplifyError>>;
|
|
228
|
-
getProducts(options?: GetProductsOptions): Promise<Result<CatalogueResult<Product>, CimplifyError>>;
|
|
229
|
-
getProduct(id: string): Promise<Result<ProductWithDetails, CimplifyError>>;
|
|
230
|
-
getProductBySlug(slug: string): Promise<Result<ProductWithDetails, CimplifyError>>;
|
|
227
|
+
getCatalogue(opts?: ReadRequestOptions): Promise<Result<CatalogueSnapshot, CimplifyError>>;
|
|
228
|
+
getProducts(options?: GetProductsOptions, opts?: ReadRequestOptions): Promise<Result<CatalogueResult<Product>, CimplifyError>>;
|
|
229
|
+
getProduct(id: string, opts?: ReadRequestOptions): Promise<Result<ProductWithDetails, CimplifyError>>;
|
|
230
|
+
getProductBySlug(slug: string, opts?: ReadRequestOptions): Promise<Result<ProductWithDetails, CimplifyError>>;
|
|
231
231
|
getVariants(productId: string): Promise<Result<ProductVariant[], CimplifyError>>;
|
|
232
232
|
getVariantAxes(productId: string): Promise<Result<VariantAxis[], CimplifyError>>;
|
|
233
233
|
getVariantByAxisSelections(productId: string, selections: VariantAxisSelection): Promise<Result<ProductVariant | null, CimplifyError>>;
|
|
234
234
|
getVariantById(productId: string, variantId: string): Promise<Result<ProductVariant, CimplifyError>>;
|
|
235
|
-
getAddOns(productId: string): Promise<Result<AddOn[], CimplifyError>>;
|
|
236
|
-
getCategories(): Promise<Result<Category[], CimplifyError>>;
|
|
237
|
-
getCategory(id: string): Promise<Result<Category, CimplifyError>>;
|
|
238
|
-
getCategoryBySlug(slug: string): Promise<Result<Category, CimplifyError>>;
|
|
235
|
+
getAddOns(productId: string, opts?: ReadRequestOptions): Promise<Result<AddOn[], CimplifyError>>;
|
|
236
|
+
getCategories(opts?: ReadRequestOptions): Promise<Result<Category[], CimplifyError>>;
|
|
237
|
+
getCategory(id: string, opts?: ReadRequestOptions): Promise<Result<Category, CimplifyError>>;
|
|
238
|
+
getCategoryBySlug(slug: string, opts?: ReadRequestOptions): Promise<Result<Category, CimplifyError>>;
|
|
239
239
|
getCategoryProducts(categoryId: string, options?: {
|
|
240
240
|
limit?: number;
|
|
241
241
|
offset?: number;
|
|
242
|
-
}): Promise<Result<Product[], CimplifyError>>;
|
|
243
|
-
getCollections(): Promise<Result<Collection[], CimplifyError>>;
|
|
244
|
-
getCollection(id: string): Promise<Result<Collection, CimplifyError>>;
|
|
245
|
-
getCollectionBySlug(slug: string): Promise<Result<Collection, CimplifyError>>;
|
|
242
|
+
}, opts?: ReadRequestOptions): Promise<Result<Product[], CimplifyError>>;
|
|
243
|
+
getCollections(opts?: ReadRequestOptions): Promise<Result<Collection[], CimplifyError>>;
|
|
244
|
+
getCollection(id: string, opts?: ReadRequestOptions): Promise<Result<Collection, CimplifyError>>;
|
|
245
|
+
getCollectionBySlug(slug: string, opts?: ReadRequestOptions): Promise<Result<Collection, CimplifyError>>;
|
|
246
246
|
getCollectionProducts(collectionId: string, options?: {
|
|
247
247
|
limit?: number;
|
|
248
248
|
offset?: number;
|
|
249
|
-
}): Promise<Result<Product[], CimplifyError>>;
|
|
249
|
+
}, opts?: ReadRequestOptions): Promise<Result<Product[], CimplifyError>>;
|
|
250
250
|
searchCollections(query: string, limit?: number): Promise<Result<Collection[], CimplifyError>>;
|
|
251
251
|
getBundles(): Promise<Result<BundleSummary[], CimplifyError>>;
|
|
252
252
|
getBundle(id: string): Promise<Result<Bundle, CimplifyError>>;
|
|
@@ -274,8 +274,8 @@ declare class CatalogueQueries {
|
|
|
274
274
|
getCategoryDeals(categoryId: string): Promise<Result<Deal[], CimplifyError>>;
|
|
275
275
|
getCollectionDeals(collectionId: string): Promise<Result<Deal[], CimplifyError>>;
|
|
276
276
|
validateDiscountCode(code: string, orderSubtotal: string, locationId?: string): Promise<Result<DiscountValidation, CimplifyError>>;
|
|
277
|
-
search(query: string, options?: Omit<GetProductsOptions, "search"
|
|
278
|
-
searchProducts(query: string, options?: Omit<GetProductsOptions, "search"
|
|
277
|
+
search(query: string, options?: Omit<GetProductsOptions, "search">, opts?: ReadRequestOptions): Promise<Result<Product[], CimplifyError>>;
|
|
278
|
+
searchProducts(query: string, options?: Omit<GetProductsOptions, "search">, opts?: ReadRequestOptions): Promise<Result<Product[], CimplifyError>>;
|
|
279
279
|
getMenu(options?: {
|
|
280
280
|
category?: string;
|
|
281
281
|
limit?: number;
|
|
@@ -1438,15 +1438,15 @@ interface CategoryInfo {
|
|
|
1438
1438
|
declare class BusinessService {
|
|
1439
1439
|
private client;
|
|
1440
1440
|
constructor(client: CimplifyClient);
|
|
1441
|
-
getInfo(): Promise<Result<Business, CimplifyError>>;
|
|
1442
|
-
getByHandle(handle: string): Promise<Result<Business, CimplifyError>>;
|
|
1443
|
-
getByDomain(domain: string): Promise<Result<Business, CimplifyError>>;
|
|
1444
|
-
getSettings(): Promise<Result<BusinessSettings, CimplifyError>>;
|
|
1445
|
-
getLocations(): Promise<Result<Location[], CimplifyError>>;
|
|
1446
|
-
getLocation(locationId: string): Promise<Result<Location, CimplifyError>>;
|
|
1447
|
-
getHours(): Promise<Result<BusinessHours[], CimplifyError>>;
|
|
1448
|
-
getLocationHours(locationId: string): Promise<Result<BusinessHours[], CimplifyError>>;
|
|
1449
|
-
getBootstrap(): Promise<Result<StorefrontBootstrap, CimplifyError>>;
|
|
1441
|
+
getInfo(opts?: ReadRequestOptions): Promise<Result<Business, CimplifyError>>;
|
|
1442
|
+
getByHandle(handle: string, opts?: ReadRequestOptions): Promise<Result<Business, CimplifyError>>;
|
|
1443
|
+
getByDomain(domain: string, opts?: ReadRequestOptions): Promise<Result<Business, CimplifyError>>;
|
|
1444
|
+
getSettings(opts?: ReadRequestOptions): Promise<Result<BusinessSettings, CimplifyError>>;
|
|
1445
|
+
getLocations(opts?: ReadRequestOptions): Promise<Result<Location[], CimplifyError>>;
|
|
1446
|
+
getLocation(locationId: string, opts?: ReadRequestOptions): Promise<Result<Location, CimplifyError>>;
|
|
1447
|
+
getHours(opts?: ReadRequestOptions): Promise<Result<BusinessHours[], CimplifyError>>;
|
|
1448
|
+
getLocationHours(locationId: string, opts?: ReadRequestOptions): Promise<Result<BusinessHours[], CimplifyError>>;
|
|
1449
|
+
getBootstrap(opts?: ReadRequestOptions): Promise<Result<StorefrontBootstrap, CimplifyError>>;
|
|
1450
1450
|
}
|
|
1451
1451
|
|
|
1452
1452
|
type StockStatus = "in_stock" | "low_stock" | "out_of_stock";
|
|
@@ -2327,6 +2327,24 @@ interface RequestOptions {
|
|
|
2327
2327
|
idempotencyKey?: string;
|
|
2328
2328
|
headers?: Record<string, string>;
|
|
2329
2329
|
}
|
|
2330
|
+
/**
|
|
2331
|
+
* Per-call cache hints for server-side reads. Forwarded as `next: { revalidate, tags }`
|
|
2332
|
+
* on the underlying fetch — Next.js's data cache reads them; in non-Next runtimes
|
|
2333
|
+
* they're inert. Maps 1:1 onto Next 16's documented fetch caching API:
|
|
2334
|
+
* https://nextjs.org/docs/app/api-reference/functions/fetch#optionsnextrevalidate
|
|
2335
|
+
*
|
|
2336
|
+
* Use the `tags` builders from `@cimplify/sdk/server` so invalidation stays consistent
|
|
2337
|
+
* with the `revalidate*` helpers.
|
|
2338
|
+
*/
|
|
2339
|
+
interface CacheOptions {
|
|
2340
|
+
/** Seconds before the cache entry is considered stale. `false` = cache indefinitely. */
|
|
2341
|
+
revalidate?: number | false;
|
|
2342
|
+
/** Cache tags for on-demand invalidation via `revalidateTag(tag)`. */
|
|
2343
|
+
tags?: readonly string[];
|
|
2344
|
+
}
|
|
2345
|
+
interface ReadRequestOptions {
|
|
2346
|
+
cacheOptions?: CacheOptions;
|
|
2347
|
+
}
|
|
2330
2348
|
interface CimplifyConfig {
|
|
2331
2349
|
publicKey?: string;
|
|
2332
2350
|
credentials?: RequestCredentials;
|
|
@@ -2408,11 +2426,11 @@ declare class CimplifyClient {
|
|
|
2408
2426
|
private resilientFetch;
|
|
2409
2427
|
private getDedupeKey;
|
|
2410
2428
|
private deduplicatedRequest;
|
|
2411
|
-
get<T = unknown>(path: string): Promise<T>;
|
|
2429
|
+
get<T = unknown>(path: string, opts?: ReadRequestOptions): Promise<T>;
|
|
2412
2430
|
post<T = unknown>(path: string, body?: unknown, opts?: RequestOptions): Promise<T>;
|
|
2413
2431
|
patch<T = unknown>(path: string, body?: unknown, opts?: RequestOptions): Promise<T>;
|
|
2414
2432
|
delete<T = unknown>(path: string, opts?: RequestOptions): Promise<T>;
|
|
2415
|
-
linkGet<T = unknown>(path: string): Promise<T>;
|
|
2433
|
+
linkGet<T = unknown>(path: string, opts?: ReadRequestOptions): Promise<T>;
|
|
2416
2434
|
linkPost<T = unknown>(path: string, body?: unknown, opts?: RequestOptions): Promise<T>;
|
|
2417
2435
|
linkDelete<T = unknown>(path: string, opts?: RequestOptions): Promise<T>;
|
|
2418
2436
|
private handleRestResponse;
|
|
@@ -2438,4 +2456,4 @@ declare class CimplifyClient {
|
|
|
2438
2456
|
}
|
|
2439
2457
|
declare function createCimplifyClient(config?: CimplifyConfig): CimplifyClient;
|
|
2440
2458
|
|
|
2441
|
-
export { type
|
|
2459
|
+
export { type CheckoutCartData as $, AUTHORIZATION_TYPE as A, type Booking as B, type BusinessSettings as C, type BusinessType as D, type BusinessWithLocations as E, CHECKOUT_MODE as F, CHECKOUT_MUTATION as G, CHECKOUT_STEP as H, CONTACT_TYPE as I, type CacheOptions as J, type CancelBookingInput as K, type CancelBookingResult as L, type CancelOrderInput as M, type CancellationPolicy as N, CartOperations as O, CatalogueQueries as P, type CatalogueResult as Q, type CatalogueSnapshot as R, type CategoryInfo as S, type ChatAttachment as T, type ChatConversation as U, type ChatConversationResponse as V, type ChatMessage as W, type ChatWidgetStarter as X, type CheckSlotAvailabilityInput as Y, type CheckSlotAvailabilityResult as Z, type CheckoutAddressInfo as _, AUTH_MUTATION as a, type GetProductsOptions as a$, type CheckoutCartItem as a0, type CheckoutCustomerInfo as a1, type CheckoutFormData as a2, type CheckoutInput as a3, type CheckoutMode as a4, type CheckoutOrderType as a5, type CheckoutPaymentMethod as a6, type CheckoutResult as a7, CheckoutService as a8, type CheckoutStatus as a9, type DismissMessageResponse as aA, ELEMENT_TYPES as aB, EVENT_TYPES as aC, type ElementAppearance as aD, type ElementEventHandler as aE, type ElementEventType as aF, type ElementOptions as aG, type ElementType as aH, type ElementsCheckoutData as aI, type ElementsCheckoutResult as aJ, type ElementsCustomerInfo as aK, type ElementsOptions as aL, type EnrollAndLinkOrderInput as aM, type EnrollAndLinkOrderResult as aN, type EnrollmentData as aO, type Err as aP, type FeeBearerType as aQ, type FetchQuoteInput as aR, type FulfillmentLink as aS, type FulfillmentStatus as aT, type FulfillmentType as aU, type FxQuote as aV, type FxQuoteRequest as aW, type FxRateResponse as aX, FxService as aY, type GetAvailableSlotsInput as aZ, type GetOrdersOptions as a_, type CheckoutStatusContext as aa, type CheckoutStep as ab, CimplifyClient as ac, type CimplifyConfig as ad, CimplifyElement as ae, CimplifyElements as af, type ContactType as ag, type ContentType as ah, type CreateAddressInput as ai, type CreateMobileMoneyInput as aj, type Customer as ak, type CustomerAddress as al, type CustomerBooking as am, type CustomerBookingServiceItem as an, type CustomerLinkPreferences as ao, type CustomerMobileMoney as ap, type CustomerServicePreferences as aq, DEFAULT_COUNTRY as ar, DEFAULT_CURRENCY as as, DEVICE_TYPE as at, type DayAvailability as au, type DeliveryFeeDetails as av, type DeliveryFeeResponse as aw, DeliveryService as ax, type DepositResult as ay, type DeviceType as az, type AbortablePromise as b, type ProcessCheckoutOptions as b$, type IframeToParentMessage as b0, InventoryService as b1, LINK_MUTATION as b2, LINK_QUERY as b3, type LineItem as b4, type LineType as b5, type LinkData as b6, type LinkEnrollResult as b7, LinkService as b8, type LinkSession as b9, type OrderGroupPaymentState as bA, type OrderGroupPaymentStatus as bB, type OrderGroupPaymentSummary as bC, type OrderGroupStatus as bD, type OrderHistory as bE, type OrderLineState as bF, type OrderLineStatus as bG, type OrderPaymentEvent as bH, OrderQueries as bI, type OrderSplitDetail as bJ, type OrderStatus as bK, type OrderType as bL, type OtpResult as bM, PAYMENT_METHOD as bN, PAYMENT_MUTATION as bO, PAYMENT_STATE as bP, PICKUP_TIME_TYPE as bQ, type ParentToIframeMessage as bR, type PaymentMethodInfo as bS, type PaymentState as bT, type PickupTime as bU, type PickupTimeType as bV, type PlaceDetailsResponse as bW, PlacesService as bX, type PriceQuote as bY, type PricingOverrides as bZ, type ProcessAndResolveOptions as b_, type LinkStatusResult as ba, type LiteBootstrap as bb, LiteService as bc, type Location as bd, type LocationBooking as be, type LocationTaxBehavior as bf, type LocationTaxOverrides as bg, type LocationTimeProfile as bh, type LocationWithDetails as bi, MESSAGE_TYPES as bj, MOBILE_MONEY_PROVIDER as bk, type MobileMoneyData as bl, type MobileMoneyDetails as bm, type MobileMoneyProvider as bn, type NextAction as bo, ORDER_MUTATION as bp, ORDER_TYPE as bq, type ObservabilityHooks as br, type Ok as bs, type Order as bt, type OrderChannel as bu, type OrderFilter as bv, type OrderFulfillmentSummary as bw, type OrderGroup as bx, type OrderGroupDetails as by, type OrderGroupPayment as bz, type ActivityRecommendation as c, type TimeSlot as c$, type ProcessCheckoutResult as c0, type ProviderResolutionSource as c1, type QuoteBundleSelectionInput as c2, type QuoteCompositeSelectionInput as c3, type QuoteDynamicBuckets as c4, type QuoteStatus as c5, type QuoteUiMessage as c6, type ReadRequestOptions as c7, type RefreshQuoteInput as c8, type RefreshQuoteResult as c9, SchedulingService as cA, type SenderType as cB, type Service as cC, type ServiceAvailabilityParams as cD, type ServiceAvailabilityResult as cE, type ServiceCharge as cF, type ServiceNotes as cG, type ServiceScheduleRequest as cH, type ServiceStatus as cI, type SessionActivityData as cJ, type SessionChangeEvent as cK, type SessionMessage as cL, type SlotResourceInfo as cM, type SlotStaffInfo as cN, type Staff as cO, type StaffAssignment as cP, type StaffRole as cQ, type StaffScheduleItem as cR, type StockLevel as cS, type StockStatus as cT, type StorefrontBootstrap as cU, SubscriptionService as cV, SupportService as cW, type Table as cX, type TableInfo as cY, type TimeRange as cZ, type TimeRanges as c_, type RefundOrderInput as ca, type RelatedCandidate as cb, type RelatedProduct as cc, type RelatedProductsEnrichment as cd, type RelationType as ce, type ReminderMethod as cf, type ReminderSettings as cg, type ReorderResult as ch, type RequestContext as ci, type RequestErrorEvent as cj, type RequestOptions as ck, type RequestOtpInput as cl, type RequestSource as cm, type RequestStartEvent as cn, type RequestSuccessEvent as co, type RescheduleBookingInput as cp, type RescheduleBookingResult as cq, type RescheduleHistoryRecord as cr, type ResourceAssignment as cs, type Result as ct, type RetryEvent as cu, type RevokeAllSessionsResult as cv, type RevokeSessionResult as cw, type Room as cx, type SchedulingMetadata as cy, type SchedulingResult as cz, type ActivityRecommendationsResponse as d, type TrackCategoryViewOptions as d0, type TrackProductViewOptions as d1, type UpdateAddressInput as d2, type UpdateOrderStatusInput as d3, type UpdateProfileInput as d4, type UploadInitResponse as d5, type UploadResult as d6, UploadService as d7, type VerifyOtpInput as d8, combine as d9, combineObject as da, createCimplifyClient as db, createElements as dc, err as dd, flatMap as de, fromPromise as df, getOrElse as dg, isErr as dh, isOk as di, mapError as dj, mapResult as dk, ok as dl, toNullable as dm, tryCatch as dn, unwrap as dp, ActivityService as e, type ActivityStateResponse as f, type AddressData as g, type AddressInfo as h, type AmountToPay as i, type AuthResponse as j, AuthService as k, type AuthStatus as l, type AuthenticatedCustomer as m, type AuthenticatedData as n, type AutocompletePrediction as o, type AutocompleteResponse as p, type AvailabilityResult as q, type AvailableSlot as r, type BookingModificationType as s, type BookingStatus as t, type BookingWithDetails as u, type BufferTimes as v, type Business as w, type BusinessHours as x, type BusinessPreferences as y, BusinessService as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { T as CimplifyError, Q as Category, aX as Product, f as AddOnWithOptions, aO as Pagination, b9 as ProductWithDetails, b7 as ProductVariant, bA as VariantAxis, bB as VariantAxisSelection, A as AddOn, U as Collection, E as BundleSummary, s as Bundle, a1 as Composite, $ as ComponentSelectionInput, a6 as CompositePriceResult, S as ChosenPrice, b4 as ProductTaxonomy, bt as TaxonomyWithChildren, av as EligiblePlansQuery, a$ as ProductBillingPlan, b5 as ProductTimeProfile, a_ as ProductAvailabilityNow, ah as Deal, b0 as ProductDealInfo, an as DiscountValidation, bq as TagsResponse, ac as CustomAttributeDefinition, ad as CustomAttributeValue, ba as PropertyFacet, bs as TaxonomyAttributeTemplate, aH as KnowledgeArticle, bu as UICart, J as CartItem, O as CartSummary, g as AddToCartInput, L as CartMutationResult, bz as UpdateCartItemInput, am as DiscountDetails, aM as Money, ab as CurrencyCode, aI as LineConfiguration, bg as SchedulingMode, at as DurationUnit, bk as Subscription, bo as SubscriptionWithDetails } from './product-B_kS4Oxa.mjs';
|
|
2
|
+
import { a as AuthorizationType, c as PaymentMethod, I as InitializePaymentResult, S as SubmitAuthorizationInput, i as PaymentStatusResponse } from './payment-DVS7ZUEp.mjs';
|
|
3
3
|
|
|
4
4
|
interface RequestContext {
|
|
5
5
|
method: "GET" | "POST" | "PATCH" | "DELETE";
|
|
@@ -224,29 +224,29 @@ interface RefreshQuoteResult {
|
|
|
224
224
|
declare class CatalogueQueries {
|
|
225
225
|
private client;
|
|
226
226
|
constructor(client: CimplifyClient);
|
|
227
|
-
getCatalogue(): Promise<Result<CatalogueSnapshot, CimplifyError>>;
|
|
228
|
-
getProducts(options?: GetProductsOptions): Promise<Result<CatalogueResult<Product>, CimplifyError>>;
|
|
229
|
-
getProduct(id: string): Promise<Result<ProductWithDetails, CimplifyError>>;
|
|
230
|
-
getProductBySlug(slug: string): Promise<Result<ProductWithDetails, CimplifyError>>;
|
|
227
|
+
getCatalogue(opts?: ReadRequestOptions): Promise<Result<CatalogueSnapshot, CimplifyError>>;
|
|
228
|
+
getProducts(options?: GetProductsOptions, opts?: ReadRequestOptions): Promise<Result<CatalogueResult<Product>, CimplifyError>>;
|
|
229
|
+
getProduct(id: string, opts?: ReadRequestOptions): Promise<Result<ProductWithDetails, CimplifyError>>;
|
|
230
|
+
getProductBySlug(slug: string, opts?: ReadRequestOptions): Promise<Result<ProductWithDetails, CimplifyError>>;
|
|
231
231
|
getVariants(productId: string): Promise<Result<ProductVariant[], CimplifyError>>;
|
|
232
232
|
getVariantAxes(productId: string): Promise<Result<VariantAxis[], CimplifyError>>;
|
|
233
233
|
getVariantByAxisSelections(productId: string, selections: VariantAxisSelection): Promise<Result<ProductVariant | null, CimplifyError>>;
|
|
234
234
|
getVariantById(productId: string, variantId: string): Promise<Result<ProductVariant, CimplifyError>>;
|
|
235
|
-
getAddOns(productId: string): Promise<Result<AddOn[], CimplifyError>>;
|
|
236
|
-
getCategories(): Promise<Result<Category[], CimplifyError>>;
|
|
237
|
-
getCategory(id: string): Promise<Result<Category, CimplifyError>>;
|
|
238
|
-
getCategoryBySlug(slug: string): Promise<Result<Category, CimplifyError>>;
|
|
235
|
+
getAddOns(productId: string, opts?: ReadRequestOptions): Promise<Result<AddOn[], CimplifyError>>;
|
|
236
|
+
getCategories(opts?: ReadRequestOptions): Promise<Result<Category[], CimplifyError>>;
|
|
237
|
+
getCategory(id: string, opts?: ReadRequestOptions): Promise<Result<Category, CimplifyError>>;
|
|
238
|
+
getCategoryBySlug(slug: string, opts?: ReadRequestOptions): Promise<Result<Category, CimplifyError>>;
|
|
239
239
|
getCategoryProducts(categoryId: string, options?: {
|
|
240
240
|
limit?: number;
|
|
241
241
|
offset?: number;
|
|
242
|
-
}): Promise<Result<Product[], CimplifyError>>;
|
|
243
|
-
getCollections(): Promise<Result<Collection[], CimplifyError>>;
|
|
244
|
-
getCollection(id: string): Promise<Result<Collection, CimplifyError>>;
|
|
245
|
-
getCollectionBySlug(slug: string): Promise<Result<Collection, CimplifyError>>;
|
|
242
|
+
}, opts?: ReadRequestOptions): Promise<Result<Product[], CimplifyError>>;
|
|
243
|
+
getCollections(opts?: ReadRequestOptions): Promise<Result<Collection[], CimplifyError>>;
|
|
244
|
+
getCollection(id: string, opts?: ReadRequestOptions): Promise<Result<Collection, CimplifyError>>;
|
|
245
|
+
getCollectionBySlug(slug: string, opts?: ReadRequestOptions): Promise<Result<Collection, CimplifyError>>;
|
|
246
246
|
getCollectionProducts(collectionId: string, options?: {
|
|
247
247
|
limit?: number;
|
|
248
248
|
offset?: number;
|
|
249
|
-
}): Promise<Result<Product[], CimplifyError>>;
|
|
249
|
+
}, opts?: ReadRequestOptions): Promise<Result<Product[], CimplifyError>>;
|
|
250
250
|
searchCollections(query: string, limit?: number): Promise<Result<Collection[], CimplifyError>>;
|
|
251
251
|
getBundles(): Promise<Result<BundleSummary[], CimplifyError>>;
|
|
252
252
|
getBundle(id: string): Promise<Result<Bundle, CimplifyError>>;
|
|
@@ -274,8 +274,8 @@ declare class CatalogueQueries {
|
|
|
274
274
|
getCategoryDeals(categoryId: string): Promise<Result<Deal[], CimplifyError>>;
|
|
275
275
|
getCollectionDeals(collectionId: string): Promise<Result<Deal[], CimplifyError>>;
|
|
276
276
|
validateDiscountCode(code: string, orderSubtotal: string, locationId?: string): Promise<Result<DiscountValidation, CimplifyError>>;
|
|
277
|
-
search(query: string, options?: Omit<GetProductsOptions, "search"
|
|
278
|
-
searchProducts(query: string, options?: Omit<GetProductsOptions, "search"
|
|
277
|
+
search(query: string, options?: Omit<GetProductsOptions, "search">, opts?: ReadRequestOptions): Promise<Result<Product[], CimplifyError>>;
|
|
278
|
+
searchProducts(query: string, options?: Omit<GetProductsOptions, "search">, opts?: ReadRequestOptions): Promise<Result<Product[], CimplifyError>>;
|
|
279
279
|
getMenu(options?: {
|
|
280
280
|
category?: string;
|
|
281
281
|
limit?: number;
|
|
@@ -1438,15 +1438,15 @@ interface CategoryInfo {
|
|
|
1438
1438
|
declare class BusinessService {
|
|
1439
1439
|
private client;
|
|
1440
1440
|
constructor(client: CimplifyClient);
|
|
1441
|
-
getInfo(): Promise<Result<Business, CimplifyError>>;
|
|
1442
|
-
getByHandle(handle: string): Promise<Result<Business, CimplifyError>>;
|
|
1443
|
-
getByDomain(domain: string): Promise<Result<Business, CimplifyError>>;
|
|
1444
|
-
getSettings(): Promise<Result<BusinessSettings, CimplifyError>>;
|
|
1445
|
-
getLocations(): Promise<Result<Location[], CimplifyError>>;
|
|
1446
|
-
getLocation(locationId: string): Promise<Result<Location, CimplifyError>>;
|
|
1447
|
-
getHours(): Promise<Result<BusinessHours[], CimplifyError>>;
|
|
1448
|
-
getLocationHours(locationId: string): Promise<Result<BusinessHours[], CimplifyError>>;
|
|
1449
|
-
getBootstrap(): Promise<Result<StorefrontBootstrap, CimplifyError>>;
|
|
1441
|
+
getInfo(opts?: ReadRequestOptions): Promise<Result<Business, CimplifyError>>;
|
|
1442
|
+
getByHandle(handle: string, opts?: ReadRequestOptions): Promise<Result<Business, CimplifyError>>;
|
|
1443
|
+
getByDomain(domain: string, opts?: ReadRequestOptions): Promise<Result<Business, CimplifyError>>;
|
|
1444
|
+
getSettings(opts?: ReadRequestOptions): Promise<Result<BusinessSettings, CimplifyError>>;
|
|
1445
|
+
getLocations(opts?: ReadRequestOptions): Promise<Result<Location[], CimplifyError>>;
|
|
1446
|
+
getLocation(locationId: string, opts?: ReadRequestOptions): Promise<Result<Location, CimplifyError>>;
|
|
1447
|
+
getHours(opts?: ReadRequestOptions): Promise<Result<BusinessHours[], CimplifyError>>;
|
|
1448
|
+
getLocationHours(locationId: string, opts?: ReadRequestOptions): Promise<Result<BusinessHours[], CimplifyError>>;
|
|
1449
|
+
getBootstrap(opts?: ReadRequestOptions): Promise<Result<StorefrontBootstrap, CimplifyError>>;
|
|
1450
1450
|
}
|
|
1451
1451
|
|
|
1452
1452
|
type StockStatus = "in_stock" | "low_stock" | "out_of_stock";
|
|
@@ -2327,6 +2327,24 @@ interface RequestOptions {
|
|
|
2327
2327
|
idempotencyKey?: string;
|
|
2328
2328
|
headers?: Record<string, string>;
|
|
2329
2329
|
}
|
|
2330
|
+
/**
|
|
2331
|
+
* Per-call cache hints for server-side reads. Forwarded as `next: { revalidate, tags }`
|
|
2332
|
+
* on the underlying fetch — Next.js's data cache reads them; in non-Next runtimes
|
|
2333
|
+
* they're inert. Maps 1:1 onto Next 16's documented fetch caching API:
|
|
2334
|
+
* https://nextjs.org/docs/app/api-reference/functions/fetch#optionsnextrevalidate
|
|
2335
|
+
*
|
|
2336
|
+
* Use the `tags` builders from `@cimplify/sdk/server` so invalidation stays consistent
|
|
2337
|
+
* with the `revalidate*` helpers.
|
|
2338
|
+
*/
|
|
2339
|
+
interface CacheOptions {
|
|
2340
|
+
/** Seconds before the cache entry is considered stale. `false` = cache indefinitely. */
|
|
2341
|
+
revalidate?: number | false;
|
|
2342
|
+
/** Cache tags for on-demand invalidation via `revalidateTag(tag)`. */
|
|
2343
|
+
tags?: readonly string[];
|
|
2344
|
+
}
|
|
2345
|
+
interface ReadRequestOptions {
|
|
2346
|
+
cacheOptions?: CacheOptions;
|
|
2347
|
+
}
|
|
2330
2348
|
interface CimplifyConfig {
|
|
2331
2349
|
publicKey?: string;
|
|
2332
2350
|
credentials?: RequestCredentials;
|
|
@@ -2408,11 +2426,11 @@ declare class CimplifyClient {
|
|
|
2408
2426
|
private resilientFetch;
|
|
2409
2427
|
private getDedupeKey;
|
|
2410
2428
|
private deduplicatedRequest;
|
|
2411
|
-
get<T = unknown>(path: string): Promise<T>;
|
|
2429
|
+
get<T = unknown>(path: string, opts?: ReadRequestOptions): Promise<T>;
|
|
2412
2430
|
post<T = unknown>(path: string, body?: unknown, opts?: RequestOptions): Promise<T>;
|
|
2413
2431
|
patch<T = unknown>(path: string, body?: unknown, opts?: RequestOptions): Promise<T>;
|
|
2414
2432
|
delete<T = unknown>(path: string, opts?: RequestOptions): Promise<T>;
|
|
2415
|
-
linkGet<T = unknown>(path: string): Promise<T>;
|
|
2433
|
+
linkGet<T = unknown>(path: string, opts?: ReadRequestOptions): Promise<T>;
|
|
2416
2434
|
linkPost<T = unknown>(path: string, body?: unknown, opts?: RequestOptions): Promise<T>;
|
|
2417
2435
|
linkDelete<T = unknown>(path: string, opts?: RequestOptions): Promise<T>;
|
|
2418
2436
|
private handleRestResponse;
|
|
@@ -2438,4 +2456,4 @@ declare class CimplifyClient {
|
|
|
2438
2456
|
}
|
|
2439
2457
|
declare function createCimplifyClient(config?: CimplifyConfig): CimplifyClient;
|
|
2440
2458
|
|
|
2441
|
-
export { type
|
|
2459
|
+
export { type CheckoutCartData as $, AUTHORIZATION_TYPE as A, type Booking as B, type BusinessSettings as C, type BusinessType as D, type BusinessWithLocations as E, CHECKOUT_MODE as F, CHECKOUT_MUTATION as G, CHECKOUT_STEP as H, CONTACT_TYPE as I, type CacheOptions as J, type CancelBookingInput as K, type CancelBookingResult as L, type CancelOrderInput as M, type CancellationPolicy as N, CartOperations as O, CatalogueQueries as P, type CatalogueResult as Q, type CatalogueSnapshot as R, type CategoryInfo as S, type ChatAttachment as T, type ChatConversation as U, type ChatConversationResponse as V, type ChatMessage as W, type ChatWidgetStarter as X, type CheckSlotAvailabilityInput as Y, type CheckSlotAvailabilityResult as Z, type CheckoutAddressInfo as _, AUTH_MUTATION as a, type GetProductsOptions as a$, type CheckoutCartItem as a0, type CheckoutCustomerInfo as a1, type CheckoutFormData as a2, type CheckoutInput as a3, type CheckoutMode as a4, type CheckoutOrderType as a5, type CheckoutPaymentMethod as a6, type CheckoutResult as a7, CheckoutService as a8, type CheckoutStatus as a9, type DismissMessageResponse as aA, ELEMENT_TYPES as aB, EVENT_TYPES as aC, type ElementAppearance as aD, type ElementEventHandler as aE, type ElementEventType as aF, type ElementOptions as aG, type ElementType as aH, type ElementsCheckoutData as aI, type ElementsCheckoutResult as aJ, type ElementsCustomerInfo as aK, type ElementsOptions as aL, type EnrollAndLinkOrderInput as aM, type EnrollAndLinkOrderResult as aN, type EnrollmentData as aO, type Err as aP, type FeeBearerType as aQ, type FetchQuoteInput as aR, type FulfillmentLink as aS, type FulfillmentStatus as aT, type FulfillmentType as aU, type FxQuote as aV, type FxQuoteRequest as aW, type FxRateResponse as aX, FxService as aY, type GetAvailableSlotsInput as aZ, type GetOrdersOptions as a_, type CheckoutStatusContext as aa, type CheckoutStep as ab, CimplifyClient as ac, type CimplifyConfig as ad, CimplifyElement as ae, CimplifyElements as af, type ContactType as ag, type ContentType as ah, type CreateAddressInput as ai, type CreateMobileMoneyInput as aj, type Customer as ak, type CustomerAddress as al, type CustomerBooking as am, type CustomerBookingServiceItem as an, type CustomerLinkPreferences as ao, type CustomerMobileMoney as ap, type CustomerServicePreferences as aq, DEFAULT_COUNTRY as ar, DEFAULT_CURRENCY as as, DEVICE_TYPE as at, type DayAvailability as au, type DeliveryFeeDetails as av, type DeliveryFeeResponse as aw, DeliveryService as ax, type DepositResult as ay, type DeviceType as az, type AbortablePromise as b, type ProcessCheckoutOptions as b$, type IframeToParentMessage as b0, InventoryService as b1, LINK_MUTATION as b2, LINK_QUERY as b3, type LineItem as b4, type LineType as b5, type LinkData as b6, type LinkEnrollResult as b7, LinkService as b8, type LinkSession as b9, type OrderGroupPaymentState as bA, type OrderGroupPaymentStatus as bB, type OrderGroupPaymentSummary as bC, type OrderGroupStatus as bD, type OrderHistory as bE, type OrderLineState as bF, type OrderLineStatus as bG, type OrderPaymentEvent as bH, OrderQueries as bI, type OrderSplitDetail as bJ, type OrderStatus as bK, type OrderType as bL, type OtpResult as bM, PAYMENT_METHOD as bN, PAYMENT_MUTATION as bO, PAYMENT_STATE as bP, PICKUP_TIME_TYPE as bQ, type ParentToIframeMessage as bR, type PaymentMethodInfo as bS, type PaymentState as bT, type PickupTime as bU, type PickupTimeType as bV, type PlaceDetailsResponse as bW, PlacesService as bX, type PriceQuote as bY, type PricingOverrides as bZ, type ProcessAndResolveOptions as b_, type LinkStatusResult as ba, type LiteBootstrap as bb, LiteService as bc, type Location as bd, type LocationBooking as be, type LocationTaxBehavior as bf, type LocationTaxOverrides as bg, type LocationTimeProfile as bh, type LocationWithDetails as bi, MESSAGE_TYPES as bj, MOBILE_MONEY_PROVIDER as bk, type MobileMoneyData as bl, type MobileMoneyDetails as bm, type MobileMoneyProvider as bn, type NextAction as bo, ORDER_MUTATION as bp, ORDER_TYPE as bq, type ObservabilityHooks as br, type Ok as bs, type Order as bt, type OrderChannel as bu, type OrderFilter as bv, type OrderFulfillmentSummary as bw, type OrderGroup as bx, type OrderGroupDetails as by, type OrderGroupPayment as bz, type ActivityRecommendation as c, type TimeSlot as c$, type ProcessCheckoutResult as c0, type ProviderResolutionSource as c1, type QuoteBundleSelectionInput as c2, type QuoteCompositeSelectionInput as c3, type QuoteDynamicBuckets as c4, type QuoteStatus as c5, type QuoteUiMessage as c6, type ReadRequestOptions as c7, type RefreshQuoteInput as c8, type RefreshQuoteResult as c9, SchedulingService as cA, type SenderType as cB, type Service as cC, type ServiceAvailabilityParams as cD, type ServiceAvailabilityResult as cE, type ServiceCharge as cF, type ServiceNotes as cG, type ServiceScheduleRequest as cH, type ServiceStatus as cI, type SessionActivityData as cJ, type SessionChangeEvent as cK, type SessionMessage as cL, type SlotResourceInfo as cM, type SlotStaffInfo as cN, type Staff as cO, type StaffAssignment as cP, type StaffRole as cQ, type StaffScheduleItem as cR, type StockLevel as cS, type StockStatus as cT, type StorefrontBootstrap as cU, SubscriptionService as cV, SupportService as cW, type Table as cX, type TableInfo as cY, type TimeRange as cZ, type TimeRanges as c_, type RefundOrderInput as ca, type RelatedCandidate as cb, type RelatedProduct as cc, type RelatedProductsEnrichment as cd, type RelationType as ce, type ReminderMethod as cf, type ReminderSettings as cg, type ReorderResult as ch, type RequestContext as ci, type RequestErrorEvent as cj, type RequestOptions as ck, type RequestOtpInput as cl, type RequestSource as cm, type RequestStartEvent as cn, type RequestSuccessEvent as co, type RescheduleBookingInput as cp, type RescheduleBookingResult as cq, type RescheduleHistoryRecord as cr, type ResourceAssignment as cs, type Result as ct, type RetryEvent as cu, type RevokeAllSessionsResult as cv, type RevokeSessionResult as cw, type Room as cx, type SchedulingMetadata as cy, type SchedulingResult as cz, type ActivityRecommendationsResponse as d, type TrackCategoryViewOptions as d0, type TrackProductViewOptions as d1, type UpdateAddressInput as d2, type UpdateOrderStatusInput as d3, type UpdateProfileInput as d4, type UploadInitResponse as d5, type UploadResult as d6, UploadService as d7, type VerifyOtpInput as d8, combine as d9, combineObject as da, createCimplifyClient as db, createElements as dc, err as dd, flatMap as de, fromPromise as df, getOrElse as dg, isErr as dh, isOk as di, mapError as dj, mapResult as dk, ok as dl, toNullable as dm, tryCatch as dn, unwrap as dp, ActivityService as e, type ActivityStateResponse as f, type AddressData as g, type AddressInfo as h, type AmountToPay as i, type AuthResponse as j, AuthService as k, type AuthStatus as l, type AuthenticatedCustomer as m, type AuthenticatedData as n, type AutocompletePrediction as o, type AutocompleteResponse as p, type AvailabilityResult as q, type AvailableSlot as r, type BookingModificationType as s, type BookingStatus as t, type BookingWithDetails as u, type BufferTimes as v, type Business as w, type BusinessHours as x, type BusinessPreferences as y, BusinessService as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ac as CimplifyClient } from './client-306peWZ0.js';
|
|
2
|
+
import { A as AppHandle, C as CreateAppOptions } from './server-BQzz921M.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Test client + fixtures.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ac as CimplifyClient } from './client-Bj2apl_y.mjs';
|
|
2
|
+
import { A as AppHandle, C as CreateAppOptions } from './server-D8rwqZQ6.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Test client + fixtures.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { P as ProductWithPrice } from './price-
|
|
3
|
-
import {
|
|
1
|
+
import { aM as Money, ab as CurrencyCode, aV as PricePathTaxInfo, aX as Product, b9 as ProductWithDetails, bc as QuantityPricingTier } from './product-B_kS4Oxa.mjs';
|
|
2
|
+
import { P as ProductWithPrice } from './price-Cm0tU0V5.mjs';
|
|
3
|
+
import { b as PaymentErrorDetails, g as PaymentResponse, i as PaymentStatusResponse } from './payment-DVS7ZUEp.mjs';
|
|
4
4
|
import { CountryCode } from 'libphonenumber-js';
|
|
5
5
|
|
|
6
6
|
declare const CURRENCY_SYMBOLS: Record<string, string>;
|
|
@@ -68,4 +68,4 @@ declare function resolvePhoneCountryCode(options?: PhoneNormalizationOptions): C
|
|
|
68
68
|
declare function normalizePhoneToE164(raw: string, options?: PhoneNormalizationOptions): string | null;
|
|
69
69
|
declare function isValidPhoneForContext(raw: string, options?: PhoneNormalizationOptions): boolean;
|
|
70
70
|
|
|
71
|
-
export {
|
|
71
|
+
export { normalizePaymentResponse as A, normalizePhoneToE164 as B, CURRENCY_SYMBOLS as C, normalizeStatusResponse as D, parsePrice as E, resolvePhoneCountryCode as F, MOBILE_MONEY_PROVIDERS as M, formatNumberCompact as a, formatPrice as b, categorizePaymentError as c, detectMobileMoneyProvider as d, formatPriceAdjustment as e, formatMoney as f, formatPriceCompact as g, formatPriceRange as h, formatPriceWithTax as i, formatProductPrice as j, getBasePrice as k, getCurrencySymbol as l, getDiscountPercentage as m, getDisplayPrice as n, getMarkupPercentage as o, getPriceRange as p, getProductCurrency as q, getTaxAmount as r, getUnitPriceAtQuantity as s, hasTaxInfo as t, isOnSale as u, isPaymentStatusFailure as v, isPaymentStatusRequiresAction as w, isPaymentStatusSuccess as x, isTaxInclusive as y, isValidPhoneForContext as z };
|