@onramper/onramper-react-native 1.2.2 → 1.3.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 +214 -0
- package/README.md +46 -4
- 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 +107 -4
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/OnramperSDK.framework/OnramperSDK +0 -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 +3560 -2684
- 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 +107 -4
- 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 +107 -4
- 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/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 +3560 -2684
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/OnramperSDK.framework.dSYM/Contents/Resources/Relocations/x86_64/OnramperSDK.yml +3523 -2651
- package/ios/HybridOnramperCheckoutButton.swift +77 -3
- package/ios/HybridOnramperNitro.swift +140 -78
- package/ios/OnramperSDKBridge.swift +19 -2
- package/ios/PreparedIntentRegistry.swift +124 -6
- package/ios/SDKLogRelay.swift +41 -0
- package/lib/commonjs/CheckoutButton.js +34 -0
- package/lib/commonjs/CheckoutButton.js.map +1 -0
- package/lib/commonjs/OnramperClient.js +69 -12
- package/lib/commonjs/OnramperClient.js.map +1 -1
- package/lib/commonjs/errors.js +19 -5
- package/lib/commonjs/errors.js.map +1 -1
- package/lib/commonjs/generated/OnramperCheckoutButtonConfig.json +1 -0
- package/lib/module/CheckoutButton.js +30 -0
- package/lib/module/CheckoutButton.js.map +1 -0
- package/lib/module/OnramperClient.js +69 -12
- package/lib/module/OnramperClient.js.map +1 -1
- package/lib/module/errors.js +19 -5
- package/lib/module/errors.js.map +1 -1
- package/lib/module/generated/OnramperCheckoutButtonConfig.json +1 -0
- package/lib/typescript/commonjs/src/CheckoutButton.d.ts +20 -0
- package/lib/typescript/commonjs/src/CheckoutButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/OnramperClient.d.ts +5 -1
- package/lib/typescript/commonjs/src/OnramperClient.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/errors.d.ts +6 -1
- package/lib/typescript/commonjs/src/errors.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/events.d.ts +10 -0
- package/lib/typescript/commonjs/src/events.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/OnramperCheckoutButton.nitro.d.ts +6 -0
- package/lib/typescript/commonjs/src/specs/OnramperCheckoutButton.nitro.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/specs/OnramperNitro.nitro.d.ts +3 -0
- package/lib/typescript/commonjs/src/specs/OnramperNitro.nitro.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types.d.ts +32 -3
- package/lib/typescript/commonjs/src/types.d.ts.map +1 -1
- package/lib/typescript/module/src/CheckoutButton.d.ts +20 -0
- package/lib/typescript/module/src/CheckoutButton.d.ts.map +1 -0
- package/lib/typescript/module/src/OnramperClient.d.ts +5 -1
- package/lib/typescript/module/src/OnramperClient.d.ts.map +1 -1
- package/lib/typescript/module/src/errors.d.ts +6 -1
- package/lib/typescript/module/src/errors.d.ts.map +1 -1
- package/lib/typescript/module/src/events.d.ts +10 -0
- package/lib/typescript/module/src/events.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +1 -1
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/specs/OnramperCheckoutButton.nitro.d.ts +6 -0
- package/lib/typescript/module/src/specs/OnramperCheckoutButton.nitro.d.ts.map +1 -1
- package/lib/typescript/module/src/specs/OnramperNitro.nitro.d.ts +3 -0
- package/lib/typescript/module/src/specs/OnramperNitro.nitro.d.ts.map +1 -1
- package/lib/typescript/module/src/types.d.ts +32 -3
- package/lib/typescript/module/src/types.d.ts.map +1 -1
- package/nitrogen/generated/ios/OnramperReactNative-Swift-Cxx-Bridge.cpp +11 -3
- package/nitrogen/generated/ios/OnramperReactNative-Swift-Cxx-Bridge.hpp +44 -7
- package/nitrogen/generated/ios/c++/HybridOnramperCheckoutButtonSpecSwift.hpp +9 -0
- package/nitrogen/generated/ios/c++/HybridOnramperNitroSpecSwift.hpp +6 -0
- package/nitrogen/generated/ios/c++/views/HybridOnramperCheckoutButtonComponent.mm +5 -0
- package/nitrogen/generated/ios/swift/Func_void_double.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +5 -5
- package/nitrogen/generated/ios/swift/HybridOnramperCheckoutButtonSpec.swift +1 -0
- package/nitrogen/generated/ios/swift/HybridOnramperCheckoutButtonSpec_cxx.swift +32 -0
- package/nitrogen/generated/ios/swift/HybridOnramperNitroSpec.swift +1 -0
- package/nitrogen/generated/ios/swift/HybridOnramperNitroSpec_cxx.swift +27 -11
- package/nitrogen/generated/ios/swift/OnramperNitroConfig.swift +16 -6
- package/nitrogen/generated/shared/c++/HybridOnramperCheckoutButtonSpec.cpp +2 -0
- package/nitrogen/generated/shared/c++/HybridOnramperCheckoutButtonSpec.hpp +4 -0
- package/nitrogen/generated/shared/c++/HybridOnramperNitroSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridOnramperNitroSpec.hpp +1 -0
- package/nitrogen/generated/shared/c++/OnramperNitroConfig.hpp +10 -2
- package/nitrogen/generated/shared/c++/views/HybridOnramperCheckoutButtonComponent.cpp +11 -0
- package/nitrogen/generated/shared/c++/views/HybridOnramperCheckoutButtonComponent.hpp +3 -2
- package/nitrogen/generated/shared/json/OnramperCheckoutButtonConfig.json +1 -0
- package/package.json +5 -2
- package/src/CheckoutButton.ts +28 -0
- package/src/OnramperClient.ts +69 -9
- package/src/errors.ts +29 -6
- package/src/events.ts +5 -0
- package/src/generated/OnramperCheckoutButtonConfig.json +1 -0
- package/src/index.ts +3 -0
- package/src/specs/OnramperCheckoutButton.nitro.ts +6 -0
- package/src/specs/OnramperNitro.nitro.ts +3 -0
- package/src/types.ts +36 -3
|
Binary file
|
|
@@ -9,12 +9,14 @@ import Foundation
|
|
|
9
9
|
import Foundation/*.Bundle*/
|
|
10
10
|
import Foundation/*.ProcessInfo*/
|
|
11
11
|
import Foundation/*.URL*/
|
|
12
|
+
import PassKit
|
|
12
13
|
import Security
|
|
13
14
|
import Swift
|
|
14
15
|
import SwiftUI
|
|
15
16
|
import UIKit
|
|
16
17
|
import WebKit
|
|
17
18
|
import _Concurrency
|
|
19
|
+
import _PassKit_SwiftUI
|
|
18
20
|
import _StringProcessing
|
|
19
21
|
import _SwiftConcurrencyShims
|
|
20
22
|
import _WebKit_SwiftUI
|
|
@@ -33,6 +35,24 @@ extension OnramperSDK.ToSRequirement {
|
|
|
33
35
|
public func consentSentencePlainText(buttonLabel: Swift.String) -> Swift.String?
|
|
34
36
|
#endif
|
|
35
37
|
}
|
|
38
|
+
public struct OnramperLogRecord : Swift.Sendable, Swift.Equatable {
|
|
39
|
+
public let timestamp: Foundation.Date
|
|
40
|
+
public let level: OnramperSDK.LogLevel
|
|
41
|
+
public let category: Swift.String
|
|
42
|
+
public let event: Swift.String
|
|
43
|
+
public let context: [Swift.String : Swift.String]
|
|
44
|
+
public var message: Swift.String {
|
|
45
|
+
get
|
|
46
|
+
}
|
|
47
|
+
public init(timestamp: Foundation.Date = Date(), level: OnramperSDK.LogLevel, category: Swift.String, event: Swift.String, context: [Swift.String : Swift.String])
|
|
48
|
+
public static func == (a: OnramperSDK.OnramperLogRecord, b: OnramperSDK.OnramperLogRecord) -> Swift.Bool
|
|
49
|
+
}
|
|
50
|
+
public typealias OnramperLogHandler = @Sendable (OnramperSDK.OnramperLogRecord) -> Swift.Void
|
|
51
|
+
public enum OnramperLog {
|
|
52
|
+
public static let subsystem: Swift.String
|
|
53
|
+
public static let isVerboseBuild: Swift.Bool
|
|
54
|
+
public static let systemHandler: @Sendable (_ record: OnramperSDK.OnramperLogRecord) -> Swift.Void
|
|
55
|
+
}
|
|
36
56
|
public enum LogLevel : Swift.Int, Swift.Sendable, Swift.Comparable {
|
|
37
57
|
case off
|
|
38
58
|
case error
|
|
@@ -47,6 +67,14 @@ public enum LogLevel : Swift.Int, Swift.Sendable, Swift.Comparable {
|
|
|
47
67
|
get
|
|
48
68
|
}
|
|
49
69
|
}
|
|
70
|
+
extension OnramperSDK.OnramperError {
|
|
71
|
+
public var userMessage: Swift.String {
|
|
72
|
+
get
|
|
73
|
+
}
|
|
74
|
+
public var supportCode: Swift.String {
|
|
75
|
+
get
|
|
76
|
+
}
|
|
77
|
+
}
|
|
50
78
|
public enum OnramperError : Foundation.LocalizedError, Swift.Equatable, Swift.Sendable {
|
|
51
79
|
case notInitialized
|
|
52
80
|
case initializationFailed(Swift.String)
|
|
@@ -56,6 +84,7 @@ public enum OnramperError : Foundation.LocalizedError, Swift.Equatable, Swift.Se
|
|
|
56
84
|
case networkError(code: Swift.Int, message: Swift.String)
|
|
57
85
|
case decodingError(Swift.String)
|
|
58
86
|
case timeout
|
|
87
|
+
case paymentFailed(Swift.String)
|
|
59
88
|
case requirementNotSatisfied(Swift.String)
|
|
60
89
|
case amountOutOfRange(min: Swift.Double, max: Swift.Double)
|
|
61
90
|
case oidcFlowCancelled
|
|
@@ -65,6 +94,7 @@ public enum OnramperError : Foundation.LocalizedError, Swift.Equatable, Swift.Se
|
|
|
65
94
|
case userTokenRefreshFailed(Swift.String)
|
|
66
95
|
case webviewLoadFailed(Swift.String)
|
|
67
96
|
case deepLinkFailed(Swift.String)
|
|
97
|
+
case providerFailed(Swift.String)
|
|
68
98
|
case invalidRequest(field: Swift.String?, debugInfo: Swift.String?)
|
|
69
99
|
case quoteUnavailable(debugInfo: Swift.String?)
|
|
70
100
|
case checkoutForbidden(debugInfo: Swift.String?)
|
|
@@ -74,6 +104,7 @@ public enum OnramperError : Foundation.LocalizedError, Swift.Equatable, Swift.Se
|
|
|
74
104
|
case deviceBlocked
|
|
75
105
|
case securityStorageFailed(status: Swift.Int32)
|
|
76
106
|
case securityTrustFailed(host: Swift.String)
|
|
107
|
+
case applePayNotConfigured
|
|
77
108
|
#if compiler(>=5.3) && $NonescapableTypes
|
|
78
109
|
public var errorDescription: Swift.String? {
|
|
79
110
|
get
|
|
@@ -95,8 +126,12 @@ public enum CheckoutEvent : Swift.Sendable {
|
|
|
95
126
|
case providerReady
|
|
96
127
|
case paymentAuthorized
|
|
97
128
|
case paymentProcessing
|
|
129
|
+
case paymentPending
|
|
98
130
|
case paymentCancelled
|
|
99
131
|
case providerError(reason: Swift.String)
|
|
132
|
+
case challengeStarted
|
|
133
|
+
case challengeCompleted
|
|
134
|
+
case customerOnboardingRequired
|
|
100
135
|
}
|
|
101
136
|
@_Concurrency.MainActor public protocol OnramperDelegate : AnyObject {
|
|
102
137
|
@_Concurrency.MainActor func onramperClient(_ client: OnramperSDK.OnramperClient, didChangeState state: OnramperSDK.OnramperState)
|
|
@@ -123,12 +158,20 @@ public struct CheckoutFinalizeRequest : Swift.Codable, Swift.Sendable {
|
|
|
123
158
|
public let onramperTransactionData: OnramperSDK.OnramperTransactionData
|
|
124
159
|
public var requirementCompletions: [OnramperSDK.RequirementCompletion]?
|
|
125
160
|
public var partnerContext: Swift.String?
|
|
161
|
+
public var providerBootstrap: OnramperSDK.ProviderBootstrapRequest?
|
|
126
162
|
#if compiler(>=5.3) && $NonescapableTypes
|
|
127
|
-
public init(headlessCheckoutId: Swift.String, quote: OnramperSDK.QuoteResponse, encryption: OnramperSDK.EncryptedPayload, onramperTransactionData: OnramperSDK.OnramperTransactionData, requirementCompletions: [OnramperSDK.RequirementCompletion]? = nil, partnerContext: Swift.String? = nil)
|
|
163
|
+
public init(headlessCheckoutId: Swift.String, quote: OnramperSDK.QuoteResponse, encryption: OnramperSDK.EncryptedPayload, onramperTransactionData: OnramperSDK.OnramperTransactionData, requirementCompletions: [OnramperSDK.RequirementCompletion]? = nil, partnerContext: Swift.String? = nil, providerBootstrap: OnramperSDK.ProviderBootstrapRequest? = nil)
|
|
128
164
|
#endif
|
|
129
165
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
130
166
|
public init(from decoder: any Swift.Decoder) throws
|
|
131
167
|
}
|
|
168
|
+
public struct ProviderBootstrapRequest : Swift.Codable, Swift.Sendable {
|
|
169
|
+
public let publicKey: Swift.String
|
|
170
|
+
public let channelId: Swift.String
|
|
171
|
+
public init(publicKey: Swift.String, channelId: Swift.String)
|
|
172
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
173
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
174
|
+
}
|
|
132
175
|
public enum CompletionRequirementType : Swift.String, Swift.Codable, Swift.Sendable {
|
|
133
176
|
case tos
|
|
134
177
|
case privacyPolicy
|
|
@@ -171,7 +214,18 @@ public struct HeadlessCheckoutData : Swift.Codable, Swift.Sendable {
|
|
|
171
214
|
public let checkoutPaymentType: OnramperSDK.CheckoutPaymentType
|
|
172
215
|
public let url: Swift.String
|
|
173
216
|
public let renderType: OnramperSDK.RenderType
|
|
174
|
-
public
|
|
217
|
+
public let providerBootstrap: OnramperSDK.ProviderBootstrapResponse?
|
|
218
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
219
|
+
public init(checkoutPaymentType: OnramperSDK.CheckoutPaymentType, url: Swift.String, renderType: OnramperSDK.RenderType, providerBootstrap: OnramperSDK.ProviderBootstrapResponse? = nil)
|
|
220
|
+
#endif
|
|
221
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
222
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
223
|
+
}
|
|
224
|
+
public struct ProviderBootstrapResponse : Swift.Codable, Swift.Sendable {
|
|
225
|
+
public let framesBaseUrl: Swift.String?
|
|
226
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
227
|
+
public init(framesBaseUrl: Swift.String? = nil)
|
|
228
|
+
#endif
|
|
175
229
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
176
230
|
public init(from decoder: any Swift.Decoder) throws
|
|
177
231
|
}
|
|
@@ -365,6 +419,22 @@ public struct EncryptedPayload : Swift.Codable, Swift.Sendable, Swift.Equatable
|
|
|
365
419
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
366
420
|
public init(from decoder: any Swift.Decoder) throws
|
|
367
421
|
}
|
|
422
|
+
public struct QuoteQuery : Swift.Codable, Swift.Sendable {
|
|
423
|
+
public let headlessCheckoutId: Swift.String
|
|
424
|
+
public let onramperTransactionData: OnramperSDK.OnramperTransactionData
|
|
425
|
+
public let providerContext: OnramperSDK.QuoteProviderContext?
|
|
426
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
427
|
+
public init(headlessCheckoutId: Swift.String, onramperTransactionData: OnramperSDK.OnramperTransactionData, providerContext: OnramperSDK.QuoteProviderContext? = nil)
|
|
428
|
+
#endif
|
|
429
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
430
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
431
|
+
}
|
|
432
|
+
public struct HeadlessQuoteResponse : Swift.Codable, Swift.Sendable {
|
|
433
|
+
public let quote: OnramperSDK.QuoteResponse
|
|
434
|
+
public init(quote: OnramperSDK.QuoteResponse)
|
|
435
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
436
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
437
|
+
}
|
|
368
438
|
public struct OnramperUserPrefill : Swift.Sendable, Swift.Equatable {
|
|
369
439
|
public var email: Swift.String?
|
|
370
440
|
public var firstName: Swift.String?
|
|
@@ -384,13 +454,42 @@ public struct QuoteResponse : Swift.Codable, Swift.Sendable, Swift.Equatable {
|
|
|
384
454
|
public let networkFee: Swift.Double
|
|
385
455
|
public let transactionFee: Swift.Double
|
|
386
456
|
public let recommendations: [Swift.String]?
|
|
457
|
+
public let providerContext: OnramperSDK.QuoteResponseProviderContext?
|
|
387
458
|
#if compiler(>=5.3) && $NonescapableTypes
|
|
388
|
-
public init(quoteId: Swift.String, ramp: Swift.String, rate: Swift.Double, payout: Swift.Double, paymentMethod: Swift.String, networkFee: Swift.Double, transactionFee: Swift.Double, recommendations: [Swift.String]? = nil)
|
|
459
|
+
public init(quoteId: Swift.String, ramp: Swift.String, rate: Swift.Double, payout: Swift.Double, paymentMethod: Swift.String, networkFee: Swift.Double, transactionFee: Swift.Double, recommendations: [Swift.String]? = nil, providerContext: OnramperSDK.QuoteResponseProviderContext? = nil)
|
|
389
460
|
#endif
|
|
390
461
|
public static func == (a: OnramperSDK.QuoteResponse, b: OnramperSDK.QuoteResponse) -> Swift.Bool
|
|
391
462
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
392
463
|
public init(from decoder: any Swift.Decoder) throws
|
|
393
464
|
}
|
|
465
|
+
public typealias QuoteProviderContext = [Swift.String : Swift.String]
|
|
466
|
+
public typealias QuoteResponseProviderContext = [Swift.String : OnramperSDK.ProviderJSONValue]
|
|
467
|
+
public enum ProviderJSONValue : Swift.Codable, Swift.Sendable, Swift.Equatable, Swift.ExpressibleByStringLiteral {
|
|
468
|
+
case string(Swift.String), number(Swift.Double), bool(Swift.Bool), null
|
|
469
|
+
case array([OnramperSDK.ProviderJSONValue]), object([Swift.String : OnramperSDK.ProviderJSONValue])
|
|
470
|
+
public init(stringLiteral value: Swift.String)
|
|
471
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
472
|
+
public var stringValue: Swift.String? {
|
|
473
|
+
get
|
|
474
|
+
}
|
|
475
|
+
#endif
|
|
476
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
477
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
478
|
+
public static func == (a: OnramperSDK.ProviderJSONValue, b: OnramperSDK.ProviderJSONValue) -> Swift.Bool
|
|
479
|
+
public typealias ExtendedGraphemeClusterLiteralType = Swift.String
|
|
480
|
+
public typealias StringLiteralType = Swift.String
|
|
481
|
+
public typealias UnicodeScalarLiteralType = Swift.String
|
|
482
|
+
}
|
|
483
|
+
public struct PaymentDisclosure : Swift.Codable, Swift.Sendable, Swift.Equatable {
|
|
484
|
+
public let code: Swift.String
|
|
485
|
+
public let version: Swift.String
|
|
486
|
+
public let contentMarkdown: Swift.String
|
|
487
|
+
public let contentHtml: Swift.String
|
|
488
|
+
public init(code: Swift.String, version: Swift.String, contentMarkdown: Swift.String, contentHtml: Swift.String)
|
|
489
|
+
public static func == (a: OnramperSDK.PaymentDisclosure, b: OnramperSDK.PaymentDisclosure) -> Swift.Bool
|
|
490
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
491
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
492
|
+
}
|
|
394
493
|
public enum TransactionType : Swift.String, Swift.Codable, Swift.Sendable {
|
|
395
494
|
case buy
|
|
396
495
|
case sell
|
|
@@ -490,6 +589,7 @@ public struct OnramperConfiguration : Swift.Sendable {
|
|
|
490
589
|
public let environment: OnramperSDK.OnramperConfiguration.Environment
|
|
491
590
|
public let theme: OnramperSDK.OnramperConfiguration.Theme
|
|
492
591
|
public let logLevel: OnramperSDK.LogLevel
|
|
592
|
+
public let logHandler: OnramperSDK.OnramperLogHandler?
|
|
493
593
|
public let isEventLoggingEnabled: Swift.Bool
|
|
494
594
|
public let isEventConsoleLoggingEnabled: Swift.Bool
|
|
495
595
|
public let sessionExpirationHandler: @Sendable () async throws -> OnramperSDK.SessionCredentials
|
|
@@ -517,7 +617,9 @@ public struct OnramperConfiguration : Swift.Sendable {
|
|
|
517
617
|
get
|
|
518
618
|
}
|
|
519
619
|
}
|
|
520
|
-
|
|
620
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
621
|
+
public init(apiKey: Swift.String, clientId: Swift.String, environment: OnramperSDK.OnramperConfiguration.Environment = .production, theme: OnramperSDK.OnramperConfiguration.Theme = .system, logLevel: OnramperSDK.LogLevel = .off, logHandler: OnramperSDK.OnramperLogHandler? = nil, isEventLoggingEnabled: Swift.Bool = false, isEventConsoleLoggingEnabled: Swift.Bool = false, sessionExpirationHandler: @escaping @Sendable () async throws -> OnramperSDK.SessionCredentials)
|
|
622
|
+
#endif
|
|
521
623
|
}
|
|
522
624
|
public enum OnramperState : Swift.Sendable {
|
|
523
625
|
case idle
|
|
@@ -529,6 +631,7 @@ public enum OnramperState : Swift.Sendable {
|
|
|
529
631
|
case readyToCheckout
|
|
530
632
|
case finalizing
|
|
531
633
|
case rendering(OnramperSDK.OnramperState.RenderContext)
|
|
634
|
+
case paymentPending
|
|
532
635
|
case completed
|
|
533
636
|
case failed(OnramperSDK.OnramperError)
|
|
534
637
|
public struct RenderContext : Swift.Sendable {
|
|
Binary file
|
|
@@ -9,12 +9,14 @@ import Foundation
|
|
|
9
9
|
import Foundation/*.Bundle*/
|
|
10
10
|
import Foundation/*.ProcessInfo*/
|
|
11
11
|
import Foundation/*.URL*/
|
|
12
|
+
import PassKit
|
|
12
13
|
import Security
|
|
13
14
|
import Swift
|
|
14
15
|
import SwiftUI
|
|
15
16
|
import UIKit
|
|
16
17
|
import WebKit
|
|
17
18
|
import _Concurrency
|
|
19
|
+
import _PassKit_SwiftUI
|
|
18
20
|
import _StringProcessing
|
|
19
21
|
import _SwiftConcurrencyShims
|
|
20
22
|
import _WebKit_SwiftUI
|
|
@@ -33,6 +35,24 @@ extension OnramperSDK.ToSRequirement {
|
|
|
33
35
|
public func consentSentencePlainText(buttonLabel: Swift.String) -> Swift.String?
|
|
34
36
|
#endif
|
|
35
37
|
}
|
|
38
|
+
public struct OnramperLogRecord : Swift.Sendable, Swift.Equatable {
|
|
39
|
+
public let timestamp: Foundation.Date
|
|
40
|
+
public let level: OnramperSDK.LogLevel
|
|
41
|
+
public let category: Swift.String
|
|
42
|
+
public let event: Swift.String
|
|
43
|
+
public let context: [Swift.String : Swift.String]
|
|
44
|
+
public var message: Swift.String {
|
|
45
|
+
get
|
|
46
|
+
}
|
|
47
|
+
public init(timestamp: Foundation.Date = Date(), level: OnramperSDK.LogLevel, category: Swift.String, event: Swift.String, context: [Swift.String : Swift.String])
|
|
48
|
+
public static func == (a: OnramperSDK.OnramperLogRecord, b: OnramperSDK.OnramperLogRecord) -> Swift.Bool
|
|
49
|
+
}
|
|
50
|
+
public typealias OnramperLogHandler = @Sendable (OnramperSDK.OnramperLogRecord) -> Swift.Void
|
|
51
|
+
public enum OnramperLog {
|
|
52
|
+
public static let subsystem: Swift.String
|
|
53
|
+
public static let isVerboseBuild: Swift.Bool
|
|
54
|
+
public static let systemHandler: @Sendable (_ record: OnramperSDK.OnramperLogRecord) -> Swift.Void
|
|
55
|
+
}
|
|
36
56
|
public enum LogLevel : Swift.Int, Swift.Sendable, Swift.Comparable {
|
|
37
57
|
case off
|
|
38
58
|
case error
|
|
@@ -47,6 +67,14 @@ public enum LogLevel : Swift.Int, Swift.Sendable, Swift.Comparable {
|
|
|
47
67
|
get
|
|
48
68
|
}
|
|
49
69
|
}
|
|
70
|
+
extension OnramperSDK.OnramperError {
|
|
71
|
+
public var userMessage: Swift.String {
|
|
72
|
+
get
|
|
73
|
+
}
|
|
74
|
+
public var supportCode: Swift.String {
|
|
75
|
+
get
|
|
76
|
+
}
|
|
77
|
+
}
|
|
50
78
|
public enum OnramperError : Foundation.LocalizedError, Swift.Equatable, Swift.Sendable {
|
|
51
79
|
case notInitialized
|
|
52
80
|
case initializationFailed(Swift.String)
|
|
@@ -56,6 +84,7 @@ public enum OnramperError : Foundation.LocalizedError, Swift.Equatable, Swift.Se
|
|
|
56
84
|
case networkError(code: Swift.Int, message: Swift.String)
|
|
57
85
|
case decodingError(Swift.String)
|
|
58
86
|
case timeout
|
|
87
|
+
case paymentFailed(Swift.String)
|
|
59
88
|
case requirementNotSatisfied(Swift.String)
|
|
60
89
|
case amountOutOfRange(min: Swift.Double, max: Swift.Double)
|
|
61
90
|
case oidcFlowCancelled
|
|
@@ -65,6 +94,7 @@ public enum OnramperError : Foundation.LocalizedError, Swift.Equatable, Swift.Se
|
|
|
65
94
|
case userTokenRefreshFailed(Swift.String)
|
|
66
95
|
case webviewLoadFailed(Swift.String)
|
|
67
96
|
case deepLinkFailed(Swift.String)
|
|
97
|
+
case providerFailed(Swift.String)
|
|
68
98
|
case invalidRequest(field: Swift.String?, debugInfo: Swift.String?)
|
|
69
99
|
case quoteUnavailable(debugInfo: Swift.String?)
|
|
70
100
|
case checkoutForbidden(debugInfo: Swift.String?)
|
|
@@ -74,6 +104,7 @@ public enum OnramperError : Foundation.LocalizedError, Swift.Equatable, Swift.Se
|
|
|
74
104
|
case deviceBlocked
|
|
75
105
|
case securityStorageFailed(status: Swift.Int32)
|
|
76
106
|
case securityTrustFailed(host: Swift.String)
|
|
107
|
+
case applePayNotConfigured
|
|
77
108
|
#if compiler(>=5.3) && $NonescapableTypes
|
|
78
109
|
public var errorDescription: Swift.String? {
|
|
79
110
|
get
|
|
@@ -95,8 +126,12 @@ public enum CheckoutEvent : Swift.Sendable {
|
|
|
95
126
|
case providerReady
|
|
96
127
|
case paymentAuthorized
|
|
97
128
|
case paymentProcessing
|
|
129
|
+
case paymentPending
|
|
98
130
|
case paymentCancelled
|
|
99
131
|
case providerError(reason: Swift.String)
|
|
132
|
+
case challengeStarted
|
|
133
|
+
case challengeCompleted
|
|
134
|
+
case customerOnboardingRequired
|
|
100
135
|
}
|
|
101
136
|
@_Concurrency.MainActor public protocol OnramperDelegate : AnyObject {
|
|
102
137
|
@_Concurrency.MainActor func onramperClient(_ client: OnramperSDK.OnramperClient, didChangeState state: OnramperSDK.OnramperState)
|
|
@@ -123,12 +158,20 @@ public struct CheckoutFinalizeRequest : Swift.Codable, Swift.Sendable {
|
|
|
123
158
|
public let onramperTransactionData: OnramperSDK.OnramperTransactionData
|
|
124
159
|
public var requirementCompletions: [OnramperSDK.RequirementCompletion]?
|
|
125
160
|
public var partnerContext: Swift.String?
|
|
161
|
+
public var providerBootstrap: OnramperSDK.ProviderBootstrapRequest?
|
|
126
162
|
#if compiler(>=5.3) && $NonescapableTypes
|
|
127
|
-
public init(headlessCheckoutId: Swift.String, quote: OnramperSDK.QuoteResponse, encryption: OnramperSDK.EncryptedPayload, onramperTransactionData: OnramperSDK.OnramperTransactionData, requirementCompletions: [OnramperSDK.RequirementCompletion]? = nil, partnerContext: Swift.String? = nil)
|
|
163
|
+
public init(headlessCheckoutId: Swift.String, quote: OnramperSDK.QuoteResponse, encryption: OnramperSDK.EncryptedPayload, onramperTransactionData: OnramperSDK.OnramperTransactionData, requirementCompletions: [OnramperSDK.RequirementCompletion]? = nil, partnerContext: Swift.String? = nil, providerBootstrap: OnramperSDK.ProviderBootstrapRequest? = nil)
|
|
128
164
|
#endif
|
|
129
165
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
130
166
|
public init(from decoder: any Swift.Decoder) throws
|
|
131
167
|
}
|
|
168
|
+
public struct ProviderBootstrapRequest : Swift.Codable, Swift.Sendable {
|
|
169
|
+
public let publicKey: Swift.String
|
|
170
|
+
public let channelId: Swift.String
|
|
171
|
+
public init(publicKey: Swift.String, channelId: Swift.String)
|
|
172
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
173
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
174
|
+
}
|
|
132
175
|
public enum CompletionRequirementType : Swift.String, Swift.Codable, Swift.Sendable {
|
|
133
176
|
case tos
|
|
134
177
|
case privacyPolicy
|
|
@@ -171,7 +214,18 @@ public struct HeadlessCheckoutData : Swift.Codable, Swift.Sendable {
|
|
|
171
214
|
public let checkoutPaymentType: OnramperSDK.CheckoutPaymentType
|
|
172
215
|
public let url: Swift.String
|
|
173
216
|
public let renderType: OnramperSDK.RenderType
|
|
174
|
-
public
|
|
217
|
+
public let providerBootstrap: OnramperSDK.ProviderBootstrapResponse?
|
|
218
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
219
|
+
public init(checkoutPaymentType: OnramperSDK.CheckoutPaymentType, url: Swift.String, renderType: OnramperSDK.RenderType, providerBootstrap: OnramperSDK.ProviderBootstrapResponse? = nil)
|
|
220
|
+
#endif
|
|
221
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
222
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
223
|
+
}
|
|
224
|
+
public struct ProviderBootstrapResponse : Swift.Codable, Swift.Sendable {
|
|
225
|
+
public let framesBaseUrl: Swift.String?
|
|
226
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
227
|
+
public init(framesBaseUrl: Swift.String? = nil)
|
|
228
|
+
#endif
|
|
175
229
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
176
230
|
public init(from decoder: any Swift.Decoder) throws
|
|
177
231
|
}
|
|
@@ -365,6 +419,22 @@ public struct EncryptedPayload : Swift.Codable, Swift.Sendable, Swift.Equatable
|
|
|
365
419
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
366
420
|
public init(from decoder: any Swift.Decoder) throws
|
|
367
421
|
}
|
|
422
|
+
public struct QuoteQuery : Swift.Codable, Swift.Sendable {
|
|
423
|
+
public let headlessCheckoutId: Swift.String
|
|
424
|
+
public let onramperTransactionData: OnramperSDK.OnramperTransactionData
|
|
425
|
+
public let providerContext: OnramperSDK.QuoteProviderContext?
|
|
426
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
427
|
+
public init(headlessCheckoutId: Swift.String, onramperTransactionData: OnramperSDK.OnramperTransactionData, providerContext: OnramperSDK.QuoteProviderContext? = nil)
|
|
428
|
+
#endif
|
|
429
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
430
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
431
|
+
}
|
|
432
|
+
public struct HeadlessQuoteResponse : Swift.Codable, Swift.Sendable {
|
|
433
|
+
public let quote: OnramperSDK.QuoteResponse
|
|
434
|
+
public init(quote: OnramperSDK.QuoteResponse)
|
|
435
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
436
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
437
|
+
}
|
|
368
438
|
public struct OnramperUserPrefill : Swift.Sendable, Swift.Equatable {
|
|
369
439
|
public var email: Swift.String?
|
|
370
440
|
public var firstName: Swift.String?
|
|
@@ -384,13 +454,42 @@ public struct QuoteResponse : Swift.Codable, Swift.Sendable, Swift.Equatable {
|
|
|
384
454
|
public let networkFee: Swift.Double
|
|
385
455
|
public let transactionFee: Swift.Double
|
|
386
456
|
public let recommendations: [Swift.String]?
|
|
457
|
+
public let providerContext: OnramperSDK.QuoteResponseProviderContext?
|
|
387
458
|
#if compiler(>=5.3) && $NonescapableTypes
|
|
388
|
-
public init(quoteId: Swift.String, ramp: Swift.String, rate: Swift.Double, payout: Swift.Double, paymentMethod: Swift.String, networkFee: Swift.Double, transactionFee: Swift.Double, recommendations: [Swift.String]? = nil)
|
|
459
|
+
public init(quoteId: Swift.String, ramp: Swift.String, rate: Swift.Double, payout: Swift.Double, paymentMethod: Swift.String, networkFee: Swift.Double, transactionFee: Swift.Double, recommendations: [Swift.String]? = nil, providerContext: OnramperSDK.QuoteResponseProviderContext? = nil)
|
|
389
460
|
#endif
|
|
390
461
|
public static func == (a: OnramperSDK.QuoteResponse, b: OnramperSDK.QuoteResponse) -> Swift.Bool
|
|
391
462
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
392
463
|
public init(from decoder: any Swift.Decoder) throws
|
|
393
464
|
}
|
|
465
|
+
public typealias QuoteProviderContext = [Swift.String : Swift.String]
|
|
466
|
+
public typealias QuoteResponseProviderContext = [Swift.String : OnramperSDK.ProviderJSONValue]
|
|
467
|
+
public enum ProviderJSONValue : Swift.Codable, Swift.Sendable, Swift.Equatable, Swift.ExpressibleByStringLiteral {
|
|
468
|
+
case string(Swift.String), number(Swift.Double), bool(Swift.Bool), null
|
|
469
|
+
case array([OnramperSDK.ProviderJSONValue]), object([Swift.String : OnramperSDK.ProviderJSONValue])
|
|
470
|
+
public init(stringLiteral value: Swift.String)
|
|
471
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
472
|
+
public var stringValue: Swift.String? {
|
|
473
|
+
get
|
|
474
|
+
}
|
|
475
|
+
#endif
|
|
476
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
477
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
478
|
+
public static func == (a: OnramperSDK.ProviderJSONValue, b: OnramperSDK.ProviderJSONValue) -> Swift.Bool
|
|
479
|
+
public typealias ExtendedGraphemeClusterLiteralType = Swift.String
|
|
480
|
+
public typealias StringLiteralType = Swift.String
|
|
481
|
+
public typealias UnicodeScalarLiteralType = Swift.String
|
|
482
|
+
}
|
|
483
|
+
public struct PaymentDisclosure : Swift.Codable, Swift.Sendable, Swift.Equatable {
|
|
484
|
+
public let code: Swift.String
|
|
485
|
+
public let version: Swift.String
|
|
486
|
+
public let contentMarkdown: Swift.String
|
|
487
|
+
public let contentHtml: Swift.String
|
|
488
|
+
public init(code: Swift.String, version: Swift.String, contentMarkdown: Swift.String, contentHtml: Swift.String)
|
|
489
|
+
public static func == (a: OnramperSDK.PaymentDisclosure, b: OnramperSDK.PaymentDisclosure) -> Swift.Bool
|
|
490
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
491
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
492
|
+
}
|
|
394
493
|
public enum TransactionType : Swift.String, Swift.Codable, Swift.Sendable {
|
|
395
494
|
case buy
|
|
396
495
|
case sell
|
|
@@ -490,6 +589,7 @@ public struct OnramperConfiguration : Swift.Sendable {
|
|
|
490
589
|
public let environment: OnramperSDK.OnramperConfiguration.Environment
|
|
491
590
|
public let theme: OnramperSDK.OnramperConfiguration.Theme
|
|
492
591
|
public let logLevel: OnramperSDK.LogLevel
|
|
592
|
+
public let logHandler: OnramperSDK.OnramperLogHandler?
|
|
493
593
|
public let isEventLoggingEnabled: Swift.Bool
|
|
494
594
|
public let isEventConsoleLoggingEnabled: Swift.Bool
|
|
495
595
|
public let sessionExpirationHandler: @Sendable () async throws -> OnramperSDK.SessionCredentials
|
|
@@ -517,7 +617,9 @@ public struct OnramperConfiguration : Swift.Sendable {
|
|
|
517
617
|
get
|
|
518
618
|
}
|
|
519
619
|
}
|
|
520
|
-
|
|
620
|
+
#if compiler(>=5.3) && $NonescapableTypes
|
|
621
|
+
public init(apiKey: Swift.String, clientId: Swift.String, environment: OnramperSDK.OnramperConfiguration.Environment = .production, theme: OnramperSDK.OnramperConfiguration.Theme = .system, logLevel: OnramperSDK.LogLevel = .off, logHandler: OnramperSDK.OnramperLogHandler? = nil, isEventLoggingEnabled: Swift.Bool = false, isEventConsoleLoggingEnabled: Swift.Bool = false, sessionExpirationHandler: @escaping @Sendable () async throws -> OnramperSDK.SessionCredentials)
|
|
622
|
+
#endif
|
|
521
623
|
}
|
|
522
624
|
public enum OnramperState : Swift.Sendable {
|
|
523
625
|
case idle
|
|
@@ -529,6 +631,7 @@ public enum OnramperState : Swift.Sendable {
|
|
|
529
631
|
case readyToCheckout
|
|
530
632
|
case finalizing
|
|
531
633
|
case rendering(OnramperSDK.OnramperState.RenderContext)
|
|
634
|
+
case paymentPending
|
|
532
635
|
case completed
|
|
533
636
|
case failed(OnramperSDK.OnramperError)
|
|
534
637
|
public struct RenderContext : Swift.Sendable {
|
|
Binary file
|