@fire-spark/core 0.15.2 → 0.16.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/index.d.ts +197 -4
- package/dist/index.js +1404 -291
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Money, PaymentAdapter, PaymentCollectAt, PaymentContext, PaymentResult, PaymentReversal, PaymentStorage, PaymentUI, RedeemLike, RedeemSource, isRealPaymentMethod, orderRedeems } from "@fire-spark/payments";
|
|
2
|
-
import { AndConditions, CheckoutMode, CheckoutResolved, CmsBlock, Condition, Customer, CustomerIdentifyInput, CustomerRegisterInput, CustomerUpdateInput, Fulfillment, FulfillmentListInput, GroupDisplayType, KioskDeviceConfig, KioskDeviceOverrides, KioskHealthBatchInput, KioskHealthBatchResult, KioskHeartbeatInput, KioskHeartbeatResult, KioskRealtimeToken, MatchResult, MatchableRule, Menu, Menu as Menu$1, MenuLookup, MenuLookup as MenuLookup$1, MerchantPayment, ModifierControlType, ModifierGroup, OrConditions, Order as Order$1, Order as Order$2, OrderCancelInput, OrderCancelInput as OrderCancelInput$1, OrderCancelType, OrderCancelType as OrderCancelType$1, OrderDeviceListInput, OrderDeviceListResult, OrderFulfillment, OrderInsertInput, OrderLine, OrderListInput, OrderRecordPaymentInput, OrderRedeem, OrderRedemptionStep, OrderReorderInput, OrderTotals, OrderUpdateInput, OrderValidateInput, OrderValidateOutput, PaymentCollectAt as PaymentCollectAt$1, PaymentIntentPutInput, PaymentMethod, PaymentProvider, PaymentTender, PaymentTenderInput, PlaceOrderResult, PosCatalog, PosFloorInput, PosFloorOccupancy, PosFloorPlan, PosFloorRealtimeToken, PosHealthBatchInput, PosHealthBatchResult, PosHeartbeatInput, PosHeartbeatResult, PosKioskOrder, PosKioskSettleInput, PosKioskSettleResult, PosOrderInput, PosOrderResult, PosTableAttachOrderInput, PosTableCloseInput, PosTableJoinInput, PosTableSeatInput, PosTableSeatReservationInput, PosTableSplitInput, PricingModifier, Product, Product as Product$1, Recommendation, RecurringDateCronResult, RecurringDateCronValues, RulesEngineOrderLine, RulesEngineParams, RulesEngineRuntime, Schedule, SdkLogContext, SdkLogErrorInfo, SdkLogLevel, SdkLogOptions, Store, StoreGetInput, StoreListInput, StoreNearbyInput, StorefrontAvailability, StorefrontMenu, StorefrontMenuScope, StorefrontMenuStreamOptions, StorefrontPaymentsListInput, StorefrontPreferences, TenderRefundInput, TenderReplaceInput, TenderVoidInput, Variant, VariantGroup } from "@fire-spark/types";
|
|
2
|
+
import { AndConditions, CheckoutMode, CheckoutResolved, CmsBlock, Condition, Customer, CustomerIdentifyInput, CustomerRegisterInput, CustomerUpdateInput, Fulfillment, FulfillmentListInput, GroupDisplayType, KioskDeviceConfig, KioskDeviceOverrides, KioskHealthBatchInput, KioskHealthBatchResult, KioskHeartbeatInput, KioskHeartbeatResult, KioskRealtimeToken, MasivoTotpCode, MasivoTotpCreateInput, MasivoTotpVerification, MasivoTotpVerifyInput, MatchResult, MatchableRule, Menu, Menu as Menu$1, MenuLookup, MenuLookup as MenuLookup$1, MerchantPayment, ModifierControlType, ModifierGroup, OrConditions, Order as Order$1, Order as Order$2, OrderCancelInput, OrderCancelInput as OrderCancelInput$1, OrderCancelType, OrderCancelType as OrderCancelType$1, OrderDeviceListInput, OrderDeviceListResult, OrderFulfillment, OrderInsertInput, OrderLine, OrderListInput, OrderRecordPaymentInput, OrderRedeem, OrderRedemptionStep, OrderReorderInput, OrderSetCustomerInput, OrderTotals, OrderUpdateInput, OrderValidateInput, OrderValidateOutput, PaymentCollectAt as PaymentCollectAt$1, PaymentIntentPutInput, PaymentMethod, PaymentProvider, PaymentTender, PaymentTenderInput, PlaceOrderResult, PosCatalog, PosFloorInput, PosFloorOccupancy, PosFloorPlan, PosFloorRealtimeToken, PosHealthBatchInput, PosHealthBatchResult, PosHeartbeatInput, PosHeartbeatResult, PosKioskOrder, PosKioskSettleInput, PosKioskSettleResult, PosOrderInput, PosOrderResult, PosTableAttachOrderInput, PosTableCloseInput, PosTableJoinInput, PosTableSeatInput, PosTableSeatReservationInput, PosTableSplitInput, PricingModifier, Product, Product as Product$1, Recommendation, RecurringDateCronResult, RecurringDateCronValues, RulesEngineOrder, RulesEngineOrderLine, RulesEngineParams, RulesEngineRuntime, Schedule, SdkLogContext, SdkLogErrorInfo, SdkLogLevel, SdkLogOptions, Store, StoreGetInput, StoreListInput, StoreNearbyInput, StorefrontAvailability, StorefrontMenu, StorefrontMenuScope, StorefrontMenuStreamOptions, StorefrontPaymentsListInput, StorefrontPreferences, SwitchCustomerArg, SwitchCustomerArg as SwitchCustomerArg$1, SwitchCustomerIdToken, SwitchCustomerResult, SwitchCustomerResult as SwitchCustomerResult$1, TenderRefundInput, TenderReplaceInput, TenderVoidInput, Variant, VariantGroup } from "@fire-spark/types";
|
|
3
3
|
import { Big } from "big.js";
|
|
4
4
|
//#region src/productCustomization/catalog.utils.d.ts
|
|
5
5
|
/** Image for a product inside one modifier group, else the product image. */
|
|
@@ -153,6 +153,26 @@ declare const isVariantBase: (product: Product$1) => boolean;
|
|
|
153
153
|
//#region src/shared/baseUrl.d.ts
|
|
154
154
|
declare const resolveBaseUrl: (baseUrl?: string) => string;
|
|
155
155
|
//#endregion
|
|
156
|
+
//#region src/auth/DelegatedSessionExpiredError.d.ts
|
|
157
|
+
/**
|
|
158
|
+
* A delegated customer session is still active, but its access token was
|
|
159
|
+
* rejected or has expired. The anonymous subject token is not exchanged.
|
|
160
|
+
*/
|
|
161
|
+
declare class DelegatedSessionExpiredError extends Error {
|
|
162
|
+
readonly code = "DELEGATED_SESSION_EXPIRED";
|
|
163
|
+
constructor();
|
|
164
|
+
}
|
|
165
|
+
declare const isDelegatedSessionExpiredError: (error: unknown) => error is DelegatedSessionExpiredError;
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region src/auth/OrderAuthPinnedError.d.ts
|
|
168
|
+
/**
|
|
169
|
+
* `Order` was built with an explicit `accessToken`. It cannot follow
|
|
170
|
+
* `auth.switchCustomer`, which swaps the shared auth session.
|
|
171
|
+
*/
|
|
172
|
+
declare class OrderAuthPinnedError extends Error {
|
|
173
|
+
constructor();
|
|
174
|
+
}
|
|
175
|
+
//#endregion
|
|
156
176
|
//#region src/auth/types.d.ts
|
|
157
177
|
type StorefrontAccessToken = {
|
|
158
178
|
access_token: string;
|
|
@@ -195,7 +215,12 @@ type ExchangeOptions = {
|
|
|
195
215
|
declare const configure: (options: AuthConfigureOptions) => void;
|
|
196
216
|
declare const getBaseUrl: () => string;
|
|
197
217
|
declare const clear: () => void;
|
|
218
|
+
declare const isDelegatedSession: () => boolean;
|
|
219
|
+
declare const onCustomerChange: (listener: (customerId: string | null) => void) => () => void;
|
|
220
|
+
/** Drops the delegated token when that order is no longer OPEN. */
|
|
221
|
+
declare const releaseDelegatedOrder: (orderId: string) => void;
|
|
198
222
|
declare const getAccessToken: () => Promise<string>;
|
|
223
|
+
declare const switchCustomer: (input: SwitchCustomerArg$1) => Promise<SwitchCustomerResult$1>;
|
|
199
224
|
//#endregion
|
|
200
225
|
//#region src/auth/exchange.d.ts
|
|
201
226
|
declare const exchangeSubjectToken: (subjectToken: string, options?: ExchangeOptions) => Promise<StorefrontAccessToken>;
|
|
@@ -208,6 +233,10 @@ declare const auth: {
|
|
|
208
233
|
clear: typeof clear;
|
|
209
234
|
exchangeSubjectToken: typeof exchangeSubjectToken;
|
|
210
235
|
resolveBaseUrl: typeof resolveBaseUrl;
|
|
236
|
+
switchCustomer: typeof switchCustomer;
|
|
237
|
+
isDelegatedSession: typeof isDelegatedSession;
|
|
238
|
+
onCustomerChange: typeof onCustomerChange;
|
|
239
|
+
releaseDelegatedOrder: typeof releaseDelegatedOrder;
|
|
211
240
|
};
|
|
212
241
|
//#endregion
|
|
213
242
|
//#region src/order/customer.d.ts
|
|
@@ -304,6 +333,19 @@ declare const refundTender: (id: string, tenderId: string, body: TenderRefundInp
|
|
|
304
333
|
declare const getOrderFulfillment: (id: string, options?: ServiceHttpOptions) => Promise<OrderFulfillment>;
|
|
305
334
|
declare const listOrderFulfillments: (ids: string[], options?: ServiceHttpOptions) => Promise<OrderFulfillment[]>;
|
|
306
335
|
declare const updateOrder: (id: string, body: OrderUpdateInput, options?: ServiceHttpOptions) => Promise<Order$1>;
|
|
336
|
+
/**
|
|
337
|
+
* `PUT /storefront/v1/orders/:id/customer`. Copies that customer onto the
|
|
338
|
+
* open order. `409` `ORDER_NOT_OPEN` when the order is not `OPEN`. `404`
|
|
339
|
+
* `CUSTOMER_NOT_FOUND` when the customer does not exist. `409`
|
|
340
|
+
* `ORDER_OPEN_SCOPE_TAKEN` when they already have an open cart in scope.
|
|
341
|
+
*/
|
|
342
|
+
declare const setOrderCustomer: (id: string, body: OrderSetCustomerInput, options?: ServiceHttpOptions) => Promise<Order$1>;
|
|
343
|
+
/**
|
|
344
|
+
* `DELETE /storefront/v1/orders/:id/customer`. Makes the open order
|
|
345
|
+
* anonymous and clears the customer snapshot. `customer_id` stays.
|
|
346
|
+
* `409` `ORDER_NOT_OPEN` when the order is not `OPEN`.
|
|
347
|
+
*/
|
|
348
|
+
declare const clearOrderCustomer: (id: string, options?: ServiceHttpOptions) => Promise<Order$1>;
|
|
307
349
|
/**
|
|
308
350
|
* `body` is optional: `device` (checked only when sent), `type`
|
|
309
351
|
* (`VOID` / `REVERSE`) and what the device reversed (`tenders`).
|
|
@@ -647,6 +689,34 @@ declare class Order {
|
|
|
647
689
|
/** Guest contact data (anonymous checkout); blanks keep the snapshot. */
|
|
648
690
|
customer_info?: Partial<Order$1["customer"]["customer_info"]>;
|
|
649
691
|
}): void;
|
|
692
|
+
private commitCustomer;
|
|
693
|
+
/**
|
|
694
|
+
* Replaces the customer on this open order. The server copies that
|
|
695
|
+
* customer's profile onto the order and sets `customer_id` and
|
|
696
|
+
* `is_anonymous` from the customer. Rejects with `OrderNotOpenError`
|
|
697
|
+
* (`409`, `details.code` `ORDER_NOT_OPEN`) when the order is not `OPEN`
|
|
698
|
+
* (`CLOSED`, `COMPLETED`, `VOIDED`, `REVERSED`, `REFUNDED`, or legacy
|
|
699
|
+
* `CANCELLED`). `404` `CUSTOMER_NOT_FOUND` when that customer does not
|
|
700
|
+
* exist. `409` `ORDER_OPEN_SCOPE_TAKEN` when they already have an open
|
|
701
|
+
* cart for this store, channel, fulfillment, and brand.
|
|
702
|
+
*
|
|
703
|
+
* After a different `customer_id`, the order belongs to that customer.
|
|
704
|
+
* Later calls need their storefront access token.
|
|
705
|
+
*/
|
|
706
|
+
setCustomer(customerId: string): Promise<Order$1>;
|
|
707
|
+
/**
|
|
708
|
+
* Makes this open order anonymous: `is_anonymous` becomes true and the
|
|
709
|
+
* customer snapshot is cleared to guest placeholders. `customer_id`
|
|
710
|
+
* stays the authenticated owner. Rejects with `OrderNotOpenError`
|
|
711
|
+
* (`409`, `ORDER_NOT_OPEN`) when the order is not `OPEN`.
|
|
712
|
+
*/
|
|
713
|
+
clearCustomer(): Promise<Order$1>;
|
|
714
|
+
/**
|
|
715
|
+
* Moves this open order to the customer proved by `proof` and keeps
|
|
716
|
+
* the returned order on this instance. Requires `auth.configure()`
|
|
717
|
+
* without a fixed `accessToken` on this order.
|
|
718
|
+
*/
|
|
719
|
+
switchCustomer(proof: SwitchCustomerArg$1): Promise<Order$1>;
|
|
650
720
|
cancelOrder(): Promise<void>;
|
|
651
721
|
/**
|
|
652
722
|
* Reopens this placed, unpaid order: the server voids every payment
|
|
@@ -766,6 +836,8 @@ declare class Order {
|
|
|
766
836
|
*/
|
|
767
837
|
private commitLines;
|
|
768
838
|
private scheduleAfterMutate;
|
|
839
|
+
/** Sets or clears the pickup time on an open order. */
|
|
840
|
+
setScheduledAt(scheduledAt: string | null): Order$1;
|
|
769
841
|
private notify;
|
|
770
842
|
}
|
|
771
843
|
//#endregion
|
|
@@ -781,6 +853,8 @@ declare class OrderSyncPendingError extends Error {
|
|
|
781
853
|
declare class OrderSyncRejectedError extends StorefrontHttpError {
|
|
782
854
|
constructor(error: StorefrontHttpError);
|
|
783
855
|
}
|
|
856
|
+
declare const SCHEDULED_AT_ERROR_CODES: readonly ["ORDER_NOT_OPEN", "SCHEDULED_AT_IN_PAST", "SCHEDULED_AT_BEFORE_LEAD", "SCHEDULED_AT_BEYOND_HORIZON", "SCHEDULED_AT_INVALID_SLOT", "SCHEDULED_AT_STORE_CLOSED"];
|
|
857
|
+
declare const isScheduledAtError: (error: unknown) => boolean;
|
|
784
858
|
//#endregion
|
|
785
859
|
//#region src/order/fulfillmentTrack.d.ts
|
|
786
860
|
type TrackWorkflowNode = {
|
|
@@ -836,6 +910,17 @@ declare const milestoneTrack: (workflow: TrackWorkflow) => MilestoneTrackItem[];
|
|
|
836
910
|
/** Ordered milestones + current index from `current_node_ids` (dashboard algo). */
|
|
837
911
|
declare const milestoneSteps: (workflow: TrackWorkflow, currentNodeIds: string[]) => MilestoneSteps | null;
|
|
838
912
|
//#endregion
|
|
913
|
+
//#region src/order/OrderNotOpenError.d.ts
|
|
914
|
+
/**
|
|
915
|
+
* The order is not `OPEN` (`CLOSED`, `COMPLETED`, `VOIDED`, `REVERSED`,
|
|
916
|
+
* `REFUNDED`, or legacy `CANCELLED`). Same code as the storefront API's
|
|
917
|
+
* `409`, so callers map both the same way.
|
|
918
|
+
*/
|
|
919
|
+
declare class OrderNotOpenError extends StorefrontHttpError {
|
|
920
|
+
constructor(status?: number, details?: StorefrontErrorDetails | null);
|
|
921
|
+
}
|
|
922
|
+
declare const isOrderNotOpenError: (error: unknown) => error is OrderNotOpenError;
|
|
923
|
+
//#endregion
|
|
839
924
|
//#region src/order/OrderPaymentRequiredError.d.ts
|
|
840
925
|
/**
|
|
841
926
|
* `placeOrder` has no real tender (no `payment`, no `setTenders`, no
|
|
@@ -892,6 +977,10 @@ type ValidateOrderAgainstMenuInput = {
|
|
|
892
977
|
redemptionSteps?: OrderRedemptionStep[];
|
|
893
978
|
/** Epoch ms used for `expires_at` checks. */
|
|
894
979
|
now?: number;
|
|
980
|
+
/** IANA zone for product schedules. Omit to use `scheduleAt`'s clock. */
|
|
981
|
+
timeZone?: string;
|
|
982
|
+
/** Instant for product schedules. Defaults to the current time. */
|
|
983
|
+
scheduleAt?: Date;
|
|
895
984
|
};
|
|
896
985
|
/** Payment a redeem references, as listed for the merchant. */
|
|
897
986
|
type RedeemPaymentRow = {
|
|
@@ -1146,6 +1235,10 @@ declare const fetchKioskRealtimeToken: (input: {
|
|
|
1146
1235
|
device_secret: string;
|
|
1147
1236
|
}, options?: ServiceHttpOptions) => Promise<KioskRealtimeToken>;
|
|
1148
1237
|
//#endregion
|
|
1238
|
+
//#region src/services/masivo.d.ts
|
|
1239
|
+
declare const verifyMasivoTotp: (input: MasivoTotpVerifyInput, options?: ServiceHttpOptions) => Promise<MasivoTotpVerification>;
|
|
1240
|
+
declare const createMasivoTotp: (input: MasivoTotpCreateInput, options?: ServiceHttpOptions) => Promise<MasivoTotpCode>;
|
|
1241
|
+
//#endregion
|
|
1149
1242
|
//#region src/services/menus.types.d.ts
|
|
1150
1243
|
type ListMenusStreamOptions = ServiceHttpOptions & StorefrontMenuStreamOptions;
|
|
1151
1244
|
//#endregion
|
|
@@ -1339,11 +1432,17 @@ declare const services: {
|
|
|
1339
1432
|
get: typeof listMenus;
|
|
1340
1433
|
stream: typeof listMenusStream;
|
|
1341
1434
|
};
|
|
1435
|
+
masivo: {
|
|
1436
|
+
verifyTotp: typeof verifyMasivoTotp;
|
|
1437
|
+
createTotp: typeof createMasivoTotp;
|
|
1438
|
+
};
|
|
1342
1439
|
orders: {
|
|
1343
1440
|
list: typeof listOrders;
|
|
1344
1441
|
post: typeof createOrder;
|
|
1345
1442
|
get: typeof getOrder;
|
|
1346
1443
|
patch: typeof updateOrder;
|
|
1444
|
+
setCustomer: typeof setOrderCustomer;
|
|
1445
|
+
clearCustomer: typeof clearOrderCustomer;
|
|
1347
1446
|
cancel: typeof cancelOrder;
|
|
1348
1447
|
refund: typeof refundOrder;
|
|
1349
1448
|
reorder: typeof reorderOrder;
|
|
@@ -1434,8 +1533,102 @@ type ScheduleWindow = {
|
|
|
1434
1533
|
next: Date | null;
|
|
1435
1534
|
};
|
|
1436
1535
|
/** Whether `schedule` is in hours now, and until / next open. */
|
|
1437
|
-
declare const getScheduleWindow: (schedule: Schedule | null | undefined, now?: Date) => ScheduleWindow;
|
|
1438
|
-
declare const isOnSchedule: (schedule: Schedule | null | undefined, now?: Date) => boolean;
|
|
1536
|
+
declare const getScheduleWindow: (schedule: Schedule | null | undefined, now?: Date, span?: Date) => ScheduleWindow;
|
|
1537
|
+
declare const isOnSchedule: (schedule: Schedule | null | undefined, now?: Date, timeZone?: string) => boolean;
|
|
1538
|
+
//#endregion
|
|
1539
|
+
//#region src/schedule/buildScheduleSlots.types.d.ts
|
|
1540
|
+
interface ScheduleSlotWindow {
|
|
1541
|
+
start: string;
|
|
1542
|
+
end: string;
|
|
1543
|
+
}
|
|
1544
|
+
interface ScheduleSlotCartLine {
|
|
1545
|
+
id?: string;
|
|
1546
|
+
quantity?: number;
|
|
1547
|
+
type?: string;
|
|
1548
|
+
parent_uid?: string | null;
|
|
1549
|
+
/** Weekly product hours. */
|
|
1550
|
+
schedules?: Schedule | null;
|
|
1551
|
+
/** Weekly category hours. */
|
|
1552
|
+
categorySchedules?: Schedule | null;
|
|
1553
|
+
/** Absolute windows. A non-empty list must contain the slot. */
|
|
1554
|
+
windows?: ScheduleSlotWindow[] | null;
|
|
1555
|
+
inactiveUntil?: string | null;
|
|
1556
|
+
unavailable?: boolean;
|
|
1557
|
+
}
|
|
1558
|
+
interface SchedulePrepEffect {
|
|
1559
|
+
strategy: string;
|
|
1560
|
+
value: number;
|
|
1561
|
+
operator?: string | null;
|
|
1562
|
+
preparing?: number | null;
|
|
1563
|
+
}
|
|
1564
|
+
interface SchedulePrepRule {
|
|
1565
|
+
fallback?: boolean;
|
|
1566
|
+
conditions?: OrConditions | null;
|
|
1567
|
+
interpretation?: "client" | "server" | "both";
|
|
1568
|
+
effect: SchedulePrepEffect;
|
|
1569
|
+
}
|
|
1570
|
+
interface ScheduleSlotCart {
|
|
1571
|
+
lines?: ScheduleSlotCartLine[];
|
|
1572
|
+
total?: number;
|
|
1573
|
+
is_anonymous?: boolean;
|
|
1574
|
+
prepTime?: {
|
|
1575
|
+
rules: SchedulePrepRule[];
|
|
1576
|
+
} | null;
|
|
1577
|
+
preparingCount?: number;
|
|
1578
|
+
}
|
|
1579
|
+
interface ScheduleSlot {
|
|
1580
|
+
/** Slot start as an ISO UTC string. */
|
|
1581
|
+
start: string;
|
|
1582
|
+
/** Store-local label. */
|
|
1583
|
+
label: string;
|
|
1584
|
+
}
|
|
1585
|
+
interface BuildScheduleSlotsConfig {
|
|
1586
|
+
menuSchedule: Schedule | null | undefined;
|
|
1587
|
+
timezone: string;
|
|
1588
|
+
stepMinutes: number;
|
|
1589
|
+
/** Minutes. Defaults to one hour. */
|
|
1590
|
+
minLeadTime?: number;
|
|
1591
|
+
/** Minutes. Defaults to seven days. */
|
|
1592
|
+
maxHorizonMinutes?: number;
|
|
1593
|
+
cart?: ScheduleSlotCart | null;
|
|
1594
|
+
/** Store weekly hours. Null means the store has no hour limit. */
|
|
1595
|
+
storeSchedule?: Schedule | null;
|
|
1596
|
+
/** `OPEN` is the only status that can take a scheduled time. */
|
|
1597
|
+
storeStatus?: string | null;
|
|
1598
|
+
/** BCP 47 tag for `label`, such as es-EC. */
|
|
1599
|
+
locale?: string;
|
|
1600
|
+
/** Injectable clock. */
|
|
1601
|
+
now?: Date;
|
|
1602
|
+
}
|
|
1603
|
+
//#endregion
|
|
1604
|
+
//#region src/schedule/buildScheduleSlots.d.ts
|
|
1605
|
+
/** True when `instant` is one stepped slot the menu, store, and cart allow. */
|
|
1606
|
+
declare const isScheduleSlot: (instant: Date, config: BuildScheduleSlotsConfig) => boolean;
|
|
1607
|
+
/**
|
|
1608
|
+
* Stepped instants inside menu hours, in the store timezone.
|
|
1609
|
+
* Drops the past, anything before now + lead (and prep, when a cart is
|
|
1610
|
+
* given), and slots a cart line cannot sell.
|
|
1611
|
+
*/
|
|
1612
|
+
declare const buildScheduleSlots: (config: BuildScheduleSlotsConfig) => ScheduleSlot[];
|
|
1613
|
+
//#endregion
|
|
1614
|
+
//#region src/prepTime/resolvePrepTime.d.ts
|
|
1615
|
+
/** Cart-aware prep minutes. One minute when no rule matches. */
|
|
1616
|
+
declare const resolveSchedulePrepMinutes: (input: {
|
|
1617
|
+
rules: SchedulePrepRule[];
|
|
1618
|
+
order: RulesEngineOrder;
|
|
1619
|
+
preparingCount?: number;
|
|
1620
|
+
}) => number;
|
|
1621
|
+
//#endregion
|
|
1622
|
+
//#region src/schedule/scheduleTime.d.ts
|
|
1623
|
+
/** Default earliest pickup slot: one hour from now. */
|
|
1624
|
+
declare const SCHEDULED_ORDER_MIN_LEAD_MINUTES = 60;
|
|
1625
|
+
/** Latest bookable instant. No merchant preference stores this yet. */
|
|
1626
|
+
declare const SCHEDULED_ORDER_MAX_HORIZON_HOURS = 48;
|
|
1627
|
+
declare const SCHEDULED_ORDER_MAX_HORIZON_MINUTES: number;
|
|
1628
|
+
/** Slot grid used when a customer picks a time. */
|
|
1629
|
+
declare const SCHEDULED_ORDER_SLOT_MINUTES = 15;
|
|
1630
|
+
/** Absolute UTC instant. Naive strings are read in `timeZone`. */
|
|
1631
|
+
declare const scheduledInstant: (value: string, timeZone: string) => string | null;
|
|
1439
1632
|
//#endregion
|
|
1440
1633
|
//#region src/logs/context.d.ts
|
|
1441
1634
|
declare const getLogContext: () => SdkLogContext;
|
|
@@ -1718,4 +1911,4 @@ declare const validateCardholderName: (value: string) => CardholderNameError | n
|
|
|
1718
1911
|
*/
|
|
1719
1912
|
declare const cardPreviewGroups: (value: string) => CardPreviewSlot[][];
|
|
1720
1913
|
//#endregion
|
|
1721
|
-
export { type ApplyRedeemInput, type AuthConfigureOptions, CARD_BRANDS, CUSTOMER_INFO_PLACEHOLDERS, type CardBrand, type CardBrandSpec, type CardCvcError, type CardExpiry, type CardExpiryError, type CardNumberError, type CardPreviewSlot, type CardholderNameError, type CreateOrderOptions, type CreateSessionOptions, type CustomizationPath, type CustomizationSession, DEFAULT_RECOMMENDATION_TYPES, type DeunaCallbackUrls, type DeunaOrderStatus, type ExchangeOptions, type FailedCharge, type FlatMenuCategory, type GenOrderIdOptions, type GroupDisplayType, ID_HASH_FORMATS, type IdBuilder, type IdHashFormat, type ListMenusStreamOptions, type ListPaymentsOptions, type Menu, type MenuCategoryNode, type MenuLookup, type MilestoneSteps, type MilestoneTrackItem, type ModifierControlType, type ModifierCtx, type ModifierGroupCtx, type NestedMenuCategory, Order, type OrderCancelInput, type OrderCancelOptions, type OrderCancelResult, type OrderCancelType, type OrderCustomerSource, type OrderDeviceCredential, type OrderDraft, type OrderIssue, type OrderIssueCode, type OrderLineDiff, type OrderLineIssue, type OrderLineIssueCode, OrderPaymentRequiredError, type OrderScope, OrderSyncPendingError, OrderSyncRejectedError, OrderValidationError, type OrderValidationResult, type PayIntentOptions, type PayIntentResult, type PayOptions, type PaymentCardBrand, type PaymentProgressEvent, type PaymentProgressListener, type PaymentRunOptions, type PaymentSessionOptions, type PricingModifier, type Product, type ProductCtx, type QuantitiesByPath, type RecommendationType, RecurringDateCron, type RedeemPaymentRow, type RemoveRedeemInput, type ReorderOrderOptions, type ResetOptions, type ReversalOutcome, type ReverseAllOptions, RulesEngine, type ScheduleWindow, type SelectionStatus, type SelectionsByPath, type SerializedError, type ServiceHttpOptions, type SimpleTenderPayment, type Snapshot, type StorefrontAccessToken, type StorefrontErrorDetails, StorefrontHttpError, type TrackWorkflow, type ValidateOptions, type ValidateOrderAgainstMenuInput, type Variant, type VariantGroup, type VariantGroupCtx, type VariantOptionCtx, type VariantSelection, type VerifyWebhookSignatureInput, type VisitedState, addLines, auth, buildCustomerSnapshot, cancelTypeOf, capRedeems, cappedRedeems, cardBrandSpec, cardDigits, cardNumberGaps, cardNumberMaxLength, cardPreviewGroups, caretAfterDigits, collectOrderLineDiffs, computeStartingPrice, countCartProducts, coveredAmount, createDeunaWidgetApi, createSession, currentNodes, cvcMaxLength, defaultConditionError, detectCardBrand, fitRedeems, flattenMenuCategories, flushLogs, formatCardNumber, formatCvc, formatExpiry, fromOrderLines, genId, genOrderId, getLogContext, getScheduleWindow, indexMenu, isCardNumberComplete, isCardNumberDefinitelyInvalid, isCheckoutFieldFilled, isCustomerInfoFieldFilled, isCustomerInfoPlaceholder, isCustomerInfoValueValid, isCvcComplete, isDeviceCharged, isDeviceNotLinked, isExpiryComplete, isGenId, isKioskUnauthorized, isMilestoneStepDone, isOnSchedule, isOrderPaymentRequiredError, isOrderValidationError, isPosDeviceNotLinked, isPosUnauthorized, isRealPaymentMethod, isStorefrontNotFound, isVariantBase, linePayableTotal, listMenusStream, localizePosError, log, logError, luhnCheck, matchAbsoluteDateOperator, matchBooleanOperator, matchCurrencyOperator, matchEnumOperator, matchNumberOperator, matchRecurringDateOperator, matchRelativeDateOperator, matchStringOperator, milestoneSteps, milestoneTrack, nestMenuCategories, normalizeCardholderName, normalizeCustomerPhone, orderPayableTotal, orderRedeemedTotal, orderRedeems, parseExpiry, paymentMatchesClientConditions, rebuildRootGroups, recomputeTotals, redeemedTotal, redeemsForPayment, redemptionCap, redemptionSteps, remainingAmount, removeLine, replaceLine, resolveCheckout, resolveModifierImageUrl, reversePayment, runPaymentAttempt, selectablePayments, serializeError, services, setLineQuantity, storefrontJson, toOrderLines, toPaymentCardBrand, validateCardNumber, validateCardholderName, validateCvc, validateExpiry, validateOrderAgainstMenu, verifyWebhookSignature, visitedStates };
|
|
1914
|
+
export { type ApplyRedeemInput, type AuthConfigureOptions, type BuildScheduleSlotsConfig, CARD_BRANDS, CUSTOMER_INFO_PLACEHOLDERS, type CardBrand, type CardBrandSpec, type CardCvcError, type CardExpiry, type CardExpiryError, type CardNumberError, type CardPreviewSlot, type CardholderNameError, type CreateOrderOptions, type CreateSessionOptions, type CustomizationPath, type CustomizationSession, DEFAULT_RECOMMENDATION_TYPES, DelegatedSessionExpiredError, type DeunaCallbackUrls, type DeunaOrderStatus, type ExchangeOptions, type FailedCharge, type FlatMenuCategory, type GenOrderIdOptions, type GroupDisplayType, ID_HASH_FORMATS, type IdBuilder, type IdHashFormat, type ListMenusStreamOptions, type ListPaymentsOptions, type Menu, type MenuCategoryNode, type MenuLookup, type MilestoneSteps, type MilestoneTrackItem, type ModifierControlType, type ModifierCtx, type ModifierGroupCtx, type NestedMenuCategory, Order, OrderAuthPinnedError, type OrderCancelInput, type OrderCancelOptions, type OrderCancelResult, type OrderCancelType, type OrderCustomerSource, type OrderDeviceCredential, type OrderDraft, type OrderIssue, type OrderIssueCode, type OrderLineDiff, type OrderLineIssue, type OrderLineIssueCode, OrderNotOpenError, OrderPaymentRequiredError, type OrderScope, OrderSyncPendingError, OrderSyncRejectedError, OrderValidationError, type OrderValidationResult, type PayIntentOptions, type PayIntentResult, type PayOptions, type PaymentCardBrand, type PaymentProgressEvent, type PaymentProgressListener, type PaymentRunOptions, type PaymentSessionOptions, type PricingModifier, type Product, type ProductCtx, type QuantitiesByPath, type RecommendationType, RecurringDateCron, type RedeemPaymentRow, type RemoveRedeemInput, type ReorderOrderOptions, type ResetOptions, type ReversalOutcome, type ReverseAllOptions, RulesEngine, SCHEDULED_AT_ERROR_CODES, SCHEDULED_ORDER_MAX_HORIZON_HOURS, SCHEDULED_ORDER_MAX_HORIZON_MINUTES, SCHEDULED_ORDER_MIN_LEAD_MINUTES, SCHEDULED_ORDER_SLOT_MINUTES, type ScheduleSlot, type ScheduleSlotCart, type ScheduleSlotCartLine, type ScheduleWindow, type SelectionStatus, type SelectionsByPath, type SerializedError, type ServiceHttpOptions, type SimpleTenderPayment, type Snapshot, type StorefrontAccessToken, type StorefrontErrorDetails, StorefrontHttpError, type SwitchCustomerArg, type SwitchCustomerIdToken, type SwitchCustomerResult, type TrackWorkflow, type ValidateOptions, type ValidateOrderAgainstMenuInput, type Variant, type VariantGroup, type VariantGroupCtx, type VariantOptionCtx, type VariantSelection, type VerifyWebhookSignatureInput, type VisitedState, addLines, auth, buildCustomerSnapshot, buildScheduleSlots, cancelTypeOf, capRedeems, cappedRedeems, cardBrandSpec, cardDigits, cardNumberGaps, cardNumberMaxLength, cardPreviewGroups, caretAfterDigits, collectOrderLineDiffs, computeStartingPrice, countCartProducts, coveredAmount, createDeunaWidgetApi, createSession, currentNodes, cvcMaxLength, defaultConditionError, detectCardBrand, fitRedeems, flattenMenuCategories, flushLogs, formatCardNumber, formatCvc, formatExpiry, fromOrderLines, genId, genOrderId, getLogContext, getScheduleWindow, indexMenu, isCardNumberComplete, isCardNumberDefinitelyInvalid, isCheckoutFieldFilled, isCustomerInfoFieldFilled, isCustomerInfoPlaceholder, isCustomerInfoValueValid, isCvcComplete, isDelegatedSessionExpiredError, isDeviceCharged, isDeviceNotLinked, isExpiryComplete, isGenId, isKioskUnauthorized, isMilestoneStepDone, isOnSchedule, isOrderNotOpenError, isOrderPaymentRequiredError, isOrderValidationError, isPosDeviceNotLinked, isPosUnauthorized, isRealPaymentMethod, isScheduleSlot, isScheduledAtError, isStorefrontNotFound, isVariantBase, linePayableTotal, listMenusStream, localizePosError, log, logError, luhnCheck, matchAbsoluteDateOperator, matchBooleanOperator, matchCurrencyOperator, matchEnumOperator, matchNumberOperator, matchRecurringDateOperator, matchRelativeDateOperator, matchStringOperator, milestoneSteps, milestoneTrack, nestMenuCategories, normalizeCardholderName, normalizeCustomerPhone, orderPayableTotal, orderRedeemedTotal, orderRedeems, parseExpiry, paymentMatchesClientConditions, rebuildRootGroups, recomputeTotals, redeemedTotal, redeemsForPayment, redemptionCap, redemptionSteps, remainingAmount, removeLine, replaceLine, resolveCheckout, resolveModifierImageUrl, resolveSchedulePrepMinutes, reversePayment, runPaymentAttempt, scheduledInstant, selectablePayments, serializeError, services, setLineQuantity, storefrontJson, toOrderLines, toPaymentCardBrand, validateCardNumber, validateCardholderName, validateCvc, validateExpiry, validateOrderAgainstMenu, verifyWebhookSignature, visitedStates };
|