@kindly-ai/react-native 0.1.0 → 0.1.1
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/KindlyReactNative.podspec +35 -3
- package/android/build.gradle +1 -1
- package/android/maven-repo/ai/kindly/sdk/1.0.120/sdk-1.0.120.aar +0 -0
- package/android/maven-repo/ai/kindly/sdk/{1.0.93/sdk-1.0.93.pom → 1.0.120/sdk-1.0.120.pom} +6 -1
- package/android/src/main/java/com/kindlyai/reactnative/KindlyReactNativeModule.kt +25 -4
- package/ios/Frameworks/Kindly.xcframework/_CodeSignature/CodeDirectory +0 -0
- package/ios/Frameworks/Kindly.xcframework/_CodeSignature/CodeRequirements-1 +0 -0
- package/ios/Frameworks/Kindly.xcframework/_CodeSignature/CodeResources +60 -60
- package/ios/Frameworks/Kindly.xcframework/_CodeSignature/CodeSignature +0 -0
- package/ios/Frameworks/Kindly.xcframework/ios-arm64/Kindly.framework/Config.plist +0 -0
- package/ios/Frameworks/Kindly.xcframework/ios-arm64/Kindly.framework/Info.plist +0 -0
- package/ios/Frameworks/Kindly.xcframework/ios-arm64/Kindly.framework/Kindly +0 -0
- package/ios/Frameworks/Kindly.xcframework/ios-arm64/Kindly.framework/Modules/Kindly.swiftmodule/arm64-apple-ios.abi.json +908 -172
- package/ios/Frameworks/Kindly.xcframework/ios-arm64/Kindly.framework/Modules/Kindly.swiftmodule/arm64-apple-ios.private.swiftinterface +19 -0
- package/ios/Frameworks/Kindly.xcframework/ios-arm64/Kindly.framework/Modules/Kindly.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/Frameworks/Kindly.xcframework/ios-arm64/Kindly.framework/Modules/Kindly.swiftmodule/arm64-apple-ios.swiftinterface +18 -0
- package/ios/Frameworks/Kindly.xcframework/ios-arm64/Kindly.framework/_CodeSignature/CodeResources +11 -11
- package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/Config.plist +0 -0
- package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/Info.plist +0 -0
- package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/Kindly +0 -0
- package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/Modules/Kindly.swiftmodule/arm64-apple-ios-simulator.abi.json +908 -172
- package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/Modules/Kindly.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +19 -0
- package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/Modules/Kindly.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/Modules/Kindly.swiftmodule/arm64-apple-ios-simulator.swiftinterface +18 -0
- package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/Modules/Kindly.swiftmodule/x86_64-apple-ios-simulator.abi.json +908 -172
- package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/Modules/Kindly.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +19 -0
- package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/Modules/Kindly.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/Modules/Kindly.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +18 -0
- package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/_CodeSignature/CodeResources +19 -19
- package/ios/KindlyReactNative.h +15 -8
- package/ios/KindlyReactNative.mm +27 -1
- package/ios/KindlyReactNativeImpl.swift +38 -3
- package/lib/module/NativeKindlyReactNative.js.map +1 -1
- package/lib/module/index.js +39 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/NativeKindlyReactNative.d.ts +4 -0
- package/lib/typescript/src/NativeKindlyReactNative.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +23 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/NativeKindlyReactNative.ts +10 -0
- package/src/index.tsx +39 -0
- package/android/maven-repo/ai/kindly/sdk/1.0.93/sdk-1.0.93.aar +0 -0
|
@@ -63,6 +63,12 @@ public struct KindlySDKConfig {
|
|
|
63
63
|
public struct FormConfig {
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
+
public struct ExternalNotification {
|
|
67
|
+
public let id: Swift.String
|
|
68
|
+
public let title: Swift.String
|
|
69
|
+
public let body: Swift.String
|
|
70
|
+
public let userInfo: [Swift.AnyHashable : Any]
|
|
71
|
+
}
|
|
66
72
|
public enum KindlyEventType : Swift.String, Swift.CaseIterable {
|
|
67
73
|
case load
|
|
68
74
|
case message
|
|
@@ -298,9 +304,11 @@ public enum ChatConnectionState {
|
|
|
298
304
|
public protocol KindlyChatClientDelegate : ObjectiveC.NSObject {
|
|
299
305
|
func didPressButton(chatButton: Kindly.ExternalChatButton, chatLog: [Kindly.ExternalChatMessage])
|
|
300
306
|
func shouldHandleLink(url: Foundation.URL) -> Swift.Bool
|
|
307
|
+
func shouldHandleNotification(notification: Kindly.ExternalNotification) -> Swift.Bool
|
|
301
308
|
}
|
|
302
309
|
extension Kindly.KindlyChatClientDelegate {
|
|
303
310
|
public func shouldHandleLink(url: Foundation.URL) -> Swift.Bool
|
|
311
|
+
public func shouldHandleNotification(notification: Kindly.ExternalNotification) -> Swift.Bool
|
|
304
312
|
}
|
|
305
313
|
final public class KindlyChatClient {
|
|
306
314
|
public static var shared: Kindly.KindlyChatClient!
|
|
@@ -351,10 +359,18 @@ extension Kindly.Promise {
|
|
|
351
359
|
public func `catch`(on queue: Dispatch.DispatchQueue = .promises, _ onRejected: @escaping Kindly.Promise<T>.onRejected) -> Kindly.Promise<T>
|
|
352
360
|
@discardableResult
|
|
353
361
|
public func always(on queue: Dispatch.DispatchQueue = .promises, _ block: @escaping () -> Swift.Void) -> Kindly.Promise<T>
|
|
362
|
+
public func cancel()
|
|
363
|
+
public var isCancelled: Swift.Bool {
|
|
364
|
+
get
|
|
365
|
+
}
|
|
354
366
|
public func pipe(to target: Kindly.Promise<T>)
|
|
355
367
|
}
|
|
356
368
|
public enum KindlyLogger {
|
|
357
369
|
public static func log(_ tag: Swift.String, _ message: Swift.String, level: os.OSLogType = .default, filename: Swift.String = #file, function: Swift.String = #function, line: Swift.Int = #line)
|
|
370
|
+
public static func prettyPrintJson(_ json: Swift.String) -> Swift.String
|
|
371
|
+
}
|
|
372
|
+
extension Foundation.NSNotification.Name {
|
|
373
|
+
public static let kindlyThemeDidChange: Foundation.Notification.Name
|
|
358
374
|
}
|
|
359
375
|
public protocol Theme {
|
|
360
376
|
var background: UIKit.UIColor? { get }
|
|
@@ -497,6 +513,8 @@ extension Kindly.KindlyChatClient {
|
|
|
497
513
|
final public func setNewContext(_ context: [Swift.String : Swift.String])
|
|
498
514
|
final public class func clearNewContext()
|
|
499
515
|
final public func clearNewContext()
|
|
516
|
+
@discardableResult
|
|
517
|
+
final public class func sendMessage(_ text: Swift.String, newContext: [Swift.String : Swift.String]? = nil) -> Kindly.Promise<Kindly.ExternalChatMessage>
|
|
500
518
|
final public class func setAPNSDeviceToken(_ deviceToken: Foundation.Data)
|
|
501
519
|
final public class func setAPNSDeviceToken(_ deviceToken: Swift.String)
|
|
502
520
|
@discardableResult
|
|
@@ -520,6 +538,7 @@ extension Kindly.KindlyChatClient {
|
|
|
520
538
|
@_spi(Testing) extension Kindly.KindlyChatClient {
|
|
521
539
|
@_spi(Testing) final public class func _overrideSettings(_ overrides: [Swift.String : Any])
|
|
522
540
|
@_spi(Testing) final public class func _clearSettingsOverrides()
|
|
541
|
+
@_spi(Testing) final public class func _setVerboseLogs(_ enabled: Swift.Bool)
|
|
523
542
|
}
|
|
524
543
|
public typealias AuthTokenCallback = (_ chatId: Swift.String, _ promise: Kindly.Promise<Swift.String>) -> Swift.Void
|
|
525
544
|
extension Kindly.KindlyEventType : Swift.Equatable {}
|
|
Binary file
|
|
@@ -63,6 +63,12 @@ public struct KindlySDKConfig {
|
|
|
63
63
|
public struct FormConfig {
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
+
public struct ExternalNotification {
|
|
67
|
+
public let id: Swift.String
|
|
68
|
+
public let title: Swift.String
|
|
69
|
+
public let body: Swift.String
|
|
70
|
+
public let userInfo: [Swift.AnyHashable : Any]
|
|
71
|
+
}
|
|
66
72
|
public enum KindlyEventType : Swift.String, Swift.CaseIterable {
|
|
67
73
|
case load
|
|
68
74
|
case message
|
|
@@ -298,9 +304,11 @@ public enum ChatConnectionState {
|
|
|
298
304
|
public protocol KindlyChatClientDelegate : ObjectiveC.NSObject {
|
|
299
305
|
func didPressButton(chatButton: Kindly.ExternalChatButton, chatLog: [Kindly.ExternalChatMessage])
|
|
300
306
|
func shouldHandleLink(url: Foundation.URL) -> Swift.Bool
|
|
307
|
+
func shouldHandleNotification(notification: Kindly.ExternalNotification) -> Swift.Bool
|
|
301
308
|
}
|
|
302
309
|
extension Kindly.KindlyChatClientDelegate {
|
|
303
310
|
public func shouldHandleLink(url: Foundation.URL) -> Swift.Bool
|
|
311
|
+
public func shouldHandleNotification(notification: Kindly.ExternalNotification) -> Swift.Bool
|
|
304
312
|
}
|
|
305
313
|
final public class KindlyChatClient {
|
|
306
314
|
public static var shared: Kindly.KindlyChatClient!
|
|
@@ -351,10 +359,18 @@ extension Kindly.Promise {
|
|
|
351
359
|
public func `catch`(on queue: Dispatch.DispatchQueue = .promises, _ onRejected: @escaping Kindly.Promise<T>.onRejected) -> Kindly.Promise<T>
|
|
352
360
|
@discardableResult
|
|
353
361
|
public func always(on queue: Dispatch.DispatchQueue = .promises, _ block: @escaping () -> Swift.Void) -> Kindly.Promise<T>
|
|
362
|
+
public func cancel()
|
|
363
|
+
public var isCancelled: Swift.Bool {
|
|
364
|
+
get
|
|
365
|
+
}
|
|
354
366
|
public func pipe(to target: Kindly.Promise<T>)
|
|
355
367
|
}
|
|
356
368
|
public enum KindlyLogger {
|
|
357
369
|
public static func log(_ tag: Swift.String, _ message: Swift.String, level: os.OSLogType = .default, filename: Swift.String = #file, function: Swift.String = #function, line: Swift.Int = #line)
|
|
370
|
+
public static func prettyPrintJson(_ json: Swift.String) -> Swift.String
|
|
371
|
+
}
|
|
372
|
+
extension Foundation.NSNotification.Name {
|
|
373
|
+
public static let kindlyThemeDidChange: Foundation.Notification.Name
|
|
358
374
|
}
|
|
359
375
|
public protocol Theme {
|
|
360
376
|
var background: UIKit.UIColor? { get }
|
|
@@ -497,6 +513,8 @@ extension Kindly.KindlyChatClient {
|
|
|
497
513
|
final public func setNewContext(_ context: [Swift.String : Swift.String])
|
|
498
514
|
final public class func clearNewContext()
|
|
499
515
|
final public func clearNewContext()
|
|
516
|
+
@discardableResult
|
|
517
|
+
final public class func sendMessage(_ text: Swift.String, newContext: [Swift.String : Swift.String]? = nil) -> Kindly.Promise<Kindly.ExternalChatMessage>
|
|
500
518
|
final public class func setAPNSDeviceToken(_ deviceToken: Foundation.Data)
|
|
501
519
|
final public class func setAPNSDeviceToken(_ deviceToken: Swift.String)
|
|
502
520
|
@discardableResult
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
</data>
|
|
11
11
|
<key>Config.plist</key>
|
|
12
12
|
<data>
|
|
13
|
-
|
|
13
|
+
AA5SGzmGO338xNXmWA7p3pPWeps=
|
|
14
14
|
</data>
|
|
15
15
|
<key>ConfirmationWindow.nib</key>
|
|
16
16
|
<data>
|
|
@@ -26,39 +26,39 @@
|
|
|
26
26
|
</data>
|
|
27
27
|
<key>Info.plist</key>
|
|
28
28
|
<data>
|
|
29
|
-
|
|
29
|
+
CL8jvxy40OqzbEOxwrs4WWpuafU=
|
|
30
30
|
</data>
|
|
31
31
|
<key>Modules/Kindly.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
32
32
|
<data>
|
|
33
|
-
|
|
33
|
+
fMVhuBfS1wBGtf/I0B1P9hlY8j0=
|
|
34
34
|
</data>
|
|
35
35
|
<key>Modules/Kindly.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
36
36
|
<data>
|
|
37
|
-
|
|
37
|
+
LO/JuTo8n1HHgUUZB+X5prMvSXc=
|
|
38
38
|
</data>
|
|
39
39
|
<key>Modules/Kindly.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
40
40
|
<data>
|
|
41
|
-
|
|
41
|
+
hFlEnjtJgNbA9P9VUJVpcsMmX04=
|
|
42
42
|
</data>
|
|
43
43
|
<key>Modules/Kindly.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
44
44
|
<data>
|
|
45
|
-
|
|
45
|
+
zJYkZqWNxuVviZVzUx7SlnJweXo=
|
|
46
46
|
</data>
|
|
47
47
|
<key>Modules/Kindly.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
48
48
|
<data>
|
|
49
|
-
|
|
49
|
+
fMVhuBfS1wBGtf/I0B1P9hlY8j0=
|
|
50
50
|
</data>
|
|
51
51
|
<key>Modules/Kindly.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
52
52
|
<data>
|
|
53
|
-
|
|
53
|
+
DZ1r2RG5VRIzQGwpL02YUR5FMIQ=
|
|
54
54
|
</data>
|
|
55
55
|
<key>Modules/Kindly.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
56
56
|
<data>
|
|
57
|
-
|
|
57
|
+
M2uheBC4uPWQMrIbXQ6jCijGJ0c=
|
|
58
58
|
</data>
|
|
59
59
|
<key>Modules/Kindly.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
60
60
|
<data>
|
|
61
|
-
|
|
61
|
+
48K5UTbIvNILv9+KCfd6JgTsnXw=
|
|
62
62
|
</data>
|
|
63
63
|
<key>Modules/module.modulemap</key>
|
|
64
64
|
<data>
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
<dict>
|
|
83
83
|
<key>hash2</key>
|
|
84
84
|
<data>
|
|
85
|
-
|
|
85
|
+
gpKvlibPb33hUZ45Al58Kscd85/tPeSSpkq/sw61m/Y=
|
|
86
86
|
</data>
|
|
87
87
|
</dict>
|
|
88
88
|
<key>ConfirmationWindow.nib</key>
|
|
@@ -110,56 +110,56 @@
|
|
|
110
110
|
<dict>
|
|
111
111
|
<key>hash2</key>
|
|
112
112
|
<data>
|
|
113
|
-
|
|
113
|
+
cBcqz0Kchsb+SLKNdP5iIDUhv2NbhSL8vEyfJltIx2k=
|
|
114
114
|
</data>
|
|
115
115
|
</dict>
|
|
116
116
|
<key>Modules/Kindly.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
117
117
|
<dict>
|
|
118
118
|
<key>hash2</key>
|
|
119
119
|
<data>
|
|
120
|
-
|
|
120
|
+
tnVYgpGOd+7CDbYfOiKgGU9lmit5hSoKHw3be2IzGKQ=
|
|
121
121
|
</data>
|
|
122
122
|
</dict>
|
|
123
123
|
<key>Modules/Kindly.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
124
124
|
<dict>
|
|
125
125
|
<key>hash2</key>
|
|
126
126
|
<data>
|
|
127
|
-
|
|
127
|
+
Scu2mLojvezjwgqETXuR+Moys6IoABQRGasB22l00CQ=
|
|
128
128
|
</data>
|
|
129
129
|
</dict>
|
|
130
130
|
<key>Modules/Kindly.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
131
131
|
<dict>
|
|
132
132
|
<key>hash2</key>
|
|
133
133
|
<data>
|
|
134
|
-
|
|
134
|
+
mpzYcFvGjOsW+0DlOUfKKlA6Ehj37HWa4hY8Mfp2hwU=
|
|
135
135
|
</data>
|
|
136
136
|
</dict>
|
|
137
137
|
<key>Modules/Kindly.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
138
138
|
<dict>
|
|
139
139
|
<key>hash2</key>
|
|
140
140
|
<data>
|
|
141
|
-
|
|
141
|
+
cBcqz0Kchsb+SLKNdP5iIDUhv2NbhSL8vEyfJltIx2k=
|
|
142
142
|
</data>
|
|
143
143
|
</dict>
|
|
144
144
|
<key>Modules/Kindly.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
145
145
|
<dict>
|
|
146
146
|
<key>hash2</key>
|
|
147
147
|
<data>
|
|
148
|
-
|
|
148
|
+
YR69LU39+53WBzcUf+BO3ZoQsuq1VCYnaj1IPGIrmLY=
|
|
149
149
|
</data>
|
|
150
150
|
</dict>
|
|
151
151
|
<key>Modules/Kindly.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
152
152
|
<dict>
|
|
153
153
|
<key>hash2</key>
|
|
154
154
|
<data>
|
|
155
|
-
|
|
155
|
+
+d18ESCLlkKvxZPBlGbuaw0OBynWviYy4HtRTdgH6TQ=
|
|
156
156
|
</data>
|
|
157
157
|
</dict>
|
|
158
158
|
<key>Modules/Kindly.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
159
159
|
<dict>
|
|
160
160
|
<key>hash2</key>
|
|
161
161
|
<data>
|
|
162
|
-
|
|
162
|
+
1bx9PAenqa4/DtSX9k/BpDahjYa0hSgDXApsglLR8dw=
|
|
163
163
|
</data>
|
|
164
164
|
</dict>
|
|
165
165
|
<key>Modules/module.modulemap</key>
|
package/ios/KindlyReactNative.h
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
// the
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
|
|
1
|
+
// Public header for the @kindly-ai/react-native TurboModule class. Kept
|
|
2
|
+
// deliberately Obj-C-only (no codegen spec import) so this header is safe
|
|
3
|
+
// to expose via the pod's umbrella — which is required for the Swift impl
|
|
4
|
+
// (`KindlyReactNativeImpl.swift`) to see the `KindlyReactNative` type.
|
|
5
|
+
//
|
|
6
|
+
// The `<NativeKindlyReactNativeSpec>` protocol conformance and the
|
|
7
|
+
// codegen-spec `#import` (which requires Obj-C++ compilation) live in
|
|
8
|
+
// `KindlyReactNative.mm` via a class extension — they don't belong in
|
|
9
|
+
// any header that Swift might pull through the auto-generated module.
|
|
10
|
+
#import <React/RCTEventEmitter.h>
|
|
8
11
|
|
|
9
12
|
NS_ASSUME_NONNULL_BEGIN
|
|
10
13
|
|
|
11
|
-
@interface KindlyReactNative : RCTEventEmitter
|
|
14
|
+
@interface KindlyReactNative : RCTEventEmitter
|
|
12
15
|
|
|
13
16
|
// Static accessor used by the Swift impl class to fire events back to JS.
|
|
14
17
|
+ (instancetype _Nullable)sharedInstance;
|
|
15
18
|
|
|
19
|
+
// Public emit helper called from Swift. Drops events when no JS listener
|
|
20
|
+
// is attached (mirrors RCTEventEmitter's own gating).
|
|
21
|
+
- (void)emitEvent:(NSString *)name body:(nullable id)body;
|
|
22
|
+
|
|
16
23
|
@end
|
|
17
24
|
|
|
18
25
|
NS_ASSUME_NONNULL_END
|
package/ios/KindlyReactNative.mm
CHANGED
|
@@ -21,11 +21,19 @@
|
|
|
21
21
|
// avoid struct args to skip the JS::Native...::Spec*Args fragility.
|
|
22
22
|
#import "KindlyReactNative.h"
|
|
23
23
|
|
|
24
|
+
// Codegen-generated TurboModule spec. Requires Obj-C++ — that's why this
|
|
25
|
+
// import lives here in the .mm and not in the public .h (the .h must be
|
|
26
|
+
// importable from Obj-C contexts, including the auto-generated module
|
|
27
|
+
// umbrella that Swift consumes).
|
|
28
|
+
#import <KindlyReactNativeSpec/KindlyReactNativeSpec.h>
|
|
29
|
+
|
|
24
30
|
// Auto-generated header that exposes Swift classes to ObjC. Filename derives
|
|
25
31
|
// from the pod name (KindlyReactNative.podspec → KindlyReactNative-Swift.h).
|
|
26
32
|
#import "KindlyReactNative-Swift.h"
|
|
27
33
|
|
|
28
|
-
|
|
34
|
+
// Protocol conformance is declared internally so it doesn't leak into the
|
|
35
|
+
// public header (which Swift consumes via the module umbrella).
|
|
36
|
+
@interface KindlyReactNative () <NativeKindlyReactNativeSpec>
|
|
29
37
|
@property(nonatomic, strong) KindlyReactNativeImpl *impl;
|
|
30
38
|
@end
|
|
31
39
|
|
|
@@ -197,6 +205,24 @@ static __weak KindlyReactNative *_sharedInstance;
|
|
|
197
205
|
[_impl setCrashReporting:enabled];
|
|
198
206
|
}
|
|
199
207
|
|
|
208
|
+
#pragma mark - Config (permissions + Android UI behavior)
|
|
209
|
+
|
|
210
|
+
- (void)setAllowCameraAccess:(BOOL)enabled {
|
|
211
|
+
[_impl setAllowCameraAccess:enabled];
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
- (void)setAllowPhotoLibraryAccess:(BOOL)enabled {
|
|
215
|
+
[_impl setAllowPhotoLibraryAccess:enabled];
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
- (void)setAutoMatchStatusBarColor:(BOOL)enabled {
|
|
219
|
+
// Android-only — accept silently for JS-surface symmetry.
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
- (void)setForceOverrideStatusBarColor:(BOOL)enabled {
|
|
223
|
+
// Android-only — accept silently for JS-surface symmetry.
|
|
224
|
+
}
|
|
225
|
+
|
|
200
226
|
#pragma mark - Auth + delegate round-trips
|
|
201
227
|
|
|
202
228
|
- (void)respondToAuthToken:(NSString *)requestId
|
|
@@ -106,16 +106,37 @@ import UIKit
|
|
|
106
106
|
KindlyChatClient.start(botKey: botKey, languageCode: lang, authTokenCallback: authCallback)
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
// displayChat / launchChat / closeChat MUST be invoked from the main
|
|
110
|
+
// queue — they present/dismiss a UIViewController, and UIKit asserts
|
|
111
|
+
// hard on off-thread layer mutations. TurboModule method invocations
|
|
112
|
+
// arrive on a background queue by default (see facebook::react::
|
|
113
|
+
// ObjCTurboModule::performVoidMethodInvocation), so we re-dispatch here.
|
|
114
|
+
//
|
|
115
|
+
// Symptom when missing (reproducer in react-native-sample): tapping
|
|
116
|
+
// launchChat from JS → "Modifying properties of a view's layer off the
|
|
117
|
+
// main thread is not allowed: view <UIDimmingView…>" → app crash, bounce
|
|
118
|
+
// back to home screen, no chat ever rendered. Android side doesn't need
|
|
119
|
+
// this because its RN module methods already run on the UI thread.
|
|
109
120
|
@objc public func displayChat(languageCode: String?, triggerDialogueId: String?) {
|
|
110
|
-
|
|
121
|
+
DispatchQueue.main.async {
|
|
122
|
+
KindlyChatClient.displayChat(languageCode: languageCode, triggerDialogueId: triggerDialogueId)
|
|
123
|
+
}
|
|
111
124
|
}
|
|
112
125
|
|
|
113
126
|
@objc public func launchChat(triggerDialogueId: String?) {
|
|
114
|
-
|
|
127
|
+
DispatchQueue.main.async {
|
|
128
|
+
KindlyChatClient.displayChat(languageCode: nil, triggerDialogueId: triggerDialogueId)
|
|
129
|
+
}
|
|
115
130
|
}
|
|
116
131
|
|
|
132
|
+
// KindlyChatClient.closeChat() already does its own main-thread hop
|
|
133
|
+
// internally (see EntryPoint.swift), but we belt-and-suspenders here so
|
|
134
|
+
// future SDK changes can't regress us and the bridge stays symmetric
|
|
135
|
+
// with displayChat / launchChat above.
|
|
117
136
|
@objc public func closeChat() {
|
|
118
|
-
|
|
137
|
+
DispatchQueue.main.async {
|
|
138
|
+
KindlyChatClient.closeChat()
|
|
139
|
+
}
|
|
119
140
|
}
|
|
120
141
|
|
|
121
142
|
@objc public func endChat(resolve: @escaping RCTPromiseResolveBlock,
|
|
@@ -238,6 +259,20 @@ import UIKit
|
|
|
238
259
|
KindlyChatClient.enableCrashReporting = enabled
|
|
239
260
|
}
|
|
240
261
|
|
|
262
|
+
// MARK: - Config (permissions)
|
|
263
|
+
// The Android-only status-bar settings are no-ops on iOS — handled at
|
|
264
|
+
// the Obj-C++ glue layer (KindlyReactNative.mm), so they don't reach
|
|
265
|
+
// here. iOS only mirrors the camera/photo-library toggles, both of
|
|
266
|
+
// which are surfaced by `KindlyChatClient.config`.
|
|
267
|
+
|
|
268
|
+
@objc public func setAllowCameraAccess(_ enabled: Bool) {
|
|
269
|
+
KindlyChatClient.config.allowCameraAccess = enabled
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
@objc public func setAllowPhotoLibraryAccess(_ enabled: Bool) {
|
|
273
|
+
KindlyChatClient.config.allowPhotoLibraryAccess = enabled
|
|
274
|
+
}
|
|
275
|
+
|
|
241
276
|
// MARK: - Round-trip responders (called by JS)
|
|
242
277
|
|
|
243
278
|
@objc public func respondToAuthToken(_ requestId: String, token: String?) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeKindlyReactNative.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,mBAAmB,QAAQ,cAAc;
|
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeKindlyReactNative.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,mBAAmB,QAAQ,cAAc;AAwElD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,mBAAmB,CAAC","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -253,6 +253,45 @@ export class KindlySDK {
|
|
|
253
253
|
NativeKindly.setCrashReporting(enabled);
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
+
/**
|
|
257
|
+
* Whether the SDK is allowed to access the device camera when the user
|
|
258
|
+
* picks an attachment. Defaults to `true` on both platforms. Bridged to
|
|
259
|
+
* `KindlySDK.config.allowCameraAccess` (iOS) /
|
|
260
|
+
* `ChatKindlySDK.config.allowCameraAccess` (Android).
|
|
261
|
+
*/
|
|
262
|
+
static setAllowCameraAccess(enabled) {
|
|
263
|
+
NativeKindly.setAllowCameraAccess(enabled);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Whether the SDK is allowed to access the photo library when the user
|
|
268
|
+
* picks an attachment. Defaults to `true` on both platforms.
|
|
269
|
+
*/
|
|
270
|
+
static setAllowPhotoLibraryAccess(enabled) {
|
|
271
|
+
NativeKindly.setAllowPhotoLibraryAccess(enabled);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Android-only — when `true` (default), the SDK auto-matches the status
|
|
276
|
+
* bar color to the chat header. iOS ignores this call (no-op).
|
|
277
|
+
*/
|
|
278
|
+
static setAutoMatchStatusBarColor(enabled) {
|
|
279
|
+
if (Platform.OS === 'android') {
|
|
280
|
+
NativeKindly.setAutoMatchStatusBarColor(enabled);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Android-only — when `true`, the SDK overrides the status bar color
|
|
286
|
+
* even if the host app set its own. Defaults to `false`. iOS no-op.
|
|
287
|
+
* Requires `setAutoMatchStatusBarColor(true)` to take effect.
|
|
288
|
+
*/
|
|
289
|
+
static setForceOverrideStatusBarColor(enabled) {
|
|
290
|
+
if (Platform.OS === 'android') {
|
|
291
|
+
NativeKindly.setForceOverrideStatusBarColor(enabled);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
256
295
|
/**
|
|
257
296
|
* Register host-app callbacks for chat-button presses, link interception,
|
|
258
297
|
* and notification interception. Mirrors the native delegate protocols.
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeEventEmitter","NativeModules","Platform","NativeKindly","hexColor","hex","cleaned","replace","v","parseInt","length","Error","eventEmitter","OS","KindlyReactNative","undefined","authTokenCallback","handoverCallback","onButtonPressed","shouldHandleLink","shouldHandleNotification","listenersAttached","attachListeners","addListener","raw","event","respondToAuthToken","requestId","token","button","chatLog","value","url","respondToShouldHandle","notification","KindlySDK","start","args","botKey","languageCode","displayChat","triggerDialogueId","launchChat","closeChat","endChat","kill","setLanguage","sendMessage","text","options","newContext","setCustomTheme","theme","colors","Object","keys","forEach","k","clearCustomTheme","setNewContext","context","clearNewContext","saveAuthToken","setAPNSDeviceToken","saveNotificationToken","handleNotification","data","isKindlyNotification","triggerDialogue","dialogueId","clearTriggerDialogue","handleUrl","callHandover","callback","isChatDisplayed","setVerboseLogging","enabled","setCrashReporting","setDelegate","clearDelegate"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,kBAAkB,EAAEC,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAC1E,OAAOC,YAAY,MAAM,8BAA2B;;AAEpD;;AAGA;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAKA;;AAqBA;AACA;AACA;AACA;AACA,OAAO,SAASC,QAAQA,CAACC,GAAW,EAAU;EAC5C,MAAMC,OAAO,GAAGD,GAAG,CAACE,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;EACrC,MAAMC,CAAC,GAAGC,QAAQ,CAACH,OAAO,EAAE,EAAE,CAAC;EAC/B,IAAIA,OAAO,CAACI,MAAM,KAAK,CAAC,EAAE;IACxB,OAAO,CAAC,UAAU,GAAGF,CAAC,MAAM,CAAC;EAC/B;EACA,IAAIF,OAAO,CAACI,MAAM,KAAK,CAAC,EAAE;IACxB,OAAOF,CAAC,KAAK,CAAC;EAChB;EACA,MAAM,IAAIG,KAAK,CAAC,iDAAiDN,GAAG,GAAG,CAAC;AAC1E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMO,YAAY,GAAG,IAAIZ,kBAAkB,CACzCE,QAAQ,CAACW,EAAE,KAAK,KAAK,GAChBZ,aAAa,CAACa,iBAAiB,GAChCC,SACN,CAAC;AAED,IAAIC,iBAA2C,G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BA,CAACpC,KAAa,EAAQ;IAChD,IAAI1B,QAAQ,CAACW,EAAE,KAAK,SAAS,EAAE;MAC7BV,YAAY,CAAC6D,qBAAqB,CAACpC,KAAK,CAAC;IAC3C;EACF;;EAEA;EACA,OAAOqC,kBAAkBA,CAACC,IAAgC,EAAQ;IAChE/D,YAAY,CAAC8D,kBAAkB,CAACC,IAAI,CAAC;EACvC;;EAEA;EACA,OAAOC,oBAAoBA,CAACD,IAAgC,EAAW;IACrE,OAAO/D,YAAY,CAACgE,oBAAoB,CAACD,IAAI,CAAC;EAChD;;EAEA;EACA,OAAOE,eAAeA,CAACC,UAAkB,EAAQ;IAC/ClE,YAAY,CAACiE,eAAe,CAACC,UAAU,CAAC;EAC1C;;EAEA;EACA,OAAOC,oBAAoBA,CAAA,EAAS;IAClCnE,YAAY,CAACmE,oBAAoB,CAAC,CAAC;EACrC;;EAEA;EACA,OAAOC,SAASA,CAACvC,GAAW,EAAoB;IAC9C,OAAO7B,YAAY,CAACoE,SAAS,CAACvC,GAAG,CAAC;EACpC;;EAEA;EACA,OAAOwC,YAAYA,CAACC,QAA0B,EAAQ;IACpDnD,eAAe,CAAC,CAAC;IACjBL,gBAAgB,GAAGwD,QAAQ;IAC3BtE,YAAY,CAACqE,YAAY,CAAC,CAAC;EAC7B;;EAEA;EACA,OAAOE,eAAeA,CAAA,EAAqB;IACzC,OAAOvE,YAAY,CAACuE,eAAe,CAAC,CAAC;EACvC;;EAEA;EACA,OAAOC,iBAAiBA,CAACC,OAAgB,EAAQ;IAC/CzE,YAAY,CAACwE,iBAAiB,CAACC,OAAO,CAAC;EACzC;;EAEA;EACA,OAAOC,iBAAiBA,CAACD,OAAgB,EAAQ;IAC/CzE,YAAY,CAAC0E,iBAAiB,CAACD,OAAO,CAAC;EACzC;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE,
|
|
1
|
+
{"version":3,"names":["NativeEventEmitter","NativeModules","Platform","NativeKindly","hexColor","hex","cleaned","replace","v","parseInt","length","Error","eventEmitter","OS","KindlyReactNative","undefined","authTokenCallback","handoverCallback","onButtonPressed","shouldHandleLink","shouldHandleNotification","listenersAttached","attachListeners","addListener","raw","event","respondToAuthToken","requestId","token","button","chatLog","value","url","respondToShouldHandle","notification","KindlySDK","start","args","botKey","languageCode","displayChat","triggerDialogueId","launchChat","closeChat","endChat","kill","setLanguage","sendMessage","text","options","newContext","setCustomTheme","theme","colors","Object","keys","forEach","k","clearCustomTheme","setNewContext","context","clearNewContext","saveAuthToken","setAPNSDeviceToken","saveNotificationToken","handleNotification","data","isKindlyNotification","triggerDialogue","dialogueId","clearTriggerDialogue","handleUrl","callHandover","callback","isChatDisplayed","setVerboseLogging","enabled","setCrashReporting","setAllowCameraAccess","setAllowPhotoLibraryAccess","setAutoMatchStatusBarColor","setForceOverrideStatusBarColor","setDelegate","clearDelegate"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,kBAAkB,EAAEC,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAC1E,OAAOC,YAAY,MAAM,8BAA2B;;AAEpD;;AAGA;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAKA;;AAqBA;AACA;AACA;AACA;AACA,OAAO,SAASC,QAAQA,CAACC,GAAW,EAAU;EAC5C,MAAMC,OAAO,GAAGD,GAAG,CAACE,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;EACrC,MAAMC,CAAC,GAAGC,QAAQ,CAACH,OAAO,EAAE,EAAE,CAAC;EAC/B,IAAIA,OAAO,CAACI,MAAM,KAAK,CAAC,EAAE;IACxB,OAAO,CAAC,UAAU,GAAGF,CAAC,MAAM,CAAC;EAC/B;EACA,IAAIF,OAAO,CAACI,MAAM,KAAK,CAAC,EAAE;IACxB,OAAOF,CAAC,KAAK,CAAC;EAChB;EACA,MAAM,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BC,gBAAgB,GAAG,IAAI;IACvBC,wBAAwB,GAAG,IAAI;IAC/BjB,YAAY,CAAC+E,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAEjE,gBAAgB,IAAI,IAAI,CAAC;EACzE;AACF","ignoreList":[]}
|
|
@@ -35,6 +35,10 @@ export interface Spec extends TurboModule {
|
|
|
35
35
|
isChatDisplayed(): Promise<boolean>;
|
|
36
36
|
setVerboseLogging(enabled: boolean): void;
|
|
37
37
|
setCrashReporting(enabled: boolean): void;
|
|
38
|
+
setAllowCameraAccess(enabled: boolean): void;
|
|
39
|
+
setAllowPhotoLibraryAccess(enabled: boolean): void;
|
|
40
|
+
setAutoMatchStatusBarColor(enabled: boolean): void;
|
|
41
|
+
setForceOverrideStatusBarColor(enabled: boolean): void;
|
|
38
42
|
respondToAuthToken(requestId: string, token: string | null): void;
|
|
39
43
|
respondToShouldHandle(requestId: string, value: boolean): void;
|
|
40
44
|
setDelegate(onButtonPressed: boolean, shouldHandleLink: boolean, shouldHandleNotification: boolean, onHandover: boolean): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeKindlyReactNative.d.ts","sourceRoot":"","sources":["../../../src/NativeKindlyReactNative.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IAEvC,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,EAAE,eAAe,EAAE,OAAO,GAAG,IAAI,CAAC;IACnF,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,EAAE,iBAAiB,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IACjF,UAAU,CAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IACnD,SAAS,IAAI,IAAI,CAAC;IAClB,OAAO,IAAI,OAAO,CAAC,IAAI,CA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AE,OAAO,GAAG,IAAI,CAAC;IAO1C,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAC7C,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACnD,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACnD,8BAA8B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAOvD,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IAClE,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IAG/D,WAAW,CACT,eAAe,EAAE,OAAO,EACxB,gBAAgB,EAAE,OAAO,EACzB,wBAAwB,EAAE,OAAO,EACjC,UAAU,EAAE,OAAO,GAClB,IAAI,CAAC;IACR,YAAY,IAAI,IAAI,CAAC;IAIrB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;;AAED,wBAA2E"}
|
|
@@ -131,6 +131,29 @@ export declare class KindlySDK {
|
|
|
131
131
|
static setVerboseLogging(enabled: boolean): void;
|
|
132
132
|
/** Toggle Sentry crash reporting from inside the SDK. */
|
|
133
133
|
static setCrashReporting(enabled: boolean): void;
|
|
134
|
+
/**
|
|
135
|
+
* Whether the SDK is allowed to access the device camera when the user
|
|
136
|
+
* picks an attachment. Defaults to `true` on both platforms. Bridged to
|
|
137
|
+
* `KindlySDK.config.allowCameraAccess` (iOS) /
|
|
138
|
+
* `ChatKindlySDK.config.allowCameraAccess` (Android).
|
|
139
|
+
*/
|
|
140
|
+
static setAllowCameraAccess(enabled: boolean): void;
|
|
141
|
+
/**
|
|
142
|
+
* Whether the SDK is allowed to access the photo library when the user
|
|
143
|
+
* picks an attachment. Defaults to `true` on both platforms.
|
|
144
|
+
*/
|
|
145
|
+
static setAllowPhotoLibraryAccess(enabled: boolean): void;
|
|
146
|
+
/**
|
|
147
|
+
* Android-only — when `true` (default), the SDK auto-matches the status
|
|
148
|
+
* bar color to the chat header. iOS ignores this call (no-op).
|
|
149
|
+
*/
|
|
150
|
+
static setAutoMatchStatusBarColor(enabled: boolean): void;
|
|
151
|
+
/**
|
|
152
|
+
* Android-only — when `true`, the SDK overrides the status bar color
|
|
153
|
+
* even if the host app set its own. Defaults to `false`. iOS no-op.
|
|
154
|
+
* Requires `setAutoMatchStatusBarColor(true)` to take effect.
|
|
155
|
+
*/
|
|
156
|
+
static setForceOverrideStatusBarColor(enabled: boolean): void;
|
|
134
157
|
/**
|
|
135
158
|
* Register host-app callbacks for chat-button presses, link interception,
|
|
136
159
|
* and notification interception. Mirrors the native delegate protocols.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAcA,wEAAwE;AACxE,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;AAE7D,sEAAsE;AACtE,MAAM,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,MAAM,2BAA2B,GAAG,CACxC,MAAM,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,EAClC,OAAO,EAAE,KAAK,CAAC;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC,KACvC,IAAI,CAAC;AAEV;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;AAEnE;;;;GAIG;AACH,MAAM,MAAM,mCAAmC,GAAG,CAAC,YAAY,EAAE;IAC/D,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,KAAK,OAAO,CAAC;AAEd,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CAAC,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAMzD;;;;OAIG;IACH,MAAM,CAAC,8BAA8B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAM7D;;;;;;;OAOG;IACH,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE;QACvB,eAAe,CAAC,EAAE,2BAA2B,CAAC;QAC9C,gBAAgB,CAAC,EAAE,2BAA2B,CAAC;QAC/C,wBAAwB,CAAC,EAAE,mCAAmC,CAAC;KAChE,GAAG,IAAI;IAaR,wDAAwD;IACxD,MAAM,CAAC,aAAa,IAAI,IAAI;CAM7B"}
|
package/package.json
CHANGED
|
@@ -54,6 +54,16 @@ export interface Spec extends TurboModule {
|
|
|
54
54
|
setVerboseLogging(enabled: boolean): void;
|
|
55
55
|
setCrashReporting(enabled: boolean): void;
|
|
56
56
|
|
|
57
|
+
// Config (permissions + Android UI behavior). Bridged onto the native
|
|
58
|
+
// `KindlySDKConfig` instance on each platform — see iOS
|
|
59
|
+
// `KindlyChatClient.config` / Android `ChatKindlySDK.config`. The
|
|
60
|
+
// status-bar settings are Android-only; the iOS bridge accepts them
|
|
61
|
+
// silently so the JS surface is symmetric.
|
|
62
|
+
setAllowCameraAccess(enabled: boolean): void;
|
|
63
|
+
setAllowPhotoLibraryAccess(enabled: boolean): void;
|
|
64
|
+
setAutoMatchStatusBarColor(enabled: boolean): void;
|
|
65
|
+
setForceOverrideStatusBarColor(enabled: boolean): void;
|
|
66
|
+
|
|
57
67
|
// Round-trips for sync-style native→JS→native callbacks.
|
|
58
68
|
// Native fires events ('KindlyGetAuthToken', 'KindlyShouldHandle*') with
|
|
59
69
|
// a requestId; JS replies via these methods. Native blocks on a
|
package/src/index.tsx
CHANGED
|
@@ -318,6 +318,45 @@ export class KindlySDK {
|
|
|
318
318
|
NativeKindly.setCrashReporting(enabled);
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
+
/**
|
|
322
|
+
* Whether the SDK is allowed to access the device camera when the user
|
|
323
|
+
* picks an attachment. Defaults to `true` on both platforms. Bridged to
|
|
324
|
+
* `KindlySDK.config.allowCameraAccess` (iOS) /
|
|
325
|
+
* `ChatKindlySDK.config.allowCameraAccess` (Android).
|
|
326
|
+
*/
|
|
327
|
+
static setAllowCameraAccess(enabled: boolean): void {
|
|
328
|
+
NativeKindly.setAllowCameraAccess(enabled);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Whether the SDK is allowed to access the photo library when the user
|
|
333
|
+
* picks an attachment. Defaults to `true` on both platforms.
|
|
334
|
+
*/
|
|
335
|
+
static setAllowPhotoLibraryAccess(enabled: boolean): void {
|
|
336
|
+
NativeKindly.setAllowPhotoLibraryAccess(enabled);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Android-only — when `true` (default), the SDK auto-matches the status
|
|
341
|
+
* bar color to the chat header. iOS ignores this call (no-op).
|
|
342
|
+
*/
|
|
343
|
+
static setAutoMatchStatusBarColor(enabled: boolean): void {
|
|
344
|
+
if (Platform.OS === 'android') {
|
|
345
|
+
NativeKindly.setAutoMatchStatusBarColor(enabled);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Android-only — when `true`, the SDK overrides the status bar color
|
|
351
|
+
* even if the host app set its own. Defaults to `false`. iOS no-op.
|
|
352
|
+
* Requires `setAutoMatchStatusBarColor(true)` to take effect.
|
|
353
|
+
*/
|
|
354
|
+
static setForceOverrideStatusBarColor(enabled: boolean): void {
|
|
355
|
+
if (Platform.OS === 'android') {
|
|
356
|
+
NativeKindly.setForceOverrideStatusBarColor(enabled);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
321
360
|
/**
|
|
322
361
|
* Register host-app callbacks for chat-button presses, link interception,
|
|
323
362
|
* and notification interception. Mirrors the native delegate protocols.
|
|
Binary file
|