@fire-spark/core 0.2.0 → 0.3.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.
Files changed (3) hide show
  1. package/dist/index.d.ts +171 -20
  2. package/dist/index.js +1789 -1262
  3. package/package.json +3 -3
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { PaymentAdapter, PaymentCollectAt, PaymentContext, PaymentResult, PaymentStorage, PaymentUI } 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, OrderFulfillment, OrderInsertInput, OrderLine, OrderListInput, OrderRecordPaymentInput, OrderRedeem, OrderRedemptionStep, OrderReorderInput, OrderTotals, OrderUpdateInput, OrderValidateInput, OrderValidateOutput, PaymentIntentInput, PaymentMethod, PaymentProvider, PlaceOrderResult, PosCatalog, PosHealthBatchInput, PosHealthBatchResult, PosHeartbeatInput, PosHeartbeatResult, PosKioskOrder, PosKioskSettleInput, PosKioskSettleResult, PosOrderInput, PosOrderResult, 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, Variant, VariantGroup } from "@fire-spark/types";
1
+ import { PaymentAdapter, PaymentCollectAt, PaymentContext, PaymentResult, PaymentStorage, PaymentUI, isRealPaymentMethod } 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, OrderFulfillment, OrderInsertInput, OrderLine, OrderListInput, OrderRecordPaymentInput, OrderRedeem, OrderRedemptionStep, OrderReorderInput, OrderTotals, OrderUpdateInput, OrderValidateInput, OrderValidateOutput, PaymentCollectAt as PaymentCollectAt$1, PaymentIntentPutInput, PaymentMethod, PaymentProvider, PaymentTender, PaymentTenderInput, PlaceOrderResult, PosCatalog, PosHealthBatchInput, PosHealthBatchResult, PosHeartbeatInput, PosHeartbeatResult, PosKioskOrder, PosKioskSettleInput, PosKioskSettleResult, PosOrderInput, PosOrderResult, 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";
3
3
  import { Big } from "big.js";
4
4
  //#region src/productCustomization/types.d.ts
5
5
  type SelectionStatus = "IDLE" | "INCOMPLETE" | "VALID" | "INVALID";
@@ -214,10 +214,16 @@ type ServiceHttpOptions = {
214
214
  fetchImpl?: typeof fetch;
215
215
  signal?: AbortSignal;
216
216
  };
217
+ type StorefrontErrorDetails = Record<string, unknown> & {
218
+ code?: string;
219
+ };
217
220
  declare class StorefrontHttpError extends Error {
218
221
  status: number;
222
+ /** `details.code` when present, else the top-level `code`. */
219
223
  code?: string;
220
- constructor(message: string, status: number, code?: string);
224
+ /** API `details` object (e.g. `{ code, payment_id, reason }`). */
225
+ details: StorefrontErrorDetails | null;
226
+ constructor(message: string, status: number, code?: string, details?: StorefrontErrorDetails | null);
221
227
  }
222
228
  declare const isStorefrontNotFound: (error: unknown) => boolean;
223
229
  declare const storefrontJson: <T>(path: string, init?: RequestInit, options?: ServiceHttpOptions) => Promise<T>;
@@ -227,16 +233,31 @@ declare const listOrders: (input?: OrderListInput, options?: ServiceHttpOptions)
227
233
  declare const createOrder: (body: OrderInsertInput, options?: ServiceHttpOptions) => Promise<Order$1>;
228
234
  declare const getOrder: (id: string, options?: ServiceHttpOptions) => Promise<Order$1>;
229
235
  type PlaceOrderInput = {
236
+ /** DRAFT intent built with `PUT /orders/:id/payment-intent`. */
237
+ intent_id?: string;
238
+ /**
239
+ * Simple flow: `Order.placeOrder` turns it into a one-real-tender DRAFT
240
+ * intent (plus REDEMPTION tenders) and places with its `intent_id`.
241
+ */
230
242
  payment?: {
231
243
  id?: string;
232
244
  type?: PaymentMethod;
233
245
  provider?: PaymentProvider;
234
- intents?: PaymentIntentInput[];
246
+ collect_at?: PaymentCollectAt$1;
235
247
  };
236
248
  };
237
249
  declare const placeOrder: (id: string, body?: PlaceOrderInput, options?: ServiceHttpOptions) => Promise<PlaceOrderResult>;
238
- /** Records (or updates by `metadata.attempt_reference`) one payment intent. */
250
+ /** Records one tender attempt result (idempotent by `attempt_reference`). */
239
251
  declare const recordOrderPayment: (id: string, body: OrderRecordPaymentInput, options?: ServiceHttpOptions) => Promise<Order$1>;
252
+ /** Creates or replaces the DRAFT intent; the server computes amounts. */
253
+ declare const putPaymentIntent: (id: string, body: PaymentIntentPutInput, options?: ServiceHttpOptions) => Promise<Order$1>;
254
+ /** Discards the DRAFT intent (`409 PAYMENT_INTENT_LOCKED` once placed). */
255
+ declare const deletePaymentIntent: (id: string, options?: ServiceHttpOptions) => Promise<Order$1>;
256
+ /** New tender with `replaces_tender_id`; only over a `FAILED` tender (D25). */
257
+ declare const replaceTender: (id: string, tenderId: string, body: TenderReplaceInput, options?: ServiceHttpOptions) => Promise<Order$1>;
258
+ declare const voidTender: (id: string, tenderId: string, body: TenderVoidInput, options?: ServiceHttpOptions) => Promise<Order$1>;
259
+ /** Full refund without `amount` / `items`; partial by amount or units. */
260
+ declare const refundTender: (id: string, tenderId: string, body: TenderRefundInput, options?: ServiceHttpOptions) => Promise<Order$1>;
240
261
  declare const getOrderFulfillment: (id: string, options?: ServiceHttpOptions) => Promise<OrderFulfillment>;
241
262
  declare const listOrderFulfillments: (ids: string[], options?: ServiceHttpOptions) => Promise<OrderFulfillment[]>;
242
263
  declare const updateOrder: (id: string, body: OrderUpdateInput, options?: ServiceHttpOptions) => Promise<Order$1>;
@@ -272,11 +293,14 @@ declare const reversePayment: (adapter: PaymentAdapter, ctx: PaymentContext, res
272
293
  }) => Promise<ReversalOutcome>;
273
294
  //#endregion
274
295
  //#region src/order/payments/session.d.ts
275
- type Intent = Order$1["payment_intents"][number];
296
+ type Intents = Order$1["payment_intents"];
276
297
  type PaymentSessionOptions = {
277
298
  /** Merchant env is production (`env_is_prod`). */
278
299
  isProduction?: boolean;
279
- /** Where the customer pays: `KIOSK` on a kiosk, `DEVICE` on web/app. */
300
+ /**
301
+ * Adapter context: `KIOSK` on a kiosk, `DEVICE` on web/app. Tenders the
302
+ * SDK charges are always saved with `collect_at: DEVICE` (§7.3).
303
+ */
280
304
  collectAt?: PaymentCollectAt;
281
305
  /** Where cash is collected: `COUNTER` on a kiosk, `DOOR` on delivery. */
282
306
  cashCollectAt?: PaymentCollectAt;
@@ -285,14 +309,64 @@ type PaymentSessionOptions = {
285
309
  /** Kiosk device id, sent with terminal failure reports. */
286
310
  deviceId?: string | null;
287
311
  };
288
- type PayOptions = {
289
- /** Amount in the order currency; defaults to the remaining amount. */
290
- amount?: number;
312
+ /** `onProgress` of `payIntent` / `retryTender` (§6.1). */
313
+ type PaymentProgressEvent = {
314
+ type: "tender_started";
315
+ tender: PaymentTender;
316
+ } |
317
+ /** Intermediate result of the running tender (QR, redirect, terminal). */
318
+ {
319
+ type: "tender_pending";
320
+ tender: PaymentTender;
321
+ result: PaymentResult;
322
+ } | {
323
+ type: "tender_paid";
324
+ tender: PaymentTender;
325
+ result: PaymentResult;
326
+ } | {
327
+ type: "tender_failed";
328
+ tender: PaymentTender;
329
+ result: PaymentResult;
330
+ } | {
331
+ type: "reversing";
332
+ tender: PaymentTender;
333
+ };
334
+ type PaymentProgressListener = (event: PaymentProgressEvent) => void | Promise<void>;
335
+ type PayIntentOptions = {
336
+ /** Simple flow: placed as the one real tender (plus REDEMPTION). */
337
+ payment?: MerchantPayment;
291
338
  signal?: AbortSignal;
292
- onProgress?: PaymentRunOptions["onProgress"];
339
+ onProgress?: PaymentProgressListener;
340
+ };
341
+ /** @deprecated Use `PayIntentOptions`. */
342
+ type PayOptions = Omit<PayIntentOptions, "payment">;
343
+ type FailedCharge = {
344
+ tender: PaymentTender;
345
+ result: PaymentResult;
346
+ };
347
+ /**
348
+ * `PAID`: every live tender is settled. `PENDING`: in-person tenders or
349
+ * deferred captures are left. `FAILED`: stopped at `tender` (D25: retry,
350
+ * replace or cancel and refund; nothing expires).
351
+ */
352
+ type PayIntentResult = {
353
+ status: "PAID" | "PENDING";
354
+ order: Order$1;
355
+ results: PaymentResult[];
356
+ needsReview: boolean;
357
+ } | {
358
+ status: "FAILED";
359
+ order: Order$1;
360
+ results: PaymentResult[];
361
+ needsReview: boolean;
362
+ tender: PaymentTender;
363
+ result: PaymentResult;
293
364
  };
294
- /** PAID plus PENDING with `confirm_after_inject`, in the order currency. */
295
- declare const coveredAmount: (intents: Intent[]) => number;
365
+ type ReverseAllOptions = {
366
+ onProgress?: PaymentProgressListener;
367
+ };
368
+ /** Settled tenders plus PENDING `confirm_after_inject`, order currency. */
369
+ declare const coveredAmount: (intents: Intents) => number;
296
370
  declare const remainingAmount: (order: Order$1) => number;
297
371
  //#endregion
298
372
  //#region src/order/recommendations.d.ts
@@ -338,6 +412,17 @@ type ApplyRedeemInput = {
338
412
  before_taxes?: boolean;
339
413
  /** Root line to discount; omit to discount the whole order (prorated). */
340
414
  line_uid?: string;
415
+ /**
416
+ * Points / balance: the merchant `REDEMPTION` payment that pays `amount`
417
+ * (a tender, not a discount). Requires `amount` and `points`.
418
+ */
419
+ payment_id?: string;
420
+ /** Money the points cover; trimmed to total − tip − delivery. */
421
+ amount?: number;
422
+ points?: number;
423
+ program?: string;
424
+ /** Provider of the REDEMPTION payment (default `firespark`). */
425
+ provider?: PaymentProvider;
341
426
  /** ISO datetime with offset; validation fails once it has passed. */
342
427
  expires_at?: string;
343
428
  };
@@ -360,6 +445,9 @@ declare class Order {
360
445
  private readonly http;
361
446
  private readonly flush;
362
447
  private readonly payments;
448
+ /** Real tenders chosen with `setTenders`; REDEMPTION ones come from redeem. */
449
+ private realTenders;
450
+ private readonly redemptionProviders;
363
451
  private constructor();
364
452
  /**
365
453
  * Opens a cart session: reuses an existing OPEN order for the scope, or a
@@ -407,12 +495,15 @@ declare class Order {
407
495
  emptyOrder(): void;
408
496
  /**
409
497
  * Appends a redeem to `line_uid` (root line) or to the order. Steps keep
410
- * the order in which redeems were applied.
498
+ * the order in which redeems were applied. With `payment_id` (points /
499
+ * balance) it is not a discount: the order gets a REDEMPTION tender for
500
+ * it, capped at total − tip − delivery (D15, D18, D19).
411
501
  */
412
502
  applyRedeem(input: ApplyRedeemInput): void;
413
503
  /**
414
504
  * Removes `quantity` units of `reward_id` from `line_uid` or the order,
415
- * latest applied first. Removing more units than applied clears them all.
505
+ * latest applied first. Removing more units than applied clears them all
506
+ * (and the REDEMPTION tender of a points / balance redeem).
416
507
  */
417
508
  removeRedeem(input: RemoveRedeemInput): void;
418
509
  private rememberLogScope;
@@ -426,6 +517,23 @@ declare class Order {
426
517
  cancelOrder(): Promise<void>;
427
518
  refundOrder(): Promise<void>;
428
519
  validateOrder(): Promise<void>;
520
+ /** Tenders of the next intent: real ones plus one per payment redeem. */
521
+ getTenders(payment?: PlaceOrderInput["payment"]): PaymentTenderInput[];
522
+ /**
523
+ * Chooses the real tenders (with allocation for mixed payments) and saves
524
+ * the DRAFT intent; the server returns amounts per tender. REDEMPTION
525
+ * tenders are added from the redeems, never passed here.
526
+ */
527
+ setTenders(tenders: PaymentTenderInput[]): Promise<Order$1>;
528
+ /** Drops the chosen tenders and discards the DRAFT intent. */
529
+ clearTenders(): Promise<Order$1>;
530
+ private syncPaymentIntent;
531
+ private applyServerOrder;
532
+ /**
533
+ * Places the order with a DRAFT intent: `intent_id` as is, else the
534
+ * tenders of `getTenders(input.payment)` saved first (simple flow: one
535
+ * real tender plus REDEMPTION). The intent is `LOCKED` afterwards (D25).
536
+ */
429
537
  placeOrder(input?: PlaceOrderInput): Promise<void>;
430
538
  /** Installed `@fire-spark/payments-*` adapters (provider + method). */
431
539
  setPaymentAdapters(adapters: PaymentAdapter[]): void;
@@ -439,14 +547,34 @@ declare class Order {
439
547
  getPaymentOptions(payments: MerchantPayment[]): MerchantPayment[];
440
548
  /** Device fields still missing for `payment` on this device. */
441
549
  getMissingPaymentFields(payment: MerchantPayment): import("@fire-spark/payments").DeviceField[];
442
- /** Order total minus PAID (and confirm-after-inject) intents. */
550
+ /** Order total minus settled (and confirm-after-inject) tenders. */
443
551
  getRemainingAmount(): number;
444
- /** Places the order if needed and charges `payment` (all or part). */
445
- pay(payment: MerchantPayment, options?: PayOptions): Promise<import("@fire-spark/payments").PaymentResult>;
552
+ /** Merchant payments the tenders point to (`payment_id`). */
553
+ setPayments(payments: MerchantPayment[]): void;
554
+ /**
555
+ * Places the order if needed and charges its real device tenders in
556
+ * sequence (§6.1); stops at the first failure with the order frozen.
557
+ */
558
+ payIntent(options?: PayIntentOptions): Promise<PayIntentResult>;
559
+ /** Charges a FAILED tender again with a new attempt reference (D25). */
560
+ retryTender(tenderId: string, options?: PayIntentOptions): Promise<PayIntentResult>;
561
+ /** Changes the method of a FAILED tender; then `payIntent()` again. */
562
+ replaceTender(tenderId: string, payment: MerchantPayment, collectAt?: PaymentCollectAt$1): Promise<Order$1>;
563
+ /** "Cancel and refund": reverses device charges, then cancels the order. */
564
+ cancelAndRefund(options?: ReverseAllOptions): Promise<ReversalOutcome[]>;
565
+ /** Voids one tender (operator flow); idempotent per call. */
566
+ voidTender(tenderId: string, reason?: string): Promise<Order$1>;
567
+ /** Refunds one tender: all of it, an amount, or some units. */
568
+ refundTender(tenderId: string, input?: {
569
+ amount?: number;
570
+ reason?: string;
571
+ }): Promise<Order$1>;
572
+ /** @deprecated Use `payIntent({ payment })`. */
573
+ pay(payment: MerchantPayment, options?: PayOptions): Promise<PayIntentResult>;
446
574
  /** Confirms intents that waited for the order injection. */
447
575
  confirmPaymentsAfterInject(): Promise<import("@fire-spark/payments").PaymentResult[]>;
448
576
  /** Cancels or refunds every charge of this order (or flags it manual). */
449
- reversePayments(): Promise<ReversalOutcome[]>;
577
+ reversePayments(options?: ReverseAllOptions): Promise<ReversalOutcome[]>;
450
578
  /** Terminal admin operation (init, test, closeBatch, status, extra). */
451
579
  runPaymentTerminal(payment: MerchantPayment, key: string): Promise<import("@fire-spark/payments").TerminalResult>;
452
580
  /** Applies lines/redeem, replaying redemption steps and totals. */
@@ -602,6 +730,24 @@ declare const setLineQuantity: (lines: OrderLine[], lineUid: string, quantity: n
602
730
  /** Drop a root subtree, then add the replacement tree (may merge by fingerprint). */
603
731
  declare const replaceLine: (lines: OrderLine[], lineUid: string, next: OrderLine | OrderLine[]) => OrderLine[];
604
732
  //#endregion
733
+ //#region src/order/tenders.d.ts
734
+ /**
735
+ * Digital tender the SDK charges (`DEVICE`, §7.3). `KIOSK`, `COUNTER`,
736
+ * `DOOR` and `OTHER` are in person: the POS, an operator or the courier
737
+ * collects them (§12).
738
+ */
739
+ declare const isDeviceCharged: (tender: {
740
+ collect_at: string;
741
+ }) => boolean;
742
+ /** Most a REDEMPTION can cover: order total − tip − delivery (D18). */
743
+ declare const redemptionCap: (order: Pick<Order$1, "lines" | "totals">) => number;
744
+ type SimpleTenderPayment = {
745
+ id?: string;
746
+ type?: PaymentTenderInput["method"];
747
+ provider?: PaymentProvider;
748
+ collect_at?: PaymentCollectAt$1;
749
+ };
750
+ //#endregion
605
751
  //#region src/services/availability.d.ts
606
752
  declare const getAvailability: (scope?: StorefrontMenuScope, options?: ServiceHttpOptions) => Promise<StorefrontAvailability>;
607
753
  //#endregion
@@ -793,6 +939,11 @@ declare const services: {
793
939
  validate: typeof validateOrder;
794
940
  place: typeof placeOrder;
795
941
  recordPayment: typeof recordOrderPayment;
942
+ putPaymentIntent: typeof putPaymentIntent;
943
+ deletePaymentIntent: typeof deletePaymentIntent;
944
+ replaceTender: typeof replaceTender;
945
+ voidTender: typeof voidTender;
946
+ refundTender: typeof refundTender;
796
947
  getFulfillment: typeof getOrderFulfillment;
797
948
  listFulfillments: typeof listOrderFulfillments;
798
949
  };
@@ -1112,4 +1263,4 @@ declare const validateCardholderName: (value: string) => CardholderNameError | n
1112
1263
  */
1113
1264
  declare const cardPreviewGroups: (value: string) => CardPreviewSlot[][];
1114
1265
  //#endregion
1115
- export { type ApplyRedeemInput, type AuthConfigureOptions, CARD_BRANDS, 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 ExchangeOptions, type FlatMenuCategory, type GroupDisplayType, type IdBuilder, type ListMenusStreamOptions, type Menu, type MenuCategoryNode, type MenuLookup, type MilestoneSteps, type MilestoneTrackItem, type ModifierControlType, type ModifierCtx, type ModifierGroupCtx, type NestedMenuCategory, Order, type OrderCustomerSource, type OrderDraft, type OrderIssue, type OrderIssueCode, type OrderLineDiff, type OrderLineIssue, type OrderLineIssueCode, type OrderScope, OrderSyncPendingError, OrderValidationError, type OrderValidationResult, type PayOptions, type PaymentCardBrand, type PaymentRunOptions, type PaymentSessionOptions, type PricingModifier, type Product, type ProductCtx, type QuantitiesByPath, type RecommendationType, RecurringDateCron, type RemoveRedeemInput, type ReorderOrderOptions, type ResetOptions, type ReversalOutcome, RulesEngine, type ScheduleWindow, type SelectionStatus, type SelectionsByPath, type SerializedError, type ServiceHttpOptions, type Snapshot, type StorefrontAccessToken, StorefrontHttpError, type TrackWorkflow, type ValidateOptions, type ValidateOrderAgainstMenuInput, type Variant, type VariantGroup, type VariantGroupCtx, type VariantOptionCtx, type VariantSelection, type VerifyWebhookSignatureInput, type VisitedState, addLines, auth, buildCustomerSnapshot, cardBrandSpec, cardDigits, cardNumberGaps, cardNumberMaxLength, cardPreviewGroups, caretAfterDigits, collectOrderLineDiffs, computeStartingPrice, countCartProducts, coveredAmount, createSession, currentNodes, cvcMaxLength, defaultConditionError, detectCardBrand, flattenMenuCategories, flushLogs, formatCardNumber, formatCvc, formatExpiry, fromOrderLines, genId, genOrderId, getLogContext, getScheduleWindow, indexMenu, isCardNumberComplete, isCardNumberDefinitelyInvalid, isCheckoutFieldFilled, isCvcComplete, isDeviceNotLinked, isExpiryComplete, isKioskUnauthorized, isMilestoneStepDone, isOnSchedule, isOrderValidationError, isPosDeviceNotLinked, isPosUnauthorized, isStorefrontNotFound, isVariantBase, listMenusStream, localizePosError, log, logError, luhnCheck, matchAbsoluteDateOperator, matchBooleanOperator, matchCurrencyOperator, matchEnumOperator, matchNumberOperator, matchRecurringDateOperator, matchRelativeDateOperator, matchStringOperator, milestoneSteps, milestoneTrack, nestMenuCategories, normalizeCardholderName, parseExpiry, paymentMatchesClientConditions, recomputeRedemptions, recomputeTotals, remainingAmount, removeLine, replaceLine, resolveCheckout, reversePayment, runPaymentAttempt, serializeError, services, setLineQuantity, storefrontJson, stripRedemptionLines, toOrderLines, toPaymentCardBrand, validateCardNumber, validateCardholderName, validateCvc, validateExpiry, validateOrderAgainstMenu, verifyWebhookSignature, visitedStates };
1266
+ export { type ApplyRedeemInput, type AuthConfigureOptions, CARD_BRANDS, 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 ExchangeOptions, type FailedCharge, type FlatMenuCategory, type GroupDisplayType, type IdBuilder, type ListMenusStreamOptions, type Menu, type MenuCategoryNode, type MenuLookup, type MilestoneSteps, type MilestoneTrackItem, type ModifierControlType, type ModifierCtx, type ModifierGroupCtx, type NestedMenuCategory, Order, type OrderCustomerSource, type OrderDraft, type OrderIssue, type OrderIssueCode, type OrderLineDiff, type OrderLineIssue, type OrderLineIssueCode, type OrderScope, OrderSyncPendingError, 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 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, cardBrandSpec, cardDigits, cardNumberGaps, cardNumberMaxLength, cardPreviewGroups, caretAfterDigits, collectOrderLineDiffs, computeStartingPrice, countCartProducts, coveredAmount, createSession, currentNodes, cvcMaxLength, defaultConditionError, detectCardBrand, flattenMenuCategories, flushLogs, formatCardNumber, formatCvc, formatExpiry, fromOrderLines, genId, genOrderId, getLogContext, getScheduleWindow, indexMenu, isCardNumberComplete, isCardNumberDefinitelyInvalid, isCheckoutFieldFilled, isCvcComplete, isDeviceCharged, isDeviceNotLinked, isExpiryComplete, isKioskUnauthorized, isMilestoneStepDone, isOnSchedule, isOrderValidationError, isPosDeviceNotLinked, isPosUnauthorized, isRealPaymentMethod, isStorefrontNotFound, isVariantBase, listMenusStream, localizePosError, log, logError, luhnCheck, matchAbsoluteDateOperator, matchBooleanOperator, matchCurrencyOperator, matchEnumOperator, matchNumberOperator, matchRecurringDateOperator, matchRelativeDateOperator, matchStringOperator, milestoneSteps, milestoneTrack, nestMenuCategories, normalizeCardholderName, parseExpiry, paymentMatchesClientConditions, recomputeRedemptions, recomputeTotals, redemptionCap, remainingAmount, removeLine, replaceLine, resolveCheckout, reversePayment, runPaymentAttempt, serializeError, services, setLineQuantity, storefrontJson, stripRedemptionLines, toOrderLines, toPaymentCardBrand, validateCardNumber, validateCardholderName, validateCvc, validateExpiry, validateOrderAgainstMenu, verifyWebhookSignature, visitedStates };