@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,280 @@
1
+ "use strict";
2
+
3
+ // Kindly Chat SDK — public React Native surface.
4
+ //
5
+ // Thin TS facade over the native TurboModule (`KindlyReactNative`). Mirrors
6
+ // the Flutter SDK's public API 1:1. Each method delegates to one or more
7
+ // methods on the spec, plus a tiny amount of bookkeeping in JS for the
8
+ // auth-token + delegate round-trips (the native side has no way to call
9
+ // JS synchronously, so we pair `*Request` events with a `respondTo*` method).
10
+ //
11
+ // Customers do `import { KindlySDK } from '@kindly-ai/react-native'`. The
12
+ // internal native-module name `KindlyReactNative` is intentionally not
13
+ // exported — it's an implementation detail.
14
+ import { NativeEventEmitter, NativeModules, Platform } from 'react-native';
15
+ import NativeKindly from "./NativeKindlyReactNative.js";
16
+
17
+ /** Callback invoked by the SDK when it needs a fresh JWT auth token. */
18
+
19
+ /** Callback invoked when a handover to a human agent is initiated. */
20
+
21
+ /**
22
+ * Fired by the SDK when the user taps a chat button.
23
+ *
24
+ * `button` keys: `id`, `type`, `label`, `value`, `index`, `hasBeenSelected`.
25
+ * `chatLog` is the full conversation up to this point.
26
+ */
27
+
28
+ /**
29
+ * Asked by the SDK before opening a link the user tapped inside chat.
30
+ *
31
+ * Return `true` to let the SDK open it (default), or `false` to take over.
32
+ */
33
+
34
+ /**
35
+ * Asked by the SDK before presenting an incoming Kindly silent push.
36
+ *
37
+ * Return `true` to let the SDK present it (default), or `false` to take over.
38
+ */
39
+
40
+ /** Typed bag of theme colors (ARGB ints — use the helpers below). */
41
+
42
+ /**
43
+ * Convert a `#RRGGBB` or `#AARRGGBB` hex string to the ARGB int form the
44
+ * SDK expects. Equivalent to Flutter's `Color.value`.
45
+ */
46
+ export function hexColor(hex) {
47
+ const cleaned = hex.replace(/^#/, '');
48
+ const v = parseInt(cleaned, 16);
49
+ if (cleaned.length === 6) {
50
+ return (0xff000000 | v) >>> 0;
51
+ }
52
+ if (cleaned.length === 8) {
53
+ return v >>> 0;
54
+ }
55
+ throw new Error(`hexColor: expected #RRGGBB or #AARRGGBB, got "${hex}"`);
56
+ }
57
+
58
+ // ────────────────────────────────────────────────────────────────────────────
59
+ // Native-event wiring for native→JS callbacks.
60
+ //
61
+ // Native fires events via RCTDeviceEventEmitter; JS attaches once on first use
62
+ // and dispatches to the registered callbacks. Sync-bool answers
63
+ // (`shouldHandleLink` / `shouldHandleNotification`) are returned via a
64
+ // `respondToShouldHandle` round-trip — native blocks on a Map<requestId,
65
+ // Deferred> with a 5s timeout, falling back to `true` if JS is slow or
66
+ // silent. Same semantics as the Flutter SDK's blocking-bool pattern.
67
+ // ────────────────────────────────────────────────────────────────────────────
68
+ const eventEmitter = new NativeEventEmitter(Platform.OS === 'ios' ? NativeModules.KindlyReactNative : undefined);
69
+ let authTokenCallback = null;
70
+ let handoverCallback = null;
71
+ let onButtonPressed = null;
72
+ let shouldHandleLink = null;
73
+ let shouldHandleNotification = null;
74
+ let listenersAttached = false;
75
+ function attachListeners() {
76
+ if (listenersAttached) return;
77
+ listenersAttached = true;
78
+
79
+ // RN's NativeEventEmitter.addListener types its callback as
80
+ // `(...args: readonly Object[]) => unknown` — we widen each event-shape
81
+ // type inside the handler instead of trying to fight the parameter type.
82
+ eventEmitter.addListener('KindlyGetAuthToken', async raw => {
83
+ const event = raw;
84
+ if (authTokenCallback == null) {
85
+ NativeKindly.respondToAuthToken(event.requestId, null);
86
+ return;
87
+ }
88
+ try {
89
+ const token = await authTokenCallback();
90
+ NativeKindly.respondToAuthToken(event.requestId, token);
91
+ } catch {
92
+ NativeKindly.respondToAuthToken(event.requestId, null);
93
+ }
94
+ });
95
+ eventEmitter.addListener('KindlyOnHandover', () => {
96
+ handoverCallback?.();
97
+ });
98
+ eventEmitter.addListener('KindlyOnButtonPressed', raw => {
99
+ const event = raw;
100
+ onButtonPressed?.(event.button, event.chatLog);
101
+ });
102
+ eventEmitter.addListener('KindlyShouldHandleLink', raw => {
103
+ const event = raw;
104
+ const value = shouldHandleLink ? shouldHandleLink(event.url) : true;
105
+ NativeKindly.respondToShouldHandle(event.requestId, value);
106
+ });
107
+ eventEmitter.addListener('KindlyShouldHandleNotification', raw => {
108
+ const event = raw;
109
+ const value = shouldHandleNotification ? shouldHandleNotification(event.notification) : true;
110
+ NativeKindly.respondToShouldHandle(event.requestId, value);
111
+ });
112
+ }
113
+
114
+ /**
115
+ * Main Kindly SDK entry point.
116
+ *
117
+ * Thin facade over the public `EntryPoint` API of the native iOS
118
+ * (`KindlyChatClient`) and Android (`ChatKindlySDK`) SDKs.
119
+ */
120
+ export class KindlySDK {
121
+ /** Initialize the SDK. Must be called before any other method. */
122
+ static start(args) {
123
+ attachListeners();
124
+ authTokenCallback = args.authTokenCallback ?? null;
125
+ NativeKindly.start(args.botKey, args.languageCode ?? null, args.authTokenCallback != null);
126
+ }
127
+
128
+ /** Show the chat UI. */
129
+ static displayChat(args = {}) {
130
+ NativeKindly.displayChat(args.languageCode ?? null, args.triggerDialogueId ?? null);
131
+ }
132
+
133
+ /** Connect (if needed) and show chat. Recommended on Android. */
134
+ static launchChat(args = {}) {
135
+ NativeKindly.launchChat(args.triggerDialogueId ?? null);
136
+ }
137
+
138
+ /** Dismiss the chat UI without ending the session. */
139
+ static closeChat() {
140
+ NativeKindly.closeChat();
141
+ }
142
+
143
+ /** End the chat session: clears messages, token, dismisses UI. */
144
+ static endChat() {
145
+ return NativeKindly.endChat();
146
+ }
147
+
148
+ /** Tear the SDK down completely; call start() again before reuse. */
149
+ static kill() {
150
+ return NativeKindly.kill();
151
+ }
152
+
153
+ /** Update the language for the current session. */
154
+ static setLanguage(languageCode) {
155
+ return NativeKindly.setLanguage(languageCode);
156
+ }
157
+
158
+ /**
159
+ * Send a message programmatically. Returns the reconciled message map
160
+ * (id, text, created, sender, …) or rejects on failure.
161
+ */
162
+ static sendMessage(text, options) {
163
+ return NativeKindly.sendMessage(text, options?.newContext ?? null);
164
+ }
165
+
166
+ /** Apply a custom theme. Pass undefined fields to keep the default. */
167
+ static setCustomTheme(theme) {
168
+ const colors = {};
169
+ Object.keys(theme).forEach(k => {
170
+ colors[k] = theme[k] ?? null;
171
+ });
172
+ NativeKindly.setCustomTheme(colors);
173
+ }
174
+
175
+ /** Clear custom theme; revert to default / API-supplied theme. */
176
+ static clearCustomTheme() {
177
+ NativeKindly.clearCustomTheme();
178
+ }
179
+
180
+ /** Stage context attached to the next message or button click. */
181
+ static setNewContext(context) {
182
+ NativeKindly.setNewContext(context);
183
+ }
184
+
185
+ /** Clear any context staged via setNewContext. */
186
+ static clearNewContext() {
187
+ NativeKindly.clearNewContext();
188
+ }
189
+
190
+ /** Save a JWT auth token (iOS keychain). On Android always returns true. */
191
+ static saveAuthToken(token) {
192
+ return NativeKindly.saveAuthToken(token);
193
+ }
194
+
195
+ /** Register the APNS device token. iOS only — no-op on Android. */
196
+ static setAPNSDeviceToken(token) {
197
+ if (Platform.OS === 'ios') {
198
+ NativeKindly.setAPNSDeviceToken(token);
199
+ }
200
+ }
201
+
202
+ /** Register the FCM token. Android only — no-op on iOS. */
203
+ static saveNotificationToken(token) {
204
+ if (Platform.OS === 'android') {
205
+ NativeKindly.saveNotificationToken(token);
206
+ }
207
+ }
208
+
209
+ /** Forward an incoming push notification to the SDK. */
210
+ static handleNotification(data) {
211
+ NativeKindly.handleNotification(data);
212
+ }
213
+
214
+ /** Returns true if the given push payload originated from Kindly. */
215
+ static isKindlyNotification(data) {
216
+ return NativeKindly.isKindlyNotification(data);
217
+ }
218
+
219
+ /** Trigger a specific dialogue by id. The SDK must be connected. */
220
+ static triggerDialogue(dialogueId) {
221
+ NativeKindly.triggerDialogue(dialogueId);
222
+ }
223
+
224
+ /** Clear any pending trigger-dialogue request (Android only). */
225
+ static clearTriggerDialogue() {
226
+ NativeKindly.clearTriggerDialogue();
227
+ }
228
+
229
+ /** Handle a Kindly deep-link URL (e.g. `kindly://chat/dialogue/{id}`). */
230
+ static handleUrl(url) {
231
+ return NativeKindly.handleUrl(url);
232
+ }
233
+
234
+ /** Initiate a handover to a human agent. */
235
+ static callHandover(callback) {
236
+ attachListeners();
237
+ handoverCallback = callback;
238
+ NativeKindly.callHandover();
239
+ }
240
+
241
+ /** Whether the chat UI is currently displayed (iOS only — Android always false). */
242
+ static isChatDisplayed() {
243
+ return NativeKindly.isChatDisplayed();
244
+ }
245
+
246
+ /** Toggle verbose SDK logging. */
247
+ static setVerboseLogging(enabled) {
248
+ NativeKindly.setVerboseLogging(enabled);
249
+ }
250
+
251
+ /** Toggle Sentry crash reporting from inside the SDK. */
252
+ static setCrashReporting(enabled) {
253
+ NativeKindly.setCrashReporting(enabled);
254
+ }
255
+
256
+ /**
257
+ * Register host-app callbacks for chat-button presses, link interception,
258
+ * and notification interception. Mirrors the native delegate protocols.
259
+ *
260
+ * `shouldHandleLink` / `shouldHandleNotification` have a 5-second native
261
+ * timeout — return quickly. After timeout the SDK falls back to its
262
+ * default `true` so the UI doesn't hang on a slow JS callback.
263
+ */
264
+ static setDelegate(args) {
265
+ attachListeners();
266
+ onButtonPressed = args.onButtonPressed ?? null;
267
+ shouldHandleLink = args.shouldHandleLink ?? null;
268
+ shouldHandleNotification = args.shouldHandleNotification ?? null;
269
+ NativeKindly.setDelegate(onButtonPressed != null, shouldHandleLink != null, shouldHandleNotification != null, handoverCallback != null);
270
+ }
271
+
272
+ /** Clear all delegate callbacks set via setDelegate. */
273
+ static clearDelegate() {
274
+ onButtonPressed = null;
275
+ shouldHandleLink = null;
276
+ shouldHandleNotification = null;
277
+ NativeKindly.setDelegate(false, false, false, handoverCallback != null);
278
+ }
279
+ }
280
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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,GAA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iBAAiBA,CAACD,OAAgB,EAAQ;IAC/CzE,YAAY,CAAC0E,iBAAiB,CAACD,OAAO,CAAC;EACzC;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE,OAAOE,WAAWA,CAACzC,IAIlB,EAAQ;IACPf,eAAe,CAAC,CAAC;IACjBJ,eAAe,GAAGmB,IAAI,CAACnB,eAAe,IAAI,IAAI;IAC9CC,gBAAgB,GAAGkB,IAAI,CAAClB,gBAAgB,IAAI,IAAI;IAChDC,wBAAwB,GAAGiB,IAAI,CAACjB,wBAAwB,IAAI,IAAI;IAChEjB,YAAY,CAAC2E,WAAW,CACtB5D,eAAe,IAAI,IAAI,EACvBC,gBAAgB,IAAI,IAAI,EACxBC,wBAAwB,IAAI,IAAI,EAChCH,gBAAgB,IAAI,IACtB,CAAC;EACH;;EAEA;EACA,OAAO8D,aAAaA,CAAA,EAAS;IAC3B7D,eAAe,GAAG,IAAI;IACtBC,gBAAgB,GAAG,IAAI;IACvBC,wBAAwB,GAAG,IAAI;IAC/BjB,YAAY,CAAC2E,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE7D,gBAAgB,IAAI,IAAI,CAAC;EACzE;AACF","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,47 @@
1
+ import type { TurboModule } from 'react-native';
2
+ export interface Spec extends TurboModule {
3
+ start(botKey: string, languageCode: string | null, hasAuthCallback: boolean): void;
4
+ displayChat(languageCode: string | null, triggerDialogueId: string | null): void;
5
+ launchChat(triggerDialogueId: string | null): void;
6
+ closeChat(): void;
7
+ endChat(): Promise<void>;
8
+ kill(): Promise<void>;
9
+ setLanguage(languageCode: string): Promise<void>;
10
+ sendMessage(message: string, newContext: {
11
+ [key: string]: string;
12
+ } | null): Promise<{
13
+ [key: string]: unknown;
14
+ } | null>;
15
+ setNewContext(context: {
16
+ [key: string]: string;
17
+ }): void;
18
+ clearNewContext(): void;
19
+ triggerDialogue(dialogueId: string): void;
20
+ clearTriggerDialogue(): void;
21
+ handleUrl(url: string): Promise<boolean>;
22
+ setCustomTheme(colors: {
23
+ [key: string]: number | null;
24
+ }): void;
25
+ clearCustomTheme(): void;
26
+ setAPNSDeviceToken(token: string): void;
27
+ saveNotificationToken(token: string): void;
28
+ handleNotification(data: {
29
+ [key: string]: unknown;
30
+ }): void;
31
+ isKindlyNotification(data: {
32
+ [key: string]: unknown;
33
+ }): boolean;
34
+ saveAuthToken(token: string): Promise<boolean>;
35
+ isChatDisplayed(): Promise<boolean>;
36
+ setVerboseLogging(enabled: boolean): void;
37
+ setCrashReporting(enabled: boolean): void;
38
+ respondToAuthToken(requestId: string, token: string | null): void;
39
+ respondToShouldHandle(requestId: string, value: boolean): void;
40
+ setDelegate(onButtonPressed: boolean, shouldHandleLink: boolean, shouldHandleNotification: boolean, onHandover: boolean): void;
41
+ callHandover(): void;
42
+ addListener(eventName: string): void;
43
+ removeListeners(count: number): void;
44
+ }
45
+ declare const _default: Spec;
46
+ export default _default;
47
+ //# sourceMappingURL=NativeKindlyReactNative.d.ts.map
@@ -0,0 +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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AAI,OAAO,CAAC,OAAO,CAAC,CAAC;IACpC,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAC1C,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAO1C,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"}
@@ -0,0 +1,150 @@
1
+ /** Callback invoked by the SDK when it needs a fresh JWT auth token. */
2
+ export type AuthTokenCallback = () => Promise<string | null>;
3
+ /** Callback invoked when a handover to a human agent is initiated. */
4
+ export type HandoverCallback = () => void;
5
+ /**
6
+ * Fired by the SDK when the user taps a chat button.
7
+ *
8
+ * `button` keys: `id`, `type`, `label`, `value`, `index`, `hasBeenSelected`.
9
+ * `chatLog` is the full conversation up to this point.
10
+ */
11
+ export type KindlyButtonPressedCallback = (button: {
12
+ [key: string]: unknown;
13
+ }, chatLog: Array<{
14
+ [key: string]: unknown;
15
+ }>) => void;
16
+ /**
17
+ * Asked by the SDK before opening a link the user tapped inside chat.
18
+ *
19
+ * Return `true` to let the SDK open it (default), or `false` to take over.
20
+ */
21
+ export type KindlyLinkInterceptCallback = (url: string) => boolean;
22
+ /**
23
+ * Asked by the SDK before presenting an incoming Kindly silent push.
24
+ *
25
+ * Return `true` to let the SDK present it (default), or `false` to take over.
26
+ */
27
+ export type KindlyNotificationInterceptCallback = (notification: {
28
+ [key: string]: unknown;
29
+ }) => boolean;
30
+ /** Typed bag of theme colors (ARGB ints — use the helpers below). */
31
+ export interface KindlyTheme {
32
+ background?: number;
33
+ botMessageBackground?: number;
34
+ botMessageText?: number;
35
+ buttonBackground?: number;
36
+ buttonOutline?: number;
37
+ buttonSelectedBackground?: number;
38
+ buttonText?: number;
39
+ defaultShadow?: number;
40
+ inputBackground?: number;
41
+ inputCursor?: number;
42
+ inputText?: number;
43
+ navBarBackground?: number;
44
+ navBarText?: number;
45
+ userMessageBackground?: number;
46
+ userMessageText?: number;
47
+ chatLogElements?: number;
48
+ maintenanceHeaderBackground?: number;
49
+ }
50
+ /**
51
+ * Convert a `#RRGGBB` or `#AARRGGBB` hex string to the ARGB int form the
52
+ * SDK expects. Equivalent to Flutter's `Color.value`.
53
+ */
54
+ export declare function hexColor(hex: string): number;
55
+ /**
56
+ * Main Kindly SDK entry point.
57
+ *
58
+ * Thin facade over the public `EntryPoint` API of the native iOS
59
+ * (`KindlyChatClient`) and Android (`ChatKindlySDK`) SDKs.
60
+ */
61
+ export declare class KindlySDK {
62
+ /** Initialize the SDK. Must be called before any other method. */
63
+ static start(args: {
64
+ botKey: string;
65
+ languageCode?: string;
66
+ authTokenCallback?: AuthTokenCallback;
67
+ }): void;
68
+ /** Show the chat UI. */
69
+ static displayChat(args?: {
70
+ languageCode?: string;
71
+ triggerDialogueId?: string;
72
+ }): void;
73
+ /** Connect (if needed) and show chat. Recommended on Android. */
74
+ static launchChat(args?: {
75
+ triggerDialogueId?: string;
76
+ }): void;
77
+ /** Dismiss the chat UI without ending the session. */
78
+ static closeChat(): void;
79
+ /** End the chat session: clears messages, token, dismisses UI. */
80
+ static endChat(): Promise<void>;
81
+ /** Tear the SDK down completely; call start() again before reuse. */
82
+ static kill(): Promise<void>;
83
+ /** Update the language for the current session. */
84
+ static setLanguage(languageCode: string): Promise<void>;
85
+ /**
86
+ * Send a message programmatically. Returns the reconciled message map
87
+ * (id, text, created, sender, …) or rejects on failure.
88
+ */
89
+ static sendMessage(text: string, options?: {
90
+ newContext?: {
91
+ [key: string]: string;
92
+ };
93
+ }): Promise<{
94
+ [key: string]: unknown;
95
+ } | null>;
96
+ /** Apply a custom theme. Pass undefined fields to keep the default. */
97
+ static setCustomTheme(theme: KindlyTheme): void;
98
+ /** Clear custom theme; revert to default / API-supplied theme. */
99
+ static clearCustomTheme(): void;
100
+ /** Stage context attached to the next message or button click. */
101
+ static setNewContext(context: {
102
+ [key: string]: string;
103
+ }): void;
104
+ /** Clear any context staged via setNewContext. */
105
+ static clearNewContext(): void;
106
+ /** Save a JWT auth token (iOS keychain). On Android always returns true. */
107
+ static saveAuthToken(token: string): Promise<boolean>;
108
+ /** Register the APNS device token. iOS only — no-op on Android. */
109
+ static setAPNSDeviceToken(token: string): void;
110
+ /** Register the FCM token. Android only — no-op on iOS. */
111
+ static saveNotificationToken(token: string): void;
112
+ /** Forward an incoming push notification to the SDK. */
113
+ static handleNotification(data: {
114
+ [key: string]: unknown;
115
+ }): void;
116
+ /** Returns true if the given push payload originated from Kindly. */
117
+ static isKindlyNotification(data: {
118
+ [key: string]: unknown;
119
+ }): boolean;
120
+ /** Trigger a specific dialogue by id. The SDK must be connected. */
121
+ static triggerDialogue(dialogueId: string): void;
122
+ /** Clear any pending trigger-dialogue request (Android only). */
123
+ static clearTriggerDialogue(): void;
124
+ /** Handle a Kindly deep-link URL (e.g. `kindly://chat/dialogue/{id}`). */
125
+ static handleUrl(url: string): Promise<boolean>;
126
+ /** Initiate a handover to a human agent. */
127
+ static callHandover(callback: HandoverCallback): void;
128
+ /** Whether the chat UI is currently displayed (iOS only — Android always false). */
129
+ static isChatDisplayed(): Promise<boolean>;
130
+ /** Toggle verbose SDK logging. */
131
+ static setVerboseLogging(enabled: boolean): void;
132
+ /** Toggle Sentry crash reporting from inside the SDK. */
133
+ static setCrashReporting(enabled: boolean): void;
134
+ /**
135
+ * Register host-app callbacks for chat-button presses, link interception,
136
+ * and notification interception. Mirrors the native delegate protocols.
137
+ *
138
+ * `shouldHandleLink` / `shouldHandleNotification` have a 5-second native
139
+ * timeout — return quickly. After timeout the SDK falls back to its
140
+ * default `true` so the UI doesn't hang on a slow JS callback.
141
+ */
142
+ static setDelegate(args: {
143
+ onButtonPressed?: KindlyButtonPressedCallback;
144
+ shouldHandleLink?: KindlyLinkInterceptCallback;
145
+ shouldHandleNotification?: KindlyNotificationInterceptCallback;
146
+ }): void;
147
+ /** Clear all delegate callbacks set via setDelegate. */
148
+ static clearDelegate(): void;
149
+ }
150
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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,qEAAqE;AACrE,MAAM,WAAW,WAAW;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAA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;IACpE,MAAM,CAAC,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAIhD,iEAAiE;IACjE,MAAM,CAAC,oBAAoB,IAAI,IAAI;IAInC,0EAA0E;IAC1E,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI/C,4CAA4C;IAC5C,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAMrD,oFAAoF;IACpF,MAAM,CAAC,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC;IAI1C,kCAAkC;IAClC,MAAM,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAIhD,yDAAyD;IACzD,MAAM,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAIhD;;;;;;;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 ADDED
@@ -0,0 +1,121 @@
1
+ {
2
+ "name": "@kindly-ai/react-native",
3
+ "version": "0.1.0",
4
+ "description": "Kindly chat SDK for React Native",
5
+ "main": "./lib/module/index.js",
6
+ "types": "./lib/typescript/src/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "source": "./src/index.tsx",
10
+ "types": "./lib/typescript/src/index.d.ts",
11
+ "default": "./lib/module/index.js"
12
+ },
13
+ "./package.json": "./package.json"
14
+ },
15
+ "files": [
16
+ "src",
17
+ "lib",
18
+ "android",
19
+ "ios",
20
+ "cpp",
21
+ "*.podspec",
22
+ "react-native.config.js",
23
+ "!ios/build",
24
+ "!android/build",
25
+ "!android/gradle",
26
+ "!android/gradlew",
27
+ "!android/gradlew.bat",
28
+ "!android/local.properties",
29
+ "!**/__tests__",
30
+ "!**/__fixtures__",
31
+ "!**/__mocks__",
32
+ "!**/.*"
33
+ ],
34
+ "scripts": {
35
+ "example": "yarn workspace @kindly-ai/react-native-example",
36
+ "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
37
+ "prepare": "bob build",
38
+ "typecheck": "tsc",
39
+ "test": "jest"
40
+ },
41
+ "keywords": [
42
+ "react-native",
43
+ "ios",
44
+ "android"
45
+ ],
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "git+https://github.com/AlexyIbrahim/sdk-chat-react-native-sources.git"
49
+ },
50
+ "author": "Alexy <alexy.ib@gmail.com> (https://github.com/AlexyIbrahim)",
51
+ "license": "MIT",
52
+ "bugs": {
53
+ "url": "https://github.com/AlexyIbrahim/sdk-chat-react-native-sources/issues"
54
+ },
55
+ "homepage": "https://github.com/AlexyIbrahim/sdk-chat-react-native-sources#readme",
56
+ "publishConfig": {
57
+ "registry": "https://registry.npmjs.org/"
58
+ },
59
+ "devDependencies": {
60
+ "@jest/globals": "^30.0.0",
61
+ "@react-native/babel-preset": "0.85.0",
62
+ "@react-native/jest-preset": "0.85.0",
63
+ "@types/react": "^19.2.0",
64
+ "del-cli": "^7.0.0",
65
+ "jest": "^30.3.0",
66
+ "react": "19.2.3",
67
+ "react-native": "0.85.0",
68
+ "react-native-builder-bob": "^0.41.0",
69
+ "turbo": "^2.8.21",
70
+ "typescript": "^6.0.2"
71
+ },
72
+ "peerDependencies": {
73
+ "react": "*",
74
+ "react-native": "*"
75
+ },
76
+ "workspaces": [
77
+ "example"
78
+ ],
79
+ "packageManager": "yarn@4.11.0",
80
+ "react-native-builder-bob": {
81
+ "source": "src",
82
+ "output": "lib",
83
+ "targets": [
84
+ [
85
+ "module",
86
+ {
87
+ "esm": true
88
+ }
89
+ ],
90
+ [
91
+ "typescript",
92
+ {
93
+ "project": "tsconfig.build.json"
94
+ }
95
+ ]
96
+ ]
97
+ },
98
+ "codegenConfig": {
99
+ "name": "KindlyReactNativeSpec",
100
+ "type": "modules",
101
+ "jsSrcsDir": "src",
102
+ "android": {
103
+ "javaPackageName": "com.kindlyai.reactnative"
104
+ }
105
+ },
106
+ "jest": {
107
+ "preset": "@react-native/jest-preset",
108
+ "modulePathIgnorePatterns": [
109
+ "<rootDir>/example/node_modules",
110
+ "<rootDir>/lib/"
111
+ ]
112
+ },
113
+ "create-react-native-library": {
114
+ "type": "turbo-module",
115
+ "languages": "kotlin-objc",
116
+ "tools": [
117
+ "jest"
118
+ ],
119
+ "version": "0.62.0"
120
+ }
121
+ }