@flopay/shared 1.19.1 → 1.20.1

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/README.md CHANGED
@@ -58,7 +58,7 @@ The postal-code helpers are a faithful mirror of the billing API's own postcode
58
58
 
59
59
  Saved payment methods of any type follow the same rule. A setup session's optional `advertisedPaymentMethods` lists what the billing API advertises, and `isSetupCheckoutSession()` recognises the session without reading that list. `ListSavedPaymentMethodsQuery` filters only by method type (a `SavedPaymentMethodListType`), and no type here names a gateway or a provider.
60
60
 
61
- An Auto-mode create may send `x-flo-sdk-capabilities: async-auto-checkout-v1`. This generic response-shape negotiation says only that the client can consume a `202 checkout_processing` response and its authenticated status endpoint. It is not a gateway hint, a saved-card eligibility claim, or a Worldpay opt-in. Confirm and Full creates do not send it.
61
+ An Auto-mode create may send `x-flo-sdk-capabilities: async-auto-checkout-v1`. This generic response-shape negotiation says only that the client can consume a `202 checkout_processing` response and its authenticated status endpoint. It is not a gateway hint, a saved-card eligibility claim, or a Worldpay opt-in. Confirm and Full creates do not send it. A client that reloads Stripe and re-mounts its wallets when a claim changes the advertised Stripe account may send `stripe-account-switch-v1` on a detached create and its claims (`@flopay/js` does so only for a `PaymentAPI` created with `stripeAccountSwitch: true`); a detached create may also carry the cart's product codes as `routingProducts`, routing input only. Neither selects a gateway.
62
62
 
63
63
  ### Privacy-safe telemetry contract
64
64
 
@@ -34,11 +34,17 @@ export declare function resolveDirectPaypalConfig(paypal: DirectPayPalGatewaySou
34
34
  * no country, nothing is filtered and `methods` is returned as it is.
35
35
  */
36
36
  export declare function filterStripeMethodsByCountryGate(methods: string[], country: string | null | undefined, enabledPaymentMethodCountries: Record<string, string[]> | undefined): string[];
37
+ /**
38
+ * The key of the gateway that takes the session's cards, exactly as the API
39
+ * names it: the server-side card gateway when there is one, else the
40
+ * browser-side card provider when the session has it, else `undefined`.
41
+ */
42
+ export declare function cardGatewayName(session: Pick<CheckoutSession, 'gateways'> | null | undefined): string | undefined;
37
43
  /**
38
44
  * Whether the session can route cards to a gateway the billing API processes
39
- * entirely server-side behind the hosted vault form — today the Worldpay
40
- * Corporate Gateway (TeamFloPay/backend#1563). Such a gateway has no browser
41
- * runtime or credentials, and its payment references are not Stripe objects.
45
+ * entirely server-side behind the hosted vault form (see
46
+ * {@link serverSideCardGatewayName}). Such a gateway has no browser runtime or
47
+ * credentials, and its payment references are not Stripe objects.
42
48
  */
43
49
  export declare function hasServerSideCardGateway(session: CheckoutSession | null | undefined): boolean;
44
50
  /**
@@ -1,6 +1,6 @@
1
1
  import type { AVSFieldConfig, ButtonsLayoutStyles, ButtonsLayoutTheme, CountryOption, CurrencyInfo, FloPayAppearance, ThemeBundle, ThemeBundleId, ThemeId } from './types.js';
2
2
  /** Current SDK version. */
3
- export declare const SDK_VERSION = "1.19.1";
3
+ export declare const SDK_VERSION = "1.20.1";
4
4
  /**
5
5
  * HTTP header the SDK sends on checkout-session create/read requests so the
6
6
  * backend can observe compatibility. Version 1.4.9 is the first release that