@onramper/onramper-react-native 1.1.0 → 1.2.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/CHANGELOG.md +36 -0
- package/README.md +2 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/OnramperSDK.framework/Modules/OnramperSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/OnramperSDK.framework/Modules/OnramperSDK.swiftmodule/arm64-apple-ios.swiftinterface +28 -3
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/OnramperSDK.framework/OnramperSDK +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/OnramperSDK.framework/OnramperSDK_OnramperSDK.bundle/PrivacyInfo.xcprivacy +36 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/OnramperSDK.framework/PrivacyInfo.xcprivacy +36 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/dSYMs/OnramperSDK.framework.dSYM/Contents/Resources/DWARF/OnramperSDK +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/dSYMs/OnramperSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/OnramperSDK.yml +2660 -2517
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/Modules/OnramperSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/Modules/OnramperSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +28 -3
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/Modules/OnramperSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/Modules/OnramperSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +28 -3
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/OnramperSDK +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/OnramperSDK_OnramperSDK.bundle/PrivacyInfo.xcprivacy +36 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/PrivacyInfo.xcprivacy +36 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/OnramperSDK.framework.dSYM/Contents/Resources/DWARF/OnramperSDK +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/OnramperSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/OnramperSDK.yml +2660 -2517
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/OnramperSDK.framework.dSYM/Contents/Resources/Relocations/x86_64/OnramperSDK.yml +2627 -2484
- package/ios/HybridOnramperNitro.swift +20 -4
- package/ios/OnramperCheckoutBridge.swift +33 -0
- package/lib/commonjs/OnramperClient.js +12 -2
- package/lib/commonjs/OnramperClient.js.map +1 -1
- package/lib/module/OnramperClient.js +12 -2
- package/lib/module/OnramperClient.js.map +1 -1
- package/lib/typescript/commonjs/src/OnramperClient.d.ts +12 -2
- package/lib/typescript/commonjs/src/OnramperClient.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/specs/OnramperNitro.nitro.d.ts +1 -1
- package/lib/typescript/commonjs/src/specs/OnramperNitro.nitro.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types.d.ts +7 -0
- package/lib/typescript/commonjs/src/types.d.ts.map +1 -1
- package/lib/typescript/module/src/OnramperCheckoutButtonView.d.ts +1 -1
- package/lib/typescript/module/src/OnramperCheckoutButtonView.d.ts.map +1 -1
- package/lib/typescript/module/src/OnramperClient.d.ts +14 -4
- package/lib/typescript/module/src/OnramperClient.d.ts.map +1 -1
- package/lib/typescript/module/src/OnramperNative.d.ts +1 -1
- package/lib/typescript/module/src/OnramperNative.d.ts.map +1 -1
- package/lib/typescript/module/src/events.d.ts +2 -2
- package/lib/typescript/module/src/events.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +8 -8
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/specs/OnramperNitro.nitro.d.ts +1 -1
- package/lib/typescript/module/src/specs/OnramperNitro.nitro.d.ts.map +1 -1
- package/lib/typescript/module/src/types.d.ts +8 -1
- package/lib/typescript/module/src/types.d.ts.map +1 -1
- package/nitrogen/generated/ios/c++/HybridOnramperNitroSpecSwift.hpp +2 -2
- package/nitrogen/generated/ios/swift/HybridOnramperNitroSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridOnramperNitroSpec_cxx.swift +2 -2
- package/nitrogen/generated/shared/c++/HybridOnramperNitroSpec.hpp +1 -1
- package/package.json +3 -3
- package/src/OnramperClient.ts +17 -1
- package/src/index.ts +1 -0
- package/src/specs/OnramperNitro.nitro.ts +5 -2
- package/src/types.ts +25 -0
|
@@ -42,8 +42,11 @@ export interface OnramperNitro extends HybridObject<{ ios: 'swift' }> {
|
|
|
42
42
|
// Fetches checkout requirements + quote, stores the SDK's SwiftUI checkout
|
|
43
43
|
// button under a handle, and returns the handle + JSON-encoded quote. The
|
|
44
44
|
// OnramperCheckoutButton Nitro view renders the stored button by handle.
|
|
45
|
-
// `requestJson` is a JSON CheckoutRequest; `
|
|
46
|
-
|
|
45
|
+
// `requestJson` is a JSON CheckoutRequest; `prefillJson` a JSON
|
|
46
|
+
// OnramperUserPrefill (`{}` when the caller supplied none); `styleJson` a JSON
|
|
47
|
+
// CheckoutButtonStyle. Argument order mirrors the SDK's
|
|
48
|
+
// `getCheckoutRequirements(_:prefill:buttonStyle:)`.
|
|
49
|
+
getCheckoutRequirements(requestJson: string, prefillJson: string, styleJson: string): Promise<PreparedIntentResult>;
|
|
47
50
|
cancelPreparedIntent(intentHandle: string): Promise<void>;
|
|
48
51
|
|
|
49
52
|
// Single native callback per stream; the JS wrapper fans out to multiple listeners.
|
package/src/types.ts
CHANGED
|
@@ -69,6 +69,31 @@ export interface QuoteResponse {
|
|
|
69
69
|
recommendations?: string[];
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
// Mirrors Swift `OnramperUserPrefill`. Values you already know about the user,
|
|
73
|
+
// used to pre-populate the OnramperID sign-in and additional-info screens.
|
|
74
|
+
// Every field is optional — supply only what you know.
|
|
75
|
+
//
|
|
76
|
+
// Prefill is **best-effort and never blocks sign-in**: if it can't be applied,
|
|
77
|
+
// the login flow opens without it. Nothing surfaces to your app, and there is
|
|
78
|
+
// no error to handle.
|
|
79
|
+
//
|
|
80
|
+
// `email` is the *binding identity*, not merely another prefilled value. When
|
|
81
|
+
// it matches the account that signs in, the remaining values may be applied
|
|
82
|
+
// automatically; when it does not match, the whole prefill is dropped — which
|
|
83
|
+
// is strictly worse than omitting `email`, where the values are still offered
|
|
84
|
+
// to the user for confirmation. Supply it only when you're confident it's the
|
|
85
|
+
// address the user will sign in with.
|
|
86
|
+
//
|
|
87
|
+
// Prefill is enabled per integration — talk to your Onramper representative
|
|
88
|
+
// before relying on it.
|
|
89
|
+
export interface OnramperUserPrefill {
|
|
90
|
+
email?: string;
|
|
91
|
+
firstName?: string;
|
|
92
|
+
lastName?: string;
|
|
93
|
+
/** E.164 format, e.g. `+3712345678`. Always a candidate — the user still verifies it. */
|
|
94
|
+
phoneNumber?: string;
|
|
95
|
+
}
|
|
96
|
+
|
|
72
97
|
export interface CheckoutButtonStyle {
|
|
73
98
|
backgroundColor?: string; // hex #RRGGBB or #RRGGBBAA
|
|
74
99
|
foregroundColor?: string;
|