@liquidcommerce/elements-sdk 2.6.0-beta.131 → 2.6.0-beta.132
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/index.checkout.esm.js +9882 -9834
- package/dist/index.esm.js +14894 -14846
- package/dist/types/core/api/api-result.d.ts +1 -0
- package/dist/types/modules/checkout/checkout.commands.d.ts +3 -0
- package/dist/types/utils/fulfillment-unavailable.d.ts +8 -0
- package/docs/v1/api/actions/checkout-actions.md +2 -0
- package/package.json +1 -1
|
@@ -50,6 +50,9 @@ export declare class CheckoutCommands extends BaseCommand {
|
|
|
50
50
|
private expiredDeliveryMarksWith;
|
|
51
51
|
private pruneExpiredDeliveryWindows;
|
|
52
52
|
private expireDeliveryWindows;
|
|
53
|
+
private requestPrepare;
|
|
54
|
+
private withStoreNamedFailure;
|
|
55
|
+
private knownRetailers;
|
|
53
56
|
private prepareWithWindowRecovery;
|
|
54
57
|
private prepareRecoveringWindow;
|
|
55
58
|
retryLoadCheckout(): Promise<void>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ApiError } from '@/core/api/api-result';
|
|
2
|
+
export declare const FULFILLMENT_UNAVAILABLE_CODE = "fulfillment_unavailable";
|
|
3
|
+
export interface FulfillmentRetailer {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
fulfillments: Record<string, unknown>;
|
|
7
|
+
}
|
|
8
|
+
export declare function fulfillmentUnavailableMessage(error: Pick<ApiError, 'errors'> | null | undefined, retailers: FulfillmentRetailer[]): string | null;
|
|
@@ -480,6 +480,8 @@ If a saved window's cutoff passes, or the store's hours or zone rules no longer
|
|
|
480
480
|
|
|
481
481
|
If prepare did not keep the window that was sent (error code `delivery_selection_not_accepted`, HTTP 409), the SDK drops the window it holds for that fulfillment so no later update sends it again. `chooseDeliverySlot` rejects with "We couldn't save that delivery time. Choose a delivery time again."; on any other update the window is recovered as an unavailable one.
|
|
482
482
|
|
|
483
|
+
If a store cannot fulfill the selected delivery method at all, pickup included (error code `fulfillment_unavailable`, for example a closed store that offers no delivery window, or no estimate for the address), the SDK shows "W & J Wines & Spirits cannot fulfill this order now. Choose another store or delivery method." in place of the server's message, on loading the checkout, on any checkout update, on Place Order and on the cart's go-to-checkout. The store name comes from the cart or the checkout; when neither names the store, the message starts with "A store in your cart". The error detail carries the LC `retailerId` and `fulfillmentId` of each refused selection, so a custom UI can point at the store the same way. When AccelPay returns no estimates at all, Cloud refuses every selection, so the message names every store in the cart, even when the cause is the address.
|
|
484
|
+
|
|
483
485
|
When scheduled delivery stops applying to the order (`delivery_scheduling_not_enabled`, `delivery_windows_unsupported` or `delivery_scheduling_unsupported`, and `multiple_fulfillment_groups` from an older server that schedules one group only), the SDK drops the saved window with a re-prepare, keeps the rest of checkout and shows "Scheduled delivery isn't available for this order right now. We'll deliver as soon as possible." The picker does not open; the response no longer carries `deliveryScheduling`, so the delivery time row goes away. Switching the delivery method never carries a window over to the new fulfillment.
|
|
484
486
|
|
|
485
487
|
## Use Cases
|
package/package.json
CHANGED