@stripe/stripe-react-native 0.41.0 → 0.43.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/.husky/pre-commit +0 -3
- package/CHANGELOG.md +27 -0
- package/README.md +3 -0
- 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 +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/build.gradle +7 -1
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/android/gradle.properties +4 -1
- package/android/gradlew +249 -0
- package/android/gradlew.bat +92 -0
- package/android/spotless.gradle +19 -0
- package/android/src/main/java/com/reactnativestripesdk/AuBECSDebitFormView.kt +30 -34
- package/android/src/main/java/com/reactnativestripesdk/AuBECSDebitFormViewManager.kt +20 -10
- package/android/src/main/java/com/reactnativestripesdk/CardChangedEvent.kt +12 -13
- package/android/src/main/java/com/reactnativestripesdk/CardFieldView.kt +242 -105
- package/android/src/main/java/com/reactnativestripesdk/CardFieldViewManager.kt +58 -20
- package/android/src/main/java/com/reactnativestripesdk/CardFocusEvent.kt +8 -11
- package/android/src/main/java/com/reactnativestripesdk/CardFormCompleteEvent.kt +10 -12
- package/android/src/main/java/com/reactnativestripesdk/CardFormView.kt +135 -87
- package/android/src/main/java/com/reactnativestripesdk/CardFormViewManager.kt +57 -22
- package/android/src/main/java/com/reactnativestripesdk/CollectBankAccountLauncherFragment.kt +53 -23
- package/android/src/main/java/com/reactnativestripesdk/FinancialConnectionsSheetFragment.kt +125 -83
- package/android/src/main/java/com/reactnativestripesdk/FormCompleteEvent.kt +9 -11
- package/android/src/main/java/com/reactnativestripesdk/GooglePayButtonManager.kt +16 -9
- package/android/src/main/java/com/reactnativestripesdk/GooglePayButtonView.kt +36 -28
- package/android/src/main/java/com/reactnativestripesdk/GooglePayLauncherFragment.kt +67 -43
- package/android/src/main/java/com/reactnativestripesdk/GooglePayPaymentMethodLauncherFragment.kt +21 -16
- package/android/src/main/java/com/reactnativestripesdk/GooglePayRequestHelper.kt +101 -56
- package/android/src/main/java/com/reactnativestripesdk/PaymentLauncherFragment.kt +244 -166
- package/android/src/main/java/com/reactnativestripesdk/PaymentMethodCreateParamsFactory.kt +183 -123
- package/android/src/main/java/com/reactnativestripesdk/PaymentSheetAppearance.kt +181 -57
- package/android/src/main/java/com/reactnativestripesdk/PaymentSheetFragment.kt +402 -258
- package/android/src/main/java/com/reactnativestripesdk/StripeContainerManager.kt +11 -4
- package/android/src/main/java/com/reactnativestripesdk/StripeContainerView.kt +5 -1
- package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +654 -299
- package/android/src/main/java/com/reactnativestripesdk/StripeSdkPackage.kt +12 -14
- package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressLauncherFragment.kt +42 -37
- package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressSheetEvent.kt +12 -11
- package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressSheetView.kt +29 -29
- package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressSheetViewManager.kt +50 -18
- package/android/src/main/java/com/reactnativestripesdk/customersheet/CustomerSheetFragment.kt +227 -147
- package/android/src/main/java/com/reactnativestripesdk/customersheet/ReactNativeCustomerAdapter.kt +15 -18
- package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/AddToWalletButtonManager.kt +33 -15
- package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/AddToWalletButtonView.kt +63 -37
- package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/AddToWalletCompleteEvent.kt +9 -13
- package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/EphemeralKeyProvider.kt +15 -17
- package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/PushProvisioningProxy.kt +76 -60
- package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/TapAndPayProxy.kt +71 -47
- package/android/src/main/java/com/reactnativestripesdk/utils/Errors.kt +117 -51
- package/android/src/main/java/com/reactnativestripesdk/utils/Extensions.kt +4 -3
- package/android/src/main/java/com/reactnativestripesdk/utils/KeepJsAwakeTask.kt +39 -0
- package/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt +337 -250
- package/android/src/main/java/com/reactnativestripesdk/utils/PostalCodeUtilities.kt +2 -11
- package/ios/CustomerSheet/CustomerSheetUtils.swift +3 -1
- package/ios/FinancialConnections.swift +18 -2
- package/ios/Mappers.swift +23 -0
- package/ios/PaymentMethodFactory.swift +31 -29
- package/ios/StripeSdk+CustomerSheet.swift +2 -1
- package/ios/StripeSdk+PaymentSheet.swift +42 -0
- package/ios/StripeSdk.m +2 -0
- package/ios/StripeSdk.swift +116 -24
- package/lib/commonjs/NativeStripeSdk.js +1 -1
- package/lib/commonjs/NativeStripeSdk.js.map +1 -1
- 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/ApplePayButtonNative.js +1 -1
- package/lib/commonjs/components/ApplePayButtonNative.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/GooglePayButtonNative.js +1 -1
- package/lib/commonjs/components/GooglePayButtonNative.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/functions.js +1 -1
- package/lib/commonjs/functions.js.map +1 -1
- package/lib/commonjs/helpers.js +1 -1
- package/lib/commonjs/helpers.js.map +1 -1
- package/lib/commonjs/hooks/useConfirmPayment.js.map +1 -1
- package/lib/commonjs/hooks/useConfirmSetupIntent.js.map +1 -1
- package/lib/commonjs/hooks/useFinancialConnectionsSheet.js +1 -1
- package/lib/commonjs/hooks/useFinancialConnectionsSheet.js.map +1 -1
- package/lib/commonjs/hooks/usePaymentSheet.js.map +1 -1
- package/lib/commonjs/hooks/usePlatformPay.js.map +1 -1
- package/lib/commonjs/hooks/useStripe.js +1 -1
- package/lib/commonjs/hooks/useStripe.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/plugin/withStripe.js +1 -1
- package/lib/commonjs/plugin/withStripe.js.map +1 -1
- package/lib/commonjs/types/ApplePay.js.map +1 -1
- package/lib/commonjs/types/Common.js +1 -1
- package/lib/commonjs/types/Common.js.map +1 -1
- package/lib/commonjs/types/CustomerSheet.js.map +1 -1
- package/lib/commonjs/types/Errors.js +1 -1
- package/lib/commonjs/types/Errors.js.map +1 -1
- package/lib/commonjs/types/FinancialConnections.js +1 -1
- package/lib/commonjs/types/FinancialConnections.js.map +1 -1
- package/lib/commonjs/types/NextAction.js.map +1 -1
- package/lib/commonjs/types/PaymentIntent.js +1 -1
- package/lib/commonjs/types/PaymentIntent.js.map +1 -1
- package/lib/commonjs/types/PaymentMethod.js.map +1 -1
- package/lib/commonjs/types/PaymentSheet.js +1 -1
- package/lib/commonjs/types/PaymentSheet.js.map +1 -1
- package/lib/commonjs/types/PlatformPay.js +1 -1
- package/lib/commonjs/types/PlatformPay.js.map +1 -1
- package/lib/commonjs/types/PushProvisioning.js +1 -1
- package/lib/commonjs/types/PushProvisioning.js.map +1 -1
- package/lib/commonjs/types/SetupIntent.js +1 -1
- package/lib/commonjs/types/SetupIntent.js.map +1 -1
- package/lib/commonjs/types/ThreeDSecure.js +1 -1
- package/lib/commonjs/types/ThreeDSecure.js.map +1 -1
- package/lib/commonjs/types/Token.js.map +1 -1
- package/lib/commonjs/types/components/ApplePayButtonComponent.js.map +1 -1
- package/lib/commonjs/types/components/AuBECSDebitFormComponent.js.map +1 -1
- package/lib/commonjs/types/components/CardFieldInput.js +1 -1
- package/lib/commonjs/types/components/CardFieldInput.js.map +1 -1
- package/lib/commonjs/types/components/CardFormView.js.map +1 -1
- package/lib/commonjs/types/components/GooglePayButtonComponent.js.map +1 -1
- package/lib/commonjs/types/index.js +1 -1
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/module/NativeStripeSdk.js +1 -1
- package/lib/module/NativeStripeSdk.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/ApplePayButtonNative.js +1 -1
- package/lib/module/components/ApplePayButtonNative.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/GooglePayButtonNative.js +1 -1
- package/lib/module/components/GooglePayButtonNative.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/functions.js +1 -1
- package/lib/module/functions.js.map +1 -1
- package/lib/module/helpers.js +1 -1
- package/lib/module/helpers.js.map +1 -1
- package/lib/module/hooks/useConfirmPayment.js.map +1 -1
- package/lib/module/hooks/useConfirmSetupIntent.js.map +1 -1
- package/lib/module/hooks/useFinancialConnectionsSheet.js +1 -1
- package/lib/module/hooks/useFinancialConnectionsSheet.js.map +1 -1
- package/lib/module/hooks/usePaymentSheet.js.map +1 -1
- package/lib/module/hooks/usePlatformPay.js.map +1 -1
- package/lib/module/hooks/useStripe.js +1 -1
- package/lib/module/hooks/useStripe.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/module/plugin/withStripe.js +1 -1
- package/lib/module/plugin/withStripe.js.map +1 -1
- package/lib/module/types/ApplePay.js.map +1 -1
- package/lib/module/types/Common.js +1 -1
- package/lib/module/types/Common.js.map +1 -1
- package/lib/module/types/CustomerSheet.js.map +1 -1
- package/lib/module/types/Errors.js +1 -1
- package/lib/module/types/Errors.js.map +1 -1
- package/lib/module/types/FinancialConnections.js +1 -1
- package/lib/module/types/FinancialConnections.js.map +1 -1
- package/lib/module/types/NextAction.js.map +1 -1
- package/lib/module/types/PaymentIntent.js +1 -1
- package/lib/module/types/PaymentIntent.js.map +1 -1
- package/lib/module/types/PaymentMethod.js.map +1 -1
- package/lib/module/types/PaymentSheet.js +1 -1
- package/lib/module/types/PaymentSheet.js.map +1 -1
- package/lib/module/types/PlatformPay.js +1 -1
- package/lib/module/types/PlatformPay.js.map +1 -1
- package/lib/module/types/PushProvisioning.js +1 -1
- package/lib/module/types/PushProvisioning.js.map +1 -1
- package/lib/module/types/SetupIntent.js +1 -1
- package/lib/module/types/SetupIntent.js.map +1 -1
- package/lib/module/types/ThreeDSecure.js +1 -1
- package/lib/module/types/ThreeDSecure.js.map +1 -1
- package/lib/module/types/Token.js.map +1 -1
- package/lib/module/types/components/ApplePayButtonComponent.js.map +1 -1
- package/lib/module/types/components/AuBECSDebitFormComponent.js.map +1 -1
- package/lib/module/types/components/CardFieldInput.js +1 -1
- package/lib/module/types/components/CardFieldInput.js.map +1 -1
- package/lib/module/types/components/CardFormView.js.map +1 -1
- package/lib/module/types/components/GooglePayButtonComponent.js.map +1 -1
- package/lib/module/types/index.js +1 -1
- package/lib/module/types/index.js.map +1 -1
- package/lib/typescript/src/NativeStripeSdk.d.ts +5 -4
- package/lib/typescript/src/NativeStripeSdk.d.ts.map +1 -0
- package/lib/typescript/src/components/AddToWalletButton.d.ts +3 -1
- package/lib/typescript/src/components/AddToWalletButton.d.ts.map +1 -0
- package/lib/typescript/src/components/AddressSheet.d.ts +4 -2
- package/lib/typescript/src/components/AddressSheet.d.ts.map +1 -0
- package/lib/typescript/src/components/ApplePayButtonNative.d.ts +1 -0
- package/lib/typescript/src/components/ApplePayButtonNative.d.ts.map +1 -0
- package/lib/typescript/src/components/AuBECSDebitForm.d.ts +3 -1
- package/lib/typescript/src/components/AuBECSDebitForm.d.ts.map +1 -0
- package/lib/typescript/src/components/CardField.d.ts +1 -0
- package/lib/typescript/src/components/CardField.d.ts.map +1 -0
- package/lib/typescript/src/components/CardForm.d.ts +1 -0
- package/lib/typescript/src/components/CardForm.d.ts.map +1 -0
- package/lib/typescript/src/components/CustomerSheet.d.ts +2 -1
- package/lib/typescript/src/components/CustomerSheet.d.ts.map +1 -0
- package/lib/typescript/src/components/GooglePayButtonNative.d.ts +1 -0
- package/lib/typescript/src/components/GooglePayButtonNative.d.ts.map +1 -0
- package/lib/typescript/src/components/PlatformPayButton.d.ts +3 -1
- package/lib/typescript/src/components/PlatformPayButton.d.ts.map +1 -0
- package/lib/typescript/src/components/StripeContainer.d.ts +2 -1
- package/lib/typescript/src/components/StripeContainer.d.ts.map +1 -0
- package/lib/typescript/src/components/StripeProvider.d.ts +3 -2
- package/lib/typescript/src/components/StripeProvider.d.ts.map +1 -0
- package/lib/typescript/src/functions.d.ts +12 -7
- package/lib/typescript/src/functions.d.ts.map +1 -0
- package/lib/typescript/src/helpers.d.ts +1 -0
- package/lib/typescript/src/helpers.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useConfirmPayment.d.ts +2 -1
- package/lib/typescript/src/hooks/useConfirmPayment.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useConfirmSetupIntent.d.ts +1 -0
- package/lib/typescript/src/hooks/useConfirmSetupIntent.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useFinancialConnectionsSheet.d.ts +5 -2
- package/lib/typescript/src/hooks/useFinancialConnectionsSheet.d.ts.map +1 -0
- package/lib/typescript/src/hooks/usePaymentSheet.d.ts +2 -1
- package/lib/typescript/src/hooks/usePaymentSheet.d.ts.map +1 -0
- package/lib/typescript/src/hooks/usePlatformPay.d.ts +4 -3
- package/lib/typescript/src/hooks/usePlatformPay.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useStripe.d.ts +11 -8
- package/lib/typescript/src/hooks/useStripe.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/plugin/withStripe.d.ts +2 -1
- package/lib/typescript/src/plugin/withStripe.d.ts.map +1 -0
- package/lib/typescript/src/types/ApplePay.d.ts +6 -5
- package/lib/typescript/src/types/ApplePay.d.ts.map +1 -0
- package/lib/typescript/src/types/Common.d.ts +4 -1
- package/lib/typescript/src/types/Common.d.ts.map +1 -0
- package/lib/typescript/src/types/CustomerSheet.d.ts +12 -4
- package/lib/typescript/src/types/CustomerSheet.d.ts.map +1 -0
- package/lib/typescript/src/types/Errors.d.ts +2 -1
- package/lib/typescript/src/types/Errors.d.ts.map +1 -0
- package/lib/typescript/src/types/FinancialConnections.d.ts +82 -14
- package/lib/typescript/src/types/FinancialConnections.d.ts.map +1 -0
- package/lib/typescript/src/types/NextAction.d.ts +9 -8
- package/lib/typescript/src/types/NextAction.d.ts.map +1 -0
- package/lib/typescript/src/types/PaymentIntent.d.ts +41 -14
- package/lib/typescript/src/types/PaymentIntent.d.ts.map +1 -0
- package/lib/typescript/src/types/PaymentMethod.d.ts +27 -15
- package/lib/typescript/src/types/PaymentMethod.d.ts.map +1 -0
- package/lib/typescript/src/types/PaymentSheet.d.ts +72 -22
- package/lib/typescript/src/types/PaymentSheet.d.ts.map +1 -0
- package/lib/typescript/src/types/PlatformPay.d.ts +22 -21
- package/lib/typescript/src/types/PlatformPay.d.ts.map +1 -0
- package/lib/typescript/src/types/PushProvisioning.d.ts +5 -4
- package/lib/typescript/src/types/PushProvisioning.d.ts.map +1 -0
- package/lib/typescript/src/types/SetupIntent.d.ts +4 -3
- package/lib/typescript/src/types/SetupIntent.d.ts.map +1 -0
- package/lib/typescript/src/types/ThreeDSecure.d.ts +1 -0
- package/lib/typescript/src/types/ThreeDSecure.d.ts.map +1 -0
- package/lib/typescript/src/types/Token.d.ts +10 -9
- package/lib/typescript/src/types/Token.d.ts.map +1 -0
- package/lib/typescript/src/types/components/ApplePayButtonComponent.d.ts +3 -2
- package/lib/typescript/src/types/components/ApplePayButtonComponent.d.ts.map +1 -0
- package/lib/typescript/src/types/components/AuBECSDebitFormComponent.d.ts +1 -0
- package/lib/typescript/src/types/components/AuBECSDebitFormComponent.d.ts.map +1 -0
- package/lib/typescript/src/types/components/CardFieldInput.d.ts +8 -5
- package/lib/typescript/src/types/components/CardFieldInput.d.ts.map +1 -0
- package/lib/typescript/src/types/components/CardFormView.d.ts +9 -6
- package/lib/typescript/src/types/components/CardFormView.d.ts.map +1 -0
- package/lib/typescript/src/types/components/GooglePayButtonComponent.d.ts +1 -0
- package/lib/typescript/src/types/components/GooglePayButtonComponent.d.ts.map +1 -0
- package/lib/typescript/src/types/index.d.ts +24 -23
- package/lib/typescript/src/types/index.d.ts.map +1 -0
- package/package.json +33 -42
- package/src/NativeStripeSdk.tsx +5 -3
- package/src/components/CardField.tsx +1 -1
- package/src/components/CardForm.tsx +12 -9
- package/src/components/CustomerSheet.tsx +4 -6
- package/src/components/StripeProvider.tsx +17 -0
- package/src/functions.ts +70 -16
- package/src/hooks/useFinancialConnectionsSheet.tsx +12 -4
- package/src/hooks/useStripe.tsx +10 -4
- package/src/types/Common.ts +3 -0
- package/src/types/CustomerSheet.ts +7 -0
- package/src/types/FinancialConnections.ts +72 -0
- package/src/types/PaymentIntent.ts +30 -1
- package/src/types/PaymentMethod.ts +13 -1
- package/src/types/PaymentSheet.ts +65 -5
- package/src/types/components/CardFieldInput.ts +8 -4
- package/src/types/components/CardFormView.ts +8 -4
- package/stripe-react-native.podspec +2 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { FormDetails } from './components/AuBECSDebitFormComponent';
|
|
2
2
|
import type { CardBrand, BankAcccountHolderType, BankAcccountType } from './Token';
|
|
3
3
|
import type { FutureUsage } from './PaymentIntent';
|
|
4
|
-
import type { Address, BillingDetails } from './Common';
|
|
4
|
+
import type { Address, BillingDetails, UserInterfaceStyle } from './Common';
|
|
5
|
+
import type { FinancialConnectionsEvent } from './FinancialConnections';
|
|
5
6
|
export interface Result {
|
|
6
7
|
id: string;
|
|
7
8
|
liveMode: boolean;
|
|
@@ -18,14 +19,14 @@ export interface Result {
|
|
|
18
19
|
Upi: UpiResult;
|
|
19
20
|
USBankAccount: USBankAccountResult;
|
|
20
21
|
}
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
22
|
+
export type CreateParams = CardParams | IdealParams | OxxoParams | P24Params | AlipayParams | GiropayParams | SepaParams | EpsParams | AuBecsDebitParams | SofortParams | GrabPayParams | FPXParams | AfterpayClearpayParams | KlarnaParams | BancontactParams | USBankAccountParams | PayPalParams | AffirmParams | CashAppParams;
|
|
23
|
+
export type ConfirmParams = CreateParams;
|
|
24
|
+
export type CreateOptions = {
|
|
24
25
|
setupFutureUsage?: FutureUsage;
|
|
25
26
|
};
|
|
26
|
-
export
|
|
27
|
-
export
|
|
28
|
-
export
|
|
27
|
+
export type ConfirmOptions = CreateOptions;
|
|
28
|
+
export type ShippingDetails = BillingDetails;
|
|
29
|
+
export type CardParams = {
|
|
29
30
|
paymentMethodType: 'Card';
|
|
30
31
|
paymentMethodData?: {
|
|
31
32
|
token?: string;
|
|
@@ -100,7 +101,7 @@ export interface AfterpayClearpayParams {
|
|
|
100
101
|
billingDetails: BillingDetails;
|
|
101
102
|
};
|
|
102
103
|
}
|
|
103
|
-
export
|
|
104
|
+
export type KlarnaParams = {
|
|
104
105
|
paymentMethodType: 'Klarna';
|
|
105
106
|
paymentMethodData: {
|
|
106
107
|
billingDetails: Pick<Required<BillingDetails>, 'email'> & {
|
|
@@ -134,7 +135,7 @@ export interface AuBecsDebitParams {
|
|
|
134
135
|
formDetails: FormDetails;
|
|
135
136
|
};
|
|
136
137
|
}
|
|
137
|
-
export
|
|
138
|
+
export type AffirmParams = {
|
|
138
139
|
paymentMethodType: 'Affirm';
|
|
139
140
|
paymentMethodData?: {
|
|
140
141
|
/** Affirm requires that shipping is present for the payment to succeed because it significantly helps with loan approval rates. Shipping details can either be provided here or via the Payment Intent- https://stripe.com/docs/api/payment_intents/create#create_payment_intent-shipping. */
|
|
@@ -146,7 +147,7 @@ export declare type AffirmParams = {
|
|
|
146
147
|
* If paymentMethodData is null, it is assumed that the bank account details have already been attached
|
|
147
148
|
* via `collectBankAccountForPayment` or `collectBankAccountForSetup`.
|
|
148
149
|
*/
|
|
149
|
-
export
|
|
150
|
+
export type USBankAccountParams = {
|
|
150
151
|
paymentMethodType: 'USBankAccount';
|
|
151
152
|
paymentMethodData?: {
|
|
152
153
|
billingDetails: Pick<Required<BillingDetails>, 'name'> & BillingDetails;
|
|
@@ -158,13 +159,13 @@ export declare type USBankAccountParams = {
|
|
|
158
159
|
accountType?: BankAcccountType;
|
|
159
160
|
};
|
|
160
161
|
};
|
|
161
|
-
export
|
|
162
|
+
export type PayPalParams = {
|
|
162
163
|
paymentMethodType: 'PayPal';
|
|
163
164
|
paymentMethodData?: {
|
|
164
165
|
billingDetails?: BillingDetails;
|
|
165
166
|
};
|
|
166
167
|
};
|
|
167
|
-
export
|
|
168
|
+
export type CashAppParams = {
|
|
168
169
|
paymentMethodType: 'CashApp';
|
|
169
170
|
paymentMethodData?: {
|
|
170
171
|
billingDetails?: BillingDetails;
|
|
@@ -214,7 +215,7 @@ export interface SofortResult {
|
|
|
214
215
|
export interface UpiResult {
|
|
215
216
|
vpa?: string;
|
|
216
217
|
}
|
|
217
|
-
export
|
|
218
|
+
export type USBankAccountResult = {
|
|
218
219
|
routingNumber?: string;
|
|
219
220
|
accountHolderType?: BankAcccountHolderType;
|
|
220
221
|
accountType?: BankAcccountType;
|
|
@@ -225,8 +226,8 @@ export declare type USBankAccountResult = {
|
|
|
225
226
|
preferredNetwork?: string;
|
|
226
227
|
supportedNetworks?: string[];
|
|
227
228
|
};
|
|
228
|
-
export
|
|
229
|
-
export
|
|
229
|
+
export type Type = 'AfterpayClearpay' | 'Card' | 'Alipay' | 'GrabPay' | 'Ideal' | 'Fpx' | 'CardPresent' | 'SepaDebit' | 'AuBecsDebit' | 'BacsDebit' | 'Giropay' | 'P24' | 'Eps' | 'Bancontact' | 'Oxxo' | 'Sofort' | 'Upi' | 'USBankAccount' | 'PayPal' | 'Unknown';
|
|
230
|
+
export type CollectBankAccountParams = {
|
|
230
231
|
paymentMethodType: 'USBankAccount';
|
|
231
232
|
paymentMethodData: {
|
|
232
233
|
billingDetails: {
|
|
@@ -234,4 +235,15 @@ export declare type CollectBankAccountParams = {
|
|
|
234
235
|
email?: string;
|
|
235
236
|
};
|
|
236
237
|
};
|
|
238
|
+
/** iOS only. Style options for colors in Financial Connections. By default, the bank account collector will automatically switch between light and dark mode compatible colors based on device settings. */
|
|
239
|
+
style?: UserInterfaceStyle;
|
|
240
|
+
/** An optional event listener to receive @type {FinancialConnectionEvent} for specific events during the process of a user connecting their financial accounts. */
|
|
241
|
+
onEvent?: (event: FinancialConnectionsEvent) => void;
|
|
237
242
|
};
|
|
243
|
+
export type CollectBankAccountTokenParams = {
|
|
244
|
+
/** iOS only. Style options for colors in Financial Connections. By default, the bank account collector will automatically switch between light and dark mode compatible colors based on device settings. */
|
|
245
|
+
style?: UserInterfaceStyle;
|
|
246
|
+
/** An optional event listener to receive @type {FinancialConnectionEvent} for specific events during the process of a user connecting their financial accounts. */
|
|
247
|
+
onEvent?: (event: FinancialConnectionsEvent) => void;
|
|
248
|
+
};
|
|
249
|
+
//# sourceMappingURL=PaymentMethod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaymentMethod.d.ts","sourceRoot":"","sources":["../../../../src/types/PaymentMethod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,KAAK,EACV,SAAS,EACT,sBAAsB,EACtB,gBAAgB,EACjB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC5E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAExE,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,cAAc,CAAC;IAC/B,iBAAiB,EAAE,IAAI,CAAC;IACxB,WAAW,EAAE,iBAAiB,CAAC;IAC/B,SAAS,EAAE,eAAe,CAAC;IAC3B,IAAI,EAAE,UAAU,CAAC;I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AE,MAAM,CAAC;SAChB,CAAC;KACH,CAAC;IACF,4MAA4M;IAC5M,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,mKAAmK;IACnK,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;CACtD,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,4MAA4M;IAC5M,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,mKAAmK;IACnK,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;CACtD,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { BillingDetails, AddressDetails, CardBrand } from './Common';
|
|
1
|
+
import type { BillingDetails, AddressDetails, CardBrand, UserInterfaceStyle } from './Common';
|
|
2
2
|
import type { CartSummaryItem } from './ApplePay';
|
|
3
3
|
import type { ButtonType, RecurringPaymentRequest, AutomaticReloadPaymentRequest, MultiMerchantRequest } from './PlatformPay';
|
|
4
4
|
import type { FutureUsage } from './PaymentIntent';
|
|
5
5
|
import type { Result } from './PaymentMethod';
|
|
6
6
|
import type { StripeError } from './Errors';
|
|
7
|
-
|
|
7
|
+
export type SetupParamsBase = IntentParams & {
|
|
8
8
|
/** Your customer-facing business name. On Android, this is required and cannot be an empty string. */
|
|
9
9
|
merchantDisplayName: string;
|
|
10
10
|
/** The identifier of the Stripe Customer object. See https://stripe.com/docs/api/customers/object#customer_object-id */
|
|
@@ -17,7 +17,7 @@ declare type SetupParamsBase = IntentParams & {
|
|
|
17
17
|
/** Android only. Enable Google Pay in the Payment Sheet by passing a GooglePayParams object. */
|
|
18
18
|
googlePay?: GooglePayParams;
|
|
19
19
|
/** The color styling to use for PaymentSheet UI. Defaults to 'automatic'. */
|
|
20
|
-
style?:
|
|
20
|
+
style?: UserInterfaceStyle;
|
|
21
21
|
/** A URL that redirects back to your app that PaymentSheet can use to auto-dismiss web views used for additional authentication, e.g. 3DS2 */
|
|
22
22
|
returnURL?: string;
|
|
23
23
|
/** Configuration for how billing details are collected during checkout. */
|
|
@@ -64,8 +64,15 @@ declare type SetupParamsBase = IntentParams & {
|
|
|
64
64
|
* - Note: Defaults to `Automatic` if not set
|
|
65
65
|
*/
|
|
66
66
|
paymentMethodLayout?: PaymentMethodLayout;
|
|
67
|
+
/**
|
|
68
|
+
* By default, PaymentSheet will accept all supported cards by Stripe.
|
|
69
|
+
* You can specify card brands PaymentSheet should block or allow payment for by providing an array of those card brands.
|
|
70
|
+
* Note: This is only a client-side solution.
|
|
71
|
+
* Note: Card brand filtering is not currently supported in Link.
|
|
72
|
+
*/
|
|
73
|
+
cardBrandAcceptance?: CardBrandAcceptance;
|
|
67
74
|
};
|
|
68
|
-
export
|
|
75
|
+
export type SetupParams = (SetupParamsBase & {
|
|
69
76
|
/** A short-lived token that allows the SDK to access a Customer’s payment methods. */
|
|
70
77
|
customerEphemeralKeySecret: string;
|
|
71
78
|
customerSessionClientSecret?: never;
|
|
@@ -76,7 +83,7 @@ export declare type SetupParams = (SetupParamsBase & {
|
|
|
76
83
|
*/
|
|
77
84
|
customerSessionClientSecret: string;
|
|
78
85
|
}) | SetupParamsBase;
|
|
79
|
-
export
|
|
86
|
+
export type IntentParams = {
|
|
80
87
|
paymentIntentClientSecret: string;
|
|
81
88
|
setupIntentClientSecret?: undefined;
|
|
82
89
|
intentConfiguration?: never;
|
|
@@ -89,7 +96,7 @@ export declare type IntentParams = {
|
|
|
89
96
|
paymentIntentClientSecret?: never;
|
|
90
97
|
intentConfiguration: IntentConfiguration;
|
|
91
98
|
};
|
|
92
|
-
export
|
|
99
|
+
export type ApplePayParams = {
|
|
93
100
|
/** The two-letter ISO 3166 code of the country of your business, e.g. "US" */
|
|
94
101
|
merchantCountryCode: string;
|
|
95
102
|
/**
|
|
@@ -106,7 +113,7 @@ export declare type ApplePayParams = {
|
|
|
106
113
|
* function, or else the Apple Pay sheet will hang. */
|
|
107
114
|
setOrderTracking?: (completion: (orderIdentifier: string, orderTypeIdentifier: string, authenticationToken: string, webServiceUrl: string) => void) => void;
|
|
108
115
|
};
|
|
109
|
-
export
|
|
116
|
+
export type GooglePayParams = {
|
|
110
117
|
/** The two-letter ISO 3166 code of the country of your business, e.g. "US" */
|
|
111
118
|
merchantCountryCode: string;
|
|
112
119
|
/** The three-letter ISO 4217 alphabetic currency code, e.g. "USD" or "EUR". Required in order to support Google Pay when processing a Setup Intent. */
|
|
@@ -125,7 +132,7 @@ export declare type GooglePayParams = {
|
|
|
125
132
|
/**
|
|
126
133
|
* Used to customize the appearance of your PaymentSheet
|
|
127
134
|
*/
|
|
128
|
-
export
|
|
135
|
+
export type AppearanceParams = RecursivePartial<{
|
|
129
136
|
/** Describes the appearance of fonts in your PaymentSheet */
|
|
130
137
|
font: FontConfig;
|
|
131
138
|
/** Describes the colors in your PaymentSheet. Provide either a base config, or both `light` and `dark` configs, which will be useed based on whether the user is in Light or Dark mode. */
|
|
@@ -149,7 +156,7 @@ export declare type AppearanceParams = RecursivePartial<{
|
|
|
149
156
|
/** Describes the appearance of the primary "Pay" button at the bottom of your Payment Sheet */
|
|
150
157
|
primaryButton: PrimaryButtonConfig;
|
|
151
158
|
}>;
|
|
152
|
-
export
|
|
159
|
+
export type FontConfig = {
|
|
153
160
|
/**
|
|
154
161
|
* The font used for regular text. PaymentSheet will attempt to use medium and bold versions of this font if they exist.
|
|
155
162
|
*
|
|
@@ -164,7 +171,7 @@ export declare type FontConfig = {
|
|
|
164
171
|
*/
|
|
165
172
|
scale: number;
|
|
166
173
|
};
|
|
167
|
-
export
|
|
174
|
+
export type ShadowConfig = {
|
|
168
175
|
/** The color of the shadow.
|
|
169
176
|
* @default "#000000"
|
|
170
177
|
* */
|
|
@@ -185,7 +192,7 @@ export declare type ShadowConfig = {
|
|
|
185
192
|
*/
|
|
186
193
|
blurRadius: number;
|
|
187
194
|
};
|
|
188
|
-
export
|
|
195
|
+
export type GlobalColorConfig = {
|
|
189
196
|
/** A primary color used throughout your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.
|
|
190
197
|
* @default The System blue color on iOS, and "#007AFF" (light) / "#0074D4" (dark) on Android.
|
|
191
198
|
*/
|
|
@@ -231,7 +238,7 @@ export declare type GlobalColorConfig = {
|
|
|
231
238
|
*/
|
|
232
239
|
error: string;
|
|
233
240
|
};
|
|
234
|
-
export
|
|
241
|
+
export type PrimaryButtonConfig = {
|
|
235
242
|
/** The font family used specifically for the primary button.
|
|
236
243
|
* @default The root `appearance.font.family`
|
|
237
244
|
*/
|
|
@@ -257,7 +264,7 @@ export declare type PrimaryButtonConfig = {
|
|
|
257
264
|
shadow: ShadowConfig;
|
|
258
265
|
};
|
|
259
266
|
};
|
|
260
|
-
export
|
|
267
|
+
export type PrimaryButtonColorConfig = {
|
|
261
268
|
/** The background color used for the primary button in your PaymentSheet, represented as a hex string with format #RRGGBB or #AARRGGBB.
|
|
262
269
|
* @default The root `appearance.colors.primary`
|
|
263
270
|
*/
|
|
@@ -271,20 +278,20 @@ export declare type PrimaryButtonColorConfig = {
|
|
|
271
278
|
*/
|
|
272
279
|
border: string;
|
|
273
280
|
};
|
|
274
|
-
|
|
281
|
+
type RecursivePartial<T> = {
|
|
275
282
|
[P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P] extends object ? RecursivePartial<T[P]> : T[P];
|
|
276
283
|
};
|
|
277
284
|
export interface PaymentOption {
|
|
278
285
|
label: string;
|
|
279
286
|
image: string;
|
|
280
287
|
}
|
|
281
|
-
export
|
|
288
|
+
export type PresentOptions = {
|
|
282
289
|
/** The number of milliseconds (after presenting) before the Payment Sheet closes automatically, at which point
|
|
283
290
|
*`presentPaymentSheet` will resolve with an `error.code` of `PaymentSheetError.Timeout`. The default is no timeout.
|
|
284
291
|
*/
|
|
285
292
|
timeout?: number;
|
|
286
293
|
};
|
|
287
|
-
export
|
|
294
|
+
export type BillingDetailsCollectionConfiguration = {
|
|
288
295
|
/** How to collect the name field. Defaults to `CollectionMode.automatic`. */
|
|
289
296
|
name?: CollectionMode;
|
|
290
297
|
/** How to collect the phone field. Defaults to `CollectionMode.automatic`. */
|
|
@@ -312,20 +319,20 @@ export declare enum AddressCollectionMode {
|
|
|
312
319
|
/** Collect the full billing address, regardless of the Payment Method's requirements. */
|
|
313
320
|
FULL = "full"
|
|
314
321
|
}
|
|
315
|
-
export
|
|
316
|
-
export
|
|
322
|
+
export type IntentCreationError = StripeError<'Failed'>;
|
|
323
|
+
export type IntentCreationCallbackParams = {
|
|
317
324
|
clientSecret: string;
|
|
318
325
|
error?: never;
|
|
319
326
|
} | {
|
|
320
327
|
clientSecret?: never;
|
|
321
328
|
error: IntentCreationError;
|
|
322
329
|
};
|
|
323
|
-
export
|
|
330
|
+
export type IntentConfiguration = {
|
|
324
331
|
confirmHandler: (paymentMethod: Result, shouldSavePaymentMethod: boolean, intentCreationCallback: (result: IntentCreationCallbackParams) => void) => void;
|
|
325
332
|
mode: Mode;
|
|
326
333
|
paymentMethodTypes?: Array<string>;
|
|
327
334
|
};
|
|
328
|
-
export
|
|
335
|
+
export type Mode = PaymentMode | SetupMode;
|
|
329
336
|
/**
|
|
330
337
|
* Controls when the funds will be captured. Seealso: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-capture_method
|
|
331
338
|
*/
|
|
@@ -339,13 +346,13 @@ export declare enum CaptureMethod {
|
|
|
339
346
|
- Seealso: https://stripe.com/docs/payments/payment-intents/asynchronous-capture-automatic-async */
|
|
340
347
|
AutomaticAsync = "AutomaticAsync"
|
|
341
348
|
}
|
|
342
|
-
export
|
|
349
|
+
export type PaymentMode = {
|
|
343
350
|
amount: number;
|
|
344
351
|
currencyCode: string;
|
|
345
352
|
setupFutureUsage?: FutureUsage;
|
|
346
353
|
captureMethod?: CaptureMethod;
|
|
347
354
|
};
|
|
348
|
-
export
|
|
355
|
+
export type SetupMode = {
|
|
349
356
|
currencyCode?: string;
|
|
350
357
|
setupFutureUsage: FutureUsage;
|
|
351
358
|
};
|
|
@@ -365,4 +372,47 @@ export declare enum PaymentMethodLayout {
|
|
|
365
372
|
*/
|
|
366
373
|
Automatic = "Automatic"
|
|
367
374
|
}
|
|
375
|
+
/** Card brand categories that can be allowed or disallowed */
|
|
376
|
+
export declare enum CardBrandCategory {
|
|
377
|
+
/** Visa branded cards */
|
|
378
|
+
Visa = "visa",
|
|
379
|
+
/** Mastercard branded cards */
|
|
380
|
+
Mastercard = "mastercard",
|
|
381
|
+
/** American Express branded cards */
|
|
382
|
+
Amex = "amex",
|
|
383
|
+
/**
|
|
384
|
+
* Discover branded cards
|
|
385
|
+
* Note: Encompasses all of Discover Global Network (Discover, Diners, JCB, UnionPay, Elo)
|
|
386
|
+
*/
|
|
387
|
+
Discover = "discover"
|
|
388
|
+
}
|
|
389
|
+
/** Filter types for card brand acceptance */
|
|
390
|
+
export declare enum CardBrandAcceptanceFilter {
|
|
391
|
+
/** Accept all card brands supported by Stripe */
|
|
392
|
+
All = "all",
|
|
393
|
+
/** Accept only the specified card brands */
|
|
394
|
+
Allowed = "allowed",
|
|
395
|
+
/** Accept all card brands except the specified ones */
|
|
396
|
+
Disallowed = "disallowed"
|
|
397
|
+
}
|
|
398
|
+
/** Options to block certain card brands on the client */
|
|
399
|
+
export type CardBrandAcceptance = {
|
|
400
|
+
/** Accept all card brands supported by Stripe */
|
|
401
|
+
filter: CardBrandAcceptanceFilter.All;
|
|
402
|
+
} | {
|
|
403
|
+
/** Accept only the specified card brands */
|
|
404
|
+
filter: CardBrandAcceptanceFilter.Allowed;
|
|
405
|
+
/** List of card brands to accept
|
|
406
|
+
* Note: Any card brands that do not map to a CardBrandCategory will be blocked when using an allow list
|
|
407
|
+
*/
|
|
408
|
+
brands: CardBrandCategory[];
|
|
409
|
+
} | {
|
|
410
|
+
/** Accept all card brands except the specified ones */
|
|
411
|
+
filter: CardBrandAcceptanceFilter.Disallowed;
|
|
412
|
+
/** List of card brands to block
|
|
413
|
+
* Note: Any card brands that do not map to a CardBrandCategory will be accepted when using a disallow list
|
|
414
|
+
*/
|
|
415
|
+
brands: CardBrandCategory[];
|
|
416
|
+
};
|
|
368
417
|
export {};
|
|
418
|
+
//# sourceMappingURL=PaymentSheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaymentSheet.d.ts","sourceRoot":"","sources":["../../../../src/types/PaymentSheet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,SAAS,EACT,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,KAAK,EACV,UAAU,EACV,uBAAuB,EACvB,6BAA6B,EAC7B,oBAAoB,EACrB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG;IAC3C,sGAAsG;IACtG,mBAAmB,EAAE,MAAM,CAAC;IAC5B,wHAAwH;IACxH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;6FACyF;IACzF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4FAA4F;IAC5F,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,iGAAiG;IACjG,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,6EAA6E;IAC7E,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,8IAA8I;IAC9I,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,qCAAqC,CAAC,EAAE,qCAAqC,CAAC;IAC9E,yKAAyK;IACzK,qBAAqB,CAAC,EAAE,cAAc,CAAC;IACvC;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,cAAc,CAAC;IACxC;;;;;;OAMG;IACH,2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AS,cAAc;CACxB;AAED,8DAA8D;AAC9D,oBAAY,iBAAiB;IAC3B,yBAAyB;IACzB,IAAI,SAAS;IACb,+BAA+B;IAC/B,UAAU,eAAe;IACzB,qCAAqC;IACrC,IAAI,SAAS;IACb;;;OAGG;IACH,QAAQ,aAAa;CACtB;AAED,6CAA6C;AAC7C,oBAAY,yBAAyB;IACnC,iDAAiD;IACjD,GAAG,QAAQ;IACX,4CAA4C;IAC5C,OAAO,YAAY;IACnB,uDAAuD;IACvD,UAAU,eAAe;CAC1B;AAED,yDAAyD;AACzD,MAAM,MAAM,mBAAmB,GAC3B;IACE,iDAAiD;IACjD,MAAM,EAAE,yBAAyB,CAAC,GAAG,CAAC;CACvC,GACD;IACE,4CAA4C;IAC5C,MAAM,EAAE,yBAAyB,CAAC,OAAO,CAAC;IAC1C;;OAEG;IACH,MAAM,EAAE,iBAAiB,EAAE,CAAC;CAC7B,GACD;IACE,uDAAuD;IACvD,MAAM,EAAE,yBAAyB,CAAC,UAAU,CAAC;IAC7C;;OAEG;IACH,MAAM,EAAE,iBAAiB,EAAE,CAAC;CAC7B,CAAC"}
|
|
@@ -3,7 +3,7 @@ import type { Result as PaymentMethod } from './PaymentMethod';
|
|
|
3
3
|
import type { Result as PaymentIntent } from './PaymentIntent';
|
|
4
4
|
import type { Result as SetupIntent } from './SetupIntent';
|
|
5
5
|
import type { StripeError, PlatformPayError } from './Errors';
|
|
6
|
-
export
|
|
6
|
+
export type ApplePaySheetError = {
|
|
7
7
|
errorType: ApplePaySheetErrorType.InvalidShippingAddress;
|
|
8
8
|
field: InvalidShippingField;
|
|
9
9
|
message?: string;
|
|
@@ -34,7 +34,7 @@ export declare enum InvalidShippingField {
|
|
|
34
34
|
CountryCode = "countryCode",
|
|
35
35
|
SubLocality = "subLocality"
|
|
36
36
|
}
|
|
37
|
-
export
|
|
37
|
+
export type ApplePayBaseParams = {
|
|
38
38
|
/** ISO 3166-1 alpha-2 country code where the transaction is processed. */
|
|
39
39
|
merchantCountryCode: string;
|
|
40
40
|
/** ISO 4217 alphabetic currency code. */
|
|
@@ -56,7 +56,7 @@ export declare type ApplePayBaseParams = {
|
|
|
56
56
|
/** A list of two-letter ISO 3166 country codes for limiting payment to cards from specific countries or regions. */
|
|
57
57
|
supportedCountries?: Array<string>;
|
|
58
58
|
};
|
|
59
|
-
export
|
|
59
|
+
export type ApplePayConfirmParams = {
|
|
60
60
|
/** A typical request is for a one-time payment. To support different types of payment requests, include a PaymentRequestType. Only supported on iOS 16 and up. */
|
|
61
61
|
request?: RecurringPaymentRequest | AutomaticReloadPaymentRequest | MultiMerchantRequest;
|
|
62
62
|
};
|
|
@@ -66,7 +66,7 @@ export declare enum PaymentRequestType {
|
|
|
66
66
|
MultiMerchant = "MultiMerchant"
|
|
67
67
|
}
|
|
68
68
|
/** Use this for a recurring payment, typically a subscription. */
|
|
69
|
-
export
|
|
69
|
+
export type RecurringPaymentRequest = {
|
|
70
70
|
type: PaymentRequestType.Recurring;
|
|
71
71
|
/** A description that you provide of the recurring payment and that Apple Pay displays to the user in the sheet. */
|
|
72
72
|
description: string;
|
|
@@ -84,7 +84,7 @@ export declare type RecurringPaymentRequest = {
|
|
|
84
84
|
tokenNotificationURL?: string;
|
|
85
85
|
};
|
|
86
86
|
/** Use this for an automatic reload or refill payment, such as a store card top-up. */
|
|
87
|
-
export
|
|
87
|
+
export type AutomaticReloadPaymentRequest = {
|
|
88
88
|
type: PaymentRequestType.AutomaticReload;
|
|
89
89
|
/** A description that you provide of the recurring payment and that Apple Pay displays to the user in the sheet. */
|
|
90
90
|
description: string;
|
|
@@ -104,7 +104,7 @@ export declare type AutomaticReloadPaymentRequest = {
|
|
|
104
104
|
tokenNotificationURL?: string;
|
|
105
105
|
};
|
|
106
106
|
/** Use this to indicate payments for multiple merchants. */
|
|
107
|
-
export
|
|
107
|
+
export type MultiMerchantRequest = {
|
|
108
108
|
type: PaymentRequestType.MultiMerchant;
|
|
109
109
|
merchants: Array<{
|
|
110
110
|
/** The Apple Pay merchant identifier. */
|
|
@@ -119,7 +119,7 @@ export declare type MultiMerchantRequest = {
|
|
|
119
119
|
amount: string;
|
|
120
120
|
}>;
|
|
121
121
|
};
|
|
122
|
-
export
|
|
122
|
+
export type ApplePayPaymentMethodParams = {
|
|
123
123
|
/** Set this value to true to display the coupon code field, or pass the 'couponCode' field to autofill with a coupon code. Defaults to false. If true, you must implement the PlatformPayButton component's `onCouponCodeEntered` callback and call `updatePlatformPaySheet` from there. */
|
|
124
124
|
supportsCouponCode?: boolean;
|
|
125
125
|
/** Set this value to autofill with a coupon code. If provided, you must implement the PlatformPayButton component's `onCouponCodeEntered` callback and call `updatePlatformPaySheet` from there. */
|
|
@@ -141,7 +141,7 @@ export declare enum ApplePayShippingType {
|
|
|
141
141
|
StorePickup = "storePickup",
|
|
142
142
|
ServicePickup = "servicePickup"
|
|
143
143
|
}
|
|
144
|
-
export
|
|
144
|
+
export type GooglePayBaseParams = {
|
|
145
145
|
/**
|
|
146
146
|
* Set to true to run in a test environment with relaxed application / merchant requirements. This environment is suggested for early development and for easily testing SDK.
|
|
147
147
|
- Does not require the application to be uploaded to the Google Play Store.
|
|
@@ -176,7 +176,7 @@ export declare type GooglePayBaseParams = {
|
|
|
176
176
|
/** An optional amount to display for setup intents. Google Pay may or may not display this amount depending on its own internal logic. Defaults to 0 if none is provided. Provide this value in the currency’s smallest unit. */
|
|
177
177
|
amount?: number;
|
|
178
178
|
};
|
|
179
|
-
export
|
|
179
|
+
export type GooglePayPaymentMethodParams = {
|
|
180
180
|
/** Describes the configuration for shipping address collection in the Google Pay sheet. */
|
|
181
181
|
shippingAddressConfig?: {
|
|
182
182
|
/** Set to true if shipping address is required for payment. Defaults to false. */
|
|
@@ -193,13 +193,13 @@ export declare enum BillingAddressFormat {
|
|
|
193
193
|
/** Collect name, country code, and postal code (default). */
|
|
194
194
|
Min = "MIN"
|
|
195
195
|
}
|
|
196
|
-
export
|
|
196
|
+
export type PaymentMethodParams = {
|
|
197
197
|
/** Defines Google Pay behavior. Android only. */
|
|
198
198
|
googlePay?: GooglePayBaseParams & GooglePayPaymentMethodParams;
|
|
199
199
|
/** Defines Apple Pay behavior. iOS only. */
|
|
200
200
|
applePay?: ApplePayBaseParams & ApplePayPaymentMethodParams;
|
|
201
201
|
};
|
|
202
|
-
export
|
|
202
|
+
export type ConfirmParams = {
|
|
203
203
|
/** Defines Google Pay behavior. Android only. */
|
|
204
204
|
googlePay?: GooglePayBaseParams;
|
|
205
205
|
/** Defines Apple Pay behavior. iOS only. */
|
|
@@ -257,7 +257,7 @@ export declare enum ButtonStyle {
|
|
|
257
257
|
Automatic = 3
|
|
258
258
|
}
|
|
259
259
|
/** iOS only. */
|
|
260
|
-
export
|
|
260
|
+
export type CartSummaryItem = DeferredCartSummaryItem | ImmediateCartSummaryItem | RecurringCartSummaryItem;
|
|
261
261
|
/** iOS only. */
|
|
262
262
|
export declare enum PaymentType {
|
|
263
263
|
Deferred = "Deferred",
|
|
@@ -265,7 +265,7 @@ export declare enum PaymentType {
|
|
|
265
265
|
Recurring = "Recurring"
|
|
266
266
|
}
|
|
267
267
|
/** iOS only. Use this type for a payment that occurs in the future, such as a pre-order. Only available on iOS 15 and up, otherwise falls back to ImmediateCartSummaryItem. */
|
|
268
|
-
export
|
|
268
|
+
export type DeferredCartSummaryItem = {
|
|
269
269
|
paymentType: PaymentType.Deferred;
|
|
270
270
|
/** The unix timestamp of the date, in the future, of the payment. Measured in seconds. */
|
|
271
271
|
deferredDate: number;
|
|
@@ -273,7 +273,7 @@ export declare type DeferredCartSummaryItem = {
|
|
|
273
273
|
amount: string;
|
|
274
274
|
};
|
|
275
275
|
/** iOS only. Use this type for payments that will occur immediately. */
|
|
276
|
-
export
|
|
276
|
+
export type ImmediateCartSummaryItem = {
|
|
277
277
|
paymentType: PaymentType.Immediate;
|
|
278
278
|
/** When creating items for estimates or charges whose final value is not yet known, set this to true. */
|
|
279
279
|
isPending?: boolean;
|
|
@@ -281,7 +281,7 @@ export declare type ImmediateCartSummaryItem = {
|
|
|
281
281
|
amount: string;
|
|
282
282
|
};
|
|
283
283
|
/** iOS only. Use this type for payments that occur more than once, such as a subscription. Only available on iOS 15 and up, otherwise falls back to ImmediateCartSummaryItem.*/
|
|
284
|
-
export
|
|
284
|
+
export type RecurringCartSummaryItem = {
|
|
285
285
|
paymentType: PaymentType.Recurring;
|
|
286
286
|
/** The amount of time – in calendar units such as Day, Month, or Year – that represents a fraction of the total payment interval. For example, if you set the intervalUnit to 'Month' and intervalCount to 3, then the payment interval is three months.*/
|
|
287
287
|
intervalUnit: IntervalUnit;
|
|
@@ -303,7 +303,7 @@ export declare enum IntervalUnit {
|
|
|
303
303
|
Year = "year"
|
|
304
304
|
}
|
|
305
305
|
/** iOS only. */
|
|
306
|
-
export
|
|
306
|
+
export type ShippingMethod = {
|
|
307
307
|
/** A short, localized description. */
|
|
308
308
|
label: string;
|
|
309
309
|
/** The cost associated with this shipping option. */
|
|
@@ -344,7 +344,7 @@ export interface ShippingContact {
|
|
|
344
344
|
postalAddress: PostalAddress;
|
|
345
345
|
}
|
|
346
346
|
/** Android only. */
|
|
347
|
-
export
|
|
347
|
+
export type IsGooglePaySupportedParams = {
|
|
348
348
|
/** Set to true to run in a test environment with relaxed application / merchant requirements. This environment is suggested for early development and for easily testing SDK. Defaults to false. */
|
|
349
349
|
testEnv?: boolean;
|
|
350
350
|
/**
|
|
@@ -353,7 +353,7 @@ export declare type IsGooglePaySupportedParams = {
|
|
|
353
353
|
*/
|
|
354
354
|
existingPaymentMethodRequired?: boolean;
|
|
355
355
|
};
|
|
356
|
-
export
|
|
356
|
+
export type PaymentMethodResult = {
|
|
357
357
|
paymentMethod: PaymentMethod;
|
|
358
358
|
shippingContact?: ShippingContact;
|
|
359
359
|
error?: undefined;
|
|
@@ -362,7 +362,7 @@ export declare type PaymentMethodResult = {
|
|
|
362
362
|
shippingContact?: undefined;
|
|
363
363
|
error: StripeError<PlatformPayError>;
|
|
364
364
|
};
|
|
365
|
-
export
|
|
365
|
+
export type TokenResult = {
|
|
366
366
|
token: Token;
|
|
367
367
|
shippingContact?: ShippingContact;
|
|
368
368
|
error?: undefined;
|
|
@@ -371,14 +371,14 @@ export declare type TokenResult = {
|
|
|
371
371
|
shippingContact?: undefined;
|
|
372
372
|
error: StripeError<PlatformPayError>;
|
|
373
373
|
};
|
|
374
|
-
export
|
|
374
|
+
export type ConfirmPaymentResult = {
|
|
375
375
|
paymentIntent: PaymentIntent;
|
|
376
376
|
error?: StripeError<PlatformPayError>;
|
|
377
377
|
} | {
|
|
378
378
|
paymentIntent?: undefined;
|
|
379
379
|
error: StripeError<PlatformPayError>;
|
|
380
380
|
};
|
|
381
|
-
export
|
|
381
|
+
export type ConfirmSetupIntentResult = {
|
|
382
382
|
setupIntent: SetupIntent;
|
|
383
383
|
error?: StripeError<PlatformPayError>;
|
|
384
384
|
} | {
|
|
@@ -386,3 +386,4 @@ export declare type ConfirmSetupIntentResult = {
|
|
|
386
386
|
error: StripeError<PlatformPayError>;
|
|
387
387
|
};
|
|
388
388
|
export {};
|
|
389
|
+
//# sourceMappingURL=PlatformPay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlatformPay.d.ts","sourceRoot":"","sources":["../../../../src/types/PlatformPay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,KAAK,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,KAAK,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE9D,MAAM,MAAM,kBAAkB,GAC1B;IACE,SAAS,EAAE,sBAAsB,CAAC,sBAAsB,CAAC;IACzD,KA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AAC;IACzB,KAAK,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAC;CACvC,GACD;IACE,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAC;CACtC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { StripeError, GooglePayError } from './Errors';
|
|
2
|
-
export
|
|
2
|
+
export type GooglePayCardToken = {
|
|
3
3
|
/** The token reference ID. */
|
|
4
4
|
id: string;
|
|
5
5
|
/** Last four digits of the FPAN */
|
|
@@ -29,7 +29,7 @@ export declare enum GooglePayCardTokenStatus {
|
|
|
29
29
|
/** */
|
|
30
30
|
TOKEN_STATE_UNTOKENIZED = "TOKEN_STATE_UNTOKENIZED"
|
|
31
31
|
}
|
|
32
|
-
export
|
|
32
|
+
export type IsCardInWalletResult = {
|
|
33
33
|
isInWallet: boolean;
|
|
34
34
|
token?: GooglePayCardToken;
|
|
35
35
|
error?: undefined;
|
|
@@ -38,7 +38,7 @@ export declare type IsCardInWalletResult = {
|
|
|
38
38
|
token?: undefined;
|
|
39
39
|
error: StripeError<GooglePayError>;
|
|
40
40
|
};
|
|
41
|
-
export
|
|
41
|
+
export type CanAddCardToWalletParams = {
|
|
42
42
|
/** The `primary_account_identifier` value from the issued card. Can be an empty string. */
|
|
43
43
|
primaryAccountIdentifier: string | null;
|
|
44
44
|
/** Last 4 digits of the card number. Required for Android. */
|
|
@@ -50,7 +50,7 @@ export declare type CanAddCardToWalletParams = {
|
|
|
50
50
|
/** Android only, defaults to `true`. Set this to `false` if you'd like to allow users without NFC-enabled devices to add cards to the wallet. NFC is required for paying in stores. */
|
|
51
51
|
supportsTapToPay?: boolean;
|
|
52
52
|
};
|
|
53
|
-
export
|
|
53
|
+
export type CanAddCardToWalletResult = {
|
|
54
54
|
canAddCard: boolean;
|
|
55
55
|
details?: {
|
|
56
56
|
token?: GooglePayCardToken;
|
|
@@ -74,3 +74,4 @@ export declare enum CanAddCardToWalletStatus {
|
|
|
74
74
|
/** This card already exists on the paired device, but not on this device. */
|
|
75
75
|
CARD_EXISTS_ON_PAIRED_DEVICE = "CARD_EXISTS_ON_PAIRED_DEVICE"
|
|
76
76
|
}
|
|
77
|
+
//# sourceMappingURL=PushProvisioning.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PushProvisioning.d.ts","sourceRoot":"","sources":["../../../../src/types/PushProvisioning.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE5D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,8BAA8B;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,mCAAmC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,mCAAmC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,8BAA8B;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,MAAM,EAAE,wBAAwB,CAAC;IACjC,oDAAoD;IACpD,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,oBAAY,wBAAwB;IAClC,OAAO;IACP,uCAAuC,4CAA4C;IACnF,OAAO;IACP,mBAAmB,wBAAwB;IAC3C,OAAO;IACP,qBAAqB,0BAA0B;IAC/C,OAAO;IACP,kBAAkB,uBAAuB;IACzC,OAAO;IACP,uCAAuC,4CAA4C;IACnF,OAAO;IACP,uBAAuB,4BAA4B;CACpD;AAED,MAAM,MAAM,oBAAoB,GAC5B;IACE,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,GACD;IACE,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,KAAK,EAAE,WAAW,CAAC,cAAc,CAAC,CAAC;CACpC,CAAC;AAEN,MAAM,MAAM,wBAAwB,GAAG;IACrC,2FAA2F;IAC3F,wBAAwB,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,8DAA8D;IAC9D,YAAY,EAAE,MAAM,CAAC;IACrB,iRAAiR;IACjR,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uKAAuK;IACvK,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,uLAAuL;IACvL,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAChC;IACE,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,EAAE,kBAAkB,CAAC;QAC3B,MAAM,CAAC,EAAE,wBAAwB,CAAC;KACnC,CAAC;IACF,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,GACD;IACE,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,WAAW,CAAC,cAAc,CAAC,CAAC;CACpC,CAAC;AAEN,oBAAY,wBAAwB;IAClC,yLAAyL;IACzL,qBAAqB,0BAA0B;IAC/C,sEAAsE;IACtE,kBAAkB,uBAAuB;IACzC,sEAAsE;IACtE,mBAAmB,wBAAwB;IAC3C,6EAA6E;IAC7E,6BAA6B,kCAAkC;IAC/D,6EAA6E;IAC7E,4BAA4B,iCAAiC;CAC9D"}
|
|
@@ -18,9 +18,9 @@ export interface Result {
|
|
|
18
18
|
description: string | null;
|
|
19
19
|
nextAction: NextAction | null;
|
|
20
20
|
}
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
21
|
+
export type ConfirmParams = PaymentIntentConfirmParams;
|
|
22
|
+
export type ConfirmOptions = PaymentIntentConfirmOptions;
|
|
23
|
+
export type FutureUsage = 'Unknown' | 'None' | 'OnSession' | 'OffSession' | 'OneTime';
|
|
24
24
|
export declare enum Status {
|
|
25
25
|
Succeeded = "Succeeded",
|
|
26
26
|
RequiresPaymentMethod = "RequiresPaymentMethod",
|
|
@@ -30,3 +30,4 @@ export declare enum Status {
|
|
|
30
30
|
RequiresAction = "RequiresAction",
|
|
31
31
|
Unknown = "Unknown"
|
|
32
32
|
}
|
|
33
|
+
//# sourceMappingURL=SetupIntent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SetupIntent.d.ts","sourceRoot":"","sources":["../../../../src/types/SetupIntent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,IAAI,0BAA0B,EAC3C,cAAc,IAAI,2BAA2B,EAC9C,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,KAAK,aAAa,MAAM,iBAAiB,CAAC;AACtD,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACxC,sFAAsF;IACtF,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,gDAAgD;IAChD,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,aAAa,EAAE,aAAa,CAAC,MAAM,GAAG,IAAI,CAAC;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,IAAI,EAAE,CAAC;IAC3B,KAAK,EAAE,WAAW,CAAC;IACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;CAC/B;AAED,MAAM,MAAM,aAAa,GAAG,0BAA0B,CAAC;AAEvD,MAAM,MAAM,cAAc,GAAG,2BAA2B,CAAC;AAEzD,MAA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