@kindly-ai/react-native 0.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.
Files changed (63) hide show
  1. package/KindlyReactNative.podspec +36 -0
  2. package/LICENSE +20 -0
  3. package/README.md +127 -0
  4. package/android/build.gradle +113 -0
  5. package/android/maven-repo/ai/kindly/sdk/1.0.93/sdk-1.0.93.aar +0 -0
  6. package/android/maven-repo/ai/kindly/sdk/1.0.93/sdk-1.0.93.pom +125 -0
  7. package/android/src/main/AndroidManifest.xml +2 -0
  8. package/android/src/main/java/com/kindlyai/reactnative/KindlyReactNativeModule.kt +445 -0
  9. package/android/src/main/java/com/kindlyai/reactnative/KindlyReactNativePackage.kt +38 -0
  10. package/ios/Frameworks/Kindly.xcframework/Info.plist +44 -0
  11. package/ios/Frameworks/Kindly.xcframework/_CodeSignature/CodeDirectory +0 -0
  12. package/ios/Frameworks/Kindly.xcframework/_CodeSignature/CodeRequirements +0 -0
  13. package/ios/Frameworks/Kindly.xcframework/_CodeSignature/CodeRequirements-1 +0 -0
  14. package/ios/Frameworks/Kindly.xcframework/_CodeSignature/CodeResources +578 -0
  15. package/ios/Frameworks/Kindly.xcframework/_CodeSignature/CodeSignature +0 -0
  16. package/ios/Frameworks/Kindly.xcframework/ios-arm64/Kindly.framework/Assets.car +0 -0
  17. package/ios/Frameworks/Kindly.xcframework/ios-arm64/Kindly.framework/Config.plist +0 -0
  18. package/ios/Frameworks/Kindly.xcframework/ios-arm64/Kindly.framework/ConfirmationWindow.nib +0 -0
  19. package/ios/Frameworks/Kindly.xcframework/ios-arm64/Kindly.framework/Headers/Kindly-Swift.h +331 -0
  20. package/ios/Frameworks/Kindly.xcframework/ios-arm64/Kindly.framework/Headers/Kindly.h +18 -0
  21. package/ios/Frameworks/Kindly.xcframework/ios-arm64/Kindly.framework/Info.plist +0 -0
  22. package/ios/Frameworks/Kindly.xcframework/ios-arm64/Kindly.framework/Kindly +0 -0
  23. package/ios/Frameworks/Kindly.xcframework/ios-arm64/Kindly.framework/Modules/Kindly.swiftmodule/arm64-apple-ios.abi.json +28769 -0
  24. package/ios/Frameworks/Kindly.xcframework/ios-arm64/Kindly.framework/Modules/Kindly.swiftmodule/arm64-apple-ios.private.swiftinterface +547 -0
  25. package/ios/Frameworks/Kindly.xcframework/ios-arm64/Kindly.framework/Modules/Kindly.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  26. package/ios/Frameworks/Kindly.xcframework/ios-arm64/Kindly.framework/Modules/Kindly.swiftmodule/arm64-apple-ios.swiftinterface +543 -0
  27. package/ios/Frameworks/Kindly.xcframework/ios-arm64/Kindly.framework/Modules/module.modulemap +11 -0
  28. package/ios/Frameworks/Kindly.xcframework/ios-arm64/Kindly.framework/PrivacyInfo.xcprivacy +83 -0
  29. package/ios/Frameworks/Kindly.xcframework/ios-arm64/Kindly.framework/_CodeSignature/CodeResources +223 -0
  30. package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/Assets.car +0 -0
  31. package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/Config.plist +0 -0
  32. package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/ConfirmationWindow.nib +0 -0
  33. package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/Headers/Kindly-Swift.h +658 -0
  34. package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/Headers/Kindly.h +18 -0
  35. package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/Info.plist +0 -0
  36. package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/Kindly +0 -0
  37. package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/Modules/Kindly.swiftmodule/arm64-apple-ios-simulator.abi.json +28769 -0
  38. package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/Modules/Kindly.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +547 -0
  39. package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/Modules/Kindly.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  40. package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/Modules/Kindly.swiftmodule/arm64-apple-ios-simulator.swiftinterface +543 -0
  41. package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/Modules/Kindly.swiftmodule/x86_64-apple-ios-simulator.abi.json +28769 -0
  42. package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/Modules/Kindly.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +547 -0
  43. package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/Modules/Kindly.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  44. package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/Modules/Kindly.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +543 -0
  45. package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/Modules/module.modulemap +11 -0
  46. package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/PrivacyInfo.xcprivacy +83 -0
  47. package/ios/Frameworks/Kindly.xcframework/ios-arm64_x86_64-simulator/Kindly.framework/_CodeSignature/CodeResources +267 -0
  48. package/ios/KindlyReactNative.h +18 -0
  49. package/ios/KindlyReactNative.mm +234 -0
  50. package/ios/KindlyReactNativeImpl.swift +410 -0
  51. package/lib/module/NativeKindlyReactNative.js +22 -0
  52. package/lib/module/NativeKindlyReactNative.js.map +1 -0
  53. package/lib/module/index.js +280 -0
  54. package/lib/module/index.js.map +1 -0
  55. package/lib/module/package.json +1 -0
  56. package/lib/typescript/package.json +1 -0
  57. package/lib/typescript/src/NativeKindlyReactNative.d.ts +47 -0
  58. package/lib/typescript/src/NativeKindlyReactNative.d.ts.map +1 -0
  59. package/lib/typescript/src/index.d.ts +150 -0
  60. package/lib/typescript/src/index.d.ts.map +1 -0
  61. package/package.json +121 -0
  62. package/src/NativeKindlyReactNative.ts +80 -0
  63. package/src/index.tsx +353 -0
@@ -0,0 +1,543 @@
1
+ // swift-interface-format-version: 1.0
2
+ // swift-compiler-version: Apple Swift version 6.1.2 effective-5.10 (swiftlang-6.1.2.1.2 clang-1700.0.13.5)
3
+ // swift-module-flags: -target arm64-apple-ios15.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -enable-bare-slash-regex -module-name Kindly
4
+ // swift-module-flags-ignorable: -no-verify-emitted-module-interface -interface-compiler-version 6.1.2
5
+ import AVFoundation
6
+ import AVKit
7
+ import Combine
8
+ import CommonCrypto
9
+ import Contacts
10
+ import CoreLocation
11
+ import DeveloperToolsSupport
12
+ import Foundation
13
+ import ImageIO
14
+ @_exported import Kindly
15
+ import LocalAuthentication
16
+ import Network
17
+ import OSLog
18
+ import ObjectiveC
19
+ import Photos
20
+ import PhotosUI
21
+ import QuartzCore
22
+ import SafariServices
23
+ import Security
24
+ import Swift
25
+ import SwiftUI
26
+ import SystemConfiguration
27
+ import UIKit.UIImage
28
+ import UIKit
29
+ import UniformTypeIdentifiers
30
+ import UserNotifications
31
+ import WebKit
32
+ import _Concurrency
33
+ import _StringProcessing
34
+ import _SwiftConcurrencyShims
35
+ import ObjectiveC.runtime
36
+ public struct ExternalChatMessage : Swift.Hashable, Swift.Identifiable, Swift.Comparable {
37
+ public let id: Swift.String
38
+ public static func < (lhs: Kindly.ExternalChatMessage, rhs: Kindly.ExternalChatMessage) -> Swift.Bool
39
+ public static func == (lhs: Kindly.ExternalChatMessage, rhs: Kindly.ExternalChatMessage) -> Swift.Bool
40
+ public func hash(into hasher: inout Swift.Hasher)
41
+ public func toDictionary() -> [Swift.String : Any]
42
+ public typealias ID = Swift.String
43
+ public var hashValue: Swift.Int {
44
+ get
45
+ }
46
+ }
47
+ @_hasMissingDesignatedInitializers final public class ThemeManager {
48
+ public static let shared: Kindly.ThemeManager
49
+ final public var currentTheme: any Kindly.Theme
50
+ final public func setUserTheme(_ theme: any Kindly.Theme)
51
+ final public func clearUserTheme()
52
+ final public func hasUserTheme() -> Swift.Bool
53
+ @objc deinit
54
+ }
55
+ public struct KindlySDKConfig {
56
+ public var getAuthToken: Kindly.AuthTokenCallback? {
57
+ get
58
+ set
59
+ }
60
+ public var allowCameraAccess: Swift.Bool
61
+ public var allowPhotoLibraryAccess: Swift.Bool
62
+ public var form: Kindly.KindlySDKConfig.FormConfig
63
+ public struct FormConfig {
64
+ }
65
+ }
66
+ public enum KindlyEventType : Swift.String, Swift.CaseIterable {
67
+ case load
68
+ case message
69
+ case buttonClick
70
+ case ui
71
+ case globalIcon
72
+ case state
73
+ public init?(rawValue: Swift.String)
74
+ public typealias AllCases = [Kindly.KindlyEventType]
75
+ public typealias RawValue = Swift.String
76
+ nonisolated public static var allCases: [Kindly.KindlyEventType] {
77
+ get
78
+ }
79
+ public var rawValue: Swift.String {
80
+ get
81
+ }
82
+ }
83
+ public enum KindlyUIActionType : Swift.String, Swift.CaseIterable {
84
+ case openChatBubble
85
+ case closeChatBubble
86
+ case endChat
87
+ case restartChat
88
+ case downloadChat
89
+ case deleteChat
90
+ case changeLanguage
91
+ case showFeedback
92
+ case submitFeedback
93
+ case dismissFeedback
94
+ public init?(rawValue: Swift.String)
95
+ public typealias AllCases = [Kindly.KindlyUIActionType]
96
+ public typealias RawValue = Swift.String
97
+ nonisolated public static var allCases: [Kindly.KindlyUIActionType] {
98
+ get
99
+ }
100
+ public var rawValue: Swift.String {
101
+ get
102
+ }
103
+ }
104
+ public struct KindlyEvent {
105
+ public let type: Kindly.KindlyEventType
106
+ public let detail: Kindly.KindlyEventDetail
107
+ public let timestamp: Foundation.Date
108
+ public init(type: Kindly.KindlyEventType, detail: Kindly.KindlyEventDetail)
109
+ }
110
+ public enum KindlyEventDetail {
111
+ case load(settings: Kindly.KindlyEventSettings)
112
+ case message(newMessage: Kindly.KindlyEventMessage, chatLog: [Kindly.KindlyEventMessage])
113
+ case buttonClick(button: Kindly.KindlyEventButton, buttonType: Swift.String, chatLog: [Kindly.KindlyEventMessage], lastMessage: Kindly.KindlyEventMessage)
114
+ case ui(action: Kindly.KindlyEventUIAction)
115
+ case globalIcon(action: Kindly.KindlyEventGlobalIcon)
116
+ case state(state: Kindly.KindlyEventState)
117
+ }
118
+ public struct KindlyEventSettings {
119
+ public let name: Swift.String
120
+ public let id: Swift.String
121
+ public let languages: [Kindly.KindlyEventLanguage]
122
+ public let style: Kindly.KindlyEventStyle
123
+ public init(name: Swift.String, id: Swift.String, languages: [Kindly.KindlyEventLanguage], style: Kindly.KindlyEventStyle)
124
+ }
125
+ public struct KindlyEventLanguage {
126
+ public let code: Swift.String
127
+ public let name: Swift.String
128
+ public let isDefault: Swift.Bool
129
+ public init(code: Swift.String, name: Swift.String, isDefault: Swift.Bool = false)
130
+ }
131
+ public struct KindlyEventStyle {
132
+ public let background: Swift.String?
133
+ public let buttonBackground: Swift.String?
134
+ public let buttonText: Swift.String?
135
+ public let headerBackground: Swift.String?
136
+ public let headerText: Swift.String?
137
+ public let inputBackground: Swift.String?
138
+ public let inputText: Swift.String?
139
+ public let userMessageBackground: Swift.String?
140
+ public let userMessageTextColor: Swift.String?
141
+ public let botMessageBackground: Swift.String?
142
+ public let botMessageTextColor: Swift.String?
143
+ public init(background: Swift.String? = nil, buttonBackground: Swift.String? = nil, buttonText: Swift.String? = nil, headerBackground: Swift.String? = nil, headerText: Swift.String? = nil, inputBackground: Swift.String? = nil, inputText: Swift.String? = nil, userMessageBackground: Swift.String? = nil, userMessageTextColor: Swift.String? = nil, botMessageBackground: Swift.String? = nil, botMessageTextColor: Swift.String? = nil)
144
+ }
145
+ public struct KindlyEventMessage {
146
+ public let id: Swift.String
147
+ public let text: Swift.String?
148
+ public let sender: Kindly.KindlyEventMessageSender
149
+ public let created: Foundation.Date?
150
+ public let isFromUser: Swift.Bool
151
+ public let exchangeID: Swift.String?
152
+ public let videoSource: Swift.String?
153
+ public let exchangeType: Kindly.KindlyEventExchangeType?
154
+ public let buttons: [Kindly.KindlyEventButton]
155
+ public let images: [Kindly.KindlyEventImage]
156
+ public let attachments: [Kindly.KindlyEventAttachment]
157
+ public init(id: Swift.String, text: Swift.String? = nil, sender: Kindly.KindlyEventMessageSender, created: Foundation.Date? = nil, isFromUser: Swift.Bool, exchangeID: Swift.String? = nil, videoSource: Swift.String? = nil, exchangeType: Kindly.KindlyEventExchangeType? = nil, buttons: [Kindly.KindlyEventButton] = [], images: [Kindly.KindlyEventImage] = [], attachments: [Kindly.KindlyEventAttachment] = [])
158
+ }
159
+ public enum KindlyEventMessageSender : Swift.String, Swift.CaseIterable {
160
+ case agent
161
+ case bot
162
+ case system
163
+ case user
164
+ case unknown
165
+ public init?(rawValue: Swift.String)
166
+ public typealias AllCases = [Kindly.KindlyEventMessageSender]
167
+ public typealias RawValue = Swift.String
168
+ nonisolated public static var allCases: [Kindly.KindlyEventMessageSender] {
169
+ get
170
+ }
171
+ public var rawValue: Swift.String {
172
+ get
173
+ }
174
+ }
175
+ public enum KindlyEventExchangeType : Swift.String, Swift.CaseIterable {
176
+ case dialogue
177
+ case fallback
178
+ case greeting
179
+ case systemDialogue
180
+ case userSays
181
+ public init?(rawValue: Swift.String)
182
+ public typealias AllCases = [Kindly.KindlyEventExchangeType]
183
+ public typealias RawValue = Swift.String
184
+ nonisolated public static var allCases: [Kindly.KindlyEventExchangeType] {
185
+ get
186
+ }
187
+ public var rawValue: Swift.String {
188
+ get
189
+ }
190
+ }
191
+ public struct KindlyEventButton {
192
+ public let id: Swift.String?
193
+ public let type: Swift.String
194
+ public let label: Swift.String
195
+ public let value: Swift.String?
196
+ public let index: Swift.Int?
197
+ public let hasBeenSelected: Swift.Bool
198
+ public let context: [Swift.String : Any]?
199
+ public init(id: Swift.String? = nil, type: Swift.String, label: Swift.String, value: Swift.String? = nil, index: Swift.Int? = nil, hasBeenSelected: Swift.Bool = false, context: [Swift.String : Any]? = nil)
200
+ }
201
+ public struct KindlyEventImage {
202
+ public let url: Swift.String
203
+ public let altText: Swift.String?
204
+ public let id: Swift.String?
205
+ public init(url: Swift.String, altText: Swift.String? = nil, id: Swift.String? = nil)
206
+ }
207
+ public struct KindlyEventAttachment {
208
+ public let id: Swift.String
209
+ public let name: Swift.String
210
+ public let format: Swift.String
211
+ public let status: Swift.String
212
+ public let sender: Swift.String
213
+ public let storagePath: Swift.String
214
+ public init(id: Swift.String, name: Swift.String, format: Swift.String, status: Swift.String, sender: Swift.String, storagePath: Swift.String)
215
+ }
216
+ public struct KindlyEventUIAction {
217
+ public let type: Kindly.KindlyUIActionType
218
+ public let source: Swift.String
219
+ public let chatId: Swift.String
220
+ public let value: [Swift.String : Any]?
221
+ public let feedbackType: Swift.String?
222
+ public let feedbackValue: [Swift.String : Any]?
223
+ public let languageCode: Swift.String?
224
+ public let languageName: Swift.String?
225
+ public let previousLanguageCode: Swift.String?
226
+ public let previousLanguageName: Swift.String?
227
+ public let nextPage: Swift.String?
228
+ public init(type: Kindly.KindlyUIActionType, source: Swift.String = "user", chatId: Swift.String, value: [Swift.String : Any]? = nil, feedbackType: Swift.String? = nil, feedbackValue: [Swift.String : Any]? = nil, languageCode: Swift.String? = nil, languageName: Swift.String? = nil, previousLanguageCode: Swift.String? = nil, previousLanguageName: Swift.String? = nil, nextPage: Swift.String? = nil)
229
+ }
230
+ public struct KindlyEventGlobalIcon {
231
+ public let type: Swift.String
232
+ public let source: Swift.String
233
+ public let value: [Swift.String : Any]?
234
+ public init(type: Swift.String, source: Swift.String = "user", value: [Swift.String : Any]? = nil)
235
+ }
236
+ public struct KindlyEventState {
237
+ public let isChatDisplayed: Swift.Bool
238
+ public let isStarted: Swift.Bool
239
+ public let isSocketConnected: Swift.Bool
240
+ public let isConnected: Swift.Bool
241
+ public let connectionState: Swift.String
242
+ public init(isChatDisplayed: Swift.Bool, isStarted: Swift.Bool, isSocketConnected: Swift.Bool, isConnected: Swift.Bool, connectionState: Swift.String)
243
+ }
244
+ public struct CoreSDKConfig {
245
+ }
246
+ public enum KindlyInputType : Swift.String {
247
+ case email
248
+ case phone
249
+ case text
250
+ case number
251
+ public init?(rawValue: Swift.String)
252
+ public typealias RawValue = Swift.String
253
+ public var rawValue: Swift.String {
254
+ get
255
+ }
256
+ }
257
+ public enum TypingEventType {
258
+ case started
259
+ case stopped
260
+ public static func == (a: Kindly.TypingEventType, b: Kindly.TypingEventType) -> Swift.Bool
261
+ public func hash(into hasher: inout Swift.Hasher)
262
+ public var hashValue: Swift.Int {
263
+ get
264
+ }
265
+ }
266
+ public enum TypingEventSender {
267
+ case bot
268
+ case agent
269
+ public static func == (a: Kindly.TypingEventSender, b: Kindly.TypingEventSender) -> Swift.Bool
270
+ public func hash(into hasher: inout Swift.Hasher)
271
+ public var hashValue: Swift.Int {
272
+ get
273
+ }
274
+ }
275
+ public struct TypingEvent {
276
+ public let type: Kindly.TypingEventType
277
+ public let sender: Kindly.TypingEventSender
278
+ public let duration: Foundation.TimeInterval?
279
+ public let timestamp: Foundation.Date
280
+ public init(type: Kindly.TypingEventType, sender: Kindly.TypingEventSender, duration: Foundation.TimeInterval? = nil)
281
+ }
282
+ public struct ExternalChatButton {
283
+ }
284
+ public enum ChatConnectionState {
285
+ case none
286
+ case connecting
287
+ case connected
288
+ case disconnected
289
+ case failed
290
+ case conversationEnded
291
+ case closing
292
+ public static func == (a: Kindly.ChatConnectionState, b: Kindly.ChatConnectionState) -> Swift.Bool
293
+ public func hash(into hasher: inout Swift.Hasher)
294
+ public var hashValue: Swift.Int {
295
+ get
296
+ }
297
+ }
298
+ public protocol KindlyChatClientDelegate : ObjectiveC.NSObject {
299
+ func didPressButton(chatButton: Kindly.ExternalChatButton, chatLog: [Kindly.ExternalChatMessage])
300
+ func shouldHandleLink(url: Foundation.URL) -> Swift.Bool
301
+ }
302
+ extension Kindly.KindlyChatClientDelegate {
303
+ public func shouldHandleLink(url: Foundation.URL) -> Swift.Bool
304
+ }
305
+ final public class KindlyChatClient {
306
+ public static var shared: Kindly.KindlyChatClient!
307
+ public static var config: Kindly.KindlySDKConfig {
308
+ get
309
+ set
310
+ }
311
+ public static var connectionState: Kindly.ChatConnectionState {
312
+ get
313
+ }
314
+ public static var inputFieldHidden: Swift.Bool {
315
+ get
316
+ set
317
+ }
318
+ public static var delegate: (any Kindly.KindlyChatClientDelegate)! {
319
+ get
320
+ set
321
+ }
322
+ public init(config: Kindly.CoreSDKConfig, behaviorType: Kindly.BehaviorTypeEnum)
323
+ @objc deinit
324
+ }
325
+ @objc @_inheritsConvenienceInitializers public class NotificationDelegate : ObjectiveC.NSObject, UserNotifications.UNUserNotificationCenterDelegate {
326
+ @objc public func userNotificationCenter(_ center: UserNotifications.UNUserNotificationCenter, willPresent notification: UserNotifications.UNNotification, withCompletionHandler completionHandler: @escaping (UserNotifications.UNNotificationPresentationOptions) -> Swift.Void)
327
+ @objc public func userNotificationCenter(_ center: UserNotifications.UNUserNotificationCenter, didReceive response: UserNotifications.UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Swift.Void)
328
+ @objc override dynamic public init()
329
+ @objc deinit
330
+ }
331
+ extension Dispatch.DispatchQueue {
332
+ public static var _promises: Dispatch.DispatchQueue?
333
+ public static var promises: Dispatch.DispatchQueue {
334
+ get
335
+ set
336
+ }
337
+ }
338
+ @_hasMissingDesignatedInitializers public class Promise<T> {
339
+ public typealias onFulfilled = (T) throws -> Swift.Void
340
+ public typealias onRejected = (any Swift.Error) -> Swift.Void
341
+ public static func resolve(_ value: T) -> Kindly.Promise<T>
342
+ public static func reject(_ error: any Swift.Error) -> Kindly.Promise<T>
343
+ @objc deinit
344
+ }
345
+ extension Kindly.Promise {
346
+ public func fulfill(_ value: T)
347
+ public func reject(_ error: any Swift.Error)
348
+ @discardableResult
349
+ public func then(on queue: Dispatch.DispatchQueue = .promises, _ onFulfilled: @escaping Kindly.Promise<T>.onFulfilled) -> Kindly.Promise<T>
350
+ @discardableResult
351
+ public func `catch`(on queue: Dispatch.DispatchQueue = .promises, _ onRejected: @escaping Kindly.Promise<T>.onRejected) -> Kindly.Promise<T>
352
+ @discardableResult
353
+ public func always(on queue: Dispatch.DispatchQueue = .promises, _ block: @escaping () -> Swift.Void) -> Kindly.Promise<T>
354
+ public func pipe(to target: Kindly.Promise<T>)
355
+ }
356
+ public enum KindlyLogger {
357
+ 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)
358
+ }
359
+ public protocol Theme {
360
+ var background: UIKit.UIColor? { get }
361
+ var botMessageBackground: UIKit.UIColor? { get }
362
+ var botMessageText: UIKit.UIColor? { get }
363
+ var buttonBackground: UIKit.UIColor? { get }
364
+ var buttonOutline: UIKit.UIColor? { get }
365
+ var buttonText: UIKit.UIColor? { get }
366
+ var chatLogElements: UIKit.UIColor? { get }
367
+ var navBarBackground: UIKit.UIColor? { get }
368
+ var navBarText: UIKit.UIColor? { get }
369
+ var inputBackground: UIKit.UIColor? { get }
370
+ var inputText: UIKit.UIColor? { get }
371
+ var userMessageBackground: UIKit.UIColor? { get }
372
+ var userMessageText: UIKit.UIColor? { get }
373
+ var buttonSelectedBackground: UIKit.UIColor? { get }
374
+ var defaultShadow: UIKit.UIColor? { get }
375
+ var inputCursor: UIKit.UIColor? { get }
376
+ var maintenanceHeaderBackground: UIKit.UIColor? { get }
377
+ }
378
+ public struct KindlyTheme : Kindly.Theme {
379
+ public init()
380
+ public var background: UIKit.UIColor? {
381
+ get
382
+ }
383
+ public var botMessageBackground: UIKit.UIColor? {
384
+ get
385
+ }
386
+ public var botMessageText: UIKit.UIColor? {
387
+ get
388
+ }
389
+ public var buttonBackground: UIKit.UIColor? {
390
+ get
391
+ }
392
+ public var buttonOutline: UIKit.UIColor? {
393
+ get
394
+ }
395
+ public var buttonText: UIKit.UIColor? {
396
+ get
397
+ }
398
+ public var chatLogElements: UIKit.UIColor? {
399
+ get
400
+ }
401
+ public var navBarBackground: UIKit.UIColor? {
402
+ get
403
+ }
404
+ public var navBarText: UIKit.UIColor? {
405
+ get
406
+ }
407
+ public var inputBackground: UIKit.UIColor? {
408
+ get
409
+ }
410
+ public var inputText: UIKit.UIColor? {
411
+ get
412
+ }
413
+ public var userMessageBackground: UIKit.UIColor? {
414
+ get
415
+ }
416
+ public var userMessageText: UIKit.UIColor? {
417
+ get
418
+ }
419
+ public var buttonSelectedBackground: UIKit.UIColor? {
420
+ get
421
+ }
422
+ public var defaultShadow: UIKit.UIColor? {
423
+ get
424
+ }
425
+ public var inputCursor: UIKit.UIColor? {
426
+ get
427
+ }
428
+ public var maintenanceHeaderBackground: UIKit.UIColor? {
429
+ get
430
+ }
431
+ }
432
+ public struct CustomTheme : Kindly.Theme {
433
+ public var background: UIKit.UIColor?
434
+ public var botMessageBackground: UIKit.UIColor?
435
+ public var botMessageText: UIKit.UIColor?
436
+ public var buttonBackground: UIKit.UIColor?
437
+ public var buttonOutline: UIKit.UIColor?
438
+ public var buttonText: UIKit.UIColor?
439
+ public var chatLogElements: UIKit.UIColor?
440
+ public var navBarBackground: UIKit.UIColor?
441
+ public var navBarText: UIKit.UIColor?
442
+ public var inputBackground: UIKit.UIColor?
443
+ public var inputText: UIKit.UIColor?
444
+ public var userMessageBackground: UIKit.UIColor?
445
+ public var userMessageText: UIKit.UIColor?
446
+ public var buttonSelectedBackground: UIKit.UIColor?
447
+ public var defaultShadow: UIKit.UIColor?
448
+ public var inputCursor: UIKit.UIColor?
449
+ public var maintenanceHeaderBackground: UIKit.UIColor?
450
+ public init(background: UIKit.UIColor? = nil, botMessageBackground: UIKit.UIColor? = nil, botMessageText: UIKit.UIColor? = nil, buttonBackground: UIKit.UIColor? = nil, buttonOutline: UIKit.UIColor? = nil, buttonText: UIKit.UIColor? = nil, chatLogElements: UIKit.UIColor? = nil, navBarBackground: UIKit.UIColor? = nil, navBarText: UIKit.UIColor? = nil, inputBackground: UIKit.UIColor? = nil, inputText: UIKit.UIColor? = nil, userMessageBackground: UIKit.UIColor? = nil, userMessageText: UIKit.UIColor? = nil, buttonSelectedBackground: UIKit.UIColor? = nil, defaultShadow: UIKit.UIColor? = nil, inputCursor: UIKit.UIColor? = nil, maintenanceHeaderBackground: UIKit.UIColor? = nil)
451
+ }
452
+ @_hasMissingDesignatedInitializers final public class TypingEventManager {
453
+ public static let shared: Kindly.TypingEventManager
454
+ final public let typingEventSubject: Combine.PassthroughSubject<Kindly.TypingEvent, Swift.Never>
455
+ final public func emitTypingEvent(_ event: Kindly.TypingEvent)
456
+ final public func emitBotStartedTyping(duration: Foundation.TimeInterval?)
457
+ final public func emitBotStoppedTyping()
458
+ final public func emitAgentStartedTyping(duration: Foundation.TimeInterval?)
459
+ final public func emitAgentStoppedTyping()
460
+ @objc deinit
461
+ }
462
+ public typealias KindlySDK = Kindly.KindlyChatClient
463
+ public enum BehaviorTypeEnum {
464
+ case native
465
+ public static func == (a: Kindly.BehaviorTypeEnum, b: Kindly.BehaviorTypeEnum) -> Swift.Bool
466
+ public func hash(into hasher: inout Swift.Hasher)
467
+ public var hashValue: Swift.Int {
468
+ get
469
+ }
470
+ }
471
+ extension Kindly.KindlyChatClient {
472
+ public static var events: Combine.AnyPublisher<Kindly.KindlyEvent, Swift.Never> {
473
+ get
474
+ }
475
+ public static var state: Combine.AnyPublisher<Kindly.KindlyEventState, Swift.Never> {
476
+ get
477
+ }
478
+ public static var notificationDelegate: Kindly.NotificationDelegate {
479
+ get
480
+ }
481
+ public static var verboseLogging: Swift.Bool {
482
+ get
483
+ set
484
+ }
485
+ public static func setCustomTheme(_ theme: any Kindly.Theme)
486
+ public static func setCustomTheme(background: UIKit.UIColor? = nil, botMessageBackground: UIKit.UIColor? = nil, botMessageText: UIKit.UIColor? = nil, buttonBackground: UIKit.UIColor? = nil, buttonOutline: UIKit.UIColor? = nil, buttonSelectedBackground: UIKit.UIColor? = nil, buttonText: UIKit.UIColor? = nil, defaultShadow: UIKit.UIColor? = nil, inputBackground: UIKit.UIColor? = nil, inputCursor: UIKit.UIColor? = nil, inputText: UIKit.UIColor? = nil, navBarBackground: UIKit.UIColor? = nil, navBarText: UIKit.UIColor? = nil, userMessageBackground: UIKit.UIColor? = nil, userMessageText: UIKit.UIColor? = nil)
487
+ public static func clearCustomTheme()
488
+ public static var enableCrashReporting: Swift.Bool {
489
+ get
490
+ set
491
+ }
492
+ final public class func start(botKey: Swift.String, languageCode: Swift.String = "en", authTokenCallback: Kindly.AuthTokenCallback? = nil)
493
+ final public class func displayChat(languageCode: Swift.String? = nil, triggerDialogueId: Swift.String? = nil)
494
+ final public func displayChat(languageCode: Swift.String? = nil, triggerDialogueId: Swift.String? = nil)
495
+ final public class func setLanguage(_ languageCode: Swift.String) -> Kindly.Promise<Swift.Void>
496
+ final public class func setNewContext(_ context: [Swift.String : Swift.String])
497
+ final public func setNewContext(_ context: [Swift.String : Swift.String])
498
+ final public class func clearNewContext()
499
+ final public func clearNewContext()
500
+ final public class func setAPNSDeviceToken(_ deviceToken: Foundation.Data)
501
+ final public class func setAPNSDeviceToken(_ deviceToken: Swift.String)
502
+ @discardableResult
503
+ final public class func saveAuthToken(_ token: Swift.String) -> Swift.Bool
504
+ @discardableResult
505
+ final public func saveAuthToken(_ token: Swift.String) -> Swift.Bool
506
+ final public class func closeChat()
507
+ final public func closeChat()
508
+ final public class func endChat() -> Kindly.Promise<Swift.Void>
509
+ final public class func kill() -> Kindly.Promise<Swift.Void>
510
+ final public func endChat() -> Kindly.Promise<Swift.Void>
511
+ final public class func notificationReceived(_ userInfo: [Swift.AnyHashable : Any])
512
+ final public class func notificationReceived(_ notification: UserNotifications.UNNotification)
513
+ final public class func notificationResponseReceived(_ response: UserNotifications.UNNotificationResponse)
514
+ final public class func isKindlyNotification(_ userInfo: [Swift.AnyHashable : Any]) -> Swift.Bool
515
+ final public class func triggerDialogue(id: Swift.String)
516
+ @discardableResult
517
+ final public class func handleURL(_ url: Foundation.URL) -> Swift.Bool
518
+ final public class func play()
519
+ }
520
+ public typealias AuthTokenCallback = (_ chatId: Swift.String, _ promise: Kindly.Promise<Swift.String>) -> Swift.Void
521
+ extension Kindly.KindlyEventType : Swift.Equatable {}
522
+ extension Kindly.KindlyEventType : Swift.Hashable {}
523
+ extension Kindly.KindlyEventType : Swift.RawRepresentable {}
524
+ extension Kindly.KindlyUIActionType : Swift.Equatable {}
525
+ extension Kindly.KindlyUIActionType : Swift.Hashable {}
526
+ extension Kindly.KindlyUIActionType : Swift.RawRepresentable {}
527
+ extension Kindly.KindlyEventMessageSender : Swift.Equatable {}
528
+ extension Kindly.KindlyEventMessageSender : Swift.Hashable {}
529
+ extension Kindly.KindlyEventMessageSender : Swift.RawRepresentable {}
530
+ extension Kindly.KindlyEventExchangeType : Swift.Equatable {}
531
+ extension Kindly.KindlyEventExchangeType : Swift.Hashable {}
532
+ extension Kindly.KindlyEventExchangeType : Swift.RawRepresentable {}
533
+ extension Kindly.KindlyInputType : Swift.Equatable {}
534
+ extension Kindly.KindlyInputType : Swift.Hashable {}
535
+ extension Kindly.KindlyInputType : Swift.RawRepresentable {}
536
+ extension Kindly.TypingEventType : Swift.Equatable {}
537
+ extension Kindly.TypingEventType : Swift.Hashable {}
538
+ extension Kindly.TypingEventSender : Swift.Equatable {}
539
+ extension Kindly.TypingEventSender : Swift.Hashable {}
540
+ extension Kindly.ChatConnectionState : Swift.Equatable {}
541
+ extension Kindly.ChatConnectionState : Swift.Hashable {}
542
+ extension Kindly.BehaviorTypeEnum : Swift.Equatable {}
543
+ extension Kindly.BehaviorTypeEnum : Swift.Hashable {}
@@ -0,0 +1,11 @@
1
+ framework module Kindly {
2
+ umbrella header "Kindly.h"
3
+ export *
4
+
5
+ module * { export * }
6
+ }
7
+
8
+ module Kindly.Swift {
9
+ header "Kindly-Swift.h"
10
+ requires objc
11
+ }
@@ -0,0 +1,83 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>NSPrivacyTracking</key>
6
+ <false/>
7
+ <key>NSPrivacyCollectedDataTypes</key>
8
+ <array>
9
+ <dict>
10
+ <key>NSPrivacyCollectedDataType</key>
11
+ <string>NSPrivacyCollectedDataTypeDeviceID</string>
12
+ <key>NSPrivacyCollectedDataTypeLinked</key>
13
+ <true/>
14
+ <key>NSPrivacyCollectedDataTypeTracking</key>
15
+ <false/>
16
+ <key>NSPrivacyCollectedDataTypePurposes</key>
17
+ <array>
18
+ <string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
19
+ </array>
20
+ </dict>
21
+ <dict>
22
+ <key>NSPrivacyCollectedDataType</key>
23
+ <string>NSPrivacyCollectedDataTypeDeviceName</string>
24
+ <key>NSPrivacyCollectedDataTypeLinked</key>
25
+ <true/>
26
+ <key>NSPrivacyCollectedDataTypeTracking</key>
27
+ <false/>
28
+ <key>NSPrivacyCollectedDataTypePurposes</key>
29
+ <array>
30
+ <string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
31
+ </array>
32
+ </dict>
33
+ <dict>
34
+ <key>NSPrivacyCollectedDataType</key>
35
+ <string>NSPrivacyCollectedDataTypeOtherUserContent</string>
36
+ <key>NSPrivacyCollectedDataTypeLinked</key>
37
+ <true/>
38
+ <key>NSPrivacyCollectedDataTypeTracking</key>
39
+ <false/>
40
+ <key>NSPrivacyCollectedDataTypePurposes</key>
41
+ <array>
42
+ <string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
43
+ </array>
44
+ </dict>
45
+ <dict>
46
+ <key>NSPrivacyCollectedDataType</key>
47
+ <string>NSPrivacyCollectedDataTypeCrashData</string>
48
+ <key>NSPrivacyCollectedDataTypeLinked</key>
49
+ <false/>
50
+ <key>NSPrivacyCollectedDataTypeTracking</key>
51
+ <false/>
52
+ <key>NSPrivacyCollectedDataTypePurposes</key>
53
+ <array>
54
+ <string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
55
+ </array>
56
+ </dict>
57
+ <dict>
58
+ <key>NSPrivacyCollectedDataType</key>
59
+ <string>NSPrivacyCollectedDataTypeProductInteraction</string>
60
+ <key>NSPrivacyCollectedDataTypeLinked</key>
61
+ <true/>
62
+ <key>NSPrivacyCollectedDataTypeTracking</key>
63
+ <false/>
64
+ <key>NSPrivacyCollectedDataTypePurposes</key>
65
+ <array>
66
+ <string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
67
+ </array>
68
+ </dict>
69
+ <dict>
70
+ <key>NSPrivacyCollectedDataType</key>
71
+ <string>NSPrivacyCollectedDataTypeOtherDiagnosticData</string>
72
+ <key>NSPrivacyCollectedDataTypeLinked</key>
73
+ <true/>
74
+ <key>NSPrivacyCollectedDataTypeTracking</key>
75
+ <false/>
76
+ <key>NSPrivacyCollectedDataTypePurposes</key>
77
+ <array>
78
+ <string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
79
+ </array>
80
+ </dict>
81
+ </array>
82
+ </dict>
83
+ </plist>