@cmnd-ai/chatbot-react 1.9.1 → 1.9.2

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.
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React, { useEffect, useRef, useState } from "react";
3
3
  import postUserConversation from "../services/postUserConversation.js";
4
- import getChatBotById from "../services/getchatBotById.js";
4
+ import getEmbedChatBotById from "../services/getEmbedChatBotById.js";
5
5
  import patchChatbotConversationMemory from "../services/patchChatbotConversationMemory/index.js";
6
6
  import deleteChatbotConversationMemory from "../services/deleteChatbotConversationMemory/index.js";
7
7
  import parseUITools from "../utils/parseUITools.js";
@@ -67,7 +67,7 @@ function ChatProvider(props) {
67
67
  }, [chatbotConversationId]);
68
68
  useEffect(() => {
69
69
  setLoading(true);
70
- getChatBotById(baseUrl, organizationId, chatbotId)
70
+ getEmbedChatBotById(baseUrl, organizationId, chatbotId)
71
71
  .then((response) => {
72
72
  const { chatbot } = response.data;
73
73
  setEnabledTools(chatbot.enabledTools);
@@ -0,0 +1,2 @@
1
+ declare const getEmbedChatBotById: (baseUrl: string, organizationId: number, chatbotId: number) => Promise<import("axios").AxiosResponse<any, any>>;
2
+ export default getEmbedChatBotById;
@@ -0,0 +1,6 @@
1
+ import axios from "axios";
2
+ const getEmbedChatBotById = (baseUrl, organizationId, chatbotId) => {
3
+ const endpoint = `${baseUrl}/organizations/${organizationId}/chatbots/${chatbotId}/embed`;
4
+ return axios.get(endpoint);
5
+ };
6
+ export default getEmbedChatBotById;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmnd-ai/chatbot-react",
3
- "version": "1.9.1",
3
+ "version": "1.9.2",
4
4
  "main": "dist/index.js",
5
5
  "description": "",
6
6
  "type": "module",
@@ -1,2 +0,0 @@
1
- declare const getChatBotById: (baseUrl: string, organizationId: number, chatbotId: number) => Promise<import("axios").AxiosResponse<any, any>>;
2
- export default getChatBotById;
@@ -1,6 +0,0 @@
1
- import axios from "axios";
2
- const getChatBotById = (baseUrl, organizationId, chatbotId) => {
3
- const endpoint = `${baseUrl}/organizations/${organizationId}/chatbots/${chatbotId}`;
4
- return axios.get(endpoint);
5
- };
6
- export default getChatBotById;