@fanfare-io/fanfare-sdk-react 0.13.0 → 0.15.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/components/auth/auth-form.d.ts +3 -2
- package/dist/components/checkout/checkout-processing-panel.d.ts +2 -2
- package/dist/components/checkout/index.d.ts +0 -1
- package/dist/components/checkout/payment-collection-panel.d.ts +2 -3
- package/dist/components/checkout/stripe-card-field.d.ts +1 -1
- package/dist/components/checkout/stripe-client.d.ts +12 -5
- package/dist/components/compositions/granted-panel.d.ts +10 -5
- package/dist/components/compositions/journey-gate.d.ts +3 -2
- package/dist/components/module/outcome-reason.d.ts +1 -2
- package/dist/components/widgets/appointment/appointment-booking-details.d.ts +1 -4
- package/dist/components/widgets/experience-widget.d.ts +36 -43
- package/dist/components/widgets/internal/appointment-module.d.ts +1 -1
- package/dist/hooks/use-appointment-slots.d.ts +0 -1
- package/dist/index-CpSKWCNw.js +6062 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +32 -33
- package/dist/{stripe-card-field-wp_QQxeN.js → stripe-card-field-Q-8h4lM_.js} +1 -1
- package/dist/styles/base.css +1 -1
- package/package.json +9 -9
- package/dist/components/checkout/reservation-checkout-panel.d.ts +0 -18
- package/dist/components/widgets/appointment/appointment-checked-in-view.d.ts +0 -12
- package/dist/index-DSJ9q_Zs.js +0 -6157
|
@@ -9,7 +9,7 @@ import * as React from "react";
|
|
|
9
9
|
export interface AuthFormProps {
|
|
10
10
|
onSubmit?: (credential: string, type: AuthInputMode) => Promise<void>;
|
|
11
11
|
onVerify?: (otp: string) => Promise<void>;
|
|
12
|
-
onSkip?: () => void
|
|
12
|
+
onSkip?: () => void | Promise<void>;
|
|
13
13
|
onSuccess?: () => void;
|
|
14
14
|
/** Badge color/intent in the panel heading. */
|
|
15
15
|
variant?: PanelHeadingVariant;
|
|
@@ -22,6 +22,7 @@ export interface AuthFormProps {
|
|
|
22
22
|
submitLabel?: string;
|
|
23
23
|
verifyLabel?: string;
|
|
24
24
|
allowSkip?: boolean;
|
|
25
|
+
skipLabel?: string;
|
|
25
26
|
showBranding?: boolean;
|
|
26
27
|
/** Initial step when mounting. Useful for SSR-resume or storybook lanes that need the verify step. */
|
|
27
28
|
defaultStep?: "credential" | "verify";
|
|
@@ -33,7 +34,7 @@ export interface AuthFormProps {
|
|
|
33
34
|
defaultError?: string;
|
|
34
35
|
className?: string;
|
|
35
36
|
}
|
|
36
|
-
export declare function AuthForm({ onSubmit, onVerify, onSkip, onSuccess, variant, label: labelProp, title: titleProp, description: descriptionProp, countdownTo, submitLabel: submitLabelProp, verifyLabel: verifyLabelProp, allowSkip, showBranding, defaultStep, defaultCredential, defaultCredentialType, defaultError, className, }: AuthFormProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export declare function AuthForm({ onSubmit, onVerify, onSkip, onSuccess, variant, label: labelProp, title: titleProp, description: descriptionProp, countdownTo, submitLabel: submitLabelProp, verifyLabel: verifyLabelProp, allowSkip, skipLabel, showBranding, defaultStep, defaultCredential, defaultCredentialType, defaultError, className, }: AuthFormProps): import("react/jsx-runtime").JSX.Element;
|
|
37
38
|
export declare namespace AuthForm {
|
|
38
39
|
var displayName: string;
|
|
39
40
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CheckoutProcessingSlotProps } from '../widgets/experience-widget';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
/**
|
|
4
|
-
* Default processing panel shown for the gap between a submitted
|
|
5
|
-
*
|
|
4
|
+
* Default processing panel shown for the gap between a submitted checkout and the server's
|
|
5
|
+
* confirmation.
|
|
6
6
|
*
|
|
7
7
|
* The consumer must not navigate away while the payment settles, so the wait is announced rather
|
|
8
8
|
* than shown only as motion.
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { PaymentCollectionSlotProps } from '../widgets/experience-widget';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
/**
|
|
4
|
-
* Default payment-collection panel for pre-auth
|
|
5
|
-
* about to enter and when a failed authorization leaves a retry open.
|
|
4
|
+
* Default payment-collection panel for pre-auth entry/re-entry and grant-keyed at-end checkout.
|
|
6
5
|
*
|
|
7
6
|
* The hold amount is rendered from the view's own figure — the client never derives one.
|
|
8
7
|
*
|
|
@@ -15,4 +14,4 @@ import * as React from "react";
|
|
|
15
14
|
* minted across the whole flow. An ended view carries no pending action, so the retry mount reaches
|
|
16
15
|
* none of this.
|
|
17
16
|
*/
|
|
18
|
-
export declare function PaymentCollectionPanel(
|
|
17
|
+
export declare function PaymentCollectionPanel(props: PaymentCollectionSlotProps): React.ReactElement;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StripeClientConfig } from './stripe-client';
|
|
2
2
|
/**
|
|
3
3
|
* The SDK's card-entry field: a Stripe Card Element and the controller that turns it into a
|
|
4
|
-
* payment-method id. It knows nothing about
|
|
4
|
+
* payment-method id. It knows nothing about settlement, pre-auth, or amounts.
|
|
5
5
|
*
|
|
6
6
|
* `@stripe/stripe-js` is a type-only dependency across the SDK, so no vendor bytes ship in any
|
|
7
7
|
* chunk. This module is the one lazy split: it is reached only through a dynamic `import()` from
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SequenceView } from '@fanfare-io/fanfare-sdk-core/experiences';
|
|
2
2
|
import { Stripe, StripeConstructor, StripeElementStyle } from '@stripe/stripe-js';
|
|
3
|
+
/** How a granted win settles, as the granted views carry it. */
|
|
4
|
+
type GrantedSettlement = Extract<SequenceView, {
|
|
5
|
+
phase: "granted";
|
|
6
|
+
}>["settlement"];
|
|
3
7
|
/**
|
|
4
8
|
* The wire block a checkout-capable view carries, reached through the adapter's declared
|
|
5
9
|
* dependency on `fanfare-sdk-core` rather than the contracts package: core re-exports the contract
|
|
6
|
-
* types so adapter modules never resolve `@fanfare-io/fanfare-sdk-contracts` directly.
|
|
10
|
+
* types so adapter modules never resolve `@fanfare-io/fanfare-sdk-contracts` directly. Core names
|
|
11
|
+
* the shape only within the arms that carry it, so it is read back off one of them.
|
|
7
12
|
*/
|
|
8
|
-
type PaymentProviderConfig = NonNullable<
|
|
13
|
+
type PaymentProviderConfig = NonNullable<Extract<GrantedSettlement, {
|
|
14
|
+
mode: "at_end";
|
|
15
|
+
}>["paymentProvider"]>;
|
|
9
16
|
declare global {
|
|
10
17
|
interface Window {
|
|
11
18
|
Stripe?: StripeConstructor;
|
|
@@ -62,8 +69,8 @@ export declare function deriveStripeCardStyle(root: HTMLElement): StripeElementS
|
|
|
62
69
|
*
|
|
63
70
|
* `null` means no usable Stripe client configuration reached this view. On a checkout-capable arm
|
|
64
71
|
* that has exactly one cause — the configuration read failed — because the processor discriminator
|
|
65
|
-
* is the `processor`
|
|
66
|
-
* block. The condition is transient and retryable.
|
|
72
|
+
* is the settlement's `processor`/`mode` pair (granted) or `checkoutMode` (enterable), never the
|
|
73
|
+
* presence of this block. The condition is transient and retryable.
|
|
67
74
|
*/
|
|
68
75
|
export declare function resolveStripeClientConfig(source: PaymentProviderConfig | undefined): StripeClientConfig | null;
|
|
69
76
|
/** Test-only seam over every memo this module holds. Never exported from an adapter's public entry. */
|
|
@@ -3,9 +3,14 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Shared granted composition for distribution modules. Renders the
|
|
5
5
|
* winning-state panel: status badge, expiry countdown (or fallback message
|
|
6
|
-
* when no expiry is known), and
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* when no expiry is known), and — only when the caller supplies a
|
|
7
|
+
* destination — a checkout CTA. Used by queue / draw / auction /
|
|
8
|
+
* timed-release modules — the JSX is structurally identical across all
|
|
9
|
+
* four; only the i18n strings differ.
|
|
10
|
+
*
|
|
11
|
+
* A granted frame with no `onCtaClick` renders no button: the grant is
|
|
12
|
+
* already settled where the consumer stands, so an inert affordance would
|
|
13
|
+
* promise a hand-off that does not exist.
|
|
9
14
|
*
|
|
10
15
|
* <GrantedPanel
|
|
11
16
|
* label="Congratulations!"
|
|
@@ -24,9 +29,9 @@ import * as React from "react";
|
|
|
24
29
|
export interface GrantedPanelProps {
|
|
25
30
|
label: React.ReactNode;
|
|
26
31
|
fallbackMessage: React.ReactNode;
|
|
27
|
-
ctaLabel
|
|
32
|
+
ctaLabel?: React.ReactNode;
|
|
28
33
|
expiresAt?: Date;
|
|
29
|
-
onCtaClick
|
|
34
|
+
onCtaClick?: () => void;
|
|
30
35
|
className?: string;
|
|
31
36
|
}
|
|
32
37
|
export declare function GrantedPanel({ label, fallbackMessage, ctaLabel, expiresAt, onCtaClick, className, }: GrantedPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -16,7 +16,7 @@ export interface JourneyGateProps {
|
|
|
16
16
|
/** Callback when OTP is verified (for auth) */
|
|
17
17
|
onAuthVerify?: (otp: string) => Promise<void>;
|
|
18
18
|
/** Callback when auth is skipped */
|
|
19
|
-
onAuthSkip?: () => void
|
|
19
|
+
onAuthSkip?: () => void | Promise<void>;
|
|
20
20
|
/** Callback when auth completes successfully */
|
|
21
21
|
onAuthSuccess?: () => void;
|
|
22
22
|
/** Callback when access code is submitted */
|
|
@@ -25,6 +25,7 @@ export interface JourneyGateProps {
|
|
|
25
25
|
onAccessCodeSkip?: () => void;
|
|
26
26
|
/** Whether auth can be skipped */
|
|
27
27
|
allowAuthSkip?: boolean;
|
|
28
|
+
authSkipLabel?: string;
|
|
28
29
|
/** Whether access code can be skipped */
|
|
29
30
|
allowAccessCodeSkip?: boolean;
|
|
30
31
|
/** Auth form title */
|
|
@@ -42,7 +43,7 @@ export interface JourneyGateProps {
|
|
|
42
43
|
/** Children to render when stage is "none" */
|
|
43
44
|
children?: React.ReactNode;
|
|
44
45
|
}
|
|
45
|
-
export declare function JourneyGate({ stage, onAuthSubmit, onAuthVerify, onAuthSkip, onAuthSuccess, onAccessCodeSubmit, onAccessCodeSkip, allowAuthSkip, allowAccessCodeSkip, authTitle, authDescription, accessCodeTitle, accessCodeDescription, startsAt, className, children, }: JourneyGateProps): import("react/jsx-runtime").JSX.Element | null;
|
|
46
|
+
export declare function JourneyGate({ stage, onAuthSubmit, onAuthVerify, onAuthSkip, onAuthSuccess, onAccessCodeSubmit, onAccessCodeSkip, allowAuthSkip, authSkipLabel, allowAccessCodeSkip, authTitle, authDescription, accessCodeTitle, accessCodeDescription, startsAt, className, children, }: JourneyGateProps): import("react/jsx-runtime").JSX.Element | null;
|
|
46
47
|
export declare namespace JourneyGate {
|
|
47
48
|
var displayName: string;
|
|
48
49
|
}
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
* completed / already_completed -> completed (a success terminal, not a loss)
|
|
22
22
|
* won -> won
|
|
23
23
|
* cancelled -> cancelled
|
|
24
|
-
* no_show -> no_show
|
|
25
24
|
* left -> left (voluntary exit: leave/withdraw)
|
|
26
25
|
* closed / unknown / other -> ended
|
|
27
26
|
*
|
|
@@ -32,7 +31,7 @@
|
|
|
32
31
|
* Static story lanes pass UI values directly (e.g. `"outbid"`); those
|
|
33
32
|
* pass through unchanged.
|
|
34
33
|
*/
|
|
35
|
-
export type OutcomeReason = "expired" | "not_selected" | "sold_out" | "outbid" | "floor_unsold" | "reserve_not_met" | "completed" | "won" | "cancelled" | "
|
|
34
|
+
export type OutcomeReason = "expired" | "not_selected" | "sold_out" | "outbid" | "floor_unsold" | "reserve_not_met" | "completed" | "won" | "cancelled" | "left" | "ended";
|
|
36
35
|
export declare function normalizeOutcomeReason(reason: string | undefined): OutcomeReason;
|
|
37
36
|
export declare function normalizeSequenceOutcomeReason(outcome: {
|
|
38
37
|
type: string;
|
|
@@ -3,16 +3,13 @@ export interface AppointmentBookingDetailsProps {
|
|
|
3
3
|
booking: NonNullable<AppointmentDisplayState["booking"]>;
|
|
4
4
|
/** Appointment timezone — used to format date/time in the appointment's local zone, not the viewer's. */
|
|
5
5
|
timezone?: string;
|
|
6
|
-
/** When true, hides reschedule/cancel actions — used for completed appointments. */
|
|
7
|
-
readOnly?: boolean;
|
|
8
6
|
onCancel(): Promise<void>;
|
|
9
7
|
onStartReschedule(): void;
|
|
10
8
|
onAddToCalendar?(): void;
|
|
11
|
-
onJoinCall?(): void;
|
|
12
9
|
isCancelling: boolean;
|
|
13
10
|
cancelError?: string | null;
|
|
14
11
|
}
|
|
15
|
-
export declare function AppointmentBookingDetails({ booking, timezone,
|
|
12
|
+
export declare function AppointmentBookingDetails({ booking, timezone, onCancel, onStartReschedule, onAddToCalendar, isCancelling, cancelError, }: AppointmentBookingDetailsProps): import("react/jsx-runtime").JSX.Element;
|
|
16
13
|
export declare namespace AppointmentBookingDetails {
|
|
17
14
|
var displayName: string;
|
|
18
15
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BotMitigationState, RoutingChallenge } from '@fanfare-io/fanfare-sdk-core/challenges';
|
|
2
|
-
import {
|
|
2
|
+
import { SDKEvents } from '@fanfare-io/fanfare-sdk-core/events';
|
|
3
|
+
import { CheckoutNextAction, FanfareCheckoutResult, JourneyHandle, JourneySnapshot, JourneyView, PaymentInput, PaymentMethodSummary, SequenceView } from '@fanfare-io/fanfare-sdk-core/experiences';
|
|
3
4
|
import { BrandTheme, WidgetVariant } from '../../theme';
|
|
4
5
|
import { AuthInputMode } from '../auth/auth-input';
|
|
5
6
|
import { OutcomeAction } from '../compositions/outcome-panel';
|
|
@@ -16,6 +17,8 @@ type ParticipatingSlotSequence = Extract<SequenceView, {
|
|
|
16
17
|
type GrantedSlotSequence = Extract<SequenceView, {
|
|
17
18
|
phase: "granted";
|
|
18
19
|
}>;
|
|
20
|
+
/** How a granted win settles: who consumes the grant, and whether money has already moved for it. */
|
|
21
|
+
type GrantedSettlement = GrantedSlotSequence["settlement"];
|
|
19
22
|
/** Props passed to slot render functions */
|
|
20
23
|
export interface SlotProps {
|
|
21
24
|
snapshot: JourneySnapshot | null;
|
|
@@ -60,22 +63,17 @@ export interface GrantedSlotProps extends SlotProps {
|
|
|
60
63
|
grant?: string;
|
|
61
64
|
expiresAt?: number;
|
|
62
65
|
}
|
|
63
|
-
|
|
64
|
-
preAuthAmount: string;
|
|
65
|
-
preAuthCurrencyCode: string;
|
|
66
|
+
interface PaymentCollectionBaseSlotProps extends SlotProps {
|
|
66
67
|
savedPaymentMethods: PaymentMethodSummary[];
|
|
67
|
-
/**
|
|
68
|
+
/** Submits pre-auth entry or confirms at-end checkout; rejects when the panel should keep recovery UI mounted. */
|
|
68
69
|
onEnter: (paymentInput: PaymentInput) => Promise<void>;
|
|
69
70
|
isEntering: boolean;
|
|
70
|
-
/** "enter" collects payment before first entry; "reenter" collects payment to retry after a failed or expired authorization hold. */
|
|
71
|
-
intent: "enter" | "reenter";
|
|
72
71
|
/**
|
|
73
|
-
* Client configuration for the processor
|
|
74
|
-
*
|
|
75
|
-
* configuration.
|
|
72
|
+
* Client configuration for the internal processor, as the server supplied it. Carried by the
|
|
73
|
+
* enterable pre-auth and granted at-end arms; an ended retry holds no configuration.
|
|
76
74
|
*/
|
|
77
75
|
paymentProvider?: PaymentProviderConfig;
|
|
78
|
-
/** Present while the processor is waiting on an out-of-band action
|
|
76
|
+
/** Present while the internal processor is waiting on an out-of-band action. */
|
|
79
77
|
pendingAction?: CheckoutNextAction;
|
|
80
78
|
/**
|
|
81
79
|
* Re-reads the consumer's journeys from the server so a provider configuration that was missing
|
|
@@ -84,35 +82,22 @@ export interface PaymentCollectionSlotProps extends SlotProps {
|
|
|
84
82
|
*/
|
|
85
83
|
onRetryPaymentConfig?: () => Promise<void>;
|
|
86
84
|
}
|
|
85
|
+
export type PaymentCollectionSlotProps = PaymentCollectionBaseSlotProps & ({
|
|
86
|
+
intent: "checkout";
|
|
87
|
+
onResume: () => Promise<void>;
|
|
88
|
+
} | {
|
|
89
|
+
intent: "enter" | "reenter";
|
|
90
|
+
preAuthAmount: string;
|
|
91
|
+
preAuthCurrencyCode: string;
|
|
92
|
+
onResume?: never;
|
|
93
|
+
});
|
|
87
94
|
/**
|
|
88
|
-
* The processor's client configuration block, named through
|
|
89
|
-
*
|
|
95
|
+
* The processor's client configuration block, named through an arm that carries it: core names the
|
|
96
|
+
* shape only within those arms, not as a standalone export.
|
|
90
97
|
*/
|
|
91
|
-
type PaymentProviderConfig = NonNullable<
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
token: string;
|
|
95
|
-
expiresAt: number;
|
|
96
|
-
};
|
|
97
|
-
savedPaymentMethods: PaymentMethodSummary[];
|
|
98
|
-
/** Which processor executes this reservation's payment leg; narrow before rendering processor-specific UI. */
|
|
99
|
-
processor: CheckoutProcessor;
|
|
100
|
-
/** Client configuration for the processor settling this reservation, as the server supplied it. */
|
|
101
|
-
paymentProvider?: PaymentProviderConfig;
|
|
102
|
-
/** Present while the processor is waiting on an out-of-band action; complete it, then call `onResume`. */
|
|
103
|
-
pendingAction?: CheckoutNextAction;
|
|
104
|
-
/** Rejects on a recoverable payment failure (e.g. a declined card) — the panel owns recovery UI for its own submit. */
|
|
105
|
-
onConfirm: (paymentInput: PaymentInput) => Promise<void>;
|
|
106
|
-
/** Re-submits the paused checkout after `pendingAction` has been completed. Idempotent server-side. */
|
|
107
|
-
onResume: () => Promise<void>;
|
|
108
|
-
isConfirming: boolean;
|
|
109
|
-
/**
|
|
110
|
-
* Re-reads the consumer's journeys from the server so a provider configuration that was missing
|
|
111
|
-
* or unreadable at render can arrive. This is the panel's only recovery when `paymentProvider` is
|
|
112
|
-
* absent — the value is a prop, so nothing the panel does to its own state can produce it.
|
|
113
|
-
*/
|
|
114
|
-
onRetryPaymentConfig?: () => Promise<void>;
|
|
115
|
-
}
|
|
98
|
+
type PaymentProviderConfig = NonNullable<Extract<GrantedSettlement, {
|
|
99
|
+
mode: "at_end";
|
|
100
|
+
}>["paymentProvider"]>;
|
|
116
101
|
export type CheckoutProcessingSlotProps = SlotProps;
|
|
117
102
|
/**
|
|
118
103
|
* A Fanfare-managed payment is terminal: it produces a receipt, never an admission credential. The
|
|
@@ -164,13 +149,18 @@ export interface ExperienceWidgetSlots {
|
|
|
164
149
|
participating?: (props: ParticipatingSlotProps) => React.ReactNode;
|
|
165
150
|
granted?: (props: GrantedSlotProps) => React.ReactNode;
|
|
166
151
|
paymentCollection?: (props: PaymentCollectionSlotProps) => React.ReactNode;
|
|
167
|
-
|
|
152
|
+
/** Rendered by the at-end checkout surface while a collected payment is settling. */
|
|
168
153
|
checkoutProcessing?: (props: CheckoutProcessingSlotProps) => React.ReactNode;
|
|
169
154
|
receipt?: (props: ReceiptSlotProps) => React.ReactNode;
|
|
170
155
|
expired?: (props: ExpiredSlotProps) => React.ReactNode;
|
|
171
156
|
ended?: (props: EndedSlotProps) => React.ReactNode;
|
|
172
157
|
error?: (props: ErrorSlotProps) => React.ReactNode;
|
|
173
158
|
}
|
|
159
|
+
/**
|
|
160
|
+
* Surface the widget is mounted on, named through the bus payload that carries it: core
|
|
161
|
+
* re-exports the event map but not the contract's own name for this shape.
|
|
162
|
+
*/
|
|
163
|
+
type BeaconPageType = SDKEvents["experience:widget-mounted"]["pageType"];
|
|
174
164
|
/** Render props for full control */
|
|
175
165
|
export interface ExperienceRenderProps {
|
|
176
166
|
journey: JourneyHandle | null;
|
|
@@ -195,6 +185,11 @@ export interface ExperienceWidgetProps {
|
|
|
195
185
|
variant?: WidgetVariant;
|
|
196
186
|
/** Slots for targeted overrides */
|
|
197
187
|
slots?: ExperienceWidgetSlots;
|
|
188
|
+
/**
|
|
189
|
+
* Surface this widget renders on, carried on the `experience:widget-mounted` announcement.
|
|
190
|
+
* Defaults to `embed`, the merchant-page case; Fanfare-hosted drop pages pass `hosted`.
|
|
191
|
+
*/
|
|
192
|
+
pageType?: BeaconPageType;
|
|
198
193
|
/** Render prop for full control (ignores slots if provided) */
|
|
199
194
|
children?: (props: ExperienceRenderProps) => React.ReactNode;
|
|
200
195
|
/** Checkout URL for granted state */
|
|
@@ -208,16 +203,14 @@ export interface ExperienceWidgetProps {
|
|
|
208
203
|
onJourneyChange?: (snapshot: JourneySnapshot) => void;
|
|
209
204
|
/** Called when the journey receives a grant */
|
|
210
205
|
onGranted?: (grant: string) => void;
|
|
211
|
-
/** Called when a Fanfare-managed checkout completes
|
|
206
|
+
/** Called when a Fanfare-managed checkout completes */
|
|
212
207
|
onFanfareCheckout?: (result: FanfareCheckoutResult) => void;
|
|
213
|
-
/** Called when the consumer wins a `post_win` distribution and must complete checkout before `expiresAt` */
|
|
214
|
-
onReserved?: (expiresAt: number) => void;
|
|
215
208
|
/** Called when an error occurs */
|
|
216
209
|
onError?: (error: Error) => void;
|
|
217
210
|
/** Additional class name */
|
|
218
211
|
className?: string;
|
|
219
212
|
}
|
|
220
|
-
export declare function ExperienceWidget(
|
|
213
|
+
export declare function ExperienceWidget(props: ExperienceWidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
221
214
|
export declare namespace ExperienceWidget {
|
|
222
215
|
var displayName: string;
|
|
223
216
|
}
|
|
@@ -10,7 +10,7 @@ export interface AppointmentModuleProps {
|
|
|
10
10
|
timezone?: string;
|
|
11
11
|
defaultLocationId?: string;
|
|
12
12
|
onBook: (slotId: string, locationId?: string) => Promise<void>;
|
|
13
|
-
onCancel: (
|
|
13
|
+
onCancel: () => Promise<void>;
|
|
14
14
|
onReschedule: (newSlotId: string, newLocationId?: string) => Promise<void>;
|
|
15
15
|
isBooking: boolean;
|
|
16
16
|
isCancelling: boolean;
|