@fanfare-io/fanfare-sdk-react 0.14.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.
@@ -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
  }
@@ -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" | "no_show" | "left" | "ended";
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, readOnly, onCancel, onStartReschedule, onAddToCalendar, onJoinCall, isCancelling, cancelError, }: AppointmentBookingDetailsProps): import("react/jsx-runtime").JSX.Element;
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
  }
@@ -210,7 +210,7 @@ export interface ExperienceWidgetProps {
210
210
  /** Additional class name */
211
211
  className?: string;
212
212
  }
213
- export declare function ExperienceWidget({ experienceId, autoStart, accessCode, autoEnterWaitlist, theme, variant, slots, pageType, children, checkoutUrl, endedAction, onJourneyChange, onGranted, onFanfareCheckout, onError, className, }: ExperienceWidgetProps): import("react/jsx-runtime").JSX.Element;
213
+ export declare function ExperienceWidget(props: ExperienceWidgetProps): import("react/jsx-runtime").JSX.Element;
214
214
  export declare namespace ExperienceWidget {
215
215
  var displayName: string;
216
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: (reason?: string) => Promise<void>;
13
+ onCancel: () => Promise<void>;
14
14
  onReschedule: (newSlotId: string, newLocationId?: string) => Promise<void>;
15
15
  isBooking: boolean;
16
16
  isCancelling: boolean;
@@ -8,6 +8,5 @@ interface UseAppointmentSlotsResult {
8
8
  export declare function useAppointmentSlots(appointmentId: string | undefined, range: {
9
9
  startDate?: string;
10
10
  endDate?: string;
11
- timezone?: string;
12
11
  }): UseAppointmentSlotsResult;
13
12
  export {};