@stripe/stripe-react-native 0.44.0 → 0.45.0
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/.clang-format +90 -0
- package/.editorconfig +3 -0
- package/CHANGELOG.md +7 -1
- package/android/build.gradle +89 -18
- package/android/gradle.properties +1 -1
- package/android/src/main/java/com/reactnativestripesdk/AuBECSDebitFormViewManager.kt +15 -6
- package/android/src/main/java/com/reactnativestripesdk/CardChangeEvent.kt +56 -0
- package/android/src/main/java/com/reactnativestripesdk/CardFieldView.kt +4 -4
- package/android/src/main/java/com/reactnativestripesdk/CardFieldViewManager.kt +55 -45
- package/android/src/main/java/com/reactnativestripesdk/{CardFocusEvent.kt → CardFocusChangeEvent.kt} +2 -2
- package/android/src/main/java/com/reactnativestripesdk/CardFormCompleteEvent.kt +17 -16
- package/android/src/main/java/com/reactnativestripesdk/CardFormView.kt +5 -5
- package/android/src/main/java/com/reactnativestripesdk/CardFormViewManager.kt +39 -33
- package/android/src/main/java/com/reactnativestripesdk/CollectBankAccountLauncherFragment.kt +4 -2
- package/android/src/main/java/com/reactnativestripesdk/EmbeddedPaymentElementView.kt +182 -0
- package/android/src/main/java/com/reactnativestripesdk/EmbeddedPaymentElementViewManager.kt +231 -0
- package/android/src/main/java/com/reactnativestripesdk/FinancialConnectionsSheetFragment.kt +8 -5
- package/android/src/main/java/com/reactnativestripesdk/GooglePayButtonManager.kt +14 -6
- package/android/src/main/java/com/reactnativestripesdk/PaymentMethodCreateParamsFactory.kt +3 -1
- package/android/src/main/java/com/reactnativestripesdk/PaymentOptionDisplayDataMapper.kt +17 -0
- package/android/src/main/java/com/reactnativestripesdk/PaymentSheetAppearance.kt +266 -0
- package/android/src/main/java/com/reactnativestripesdk/PaymentSheetFragment.kt +8 -13
- package/android/src/main/java/com/reactnativestripesdk/StripeContainerManager.kt +11 -3
- package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +106 -59
- package/android/src/main/java/com/reactnativestripesdk/StripeSdkPackage.kt +34 -4
- package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressSheetView.kt +33 -27
- package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressSheetViewManager.kt +49 -24
- package/android/src/main/java/com/reactnativestripesdk/customersheet/CustomerSheetFragment.kt +16 -3
- package/android/src/main/java/com/reactnativestripesdk/customersheet/ReactNativeCustomerAdapter.kt +11 -29
- package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/AddToWalletButtonManager.kt +36 -12
- package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/AddToWalletButtonView.kt +5 -3
- package/android/src/main/java/com/reactnativestripesdk/utils/Extensions.kt +4 -0
- package/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt +21 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/AddToWalletButtonManagerDelegate.java +49 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/AddToWalletButtonManagerInterface.java +25 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/AddressSheetViewManagerDelegate.java +64 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/AddressSheetViewManagerInterface.java +30 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/ApplePayButtonManagerDelegate.java +41 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/ApplePayButtonManagerInterface.java +20 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/AuBECSDebitFormManagerDelegate.java +36 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/AuBECSDebitFormManagerInterface.java +20 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/CardFieldManagerDelegate.java +73 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/CardFieldManagerInterface.java +31 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/CardFormManagerDelegate.java +67 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/CardFormManagerInterface.java +29 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/EmbeddedPaymentElementViewManagerDelegate.java +49 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/EmbeddedPaymentElementViewManagerInterface.java +21 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/GooglePayButtonManagerDelegate.java +38 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/GooglePayButtonManagerInterface.java +19 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/StripeContainerManagerDelegate.java +32 -0
- package/android/src/oldarch/java/com/facebook/react/viewmanagers/StripeContainerManagerInterface.java +17 -0
- package/android/src/oldarch/java/com/reactnativestripesdk/NativeStripeSdkModuleSpec.java +311 -0
- package/ios/AddressSheet/AddressSheetUtils.swift +21 -19
- package/ios/AddressSheet/AddressSheetView.swift +23 -17
- package/ios/ApplePayButtonManager.m +0 -1
- package/ios/ApplePayButtonManager.swift +1 -3
- package/ios/ApplePayButtonView.swift +25 -20
- package/ios/ApplePayViewController.swift +22 -22
- package/ios/AuBECSDebitFormView.swift +14 -8
- package/ios/CardFieldManager.swift +1 -4
- package/ios/CardFieldView.swift +28 -25
- package/ios/CardFormManager.swift +1 -4
- package/ios/CardFormView.swift +25 -16
- package/ios/CustomerSheet/CustomerSheetUtils.swift +12 -16
- package/ios/CustomerSheet/ReactNativeCustomerAdapter.swift +8 -8
- package/ios/EmbeddedPaymentElementManager.m +6 -0
- package/ios/EmbeddedPaymentElementView.swift +48 -0
- package/ios/NewArch/AddToWalletButtonComponentView.h +10 -0
- package/ios/NewArch/AddToWalletButtonComponentView.mm +93 -0
- package/ios/NewArch/AddressSheetViewComponentView.h +10 -0
- package/ios/NewArch/AddressSheetViewComponentView.mm +109 -0
- package/ios/NewArch/ApplePayButtonComponentView.h +10 -0
- package/ios/NewArch/ApplePayButtonComponentView.mm +124 -0
- package/ios/NewArch/AuBECSDebitFormComponentView.h +10 -0
- package/ios/NewArch/AuBECSDebitFormComponentView.mm +95 -0
- package/ios/NewArch/CardFieldComponentView.h +10 -0
- package/ios/NewArch/CardFieldComponentView.mm +125 -0
- package/ios/NewArch/CardFormComponentView.h +10 -0
- package/ios/NewArch/CardFormComponentView.mm +108 -0
- package/ios/NewArch/StripeContainerComponentView.h +10 -0
- package/ios/NewArch/StripeContainerComponentView.mm +74 -0
- package/ios/NewArch/StripeNewArchConversions.h +20 -0
- package/ios/NewArch/StripeNewArchConversions.mm +47 -0
- package/ios/OldArch/StripeSdkEventEmitterCompat.h +27 -0
- package/ios/OldArch/StripeSdkEventEmitterCompat.m +105 -0
- package/ios/PaymentOptionDisplayData+ReactNative.swift +55 -0
- package/ios/PaymentSheetAppearance.swift +194 -1
- package/ios/PushProvisioning/AddToWalletButtonView.swift +19 -13
- package/ios/StripeContainerView.swift +5 -3
- package/ios/StripeSdk.h +21 -0
- package/ios/StripeSdk.mm +415 -0
- package/ios/StripeSdkEmitter.swift +19 -0
- package/ios/{StripeSdk+CustomerSheet.swift → StripeSdkImpl+CustomerSheet.swift} +24 -25
- package/ios/StripeSdkImpl+Embedded.swift +327 -0
- package/ios/{StripeSdk+PaymentSheet.swift → StripeSdkImpl+PaymentSheet.swift} +18 -29
- package/ios/{StripeSdk.swift → StripeSdkImpl.swift} +50 -72
- package/ios/StripeSwiftInterop.h +25 -0
- package/ios/stripe_react_native.h +2 -0
- package/lib/commonjs/components/AddToWalletButton.js +1 -1
- package/lib/commonjs/components/AddToWalletButton.js.map +1 -1
- package/lib/commonjs/components/AddressSheet.js +1 -1
- package/lib/commonjs/components/AddressSheet.js.map +1 -1
- package/lib/commonjs/components/AuBECSDebitForm.js +1 -1
- package/lib/commonjs/components/AuBECSDebitForm.js.map +1 -1
- package/lib/commonjs/components/CardField.js +1 -1
- package/lib/commonjs/components/CardField.js.map +1 -1
- package/lib/commonjs/components/CardForm.js +1 -1
- package/lib/commonjs/components/CardForm.js.map +1 -1
- package/lib/commonjs/components/CustomerSheet.js +1 -1
- package/lib/commonjs/components/CustomerSheet.js.map +1 -1
- package/lib/commonjs/components/PlatformPayButton.js +1 -1
- package/lib/commonjs/components/PlatformPayButton.js.map +1 -1
- package/lib/commonjs/components/StripeContainer.js +1 -1
- package/lib/commonjs/components/StripeContainer.js.map +1 -1
- package/lib/commonjs/components/StripeProvider.js +1 -1
- package/lib/commonjs/components/StripeProvider.js.map +1 -1
- package/lib/commonjs/events.js +2 -0
- package/lib/commonjs/events.js.map +1 -0
- package/lib/commonjs/functions.js +1 -1
- package/lib/commonjs/functions.js.map +1 -1
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/specs/NativeAddToWalletButton.js +2 -0
- package/lib/commonjs/specs/NativeAddToWalletButton.js.map +1 -0
- package/lib/commonjs/specs/NativeAddressSheet.js +2 -0
- package/lib/commonjs/specs/NativeAddressSheet.js.map +1 -0
- package/lib/commonjs/specs/NativeApplePayButton.js +2 -0
- package/lib/commonjs/specs/NativeApplePayButton.js.map +1 -0
- package/lib/commonjs/specs/NativeAuBECSDebitForm.js +2 -0
- package/lib/commonjs/specs/NativeAuBECSDebitForm.js.map +1 -0
- package/lib/commonjs/specs/NativeCardField.js +2 -0
- package/lib/commonjs/specs/NativeCardField.js.map +1 -0
- package/lib/commonjs/specs/NativeCardForm.js +2 -0
- package/lib/commonjs/specs/NativeCardForm.js.map +1 -0
- package/lib/commonjs/specs/NativeEmbeddedPaymentElement.js +2 -0
- package/lib/commonjs/specs/NativeEmbeddedPaymentElement.js.map +1 -0
- package/lib/commonjs/specs/NativeGooglePayButton.js +2 -0
- package/lib/commonjs/specs/NativeGooglePayButton.js.map +1 -0
- package/lib/commonjs/specs/NativeStripeContainer.js +2 -0
- package/lib/commonjs/specs/NativeStripeContainer.js.map +1 -0
- package/lib/commonjs/specs/NativeStripeSdkModule.js +2 -0
- package/lib/commonjs/specs/NativeStripeSdkModule.js.map +1 -0
- package/lib/commonjs/specs/utils.js +2 -0
- package/lib/commonjs/specs/utils.js.map +1 -0
- package/lib/commonjs/types/EmbeddedPaymentElement.js +2 -0
- package/lib/commonjs/types/EmbeddedPaymentElement.js.map +1 -0
- package/lib/commonjs/types/PaymentSheet.js +1 -1
- package/lib/commonjs/types/PaymentSheet.js.map +1 -1
- package/lib/module/components/AddToWalletButton.js +1 -1
- package/lib/module/components/AddToWalletButton.js.map +1 -1
- package/lib/module/components/AddressSheet.js +1 -1
- package/lib/module/components/AddressSheet.js.map +1 -1
- package/lib/module/components/AuBECSDebitForm.js +1 -1
- package/lib/module/components/AuBECSDebitForm.js.map +1 -1
- package/lib/module/components/CardField.js +1 -1
- package/lib/module/components/CardField.js.map +1 -1
- package/lib/module/components/CardForm.js +1 -1
- package/lib/module/components/CardForm.js.map +1 -1
- package/lib/module/components/CustomerSheet.js +1 -1
- package/lib/module/components/CustomerSheet.js.map +1 -1
- package/lib/module/components/PlatformPayButton.js +1 -1
- package/lib/module/components/PlatformPayButton.js.map +1 -1
- package/lib/module/components/StripeContainer.js +1 -1
- package/lib/module/components/StripeContainer.js.map +1 -1
- package/lib/module/components/StripeProvider.js +1 -1
- package/lib/module/components/StripeProvider.js.map +1 -1
- package/lib/module/events.js +2 -0
- package/lib/module/events.js.map +1 -0
- package/lib/module/functions.js +1 -1
- package/lib/module/functions.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/specs/NativeAddToWalletButton.js +2 -0
- package/lib/module/specs/NativeAddToWalletButton.js.map +1 -0
- package/lib/module/specs/NativeAddressSheet.js +2 -0
- package/lib/module/specs/NativeAddressSheet.js.map +1 -0
- package/lib/module/specs/NativeApplePayButton.js +2 -0
- package/lib/module/specs/NativeApplePayButton.js.map +1 -0
- package/lib/module/specs/NativeAuBECSDebitForm.js +2 -0
- package/lib/module/specs/NativeAuBECSDebitForm.js.map +1 -0
- package/lib/module/specs/NativeCardField.js +2 -0
- package/lib/module/specs/NativeCardField.js.map +1 -0
- package/lib/module/specs/NativeCardForm.js +2 -0
- package/lib/module/specs/NativeCardForm.js.map +1 -0
- package/lib/module/specs/NativeEmbeddedPaymentElement.js +2 -0
- package/lib/module/specs/NativeEmbeddedPaymentElement.js.map +1 -0
- package/lib/module/specs/NativeGooglePayButton.js +2 -0
- package/lib/module/specs/NativeGooglePayButton.js.map +1 -0
- package/lib/module/specs/NativeStripeContainer.js +2 -0
- package/lib/module/specs/NativeStripeContainer.js.map +1 -0
- package/lib/module/specs/NativeStripeSdkModule.js +2 -0
- package/lib/module/specs/NativeStripeSdkModule.js.map +1 -0
- package/lib/module/specs/utils.js +2 -0
- package/lib/module/specs/utils.js.map +1 -0
- package/lib/module/types/EmbeddedPaymentElement.js +2 -0
- package/lib/module/types/EmbeddedPaymentElement.js.map +1 -0
- package/lib/module/types/PaymentSheet.js +1 -1
- package/lib/module/types/PaymentSheet.js.map +1 -1
- package/lib/typescript/src/components/AddToWalletButton.d.ts.map +1 -1
- package/lib/typescript/src/components/AddressSheet.d.ts.map +1 -1
- package/lib/typescript/src/components/AuBECSDebitForm.d.ts.map +1 -1
- package/lib/typescript/src/components/CardField.d.ts +1 -1
- package/lib/typescript/src/components/CardField.d.ts.map +1 -1
- package/lib/typescript/src/components/CardForm.d.ts +1 -1
- package/lib/typescript/src/components/CardForm.d.ts.map +1 -1
- package/lib/typescript/src/components/CustomerSheet.d.ts +1 -1
- package/lib/typescript/src/components/CustomerSheet.d.ts.map +1 -1
- package/lib/typescript/src/components/StripeContainer.d.ts.map +1 -1
- package/lib/typescript/src/events.d.ts +13 -0
- package/lib/typescript/src/events.d.ts.map +1 -0
- package/lib/typescript/src/functions.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useFinancialConnectionsSheet.d.ts +4 -4
- package/lib/typescript/src/hooks/useFinancialConnectionsSheet.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useStripe.d.ts +2 -2
- package/lib/typescript/src/hooks/useStripe.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/NativeAddToWalletButton.d.ts +27 -0
- package/lib/typescript/src/specs/NativeAddToWalletButton.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeAddressSheet.d.ts +34 -0
- package/lib/typescript/src/specs/NativeAddressSheet.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeApplePayButton.d.ts +28 -0
- package/lib/typescript/src/specs/NativeApplePayButton.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeAuBECSDebitForm.d.ts +19 -0
- package/lib/typescript/src/specs/NativeAuBECSDebitForm.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeCardField.d.ts +33 -0
- package/lib/typescript/src/specs/NativeCardField.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeCardForm.d.ts +31 -0
- package/lib/typescript/src/specs/NativeCardForm.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeEmbeddedPaymentElement.d.ts +22 -0
- package/lib/typescript/src/specs/NativeEmbeddedPaymentElement.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeGooglePayButton.d.ts +11 -0
- package/lib/typescript/src/specs/NativeGooglePayButton.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeStripeContainer.d.ts +8 -0
- package/lib/typescript/src/specs/NativeStripeContainer.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts +93 -0
- package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts.map +1 -0
- package/lib/typescript/src/specs/utils.d.ts +20 -0
- package/lib/typescript/src/specs/utils.d.ts.map +1 -0
- package/lib/typescript/src/types/CustomerSheet.d.ts +1 -5
- package/lib/typescript/src/types/CustomerSheet.d.ts.map +1 -1
- package/lib/typescript/src/types/EmbeddedPaymentElement.d.ts +161 -0
- package/lib/typescript/src/types/EmbeddedPaymentElement.d.ts.map +1 -0
- package/lib/typescript/src/types/PaymentSheet.d.ts +97 -4
- package/lib/typescript/src/types/PaymentSheet.d.ts.map +1 -1
- package/lib/typescript/src/types/components/CardFieldInput.d.ts +3 -2
- package/lib/typescript/src/types/components/CardFieldInput.d.ts.map +1 -1
- package/lib/typescript/src/types/components/CardFormView.d.ts +3 -1
- package/lib/typescript/src/types/components/CardFormView.d.ts.map +1 -1
- package/package.json +20 -1
- package/src/components/AddToWalletButton.tsx +2 -5
- package/src/components/AddressSheet.tsx +5 -16
- package/src/components/AuBECSDebitForm.tsx +3 -12
- package/src/components/CardField.tsx +20 -30
- package/src/components/CardForm.tsx +14 -29
- package/src/components/CustomerSheet.tsx +23 -25
- package/src/components/PlatformPayButton.tsx +6 -6
- package/src/components/StripeContainer.tsx +5 -12
- package/src/components/StripeProvider.tsx +1 -1
- package/src/events.ts +49 -0
- package/src/functions.ts +13 -24
- package/src/hooks/useFinancialConnectionsSheet.tsx +2 -2
- package/src/hooks/useStripe.tsx +2 -2
- package/src/index.tsx +3 -0
- package/src/specs/NativeAddToWalletButton.ts +40 -0
- package/src/specs/NativeAddressSheet.ts +50 -0
- package/src/specs/NativeApplePayButton.ts +40 -0
- package/src/specs/NativeAuBECSDebitForm.ts +24 -0
- package/src/specs/NativeCardField.ts +51 -0
- package/src/specs/NativeCardForm.ts +43 -0
- package/src/specs/NativeEmbeddedPaymentElement.ts +37 -0
- package/src/specs/NativeGooglePayButton.ts +20 -0
- package/src/specs/NativeStripeContainer.ts +12 -0
- package/src/specs/NativeStripeSdkModule.ts +219 -0
- package/src/specs/utils.ts +22 -0
- package/src/types/CustomerSheet.ts +1 -5
- package/src/types/EmbeddedPaymentElement.tsx +467 -0
- package/src/types/PaymentSheet.ts +114 -4
- package/src/types/components/CardFieldInput.ts +1 -2
- package/src/types/components/CardFormView.ts +1 -1
- package/stripe-react-native.podspec +27 -2
- package/android/.gradle/8.11.1/checksums/checksums.lock +0 -0
- package/android/.gradle/8.11.1/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/8.11.1/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/8.11.1/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.11.1/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.11.1/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.11.1/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/src/main/java/com/reactnativestripesdk/CardChangedEvent.kt +0 -54
- package/ios/StripeSdk.m +0 -244
- package/lib/commonjs/NativeStripeSdk.js +0 -2
- package/lib/commonjs/NativeStripeSdk.js.map +0 -1
- package/lib/commonjs/components/ApplePayButtonNative.js +0 -2
- package/lib/commonjs/components/ApplePayButtonNative.js.map +0 -1
- package/lib/commonjs/components/GooglePayButtonNative.js +0 -2
- package/lib/commonjs/components/GooglePayButtonNative.js.map +0 -1
- package/lib/module/NativeStripeSdk.js +0 -2
- package/lib/module/NativeStripeSdk.js.map +0 -1
- package/lib/module/components/ApplePayButtonNative.js +0 -2
- package/lib/module/components/ApplePayButtonNative.js.map +0 -1
- package/lib/module/components/GooglePayButtonNative.js +0 -2
- package/lib/module/components/GooglePayButtonNative.js.map +0 -1
- package/lib/typescript/src/NativeStripeSdk.d.ts +0 -58
- package/lib/typescript/src/NativeStripeSdk.d.ts.map +0 -1
- package/lib/typescript/src/components/ApplePayButtonNative.d.ts +0 -4
- package/lib/typescript/src/components/ApplePayButtonNative.d.ts.map +0 -1
- package/lib/typescript/src/components/GooglePayButtonNative.d.ts +0 -4
- package/lib/typescript/src/components/GooglePayButtonNative.d.ts.map +0 -1
- package/src/NativeStripeSdk.tsx +0 -159
- package/src/components/ApplePayButtonNative.tsx +0 -5
- package/src/components/GooglePayButtonNative.tsx +0 -7
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
2
|
+
import type {
|
|
3
|
+
DirectEventHandler,
|
|
4
|
+
Int32,
|
|
5
|
+
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
6
|
+
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
|
|
7
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
8
|
+
import type {
|
|
9
|
+
Details,
|
|
10
|
+
Placeholders,
|
|
11
|
+
Styles,
|
|
12
|
+
} from '../types/components/CardFieldInput';
|
|
13
|
+
import type { UnsafeMixed } from './utils';
|
|
14
|
+
|
|
15
|
+
type CardChangeEvent = Readonly<{
|
|
16
|
+
card: UnsafeMixed<Details>;
|
|
17
|
+
}>;
|
|
18
|
+
|
|
19
|
+
export type FocusChangeEvent = Readonly<{
|
|
20
|
+
focusedField: string;
|
|
21
|
+
}>;
|
|
22
|
+
|
|
23
|
+
export interface NativeProps extends ViewProps {
|
|
24
|
+
autofocus: boolean;
|
|
25
|
+
cardStyle: UnsafeMixed<Styles>;
|
|
26
|
+
countryCode?: string;
|
|
27
|
+
dangerouslyGetFullCardDetails: boolean;
|
|
28
|
+
disabled: boolean;
|
|
29
|
+
onBehalfOf?: string;
|
|
30
|
+
onCardChange?: DirectEventHandler<CardChangeEvent>;
|
|
31
|
+
onFocusChange?: DirectEventHandler<FocusChangeEvent>;
|
|
32
|
+
placeholders: UnsafeMixed<Placeholders>;
|
|
33
|
+
postalCodeEnabled: boolean;
|
|
34
|
+
preferredNetworks?: ReadonlyArray<Int32>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
type ComponentType = HostComponent<NativeProps>;
|
|
38
|
+
|
|
39
|
+
interface NativeCommands {
|
|
40
|
+
blur: (viewRef: React.ElementRef<ComponentType>) => void;
|
|
41
|
+
focus: (viewRef: React.ElementRef<ComponentType>) => void;
|
|
42
|
+
clear: (viewRef: React.ElementRef<ComponentType>) => void;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
|
|
46
|
+
supportedCommands: ['blur', 'focus', 'clear'],
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export default codegenNativeComponent<NativeProps>(
|
|
50
|
+
'CardField'
|
|
51
|
+
) as ComponentType;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
2
|
+
import type {
|
|
3
|
+
DirectEventHandler,
|
|
4
|
+
Int32,
|
|
5
|
+
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
6
|
+
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
|
|
7
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
8
|
+
import type { CardFormView } from '../types';
|
|
9
|
+
import type { UnsafeMixed } from './utils';
|
|
10
|
+
|
|
11
|
+
interface FormCompleteEvent {
|
|
12
|
+
card: UnsafeMixed<CardFormView.Details>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface FocusChangeEvent {
|
|
16
|
+
focusedField: 'CardNumber' | 'Cvc' | 'ExpiryDate' | 'PostalCode' | null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface NativeProps extends ViewProps {
|
|
20
|
+
autofocus: boolean;
|
|
21
|
+
cardStyle: UnsafeMixed<CardFormView.Styles>;
|
|
22
|
+
dangerouslyGetFullCardDetails: boolean;
|
|
23
|
+
defaultValues: UnsafeMixed<CardFormView.DefaultValues>;
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
onFocusChange?: DirectEventHandler<FocusChangeEvent>;
|
|
26
|
+
onFormComplete?: DirectEventHandler<FormCompleteEvent>;
|
|
27
|
+
placeholders: UnsafeMixed<CardFormView.Placeholders>;
|
|
28
|
+
postalCodeEnabled: boolean;
|
|
29
|
+
preferredNetworks?: Int32[];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
type ComponentType = HostComponent<NativeProps>;
|
|
33
|
+
|
|
34
|
+
interface NativeCommands {
|
|
35
|
+
blur: (viewRef: React.ElementRef<ComponentType>) => void;
|
|
36
|
+
focus: (viewRef: React.ElementRef<ComponentType>) => void;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
|
|
40
|
+
supportedCommands: ['blur', 'focus'],
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export default codegenNativeComponent<NativeProps>('CardForm') as ComponentType;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
2
|
+
import type {
|
|
3
|
+
DirectEventHandler,
|
|
4
|
+
Double,
|
|
5
|
+
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
6
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
7
|
+
import { EmbeddedPaymentElementConfiguration } from '../types/EmbeddedPaymentElement';
|
|
8
|
+
import { IntentConfiguration } from '../types/PaymentSheet';
|
|
9
|
+
import type { UnsafeMixed } from './utils';
|
|
10
|
+
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
|
|
11
|
+
|
|
12
|
+
type OnEmbeddedPaymentElementDidUpdateHeightEvent = Readonly<{
|
|
13
|
+
height: Double;
|
|
14
|
+
}>;
|
|
15
|
+
|
|
16
|
+
export interface NativeProps extends ViewProps {
|
|
17
|
+
configuration: UnsafeMixed<EmbeddedPaymentElementConfiguration>;
|
|
18
|
+
intentConfiguration: UnsafeMixed<IntentConfiguration>;
|
|
19
|
+
onEmbeddedPaymentElementDidUpdateHeight?: DirectEventHandler<OnEmbeddedPaymentElementDidUpdateHeightEvent>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface NativeCommands {
|
|
23
|
+
confirm: (viewRef: React.ElementRef<HostComponent<NativeProps>>) => void;
|
|
24
|
+
clearPaymentOption: (
|
|
25
|
+
viewRef: React.ElementRef<HostComponent<NativeProps>>
|
|
26
|
+
) => void;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
|
|
30
|
+
supportedCommands: ['confirm', 'clearPaymentOption'],
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
type ComponentType = HostComponent<NativeProps>;
|
|
34
|
+
|
|
35
|
+
export default codegenNativeComponent<NativeProps>(
|
|
36
|
+
'EmbeddedPaymentElementView'
|
|
37
|
+
) as ComponentType;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
2
|
+
import type {
|
|
3
|
+
WithDefault,
|
|
4
|
+
Int32,
|
|
5
|
+
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
6
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
7
|
+
|
|
8
|
+
export interface NativeProps extends ViewProps {
|
|
9
|
+
// Make sure to use a different default value here to make
|
|
10
|
+
// sure onAfterUpdateTransaction gets called on Android.
|
|
11
|
+
type?: WithDefault<Int32, -1>;
|
|
12
|
+
appearance: Int32;
|
|
13
|
+
borderRadius?: Int32;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type ComponentType = HostComponent<NativeProps>;
|
|
17
|
+
|
|
18
|
+
export default codegenNativeComponent<NativeProps>(
|
|
19
|
+
'GooglePayButton'
|
|
20
|
+
) as ComponentType;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
2
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
3
|
+
|
|
4
|
+
export interface NativeProps extends ViewProps {
|
|
5
|
+
keyboardShouldPersistTaps: boolean;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
type ComponentType = HostComponent<NativeProps>;
|
|
9
|
+
|
|
10
|
+
export default codegenNativeComponent<NativeProps>(
|
|
11
|
+
'StripeContainer'
|
|
12
|
+
) as ComponentType;
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { TurboModuleRegistry } from 'react-native';
|
|
2
|
+
import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport';
|
|
3
|
+
import type {
|
|
4
|
+
EventEmitter,
|
|
5
|
+
Int32,
|
|
6
|
+
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
7
|
+
import type {
|
|
8
|
+
CanAddCardToWalletParams,
|
|
9
|
+
CanAddCardToWalletResult,
|
|
10
|
+
ConfirmPaymentResult,
|
|
11
|
+
ConfirmPaymentSheetPaymentResult,
|
|
12
|
+
ConfirmSetupIntentResult,
|
|
13
|
+
CreatePaymentMethodResult,
|
|
14
|
+
CreateTokenForCVCUpdateResult,
|
|
15
|
+
CreateTokenResult,
|
|
16
|
+
CustomerAdapter,
|
|
17
|
+
CustomerSheetError,
|
|
18
|
+
CustomerSheetInitParams,
|
|
19
|
+
CustomerSheetPresentParams,
|
|
20
|
+
CustomerSheetResult,
|
|
21
|
+
FinancialConnections,
|
|
22
|
+
HandleNextActionForSetupResult,
|
|
23
|
+
HandleNextActionResult,
|
|
24
|
+
InitialiseParams,
|
|
25
|
+
InitPaymentSheetResult,
|
|
26
|
+
IsCardInWalletResult,
|
|
27
|
+
OpenApplePaySetupResult,
|
|
28
|
+
PaymentIntent,
|
|
29
|
+
PaymentMethod,
|
|
30
|
+
PaymentSheet,
|
|
31
|
+
PlatformPay,
|
|
32
|
+
PresentPaymentSheetResult,
|
|
33
|
+
RetrievePaymentIntentResult,
|
|
34
|
+
RetrieveSetupIntentResult,
|
|
35
|
+
SetupIntent,
|
|
36
|
+
StripeError,
|
|
37
|
+
Token,
|
|
38
|
+
VerifyMicrodepositsParams,
|
|
39
|
+
} from '../types';
|
|
40
|
+
import type {
|
|
41
|
+
EmbeddedPaymentElementConfiguration,
|
|
42
|
+
EmbeddedPaymentElementResult,
|
|
43
|
+
} from '../types/EmbeddedPaymentElement';
|
|
44
|
+
import type { FinancialConnectionsEvent } from '../types/FinancialConnections';
|
|
45
|
+
import type { IntentConfiguration } from '../types/PaymentSheet';
|
|
46
|
+
import type { UnsafeObject } from './utils';
|
|
47
|
+
|
|
48
|
+
type CustomerSheetInitResult = UnsafeObject<{
|
|
49
|
+
error?: StripeError<CustomerSheetError>;
|
|
50
|
+
}>;
|
|
51
|
+
|
|
52
|
+
export interface Spec extends TurboModule {
|
|
53
|
+
initialise(params: UnsafeObject<InitialiseParams>): Promise<void>;
|
|
54
|
+
createPaymentMethod(
|
|
55
|
+
params: UnsafeObject<PaymentMethod.CreateParams>,
|
|
56
|
+
options: UnsafeObject<PaymentMethod.CreateOptions>
|
|
57
|
+
): Promise<CreatePaymentMethodResult>;
|
|
58
|
+
handleNextAction(
|
|
59
|
+
paymentIntentClientSecret: string,
|
|
60
|
+
returnURL?: string | null
|
|
61
|
+
): Promise<HandleNextActionResult>;
|
|
62
|
+
handleNextActionForSetup(
|
|
63
|
+
setupIntentClientSecret: string,
|
|
64
|
+
returnURL?: string | null
|
|
65
|
+
): Promise<HandleNextActionForSetupResult>;
|
|
66
|
+
confirmPayment(
|
|
67
|
+
paymentIntentClientSecret: string,
|
|
68
|
+
params?: UnsafeObject<PaymentIntent.ConfirmParams>,
|
|
69
|
+
options?: UnsafeObject<PaymentIntent.ConfirmOptions>
|
|
70
|
+
): Promise<ConfirmPaymentResult>;
|
|
71
|
+
confirmSetupIntent(
|
|
72
|
+
paymentIntentClientSecret: string,
|
|
73
|
+
params: UnsafeObject<SetupIntent.ConfirmParams>,
|
|
74
|
+
options: UnsafeObject<SetupIntent.ConfirmOptions>
|
|
75
|
+
): Promise<ConfirmSetupIntentResult>;
|
|
76
|
+
retrievePaymentIntent(
|
|
77
|
+
clientSecret: string
|
|
78
|
+
): Promise<RetrievePaymentIntentResult>;
|
|
79
|
+
retrieveSetupIntent(clientSecret: string): Promise<RetrieveSetupIntentResult>;
|
|
80
|
+
initPaymentSheet(
|
|
81
|
+
params: UnsafeObject<PaymentSheet.SetupParams>
|
|
82
|
+
): Promise<InitPaymentSheetResult>;
|
|
83
|
+
intentCreationCallback(
|
|
84
|
+
result: UnsafeObject<PaymentSheet.IntentCreationCallbackParams>
|
|
85
|
+
): Promise<void>;
|
|
86
|
+
presentPaymentSheet(
|
|
87
|
+
options: UnsafeObject<PaymentSheet.PresentOptions>
|
|
88
|
+
): Promise<PresentPaymentSheetResult>;
|
|
89
|
+
confirmPaymentSheetPayment(): Promise<ConfirmPaymentSheetPaymentResult>;
|
|
90
|
+
createTokenForCVCUpdate(cvc: string): Promise<CreateTokenForCVCUpdateResult>;
|
|
91
|
+
handleURLCallback(url: string): Promise<boolean>;
|
|
92
|
+
createToken(
|
|
93
|
+
params: UnsafeObject<Token.CreateParams>
|
|
94
|
+
): Promise<CreateTokenResult>;
|
|
95
|
+
openApplePaySetup(): Promise<OpenApplePaySetupResult>;
|
|
96
|
+
verifyMicrodeposits(
|
|
97
|
+
isPaymentIntent: boolean,
|
|
98
|
+
clientSecret: string,
|
|
99
|
+
params: UnsafeObject<VerifyMicrodepositsParams>
|
|
100
|
+
): Promise<ConfirmSetupIntentResult | ConfirmPaymentResult>;
|
|
101
|
+
collectBankAccount(
|
|
102
|
+
isPaymentIntent: boolean,
|
|
103
|
+
clientSecret: string,
|
|
104
|
+
params: UnsafeObject<
|
|
105
|
+
Omit<PaymentMethod.CollectBankAccountParams, 'onEvent'>
|
|
106
|
+
>
|
|
107
|
+
): Promise<ConfirmSetupIntentResult | ConfirmPaymentResult>;
|
|
108
|
+
getConstants(): { API_VERSIONS: { CORE: string; ISSUING: string } };
|
|
109
|
+
canAddCardToWallet(
|
|
110
|
+
params: UnsafeObject<CanAddCardToWalletParams>
|
|
111
|
+
): Promise<CanAddCardToWalletResult>;
|
|
112
|
+
isCardInWallet(
|
|
113
|
+
params: UnsafeObject<{ cardLastFour: string }>
|
|
114
|
+
): Promise<IsCardInWalletResult>;
|
|
115
|
+
collectBankAccountToken(
|
|
116
|
+
clientSecret: string,
|
|
117
|
+
params: UnsafeObject<PaymentMethod.CollectBankAccountTokenParams>
|
|
118
|
+
): Promise<FinancialConnections.TokenResult>;
|
|
119
|
+
collectFinancialConnectionsAccounts(
|
|
120
|
+
clientSecret: string,
|
|
121
|
+
params: UnsafeObject<FinancialConnections.CollectFinancialConnectionsAccountsParams>
|
|
122
|
+
): Promise<FinancialConnections.SessionResult>;
|
|
123
|
+
resetPaymentSheetCustomer(): Promise<null>;
|
|
124
|
+
isPlatformPaySupported(
|
|
125
|
+
params: UnsafeObject<{ googlePay?: PlatformPay.IsGooglePaySupportedParams }>
|
|
126
|
+
): Promise<boolean>;
|
|
127
|
+
createPlatformPayPaymentMethod(
|
|
128
|
+
params: UnsafeObject<PlatformPay.PaymentMethodParams>,
|
|
129
|
+
usesDeprecatedTokenFlow: boolean
|
|
130
|
+
): Promise<PlatformPay.PaymentMethodResult | PlatformPay.TokenResult>;
|
|
131
|
+
dismissPlatformPay(): Promise<boolean>;
|
|
132
|
+
updatePlatformPaySheet(
|
|
133
|
+
summaryItems: ReadonlyArray<UnsafeObject<PlatformPay.CartSummaryItem>>,
|
|
134
|
+
shippingMethods: ReadonlyArray<UnsafeObject<PlatformPay.ShippingMethod>>,
|
|
135
|
+
errors: ReadonlyArray<PlatformPay.ApplePaySheetError>
|
|
136
|
+
): Promise<void>;
|
|
137
|
+
confirmPlatformPay(
|
|
138
|
+
clientSecret: string,
|
|
139
|
+
params: UnsafeObject<PlatformPay.ConfirmParams>,
|
|
140
|
+
isPaymentIntent: boolean
|
|
141
|
+
): Promise<
|
|
142
|
+
PlatformPay.ConfirmPaymentResult | PlatformPay.ConfirmSetupIntentResult
|
|
143
|
+
>;
|
|
144
|
+
configureOrderTracking(
|
|
145
|
+
orderTypeIdentifier: string,
|
|
146
|
+
orderIdentifier: string,
|
|
147
|
+
webServiceUrl: string,
|
|
148
|
+
authenticationToken: string
|
|
149
|
+
): Promise<void>;
|
|
150
|
+
initCustomerSheet(
|
|
151
|
+
params: UnsafeObject<CustomerSheetInitParams>,
|
|
152
|
+
customerAdapterOverrides: UnsafeObject<{
|
|
153
|
+
[Property in keyof CustomerAdapter]: boolean;
|
|
154
|
+
}>
|
|
155
|
+
): Promise<CustomerSheetInitResult>;
|
|
156
|
+
presentCustomerSheet(
|
|
157
|
+
params: UnsafeObject<CustomerSheetPresentParams>
|
|
158
|
+
): Promise<CustomerSheetResult>;
|
|
159
|
+
retrieveCustomerSheetPaymentOptionSelection(): Promise<CustomerSheetResult>;
|
|
160
|
+
customerAdapterFetchPaymentMethodsCallback(
|
|
161
|
+
paymentMethods: ReadonlyArray<Object>
|
|
162
|
+
): Promise<void>;
|
|
163
|
+
customerAdapterAttachPaymentMethodCallback(
|
|
164
|
+
paymentMethod: Object
|
|
165
|
+
): Promise<void>;
|
|
166
|
+
customerAdapterDetachPaymentMethodCallback(
|
|
167
|
+
paymentMethod: Object
|
|
168
|
+
): Promise<void>;
|
|
169
|
+
customerAdapterSetSelectedPaymentOptionCallback(): Promise<void>;
|
|
170
|
+
customerAdapterFetchSelectedPaymentOptionCallback(
|
|
171
|
+
paymentOption: string | null
|
|
172
|
+
): Promise<void>;
|
|
173
|
+
customerAdapterSetupIntentClientSecretForCustomerAttachCallback(
|
|
174
|
+
clientSecret: string
|
|
175
|
+
): Promise<void>;
|
|
176
|
+
createEmbeddedPaymentElement(
|
|
177
|
+
intentConfig: UnsafeObject<IntentConfiguration>,
|
|
178
|
+
configuration: UnsafeObject<EmbeddedPaymentElementConfiguration>
|
|
179
|
+
): Promise<void>;
|
|
180
|
+
confirmEmbeddedPaymentElement(
|
|
181
|
+
viewTag: Int32
|
|
182
|
+
): Promise<EmbeddedPaymentElementResult>;
|
|
183
|
+
updateEmbeddedPaymentElement(
|
|
184
|
+
intentConfig: UnsafeObject<IntentConfiguration>
|
|
185
|
+
): Promise<void>;
|
|
186
|
+
clearEmbeddedPaymentOption(viewTag: Int32): Promise<void>;
|
|
187
|
+
|
|
188
|
+
// Events
|
|
189
|
+
onConfirmHandlerCallback: EventEmitter<{
|
|
190
|
+
paymentMethod: UnsafeObject<PaymentMethod.Result>;
|
|
191
|
+
shouldSavePaymentMethod: boolean;
|
|
192
|
+
}>;
|
|
193
|
+
onFinancialConnectionsEvent: EventEmitter<
|
|
194
|
+
UnsafeObject<FinancialConnectionsEvent>
|
|
195
|
+
>;
|
|
196
|
+
onOrderTrackingCallback: EventEmitter<void>;
|
|
197
|
+
onCustomerAdapterFetchPaymentMethodsCallback: EventEmitter<void>;
|
|
198
|
+
onCustomerAdapterAttachPaymentMethodCallback: EventEmitter<{
|
|
199
|
+
paymentMethodId: string;
|
|
200
|
+
}>;
|
|
201
|
+
onCustomerAdapterDetachPaymentMethodCallback: EventEmitter<{
|
|
202
|
+
paymentMethodId: string;
|
|
203
|
+
}>;
|
|
204
|
+
onCustomerAdapterSetSelectedPaymentOptionCallback: EventEmitter<{
|
|
205
|
+
paymentOption: string;
|
|
206
|
+
}>;
|
|
207
|
+
onCustomerAdapterFetchSelectedPaymentOptionCallback: EventEmitter<void>;
|
|
208
|
+
onCustomerAdapterSetupIntentClientSecretForCustomerAttachCallback: EventEmitter<void>;
|
|
209
|
+
embeddedPaymentElementDidUpdateHeight: EventEmitter<UnsafeObject<any>>;
|
|
210
|
+
embeddedPaymentElementWillPresent: EventEmitter<void>;
|
|
211
|
+
embeddedPaymentElementDidUpdatePaymentOption: EventEmitter<UnsafeObject<any>>;
|
|
212
|
+
embeddedPaymentElementFormSheetConfirmComplete: EventEmitter<
|
|
213
|
+
UnsafeObject<any>
|
|
214
|
+
>;
|
|
215
|
+
embeddedPaymentElementRowSelectionImmediateAction: EventEmitter<void>;
|
|
216
|
+
embeddedPaymentElementLoadingFailed: EventEmitter<UnsafeObject<any>>;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export default TurboModuleRegistry.getEnforcing<Spec>('StripeSdk');
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ImageSourcePropType } from 'react-native';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Allows using types that codegen doesn't support, which will be generated
|
|
5
|
+
* as mixed, but keeping the TS type for type-checking.
|
|
6
|
+
*
|
|
7
|
+
* Note that for some reason this only works for native components, not for turbo modules.
|
|
8
|
+
*/
|
|
9
|
+
export type UnsafeMixed<T> = T;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Allows using types that codegen doesn't support, which will be generated
|
|
13
|
+
* as object, but keeping the TS type for type-checking.
|
|
14
|
+
*
|
|
15
|
+
* Note that for some reason this only works for turbo modules, not for native components.
|
|
16
|
+
*/
|
|
17
|
+
export type UnsafeObject<T> = T;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Codegen checks for a type named image source, but rn typescript exports it as ImageSourcePropType.
|
|
21
|
+
*/
|
|
22
|
+
export type ImageSource = ImageSourcePropType;
|
|
@@ -47,10 +47,6 @@ export type CustomerSheetInitParams = {
|
|
|
47
47
|
* If false, the customer can't delete if they only have one saved payment method remaining.
|
|
48
48
|
*/
|
|
49
49
|
allowsRemovalOfLastSavedPaymentMethod?: boolean;
|
|
50
|
-
/** (Private Preview) This parameter is expected to be removed once we GA this feature
|
|
51
|
-
* When using customerSessions, allow users to update their saved cards
|
|
52
|
-
*/
|
|
53
|
-
updatePaymentMethodEnabled?: boolean;
|
|
54
50
|
/**
|
|
55
51
|
* By default, CustomerSheet will accept all supported cards by Stripe.
|
|
56
52
|
* You can specify card brands CustomerSheet should block or allow payment for by providing an array of those card brands.
|
|
@@ -127,7 +123,7 @@ export interface CustomerAdapter {
|
|
|
127
123
|
/** Creates a SetupIntent configured to attach a new payment method to a customer,
|
|
128
124
|
* then returns the client secret for the created SetupIntent.
|
|
129
125
|
*/
|
|
130
|
-
setupIntentClientSecretForCustomerAttach?(): Promise<
|
|
126
|
+
setupIntentClientSecretForCustomerAttach?(): Promise<string>;
|
|
131
127
|
}
|
|
132
128
|
|
|
133
129
|
export type CustomerPaymentOption =
|