@iblai/web-utils 1.1.9 → 1.1.10

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.
@@ -0,0 +1,311 @@
1
+ export declare const analyticsCustomSlice: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<import("../utils").CustomQueryArgs, unknown, import("../utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, {
2
+ getDownloadReportFromURL: import("@reduxjs/toolkit/query").QueryDefinition<{
3
+ url: string;
4
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<import("../utils").CustomQueryArgs, unknown, import("../utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "Analytics", Blob, "analyticsCustomApiSlice", unknown>;
5
+ }, "analyticsCustomApiSlice", "Analytics", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/dist/query/react").reactHooksModuleName>;
6
+ export declare const useGetDownloadReportFromURLQuery: <R extends Record<string, any> = import("@reduxjs/toolkit/query").TSHelpersId<(Omit<{
7
+ status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
8
+ originalArgs?: undefined | undefined;
9
+ data?: undefined | undefined;
10
+ error?: undefined | undefined;
11
+ requestId?: undefined | undefined;
12
+ endpointName?: string | undefined;
13
+ startedTimeStamp?: undefined | undefined;
14
+ fulfilledTimeStamp?: undefined | undefined;
15
+ } & {
16
+ currentData?: Blob | undefined;
17
+ isUninitialized: false;
18
+ isLoading: false;
19
+ isFetching: false;
20
+ isSuccess: false;
21
+ isError: false;
22
+ }, "isUninitialized"> & {
23
+ isUninitialized: true;
24
+ }) | import("@reduxjs/toolkit/query").TSHelpersOverride<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<{
25
+ url: string;
26
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<import("../utils").CustomQueryArgs, unknown, import("../utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "Analytics", Blob, "analyticsCustomApiSlice", unknown>> & {
27
+ currentData?: Blob | undefined;
28
+ isUninitialized: false;
29
+ isLoading: false;
30
+ isFetching: false;
31
+ isSuccess: false;
32
+ isError: false;
33
+ }, {
34
+ isLoading: true;
35
+ isFetching: boolean;
36
+ data: undefined;
37
+ } | ({
38
+ isSuccess: true;
39
+ isFetching: true;
40
+ error: undefined;
41
+ } & Required<Pick<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<{
42
+ url: string;
43
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<import("../utils").CustomQueryArgs, unknown, import("../utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "Analytics", Blob, "analyticsCustomApiSlice", unknown>> & {
44
+ currentData?: Blob | undefined;
45
+ isUninitialized: false;
46
+ isLoading: false;
47
+ isFetching: false;
48
+ isSuccess: false;
49
+ isError: false;
50
+ }, "data" | "fulfilledTimeStamp">>) | ({
51
+ isSuccess: true;
52
+ isFetching: false;
53
+ error: undefined;
54
+ } & Required<Pick<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<{
55
+ url: string;
56
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<import("../utils").CustomQueryArgs, unknown, import("../utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "Analytics", Blob, "analyticsCustomApiSlice", unknown>> & {
57
+ currentData?: Blob | undefined;
58
+ isUninitialized: false;
59
+ isLoading: false;
60
+ isFetching: false;
61
+ isSuccess: false;
62
+ isError: false;
63
+ }, "data" | "fulfilledTimeStamp" | "currentData">>) | ({
64
+ isError: true;
65
+ } & Required<Pick<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<{
66
+ url: string;
67
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<import("../utils").CustomQueryArgs, unknown, import("../utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "Analytics", Blob, "analyticsCustomApiSlice", unknown>> & {
68
+ currentData?: Blob | undefined;
69
+ isUninitialized: false;
70
+ isLoading: false;
71
+ isFetching: false;
72
+ isSuccess: false;
73
+ isError: false;
74
+ }, "error">>)>> & {
75
+ status: import("@reduxjs/toolkit/query").QueryStatus;
76
+ }>(arg: {
77
+ url: string;
78
+ } | typeof import("@reduxjs/toolkit/query").skipToken, options?: (import("@reduxjs/toolkit/query").SubscriptionOptions & {
79
+ skip?: boolean;
80
+ refetchOnMountOrArgChange?: boolean | number;
81
+ } & {
82
+ skip?: boolean;
83
+ selectFromResult?: ((state: import("@reduxjs/toolkit/query").TSHelpersId<(Omit<{
84
+ status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
85
+ originalArgs?: undefined | undefined;
86
+ data?: undefined | undefined;
87
+ error?: undefined | undefined;
88
+ requestId?: undefined | undefined;
89
+ endpointName?: string | undefined;
90
+ startedTimeStamp?: undefined | undefined;
91
+ fulfilledTimeStamp?: undefined | undefined;
92
+ } & {
93
+ currentData?: Blob | undefined;
94
+ isUninitialized: false;
95
+ isLoading: false;
96
+ isFetching: false;
97
+ isSuccess: false;
98
+ isError: false;
99
+ }, "isUninitialized"> & {
100
+ isUninitialized: true;
101
+ }) | import("@reduxjs/toolkit/query").TSHelpersOverride<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<{
102
+ url: string;
103
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<import("../utils").CustomQueryArgs, unknown, import("../utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "Analytics", Blob, "analyticsCustomApiSlice", unknown>> & {
104
+ currentData?: Blob | undefined;
105
+ isUninitialized: false;
106
+ isLoading: false;
107
+ isFetching: false;
108
+ isSuccess: false;
109
+ isError: false;
110
+ }, {
111
+ isLoading: true;
112
+ isFetching: boolean;
113
+ data: undefined;
114
+ } | ({
115
+ isSuccess: true;
116
+ isFetching: true;
117
+ error: undefined;
118
+ } & Required<Pick<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<{
119
+ url: string;
120
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<import("../utils").CustomQueryArgs, unknown, import("../utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "Analytics", Blob, "analyticsCustomApiSlice", unknown>> & {
121
+ currentData?: Blob | undefined;
122
+ isUninitialized: false;
123
+ isLoading: false;
124
+ isFetching: false;
125
+ isSuccess: false;
126
+ isError: false;
127
+ }, "data" | "fulfilledTimeStamp">>) | ({
128
+ isSuccess: true;
129
+ isFetching: false;
130
+ error: undefined;
131
+ } & Required<Pick<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<{
132
+ url: string;
133
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<import("../utils").CustomQueryArgs, unknown, import("../utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "Analytics", Blob, "analyticsCustomApiSlice", unknown>> & {
134
+ currentData?: Blob | undefined;
135
+ isUninitialized: false;
136
+ isLoading: false;
137
+ isFetching: false;
138
+ isSuccess: false;
139
+ isError: false;
140
+ }, "data" | "fulfilledTimeStamp" | "currentData">>) | ({
141
+ isError: true;
142
+ } & Required<Pick<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<{
143
+ url: string;
144
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<import("../utils").CustomQueryArgs, unknown, import("../utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "Analytics", Blob, "analyticsCustomApiSlice", unknown>> & {
145
+ currentData?: Blob | undefined;
146
+ isUninitialized: false;
147
+ isLoading: false;
148
+ isFetching: false;
149
+ isSuccess: false;
150
+ isError: false;
151
+ }, "error">>)>> & {
152
+ status: import("@reduxjs/toolkit/query").QueryStatus;
153
+ }) => R) | undefined;
154
+ }) | undefined) => [R][R extends any ? 0 : never] & {
155
+ refetch: () => import("@reduxjs/toolkit/query").QueryActionCreatorResult<import("@reduxjs/toolkit/query").QueryDefinition<{
156
+ url: string;
157
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<import("../utils").CustomQueryArgs, unknown, import("../utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "Analytics", Blob, "analyticsCustomApiSlice", unknown>>;
158
+ }, useLazyGetDownloadReportFromURLQuery: <R extends Record<string, any> = import("@reduxjs/toolkit/query").TSHelpersId<(Omit<{
159
+ status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
160
+ originalArgs?: undefined | undefined;
161
+ data?: undefined | undefined;
162
+ error?: undefined | undefined;
163
+ requestId?: undefined | undefined;
164
+ endpointName?: string | undefined;
165
+ startedTimeStamp?: undefined | undefined;
166
+ fulfilledTimeStamp?: undefined | undefined;
167
+ } & {
168
+ currentData?: Blob | undefined;
169
+ isUninitialized: false;
170
+ isLoading: false;
171
+ isFetching: false;
172
+ isSuccess: false;
173
+ isError: false;
174
+ }, "isUninitialized"> & {
175
+ isUninitialized: true;
176
+ }) | import("@reduxjs/toolkit/query").TSHelpersOverride<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<{
177
+ url: string;
178
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<import("../utils").CustomQueryArgs, unknown, import("../utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "Analytics", Blob, "analyticsCustomApiSlice", unknown>> & {
179
+ currentData?: Blob | undefined;
180
+ isUninitialized: false;
181
+ isLoading: false;
182
+ isFetching: false;
183
+ isSuccess: false;
184
+ isError: false;
185
+ }, {
186
+ isLoading: true;
187
+ isFetching: boolean;
188
+ data: undefined;
189
+ } | ({
190
+ isSuccess: true;
191
+ isFetching: true;
192
+ error: undefined;
193
+ } & Required<Pick<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<{
194
+ url: string;
195
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<import("../utils").CustomQueryArgs, unknown, import("../utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "Analytics", Blob, "analyticsCustomApiSlice", unknown>> & {
196
+ currentData?: Blob | undefined;
197
+ isUninitialized: false;
198
+ isLoading: false;
199
+ isFetching: false;
200
+ isSuccess: false;
201
+ isError: false;
202
+ }, "data" | "fulfilledTimeStamp">>) | ({
203
+ isSuccess: true;
204
+ isFetching: false;
205
+ error: undefined;
206
+ } & Required<Pick<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<{
207
+ url: string;
208
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<import("../utils").CustomQueryArgs, unknown, import("../utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "Analytics", Blob, "analyticsCustomApiSlice", unknown>> & {
209
+ currentData?: Blob | undefined;
210
+ isUninitialized: false;
211
+ isLoading: false;
212
+ isFetching: false;
213
+ isSuccess: false;
214
+ isError: false;
215
+ }, "data" | "fulfilledTimeStamp" | "currentData">>) | ({
216
+ isError: true;
217
+ } & Required<Pick<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<{
218
+ url: string;
219
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<import("../utils").CustomQueryArgs, unknown, import("../utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "Analytics", Blob, "analyticsCustomApiSlice", unknown>> & {
220
+ currentData?: Blob | undefined;
221
+ isUninitialized: false;
222
+ isLoading: false;
223
+ isFetching: false;
224
+ isSuccess: false;
225
+ isError: false;
226
+ }, "error">>)>> & {
227
+ status: import("@reduxjs/toolkit/query").QueryStatus;
228
+ }>(options?: (import("@reduxjs/toolkit/query").SubscriptionOptions & Omit<{
229
+ skip?: boolean;
230
+ selectFromResult?: ((state: import("@reduxjs/toolkit/query").TSHelpersId<(Omit<{
231
+ status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
232
+ originalArgs?: undefined | undefined;
233
+ data?: undefined | undefined;
234
+ error?: undefined | undefined;
235
+ requestId?: undefined | undefined;
236
+ endpointName?: string | undefined;
237
+ startedTimeStamp?: undefined | undefined;
238
+ fulfilledTimeStamp?: undefined | undefined;
239
+ } & {
240
+ currentData?: Blob | undefined;
241
+ isUninitialized: false;
242
+ isLoading: false;
243
+ isFetching: false;
244
+ isSuccess: false;
245
+ isError: false;
246
+ }, "isUninitialized"> & {
247
+ isUninitialized: true;
248
+ }) | import("@reduxjs/toolkit/query").TSHelpersOverride<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<{
249
+ url: string;
250
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<import("../utils").CustomQueryArgs, unknown, import("../utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "Analytics", Blob, "analyticsCustomApiSlice", unknown>> & {
251
+ currentData?: Blob | undefined;
252
+ isUninitialized: false;
253
+ isLoading: false;
254
+ isFetching: false;
255
+ isSuccess: false;
256
+ isError: false;
257
+ }, {
258
+ isLoading: true;
259
+ isFetching: boolean;
260
+ data: undefined;
261
+ } | ({
262
+ isSuccess: true;
263
+ isFetching: true;
264
+ error: undefined;
265
+ } & Required<Pick<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<{
266
+ url: string;
267
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<import("../utils").CustomQueryArgs, unknown, import("../utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "Analytics", Blob, "analyticsCustomApiSlice", unknown>> & {
268
+ currentData?: Blob | undefined;
269
+ isUninitialized: false;
270
+ isLoading: false;
271
+ isFetching: false;
272
+ isSuccess: false;
273
+ isError: false;
274
+ }, "data" | "fulfilledTimeStamp">>) | ({
275
+ isSuccess: true;
276
+ isFetching: false;
277
+ error: undefined;
278
+ } & Required<Pick<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<{
279
+ url: string;
280
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<import("../utils").CustomQueryArgs, unknown, import("../utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "Analytics", Blob, "analyticsCustomApiSlice", unknown>> & {
281
+ currentData?: Blob | undefined;
282
+ isUninitialized: false;
283
+ isLoading: false;
284
+ isFetching: false;
285
+ isSuccess: false;
286
+ isError: false;
287
+ }, "data" | "fulfilledTimeStamp" | "currentData">>) | ({
288
+ isError: true;
289
+ } & Required<Pick<import("@reduxjs/toolkit/query").QuerySubState<import("@reduxjs/toolkit/query").QueryDefinition<{
290
+ url: string;
291
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<import("../utils").CustomQueryArgs, unknown, import("../utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "Analytics", Blob, "analyticsCustomApiSlice", unknown>> & {
292
+ currentData?: Blob | undefined;
293
+ isUninitialized: false;
294
+ isLoading: false;
295
+ isFetching: false;
296
+ isSuccess: false;
297
+ isError: false;
298
+ }, "error">>)>> & {
299
+ status: import("@reduxjs/toolkit/query").QueryStatus;
300
+ }) => R) | undefined;
301
+ }, "skip">) | undefined) => [(arg: {
302
+ url: string;
303
+ }, preferCacheValue?: boolean) => import("@reduxjs/toolkit/query").QueryActionCreatorResult<import("@reduxjs/toolkit/query").QueryDefinition<{
304
+ url: string;
305
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<import("../utils").CustomQueryArgs, unknown, import("../utils").ExtendedFetchBaseQueryError, Record<string, unknown>, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, "Analytics", Blob, "analyticsCustomApiSlice", unknown>>, [R][R extends any ? 0 : never] & {
306
+ reset: () => void;
307
+ }, {
308
+ lastArg: {
309
+ url: string;
310
+ };
311
+ }];
@@ -30,6 +30,7 @@ export * from './features/sessions/api-slice';
30
30
  export * from './features/datasets/api-slice';
31
31
  export * from './features/tools/api-slice';
32
32
  export * from './features/analytics/api-slice';
33
+ export * from './features/analytics/custom-api-slice';
33
34
  export * from './features/analytics/types';
34
35
  export * from './features/reports/api-slice';
35
36
  export * from './features/catalog/api-slice';
package/dist/index.d.ts CHANGED
@@ -8,7 +8,6 @@ import { OpUnitType } from 'dayjs';
8
8
  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
- import * as redux from 'redux';
12
11
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
13
12
  import { Slice } from '@reduxjs/toolkit';
14
13
  import * as react_jsx_runtime from 'react/jsx-runtime';
@@ -809,7 +808,7 @@ declare function handleLogout(options: HandleLogoutOptions): void;
809
808
 
810
809
  declare const isReactNative: () => boolean;
811
810
  declare const isWeb: () => boolean;
812
- declare const isNode: () => string | false;
811
+ declare const isNode: () => any;
813
812
  declare const isExpo: () => any;
814
813
  declare const isTauri: () => boolean;
815
814
  declare const getPlatform: () => "web" | "react-native" | "node" | "unknown";
@@ -869,7 +868,7 @@ type ChatSliceState = {
869
868
  lastArtifactContentFlushTime: number;
870
869
  };
871
870
  declare const chatActions: _reduxjs_toolkit.CaseReducerActions<_reduxjs_toolkit.SliceCaseReducers<ChatSliceState>, string>;
872
- declare const chatSliceReducerShared: redux.Reducer<ChatSliceState>;
871
+ declare const chatSliceReducerShared: Reducer<State>;
873
872
  declare const selectChats: (state: {
874
873
  chatSliceShared: ChatSliceState;
875
874
  }) => ChatState;
@@ -1038,7 +1037,7 @@ declare const updateFileUrl: _reduxjs_toolkit.ActionCreatorWithoutPayload<`${str
1038
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>;
1039
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>;
1040
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>;
1041
- declare const filesReducer: redux.Reducer<FilesState>;
1040
+ declare const filesReducer: Reducer<State>;
1042
1041
 
1043
1042
  /**
1044
1043
  * Combines multiple CSV data objects by merging rows based on a common column.
@@ -1200,8 +1199,9 @@ type Props$5 = {
1200
1199
  onOAuthResolved?: (data: OAuthResolvedData) => void;
1201
1200
  isOffline?: boolean;
1202
1201
  onOfflineWithoutLocalLLM?: () => void;
1202
+ isPublicRoute?: boolean;
1203
1203
  };
1204
- declare function useAdvancedChat({ tenantKey, mentorId, username, token, wsUrl, stopGenerationWsUrl, redirectToAuthSpa, errorHandler, sendMessageToParentWebsite, isPreviewMode, mentorShareableToken, on402Error, cachedSessionId, onStartNewChat, onOAuthRequired, onOAuthResolved, isOffline, onOfflineWithoutLocalLLM, }: Props$5): {
1204
+ declare function useAdvancedChat({ tenantKey, mentorId, username, token, wsUrl, stopGenerationWsUrl, redirectToAuthSpa, errorHandler, sendMessageToParentWebsite, isPreviewMode, mentorShareableToken, on402Error, cachedSessionId, onStartNewChat, onOAuthRequired, onOAuthResolved, isOffline, onOfflineWithoutLocalLLM, isPublicRoute, }: Props$5): {
1205
1205
  messages: Message[];
1206
1206
  isStreaming: boolean;
1207
1207
  status: ChatStatus;
@@ -1236,8 +1236,9 @@ type Props$4 = {
1236
1236
  mentorId: string;
1237
1237
  username: string;
1238
1238
  errorHandler?: (message: string, error?: any) => void;
1239
+ isPublicRoute?: boolean;
1239
1240
  };
1240
- declare function useMentorTools({ tenantKey, mentorId, username, errorHandler, }: Props$4): {
1241
+ declare function useMentorTools({ tenantKey, mentorId, username, errorHandler, isPublicRoute, }: Props$4): {
1241
1242
  tools: any;
1242
1243
  activeTools: string[];
1243
1244
  updateSessionTools: (tool: string) => Promise<void>;
@@ -1411,6 +1412,7 @@ type Props$3 = {
1411
1412
  mentorId: string;
1412
1413
  tenantKey: string;
1413
1414
  username: string;
1415
+ isPublicRoute?: boolean;
1414
1416
  };
1415
1417
  type MentorSettingsData = {
1416
1418
  profileImage?: string | null;
@@ -1430,7 +1432,7 @@ type MentorSettingsData = {
1430
1432
  type UseMentorSettingsReturn = {
1431
1433
  data: MentorSettingsData;
1432
1434
  };
1433
- declare function useMentorSettings({ mentorId, tenantKey, username, }: Props$3): UseMentorSettingsReturn;
1435
+ declare function useMentorSettings({ mentorId, tenantKey, username, isPublicRoute, }: Props$3): UseMentorSettingsReturn;
1434
1436
 
1435
1437
  /**
1436
1438
  * Sync authentication state to cookies (web only)
package/dist/index.esm.js CHANGED
@@ -3419,6 +3419,13 @@ function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, curr
3419
3419
  // user is not authenticated so we don't need to do anything that concerns an authenticated user
3420
3420
  return;
3421
3421
  }
3422
+ // Logged-in user on a public route (e.g. shareable link) visiting another tenant
3423
+ // — treat as visitor, skip tenant join/token/RBAC calls that will 403
3424
+ if (userIsAccessingPublicRoute) {
3425
+ saveVisitingTenant === null || saveVisitingTenant === void 0 ? void 0 : saveVisitingTenant(newCurrentTenant);
3426
+ setIsLoading(false);
3427
+ return;
3428
+ }
3422
3429
  const { data: tenants } = await fetchUserTenants();
3423
3430
  const enhancedTenants = await enhanceTenants(tenants, data);
3424
3431
  saveUserTenants(enhancedTenants);
@@ -3436,10 +3443,10 @@ function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, curr
3436
3443
  }
3437
3444
  if (currentTenant && currentTenant !== tenantKey) {
3438
3445
  setTenantKey(data.platform_key);
3439
- const rbacPermissions = await loadPlatformPermissions(data.platform_key);
3440
- onLoadPlatformPermissions === null || onLoadPlatformPermissions === void 0 ? void 0 : onLoadPlatformPermissions(rbacPermissions);
3441
3446
  const userAlreadyInTenant = enhancedTenants === null || enhancedTenants === void 0 ? void 0 : enhancedTenants.find((t) => t.key === tenantKey);
3442
3447
  if (userAlreadyInTenant) {
3448
+ const rbacPermissions = await loadPlatformPermissions(data.platform_key);
3449
+ onLoadPlatformPermissions === null || onLoadPlatformPermissions === void 0 ? void 0 : onLoadPlatformPermissions(rbacPermissions);
3443
3450
  const formData = new FormData();
3444
3451
  formData.append("platform_key", tenantKey);
3445
3452
  const { data: tokenResponse } = await getAppToken(formData).unwrap();
@@ -3470,6 +3477,8 @@ function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, curr
3470
3477
  else {
3471
3478
  // TODO: What happense when if for any reason we fetch tenants and it's an empty list
3472
3479
  }
3480
+ const rbacPermissions = await loadPlatformPermissions(data.platform_key);
3481
+ onLoadPlatformPermissions === null || onLoadPlatformPermissions === void 0 ? void 0 : onLoadPlatformPermissions(rbacPermissions);
3473
3482
  onAutoJoinUserToTenant === null || onAutoJoinUserToTenant === void 0 ? void 0 : onAutoJoinUserToTenant((_c = data.platform_name) !== null && _c !== void 0 ? _c : data === null || data === void 0 ? void 0 : data.platform_key.toUpperCase());
3474
3483
  saveTenant === null || saveTenant === void 0 ? void 0 : saveTenant(tenantKey);
3475
3484
  setUserIsAccessingPublicRoute(false);
@@ -3941,7 +3950,7 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
3941
3950
  mentorDbId = await getMentorDbId(mentor);
3942
3951
  }
3943
3952
  // Load permissions if we have a mentor DB ID and user is logged in
3944
- if (mentorDbId && isLoggedIn) {
3953
+ if (mentorDbId && isLoggedIn && !userIsAccessingPublicRoute) {
3945
3954
  const rbacPermissions = await loadMentorsPermissions(mentorDbId);
3946
3955
  onLoadMentorsPermissions === null || onLoadMentorsPermissions === void 0 ? void 0 : onLoadMentorsPermissions(rbacPermissions);
3947
3956
  }
@@ -3988,7 +3997,9 @@ function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redi
3988
3997
  }
3989
3998
  else {
3990
3999
  console.log("requested mentor exists in tenant, proceeding", requestedMentorId);
3991
- if (requestedMentorDbId && isLoggedIn) {
4000
+ if (requestedMentorDbId &&
4001
+ isLoggedIn &&
4002
+ !userIsAccessingPublicRoute) {
3992
4003
  const rbacPermissions = await loadMentorsPermissions(requestedMentorDbId);
3993
4004
  onLoadMentorsPermissions === null || onLoadMentorsPermissions === void 0 ? void 0 : onLoadMentorsPermissions(rbacPermissions);
3994
4005
  }
@@ -15528,6 +15539,24 @@ createApi({
15528
15539
  }),
15529
15540
  });
15530
15541
 
15542
+ createApi({
15543
+ reducerPath: 'analyticsCustomApiSlice',
15544
+ baseQuery: iblFetchBaseQuery,
15545
+ tagTypes: ['Analytics'],
15546
+ endpoints: (builder) => ({
15547
+ getDownloadReportFromURL: builder.query({
15548
+ query: ({ url }) => ({
15549
+ url: url,
15550
+ service: SERVICES.DM,
15551
+ method: 'GET',
15552
+ responseHandler: (response) => response.blob(),
15553
+ }),
15554
+ // Blobs are non-serializable; disable caching to prevent Redux serialization warnings
15555
+ keepUnusedDataFor: 0,
15556
+ }),
15557
+ }),
15558
+ });
15559
+
15531
15560
  createApi({
15532
15561
  reducerPath: 'reportsApiSlice',
15533
15562
  baseQuery: iblFakeBaseQuery,
@@ -17318,8 +17347,8 @@ createApi({
17318
17347
  }),
17319
17348
  });
17320
17349
 
17321
- function useMentorSettings({ mentorId, tenantKey, username, }) {
17322
- var _a, _b, _c, _d;
17350
+ function useMentorSettings({ mentorId, tenantKey, username, isPublicRoute, }) {
17351
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
17323
17352
  const isLoggedIn = username !== ANONYMOUS_USERNAME;
17324
17353
  const { data: mentorSettings } = useGetMentorSettingsQuery({
17325
17354
  mentor: mentorId,
@@ -17327,7 +17356,7 @@ function useMentorSettings({ mentorId, tenantKey, username, }) {
17327
17356
  // @ts-expect-error - userId is passed but not in generated API types
17328
17357
  userId: username !== null && username !== void 0 ? username : "",
17329
17358
  }, {
17330
- skip: !username || !isLoggedIn,
17359
+ skip: !username || !isLoggedIn || !!isPublicRoute,
17331
17360
  });
17332
17361
  const { data: mentorPublicSettings } = useGetMentorPublicSettingsQuery({
17333
17362
  mentor: mentorId,
@@ -17339,44 +17368,26 @@ function useMentorSettings({ mentorId, tenantKey, username, }) {
17339
17368
  });
17340
17369
  return {
17341
17370
  data: {
17342
- profileImage: isLoggedIn
17343
- ? mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.profile_image
17344
- : mentorPublicSettings === null || mentorPublicSettings === void 0 ? void 0 : mentorPublicSettings.profile_image,
17345
- greetingMethod: isLoggedIn
17346
- ? mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.greeting_method
17347
- : mentorPublicSettings === null || mentorPublicSettings === void 0 ? void 0 : mentorPublicSettings.greeting_method,
17348
- proactiveResponse: isLoggedIn
17349
- ? mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.proactive_response
17350
- : mentorPublicSettings === null || mentorPublicSettings === void 0 ? void 0 : mentorPublicSettings.proactive_response,
17351
- llmProvider: isLoggedIn ? mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.llm_provider : "",
17352
- llmName: isLoggedIn
17353
- ? mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.llm_name
17354
- : mentorPublicSettings === null || mentorPublicSettings === void 0 ? void 0 : mentorPublicSettings.llm_name,
17355
- mentorUniqueId: isLoggedIn
17356
- ? mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.mentor_unique_id
17357
- : mentorPublicSettings === null || mentorPublicSettings === void 0 ? void 0 : mentorPublicSettings.mentor_unique_id,
17358
- mentorVisibility: isLoggedIn
17359
- ? mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.mentor_visibility
17360
- : mentorPublicSettings === null || mentorPublicSettings === void 0 ? void 0 : mentorPublicSettings.mentor_visibility,
17361
- mentorName: (_a = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.mentor) !== null && _a !== void 0 ? _a : mentorPublicSettings === null || mentorPublicSettings === void 0 ? void 0 : mentorPublicSettings.mentor,
17362
- enableGuidedPrompts: isLoggedIn
17363
- ? mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.enable_guided_prompts
17364
- : mentorPublicSettings === null || mentorPublicSettings === void 0 ? void 0 : mentorPublicSettings.enable_guided_prompts,
17365
- mentorSlug: isLoggedIn
17366
- ? mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.mentor_slug
17367
- : mentorPublicSettings === null || mentorPublicSettings === void 0 ? void 0 : mentorPublicSettings.mentor_slug,
17368
- safetyDisclaimer: isLoggedIn
17369
- ? (_b = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.metadata) === null || _b === void 0 ? void 0 : _b.safety_disclaimer
17370
- : (_c = mentorPublicSettings === null || mentorPublicSettings === void 0 ? void 0 : mentorPublicSettings.metadata) === null || _c === void 0 ? void 0 : _c.safety_disclaimer,
17371
- mentorTools: isLoggedIn
17372
- ? mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.mentor_tools
17373
- : mentorPublicSettings === null || mentorPublicSettings === void 0 ? void 0 : mentorPublicSettings.mentor_tools,
17374
- allowAnonymous: (_d = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.allow_anonymous) !== null && _d !== void 0 ? _d : mentorPublicSettings === null || mentorPublicSettings === void 0 ? void 0 : mentorPublicSettings.allow_anonymous,
17371
+ profileImage: (_a = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.profile_image) !== null && _a !== void 0 ? _a : mentorPublicSettings === null || mentorPublicSettings === void 0 ? void 0 : mentorPublicSettings.profile_image,
17372
+ greetingMethod: (_b = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.greeting_method) !== null && _b !== void 0 ? _b : mentorPublicSettings === null || mentorPublicSettings === void 0 ? void 0 : mentorPublicSettings.greeting_method,
17373
+ proactiveResponse: (_c = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.proactive_response) !== null && _c !== void 0 ? _c : mentorPublicSettings === null || mentorPublicSettings === void 0 ? void 0 : mentorPublicSettings.proactive_response,
17374
+ llmProvider: (mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.llm_provider) ||
17375
+ (mentorPublicSettings === null || mentorPublicSettings === void 0 ? void 0 : mentorPublicSettings.llm_provider) ||
17376
+ "",
17377
+ llmName: (_d = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.llm_name) !== null && _d !== void 0 ? _d : mentorPublicSettings === null || mentorPublicSettings === void 0 ? void 0 : mentorPublicSettings.llm_name,
17378
+ mentorUniqueId: (_e = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.mentor_unique_id) !== null && _e !== void 0 ? _e : mentorPublicSettings === null || mentorPublicSettings === void 0 ? void 0 : mentorPublicSettings.mentor_unique_id,
17379
+ mentorVisibility: (_f = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.mentor_visibility) !== null && _f !== void 0 ? _f : mentorPublicSettings === null || mentorPublicSettings === void 0 ? void 0 : mentorPublicSettings.mentor_visibility,
17380
+ mentorName: (_g = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.mentor) !== null && _g !== void 0 ? _g : mentorPublicSettings === null || mentorPublicSettings === void 0 ? void 0 : mentorPublicSettings.mentor,
17381
+ enableGuidedPrompts: (_h = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.enable_guided_prompts) !== null && _h !== void 0 ? _h : mentorPublicSettings === null || mentorPublicSettings === void 0 ? void 0 : mentorPublicSettings.enable_guided_prompts,
17382
+ mentorSlug: (_j = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.mentor_slug) !== null && _j !== void 0 ? _j : mentorPublicSettings === null || mentorPublicSettings === void 0 ? void 0 : mentorPublicSettings.mentor_slug,
17383
+ safetyDisclaimer: (_l = (_k = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.metadata) === null || _k === void 0 ? void 0 : _k.safety_disclaimer) !== null && _l !== void 0 ? _l : (_m = mentorPublicSettings === null || mentorPublicSettings === void 0 ? void 0 : mentorPublicSettings.metadata) === null || _m === void 0 ? void 0 : _m.safety_disclaimer,
17384
+ mentorTools: (_o = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.mentor_tools) !== null && _o !== void 0 ? _o : mentorPublicSettings === null || mentorPublicSettings === void 0 ? void 0 : mentorPublicSettings.mentor_tools,
17385
+ allowAnonymous: (_p = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.allow_anonymous) !== null && _p !== void 0 ? _p : mentorPublicSettings === null || mentorPublicSettings === void 0 ? void 0 : mentorPublicSettings.allow_anonymous,
17375
17386
  },
17376
17387
  };
17377
17388
  }
17378
17389
 
17379
- function useAdvancedChat({ tenantKey, mentorId, username = ANONYMOUS_USERNAME, token, wsUrl, stopGenerationWsUrl, redirectToAuthSpa, errorHandler, sendMessageToParentWebsite, isPreviewMode, mentorShareableToken, on402Error, cachedSessionId, onStartNewChat, onOAuthRequired, onOAuthResolved, isOffline = false, onOfflineWithoutLocalLLM, }) {
17390
+ function useAdvancedChat({ tenantKey, mentorId, username = ANONYMOUS_USERNAME, token, wsUrl, stopGenerationWsUrl, redirectToAuthSpa, errorHandler, sendMessageToParentWebsite, isPreviewMode, mentorShareableToken, on402Error, cachedSessionId, onStartNewChat, onOAuthRequired, onOAuthResolved, isOffline = false, onOfflineWithoutLocalLLM, isPublicRoute, }) {
17380
17391
  var _a, _b, _c, _d;
17381
17392
  const dispatch = useDispatch();
17382
17393
  const [createSessionId, { isLoading: isLoadingSessionIds }] = useCreateSessionIdMutation();
@@ -17396,6 +17407,7 @@ function useAdvancedChat({ tenantKey, mentorId, username = ANONYMOUS_USERNAME, t
17396
17407
  mentorId,
17397
17408
  tenantKey,
17398
17409
  username,
17410
+ isPublicRoute,
17399
17411
  });
17400
17412
  const onStreamingChange = (streamingState) => {
17401
17413
  dispatch(chatActions.setStreaming(streamingState));
@@ -17708,26 +17720,30 @@ function hasTool(tools, mentorSettings, toolSlug) {
17708
17720
  // Check if the specific tool exists in both available tools and enabled tools
17709
17721
  return tools.some((tool) => tool.slug === toolSlug && enabledToolSlugs.has(tool.slug));
17710
17722
  }
17711
- function useMentorTools({ tenantKey, mentorId, username = ANONYMOUS_USERNAME, errorHandler, }) {
17723
+ function useMentorTools({ tenantKey, mentorId, username = ANONYMOUS_USERNAME, errorHandler, isPublicRoute, }) {
17712
17724
  var _a;
17713
17725
  const dispatch = useDispatch();
17714
17726
  const activeTools = useSelector(selectTools);
17715
17727
  const artifactsEnabled = useSelector(selectArtifactsEnabled);
17716
17728
  const sessionId = useSelector(selectSessionId);
17717
17729
  const [editSession] = useEditSessionMutation();
17718
- const { data: tools } = useGetToolsQuery({
17730
+ const { data: apiTools } = useGetToolsQuery({
17719
17731
  mentor: mentorId,
17720
17732
  org: tenantKey,
17721
17733
  // @ts-expect-error - userId is passed but not in generated API types
17722
17734
  userId: username !== null && username !== void 0 ? username : "",
17723
17735
  }, {
17724
- skip: !username || username === ANONYMOUS_USERNAME,
17736
+ skip: !username || username === ANONYMOUS_USERNAME || !!isPublicRoute,
17725
17737
  });
17726
17738
  const { data: mentorSettings } = useMentorSettings({
17727
17739
  mentorId,
17728
17740
  tenantKey,
17729
17741
  username,
17742
+ isPublicRoute,
17730
17743
  });
17744
+ // Fall back to mentor_tools from public settings when available-tools endpoint
17745
+ // is blocked by RBAC (403). This ensures shareable link users see tool buttons.
17746
+ const tools = apiTools !== null && apiTools !== void 0 ? apiTools : mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.mentorTools;
17731
17747
  const { data: prompts } = useGetPromptsSearchQuery({
17732
17748
  org: tenantKey,
17733
17749
  username: username !== null && username !== void 0 ? username : "",
@@ -17737,7 +17753,7 @@ function useMentorTools({ tenantKey, mentorId, username = ANONYMOUS_USERNAME, er
17737
17753
  mentor: mentorId,
17738
17754
  orderDirection: "asc",
17739
17755
  }, {
17740
- skip: !tenantKey || !username || !mentorId,
17756
+ skip: !tenantKey || !username || !mentorId || !!isPublicRoute,
17741
17757
  });
17742
17758
  const updateSessionTools = async (tool) => {
17743
17759
  let toolsToAdd = activeTools;