@developer_tribe/react-native-comnyx 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Comnyx.podspec +10 -2
- package/README.md +50 -0
- package/android/build.gradle +1 -0
- package/android/consumer-rules.pro +23 -0
- package/android/generated/java/com/comnyx/NativeComnyxSpec.java +46 -0
- package/android/generated/jni/RNComnyxSpec-generated.cpp +23 -1
- package/android/generated/jni/RNComnyxSpec.h +7 -0
- package/android/generated/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI-generated.cpp +21 -0
- package/android/generated/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI.h +70 -0
- package/android/src/main/AndroidManifest.xml +11 -1
- package/android/src/main/AndroidManifestNew.xml +11 -1
- package/android/src/main/java/com/comnyx/ComnyxMediaPickerModule.kt +91 -51
- package/android/src/main/java/com/comnyx/ComnyxModule.kt +7 -0
- package/android/src/main/java/com/comnyx/src/messaging/firebase/FirebaseMessagingService.kt +4 -6
- package/android/src/main/res/xml/comnyx_file_paths.xml +12 -0
- package/ios/APNService.swift +9 -9
- package/ios/Comnyx.swift +17 -8
- package/ios/ComnyxMediaPicker.swift +47 -26
- package/ios/ComnyxMessaging.swift +2 -0
- package/ios/PrivacyInfo.xcprivacy +32 -0
- package/ios/comnyx_post_install.rb +25 -0
- package/ios/generated/RCTAppDependencyProvider.h +25 -0
- package/ios/generated/RCTAppDependencyProvider.mm +55 -0
- package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
- package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
- package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
- package/ios/generated/RCTThirdPartyComponentsProvider.mm +23 -0
- package/ios/generated/RNComnyxSpec/RNComnyxSpec-generated.mm +53 -0
- package/ios/generated/RNComnyxSpec/RNComnyxSpec.h +67 -0
- package/ios/generated/RNComnyxSpecJSI-generated.cpp +38 -0
- package/ios/generated/RNComnyxSpecJSI.h +89 -0
- package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
- package/lib/commonjs/NativeComnyxMediaPicker.js +19 -0
- package/lib/commonjs/NativeComnyxMediaPicker.js.map +1 -1
- package/lib/commonjs/api/conversations.js +6 -6
- package/lib/commonjs/api/conversations.js.map +1 -1
- package/lib/commonjs/api/customers.js +3 -2
- package/lib/commonjs/api/customers.js.map +1 -1
- package/lib/commonjs/api/media.js +20 -6
- package/lib/commonjs/api/media.js.map +1 -1
- package/lib/commonjs/api/messages.js +3 -2
- package/lib/commonjs/api/messages.js.map +1 -1
- package/lib/commonjs/components/ChatList.js +93 -45
- package/lib/commonjs/components/ChatList.js.map +1 -1
- package/lib/commonjs/components/ComnyxErrorBoundary.js +92 -0
- package/lib/commonjs/components/ComnyxErrorBoundary.js.map +1 -0
- package/lib/commonjs/components/CustomerForm.js +2 -2
- package/lib/commonjs/components/CustomerForm.js.map +1 -1
- package/lib/commonjs/components/MediaMessageItem.js +4 -3
- package/lib/commonjs/components/MediaMessageItem.js.map +1 -1
- package/lib/commonjs/components/MessageInput.js +63 -13
- package/lib/commonjs/components/MessageInput.js.map +1 -1
- package/lib/commonjs/components/MessageItem.js +1 -1
- package/lib/commonjs/components/MessageItem.js.map +1 -1
- package/lib/commonjs/hooks/usePolling.js +25 -21
- package/lib/commonjs/hooks/usePolling.js.map +1 -1
- package/lib/commonjs/hooks/useThemeColors.js +12 -1
- package/lib/commonjs/hooks/useThemeColors.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/notifications/initializeNotifications.js +19 -16
- package/lib/commonjs/notifications/initializeNotifications.js.map +1 -1
- package/lib/commonjs/register/Accumulator.js +19 -6
- package/lib/commonjs/register/Accumulator.js.map +1 -1
- package/lib/commonjs/register/collectData.js +1 -1
- package/lib/commonjs/register/collectData.js.map +1 -1
- package/lib/commonjs/store/store.js +6 -0
- package/lib/commonjs/store/store.js.map +1 -1
- package/lib/commonjs/support/ComnyxSupport.js +60 -15
- package/lib/commonjs/support/ComnyxSupport.js.map +1 -1
- package/lib/commonjs/support/SupportConfigContext.js +24 -0
- package/lib/commonjs/support/SupportConfigContext.js.map +1 -0
- package/lib/commonjs/types/Theme.js +30 -2
- package/lib/commonjs/types/Theme.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/NativeComnyxMediaPicker.js +18 -0
- package/lib/module/NativeComnyxMediaPicker.js.map +1 -1
- package/lib/module/api/conversations.js +6 -6
- package/lib/module/api/conversations.js.map +1 -1
- package/lib/module/api/customers.js +3 -2
- package/lib/module/api/customers.js.map +1 -1
- package/lib/module/api/media.js +21 -6
- package/lib/module/api/media.js.map +1 -1
- package/lib/module/api/messages.js +3 -2
- package/lib/module/api/messages.js.map +1 -1
- package/lib/module/components/ChatList.js +94 -46
- package/lib/module/components/ChatList.js.map +1 -1
- package/lib/module/components/ComnyxErrorBoundary.js +87 -0
- package/lib/module/components/ComnyxErrorBoundary.js.map +1 -0
- package/lib/module/components/CustomerForm.js +2 -2
- package/lib/module/components/CustomerForm.js.map +1 -1
- package/lib/module/components/MediaMessageItem.js +4 -3
- package/lib/module/components/MediaMessageItem.js.map +1 -1
- package/lib/module/components/MessageInput.js +64 -14
- package/lib/module/components/MessageInput.js.map +1 -1
- package/lib/module/components/MessageItem.js +1 -1
- package/lib/module/components/MessageItem.js.map +1 -1
- package/lib/module/hooks/usePolling.js +25 -21
- package/lib/module/hooks/usePolling.js.map +1 -1
- package/lib/module/hooks/useThemeColors.js +13 -2
- package/lib/module/hooks/useThemeColors.js.map +1 -1
- package/lib/module/index.js +0 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/notifications/initializeNotifications.js +19 -16
- package/lib/module/notifications/initializeNotifications.js.map +1 -1
- package/lib/module/register/Accumulator.js +19 -6
- package/lib/module/register/Accumulator.js.map +1 -1
- package/lib/module/register/collectData.js +1 -1
- package/lib/module/register/collectData.js.map +1 -1
- package/lib/module/store/store.js +6 -0
- package/lib/module/store/store.js.map +1 -1
- package/lib/module/support/ComnyxSupport.js +61 -16
- package/lib/module/support/ComnyxSupport.js.map +1 -1
- package/lib/module/support/SupportConfigContext.js +19 -0
- package/lib/module/support/SupportConfigContext.js.map +1 -0
- package/lib/module/types/Theme.js +30 -2
- package/lib/module/types/Theme.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/src/NativeComnyxMediaPicker.d.ts +9 -0
- package/lib/typescript/src/NativeComnyxMediaPicker.d.ts.map +1 -1
- package/lib/typescript/src/api/conversations.d.ts +2 -2
- package/lib/typescript/src/api/conversations.d.ts.map +1 -1
- package/lib/typescript/src/api/customers.d.ts +1 -1
- package/lib/typescript/src/api/customers.d.ts.map +1 -1
- package/lib/typescript/src/api/media.d.ts +3 -3
- package/lib/typescript/src/api/media.d.ts.map +1 -1
- package/lib/typescript/src/api/messages.d.ts +1 -1
- package/lib/typescript/src/api/messages.d.ts.map +1 -1
- package/lib/typescript/src/components/ChatList.d.ts.map +1 -1
- package/lib/typescript/src/components/ComnyxErrorBoundary.d.ts +18 -0
- package/lib/typescript/src/components/ComnyxErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/src/components/MediaMessageItem.d.ts.map +1 -1
- package/lib/typescript/src/components/MessageInput.d.ts.map +1 -1
- package/lib/typescript/src/components/MessageItem.d.ts.map +1 -1
- package/lib/typescript/src/hooks/usePolling.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useThemeColors.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/notifications/initializeNotifications.d.ts.map +1 -1
- package/lib/typescript/src/register/Accumulator.d.ts.map +1 -1
- package/lib/typescript/src/register/collectData.d.ts +4 -1
- package/lib/typescript/src/register/collectData.d.ts.map +1 -1
- package/lib/typescript/src/store/store.d.ts +6 -2
- package/lib/typescript/src/store/store.d.ts.map +1 -1
- package/lib/typescript/src/support/ComnyxSupport.d.ts +56 -2
- package/lib/typescript/src/support/ComnyxSupport.d.ts.map +1 -1
- package/lib/typescript/src/support/SupportConfigContext.d.ts +58 -0
- package/lib/typescript/src/support/SupportConfigContext.d.ts.map +1 -0
- package/lib/typescript/src/support/index.d.ts +1 -0
- package/lib/typescript/src/support/index.d.ts.map +1 -1
- package/lib/typescript/src/types/Conversation.d.ts +2 -2
- package/lib/typescript/src/types/Conversation.d.ts.map +1 -1
- package/lib/typescript/src/types/Customer.d.ts +1 -1
- package/lib/typescript/src/types/Customer.d.ts.map +1 -1
- package/lib/typescript/src/types/MessageResponse.d.ts +7 -4
- package/lib/typescript/src/types/MessageResponse.d.ts.map +1 -1
- package/lib/typescript/src/types/Theme.d.ts +26 -0
- package/lib/typescript/src/types/Theme.d.ts.map +1 -1
- package/lib/typescript/src/version.d.ts +1 -1
- package/package.json +12 -25
- package/src/NativeComnyxMediaPicker.ts +18 -0
- package/src/api/conversations.ts +6 -4
- package/src/api/customers.ts +3 -1
- package/src/api/media.ts +32 -10
- package/src/api/messages.ts +3 -1
- package/src/components/ChatList.tsx +115 -55
- package/src/components/ComnyxErrorBoundary.tsx +91 -0
- package/src/components/CustomerForm.tsx +2 -2
- package/src/components/MediaMessageItem.tsx +10 -3
- package/src/components/MessageInput.tsx +89 -16
- package/src/components/MessageItem.tsx +12 -13
- package/src/hooks/usePolling.ts +21 -11
- package/src/hooks/useThemeColors.ts +11 -2
- package/src/index.ts +12 -0
- package/src/notifications/initializeNotifications.ts +22 -20
- package/src/register/Accumulator.ts +26 -9
- package/src/register/collectData.ts +10 -2
- package/src/store/store.ts +11 -3
- package/src/support/ComnyxSupport.tsx +128 -22
- package/src/support/SupportConfigContext.tsx +79 -0
- package/src/support/index.ts +7 -0
- package/src/types/Conversation.ts +2 -2
- package/src/types/Customer.ts +1 -2
- package/src/types/MessageResponse.ts +4 -4
- package/src/types/Theme.ts +38 -0
- package/src/version.ts +1 -1
|
@@ -17,7 +17,11 @@ export class Accumulator {
|
|
|
17
17
|
}
|
|
18
18
|
add(data) {
|
|
19
19
|
if (!this.registerData) {
|
|
20
|
-
|
|
20
|
+
// Late events (push token callbacks, AppState changes) may arrive
|
|
21
|
+
// after logout() or before login(). Ignore silently instead of
|
|
22
|
+
// throwing so the host app is not crashed by SDK-internal races.
|
|
23
|
+
console.warn('[Comnyx] add() called before register/after logout — ignored');
|
|
24
|
+
return;
|
|
21
25
|
}
|
|
22
26
|
|
|
23
27
|
// First, create a map of existing custom parameters by name
|
|
@@ -51,10 +55,17 @@ export class Accumulator {
|
|
|
51
55
|
}
|
|
52
56
|
async flush() {
|
|
53
57
|
if (!this.registerData) {
|
|
54
|
-
|
|
58
|
+
console.warn('[Comnyx] flush() called before register/after logout — ignored');
|
|
59
|
+
return;
|
|
55
60
|
}
|
|
56
61
|
if (this.listener) {
|
|
57
|
-
|
|
62
|
+
try {
|
|
63
|
+
await this.listener(this.registerData);
|
|
64
|
+
} catch (err) {
|
|
65
|
+
console.error('[Comnyx] flush listener error', err);
|
|
66
|
+
this.reset();
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
58
69
|
this.registerData = {
|
|
59
70
|
...this.registerData,
|
|
60
71
|
customParameters: []
|
|
@@ -65,12 +76,14 @@ export class Accumulator {
|
|
|
65
76
|
}
|
|
66
77
|
debounce() {
|
|
67
78
|
if (!this.registerData) {
|
|
68
|
-
|
|
79
|
+
return;
|
|
69
80
|
}
|
|
70
81
|
this.reset();
|
|
71
82
|
this.__select_time = setTimeout(() => {
|
|
72
|
-
if (this.listener) {
|
|
73
|
-
this.listener(this.registerData)
|
|
83
|
+
if (this.listener && this.registerData) {
|
|
84
|
+
Promise.resolve(this.listener(this.registerData)).catch(err => {
|
|
85
|
+
console.error('[Comnyx] debounce listener error', err);
|
|
86
|
+
});
|
|
74
87
|
this.registerData = {
|
|
75
88
|
...this.registerData,
|
|
76
89
|
customParameters: []
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ACCUMULATOR_DEBOUNCE_TIME_IN_MS","Accumulator","registerData","__select_time","undefined","listener","_isListenerCalledOnce","constructor","register","customParameters","integrationParameters","debounce","add","data","
|
|
1
|
+
{"version":3,"names":["ACCUMULATOR_DEBOUNCE_TIME_IN_MS","Accumulator","registerData","__select_time","undefined","listener","_isListenerCalledOnce","constructor","register","customParameters","integrationParameters","debounce","add","data","console","warn","customParamsMap","Map","forEach","param","set","name","value","mergedCustomParameters","Array","from","entries","map","flush","err","error","reset","setTimeout","Promise","resolve","catch","clearTimeout","clear","empty","get","isListenerCalledOnce","accumulator"],"sourceRoot":"../../../src","sources":["register/Accumulator.ts"],"mappings":";;AAEA,MAAMA,+BAA+B,GAAG,IAAI;AAE5C,OAAO,MAAMC,WAAW,CAAC;EACfC,YAAY,GAAiC,IAAI;EACjDC,aAAa,GAA8CC,SAAS;EACpEC,QAAQ,GACd,IAAI;EACEC,qBAAqB,GAAY,KAAK;EAC9CC,WAAWA,CAAA,EAAG,CAAC;EAEfC,QAAQA,CAACH,QAAwD,EAAE;IACjE,IAAI,CAACH,YAAY,GAAG;MAClBO,gBAAgB,EAAE,EAAE;MACpBC,qBAAqB,EAAE,CAAC;IAC1B,CAAC;IACD,IAAI,CAACL,QAAQ,GAAGA,QAAQ;IACxB,IAAI,CAACM,QAAQ,CAAC,CAAC;EACjB;EAEAC,GAAGA,CAACC,IAAwD,EAAE;IAC5D,IAAI,CAAC,IAAI,CAACX,YAAY,EAAE;MACtB;MACA;MACA;MACAY,OAAO,CAACC,IAAI,CACV,8DACF,CAAC;MACD;IACF;;IAEA;IACA,MAAMC,eAAe,GAAG,IAAIC,GAAG,CAAmC,CAAC;;IAEnE;IACA,CAAC,IAAI,CAACf,YAAY,CAACO,gBAAgB,IAAI,EAAE,EAAES,OAAO,CAAEC,KAAK,IAAK;MAC5DH,eAAe,CAACI,GAAG,CAACD,KAAK,CAACE,IAAI,EAAEF,KAAK,CAACG,KAAK,CAAC;IAC9C,CAAC,CAAC;;IAEF;IACA,CAACT,IAAI,CAACJ,gBAAgB,IAAI,EAAE,EAA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ator","collectData","key","value","add","customParameters","name","registerOneSignalForComnyx","external_id","integrationParameters","onesignal"],"sourceRoot":"../../../src","sources":["register/collectData.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["accumulator","collectData","key","value","add","customParameters","name","registerOneSignalForComnyx","external_id","integrationParameters","onesignal"],"sourceRoot":"../../../src","sources":["register/collectData.ts"],"mappings":";;AACA,SAASA,WAAW,QAAQ,kBAAe;AAM3C,OAAO,SAASC,WAAWA,CACzBC,GAA4D,EAC5DC,KAAgC,EAChC;EACA,IAAI,OAAOD,GAAG,KAAK,QAAQ,EAAE;IAC3BF,WAAW,CAACI,GAAG,CAAC;MACdC,gBAAgB,EAAE,CAChB;QACEC,IAAI,EAAEJ,GAAG;QACTC,KAAK,EAAEA,KAAK,IAAI;MAClB,CAAC;IAEL,CAAC,CAAC;EACJ,CAAC,MAAM;IACLH,WAAW,CAACI,GAAG,CAACF,GAAG,CAAC;EACtB;AACF;;AAEA;AACA,OAAO,SAASK,0BAA0BA,CAACC,WAAmB,EAAE;EAC9DR,WAAW,CAACI,GAAG,CAAC;IACdK,qBAAqB,EAAE;MACrBC,SAAS,EAAE;QACTF;MACF;IACF;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -14,6 +14,7 @@ export const storeCreator = (set, get) => ({
|
|
|
14
14
|
theme: 'light',
|
|
15
15
|
fake: false,
|
|
16
16
|
themes: {},
|
|
17
|
+
themeOverride: {},
|
|
17
18
|
firstMessage: null,
|
|
18
19
|
formSubmitted: false,
|
|
19
20
|
setData: cb => {
|
|
@@ -53,6 +54,11 @@ export const storeCreator = (set, get) => ({
|
|
|
53
54
|
themes
|
|
54
55
|
});
|
|
55
56
|
},
|
|
57
|
+
setThemeOverride: themeOverride => {
|
|
58
|
+
set({
|
|
59
|
+
themeOverride
|
|
60
|
+
});
|
|
61
|
+
},
|
|
56
62
|
updateBaseDimensions: ({
|
|
57
63
|
baseWidth,
|
|
58
64
|
baseHeight
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createJSONStorage","persist","shallow","createWithEqualityFn","mmkvStorage","storeCreator","set","get","baseWidth","baseHeight","initialized","customer","data","language","theme","fake","themes","firstMessage","formSubmitted","setData","cb","newData","setFirstMessage","message","setCustomer","createCustomerResponse","name","setLanguage","setTheme","setFake","setThemes","updateBaseDimensions","setForm","form","permissionGiven","setPermissionGiven","notificationInitialized","setNotificationInitialized","toastMessage","setToastMessage","token","setToken","registered","setRegistered","useAppStore","storage","skipHydration","partialize","state"],"sourceRoot":"../../../src","sources":["store/store.ts"],"mappings":";;AAAA,SAASA,iBAAiB,EAAEC,OAAO,QAAQ,oBAAoB;AAC/D,SAASC,OAAO,QAAQ,iBAAiB;AACzC,SAASC,oBAAoB,QAAQ,qBAAqB;
|
|
1
|
+
{"version":3,"names":["createJSONStorage","persist","shallow","createWithEqualityFn","mmkvStorage","storeCreator","set","get","baseWidth","baseHeight","initialized","customer","data","language","theme","fake","themes","themeOverride","firstMessage","formSubmitted","setData","cb","newData","setFirstMessage","message","setCustomer","createCustomerResponse","name","setLanguage","setTheme","setFake","setThemes","setThemeOverride","updateBaseDimensions","setForm","form","permissionGiven","setPermissionGiven","notificationInitialized","setNotificationInitialized","toastMessage","setToastMessage","token","setToken","registered","setRegistered","useAppStore","storage","skipHydration","partialize","state"],"sourceRoot":"../../../src","sources":["store/store.ts"],"mappings":";;AAAA,SAASA,iBAAiB,EAAEC,OAAO,QAAQ,oBAAoB;AAC/D,SAASC,OAAO,QAAQ,iBAAiB;AACzC,SAASC,oBAAoB,QAAQ,qBAAqB;AAQ1D,SAASC,WAAW,QAAQ,yBAAsB;AA2ClD,OAAO,MAAMC,YAAyC,GAAGA,CAACC,GAAG,EAAEC,GAAG,MAAM;EACtEC,SAAS,EAAE,GAAG;EACdC,UAAU,EAAE,GAAG;EACfC,WAAW,EAAE,KAAK;EAClBC,QAAQ,EAAE,IAAI;EACdC,IAAI,EAAE,IAAI;EACVC,QAAQ,EAAE,IAAI;EAC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
|
4
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
4
5
|
import { ChatList } from "../components/ChatList.js";
|
|
5
6
|
import { CustomerForm } from "../components/CustomerForm.js";
|
|
6
|
-
import { useEffect, useState } from 'react';
|
|
7
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
7
8
|
import { AppText } from "../components/AppText.js";
|
|
8
9
|
import { useThemeColors } from "../hooks/useThemeColors.js";
|
|
9
10
|
import { usePolling } from "../hooks/usePolling.js";
|
|
10
11
|
import { useAppStore } from "../store/store.js";
|
|
11
12
|
import { ScaledSheet } from "../components/ScaledSheet.js";
|
|
12
13
|
import { accumulator } from "../register/Accumulator.js";
|
|
14
|
+
import { SupportConfigProvider } from "./SupportConfigContext.js";
|
|
15
|
+
import { ComnyxErrorBoundary } from "../components/ComnyxErrorBoundary.js";
|
|
13
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
17
|
const closeIcon = require('../assets/x-close.png');
|
|
15
|
-
|
|
18
|
+
function ComnyxSupportInner({
|
|
16
19
|
language = 'en',
|
|
17
20
|
theme = 'dark',
|
|
18
21
|
fake = false,
|
|
19
22
|
onBack,
|
|
20
23
|
themes,
|
|
21
|
-
|
|
24
|
+
themeOverride,
|
|
25
|
+
containerStyle,
|
|
26
|
+
renderHeader,
|
|
27
|
+
renderEmptyState,
|
|
28
|
+
renderErrorState,
|
|
29
|
+
renderMessage,
|
|
30
|
+
onBeforeSend
|
|
22
31
|
}) {
|
|
23
32
|
const {
|
|
24
33
|
customer,
|
|
@@ -29,13 +38,24 @@ export function ComnyxSupport({
|
|
|
29
38
|
}));
|
|
30
39
|
const [initLoading, setInitLoading] = useState(true);
|
|
31
40
|
const themeColors = useThemeColors();
|
|
41
|
+
const insets = useSafeAreaInsets();
|
|
32
42
|
usePolling();
|
|
43
|
+
const supportConfig = useMemo(() => ({
|
|
44
|
+
renderHeader,
|
|
45
|
+
renderEmptyState,
|
|
46
|
+
renderErrorState,
|
|
47
|
+
renderMessage,
|
|
48
|
+
onBeforeSend
|
|
49
|
+
}), [renderHeader, renderEmptyState, renderErrorState, renderMessage, onBeforeSend]);
|
|
33
50
|
useEffect(() => {
|
|
34
51
|
if (!accumulator.isListenerCalledOnce()) {
|
|
35
52
|
accumulator.flush().then(() => {
|
|
36
53
|
setTimeout(() => {
|
|
37
54
|
setInitLoading(false);
|
|
38
55
|
}, 100);
|
|
56
|
+
}).catch(err => {
|
|
57
|
+
console.error('[Comnyx] accumulator.flush failed', err);
|
|
58
|
+
setInitLoading(false);
|
|
39
59
|
});
|
|
40
60
|
} else {
|
|
41
61
|
setInitLoading(false);
|
|
@@ -49,24 +69,37 @@ export function ComnyxSupport({
|
|
|
49
69
|
}
|
|
50
70
|
}, [customer, customer?.external_id]);
|
|
51
71
|
useEffect(() => {
|
|
52
|
-
//TOOD: getState().initApp({language,theme,fake,rtlFix,themes})
|
|
53
72
|
useAppStore.getState().setLanguage(language);
|
|
54
73
|
useAppStore.getState().setTheme(theme);
|
|
55
74
|
useAppStore.getState().setFake(fake);
|
|
56
75
|
if (themes) {
|
|
57
76
|
useAppStore.getState().setThemes(themes);
|
|
58
77
|
}
|
|
59
|
-
|
|
78
|
+
if (themeOverride) {
|
|
79
|
+
useAppStore.getState().setThemeOverride(themeOverride);
|
|
80
|
+
}
|
|
81
|
+
}, [language, theme, fake, themes, themeOverride]);
|
|
82
|
+
let body;
|
|
60
83
|
if (!customer) {
|
|
61
84
|
//NOTE: customer yoksa register hiç çalışmamış
|
|
62
|
-
|
|
85
|
+
body = /*#__PURE__*/_jsxs(View, {
|
|
63
86
|
style: [styles.container, {
|
|
64
87
|
backgroundColor: themeColors.background
|
|
65
88
|
}],
|
|
66
89
|
children: [/*#__PURE__*/_jsx(TouchableOpacity, {
|
|
67
90
|
activeOpacity: 1,
|
|
68
|
-
style: [styles.iconContainer
|
|
91
|
+
style: [styles.iconContainer, {
|
|
92
|
+
top: Math.max(insets.top, 16) + 16
|
|
93
|
+
}],
|
|
69
94
|
onPress: onBack,
|
|
95
|
+
accessibilityRole: "button",
|
|
96
|
+
accessibilityLabel: "Close support",
|
|
97
|
+
hitSlop: {
|
|
98
|
+
top: 12,
|
|
99
|
+
bottom: 12,
|
|
100
|
+
left: 12,
|
|
101
|
+
right: 12
|
|
102
|
+
},
|
|
70
103
|
children: /*#__PURE__*/_jsx(Image, {
|
|
71
104
|
source: closeIcon,
|
|
72
105
|
style: [styles.closeIcon, {
|
|
@@ -82,19 +115,32 @@ export function ComnyxSupport({
|
|
|
82
115
|
});
|
|
83
116
|
} else if (!formSubmitted) {
|
|
84
117
|
//NOTE: customer var ama forSubmitted false (name===null)
|
|
85
|
-
|
|
118
|
+
body = /*#__PURE__*/_jsx(CustomerForm, {
|
|
86
119
|
loading: initLoading,
|
|
87
120
|
onBack: onBack,
|
|
88
121
|
containerStyle: containerStyle
|
|
89
122
|
});
|
|
123
|
+
} else {
|
|
124
|
+
body = /*#__PURE__*/_jsx(View, {
|
|
125
|
+
style: [styles.container, {
|
|
126
|
+
backgroundColor: themeColors.background
|
|
127
|
+
}, containerStyle],
|
|
128
|
+
children: /*#__PURE__*/_jsx(ChatList, {
|
|
129
|
+
initLoading: initLoading,
|
|
130
|
+
onBack: onBack
|
|
131
|
+
})
|
|
132
|
+
});
|
|
90
133
|
}
|
|
91
|
-
return /*#__PURE__*/_jsx(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
134
|
+
return /*#__PURE__*/_jsx(SupportConfigProvider, {
|
|
135
|
+
value: supportConfig,
|
|
136
|
+
children: body
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
export function ComnyxSupport(props) {
|
|
140
|
+
return /*#__PURE__*/_jsx(ComnyxErrorBoundary, {
|
|
141
|
+
onBack: props.onBack,
|
|
142
|
+
children: /*#__PURE__*/_jsx(ComnyxSupportInner, {
|
|
143
|
+
...props
|
|
98
144
|
})
|
|
99
145
|
});
|
|
100
146
|
}
|
|
@@ -105,7 +151,6 @@ const styles = ScaledSheet.create({
|
|
|
105
151
|
},
|
|
106
152
|
iconContainer: {
|
|
107
153
|
position: 'absolute',
|
|
108
|
-
top: '60@vs',
|
|
109
154
|
left: '24@s'
|
|
110
155
|
},
|
|
111
156
|
closeIcon: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","TouchableOpacity","Image","ChatList","CustomerForm","useEffect","useState","AppText","useThemeColors","usePolling","useAppStore","ScaledSheet","accumulator","jsx","_jsx","jsxs","_jsxs","closeIcon","require","
|
|
1
|
+
{"version":3,"names":["View","TouchableOpacity","Image","useSafeAreaInsets","ChatList","CustomerForm","useEffect","useMemo","useState","AppText","useThemeColors","usePolling","useAppStore","ScaledSheet","accumulator","SupportConfigProvider","ComnyxErrorBoundary","jsx","_jsx","jsxs","_jsxs","closeIcon","require","ComnyxSupportInner","language","theme","fake","onBack","themes","themeOverride","containerStyle","renderHeader","renderEmptyState","renderErrorState","renderMessage","onBeforeSend","customer","formSubmitted","s","initLoading","setInitLoading","themeColors","insets","supportConfig","isListenerCalledOnce","flush","then","setTimeout","catch","err","console","error","external_id","setState","data","getState","setLanguage","setTheme","setFake","setThemes","setThemeOverride","body","style","styles","container","backgroundColor","background","children","activeOpacity","iconContainer","top","Math","max","onPress","accessibilityRole","accessibilityLabel","hitSlop","bottom","left","right","source","tintColor","text","textAlign","localization","loading","value","ComnyxSupport","props","create","flex","justifyContent","position","width","height"],"sourceRoot":"../../../src","sources":["support/ComnyxSupport.tsx"],"mappings":";;AAAA,SACEA,IAAI,EACJC,gBAAgB,EAChBC,KAAK,QAGA,cAAc;AACrB,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAASC,QAAQ,QAAQ,2BAAwB;AACjD,SAASC,YAAY,QAAQ,+BAA4B;AAIzD,SAASC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAA2B,OAAO;AACvE,SAASC,OAAO,QAAQ,0BAAuB;AAC/C,SAAS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C,SAAS,EAChB;QAAEC,eAAe,EAAExB,WAAW,CAACyB;MAAW,CAAC,EAC3CpC,cAAc,CACd;MAAAqC,QAAA,eAEFjD,IAAA,CAACd,QAAQ;QAACmC,WAAW,EAAEA,WAAY;QAACZ,MAAM,EAAEA;MAAO,CAAE;IAAC,CAClD,CACP;EACH;EAEA,oBACET,IAAA,CAACH,qBAAqB;IAACuE,KAAK,EAAE3C,aAAc;IAAAwB,QAAA,EAAEN;EAAI,CAAwB,CAAC;AAE/E;AAEA,OAAO,SAAS0B,aAAaA,CAACC,KAAyB,EAAE;EACvD,oBACEtE,IAAA,CAACF,mBAAmB;IAACW,MAAM,EAAE6D,KAAK,CAAC7D,MAAO;IAAAwC,QAAA,eACxCjD,IAAA,CAACK,kBAAkB;MAAA,GAAKiE;IAAK,CAAG;EAAC,CACd,CAAC;AAE1B;AAEA,MAAMzB,MAAM,GAAGlD,WAAW,CAAC4E,MAAM,CAAC;EAChCzB,SAAS,EAAE;IACT0B,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE;EAClB,CAAC;EACDtB,aAAa,EAAE;IACbuB,QAAQ,EAAE,UAAU;IACpBd,IAAI,EAAE;EACR,CAAC;EACDzD,SAAS,EAAE;IACTwE,KAAK,EAAE,OAAO;IACdC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createContext, useContext } from 'react';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
const EMPTY_CONFIG = {};
|
|
6
|
+
const SupportConfigContext = /*#__PURE__*/createContext(EMPTY_CONFIG);
|
|
7
|
+
export function SupportConfigProvider({
|
|
8
|
+
value,
|
|
9
|
+
children
|
|
10
|
+
}) {
|
|
11
|
+
return /*#__PURE__*/_jsx(SupportConfigContext.Provider, {
|
|
12
|
+
value: value,
|
|
13
|
+
children: children
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export function useSupportConfig() {
|
|
17
|
+
return useContext(SupportConfigContext);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=SupportConfigContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createContext","useContext","jsx","_jsx","EMPTY_CONFIG","SupportConfigContext","SupportConfigProvider","value","children","Provider","useSupportConfig"],"sourceRoot":"../../../src","sources":["support/SupportConfigContext.tsx"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,UAAU,QAAwB,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AA0DlE,MAAMC,YAA2B,GAAG,CAAC,CAAC;AAEtC,MAAMC,oBAAoB,gBAAGL,aAAa,CAAgBI,YAAY,CAAC;AAEvE,OAAO,SAASE,qBAAqBA,CAAC;EACpCC,KAAK;EACLC;AAIF,CAAC,EAAE;EACD,oBACEL,IAAA,CAACE,oBAAoB,CAACI,QAAQ;IAACF,KAAK,EAAEA,KAAM;IAAAC,QAAA,EACzCA;EAAQ,CACoB,CAAC;AAEpC;AAEA,OAAO,SAASE,gBAAgBA,CAAA,EAAkB;EAChD,OAAOT,UAAU,CAACI,oBAAoB,CAAC;AACzC","ignoreList":[]}
|
|
@@ -19,7 +19,12 @@ export const lightTheme = {
|
|
|
19
19
|
ghost: '#EFEFEF',
|
|
20
20
|
navy: '#191A21',
|
|
21
21
|
lavender: '#E0E0E0',
|
|
22
|
-
silver: '#C7C7C7'
|
|
22
|
+
silver: '#C7C7C7',
|
|
23
|
+
link: '#0066CC',
|
|
24
|
+
toastBackground: '#333333',
|
|
25
|
+
toastText: '#FFFFFF',
|
|
26
|
+
playIcon: '#FFFFFF',
|
|
27
|
+
videoPlaceholder: '#1A1A2E'
|
|
23
28
|
};
|
|
24
29
|
export const darkTheme = {
|
|
25
30
|
primary: '#4361EE',
|
|
@@ -40,6 +45,29 @@ export const darkTheme = {
|
|
|
40
45
|
ghost: '#202129',
|
|
41
46
|
navy: '#F5F5F5',
|
|
42
47
|
lavender: '#262730',
|
|
43
|
-
silver: '#44454D'
|
|
48
|
+
silver: '#44454D',
|
|
49
|
+
link: '#4D9FFF',
|
|
50
|
+
toastBackground: '#2A2A2A',
|
|
51
|
+
toastText: '#FFFFFF',
|
|
52
|
+
playIcon: '#FFFFFF',
|
|
53
|
+
videoPlaceholder: '#1A1A2E'
|
|
44
54
|
};
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Partial override for a single theme mode. Consumers can change one or more
|
|
58
|
+
* tokens without redeclaring the whole palette.
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Full override map accepted by `ComnyxSupport.themeOverride`. Any token not
|
|
63
|
+
* provided falls back to the built-in light/dark palette.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* <ComnyxSupport
|
|
67
|
+
* themeOverride={{
|
|
68
|
+
* light: { primary: '#FF6B6B', link: '#FF9999' },
|
|
69
|
+
* dark: { primary: '#FF9999' },
|
|
70
|
+
* }}
|
|
71
|
+
* />
|
|
72
|
+
*/
|
|
45
73
|
//# sourceMappingURL=Theme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["lightTheme","primary","secondary","background","light_text","text","error","success","green","light_green","warning","info","border","dark_background","gainsboro","slate","ghost","navy","lavender","silver","darkTheme"],"sourceRoot":"../../../src","sources":["types/Theme.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["lightTheme","primary","secondary","background","light_text","text","error","success","green","light_green","warning","info","border","dark_background","gainsboro","slate","ghost","navy","lavender","silver","link","toastBackground","toastText","playIcon","videoPlaceholder","darkTheme"],"sourceRoot":"../../../src","sources":["types/Theme.ts"],"mappings":";;AA2BA,OAAO,MAAMA,UAAuB,GAAG;EACrCC,OAAO,EAAE,SAAS;EAClBC,SAAS,EAAE,SAAS;EACpBC,UAAU,EAAE,SAAS;EACrBC,UAAU,EAAE,SAAS;EACrBC,IAAI,EAAE,SAAS;EACfC,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module/version.js
CHANGED
|
@@ -5,5 +5,14 @@ export declare function pickVideo(): Promise<MediaAsset[]>;
|
|
|
5
5
|
export declare function openVideo(uri: string): Promise<void>;
|
|
6
6
|
export declare function generateThumbnail(videoUrl: string): Promise<string | null>;
|
|
7
7
|
export declare function deleteTempFile(uri: string): Promise<void>;
|
|
8
|
+
/**
|
|
9
|
+
* Android only. Converts a local file URI returned by the picker into a
|
|
10
|
+
* `content://` URI served by the Comnyx FileProvider, suitable for crossing
|
|
11
|
+
* process boundaries (e.g. sharing to another app, system ACTION_VIEW).
|
|
12
|
+
*
|
|
13
|
+
* On iOS, returns the input URI unchanged since iOS does not have the
|
|
14
|
+
* FileUriExposedException problem.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getShareableUri(fileUri: string): Promise<string>;
|
|
8
17
|
export declare function cleanupTempFiles(): Promise<void>;
|
|
9
18
|
//# sourceMappingURL=NativeComnyxMediaPicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeComnyxMediaPicker.d.ts","sourceRoot":"","sources":["../../../src/NativeComnyxMediaPicker.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAwBrD,wBAAsB,SAAS,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAOvD;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAOvD;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAOvD;AAED,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAM1D;AAED,wBAAsB,iBAAiB,CACrC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAMxB;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAK/D;AAED,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAKtD"}
|
|
1
|
+
{"version":3,"file":"NativeComnyxMediaPicker.d.ts","sourceRoot":"","sources":["../../../src/NativeComnyxMediaPicker.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAwBrD,wBAAsB,SAAS,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAOvD;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAOvD;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAOvD;AAED,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAM1D;AAED,wBAAsB,iBAAiB,CACrC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAMxB;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAK/D;AAED;;;;;;;GAOG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAQtE;AAED,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAKtD"}
|
|
@@ -2,6 +2,6 @@ import type { ConversationResponse } from '../types/Conversation';
|
|
|
2
2
|
import type { ApiOptions } from '../types/ApiOptions';
|
|
3
3
|
export declare function getCustomerConversation(externalId: string, created_at: Date | undefined, page: number, options: ApiOptions & {
|
|
4
4
|
per_page?: number;
|
|
5
|
-
}): Promise<ConversationResponse>;
|
|
6
|
-
export declare function getNewCustomerConversation(externalId: string, created_at: Date | undefined, options: ApiOptions): Promise<ConversationResponse>;
|
|
5
|
+
}, signal?: AbortSignal): Promise<ConversationResponse>;
|
|
6
|
+
export declare function getNewCustomerConversation(externalId: string, created_at: Date | undefined, options: ApiOptions, signal?: AbortSignal): Promise<ConversationResponse>;
|
|
7
7
|
//# sourceMappingURL=conversations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../../../../src/api/conversations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAUtD,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,IAAI,GAAG,SAAS,EAC5B,IAAI,EAAE,MAAU,EAChB,OAAO,EAAE,UAAU,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../../../../src/api/conversations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAUtD,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,IAAI,GAAG,SAAS,EAC5B,IAAI,EAAE,MAAU,EAChB,OAAO,EAAE,UAAU,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,EAC3C,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,oBAAoB,CAAC,CAiB/B;AAED,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,IAAI,GAAG,SAAS,EAC5B,OAAO,EAAE,UAAU,EACnB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,oBAAoB,CAAC,CAa/B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CreateCustomerRequest, Customer } from '../types/Customer';
|
|
2
|
-
export declare function updateCustomer(customerData: CreateCustomerRequest, externalId?: string): Promise<{
|
|
2
|
+
export declare function updateCustomer(customerData: CreateCustomerRequest, externalId?: string, signal?: AbortSignal): Promise<{
|
|
3
3
|
customer: Customer;
|
|
4
4
|
}>;
|
|
5
5
|
//# sourceMappingURL=customers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customers.d.ts","sourceRoot":"","sources":["../../../../src/api/customers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAIzE,wBAAgB,cAAc,CAC5B,YAAY,EAAE,qBAAqB,EACnC,UAAU,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"customers.d.ts","sourceRoot":"","sources":["../../../../src/api/customers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAIzE,wBAAgB,cAAc,CAC5B,YAAY,EAAE,qBAAqB,EACnC,UAAU,CAAC,EAAE,MAAM,EACnB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC;IAAE,QAAQ,EAAE,QAAQ,CAAA;CAAE,CAAC,CAUjC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { UploadUrlResponse } from '../types/MediaTypes';
|
|
2
2
|
import type { MessageResponse } from '../types/MessageResponse';
|
|
3
3
|
import type { ApiOptions } from '../types/ApiOptions';
|
|
4
|
-
export declare function getUploadUrl(fileName: string, contentType: string, options: ApiOptions): Promise<UploadUrlResponse>;
|
|
5
|
-
export declare function uploadFileToS3(uploadUrl: string, fileUri: string, contentType: string, onProgress?: (percentage: number) => void, options?: ApiOptions): Promise<void>;
|
|
6
|
-
export declare function sendMediaMessage(externalId: string, fileUrls: string[], mediaType: 'image' | 'video', content: string, options: ApiOptions): Promise<MessageResponse>;
|
|
4
|
+
export declare function getUploadUrl(fileName: string, contentType: string, options: ApiOptions, signal?: AbortSignal): Promise<UploadUrlResponse>;
|
|
5
|
+
export declare function uploadFileToS3(uploadUrl: string, fileUri: string, contentType: string, onProgress?: (percentage: number) => void, options?: ApiOptions, signal?: AbortSignal): Promise<void>;
|
|
6
|
+
export declare function sendMediaMessage(externalId: string, fileUrls: string[], mediaType: 'image' | 'video', content: string, options: ApiOptions, signal?: AbortSignal): Promise<MessageResponse>;
|
|
7
7
|
//# sourceMappingURL=media.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../../../src/api/media.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../../../src/api/media.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAYtD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,UAAU,EACnB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,iBAAiB,CAAC,CAc5B;AAED,wBAAgB,cAAc,CAC5B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,EACzC,OAAO,CAAC,EAAE,UAAU,EACpB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,IAAI,CAAC,CA+Df;AAED,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAAE,EAClB,SAAS,EAAE,OAAO,GAAG,OAAO,EAC5B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,UAAU,EACnB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,eAAe,CAAC,CAsB1B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { MessageResponse } from '../types/MessageResponse';
|
|
2
2
|
import type { ApiOptions } from '../types/ApiOptions';
|
|
3
|
-
export declare function sendCustomerMessage(externalId: string, content: string, options: ApiOptions): Promise<MessageResponse>;
|
|
3
|
+
export declare function sendCustomerMessage(externalId: string, content: string, options: ApiOptions, signal?: AbortSignal): Promise<MessageResponse>;
|
|
4
4
|
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../src/api/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAItD,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../src/api/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAItD,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,UAAU,EACnB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,eAAe,CAAC,CAwB1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatList.d.ts","sourceRoot":"","sources":["../../../../src/components/ChatList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChatList.d.ts","sourceRoot":"","sources":["../../../../src/components/ChatList.tsx"],"names":[],"mappings":"AAgLA,wBAAgB,QAAQ,CAAC,EACvB,WAAW,EACX,MAAM,GACP,EAAE;IACD,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB,2CA0nBA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Component, type ReactNode, type ErrorInfo } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
onBack?: () => void;
|
|
5
|
+
fallback?: (reset: () => void) => ReactNode;
|
|
6
|
+
}
|
|
7
|
+
interface State {
|
|
8
|
+
hasError: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare class ComnyxErrorBoundary extends Component<Props, State> {
|
|
11
|
+
state: State;
|
|
12
|
+
static getDerivedStateFromError(): State;
|
|
13
|
+
componentDidCatch(error: Error, info: ErrorInfo): void;
|
|
14
|
+
reset: () => void;
|
|
15
|
+
render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode>> | import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=ComnyxErrorBoundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComnyxErrorBoundary.d.ts","sourceRoot":"","sources":["../../../../src/components/ComnyxErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAMlE,UAAU,KAAK;IACb,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,IAAI,KAAK,SAAS,CAAC;CAC7C;AAED,UAAU,KAAK;IACb,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,qBAAa,mBAAoB,SAAQ,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;IAC9D,KAAK,EAAE,KAAK,CAAuB;IAEnC,MAAM,CAAC,wBAAwB,IAAI,KAAK;IAIxC,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS;IAI/C,KAAK,aAEH;IAEF,MAAM;CA2BP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaMessageItem.d.ts","sourceRoot":"","sources":["../../../../src/components/MediaMessageItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"MediaMessageItem.d.ts","sourceRoot":"","sources":["../../../../src/components/MediaMessageItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AA6FpE,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,WAAW,GACZ,EAAE;IACD,IAAI,EAAE,sBAAsB,CAAC;IAC7B,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB,2CA2KA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageInput.d.ts","sourceRoot":"","sources":["../../../../src/components/MessageInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MessageInput.d.ts","sourceRoot":"","sources":["../../../../src/components/MessageInput.tsx"],"names":[],"mappings":"AAwBA,wBAAgB,YAAY,CAAC,EAC3B,cAAc,GACf,EAAE;IACD,cAAc,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,2CAmbA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageItem.d.ts","sourceRoot":"","sources":["../../../../src/components/MessageItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MessageItem.d.ts","sourceRoot":"","sources":["../../../../src/components/MessageItem.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAiBpE,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,WAAW,GACZ,EAAE;IACD,IAAI,EAAE,sBAAsB,CAAC;IAC7B,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB,2CASA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePolling.d.ts","sourceRoot":"","sources":["../../../../src/hooks/usePolling.ts"],"names":[],"mappings":"AAMA,wBAAgB,UAAU,
|
|
1
|
+
{"version":3,"file":"usePolling.d.ts","sourceRoot":"","sources":["../../../../src/hooks/usePolling.ts"],"names":[],"mappings":"AAMA,wBAAgB,UAAU,SAiDzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useThemeColors.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useThemeColors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useThemeColors.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useThemeColors.ts"],"names":[],"mappings":"AACA,OAAO,EAAyB,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGzE,wBAAgB,cAAc,IAAI,WAAW,CAS5C"}
|
|
@@ -4,6 +4,8 @@ export { Comnyx } from './register';
|
|
|
4
4
|
export { ComnyxSupport } from './support';
|
|
5
5
|
export { ComnyxNotifications } from './notifications';
|
|
6
6
|
export { NotificationPermissionStatus } from './NativeComnyx';
|
|
7
|
+
export type { ThemeColors, ThemeColorsOverride, ThemeOverrideConfig, } from './types/Theme';
|
|
8
|
+
export type { SupportConfig, SupportHeaderRenderProps, SupportErrorRenderProps, SupportMessageRenderProps, SupportSendPayload, } from './support';
|
|
7
9
|
export { registerOneSignalForComnyx } from './register/collectData';
|
|
8
10
|
export { useIsComnyxRegistered } from './hooks/useIsComnyxRegistered';
|
|
9
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAC1F,YAAY,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAC1F,YAAY,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAC9D,YAAY,EACV,WAAW,EACX,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,aAAa,EACb,wBAAwB,EACxB,uBAAuB,EACvB,yBAAyB,EACzB,kBAAkB,GACnB,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initializeNotifications.d.ts","sourceRoot":"","sources":["../../../../src/notifications/initializeNotifications.ts"],"names":[],"mappings":"AAyBA,MAAM,WAAW,6BAA6B;IAC5C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;CACrE;
|
|
1
|
+
{"version":3,"file":"initializeNotifications.d.ts","sourceRoot":"","sources":["../../../../src/notifications/initializeNotifications.ts"],"names":[],"mappings":"AAyBA,MAAM,WAAW,6BAA6B;IAC5C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;CACrE;AAyFD,wBAAsB,uBAAuB,CAC3C,MAAM,GAAE,6BAAkC,oBAsF3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accumulator.d.ts","sourceRoot":"","sources":["../../../../src/register/Accumulator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"Accumulator.d.ts","sourceRoot":"","sources":["../../../../src/register/Accumulator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAmB,MAAM,mBAAmB,CAAC;AAIhF,qBAAa,WAAW;IACtB,OAAO,CAAC,YAAY,CAAsC;IAC1D,OAAO,CAAC,aAAa,CAAwD;IAC7E,OAAO,CAAC,QAAQ,CACT;IACP,OAAO,CAAC,qBAAqB,CAAkB;;IAG/C,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,OAAO,CAAC,IAAI,CAAC;IASjE,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,YAAY,CAAC,CAAC;IA4CtD,KAAK;IAwBX,QAAQ;IAmBR,KAAK;IAML,KAAK;IAQL,KAAK;IAIL,GAAG;IAIH,oBAAoB;CAGrB;AAED,eAAO,MAAM,WAAW,aAAoB,CAAC"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import type { CustomParameter } from '../types/Customer';
|
|
2
|
+
import { accumulator } from './Accumulator';
|
|
3
|
+
export declare function collectData(key: string, value: CustomParameter['value']): void;
|
|
4
|
+
export declare function collectData(data: Partial<Parameters<typeof accumulator.add>[0]>): void;
|
|
2
5
|
export declare function registerOneSignalForComnyx(external_id: string): void;
|
|
3
6
|
//# sourceMappingURL=collectData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collectData.d.ts","sourceRoot":"","sources":["../../../../src/register/collectData.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"collectData.d.ts","sourceRoot":"","sources":["../../../../src/register/collectData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;AAChF,wBAAgB,WAAW,CACzB,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GACnD,IAAI,CAAC;AAoBR,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,MAAM,QAQ7D"}
|