@iblai/web-utils 1.1.11 → 1.1.13
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/data-layer/src/features/retirement/api-slice.d.ts +165 -0
- package/dist/data-layer/src/features/retirement/constants.d.ts +7 -0
- package/dist/data-layer/src/features/retirement/types.d.ts +3 -0
- package/dist/data-layer/src/index.d.ts +5 -0
- package/dist/index.d.ts +7 -7
- package/dist/index.esm.js +61 -9
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +61 -9
- package/dist/index.js.map +1 -1
- package/dist/package.json +8 -1
- package/dist/web-utils/src/features/chat/slice.d.ts +3 -3
- package/dist/web-utils/src/features/files/filesSlice.d.ts +2 -2
- package/dist/web-utils/src/index.mobile.d.ts +2 -54
- package/dist/web-utils/src/index.web.d.ts +2 -54
- package/package.json +8 -1
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { SelfRetireResponse } from './types';
|
|
2
|
+
export declare const retirementApiSlice: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<import("@data-layer/features/utils").CustomQueryArgs, unknown, import("@data-layer/features/utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, {
|
|
3
|
+
selfRetire: import("@reduxjs/toolkit/query").MutationDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<import("@data-layer/features/utils").CustomQueryArgs, unknown, import("@data-layer/features/utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, SelfRetireResponse, "retirementApiSlice", unknown>;
|
|
4
|
+
}, "retirementApiSlice", never, typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/dist/query/react").reactHooksModuleName>;
|
|
5
|
+
export declare const useSelfRetireMutation: <R extends Record<string, any> = ({
|
|
6
|
+
requestId?: undefined;
|
|
7
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
|
|
8
|
+
data?: undefined;
|
|
9
|
+
error?: undefined;
|
|
10
|
+
endpointName?: string;
|
|
11
|
+
startedTimeStamp?: undefined;
|
|
12
|
+
fulfilledTimeStamp?: undefined;
|
|
13
|
+
} & {
|
|
14
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
|
|
15
|
+
isUninitialized: true;
|
|
16
|
+
isLoading: false;
|
|
17
|
+
isSuccess: false;
|
|
18
|
+
isError: false;
|
|
19
|
+
}) | ({
|
|
20
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
|
|
21
|
+
} & Omit<{
|
|
22
|
+
requestId: string;
|
|
23
|
+
data?: SelfRetireResponse | undefined;
|
|
24
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
25
|
+
endpointName: string;
|
|
26
|
+
startedTimeStamp: number;
|
|
27
|
+
fulfilledTimeStamp?: number;
|
|
28
|
+
}, "data" | "fulfilledTimeStamp"> & Required<Pick<{
|
|
29
|
+
requestId: string;
|
|
30
|
+
data?: SelfRetireResponse | undefined;
|
|
31
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
32
|
+
endpointName: string;
|
|
33
|
+
startedTimeStamp: number;
|
|
34
|
+
fulfilledTimeStamp?: number;
|
|
35
|
+
}, "data" | "fulfilledTimeStamp">> & {
|
|
36
|
+
error: undefined;
|
|
37
|
+
} & {
|
|
38
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
|
|
39
|
+
isUninitialized: false;
|
|
40
|
+
isLoading: false;
|
|
41
|
+
isSuccess: true;
|
|
42
|
+
isError: false;
|
|
43
|
+
}) | ({
|
|
44
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.pending;
|
|
45
|
+
} & {
|
|
46
|
+
requestId: string;
|
|
47
|
+
data?: SelfRetireResponse | undefined;
|
|
48
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
49
|
+
endpointName: string;
|
|
50
|
+
startedTimeStamp: number;
|
|
51
|
+
fulfilledTimeStamp?: number;
|
|
52
|
+
} & {
|
|
53
|
+
data?: undefined;
|
|
54
|
+
} & {
|
|
55
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.pending;
|
|
56
|
+
isUninitialized: false;
|
|
57
|
+
isLoading: true;
|
|
58
|
+
isSuccess: false;
|
|
59
|
+
isError: false;
|
|
60
|
+
}) | ({
|
|
61
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
|
|
62
|
+
} & Omit<{
|
|
63
|
+
requestId: string;
|
|
64
|
+
data?: SelfRetireResponse | undefined;
|
|
65
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
66
|
+
endpointName: string;
|
|
67
|
+
startedTimeStamp: number;
|
|
68
|
+
fulfilledTimeStamp?: number;
|
|
69
|
+
}, "error"> & Required<Pick<{
|
|
70
|
+
requestId: string;
|
|
71
|
+
data?: SelfRetireResponse | undefined;
|
|
72
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
73
|
+
endpointName: string;
|
|
74
|
+
startedTimeStamp: number;
|
|
75
|
+
fulfilledTimeStamp?: number;
|
|
76
|
+
}, "error">> & {
|
|
77
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
|
|
78
|
+
isUninitialized: false;
|
|
79
|
+
isLoading: false;
|
|
80
|
+
isSuccess: false;
|
|
81
|
+
isError: true;
|
|
82
|
+
})>(options?: {
|
|
83
|
+
selectFromResult?: ((state: ({
|
|
84
|
+
requestId?: undefined;
|
|
85
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
|
|
86
|
+
data?: undefined;
|
|
87
|
+
error?: undefined;
|
|
88
|
+
endpointName?: string;
|
|
89
|
+
startedTimeStamp?: undefined;
|
|
90
|
+
fulfilledTimeStamp?: undefined;
|
|
91
|
+
} & {
|
|
92
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
|
|
93
|
+
isUninitialized: true;
|
|
94
|
+
isLoading: false;
|
|
95
|
+
isSuccess: false;
|
|
96
|
+
isError: false;
|
|
97
|
+
}) | ({
|
|
98
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
|
|
99
|
+
} & Omit<{
|
|
100
|
+
requestId: string;
|
|
101
|
+
data?: SelfRetireResponse | undefined;
|
|
102
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
103
|
+
endpointName: string;
|
|
104
|
+
startedTimeStamp: number;
|
|
105
|
+
fulfilledTimeStamp?: number;
|
|
106
|
+
}, "data" | "fulfilledTimeStamp"> & Required<Pick<{
|
|
107
|
+
requestId: string;
|
|
108
|
+
data?: SelfRetireResponse | undefined;
|
|
109
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
110
|
+
endpointName: string;
|
|
111
|
+
startedTimeStamp: number;
|
|
112
|
+
fulfilledTimeStamp?: number;
|
|
113
|
+
}, "data" | "fulfilledTimeStamp">> & {
|
|
114
|
+
error: undefined;
|
|
115
|
+
} & {
|
|
116
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
|
|
117
|
+
isUninitialized: false;
|
|
118
|
+
isLoading: false;
|
|
119
|
+
isSuccess: true;
|
|
120
|
+
isError: false;
|
|
121
|
+
}) | ({
|
|
122
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.pending;
|
|
123
|
+
} & {
|
|
124
|
+
requestId: string;
|
|
125
|
+
data?: SelfRetireResponse | undefined;
|
|
126
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
127
|
+
endpointName: string;
|
|
128
|
+
startedTimeStamp: number;
|
|
129
|
+
fulfilledTimeStamp?: number;
|
|
130
|
+
} & {
|
|
131
|
+
data?: undefined;
|
|
132
|
+
} & {
|
|
133
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.pending;
|
|
134
|
+
isUninitialized: false;
|
|
135
|
+
isLoading: true;
|
|
136
|
+
isSuccess: false;
|
|
137
|
+
isError: false;
|
|
138
|
+
}) | ({
|
|
139
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
|
|
140
|
+
} & Omit<{
|
|
141
|
+
requestId: string;
|
|
142
|
+
data?: SelfRetireResponse | undefined;
|
|
143
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
144
|
+
endpointName: string;
|
|
145
|
+
startedTimeStamp: number;
|
|
146
|
+
fulfilledTimeStamp?: number;
|
|
147
|
+
}, "error"> & Required<Pick<{
|
|
148
|
+
requestId: string;
|
|
149
|
+
data?: SelfRetireResponse | undefined;
|
|
150
|
+
error?: import("@data-layer/features/utils").ExtendedFetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
151
|
+
endpointName: string;
|
|
152
|
+
startedTimeStamp: number;
|
|
153
|
+
fulfilledTimeStamp?: number;
|
|
154
|
+
}, "error">> & {
|
|
155
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
|
|
156
|
+
isUninitialized: false;
|
|
157
|
+
isLoading: false;
|
|
158
|
+
isSuccess: false;
|
|
159
|
+
isError: true;
|
|
160
|
+
})) => R) | undefined;
|
|
161
|
+
fixedCacheKey?: string;
|
|
162
|
+
} | undefined) => readonly [(arg: void) => import("@reduxjs/toolkit/query").MutationActionCreatorResult<import("@reduxjs/toolkit/query").MutationDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<import("@data-layer/features/utils").CustomQueryArgs, unknown, import("@data-layer/features/utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, SelfRetireResponse, "retirementApiSlice", unknown>>, import("@reduxjs/toolkit/query").TSHelpersNoInfer<R> & {
|
|
163
|
+
originalArgs?: void | undefined;
|
|
164
|
+
reset: () => void;
|
|
165
|
+
}];
|
|
@@ -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';
|
|
@@ -74,6 +75,9 @@ export * from './features/core/custom-public-image-asset-api-slice';
|
|
|
74
75
|
export * from './features/edx-proctoring/api-slice';
|
|
75
76
|
export * from './features/edx-proctoring/constants';
|
|
76
77
|
export * from './features/edx-proctoring/types';
|
|
78
|
+
export * from './features/retirement/api-slice';
|
|
79
|
+
export * from './features/retirement/constants';
|
|
80
|
+
export * from './features/retirement/types';
|
|
77
81
|
export * from './features/disclaimers/api-slice';
|
|
78
82
|
export * from './features/disclaimers/constants';
|
|
79
83
|
export * from './features/disclaimers/types';
|
|
@@ -85,4 +89,5 @@ export * from './features/projects/constants';
|
|
|
85
89
|
export type { Project, ProjectsFetchResponse, GetProjectsParams, GetProjectsArgs, GetProjectDetailsArgs, CreateProjectData, CreateProjectArgs, UpdateProjectData, UpdateProjectArgs, DeleteProjectArgs, } from './features/projects/types';
|
|
86
90
|
export * from './reducers';
|
|
87
91
|
export * from './utils';
|
|
92
|
+
export type { CustomQueryArgs } from './features/utils';
|
|
88
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
|
|
|
@@ -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<
|
|
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<
|
|
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.
|
|
@@ -1509,7 +1509,7 @@ type Props$2 = {
|
|
|
1509
1509
|
* 4. Handles redirects to auth SPA when needed
|
|
1510
1510
|
* 5. Manages public route access state
|
|
1511
1511
|
*/
|
|
1512
|
-
declare function AuthProvider({ children, fallback, middleware, onAuthSuccess, onAuthFailure, redirectToAuthSpa, hasNonExpiredAuthToken, username, pathname, skipAuthCheck, storageService, token, enableStorageSync, skip, }: Props$2): string | number | bigint | boolean | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> |
|
|
1512
|
+
declare function AuthProvider({ children, fallback, middleware, onAuthSuccess, onAuthFailure, redirectToAuthSpa, hasNonExpiredAuthToken, username, pathname, skipAuthCheck, storageService, token, enableStorageSync, skip, }: Props$2): string | number | bigint | boolean | react_jsx_runtime.JSX.Element | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | null | undefined;
|
|
1513
1513
|
|
|
1514
1514
|
/**
|
|
1515
1515
|
* Props for the MentorProvider component
|
|
@@ -1542,7 +1542,7 @@ type Props$1 = {
|
|
|
1542
1542
|
* 3. Manages redirection based on mentor availability
|
|
1543
1543
|
* 4. Integrates with tenant context for access control
|
|
1544
1544
|
*/
|
|
1545
|
-
declare function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redirectToAuthSpa, redirectToMentor, onLoadMentorsPermissions, redirectToNoMentorsPage, redirectToCreateMentor, username, isAdmin, mainTenantKey, requestedMentorId, handleMentorNotFound, forceDetermineMentor, onComplete, skip, }: Props$1): string | number | bigint | boolean | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> |
|
|
1545
|
+
declare function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redirectToAuthSpa, redirectToMentor, onLoadMentorsPermissions, redirectToNoMentorsPage, redirectToCreateMentor, username, isAdmin, mainTenantKey, requestedMentorId, handleMentorNotFound, forceDetermineMentor, onComplete, skip, }: Props$1): string | number | bigint | boolean | react_jsx_runtime.JSX.Element | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | null | undefined;
|
|
1546
1546
|
|
|
1547
1547
|
/**
|
|
1548
1548
|
* Type definition for the tenant context
|
|
@@ -1604,7 +1604,7 @@ type Props = {
|
|
|
1604
1604
|
* 4. Handles tenant-specific domain redirects
|
|
1605
1605
|
* 5. Maintains tenant access state
|
|
1606
1606
|
*/
|
|
1607
|
-
declare function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, currentTenant, requestedTenant, saveCurrentTenant, saveUserTenants, handleTenantSwitch, saveVisitingTenant, removeVisitingTenant, saveUserTokens, saveTenant, onAutoJoinUserToTenant, redirectToAuthSpa, username, isIframed, setUseMentorProvider, skip, onLoadPlatformPermissions, }: Props): string | number | bigint | boolean | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> |
|
|
1607
|
+
declare function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, currentTenant, requestedTenant, saveCurrentTenant, saveUserTenants, handleTenantSwitch, saveVisitingTenant, removeVisitingTenant, saveUserTokens, saveTenant, onAutoJoinUserToTenant, redirectToAuthSpa, username, isIframed, setUseMentorProvider, skip, onLoadPlatformPermissions, }: Props): string | number | bigint | boolean | react_jsx_runtime.JSX.Element | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | null | undefined;
|
|
1608
1608
|
|
|
1609
1609
|
/**
|
|
1610
1610
|
* Chat area size constants
|
|
@@ -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
|
@@ -7070,21 +7070,30 @@ const useChat = ({ wsUrl, wsToken, flowConfig, sessionId, stopGenerationWsUrl, e
|
|
|
7070
7070
|
connectionAttempts.current >
|
|
7071
7071
|
MAX_INITIAL_WEBSOCKET_CONNECTION_ATTEMPTS;
|
|
7072
7072
|
if (shouldShowError) {
|
|
7073
|
-
console.error(
|
|
7073
|
+
console.error("[ws-error] WebSocket connection error exceeded max attempts", {
|
|
7074
|
+
error,
|
|
7075
|
+
wsUrl,
|
|
7074
7076
|
tenant: flowConfig === null || flowConfig === void 0 ? void 0 : flowConfig.tenant,
|
|
7075
7077
|
mentorId: flowConfig === null || flowConfig === void 0 ? void 0 : flowConfig.name,
|
|
7076
7078
|
username: flowConfig === null || flowConfig === void 0 ? void 0 : flowConfig.username,
|
|
7079
|
+
sessionId: sessionIdRef.current,
|
|
7080
|
+
isInitialConnection: isInitialConnection.current,
|
|
7077
7081
|
connectionAttempts: connectionAttempts.current,
|
|
7078
7082
|
maxAttempts: MAX_INITIAL_WEBSOCKET_CONNECTION_ATTEMPTS,
|
|
7079
|
-
|
|
7080
|
-
|
|
7081
|
-
})
|
|
7082
|
-
errorHandler === null || errorHandler === void 0 ? void 0 : errorHandler("Failed to connect to the mentor", error);
|
|
7083
|
+
readyState: socket.readyState,
|
|
7084
|
+
timestamp: new Date().toISOString(),
|
|
7085
|
+
});
|
|
7083
7086
|
onStatusChange("error");
|
|
7084
7087
|
reject(error);
|
|
7085
7088
|
}
|
|
7086
7089
|
else {
|
|
7087
|
-
console.warn(
|
|
7090
|
+
console.warn(`[ws-error] Initial connection attempt ${connectionAttempts.current}/${MAX_INITIAL_WEBSOCKET_CONNECTION_ATTEMPTS} failed, will retry...`, {
|
|
7091
|
+
wsUrl,
|
|
7092
|
+
tenant: flowConfig === null || flowConfig === void 0 ? void 0 : flowConfig.tenant,
|
|
7093
|
+
mentorId: flowConfig === null || flowConfig === void 0 ? void 0 : flowConfig.name,
|
|
7094
|
+
readyState: socket.readyState,
|
|
7095
|
+
timestamp: new Date().toISOString(),
|
|
7096
|
+
});
|
|
7088
7097
|
}
|
|
7089
7098
|
onStreamingChange === null || onStreamingChange === void 0 ? void 0 : onStreamingChange(false);
|
|
7090
7099
|
});
|
|
@@ -7764,7 +7773,19 @@ const useChat = ({ wsUrl, wsToken, flowConfig, sessionId, stopGenerationWsUrl, e
|
|
|
7764
7773
|
onStreamingChange === null || onStreamingChange === void 0 ? void 0 : onStreamingChange(false);
|
|
7765
7774
|
return;
|
|
7766
7775
|
}
|
|
7767
|
-
|
|
7776
|
+
console.error("[ws-error] WebSocket error on active connection", {
|
|
7777
|
+
error,
|
|
7778
|
+
wsUrl,
|
|
7779
|
+
tenant: flowConfig === null || flowConfig === void 0 ? void 0 : flowConfig.tenant,
|
|
7780
|
+
mentorId: flowConfig === null || flowConfig === void 0 ? void 0 : flowConfig.name,
|
|
7781
|
+
username: flowConfig === null || flowConfig === void 0 ? void 0 : flowConfig.username,
|
|
7782
|
+
sessionId: sessionIdRef.current,
|
|
7783
|
+
isInitialConnection: isInitialConnection.current,
|
|
7784
|
+
connectionAttempts: connectionAttempts.current,
|
|
7785
|
+
readyState: socket.readyState,
|
|
7786
|
+
isConnected: isConnected.current,
|
|
7787
|
+
timestamp: new Date().toISOString(),
|
|
7788
|
+
});
|
|
7768
7789
|
onStreamingChange === null || onStreamingChange === void 0 ? void 0 : onStreamingChange(false);
|
|
7769
7790
|
onStatusChange("error");
|
|
7770
7791
|
});
|
|
@@ -7797,7 +7818,16 @@ const useChat = ({ wsUrl, wsToken, flowConfig, sessionId, stopGenerationWsUrl, e
|
|
|
7797
7818
|
if (isInitialConnection.current &&
|
|
7798
7819
|
connectionAttempts.current >=
|
|
7799
7820
|
MAX_INITIAL_WEBSOCKET_CONNECTION_ATTEMPTS) {
|
|
7800
|
-
|
|
7821
|
+
console.error("[ws-close] Failed to connect to the mentor after multiple attempts", {
|
|
7822
|
+
wsUrl,
|
|
7823
|
+
tenant: flowConfig === null || flowConfig === void 0 ? void 0 : flowConfig.tenant,
|
|
7824
|
+
mentorId: flowConfig === null || flowConfig === void 0 ? void 0 : flowConfig.name,
|
|
7825
|
+
username: flowConfig === null || flowConfig === void 0 ? void 0 : flowConfig.username,
|
|
7826
|
+
sessionId: sessionIdRef.current,
|
|
7827
|
+
connectionAttempts: connectionAttempts.current,
|
|
7828
|
+
maxAttempts: MAX_INITIAL_WEBSOCKET_CONNECTION_ATTEMPTS,
|
|
7829
|
+
timestamp: new Date().toISOString(),
|
|
7830
|
+
});
|
|
7801
7831
|
onStatusChange("error");
|
|
7802
7832
|
isInitialConnection.current = false;
|
|
7803
7833
|
}
|
|
@@ -13969,7 +13999,7 @@ const mentorApiSlice = createApi({
|
|
|
13969
13999
|
dispatch(mentorApiSlice.util.updateQueryData('getShareableLink', {
|
|
13970
14000
|
mentor: updateData.mentor,
|
|
13971
14001
|
org: updateData.org,
|
|
13972
|
-
// @ts-
|
|
14002
|
+
// @ts-expect-error userId may not be in the type
|
|
13973
14003
|
userId: updateData.userId,
|
|
13974
14004
|
}, (draft) => {
|
|
13975
14005
|
var _a;
|
|
@@ -17101,6 +17131,28 @@ createApi({
|
|
|
17101
17131
|
}),
|
|
17102
17132
|
});
|
|
17103
17133
|
|
|
17134
|
+
const RETIREMENT_ENDPOINTS = {
|
|
17135
|
+
SELF_RETIRE: {
|
|
17136
|
+
service: SERVICES.LMS,
|
|
17137
|
+
path: () => `/api/ibl/retirements/self_retire/`,
|
|
17138
|
+
},
|
|
17139
|
+
};
|
|
17140
|
+
|
|
17141
|
+
createApi({
|
|
17142
|
+
reducerPath: 'retirementApiSlice',
|
|
17143
|
+
baseQuery: iblFetchBaseQuery,
|
|
17144
|
+
endpoints: (builder) => ({
|
|
17145
|
+
selfRetire: builder.mutation({
|
|
17146
|
+
query: () => ({
|
|
17147
|
+
url: RETIREMENT_ENDPOINTS.SELF_RETIRE.path(),
|
|
17148
|
+
service: RETIREMENT_ENDPOINTS.SELF_RETIRE.service,
|
|
17149
|
+
method: 'POST',
|
|
17150
|
+
isJson: true,
|
|
17151
|
+
}),
|
|
17152
|
+
}),
|
|
17153
|
+
}),
|
|
17154
|
+
});
|
|
17155
|
+
|
|
17104
17156
|
const DISCLAIMERS_REDUCER_PATH = 'disclaimersApiSlice';
|
|
17105
17157
|
const DISCLAIMERS_ENDPOINTS = {
|
|
17106
17158
|
GET_DISCLAIMERS: {
|