@cimplify/sdk 0.50.2 → 0.51.1
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/advanced.d.mts +1 -1
- package/dist/advanced.d.ts +1 -1
- package/dist/advanced.js +20 -20
- package/dist/advanced.mjs +1 -1
- package/dist/{chunk-D22UVSFN.js → chunk-CAG3TEXO.js} +2 -2
- package/dist/{chunk-CYGLTD7D.js → chunk-FJQC4VSN.js} +54 -43
- package/dist/{chunk-OFNVLUH4.mjs → chunk-FXACV333.mjs} +56 -53
- package/dist/{chunk-MBR2DBEN.mjs → chunk-GUZXQSGI.mjs} +20 -9
- package/dist/{chunk-24FK7VFL.mjs → chunk-QCS6D4XW.mjs} +1 -1
- package/dist/{chunk-DR4UPU6P.js → chunk-VOWMB2KR.js} +56 -53
- package/dist/{client-B8tJnOde.d.ts → client-B6x53-Al.d.ts} +45 -27
- package/dist/{client-BqCAm5vI.d.mts → client-BbrCopIS.d.mts} +1 -1
- package/dist/{client-BdbvMtOU.d.ts → client-BvEjhvwq.d.ts} +1 -1
- package/dist/{client-BZZK1txR.d.mts → client-CF2pmEE9.d.mts} +45 -27
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +61 -61
- package/dist/index.mjs +2 -2
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +16 -16
- package/dist/react.mjs +2 -2
- package/dist/server.d.mts +18 -10
- package/dist/server.d.ts +18 -10
- package/dist/server.js +9 -103
- package/dist/server.mjs +4 -98
- package/dist/testing/suite.d.mts +2 -2
- package/dist/testing/suite.d.ts +2 -2
- package/dist/testing/suite.js +22 -22
- package/dist/testing/suite.mjs +3 -3
- package/dist/testing.d.mts +2 -2
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +78 -78
- package/dist/testing.mjs +4 -4
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { safe, generateIdempotencyKey, CatalogueQueries, CartOperations, CheckoutService, OrderQueries, LinkService, AuthService, BusinessService, InventoryService, SchedulingService, LiteService, FxService, createElements } from './chunk-
|
|
1
|
+
import { safe, generateIdempotencyKey, CatalogueQueries, CartOperations, CheckoutService, OrderQueries, LinkService, AuthService, BusinessService, InventoryService, SchedulingService, LiteService, FxService, createElements } from './chunk-FXACV333.mjs';
|
|
2
2
|
import { CimplifyError, ErrorCode, IdempotencyMismatchError, enrichError } from './chunk-Z2AYLZDF.mjs';
|
|
3
3
|
|
|
4
4
|
// src/activity.ts
|
|
@@ -282,6 +282,14 @@ var DEFAULT_RETRY_DELAY_MS = 1e3;
|
|
|
282
282
|
function sleep(ms) {
|
|
283
283
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
284
284
|
}
|
|
285
|
+
function nextInit(cacheOptions) {
|
|
286
|
+
if (!cacheOptions) return {};
|
|
287
|
+
const next = {};
|
|
288
|
+
if (cacheOptions.revalidate !== void 0) next.revalidate = cacheOptions.revalidate;
|
|
289
|
+
if (cacheOptions.tags && cacheOptions.tags.length > 0) next.tags = [...cacheOptions.tags];
|
|
290
|
+
if (next.revalidate === void 0 && !next.tags) return {};
|
|
291
|
+
return { next };
|
|
292
|
+
}
|
|
285
293
|
function mergeOptionHeaders(base, opts) {
|
|
286
294
|
if (!opts) return base;
|
|
287
295
|
const merged = { ...base };
|
|
@@ -698,8 +706,9 @@ var CimplifyClient = class {
|
|
|
698
706
|
});
|
|
699
707
|
throw finalError;
|
|
700
708
|
}
|
|
701
|
-
getDedupeKey(type, payload) {
|
|
702
|
-
|
|
709
|
+
getDedupeKey(type, payload, cacheOptions) {
|
|
710
|
+
const cacheKey = cacheOptions ? `|${JSON.stringify(cacheOptions)}` : "";
|
|
711
|
+
return `${type}:${JSON.stringify(payload)}${cacheKey}`;
|
|
703
712
|
}
|
|
704
713
|
async deduplicatedRequest(key, requestFn) {
|
|
705
714
|
const existing = this.inflightRequests.get(key);
|
|
@@ -712,13 +721,14 @@ var CimplifyClient = class {
|
|
|
712
721
|
this.inflightRequests.set(key, request);
|
|
713
722
|
return request;
|
|
714
723
|
}
|
|
715
|
-
async get(path) {
|
|
716
|
-
const key = this.getDedupeKey("get", path);
|
|
724
|
+
async get(path, opts) {
|
|
725
|
+
const key = this.getDedupeKey("get", path, opts?.cacheOptions);
|
|
717
726
|
return this.deduplicatedRequest(key, async () => {
|
|
718
727
|
const response = await this.resilientFetch(this.buildUrl(this.baseUrl, path), {
|
|
719
728
|
method: "GET",
|
|
720
729
|
credentials: this.credentials,
|
|
721
|
-
headers: this.getHeaders()
|
|
730
|
+
headers: this.getHeaders(),
|
|
731
|
+
...nextInit(opts?.cacheOptions)
|
|
722
732
|
});
|
|
723
733
|
return this.handleRestResponse(response);
|
|
724
734
|
});
|
|
@@ -749,13 +759,14 @@ var CimplifyClient = class {
|
|
|
749
759
|
});
|
|
750
760
|
return this.handleRestResponse(response);
|
|
751
761
|
}
|
|
752
|
-
async linkGet(path) {
|
|
753
|
-
const key = this.getDedupeKey("linkGet", path);
|
|
762
|
+
async linkGet(path, opts) {
|
|
763
|
+
const key = this.getDedupeKey("linkGet", path, opts?.cacheOptions);
|
|
754
764
|
return this.deduplicatedRequest(key, async () => {
|
|
755
765
|
const response = await this.resilientFetch(`${this.linkApiUrl}${path}`, {
|
|
756
766
|
method: "GET",
|
|
757
767
|
credentials: this.credentials,
|
|
758
|
-
headers: this.getHeaders()
|
|
768
|
+
headers: this.getHeaders(),
|
|
769
|
+
...nextInit(opts?.cacheOptions)
|
|
759
770
|
});
|
|
760
771
|
return this.handleRestResponse(response);
|
|
761
772
|
});
|
|
@@ -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
|
|
|
@@ -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 ChatMessage as $, AuthService as A, BusinessService as B, CimplifyClient as C, type AutocompletePrediction as D, type AutocompleteResponse as E, type FetchQuoteInput as F, type GetProductsOptions as G, type PlaceDetailsResponse as H, InventoryService as I, type TrackCategoryViewOptions as J, type SessionMessage as K, LinkService as L, type SessionActivityData as M, type ActivityStateResponse as N, OrderQueries as O, type PriceQuote as P, type QuoteCompositeSelectionInput as Q, type RequestOptions as R, SubscriptionService as S, type TrackProductViewOptions as T, type UpdateProfileInput as U, type ActivityRecommendation as V, type ActivityRecommendationsResponse as W, type DismissMessageResponse as X, DeliveryService as Y, type DeliveryFeeResponse as Z, SupportService as _, type CimplifyConfig as a, unwrap as a$, type ChatConversation as a0, type ChatConversationResponse as a1, type ChatAttachment as a2, type ChatWidgetStarter as a3, type SenderType as a4, type ContentType as a5, type LiteBootstrap as a6, type TableInfo as a7, CimplifyElements as a8, CimplifyElement as a9, PAYMENT_METHOD as aA, CHECKOUT_STEP as aB, PAYMENT_STATE as aC, PICKUP_TIME_TYPE as aD, MOBILE_MONEY_PROVIDER as aE, AUTHORIZATION_TYPE as aF, DEVICE_TYPE as aG, CONTACT_TYPE as aH, LINK_QUERY as aI, LINK_MUTATION as aJ, AUTH_MUTATION as aK, CHECKOUT_MUTATION as aL, PAYMENT_MUTATION as aM, ORDER_MUTATION as aN, DEFAULT_CURRENCY as aO, DEFAULT_COUNTRY as aP, type Result as aQ, type Ok as aR, type Err as aS, ok as aT, err as aU, isOk as aV, isErr as aW, mapResult as aX, mapError as aY, flatMap as aZ, getOrElse as a_, createElements as aa, MESSAGE_TYPES as ab, EVENT_TYPES as ac, ELEMENT_TYPES as ad, type ElementsOptions as ae, type ElementOptions as af, type ElementType as ag, type ElementEventType as ah, type CheckoutMode as ai, type CheckoutOrderType as aj, type CheckoutPaymentMethod as ak, type CheckoutStep as al, type CheckoutFormData as am, type CheckoutResult as an, type NextAction as ao, type ProcessCheckoutOptions as ap, type ProcessCheckoutResult as aq, type ProcessAndResolveOptions as ar, type CheckoutStatus as as, type CheckoutStatusContext as at, type AbortablePromise as au, type MobileMoneyProvider as av, type DeviceType as aw, type ContactType as ax, CHECKOUT_MODE as ay, ORDER_TYPE as az, type ReadRequestOptions as b, type LocationTaxOverrides as b$, toNullable as b0, fromPromise as b1, tryCatch as b2, combine as b3, combineObject as b4, type CatalogueResult as b5, type CatalogueSnapshot as b6, type OrderStatus as b7, type PaymentState as b8, type OrderChannel as b9, type ServiceStatus as bA, type StaffRole as bB, type ReminderMethod as bC, type CustomerServicePreferences as bD, type BufferTimes as bE, type ReminderSettings as bF, type CancellationPolicy as bG, type ServiceNotes as bH, type PricingOverrides as bI, type SchedulingMetadata as bJ, type StaffAssignment as bK, type ResourceAssignment as bL, type SchedulingResult as bM, type DepositResult as bN, type ServiceScheduleRequest as bO, type StaffScheduleItem as bP, type LocationBooking as bQ, type ProviderResolutionSource as bR, type DeliveryFeeDetails as bS, type RelationType as bT, type RelatedProduct as bU, type RelatedCandidate as bV, type RelatedProductsEnrichment as bW, type BusinessType as bX, type BusinessPreferences as bY, type Business as bZ, type LocationTaxBehavior as b_, type LineType as ba, type OrderLineState as bb, type OrderLineStatus as bc, type FulfillmentType as bd, type FulfillmentStatus as be, type FulfillmentLink as bf, type OrderFulfillmentSummary as bg, type FeeBearerType as bh, type AmountToPay as bi, type LineItem as bj, type Order as bk, type OrderHistory as bl, type OrderGroupStatus as bm, type OrderGroupPaymentState as bn, type OrderGroupPaymentStatus as bo, type OrderGroup as bp, type OrderGroupPayment as bq, type OrderSplitDetail as br, type OrderGroupPaymentSummary as bs, type OrderGroupDetails as bt, type OrderPaymentEvent as bu, type OrderFilter as bv, type CheckoutInput as bw, type UpdateOrderStatusInput as bx, type CancelOrderInput as by, type RefundOrderInput as bz, createCimplifyClient as c, type MobileMoneyDetails as c$, type Location as c0, type TimeRange as c1, type TimeRanges as c2, type LocationTimeProfile as c3, type Table as c4, type Room as c5, type ServiceCharge as c6, type StorefrontBootstrap as c7, type BusinessWithLocations as c8, type LocationWithDetails as c9, type StockStatus as cA, type StockLevel as cB, type AvailabilityResult as cC, type Customer as cD, type CustomerAddress as cE, type CustomerMobileMoney as cF, type CustomerLinkPreferences as cG, type LinkData as cH, type CreateAddressInput as cI, type UpdateAddressInput as cJ, type CreateMobileMoneyInput as cK, type EnrollmentData as cL, type AddressData as cM, type MobileMoneyData as cN, type EnrollAndLinkOrderInput as cO, type LinkStatusResult as cP, type LinkEnrollResult as cQ, type EnrollAndLinkOrderResult as cR, type LinkSession as cS, type RevokeSessionResult as cT, type RevokeAllSessionsResult as cU, type RequestOtpInput as cV, type VerifyOtpInput as cW, type AuthResponse as cX, type PickupTimeType as cY, type PickupTime as cZ, type CheckoutAddressInfo as c_, type BusinessSettings as ca, type BusinessHours as cb, type CategoryInfo as cc, type Service as cd, type Staff as ce, type TimeSlot as cf, type SlotResourceInfo as cg, type SlotStaffInfo as ch, type AvailableSlot as ci, type DayAvailability as cj, type BookingStatus as ck, type Booking as cl, type BookingWithDetails as cm, type CustomerBookingServiceItem as cn, type CustomerBooking as co, type GetAvailableSlotsInput as cp, type CheckSlotAvailabilityInput as cq, type CheckSlotAvailabilityResult as cr, type RescheduleBookingInput as cs, type CancelBookingInput as ct, type CancelBookingResult as cu, type BookingModificationType as cv, type RescheduleBookingResult as cw, type ServiceAvailabilityParams as cx, type ServiceAvailabilityResult as cy, type RescheduleHistoryRecord as cz, type CacheOptions as d, type CheckoutCustomerInfo as d0, type FxQuoteRequest as d1, type FxQuote as d2, type FxRateResponse as d3, type RequestContext as d4, type RequestStartEvent as d5, type RequestSuccessEvent as d6, type RequestErrorEvent as d7, type RetryEvent as d8, type SessionChangeEvent as d9, type ObservabilityHooks as da, type OrderType as db, type ElementAppearance as dc, type AddressInfo as dd, type PaymentMethodInfo as de, type AuthenticatedCustomer as df, type ElementsCustomerInfo as dg, type AuthenticatedData as dh, type ElementsCheckoutData as di, type ElementsCheckoutResult as dj, type CheckoutCartItem as dk, type CheckoutCartData as dl, type ParentToIframeMessage as dm, type IframeToParentMessage as dn, type ElementEventHandler as dp, CatalogueQueries as e, type QuoteBundleSelectionInput as f, type RefreshQuoteInput as g, type QuoteStatus as h, type QuoteDynamicBuckets as i, type QuoteUiMessage as j, type RequestSource as k, type RefreshQuoteResult as l, CartOperations as m, type ReorderResult as n, CheckoutService as o, type GetOrdersOptions as p, type AuthStatus as q, type OtpResult as r, SchedulingService as s, LiteService as t, FxService as u, ActivityService as v, UploadService as w, type UploadResult as x, type UploadInitResponse as y, PlacesService as z };
|
|
@@ -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 ChatMessage as $, AuthService as A, BusinessService as B, CimplifyClient as C, type AutocompletePrediction as D, type AutocompleteResponse as E, type FetchQuoteInput as F, type GetProductsOptions as G, type PlaceDetailsResponse as H, InventoryService as I, type TrackCategoryViewOptions as J, type SessionMessage as K, LinkService as L, type SessionActivityData as M, type ActivityStateResponse as N, OrderQueries as O, type PriceQuote as P, type QuoteCompositeSelectionInput as Q, type RequestOptions as R, SubscriptionService as S, type TrackProductViewOptions as T, type UpdateProfileInput as U, type ActivityRecommendation as V, type ActivityRecommendationsResponse as W, type DismissMessageResponse as X, DeliveryService as Y, type DeliveryFeeResponse as Z, SupportService as _, type CimplifyConfig as a, unwrap as a$, type ChatConversation as a0, type ChatConversationResponse as a1, type ChatAttachment as a2, type ChatWidgetStarter as a3, type SenderType as a4, type ContentType as a5, type LiteBootstrap as a6, type TableInfo as a7, CimplifyElements as a8, CimplifyElement as a9, PAYMENT_METHOD as aA, CHECKOUT_STEP as aB, PAYMENT_STATE as aC, PICKUP_TIME_TYPE as aD, MOBILE_MONEY_PROVIDER as aE, AUTHORIZATION_TYPE as aF, DEVICE_TYPE as aG, CONTACT_TYPE as aH, LINK_QUERY as aI, LINK_MUTATION as aJ, AUTH_MUTATION as aK, CHECKOUT_MUTATION as aL, PAYMENT_MUTATION as aM, ORDER_MUTATION as aN, DEFAULT_CURRENCY as aO, DEFAULT_COUNTRY as aP, type Result as aQ, type Ok as aR, type Err as aS, ok as aT, err as aU, isOk as aV, isErr as aW, mapResult as aX, mapError as aY, flatMap as aZ, getOrElse as a_, createElements as aa, MESSAGE_TYPES as ab, EVENT_TYPES as ac, ELEMENT_TYPES as ad, type ElementsOptions as ae, type ElementOptions as af, type ElementType as ag, type ElementEventType as ah, type CheckoutMode as ai, type CheckoutOrderType as aj, type CheckoutPaymentMethod as ak, type CheckoutStep as al, type CheckoutFormData as am, type CheckoutResult as an, type NextAction as ao, type ProcessCheckoutOptions as ap, type ProcessCheckoutResult as aq, type ProcessAndResolveOptions as ar, type CheckoutStatus as as, type CheckoutStatusContext as at, type AbortablePromise as au, type MobileMoneyProvider as av, type DeviceType as aw, type ContactType as ax, CHECKOUT_MODE as ay, ORDER_TYPE as az, type ReadRequestOptions as b, type LocationTaxOverrides as b$, toNullable as b0, fromPromise as b1, tryCatch as b2, combine as b3, combineObject as b4, type CatalogueResult as b5, type CatalogueSnapshot as b6, type OrderStatus as b7, type PaymentState as b8, type OrderChannel as b9, type ServiceStatus as bA, type StaffRole as bB, type ReminderMethod as bC, type CustomerServicePreferences as bD, type BufferTimes as bE, type ReminderSettings as bF, type CancellationPolicy as bG, type ServiceNotes as bH, type PricingOverrides as bI, type SchedulingMetadata as bJ, type StaffAssignment as bK, type ResourceAssignment as bL, type SchedulingResult as bM, type DepositResult as bN, type ServiceScheduleRequest as bO, type StaffScheduleItem as bP, type LocationBooking as bQ, type ProviderResolutionSource as bR, type DeliveryFeeDetails as bS, type RelationType as bT, type RelatedProduct as bU, type RelatedCandidate as bV, type RelatedProductsEnrichment as bW, type BusinessType as bX, type BusinessPreferences as bY, type Business as bZ, type LocationTaxBehavior as b_, type LineType as ba, type OrderLineState as bb, type OrderLineStatus as bc, type FulfillmentType as bd, type FulfillmentStatus as be, type FulfillmentLink as bf, type OrderFulfillmentSummary as bg, type FeeBearerType as bh, type AmountToPay as bi, type LineItem as bj, type Order as bk, type OrderHistory as bl, type OrderGroupStatus as bm, type OrderGroupPaymentState as bn, type OrderGroupPaymentStatus as bo, type OrderGroup as bp, type OrderGroupPayment as bq, type OrderSplitDetail as br, type OrderGroupPaymentSummary as bs, type OrderGroupDetails as bt, type OrderPaymentEvent as bu, type OrderFilter as bv, type CheckoutInput as bw, type UpdateOrderStatusInput as bx, type CancelOrderInput as by, type RefundOrderInput as bz, createCimplifyClient as c, type MobileMoneyDetails as c$, type Location as c0, type TimeRange as c1, type TimeRanges as c2, type LocationTimeProfile as c3, type Table as c4, type Room as c5, type ServiceCharge as c6, type StorefrontBootstrap as c7, type BusinessWithLocations as c8, type LocationWithDetails as c9, type StockStatus as cA, type StockLevel as cB, type AvailabilityResult as cC, type Customer as cD, type CustomerAddress as cE, type CustomerMobileMoney as cF, type CustomerLinkPreferences as cG, type LinkData as cH, type CreateAddressInput as cI, type UpdateAddressInput as cJ, type CreateMobileMoneyInput as cK, type EnrollmentData as cL, type AddressData as cM, type MobileMoneyData as cN, type EnrollAndLinkOrderInput as cO, type LinkStatusResult as cP, type LinkEnrollResult as cQ, type EnrollAndLinkOrderResult as cR, type LinkSession as cS, type RevokeSessionResult as cT, type RevokeAllSessionsResult as cU, type RequestOtpInput as cV, type VerifyOtpInput as cW, type AuthResponse as cX, type PickupTimeType as cY, type PickupTime as cZ, type CheckoutAddressInfo as c_, type BusinessSettings as ca, type BusinessHours as cb, type CategoryInfo as cc, type Service as cd, type Staff as ce, type TimeSlot as cf, type SlotResourceInfo as cg, type SlotStaffInfo as ch, type AvailableSlot as ci, type DayAvailability as cj, type BookingStatus as ck, type Booking as cl, type BookingWithDetails as cm, type CustomerBookingServiceItem as cn, type CustomerBooking as co, type GetAvailableSlotsInput as cp, type CheckSlotAvailabilityInput as cq, type CheckSlotAvailabilityResult as cr, type RescheduleBookingInput as cs, type CancelBookingInput as ct, type CancelBookingResult as cu, type BookingModificationType as cv, type RescheduleBookingResult as cw, type ServiceAvailabilityParams as cx, type ServiceAvailabilityResult as cy, type RescheduleHistoryRecord as cz, type CacheOptions as d, type CheckoutCustomerInfo as d0, type FxQuoteRequest as d1, type FxQuote as d2, type FxRateResponse as d3, type RequestContext as d4, type RequestStartEvent as d5, type RequestSuccessEvent as d6, type RequestErrorEvent as d7, type RetryEvent as d8, type SessionChangeEvent as d9, type ObservabilityHooks as da, type OrderType as db, type ElementAppearance as dc, type AddressInfo as dd, type PaymentMethodInfo as de, type AuthenticatedCustomer as df, type ElementsCustomerInfo as dg, type AuthenticatedData as dh, type ElementsCheckoutData as di, type ElementsCheckoutResult as dj, type CheckoutCartItem as dk, type CheckoutCartData as dl, type ParentToIframeMessage as dm, type IframeToParentMessage as dn, type ElementEventHandler as dp, CatalogueQueries as e, type QuoteBundleSelectionInput as f, type RefreshQuoteInput as g, type QuoteStatus as h, type QuoteDynamicBuckets as i, type QuoteUiMessage as j, type RequestSource as k, type RefreshQuoteResult as l, CartOperations as m, type ReorderResult as n, CheckoutService as o, type GetOrdersOptions as p, type AuthStatus as q, type OtpResult as r, SchedulingService as s, LiteService as t, FxService as u, ActivityService as v, UploadService as w, type UploadResult as x, type UploadInitResponse as y, PlacesService as z };
|