@iblai/web-utils 1.1.12 → 1.1.14

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.
@@ -38,6 +38,7 @@ export * from './features/per-learner/api-slice';
38
38
  export * from './features/search/api-slice';
39
39
  export * from './features/career/api-slice';
40
40
  export * from './features/artifacts/api-slice';
41
+ export * from './features/artifacts/types';
41
42
  export * from './constants';
42
43
  export * from './config';
43
44
  export * from './services/StorageService';
@@ -88,4 +89,5 @@ export * from './features/projects/constants';
88
89
  export type { Project, ProjectsFetchResponse, GetProjectsParams, GetProjectsArgs, GetProjectDetailsArgs, CreateProjectData, CreateProjectArgs, UpdateProjectData, UpdateProjectArgs, DeleteProjectArgs, } from './features/projects/types';
89
90
  export * from './reducers';
90
91
  export * from './utils';
92
+ export type { CustomQueryArgs } from './features/utils';
91
93
  export type { LLMResponse, MentorSettings } from '@iblai/iblai-api';
package/dist/index.d.ts CHANGED
@@ -9,7 +9,7 @@ import duration from 'dayjs/plugin/duration';
9
9
  import { ChatStatus as ChatStatus$1 } from '@web-utils/features';
10
10
  import { Error402MessageData as Error402MessageData$1, Tenant as Tenant$3 } from '@web-utils/types';
11
11
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
12
- import { Slice } from '@reduxjs/toolkit';
12
+ import { Reducer, Slice } from '@reduxjs/toolkit';
13
13
  import * as react_jsx_runtime from 'react/jsx-runtime';
14
14
  import { z } from 'zod';
15
15
 
@@ -811,7 +811,7 @@ declare const isWeb: () => boolean;
811
811
  declare const isNode: () => any;
812
812
  declare const isExpo: () => any;
813
813
  declare const isTauri: () => boolean;
814
- declare const getPlatform: () => "web" | "react-native" | "node" | "unknown";
814
+ declare const getPlatform: () => "react-native" | "web" | "node" | "unknown";
815
815
  declare const safeRequire: (moduleName: string) => any;
816
816
  declare const getNextNavigation: () => any;
817
817
 
@@ -868,7 +868,7 @@ type ChatSliceState = {
868
868
  lastArtifactContentFlushTime: number;
869
869
  };
870
870
  declare const chatActions: _reduxjs_toolkit.CaseReducerActions<_reduxjs_toolkit.SliceCaseReducers<ChatSliceState>, string>;
871
- declare const chatSliceReducerShared: Reducer<State>;
871
+ declare const chatSliceReducerShared: Reducer<ChatSliceState>;
872
872
  declare const selectChats: (state: {
873
873
  chatSliceShared: ChatSliceState;
874
874
  }) => ChatState;
@@ -1037,7 +1037,7 @@ declare const updateFileUrl: _reduxjs_toolkit.ActionCreatorWithoutPayload<`${str
1037
1037
  declare const updateFileMetadata: _reduxjs_toolkit.ActionCreatorWithoutPayload<`${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPayload<any, `${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>;
1038
1038
  declare const updateFileRetryCount: _reduxjs_toolkit.ActionCreatorWithoutPayload<`${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPayload<any, `${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>;
1039
1039
  declare const updateFileUrlFromWebSocket: _reduxjs_toolkit.ActionCreatorWithoutPayload<`${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPayload<any, `${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>;
1040
- declare const filesReducer: Reducer<State>;
1040
+ declare const filesReducer: Reducer<FilesState>;
1041
1041
 
1042
1042
  /**
1043
1043
  * Combines multiple CSV data objects by merging rows based on a common column.
@@ -1719,4 +1719,4 @@ declare const WithPermissions: ({ rbacResource, rbacPermissions, children, }: Wi
1719
1719
  declare const checkRbacPermission: (rbacPermissions: object, rbacResource: string, enableRBAC?: boolean) => boolean;
1720
1720
 
1721
1721
  export { ALPHANUMERIC_32_REGEX, ANONYMOUS_USERNAME, AuthContext, AuthContextProvider, AuthProvider, CHAT_AREA_SIZE, LOCAL_STORAGE_KEYS, MAX_INITIAL_WEBSOCKET_CONNECTION_ATTEMPTS, MENTOR_CHAT_DOCUMENTS_EXTENSIONS, METADATAS, MentorProvider, STREAMING_CONTENT_BUFFER_THRESHOLD, STREAMING_CONTENT_FLUSH_INTERVAL, SUBSCRIPTION_MESSAGES, SUBSCRIPTION_PACKAGES, SUBSCRIPTION_PACKAGES_V2, SUBSCRIPTION_TRIGGERS, SUBSCRIPTION_V2_TRIGGERS, SubscriptionFlow, SubscriptionFlowV2, TOOLS, TenantContext, TenantContextProvider, TenantProvider, TimeTracker, WithFormPermissions, WithPermissions, addFiles, addProtocolToUrl, advancedTabs, advancedTabsProperties, chatActions, chatSliceReducerShared, checkModelAvailable, checkOllamaHealth, checkRbacPermission, clearAuthCookies, clearCookies, clearCurrentTenantCookie, clearFiles, combineCSVData, convertToOllamaMessages, createFileReference, createMultipleFileReferences, csvDataToText, defaultSessionIds, deleteCookie, deleteCookieOnAllDomains, filesReducer, filesSlice, formatRelativeTime, getAuthSpaJoinUrl, getDomainParts, getFileInfo, getInitials, getLocalLLMSystemPrompt, getNextNavigation, getParentDomain, getPlatform, getPlatformKey, getTimeAgo, getUserName, handleLogout, isAlphaNumeric32, isExpo, isInIframe, isJSON, isLoggedIn, isNode, isReactNative, isTauri, isWeb, loadMetadataConfig, markdownToPlainText, parseCSV, redirectToAuthSpa, redirectToAuthSpaJoinTenant, removeFile, requestPresignedUrl, safeRequire, selectActiveChatMessages, selectActiveTab, selectArtifactsEnabled, selectChats, selectCurrentStreamingArtifact, selectCurrentStreamingMessage, selectDocumentFilter, selectIframeContext, selectIsError, selectIsPending, selectIsStopped, selectIsTyping, selectLastArtifactContentFlushTime, selectNumberOfActiveChatMessages, selectSessionId, selectSessionIds, selectShouldStartNewChat, selectShowingSharedChat, selectStatus, selectStreaming, selectStreamingArtifactContentBuffer, selectStreamingArtifactFullContent, selectToken, selectTokenEnabled, selectTools, sendMessageToParentWebsite, setCookieForAuth, streamOllamaChat, syncAuthToCookies, tenantKeySchema, tenantSchema, translatePrompt, updateFileMetadata, updateFileProgress, updateFileRetryCount, updateFileStatus, updateFileUrl, updateFileUrlFromWebSocket, uploadToS3, useAdvancedChat, useAuthContext, useAuthProvider, useChat, useDayJs, useExternalPricingPlan, useMentorSettings, useMentorTools, useProfileImageUpload, useSubscriptionHandler, useSubscriptionHandlerV2, useTenantContext, useTenantMetadata, useTimeTracker, useTimeTrackerNative, useUserProfileUpdate, userDataSchema, validateFile };
1722
- export type { AdvancedTab, ArtifactData, ArtifactPayload, ArtifactVersion, AttachedFile, AuthContextType, ChatMode, ChatState, ChatStatus, CreateStripeCustomerPortalRequest, Error402MessageData, FileAttachment, FileInfo, FileProcessingEvent, FileReference, FileUploadState, FilesState, HandleLogoutOptions, Message, MessageAction, OAuthRequiredData, OAuthResolvedData, OllamaChatRequest, OllamaChatStreamResponse, OllamaMessage, OllamaStreamCallbacks, PricingModalData, Prompt, RedirectToAuthSpaOptions, SendMessageOptions, SessionIds, StreamingArtifact, StreamingMessage, SubscriptionFlowConfig, SubscriptionFlowConfigV2, Tenant, TenantContextType, TenantKeyMentorIdParams, TenantMetadata, TimeTrackerConfig, TimeTrackerState, TopTrialBannerProps, UploadProgressCallback, UseChatProps, UseChatReturn, UseExternalPricingProps, UseProfileImageUploadOptions, UseProfileImageUploadReturn, UseTimeTrackerConfig, UseTimeTrackerNativeConfig, UseTimeTrackerNativeReturn, UseTimeTrackerReturn, UseUserProfileUpdateResult, UserProfileUpdateData };
1722
+ export type { AdvancedTab, ArtifactData, ArtifactPayload, ArtifactVersion, AttachedFile, AuthContextType, ChatMode, ChatSliceState, ChatState, ChatStatus, CreateStripeCustomerPortalRequest, Error402MessageData, FileAttachment, FileInfo, FileProcessingEvent, FileReference, FileUploadState, FilesState, HandleLogoutOptions, Message, MessageAction, OAuthRequiredData, OAuthResolvedData, OllamaChatRequest, OllamaChatStreamResponse, OllamaMessage, OllamaStreamCallbacks, PricingModalData, Prompt, RedirectToAuthSpaOptions, SendMessageOptions, SessionIds, StreamingArtifact, StreamingMessage, SubscriptionFlowConfig, SubscriptionFlowConfigV2, Tenant, TenantContextType, TenantKeyMentorIdParams, TenantMetadata, TimeTrackerConfig, TimeTrackerState, TopTrialBannerProps, UploadProgressCallback, UseChatProps, UseChatReturn, UseExternalPricingProps, UseProfileImageUploadOptions, UseProfileImageUploadReturn, UseTimeTrackerConfig, UseTimeTrackerNativeConfig, UseTimeTrackerNativeReturn, UseTimeTrackerReturn, UseUserProfileUpdateResult, UserProfileUpdateData };
package/dist/index.esm.js CHANGED
@@ -3950,7 +3950,7 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
3950
3950
  mentorDbId = await getMentorDbId(mentor);
3951
3951
  }
3952
3952
  // Load permissions if we have a mentor DB ID and user is logged in
3953
- if (mentorDbId && isLoggedIn && !userIsAccessingPublicRoute) {
3953
+ if (mentorDbId && isLoggedIn) {
3954
3954
  const rbacPermissions = await loadMentorsPermissions(mentorDbId);
3955
3955
  onLoadMentorsPermissions === null || onLoadMentorsPermissions === void 0 ? void 0 : onLoadMentorsPermissions(rbacPermissions);
3956
3956
  }
@@ -3997,9 +3997,7 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
3997
3997
  }
3998
3998
  else {
3999
3999
  console.log("requested mentor exists in tenant, proceeding", requestedMentorId);
4000
- if (requestedMentorDbId &&
4001
- isLoggedIn &&
4002
- !userIsAccessingPublicRoute) {
4000
+ if (requestedMentorDbId && isLoggedIn) {
4003
4001
  const rbacPermissions = await loadMentorsPermissions(requestedMentorDbId);
4004
4002
  onLoadMentorsPermissions === null || onLoadMentorsPermissions === void 0 ? void 0 : onLoadMentorsPermissions(rbacPermissions);
4005
4003
  }