@iblai/data-layer 1.10.0 → 1.11.0
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.d.ts +31666 -20792
- package/dist/index.esm.js +917 -36
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +989 -35
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/src/config.d.ts +1 -0
- package/dist/src/constants.d.ts +2 -1
- package/dist/src/features/chat/__tests__/api-slice.test.d.ts +1 -0
- package/dist/src/features/chat/api-slice.d.ts +882 -1
- package/dist/src/features/chat/constants.d.ts +7 -0
- package/dist/src/features/core/api-slice.d.ts +1314 -345
- package/dist/src/features/core/types.d.ts +57 -0
- package/dist/src/features/evaluations/api-slice.d.ts +4314 -0
- package/dist/src/features/evaluations/constants.d.ts +102 -0
- package/dist/src/features/evaluations/types.d.ts +285 -0
- package/dist/src/features/mentor/privacy.d.ts +1 -1
- package/dist/src/features/studio-authoring/__tests__/api-slice.test.d.ts +1 -0
- package/dist/src/features/studio-authoring/api-slice.d.ts +1601 -0
- package/dist/src/features/studio-authoring/constants.d.ts +39 -0
- package/dist/src/features/studio-authoring/types.d.ts +65 -0
- package/dist/src/features/support-tickets/api-slice.d.ts +2356 -0
- package/dist/src/features/support-tickets/constants.d.ts +29 -0
- package/dist/src/features/support-tickets/types.d.ts +114 -0
- package/dist/src/features/utils.d.ts +5 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/utils/__tests__/index.test.d.ts +1 -0
- package/dist/src/utils/index.d.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -39052,6 +39052,7 @@ exports.SERVICES = void 0;
|
|
|
39052
39052
|
SERVICES["LMS"] = "LMS";
|
|
39053
39053
|
SERVICES["DM"] = "DM";
|
|
39054
39054
|
SERVICES["AXD"] = "AXD";
|
|
39055
|
+
SERVICES["STUDIO"] = "STUDIO";
|
|
39055
39056
|
})(exports.SERVICES || (exports.SERVICES = {}));
|
|
39056
39057
|
|
|
39057
39058
|
class Config {
|
|
@@ -39061,6 +39062,7 @@ Config.lmsUrl = 'https://learn.iblai.app';
|
|
|
39061
39062
|
Config.dmUrl = 'https://base.manager.iblai.app';
|
|
39062
39063
|
Config.axdUrl = 'https://base.manager.iblai.app';
|
|
39063
39064
|
Config.mentorIframeUrl = 'https://mentor.iblai.tech';
|
|
39065
|
+
Config.studioUrl = 'https://studio.iblai.app';
|
|
39064
39066
|
Config.httpErrorHandlers = {};
|
|
39065
39067
|
|
|
39066
39068
|
class IblDataLayer {
|
|
@@ -39127,10 +39129,23 @@ const getServiceUrl = (service) => {
|
|
|
39127
39129
|
return Config.lmsUrl;
|
|
39128
39130
|
case exports.SERVICES.DM:
|
|
39129
39131
|
return Config.dmUrl;
|
|
39132
|
+
case exports.SERVICES.STUDIO:
|
|
39133
|
+
return Config.studioUrl;
|
|
39130
39134
|
default:
|
|
39131
39135
|
return Config.dmUrl;
|
|
39132
39136
|
}
|
|
39133
39137
|
};
|
|
39138
|
+
/**
|
|
39139
|
+
* Read a cookie value by name. Returns null outside the browser or when the
|
|
39140
|
+
* cookie is absent. Used for Studio's CSRF token (`csrftoken`).
|
|
39141
|
+
*/
|
|
39142
|
+
const getCookieValue = (name) => {
|
|
39143
|
+
if (typeof document === 'undefined') {
|
|
39144
|
+
return null;
|
|
39145
|
+
}
|
|
39146
|
+
const match = document.cookie.match(new RegExp(`(?:^|;\\s*)${name}=([^;]*)`));
|
|
39147
|
+
return match ? decodeURIComponent(match[1]) : null;
|
|
39148
|
+
};
|
|
39134
39149
|
/**
|
|
39135
39150
|
* Get the headers required for API requests based on the provided service type.
|
|
39136
39151
|
*/
|
|
@@ -39154,7 +39169,8 @@ const getHeaders = async (service) => {
|
|
|
39154
39169
|
return; // No Authorization header when no valid token
|
|
39155
39170
|
}
|
|
39156
39171
|
let prefix;
|
|
39157
|
-
|
|
39172
|
+
// Studio (Open edX CMS) accepts the same edX token as the LMS.
|
|
39173
|
+
if (service === exports.SERVICES.LMS || service === exports.SERVICES.STUDIO) {
|
|
39158
39174
|
if (token.length > 30) {
|
|
39159
39175
|
prefix = 'JWT';
|
|
39160
39176
|
}
|
|
@@ -39257,7 +39273,7 @@ const isErrorObject = (data) => {
|
|
|
39257
39273
|
const baseQuery = (service, jsonContentType = true, contentType, skipAuth = false) => query.fetchBaseQuery({
|
|
39258
39274
|
baseUrl: getServiceUrl(service),
|
|
39259
39275
|
timeout: 30000, // 30 second timeout
|
|
39260
|
-
credentials: service === exports.SERVICES.LEGACY_LMS ? 'include' : 'omit',
|
|
39276
|
+
credentials: service === exports.SERVICES.LEGACY_LMS || service === exports.SERVICES.STUDIO ? 'include' : 'omit',
|
|
39261
39277
|
prepareHeaders: async (headers) => {
|
|
39262
39278
|
// Only add auth headers if skipAuth is false
|
|
39263
39279
|
if (!skipAuth) {
|
|
@@ -39275,6 +39291,18 @@ const baseQuery = (service, jsonContentType = true, contentType, skipAuth = fals
|
|
|
39275
39291
|
if (contentType) {
|
|
39276
39292
|
headers.set('Content-Type', contentType);
|
|
39277
39293
|
}
|
|
39294
|
+
// Studio (Open edX CMS) endpoints require the Django CSRF token and only
|
|
39295
|
+
// return JSON when asked for it explicitly.
|
|
39296
|
+
if (service === exports.SERVICES.STUDIO) {
|
|
39297
|
+
const csrfToken = getCookieValue('csrftoken');
|
|
39298
|
+
if (csrfToken) {
|
|
39299
|
+
headers.set('X-CSRFToken', csrfToken);
|
|
39300
|
+
}
|
|
39301
|
+
if (!headers.has('Accept')) {
|
|
39302
|
+
headers.set('Accept', 'application/json');
|
|
39303
|
+
}
|
|
39304
|
+
headers.set('X-Requested-With', 'XMLHttpRequest');
|
|
39305
|
+
}
|
|
39278
39306
|
// Add CSRF protection headers for LMS service
|
|
39279
39307
|
if (service === exports.SERVICES.LMS) {
|
|
39280
39308
|
// Use mentorIframeUrl for both origin and referer
|
|
@@ -39304,7 +39332,28 @@ const NON_RETRYABLE_STATUS_CODES = [402, 401];
|
|
|
39304
39332
|
* Uses `retry.fail()` to immediately bail out of the retry loop.
|
|
39305
39333
|
*/
|
|
39306
39334
|
const withNonRetryableErrors = (query$1) => async (args, api, extraOptions) => {
|
|
39307
|
-
|
|
39335
|
+
let result;
|
|
39336
|
+
try {
|
|
39337
|
+
result = await query$1(args, api, extraOptions);
|
|
39338
|
+
}
|
|
39339
|
+
catch (e) {
|
|
39340
|
+
// RTK's `retry` only counts attempts for errors RETURNED as `{ error }`
|
|
39341
|
+
// (wrapped in HandledError); a THROWN exception bypasses its
|
|
39342
|
+
// retryCondition and makes the `while (true)` loop spin forever —
|
|
39343
|
+
// an eternal 'pending' query with no network request and no surfaced
|
|
39344
|
+
// error. fetchBaseQuery can throw before fetch (e.g. from
|
|
39345
|
+
// prepareHeaders), so convert throws into returned errors to keep the
|
|
39346
|
+
// retry loop bounded.
|
|
39347
|
+
const message = e instanceof Error ? `${e.name}: ${e.message}` : String(e);
|
|
39348
|
+
return {
|
|
39349
|
+
error: {
|
|
39350
|
+
status: 'FETCH_ERROR',
|
|
39351
|
+
// `data` is what iblFetchBaseQuery propagates to callers/logs.
|
|
39352
|
+
data: message,
|
|
39353
|
+
error: message,
|
|
39354
|
+
},
|
|
39355
|
+
};
|
|
39356
|
+
}
|
|
39308
39357
|
if (result.error && NON_RETRYABLE_STATUS_CODES.includes(result.error.status)) {
|
|
39309
39358
|
query.retry.fail(result.error);
|
|
39310
39359
|
}
|
|
@@ -39483,6 +39532,43 @@ const chatHistoryApiSlice = react.createApi({
|
|
|
39483
39532
|
});
|
|
39484
39533
|
const { useGetChatHistoryFilterQuery, useLazyGetChatHistoryFilterQuery, useGetChatHistoryQuery, useLazyGetChatHistoryQuery, useExportChatHistoryMutation, useGetChatHistoryExportStatusQuery, useLazyGetChatHistoryExportStatusQuery, } = chatHistoryApiSlice;
|
|
39485
39534
|
|
|
39535
|
+
const CHAT_CUSTOM_REDUCER_PATH = 'chatCustomApiSlice';
|
|
39536
|
+
/**
|
|
39537
|
+
* Recent-messages sidebar list pagination. The endpoint uses DRF
|
|
39538
|
+
* LimitOffsetPagination, so the page param is a row offset (not a page number).
|
|
39539
|
+
*/
|
|
39540
|
+
const RECENT_MESSAGES_PAGE_SIZE = 10;
|
|
39541
|
+
const RECENT_MESSAGES_LIMIT_PARAM = 'limit';
|
|
39542
|
+
const RECENT_MESSAGES_OFFSET_PARAM = 'offset';
|
|
39543
|
+
const CHAT_CUSTOM_ENDPOINTS = {
|
|
39544
|
+
GET_CHAT_MESSAGE_TTS: {
|
|
39545
|
+
path: (org, user_id, chat_message_id) => `/api/ai-mentor/orgs/${org}/users/${user_id}/chat-messages/${chat_message_id}/tts`,
|
|
39546
|
+
service: exports.SERVICES.DM,
|
|
39547
|
+
},
|
|
39548
|
+
};
|
|
39549
|
+
|
|
39550
|
+
/**
|
|
39551
|
+
* Derive the next row offset from a DRF LimitOffset response. Returns `undefined`
|
|
39552
|
+
* when there is no further page (missing/null `next`, or a non-paginated shape
|
|
39553
|
+
* such as a bare array), so the query degrades to a single page.
|
|
39554
|
+
*/
|
|
39555
|
+
const getNextRecentMessagesPageParam = (lastPage, lastPageParam) => lastPage && !Array.isArray(lastPage) && lastPage.next
|
|
39556
|
+
? lastPageParam + RECENT_MESSAGES_PAGE_SIZE
|
|
39557
|
+
: undefined;
|
|
39558
|
+
/**
|
|
39559
|
+
* Build the recent-messages URL for a given row offset. The endpoint uses DRF
|
|
39560
|
+
* LimitOffsetPagination (`limit`/`offset`), not page numbers.
|
|
39561
|
+
*/
|
|
39562
|
+
const buildRecentMessagesUrl = (args, pageParam) => {
|
|
39563
|
+
const params = new URLSearchParams();
|
|
39564
|
+
params.append(RECENT_MESSAGES_LIMIT_PARAM, String(RECENT_MESSAGES_PAGE_SIZE));
|
|
39565
|
+
params.append(RECENT_MESSAGES_OFFSET_PARAM, String(pageParam));
|
|
39566
|
+
if (args.mentor)
|
|
39567
|
+
params.append('mentor', args.mentor);
|
|
39568
|
+
if (args.search && args.search.trim() !== '')
|
|
39569
|
+
params.append('search', args.search.trim());
|
|
39570
|
+
return `/api/ai-mentor/orgs/${args.org}/users/${args.userId}/recent-messages/?${params.toString()}`;
|
|
39571
|
+
};
|
|
39486
39572
|
const chatApiSlice = react.createApi({
|
|
39487
39573
|
reducerPath: 'chatApiSlice',
|
|
39488
39574
|
baseQuery: iblFakeBaseQuery,
|
|
@@ -39517,6 +39603,21 @@ const chatApiSlice = react.createApi({
|
|
|
39517
39603
|
getRecentMessage: builder.query({
|
|
39518
39604
|
...buildEndpointFromDmService(AiMentorService.aiMentorOrgsUsersRecentMessagesRetrieve),
|
|
39519
39605
|
}),
|
|
39606
|
+
getRecentMessages: builder.infiniteQuery({
|
|
39607
|
+
infiniteQueryOptions: {
|
|
39608
|
+
initialPageParam: 0,
|
|
39609
|
+
getNextPageParam: (lastPage, _allPages, lastPageParam) => getNextRecentMessagesPageParam(lastPage, lastPageParam),
|
|
39610
|
+
},
|
|
39611
|
+
queryFn: async ({ queryArg, pageParam }, api, extraOptions) => {
|
|
39612
|
+
const url = buildRecentMessagesUrl(queryArg, pageParam);
|
|
39613
|
+
return iblFetchBaseQuery({
|
|
39614
|
+
url,
|
|
39615
|
+
method: 'GET',
|
|
39616
|
+
service: exports.SERVICES.DM,
|
|
39617
|
+
}, api, extraOptions);
|
|
39618
|
+
},
|
|
39619
|
+
providesTags: ['recentMessages'],
|
|
39620
|
+
}),
|
|
39520
39621
|
deleteMessage: builder.mutation({
|
|
39521
39622
|
...buildEndpointFromDmService(AiMentorService.aiMentorOrgsUsersSessionsDestroy),
|
|
39522
39623
|
}),
|
|
@@ -39531,15 +39632,7 @@ const chatApiSlice = react.createApi({
|
|
|
39531
39632
|
}),
|
|
39532
39633
|
}),
|
|
39533
39634
|
});
|
|
39534
|
-
const { useLazyGetPinnedMessagesQuery, useUnPinMessageMutation, useDeleteMessageMutation, useGetPinnedMessagesQuery, useAddPinnedMessageMutation, useGetVectorDocumentsQuery, useLazyGetVectorDocumentsQuery, useGetRecentMessageQuery, useLazyGetRecentMessageQuery, useUpdateMessageFeedbackMutation, useAudioToTextMutation, } = chatApiSlice;
|
|
39535
|
-
|
|
39536
|
-
const CHAT_CUSTOM_REDUCER_PATH = 'chatCustomApiSlice';
|
|
39537
|
-
const CHAT_CUSTOM_ENDPOINTS = {
|
|
39538
|
-
GET_CHAT_MESSAGE_TTS: {
|
|
39539
|
-
path: (org, user_id, chat_message_id) => `/api/ai-mentor/orgs/${org}/users/${user_id}/chat-messages/${chat_message_id}/tts`,
|
|
39540
|
-
service: exports.SERVICES.DM,
|
|
39541
|
-
},
|
|
39542
|
-
};
|
|
39635
|
+
const { useLazyGetPinnedMessagesQuery, useUnPinMessageMutation, useDeleteMessageMutation, useGetPinnedMessagesQuery, useAddPinnedMessageMutation, useGetVectorDocumentsQuery, useLazyGetVectorDocumentsQuery, useGetRecentMessageQuery, useLazyGetRecentMessageQuery, useGetRecentMessagesInfiniteQuery, useUpdateMessageFeedbackMutation, useAudioToTextMutation, } = chatApiSlice;
|
|
39543
39636
|
|
|
39544
39637
|
const chatCustomApiSlice = react.createApi({
|
|
39545
39638
|
reducerPath: CHAT_CUSTOM_REDUCER_PATH,
|
|
@@ -40423,6 +40516,32 @@ const userApiSlice = react.createApi({
|
|
|
40423
40516
|
});
|
|
40424
40517
|
const { useGetUserMetadataQuery, useLazyGetUserMetadataQuery, useUpdateUserMetadataMutation, useUpdateUserAccountMutation, useResetPasswordMutation, useUpdateUserRoleMutation, useUploadProfileImageMutation, useRemoveProfileImageMutation, useGetUserMetadataEdxQuery, useLazyGetUserMetadataEdxQuery, useUpdateUserMetadataEdxMutation, useGetUserPlatformMetadataQuery, useLazyGetUserPlatformMetadataQuery, useUpdateUserPlatformMetadataMutation, } = userApiSlice;
|
|
40425
40518
|
|
|
40519
|
+
/**
|
|
40520
|
+
* Shared fetch for the paginated LTI provider list endpoints. Sends
|
|
40521
|
+
* `platform_key`, optional `mentor_id` (Agent Links), and `page` / `page_size`.
|
|
40522
|
+
*/
|
|
40523
|
+
async function fetchLtiList(path, args) {
|
|
40524
|
+
const queryParams = new URLSearchParams({ platform_key: args.platformKey });
|
|
40525
|
+
if (args.mentorId)
|
|
40526
|
+
queryParams.set('mentor_id', args.mentorId);
|
|
40527
|
+
if (args.page !== undefined)
|
|
40528
|
+
queryParams.set('page', String(args.page));
|
|
40529
|
+
if (args.pageSize !== undefined)
|
|
40530
|
+
queryParams.set('page_size', String(args.pageSize));
|
|
40531
|
+
const url = `${OpenAPI.BASE}/api/core/lti/1p3/provider/${path}/?${queryParams.toString()}`;
|
|
40532
|
+
const response = await fetch(url, {
|
|
40533
|
+
method: 'GET',
|
|
40534
|
+
headers: OpenAPI.HEADERS,
|
|
40535
|
+
credentials: 'omit',
|
|
40536
|
+
});
|
|
40537
|
+
if (!response.ok) {
|
|
40538
|
+
throw Object.assign(new Error(`Failed to fetch ${path}`), {
|
|
40539
|
+
status: response.status,
|
|
40540
|
+
body: await response.text(),
|
|
40541
|
+
});
|
|
40542
|
+
}
|
|
40543
|
+
return response.json();
|
|
40544
|
+
}
|
|
40426
40545
|
const coreApiSlice = react.createApi({
|
|
40427
40546
|
reducerPath: 'coreApiSlice',
|
|
40428
40547
|
baseQuery: iblFakeBaseQuery,
|
|
@@ -40712,6 +40831,83 @@ const coreApiSlice = react.createApi({
|
|
|
40712
40831
|
return response.json();
|
|
40713
40832
|
}),
|
|
40714
40833
|
}),
|
|
40834
|
+
// ── RBAC resource discovery (incremental resource-path builder) ──
|
|
40835
|
+
// Custom calls: the pinned @iblai/iblai-api client does not expose the
|
|
40836
|
+
// discovery endpoint yet, and list_url is a dynamic relative URL returned
|
|
40837
|
+
// by the discovery response rather than a fixed generated route.
|
|
40838
|
+
getRbacResourceDiscovery: builder.query({
|
|
40839
|
+
...buildEndpointFromService(exports.SERVICES.DM, async (args) => {
|
|
40840
|
+
// URLSearchParams escapes the slashes in `path` for us.
|
|
40841
|
+
const queryParams = new URLSearchParams({ path: args.path });
|
|
40842
|
+
if (args.platformKey)
|
|
40843
|
+
queryParams.set('platform_key', args.platformKey);
|
|
40844
|
+
const url = `${OpenAPI.BASE}/api/core/rbac/resources/?${queryParams.toString()}`;
|
|
40845
|
+
const response = await fetch(url, {
|
|
40846
|
+
method: 'GET',
|
|
40847
|
+
headers: OpenAPI.HEADERS,
|
|
40848
|
+
credentials: 'omit',
|
|
40849
|
+
});
|
|
40850
|
+
if (!response.ok) {
|
|
40851
|
+
throw Object.assign(new Error('Failed to fetch RBAC resource discovery'), {
|
|
40852
|
+
status: response.status,
|
|
40853
|
+
body: await response.text(),
|
|
40854
|
+
});
|
|
40855
|
+
}
|
|
40856
|
+
return response.json();
|
|
40857
|
+
}),
|
|
40858
|
+
}),
|
|
40859
|
+
getRbacResourceList: builder.query({
|
|
40860
|
+
...buildEndpointFromService(exports.SERVICES.DM, async (args) => {
|
|
40861
|
+
var _a, _b, _c, _d, _e, _f;
|
|
40862
|
+
const url = new URL(`${OpenAPI.BASE}${args.listUrl}`);
|
|
40863
|
+
for (const [key, value] of Object.entries((_a = args.searchParams) !== null && _a !== void 0 ? _a : {})) {
|
|
40864
|
+
if (value !== '')
|
|
40865
|
+
url.searchParams.set(key, value);
|
|
40866
|
+
}
|
|
40867
|
+
const response = await fetch(url.toString(), {
|
|
40868
|
+
method: 'GET',
|
|
40869
|
+
headers: OpenAPI.HEADERS,
|
|
40870
|
+
credentials: 'omit',
|
|
40871
|
+
});
|
|
40872
|
+
if (!response.ok) {
|
|
40873
|
+
throw Object.assign(new Error('Failed to fetch RBAC resource list'), {
|
|
40874
|
+
status: response.status,
|
|
40875
|
+
body: await response.text(),
|
|
40876
|
+
});
|
|
40877
|
+
}
|
|
40878
|
+
const raw = await response.json();
|
|
40879
|
+
// The list endpoints vary per collection: bare arrays, DRF
|
|
40880
|
+
// envelopes ({results}), or nested ({results: {data}} / {data}).
|
|
40881
|
+
const rows = Array.isArray(raw)
|
|
40882
|
+
? raw
|
|
40883
|
+
: Array.isArray(raw === null || raw === void 0 ? void 0 : raw.results)
|
|
40884
|
+
? raw.results
|
|
40885
|
+
: Array.isArray((_b = raw === null || raw === void 0 ? void 0 : raw.results) === null || _b === void 0 ? void 0 : _b.data)
|
|
40886
|
+
? raw.results.data
|
|
40887
|
+
: Array.isArray(raw === null || raw === void 0 ? void 0 : raw.data)
|
|
40888
|
+
? raw.data
|
|
40889
|
+
: [];
|
|
40890
|
+
const pkField = (_d = (_c = args.resultFields) === null || _c === void 0 ? void 0 : _c.pk) !== null && _d !== void 0 ? _d : 'id';
|
|
40891
|
+
const nameField = (_f = (_e = args.resultFields) === null || _e === void 0 ? void 0 : _e.name) !== null && _f !== void 0 ? _f : 'name';
|
|
40892
|
+
const items = rows
|
|
40893
|
+
.filter((row) => (row === null || row === void 0 ? void 0 : row[pkField]) !== undefined && (row === null || row === void 0 ? void 0 : row[pkField]) !== null)
|
|
40894
|
+
.map((row) => {
|
|
40895
|
+
// Some rows (e.g. platform users) have a blank name — fall back
|
|
40896
|
+
// to their email, then to the pk, so the picker never shows an
|
|
40897
|
+
// empty label.
|
|
40898
|
+
const rawName = row[nameField];
|
|
40899
|
+
const name = (typeof rawName === 'string' ? rawName.trim() : rawName) ||
|
|
40900
|
+
(typeof row.email === 'string' ? row.email : '') ||
|
|
40901
|
+
String(row[pkField]);
|
|
40902
|
+
return {
|
|
40903
|
+
pk: row[pkField],
|
|
40904
|
+
name: String(name),
|
|
40905
|
+
raw: row,
|
|
40906
|
+
};
|
|
40907
|
+
});
|
|
40908
|
+
return { items, raw };
|
|
40909
|
+
}),
|
|
40910
|
+
}),
|
|
40715
40911
|
getRbacTeamsAccessList: builder.query({
|
|
40716
40912
|
...buildEndpointFromDmService(CoreService.coreRbacTeamsAccessList),
|
|
40717
40913
|
providesTags: ['RbacTeamsAccess'],
|
|
@@ -40722,7 +40918,7 @@ const coreApiSlice = react.createApi({
|
|
|
40722
40918
|
}),
|
|
40723
40919
|
// ── LTI 1.3 Provider: Keys (platform-wide RSA signing keys) ──
|
|
40724
40920
|
getLtiKeys: builder.query({
|
|
40725
|
-
...
|
|
40921
|
+
...buildEndpointFromService(exports.SERVICES.DM, (args) => fetchLtiList('lti-keys', args)),
|
|
40726
40922
|
providesTags: ['LtiKeys'],
|
|
40727
40923
|
}),
|
|
40728
40924
|
getLtiKeyDetail: builder.query({
|
|
@@ -40751,24 +40947,7 @@ const coreApiSlice = react.createApi({
|
|
|
40751
40947
|
// The generated CoreService.coreLti1P3ProviderLtiMentorsList only sends
|
|
40752
40948
|
// platform_key.
|
|
40753
40949
|
getLtiMentors: builder.query({
|
|
40754
|
-
...buildEndpointFromService(exports.SERVICES.DM,
|
|
40755
|
-
const queryParams = new URLSearchParams({ platform_key: args.platformKey });
|
|
40756
|
-
if (args.mentorId)
|
|
40757
|
-
queryParams.set('mentor_id', args.mentorId);
|
|
40758
|
-
const url = `${OpenAPI.BASE}/api/core/lti/1p3/provider/lti-mentors/?${queryParams.toString()}`;
|
|
40759
|
-
const response = await fetch(url, {
|
|
40760
|
-
method: 'GET',
|
|
40761
|
-
headers: OpenAPI.HEADERS,
|
|
40762
|
-
credentials: 'omit',
|
|
40763
|
-
});
|
|
40764
|
-
if (!response.ok) {
|
|
40765
|
-
throw Object.assign(new Error('Failed to fetch LTI mentors'), {
|
|
40766
|
-
status: response.status,
|
|
40767
|
-
body: await response.text(),
|
|
40768
|
-
});
|
|
40769
|
-
}
|
|
40770
|
-
return response.json();
|
|
40771
|
-
}),
|
|
40950
|
+
...buildEndpointFromService(exports.SERVICES.DM, (args) => fetchLtiList('lti-mentors', args)),
|
|
40772
40951
|
providesTags: ['LtiMentors'],
|
|
40773
40952
|
}),
|
|
40774
40953
|
getLtiMentorDetail: builder.query({
|
|
@@ -40791,7 +40970,7 @@ const coreApiSlice = react.createApi({
|
|
|
40791
40970
|
}),
|
|
40792
40971
|
// ── LTI 1.3 Provider: Tools (platform-wide LTI Platform integrations) ──
|
|
40793
40972
|
getLtiTools: builder.query({
|
|
40794
|
-
...
|
|
40973
|
+
...buildEndpointFromService(exports.SERVICES.DM, (args) => fetchLtiList('lti-tools', args)),
|
|
40795
40974
|
providesTags: ['LtiTools'],
|
|
40796
40975
|
}),
|
|
40797
40976
|
getLtiToolDetail: builder.query({
|
|
@@ -40814,7 +40993,7 @@ const coreApiSlice = react.createApi({
|
|
|
40814
40993
|
}),
|
|
40815
40994
|
}),
|
|
40816
40995
|
});
|
|
40817
|
-
const { useCreateRedirectTokenMutation, useGetPlatformInfoQuery, useGetRbacPermissionsMutation, useLazyGetPlatformInfoQuery, useUpdatePlatformInfoMutation, useUpdateUserStatusMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, useGetRbacGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useGetRbacGroupDetailsQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetRbacRolesQuery, useLazyGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, usePartialUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetDepartmentMemberCheckQuery, useLazyGetDepartmentMemberCheckQuery, useGetRbacMentorAccessListQuery, useUpdateRbacMentorAccessMutation, useGetRbacActionsDefinitionQuery, useLazyGetRbacActionsDefinitionQuery, useGetRbacTeamsAccessListQuery, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation,
|
|
40996
|
+
const { useCreateRedirectTokenMutation, useGetPlatformInfoQuery, useGetRbacPermissionsMutation, useLazyGetPlatformInfoQuery, useUpdatePlatformInfoMutation, useUpdateUserStatusMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, useGetRbacGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useGetRbacGroupDetailsQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetRbacRolesQuery, useLazyGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, usePartialUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetDepartmentMemberCheckQuery, useLazyGetDepartmentMemberCheckQuery, useGetRbacMentorAccessListQuery, useUpdateRbacMentorAccessMutation, useGetRbacActionsDefinitionQuery, useLazyGetRbacActionsDefinitionQuery, useGetRbacResourceDiscoveryQuery, useLazyGetRbacResourceDiscoveryQuery, useGetRbacResourceListQuery, useLazyGetRbacResourceListQuery, useGetRbacTeamsAccessListQuery, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation,
|
|
40818
40997
|
// LTI Keys
|
|
40819
40998
|
useGetLtiKeysQuery, useGetLtiKeyDetailQuery, useLazyGetLtiKeyDetailQuery, useCreateLtiKeyMutation, useUpdateLtiKeyMutation, useDeleteLtiKeyMutation,
|
|
40820
40999
|
// LTI Agent (Mentor) Links
|
|
@@ -42704,6 +42883,155 @@ const edxSsoApiSlice = react.createApi({
|
|
|
42704
42883
|
});
|
|
42705
42884
|
const { useGetEdxSSOTokenQuery, useLazyGetEdxSSOTokenQuery } = edxSsoApiSlice;
|
|
42706
42885
|
|
|
42886
|
+
const STUDIO_AUTHORING_ENDPOINTS = {
|
|
42887
|
+
CREATE_COURSE: {
|
|
42888
|
+
path: (contentType) => `/api/ibl/manage/${contentType}/`,
|
|
42889
|
+
service: exports.SERVICES.STUDIO,
|
|
42890
|
+
},
|
|
42891
|
+
DELETE_COURSE: {
|
|
42892
|
+
path: () => '/api/ibl/manage/course/delete',
|
|
42893
|
+
service: exports.SERVICES.STUDIO,
|
|
42894
|
+
},
|
|
42895
|
+
COURSE_SETTINGS: {
|
|
42896
|
+
path: (contentType) => `/api/ibl/v1/${contentType}_settings/`,
|
|
42897
|
+
service: exports.SERVICES.STUDIO,
|
|
42898
|
+
},
|
|
42899
|
+
CREATE_XBLOCK: {
|
|
42900
|
+
path: () => '/xblock/',
|
|
42901
|
+
service: exports.SERVICES.STUDIO,
|
|
42902
|
+
},
|
|
42903
|
+
UPDATE_XBLOCK: {
|
|
42904
|
+
path: (locator) => `/xblock/${locator}`,
|
|
42905
|
+
service: exports.SERVICES.STUDIO,
|
|
42906
|
+
},
|
|
42907
|
+
SCORM_SUBMIT: {
|
|
42908
|
+
path: (locator) => `/xblock/${locator}/handler/studio_submit`,
|
|
42909
|
+
service: exports.SERVICES.STUDIO,
|
|
42910
|
+
},
|
|
42911
|
+
UPLOAD_ASSET: {
|
|
42912
|
+
path: (courseKey) => `/assets/${courseKey}/`,
|
|
42913
|
+
service: exports.SERVICES.STUDIO,
|
|
42914
|
+
},
|
|
42915
|
+
ADVANCED_SETTINGS: {
|
|
42916
|
+
path: (courseKey) => `/settings/advanced/${courseKey}`,
|
|
42917
|
+
service: exports.SERVICES.STUDIO,
|
|
42918
|
+
},
|
|
42919
|
+
VIDEO_UPLOAD: {
|
|
42920
|
+
path: (courseKey) => `/api/v1/ibl/course/${courseKey}/s3-upload`,
|
|
42921
|
+
service: exports.SERVICES.STUDIO,
|
|
42922
|
+
},
|
|
42923
|
+
};
|
|
42924
|
+
|
|
42925
|
+
/**
|
|
42926
|
+
* Studio (Open edX CMS) course-authoring endpoints. These hit the Studio host
|
|
42927
|
+
* (`Config.studioUrl`) with cookie-session auth + CSRF token, mirroring how
|
|
42928
|
+
* Studio's own frontend talks to it.
|
|
42929
|
+
*/
|
|
42930
|
+
const studioAuthoringApiSlice = react.createApi({
|
|
42931
|
+
reducerPath: 'studioAuthoringApiSlice',
|
|
42932
|
+
baseQuery: iblFetchBaseQuery,
|
|
42933
|
+
endpoints: (builder) => ({
|
|
42934
|
+
/** Create the course (or library) shell. Returns `course_key`. */
|
|
42935
|
+
createStudioCourse: builder.mutation({
|
|
42936
|
+
query: ({ courseData, contentType = 'course' }) => ({
|
|
42937
|
+
url: STUDIO_AUTHORING_ENDPOINTS.CREATE_COURSE.path(contentType),
|
|
42938
|
+
service: STUDIO_AUTHORING_ENDPOINTS.CREATE_COURSE.service,
|
|
42939
|
+
method: 'POST',
|
|
42940
|
+
body: courseData,
|
|
42941
|
+
}),
|
|
42942
|
+
}),
|
|
42943
|
+
/** Delete a course — used as rollback when a later creation step fails. */
|
|
42944
|
+
deleteStudioCourse: builder.mutation({
|
|
42945
|
+
query: ({ courseKey }) => ({
|
|
42946
|
+
url: STUDIO_AUTHORING_ENDPOINTS.DELETE_COURSE.path(),
|
|
42947
|
+
service: STUDIO_AUTHORING_ENDPOINTS.DELETE_COURSE.service,
|
|
42948
|
+
method: 'POST',
|
|
42949
|
+
body: { course_key: courseKey },
|
|
42950
|
+
}),
|
|
42951
|
+
}),
|
|
42952
|
+
/** Set the full course settings/metadata payload. */
|
|
42953
|
+
updateStudioCourseSettings: builder.mutation({
|
|
42954
|
+
query: ({ settings, contentType = 'course' }) => ({
|
|
42955
|
+
url: STUDIO_AUTHORING_ENDPOINTS.COURSE_SETTINGS.path(contentType),
|
|
42956
|
+
service: STUDIO_AUTHORING_ENDPOINTS.COURSE_SETTINGS.service,
|
|
42957
|
+
method: 'POST',
|
|
42958
|
+
body: settings,
|
|
42959
|
+
}),
|
|
42960
|
+
}),
|
|
42961
|
+
/**
|
|
42962
|
+
* Create an xblock node (chapter / sequential / vertical / video / scorm)
|
|
42963
|
+
* under `parent_locator`.
|
|
42964
|
+
*/
|
|
42965
|
+
createStudioXblock: builder.mutation({
|
|
42966
|
+
query: (blockData) => ({
|
|
42967
|
+
url: STUDIO_AUTHORING_ENDPOINTS.CREATE_XBLOCK.path(),
|
|
42968
|
+
service: STUDIO_AUTHORING_ENDPOINTS.CREATE_XBLOCK.service,
|
|
42969
|
+
method: 'POST',
|
|
42970
|
+
body: blockData,
|
|
42971
|
+
}),
|
|
42972
|
+
}),
|
|
42973
|
+
/**
|
|
42974
|
+
* Update an existing xblock by locator — used for video metadata and for
|
|
42975
|
+
* publishing a unit (`{ publish: 'make_public' }`).
|
|
42976
|
+
*/
|
|
42977
|
+
updateStudioXblock: builder.mutation({
|
|
42978
|
+
query: ({ locator, blockData }) => ({
|
|
42979
|
+
url: STUDIO_AUTHORING_ENDPOINTS.UPDATE_XBLOCK.path(encodeURIComponent(locator)),
|
|
42980
|
+
service: STUDIO_AUTHORING_ENDPOINTS.UPDATE_XBLOCK.service,
|
|
42981
|
+
method: 'POST',
|
|
42982
|
+
body: blockData,
|
|
42983
|
+
}),
|
|
42984
|
+
}),
|
|
42985
|
+
/** Upload the SCORM zip to the scorm xblock's `studio_submit` handler. */
|
|
42986
|
+
uploadStudioScormPackage: builder.mutation({
|
|
42987
|
+
query: ({ locator, formData }) => ({
|
|
42988
|
+
url: STUDIO_AUTHORING_ENDPOINTS.SCORM_SUBMIT.path(encodeURIComponent(locator)),
|
|
42989
|
+
service: STUDIO_AUTHORING_ENDPOINTS.SCORM_SUBMIT.service,
|
|
42990
|
+
method: 'POST',
|
|
42991
|
+
body: formData,
|
|
42992
|
+
isJson: false,
|
|
42993
|
+
}),
|
|
42994
|
+
}),
|
|
42995
|
+
/** Upload a course asset (e.g. the course card image). */
|
|
42996
|
+
uploadStudioCourseAsset: builder.mutation({
|
|
42997
|
+
query: ({ courseKey, formData }) => ({
|
|
42998
|
+
url: STUDIO_AUTHORING_ENDPOINTS.UPLOAD_ASSET.path(encodeURIComponent(courseKey)),
|
|
42999
|
+
service: STUDIO_AUTHORING_ENDPOINTS.UPLOAD_ASSET.service,
|
|
43000
|
+
method: 'POST',
|
|
43001
|
+
body: formData,
|
|
43002
|
+
isJson: true,
|
|
43003
|
+
// Asset upload is authenticated by the Studio session cookie + CSRF
|
|
43004
|
+
// token alone; no Authorization header.
|
|
43005
|
+
skipAuth: true,
|
|
43006
|
+
// Matches how Studio's own frontend requests the asset endpoint. Set
|
|
43007
|
+
// explicitly so the base query keeps it instead of defaulting to
|
|
43008
|
+
// `application/json`.
|
|
43009
|
+
headers: { Accept: 'application/json, text/plain, */*' },
|
|
43010
|
+
}),
|
|
43011
|
+
}),
|
|
43012
|
+
/** Set Studio advanced settings (e.g. enable the `scorm` module). */
|
|
43013
|
+
setStudioAdvancedSettings: builder.mutation({
|
|
43014
|
+
query: ({ courseKey, settings }) => ({
|
|
43015
|
+
url: STUDIO_AUTHORING_ENDPOINTS.ADVANCED_SETTINGS.path(encodeURIComponent(courseKey)),
|
|
43016
|
+
service: STUDIO_AUTHORING_ENDPOINTS.ADVANCED_SETTINGS.service,
|
|
43017
|
+
method: 'POST',
|
|
43018
|
+
body: settings,
|
|
43019
|
+
}),
|
|
43020
|
+
}),
|
|
43021
|
+
/** Upload a raw video file to course storage; returns `{ file_url }`. */
|
|
43022
|
+
uploadStudioCourseVideo: builder.mutation({
|
|
43023
|
+
query: ({ courseKey, formData }) => ({
|
|
43024
|
+
url: STUDIO_AUTHORING_ENDPOINTS.VIDEO_UPLOAD.path(encodeURIComponent(courseKey)),
|
|
43025
|
+
service: STUDIO_AUTHORING_ENDPOINTS.VIDEO_UPLOAD.service,
|
|
43026
|
+
method: 'POST',
|
|
43027
|
+
body: formData,
|
|
43028
|
+
isJson: false,
|
|
43029
|
+
}),
|
|
43030
|
+
}),
|
|
43031
|
+
}),
|
|
43032
|
+
});
|
|
43033
|
+
const { useCreateStudioCourseMutation, useDeleteStudioCourseMutation, useUpdateStudioCourseSettingsMutation, useCreateStudioXblockMutation, useUpdateStudioXblockMutation, useUploadStudioScormPackageMutation, useUploadStudioCourseAssetMutation, useSetStudioAdvancedSettingsMutation, useUploadStudioCourseVideoMutation, } = studioAuthoringApiSlice;
|
|
43034
|
+
|
|
42707
43035
|
const searchApiSlice = react.createApi({
|
|
42708
43036
|
reducerPath: 'searchApiSlice',
|
|
42709
43037
|
baseQuery: iblFakeBaseQuery,
|
|
@@ -43182,6 +43510,163 @@ const notificationsCustomApiSlice = react.createApi({
|
|
|
43182
43510
|
});
|
|
43183
43511
|
const { useGetTemplatesQuery, useLazyGetTemplatesQuery, useGetTemplateDetailsQuery, useLazyGetTemplateDetailsQuery, useUpdateTemplateMutation, useToggleTemplateMutation, } = notificationsCustomApiSlice;
|
|
43184
43512
|
|
|
43513
|
+
const SUPPORT_TICKETS_REDUCER_PATH = 'supportTicketsApiSlice';
|
|
43514
|
+
const SUPPORT_TICKETS_TAGS = {
|
|
43515
|
+
TICKETS: 'SUPPORT_TICKETS',
|
|
43516
|
+
TICKET: 'SUPPORT_TICKET',
|
|
43517
|
+
TICKET_MESSAGES: 'SUPPORT_TICKET_MESSAGES',
|
|
43518
|
+
};
|
|
43519
|
+
const SUPPORT_TICKETS_ENDPOINTS = {
|
|
43520
|
+
TICKETS: {
|
|
43521
|
+
service: exports.SERVICES.DM,
|
|
43522
|
+
path: (org, userId) => `/api/ai-mentor/orgs/${org}/users/${userId}/support-tickets/`,
|
|
43523
|
+
},
|
|
43524
|
+
TICKET: {
|
|
43525
|
+
service: exports.SERVICES.DM,
|
|
43526
|
+
path: (org, userId, id) => `/api/ai-mentor/orgs/${org}/users/${userId}/support-tickets/${id}/`,
|
|
43527
|
+
},
|
|
43528
|
+
TICKET_CLOSE: {
|
|
43529
|
+
service: exports.SERVICES.DM,
|
|
43530
|
+
path: (org, userId, id) => `/api/ai-mentor/orgs/${org}/users/${userId}/support-tickets/${id}/close/`,
|
|
43531
|
+
},
|
|
43532
|
+
TICKET_MESSAGES: {
|
|
43533
|
+
service: exports.SERVICES.DM,
|
|
43534
|
+
path: (org, userId) => `/api/ai-mentor/orgs/${org}/users/${userId}/support-ticket-messages/`,
|
|
43535
|
+
},
|
|
43536
|
+
TICKET_MESSAGE: {
|
|
43537
|
+
service: exports.SERVICES.DM,
|
|
43538
|
+
path: (org, userId, id) => `/api/ai-mentor/orgs/${org}/users/${userId}/support-ticket-messages/${id}/`,
|
|
43539
|
+
},
|
|
43540
|
+
};
|
|
43541
|
+
|
|
43542
|
+
/**
|
|
43543
|
+
* Human Support ticket endpoints
|
|
43544
|
+
* (`/api/ai-mentor/orgs/{org}/users/{user_id}/support-tickets/` and
|
|
43545
|
+
* `/api/ai-mentor/orgs/{org}/users/{user_id}/support-ticket-messages/`).
|
|
43546
|
+
*
|
|
43547
|
+
* Hand-written: these endpoints are newer than the pinned `@iblai/iblai-api`
|
|
43548
|
+
* release, so there is no generated service method to wrap yet.
|
|
43549
|
+
*/
|
|
43550
|
+
const supportTicketsApiSlice = react.createApi({
|
|
43551
|
+
reducerPath: SUPPORT_TICKETS_REDUCER_PATH,
|
|
43552
|
+
tagTypes: [...Object.values(SUPPORT_TICKETS_TAGS)],
|
|
43553
|
+
baseQuery: iblFetchBaseQuery,
|
|
43554
|
+
endpoints: (builder) => ({
|
|
43555
|
+
getSupportTickets: builder.query({
|
|
43556
|
+
query: ({ org, userId, mentorId, page, pageSize, session, status, username }) => ({
|
|
43557
|
+
url: SUPPORT_TICKETS_ENDPOINTS.TICKETS.path(org, userId),
|
|
43558
|
+
service: SUPPORT_TICKETS_ENDPOINTS.TICKETS.service,
|
|
43559
|
+
params: {
|
|
43560
|
+
mentor_id: mentorId,
|
|
43561
|
+
page,
|
|
43562
|
+
page_size: pageSize,
|
|
43563
|
+
session,
|
|
43564
|
+
status,
|
|
43565
|
+
username,
|
|
43566
|
+
},
|
|
43567
|
+
}),
|
|
43568
|
+
providesTags: [SUPPORT_TICKETS_TAGS.TICKETS],
|
|
43569
|
+
}),
|
|
43570
|
+
getSupportTicket: builder.query({
|
|
43571
|
+
query: ({ org, userId, id }) => ({
|
|
43572
|
+
url: SUPPORT_TICKETS_ENDPOINTS.TICKET.path(org, userId, id),
|
|
43573
|
+
service: SUPPORT_TICKETS_ENDPOINTS.TICKET.service,
|
|
43574
|
+
}),
|
|
43575
|
+
providesTags: [SUPPORT_TICKETS_TAGS.TICKET],
|
|
43576
|
+
}),
|
|
43577
|
+
updateSupportTicket: builder.mutation({
|
|
43578
|
+
query: ({ org, userId, id, body }) => ({
|
|
43579
|
+
url: SUPPORT_TICKETS_ENDPOINTS.TICKET.path(org, userId, id),
|
|
43580
|
+
service: SUPPORT_TICKETS_ENDPOINTS.TICKET.service,
|
|
43581
|
+
method: 'PUT',
|
|
43582
|
+
body,
|
|
43583
|
+
}),
|
|
43584
|
+
invalidatesTags: [SUPPORT_TICKETS_TAGS.TICKETS, SUPPORT_TICKETS_TAGS.TICKET],
|
|
43585
|
+
}),
|
|
43586
|
+
patchSupportTicket: builder.mutation({
|
|
43587
|
+
query: ({ org, userId, id, body }) => ({
|
|
43588
|
+
url: SUPPORT_TICKETS_ENDPOINTS.TICKET.path(org, userId, id),
|
|
43589
|
+
service: SUPPORT_TICKETS_ENDPOINTS.TICKET.service,
|
|
43590
|
+
method: 'PATCH',
|
|
43591
|
+
body,
|
|
43592
|
+
}),
|
|
43593
|
+
invalidatesTags: [SUPPORT_TICKETS_TAGS.TICKETS, SUPPORT_TICKETS_TAGS.TICKET],
|
|
43594
|
+
}),
|
|
43595
|
+
deleteSupportTicket: builder.mutation({
|
|
43596
|
+
query: ({ org, userId, id }) => ({
|
|
43597
|
+
url: SUPPORT_TICKETS_ENDPOINTS.TICKET.path(org, userId, id),
|
|
43598
|
+
service: SUPPORT_TICKETS_ENDPOINTS.TICKET.service,
|
|
43599
|
+
method: 'DELETE',
|
|
43600
|
+
}),
|
|
43601
|
+
invalidatesTags: [SUPPORT_TICKETS_TAGS.TICKETS],
|
|
43602
|
+
}),
|
|
43603
|
+
closeSupportTicket: builder.mutation({
|
|
43604
|
+
query: ({ org, userId, id }) => ({
|
|
43605
|
+
url: SUPPORT_TICKETS_ENDPOINTS.TICKET_CLOSE.path(org, userId, id),
|
|
43606
|
+
service: SUPPORT_TICKETS_ENDPOINTS.TICKET_CLOSE.service,
|
|
43607
|
+
method: 'POST',
|
|
43608
|
+
}),
|
|
43609
|
+
invalidatesTags: [SUPPORT_TICKETS_TAGS.TICKETS, SUPPORT_TICKETS_TAGS.TICKET],
|
|
43610
|
+
}),
|
|
43611
|
+
getSupportTicketMessages: builder.query({
|
|
43612
|
+
query: ({ org, userId, ticket, sender, page, pageSize }) => ({
|
|
43613
|
+
url: SUPPORT_TICKETS_ENDPOINTS.TICKET_MESSAGES.path(org, userId),
|
|
43614
|
+
service: SUPPORT_TICKETS_ENDPOINTS.TICKET_MESSAGES.service,
|
|
43615
|
+
params: {
|
|
43616
|
+
ticket,
|
|
43617
|
+
sender,
|
|
43618
|
+
page,
|
|
43619
|
+
page_size: pageSize,
|
|
43620
|
+
},
|
|
43621
|
+
}),
|
|
43622
|
+
providesTags: [SUPPORT_TICKETS_TAGS.TICKET_MESSAGES],
|
|
43623
|
+
}),
|
|
43624
|
+
getSupportTicketMessage: builder.query({
|
|
43625
|
+
query: ({ org, userId, id }) => ({
|
|
43626
|
+
url: SUPPORT_TICKETS_ENDPOINTS.TICKET_MESSAGE.path(org, userId, id),
|
|
43627
|
+
service: SUPPORT_TICKETS_ENDPOINTS.TICKET_MESSAGE.service,
|
|
43628
|
+
}),
|
|
43629
|
+
providesTags: [SUPPORT_TICKETS_TAGS.TICKET_MESSAGES],
|
|
43630
|
+
}),
|
|
43631
|
+
createSupportTicketMessage: builder.mutation({
|
|
43632
|
+
query: ({ org, userId, body }) => ({
|
|
43633
|
+
url: SUPPORT_TICKETS_ENDPOINTS.TICKET_MESSAGES.path(org, userId),
|
|
43634
|
+
service: SUPPORT_TICKETS_ENDPOINTS.TICKET_MESSAGES.service,
|
|
43635
|
+
method: 'POST',
|
|
43636
|
+
body,
|
|
43637
|
+
}),
|
|
43638
|
+
invalidatesTags: [SUPPORT_TICKETS_TAGS.TICKET_MESSAGES],
|
|
43639
|
+
}),
|
|
43640
|
+
updateSupportTicketMessage: builder.mutation({
|
|
43641
|
+
query: ({ org, userId, id, body }) => ({
|
|
43642
|
+
url: SUPPORT_TICKETS_ENDPOINTS.TICKET_MESSAGE.path(org, userId, id),
|
|
43643
|
+
service: SUPPORT_TICKETS_ENDPOINTS.TICKET_MESSAGE.service,
|
|
43644
|
+
method: 'PUT',
|
|
43645
|
+
body,
|
|
43646
|
+
}),
|
|
43647
|
+
invalidatesTags: [SUPPORT_TICKETS_TAGS.TICKET_MESSAGES],
|
|
43648
|
+
}),
|
|
43649
|
+
patchSupportTicketMessage: builder.mutation({
|
|
43650
|
+
query: ({ org, userId, id, body }) => ({
|
|
43651
|
+
url: SUPPORT_TICKETS_ENDPOINTS.TICKET_MESSAGE.path(org, userId, id),
|
|
43652
|
+
service: SUPPORT_TICKETS_ENDPOINTS.TICKET_MESSAGE.service,
|
|
43653
|
+
method: 'PATCH',
|
|
43654
|
+
body,
|
|
43655
|
+
}),
|
|
43656
|
+
invalidatesTags: [SUPPORT_TICKETS_TAGS.TICKET_MESSAGES],
|
|
43657
|
+
}),
|
|
43658
|
+
deleteSupportTicketMessage: builder.mutation({
|
|
43659
|
+
query: ({ org, userId, id }) => ({
|
|
43660
|
+
url: SUPPORT_TICKETS_ENDPOINTS.TICKET_MESSAGE.path(org, userId, id),
|
|
43661
|
+
service: SUPPORT_TICKETS_ENDPOINTS.TICKET_MESSAGE.service,
|
|
43662
|
+
method: 'DELETE',
|
|
43663
|
+
}),
|
|
43664
|
+
invalidatesTags: [SUPPORT_TICKETS_TAGS.TICKET_MESSAGES],
|
|
43665
|
+
}),
|
|
43666
|
+
}),
|
|
43667
|
+
});
|
|
43668
|
+
const { useGetSupportTicketsQuery, useLazyGetSupportTicketsQuery, useGetSupportTicketQuery, useLazyGetSupportTicketQuery, useUpdateSupportTicketMutation, usePatchSupportTicketMutation, useDeleteSupportTicketMutation, useCloseSupportTicketMutation, useGetSupportTicketMessagesQuery, useLazyGetSupportTicketMessagesQuery, useGetSupportTicketMessageQuery, useLazyGetSupportTicketMessageQuery, useCreateSupportTicketMessageMutation, useUpdateSupportTicketMessageMutation, usePatchSupportTicketMessageMutation, useDeleteSupportTicketMessageMutation, } = supportTicketsApiSlice;
|
|
43669
|
+
|
|
43185
43670
|
const MENTOR_CUSTOM_REDUCER_PATH = 'mentorCustomApiSlice';
|
|
43186
43671
|
const MENTOR_ENDPOINTS = {
|
|
43187
43672
|
EDIT_MENTOR_SETTINGS: {
|
|
@@ -43431,7 +43916,7 @@ const { useGetModerationLogsQuery, useLazyGetModerationLogsQuery, useDeleteModer
|
|
|
43431
43916
|
* `useGetMentorPublicSettingsQuery`) — this file just adds the typed
|
|
43432
43917
|
* surface for the new fields.
|
|
43433
43918
|
*/
|
|
43434
|
-
const PRIVACY_ACTIONS = ['redact', 'mask', 'block'];
|
|
43919
|
+
const PRIVACY_ACTIONS = ['allow', 'redact', 'mask', 'block'];
|
|
43435
43920
|
const PRIVACY_ENTITY_TYPES = [
|
|
43436
43921
|
'PERSON',
|
|
43437
43922
|
'EMAIL_ADDRESS',
|
|
@@ -45421,6 +45906,391 @@ const auditLogsApiSlice = react.createApi({
|
|
|
45421
45906
|
});
|
|
45422
45907
|
const { useGetAuditLogsQuery, useLazyGetAuditLogsQuery } = auditLogsApiSlice;
|
|
45423
45908
|
|
|
45909
|
+
const EVALUATIONS_REDUCER_PATH = 'evaluationsApiSlice';
|
|
45910
|
+
const evaluationsBase = (org, userId) => `/api/ai-mentor/orgs/${org}/users/${userId}/evaluations`;
|
|
45911
|
+
const EVALUATIONS_ENDPOINTS = {
|
|
45912
|
+
GET_TASK: {
|
|
45913
|
+
service: exports.SERVICES.AXD,
|
|
45914
|
+
path: (org, userId, taskId) => `/api/ai-mentor/orgs/${org}/users/${userId}/tasks/${encodeURIComponent(taskId)}`,
|
|
45915
|
+
},
|
|
45916
|
+
LIST_DATASETS: {
|
|
45917
|
+
service: exports.SERVICES.AXD,
|
|
45918
|
+
path: (org, userId) => `${evaluationsBase(org, userId)}/datasets/`,
|
|
45919
|
+
},
|
|
45920
|
+
CREATE_DATASET: {
|
|
45921
|
+
service: exports.SERVICES.AXD,
|
|
45922
|
+
path: (org, userId) => `${evaluationsBase(org, userId)}/datasets/`,
|
|
45923
|
+
},
|
|
45924
|
+
GET_DATASET: {
|
|
45925
|
+
service: exports.SERVICES.AXD,
|
|
45926
|
+
path: (org, userId, datasetName) => `${evaluationsBase(org, userId)}/datasets/${encodeURIComponent(datasetName)}/`,
|
|
45927
|
+
},
|
|
45928
|
+
LIST_DATASET_ITEMS: {
|
|
45929
|
+
service: exports.SERVICES.AXD,
|
|
45930
|
+
path: (org, userId, datasetName) => `${evaluationsBase(org, userId)}/datasets/${encodeURIComponent(datasetName)}/items/`,
|
|
45931
|
+
},
|
|
45932
|
+
ADD_DATASET_ITEMS: {
|
|
45933
|
+
service: exports.SERVICES.AXD,
|
|
45934
|
+
path: (org, userId, datasetName) => `${evaluationsBase(org, userId)}/datasets/${encodeURIComponent(datasetName)}/items/`,
|
|
45935
|
+
},
|
|
45936
|
+
UPLOAD_DATASET_CSV: {
|
|
45937
|
+
service: exports.SERVICES.AXD,
|
|
45938
|
+
path: (org, userId, datasetName) => `${evaluationsBase(org, userId)}/datasets/${encodeURIComponent(datasetName)}/items/upload/`,
|
|
45939
|
+
},
|
|
45940
|
+
UPDATE_DATASET_ITEM: {
|
|
45941
|
+
service: exports.SERVICES.AXD,
|
|
45942
|
+
path: (org, userId, datasetName, itemId) => `${evaluationsBase(org, userId)}/datasets/${encodeURIComponent(datasetName)}/items/${encodeURIComponent(itemId)}/`,
|
|
45943
|
+
},
|
|
45944
|
+
DELETE_DATASET_ITEM: {
|
|
45945
|
+
service: exports.SERVICES.AXD,
|
|
45946
|
+
path: (org, userId, datasetName, itemId) => `${evaluationsBase(org, userId)}/datasets/${encodeURIComponent(datasetName)}/items/${encodeURIComponent(itemId)}/`,
|
|
45947
|
+
},
|
|
45948
|
+
LIST_RUNS: {
|
|
45949
|
+
service: exports.SERVICES.AXD,
|
|
45950
|
+
path: (org, userId, datasetName) => `${evaluationsBase(org, userId)}/datasets/${encodeURIComponent(datasetName)}/runs/`,
|
|
45951
|
+
},
|
|
45952
|
+
START_RUN: {
|
|
45953
|
+
service: exports.SERVICES.AXD,
|
|
45954
|
+
path: (org, userId, datasetName) => `${evaluationsBase(org, userId)}/datasets/${encodeURIComponent(datasetName)}/runs/`,
|
|
45955
|
+
},
|
|
45956
|
+
GET_RUN: {
|
|
45957
|
+
service: exports.SERVICES.AXD,
|
|
45958
|
+
path: (org, userId, datasetName, runName) => `${evaluationsBase(org, userId)}/datasets/${encodeURIComponent(datasetName)}/runs/${encodeURIComponent(runName)}/`,
|
|
45959
|
+
},
|
|
45960
|
+
EXPORT_RUN: {
|
|
45961
|
+
service: exports.SERVICES.AXD,
|
|
45962
|
+
path: (org, userId, datasetName, runName) => `${evaluationsBase(org, userId)}/datasets/${encodeURIComponent(datasetName)}/runs/${encodeURIComponent(runName)}/export/`,
|
|
45963
|
+
},
|
|
45964
|
+
DELETE_RUN: {
|
|
45965
|
+
service: exports.SERVICES.AXD,
|
|
45966
|
+
path: (org, userId, datasetName, runName) => `${evaluationsBase(org, userId)}/datasets/${encodeURIComponent(datasetName)}/runs/${encodeURIComponent(runName)}/`,
|
|
45967
|
+
},
|
|
45968
|
+
EVALUATE_RUN: {
|
|
45969
|
+
service: exports.SERVICES.AXD,
|
|
45970
|
+
path: (org, userId, datasetName, runName) => `${evaluationsBase(org, userId)}/datasets/${encodeURIComponent(datasetName)}/runs/${encodeURIComponent(runName)}/evaluate/`,
|
|
45971
|
+
},
|
|
45972
|
+
LIST_RUN_JUDGES: {
|
|
45973
|
+
service: exports.SERVICES.AXD,
|
|
45974
|
+
path: (org, userId, datasetName, runName) => `${evaluationsBase(org, userId)}/datasets/${encodeURIComponent(datasetName)}/runs/${encodeURIComponent(runName)}/evaluate/`,
|
|
45975
|
+
},
|
|
45976
|
+
LIST_JUDGES: {
|
|
45977
|
+
service: exports.SERVICES.AXD,
|
|
45978
|
+
path: (org, userId) => `${evaluationsBase(org, userId)}/judges/`,
|
|
45979
|
+
},
|
|
45980
|
+
LIST_SCORES: {
|
|
45981
|
+
service: exports.SERVICES.AXD,
|
|
45982
|
+
path: (org, userId) => `${evaluationsBase(org, userId)}/scores/`,
|
|
45983
|
+
},
|
|
45984
|
+
CREATE_SCORE: {
|
|
45985
|
+
service: exports.SERVICES.AXD,
|
|
45986
|
+
path: (org, userId) => `${evaluationsBase(org, userId)}/scores/`,
|
|
45987
|
+
},
|
|
45988
|
+
DELETE_SCORE: {
|
|
45989
|
+
service: exports.SERVICES.AXD,
|
|
45990
|
+
path: (org, userId, scoreId) => `${evaluationsBase(org, userId)}/scores/${encodeURIComponent(scoreId)}/`,
|
|
45991
|
+
},
|
|
45992
|
+
LIST_SCORE_CONFIGS: {
|
|
45993
|
+
service: exports.SERVICES.AXD,
|
|
45994
|
+
path: (org, userId) => `${evaluationsBase(org, userId)}/score-configs/`,
|
|
45995
|
+
},
|
|
45996
|
+
CREATE_SCORE_CONFIG: {
|
|
45997
|
+
service: exports.SERVICES.AXD,
|
|
45998
|
+
path: (org, userId) => `${evaluationsBase(org, userId)}/score-configs/`,
|
|
45999
|
+
},
|
|
46000
|
+
};
|
|
46001
|
+
const EVALUATIONS_TAGS = {
|
|
46002
|
+
DATASETS: 'EVAL_DATASETS',
|
|
46003
|
+
DATASET: 'EVAL_DATASET',
|
|
46004
|
+
DATASET_ITEMS: 'EVAL_DATASET_ITEMS',
|
|
46005
|
+
RUNS: 'EVAL_RUNS',
|
|
46006
|
+
RUN: 'EVAL_RUN',
|
|
46007
|
+
SCORES: 'EVAL_SCORES',
|
|
46008
|
+
SCORE_CONFIGS: 'EVAL_SCORE_CONFIGS',
|
|
46009
|
+
JUDGES: 'EVAL_JUDGES',
|
|
46010
|
+
};
|
|
46011
|
+
|
|
46012
|
+
const evaluationsApiSlice = react.createApi({
|
|
46013
|
+
reducerPath: EVALUATIONS_REDUCER_PATH,
|
|
46014
|
+
baseQuery: iblFetchBaseQuery,
|
|
46015
|
+
tagTypes: [
|
|
46016
|
+
EVALUATIONS_TAGS.DATASETS,
|
|
46017
|
+
EVALUATIONS_TAGS.DATASET,
|
|
46018
|
+
EVALUATIONS_TAGS.DATASET_ITEMS,
|
|
46019
|
+
EVALUATIONS_TAGS.RUNS,
|
|
46020
|
+
EVALUATIONS_TAGS.RUN,
|
|
46021
|
+
EVALUATIONS_TAGS.SCORES,
|
|
46022
|
+
EVALUATIONS_TAGS.SCORE_CONFIGS,
|
|
46023
|
+
EVALUATIONS_TAGS.JUDGES,
|
|
46024
|
+
],
|
|
46025
|
+
endpoints: (builder) => ({
|
|
46026
|
+
listEvalDatasets: builder.query({
|
|
46027
|
+
query: ({ org, userId, page, limit, name, user_email }) => ({
|
|
46028
|
+
url: EVALUATIONS_ENDPOINTS.LIST_DATASETS.path(org, userId),
|
|
46029
|
+
service: EVALUATIONS_ENDPOINTS.LIST_DATASETS.service,
|
|
46030
|
+
params: { page, limit, name, user_email },
|
|
46031
|
+
}),
|
|
46032
|
+
providesTags: [EVALUATIONS_TAGS.DATASETS],
|
|
46033
|
+
}),
|
|
46034
|
+
createEvalDataset: builder.mutation({
|
|
46035
|
+
query: ({ org, userId, body }) => ({
|
|
46036
|
+
url: EVALUATIONS_ENDPOINTS.CREATE_DATASET.path(org, userId),
|
|
46037
|
+
service: EVALUATIONS_ENDPOINTS.CREATE_DATASET.service,
|
|
46038
|
+
method: 'POST',
|
|
46039
|
+
body,
|
|
46040
|
+
}),
|
|
46041
|
+
invalidatesTags: [EVALUATIONS_TAGS.DATASETS],
|
|
46042
|
+
}),
|
|
46043
|
+
getEvalDataset: builder.query({
|
|
46044
|
+
query: ({ org, userId, datasetName }) => ({
|
|
46045
|
+
url: EVALUATIONS_ENDPOINTS.GET_DATASET.path(org, userId, datasetName),
|
|
46046
|
+
service: EVALUATIONS_ENDPOINTS.GET_DATASET.service,
|
|
46047
|
+
}),
|
|
46048
|
+
providesTags: (_result, _error, { datasetName }) => [
|
|
46049
|
+
{ type: EVALUATIONS_TAGS.DATASET, id: datasetName },
|
|
46050
|
+
],
|
|
46051
|
+
}),
|
|
46052
|
+
listEvalDatasetItems: builder.query({
|
|
46053
|
+
query: ({ org, userId, datasetName, page, limit, include_trace }) => ({
|
|
46054
|
+
url: EVALUATIONS_ENDPOINTS.LIST_DATASET_ITEMS.path(org, userId, datasetName),
|
|
46055
|
+
service: EVALUATIONS_ENDPOINTS.LIST_DATASET_ITEMS.service,
|
|
46056
|
+
params: { page, limit, include_trace },
|
|
46057
|
+
}),
|
|
46058
|
+
providesTags: (_result, _error, { datasetName }) => [
|
|
46059
|
+
{ type: EVALUATIONS_TAGS.DATASET_ITEMS, id: datasetName },
|
|
46060
|
+
],
|
|
46061
|
+
}),
|
|
46062
|
+
addEvalDatasetItems: builder.mutation({
|
|
46063
|
+
query: ({ org, userId, datasetName, body }) => ({
|
|
46064
|
+
url: EVALUATIONS_ENDPOINTS.ADD_DATASET_ITEMS.path(org, userId, datasetName),
|
|
46065
|
+
service: EVALUATIONS_ENDPOINTS.ADD_DATASET_ITEMS.service,
|
|
46066
|
+
method: 'POST',
|
|
46067
|
+
body,
|
|
46068
|
+
}),
|
|
46069
|
+
invalidatesTags: (_result, _error, { datasetName }) => [
|
|
46070
|
+
{ type: EVALUATIONS_TAGS.DATASET_ITEMS, id: datasetName },
|
|
46071
|
+
],
|
|
46072
|
+
}),
|
|
46073
|
+
uploadEvalDatasetCsv: builder.mutation({
|
|
46074
|
+
query: ({ org, userId, datasetName, formData }) => ({
|
|
46075
|
+
url: EVALUATIONS_ENDPOINTS.UPLOAD_DATASET_CSV.path(org, userId, datasetName),
|
|
46076
|
+
service: EVALUATIONS_ENDPOINTS.UPLOAD_DATASET_CSV.service,
|
|
46077
|
+
method: 'POST',
|
|
46078
|
+
body: formData,
|
|
46079
|
+
isJson: false,
|
|
46080
|
+
}),
|
|
46081
|
+
invalidatesTags: (_result, _error, { datasetName }) => [
|
|
46082
|
+
{ type: EVALUATIONS_TAGS.DATASET_ITEMS, id: datasetName },
|
|
46083
|
+
],
|
|
46084
|
+
}),
|
|
46085
|
+
updateEvalDatasetItem: builder.mutation({
|
|
46086
|
+
query: ({ org, userId, datasetName, itemId, body }) => ({
|
|
46087
|
+
url: EVALUATIONS_ENDPOINTS.UPDATE_DATASET_ITEM.path(org, userId, datasetName, itemId),
|
|
46088
|
+
service: EVALUATIONS_ENDPOINTS.UPDATE_DATASET_ITEM.service,
|
|
46089
|
+
method: 'PUT',
|
|
46090
|
+
body,
|
|
46091
|
+
}),
|
|
46092
|
+
invalidatesTags: (_result, _error, { datasetName }) => [
|
|
46093
|
+
{ type: EVALUATIONS_TAGS.DATASET_ITEMS, id: datasetName },
|
|
46094
|
+
],
|
|
46095
|
+
}),
|
|
46096
|
+
deleteEvalDatasetItem: builder.mutation({
|
|
46097
|
+
query: ({ org, userId, datasetName, itemId }) => ({
|
|
46098
|
+
url: EVALUATIONS_ENDPOINTS.DELETE_DATASET_ITEM.path(org, userId, datasetName, itemId),
|
|
46099
|
+
service: EVALUATIONS_ENDPOINTS.DELETE_DATASET_ITEM.service,
|
|
46100
|
+
method: 'DELETE',
|
|
46101
|
+
}),
|
|
46102
|
+
invalidatesTags: (_result, _error, { datasetName }) => [
|
|
46103
|
+
{ type: EVALUATIONS_TAGS.DATASET_ITEMS, id: datasetName },
|
|
46104
|
+
],
|
|
46105
|
+
}),
|
|
46106
|
+
listEvalRuns: builder.query({
|
|
46107
|
+
query: ({ org, userId, datasetName, page, limit, user_email }) => ({
|
|
46108
|
+
url: EVALUATIONS_ENDPOINTS.LIST_RUNS.path(org, userId, datasetName),
|
|
46109
|
+
service: EVALUATIONS_ENDPOINTS.LIST_RUNS.service,
|
|
46110
|
+
params: { page, limit, user_email },
|
|
46111
|
+
}),
|
|
46112
|
+
providesTags: (_result, _error, { datasetName }) => [
|
|
46113
|
+
{ type: EVALUATIONS_TAGS.RUNS, id: datasetName },
|
|
46114
|
+
],
|
|
46115
|
+
}),
|
|
46116
|
+
startEvalRun: builder.mutation({
|
|
46117
|
+
query: ({ org, userId, datasetName, body }) => ({
|
|
46118
|
+
url: EVALUATIONS_ENDPOINTS.START_RUN.path(org, userId, datasetName),
|
|
46119
|
+
service: EVALUATIONS_ENDPOINTS.START_RUN.service,
|
|
46120
|
+
method: 'POST',
|
|
46121
|
+
body,
|
|
46122
|
+
}),
|
|
46123
|
+
invalidatesTags: (_result, _error, { datasetName }) => [
|
|
46124
|
+
{ type: EVALUATIONS_TAGS.RUNS, id: datasetName },
|
|
46125
|
+
],
|
|
46126
|
+
}),
|
|
46127
|
+
getEvalRun: builder.query({
|
|
46128
|
+
query: ({ org, userId, datasetName, runName }) => ({
|
|
46129
|
+
url: EVALUATIONS_ENDPOINTS.GET_RUN.path(org, userId, datasetName, runName),
|
|
46130
|
+
service: EVALUATIONS_ENDPOINTS.GET_RUN.service,
|
|
46131
|
+
}),
|
|
46132
|
+
providesTags: (_result, _error, { runName }) => [{ type: EVALUATIONS_TAGS.RUN, id: runName }],
|
|
46133
|
+
}),
|
|
46134
|
+
deleteEvalRun: builder.mutation({
|
|
46135
|
+
query: ({ org, userId, datasetName, runName }) => ({
|
|
46136
|
+
url: EVALUATIONS_ENDPOINTS.DELETE_RUN.path(org, userId, datasetName, runName),
|
|
46137
|
+
service: EVALUATIONS_ENDPOINTS.DELETE_RUN.service,
|
|
46138
|
+
method: 'DELETE',
|
|
46139
|
+
}),
|
|
46140
|
+
invalidatesTags: (_result, _error, { datasetName }) => [
|
|
46141
|
+
{ type: EVALUATIONS_TAGS.RUNS, id: datasetName },
|
|
46142
|
+
],
|
|
46143
|
+
}),
|
|
46144
|
+
exportEvalRun: builder.mutation({
|
|
46145
|
+
query: ({ org, userId, datasetName, runName }) => ({
|
|
46146
|
+
url: EVALUATIONS_ENDPOINTS.EXPORT_RUN.path(org, userId, datasetName, runName),
|
|
46147
|
+
service: EVALUATIONS_ENDPOINTS.EXPORT_RUN.service,
|
|
46148
|
+
responseHandler: (response) => response.text(),
|
|
46149
|
+
isJson: false,
|
|
46150
|
+
}),
|
|
46151
|
+
}),
|
|
46152
|
+
evaluateEvalRun: builder.mutation({
|
|
46153
|
+
query: ({ org, userId, datasetName, runName, body }) => ({
|
|
46154
|
+
url: EVALUATIONS_ENDPOINTS.EVALUATE_RUN.path(org, userId, datasetName, runName),
|
|
46155
|
+
service: EVALUATIONS_ENDPOINTS.EVALUATE_RUN.service,
|
|
46156
|
+
method: 'POST',
|
|
46157
|
+
body,
|
|
46158
|
+
}),
|
|
46159
|
+
invalidatesTags: (_result, _error, { runName }) => [
|
|
46160
|
+
{ type: EVALUATIONS_TAGS.RUN, id: runName },
|
|
46161
|
+
EVALUATIONS_TAGS.JUDGES,
|
|
46162
|
+
],
|
|
46163
|
+
}),
|
|
46164
|
+
listEvalRunJudges: builder.query({
|
|
46165
|
+
query: ({ org, userId, datasetName, runName, page, limit, status, user_email }) => ({
|
|
46166
|
+
url: EVALUATIONS_ENDPOINTS.LIST_RUN_JUDGES.path(org, userId, datasetName, runName),
|
|
46167
|
+
service: EVALUATIONS_ENDPOINTS.LIST_RUN_JUDGES.service,
|
|
46168
|
+
params: { page, limit, status, user_email },
|
|
46169
|
+
}),
|
|
46170
|
+
providesTags: [EVALUATIONS_TAGS.JUDGES],
|
|
46171
|
+
}),
|
|
46172
|
+
listEvalJudges: builder.query({
|
|
46173
|
+
query: ({ org, userId, page, limit, status, user_email, dataset_name }) => ({
|
|
46174
|
+
url: EVALUATIONS_ENDPOINTS.LIST_JUDGES.path(org, userId),
|
|
46175
|
+
service: EVALUATIONS_ENDPOINTS.LIST_JUDGES.service,
|
|
46176
|
+
params: { page, limit, status, user_email, dataset_name },
|
|
46177
|
+
}),
|
|
46178
|
+
providesTags: [EVALUATIONS_TAGS.JUDGES],
|
|
46179
|
+
}),
|
|
46180
|
+
listEvalScores: builder.query({
|
|
46181
|
+
query: ({ org, userId, page, limit, dataset_run_id, trace_id, name }) => ({
|
|
46182
|
+
url: EVALUATIONS_ENDPOINTS.LIST_SCORES.path(org, userId),
|
|
46183
|
+
service: EVALUATIONS_ENDPOINTS.LIST_SCORES.service,
|
|
46184
|
+
params: { page, limit, dataset_run_id, trace_id, name },
|
|
46185
|
+
}),
|
|
46186
|
+
providesTags: [EVALUATIONS_TAGS.SCORES],
|
|
46187
|
+
}),
|
|
46188
|
+
// Score create/delete deliberately do NOT invalidate the RUN tag: the
|
|
46189
|
+
// eval store ingests score writes asynchronously, so an immediate
|
|
46190
|
+
// refetch returns the run *without* the change and would clobber the
|
|
46191
|
+
// cache patches below. The run still refreshes on reopen / manual
|
|
46192
|
+
// Refresh, by which point the store has caught up.
|
|
46193
|
+
createEvalScore: builder.mutation({
|
|
46194
|
+
query: ({ org, userId, body }) => ({
|
|
46195
|
+
url: EVALUATIONS_ENDPOINTS.CREATE_SCORE.path(org, userId),
|
|
46196
|
+
service: EVALUATIONS_ENDPOINTS.CREATE_SCORE.service,
|
|
46197
|
+
method: 'POST',
|
|
46198
|
+
body,
|
|
46199
|
+
}),
|
|
46200
|
+
invalidatesTags: [EVALUATIONS_TAGS.SCORES],
|
|
46201
|
+
async onQueryStarted({ org, userId, body, datasetName, runName }, { dispatch, queryFulfilled }) {
|
|
46202
|
+
try {
|
|
46203
|
+
await queryFulfilled;
|
|
46204
|
+
}
|
|
46205
|
+
catch (_a) {
|
|
46206
|
+
return;
|
|
46207
|
+
}
|
|
46208
|
+
if (!datasetName || !runName)
|
|
46209
|
+
return;
|
|
46210
|
+
dispatch(evaluationsApiSlice.util.updateQueryData('getEvalRun', { org, userId, datasetName, runName }, (draft) => {
|
|
46211
|
+
var _a, _b, _c, _d, _e, _f;
|
|
46212
|
+
const item = (_a = draft.dataset_run_items) === null || _a === void 0 ? void 0 : _a.find((i) => i.trace_id === body.trace_id);
|
|
46213
|
+
if (!item)
|
|
46214
|
+
return;
|
|
46215
|
+
item.scores = (_b = item.scores) !== null && _b !== void 0 ? _b : [];
|
|
46216
|
+
item.scores.push({
|
|
46217
|
+
// The create endpoint returns no id (the write is queued);
|
|
46218
|
+
// this placeholder is replaced by the real record on the
|
|
46219
|
+
// next refetch once the store has ingested it.
|
|
46220
|
+
id: `pending-${body.trace_id}-${body.name}-${Date.now()}`,
|
|
46221
|
+
name: body.name,
|
|
46222
|
+
value: body.value,
|
|
46223
|
+
string_value: null,
|
|
46224
|
+
data_type: (_c = body.data_type) !== null && _c !== void 0 ? _c : 'NUMERIC',
|
|
46225
|
+
comment: (_d = body.comment) !== null && _d !== void 0 ? _d : null,
|
|
46226
|
+
trace_id: body.trace_id,
|
|
46227
|
+
observation_id: (_e = body.observation_id) !== null && _e !== void 0 ? _e : null,
|
|
46228
|
+
dataset_run_id: (_f = body.dataset_run_id) !== null && _f !== void 0 ? _f : null,
|
|
46229
|
+
created_at: new Date().toISOString(),
|
|
46230
|
+
});
|
|
46231
|
+
}));
|
|
46232
|
+
},
|
|
46233
|
+
}),
|
|
46234
|
+
deleteEvalScore: builder.mutation({
|
|
46235
|
+
query: ({ org, userId, scoreId }) => ({
|
|
46236
|
+
url: EVALUATIONS_ENDPOINTS.DELETE_SCORE.path(org, userId, scoreId),
|
|
46237
|
+
service: EVALUATIONS_ENDPOINTS.DELETE_SCORE.service,
|
|
46238
|
+
method: 'DELETE',
|
|
46239
|
+
}),
|
|
46240
|
+
invalidatesTags: [EVALUATIONS_TAGS.SCORES],
|
|
46241
|
+
async onQueryStarted({ org, userId, scoreId, datasetName, runName }, { dispatch, queryFulfilled }) {
|
|
46242
|
+
try {
|
|
46243
|
+
await queryFulfilled;
|
|
46244
|
+
}
|
|
46245
|
+
catch (_a) {
|
|
46246
|
+
return;
|
|
46247
|
+
}
|
|
46248
|
+
if (!datasetName || !runName)
|
|
46249
|
+
return;
|
|
46250
|
+
dispatch(evaluationsApiSlice.util.updateQueryData('getEvalRun', { org, userId, datasetName, runName }, (draft) => {
|
|
46251
|
+
var _a, _b;
|
|
46252
|
+
for (const item of (_a = draft.dataset_run_items) !== null && _a !== void 0 ? _a : []) {
|
|
46253
|
+
if ((_b = item.scores) === null || _b === void 0 ? void 0 : _b.some((s) => s.id === scoreId)) {
|
|
46254
|
+
item.scores = item.scores.filter((s) => s.id !== scoreId);
|
|
46255
|
+
}
|
|
46256
|
+
}
|
|
46257
|
+
}));
|
|
46258
|
+
},
|
|
46259
|
+
}),
|
|
46260
|
+
listEvalScoreConfigs: builder.query({
|
|
46261
|
+
query: ({ org, userId, page, limit }) => ({
|
|
46262
|
+
url: EVALUATIONS_ENDPOINTS.LIST_SCORE_CONFIGS.path(org, userId),
|
|
46263
|
+
service: EVALUATIONS_ENDPOINTS.LIST_SCORE_CONFIGS.service,
|
|
46264
|
+
params: { page, limit },
|
|
46265
|
+
}),
|
|
46266
|
+
providesTags: [EVALUATIONS_TAGS.SCORE_CONFIGS],
|
|
46267
|
+
}),
|
|
46268
|
+
getEvalTaskStatus: builder.query({
|
|
46269
|
+
query: ({ org, userId, taskId }) => ({
|
|
46270
|
+
url: EVALUATIONS_ENDPOINTS.GET_TASK.path(org, userId, taskId),
|
|
46271
|
+
service: EVALUATIONS_ENDPOINTS.GET_TASK.service,
|
|
46272
|
+
}),
|
|
46273
|
+
}),
|
|
46274
|
+
createEvalScoreConfig: builder.mutation({
|
|
46275
|
+
query: ({ org, userId, body }) => ({
|
|
46276
|
+
url: EVALUATIONS_ENDPOINTS.CREATE_SCORE_CONFIG.path(org, userId),
|
|
46277
|
+
service: EVALUATIONS_ENDPOINTS.CREATE_SCORE_CONFIG.service,
|
|
46278
|
+
method: 'POST',
|
|
46279
|
+
body,
|
|
46280
|
+
}),
|
|
46281
|
+
invalidatesTags: [EVALUATIONS_TAGS.SCORE_CONFIGS],
|
|
46282
|
+
}),
|
|
46283
|
+
}),
|
|
46284
|
+
});
|
|
46285
|
+
const { useListEvalDatasetsQuery, useLazyListEvalDatasetsQuery, useCreateEvalDatasetMutation, useGetEvalDatasetQuery, useListEvalDatasetItemsQuery, useLazyListEvalDatasetItemsQuery, useAddEvalDatasetItemsMutation, useUploadEvalDatasetCsvMutation, useUpdateEvalDatasetItemMutation, useDeleteEvalDatasetItemMutation, useListEvalRunsQuery, useLazyListEvalRunsQuery, useStartEvalRunMutation, useGetEvalRunQuery, useLazyGetEvalRunQuery, useDeleteEvalRunMutation, useExportEvalRunMutation, useEvaluateEvalRunMutation, useListEvalRunJudgesQuery, useLazyListEvalRunJudgesQuery, useListEvalJudgesQuery, useLazyListEvalJudgesQuery, useListEvalScoresQuery, useLazyListEvalScoresQuery, useCreateEvalScoreMutation, useDeleteEvalScoreMutation, useListEvalScoreConfigsQuery, useCreateEvalScoreConfigMutation, useGetEvalTaskStatusQuery, useLazyGetEvalTaskStatusQuery, } = evaluationsApiSlice;
|
|
46286
|
+
|
|
46287
|
+
/** Total page count derived from `count` and the requested page size. */
|
|
46288
|
+
function evalTotalPages(count, limit) {
|
|
46289
|
+
if (!count || count <= 0)
|
|
46290
|
+
return 0;
|
|
46291
|
+
return Math.ceil(count / limit);
|
|
46292
|
+
}
|
|
46293
|
+
|
|
45424
46294
|
const WATCHED_GROUPS_REDUCER_PATH = 'watchedGroupsApiSlice';
|
|
45425
46295
|
const WATCHED_GROUPS_QUERY_KEYS = {
|
|
45426
46296
|
WATCHED_GROUPS: 'WATCHED_GROUPS',
|
|
@@ -45732,10 +46602,13 @@ const mentorReducer = {
|
|
|
45732
46602
|
[coursesApiSlice.reducerPath]: coursesApiSlice.reducer,
|
|
45733
46603
|
[courseMetadataApiSlice.reducerPath]: courseMetadataApiSlice.reducer,
|
|
45734
46604
|
[edxSsoApiSlice.reducerPath]: edxSsoApiSlice.reducer,
|
|
46605
|
+
[studioAuthoringApiSlice.reducerPath]: studioAuthoringApiSlice.reducer,
|
|
45735
46606
|
[clawApiSlice.reducerPath]: clawApiSlice.reducer,
|
|
46607
|
+
[evaluationsApiSlice.reducerPath]: evaluationsApiSlice.reducer,
|
|
45736
46608
|
[watchedGroupsApiSlice.reducerPath]: watchedGroupsApiSlice.reducer,
|
|
45737
46609
|
[chatPrivacyApiSlice.reducerPath]: chatPrivacyApiSlice.reducer,
|
|
45738
46610
|
[skillsApiSlice.reducerPath]: skillsApiSlice.reducer,
|
|
46611
|
+
[supportTicketsApiSlice.reducerPath]: supportTicketsApiSlice.reducer,
|
|
45739
46612
|
};
|
|
45740
46613
|
const mentorMiddleware = [
|
|
45741
46614
|
mentorApiSlice.middleware,
|
|
@@ -45788,10 +46661,13 @@ const mentorMiddleware = [
|
|
|
45788
46661
|
coursesApiSlice.middleware,
|
|
45789
46662
|
courseMetadataApiSlice.middleware,
|
|
45790
46663
|
edxSsoApiSlice.middleware,
|
|
46664
|
+
studioAuthoringApiSlice.middleware,
|
|
45791
46665
|
clawApiSlice.middleware,
|
|
46666
|
+
evaluationsApiSlice.middleware,
|
|
45792
46667
|
watchedGroupsApiSlice.middleware,
|
|
45793
46668
|
chatPrivacyApiSlice.middleware,
|
|
45794
46669
|
skillsApiSlice.middleware,
|
|
46670
|
+
supportTicketsApiSlice.middleware,
|
|
45795
46671
|
];
|
|
45796
46672
|
|
|
45797
46673
|
const skillsReducer = {
|
|
@@ -45832,6 +46708,7 @@ const skillsReducer = {
|
|
|
45832
46708
|
[coursesApiSlice.reducerPath]: coursesApiSlice.reducer,
|
|
45833
46709
|
[courseMetadataApiSlice.reducerPath]: courseMetadataApiSlice.reducer,
|
|
45834
46710
|
[edxSsoApiSlice.reducerPath]: edxSsoApiSlice.reducer,
|
|
46711
|
+
[studioAuthoringApiSlice.reducerPath]: studioAuthoringApiSlice.reducer,
|
|
45835
46712
|
[watchedGroupsApiSlice.reducerPath]: watchedGroupsApiSlice.reducer,
|
|
45836
46713
|
[chatPrivacyApiSlice.reducerPath]: chatPrivacyApiSlice.reducer,
|
|
45837
46714
|
};
|
|
@@ -45873,16 +46750,20 @@ const skillsMiddleware = [
|
|
|
45873
46750
|
coursesApiSlice.middleware,
|
|
45874
46751
|
courseMetadataApiSlice.middleware,
|
|
45875
46752
|
edxSsoApiSlice.middleware,
|
|
46753
|
+
studioAuthoringApiSlice.middleware,
|
|
45876
46754
|
watchedGroupsApiSlice.middleware,
|
|
45877
46755
|
chatPrivacyApiSlice.middleware,
|
|
45878
46756
|
];
|
|
45879
46757
|
|
|
45880
|
-
const initializeDataLayer = (dmUrl, lmsUrl, legacyLmsUrl, storageService, httpErrorHandler = {}) => {
|
|
46758
|
+
const initializeDataLayer = (dmUrl, lmsUrl, legacyLmsUrl, storageService, httpErrorHandler = {}, studioUrl) => {
|
|
45881
46759
|
IblDataLayer.storage = storageService;
|
|
45882
46760
|
Config.dmUrl = dmUrl;
|
|
45883
46761
|
Config.lmsUrl = lmsUrl;
|
|
45884
46762
|
Config.legacyLmsUrl = legacyLmsUrl;
|
|
45885
46763
|
Config.httpErrorHandlers = httpErrorHandler;
|
|
46764
|
+
if (studioUrl) {
|
|
46765
|
+
Config.studioUrl = studioUrl;
|
|
46766
|
+
}
|
|
45886
46767
|
};
|
|
45887
46768
|
|
|
45888
46769
|
exports.APP_IDENTIFIERS = APP_IDENTIFIERS;
|
|
@@ -45917,6 +46798,9 @@ exports.DISCLAIMERS_ENDPOINTS = DISCLAIMERS_ENDPOINTS;
|
|
|
45917
46798
|
exports.DISCLAIMERS_QUERY_KEYS = DISCLAIMERS_QUERY_KEYS;
|
|
45918
46799
|
exports.DISCLAIMERS_REDUCER_PATH = DISCLAIMERS_REDUCER_PATH;
|
|
45919
46800
|
exports.EDX_PROCTORING_ENDPOINTS = EDX_PROCTORING_ENDPOINTS;
|
|
46801
|
+
exports.EVALUATIONS_ENDPOINTS = EVALUATIONS_ENDPOINTS;
|
|
46802
|
+
exports.EVALUATIONS_REDUCER_PATH = EVALUATIONS_REDUCER_PATH;
|
|
46803
|
+
exports.EVALUATIONS_TAGS = EVALUATIONS_TAGS;
|
|
45920
46804
|
exports.IblDataLayer = IblDataLayer;
|
|
45921
46805
|
exports.LOGO_ENDPOINTS = LOGO_ENDPOINTS;
|
|
45922
46806
|
exports.MCP_ENDPOINTS = MCP_ENDPOINTS;
|
|
@@ -45947,7 +46831,11 @@ exports.PROJECTS_QUERY_KEYS = PROJECTS_QUERY_KEYS;
|
|
|
45947
46831
|
exports.QUERY_PARAMS = QUERY_PARAMS;
|
|
45948
46832
|
exports.RETIREMENT_ENDPOINTS = RETIREMENT_ENDPOINTS;
|
|
45949
46833
|
exports.STORAGE_KEYS = STORAGE_KEYS;
|
|
46834
|
+
exports.STUDIO_AUTHORING_ENDPOINTS = STUDIO_AUTHORING_ENDPOINTS;
|
|
45950
46835
|
exports.SUGGESTED_PRIVACY_ENTITIES = SUGGESTED_PRIVACY_ENTITIES;
|
|
46836
|
+
exports.SUPPORT_TICKETS_ENDPOINTS = SUPPORT_TICKETS_ENDPOINTS;
|
|
46837
|
+
exports.SUPPORT_TICKETS_REDUCER_PATH = SUPPORT_TICKETS_REDUCER_PATH;
|
|
46838
|
+
exports.SUPPORT_TICKETS_TAGS = SUPPORT_TICKETS_TAGS;
|
|
45951
46839
|
exports.TENANT_IDENTIFIERS = TENANT_IDENTIFIERS;
|
|
45952
46840
|
exports.TENANT_LOGO_ENDPOINTS = TENANT_LOGO_ENDPOINTS;
|
|
45953
46841
|
exports.TENANT_LOGO_QUERY_KEYS = TENANT_LOGO_QUERY_KEYS;
|
|
@@ -45972,6 +46860,7 @@ exports.auditLogsApiSlice = auditLogsApiSlice;
|
|
|
45972
46860
|
exports.authApiSlice = authApiSlice;
|
|
45973
46861
|
exports.billingApiSlice = billingApiSlice;
|
|
45974
46862
|
exports.billingCustomSlice = billingCustomSlice;
|
|
46863
|
+
exports.buildRecentMessagesUrl = buildRecentMessagesUrl;
|
|
45975
46864
|
exports.buildSessionRetrieveUrl = buildSessionRetrieveUrl;
|
|
45976
46865
|
exports.buildSharedSessionRetrieveUrl = buildSharedSessionRetrieveUrl;
|
|
45977
46866
|
exports.callConfigurationsApiReducer = callConfigurationsApiReducer;
|
|
@@ -45997,8 +46886,11 @@ exports.datasetsApiSlice = datasetsApiSlice;
|
|
|
45997
46886
|
exports.disclaimersApiSlice = disclaimersApiSlice;
|
|
45998
46887
|
exports.edxProctoringApiSlice = edxProctoringApiSlice;
|
|
45999
46888
|
exports.edxSsoApiSlice = edxSsoApiSlice;
|
|
46889
|
+
exports.evalTotalPages = evalTotalPages;
|
|
46890
|
+
exports.evaluationsApiSlice = evaluationsApiSlice;
|
|
46000
46891
|
exports.fakeBaseQueryWithLogging = fakeBaseQueryWithLogging;
|
|
46001
46892
|
exports.featureTags = featureTags;
|
|
46893
|
+
exports.getNextRecentMessagesPageParam = getNextRecentMessagesPageParam;
|
|
46002
46894
|
exports.iblFakeBaseQuery = iblFakeBaseQuery;
|
|
46003
46895
|
exports.initializeDataLayer = initializeDataLayer;
|
|
46004
46896
|
exports.isPoliciesResponse = isPoliciesResponse;
|
|
@@ -46032,12 +46924,15 @@ exports.skillsApiSlice = skillsApiSlice;
|
|
|
46032
46924
|
exports.skillsMiddleware = skillsMiddleware;
|
|
46033
46925
|
exports.skillsReducer = skillsReducer;
|
|
46034
46926
|
exports.stripeApiSlice = stripeApiSlice;
|
|
46927
|
+
exports.studioAuthoringApiSlice = studioAuthoringApiSlice;
|
|
46928
|
+
exports.supportTicketsApiSlice = supportTicketsApiSlice;
|
|
46035
46929
|
exports.tenantApiReducer = tenantApiReducer;
|
|
46036
46930
|
exports.tenantApiSlice = tenantApiSlice;
|
|
46037
46931
|
exports.tenantLogoApiSlice = tenantLogoApiSlice;
|
|
46038
46932
|
exports.toolsApiSlice = toolsApiSlice;
|
|
46039
46933
|
exports.trainingDocumentsApiSlice = trainingDocumentsApiSlice;
|
|
46040
46934
|
exports.useActivateWorkflowMutation = useActivateWorkflowMutation;
|
|
46935
|
+
exports.useAddEvalDatasetItemsMutation = useAddEvalDatasetItemsMutation;
|
|
46041
46936
|
exports.useAddPinnedMessageMutation = useAddPinnedMessageMutation;
|
|
46042
46937
|
exports.useAddTrainingDocumentMutation = useAddTrainingDocumentMutation;
|
|
46043
46938
|
exports.useAddWatchedUserMutation = useAddWatchedUserMutation;
|
|
@@ -46048,6 +46943,7 @@ exports.useCancelSubscriptionMutation = useCancelSubscriptionMutation;
|
|
|
46048
46943
|
exports.useChatWithWorkflowMutation = useChatWithWorkflowMutation;
|
|
46049
46944
|
exports.useCheckAccessQuery = useCheckAccessQuery;
|
|
46050
46945
|
exports.useCheckAccessUnscopedQuery = useCheckAccessUnscopedQuery;
|
|
46946
|
+
exports.useCloseSupportTicketMutation = useCloseSupportTicketMutation;
|
|
46051
46947
|
exports.useConnectedServicesCallbackQuery = useConnectedServicesCallbackQuery;
|
|
46052
46948
|
exports.useCreateAdminProjectMutation = useCreateAdminProjectMutation;
|
|
46053
46949
|
exports.useCreateAgentSkillMutation = useCreateAgentSkillMutation;
|
|
@@ -46074,6 +46970,9 @@ exports.useCreateCredentialAssertionMutation = useCreateCredentialAssertionMutat
|
|
|
46074
46970
|
exports.useCreateCredentialMutation = useCreateCredentialMutation;
|
|
46075
46971
|
exports.useCreateCustomDomainMutation = useCreateCustomDomainMutation;
|
|
46076
46972
|
exports.useCreateDisclaimerMutation = useCreateDisclaimerMutation;
|
|
46973
|
+
exports.useCreateEvalDatasetMutation = useCreateEvalDatasetMutation;
|
|
46974
|
+
exports.useCreateEvalScoreConfigMutation = useCreateEvalScoreConfigMutation;
|
|
46975
|
+
exports.useCreateEvalScoreMutation = useCreateEvalScoreMutation;
|
|
46077
46976
|
exports.useCreateExternalMappingMutation = useCreateExternalMappingMutation;
|
|
46078
46977
|
exports.useCreateGlobalMemoryMutation = useCreateGlobalMemoryMutation;
|
|
46079
46978
|
exports.useCreateGuestCheckoutMutation = useCreateGuestCheckoutMutation;
|
|
@@ -46108,6 +47007,9 @@ exports.useCreateSessionIdMutation = useCreateSessionIdMutation;
|
|
|
46108
47007
|
exports.useCreateShareableLinkMutation = useCreateShareableLinkMutation;
|
|
46109
47008
|
exports.useCreateStripeCheckoutSessionMutation = useCreateStripeCheckoutSessionMutation;
|
|
46110
47009
|
exports.useCreateStripeCustomerPortalMutation = useCreateStripeCustomerPortalMutation;
|
|
47010
|
+
exports.useCreateStudioCourseMutation = useCreateStudioCourseMutation;
|
|
47011
|
+
exports.useCreateStudioXblockMutation = useCreateStudioXblockMutation;
|
|
47012
|
+
exports.useCreateSupportTicketMessageMutation = useCreateSupportTicketMessageMutation;
|
|
46111
47013
|
exports.useCreateTrainingDocumentRetrainScheduleMutation = useCreateTrainingDocumentRetrainScheduleMutation;
|
|
46112
47014
|
exports.useCreateUserCompanyMutation = useCreateUserCompanyMutation;
|
|
46113
47015
|
exports.useCreateUserEducationMutation = useCreateUserEducationMutation;
|
|
@@ -46129,6 +47031,9 @@ exports.useDeleteCourseCredentialMutation = useDeleteCourseCredentialMutation;
|
|
|
46129
47031
|
exports.useDeleteCredentialMutation = useDeleteCredentialMutation;
|
|
46130
47032
|
exports.useDeleteCustomDomainMutation = useDeleteCustomDomainMutation;
|
|
46131
47033
|
exports.useDeleteDisclaimerMutation = useDeleteDisclaimerMutation;
|
|
47034
|
+
exports.useDeleteEvalDatasetItemMutation = useDeleteEvalDatasetItemMutation;
|
|
47035
|
+
exports.useDeleteEvalRunMutation = useDeleteEvalRunMutation;
|
|
47036
|
+
exports.useDeleteEvalScoreMutation = useDeleteEvalScoreMutation;
|
|
46132
47037
|
exports.useDeleteExternalMappingMutation = useDeleteExternalMappingMutation;
|
|
46133
47038
|
exports.useDeleteGlobalMemoryMutation = useDeleteGlobalMemoryMutation;
|
|
46134
47039
|
exports.useDeleteIntegrationCredentialMutation = useDeleteIntegrationCredentialMutation;
|
|
@@ -46153,6 +47058,9 @@ exports.useDeleteRbacGroupMutation = useDeleteRbacGroupMutation;
|
|
|
46153
47058
|
exports.useDeleteRbacPolicyMutation = useDeleteRbacPolicyMutation;
|
|
46154
47059
|
exports.useDeleteRbacRoleMutation = useDeleteRbacRoleMutation;
|
|
46155
47060
|
exports.useDeleteRecommendedPromptMutation = useDeleteRecommendedPromptMutation;
|
|
47061
|
+
exports.useDeleteStudioCourseMutation = useDeleteStudioCourseMutation;
|
|
47062
|
+
exports.useDeleteSupportTicketMessageMutation = useDeleteSupportTicketMessageMutation;
|
|
47063
|
+
exports.useDeleteSupportTicketMutation = useDeleteSupportTicketMutation;
|
|
46156
47064
|
exports.useDeleteTrainingDocumentMutation = useDeleteTrainingDocumentMutation;
|
|
46157
47065
|
exports.useDeleteUserEducationMutation = useDeleteUserEducationMutation;
|
|
46158
47066
|
exports.useDeleteUserExperienceMutation = useDeleteUserExperienceMutation;
|
|
@@ -46168,8 +47076,10 @@ exports.useEditMentorMutation = useEditMentorMutation;
|
|
|
46168
47076
|
exports.useEditSessionMutation = useEditSessionMutation;
|
|
46169
47077
|
exports.useEditTrainingDocumentMutation = useEditTrainingDocumentMutation;
|
|
46170
47078
|
exports.useEnablePaywallMutation = useEnablePaywallMutation;
|
|
47079
|
+
exports.useEvaluateEvalRunMutation = useEvaluateEvalRunMutation;
|
|
46171
47080
|
exports.useExchangeAppleTokenMutation = useExchangeAppleTokenMutation;
|
|
46172
47081
|
exports.useExportChatHistoryMutation = useExportChatHistoryMutation;
|
|
47082
|
+
exports.useExportEvalRunMutation = useExportEvalRunMutation;
|
|
46173
47083
|
exports.useForkMentorMutation = useForkMentorMutation;
|
|
46174
47084
|
exports.useGetAccessTimeHeatmapQuery = useGetAccessTimeHeatmapQuery;
|
|
46175
47085
|
exports.useGetAccountBillingInfoQuery = useGetAccountBillingInfoQuery;
|
|
@@ -46226,6 +47136,9 @@ exports.useGetDetailedFinancialStatsQuery = useGetDetailedFinancialStatsQuery;
|
|
|
46226
47136
|
exports.useGetDisclaimersQuery = useGetDisclaimersQuery;
|
|
46227
47137
|
exports.useGetEdxSSOTokenQuery = useGetEdxSSOTokenQuery;
|
|
46228
47138
|
exports.useGetEnrollmentCourseSearchQuery = useGetEnrollmentCourseSearchQuery;
|
|
47139
|
+
exports.useGetEvalDatasetQuery = useGetEvalDatasetQuery;
|
|
47140
|
+
exports.useGetEvalRunQuery = useGetEvalRunQuery;
|
|
47141
|
+
exports.useGetEvalTaskStatusQuery = useGetEvalTaskStatusQuery;
|
|
46229
47142
|
exports.useGetExamInfoQuery = useGetExamInfoQuery;
|
|
46230
47143
|
exports.useGetExternalMappingQuery = useGetExternalMappingQuery;
|
|
46231
47144
|
exports.useGetFileUploadUrlMutation = useGetFileUploadUrlMutation;
|
|
@@ -46311,10 +47224,13 @@ exports.useGetRbacMentorAccessListQuery = useGetRbacMentorAccessListQuery;
|
|
|
46311
47224
|
exports.useGetRbacPermissionsMutation = useGetRbacPermissionsMutation;
|
|
46312
47225
|
exports.useGetRbacPoliciesQuery = useGetRbacPoliciesQuery;
|
|
46313
47226
|
exports.useGetRbacPolicyDetailsQuery = useGetRbacPolicyDetailsQuery;
|
|
47227
|
+
exports.useGetRbacResourceDiscoveryQuery = useGetRbacResourceDiscoveryQuery;
|
|
47228
|
+
exports.useGetRbacResourceListQuery = useGetRbacResourceListQuery;
|
|
46314
47229
|
exports.useGetRbacRoleDetailsQuery = useGetRbacRoleDetailsQuery;
|
|
46315
47230
|
exports.useGetRbacRolesQuery = useGetRbacRolesQuery;
|
|
46316
47231
|
exports.useGetRbacTeamsAccessListQuery = useGetRbacTeamsAccessListQuery;
|
|
46317
47232
|
exports.useGetRecentMessageQuery = useGetRecentMessageQuery;
|
|
47233
|
+
exports.useGetRecentMessagesInfiniteQuery = useGetRecentMessagesInfiniteQuery;
|
|
46318
47234
|
exports.useGetRecentlyAccessedMentorsQuery = useGetRecentlyAccessedMentorsQuery;
|
|
46319
47235
|
exports.useGetRecommendationsAiSearchQuery = useGetRecommendationsAiSearchQuery;
|
|
46320
47236
|
exports.useGetRecommendedPromptsListQuery = useGetRecommendedPromptsListQuery;
|
|
@@ -46335,6 +47251,10 @@ exports.useGetStripeConnectStatusQuery = useGetStripeConnectStatusQuery;
|
|
|
46335
47251
|
exports.useGetStripeContextQuery = useGetStripeContextQuery;
|
|
46336
47252
|
exports.useGetStripePricingPageSessionQuery = useGetStripePricingPageSessionQuery;
|
|
46337
47253
|
exports.useGetStudentMentorCreationStatusQuery = useGetStudentMentorCreationStatusQuery;
|
|
47254
|
+
exports.useGetSupportTicketMessageQuery = useGetSupportTicketMessageQuery;
|
|
47255
|
+
exports.useGetSupportTicketMessagesQuery = useGetSupportTicketMessagesQuery;
|
|
47256
|
+
exports.useGetSupportTicketQuery = useGetSupportTicketQuery;
|
|
47257
|
+
exports.useGetSupportTicketsQuery = useGetSupportTicketsQuery;
|
|
46338
47258
|
exports.useGetTemplateDetailsQuery = useGetTemplateDetailsQuery;
|
|
46339
47259
|
exports.useGetTemplatesQuery = useGetTemplatesQuery;
|
|
46340
47260
|
exports.useGetTenantChatPrivacyConfigQuery = useGetTenantChatPrivacyConfigQuery;
|
|
@@ -46444,6 +47364,8 @@ exports.useLazyGetDisclaimersQuery = useLazyGetDisclaimersQuery;
|
|
|
46444
47364
|
exports.useLazyGetDownloadReportFromURLQuery = useLazyGetDownloadReportFromURLQuery;
|
|
46445
47365
|
exports.useLazyGetEdxSSOTokenQuery = useLazyGetEdxSSOTokenQuery;
|
|
46446
47366
|
exports.useLazyGetEnrollmentCourseSearchQuery = useLazyGetEnrollmentCourseSearchQuery;
|
|
47367
|
+
exports.useLazyGetEvalRunQuery = useLazyGetEvalRunQuery;
|
|
47368
|
+
exports.useLazyGetEvalTaskStatusQuery = useLazyGetEvalTaskStatusQuery;
|
|
46447
47369
|
exports.useLazyGetExamInfoQuery = useLazyGetExamInfoQuery;
|
|
46448
47370
|
exports.useLazyGetExternalMappingQuery = useLazyGetExternalMappingQuery;
|
|
46449
47371
|
exports.useLazyGetFreeUsageCountQuery = useLazyGetFreeUsageCountQuery;
|
|
@@ -46504,6 +47426,8 @@ exports.useLazyGetPublicPlatformImageAssetFileUrlQuery = useLazyGetPublicPlatfor
|
|
|
46504
47426
|
exports.useLazyGetPublicPlatformMembershipQuery = useLazyGetPublicPlatformMembershipQuery;
|
|
46505
47427
|
exports.useLazyGetPublicPricingQuery = useLazyGetPublicPricingQuery;
|
|
46506
47428
|
exports.useLazyGetRbacActionsDefinitionQuery = useLazyGetRbacActionsDefinitionQuery;
|
|
47429
|
+
exports.useLazyGetRbacResourceDiscoveryQuery = useLazyGetRbacResourceDiscoveryQuery;
|
|
47430
|
+
exports.useLazyGetRbacResourceListQuery = useLazyGetRbacResourceListQuery;
|
|
46507
47431
|
exports.useLazyGetRbacRolesQuery = useLazyGetRbacRolesQuery;
|
|
46508
47432
|
exports.useLazyGetRbacTeamsAccessListQuery = useLazyGetRbacTeamsAccessListQuery;
|
|
46509
47433
|
exports.useLazyGetRecentMessageQuery = useLazyGetRecentMessageQuery;
|
|
@@ -46524,6 +47448,10 @@ exports.useLazyGetStripeConnectDashboardQuery = useLazyGetStripeConnectDashboard
|
|
|
46524
47448
|
exports.useLazyGetStripeConnectStatusQuery = useLazyGetStripeConnectStatusQuery;
|
|
46525
47449
|
exports.useLazyGetStripeContextQuery = useLazyGetStripeContextQuery;
|
|
46526
47450
|
exports.useLazyGetStripePricingPageSessionQuery = useLazyGetStripePricingPageSessionQuery;
|
|
47451
|
+
exports.useLazyGetSupportTicketMessageQuery = useLazyGetSupportTicketMessageQuery;
|
|
47452
|
+
exports.useLazyGetSupportTicketMessagesQuery = useLazyGetSupportTicketMessagesQuery;
|
|
47453
|
+
exports.useLazyGetSupportTicketQuery = useLazyGetSupportTicketQuery;
|
|
47454
|
+
exports.useLazyGetSupportTicketsQuery = useLazyGetSupportTicketsQuery;
|
|
46527
47455
|
exports.useLazyGetTemplateDetailsQuery = useLazyGetTemplateDetailsQuery;
|
|
46528
47456
|
exports.useLazyGetTemplatesQuery = useLazyGetTemplatesQuery;
|
|
46529
47457
|
exports.useLazyGetTenantChatPrivacyConfigQuery = useLazyGetTenantChatPrivacyConfigQuery;
|
|
@@ -46569,6 +47497,12 @@ exports.useLazyGetWorkflowQuery = useLazyGetWorkflowQuery;
|
|
|
46569
47497
|
exports.useLazyGetWorkflowsQuery = useLazyGetWorkflowsQuery;
|
|
46570
47498
|
exports.useLazyListArtifactVersionsQuery = useLazyListArtifactVersionsQuery;
|
|
46571
47499
|
exports.useLazyListArtifactsQuery = useLazyListArtifactsQuery;
|
|
47500
|
+
exports.useLazyListEvalDatasetItemsQuery = useLazyListEvalDatasetItemsQuery;
|
|
47501
|
+
exports.useLazyListEvalDatasetsQuery = useLazyListEvalDatasetsQuery;
|
|
47502
|
+
exports.useLazyListEvalJudgesQuery = useLazyListEvalJudgesQuery;
|
|
47503
|
+
exports.useLazyListEvalRunJudgesQuery = useLazyListEvalRunJudgesQuery;
|
|
47504
|
+
exports.useLazyListEvalRunsQuery = useLazyListEvalRunsQuery;
|
|
47505
|
+
exports.useLazyListEvalScoresQuery = useLazyListEvalScoresQuery;
|
|
46572
47506
|
exports.useLazyListItemSubscribersQuery = useLazyListItemSubscribersQuery;
|
|
46573
47507
|
exports.useLazyListPaywallsQuery = useLazyListPaywallsQuery;
|
|
46574
47508
|
exports.useLazyListPricesQuery = useLazyListPricesQuery;
|
|
@@ -46581,6 +47515,13 @@ exports.useLazyStarredMentorsQuery = useLazyStarredMentorsQuery;
|
|
|
46581
47515
|
exports.useLazyStartOAuthFlowQuery = useLazyStartOAuthFlowQuery;
|
|
46582
47516
|
exports.useListArtifactVersionsQuery = useListArtifactVersionsQuery;
|
|
46583
47517
|
exports.useListArtifactsQuery = useListArtifactsQuery;
|
|
47518
|
+
exports.useListEvalDatasetItemsQuery = useListEvalDatasetItemsQuery;
|
|
47519
|
+
exports.useListEvalDatasetsQuery = useListEvalDatasetsQuery;
|
|
47520
|
+
exports.useListEvalJudgesQuery = useListEvalJudgesQuery;
|
|
47521
|
+
exports.useListEvalRunJudgesQuery = useListEvalRunJudgesQuery;
|
|
47522
|
+
exports.useListEvalRunsQuery = useListEvalRunsQuery;
|
|
47523
|
+
exports.useListEvalScoreConfigsQuery = useListEvalScoreConfigsQuery;
|
|
47524
|
+
exports.useListEvalScoresQuery = useListEvalScoresQuery;
|
|
46584
47525
|
exports.useListItemSubscribersQuery = useListItemSubscribersQuery;
|
|
46585
47526
|
exports.useListPaywallsQuery = useListPaywallsQuery;
|
|
46586
47527
|
exports.useListPricesQuery = useListPricesQuery;
|
|
@@ -46591,6 +47532,8 @@ exports.usePartialUpdateMCPServerMutation = usePartialUpdateMCPServerMutation;
|
|
|
46591
47532
|
exports.usePartialUpdatePeriodicAgentMutation = usePartialUpdatePeriodicAgentMutation;
|
|
46592
47533
|
exports.usePartialUpdateRbacRoleMutation = usePartialUpdateRbacRoleMutation;
|
|
46593
47534
|
exports.usePatchMCPServerConnectionMutation = usePatchMCPServerConnectionMutation;
|
|
47535
|
+
exports.usePatchSupportTicketMessageMutation = usePatchSupportTicketMessageMutation;
|
|
47536
|
+
exports.usePatchSupportTicketMutation = usePatchSupportTicketMutation;
|
|
46594
47537
|
exports.usePatchWorkflowMutation = usePatchWorkflowMutation;
|
|
46595
47538
|
exports.usePlatformInvitationsQuery = usePlatformInvitationsQuery;
|
|
46596
47539
|
exports.usePlatformUserGroupsQuery = usePlatformUserGroupsQuery;
|
|
@@ -46609,8 +47552,10 @@ exports.useSendNotificationMutation = useSendNotificationMutation;
|
|
|
46609
47552
|
exports.useSetCurrentVersionMutation = useSetCurrentVersionMutation;
|
|
46610
47553
|
exports.useSetPlatformConfigurationsMutation = useSetPlatformConfigurationsMutation;
|
|
46611
47554
|
exports.useSetStudentMentorCreationStatusMutation = useSetStudentMentorCreationStatusMutation;
|
|
47555
|
+
exports.useSetStudioAdvancedSettingsMutation = useSetStudioAdvancedSettingsMutation;
|
|
46612
47556
|
exports.useStarMentorMutation = useStarMentorMutation;
|
|
46613
47557
|
exports.useStarredMentorsQuery = useStarredMentorsQuery;
|
|
47558
|
+
exports.useStartEvalRunMutation = useStartEvalRunMutation;
|
|
46614
47559
|
exports.useStartExamMutation = useStartExamMutation;
|
|
46615
47560
|
exports.useStartStripeConnectOnboardingMutation = useStartStripeConnectOnboardingMutation;
|
|
46616
47561
|
exports.useTestConnectivityClawInstanceMutation = useTestConnectivityClawInstanceMutation;
|
|
@@ -46633,6 +47578,7 @@ exports.useUpdateClawInstanceMutation = useUpdateClawInstanceMutation;
|
|
|
46633
47578
|
exports.useUpdateClawMentorConfigMutation = useUpdateClawMentorConfigMutation;
|
|
46634
47579
|
exports.useUpdateCredentialMutation = useUpdateCredentialMutation;
|
|
46635
47580
|
exports.useUpdateDisclaimerMutation = useUpdateDisclaimerMutation;
|
|
47581
|
+
exports.useUpdateEvalDatasetItemMutation = useUpdateEvalDatasetItemMutation;
|
|
46636
47582
|
exports.useUpdateExamAttemptMutation = useUpdateExamAttemptMutation;
|
|
46637
47583
|
exports.useUpdateIntegrationCredentialMutation = useUpdateIntegrationCredentialMutation;
|
|
46638
47584
|
exports.useUpdateLtiKeyMutation = useUpdateLtiKeyMutation;
|
|
@@ -46660,6 +47606,10 @@ exports.useUpdateRbacRoleMutation = useUpdateRbacRoleMutation;
|
|
|
46660
47606
|
exports.useUpdateRecommendedPromptMutation = useUpdateRecommendedPromptMutation;
|
|
46661
47607
|
exports.useUpdateSessionDisableChathistoryMutation = useUpdateSessionDisableChathistoryMutation;
|
|
46662
47608
|
exports.useUpdateShareableLinkMutation = useUpdateShareableLinkMutation;
|
|
47609
|
+
exports.useUpdateStudioCourseSettingsMutation = useUpdateStudioCourseSettingsMutation;
|
|
47610
|
+
exports.useUpdateStudioXblockMutation = useUpdateStudioXblockMutation;
|
|
47611
|
+
exports.useUpdateSupportTicketMessageMutation = useUpdateSupportTicketMessageMutation;
|
|
47612
|
+
exports.useUpdateSupportTicketMutation = useUpdateSupportTicketMutation;
|
|
46663
47613
|
exports.useUpdateTemplateMutation = useUpdateTemplateMutation;
|
|
46664
47614
|
exports.useUpdateTenantChatPrivacyConfigMutation = useUpdateTenantChatPrivacyConfigMutation;
|
|
46665
47615
|
exports.useUpdateTenantMetadataMutation = useUpdateTenantMetadataMutation;
|
|
@@ -46681,8 +47631,12 @@ exports.useUpdateWatcherMutation = useUpdateWatcherMutation;
|
|
|
46681
47631
|
exports.useUpdateWorkflowMutation = useUpdateWorkflowMutation;
|
|
46682
47632
|
exports.useUploadCredentialImageMutation = useUploadCredentialImageMutation;
|
|
46683
47633
|
exports.useUploadDarkLogoMutation = useUploadDarkLogoMutation;
|
|
47634
|
+
exports.useUploadEvalDatasetCsvMutation = useUploadEvalDatasetCsvMutation;
|
|
46684
47635
|
exports.useUploadLightLogoMutation = useUploadLightLogoMutation;
|
|
46685
47636
|
exports.useUploadProfileImageMutation = useUploadProfileImageMutation;
|
|
47637
|
+
exports.useUploadStudioCourseAssetMutation = useUploadStudioCourseAssetMutation;
|
|
47638
|
+
exports.useUploadStudioCourseVideoMutation = useUploadStudioCourseVideoMutation;
|
|
47639
|
+
exports.useUploadStudioScormPackageMutation = useUploadStudioScormPackageMutation;
|
|
46686
47640
|
exports.useUsersGradesPassedQuery = useUsersGradesPassedQuery;
|
|
46687
47641
|
exports.useValidateWorkflowMutation = useValidateWorkflowMutation;
|
|
46688
47642
|
exports.userApiSlice = userApiSlice;
|