@swype-org/react-sdk 0.1.32 → 0.1.34

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.cts CHANGED
@@ -50,6 +50,8 @@ interface Account {
50
50
  id: string;
51
51
  name: string;
52
52
  wallets: Wallet[];
53
+ /** Remaining One-Tap allowance in USD, or null when not configured. */
54
+ remainingAllowance?: number | null;
53
55
  createDate: string;
54
56
  updateDate: string;
55
57
  authorizationSessions?: AuthorizationSession[];
@@ -195,7 +197,7 @@ interface UserConfig {
195
197
  /** Theme mode */
196
198
  type ThemeMode = 'light' | 'dark';
197
199
  /** Steps in the payment flow */
198
- type PaymentStep = 'login' | 'otp-verify' | 'create-passkey' | 'wallet-picker' | 'setup' | 'setup-status' | 'deposit' | 'low-balance' | 'processing' | 'success';
200
+ type PaymentStep = 'login' | 'otp-verify' | 'create-passkey' | 'wallet-picker' | 'setup' | 'setup-status' | 'deposit' | 'low-balance' | 'processing' | 'select-source' | 'success';
199
201
  /** User-selected advanced settings for chain/asset override */
200
202
  interface AdvancedSettings {
201
203
  /** Override asset (e.g. 'USDC', 'USDT'). Null = let backend decide. */
@@ -369,8 +371,12 @@ interface SwypePaymentProps {
369
371
  merchantName?: string;
370
372
  /** Called when the user taps the back button */
371
373
  onBack?: () => void;
374
+ /** Called when the user dismisses the success screen (tap Done or countdown expires). When set, overrides the default "start new payment" behavior. */
375
+ onDismiss?: () => void;
376
+ /** Seconds to count down on the success screen before auto-dismissing. */
377
+ autoCloseSeconds?: number;
372
378
  }
373
- declare function SwypePayment({ destination, onComplete, onError, useWalletConnector, idempotencyKey, merchantAuthorization, merchantName, onBack, }: SwypePaymentProps): react_jsx_runtime.JSX.Element | null;
379
+ declare function SwypePayment({ destination, onComplete, onError, useWalletConnector, idempotencyKey, merchantAuthorization, merchantName, onBack, onDismiss, autoCloseSeconds, }: SwypePaymentProps): react_jsx_runtime.JSX.Element | null;
374
380
 
375
381
  type AccessTokenGetter = () => Promise<string | null | undefined>;
376
382
  /**
package/dist/index.d.ts CHANGED
@@ -50,6 +50,8 @@ interface Account {
50
50
  id: string;
51
51
  name: string;
52
52
  wallets: Wallet[];
53
+ /** Remaining One-Tap allowance in USD, or null when not configured. */
54
+ remainingAllowance?: number | null;
53
55
  createDate: string;
54
56
  updateDate: string;
55
57
  authorizationSessions?: AuthorizationSession[];
@@ -195,7 +197,7 @@ interface UserConfig {
195
197
  /** Theme mode */
196
198
  type ThemeMode = 'light' | 'dark';
197
199
  /** Steps in the payment flow */
198
- type PaymentStep = 'login' | 'otp-verify' | 'create-passkey' | 'wallet-picker' | 'setup' | 'setup-status' | 'deposit' | 'low-balance' | 'processing' | 'success';
200
+ type PaymentStep = 'login' | 'otp-verify' | 'create-passkey' | 'wallet-picker' | 'setup' | 'setup-status' | 'deposit' | 'low-balance' | 'processing' | 'select-source' | 'success';
199
201
  /** User-selected advanced settings for chain/asset override */
200
202
  interface AdvancedSettings {
201
203
  /** Override asset (e.g. 'USDC', 'USDT'). Null = let backend decide. */
@@ -369,8 +371,12 @@ interface SwypePaymentProps {
369
371
  merchantName?: string;
370
372
  /** Called when the user taps the back button */
371
373
  onBack?: () => void;
374
+ /** Called when the user dismisses the success screen (tap Done or countdown expires). When set, overrides the default "start new payment" behavior. */
375
+ onDismiss?: () => void;
376
+ /** Seconds to count down on the success screen before auto-dismissing. */
377
+ autoCloseSeconds?: number;
372
378
  }
373
- declare function SwypePayment({ destination, onComplete, onError, useWalletConnector, idempotencyKey, merchantAuthorization, merchantName, onBack, }: SwypePaymentProps): react_jsx_runtime.JSX.Element | null;
379
+ declare function SwypePayment({ destination, onComplete, onError, useWalletConnector, idempotencyKey, merchantAuthorization, merchantName, onBack, onDismiss, autoCloseSeconds, }: SwypePaymentProps): react_jsx_runtime.JSX.Element | null;
374
380
 
375
381
  type AccessTokenGetter = () => Promise<string | null | undefined>;
376
382
  /**