@flopay/react 1.9.9 → 1.9.11

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,5 +1,5 @@
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, TokenizedBody, FloInstrumentEvent, BeforeButtonClickEvent, CheckoutMode, AVSFieldConfig, CardCaptureAdapter, VaultCardThemeColors } 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
3
  export { BeforeButtonClickEvent, CheckoutButtonMethod, DeclineEvent, FloInstrumentEvent, InlineSessionDraft, InlineSessionPatch, SentryEventLike, SentryStackFrameLike, dropThirdPartyOnlyError } from '@flopay/shared';
4
4
  import React from 'react';
5
5
  export { FloPayCardSetup, FloPayCardSetupCancelEvent, FloPayCardSetupCompleteEvent, FloPayCardSetupDeclineEvent, FloPayCardSetupError, FloPayCardSetupProps } from './card-setup-entry.cjs';
@@ -153,6 +153,11 @@ interface DirectPayPalButtonProps {
153
153
  * sessions continue to derive the flow from `isSubscription`.
154
154
  */
155
155
  providerObjectType?: PayPalProviderObjectType;
156
+ /**
157
+ * Backend-advertised approval presentation. The backing session value is
158
+ * authoritative when both are supplied. No return URL can be provided here.
159
+ */
160
+ approvalPresentation?: PayPalApprovalPresentation;
156
161
  /**
157
162
  * If provided, called with the tokenized body once PayPal capture
158
163
  * completes. When omitted, the component processes payment internally.
@@ -453,7 +458,7 @@ declare function useCheckout(): CheckoutState;
453
458
  /** Props for the `FloPayProvider` component. */
454
459
  interface FloPayProviderProps {
455
460
  /** A `FloPay` instance or a promise that resolves to one (from `loadFloPay()`). */
456
- flopay: Promise<FloPay> | FloPay;
461
+ flopay: Promise<FloPay> | FloPay | null;
457
462
  /**
458
463
  * Optional Stripe `FloPay` instance used to drive the Stripe-rendered PayPal
459
464
  * fallback. When omitted or `null`, the Stripe-rendered PayPal button is
@@ -502,6 +507,8 @@ interface SplitCardFormProps {
502
507
  nonce?: string;
503
508
  /** Billing API base URL. Optional — defaults to the value from FloPayProvider or the shared constant. */
504
509
  billingApiUrl?: string;
510
+ /** Flo-owned privacy-safe telemetry is enabled by default; set false to opt out. */
511
+ telemetry?: boolean;
505
512
  /** User's email (required for creating payment intents). */
506
513
  email?: string;
507
514
  /** User ID (required for processing payments). */
@@ -704,6 +711,8 @@ interface SplitCardFormProps {
704
711
  * Retained as a fallback for integrations that do not supply a session.
705
712
  */
706
713
  providerObjectType?: PayPalProviderObjectType;
714
+ /** Backend-advertised non-popup presentation for one-time PayPal Orders. */
715
+ approvalPresentation?: _flopay_shared.PayPalApprovalPresentation;
707
716
  };
708
717
  /** Whether the active session represents a subscription (drives direct PayPal intent). */
709
718
  isSubscription?: boolean;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
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, TokenizedBody, FloInstrumentEvent, BeforeButtonClickEvent, CheckoutMode, AVSFieldConfig, CardCaptureAdapter, VaultCardThemeColors } 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
3
  export { BeforeButtonClickEvent, CheckoutButtonMethod, DeclineEvent, FloInstrumentEvent, InlineSessionDraft, InlineSessionPatch, SentryEventLike, SentryStackFrameLike, dropThirdPartyOnlyError } from '@flopay/shared';
4
4
  import React from 'react';
5
5
  export { FloPayCardSetup, FloPayCardSetupCancelEvent, FloPayCardSetupCompleteEvent, FloPayCardSetupDeclineEvent, FloPayCardSetupError, FloPayCardSetupProps } from './card-setup-entry.js';
@@ -153,6 +153,11 @@ interface DirectPayPalButtonProps {
153
153
  * sessions continue to derive the flow from `isSubscription`.
154
154
  */
155
155
  providerObjectType?: PayPalProviderObjectType;
156
+ /**
157
+ * Backend-advertised approval presentation. The backing session value is
158
+ * authoritative when both are supplied. No return URL can be provided here.
159
+ */
160
+ approvalPresentation?: PayPalApprovalPresentation;
156
161
  /**
157
162
  * If provided, called with the tokenized body once PayPal capture
158
163
  * completes. When omitted, the component processes payment internally.
@@ -453,7 +458,7 @@ declare function useCheckout(): CheckoutState;
453
458
  /** Props for the `FloPayProvider` component. */
454
459
  interface FloPayProviderProps {
455
460
  /** A `FloPay` instance or a promise that resolves to one (from `loadFloPay()`). */
456
- flopay: Promise<FloPay> | FloPay;
461
+ flopay: Promise<FloPay> | FloPay | null;
457
462
  /**
458
463
  * Optional Stripe `FloPay` instance used to drive the Stripe-rendered PayPal
459
464
  * fallback. When omitted or `null`, the Stripe-rendered PayPal button is
@@ -502,6 +507,8 @@ interface SplitCardFormProps {
502
507
  nonce?: string;
503
508
  /** Billing API base URL. Optional — defaults to the value from FloPayProvider or the shared constant. */
504
509
  billingApiUrl?: string;
510
+ /** Flo-owned privacy-safe telemetry is enabled by default; set false to opt out. */
511
+ telemetry?: boolean;
505
512
  /** User's email (required for creating payment intents). */
506
513
  email?: string;
507
514
  /** User ID (required for processing payments). */
@@ -704,6 +711,8 @@ interface SplitCardFormProps {
704
711
  * Retained as a fallback for integrations that do not supply a session.
705
712
  */
706
713
  providerObjectType?: PayPalProviderObjectType;
714
+ /** Backend-advertised non-popup presentation for one-time PayPal Orders. */
715
+ approvalPresentation?: _flopay_shared.PayPalApprovalPresentation;
707
716
  };
708
717
  /** Whether the active session represents a subscription (drives direct PayPal intent). */
709
718
  isSubscription?: boolean;