@iblai/data-layer 1.6.0 → 1.6.1

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/dist/index.js CHANGED
@@ -39498,6 +39498,39 @@ const chatApiSlice = react.createApi({
39498
39498
  });
39499
39499
  const { useLazyGetPinnedMessagesQuery, useUnPinMessageMutation, useDeleteMessageMutation, useGetPinnedMessagesQuery, useAddPinnedMessageMutation, useGetVectorDocumentsQuery, useLazyGetVectorDocumentsQuery, useGetRecentMessageQuery, useLazyGetRecentMessageQuery, useUpdateMessageFeedbackMutation, useAudioToTextMutation, } = chatApiSlice;
39500
39500
 
39501
+ const CHAT_CUSTOM_REDUCER_PATH = 'chatCustomApiSlice';
39502
+ const CHAT_CUSTOM_ENDPOINTS = {
39503
+ GET_CHAT_MESSAGE_TTS: {
39504
+ path: (org, user_id, chat_message_id) => `/api/ai-mentor/orgs/${org}/users/${user_id}/chat-messages/${chat_message_id}/tts`,
39505
+ service: exports.SERVICES.DM,
39506
+ },
39507
+ };
39508
+
39509
+ const chatCustomApiSlice = react.createApi({
39510
+ reducerPath: CHAT_CUSTOM_REDUCER_PATH,
39511
+ baseQuery: iblFetchBaseQuery,
39512
+ endpoints: (builder) => ({
39513
+ getChatMessageTts: builder.query({
39514
+ query: ({ org, user_id, chat_message_id }) => ({
39515
+ url: CHAT_CUSTOM_ENDPOINTS.GET_CHAT_MESSAGE_TTS.path(org, user_id, chat_message_id),
39516
+ service: CHAT_CUSTOM_ENDPOINTS.GET_CHAT_MESSAGE_TTS.service,
39517
+ method: 'GET',
39518
+ responseHandler: async (response) => {
39519
+ const blob = await response.blob();
39520
+ return await new Promise((resolve, reject) => {
39521
+ const reader = new FileReader();
39522
+ reader.onloadend = () => resolve(reader.result);
39523
+ reader.onerror = () => reject(reader.error);
39524
+ reader.readAsDataURL(blob);
39525
+ });
39526
+ },
39527
+ cache: 'no-cache',
39528
+ }),
39529
+ }),
39530
+ }),
39531
+ });
39532
+ const { useGetChatMessageTtsQuery, useLazyGetChatMessageTtsQuery } = chatCustomApiSlice;
39533
+
39501
39534
  const chatFilesApiSlice = react.createApi({
39502
39535
  reducerPath: 'chatFilesApiSlice',
39503
39536
  baseQuery: iblFetchBaseQuery,
@@ -45092,6 +45125,7 @@ const mentorReducer = {
45092
45125
  [userApiSlice.reducerPath]: userApiSlice.reducer,
45093
45126
  [platformApiSlice.reducerPath]: platformApiSlice.reducer,
45094
45127
  [chatApiSlice.reducerPath]: chatApiSlice.reducer,
45128
+ [chatCustomApiSlice.reducerPath]: chatCustomApiSlice.reducer,
45095
45129
  [chatFilesApiSlice.reducerPath]: chatFilesApiSlice.reducer,
45096
45130
  [apiKeysApiSlice.reducerPath]: apiKeysApiSlice.reducer,
45097
45131
  [llmsApiSlice.reducerPath]: llmsApiSlice.reducer,
@@ -45154,6 +45188,7 @@ const mentorMiddleware = [
45154
45188
  credentialsApiSlice.middleware,
45155
45189
  userInvitationsApiSlice.middleware,
45156
45190
  chatApiSlice.middleware,
45191
+ chatCustomApiSlice.middleware,
45157
45192
  chatFilesApiSlice.middleware,
45158
45193
  appApiSlice.middleware,
45159
45194
  billingApiSlice.middleware,
@@ -45365,6 +45400,7 @@ exports.billingCustomSlice = billingCustomSlice;
45365
45400
  exports.careerApiSlice = careerApiSlice;
45366
45401
  exports.catalogApiSlice = catalogApiSlice;
45367
45402
  exports.chatApiSlice = chatApiSlice;
45403
+ exports.chatCustomApiSlice = chatCustomApiSlice;
45368
45404
  exports.chatFilesApiSlice = chatFilesApiSlice;
45369
45405
  exports.chatHistoryApiSlice = chatHistoryApiSlice;
45370
45406
  exports.clawApiSlice = clawApiSlice;
@@ -45572,6 +45608,7 @@ exports.useGetCatalogSearchQuery = useGetCatalogSearchQuery;
45572
45608
  exports.useGetChatHistoryExportStatusQuery = useGetChatHistoryExportStatusQuery;
45573
45609
  exports.useGetChatHistoryFilterQuery = useGetChatHistoryFilterQuery;
45574
45610
  exports.useGetChatHistoryQuery = useGetChatHistoryQuery;
45611
+ exports.useGetChatMessageTtsQuery = useGetChatMessageTtsQuery;
45575
45612
  exports.useGetChatMessagesForSessionQuery = useGetChatMessagesForSessionQuery;
45576
45613
  exports.useGetClawInstanceQuery = useGetClawInstanceQuery;
45577
45614
  exports.useGetClawInstancesQuery = useGetClawInstancesQuery;
@@ -45776,6 +45813,7 @@ exports.useLazyGetCatalogSearchQuery = useLazyGetCatalogSearchQuery;
45776
45813
  exports.useLazyGetChatHistoryExportStatusQuery = useLazyGetChatHistoryExportStatusQuery;
45777
45814
  exports.useLazyGetChatHistoryFilterQuery = useLazyGetChatHistoryFilterQuery;
45778
45815
  exports.useLazyGetChatHistoryQuery = useLazyGetChatHistoryQuery;
45816
+ exports.useLazyGetChatMessageTtsQuery = useLazyGetChatMessageTtsQuery;
45779
45817
  exports.useLazyGetChatMessagesForSessionQuery = useLazyGetChatMessagesForSessionQuery;
45780
45818
  exports.useLazyGetClawInstanceQuery = useLazyGetClawInstanceQuery;
45781
45819
  exports.useLazyGetClawInstancesQuery = useLazyGetClawInstancesQuery;