Re-enable new-card entry across all 8 flows via Square Web Payments SDK cnon: nonces (backend was already P11-ready): - Add square.ts SDK loader (env-gated on VITE_SQUARE_APPLICATION_ID/LOCATION_ID, sandbox vs prod URL auto-derived from app-ID prefix) + SquareCardInput.svelte (tokenize() via bind:this, onReady state, CardEntryUnavailable fallback) - CardSelection.svelte: replace newCardDisabled gate with new-card toggle + SquareCardInput; expose tokenize() for parent flows - Wire new-card mode into tip x3, booking payment (UserPaymentModal), deposit (BookingFlow incl. guest), Buy a Gift Card + Add a Card (account), and admin till online_square (GiftCardsManagement create/topup) - Retry-safe: each flow caches the one-shot nonce and reuses it on retry so the backend idempotency key dedups instead of re-tokenizing - Docs: README, Gap Backlog P11, Feature Catalog, Technical Manual, P11 plan
26 lines
753 B
TypeScript
26 lines
753 B
TypeScript
// See https://svelte.dev/docs/kit/types#app.d.ts
|
|
// for information about these interfaces
|
|
declare global {
|
|
namespace App {
|
|
// interface Error {}
|
|
// interface Locals {}
|
|
// interface PageData {}
|
|
// interface PageState {}
|
|
// interface Platform {}
|
|
}
|
|
|
|
interface Window {
|
|
__walkInCountdownInterval?: ReturnType<typeof setInterval>;
|
|
__walkInModalCountdownInterval?: ReturnType<typeof setInterval>;
|
|
__bookingCreateCountdownInterval?: ReturnType<typeof setInterval>;
|
|
__bookingFlowCountdownInterval?: ReturnType<typeof setInterval> | null;
|
|
/** Square Web Payments SDK global, present after square.js loads. */
|
|
Square?: {
|
|
payments: (appId: string, locationId: string) => unknown;
|
|
};
|
|
}
|
|
}
|
|
|
|
export {};
|
|
declare module 'swiper/svelte';
|