@cimplify/sdk 0.85.0 → 0.87.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/advanced.d.mts +3 -3
- package/dist/advanced.d.ts +3 -3
- package/dist/advanced.js +22 -22
- package/dist/advanced.mjs +3 -3
- package/dist/{chunk-XA3ZNR75.js → chunk-AETVRBKI.js} +1 -1
- package/dist/{chunk-GIFVSWYJ.mjs → chunk-APBLFZ2I.mjs} +5 -5
- package/dist/{chunk-HPN5R3K2.js → chunk-FWEF2DHR.js} +80 -28
- package/dist/{chunk-DU4IX2I2.mjs → chunk-J7JDCPNW.mjs} +2 -2
- package/dist/{chunk-AMZXALF6.mjs → chunk-K5EN2W2Q.mjs} +1 -1
- package/dist/{chunk-TD3AY34U.mjs → chunk-KFLGQGMC.mjs} +3 -3
- package/dist/{chunk-E6T5VJMG.mjs → chunk-OZDDHSIB.mjs} +9 -1
- package/dist/{chunk-GFM5JW45.js → chunk-P3352VXA.js} +62 -62
- package/dist/{chunk-7Y2O3E4D.js → chunk-PTPOQVXS.js} +5 -5
- package/dist/{chunk-A6J7W6DH.js → chunk-PWDX5N2M.js} +4 -4
- package/dist/{chunk-NWUEWUX2.mjs → chunk-RCGSHS2Q.mjs} +2 -2
- package/dist/{chunk-NWTCBGJ2.js → chunk-ROBTTS3Q.js} +7 -7
- package/dist/{chunk-IQLJJW2H.js → chunk-T7Z25EY4.js} +9 -0
- package/dist/{chunk-7BM56JET.mjs → chunk-U57TYZLD.mjs} +60 -8
- package/dist/{client-WKKxIiF1.d.ts → client-BIt37FjS.d.mts} +541 -542
- package/dist/{client-BEhIE0Dm.d.mts → client-BMOdyC1F.d.mts} +2 -2
- package/dist/{client-BT5gaiGR.d.ts → client-BvWtk822.d.ts} +2 -2
- package/dist/{client-DLtwQ-jI.d.mts → client-Dfl6WY2F.d.ts} +541 -542
- package/dist/{index-DZz6hdrT.d.mts → index-BxOJ3BLn.d.mts} +3 -3
- package/dist/{index-BrC1x2kK.d.ts → index-DW6JifS1.d.ts} +3 -3
- package/dist/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +133 -129
- package/dist/index.mjs +6 -6
- package/dist/mock/cli.mjs +5 -5
- package/dist/mock/library.js +5 -5
- package/dist/mock/library.mjs +5 -5
- package/dist/mock/msw.js +5 -5
- package/dist/mock/msw.mjs +5 -5
- package/dist/{payment-D1f3ZQPC.d.ts → payment-CLp__KpE.d.mts} +3 -3
- package/dist/{payment-Dh-6cRcV.d.mts → payment-DJrvivO_.d.ts} +3 -3
- package/dist/{price-CQdOJoX-.d.ts → price-B7_UzClY.d.ts} +1 -1
- package/dist/{price-4T7dlhxM.d.mts → price-Ddk8Vr8z.d.mts} +1 -1
- package/dist/product-C0Lr81ze.d.mts +5439 -0
- package/dist/product-C0Lr81ze.d.ts +5439 -0
- package/dist/react.d.mts +24 -7
- package/dist/react.d.ts +24 -7
- package/dist/react.js +224 -186
- package/dist/react.mjs +57 -22
- package/dist/{server-DjK98UW-.d.mts → server-0TnEJt8U.d.mts} +2 -2
- package/dist/{server-DvThXldo.d.ts → server-P2G43ENi.d.ts} +2 -2
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +10 -10
- package/dist/server.mjs +4 -4
- package/dist/styles.css +1 -1
- package/dist/testing/msw.d.mts +2 -2
- package/dist/testing/msw.d.ts +2 -2
- package/dist/testing/msw.js +3 -3
- package/dist/testing/msw.mjs +2 -2
- package/dist/testing/suite.d.mts +6 -6
- package/dist/testing/suite.d.ts +6 -6
- package/dist/testing/suite.js +25 -25
- package/dist/testing/suite.mjs +6 -6
- package/dist/testing.d.mts +5 -5
- package/dist/testing.d.ts +5 -5
- package/dist/testing.js +81 -81
- package/dist/testing.mjs +7 -7
- package/dist/utils.d.mts +4 -4
- package/dist/utils.d.ts +4 -4
- package/dist/utils.js +29 -29
- package/dist/utils.mjs +2 -2
- package/package.json +5 -2
- package/registry/currency-selector.json +1 -1
- package/registry/digital-product-card.json +1 -1
- package/registry/digital-product-layout.json +1 -1
- package/registry/product-card.json +1 -1
- package/dist/product-RJMIdCAf.d.mts +0 -1582
- package/dist/product-RJMIdCAf.d.ts +0 -1582
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { CIMPLIFY_CDN_HOSTS, DEFAULT_CDN_BASE_URL, DURATION_UNIT, INPUT_FIELD_TYPE, PRODUCT_TYPE, RENDER_HINT, allGalleryImages, assetUrl, getVariantDisplayName, isCimplifyAsset, resolveGallery } from './chunk-
|
|
1
|
+
export { BOUNDARY_KIND, CIMPLIFY_CDN_HOSTS, DEFAULT_CDN_BASE_URL, DURATION_UNIT, INPUT_FIELD_TYPE, PRODUCT_TYPE, RENDER_HINT, allGalleryImages, assetUrl, getVariantDisplayName, isCimplifyAsset, resolveGallery } from './chunk-OZDDHSIB.mjs';
|
|
2
2
|
export { isValidPhoneForContext, normalizePhoneToE164, resolvePhoneCountryCode } from './chunk-YOIVZ6OA.mjs';
|
|
3
|
-
export { ActivityService, CimplifyClient, DeliveryService, PlacesService, StoreCreditQueries, SubscriptionService, SupportService, UploadService, createCimplifyClient } from './chunk-
|
|
4
|
-
import { getAuthorizationEndpoint, DEFAULT_ISSUER, generatePkce, generateState } from './chunk-
|
|
5
|
-
export { AUTHORIZATION_TYPE, AUTH_MUTATION, AuthService, BusinessService, CHECKOUT_MODE, CHECKOUT_MUTATION, CHECKOUT_STEP, CONTACT_TYPE, CartOperations, CatalogueQueries, CheckoutService as CheckoutOperations, CheckoutService, CimplifyElement, CimplifyElements, DEFAULT_COUNTRY, DEFAULT_CURRENCY, DEVICE_TYPE, ELEMENTS_AUTH_CONTACT_TYPES, ELEMENTS_AUTH_MODES, ELEMENTS_AUTH_PROMPTS, ELEMENT_TYPES, EVENT_TYPES, FxService, InventoryService, LINK_MUTATION, LINK_QUERY, LinkService, LiteService, MESSAGE_TYPES, MOBILE_MONEY_PROVIDER, ORDER_MUTATION, ORDER_TYPE, OrderQueries, PAYMENT_METHOD, PAYMENT_MUTATION, PAYMENT_STATE, PICKUP_TIME_TYPE, SchedulingService, combine, combineObject, createElements, err, flatMap, fromPromise, generateIdempotencyKey, getOrElse, isErr, isOk, mapError, mapResult, ok, startSignIn, toNullable, tryCatch, unwrap } from './chunk-
|
|
6
|
-
export { CURRENCY_SYMBOLS, MOBILE_MONEY_PROVIDERS, categorizePaymentError, detectMobileMoneyProvider, formatMoney, formatNumberCompact, formatPrice, formatPriceAdjustment, formatPriceCompact, formatPriceRange, formatPriceWithTax, formatProductPrice, getBasePrice, getCurrencySymbol, getDiscountPercentage, getDisplayPrice, getMarkupPercentage, getPriceRange, getProductCurrency, getTaxAmount, getUnitPriceAtQuantity, hasTaxInfo, isOnSale, isPaymentStatusFailure, isPaymentStatusRequiresAction, isPaymentStatusSuccess, isTaxInclusive, normalizePaymentResponse, normalizeStatusResponse, parsePrice } from './chunk-
|
|
7
|
-
export { CimplifyError, ERROR_HINTS, ErrorCode, IdempotencyMismatchError, ZERO, currencyCode, enrichError, getErrorHint, isCimplifyError, isIdempotencyMismatchError, isQuoteConflictRequiringConsent, isQuoteError, isRetryableError, isSupportedCurrency, money, moneyFromNumber } from './chunk-
|
|
3
|
+
export { ActivityService, CimplifyClient, DeliveryService, PlacesService, StoreCreditQueries, SubscriptionService, SupportService, UploadService, createCimplifyClient } from './chunk-RCGSHS2Q.mjs';
|
|
4
|
+
import { getAuthorizationEndpoint, DEFAULT_ISSUER, generatePkce, generateState } from './chunk-U57TYZLD.mjs';
|
|
5
|
+
export { AUTHORIZATION_TYPE, AUTH_MUTATION, AuthService, BusinessService, CHECKOUT_MODE, CHECKOUT_MUTATION, CHECKOUT_STEP, CONTACT_TYPE, CartOperations, CatalogueQueries, CheckoutService as CheckoutOperations, CheckoutService, CimplifyElement, CimplifyElements, DEFAULT_COUNTRY, DEFAULT_CURRENCY, DEVICE_TYPE, ELEMENTS_AUTH_CONTACT_TYPES, ELEMENTS_AUTH_MODES, ELEMENTS_AUTH_PROMPTS, ELEMENT_TYPES, EVENT_TYPES, FxService, InventoryService, LINK_MUTATION, LINK_QUERY, LinkService, LiteService, MESSAGE_TYPES, MOBILE_MONEY_PROVIDER, ORDER_MUTATION, ORDER_TYPE, OrderQueries, PAYMENT_METHOD, PAYMENT_MUTATION, PAYMENT_STATE, PICKUP_TIME_TYPE, SchedulingService, combine, combineObject, createElements, err, flatMap, fromPromise, generateIdempotencyKey, getOrElse, isErr, isOk, mapError, mapResult, ok, startSignIn, toNullable, tryCatch, unwrap } from './chunk-U57TYZLD.mjs';
|
|
6
|
+
export { CURRENCY_SYMBOLS, MOBILE_MONEY_PROVIDERS, categorizePaymentError, detectMobileMoneyProvider, formatMoney, formatNumberCompact, formatPrice, formatPriceAdjustment, formatPriceCompact, formatPriceRange, formatPriceWithTax, formatProductPrice, getBasePrice, getCurrencySymbol, getDiscountPercentage, getDisplayPrice, getMarkupPercentage, getPriceRange, getProductCurrency, getTaxAmount, getUnitPriceAtQuantity, hasTaxInfo, isOnSale, isPaymentStatusFailure, isPaymentStatusRequiresAction, isPaymentStatusSuccess, isTaxInclusive, normalizePaymentResponse, normalizeStatusResponse, parsePrice } from './chunk-KFLGQGMC.mjs';
|
|
7
|
+
export { CimplifyError, ERROR_HINTS, ErrorCode, IdempotencyMismatchError, ZERO, currencyCode, enrichError, getErrorHint, isCimplifyError, isIdempotencyMismatchError, isQuoteConflictRequiringConsent, isQuoteError, isRetryableError, isSupportedCurrency, money, moneyFromNumber } from './chunk-K5EN2W2Q.mjs';
|
|
8
8
|
import './chunk-3G6RQLXK.mjs';
|
|
9
9
|
|
|
10
10
|
// src/silent-sign-in.ts
|
package/dist/mock/cli.mjs
CHANGED
|
@@ -3047,7 +3047,7 @@ var ERROR_SUGGESTIONS = {
|
|
|
3047
3047
|
INSUFFICIENT_QUANTITY: "Requested quantity exceeds available inventory. Reduce quantity and retry.",
|
|
3048
3048
|
BUSINESS_ID_REQUIRED: "Business context could not be resolved. Verify the public key and business bootstrap call.",
|
|
3049
3049
|
INVALID_CART: "Cart is invalid for checkout. Sync cart state, ensure items exist, then retry.",
|
|
3050
|
-
ORDER_TYPE_REQUIRED: "Order type is required. Provide one of delivery, pickup, or
|
|
3050
|
+
ORDER_TYPE_REQUIRED: "Order type is required. Provide one of delivery, pickup, or dine-in before checkout.",
|
|
3051
3051
|
NO_PAYMENT_ELEMENT: "PaymentElement is required for processCheckout(). Mount it before triggering checkout.",
|
|
3052
3052
|
PAYMENT_NOT_MOUNTED: "PaymentElement iframe is not mounted. Mount it in the DOM before processCheckout().",
|
|
3053
3053
|
AUTH_INCOMPLETE: "AuthElement has not completed authentication. Wait for AUTHENTICATED before checkout.",
|
|
@@ -3452,7 +3452,7 @@ function buildV1(deps) {
|
|
|
3452
3452
|
return tryRoute(c, () => deps.scheduling.cancelBooking(c.req.param("booking_id"), body.reason));
|
|
3453
3453
|
});
|
|
3454
3454
|
app.get("/lite/bootstrap", (c) => tryRoute(c, () => deps.lite.bootstrap(deps.defaultBusinessId)));
|
|
3455
|
-
app.get("/lite/
|
|
3455
|
+
app.get("/lite/resources/:resource_id", (c) => tryRoute(c, () => deps.lite.getResource(c.req.param("resource_id"))));
|
|
3456
3456
|
app.get("/lite/menu", (c) => tryRoute(c, () => deps.lite.getMenu(deps.defaultBusinessId)));
|
|
3457
3457
|
app.get("/lite/menu/categories/:category_id", (c) => tryRoute(c, () => deps.lite.getMenuCategory(c.req.param("category_id"))));
|
|
3458
3458
|
app.get("/fx/rate", (c) => tryRoute(c, () => deps.fx.getRate(c.req.query("from") ?? "USD", c.req.query("to") ?? "GHS")));
|
|
@@ -3833,7 +3833,7 @@ var ELEMENT_HANDLER_JS = `/* eslint-disable */
|
|
|
3833
3833
|
'<select id="order-type">' +
|
|
3834
3834
|
' <option value="delivery">Delivery</option>' +
|
|
3835
3835
|
' <option value="pickup">Pickup</option>' +
|
|
3836
|
-
' <option value="
|
|
3836
|
+
' <option value="dine-in">Dine-in</option>' +
|
|
3837
3837
|
'</select>' +
|
|
3838
3838
|
'<label>Customer name</label>' +
|
|
3839
3839
|
'<input id="cust-name" value="' + (qs.get("name") || "Test Customer") + '">' +
|
|
@@ -6555,8 +6555,8 @@ function createLiteService(opts) {
|
|
|
6555
6555
|
tables: []
|
|
6556
6556
|
};
|
|
6557
6557
|
},
|
|
6558
|
-
|
|
6559
|
-
return { id:
|
|
6558
|
+
getResource(resourceId) {
|
|
6559
|
+
return { id: resourceId, table_number: resourceId.slice(-2), capacity: 4, occupied: false };
|
|
6560
6560
|
},
|
|
6561
6561
|
getMenu(businessId) {
|
|
6562
6562
|
const products = registry.products.list((p) => p.business_id === businessId);
|
package/dist/mock/library.js
CHANGED
|
@@ -2109,7 +2109,7 @@ var ERROR_SUGGESTIONS = {
|
|
|
2109
2109
|
INSUFFICIENT_QUANTITY: "Requested quantity exceeds available inventory. Reduce quantity and retry.",
|
|
2110
2110
|
BUSINESS_ID_REQUIRED: "Business context could not be resolved. Verify the public key and business bootstrap call.",
|
|
2111
2111
|
INVALID_CART: "Cart is invalid for checkout. Sync cart state, ensure items exist, then retry.",
|
|
2112
|
-
ORDER_TYPE_REQUIRED: "Order type is required. Provide one of delivery, pickup, or
|
|
2112
|
+
ORDER_TYPE_REQUIRED: "Order type is required. Provide one of delivery, pickup, or dine-in before checkout.",
|
|
2113
2113
|
NO_PAYMENT_ELEMENT: "PaymentElement is required for processCheckout(). Mount it before triggering checkout.",
|
|
2114
2114
|
PAYMENT_NOT_MOUNTED: "PaymentElement iframe is not mounted. Mount it in the DOM before processCheckout().",
|
|
2115
2115
|
AUTH_INCOMPLETE: "AuthElement has not completed authentication. Wait for AUTHENTICATED before checkout.",
|
|
@@ -2514,7 +2514,7 @@ function buildV1(deps) {
|
|
|
2514
2514
|
return tryRoute(c, () => deps.scheduling.cancelBooking(c.req.param("booking_id"), body.reason));
|
|
2515
2515
|
});
|
|
2516
2516
|
app.get("/lite/bootstrap", (c) => tryRoute(c, () => deps.lite.bootstrap(deps.defaultBusinessId)));
|
|
2517
|
-
app.get("/lite/
|
|
2517
|
+
app.get("/lite/resources/:resource_id", (c) => tryRoute(c, () => deps.lite.getResource(c.req.param("resource_id"))));
|
|
2518
2518
|
app.get("/lite/menu", (c) => tryRoute(c, () => deps.lite.getMenu(deps.defaultBusinessId)));
|
|
2519
2519
|
app.get("/lite/menu/categories/:category_id", (c) => tryRoute(c, () => deps.lite.getMenuCategory(c.req.param("category_id"))));
|
|
2520
2520
|
app.get("/fx/rate", (c) => tryRoute(c, () => deps.fx.getRate(c.req.query("from") ?? "USD", c.req.query("to") ?? "GHS")));
|
|
@@ -2895,7 +2895,7 @@ var ELEMENT_HANDLER_JS = `/* eslint-disable */
|
|
|
2895
2895
|
'<select id="order-type">' +
|
|
2896
2896
|
' <option value="delivery">Delivery</option>' +
|
|
2897
2897
|
' <option value="pickup">Pickup</option>' +
|
|
2898
|
-
' <option value="
|
|
2898
|
+
' <option value="dine-in">Dine-in</option>' +
|
|
2899
2899
|
'</select>' +
|
|
2900
2900
|
'<label>Customer name</label>' +
|
|
2901
2901
|
'<input id="cust-name" value="' + (qs.get("name") || "Test Customer") + '">' +
|
|
@@ -5617,8 +5617,8 @@ function createLiteService(opts) {
|
|
|
5617
5617
|
tables: []
|
|
5618
5618
|
};
|
|
5619
5619
|
},
|
|
5620
|
-
|
|
5621
|
-
return { id:
|
|
5620
|
+
getResource(resourceId) {
|
|
5621
|
+
return { id: resourceId, table_number: resourceId.slice(-2), capacity: 4, occupied: false };
|
|
5622
5622
|
},
|
|
5623
5623
|
getMenu(businessId) {
|
|
5624
5624
|
const products = registry.products.list((p) => p.business_id === businessId);
|
package/dist/mock/library.mjs
CHANGED
|
@@ -2107,7 +2107,7 @@ var ERROR_SUGGESTIONS = {
|
|
|
2107
2107
|
INSUFFICIENT_QUANTITY: "Requested quantity exceeds available inventory. Reduce quantity and retry.",
|
|
2108
2108
|
BUSINESS_ID_REQUIRED: "Business context could not be resolved. Verify the public key and business bootstrap call.",
|
|
2109
2109
|
INVALID_CART: "Cart is invalid for checkout. Sync cart state, ensure items exist, then retry.",
|
|
2110
|
-
ORDER_TYPE_REQUIRED: "Order type is required. Provide one of delivery, pickup, or
|
|
2110
|
+
ORDER_TYPE_REQUIRED: "Order type is required. Provide one of delivery, pickup, or dine-in before checkout.",
|
|
2111
2111
|
NO_PAYMENT_ELEMENT: "PaymentElement is required for processCheckout(). Mount it before triggering checkout.",
|
|
2112
2112
|
PAYMENT_NOT_MOUNTED: "PaymentElement iframe is not mounted. Mount it in the DOM before processCheckout().",
|
|
2113
2113
|
AUTH_INCOMPLETE: "AuthElement has not completed authentication. Wait for AUTHENTICATED before checkout.",
|
|
@@ -2512,7 +2512,7 @@ function buildV1(deps) {
|
|
|
2512
2512
|
return tryRoute(c, () => deps.scheduling.cancelBooking(c.req.param("booking_id"), body.reason));
|
|
2513
2513
|
});
|
|
2514
2514
|
app.get("/lite/bootstrap", (c) => tryRoute(c, () => deps.lite.bootstrap(deps.defaultBusinessId)));
|
|
2515
|
-
app.get("/lite/
|
|
2515
|
+
app.get("/lite/resources/:resource_id", (c) => tryRoute(c, () => deps.lite.getResource(c.req.param("resource_id"))));
|
|
2516
2516
|
app.get("/lite/menu", (c) => tryRoute(c, () => deps.lite.getMenu(deps.defaultBusinessId)));
|
|
2517
2517
|
app.get("/lite/menu/categories/:category_id", (c) => tryRoute(c, () => deps.lite.getMenuCategory(c.req.param("category_id"))));
|
|
2518
2518
|
app.get("/fx/rate", (c) => tryRoute(c, () => deps.fx.getRate(c.req.query("from") ?? "USD", c.req.query("to") ?? "GHS")));
|
|
@@ -2893,7 +2893,7 @@ var ELEMENT_HANDLER_JS = `/* eslint-disable */
|
|
|
2893
2893
|
'<select id="order-type">' +
|
|
2894
2894
|
' <option value="delivery">Delivery</option>' +
|
|
2895
2895
|
' <option value="pickup">Pickup</option>' +
|
|
2896
|
-
' <option value="
|
|
2896
|
+
' <option value="dine-in">Dine-in</option>' +
|
|
2897
2897
|
'</select>' +
|
|
2898
2898
|
'<label>Customer name</label>' +
|
|
2899
2899
|
'<input id="cust-name" value="' + (qs.get("name") || "Test Customer") + '">' +
|
|
@@ -5615,8 +5615,8 @@ function createLiteService(opts) {
|
|
|
5615
5615
|
tables: []
|
|
5616
5616
|
};
|
|
5617
5617
|
},
|
|
5618
|
-
|
|
5619
|
-
return { id:
|
|
5618
|
+
getResource(resourceId) {
|
|
5619
|
+
return { id: resourceId, table_number: resourceId.slice(-2), capacity: 4, occupied: false };
|
|
5620
5620
|
},
|
|
5621
5621
|
getMenu(businessId) {
|
|
5622
5622
|
const products = registry.products.list((p) => p.business_id === businessId);
|
package/dist/mock/msw.js
CHANGED
|
@@ -2107,7 +2107,7 @@ var ERROR_SUGGESTIONS = {
|
|
|
2107
2107
|
INSUFFICIENT_QUANTITY: "Requested quantity exceeds available inventory. Reduce quantity and retry.",
|
|
2108
2108
|
BUSINESS_ID_REQUIRED: "Business context could not be resolved. Verify the public key and business bootstrap call.",
|
|
2109
2109
|
INVALID_CART: "Cart is invalid for checkout. Sync cart state, ensure items exist, then retry.",
|
|
2110
|
-
ORDER_TYPE_REQUIRED: "Order type is required. Provide one of delivery, pickup, or
|
|
2110
|
+
ORDER_TYPE_REQUIRED: "Order type is required. Provide one of delivery, pickup, or dine-in before checkout.",
|
|
2111
2111
|
NO_PAYMENT_ELEMENT: "PaymentElement is required for processCheckout(). Mount it before triggering checkout.",
|
|
2112
2112
|
PAYMENT_NOT_MOUNTED: "PaymentElement iframe is not mounted. Mount it in the DOM before processCheckout().",
|
|
2113
2113
|
AUTH_INCOMPLETE: "AuthElement has not completed authentication. Wait for AUTHENTICATED before checkout.",
|
|
@@ -2512,7 +2512,7 @@ function buildV1(deps) {
|
|
|
2512
2512
|
return tryRoute(c, () => deps.scheduling.cancelBooking(c.req.param("booking_id"), body.reason));
|
|
2513
2513
|
});
|
|
2514
2514
|
app.get("/lite/bootstrap", (c) => tryRoute(c, () => deps.lite.bootstrap(deps.defaultBusinessId)));
|
|
2515
|
-
app.get("/lite/
|
|
2515
|
+
app.get("/lite/resources/:resource_id", (c) => tryRoute(c, () => deps.lite.getResource(c.req.param("resource_id"))));
|
|
2516
2516
|
app.get("/lite/menu", (c) => tryRoute(c, () => deps.lite.getMenu(deps.defaultBusinessId)));
|
|
2517
2517
|
app.get("/lite/menu/categories/:category_id", (c) => tryRoute(c, () => deps.lite.getMenuCategory(c.req.param("category_id"))));
|
|
2518
2518
|
app.get("/fx/rate", (c) => tryRoute(c, () => deps.fx.getRate(c.req.query("from") ?? "USD", c.req.query("to") ?? "GHS")));
|
|
@@ -2893,7 +2893,7 @@ var ELEMENT_HANDLER_JS = `/* eslint-disable */
|
|
|
2893
2893
|
'<select id="order-type">' +
|
|
2894
2894
|
' <option value="delivery">Delivery</option>' +
|
|
2895
2895
|
' <option value="pickup">Pickup</option>' +
|
|
2896
|
-
' <option value="
|
|
2896
|
+
' <option value="dine-in">Dine-in</option>' +
|
|
2897
2897
|
'</select>' +
|
|
2898
2898
|
'<label>Customer name</label>' +
|
|
2899
2899
|
'<input id="cust-name" value="' + (qs.get("name") || "Test Customer") + '">' +
|
|
@@ -5615,8 +5615,8 @@ function createLiteService(opts) {
|
|
|
5615
5615
|
tables: []
|
|
5616
5616
|
};
|
|
5617
5617
|
},
|
|
5618
|
-
|
|
5619
|
-
return { id:
|
|
5618
|
+
getResource(resourceId) {
|
|
5619
|
+
return { id: resourceId, table_number: resourceId.slice(-2), capacity: 4, occupied: false };
|
|
5620
5620
|
},
|
|
5621
5621
|
getMenu(businessId) {
|
|
5622
5622
|
const products = registry.products.list((p) => p.business_id === businessId);
|
package/dist/mock/msw.mjs
CHANGED
|
@@ -2105,7 +2105,7 @@ var ERROR_SUGGESTIONS = {
|
|
|
2105
2105
|
INSUFFICIENT_QUANTITY: "Requested quantity exceeds available inventory. Reduce quantity and retry.",
|
|
2106
2106
|
BUSINESS_ID_REQUIRED: "Business context could not be resolved. Verify the public key and business bootstrap call.",
|
|
2107
2107
|
INVALID_CART: "Cart is invalid for checkout. Sync cart state, ensure items exist, then retry.",
|
|
2108
|
-
ORDER_TYPE_REQUIRED: "Order type is required. Provide one of delivery, pickup, or
|
|
2108
|
+
ORDER_TYPE_REQUIRED: "Order type is required. Provide one of delivery, pickup, or dine-in before checkout.",
|
|
2109
2109
|
NO_PAYMENT_ELEMENT: "PaymentElement is required for processCheckout(). Mount it before triggering checkout.",
|
|
2110
2110
|
PAYMENT_NOT_MOUNTED: "PaymentElement iframe is not mounted. Mount it in the DOM before processCheckout().",
|
|
2111
2111
|
AUTH_INCOMPLETE: "AuthElement has not completed authentication. Wait for AUTHENTICATED before checkout.",
|
|
@@ -2510,7 +2510,7 @@ function buildV1(deps) {
|
|
|
2510
2510
|
return tryRoute(c, () => deps.scheduling.cancelBooking(c.req.param("booking_id"), body.reason));
|
|
2511
2511
|
});
|
|
2512
2512
|
app.get("/lite/bootstrap", (c) => tryRoute(c, () => deps.lite.bootstrap(deps.defaultBusinessId)));
|
|
2513
|
-
app.get("/lite/
|
|
2513
|
+
app.get("/lite/resources/:resource_id", (c) => tryRoute(c, () => deps.lite.getResource(c.req.param("resource_id"))));
|
|
2514
2514
|
app.get("/lite/menu", (c) => tryRoute(c, () => deps.lite.getMenu(deps.defaultBusinessId)));
|
|
2515
2515
|
app.get("/lite/menu/categories/:category_id", (c) => tryRoute(c, () => deps.lite.getMenuCategory(c.req.param("category_id"))));
|
|
2516
2516
|
app.get("/fx/rate", (c) => tryRoute(c, () => deps.fx.getRate(c.req.query("from") ?? "USD", c.req.query("to") ?? "GHS")));
|
|
@@ -2891,7 +2891,7 @@ var ELEMENT_HANDLER_JS = `/* eslint-disable */
|
|
|
2891
2891
|
'<select id="order-type">' +
|
|
2892
2892
|
' <option value="delivery">Delivery</option>' +
|
|
2893
2893
|
' <option value="pickup">Pickup</option>' +
|
|
2894
|
-
' <option value="
|
|
2894
|
+
' <option value="dine-in">Dine-in</option>' +
|
|
2895
2895
|
'</select>' +
|
|
2896
2896
|
'<label>Customer name</label>' +
|
|
2897
2897
|
'<input id="cust-name" value="' + (qs.get("name") || "Test Customer") + '">' +
|
|
@@ -5613,8 +5613,8 @@ function createLiteService(opts) {
|
|
|
5613
5613
|
tables: []
|
|
5614
5614
|
};
|
|
5615
5615
|
},
|
|
5616
|
-
|
|
5617
|
-
return { id:
|
|
5616
|
+
getResource(resourceId) {
|
|
5617
|
+
return { id: resourceId, table_number: resourceId.slice(-2), capacity: 4, occupied: false };
|
|
5618
5618
|
},
|
|
5619
5619
|
getMenu(businessId) {
|
|
5620
5620
|
const products = registry.products.list((p) => p.business_id === businessId);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aO as Money, ad as CurrencyCode } from './product-C0Lr81ze.mjs';
|
|
2
2
|
|
|
3
3
|
type PaymentStatus = "initialized" | "pending" | "processing" | "authorized" | "captured" | "failed" | "cancelled" | "refunded" | "unknown" | "voided" | "requires_action" | "abandoned" | "reversed" | "disputed" | "refund_pending";
|
|
4
|
-
type PaymentProvider = "stripe" | "paystack" | "cellulant" | "
|
|
4
|
+
type PaymentProvider = "stripe" | "paystack" | "cellulant" | "mtn_momo" | "offline" | "mtn" | "vodafone" | "airtel" | "cash" | "manual";
|
|
5
5
|
type PaymentMethodType = "card" | "bank_transfer" | "cash" | {
|
|
6
6
|
mobile_money: {
|
|
7
7
|
provider: string;
|
|
@@ -39,7 +39,7 @@ interface AddressAuthorizationData {
|
|
|
39
39
|
state: string;
|
|
40
40
|
zip_code: string;
|
|
41
41
|
}
|
|
42
|
-
type AuthorizationType = "otp" | "pin" | "phone" | "birthday" |
|
|
42
|
+
type AuthorizationType = "otp" | "pin" | "phone" | "birthday" | {
|
|
43
43
|
address: AddressAuthorizationData;
|
|
44
44
|
};
|
|
45
45
|
type PaymentProcessingState = "initial" | "preparing" | "processing" | "verifying" | "awaiting_authorization" | "success" | "error" | "timeout";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aO as Money, ad as CurrencyCode } from './product-C0Lr81ze.js';
|
|
2
2
|
|
|
3
3
|
type PaymentStatus = "initialized" | "pending" | "processing" | "authorized" | "captured" | "failed" | "cancelled" | "refunded" | "unknown" | "voided" | "requires_action" | "abandoned" | "reversed" | "disputed" | "refund_pending";
|
|
4
|
-
type PaymentProvider = "stripe" | "paystack" | "cellulant" | "
|
|
4
|
+
type PaymentProvider = "stripe" | "paystack" | "cellulant" | "mtn_momo" | "offline" | "mtn" | "vodafone" | "airtel" | "cash" | "manual";
|
|
5
5
|
type PaymentMethodType = "card" | "bank_transfer" | "cash" | {
|
|
6
6
|
mobile_money: {
|
|
7
7
|
provider: string;
|
|
@@ -39,7 +39,7 @@ interface AddressAuthorizationData {
|
|
|
39
39
|
state: string;
|
|
40
40
|
zip_code: string;
|
|
41
41
|
}
|
|
42
|
-
type AuthorizationType = "otp" | "pin" | "phone" | "birthday" |
|
|
42
|
+
type AuthorizationType = "otp" | "pin" | "phone" | "birthday" | {
|
|
43
43
|
address: AddressAuthorizationData;
|
|
44
44
|
};
|
|
45
45
|
type PaymentProcessingState = "initial" | "preparing" | "processing" | "verifying" | "awaiting_authorization" | "success" | "error" | "timeout";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ad as CurrencyCode, U as ChosenPrice, bi as SaleInfo, bD as UpcomingSale } from './product-C0Lr81ze.js';
|
|
2
2
|
|
|
3
3
|
interface ProductWithPrice {
|
|
4
4
|
price_info?: ChosenPrice;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ad as CurrencyCode, U as ChosenPrice, bi as SaleInfo, bD as UpcomingSale } from './product-C0Lr81ze.mjs';
|
|
2
2
|
|
|
3
3
|
interface ProductWithPrice {
|
|
4
4
|
price_info?: ChosenPrice;
|