@flopay/react 1.9.21 → 1.9.24

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
@@ -1,6 +1,6 @@
1
1
  import * as _flopay_shared from '@flopay/shared';
2
- import { InlineSessionDraft, CheckoutButtonMethod, CheckoutProduct, CheckoutItem, CheckoutSubscription, ThemeId, FloPayAppearance, ButtonsLayoutTheme, ButtonsLayoutStyles, PaymentResult, CheckoutSession, FloPayError, DeclineEvent, InlineSessionPatch, GatewayEnvironment, PayPalProviderObjectType, PayPalApprovalPresentation, TokenizedBody, FloInstrumentEvent, BeforeButtonClickEvent, CheckoutMode, AVSFieldConfig, CardCaptureAdapter, VaultCardThemeColors } from '@flopay/shared';
3
- export { BeforeButtonClickEvent, CheckoutButtonMethod, DeclineEvent, FloInstrumentEvent, InlineSessionDraft, InlineSessionPatch, SentryEventLike, SentryStackFrameLike, dropThirdPartyOnlyError } from '@flopay/shared';
2
+ import { InlineSessionDraft, CheckoutButtonMethod, CheckoutProduct, CheckoutItem, CheckoutSubscription, ThemeId, FloPayAppearance, ButtonsLayoutTheme, ButtonsLayoutStyles, PaymentResult, CheckoutSession, FloPayError, DeclineEvent, InlineSessionPatch, GatewayEnvironment, PayPalProviderObjectType, PayPalApprovalPresentation, TokenizedBody, TelemetryPresentationMode, TelemetryTerminalReason, FloInstrumentEvent, WalletPresentation, BeforeButtonClickEvent, CheckoutMode, AVSFieldConfig, CardCaptureAdapter, VaultCardThemeColors } from '@flopay/shared';
3
+ export { BeforeButtonClickEvent, CheckoutButtonMethod, DeclineEvent, FloInstrumentEvent, InlineSessionDraft, InlineSessionPatch, SentryEventLike, SentryStackFrameLike, WalletPresentation, dropThirdPartyOnlyError } from '@flopay/shared';
4
4
  import React from 'react';
5
5
  export { FloPayCardSetup, FloPayCardSetupCancelEvent, FloPayCardSetupCompleteEvent, FloPayCardSetupDeclineEvent, FloPayCardSetupError, FloPayCardSetupProps } from './card-setup-entry.cjs';
6
6
  import { FloPay } from '@flopay/js';
@@ -116,10 +116,16 @@ interface DirectPayPalBeforeButtonClickResult {
116
116
  */
117
117
  type DirectPayPalRunBeforeButtonClick = (method: CheckoutButtonMethod) => Promise<DirectPayPalBeforeButtonClickResult>;
118
118
  type DirectPayPalInitializationState = 'loading' | 'retrying' | 'ready' | 'exhausted';
119
- type DirectPayPalTechnicalFailureHandler = (method: 'paypal', err: unknown, options?: {
119
+ interface DirectPayPalTechnicalFailureOptions {
120
120
  code?: string;
121
121
  popupBlocked?: boolean;
122
- }) => void;
122
+ telemetryReported?: boolean;
123
+ provider?: 'paypal';
124
+ paymentMethodCategory?: 'paypal';
125
+ presentationMode?: TelemetryPresentationMode;
126
+ terminalReason?: TelemetryTerminalReason;
127
+ }
128
+ type DirectPayPalTechnicalFailureHandler = (method: 'paypal', err: unknown, options?: DirectPayPalTechnicalFailureOptions) => void;
123
129
  interface DirectPayPalButtonProps {
124
130
  /** Checkout session ID. */
125
131
  sessionId: string;
@@ -276,6 +282,11 @@ interface FloPayCheckoutProps {
276
282
  * bootstrap-time validation error.
277
283
  */
278
284
  showStripe?: boolean;
285
+ /**
286
+ * Preferred approval presentation for supported wallets. Defaults to
287
+ * `'auto'`. Safety signals and provider capability remain authoritative.
288
+ */
289
+ walletPresentation?: WalletPresentation;
279
290
  /**
280
291
  * Override the wallet/APM list the session advertises via
281
292
  * `gateways.stripe.enabledPaymentMethods`. Omit (the default) and the
@@ -443,7 +454,7 @@ interface FloPayCheckoutProps {
443
454
  * />
444
455
  * ```
445
456
  */
446
- declare function FloPayCheckout({ sessionId: sessionIdProp, nonce: nonceProp, createSession: createSessionParams, billingApiUrl, telemetry, appearance: appearanceOverride, locale, loading: loadingNode, error: errorNode, onComplete, onError, onInstrument, onDecline, onCountryChange, onZipChange, showPayPal, showStripe, enabledPaymentMethods: enabledPaymentMethodsProp, showApplePay, showGooglePay, debug, layout, theme, buttonsTheme, buttonsStyles, cardButtonContent, cardBackButtonContent, cardTitleContent, showSecurityFooter: _showSecurityFooter, onButtonClick, onBeforeButtonClick, enableAVS, cardFieldOrder, cardPreFormSlot, avsLayout, submitLabel, className, initialErrorMessage, initialPayPalOrderId, children, checkoutMode: checkoutModeProp, confirmLabel, renderConfirmButton, onSessionCompleted, }: FloPayCheckoutProps): React.ReactElement;
457
+ declare function FloPayCheckout({ sessionId: sessionIdProp, nonce: nonceProp, createSession: createSessionParams, billingApiUrl, telemetry, appearance: appearanceOverride, locale, loading: loadingNode, error: errorNode, onComplete, onError, onInstrument, onDecline, onCountryChange, onZipChange, showPayPal, showStripe, walletPresentation, enabledPaymentMethods: enabledPaymentMethodsProp, showApplePay, showGooglePay, debug, layout, theme, buttonsTheme, buttonsStyles, cardButtonContent, cardBackButtonContent, cardTitleContent, showSecurityFooter: _showSecurityFooter, onButtonClick, onBeforeButtonClick, enableAVS, cardFieldOrder, cardPreFormSlot, avsLayout, submitLabel, className, initialErrorMessage, initialPayPalOrderId, children, checkoutMode: checkoutModeProp, confirmLabel, renderConfirmButton, onSessionCompleted, }: FloPayCheckoutProps): React.ReactElement;
447
458
 
448
459
  /**
449
460
  * Returns the current `FloPay` instance, or `null` if the provider
@@ -591,6 +602,11 @@ interface SplitCardFormProps {
591
602
  * configured) throws a bootstrap-time validation error.
592
603
  */
593
604
  showStripe?: boolean;
605
+ /**
606
+ * Preferred approval presentation for supported wallets. Defaults to
607
+ * `'auto'`. Safety signals and provider capability remain authoritative.
608
+ */
609
+ walletPresentation?: WalletPresentation;
594
610
  /**
595
611
  * Per-session list of Stripe payment method type identifiers (as returned
596
612
  * by the billing API on `gateways.stripe.enabledPaymentMethods`). When
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _flopay_shared from '@flopay/shared';
2
- import { InlineSessionDraft, CheckoutButtonMethod, CheckoutProduct, CheckoutItem, CheckoutSubscription, ThemeId, FloPayAppearance, ButtonsLayoutTheme, ButtonsLayoutStyles, PaymentResult, CheckoutSession, FloPayError, DeclineEvent, InlineSessionPatch, GatewayEnvironment, PayPalProviderObjectType, PayPalApprovalPresentation, TokenizedBody, FloInstrumentEvent, BeforeButtonClickEvent, CheckoutMode, AVSFieldConfig, CardCaptureAdapter, VaultCardThemeColors } from '@flopay/shared';
3
- export { BeforeButtonClickEvent, CheckoutButtonMethod, DeclineEvent, FloInstrumentEvent, InlineSessionDraft, InlineSessionPatch, SentryEventLike, SentryStackFrameLike, dropThirdPartyOnlyError } from '@flopay/shared';
2
+ import { InlineSessionDraft, CheckoutButtonMethod, CheckoutProduct, CheckoutItem, CheckoutSubscription, ThemeId, FloPayAppearance, ButtonsLayoutTheme, ButtonsLayoutStyles, PaymentResult, CheckoutSession, FloPayError, DeclineEvent, InlineSessionPatch, GatewayEnvironment, PayPalProviderObjectType, PayPalApprovalPresentation, TokenizedBody, TelemetryPresentationMode, TelemetryTerminalReason, FloInstrumentEvent, WalletPresentation, BeforeButtonClickEvent, CheckoutMode, AVSFieldConfig, CardCaptureAdapter, VaultCardThemeColors } from '@flopay/shared';
3
+ export { BeforeButtonClickEvent, CheckoutButtonMethod, DeclineEvent, FloInstrumentEvent, InlineSessionDraft, InlineSessionPatch, SentryEventLike, SentryStackFrameLike, WalletPresentation, dropThirdPartyOnlyError } from '@flopay/shared';
4
4
  import React from 'react';
5
5
  export { FloPayCardSetup, FloPayCardSetupCancelEvent, FloPayCardSetupCompleteEvent, FloPayCardSetupDeclineEvent, FloPayCardSetupError, FloPayCardSetupProps } from './card-setup-entry.js';
6
6
  import { FloPay } from '@flopay/js';
@@ -116,10 +116,16 @@ interface DirectPayPalBeforeButtonClickResult {
116
116
  */
117
117
  type DirectPayPalRunBeforeButtonClick = (method: CheckoutButtonMethod) => Promise<DirectPayPalBeforeButtonClickResult>;
118
118
  type DirectPayPalInitializationState = 'loading' | 'retrying' | 'ready' | 'exhausted';
119
- type DirectPayPalTechnicalFailureHandler = (method: 'paypal', err: unknown, options?: {
119
+ interface DirectPayPalTechnicalFailureOptions {
120
120
  code?: string;
121
121
  popupBlocked?: boolean;
122
- }) => void;
122
+ telemetryReported?: boolean;
123
+ provider?: 'paypal';
124
+ paymentMethodCategory?: 'paypal';
125
+ presentationMode?: TelemetryPresentationMode;
126
+ terminalReason?: TelemetryTerminalReason;
127
+ }
128
+ type DirectPayPalTechnicalFailureHandler = (method: 'paypal', err: unknown, options?: DirectPayPalTechnicalFailureOptions) => void;
123
129
  interface DirectPayPalButtonProps {
124
130
  /** Checkout session ID. */
125
131
  sessionId: string;
@@ -276,6 +282,11 @@ interface FloPayCheckoutProps {
276
282
  * bootstrap-time validation error.
277
283
  */
278
284
  showStripe?: boolean;
285
+ /**
286
+ * Preferred approval presentation for supported wallets. Defaults to
287
+ * `'auto'`. Safety signals and provider capability remain authoritative.
288
+ */
289
+ walletPresentation?: WalletPresentation;
279
290
  /**
280
291
  * Override the wallet/APM list the session advertises via
281
292
  * `gateways.stripe.enabledPaymentMethods`. Omit (the default) and the
@@ -443,7 +454,7 @@ interface FloPayCheckoutProps {
443
454
  * />
444
455
  * ```
445
456
  */
446
- declare function FloPayCheckout({ sessionId: sessionIdProp, nonce: nonceProp, createSession: createSessionParams, billingApiUrl, telemetry, appearance: appearanceOverride, locale, loading: loadingNode, error: errorNode, onComplete, onError, onInstrument, onDecline, onCountryChange, onZipChange, showPayPal, showStripe, enabledPaymentMethods: enabledPaymentMethodsProp, showApplePay, showGooglePay, debug, layout, theme, buttonsTheme, buttonsStyles, cardButtonContent, cardBackButtonContent, cardTitleContent, showSecurityFooter: _showSecurityFooter, onButtonClick, onBeforeButtonClick, enableAVS, cardFieldOrder, cardPreFormSlot, avsLayout, submitLabel, className, initialErrorMessage, initialPayPalOrderId, children, checkoutMode: checkoutModeProp, confirmLabel, renderConfirmButton, onSessionCompleted, }: FloPayCheckoutProps): React.ReactElement;
457
+ declare function FloPayCheckout({ sessionId: sessionIdProp, nonce: nonceProp, createSession: createSessionParams, billingApiUrl, telemetry, appearance: appearanceOverride, locale, loading: loadingNode, error: errorNode, onComplete, onError, onInstrument, onDecline, onCountryChange, onZipChange, showPayPal, showStripe, walletPresentation, enabledPaymentMethods: enabledPaymentMethodsProp, showApplePay, showGooglePay, debug, layout, theme, buttonsTheme, buttonsStyles, cardButtonContent, cardBackButtonContent, cardTitleContent, showSecurityFooter: _showSecurityFooter, onButtonClick, onBeforeButtonClick, enableAVS, cardFieldOrder, cardPreFormSlot, avsLayout, submitLabel, className, initialErrorMessage, initialPayPalOrderId, children, checkoutMode: checkoutModeProp, confirmLabel, renderConfirmButton, onSessionCompleted, }: FloPayCheckoutProps): React.ReactElement;
447
458
 
448
459
  /**
449
460
  * Returns the current `FloPay` instance, or `null` if the provider
@@ -591,6 +602,11 @@ interface SplitCardFormProps {
591
602
  * configured) throws a bootstrap-time validation error.
592
603
  */
593
604
  showStripe?: boolean;
605
+ /**
606
+ * Preferred approval presentation for supported wallets. Defaults to
607
+ * `'auto'`. Safety signals and provider capability remain authoritative.
608
+ */
609
+ walletPresentation?: WalletPresentation;
594
610
  /**
595
611
  * Per-session list of Stripe payment method type identifiers (as returned
596
612
  * by the billing API on `gateways.stripe.enabledPaymentMethods`). When