@iblai/web-utils 1.3.0 → 1.3.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.
package/dist/index.js CHANGED
@@ -3012,7 +3012,7 @@ function useAuthProvider({ middleware = new Map(), onAuthSuccess, onAuthFailure,
3012
3012
  // Check JWT token expiry and force logout for protected routes
3013
3013
  if (isProtectedRoute && storageService) {
3014
3014
  const dmTokenInLocalStorage = await storageService.getItem(LOCAL_STORAGE_KEYS.DM_TOKEN_KEY);
3015
- console.log('[auth-redirect] local storage keys ', LOCAL_STORAGE_KEYS);
3015
+ console.log("[auth-redirect] local storage keys ", LOCAL_STORAGE_KEYS);
3016
3016
  const dmTokenExpired = await isDmTokenExpired(storageService);
3017
3017
  if (!dmTokenInLocalStorage || dmTokenExpired) {
3018
3018
  if (!!dmTokenInLocalStorage) {
@@ -3588,6 +3588,10 @@ function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, curr
3588
3588
  }
3589
3589
  else {
3590
3590
  removeVisitingTenant === null || removeVisitingTenant === void 0 ? void 0 : removeVisitingTenant();
3591
+ const userTenantRecord = enhancedTenants === null || enhancedTenants === void 0 ? void 0 : enhancedTenants.find((t) => t.key === currentTenant);
3592
+ if (userTenantRecord) {
3593
+ saveCurrentTenant(userTenantRecord);
3594
+ }
3591
3595
  const rbacPermissions = await loadPlatformPermissions(currentTenant);
3592
3596
  onLoadPlatformPermissions === null || onLoadPlatformPermissions === void 0 ? void 0 : onLoadPlatformPermissions(rbacPermissions);
3593
3597
  }
@@ -17165,6 +17169,10 @@ const MEMSEARCH_ENDPOINTS = {
17165
17169
  service: SERVICES.AXD,
17166
17170
  path: (org, userId, mentorId) => `/api/ai-mentor/orgs/${org}/users/${userId}/mentors/${mentorId}/mentor-memories/`,
17167
17171
  },
17172
+ GET_MENTOR_MEMORIES_LIST: {
17173
+ service: SERVICES.AXD,
17174
+ path: (org, userId, mentorId) => `/api/ai-mentor/orgs/${org}/users/${userId}/mentors/${mentorId}/mentor-memories-list/`,
17175
+ },
17168
17176
  CREATE_MENTOR_MEMORY: {
17169
17177
  service: SERVICES.AXD,
17170
17178
  path: (org, userId, mentorId) => `/api/ai-mentor/orgs/${org}/users/${userId}/mentors/${mentorId}/mentor-memories/`,
@@ -17274,6 +17282,14 @@ createApi({
17274
17282
  }),
17275
17283
  providesTags: MEMORY_QUERY_KEYS.MEMSEARCH_MENTOR_MEMORIES(),
17276
17284
  }),
17285
+ getMentorMemoriesList: builder.query({
17286
+ query: (args) => ({
17287
+ url: MEMSEARCH_ENDPOINTS.GET_MENTOR_MEMORIES_LIST.path(args.org, args.userId, args.mentorId),
17288
+ service: MEMSEARCH_ENDPOINTS.GET_MENTOR_MEMORIES_LIST.service,
17289
+ params: args.params,
17290
+ }),
17291
+ providesTags: MEMORY_QUERY_KEYS.MEMSEARCH_MENTOR_MEMORIES(),
17292
+ }),
17277
17293
  createMentorMemory: builder.mutation({
17278
17294
  query: (args) => ({
17279
17295
  url: MEMSEARCH_ENDPOINTS.CREATE_MENTOR_MEMORY.path(args.org, args.userId, args.mentorId),