@usesophi/sophi-event-react-native 0.0.0-stage → 0.0.1-alpha01
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/LICENSE +4 -0
- package/README.md +116 -2
- package/SophiEventSDK-ReactNative.podspec +23 -0
- package/android/build.gradle +39 -0
- package/android/consumer-rules.pro +1 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/java/com/sophi/eventreactnative/SophiEventsModule.kt +199 -0
- package/android/src/main/java/com/sophi/eventreactnative/SophiEventsPackage.kt +11 -0
- package/index.ts +4 -0
- package/ios/Frameworks/SophiEventSDK.xcframework/Info.plist +44 -0
- package/ios/Frameworks/SophiEventSDK.xcframework/ios-arm64/SophiEventSDK.framework/Headers/SophiEventSDK-Swift.h +382 -0
- package/ios/Frameworks/SophiEventSDK.xcframework/ios-arm64/SophiEventSDK.framework/Info.plist +0 -0
- package/ios/Frameworks/SophiEventSDK.xcframework/ios-arm64/SophiEventSDK.framework/Modules/SophiEventSDK.swiftmodule/arm64-apple-ios.abi.json +21707 -0
- package/ios/Frameworks/SophiEventSDK.xcframework/ios-arm64/SophiEventSDK.framework/Modules/SophiEventSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +413 -0
- package/ios/Frameworks/SophiEventSDK.xcframework/ios-arm64/SophiEventSDK.framework/Modules/SophiEventSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/Frameworks/SophiEventSDK.xcframework/ios-arm64/SophiEventSDK.framework/Modules/SophiEventSDK.swiftmodule/arm64-apple-ios.swiftinterface +413 -0
- package/ios/Frameworks/SophiEventSDK.xcframework/ios-arm64/SophiEventSDK.framework/Modules/module.modulemap +3 -0
- package/ios/Frameworks/SophiEventSDK.xcframework/ios-arm64/SophiEventSDK.framework/PrivacyInfo.xcprivacy +153 -0
- package/ios/Frameworks/SophiEventSDK.xcframework/ios-arm64/SophiEventSDK.framework/SophiEventSDK +0 -0
- package/ios/Frameworks/SophiEventSDK.xcframework/ios-arm64_x86_64-simulator/SophiEventSDK.framework/Headers/SophiEventSDK-Swift.h +760 -0
- package/ios/Frameworks/SophiEventSDK.xcframework/ios-arm64_x86_64-simulator/SophiEventSDK.framework/Info.plist +0 -0
- package/ios/Frameworks/SophiEventSDK.xcframework/ios-arm64_x86_64-simulator/SophiEventSDK.framework/Modules/SophiEventSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +21707 -0
- package/ios/Frameworks/SophiEventSDK.xcframework/ios-arm64_x86_64-simulator/SophiEventSDK.framework/Modules/SophiEventSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +413 -0
- package/ios/Frameworks/SophiEventSDK.xcframework/ios-arm64_x86_64-simulator/SophiEventSDK.framework/Modules/SophiEventSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/SophiEventSDK.xcframework/ios-arm64_x86_64-simulator/SophiEventSDK.framework/Modules/SophiEventSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +413 -0
- package/ios/Frameworks/SophiEventSDK.xcframework/ios-arm64_x86_64-simulator/SophiEventSDK.framework/Modules/SophiEventSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +21707 -0
- package/ios/Frameworks/SophiEventSDK.xcframework/ios-arm64_x86_64-simulator/SophiEventSDK.framework/Modules/SophiEventSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +413 -0
- package/ios/Frameworks/SophiEventSDK.xcframework/ios-arm64_x86_64-simulator/SophiEventSDK.framework/Modules/SophiEventSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/SophiEventSDK.xcframework/ios-arm64_x86_64-simulator/SophiEventSDK.framework/Modules/SophiEventSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +413 -0
- package/ios/Frameworks/SophiEventSDK.xcframework/ios-arm64_x86_64-simulator/SophiEventSDK.framework/Modules/module.modulemap +3 -0
- package/ios/Frameworks/SophiEventSDK.xcframework/ios-arm64_x86_64-simulator/SophiEventSDK.framework/PrivacyInfo.xcprivacy +153 -0
- package/ios/Frameworks/SophiEventSDK.xcframework/ios-arm64_x86_64-simulator/SophiEventSDK.framework/SophiEventSDK +0 -0
- package/ios/Frameworks/SophiIdentity.xcframework/Info.plist +44 -0
- package/ios/Frameworks/SophiIdentity.xcframework/ios-arm64/SophiIdentity.framework/Headers/SophiIdentity-Swift.h +382 -0
- package/ios/Frameworks/SophiIdentity.xcframework/ios-arm64/SophiIdentity.framework/Info.plist +0 -0
- package/ios/Frameworks/SophiIdentity.xcframework/ios-arm64/SophiIdentity.framework/Modules/SophiIdentity.swiftmodule/arm64-apple-ios.abi.json +6314 -0
- package/ios/Frameworks/SophiIdentity.xcframework/ios-arm64/SophiIdentity.framework/Modules/SophiIdentity.swiftmodule/arm64-apple-ios.private.swiftinterface +170 -0
- package/ios/Frameworks/SophiIdentity.xcframework/ios-arm64/SophiIdentity.framework/Modules/SophiIdentity.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/Frameworks/SophiIdentity.xcframework/ios-arm64/SophiIdentity.framework/Modules/SophiIdentity.swiftmodule/arm64-apple-ios.swiftinterface +170 -0
- package/ios/Frameworks/SophiIdentity.xcframework/ios-arm64/SophiIdentity.framework/Modules/module.modulemap +3 -0
- package/ios/Frameworks/SophiIdentity.xcframework/ios-arm64/SophiIdentity.framework/PrivacyInfo.xcprivacy +50 -0
- package/ios/Frameworks/SophiIdentity.xcframework/ios-arm64/SophiIdentity.framework/SophiIdentity +0 -0
- package/ios/Frameworks/SophiIdentity.xcframework/ios-arm64_x86_64-simulator/SophiIdentity.framework/Headers/SophiIdentity-Swift.h +760 -0
- package/ios/Frameworks/SophiIdentity.xcframework/ios-arm64_x86_64-simulator/SophiIdentity.framework/Info.plist +0 -0
- package/ios/Frameworks/SophiIdentity.xcframework/ios-arm64_x86_64-simulator/SophiIdentity.framework/Modules/SophiIdentity.swiftmodule/arm64-apple-ios-simulator.abi.json +6314 -0
- package/ios/Frameworks/SophiIdentity.xcframework/ios-arm64_x86_64-simulator/SophiIdentity.framework/Modules/SophiIdentity.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +170 -0
- package/ios/Frameworks/SophiIdentity.xcframework/ios-arm64_x86_64-simulator/SophiIdentity.framework/Modules/SophiIdentity.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/SophiIdentity.xcframework/ios-arm64_x86_64-simulator/SophiIdentity.framework/Modules/SophiIdentity.swiftmodule/arm64-apple-ios-simulator.swiftinterface +170 -0
- package/ios/Frameworks/SophiIdentity.xcframework/ios-arm64_x86_64-simulator/SophiIdentity.framework/Modules/SophiIdentity.swiftmodule/x86_64-apple-ios-simulator.abi.json +6314 -0
- package/ios/Frameworks/SophiIdentity.xcframework/ios-arm64_x86_64-simulator/SophiIdentity.framework/Modules/SophiIdentity.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +170 -0
- package/ios/Frameworks/SophiIdentity.xcframework/ios-arm64_x86_64-simulator/SophiIdentity.framework/Modules/SophiIdentity.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/SophiIdentity.xcframework/ios-arm64_x86_64-simulator/SophiIdentity.framework/Modules/SophiIdentity.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +170 -0
- package/ios/Frameworks/SophiIdentity.xcframework/ios-arm64_x86_64-simulator/SophiIdentity.framework/Modules/module.modulemap +3 -0
- package/ios/Frameworks/SophiIdentity.xcframework/ios-arm64_x86_64-simulator/SophiIdentity.framework/PrivacyInfo.xcprivacy +50 -0
- package/ios/Frameworks/SophiIdentity.xcframework/ios-arm64_x86_64-simulator/SophiIdentity.framework/SophiIdentity +0 -0
- package/ios/SophiEventsModule.m +54 -0
- package/ios/SophiEventsModuleImpl.swift +178 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +10 -0
- package/lib/src/SophiEvents.d.ts +3 -0
- package/lib/src/SophiEvents.js +11 -0
- package/lib/src/client.d.ts +60 -0
- package/lib/src/client.js +151 -0
- package/lib/src/types.d.ts +204 -0
- package/lib/src/types.js +3 -0
- package/lib/src/wire.d.ts +10 -0
- package/lib/src/wire.js +191 -0
- package/native-versions.json +16 -0
- package/package.json +62 -4
- package/react-native.config.js +10 -0
- package/src/SophiEvents.ts +13 -0
- package/src/client.ts +191 -0
- package/src/types.ts +216 -0
- package/src/wire.ts +189 -0
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
// swift-interface-format-version: 1.0
|
|
2
|
+
// swift-compiler-version: Apple Swift version 6.3.3 effective-5.10 (swiftlang-6.3.3.1.3 clang-2100.1.1.101)
|
|
3
|
+
// swift-module-flags: -target arm64-apple-ios15.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -O -enable-experimental-feature DebugDescriptionMacro -enable-bare-slash-regex -module-name SophiIdentity -module-alias Module___SophiIdentity=SophiIdentity -module-alias Module____StringProcessing=_StringProcessing -module-alias Module____SwiftConcurrencyShims=_SwiftConcurrencyShims -module-alias Module____Concurrency=_Concurrency -module-alias Module___CoreFoundation=CoreFoundation -module-alias Module___CryptoKit=CryptoKit
|
|
4
|
+
// swift-module-flags-ignorable: -no-verify-emitted-module-interface -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3
|
|
5
|
+
import Module___CoreFoundation
|
|
6
|
+
import Module___CryptoKit
|
|
7
|
+
import Foundation
|
|
8
|
+
import Swift
|
|
9
|
+
import Module____Concurrency
|
|
10
|
+
import Module____StringProcessing
|
|
11
|
+
import Module____SwiftConcurrencyShims
|
|
12
|
+
public enum SophiIdentityError : Swift.Error, Swift.Equatable, Swift.Sendable {
|
|
13
|
+
case invalidConfiguration, disabled, staleGeneration, invalidResponse
|
|
14
|
+
case http(Swift.Int)
|
|
15
|
+
case storageUnavailable, mergePending
|
|
16
|
+
public static func == (a: Module___SophiIdentity.SophiIdentityError, b: Module___SophiIdentity.SophiIdentityError) -> Swift.Bool
|
|
17
|
+
}
|
|
18
|
+
public struct SophiIdentityConfiguration : Swift.Sendable {
|
|
19
|
+
public let apiKey: Swift.String
|
|
20
|
+
public let baseURL: Foundation.URL
|
|
21
|
+
public let namespace: Swift.String
|
|
22
|
+
public init(apiKey: Swift.String, baseURL: Foundation.URL) throws
|
|
23
|
+
}
|
|
24
|
+
public struct SophiShopperIdentity : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
25
|
+
public var ownerID: Foundation.UUID
|
|
26
|
+
public var clientID: Swift.String?
|
|
27
|
+
public var externalUserID: Swift.String?
|
|
28
|
+
public var pendingMergeSourceID: Swift.String?
|
|
29
|
+
public var aliasOwnerIDs: [Foundation.UUID]?
|
|
30
|
+
public init(ownerID: Foundation.UUID = UUID(), clientID: Swift.String? = nil, externalUserID: Swift.String? = nil, pendingMergeSourceID: Swift.String? = nil, aliasOwnerIDs: [Foundation.UUID]? = nil)
|
|
31
|
+
public var ownerIDs: [Foundation.UUID] {
|
|
32
|
+
get
|
|
33
|
+
}
|
|
34
|
+
public static func == (a: Module___SophiIdentity.SophiShopperIdentity, b: Module___SophiIdentity.SophiShopperIdentity) -> Swift.Bool
|
|
35
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
36
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
37
|
+
}
|
|
38
|
+
public struct SophiHeldIdentity : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
39
|
+
public var identity: Module___SophiIdentity.SophiShopperIdentity
|
|
40
|
+
public var heldAt: Foundation.TimeInterval
|
|
41
|
+
public init(identity: Module___SophiIdentity.SophiShopperIdentity, heldAt: Foundation.TimeInterval)
|
|
42
|
+
public static func == (a: Module___SophiIdentity.SophiHeldIdentity, b: Module___SophiIdentity.SophiHeldIdentity) -> Swift.Bool
|
|
43
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
44
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
45
|
+
}
|
|
46
|
+
public struct SophiStoredIdentity : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
47
|
+
public var identity: Module___SophiIdentity.SophiShopperIdentity
|
|
48
|
+
public var held: Module___SophiIdentity.SophiHeldIdentity?
|
|
49
|
+
public var chatStorage: Swift.Bool
|
|
50
|
+
public var analyticsStorage: Swift.Bool
|
|
51
|
+
public var savedAt: Foundation.TimeInterval?
|
|
52
|
+
public init(identity: Module___SophiIdentity.SophiShopperIdentity, held: Module___SophiIdentity.SophiHeldIdentity? = nil, chatStorage: Swift.Bool = false, analyticsStorage: Swift.Bool = false, savedAt: Foundation.TimeInterval? = nil)
|
|
53
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
54
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
55
|
+
public static func == (a: Module___SophiIdentity.SophiStoredIdentity, b: Module___SophiIdentity.SophiStoredIdentity) -> Swift.Bool
|
|
56
|
+
}
|
|
57
|
+
public struct SophiIdentitySession : Swift.Sendable, Swift.Equatable {
|
|
58
|
+
public let clientID: Swift.String
|
|
59
|
+
public let accessToken: Swift.String
|
|
60
|
+
public let authSessionID: Swift.String?
|
|
61
|
+
public let expiresAt: Foundation.Date
|
|
62
|
+
public let companyCode: Swift.String
|
|
63
|
+
public let layoutID: Swift.String
|
|
64
|
+
public let userName: Swift.String?
|
|
65
|
+
public let identity: Module___SophiIdentity.SophiShopperIdentity
|
|
66
|
+
public let generation: Foundation.UUID
|
|
67
|
+
public static func == (a: Module___SophiIdentity.SophiIdentitySession, b: Module___SophiIdentity.SophiIdentitySession) -> Swift.Bool
|
|
68
|
+
}
|
|
69
|
+
public struct SophiIdentitySnapshot : Swift.Sendable, Swift.Equatable {
|
|
70
|
+
public let identity: Module___SophiIdentity.SophiShopperIdentity
|
|
71
|
+
public let generation: Foundation.UUID
|
|
72
|
+
public let analyticsGeneration: Foundation.UUID
|
|
73
|
+
public let analyticsAllowed: Swift.Bool
|
|
74
|
+
public let analyticsConfigured: Swift.Bool
|
|
75
|
+
public let ownerIDs: [Foundation.UUID]
|
|
76
|
+
public let heldOwnerIDs: [Foundation.UUID]
|
|
77
|
+
public var heldOwnerID: Foundation.UUID? {
|
|
78
|
+
get
|
|
79
|
+
}
|
|
80
|
+
public let storedIdentityLoaded: Swift.Bool
|
|
81
|
+
public let dormantOwnerIDs: [Foundation.UUID]?
|
|
82
|
+
public let storedIdentityIdle: Swift.Bool
|
|
83
|
+
public static func == (a: Module___SophiIdentity.SophiIdentitySnapshot, b: Module___SophiIdentity.SophiIdentitySnapshot) -> Swift.Bool
|
|
84
|
+
}
|
|
85
|
+
public enum SophiIdentityChange : Swift.Sendable {
|
|
86
|
+
case identity(previous: Module___SophiIdentity.SophiShopperIdentity, current: Module___SophiIdentity.SophiShopperIdentity)
|
|
87
|
+
case consent(Swift.Bool?)
|
|
88
|
+
case held(owner: Foundation.UUID, restored: Swift.Bool)
|
|
89
|
+
case storageFailed
|
|
90
|
+
}
|
|
91
|
+
public enum SophiIdentityUsage : Swift.String, Swift.Sendable {
|
|
92
|
+
case analytics, chat
|
|
93
|
+
public init?(rawValue: Swift.String)
|
|
94
|
+
public typealias RawValue = Swift.String
|
|
95
|
+
public var rawValue: Swift.String {
|
|
96
|
+
get
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
public enum SophiStorageQuarantine {
|
|
100
|
+
public static let retention: Swift.Double
|
|
101
|
+
@discardableResult
|
|
102
|
+
public static func move(_ url: Foundation.URL, now: Foundation.Date) -> Swift.Bool
|
|
103
|
+
public static func sweep(_ url: Foundation.URL, before: Foundation.Date)
|
|
104
|
+
}
|
|
105
|
+
public protocol SophiIdentityPersistence : Swift.Sendable {
|
|
106
|
+
func load() throws -> Module___SophiIdentity.SophiStoredIdentity?
|
|
107
|
+
func save(_ record: Module___SophiIdentity.SophiStoredIdentity) throws
|
|
108
|
+
func clear() throws
|
|
109
|
+
func clearAnalyticsState(keepRecord: Swift.Bool) throws
|
|
110
|
+
func takeQuarantined() -> Swift.Bool
|
|
111
|
+
}
|
|
112
|
+
extension Module___SophiIdentity.SophiIdentityPersistence {
|
|
113
|
+
public func clearAnalyticsState(keepRecord: Swift.Bool) throws
|
|
114
|
+
public func takeQuarantined() -> Swift.Bool
|
|
115
|
+
}
|
|
116
|
+
final public class SophiFileIdentityPersistence : Module___SophiIdentity.SophiIdentityPersistence, @unchecked Swift.Sendable {
|
|
117
|
+
public init(namespace: Swift.String, directory: Foundation.URL? = nil, now: @escaping @Sendable () -> Foundation.Date = { Date() }) throws
|
|
118
|
+
final public func load() throws -> Module___SophiIdentity.SophiStoredIdentity?
|
|
119
|
+
final public func save(_ record: Module___SophiIdentity.SophiStoredIdentity) throws
|
|
120
|
+
final public func clear() throws
|
|
121
|
+
final public func clearAnalyticsState(keepRecord: Swift.Bool) throws
|
|
122
|
+
final public func takeQuarantined() -> Swift.Bool
|
|
123
|
+
@objc deinit
|
|
124
|
+
}
|
|
125
|
+
final public class SophiIdentityRegistry : @unchecked Swift.Sendable {
|
|
126
|
+
public static let shared: Module___SophiIdentity.SophiIdentityRegistry
|
|
127
|
+
public init(factory: @escaping @Sendable (Module___SophiIdentity.SophiIdentityConfiguration) throws -> Module___SophiIdentity.SophiIdentityRuntime)
|
|
128
|
+
convenience public init()
|
|
129
|
+
public static let duplicateModuleMessage: Swift.String
|
|
130
|
+
public static var linkedTwice: Swift.Bool {
|
|
131
|
+
get
|
|
132
|
+
}
|
|
133
|
+
final public func runtime(configuration: Module___SophiIdentity.SophiIdentityConfiguration) throws -> Module___SophiIdentity.SophiIdentityRuntime
|
|
134
|
+
@objc deinit
|
|
135
|
+
}
|
|
136
|
+
final public class SophiIdentityRuntime : @unchecked Swift.Sendable {
|
|
137
|
+
final public let configuration: Module___SophiIdentity.SophiIdentityConfiguration
|
|
138
|
+
public init(configuration: Module___SophiIdentity.SophiIdentityConfiguration, persistence: any Module___SophiIdentity.SophiIdentityPersistence, now: @escaping @Sendable () -> Foundation.Date = { Date() }, transport: @escaping @Sendable (Foundation.URLRequest) async throws -> (Foundation.Data, Foundation.HTTPURLResponse) = {
|
|
139
|
+
request in
|
|
140
|
+
try await SophiIdentityHTTP.data(for: request)
|
|
141
|
+
}) throws
|
|
142
|
+
final public var snapshot: Module___SophiIdentity.SophiIdentitySnapshot {
|
|
143
|
+
get
|
|
144
|
+
}
|
|
145
|
+
final public var cachedSession: Module___SophiIdentity.SophiIdentitySession? {
|
|
146
|
+
get
|
|
147
|
+
}
|
|
148
|
+
final public func takeStorageQuarantined() -> Swift.Bool
|
|
149
|
+
final public func configure(usage: Module___SophiIdentity.SophiIdentityUsage, persistent enabled: Swift.Bool?, externalUserID: Swift.String? = nil, metadata: Foundation.Data? = nil) throws
|
|
150
|
+
final public func discardIdleStoredIdentity()
|
|
151
|
+
final public func setAnalyticsConsent(_ granted: Swift.Bool?) throws
|
|
152
|
+
final public func setStoragePermission(_ enabled: Swift.Bool, usage: Module___SophiIdentity.SophiIdentityUsage) throws
|
|
153
|
+
final public func updateIdentity(_ externalUserID: Swift.String?, usage: Module___SophiIdentity.SophiIdentityUsage = .analytics) throws
|
|
154
|
+
final public func logout() throws
|
|
155
|
+
final public func addObserver(_ observer: @escaping @Sendable (Module___SophiIdentity.SophiIdentityChange) -> Swift.Void) -> Foundation.UUID
|
|
156
|
+
final public func removeObserver(_ id: Foundation.UUID)
|
|
157
|
+
final public func withAnalyticsOwner<T>(_ expected: Module___SophiIdentity.SophiIdentitySnapshot, body: () throws -> T) throws -> T
|
|
158
|
+
@discardableResult
|
|
159
|
+
final public func adoptMemorySession(clientID: Swift.String, accessToken: Swift.String, expiresAt: Foundation.Date, externalUserID: Swift.String?, companyCode: Swift.String, layoutID: Swift.String, userName: Swift.String?) throws -> Swift.Bool
|
|
160
|
+
final public func checkGeneration(_ expected: Foundation.UUID) throws
|
|
161
|
+
final public func invalidateToken(_ failedToken: Swift.String)
|
|
162
|
+
final public func currentSession(usage: Module___SophiIdentity.SophiIdentityUsage) async throws -> Module___SophiIdentity.SophiIdentitySession
|
|
163
|
+
@objc deinit
|
|
164
|
+
}
|
|
165
|
+
public enum SophiIdentityHTTP {
|
|
166
|
+
public static func data(for request: Foundation.URLRequest, using session: Foundation.URLSession? = nil) async throws -> (Foundation.Data, Foundation.HTTPURLResponse)
|
|
167
|
+
}
|
|
168
|
+
extension Module___SophiIdentity.SophiIdentityUsage : Swift.Equatable {}
|
|
169
|
+
extension Module___SophiIdentity.SophiIdentityUsage : Swift.Hashable {}
|
|
170
|
+
extension Module___SophiIdentity.SophiIdentityUsage : Swift.RawRepresentable {}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
// swift-interface-format-version: 1.0
|
|
2
|
+
// swift-compiler-version: Apple Swift version 6.3.3 effective-5.10 (swiftlang-6.3.3.1.3 clang-2100.1.1.101)
|
|
3
|
+
// swift-module-flags: -target arm64-apple-ios15.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -O -enable-experimental-feature DebugDescriptionMacro -enable-bare-slash-regex -module-name SophiIdentity -module-alias Module___SophiIdentity=SophiIdentity -module-alias Module____StringProcessing=_StringProcessing -module-alias Module____SwiftConcurrencyShims=_SwiftConcurrencyShims -module-alias Module____Concurrency=_Concurrency -module-alias Module___CoreFoundation=CoreFoundation -module-alias Module___CryptoKit=CryptoKit
|
|
4
|
+
// swift-module-flags-ignorable: -no-verify-emitted-module-interface -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3
|
|
5
|
+
import Module___CoreFoundation
|
|
6
|
+
import Module___CryptoKit
|
|
7
|
+
import Foundation
|
|
8
|
+
import Swift
|
|
9
|
+
import Module____Concurrency
|
|
10
|
+
import Module____StringProcessing
|
|
11
|
+
import Module____SwiftConcurrencyShims
|
|
12
|
+
public enum SophiIdentityError : Swift.Error, Swift.Equatable, Swift.Sendable {
|
|
13
|
+
case invalidConfiguration, disabled, staleGeneration, invalidResponse
|
|
14
|
+
case http(Swift.Int)
|
|
15
|
+
case storageUnavailable, mergePending
|
|
16
|
+
public static func == (a: Module___SophiIdentity.SophiIdentityError, b: Module___SophiIdentity.SophiIdentityError) -> Swift.Bool
|
|
17
|
+
}
|
|
18
|
+
public struct SophiIdentityConfiguration : Swift.Sendable {
|
|
19
|
+
public let apiKey: Swift.String
|
|
20
|
+
public let baseURL: Foundation.URL
|
|
21
|
+
public let namespace: Swift.String
|
|
22
|
+
public init(apiKey: Swift.String, baseURL: Foundation.URL) throws
|
|
23
|
+
}
|
|
24
|
+
public struct SophiShopperIdentity : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
25
|
+
public var ownerID: Foundation.UUID
|
|
26
|
+
public var clientID: Swift.String?
|
|
27
|
+
public var externalUserID: Swift.String?
|
|
28
|
+
public var pendingMergeSourceID: Swift.String?
|
|
29
|
+
public var aliasOwnerIDs: [Foundation.UUID]?
|
|
30
|
+
public init(ownerID: Foundation.UUID = UUID(), clientID: Swift.String? = nil, externalUserID: Swift.String? = nil, pendingMergeSourceID: Swift.String? = nil, aliasOwnerIDs: [Foundation.UUID]? = nil)
|
|
31
|
+
public var ownerIDs: [Foundation.UUID] {
|
|
32
|
+
get
|
|
33
|
+
}
|
|
34
|
+
public static func == (a: Module___SophiIdentity.SophiShopperIdentity, b: Module___SophiIdentity.SophiShopperIdentity) -> Swift.Bool
|
|
35
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
36
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
37
|
+
}
|
|
38
|
+
public struct SophiHeldIdentity : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
39
|
+
public var identity: Module___SophiIdentity.SophiShopperIdentity
|
|
40
|
+
public var heldAt: Foundation.TimeInterval
|
|
41
|
+
public init(identity: Module___SophiIdentity.SophiShopperIdentity, heldAt: Foundation.TimeInterval)
|
|
42
|
+
public static func == (a: Module___SophiIdentity.SophiHeldIdentity, b: Module___SophiIdentity.SophiHeldIdentity) -> Swift.Bool
|
|
43
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
44
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
45
|
+
}
|
|
46
|
+
public struct SophiStoredIdentity : Swift.Codable, Swift.Equatable, Swift.Sendable {
|
|
47
|
+
public var identity: Module___SophiIdentity.SophiShopperIdentity
|
|
48
|
+
public var held: Module___SophiIdentity.SophiHeldIdentity?
|
|
49
|
+
public var chatStorage: Swift.Bool
|
|
50
|
+
public var analyticsStorage: Swift.Bool
|
|
51
|
+
public var savedAt: Foundation.TimeInterval?
|
|
52
|
+
public init(identity: Module___SophiIdentity.SophiShopperIdentity, held: Module___SophiIdentity.SophiHeldIdentity? = nil, chatStorage: Swift.Bool = false, analyticsStorage: Swift.Bool = false, savedAt: Foundation.TimeInterval? = nil)
|
|
53
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
54
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
55
|
+
public static func == (a: Module___SophiIdentity.SophiStoredIdentity, b: Module___SophiIdentity.SophiStoredIdentity) -> Swift.Bool
|
|
56
|
+
}
|
|
57
|
+
public struct SophiIdentitySession : Swift.Sendable, Swift.Equatable {
|
|
58
|
+
public let clientID: Swift.String
|
|
59
|
+
public let accessToken: Swift.String
|
|
60
|
+
public let authSessionID: Swift.String?
|
|
61
|
+
public let expiresAt: Foundation.Date
|
|
62
|
+
public let companyCode: Swift.String
|
|
63
|
+
public let layoutID: Swift.String
|
|
64
|
+
public let userName: Swift.String?
|
|
65
|
+
public let identity: Module___SophiIdentity.SophiShopperIdentity
|
|
66
|
+
public let generation: Foundation.UUID
|
|
67
|
+
public static func == (a: Module___SophiIdentity.SophiIdentitySession, b: Module___SophiIdentity.SophiIdentitySession) -> Swift.Bool
|
|
68
|
+
}
|
|
69
|
+
public struct SophiIdentitySnapshot : Swift.Sendable, Swift.Equatable {
|
|
70
|
+
public let identity: Module___SophiIdentity.SophiShopperIdentity
|
|
71
|
+
public let generation: Foundation.UUID
|
|
72
|
+
public let analyticsGeneration: Foundation.UUID
|
|
73
|
+
public let analyticsAllowed: Swift.Bool
|
|
74
|
+
public let analyticsConfigured: Swift.Bool
|
|
75
|
+
public let ownerIDs: [Foundation.UUID]
|
|
76
|
+
public let heldOwnerIDs: [Foundation.UUID]
|
|
77
|
+
public var heldOwnerID: Foundation.UUID? {
|
|
78
|
+
get
|
|
79
|
+
}
|
|
80
|
+
public let storedIdentityLoaded: Swift.Bool
|
|
81
|
+
public let dormantOwnerIDs: [Foundation.UUID]?
|
|
82
|
+
public let storedIdentityIdle: Swift.Bool
|
|
83
|
+
public static func == (a: Module___SophiIdentity.SophiIdentitySnapshot, b: Module___SophiIdentity.SophiIdentitySnapshot) -> Swift.Bool
|
|
84
|
+
}
|
|
85
|
+
public enum SophiIdentityChange : Swift.Sendable {
|
|
86
|
+
case identity(previous: Module___SophiIdentity.SophiShopperIdentity, current: Module___SophiIdentity.SophiShopperIdentity)
|
|
87
|
+
case consent(Swift.Bool?)
|
|
88
|
+
case held(owner: Foundation.UUID, restored: Swift.Bool)
|
|
89
|
+
case storageFailed
|
|
90
|
+
}
|
|
91
|
+
public enum SophiIdentityUsage : Swift.String, Swift.Sendable {
|
|
92
|
+
case analytics, chat
|
|
93
|
+
public init?(rawValue: Swift.String)
|
|
94
|
+
public typealias RawValue = Swift.String
|
|
95
|
+
public var rawValue: Swift.String {
|
|
96
|
+
get
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
public enum SophiStorageQuarantine {
|
|
100
|
+
public static let retention: Swift.Double
|
|
101
|
+
@discardableResult
|
|
102
|
+
public static func move(_ url: Foundation.URL, now: Foundation.Date) -> Swift.Bool
|
|
103
|
+
public static func sweep(_ url: Foundation.URL, before: Foundation.Date)
|
|
104
|
+
}
|
|
105
|
+
public protocol SophiIdentityPersistence : Swift.Sendable {
|
|
106
|
+
func load() throws -> Module___SophiIdentity.SophiStoredIdentity?
|
|
107
|
+
func save(_ record: Module___SophiIdentity.SophiStoredIdentity) throws
|
|
108
|
+
func clear() throws
|
|
109
|
+
func clearAnalyticsState(keepRecord: Swift.Bool) throws
|
|
110
|
+
func takeQuarantined() -> Swift.Bool
|
|
111
|
+
}
|
|
112
|
+
extension Module___SophiIdentity.SophiIdentityPersistence {
|
|
113
|
+
public func clearAnalyticsState(keepRecord: Swift.Bool) throws
|
|
114
|
+
public func takeQuarantined() -> Swift.Bool
|
|
115
|
+
}
|
|
116
|
+
final public class SophiFileIdentityPersistence : Module___SophiIdentity.SophiIdentityPersistence, @unchecked Swift.Sendable {
|
|
117
|
+
public init(namespace: Swift.String, directory: Foundation.URL? = nil, now: @escaping @Sendable () -> Foundation.Date = { Date() }) throws
|
|
118
|
+
final public func load() throws -> Module___SophiIdentity.SophiStoredIdentity?
|
|
119
|
+
final public func save(_ record: Module___SophiIdentity.SophiStoredIdentity) throws
|
|
120
|
+
final public func clear() throws
|
|
121
|
+
final public func clearAnalyticsState(keepRecord: Swift.Bool) throws
|
|
122
|
+
final public func takeQuarantined() -> Swift.Bool
|
|
123
|
+
@objc deinit
|
|
124
|
+
}
|
|
125
|
+
final public class SophiIdentityRegistry : @unchecked Swift.Sendable {
|
|
126
|
+
public static let shared: Module___SophiIdentity.SophiIdentityRegistry
|
|
127
|
+
public init(factory: @escaping @Sendable (Module___SophiIdentity.SophiIdentityConfiguration) throws -> Module___SophiIdentity.SophiIdentityRuntime)
|
|
128
|
+
convenience public init()
|
|
129
|
+
public static let duplicateModuleMessage: Swift.String
|
|
130
|
+
public static var linkedTwice: Swift.Bool {
|
|
131
|
+
get
|
|
132
|
+
}
|
|
133
|
+
final public func runtime(configuration: Module___SophiIdentity.SophiIdentityConfiguration) throws -> Module___SophiIdentity.SophiIdentityRuntime
|
|
134
|
+
@objc deinit
|
|
135
|
+
}
|
|
136
|
+
final public class SophiIdentityRuntime : @unchecked Swift.Sendable {
|
|
137
|
+
final public let configuration: Module___SophiIdentity.SophiIdentityConfiguration
|
|
138
|
+
public init(configuration: Module___SophiIdentity.SophiIdentityConfiguration, persistence: any Module___SophiIdentity.SophiIdentityPersistence, now: @escaping @Sendable () -> Foundation.Date = { Date() }, transport: @escaping @Sendable (Foundation.URLRequest) async throws -> (Foundation.Data, Foundation.HTTPURLResponse) = {
|
|
139
|
+
request in
|
|
140
|
+
try await SophiIdentityHTTP.data(for: request)
|
|
141
|
+
}) throws
|
|
142
|
+
final public var snapshot: Module___SophiIdentity.SophiIdentitySnapshot {
|
|
143
|
+
get
|
|
144
|
+
}
|
|
145
|
+
final public var cachedSession: Module___SophiIdentity.SophiIdentitySession? {
|
|
146
|
+
get
|
|
147
|
+
}
|
|
148
|
+
final public func takeStorageQuarantined() -> Swift.Bool
|
|
149
|
+
final public func configure(usage: Module___SophiIdentity.SophiIdentityUsage, persistent enabled: Swift.Bool?, externalUserID: Swift.String? = nil, metadata: Foundation.Data? = nil) throws
|
|
150
|
+
final public func discardIdleStoredIdentity()
|
|
151
|
+
final public func setAnalyticsConsent(_ granted: Swift.Bool?) throws
|
|
152
|
+
final public func setStoragePermission(_ enabled: Swift.Bool, usage: Module___SophiIdentity.SophiIdentityUsage) throws
|
|
153
|
+
final public func updateIdentity(_ externalUserID: Swift.String?, usage: Module___SophiIdentity.SophiIdentityUsage = .analytics) throws
|
|
154
|
+
final public func logout() throws
|
|
155
|
+
final public func addObserver(_ observer: @escaping @Sendable (Module___SophiIdentity.SophiIdentityChange) -> Swift.Void) -> Foundation.UUID
|
|
156
|
+
final public func removeObserver(_ id: Foundation.UUID)
|
|
157
|
+
final public func withAnalyticsOwner<T>(_ expected: Module___SophiIdentity.SophiIdentitySnapshot, body: () throws -> T) throws -> T
|
|
158
|
+
@discardableResult
|
|
159
|
+
final public func adoptMemorySession(clientID: Swift.String, accessToken: Swift.String, expiresAt: Foundation.Date, externalUserID: Swift.String?, companyCode: Swift.String, layoutID: Swift.String, userName: Swift.String?) throws -> Swift.Bool
|
|
160
|
+
final public func checkGeneration(_ expected: Foundation.UUID) throws
|
|
161
|
+
final public func invalidateToken(_ failedToken: Swift.String)
|
|
162
|
+
final public func currentSession(usage: Module___SophiIdentity.SophiIdentityUsage) async throws -> Module___SophiIdentity.SophiIdentitySession
|
|
163
|
+
@objc deinit
|
|
164
|
+
}
|
|
165
|
+
public enum SophiIdentityHTTP {
|
|
166
|
+
public static func data(for request: Foundation.URLRequest, using session: Foundation.URLSession? = nil) async throws -> (Foundation.Data, Foundation.HTTPURLResponse)
|
|
167
|
+
}
|
|
168
|
+
extension Module___SophiIdentity.SophiIdentityUsage : Swift.Equatable {}
|
|
169
|
+
extension Module___SophiIdentity.SophiIdentityUsage : Swift.Hashable {}
|
|
170
|
+
extension Module___SophiIdentity.SophiIdentityUsage : Swift.RawRepresentable {}
|