@snaplyagent/react-native 1.0.0 → 1.1.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 +10 -0
- package/README.md +6 -0
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/snaplyagent/reactnative/SnaplyAgentModule.kt +6 -0
- package/ios/Frameworks/SnaplyAgent.xcframework/Info.plist +5 -5
- package/ios/Frameworks/SnaplyAgent.xcframework/ios-arm64/SnaplyAgent.framework/Info.plist +0 -0
- package/ios/Frameworks/SnaplyAgent.xcframework/ios-arm64/SnaplyAgent.framework/Modules/SnaplyAgent.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/Frameworks/SnaplyAgent.xcframework/ios-arm64/SnaplyAgent.framework/Modules/SnaplyAgent.swiftmodule/arm64-apple-ios.swiftinterface +58 -51
- package/ios/Frameworks/SnaplyAgent.xcframework/ios-arm64/SnaplyAgent.framework/SnaplyAgent +0 -0
- package/ios/Frameworks/SnaplyAgent.xcframework/ios-arm64_x86_64-simulator/SnaplyAgent.framework/Info.plist +0 -0
- package/ios/Frameworks/SnaplyAgent.xcframework/ios-arm64_x86_64-simulator/SnaplyAgent.framework/Modules/SnaplyAgent.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/SnaplyAgent.xcframework/ios-arm64_x86_64-simulator/SnaplyAgent.framework/Modules/SnaplyAgent.swiftmodule/arm64-apple-ios-simulator.swiftinterface +58 -51
- package/ios/Frameworks/SnaplyAgent.xcframework/ios-arm64_x86_64-simulator/SnaplyAgent.framework/Modules/SnaplyAgent.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/SnaplyAgent.xcframework/ios-arm64_x86_64-simulator/SnaplyAgent.framework/Modules/SnaplyAgent.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +58 -51
- package/ios/Frameworks/SnaplyAgent.xcframework/ios-arm64_x86_64-simulator/SnaplyAgent.framework/SnaplyAgent +0 -0
- package/ios/Frameworks/SnaplyAgent.xcframework/ios-arm64_x86_64-simulator/SnaplyAgent.framework/_CodeSignature/CodeResources +9 -9
- package/ios/Sources/SnaplyAgentModule.mm +10 -0
- package/ios/Sources/SnaplyBridge.swift +6 -1
- package/lib/index.d.ts +17 -2
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/spec/NativeSnaplyAgent.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## 1.1.0
|
|
2
|
+
|
|
3
|
+
Carries the Snaply Agent iOS SDK 2.56.0 and brings the Android SDK 2.47.0 from Maven Central.
|
|
4
|
+
|
|
5
|
+
* Your app can ask whether support is watching or controlling it right now: `Snaply.isLiveViewActive` and
|
|
6
|
+
`Snaply.isRemoteControlActive` — for anything it would rather not show or do meanwhile.
|
|
7
|
+
* `onLiveView(active)` tells your app when a live view starts and ends, as `onRemoteControl(active)` does for
|
|
8
|
+
remote control.
|
|
9
|
+
* A silent screenshot inside an approval is taken only while the "Screenshots allowed" banner is on screen.
|
|
10
|
+
|
|
1
11
|
## 1.0.0
|
|
2
12
|
|
|
3
13
|
The first release on npm. Carries the Snaply Agent iOS SDK 2.55.0 and brings the Android SDK 2.46.0 from Maven
|
package/README.md
CHANGED
|
@@ -44,6 +44,12 @@ Snaply.reset();
|
|
|
44
44
|
// An anonymous caller reads this to the agent:
|
|
45
45
|
const code = await Snaply.supportCode();
|
|
46
46
|
Snaply.showSupportCode(); // …or the SDK shows it in its own sheet
|
|
47
|
+
|
|
48
|
+
// Is support watching or controlling the app right now? For anything your app would rather not show or do
|
|
49
|
+
// meanwhile. `onLiveView(active)` and `onRemoteControl(active)` tell you when either starts and ends.
|
|
50
|
+
if (Snaply.isLiveViewActive || Snaply.isRemoteControlActive) {
|
|
51
|
+
// hold it back
|
|
52
|
+
}
|
|
47
53
|
```
|
|
48
54
|
|
|
49
55
|
Add the app's identifier (bundle id, package name) to each product's allowed list in the console, or
|
package/android/build.gradle
CHANGED
|
@@ -64,6 +64,10 @@ class SnaplyAgentModule(reactContext: ReactApplicationContext) : NativeSnaplyAge
|
|
|
64
64
|
UiThreadUtil.runOnUiThread { Snaply.stop() }
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
override fun isLiveViewActive(): Boolean = Snaply.isLiveViewActive
|
|
68
|
+
|
|
69
|
+
override fun isRemoteControlActive(): Boolean = Snaply.isRemoteControlActive
|
|
70
|
+
|
|
67
71
|
private val callbacks = object : SnaplyCallbacks {
|
|
68
72
|
override fun onRequestShown() = emit("requestShown")
|
|
69
73
|
|
|
@@ -86,6 +90,8 @@ class SnaplyAgentModule(reactContext: ReactApplicationContext) : NativeSnaplyAge
|
|
|
86
90
|
override fun onRemoteControl(active: Boolean) = emit("remoteControl") { putBoolean("active", active) }
|
|
87
91
|
|
|
88
92
|
override fun onLiveEnded(session: LiveSession) = emit("liveEnded") { putString("sessionId", session.sessionId) }
|
|
93
|
+
|
|
94
|
+
override fun onLiveView(active: Boolean) = emit("liveView") { putBoolean("active", active) }
|
|
89
95
|
}
|
|
90
96
|
|
|
91
97
|
private fun emit(name: String, fields: WritableMap.() -> Unit = {}) {
|
|
@@ -8,32 +8,32 @@
|
|
|
8
8
|
<key>BinaryPath</key>
|
|
9
9
|
<string>SnaplyAgent.framework/SnaplyAgent</string>
|
|
10
10
|
<key>LibraryIdentifier</key>
|
|
11
|
-
<string>ios-
|
|
11
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
12
12
|
<key>LibraryPath</key>
|
|
13
13
|
<string>SnaplyAgent.framework</string>
|
|
14
14
|
<key>SupportedArchitectures</key>
|
|
15
15
|
<array>
|
|
16
16
|
<string>arm64</string>
|
|
17
|
+
<string>x86_64</string>
|
|
17
18
|
</array>
|
|
18
19
|
<key>SupportedPlatform</key>
|
|
19
20
|
<string>ios</string>
|
|
21
|
+
<key>SupportedPlatformVariant</key>
|
|
22
|
+
<string>simulator</string>
|
|
20
23
|
</dict>
|
|
21
24
|
<dict>
|
|
22
25
|
<key>BinaryPath</key>
|
|
23
26
|
<string>SnaplyAgent.framework/SnaplyAgent</string>
|
|
24
27
|
<key>LibraryIdentifier</key>
|
|
25
|
-
<string>ios-
|
|
28
|
+
<string>ios-arm64</string>
|
|
26
29
|
<key>LibraryPath</key>
|
|
27
30
|
<string>SnaplyAgent.framework</string>
|
|
28
31
|
<key>SupportedArchitectures</key>
|
|
29
32
|
<array>
|
|
30
33
|
<string>arm64</string>
|
|
31
|
-
<string>x86_64</string>
|
|
32
34
|
</array>
|
|
33
35
|
<key>SupportedPlatform</key>
|
|
34
36
|
<string>ios</string>
|
|
35
|
-
<key>SupportedPlatformVariant</key>
|
|
36
|
-
<string>simulator</string>
|
|
37
37
|
</dict>
|
|
38
38
|
</array>
|
|
39
39
|
<key>CFBundlePackageType</key>
|
|
Binary file
|
|
Binary file
|
|
@@ -17,6 +17,47 @@ import _Concurrency
|
|
|
17
17
|
import _StringProcessing
|
|
18
18
|
import _SwiftConcurrencyShims
|
|
19
19
|
import os
|
|
20
|
+
public enum CaptureMode : Swift.String, Swift.Codable {
|
|
21
|
+
case askEveryTime
|
|
22
|
+
case perSession
|
|
23
|
+
case liveView
|
|
24
|
+
case wholeScreen
|
|
25
|
+
public init?(rawValue: Swift.String)
|
|
26
|
+
public typealias RawValue = Swift.String
|
|
27
|
+
public var rawValue: Swift.String {
|
|
28
|
+
get
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
public struct SnaplyUser {
|
|
32
|
+
public let id: Swift.String
|
|
33
|
+
public let name: Swift.String?
|
|
34
|
+
public init(id: Swift.String, name: Swift.String? = nil)
|
|
35
|
+
}
|
|
36
|
+
public struct CaptureResult : Swift.Codable {
|
|
37
|
+
public let captureId: Swift.String
|
|
38
|
+
public let imageUrl: Swift.String
|
|
39
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
40
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
41
|
+
}
|
|
42
|
+
public struct SnaplyError : Swift.Error {
|
|
43
|
+
public let status: Swift.Int
|
|
44
|
+
public let code: Swift.String
|
|
45
|
+
public let message: Swift.String
|
|
46
|
+
}
|
|
47
|
+
public struct LiveSession {
|
|
48
|
+
public let sessionId: Swift.String
|
|
49
|
+
}
|
|
50
|
+
public struct SnaplyCallbacks {
|
|
51
|
+
public var onRequestShown: (() -> Swift.Void)?
|
|
52
|
+
public var onAllowed: ((SnaplyAgent.CaptureResult) -> Swift.Void)?
|
|
53
|
+
public var onDenied: (() -> Swift.Void)?
|
|
54
|
+
public var onExpired: (() -> Swift.Void)?
|
|
55
|
+
public var onError: ((any Swift.Error) -> Swift.Void)?
|
|
56
|
+
public var onRemoteControl: ((Swift.Bool) -> Swift.Void)?
|
|
57
|
+
public var onLiveEnded: ((SnaplyAgent.LiveSession) -> Swift.Void)?
|
|
58
|
+
public var onLiveView: ((Swift.Bool) -> Swift.Void)?
|
|
59
|
+
public init(onRequestShown: (() -> Swift.Void)? = nil, onAllowed: ((SnaplyAgent.CaptureResult) -> Swift.Void)? = nil, onDenied: (() -> Swift.Void)? = nil, onExpired: (() -> Swift.Void)? = nil, onError: ((any Swift.Error) -> Swift.Void)? = nil, onRemoteControl: ((Swift.Bool) -> Swift.Void)? = nil, onLiveEnded: ((SnaplyAgent.LiveSession) -> Swift.Void)? = nil, onLiveView: ((Swift.Bool) -> Swift.Void)? = nil)
|
|
60
|
+
}
|
|
20
61
|
public struct SnaplyRedaction {
|
|
21
62
|
public var color: UIKit.UIColor
|
|
22
63
|
public var label: Swift.String
|
|
@@ -99,10 +140,24 @@ public struct SnaplyRedactionRule {
|
|
|
99
140
|
public let value: Swift.String
|
|
100
141
|
public let label: Swift.String?
|
|
101
142
|
}
|
|
143
|
+
public enum SnaplyEnvironment {
|
|
144
|
+
case live
|
|
145
|
+
case custom(Foundation.URL, serverKeys: [Swift.String])
|
|
146
|
+
public static let developmentMaster: Swift.String
|
|
147
|
+
public var url: Foundation.URL {
|
|
148
|
+
get
|
|
149
|
+
}
|
|
150
|
+
}
|
|
102
151
|
public enum Snaply {
|
|
103
152
|
public static func configure(key: Swift.String, environment: SnaplyAgent.SnaplyEnvironment = .live, user: SnaplyAgent.SnaplyUser? = nil, collectVendorId: Swift.Bool = true, language: Swift.String = "en") async throws
|
|
104
153
|
public static func configure(key: Swift.String, environment: SnaplyAgent.SnaplyEnvironment = .live, user: SnaplyAgent.SnaplyUser? = nil, collectVendorId: Swift.Bool = true, language: Swift.String = "en", completion: (((any Swift.Error)?) -> Swift.Void)? = nil)
|
|
105
154
|
public static func on(_ callbacks: SnaplyAgent.SnaplyCallbacks)
|
|
155
|
+
public static var isLiveViewActive: Swift.Bool {
|
|
156
|
+
get
|
|
157
|
+
}
|
|
158
|
+
public static var isRemoteControlActive: Swift.Bool {
|
|
159
|
+
get
|
|
160
|
+
}
|
|
106
161
|
public static func setRedactionStyle(_ style: SnaplyAgent.SnaplyRedaction)
|
|
107
162
|
@_Concurrency.MainActor public static func registerHostedView(_ view: UIKit.UIView, host: (any SnaplyAgent.SnaplyHostedView)?)
|
|
108
163
|
public static func identify(id: Swift.String, name: Swift.String? = nil, phone: Swift.String? = nil, identitySignature: Swift.String? = nil)
|
|
@@ -111,58 +166,10 @@ public enum Snaply {
|
|
|
111
166
|
public static func showSupportCode()
|
|
112
167
|
public static func stop()
|
|
113
168
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
case liveView
|
|
118
|
-
case wholeScreen
|
|
119
|
-
public init?(rawValue: Swift.String)
|
|
120
|
-
public typealias RawValue = Swift.String
|
|
121
|
-
public var rawValue: Swift.String {
|
|
122
|
-
get
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
public struct SnaplyUser {
|
|
126
|
-
public let id: Swift.String
|
|
127
|
-
public let name: Swift.String?
|
|
128
|
-
public init(id: Swift.String, name: Swift.String? = nil)
|
|
129
|
-
}
|
|
130
|
-
public struct CaptureResult : Swift.Codable {
|
|
131
|
-
public let captureId: Swift.String
|
|
132
|
-
public let imageUrl: Swift.String
|
|
133
|
-
public func encode(to encoder: any Swift.Encoder) throws
|
|
134
|
-
public init(from decoder: any Swift.Decoder) throws
|
|
135
|
-
}
|
|
136
|
-
public struct SnaplyError : Swift.Error {
|
|
137
|
-
public let status: Swift.Int
|
|
138
|
-
public let code: Swift.String
|
|
139
|
-
public let message: Swift.String
|
|
140
|
-
}
|
|
141
|
-
public struct LiveSession {
|
|
142
|
-
public let sessionId: Swift.String
|
|
143
|
-
}
|
|
144
|
-
public struct SnaplyCallbacks {
|
|
145
|
-
public var onRequestShown: (() -> Swift.Void)?
|
|
146
|
-
public var onAllowed: ((SnaplyAgent.CaptureResult) -> Swift.Void)?
|
|
147
|
-
public var onDenied: (() -> Swift.Void)?
|
|
148
|
-
public var onExpired: (() -> Swift.Void)?
|
|
149
|
-
public var onError: ((any Swift.Error) -> Swift.Void)?
|
|
150
|
-
public var onRemoteControl: ((Swift.Bool) -> Swift.Void)?
|
|
151
|
-
public var onLiveEnded: ((SnaplyAgent.LiveSession) -> Swift.Void)?
|
|
152
|
-
public init(onRequestShown: (() -> Swift.Void)? = nil, onAllowed: ((SnaplyAgent.CaptureResult) -> Swift.Void)? = nil, onDenied: (() -> Swift.Void)? = nil, onExpired: (() -> Swift.Void)? = nil, onError: ((any Swift.Error) -> Swift.Void)? = nil, onRemoteControl: ((Swift.Bool) -> Swift.Void)? = nil, onLiveEnded: ((SnaplyAgent.LiveSession) -> Swift.Void)? = nil)
|
|
153
|
-
}
|
|
154
|
-
public enum SnaplyEnvironment {
|
|
155
|
-
case live
|
|
156
|
-
case custom(Foundation.URL, serverKeys: [Swift.String])
|
|
157
|
-
public static let developmentMaster: Swift.String
|
|
158
|
-
public var url: Foundation.URL {
|
|
159
|
-
get
|
|
160
|
-
}
|
|
161
|
-
}
|
|
169
|
+
extension SnaplyAgent.CaptureMode : Swift.Equatable {}
|
|
170
|
+
extension SnaplyAgent.CaptureMode : Swift.Hashable {}
|
|
171
|
+
extension SnaplyAgent.CaptureMode : Swift.RawRepresentable {}
|
|
162
172
|
extension SnaplyAgent.SnaplyHostedControlMode : Swift.Equatable {}
|
|
163
173
|
extension SnaplyAgent.SnaplyHostedControlMode : Swift.Hashable {}
|
|
164
174
|
extension SnaplyAgent.SnaplyHostedInput.Action : Swift.Equatable {}
|
|
165
175
|
extension SnaplyAgent.SnaplyHostedInput.Action : Swift.Hashable {}
|
|
166
|
-
extension SnaplyAgent.CaptureMode : Swift.Equatable {}
|
|
167
|
-
extension SnaplyAgent.CaptureMode : Swift.Hashable {}
|
|
168
|
-
extension SnaplyAgent.CaptureMode : Swift.RawRepresentable {}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -17,6 +17,47 @@ import _Concurrency
|
|
|
17
17
|
import _StringProcessing
|
|
18
18
|
import _SwiftConcurrencyShims
|
|
19
19
|
import os
|
|
20
|
+
public enum CaptureMode : Swift.String, Swift.Codable {
|
|
21
|
+
case askEveryTime
|
|
22
|
+
case perSession
|
|
23
|
+
case liveView
|
|
24
|
+
case wholeScreen
|
|
25
|
+
public init?(rawValue: Swift.String)
|
|
26
|
+
public typealias RawValue = Swift.String
|
|
27
|
+
public var rawValue: Swift.String {
|
|
28
|
+
get
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
public struct SnaplyUser {
|
|
32
|
+
public let id: Swift.String
|
|
33
|
+
public let name: Swift.String?
|
|
34
|
+
public init(id: Swift.String, name: Swift.String? = nil)
|
|
35
|
+
}
|
|
36
|
+
public struct CaptureResult : Swift.Codable {
|
|
37
|
+
public let captureId: Swift.String
|
|
38
|
+
public let imageUrl: Swift.String
|
|
39
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
40
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
41
|
+
}
|
|
42
|
+
public struct SnaplyError : Swift.Error {
|
|
43
|
+
public let status: Swift.Int
|
|
44
|
+
public let code: Swift.String
|
|
45
|
+
public let message: Swift.String
|
|
46
|
+
}
|
|
47
|
+
public struct LiveSession {
|
|
48
|
+
public let sessionId: Swift.String
|
|
49
|
+
}
|
|
50
|
+
public struct SnaplyCallbacks {
|
|
51
|
+
public var onRequestShown: (() -> Swift.Void)?
|
|
52
|
+
public var onAllowed: ((SnaplyAgent.CaptureResult) -> Swift.Void)?
|
|
53
|
+
public var onDenied: (() -> Swift.Void)?
|
|
54
|
+
public var onExpired: (() -> Swift.Void)?
|
|
55
|
+
public var onError: ((any Swift.Error) -> Swift.Void)?
|
|
56
|
+
public var onRemoteControl: ((Swift.Bool) -> Swift.Void)?
|
|
57
|
+
public var onLiveEnded: ((SnaplyAgent.LiveSession) -> Swift.Void)?
|
|
58
|
+
public var onLiveView: ((Swift.Bool) -> Swift.Void)?
|
|
59
|
+
public init(onRequestShown: (() -> Swift.Void)? = nil, onAllowed: ((SnaplyAgent.CaptureResult) -> Swift.Void)? = nil, onDenied: (() -> Swift.Void)? = nil, onExpired: (() -> Swift.Void)? = nil, onError: ((any Swift.Error) -> Swift.Void)? = nil, onRemoteControl: ((Swift.Bool) -> Swift.Void)? = nil, onLiveEnded: ((SnaplyAgent.LiveSession) -> Swift.Void)? = nil, onLiveView: ((Swift.Bool) -> Swift.Void)? = nil)
|
|
60
|
+
}
|
|
20
61
|
public struct SnaplyRedaction {
|
|
21
62
|
public var color: UIKit.UIColor
|
|
22
63
|
public var label: Swift.String
|
|
@@ -99,10 +140,24 @@ public struct SnaplyRedactionRule {
|
|
|
99
140
|
public let value: Swift.String
|
|
100
141
|
public let label: Swift.String?
|
|
101
142
|
}
|
|
143
|
+
public enum SnaplyEnvironment {
|
|
144
|
+
case live
|
|
145
|
+
case custom(Foundation.URL, serverKeys: [Swift.String])
|
|
146
|
+
public static let developmentMaster: Swift.String
|
|
147
|
+
public var url: Foundation.URL {
|
|
148
|
+
get
|
|
149
|
+
}
|
|
150
|
+
}
|
|
102
151
|
public enum Snaply {
|
|
103
152
|
public static func configure(key: Swift.String, environment: SnaplyAgent.SnaplyEnvironment = .live, user: SnaplyAgent.SnaplyUser? = nil, collectVendorId: Swift.Bool = true, language: Swift.String = "en") async throws
|
|
104
153
|
public static func configure(key: Swift.String, environment: SnaplyAgent.SnaplyEnvironment = .live, user: SnaplyAgent.SnaplyUser? = nil, collectVendorId: Swift.Bool = true, language: Swift.String = "en", completion: (((any Swift.Error)?) -> Swift.Void)? = nil)
|
|
105
154
|
public static func on(_ callbacks: SnaplyAgent.SnaplyCallbacks)
|
|
155
|
+
public static var isLiveViewActive: Swift.Bool {
|
|
156
|
+
get
|
|
157
|
+
}
|
|
158
|
+
public static var isRemoteControlActive: Swift.Bool {
|
|
159
|
+
get
|
|
160
|
+
}
|
|
106
161
|
public static func setRedactionStyle(_ style: SnaplyAgent.SnaplyRedaction)
|
|
107
162
|
@_Concurrency.MainActor public static func registerHostedView(_ view: UIKit.UIView, host: (any SnaplyAgent.SnaplyHostedView)?)
|
|
108
163
|
public static func identify(id: Swift.String, name: Swift.String? = nil, phone: Swift.String? = nil, identitySignature: Swift.String? = nil)
|
|
@@ -111,58 +166,10 @@ public enum Snaply {
|
|
|
111
166
|
public static func showSupportCode()
|
|
112
167
|
public static func stop()
|
|
113
168
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
case liveView
|
|
118
|
-
case wholeScreen
|
|
119
|
-
public init?(rawValue: Swift.String)
|
|
120
|
-
public typealias RawValue = Swift.String
|
|
121
|
-
public var rawValue: Swift.String {
|
|
122
|
-
get
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
public struct SnaplyUser {
|
|
126
|
-
public let id: Swift.String
|
|
127
|
-
public let name: Swift.String?
|
|
128
|
-
public init(id: Swift.String, name: Swift.String? = nil)
|
|
129
|
-
}
|
|
130
|
-
public struct CaptureResult : Swift.Codable {
|
|
131
|
-
public let captureId: Swift.String
|
|
132
|
-
public let imageUrl: Swift.String
|
|
133
|
-
public func encode(to encoder: any Swift.Encoder) throws
|
|
134
|
-
public init(from decoder: any Swift.Decoder) throws
|
|
135
|
-
}
|
|
136
|
-
public struct SnaplyError : Swift.Error {
|
|
137
|
-
public let status: Swift.Int
|
|
138
|
-
public let code: Swift.String
|
|
139
|
-
public let message: Swift.String
|
|
140
|
-
}
|
|
141
|
-
public struct LiveSession {
|
|
142
|
-
public let sessionId: Swift.String
|
|
143
|
-
}
|
|
144
|
-
public struct SnaplyCallbacks {
|
|
145
|
-
public var onRequestShown: (() -> Swift.Void)?
|
|
146
|
-
public var onAllowed: ((SnaplyAgent.CaptureResult) -> Swift.Void)?
|
|
147
|
-
public var onDenied: (() -> Swift.Void)?
|
|
148
|
-
public var onExpired: (() -> Swift.Void)?
|
|
149
|
-
public var onError: ((any Swift.Error) -> Swift.Void)?
|
|
150
|
-
public var onRemoteControl: ((Swift.Bool) -> Swift.Void)?
|
|
151
|
-
public var onLiveEnded: ((SnaplyAgent.LiveSession) -> Swift.Void)?
|
|
152
|
-
public init(onRequestShown: (() -> Swift.Void)? = nil, onAllowed: ((SnaplyAgent.CaptureResult) -> Swift.Void)? = nil, onDenied: (() -> Swift.Void)? = nil, onExpired: (() -> Swift.Void)? = nil, onError: ((any Swift.Error) -> Swift.Void)? = nil, onRemoteControl: ((Swift.Bool) -> Swift.Void)? = nil, onLiveEnded: ((SnaplyAgent.LiveSession) -> Swift.Void)? = nil)
|
|
153
|
-
}
|
|
154
|
-
public enum SnaplyEnvironment {
|
|
155
|
-
case live
|
|
156
|
-
case custom(Foundation.URL, serverKeys: [Swift.String])
|
|
157
|
-
public static let developmentMaster: Swift.String
|
|
158
|
-
public var url: Foundation.URL {
|
|
159
|
-
get
|
|
160
|
-
}
|
|
161
|
-
}
|
|
169
|
+
extension SnaplyAgent.CaptureMode : Swift.Equatable {}
|
|
170
|
+
extension SnaplyAgent.CaptureMode : Swift.Hashable {}
|
|
171
|
+
extension SnaplyAgent.CaptureMode : Swift.RawRepresentable {}
|
|
162
172
|
extension SnaplyAgent.SnaplyHostedControlMode : Swift.Equatable {}
|
|
163
173
|
extension SnaplyAgent.SnaplyHostedControlMode : Swift.Hashable {}
|
|
164
174
|
extension SnaplyAgent.SnaplyHostedInput.Action : Swift.Equatable {}
|
|
165
175
|
extension SnaplyAgent.SnaplyHostedInput.Action : Swift.Hashable {}
|
|
166
|
-
extension SnaplyAgent.CaptureMode : Swift.Equatable {}
|
|
167
|
-
extension SnaplyAgent.CaptureMode : Swift.Hashable {}
|
|
168
|
-
extension SnaplyAgent.CaptureMode : Swift.RawRepresentable {}
|
|
Binary file
|
|
@@ -17,6 +17,47 @@ import _Concurrency
|
|
|
17
17
|
import _StringProcessing
|
|
18
18
|
import _SwiftConcurrencyShims
|
|
19
19
|
import os
|
|
20
|
+
public enum CaptureMode : Swift.String, Swift.Codable {
|
|
21
|
+
case askEveryTime
|
|
22
|
+
case perSession
|
|
23
|
+
case liveView
|
|
24
|
+
case wholeScreen
|
|
25
|
+
public init?(rawValue: Swift.String)
|
|
26
|
+
public typealias RawValue = Swift.String
|
|
27
|
+
public var rawValue: Swift.String {
|
|
28
|
+
get
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
public struct SnaplyUser {
|
|
32
|
+
public let id: Swift.String
|
|
33
|
+
public let name: Swift.String?
|
|
34
|
+
public init(id: Swift.String, name: Swift.String? = nil)
|
|
35
|
+
}
|
|
36
|
+
public struct CaptureResult : Swift.Codable {
|
|
37
|
+
public let captureId: Swift.String
|
|
38
|
+
public let imageUrl: Swift.String
|
|
39
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
40
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
41
|
+
}
|
|
42
|
+
public struct SnaplyError : Swift.Error {
|
|
43
|
+
public let status: Swift.Int
|
|
44
|
+
public let code: Swift.String
|
|
45
|
+
public let message: Swift.String
|
|
46
|
+
}
|
|
47
|
+
public struct LiveSession {
|
|
48
|
+
public let sessionId: Swift.String
|
|
49
|
+
}
|
|
50
|
+
public struct SnaplyCallbacks {
|
|
51
|
+
public var onRequestShown: (() -> Swift.Void)?
|
|
52
|
+
public var onAllowed: ((SnaplyAgent.CaptureResult) -> Swift.Void)?
|
|
53
|
+
public var onDenied: (() -> Swift.Void)?
|
|
54
|
+
public var onExpired: (() -> Swift.Void)?
|
|
55
|
+
public var onError: ((any Swift.Error) -> Swift.Void)?
|
|
56
|
+
public var onRemoteControl: ((Swift.Bool) -> Swift.Void)?
|
|
57
|
+
public var onLiveEnded: ((SnaplyAgent.LiveSession) -> Swift.Void)?
|
|
58
|
+
public var onLiveView: ((Swift.Bool) -> Swift.Void)?
|
|
59
|
+
public init(onRequestShown: (() -> Swift.Void)? = nil, onAllowed: ((SnaplyAgent.CaptureResult) -> Swift.Void)? = nil, onDenied: (() -> Swift.Void)? = nil, onExpired: (() -> Swift.Void)? = nil, onError: ((any Swift.Error) -> Swift.Void)? = nil, onRemoteControl: ((Swift.Bool) -> Swift.Void)? = nil, onLiveEnded: ((SnaplyAgent.LiveSession) -> Swift.Void)? = nil, onLiveView: ((Swift.Bool) -> Swift.Void)? = nil)
|
|
60
|
+
}
|
|
20
61
|
public struct SnaplyRedaction {
|
|
21
62
|
public var color: UIKit.UIColor
|
|
22
63
|
public var label: Swift.String
|
|
@@ -99,10 +140,24 @@ public struct SnaplyRedactionRule {
|
|
|
99
140
|
public let value: Swift.String
|
|
100
141
|
public let label: Swift.String?
|
|
101
142
|
}
|
|
143
|
+
public enum SnaplyEnvironment {
|
|
144
|
+
case live
|
|
145
|
+
case custom(Foundation.URL, serverKeys: [Swift.String])
|
|
146
|
+
public static let developmentMaster: Swift.String
|
|
147
|
+
public var url: Foundation.URL {
|
|
148
|
+
get
|
|
149
|
+
}
|
|
150
|
+
}
|
|
102
151
|
public enum Snaply {
|
|
103
152
|
public static func configure(key: Swift.String, environment: SnaplyAgent.SnaplyEnvironment = .live, user: SnaplyAgent.SnaplyUser? = nil, collectVendorId: Swift.Bool = true, language: Swift.String = "en") async throws
|
|
104
153
|
public static func configure(key: Swift.String, environment: SnaplyAgent.SnaplyEnvironment = .live, user: SnaplyAgent.SnaplyUser? = nil, collectVendorId: Swift.Bool = true, language: Swift.String = "en", completion: (((any Swift.Error)?) -> Swift.Void)? = nil)
|
|
105
154
|
public static func on(_ callbacks: SnaplyAgent.SnaplyCallbacks)
|
|
155
|
+
public static var isLiveViewActive: Swift.Bool {
|
|
156
|
+
get
|
|
157
|
+
}
|
|
158
|
+
public static var isRemoteControlActive: Swift.Bool {
|
|
159
|
+
get
|
|
160
|
+
}
|
|
106
161
|
public static func setRedactionStyle(_ style: SnaplyAgent.SnaplyRedaction)
|
|
107
162
|
@_Concurrency.MainActor public static func registerHostedView(_ view: UIKit.UIView, host: (any SnaplyAgent.SnaplyHostedView)?)
|
|
108
163
|
public static func identify(id: Swift.String, name: Swift.String? = nil, phone: Swift.String? = nil, identitySignature: Swift.String? = nil)
|
|
@@ -111,58 +166,10 @@ public enum Snaply {
|
|
|
111
166
|
public static func showSupportCode()
|
|
112
167
|
public static func stop()
|
|
113
168
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
case liveView
|
|
118
|
-
case wholeScreen
|
|
119
|
-
public init?(rawValue: Swift.String)
|
|
120
|
-
public typealias RawValue = Swift.String
|
|
121
|
-
public var rawValue: Swift.String {
|
|
122
|
-
get
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
public struct SnaplyUser {
|
|
126
|
-
public let id: Swift.String
|
|
127
|
-
public let name: Swift.String?
|
|
128
|
-
public init(id: Swift.String, name: Swift.String? = nil)
|
|
129
|
-
}
|
|
130
|
-
public struct CaptureResult : Swift.Codable {
|
|
131
|
-
public let captureId: Swift.String
|
|
132
|
-
public let imageUrl: Swift.String
|
|
133
|
-
public func encode(to encoder: any Swift.Encoder) throws
|
|
134
|
-
public init(from decoder: any Swift.Decoder) throws
|
|
135
|
-
}
|
|
136
|
-
public struct SnaplyError : Swift.Error {
|
|
137
|
-
public let status: Swift.Int
|
|
138
|
-
public let code: Swift.String
|
|
139
|
-
public let message: Swift.String
|
|
140
|
-
}
|
|
141
|
-
public struct LiveSession {
|
|
142
|
-
public let sessionId: Swift.String
|
|
143
|
-
}
|
|
144
|
-
public struct SnaplyCallbacks {
|
|
145
|
-
public var onRequestShown: (() -> Swift.Void)?
|
|
146
|
-
public var onAllowed: ((SnaplyAgent.CaptureResult) -> Swift.Void)?
|
|
147
|
-
public var onDenied: (() -> Swift.Void)?
|
|
148
|
-
public var onExpired: (() -> Swift.Void)?
|
|
149
|
-
public var onError: ((any Swift.Error) -> Swift.Void)?
|
|
150
|
-
public var onRemoteControl: ((Swift.Bool) -> Swift.Void)?
|
|
151
|
-
public var onLiveEnded: ((SnaplyAgent.LiveSession) -> Swift.Void)?
|
|
152
|
-
public init(onRequestShown: (() -> Swift.Void)? = nil, onAllowed: ((SnaplyAgent.CaptureResult) -> Swift.Void)? = nil, onDenied: (() -> Swift.Void)? = nil, onExpired: (() -> Swift.Void)? = nil, onError: ((any Swift.Error) -> Swift.Void)? = nil, onRemoteControl: ((Swift.Bool) -> Swift.Void)? = nil, onLiveEnded: ((SnaplyAgent.LiveSession) -> Swift.Void)? = nil)
|
|
153
|
-
}
|
|
154
|
-
public enum SnaplyEnvironment {
|
|
155
|
-
case live
|
|
156
|
-
case custom(Foundation.URL, serverKeys: [Swift.String])
|
|
157
|
-
public static let developmentMaster: Swift.String
|
|
158
|
-
public var url: Foundation.URL {
|
|
159
|
-
get
|
|
160
|
-
}
|
|
161
|
-
}
|
|
169
|
+
extension SnaplyAgent.CaptureMode : Swift.Equatable {}
|
|
170
|
+
extension SnaplyAgent.CaptureMode : Swift.Hashable {}
|
|
171
|
+
extension SnaplyAgent.CaptureMode : Swift.RawRepresentable {}
|
|
162
172
|
extension SnaplyAgent.SnaplyHostedControlMode : Swift.Equatable {}
|
|
163
173
|
extension SnaplyAgent.SnaplyHostedControlMode : Swift.Hashable {}
|
|
164
174
|
extension SnaplyAgent.SnaplyHostedInput.Action : Swift.Equatable {}
|
|
165
175
|
extension SnaplyAgent.SnaplyHostedInput.Action : Swift.Hashable {}
|
|
166
|
-
extension SnaplyAgent.CaptureMode : Swift.Equatable {}
|
|
167
|
-
extension SnaplyAgent.CaptureMode : Swift.Hashable {}
|
|
168
|
-
extension SnaplyAgent.CaptureMode : Swift.RawRepresentable {}
|
|
Binary file
|
|
@@ -10,23 +10,23 @@
|
|
|
10
10
|
</data>
|
|
11
11
|
<key>Info.plist</key>
|
|
12
12
|
<data>
|
|
13
|
-
|
|
13
|
+
HR50EHNp+oxy61UsNCK3Ofzze4o=
|
|
14
14
|
</data>
|
|
15
15
|
<key>Modules/SnaplyAgent.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
16
16
|
<data>
|
|
17
|
-
|
|
17
|
+
G8l2tGnl5hJ1Oi80Z03QFWmMhRQ=
|
|
18
18
|
</data>
|
|
19
19
|
<key>Modules/SnaplyAgent.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
20
20
|
<data>
|
|
21
|
-
|
|
21
|
+
bmOLNLvHnfAJyhbDRcYbzuTnIBk=
|
|
22
22
|
</data>
|
|
23
23
|
<key>Modules/SnaplyAgent.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
24
24
|
<data>
|
|
25
|
-
|
|
25
|
+
o0RrUHqmG43itbFV4uDNVvwHio8=
|
|
26
26
|
</data>
|
|
27
27
|
<key>Modules/SnaplyAgent.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
28
28
|
<data>
|
|
29
|
-
|
|
29
|
+
d0LiN97BuLjHYqL7EHE7Ke1XU9U=
|
|
30
30
|
</data>
|
|
31
31
|
<key>Modules/module.modulemap</key>
|
|
32
32
|
<data>
|
|
@@ -77,28 +77,28 @@
|
|
|
77
77
|
<dict>
|
|
78
78
|
<key>hash2</key>
|
|
79
79
|
<data>
|
|
80
|
-
|
|
80
|
+
SWqriQVsx+DCT1LzzQ3WFYwOATmW2Ir/NQG1T68ARk4=
|
|
81
81
|
</data>
|
|
82
82
|
</dict>
|
|
83
83
|
<key>Modules/SnaplyAgent.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
84
84
|
<dict>
|
|
85
85
|
<key>hash2</key>
|
|
86
86
|
<data>
|
|
87
|
-
|
|
87
|
+
aq0Mjq60xMHTcxRRM0ddRS9YIzfrtnI30PUclAwGzwY=
|
|
88
88
|
</data>
|
|
89
89
|
</dict>
|
|
90
90
|
<key>Modules/SnaplyAgent.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
91
91
|
<dict>
|
|
92
92
|
<key>hash2</key>
|
|
93
93
|
<data>
|
|
94
|
-
|
|
94
|
+
5kmpGuJ1CR3Q93I2yxNGtcygKcXei9Kcj4YXqImBi+o=
|
|
95
95
|
</data>
|
|
96
96
|
</dict>
|
|
97
97
|
<key>Modules/SnaplyAgent.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
98
98
|
<dict>
|
|
99
99
|
<key>hash2</key>
|
|
100
100
|
<data>
|
|
101
|
-
|
|
101
|
+
4Q4Ti/W4hddXbjXppLzBth/u8J19fyDN3bPFPYYSTyI=
|
|
102
102
|
</data>
|
|
103
103
|
</dict>
|
|
104
104
|
<key>Modules/module.modulemap</key>
|
|
@@ -129,4 +129,14 @@ static BOOL SnaplyRelayTap(UIView *surface, CGPoint point)
|
|
|
129
129
|
[SnaplyBridge stop];
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
+
- (NSNumber *)isLiveViewActive
|
|
133
|
+
{
|
|
134
|
+
return @(SnaplyBridge.isLiveViewActive);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
- (NSNumber *)isRemoteControlActive
|
|
138
|
+
{
|
|
139
|
+
return @(SnaplyBridge.isRemoteControlActive);
|
|
140
|
+
}
|
|
141
|
+
|
|
132
142
|
@end
|
|
@@ -62,6 +62,10 @@ public final class SnaplyBridge: NSObject {
|
|
|
62
62
|
onMain { Snaply.stop() }
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
@objc public static var isLiveViewActive: Bool { Snaply.isLiveViewActive }
|
|
66
|
+
|
|
67
|
+
@objc public static var isRemoteControlActive: Bool { Snaply.isRemoteControlActive }
|
|
68
|
+
|
|
65
69
|
private static func onMain(_ work: @escaping @MainActor () -> Void) {
|
|
66
70
|
DispatchQueue.main.async { MainActor.assumeIsolated { work() } }
|
|
67
71
|
}
|
|
@@ -77,7 +81,8 @@ public final class SnaplyBridge: NSObject {
|
|
|
77
81
|
send("error", ["code": snaply?.code ?? "error", "message": snaply?.message ?? error.localizedDescription, "status": snaply?.status ?? 0])
|
|
78
82
|
},
|
|
79
83
|
onRemoteControl: { active in send("remoteControl", ["active": active]) },
|
|
80
|
-
onLiveEnded: { session in send("liveEnded", ["sessionId": session.sessionId]) }
|
|
84
|
+
onLiveEnded: { session in send("liveEnded", ["sessionId": session.sessionId]) },
|
|
85
|
+
onLiveView: { active in send("liveView", ["active": active]) }
|
|
81
86
|
)
|
|
82
87
|
}
|
|
83
88
|
|
package/lib/index.d.ts
CHANGED
|
@@ -51,9 +51,13 @@ export type SnaplyCallbacks = {
|
|
|
51
51
|
onRemoteControl?: (active: boolean) => void;
|
|
52
52
|
/** Live view stopped; the argument is the session's id. */
|
|
53
53
|
onLiveEnded?: (sessionId: string) => void;
|
|
54
|
+
/**
|
|
55
|
+
* Live view started (`true`), once the sharing indicator is on screen, or ended. At the end it comes after
|
|
56
|
+
* `onRemoteControl(false)` and before `onLiveEnded`.
|
|
57
|
+
*/
|
|
58
|
+
onLiveView?: (active: boolean) => void;
|
|
54
59
|
};
|
|
55
|
-
|
|
56
|
-
export declare const Snaply: {
|
|
60
|
+
declare const methods: {
|
|
57
61
|
/** Registers this device and connects. */
|
|
58
62
|
configure(configuration: SnaplyConfiguration): Promise<void>;
|
|
59
63
|
/** Observe SDK events. Attach before `configure`: a request can arrive as soon as the device registers. */
|
|
@@ -69,3 +73,14 @@ export declare const Snaply: {
|
|
|
69
73
|
/** Disconnects and removes any visible prompt. */
|
|
70
74
|
stop(): void;
|
|
71
75
|
};
|
|
76
|
+
type SnaplyAnswers = {
|
|
77
|
+
/**
|
|
78
|
+
* True while the person is sharing this app's screen with support: from their "Start sharing" until the live
|
|
79
|
+
* view has ended. For anything your app would rather not show or do while support watches.
|
|
80
|
+
*/
|
|
81
|
+
readonly isLiveViewActive: boolean;
|
|
82
|
+
/** True while support is controlling the app. Never true outside a live view. */
|
|
83
|
+
readonly isRemoteControlActive: boolean;
|
|
84
|
+
};
|
|
85
|
+
/** Snaply Agent. Call `configure` once at app start; nothing else is needed for captures to work. */
|
|
86
|
+
export declare const Snaply: typeof methods & SnaplyAnswers;
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var p=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var N=(W,c)=>{for(var x in c)p(W,x,{get:c[x],enumerable:!0})},L=(W,c,x,d)=>{if(c&&typeof c=="object"||typeof c=="function")for(let e of j(c))!y.call(W,e)&&e!==x&&p(W,e,{get:()=>c[e],enumerable:!(d=g(c,e))||d.enumerable});return W};var M=W=>L(p({},"__esModule",{value:!0}),W);var z={};N(z,{SNAPLY_REDACT_MARK:()=>h,Snaply:()=>Z,SnaplyDevelopmentMaster:()=>D,SnaplyError:()=>P,SnaplyRedact:()=>B});module.exports=M(z);var q=require("react-native"),G=require("react-native"),w=require("react/jsx-runtime");(function(W,c){function x(t,k){return u(k- -117,t)}function d(t,k){return u(t-918,k)}for(var e=W();;)try{var o=parseInt(d(1067,"XIfR"))/1*(-parseInt(x(")UzL",85))/2)+-parseInt(d(1159,"ej$@"))/3*(parseInt(d(1083,"E@&4"))/4)+-parseInt(d(1171,"Zmp5"))/5+-parseInt(x("hcMi",97))/6*(-parseInt(x("wHVW",114))/7)+parseInt(x("3[)j",27))/8*(parseInt(d(1131,"kztY"))/9)+parseInt(x("5SIu",8))/10+parseInt(d(1123,")UzL"))/11*(parseInt(d(1169,"d4h#"))/12);if(o===c)break;e.push(e.shift())}catch{e.push(e.shift())}})(l,4099*-49+-16698+626045);var K=Object[n(579,"F%3R")],F=(W,c,x)=>c in W?K(W,c,{[f(-751,"Aekr")]:!0,[f(-790,"F%3R")]:!0,[n(664,"hcMi")]:!0,[f(-719,"EXjs")]:x}):W[c]=x,v=(W,c,x)=>F(W,typeof c!==f(-820,"NCvj")?c+"":c,x);function f(W,c){return u(W- -967,c)}var s=q.TurboModuleRegistry[n(700,"giQH")](n(583,"eU[W")),h=f(-835,"5SIu");function B({[f(-828,"AB^0")]:W,[n(638,"r)h!")]:c,...x}){function d(o,t){return n(o- -379,t)}function e(o,t){return n(t- -41,o)}return(0,w.jsx)(G.View,{...x,[e("HTc5",573)]:!1,[d(243,"ej$@")]:c?""[d(333,"]3n5")](h,"-")[d(251,"XIfR")](c):h,[e("7q7)",637)]:W})}function l(){var W=["WRBdISkmmua","aMLPpfRdSxBcMSkjkMBdRgzHWPtdMgtcV8o4wfu","sSkAW4ufWOu","wx8mzSktCGuwWOLipW","B0jDBmonmCotDSkqWPNcJ8ktWPO","DhVdJCoXgJ0jWOj2WOddHa","WRddQmkvW7tcNXVdPSoNw8opW5u","kSoyx8k5w0xdGfVdOGG","W5P0W7xdOmoaWQxcSgRcTmoJW7ldJCoYfSoJWPO","WPpcQSkqfSkfqMa","smoAWOHIWPNdMwDgW5Sh","ywpdSLCqWRVdNG","iIyGACkRW5pdQmktWOe2WReFWOvLdSks","W5bVW5ddPCosWRlcG20","vmoZWQqMWRy","amkWW6rTxJS","EatdRSkHm8kHbSoGW7G","zmorWRqb","sgJdU1eN","rCo+WPSAEvddM8oDl8ouWOTZW5e","lSovxSk9sfi","BG/cGfRdTSkcW4fIwG8","wh0ofmo9vZ8VWO0","xJGlAXL3W7O1W5iS","WPRdOaJdVYyu","zxxdK0eCWRpdJYldICkcWPrWWPKQWOyduI4Sdci","W4KdpCkNs8o7ESo5ACoJW4ZcSSo7WOFcSW","f8kGW7P0vc3dG1BcS2eF","zmoFWQaqWQtdMWWxva","iCoxr8kX","qvb7","WPPAW6/dMmou","W6dcSCovWQtcLYBdNCogrSoa","WOnuwLhcNCoUjr9+ebfZWO4","aL3dVSkil8kDad8fW60","nv7cJSk2sHb3e8oaWPjBWRG","fqC6WOK7af1wF8oIWRLSaq","cSoHqCk6xa","W4arcbO","eSk0W6zXxG","lCo+WO5dW5C","WRbmW43dOmoS","wsicA0BdJMxcHSkgka","W7BcNqPkpmktWOlcSSoiW5lcPa","WRauW65WWRxcKbm0sgZcNJei","W6XiWOKLW6ddJ1CFFLFcHH8kW60D","WONdUxCfW4i3","eLFdOSkDk8kB","AX5bgYO","WQjJt8k/W6naDSkMwa","esS5m2GJtNxcGK7cLW","WQxdH8k7gvVcP8kbWP8SqJ7cKr/dMa","ESkiW4ZdLq","W705WPTVWROrW64glmozCrxcKa","DmokWReqWQtdMG","n8kklCoEsmkFW65HluDI","WQjIW40XW6X2WQW/","bsz5lCoBscqJWP4","arddINJcSa","W6bkW43dI8or","WRHHW40MW6vAW7mHpSoSxIFcQG","iJ7cJ8kTua","cmknoSolyCkiW4TJla","WQJdHSk4hKhcQ8k3WPq","cmkyW41CFq","WQ3dTSofW4NdSrbV","W6bjWR8L","W5ykbatdISkUCcq","WONcT8kWfG","gSkIi8kFW50","W4iqp8okWPxcNfClnq","dHZdOu3cNmkDaSkf","WPdcGWRdVmolW4DQla","W5vqWRhdI8kK","EatdO8kKkCkRnmoRW7JdPSk6","WPNcKSkacwNdOq","BCkQW5eHW4yTzCkAW5WHoXNdGSoRhZHhW5lcNmoyWOddVK/dQCozWOldSSk3gxpdLSkvW57dMSokfmo0BSoXpbFcGSoFWQiLWORcTSkVkgnRb8kGW7DZW70bW5VdRSk+lSoHW75iEJddGCklWQaLvmkblCofDrhdHSkKW5z3WOWOW6pcScPFAa","W4JdTCoJxmopg33cLwldKqBcGq","jcpcKCkUrW0UWOrGWPVdLvxcImkbWQm","mLZdKW3dUmk5W6bxCqCKWPn6xeCQwW","W4ywaHG","rCoZWRfzWOy","jcpcMCkN","bLddNCk/pW","WRVdP8koW7G","WQ7dJmkohLtcSSk9WPqgrd7cJr8","zmorWRWiWRddMrO/uHz7","r1LJW5z0vqK","DSoWz8o4WQC","eXi2FCo5iNSg","WPVcOCkH","WQRcHmkjW7qY","ggPxmem","omokWPxcLwRdQSosmmklW5a","WQhdO8kqW6NcPda","yWq7sIu","W7uZcCoZWQ4eFmkcvCoXivm","fau+WO83b1PGw8oGWObxgq","W5Omkq3dGmk1Cc4","eCo+WRHIW5qYW40X","frtdS0/cJq","W7NdPYFdISo6","WP/cQ8k7b8kwwq","CCkXW5RdIKi","f8krpmoEs8kuW5Tfj01Z","WQldJCkZfLZcPCkKWP8IudFcHG","k8o0WRX8W4WIW646y0Sc","WOxdU8kzpge","WQldJCkZfLZcPCkKWP8M","BmoBWQK","WRZdQ8ogW5tdIJe","wcX0jSoJrtm","W5z0WPmQW7G","wSkBW5iyWR4lBmkI","WOddPYxdOIucWRBdUerLkMFdKHpdHre","FSkahmoKr2/dH0hdHdK","bszUmmoAvdm1WO5UiSoXbfS","WO7cOCkKeCksxMBcQ2pdRYFcIG","dZPooSoz","DhT/mSk0W6BdN8kyWQiR","W4VcU34lW58jW50g","tSklW4mdWOea","W5yMfCkixG","WRldLSk8bedcSq","o8k+k8kfW7K","FvqunSkzaXfDxq","W5z6WQtdJmkPWRldHa","WQ1MW5JdP8oPW6RdQSoOW7O","WRNdP8knW7RcMbxdR8oV","W5XPW7xdOmoaWQxcSgRcTmoJ","W7nMD8k4W55wDG","yMFdRee","i1n2due","W7uWcCoYWQDcz8kEv8orbG","ESkuW4ZdKKddH8oeomkUW7zgW6LbqCkU","WQBdR8oyW4u","md7cLmk2qWW2WRC"];return l=function(){return W},l()}var P=class extends Error{constructor(W,c,x=710*2+1957+-3377){var d={rtAWj:k(-87,"ZSg@"),URHju:function(i,S,a){return i(S,a)},faJRI:function(i,S,a){return i(S,a)},UdSOw:k(-55,"hcMi")};function e(i,S){return n(S- -78,i)}var o=d[k(-49,"wLS!")][e("d4h#",542)]("|"),t=1*7415+828+8243*-1;function k(i,S){return n(i- -665,S)}for(;;){switch(o[t++]){case"0":this[k(-71,"Zmp5")]=W;continue;case"1":this[k(-6,"yp0t")]=k(-31,"N$l@");continue;case"2":super(c);continue;case"3":this[e("PA1A",633)]=x;continue;case"4":d[k(-25,"Zmp5")](v,this,k(-83,"HTc5"));continue;case"5":d[e("xsaD",508)](v,this,d[e("N$l@",627)]);continue}break}}},D=n(604,"jaW!"),m={},Q=!1;function H(){if(Q)return;function W(c,x){return f(c-1503,x)}Q=!0,s[W(693,"F%3R")](V)}function V(W){var c={};c[d(385,"*Q)r")]=x(-695,"XIfR");function x(t,k){return f(t-83,k)}c[d(458,"o49w")]=d(377,"4@IG"),c[x(-657,"yp0t")]=d(442,"EXjs"),c[d(412,"6jkT")]=x(-747,"r)h!");function d(t,k){return f(t-1185,k)}c[x(-634,"o49w")]=d(408,"wHVW"),c[d(427,"F%3R")]=d(352,"eU[W"),c[d(349,"7q7)")]=d(379,"aMDO"),c[d(475,"ZSg@")]=function(t,k){return t===k};var e=c;switch(W[x(-728,"ej$@")]){case e[x(-711,"3[)j")]:m[d(406,"wHVW")]?.();break;case e[x(-705,"F%3R")]:var o={};o[d(339,")UzL")]=W[d(455,"HTc5")]??"",o[d(361,"xsaD")]=W[x(-756,"5SIu")]??"",m[x(-659,"OeUO")]?.(o);break;case e[d(359,"6)b4")]:m[d(388,"AB^0")]?.();break;case e[x(-748,"EXjs")]:m[x(-755,"wHVW")]?.();break;case e[x(-739,"68KA")]:m[x(-666,"XIfR")]?.(new P(W[d(372,"hcMi")]??x(-673,"jaW!"),W[x(-664,"yp0t")]??"",W[x(-689,"F%3R")]??-900+18*349+-5382));break;case d(446,"B&O7"):m[x(-630,"Zmp5")]?.(W[d(447,"Aekr")]===!0);break;case e[x(-729,"]3n5")]:m[d(364,"OeUO")]?.(W[d(417,"o49w")]??"");break;case e[x(-661,"HTc5")]:m[x(-683,"7q7)")]?.(e[d(422,"d4h#")](W[x(-691,"jaW!")],!0));break}}function u(W,c){W=W-121;var x=l(),d=x[W];if(u.BUbCkp===void 0){var e=function(i){for(var S="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=",a="",b="",R=0,C,r,O=0;r=i.charAt(O++);~r&&(C=R%4?C*64+r:r,R++%4)?a+=String.fromCharCode(255&C>>(-2*R&6)):0)r=S.indexOf(r);for(var I=0,J=a.length;I<J;I++)b+="%"+("00"+a.charCodeAt(I).toString(16)).slice(-2);return decodeURIComponent(b)},o=function(i,S){var a=[],b=0,R,C="";i=e(i);var r;for(r=0;r<256;r++)a[r]=r;for(r=0;r<256;r++)b=(b+a[r]+S.charCodeAt(r%S.length))%256,R=a[r],a[r]=a[b],a[b]=R;r=0,b=0;for(var O=0;O<i.length;O++)r=(r+1)%256,b=(b+a[r])%256,R=a[r],a[r]=a[b],a[b]=R,C+=String.fromCharCode(i.charCodeAt(O)^a[(a[r]+a[b])%256]);return C};u.ekWmrk=o,u.beIoyi={},u.BUbCkp=!0}var t=x[-4972+-1*-5231+-259];u.UNnddA!==t&&(u.beIoyi={},u.UNnddA=t);var k=u.beIoyi[W];return k===void 0?(u.RIDtsg===void 0&&(u.RIDtsg=!0),d=u.ekWmrk(d,c),u.beIoyi[W]=d):d=k,d}function n(W,c){return u(W-456,c)}var X={async[n(598,"A!ZI")](W){function c(e,o){return f(o-1456,e)}function x(e,o){return f(o-642,e)}var d={xMyoQ:function(e){return e()},hGLVz:c("hcMi",622)};d[x("E@&4",-150)](H);try{await s[x("F%3R",-145)](W[x("HTc5",-144)],W[x("ej$@",-110)]??null,W[x("AB^0",-78)]?.id??null,W[x("XIfR",-185)]?.[x("Aekr",-87)]??null,W[c("hcMi",639)]??!0,W[c("ej$@",689)]??"en",W[c("]3n5",732)]??[])}catch(e){let o=e;throw new P(o[c("HTc5",715)]??x("6)b4",-129),o[c("68KA",687)]??d[c("mfxV",642)],o[c("jaW!",674)]?.[x("xhuH",-92)]??2*-3106+6*-903+11630*1)}},on(W){var c={EWknb:function(d){return d()}};m=W;function x(d,e){return f(e-591,d)}c[x("Aekr",-130)](H)},[f(-796,"N$l@")](W){function c(d,e){return n(d- -399,e)}function x(d,e){return n(d- -978,e)}s[x(-387,"F%3R")](W.id,W[x(-315,"r)h!")]??null,W[c(220,"fP]U")]??null,W[x(-371,"IKTm")]??null)},[f(-795,"xsaD")](){function W(c,x){return f(x-1471,c)}s[W("xsaD",676)]()},[n(692,"EXjs")](){function W(c,x){return n(c- -25,x)}return s[W(607,"eU[W")]()},[f(-732,"6jkT")](){function W(c,x){return n(c- -1356,x)}s[W(-694,"E@&4")]()},[f(-843,"E@&4")](){function W(c,x){return n(x- -1132,c)}s[W("AB^0",-524)]()}},Z=Object[n(677,"3ypI")](X,{[n(673,"7q7)")]:{[f(-748,"mfxV")]:!0,[f(-728,"4@IG")]:()=>s[n(642,"xhuH")]()},[n(690,"yp0t")]:{[n(688,"*Q)r")]:!0,[n(618,"XIfR")]:()=>s[n(666,"d4h#")]()}});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snaplyagent/react-native",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Snaply Agent for React Native — consent-first screen capture for support teams: screenshots, live view and remote control, with on-device redaction.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"react-native": "lib/index.js",
|
|
@@ -33,6 +33,8 @@ export interface Spec extends TurboModule {
|
|
|
33
33
|
supportCode(): Promise<string | null>;
|
|
34
34
|
showSupportCode(): void;
|
|
35
35
|
stop(): void;
|
|
36
|
+
isLiveViewActive(): boolean;
|
|
37
|
+
isRemoteControlActive(): boolean;
|
|
36
38
|
readonly onSnaplyEvent: CodegenTypes.EventEmitter<SnaplyNativeEvent>;
|
|
37
39
|
}
|
|
38
40
|
|