Skip to content

Commit 5447580

Browse files
samples up to JS SDK v2.17.0 and React UI Kit v0.4.0
1 parent 90e31c0 commit 5447580

File tree

14 files changed

+719
-94
lines changed

14 files changed

+719
-94
lines changed

samples/react-chat-ui-kit-demo-app/package-lock.json

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/react-chat-ui-kit-demo-app/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-chat",
3-
"version": "1.0.17",
3+
"version": "1.0.18",
44
"private": true,
55
"dependencies": {
66
"@emotion/react": "^11.11.0",
@@ -12,8 +12,8 @@
1212
"@types/react": "^18.2.6",
1313
"@types/react-dom": "^18.2.4",
1414
"node-sass": "^8.0.0",
15-
"quickblox": "^2.16.4",
16-
"quickblox-react-ui-kit": "0.3.1",
15+
"quickblox": "^2.17.0",
16+
"quickblox-react-ui-kit": "0.4.0",
1717
"react": "^17.0.0 || ^18.0.0",
1818
"react-dom": "^17.0.0 || ^18.0.0",
1919
"react-router-dom": "^6.4.3",

samples/react-chat-ui-kit-demo-app/src/QBHeplers.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export const createUser = (user: QBUserExtended): Promise<QBUser> => {
6565
};
6666

6767
export const createUserSession = async (loginData: LoginData): Promise<ParamsConnect> => {
68+
// @ts-ignore
6869
return new Promise((resolve, reject) => {
6970
QB.createSession(loginData, async (errorCreateSession: any, session: any) => {
7071
if (errorCreateSession) {
@@ -93,6 +94,7 @@ export const createAppSession = ():Promise<any> => {
9394
};
9495

9596
export const connectToChatServer = async (paramsConnect: ParamsConnect, userLogin: string): Promise<AuthorizationData> => {
97+
// @ts-ignore
9698
return new Promise((resolve, reject) => {
9799
QB.chat.connect(paramsConnect, async (errorConnect: any, resultConnect: any) => {
98100
if (errorConnect) {

samples/react-chat-ui-kit-demo-app/src/QBconfig.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
export const QBConfig = {
1+
import {QBUIKitConfig} from "quickblox-react-ui-kit/dist/CommonTypes/CommonTypes";
2+
3+
export const QBConfig: QBUIKitConfig = {
24
credentials: {
35
appId: -1,
46
accountKey: '',
@@ -10,6 +12,7 @@ export const QBConfig = {
1012
AIAnswerAssistWidgetConfig: {
1113
organizationName: 'Quickblox',
1214
openAIModel: 'gpt-3.5-turbo',
15+
smartChatAssistantId: '',
1316
apiKey: '',
1417
maxTokens: 3584,
1518
useDefault: true,
@@ -22,6 +25,7 @@ export const QBConfig = {
2225
AITranslateWidgetConfig: {
2326
organizationName: 'Quickblox',
2427
openAIModel: 'gpt-3.5-turbo',
28+
smartChatAssistantId: '',
2529
apiKey: '',
2630
maxTokens: 3584,
2731
useDefault: true,
@@ -41,6 +45,7 @@ export const QBConfig = {
4145
AIRephraseWidgetConfig: {
4246
organizationName: 'Quickblox',
4347
openAIModel: 'gpt-3.5-turbo',
48+
smartChatAssistantId: '',
4449
apiKey: '',
4550
maxTokens: 3584,
4651
useDefault: true,

0 commit comments

Comments
 (0)