@flopay/shared 1.20.15 → 2.0.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/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- export { getButtonMethodLabel, normalizeBeforeButtonClickError } from './before-button-click.js';
2
1
  export type { CardFieldLabels, VaultLabelTheme } from './card-field-labels.js';
3
2
  export { buildCardFieldLabelsPayload, computeVaultLabelTheme } from './card-field-labels.js';
4
3
  export type { CardFieldsEvent, CardFieldsFailedEvent, CardFieldsFailureReason, CardFieldsReadyEvent, } from './card-fields.js';
@@ -9,8 +8,6 @@ export { computeCardSetupOverlayTheme } from './card-setup-overlay-theme.js';
9
8
  export { mergeCardSetupSurface } from './card-setup-surface.js';
10
9
  export type { CardSetupThemeResolution, CardSetupThemeSource } from './card-setup-theme.js';
11
10
  export { mergeButtonsStyles, resolveCardSetupTheme } from './card-setup-theme.js';
12
- export type { CheckoutAdvertisement, DirectPayPalConfig, DirectPayPalGatewaySource, } from './checkout-gateway-rules.js';
13
- export { applyClaimAdvertisement, canRecoverHostedCardForm, cardGatewayName, filterStripeMethodsByCountryGate, hasServerSideCardGateway, resolveDirectPaypalConfig, } from './checkout-gateway-rules.js';
14
11
  export type { CheckoutInitErrorContext } from './checkout-init-error.js';
15
12
  export { markSessionResponseReceived, NETWORK_REQUEST_FAILED_CODE, PROVIDER_LOAD_FAILED_CODE, toPublicCheckoutInitError, } from './checkout-init-error.js';
16
13
  export { isAuthorizationOnlySession, isMoneySettledOutcome, normalizeCheckoutFailureOutcome, } from './checkout-outcomes.js';
@@ -19,15 +16,14 @@ export type { CheckoutLogLayout, CheckoutProcessAvsInput, CheckoutProcessMetadat
19
16
  export { buildCheckoutProcessMetadata, buildProcessPaymentAvsAccount, buildProcessPaymentAvsExposure, resolveCheckoutLogLayout, } from './checkout-process-request.js';
20
17
  export type { FloPayEnvironment } from './config.js';
21
18
  export { configureFlopay, getConfiguredBillingApiUrl, getFloPayEnvironment } from './config.js';
22
- export { ASYNC_AUTO_CHECKOUT_CAPABILITY, BILLING_API_URL, BILLING_API_URL_PRODUCTION, BILLING_API_URL_STAGING, BOLD_DARK_APPEARANCE, BOLD_LIGHT_APPEARANCE, BUTTONS_LAYOUT_BOLD_DARK, BUTTONS_LAYOUT_BOLD_LIGHT, BUTTONS_LAYOUT_DARK, BUTTONS_LAYOUT_DEFAULT, BUTTONS_LAYOUT_GLASS_DARK, BUTTONS_LAYOUT_GLASS_LIGHT, BUTTONS_LAYOUT_MINIMAL, BUTTONS_LAYOUT_MODERN_DARK, BUTTONS_LAYOUT_MODERN_LIGHT, BUTTONS_LAYOUT_ROUNDED, CA_PROVINCES, CHECKOUT_PROCESSING_TIMEOUT_MESSAGE, COUNTRY_OPTIONS, CURRENCY_MAP, DEFAULT_API_BASE_URL, DEFAULT_API_VERSION, DEFAULT_APPEARANCE, DEFAULT_CURRENCY, FLAT_APPEARANCE, FLO_SDK_CAPABILITIES_HEADER, FLO_SDK_VERSION_HEADER, filterStripeMethodsByAmount, filterStripeMethodsByCountry, filterStripeMethodsByCurrency, GLASS_DARK_APPEARANCE, GLASS_LIGHT_APPEARANCE, getCountryByCode, getPostalCodeLabel, getStateLabel, getStateOptions, getStripeMethodDisplayName, hasVendoredStripeMethodLogo, isAVSEnabled, isAVSFieldVisible, MODERN_DARK_APPEARANCE, MODERN_LIGHT_APPEARANCE, NIGHT_APPEARANCE, needsStripeMethodExplicitConfirm, PAYPAL_VAULTED_PAYMENT_METHOD_TYPE, partitionStripeMethods, resolveAVSConfig, resolveBillingApiUrl, resolveButtonsLayoutTheme, resolveStripeMethodBrandVariant, resolveTheme, SDK_VERSION, SECURE_API_URL_PRODUCTION, SECURE_API_URL_STAGING, STORED_PAYMENT_METHOD_UNSUPPORTED_CODE, STORED_PAYMENT_METHOD_UNSUPPORTED_MESSAGE, STRIPE_EXPRESS_METHODS, STRIPE_METHOD_AMOUNT_LIMITS, STRIPE_METHOD_COUNTRIES, STRIPE_METHOD_CURRENCIES, STRIPE_METHOD_MATRIX, type StateOption, type StripeMethodEntry, type StripeMethodThemeVariant, SUPPORTED_CARD_BRANDS, stripeExpressMethodToOptionKey, THEMES, THREE_DS_CHALLENGE_WINDOW_MS, US_STATES, } from './constants.js';
19
+ export { ASYNC_AUTO_CHECKOUT_CAPABILITY, BILLING_API_URL, BILLING_API_URL_PRODUCTION, BILLING_API_URL_STAGING, BOLD_DARK_APPEARANCE, BOLD_LIGHT_APPEARANCE, BUTTONS_LAYOUT_BOLD_DARK, BUTTONS_LAYOUT_BOLD_LIGHT, BUTTONS_LAYOUT_DARK, BUTTONS_LAYOUT_DEFAULT, BUTTONS_LAYOUT_GLASS_DARK, BUTTONS_LAYOUT_GLASS_LIGHT, BUTTONS_LAYOUT_MINIMAL, BUTTONS_LAYOUT_MODERN_DARK, BUTTONS_LAYOUT_MODERN_LIGHT, BUTTONS_LAYOUT_ROUNDED, CA_PROVINCES, COUNTRY_OPTIONS, CURRENCY_MAP, DEFAULT_API_BASE_URL, DEFAULT_API_VERSION, DEFAULT_APPEARANCE, DEFAULT_CURRENCY, FLAT_APPEARANCE, FLO_SDK_CAPABILITIES_HEADER, FLO_SDK_VERSION_HEADER, GLASS_DARK_APPEARANCE, GLASS_LIGHT_APPEARANCE, getCountryByCode, getPostalCodeLabel, getStateLabel, getStateOptions, isAVSEnabled, isAVSFieldVisible, MODERN_DARK_APPEARANCE, MODERN_LIGHT_APPEARANCE, NIGHT_APPEARANCE, resolveAVSConfig, resolveBillingApiUrl, resolveButtonsLayoutTheme, resolveTheme, SDK_VERSION, SECURE_API_URL_PRODUCTION, SECURE_API_URL_STAGING, STORED_PAYMENT_METHOD_UNSUPPORTED_CODE, type StateOption, SUPPORTED_CARD_BRANDS, THEMES, THREE_DS_CHALLENGE_WINDOW_MS, US_STATES, } from './constants.js';
23
20
  export type { BuildCheckoutDisplayDataOptions, CheckoutDisplayData, DisplayLineItem, } from './display.js';
24
21
  export { buildCheckoutDisplayData } from './display.js';
25
22
  export { isValidEmail } from './email-validation.js';
26
23
  export type { ExternalMethodFailureDetails, FloPayErrorType } from './errors.js';
27
24
  export { apiError, authenticationError, FloPayError, networkError, rateLimitError, validationError, } from './errors.js';
28
25
  export type { ExternalMethodFailureClassification, ExternalMethodFailureContext, } from './external-method-recovery.js';
29
- export { buildExternalMethodRecoveryMessage, classifyExternalMethodFailure, EXTERNAL_METHOD_CALLBACK_GRACE_MS, getProviderDeclineCode, getProviderErrorCode, isPayPalAcknowledgementDeadWindow, isPopupBlockedError, isProviderDecline, sanitizeExternalFailureCode, } from './external-method-recovery.js';
30
- export { applyFriendlyMessageOverride } from './friendly-message.js';
26
+ export { classifyExternalMethodFailure, EXTERNAL_METHOD_CALLBACK_GRACE_MS, getProviderDeclineCode, getProviderErrorCode, isPopupBlockedError, isProviderDecline, sanitizeExternalFailureCode, } from './external-method-recovery.js';
31
27
  export type { FutureUseSessionFields, FutureUseSurface } from './future-use.js';
32
28
  export { resolveSetupFutureUsage } from './future-use.js';
33
29
  export { generateIdempotencyKey, IDEMPOTENCY_IN_PROGRESS_CODE, IDEMPOTENCY_KEY_HEADER, MAX_IDEMPOTENCY_KEY_LENGTH, resolveIdempotencyKey, } from './idempotency.js';
@@ -41,42 +37,33 @@ export { isMerchantAuthRequired, MERCHANT_AUTH_REQUIRED_CODE } from './merchant-
41
37
  export { isDeclineCallbackFailure, isExpectedPaymentDecline, isPaymentAuthenticationFailure, } from './payment-decline.js';
42
38
  export type { KeyedPaymentMethodGroup, PaymentMethodCountryRule, PaymentMethodGroup, PaymentMethodGroupLayout, PaymentMethodGroupPlacement, PaymentMethodLayout, PaymentMethodLayoutCountrySource, PaymentMethodLayoutRules, } from './payment-method-layout.js';
43
39
  export { DEFAULT_PAYMENT_METHOD_ORDER, isCardFormFirst, keyPaymentMethodOrder, normalizePaymentMethodLayout, placePaymentMethodGroups, resolveDefaultPaymentMethodLayout, resolvePaymentMethodOrder, } from './payment-method-layout.js';
44
- export type { PaymentMethodSetupAdvertisement, SetupOverlayWording, } from './payment-method-setup-advertisement.js';
45
- export { advertisedMethodKeys, advertisesAnyMethod, readSetupAdvertisement, setupOverlayLabels, stripeMethodCategory, } from './payment-method-setup-advertisement.js';
46
40
  export type { PayPalBuyerIdentity } from './paypal-buyer-identity.js';
47
- export { compactBuyerIdentity, mergePayPalPayerIdentity, needsPayPalPayerDetails, paypalProviderIdentityRequired, readPayPalPayerIdentity, resolvePayPalApprovalIdentity, resolvePayPalPresentationMode, splitFullName, } from './paypal-buyer-identity.js';
48
- export type { PayPalProcessPaymentInput } from './paypal-channel.js';
49
- export { buildPayPalCancelEvent, buildPayPalProcessPaymentRequest, buildPayPalSessionIntentRequest, buildPayPalTokenizedBody, describePayPalProcessFailure, friendlyPayPalFailureMessage, isPayPalTeardownMessage, resolvePayPalDeclineReason, usesPayPalVaultedChannel, } from './paypal-channel.js';
50
- export type { PayPalBrowserEnvironment } from './paypal-environment.js';
51
- export { detectPayPalEnvironment } from './paypal-environment.js';
41
+ export { compactBuyerIdentity, splitFullName, } from './paypal-buyer-identity.js';
52
42
  export { getStateFromPostalCode } from './postal-code-lookup.js';
53
43
  export { getPostalCodeExample, isPostalCodeSupported, isValidPostalCode, } from './postal-code-validation.js';
54
44
  export type { PrimaryTileStyle, PrimaryTileStyleSource, PrimaryTileSubmitStyle, } from './primary-tile-style.js';
55
45
  export { derivePrimaryTileStyle } from './primary-tile-style.js';
46
+ export type { PublicCheckoutSession, PublicPaymentMethods } from './public-session.js';
47
+ export { normalizePublicSession } from './public-session.js';
56
48
  export { markSessionRecentlyCompleted, wasSessionRecentlyCompleted } from './recent-completion.js';
57
49
  export type { AdvertisedPaymentMethod, ListSavedPaymentMethodsQuery, SavedCardPaymentMethodDisplay, SavedOtherPaymentMethodDisplay, SavedPaymentMethodDisplay, SavedPaymentMethodFamily, SavedPaymentMethodListType, SavedPaymentMethodType, } from './saved-payment-methods.js';
58
50
  export { isSetupCheckoutSession, SAVED_PAYMENT_METHOD_FAMILIES, SAVED_PAYMENT_METHOD_LIST_TYPES, SAVED_PAYMENT_METHOD_TYPES, } from './saved-payment-methods.js';
59
51
  export type { SentryEventLike, SentryStackFrameLike } from './sentry-filter.js';
60
52
  export { dropThirdPartyOnlyError } from './sentry-filter.js';
61
53
  export { CHECKOUT_SESSION_SETTLED_CODE, isSettledSessionIntent, settledSessionIntentError, } from './settled-session-intent.js';
62
- export type { StripeSafeAppearance } from './stripe-appearance.js';
63
- export { toStripeAppearance, toStripeAppearanceTheme } from './stripe-appearance.js';
64
- export type { StripePayPalResumeContinuation } from './stripe-paypal-presentation.js';
65
- export { clearStripePayPalReturn, hasMatchingStripePayPalReturn, readMatchingStripePayPalContinuation, readStripeRedirectParams, resolveStripePayPalPresentation, STRIPE_PAYPAL_RESUME_KEY, STRIPE_REDIRECT_PARAMS, stripeRedirectReturnUrl, writeStripePayPalContinuation, } from './stripe-paypal-presentation.js';
66
54
  export type { BuildTelemetryErrorEventInput, BuildTelemetryLogEventInput, BuildTelemetryPerformanceEventInput, BuildTelemetryTerminalEventInput, SerializeTelemetryBatchOptions, TelemetryAppFamily, TelemetryBatchEnvelope, TelemetryCallbackIgnoredReason, TelemetryCheckoutMode, TelemetryDurationMode, TelemetryErrorCode, TelemetryErrorEvent, TelemetryErrorReason, TelemetryEvent, TelemetryEventClass, TelemetryExpectedOutcome, TelemetryExpectedOutcomeEvent, TelemetryFailureCategory, TelemetryLayout, TelemetryLogEvent, TelemetryLogName, TelemetryPaymentMethodCategory, TelemetryPerformanceEvent, TelemetryPopupCapability, TelemetryPresentationMode, TelemetryProvider, TelemetryProviderInput, TelemetryRequestCategory, TelemetrySdkPackage, TelemetryStage, TelemetryStatusClass, TelemetryTerminalReason, } from './telemetry.js';
67
55
  export { buildTelemetryErrorEvent, buildTelemetryLogEvent, buildTelemetryPerformanceEvent, buildTelemetryTerminalEvent, serializeTelemetryBatch, TELEMETRY_CALLBACK_IGNORED_REASONS, TELEMETRY_ERROR_CODES, TELEMETRY_FAILURE_CATEGORIES, TELEMETRY_LOG_NAMES, TELEMETRY_MAX_BATCH_BYTES, TELEMETRY_MAX_BATCH_EVENTS, TELEMETRY_SCHEMA_VERSION, TELEMETRY_SDK_PACKAGES, } from './telemetry.js';
68
56
  export type { ClassifiedTelemetryFailure, TelemetryHttpDiagnostics, } from './telemetry-failure.js';
69
57
  export { classifyPaymentRejection, classifyTelemetryFailure, readTelemetryHttpDiagnostics, telemetryStatusClass, withTelemetryHttpDiagnostics, } from './telemetry-failure.js';
70
58
  export type { ThreeDsChallengeClassification, ThreeDsChallengePhase, ThreeDsChallengeReason, ThreeDsChallengeRecord, ThreeDsChallengeRecordInput, ThreeDsChallengeTimeline, ThreeDsEvidenceBasis, ThreeDsProvider, ThreeDsProviderOutcome, ThreeDsTerminalSource, } from './three-ds-challenge-telemetry.js';
71
59
  export { isThreeDsChallengeAttemptId, reconstructThreeDsTimeline, sanitizeThreeDsChallengeRecord, THREE_DS_CHALLENGE_PHASES, THREE_DS_MAX_ATTEMPT_SEQUENCE, THREE_DS_MAX_ELAPSED_MS, THREE_DS_REQUIRED_MILESTONES, } from './three-ds-challenge-telemetry.js';
72
- export type { AVSFieldConfig, BeforeButtonClickEvent, BillingDetails, BillingProvider, ButtonsLayoutStyles, ButtonsLayoutTheme, CaptureMethod, CardCaptureAdapter, CardCaptureEventType, CardCaptureMountOptions, CardCaptureOutcomeEvent, CardCaptureProviderId, CardFieldPlaceholders, CardSetupFutureUse, CheckoutAccount, CheckoutButtonMethod, CheckoutFailureOutcome, CheckoutGateway, CheckoutGateways, CheckoutItem, CheckoutMetadata, CheckoutMode, CheckoutModeKind, CheckoutProcessError, CheckoutProcessingPending, CheckoutProduct, CheckoutProductType, CheckoutSession, CheckoutSessionMode, CheckoutSessionProduct, CheckoutSessionResult, CheckoutSubscription, CountryOption, CreateCardSetupSessionRequest, CreateCustomerParams, CreateSessionIntentRequest, CreateSessionParams, CurrencyInfo, Customer, DeclineEvent, DetachedCheckoutSession, FloPayAppearance, FloPayConfig, FloPayPaymentCancelEvent, FloPayThemeVariables, FutureUseUnsupportedMethod, GatewayEnvironment, InlineSessionDraft, InlineSessionParams, InlineSessionPatch, LineItem, NonCardPaymentMethodCategory, NormalizedCheckoutSession, NormalizedGatewayEnvironment, PaymentMethodRemovalConflictCode, PaymentMethodRemovalConflictError, PaymentMethodRemovalError, PaymentMethodRemovalFailureReason, PaymentMethodRemovalNotFoundError, PaymentMethodRemovalRetryableError, PaymentProviderAdapter, PaymentResult, PayPalApprovalPresentation, PayPalPaymentResult, PayPalProviderObjectType, PayPalSessionIntent, PayPalSessionIntentRequest, PriceData, ProcessPaymentParams, RecurringInterval, SavedCardDisplay, SavedPaymentMethodStatus, SessionIntent, SessionIntentDeclineRequest, SessionIntentResult, SettledSessionIntent, StoredPaymentMethodOutcomeCode, StripeSessionIntent, StripeSessionIntentRequest, TagsData, ThemeBundle, ThemeBundleId, ThemeId, TokenizedBody, UpdateCustomerParams, VaultCaptureBlock, VaultCaptureResultMessage, VaultCardFieldKey, VaultCardThemeColors, VaultGradientStop, VaultLinearGradientBackground, VaultShadowLayer, VaultSolidBackground, VaultSubmitBackground, VaultSubmitButtonTheme, VaultSubmitSpacing, VaultSubmitTypography, VaultThemeColor, WalletPresentation, WebhookEvent, } from './types.js';
60
+ export type { AVSFieldConfig, BeforeButtonClickEvent, BillingDetails, BillingProvider, ButtonsLayoutStyles, ButtonsLayoutTheme, CaptureMethod, CardCaptureAdapter, CardCaptureEventType, CardCaptureMountOptions, CardCaptureOutcomeEvent, CardCaptureProviderId, CardFieldPlaceholders, CardSetupFutureUse, CheckoutAccount, CheckoutButtonMethod, CheckoutFailureOutcome, CheckoutItem, CheckoutMetadata, CheckoutMode, CheckoutModeKind, CheckoutProcessError, CheckoutProcessingPending, CheckoutProduct, CheckoutProductType, CheckoutSession, CheckoutSessionMode, CheckoutSessionProduct, CheckoutSessionResult, CheckoutSubscription, CountryOption, CreateCardSetupSessionRequest, CreateCustomerParams, CreateSessionIntentRequest, CreateSessionParams, CurrencyInfo, Customer, DeclineEvent, FloPayAppearance, FloPayConfig, FloPayPaymentCancelEvent, FloPayThemeVariables, FutureUseUnsupportedMethod, GatewayEnvironment, InlineSessionDraft, InlineSessionParams, InlineSessionPatch, LineItem, NonCardPaymentMethodCategory, NormalizedGatewayEnvironment, PaymentMethodRemovalConflictCode, PaymentMethodRemovalConflictError, PaymentMethodRemovalError, PaymentMethodRemovalFailureReason, PaymentMethodRemovalNotFoundError, PaymentMethodRemovalRetryableError, PaymentProviderAdapter, PaymentResult, PayPalApprovalPresentation, PayPalPaymentResult, PayPalProviderObjectType, PayPalSessionIntent, PayPalSessionIntentRequest, PriceData, ProcessPaymentParams, RecurringInterval, SavedCardDisplay, SavedPaymentMethodStatus, SessionIntent, SessionIntentDeclineRequest, SessionIntentResult, SettledSessionIntent, StoredPaymentMethodOutcomeCode, TagsData, ThemeBundle, ThemeBundleId, ThemeId, TokenizedBody, UpdateCustomerParams, VaultCaptureBlock, VaultCaptureResultMessage, VaultCardFieldKey, VaultCardThemeColors, VaultGradientStop, VaultLinearGradientBackground, VaultShadowLayer, VaultSolidBackground, VaultSubmitBackground, VaultSubmitButtonTheme, VaultSubmitSpacing, VaultSubmitTypography, VaultThemeColor, WalletPresentation, WebhookEvent, } from './types.js';
73
61
  export { normalizeGatewayEnvironment } from './types.js';
74
62
  export { isUuidV4, randomUuidV4, UUID_V4 } from './uuid.js';
75
63
  export { getCurrencyByCountry, isCardHolderNamePlaceholder, isSetupIntentClientSecret, isValidPublishableKey, isValidSecretKey, } from './validation.js';
76
- export { BUYER_EMAIL_REQUIRED_PROMPT, buyerEmailRequiredPrompt, CHECKOUT_SESSION_BUYER_EMAIL_REQUIRED, } from './vault-buyer-email.js';
64
+ export { CHECKOUT_SESSION_BUYER_EMAIL_REQUIRED } from './vault-buyer-email.js';
77
65
  export type { VaultThemeSource } from './vault-theme.js';
78
66
  export { computeVaultCardThemeColors, darkenHex, toCssWeight } from './vault-theme.js';
79
67
  export type { VaultMountContext } from './vault-verification.js';
80
68
  export { isMountableVaultBlock, isVaultVerificationRequired, resolveVaultMountOptions, VAULT_CAPTURE_FORM_PATH, } from './vault-verification.js';
81
- export { resolveWalletModeOptions } from './wallet-elements-mode.js';
82
- export { buildWalletSheetWindowMessage, denyPaymentPermissionToNewFrames, isWalletSheetRefusedForWindowSize, shouldPreferWalletPopup, WALLET_SHEET_WINDOW_TOO_SMALL_CODE, } from './wallet-sheet-window.js';
69
+ export { denyPaymentPermissionToNewFrames, isWalletSheetRefusedForWindowSize, shouldPreferWalletPopup, WALLET_SHEET_WINDOW_TOO_SMALL_CODE, } from './wallet-sheet-window.js';