cmcts-c-agent-embedding-react 1.0.4-cmcuni → 1.0.4-tchckt
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/.idea/codeStyles/Project.xml +60 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/copilot.data.migration.agent.xml +6 -0
- package/.idea/copilot.data.migration.ask.xml +6 -0
- package/.idea/copilot.data.migration.ask2agent.xml +6 -0
- package/.idea/copilot.data.migration.edit.xml +6 -0
- package/.idea/flowise-chatbox.iml +9 -0
- package/.idea/inspectionProfiles/Project_Default.xml +16 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/prettier.xml +6 -0
- package/.idea/vcs.xml +6 -0
- package/README.md +48 -48
- package/base.json +21 -21
- package/dist/components/Bot.d.ts +0 -3
- package/dist/components/Bot.d.ts.map +1 -1
- package/dist/components/FeedbackContentDialog.d.ts +0 -3
- package/dist/components/FeedbackContentDialog.d.ts.map +1 -1
- package/dist/components/bubbles/BotBubble.d.ts +0 -3
- package/dist/components/bubbles/BotBubble.d.ts.map +1 -1
- package/dist/components/bubbles/SourceBubble.d.ts.map +1 -1
- package/dist/components/bubbles/StarterPromptBubble.d.ts.map +1 -1
- package/dist/components/buttons/CopyMessageButton.d.ts +10 -0
- package/dist/components/buttons/CopyMessageButton.d.ts.map +1 -0
- package/dist/components/buttons/EditMessageButton.d.ts +8 -0
- package/dist/components/buttons/EditMessageButton.d.ts.map +1 -0
- package/dist/components/buttons/PopupToast.d.ts +7 -0
- package/dist/components/buttons/PopupToast.d.ts.map +1 -0
- package/dist/components/dialogs/EditMessageDialog.d.ts +9 -0
- package/dist/components/dialogs/EditMessageDialog.d.ts.map +1 -0
- package/dist/components/icons/CheckIcon.d.ts +3 -0
- package/dist/components/icons/CheckIcon.d.ts.map +1 -0
- package/dist/components/icons/CopyIcon.d.ts +5 -0
- package/dist/components/icons/CopyIcon.d.ts.map +1 -0
- package/dist/components/icons/EditIcon.d.ts +5 -0
- package/dist/components/icons/EditIcon.d.ts.map +1 -0
- package/dist/components/icons/index.d.ts +3 -0
- package/dist/components/icons/index.d.ts.map +1 -1
- package/dist/components/inputs/textInput/components/TextInput.d.ts +9 -1
- package/dist/components/inputs/textInput/components/TextInput.d.ts.map +1 -1
- package/dist/features/bubble/components/Bubble.d.ts.map +1 -1
- package/dist/features/bubble/components/BubbleButton.d.ts.map +1 -1
- package/dist/features/bubble/components/Tooltip.d.ts +2 -0
- package/dist/features/bubble/components/Tooltip.d.ts.map +1 -1
- package/dist/features/bubble/types.d.ts +0 -3
- package/dist/features/bubble/types.d.ts.map +1 -1
- package/dist/features/full/components/Full.d.ts.map +1 -1
- package/dist/features/popup/components/Popup.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/queries/sendMessageQuery.d.ts +10 -0
- package/dist/queries/sendMessageQuery.d.ts.map +1 -1
- package/dist/utils/index.d.ts +0 -73
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/transcriptApi.d.ts +8 -0
- package/dist/utils/transcriptApi.d.ts.map +1 -0
- package/dist/web.js +1 -1
- package/package.json +48 -48
- package/react-library.json +11 -11
- package/dist/components/icons/CmcIcon.d.ts +0 -3
- package/dist/components/icons/CmcIcon.d.ts.map +0 -1
- package/dist/components/icons/ResetBtn.d.ts +0 -3
- package/dist/components/icons/ResetBtn.d.ts.map +0 -1
- package/dist/components/icons/SendIconOff.d.ts +0 -3
- package/dist/components/icons/SendIconOff.d.ts.map +0 -1
- package/dist/components/icons/SendIconOn.d.ts +0 -3
- package/dist/components/icons/SendIconOn.d.ts.map +0 -1
- package/dist/components/mobile/MobileWelcomeScreen.d.ts +0 -13
- package/dist/components/mobile/MobileWelcomeScreen.d.ts.map +0 -1
- package/dist/hooks/useMobileDetection.d.ts +0 -52
- package/dist/hooks/useMobileDetection.d.ts.map +0 -1
- package/dist/test-markdown-component.d.ts +0 -2
- package/dist/test-markdown-component.d.ts.map +0 -1
- package/dist/utils/mobileUtils.d.ts +0 -32
- package/dist/utils/mobileUtils.d.ts.map +0 -1
|
@@ -83,6 +83,16 @@ export declare const getChatbotConfig: ({ chatflowid, apiHost, onRequest }: Mess
|
|
|
83
83
|
data?: any;
|
|
84
84
|
error?: Error | undefined;
|
|
85
85
|
}>;
|
|
86
|
+
export declare const getMessageById: ({ chatflowid, apiHost, onRequest, messageId }: BaseRequest & {
|
|
87
|
+
chatflowid?: string | undefined;
|
|
88
|
+
body?: IncomingInput | undefined;
|
|
89
|
+
} & {
|
|
90
|
+
messageId: string;
|
|
91
|
+
}) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
92
|
+
export declare const updateMessage: ({ apiHost, body, onRequest }: MessageRequest) => Promise<{
|
|
93
|
+
data?: any;
|
|
94
|
+
error?: Error | undefined;
|
|
95
|
+
}>;
|
|
86
96
|
export declare const isStreamAvailableQuery: ({ chatflowid, apiHost, onRequest }: MessageRequest) => Promise<{
|
|
87
97
|
data?: any;
|
|
88
98
|
error?: Error | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendMessageQuery.d.ts","sourceRoot":"","sources":["../../src/queries/sendMessageQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"sendMessageQuery.d.ts","sourceRoot":"","sources":["../../src/queries/sendMessageQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIvD,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,Q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eAAO,MAAM,qBAAqB;gBAMpB,MAAM;;WAEX,MAAM;2BACS,WAAW,KAAK,QAAQ,IAAI,CAAC;;;;EAUpD,CAAC;AAEF,eAAO,MAAM,cAAc;;UAMnB,MAAM;2BACU,WAAW,KAAK,QAAQ,IAAI,CAAC;;;;EAUpD,CAAC"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ export declare const isNotEmpty: (value: string | undefined | null) => value is
|
|
|
6
6
|
* Clears authentication data from localStorage
|
|
7
7
|
* Used when 401 errors are detected or user logs out
|
|
8
8
|
*/
|
|
9
|
-
export declare const clearAuthenticationData: () => void;
|
|
10
9
|
export declare const sendRequest: <ResponseData>(params: string | {
|
|
11
10
|
url: string;
|
|
12
11
|
method: string;
|
|
@@ -24,77 +23,5 @@ export declare const getLocalStorageChatflow: (chatflowid: string) => any;
|
|
|
24
23
|
export declare const removeLocalStorageChatHistory: (chatflowid: string) => void;
|
|
25
24
|
export declare const getBubbleButtonSize: (size: 'small' | 'medium' | 'large' | number | undefined) => number;
|
|
26
25
|
export declare const setCookie: (cname: string, cvalue: string, exdays: number) => void;
|
|
27
|
-
/**
|
|
28
|
-
* Validates dataLogin from localStorage and maps user data to cmcts:userInfo
|
|
29
|
-
* @returns true if successful mapping occurred, false otherwise
|
|
30
|
-
*/
|
|
31
|
-
/**
|
|
32
|
-
* Type definitions for user info API response
|
|
33
|
-
*/
|
|
34
|
-
export type UserInfoApiResponse = {
|
|
35
|
-
RESULT: {
|
|
36
|
-
CODE: number;
|
|
37
|
-
MSG: string;
|
|
38
|
-
};
|
|
39
|
-
OBJRETURN: {
|
|
40
|
-
data: {
|
|
41
|
-
id: string;
|
|
42
|
-
_id: number;
|
|
43
|
-
loginname: string;
|
|
44
|
-
fullname: string;
|
|
45
|
-
fullnameen: string;
|
|
46
|
-
email: string;
|
|
47
|
-
code: string;
|
|
48
|
-
mobile?: string;
|
|
49
|
-
imageurl?: string;
|
|
50
|
-
roleName: string[];
|
|
51
|
-
techGroup: Array<{
|
|
52
|
-
id: number;
|
|
53
|
-
name: string;
|
|
54
|
-
}>;
|
|
55
|
-
permissions: Record<string, string>;
|
|
56
|
-
[key: string]: any;
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* Fetches user info from /api/user-info endpoint with cookies
|
|
62
|
-
* @param apiHost - The API host URL
|
|
63
|
-
* @param onRequest - Optional request interceptor
|
|
64
|
-
* @returns Promise with user info data or error
|
|
65
|
-
*/
|
|
66
|
-
export declare const fetchUserInfo: (apiHost: string, onRequest?: ((request: RequestInit) => Promise<void>) | undefined) => Promise<{
|
|
67
|
-
data?: UserInfoApiResponse;
|
|
68
|
-
error?: Error;
|
|
69
|
-
}>;
|
|
70
|
-
/**
|
|
71
|
-
* Maps API response to dataLogin format expected by the application
|
|
72
|
-
* @param apiResponse - The API response from /api/user-info
|
|
73
|
-
* @returns Mapped dataLogin object
|
|
74
|
-
*/
|
|
75
|
-
export declare const mapApiResponseToDataLogin: (apiResponse: UserInfoApiResponse) => any;
|
|
76
|
-
/**
|
|
77
|
-
* Validates dataLogin from localStorage and maps user data to cmcts:userInfo
|
|
78
|
-
* @returns true if successful mapping occurred, false otherwise
|
|
79
|
-
*/
|
|
80
|
-
export declare const validateAndMapUserInfo: () => boolean;
|
|
81
|
-
/**
|
|
82
|
-
* Checks and initializes authentication for popup embedding
|
|
83
|
-
* If dataLogin doesn't exist, fetches user info from API and creates it
|
|
84
|
-
* @param apiHost - The API host URL
|
|
85
|
-
* @param onRequest - Optional request interceptor
|
|
86
|
-
* @param isFullPage - Whether the chatbot is in full page mode
|
|
87
|
-
* @returns Promise<boolean> - true if authentication is successful, false otherwise
|
|
88
|
-
*/
|
|
89
|
-
export declare const checkAndInitializeAuth: (apiHost?: string, onRequest?: ((request: RequestInit) => Promise<void>) | undefined, isFullPage?: boolean) => Promise<boolean>;
|
|
90
|
-
/**
|
|
91
|
-
* Forces reload of user information from API and remaps to dataLogin
|
|
92
|
-
* Used when popup opens to ensure fresh user data
|
|
93
|
-
* @param apiHost - The API host URL
|
|
94
|
-
* @param onRequest - Optional request interceptor
|
|
95
|
-
* @param isFullPage - Whether the chatbot is in full page mode
|
|
96
|
-
* @returns Promise<boolean> - true if reload and mapping successful, false otherwise
|
|
97
|
-
*/
|
|
98
|
-
export declare const reloadAndMapUserInfo: (apiHost?: string, onRequest?: ((request: RequestInit) => Promise<void>) | undefined, isFullPage?: boolean) => Promise<boolean>;
|
|
99
26
|
export declare const getCookie: (cname: string) => string;
|
|
100
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,+DAAuG,CAAC;AAEjI,eAAO,MAAM,SAAS,6DAAqG,CAAC;AAE5H,eAAO,MAAM,OAAO,UAAW,MAAM,GAAG,SAAS,GAAG,IAAI,uBAA8E,CAAC;AAEvI,eAAO,MAAM,UAAU,UAAW,MAAM,GAAG,SAAS,GAAG,IAAI,oBAA2E,CAAC;AAEvI;;;GAGG;AACH,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,+DAAuG,CAAC;AAEjI,eAAO,MAAM,SAAS,6DAAqG,CAAC;AAE5H,eAAO,MAAM,OAAO,UAAW,MAAM,GAAG,SAAS,GAAG,IAAI,uBAA8E,CAAC;AAEvI,eAAO,MAAM,UAAU,UAAW,MAAM,GAAG,SAAS,GAAG,IAAI,oBAA2E,CAAC;AAEvI;;;GAGG;AACH,eAAO,MAAM,WAAW;SAGX,MAAM;YACH,MAAM;;;;;2BAKQ,WAAW,KAAK,QAAQ,IAAI,CAAC;;;;EAuD1D,CAAC;AAEF,eAAO,MAAM,uBAAuB,eAAgB,MAAM,UAAU,MAAM,YAAW,OAAO,MAAM,EAAE,GAAG,CAAC,SAiBvG,CAAC;AAEF,eAAO,MAAM,uBAAuB,eAAgB,MAAM,QAQzD,CAAC;AAEF,eAAO,MAAM,6BAA6B,eAAgB,MAAM,SAyB/D,CAAC;AAEF,eAAO,MAAM,mBAAmB,SAAU,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,WAO1F,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,MAAM,UAAU,MAAM,UAAU,MAAM,SAKtE,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,MAAM,KAAG,MAczC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Upload audio blob to server and get transcription
|
|
3
|
+
* @param blob - Audio blob to transcribe
|
|
4
|
+
* @param transcriptApiEndpoint - API endpoint for transcription service
|
|
5
|
+
* @returns Promise<string> - Transcribed text
|
|
6
|
+
*/
|
|
7
|
+
export declare const uploadAndTranscriptAudio: (blob: Blob, transcriptApiEndpoint?: string) => Promise<string>;
|
|
8
|
+
//# sourceMappingURL=transcriptApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcriptApi.d.ts","sourceRoot":"","sources":["../../src/utils/transcriptApi.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,SAAgB,IAAI,0BAA0B,MAAM,KAAG,QAAQ,MAAM,CAoCzG,CAAC"}
|