@cimplify/sdk 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/dist/advanced.d.mts +1 -1
- package/dist/advanced.d.ts +1 -1
- package/dist/advanced.js +75 -21
- package/dist/advanced.mjs +75 -21
- package/dist/{client-hccS_JMl.d.mts → client-4qOxssTq.d.mts} +22 -3
- package/dist/{client-CyBNao15.d.ts → client-Djde3IXh.d.ts} +22 -3
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +99 -22
- package/dist/index.mjs +99 -22
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +99 -22
- package/dist/react.mjs +99 -22
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,6 +24,11 @@ const productsResult = await cimplify.catalogue.getProducts();
|
|
|
24
24
|
if (!productsResult.ok) throw productsResult.error;
|
|
25
25
|
const products = productsResult.value.items;
|
|
26
26
|
|
|
27
|
+
// Fetch full catalogue envelope (products + categories + add-ons)
|
|
28
|
+
const catalogueResult = await cimplify.catalogue.getCatalogue();
|
|
29
|
+
if (!catalogueResult.ok) throw catalogueResult.error;
|
|
30
|
+
const { categories, add_ons } = catalogueResult.value;
|
|
31
|
+
|
|
27
32
|
// Add to cart
|
|
28
33
|
await cimplify.cart.addItem({ item_id: "product-id", quantity: 1 });
|
|
29
34
|
|
|
@@ -42,11 +47,18 @@ const cart = await cimplify.cart.get();
|
|
|
42
47
|
|
|
43
48
|
```typescript
|
|
44
49
|
// Products
|
|
50
|
+
// getProducts() is list-focused (items + pagination/truncation metadata)
|
|
45
51
|
const productsResult = await cimplify.catalogue.getProducts();
|
|
46
52
|
const featuredResult = await cimplify.catalogue.getProducts({ featured: true, limit: 10 });
|
|
47
53
|
if (!productsResult.ok || !featuredResult.ok) throw new Error("Failed to fetch products");
|
|
48
54
|
const products = productsResult.value.items;
|
|
49
55
|
const featured = featuredResult.value.items;
|
|
56
|
+
|
|
57
|
+
// Full catalogue envelope when you need categories/add-ons alongside products
|
|
58
|
+
const catalogueResult = await cimplify.catalogue.getCatalogue();
|
|
59
|
+
if (!catalogueResult.ok) throw catalogueResult.error;
|
|
60
|
+
const { categories, add_ons } = catalogueResult.value;
|
|
61
|
+
|
|
50
62
|
const product = await cimplify.catalogue.getProduct("product-id");
|
|
51
63
|
const product = await cimplify.catalogue.getProductBySlug("my-product");
|
|
52
64
|
|
package/dist/advanced.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, v as CimplifyElement, u as CimplifyElements, x as ELEMENT_TYPES, E as EVENT_TYPES, H as ElementEventType, z as ElementOptions, D as ElementType, y as ElementsOptions, F as FetchQuoteInput, r as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, q as LiteService, M as MESSAGE_TYPES, O as OrderQueries, P as PriceQuote, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, p as SchedulingService, S as SearchOptions, w as createElements, k as generateIdempotencyKey } from './client-
|
|
1
|
+
export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, v as CimplifyElement, u as CimplifyElements, x as ELEMENT_TYPES, E as EVENT_TYPES, H as ElementEventType, z as ElementOptions, D as ElementType, y as ElementsOptions, F as FetchQuoteInput, r as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, q as LiteService, M as MESSAGE_TYPES, O as OrderQueries, P as PriceQuote, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, p as SchedulingService, S as SearchOptions, w as createElements, k as generateIdempotencyKey } from './client-4qOxssTq.mjs';
|
|
2
2
|
import './payment-CLIWNMaP.mjs';
|
|
3
3
|
|
|
4
4
|
type Operator = "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "startsWith";
|
package/dist/advanced.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, v as CimplifyElement, u as CimplifyElements, x as ELEMENT_TYPES, E as EVENT_TYPES, H as ElementEventType, z as ElementOptions, D as ElementType, y as ElementsOptions, F as FetchQuoteInput, r as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, q as LiteService, M as MESSAGE_TYPES, O as OrderQueries, P as PriceQuote, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, p as SchedulingService, S as SearchOptions, w as createElements, k as generateIdempotencyKey } from './client-
|
|
1
|
+
export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, v as CimplifyElement, u as CimplifyElements, x as ELEMENT_TYPES, E as EVENT_TYPES, H as ElementEventType, z as ElementOptions, D as ElementType, y as ElementsOptions, F as FetchQuoteInput, r as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, q as LiteService, M as MESSAGE_TYPES, O as OrderQueries, P as PriceQuote, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, p as SchedulingService, S as SearchOptions, w as createElements, k as generateIdempotencyKey } from './client-Djde3IXh.js';
|
|
2
2
|
import './payment-CLIWNMaP.js';
|
|
3
3
|
|
|
4
4
|
type Operator = "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "startsWith";
|
package/dist/advanced.js
CHANGED
|
@@ -233,6 +233,22 @@ function readFinalPrice(value) {
|
|
|
233
233
|
}
|
|
234
234
|
return void 0;
|
|
235
235
|
}
|
|
236
|
+
function normalizeAddOnPayload(addOn) {
|
|
237
|
+
if (!isRecord(addOn)) return addOn;
|
|
238
|
+
const normalizedAddOn = { ...addOn };
|
|
239
|
+
const options = normalizedAddOn["options"];
|
|
240
|
+
if (!Array.isArray(options)) return normalizedAddOn;
|
|
241
|
+
normalizedAddOn["options"] = options.map((option) => {
|
|
242
|
+
if (!isRecord(option)) return option;
|
|
243
|
+
const normalizedOption = { ...option };
|
|
244
|
+
const optionPrice = normalizedOption["default_price"];
|
|
245
|
+
if (optionPrice === void 0 || optionPrice === null || optionPrice === "") {
|
|
246
|
+
normalizedOption["default_price"] = readFinalPrice(normalizedOption["default_price_info"]) || readFinalPrice(normalizedOption["price_info"]) || "0";
|
|
247
|
+
}
|
|
248
|
+
return normalizedOption;
|
|
249
|
+
});
|
|
250
|
+
return normalizedAddOn;
|
|
251
|
+
}
|
|
236
252
|
function normalizeCatalogueProductPayload(product) {
|
|
237
253
|
const normalized = { ...product };
|
|
238
254
|
const defaultPrice = normalized["default_price"];
|
|
@@ -254,22 +270,7 @@ function normalizeCatalogueProductPayload(product) {
|
|
|
254
270
|
}
|
|
255
271
|
const addOns = normalized["add_ons"];
|
|
256
272
|
if (Array.isArray(addOns)) {
|
|
257
|
-
normalized["add_ons"] = addOns.map((addOn) =>
|
|
258
|
-
if (!isRecord(addOn)) return addOn;
|
|
259
|
-
const normalizedAddOn = { ...addOn };
|
|
260
|
-
const options = normalizedAddOn["options"];
|
|
261
|
-
if (!Array.isArray(options)) return normalizedAddOn;
|
|
262
|
-
normalizedAddOn["options"] = options.map((option) => {
|
|
263
|
-
if (!isRecord(option)) return option;
|
|
264
|
-
const normalizedOption = { ...option };
|
|
265
|
-
const optionPrice = normalizedOption["default_price"];
|
|
266
|
-
if (optionPrice === void 0 || optionPrice === null || optionPrice === "") {
|
|
267
|
-
normalizedOption["default_price"] = readFinalPrice(normalizedOption["default_price_info"]) || readFinalPrice(normalizedOption["price_info"]) || "0";
|
|
268
|
-
}
|
|
269
|
-
return normalizedOption;
|
|
270
|
-
});
|
|
271
|
-
return normalizedAddOn;
|
|
272
|
-
});
|
|
273
|
+
normalized["add_ons"] = addOns.map((addOn) => normalizeAddOnPayload(addOn));
|
|
273
274
|
}
|
|
274
275
|
return normalized;
|
|
275
276
|
}
|
|
@@ -342,10 +343,47 @@ function normalizeCatalogueResult(payload) {
|
|
|
342
343
|
pagination: normalizePagination(payload.pagination)
|
|
343
344
|
};
|
|
344
345
|
}
|
|
346
|
+
function normalizeCatalogueSnapshot(payload) {
|
|
347
|
+
if (Array.isArray(payload)) {
|
|
348
|
+
return {
|
|
349
|
+
categories: [],
|
|
350
|
+
products: payload.map((product) => normalizeCatalogueProductPayload(product)),
|
|
351
|
+
add_ons: [],
|
|
352
|
+
is_complete: true
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
if (!isRecord(payload)) {
|
|
356
|
+
return {
|
|
357
|
+
categories: [],
|
|
358
|
+
products: [],
|
|
359
|
+
add_ons: [],
|
|
360
|
+
is_complete: true
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
const rawProducts = Array.isArray(payload.products) ? payload.products : Array.isArray(payload.items) ? payload.items : [];
|
|
364
|
+
const rawCategories = Array.isArray(payload.categories) ? payload.categories : [];
|
|
365
|
+
const rawAddOns = Array.isArray(payload.add_ons) ? payload.add_ons : [];
|
|
366
|
+
return {
|
|
367
|
+
categories: rawCategories,
|
|
368
|
+
products: rawProducts.map((product) => normalizeCatalogueProductPayload(product)),
|
|
369
|
+
add_ons: rawAddOns.map((addOn) => normalizeAddOnPayload(addOn)),
|
|
370
|
+
is_complete: typeof payload.is_complete === "boolean" ? payload.is_complete : true,
|
|
371
|
+
total_available: toFiniteNumber(payload.total_available),
|
|
372
|
+
pagination: normalizePagination(payload.pagination)
|
|
373
|
+
};
|
|
374
|
+
}
|
|
345
375
|
var CatalogueQueries = class {
|
|
346
376
|
constructor(client) {
|
|
347
377
|
this.client = client;
|
|
348
378
|
}
|
|
379
|
+
async getCatalogue() {
|
|
380
|
+
const result = await safeWithFallback(
|
|
381
|
+
() => this.client.get("/api/v1/catalogue"),
|
|
382
|
+
() => this.client.query("catalogue")
|
|
383
|
+
);
|
|
384
|
+
if (!result.ok) return result;
|
|
385
|
+
return ok(normalizeCatalogueSnapshot(result.value));
|
|
386
|
+
}
|
|
349
387
|
async getProducts(options) {
|
|
350
388
|
let query2 = "products";
|
|
351
389
|
const filters = [];
|
|
@@ -1696,12 +1734,16 @@ var CheckoutService = class {
|
|
|
1696
1734
|
constructor(client) {
|
|
1697
1735
|
this.client = client;
|
|
1698
1736
|
}
|
|
1737
|
+
orderTokenParam(orderId) {
|
|
1738
|
+
const token = this.client.getOrderToken(orderId);
|
|
1739
|
+
return token ? `?token=${encodeURIComponent(token)}` : "";
|
|
1740
|
+
}
|
|
1699
1741
|
async process(data) {
|
|
1700
1742
|
const checkoutData = {
|
|
1701
1743
|
...data,
|
|
1702
1744
|
idempotency_key: data.idempotency_key || generateIdempotencyKey()
|
|
1703
1745
|
};
|
|
1704
|
-
|
|
1746
|
+
const result = await safeWithFallback3(
|
|
1705
1747
|
() => this.client.post("/api/v1/checkout", {
|
|
1706
1748
|
checkout_data: checkoutData
|
|
1707
1749
|
}),
|
|
@@ -1709,6 +1751,10 @@ var CheckoutService = class {
|
|
|
1709
1751
|
checkout_data: checkoutData
|
|
1710
1752
|
})
|
|
1711
1753
|
);
|
|
1754
|
+
if (result.ok && result.value.bill_token) {
|
|
1755
|
+
this.client.setOrderToken(result.value.order_id, result.value.bill_token);
|
|
1756
|
+
}
|
|
1757
|
+
return result;
|
|
1712
1758
|
}
|
|
1713
1759
|
async initializePayment(orderId, method) {
|
|
1714
1760
|
return safe3(
|
|
@@ -1726,15 +1772,17 @@ var CheckoutService = class {
|
|
|
1726
1772
|
}
|
|
1727
1773
|
async pollPaymentStatus(orderId) {
|
|
1728
1774
|
const encodedId = encodeURIComponent(orderId);
|
|
1775
|
+
const tokenParam = this.orderTokenParam(orderId);
|
|
1729
1776
|
return safeWithFallback3(
|
|
1730
|
-
() => this.client.get(`/api/v1/orders/${encodedId}/payment-status`),
|
|
1777
|
+
() => this.client.get(`/api/v1/orders/${encodedId}/payment-status${tokenParam}`),
|
|
1731
1778
|
() => this.client.call(PAYMENT_MUTATION.CHECK_STATUS, orderId)
|
|
1732
1779
|
);
|
|
1733
1780
|
}
|
|
1734
1781
|
async updateOrderCustomer(orderId, customer) {
|
|
1735
1782
|
const encodedId = encodeURIComponent(orderId);
|
|
1783
|
+
const tokenParam = this.orderTokenParam(orderId);
|
|
1736
1784
|
return safeWithFallback3(
|
|
1737
|
-
() => this.client.post(`/api/v1/orders/${encodedId}/customer`, customer),
|
|
1785
|
+
() => this.client.post(`/api/v1/orders/${encodedId}/customer${tokenParam}`, customer),
|
|
1738
1786
|
() => this.client.call(ORDER_MUTATION.UPDATE_CUSTOMER, {
|
|
1739
1787
|
order_id: orderId,
|
|
1740
1788
|
...customer
|
|
@@ -1877,6 +1925,10 @@ var OrderQueries = class {
|
|
|
1877
1925
|
constructor(client) {
|
|
1878
1926
|
this.client = client;
|
|
1879
1927
|
}
|
|
1928
|
+
orderTokenParam(orderId) {
|
|
1929
|
+
const token = this.client.getOrderToken(orderId);
|
|
1930
|
+
return token ? `?token=${encodeURIComponent(token)}` : "";
|
|
1931
|
+
}
|
|
1880
1932
|
async list(options) {
|
|
1881
1933
|
let query2 = "orders";
|
|
1882
1934
|
if (options?.status) {
|
|
@@ -1901,8 +1953,9 @@ var OrderQueries = class {
|
|
|
1901
1953
|
}
|
|
1902
1954
|
async get(orderId) {
|
|
1903
1955
|
const encodedId = encodeURIComponent(orderId);
|
|
1956
|
+
const tokenParam = this.orderTokenParam(orderId);
|
|
1904
1957
|
return safeWithFallback4(
|
|
1905
|
-
() => this.client.get(`/api/v1/orders/${encodedId}`),
|
|
1958
|
+
() => this.client.get(`/api/v1/orders/${encodedId}${tokenParam}`),
|
|
1906
1959
|
() => this.client.query(`orders.${orderId}`)
|
|
1907
1960
|
);
|
|
1908
1961
|
}
|
|
@@ -1914,8 +1967,9 @@ var OrderQueries = class {
|
|
|
1914
1967
|
}
|
|
1915
1968
|
async cancel(orderId, reason) {
|
|
1916
1969
|
const encodedId = encodeURIComponent(orderId);
|
|
1970
|
+
const tokenParam = this.orderTokenParam(orderId);
|
|
1917
1971
|
return safeWithFallback4(
|
|
1918
|
-
() => this.client.post(`/api/v1/orders/${encodedId}/cancel`, {
|
|
1972
|
+
() => this.client.post(`/api/v1/orders/${encodedId}/cancel${tokenParam}`, {
|
|
1919
1973
|
reason
|
|
1920
1974
|
}),
|
|
1921
1975
|
() => this.client.call("order.cancelOrder", {
|
package/dist/advanced.mjs
CHANGED
|
@@ -231,6 +231,22 @@ function readFinalPrice(value) {
|
|
|
231
231
|
}
|
|
232
232
|
return void 0;
|
|
233
233
|
}
|
|
234
|
+
function normalizeAddOnPayload(addOn) {
|
|
235
|
+
if (!isRecord(addOn)) return addOn;
|
|
236
|
+
const normalizedAddOn = { ...addOn };
|
|
237
|
+
const options = normalizedAddOn["options"];
|
|
238
|
+
if (!Array.isArray(options)) return normalizedAddOn;
|
|
239
|
+
normalizedAddOn["options"] = options.map((option) => {
|
|
240
|
+
if (!isRecord(option)) return option;
|
|
241
|
+
const normalizedOption = { ...option };
|
|
242
|
+
const optionPrice = normalizedOption["default_price"];
|
|
243
|
+
if (optionPrice === void 0 || optionPrice === null || optionPrice === "") {
|
|
244
|
+
normalizedOption["default_price"] = readFinalPrice(normalizedOption["default_price_info"]) || readFinalPrice(normalizedOption["price_info"]) || "0";
|
|
245
|
+
}
|
|
246
|
+
return normalizedOption;
|
|
247
|
+
});
|
|
248
|
+
return normalizedAddOn;
|
|
249
|
+
}
|
|
234
250
|
function normalizeCatalogueProductPayload(product) {
|
|
235
251
|
const normalized = { ...product };
|
|
236
252
|
const defaultPrice = normalized["default_price"];
|
|
@@ -252,22 +268,7 @@ function normalizeCatalogueProductPayload(product) {
|
|
|
252
268
|
}
|
|
253
269
|
const addOns = normalized["add_ons"];
|
|
254
270
|
if (Array.isArray(addOns)) {
|
|
255
|
-
normalized["add_ons"] = addOns.map((addOn) =>
|
|
256
|
-
if (!isRecord(addOn)) return addOn;
|
|
257
|
-
const normalizedAddOn = { ...addOn };
|
|
258
|
-
const options = normalizedAddOn["options"];
|
|
259
|
-
if (!Array.isArray(options)) return normalizedAddOn;
|
|
260
|
-
normalizedAddOn["options"] = options.map((option) => {
|
|
261
|
-
if (!isRecord(option)) return option;
|
|
262
|
-
const normalizedOption = { ...option };
|
|
263
|
-
const optionPrice = normalizedOption["default_price"];
|
|
264
|
-
if (optionPrice === void 0 || optionPrice === null || optionPrice === "") {
|
|
265
|
-
normalizedOption["default_price"] = readFinalPrice(normalizedOption["default_price_info"]) || readFinalPrice(normalizedOption["price_info"]) || "0";
|
|
266
|
-
}
|
|
267
|
-
return normalizedOption;
|
|
268
|
-
});
|
|
269
|
-
return normalizedAddOn;
|
|
270
|
-
});
|
|
271
|
+
normalized["add_ons"] = addOns.map((addOn) => normalizeAddOnPayload(addOn));
|
|
271
272
|
}
|
|
272
273
|
return normalized;
|
|
273
274
|
}
|
|
@@ -340,10 +341,47 @@ function normalizeCatalogueResult(payload) {
|
|
|
340
341
|
pagination: normalizePagination(payload.pagination)
|
|
341
342
|
};
|
|
342
343
|
}
|
|
344
|
+
function normalizeCatalogueSnapshot(payload) {
|
|
345
|
+
if (Array.isArray(payload)) {
|
|
346
|
+
return {
|
|
347
|
+
categories: [],
|
|
348
|
+
products: payload.map((product) => normalizeCatalogueProductPayload(product)),
|
|
349
|
+
add_ons: [],
|
|
350
|
+
is_complete: true
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
if (!isRecord(payload)) {
|
|
354
|
+
return {
|
|
355
|
+
categories: [],
|
|
356
|
+
products: [],
|
|
357
|
+
add_ons: [],
|
|
358
|
+
is_complete: true
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
const rawProducts = Array.isArray(payload.products) ? payload.products : Array.isArray(payload.items) ? payload.items : [];
|
|
362
|
+
const rawCategories = Array.isArray(payload.categories) ? payload.categories : [];
|
|
363
|
+
const rawAddOns = Array.isArray(payload.add_ons) ? payload.add_ons : [];
|
|
364
|
+
return {
|
|
365
|
+
categories: rawCategories,
|
|
366
|
+
products: rawProducts.map((product) => normalizeCatalogueProductPayload(product)),
|
|
367
|
+
add_ons: rawAddOns.map((addOn) => normalizeAddOnPayload(addOn)),
|
|
368
|
+
is_complete: typeof payload.is_complete === "boolean" ? payload.is_complete : true,
|
|
369
|
+
total_available: toFiniteNumber(payload.total_available),
|
|
370
|
+
pagination: normalizePagination(payload.pagination)
|
|
371
|
+
};
|
|
372
|
+
}
|
|
343
373
|
var CatalogueQueries = class {
|
|
344
374
|
constructor(client) {
|
|
345
375
|
this.client = client;
|
|
346
376
|
}
|
|
377
|
+
async getCatalogue() {
|
|
378
|
+
const result = await safeWithFallback(
|
|
379
|
+
() => this.client.get("/api/v1/catalogue"),
|
|
380
|
+
() => this.client.query("catalogue")
|
|
381
|
+
);
|
|
382
|
+
if (!result.ok) return result;
|
|
383
|
+
return ok(normalizeCatalogueSnapshot(result.value));
|
|
384
|
+
}
|
|
347
385
|
async getProducts(options) {
|
|
348
386
|
let query2 = "products";
|
|
349
387
|
const filters = [];
|
|
@@ -1694,12 +1732,16 @@ var CheckoutService = class {
|
|
|
1694
1732
|
constructor(client) {
|
|
1695
1733
|
this.client = client;
|
|
1696
1734
|
}
|
|
1735
|
+
orderTokenParam(orderId) {
|
|
1736
|
+
const token = this.client.getOrderToken(orderId);
|
|
1737
|
+
return token ? `?token=${encodeURIComponent(token)}` : "";
|
|
1738
|
+
}
|
|
1697
1739
|
async process(data) {
|
|
1698
1740
|
const checkoutData = {
|
|
1699
1741
|
...data,
|
|
1700
1742
|
idempotency_key: data.idempotency_key || generateIdempotencyKey()
|
|
1701
1743
|
};
|
|
1702
|
-
|
|
1744
|
+
const result = await safeWithFallback3(
|
|
1703
1745
|
() => this.client.post("/api/v1/checkout", {
|
|
1704
1746
|
checkout_data: checkoutData
|
|
1705
1747
|
}),
|
|
@@ -1707,6 +1749,10 @@ var CheckoutService = class {
|
|
|
1707
1749
|
checkout_data: checkoutData
|
|
1708
1750
|
})
|
|
1709
1751
|
);
|
|
1752
|
+
if (result.ok && result.value.bill_token) {
|
|
1753
|
+
this.client.setOrderToken(result.value.order_id, result.value.bill_token);
|
|
1754
|
+
}
|
|
1755
|
+
return result;
|
|
1710
1756
|
}
|
|
1711
1757
|
async initializePayment(orderId, method) {
|
|
1712
1758
|
return safe3(
|
|
@@ -1724,15 +1770,17 @@ var CheckoutService = class {
|
|
|
1724
1770
|
}
|
|
1725
1771
|
async pollPaymentStatus(orderId) {
|
|
1726
1772
|
const encodedId = encodeURIComponent(orderId);
|
|
1773
|
+
const tokenParam = this.orderTokenParam(orderId);
|
|
1727
1774
|
return safeWithFallback3(
|
|
1728
|
-
() => this.client.get(`/api/v1/orders/${encodedId}/payment-status`),
|
|
1775
|
+
() => this.client.get(`/api/v1/orders/${encodedId}/payment-status${tokenParam}`),
|
|
1729
1776
|
() => this.client.call(PAYMENT_MUTATION.CHECK_STATUS, orderId)
|
|
1730
1777
|
);
|
|
1731
1778
|
}
|
|
1732
1779
|
async updateOrderCustomer(orderId, customer) {
|
|
1733
1780
|
const encodedId = encodeURIComponent(orderId);
|
|
1781
|
+
const tokenParam = this.orderTokenParam(orderId);
|
|
1734
1782
|
return safeWithFallback3(
|
|
1735
|
-
() => this.client.post(`/api/v1/orders/${encodedId}/customer`, customer),
|
|
1783
|
+
() => this.client.post(`/api/v1/orders/${encodedId}/customer${tokenParam}`, customer),
|
|
1736
1784
|
() => this.client.call(ORDER_MUTATION.UPDATE_CUSTOMER, {
|
|
1737
1785
|
order_id: orderId,
|
|
1738
1786
|
...customer
|
|
@@ -1875,6 +1923,10 @@ var OrderQueries = class {
|
|
|
1875
1923
|
constructor(client) {
|
|
1876
1924
|
this.client = client;
|
|
1877
1925
|
}
|
|
1926
|
+
orderTokenParam(orderId) {
|
|
1927
|
+
const token = this.client.getOrderToken(orderId);
|
|
1928
|
+
return token ? `?token=${encodeURIComponent(token)}` : "";
|
|
1929
|
+
}
|
|
1878
1930
|
async list(options) {
|
|
1879
1931
|
let query2 = "orders";
|
|
1880
1932
|
if (options?.status) {
|
|
@@ -1899,8 +1951,9 @@ var OrderQueries = class {
|
|
|
1899
1951
|
}
|
|
1900
1952
|
async get(orderId) {
|
|
1901
1953
|
const encodedId = encodeURIComponent(orderId);
|
|
1954
|
+
const tokenParam = this.orderTokenParam(orderId);
|
|
1902
1955
|
return safeWithFallback4(
|
|
1903
|
-
() => this.client.get(`/api/v1/orders/${encodedId}`),
|
|
1956
|
+
() => this.client.get(`/api/v1/orders/${encodedId}${tokenParam}`),
|
|
1904
1957
|
() => this.client.query(`orders.${orderId}`)
|
|
1905
1958
|
);
|
|
1906
1959
|
}
|
|
@@ -1912,8 +1965,9 @@ var OrderQueries = class {
|
|
|
1912
1965
|
}
|
|
1913
1966
|
async cancel(orderId, reason) {
|
|
1914
1967
|
const encodedId = encodeURIComponent(orderId);
|
|
1968
|
+
const tokenParam = this.orderTokenParam(orderId);
|
|
1915
1969
|
return safeWithFallback4(
|
|
1916
|
-
() => this.client.post(`/api/v1/orders/${encodedId}/cancel`, {
|
|
1970
|
+
() => this.client.post(`/api/v1/orders/${encodedId}/cancel${tokenParam}`, {
|
|
1917
1971
|
reason
|
|
1918
1972
|
}),
|
|
1919
1973
|
() => this.client.call("order.cancelOrder", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { K as Category, q as Product, F as AddOnWithOptions, d as Pagination, h as CimplifyError, r as ProductWithDetails, s as ProductVariant, u as VariantAxis, z as VariantAxisSelection, B as AddOn, N as Collection, T as Bundle, X as BundleWithDetails, a2 as Composite, a3 as CompositeWithDetails, a7 as ComponentSelectionInput, a8 as CompositePriceResult, an as ChosenPrice, aS as UICart, aD as Cart, aE as CartItem, aW as CartSummary, aU as AddToCartInput, aV as UpdateCartItemInput, ar as DiscountDetails, M as Money, C as CurrencyCode, aC as LineConfiguration, a_ as AuthorizationType, b0 as PaymentMethod, b2 as InitializePaymentResult, b6 as SubmitAuthorizationInput, b4 as PaymentStatusResponse } from './payment-CLIWNMaP.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Observability hooks for monitoring SDK behavior.
|
|
@@ -104,6 +104,18 @@ interface CatalogueResult<T> {
|
|
|
104
104
|
/** Pagination metadata when listing is paginated. */
|
|
105
105
|
pagination?: Pagination;
|
|
106
106
|
}
|
|
107
|
+
/** Full catalogue envelope (products + categories + add-ons + metadata). */
|
|
108
|
+
interface CatalogueSnapshot {
|
|
109
|
+
categories: Category[];
|
|
110
|
+
products: Product[];
|
|
111
|
+
add_ons: AddOnWithOptions[];
|
|
112
|
+
/** true when the full catalogue is returned; false when truncated by server cap. */
|
|
113
|
+
is_complete: boolean;
|
|
114
|
+
/** Total available products before truncation (present when truncated). */
|
|
115
|
+
total_available?: number;
|
|
116
|
+
/** Pagination metadata when listing is paginated. */
|
|
117
|
+
pagination?: Pagination;
|
|
118
|
+
}
|
|
107
119
|
|
|
108
120
|
/**
|
|
109
121
|
* A Result type that makes errors explicit in the type system.
|
|
@@ -349,6 +361,7 @@ interface RefreshQuoteResult {
|
|
|
349
361
|
declare class CatalogueQueries {
|
|
350
362
|
private client;
|
|
351
363
|
constructor(client: CimplifyClient);
|
|
364
|
+
getCatalogue(): Promise<Result<CatalogueSnapshot, CimplifyError>>;
|
|
352
365
|
getProducts(options?: GetProductsOptions): Promise<Result<CatalogueResult<Product>, CimplifyError>>;
|
|
353
366
|
getProduct(id: string): Promise<Result<ProductWithDetails, CimplifyError>>;
|
|
354
367
|
getProductBySlug(slug: string): Promise<Result<ProductWithDetails, CimplifyError>>;
|
|
@@ -1099,6 +1112,8 @@ interface CheckoutFormData {
|
|
|
1099
1112
|
interface CheckoutResult {
|
|
1100
1113
|
order_id: string;
|
|
1101
1114
|
order_number: string;
|
|
1115
|
+
/** Token for guest order access. Store this and pass as `?token=` on order endpoints. */
|
|
1116
|
+
bill_token?: string;
|
|
1102
1117
|
payment_reference?: string;
|
|
1103
1118
|
payment_status: string;
|
|
1104
1119
|
requires_authorization: boolean;
|
|
@@ -1176,6 +1191,7 @@ declare function generateIdempotencyKey(): string;
|
|
|
1176
1191
|
declare class CheckoutService {
|
|
1177
1192
|
private client;
|
|
1178
1193
|
constructor(client: CimplifyClient);
|
|
1194
|
+
private orderTokenParam;
|
|
1179
1195
|
process(data: CheckoutFormData): Promise<Result<CheckoutResult, CimplifyError>>;
|
|
1180
1196
|
initializePayment(orderId: string, method: PaymentMethod): Promise<Result<InitializePaymentResult, CimplifyError>>;
|
|
1181
1197
|
submitAuthorization(input: SubmitAuthorizationInput): Promise<Result<CheckoutResult, CimplifyError>>;
|
|
@@ -1209,6 +1225,7 @@ interface GetOrdersOptions {
|
|
|
1209
1225
|
declare class OrderQueries {
|
|
1210
1226
|
private client;
|
|
1211
1227
|
constructor(client: CimplifyClient);
|
|
1228
|
+
private orderTokenParam;
|
|
1212
1229
|
list(options?: GetOrdersOptions): Promise<Result<Order[], CimplifyError>>;
|
|
1213
1230
|
get(orderId: string): Promise<Result<Order, CimplifyError>>;
|
|
1214
1231
|
getRecent(limit?: number): Promise<Result<Order[], CimplifyError>>;
|
|
@@ -2310,7 +2327,9 @@ declare class CimplifyClient {
|
|
|
2310
2327
|
isTestMode(): boolean;
|
|
2311
2328
|
setAccessToken(token: string | null): void;
|
|
2312
2329
|
clearSession(): void;
|
|
2313
|
-
|
|
2330
|
+
setOrderToken(orderId: string, token: string): void;
|
|
2331
|
+
getOrderToken(orderId: string): string | null;
|
|
2332
|
+
clearOrderTokens(): void;
|
|
2314
2333
|
setLocationId(locationId: string | null): void;
|
|
2315
2334
|
/** Get the currently active location ID */
|
|
2316
2335
|
getLocationId(): string | null;
|
|
@@ -2369,4 +2388,4 @@ declare class CimplifyClient {
|
|
|
2369
2388
|
}
|
|
2370
2389
|
declare function createCimplifyClient(config?: CimplifyConfig): CimplifyClient;
|
|
2371
2390
|
|
|
2372
|
-
export { type ProcessAndResolveOptions as $, AuthService as A, BusinessService as B, CimplifyClient as C, type ElementType as D, EVENT_TYPES as E, type FetchQuoteInput as F, type GetProductsOptions as G, type ElementEventType as H, InventoryService as I, type CheckoutMode as J, type KitchenOrderItem as K, LinkService as L, MESSAGE_TYPES as M, type CheckoutOrderType as N, OrderQueries as O, type PriceQuote as P, type QuoteCompositeSelectionInput as Q, type RefreshQuoteInput as R, type SearchOptions as S, type TableInfo as T, type UpdateProfileInput as U, type CheckoutPaymentMethod as V, type CheckoutStep as W, type CheckoutFormData as X, type CheckoutResult as Y, type ProcessCheckoutOptions as Z, type ProcessCheckoutResult as _, type CimplifyConfig as a, type
|
|
2391
|
+
export { type ProcessAndResolveOptions as $, AuthService as A, BusinessService as B, CimplifyClient as C, type ElementType as D, EVENT_TYPES as E, type FetchQuoteInput as F, type GetProductsOptions as G, type ElementEventType as H, InventoryService as I, type CheckoutMode as J, type KitchenOrderItem as K, LinkService as L, MESSAGE_TYPES as M, type CheckoutOrderType as N, OrderQueries as O, type PriceQuote as P, type QuoteCompositeSelectionInput as Q, type RefreshQuoteInput as R, type SearchOptions as S, type TableInfo as T, type UpdateProfileInput as U, type CheckoutPaymentMethod as V, type CheckoutStep as W, type CheckoutFormData as X, type CheckoutResult as Y, type ProcessCheckoutOptions as Z, type ProcessCheckoutResult as _, type CimplifyConfig as a, type OrderGroupDetails as a$, type CheckoutStatus as a0, type CheckoutStatusContext as a1, type AbortablePromise as a2, type MobileMoneyProvider as a3, type DeviceType as a4, type ContactType as a5, CHECKOUT_MODE as a6, ORDER_TYPE as a7, PAYMENT_METHOD as a8, CHECKOUT_STEP as a9, toNullable as aA, fromPromise as aB, tryCatch as aC, combine as aD, combineObject as aE, type CatalogueResult as aF, type CatalogueSnapshot as aG, type OrderStatus as aH, type PaymentState as aI, type OrderChannel as aJ, type LineType as aK, type OrderLineState as aL, type OrderLineStatus as aM, type FulfillmentType as aN, type FulfillmentStatus as aO, type FulfillmentLink as aP, type OrderFulfillmentSummary as aQ, type FeeBearerType as aR, type AmountToPay as aS, type LineItem as aT, type Order as aU, type OrderHistory as aV, type OrderGroupPaymentState as aW, type OrderGroup as aX, type OrderGroupPayment as aY, type OrderSplitDetail as aZ, type OrderGroupPaymentSummary as a_, PAYMENT_STATE as aa, PICKUP_TIME_TYPE as ab, MOBILE_MONEY_PROVIDER as ac, AUTHORIZATION_TYPE as ad, DEVICE_TYPE as ae, CONTACT_TYPE as af, LINK_QUERY as ag, LINK_MUTATION as ah, AUTH_MUTATION as ai, CHECKOUT_MUTATION as aj, PAYMENT_MUTATION as ak, ORDER_MUTATION as al, DEFAULT_CURRENCY as am, DEFAULT_COUNTRY as an, type Result as ao, type Ok as ap, type Err as aq, ok as ar, err as as, isOk as at, isErr as au, mapResult as av, mapError as aw, flatMap as ax, getOrElse as ay, unwrap as az, CatalogueQueries as b, type CancelBookingInput as b$, type OrderPaymentEvent as b0, type OrderFilter as b1, type CheckoutInput as b2, type UpdateOrderStatusInput as b3, type CancelOrderInput as b4, type RefundOrderInput as b5, type ServiceStatus as b6, type StaffRole as b7, type ReminderMethod as b8, type CustomerServicePreferences as b9, type BusinessWithLocations as bA, type LocationWithDetails as bB, type BusinessSettings as bC, type BusinessHours as bD, type CategoryInfo as bE, type ServiceAvailabilityRule as bF, type ServiceAvailabilityException as bG, type StaffAvailabilityRule as bH, type StaffAvailabilityException as bI, type ResourceAvailabilityRule as bJ, type ResourceAvailabilityException as bK, type StaffBookingProfile as bL, type ServiceStaffRequirement as bM, type BookingRequirementOverride as bN, type ResourceType as bO, type Service as bP, type ServiceWithStaff as bQ, type Staff as bR, type TimeSlot as bS, type AvailableSlot as bT, type DayAvailability as bU, type BookingStatus as bV, type Booking as bW, type BookingWithDetails as bX, type GetAvailableSlotsInput as bY, type CheckSlotAvailabilityInput as bZ, type RescheduleBookingInput as b_, type BufferTimes as ba, type ReminderSettings as bb, type CancellationPolicy as bc, type ServiceNotes as bd, type PricingOverrides as be, type SchedulingMetadata as bf, type StaffAssignment as bg, type ResourceAssignment as bh, type SchedulingResult as bi, type DepositResult as bj, type ServiceScheduleRequest as bk, type StaffScheduleItem as bl, type LocationAppointment as bm, type BusinessType as bn, type BusinessPreferences as bo, type Business as bp, type LocationTaxBehavior as bq, type LocationTaxOverrides as br, type Location as bs, type TimeRange as bt, type TimeRanges as bu, type LocationTimeProfile as bv, type Table as bw, type Room as bx, type ServiceCharge as by, type StorefrontBootstrap as bz, createCimplifyClient as c, type ServiceAvailabilityParams as c0, type ServiceAvailabilityResult as c1, type StockOwnershipType as c2, type StockStatus as c3, type Stock as c4, type StockLevel as c5, type ProductStock as c6, type VariantStock as c7, type LocationStock as c8, type AvailabilityCheck as c9, type MobileMoneyDetails as cA, type CheckoutCustomerInfo as cB, type FxQuoteRequest as cC, type FxQuote as cD, type FxRateResponse as cE, type RequestContext as cF, type RequestStartEvent as cG, type RequestSuccessEvent as cH, type RequestErrorEvent as cI, type RetryEvent as cJ, type SessionChangeEvent as cK, type ObservabilityHooks as cL, type ElementAppearance as cM, type AddressInfo as cN, type PaymentMethodInfo as cO, type AuthenticatedCustomer as cP, type ElementsCustomerInfo as cQ, type AuthenticatedData as cR, type ElementsCheckoutData as cS, type ElementsCheckoutResult as cT, type ParentToIframeMessage as cU, type IframeToParentMessage as cV, type ElementEventHandler as cW, type AvailabilityResult as ca, type InventorySummary as cb, type Customer as cc, type CustomerAddress as cd, type CustomerMobileMoney as ce, type CustomerLinkPreferences as cf, type LinkData as cg, type CreateAddressInput as ch, type UpdateAddressInput as ci, type CreateMobileMoneyInput as cj, type EnrollmentData as ck, type AddressData as cl, type MobileMoneyData as cm, type EnrollAndLinkOrderInput as cn, type LinkStatusResult as co, type LinkEnrollResult as cp, type EnrollAndLinkOrderResult as cq, type LinkSession as cr, type RevokeSessionResult as cs, type RevokeAllSessionsResult as ct, type RequestOtpInput as cu, type VerifyOtpInput as cv, type AuthResponse as cw, type PickupTimeType as cx, type PickupTime as cy, type CheckoutAddressInfo as cz, type QuoteBundleSelectionInput as d, type QuoteStatus as e, type QuoteDynamicBuckets as f, type QuoteUiMessage as g, type RefreshQuoteResult as h, CartOperations as i, CheckoutService as j, generateIdempotencyKey as k, type GetOrdersOptions as l, type AuthStatus as m, type OtpResult as n, type ChangePasswordInput as o, SchedulingService as p, LiteService as q, FxService as r, type LiteBootstrap as s, type KitchenOrderResult as t, CimplifyElements as u, CimplifyElement as v, createElements as w, ELEMENT_TYPES as x, type ElementsOptions as y, type ElementOptions as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { K as Category, q as Product, F as AddOnWithOptions, d as Pagination, h as CimplifyError, r as ProductWithDetails, s as ProductVariant, u as VariantAxis, z as VariantAxisSelection, B as AddOn, N as Collection, T as Bundle, X as BundleWithDetails, a2 as Composite, a3 as CompositeWithDetails, a7 as ComponentSelectionInput, a8 as CompositePriceResult, an as ChosenPrice, aS as UICart, aD as Cart, aE as CartItem, aW as CartSummary, aU as AddToCartInput, aV as UpdateCartItemInput, ar as DiscountDetails, M as Money, C as CurrencyCode, aC as LineConfiguration, a_ as AuthorizationType, b0 as PaymentMethod, b2 as InitializePaymentResult, b6 as SubmitAuthorizationInput, b4 as PaymentStatusResponse } from './payment-CLIWNMaP.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Observability hooks for monitoring SDK behavior.
|
|
@@ -104,6 +104,18 @@ interface CatalogueResult<T> {
|
|
|
104
104
|
/** Pagination metadata when listing is paginated. */
|
|
105
105
|
pagination?: Pagination;
|
|
106
106
|
}
|
|
107
|
+
/** Full catalogue envelope (products + categories + add-ons + metadata). */
|
|
108
|
+
interface CatalogueSnapshot {
|
|
109
|
+
categories: Category[];
|
|
110
|
+
products: Product[];
|
|
111
|
+
add_ons: AddOnWithOptions[];
|
|
112
|
+
/** true when the full catalogue is returned; false when truncated by server cap. */
|
|
113
|
+
is_complete: boolean;
|
|
114
|
+
/** Total available products before truncation (present when truncated). */
|
|
115
|
+
total_available?: number;
|
|
116
|
+
/** Pagination metadata when listing is paginated. */
|
|
117
|
+
pagination?: Pagination;
|
|
118
|
+
}
|
|
107
119
|
|
|
108
120
|
/**
|
|
109
121
|
* A Result type that makes errors explicit in the type system.
|
|
@@ -349,6 +361,7 @@ interface RefreshQuoteResult {
|
|
|
349
361
|
declare class CatalogueQueries {
|
|
350
362
|
private client;
|
|
351
363
|
constructor(client: CimplifyClient);
|
|
364
|
+
getCatalogue(): Promise<Result<CatalogueSnapshot, CimplifyError>>;
|
|
352
365
|
getProducts(options?: GetProductsOptions): Promise<Result<CatalogueResult<Product>, CimplifyError>>;
|
|
353
366
|
getProduct(id: string): Promise<Result<ProductWithDetails, CimplifyError>>;
|
|
354
367
|
getProductBySlug(slug: string): Promise<Result<ProductWithDetails, CimplifyError>>;
|
|
@@ -1099,6 +1112,8 @@ interface CheckoutFormData {
|
|
|
1099
1112
|
interface CheckoutResult {
|
|
1100
1113
|
order_id: string;
|
|
1101
1114
|
order_number: string;
|
|
1115
|
+
/** Token for guest order access. Store this and pass as `?token=` on order endpoints. */
|
|
1116
|
+
bill_token?: string;
|
|
1102
1117
|
payment_reference?: string;
|
|
1103
1118
|
payment_status: string;
|
|
1104
1119
|
requires_authorization: boolean;
|
|
@@ -1176,6 +1191,7 @@ declare function generateIdempotencyKey(): string;
|
|
|
1176
1191
|
declare class CheckoutService {
|
|
1177
1192
|
private client;
|
|
1178
1193
|
constructor(client: CimplifyClient);
|
|
1194
|
+
private orderTokenParam;
|
|
1179
1195
|
process(data: CheckoutFormData): Promise<Result<CheckoutResult, CimplifyError>>;
|
|
1180
1196
|
initializePayment(orderId: string, method: PaymentMethod): Promise<Result<InitializePaymentResult, CimplifyError>>;
|
|
1181
1197
|
submitAuthorization(input: SubmitAuthorizationInput): Promise<Result<CheckoutResult, CimplifyError>>;
|
|
@@ -1209,6 +1225,7 @@ interface GetOrdersOptions {
|
|
|
1209
1225
|
declare class OrderQueries {
|
|
1210
1226
|
private client;
|
|
1211
1227
|
constructor(client: CimplifyClient);
|
|
1228
|
+
private orderTokenParam;
|
|
1212
1229
|
list(options?: GetOrdersOptions): Promise<Result<Order[], CimplifyError>>;
|
|
1213
1230
|
get(orderId: string): Promise<Result<Order, CimplifyError>>;
|
|
1214
1231
|
getRecent(limit?: number): Promise<Result<Order[], CimplifyError>>;
|
|
@@ -2310,7 +2327,9 @@ declare class CimplifyClient {
|
|
|
2310
2327
|
isTestMode(): boolean;
|
|
2311
2328
|
setAccessToken(token: string | null): void;
|
|
2312
2329
|
clearSession(): void;
|
|
2313
|
-
|
|
2330
|
+
setOrderToken(orderId: string, token: string): void;
|
|
2331
|
+
getOrderToken(orderId: string): string | null;
|
|
2332
|
+
clearOrderTokens(): void;
|
|
2314
2333
|
setLocationId(locationId: string | null): void;
|
|
2315
2334
|
/** Get the currently active location ID */
|
|
2316
2335
|
getLocationId(): string | null;
|
|
@@ -2369,4 +2388,4 @@ declare class CimplifyClient {
|
|
|
2369
2388
|
}
|
|
2370
2389
|
declare function createCimplifyClient(config?: CimplifyConfig): CimplifyClient;
|
|
2371
2390
|
|
|
2372
|
-
export { type ProcessAndResolveOptions as $, AuthService as A, BusinessService as B, CimplifyClient as C, type ElementType as D, EVENT_TYPES as E, type FetchQuoteInput as F, type GetProductsOptions as G, type ElementEventType as H, InventoryService as I, type CheckoutMode as J, type KitchenOrderItem as K, LinkService as L, MESSAGE_TYPES as M, type CheckoutOrderType as N, OrderQueries as O, type PriceQuote as P, type QuoteCompositeSelectionInput as Q, type RefreshQuoteInput as R, type SearchOptions as S, type TableInfo as T, type UpdateProfileInput as U, type CheckoutPaymentMethod as V, type CheckoutStep as W, type CheckoutFormData as X, type CheckoutResult as Y, type ProcessCheckoutOptions as Z, type ProcessCheckoutResult as _, type CimplifyConfig as a, type
|
|
2391
|
+
export { type ProcessAndResolveOptions as $, AuthService as A, BusinessService as B, CimplifyClient as C, type ElementType as D, EVENT_TYPES as E, type FetchQuoteInput as F, type GetProductsOptions as G, type ElementEventType as H, InventoryService as I, type CheckoutMode as J, type KitchenOrderItem as K, LinkService as L, MESSAGE_TYPES as M, type CheckoutOrderType as N, OrderQueries as O, type PriceQuote as P, type QuoteCompositeSelectionInput as Q, type RefreshQuoteInput as R, type SearchOptions as S, type TableInfo as T, type UpdateProfileInput as U, type CheckoutPaymentMethod as V, type CheckoutStep as W, type CheckoutFormData as X, type CheckoutResult as Y, type ProcessCheckoutOptions as Z, type ProcessCheckoutResult as _, type CimplifyConfig as a, type OrderGroupDetails as a$, type CheckoutStatus as a0, type CheckoutStatusContext as a1, type AbortablePromise as a2, type MobileMoneyProvider as a3, type DeviceType as a4, type ContactType as a5, CHECKOUT_MODE as a6, ORDER_TYPE as a7, PAYMENT_METHOD as a8, CHECKOUT_STEP as a9, toNullable as aA, fromPromise as aB, tryCatch as aC, combine as aD, combineObject as aE, type CatalogueResult as aF, type CatalogueSnapshot as aG, type OrderStatus as aH, type PaymentState as aI, type OrderChannel as aJ, type LineType as aK, type OrderLineState as aL, type OrderLineStatus as aM, type FulfillmentType as aN, type FulfillmentStatus as aO, type FulfillmentLink as aP, type OrderFulfillmentSummary as aQ, type FeeBearerType as aR, type AmountToPay as aS, type LineItem as aT, type Order as aU, type OrderHistory as aV, type OrderGroupPaymentState as aW, type OrderGroup as aX, type OrderGroupPayment as aY, type OrderSplitDetail as aZ, type OrderGroupPaymentSummary as a_, PAYMENT_STATE as aa, PICKUP_TIME_TYPE as ab, MOBILE_MONEY_PROVIDER as ac, AUTHORIZATION_TYPE as ad, DEVICE_TYPE as ae, CONTACT_TYPE as af, LINK_QUERY as ag, LINK_MUTATION as ah, AUTH_MUTATION as ai, CHECKOUT_MUTATION as aj, PAYMENT_MUTATION as ak, ORDER_MUTATION as al, DEFAULT_CURRENCY as am, DEFAULT_COUNTRY as an, type Result as ao, type Ok as ap, type Err as aq, ok as ar, err as as, isOk as at, isErr as au, mapResult as av, mapError as aw, flatMap as ax, getOrElse as ay, unwrap as az, CatalogueQueries as b, type CancelBookingInput as b$, type OrderPaymentEvent as b0, type OrderFilter as b1, type CheckoutInput as b2, type UpdateOrderStatusInput as b3, type CancelOrderInput as b4, type RefundOrderInput as b5, type ServiceStatus as b6, type StaffRole as b7, type ReminderMethod as b8, type CustomerServicePreferences as b9, type BusinessWithLocations as bA, type LocationWithDetails as bB, type BusinessSettings as bC, type BusinessHours as bD, type CategoryInfo as bE, type ServiceAvailabilityRule as bF, type ServiceAvailabilityException as bG, type StaffAvailabilityRule as bH, type StaffAvailabilityException as bI, type ResourceAvailabilityRule as bJ, type ResourceAvailabilityException as bK, type StaffBookingProfile as bL, type ServiceStaffRequirement as bM, type BookingRequirementOverride as bN, type ResourceType as bO, type Service as bP, type ServiceWithStaff as bQ, type Staff as bR, type TimeSlot as bS, type AvailableSlot as bT, type DayAvailability as bU, type BookingStatus as bV, type Booking as bW, type BookingWithDetails as bX, type GetAvailableSlotsInput as bY, type CheckSlotAvailabilityInput as bZ, type RescheduleBookingInput as b_, type BufferTimes as ba, type ReminderSettings as bb, type CancellationPolicy as bc, type ServiceNotes as bd, type PricingOverrides as be, type SchedulingMetadata as bf, type StaffAssignment as bg, type ResourceAssignment as bh, type SchedulingResult as bi, type DepositResult as bj, type ServiceScheduleRequest as bk, type StaffScheduleItem as bl, type LocationAppointment as bm, type BusinessType as bn, type BusinessPreferences as bo, type Business as bp, type LocationTaxBehavior as bq, type LocationTaxOverrides as br, type Location as bs, type TimeRange as bt, type TimeRanges as bu, type LocationTimeProfile as bv, type Table as bw, type Room as bx, type ServiceCharge as by, type StorefrontBootstrap as bz, createCimplifyClient as c, type ServiceAvailabilityParams as c0, type ServiceAvailabilityResult as c1, type StockOwnershipType as c2, type StockStatus as c3, type Stock as c4, type StockLevel as c5, type ProductStock as c6, type VariantStock as c7, type LocationStock as c8, type AvailabilityCheck as c9, type MobileMoneyDetails as cA, type CheckoutCustomerInfo as cB, type FxQuoteRequest as cC, type FxQuote as cD, type FxRateResponse as cE, type RequestContext as cF, type RequestStartEvent as cG, type RequestSuccessEvent as cH, type RequestErrorEvent as cI, type RetryEvent as cJ, type SessionChangeEvent as cK, type ObservabilityHooks as cL, type ElementAppearance as cM, type AddressInfo as cN, type PaymentMethodInfo as cO, type AuthenticatedCustomer as cP, type ElementsCustomerInfo as cQ, type AuthenticatedData as cR, type ElementsCheckoutData as cS, type ElementsCheckoutResult as cT, type ParentToIframeMessage as cU, type IframeToParentMessage as cV, type ElementEventHandler as cW, type AvailabilityResult as ca, type InventorySummary as cb, type Customer as cc, type CustomerAddress as cd, type CustomerMobileMoney as ce, type CustomerLinkPreferences as cf, type LinkData as cg, type CreateAddressInput as ch, type UpdateAddressInput as ci, type CreateMobileMoneyInput as cj, type EnrollmentData as ck, type AddressData as cl, type MobileMoneyData as cm, type EnrollAndLinkOrderInput as cn, type LinkStatusResult as co, type LinkEnrollResult as cp, type EnrollAndLinkOrderResult as cq, type LinkSession as cr, type RevokeSessionResult as cs, type RevokeAllSessionsResult as ct, type RequestOtpInput as cu, type VerifyOtpInput as cv, type AuthResponse as cw, type PickupTimeType as cx, type PickupTime as cy, type CheckoutAddressInfo as cz, type QuoteBundleSelectionInput as d, type QuoteStatus as e, type QuoteDynamicBuckets as f, type QuoteUiMessage as g, type RefreshQuoteResult as h, CartOperations as i, CheckoutService as j, generateIdempotencyKey as k, type GetOrdersOptions as l, type AuthStatus as m, type OtpResult as n, type ChangePasswordInput as o, SchedulingService as p, LiteService as q, FxService as r, type LiteBootstrap as s, type KitchenOrderResult as t, CimplifyElements as u, CimplifyElement as v, createElements as w, ELEMENT_TYPES as x, type ElementsOptions as y, type ElementOptions as z };
|