@iblai/data-layer 1.34.0 → 1.36.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 +211 -53
- package/dist/index.esm.js +355 -105
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +355 -105
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/src/config.d.ts +8 -0
- package/dist/src/constants.d.ts +17 -1
- package/dist/src/features/chat-files/__tests__/api-slice.test.d.ts +1 -0
- package/dist/src/features/course-metadata/__tests__/api-slice.test.d.ts +1 -0
- package/dist/src/features/course-metadata/api-slice.d.ts +162 -108
- package/dist/src/features/retirement/__tests__/api-slice.test.d.ts +1 -0
- package/dist/src/features/search/types.d.ts +2 -0
- package/dist/src/features/studio-authoring/__tests__/course-key.test.d.ts +1 -0
- package/dist/src/features/studio-authoring/api-slice.d.ts +12 -4
- package/dist/src/features/studio-authoring/constants.d.ts +4 -0
- package/dist/src/features/studio-authoring/course-key.d.ts +16 -0
- package/dist/src/features/studio-authoring/types.d.ts +12 -2
- package/dist/src/features/tenant/__tests__/api-slice.test.d.ts +1 -0
- package/dist/src/features/tenant/api-slice.d.ts +66 -21
- package/dist/src/features/tenant/constants.d.ts +1 -1
- package/dist/src/features/user/__tests__/roles-mapping.test.d.ts +1 -0
- package/dist/src/features/user/__tests__/user-metadata.test.d.ts +1 -0
- package/dist/src/features/user/api-slice.d.ts +15 -13
- package/dist/src/features/user/constants.d.ts +11 -1
- package/dist/src/features/user/roles-mapping.d.ts +9 -0
- package/dist/src/features/user/types.d.ts +26 -11
- package/dist/src/features/utils.d.ts +12 -0
- package/dist/src/utils/index.d.ts +4 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -39047,10 +39047,26 @@ const TENANT_IDENTIFIERS = {
|
|
|
39047
39047
|
var SERVICES;
|
|
39048
39048
|
(function (SERVICES) {
|
|
39049
39049
|
SERVICES["LEGACY_LMS"] = "LEGACY_LMS";
|
|
39050
|
+
/**
|
|
39051
|
+
* The Open edX LMS. With `Config.edxProxyEnabled` the call goes through DM's
|
|
39052
|
+
* `/v1/lms/{edx_path}` proxy with the DM token (DM mints the edX JWT
|
|
39053
|
+
* server-side); otherwise it goes to the LMS host with the edX JWT. The
|
|
39054
|
+
* proxy admits stock edX paths only: the `/api/ibl/...` family is refused,
|
|
39055
|
+
* and any course or org a path names must belong to the token's platform.
|
|
39056
|
+
*/
|
|
39050
39057
|
SERVICES["LMS"] = "LMS";
|
|
39051
39058
|
SERVICES["DM"] = "DM";
|
|
39052
39059
|
SERVICES["AXD"] = "AXD";
|
|
39060
|
+
/** Open edX Studio (CMS); proxied through `/v1/studio/{edx_path}` like `LMS`. */
|
|
39053
39061
|
SERVICES["STUDIO"] = "STUDIO";
|
|
39062
|
+
/**
|
|
39063
|
+
* The LMS host with the edX JWT, whatever `Config.edxProxyEnabled` says. Only
|
|
39064
|
+
* for calls the proxy cannot serve: the login/token bootstrap and the
|
|
39065
|
+
* `/api/ibl/...` paths DM has no replacement for yet.
|
|
39066
|
+
*/
|
|
39067
|
+
SERVICES["LMS_DIRECT"] = "LMS_DIRECT";
|
|
39068
|
+
/** The Studio host with its session cookie, CSRF token and edX JWT; see `LMS_DIRECT`. */
|
|
39069
|
+
SERVICES["STUDIO_DIRECT"] = "STUDIO_DIRECT";
|
|
39054
39070
|
})(SERVICES || (SERVICES = {}));
|
|
39055
39071
|
/**
|
|
39056
39072
|
* Client errors a retry cannot fix.
|
|
@@ -39155,6 +39171,14 @@ Config.axdUrl = 'https://base.manager.iblai.app';
|
|
|
39155
39171
|
Config.mentorIframeUrl = 'https://mentor.iblai.tech';
|
|
39156
39172
|
Config.studioUrl = 'https://studio.iblai.app';
|
|
39157
39173
|
Config.httpErrorHandlers = {};
|
|
39174
|
+
/**
|
|
39175
|
+
* Route `SERVICES.LMS` / `SERVICES.STUDIO` through DM's edX proxy
|
|
39176
|
+
* (`{dmUrl}/v1/lms`, `{dmUrl}/v1/studio`) with the DM token instead of
|
|
39177
|
+
* calling the edX hosts with the edX JWT. Needs DM 4.444.0+ with its proxy
|
|
39178
|
+
* rules synced, so it is off by default and turned on per deployment via
|
|
39179
|
+
* `initializeDataLayer(..., { edxProxy: true })`.
|
|
39180
|
+
*/
|
|
39181
|
+
Config.edxProxyEnabled = false;
|
|
39158
39182
|
/**
|
|
39159
39183
|
* Optional override for how expired auth tokens are re-minted after a 401.
|
|
39160
39184
|
* Resolve `true` once fresh tokens are in storage. Left unset, the data
|
|
@@ -39215,17 +39239,19 @@ const iblFakeBaseQuery = retry(fakeBaseQueryWithLogging, {
|
|
|
39215
39239
|
},
|
|
39216
39240
|
});
|
|
39217
39241
|
|
|
39242
|
+
// The login / token bootstrap runs before the SPA holds a DM token (and mints
|
|
39243
|
+
// it), so these stay on the LMS host whatever `Config.edxProxyEnabled` says.
|
|
39218
39244
|
const AUTH_ENDPOINTS = {
|
|
39219
39245
|
GET_MFE_CONTEXT: {
|
|
39220
|
-
service: SERVICES.
|
|
39246
|
+
service: SERVICES.LMS_DIRECT,
|
|
39221
39247
|
path: () => `/api/mfe_context`,
|
|
39222
39248
|
},
|
|
39223
39249
|
APPLE_EXCHANGE_TOKEN: {
|
|
39224
|
-
service: SERVICES.
|
|
39250
|
+
service: SERVICES.LMS_DIRECT,
|
|
39225
39251
|
path: () => `/oauth2/exchange_access_token/apple-id/`,
|
|
39226
39252
|
},
|
|
39227
39253
|
GET_APP_TOKENS: {
|
|
39228
|
-
service: SERVICES.
|
|
39254
|
+
service: SERVICES.LMS_DIRECT,
|
|
39229
39255
|
path: () => '/api/ibl/manager/consolidated-token/proxy/',
|
|
39230
39256
|
},
|
|
39231
39257
|
REFRESH_JWT_TOKEN: {
|
|
@@ -39342,6 +39368,15 @@ const refreshAuthTokenOnce = async () => {
|
|
|
39342
39368
|
return refreshInFlight;
|
|
39343
39369
|
};
|
|
39344
39370
|
|
|
39371
|
+
/**
|
|
39372
|
+
* True when `service` is `LMS` or `STUDIO` and `Config.edxProxyEnabled` sends
|
|
39373
|
+
* it through DM's edX proxy with the DM token.
|
|
39374
|
+
*/
|
|
39375
|
+
const isEdxProxied = (service) => Config.edxProxyEnabled && (service === SERVICES.LMS || service === SERVICES.STUDIO);
|
|
39376
|
+
/** The LMS host on its own origin, authenticated with the edX JWT. */
|
|
39377
|
+
const isDirectLms = (service) => service === SERVICES.LMS_DIRECT || (service === SERVICES.LMS && !Config.edxProxyEnabled);
|
|
39378
|
+
/** The Studio host on its own origin: session cookie + CSRF token + edX JWT. */
|
|
39379
|
+
const isDirectStudio = (service) => service === SERVICES.STUDIO_DIRECT || (service === SERVICES.STUDIO && !Config.edxProxyEnabled);
|
|
39345
39380
|
/**
|
|
39346
39381
|
* Get the service URL based on the provided service type.
|
|
39347
39382
|
*/
|
|
@@ -39350,15 +39385,44 @@ const getServiceUrl = (service) => {
|
|
|
39350
39385
|
case SERVICES.LEGACY_LMS:
|
|
39351
39386
|
return Config.legacyLmsUrl;
|
|
39352
39387
|
case SERVICES.LMS:
|
|
39388
|
+
return Config.edxProxyEnabled ? `${Config.dmUrl}/v1/lms` : Config.lmsUrl;
|
|
39389
|
+
case SERVICES.LMS_DIRECT:
|
|
39353
39390
|
return Config.lmsUrl;
|
|
39354
39391
|
case SERVICES.DM:
|
|
39355
39392
|
return Config.dmUrl;
|
|
39356
39393
|
case SERVICES.STUDIO:
|
|
39394
|
+
return Config.edxProxyEnabled ? `${Config.dmUrl}/v1/studio` : Config.studioUrl;
|
|
39395
|
+
case SERVICES.STUDIO_DIRECT:
|
|
39357
39396
|
return Config.studioUrl;
|
|
39358
39397
|
default:
|
|
39359
39398
|
return Config.dmUrl;
|
|
39360
39399
|
}
|
|
39361
39400
|
};
|
|
39401
|
+
/**
|
|
39402
|
+
* The signed-in user's username from storage (`userData.user_nicename`), or
|
|
39403
|
+
* null. DM's user endpoints take `username=<self>` explicitly where the edX
|
|
39404
|
+
* ones inferred the caller from the JWT, so the endpoints that moved to DM
|
|
39405
|
+
* read it from here when the caller does not pass one.
|
|
39406
|
+
*/
|
|
39407
|
+
const getStoredUsername = async () => {
|
|
39408
|
+
var _a;
|
|
39409
|
+
const storage = IblDataLayer.storage;
|
|
39410
|
+
if (!storage) {
|
|
39411
|
+
return null;
|
|
39412
|
+
}
|
|
39413
|
+
const raw = await storage.getItem(STORAGE_KEYS.USER_DATA);
|
|
39414
|
+
if (!raw) {
|
|
39415
|
+
return null;
|
|
39416
|
+
}
|
|
39417
|
+
try {
|
|
39418
|
+
const data = (typeof raw === 'string' ? JSON.parse(raw) : raw);
|
|
39419
|
+
const username = (_a = data === null || data === void 0 ? void 0 : data.user_nicename) !== null && _a !== void 0 ? _a : data === null || data === void 0 ? void 0 : data.username;
|
|
39420
|
+
return typeof username === 'string' && username ? username : null;
|
|
39421
|
+
}
|
|
39422
|
+
catch (_b) {
|
|
39423
|
+
return null;
|
|
39424
|
+
}
|
|
39425
|
+
};
|
|
39362
39426
|
/**
|
|
39363
39427
|
* Read a cookie value by name. Returns null outside the browser or when the
|
|
39364
39428
|
* cookie is absent. Used for Studio's CSRF token (`csrftoken`).
|
|
@@ -39379,22 +39443,26 @@ const getHeaders = async (service) => {
|
|
|
39379
39443
|
throw new Error('Storage not initialized. Please ensure the data layer is properly initialized before making API calls.');
|
|
39380
39444
|
}
|
|
39381
39445
|
let token = null;
|
|
39382
|
-
|
|
39383
|
-
|
|
39384
|
-
|
|
39385
|
-
|
|
39386
|
-
|
|
39387
|
-
|
|
39388
|
-
|
|
39389
|
-
|
|
39390
|
-
token = await IblDataLayer.storage.getItem(STORAGE_KEYS.EDX_TOKEN_KEY);
|
|
39446
|
+
if (service === SERVICES.DM || isEdxProxied(service)) {
|
|
39447
|
+
token = await IblDataLayer.storage.getItem(STORAGE_KEYS.DM_TOKEN_KEY);
|
|
39448
|
+
}
|
|
39449
|
+
else if (service === SERVICES.AXD) {
|
|
39450
|
+
token = await IblDataLayer.storage.getItem(STORAGE_KEYS.AXD_TOKEN_KEY);
|
|
39451
|
+
}
|
|
39452
|
+
else {
|
|
39453
|
+
token = await IblDataLayer.storage.getItem(STORAGE_KEYS.EDX_TOKEN_KEY);
|
|
39391
39454
|
}
|
|
39392
39455
|
if (!token || token.trim() === '') {
|
|
39393
39456
|
return; // No Authorization header when no valid token
|
|
39394
39457
|
}
|
|
39458
|
+
// A storage that JSON-encodes strings on write hands the token back as
|
|
39459
|
+
// `"token"`; send it bare, or DM refuses it as invalid.
|
|
39460
|
+
if (token.startsWith('"') && token.endsWith('"')) {
|
|
39461
|
+
token = token.slice(1, -1);
|
|
39462
|
+
}
|
|
39395
39463
|
let prefix;
|
|
39396
39464
|
// Studio (Open edX CMS) accepts the same edX token as the LMS.
|
|
39397
|
-
if (service
|
|
39465
|
+
if (isDirectLms(service) || isDirectStudio(service)) {
|
|
39398
39466
|
if (token.length > 30) {
|
|
39399
39467
|
prefix = 'JWT';
|
|
39400
39468
|
}
|
|
@@ -39405,7 +39473,7 @@ const getHeaders = async (service) => {
|
|
|
39405
39473
|
else {
|
|
39406
39474
|
prefix = 'Token';
|
|
39407
39475
|
}
|
|
39408
|
-
return
|
|
39476
|
+
return { Authorization: `${prefix} ${token}` };
|
|
39409
39477
|
};
|
|
39410
39478
|
/**
|
|
39411
39479
|
* Status codes that should not be retried for queryFn endpoints.
|
|
@@ -39540,7 +39608,7 @@ const isErrorObject = (data) => {
|
|
|
39540
39608
|
const baseQuery = (service, jsonContentType = true, contentType, skipAuth = false) => fetchBaseQuery({
|
|
39541
39609
|
baseUrl: getServiceUrl(service),
|
|
39542
39610
|
timeout: 30000, // 30 second timeout
|
|
39543
|
-
credentials: service === SERVICES.LEGACY_LMS || service
|
|
39611
|
+
credentials: service === SERVICES.LEGACY_LMS || isDirectStudio(service) ? 'include' : 'omit',
|
|
39544
39612
|
prepareHeaders: async (headers) => {
|
|
39545
39613
|
// Only add auth headers if skipAuth is false
|
|
39546
39614
|
if (!skipAuth) {
|
|
@@ -39559,8 +39627,9 @@ const baseQuery = (service, jsonContentType = true, contentType, skipAuth = fals
|
|
|
39559
39627
|
headers.set('Content-Type', contentType);
|
|
39560
39628
|
}
|
|
39561
39629
|
// Studio (Open edX CMS) endpoints require the Django CSRF token and only
|
|
39562
|
-
// return JSON when asked for it explicitly.
|
|
39563
|
-
|
|
39630
|
+
// return JSON when asked for it explicitly. Through DM's proxy neither
|
|
39631
|
+
// applies: no cookies travel and DM mints the edX JWT.
|
|
39632
|
+
if (isDirectStudio(service)) {
|
|
39564
39633
|
const csrfToken = getCookieValue('csrftoken');
|
|
39565
39634
|
if (csrfToken) {
|
|
39566
39635
|
headers.set('X-CSRFToken', csrfToken);
|
|
@@ -39571,7 +39640,7 @@ const baseQuery = (service, jsonContentType = true, contentType, skipAuth = fals
|
|
|
39571
39640
|
headers.set('X-Requested-With', 'XMLHttpRequest');
|
|
39572
39641
|
}
|
|
39573
39642
|
// Add CSRF protection headers for LMS service
|
|
39574
|
-
if (service
|
|
39643
|
+
if (isDirectLms(service)) {
|
|
39575
39644
|
// Use mentorIframeUrl for both origin and referer
|
|
39576
39645
|
// This matches the pattern used in loginCompleteApi.ts
|
|
39577
39646
|
headers.set('Referer', Config.mentorIframeUrl);
|
|
@@ -40096,6 +40165,9 @@ const chatFilesApiSlice = createApi({
|
|
|
40096
40165
|
method: 'POST',
|
|
40097
40166
|
body: requestBody,
|
|
40098
40167
|
service: SERVICES.DM,
|
|
40168
|
+
// A thrown error reaches the caller as `{}`; the chat needs the 400
|
|
40169
|
+
// body to tell an agent's file-type refusal from other failures.
|
|
40170
|
+
returnErrorStatuses: [400],
|
|
40099
40171
|
}),
|
|
40100
40172
|
}),
|
|
40101
40173
|
}),
|
|
@@ -40546,13 +40618,15 @@ const authApiSlice = createApi({
|
|
|
40546
40618
|
const { useGetMfeContextQuery, useExchangeAppleTokenMutation, useGetAppTokensMutation, useLazyRefreshJwtTokenQuery, } = authApiSlice;
|
|
40547
40619
|
|
|
40548
40620
|
const TENANTS_ENDPOINTS = {
|
|
40621
|
+
// The DM view the edX `/api/ibl/users/manage/platform/` endpoint used to
|
|
40622
|
+
// proxy; takes `username=<self>`.
|
|
40549
40623
|
GET_USER_TENANTS: {
|
|
40550
|
-
service: SERVICES.
|
|
40551
|
-
path: () => `/api/
|
|
40624
|
+
service: SERVICES.DM,
|
|
40625
|
+
path: () => `/api/core/users/platforms/`,
|
|
40552
40626
|
},
|
|
40553
40627
|
};
|
|
40554
40628
|
const TENANTS_QUERY_KEYS = {
|
|
40555
|
-
GET_USER_TENANTS: () => [
|
|
40629
|
+
GET_USER_TENANTS: () => ['USER_TENANTS'],
|
|
40556
40630
|
};
|
|
40557
40631
|
|
|
40558
40632
|
const tenantApiSlice = createApi({
|
|
@@ -40568,11 +40642,18 @@ const tenantApiSlice = createApi({
|
|
|
40568
40642
|
...buildEndpointFromDmServiceLegacy(CoreService.coreOrgsMetadataUpdate),
|
|
40569
40643
|
invalidatesTags: ['TenantMetadata'],
|
|
40570
40644
|
}),
|
|
40645
|
+
/** The platforms the signed-in user is linked to. `username` defaults to the stored user. */
|
|
40571
40646
|
getUserTenants: builder.query({
|
|
40572
|
-
queryFn: async () => {
|
|
40647
|
+
queryFn: async (args) => {
|
|
40648
|
+
var _a;
|
|
40573
40649
|
try {
|
|
40574
|
-
const
|
|
40575
|
-
|
|
40650
|
+
const username = (_a = args === null || args === void 0 ? void 0 : args.username) !== null && _a !== void 0 ? _a : (await getStoredUsername());
|
|
40651
|
+
if (!username) {
|
|
40652
|
+
return { error: { status: 'CUSTOM_ERROR', data: 'No username available' } };
|
|
40653
|
+
}
|
|
40654
|
+
const { service, path } = TENANTS_ENDPOINTS.GET_USER_TENANTS;
|
|
40655
|
+
const authHeaders = await getHeaders(service);
|
|
40656
|
+
const response = await fetch(`${getServiceUrl(service)}${path()}?username=${encodeURIComponent(username)}`, {
|
|
40576
40657
|
headers: {
|
|
40577
40658
|
...authHeaders,
|
|
40578
40659
|
},
|
|
@@ -41056,28 +41137,41 @@ const platformApiReducer = platformApiSlice.reducer;
|
|
|
41056
41137
|
const { useUsersGradesPassedQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, usePlatformUserGroupsQuery, usePlatformInvitationsQuery, usePlatformUsersQuery, useInviteUserMutation, useUpdatePlatformUserRoleWithPoliciesMutation, useCreatePlatformUserGroupMutation, useUpdatePlatformUserGroupMutation, useDeletePlatformUserGroupMutation, useGetPlatformUserGroupDetailsQuery, useGetApplicationStatusQuery, useLazyGetApplicationStatusQuery, useGetApplicationFormQuery, useLazyGetApplicationFormQuery, useCreateApplicationDraftMutation, useUpdateApplicationMutation, useSubmitApplicationMutation, useUploadApplicationAttachmentMutation, useDeleteApplicationAttachmentMutation, useGetApplicationFormsQuery, useLazyGetApplicationFormsQuery, useGetApplicationFormDetailQuery, useLazyGetApplicationFormDetailQuery, useCreateApplicationFormMutation, useUpdateApplicationFormMutation, useGetApplicationsPipelineQuery, useLazyGetApplicationsPipelineQuery, useGetApplicationsPipelineStatsQuery, useListOwnApplicationsQuery, useLazyListOwnApplicationsQuery, useRenewApplicationMutation, useWithdrawApplicationMutation, useGetApplicationAdminDetailQuery, useLazyGetApplicationAdminDetailQuery, useTransitionApplicationMutation, useCreateApplicationWaiverMutation, useDeleteApplicationWaiverMutation, useSubmitApplicationOverrideMutation, useGetApplicationNotesQuery, useCreateApplicationNoteMutation, useUpdateApplicationNoteMutation, useDeleteApplicationNoteMutation, useLazyGetApplicationAttachmentFileQuery, useGetApplicationBlocksQuery, useDeleteApplicationBlockMutation, useGetApplicationPlacementsQuery, useCreateApplicationPlacementsMutation, useUpdateApplicationPlacementMutation, useGetApplicationCourseAssignmentsQuery, useCreateApplicationCourseAssignmentsMutation, useDeleteApplicationCourseAssignmentMutation, useInviteApplicationCandidateMutation, useLinkApplicationCandidateMutation, useUserPlatformsQuery, useLazyUserPlatformsQuery, } = platformApiSlice;
|
|
41057
41138
|
|
|
41058
41139
|
const USERS_ENDPOINTS = {
|
|
41140
|
+
// The merged edX + DM profile, served by DM itself (the same payload the edX
|
|
41141
|
+
// `/api/ibl/users/manage/metadata/` endpoint used to proxy).
|
|
41059
41142
|
GET_USER_METADATA: {
|
|
41060
|
-
service: SERVICES.
|
|
41143
|
+
service: SERVICES.DM,
|
|
41144
|
+
path: () => `/api/core/users/metadata/proxy/`,
|
|
41145
|
+
},
|
|
41146
|
+
// TODO(iblai-platform#2707 B1): the write still goes to the edX plugin. Its
|
|
41147
|
+
// edX half could be a merge-patch on `/api/user/v1/accounts/<self>`, but the
|
|
41148
|
+
// DM-only fields (title, about, public_metadata, tour/onboarding flags) have
|
|
41149
|
+
// no self-write endpoint on DM yet, and splitting the call would drop them.
|
|
41150
|
+
UPDATE_USER_METADATA: {
|
|
41151
|
+
service: SERVICES.LMS_DIRECT,
|
|
41061
41152
|
path: () => `/api/ibl/users/manage/metadata/`,
|
|
41062
41153
|
},
|
|
41063
41154
|
RESET_PASSWORD: {
|
|
41064
41155
|
service: SERVICES.LEGACY_LMS,
|
|
41065
41156
|
path: () => `/ibl/edx/account/api/reset-password-token`,
|
|
41066
41157
|
},
|
|
41158
|
+
// Platform-admin flag on a user's platform link; DM syncs the matching edX
|
|
41159
|
+
// org role itself.
|
|
41067
41160
|
UPDATE_USER_ROLES: {
|
|
41068
|
-
service: SERVICES.
|
|
41161
|
+
service: SERVICES.DM,
|
|
41162
|
+
path: () => `/api/core/users/platforms/`,
|
|
41163
|
+
},
|
|
41164
|
+
/** @deprecated The edX role write behind the legacy `{ username, org, role, active }` shape. */
|
|
41165
|
+
UPDATE_USER_ROLES_EDX: {
|
|
41166
|
+
service: SERVICES.LMS_DIRECT,
|
|
41069
41167
|
path: () => `/api/ibl/users/manage/roles/`,
|
|
41070
41168
|
},
|
|
41071
|
-
//
|
|
41072
|
-
//
|
|
41073
|
-
//
|
|
41074
|
-
// resolvable there; `lmsService` is the fallback for deployments without a
|
|
41075
|
-
// reachable Studio host. Both hosts share one cache tag, so this stays a
|
|
41076
|
-
// single endpoint rather than two.
|
|
41169
|
+
// The caller's course access roles from the edX enrollment API, mapped onto
|
|
41170
|
+
// the keys the plugin listing used (`course-staff`, ...). Org-wide roles live
|
|
41171
|
+
// on the DM side (`/api/core/users/platforms/` → is_admin / is_staff).
|
|
41077
41172
|
GET_USER_ROLES: {
|
|
41078
|
-
service: SERVICES.
|
|
41079
|
-
|
|
41080
|
-
path: () => `/api/ibl/users/manage/roles/`,
|
|
41173
|
+
service: SERVICES.LMS,
|
|
41174
|
+
path: () => `/api/enrollment/v1/roles/`,
|
|
41081
41175
|
},
|
|
41082
41176
|
UPLOAD_PROFILE_IMAGE: {
|
|
41083
41177
|
service: SERVICES.LMS,
|
|
@@ -41111,11 +41205,13 @@ const USERS_ENDPOINTS = {
|
|
|
41111
41205
|
};
|
|
41112
41206
|
const USERS_QUERY_KEYS = {
|
|
41113
41207
|
GET_USER_METADATA: () => ['USER_METADATA'],
|
|
41208
|
+
UPDATE_USER_METADATA: () => ['USER_METADATA'],
|
|
41114
41209
|
GET_USER_PLATFORM_METADATA: () => ['USER_PLATFORM_METADATA'],
|
|
41115
41210
|
GET_USER_METADATA_EDX: () => ['USER_METADATA_EDX'],
|
|
41116
41211
|
GET_USER_PROFILE_SUMMARY: () => ['USER_PROFILE_SUMMARY'],
|
|
41117
41212
|
RESET_PASSWORD: () => ['RESET_PASSWORD'],
|
|
41118
41213
|
UPDATE_USER_ROLES: () => ['UPDATE_USER_ROLES'],
|
|
41214
|
+
UPDATE_USER_ROLES_EDX: () => ['UPDATE_USER_ROLES'],
|
|
41119
41215
|
GET_USER_ROLES: () => ['USER_ROLES'],
|
|
41120
41216
|
UPLOAD_PROFILE_IMAGE: () => ['UPLOAD_PROFILE_IMAGE'],
|
|
41121
41217
|
EDX_UPDATE_USER_METADATA: () => ['EDX_UPDATE_USER_METADATA'],
|
|
@@ -41124,6 +41220,44 @@ const USERS_QUERY_KEYS = {
|
|
|
41124
41220
|
};
|
|
41125
41221
|
const USERS_REDUCER_PATH = 'userApiSlice';
|
|
41126
41222
|
|
|
41223
|
+
/**
|
|
41224
|
+
* Open edX `CourseAccessRole` names → the keys the edX plugin's role listing
|
|
41225
|
+
* used, which the role filters and the apps' staff checks are written against.
|
|
41226
|
+
*/
|
|
41227
|
+
const EDX_ROLE_KEYS = {
|
|
41228
|
+
staff: 'staff',
|
|
41229
|
+
instructor: 'instructor',
|
|
41230
|
+
limited_staff: 'limited-staff',
|
|
41231
|
+
finance_admin: 'finance-admin',
|
|
41232
|
+
sales_admin: 'sales-admin',
|
|
41233
|
+
beta_testers: 'beta-tester',
|
|
41234
|
+
library_user: 'library-user',
|
|
41235
|
+
ccx_coach: 'ccx-coach',
|
|
41236
|
+
data_researcher: 'data-researcher',
|
|
41237
|
+
course_creator_group: 'course-creator',
|
|
41238
|
+
support: 'support-staff',
|
|
41239
|
+
};
|
|
41240
|
+
const roleKey = (edxRole) => { var _a; return (_a = EDX_ROLE_KEYS[edxRole]) !== null && _a !== void 0 ? _a : edxRole.replace(/_/g, '-'); };
|
|
41241
|
+
/**
|
|
41242
|
+
* Maps the edX enrollment roles API (`GET /api/enrollment/v1/roles/`) onto the
|
|
41243
|
+
* `UserRole[]` shape the plugin listing returned: course rows become
|
|
41244
|
+
* `course-<role>`, org rows `org-<role>`, and the global `is_staff` flag a
|
|
41245
|
+
* `staff` row. The edX API only lists `CourseAccessRole` rows, so org-wide
|
|
41246
|
+
* roles granted on the DM side (platform admin / staff) are not included.
|
|
41247
|
+
*/
|
|
41248
|
+
const mapEdxUserRoles = (response) => {
|
|
41249
|
+
var _a;
|
|
41250
|
+
const roles = ((_a = response === null || response === void 0 ? void 0 : response.roles) !== null && _a !== void 0 ? _a : []).map(({ role, org, course_id }) => {
|
|
41251
|
+
const key = roleKey(role);
|
|
41252
|
+
const scoped = course_id ? `course-${key}` : org ? `org-${key}` : key;
|
|
41253
|
+
return { role: scoped, org: org !== null && org !== void 0 ? org : '', course: course_id !== null && course_id !== void 0 ? course_id : '' };
|
|
41254
|
+
});
|
|
41255
|
+
if (response === null || response === void 0 ? void 0 : response.is_staff) {
|
|
41256
|
+
roles.unshift({ role: 'staff', org: '', course: '' });
|
|
41257
|
+
}
|
|
41258
|
+
return roles;
|
|
41259
|
+
};
|
|
41260
|
+
|
|
41127
41261
|
const userApiSlice = createApi({
|
|
41128
41262
|
reducerPath: USERS_REDUCER_PATH,
|
|
41129
41263
|
baseQuery: iblFetchBaseQuery,
|
|
@@ -41146,8 +41280,8 @@ const userApiSlice = createApi({
|
|
|
41146
41280
|
}),
|
|
41147
41281
|
updateUserMetadata: builder.mutation({
|
|
41148
41282
|
query: (args) => ({
|
|
41149
|
-
url: USERS_ENDPOINTS.
|
|
41150
|
-
service: USERS_ENDPOINTS.
|
|
41283
|
+
url: USERS_ENDPOINTS.UPDATE_USER_METADATA.path(),
|
|
41284
|
+
service: USERS_ENDPOINTS.UPDATE_USER_METADATA.service,
|
|
41151
41285
|
body: args,
|
|
41152
41286
|
method: 'POST',
|
|
41153
41287
|
params: { username: args.username },
|
|
@@ -41156,8 +41290,8 @@ const userApiSlice = createApi({
|
|
|
41156
41290
|
}),
|
|
41157
41291
|
updateUserAccount: builder.mutation({
|
|
41158
41292
|
query: (args) => ({
|
|
41159
|
-
url: USERS_ENDPOINTS.
|
|
41160
|
-
service: USERS_ENDPOINTS.
|
|
41293
|
+
url: USERS_ENDPOINTS.UPDATE_USER_METADATA.path(),
|
|
41294
|
+
service: USERS_ENDPOINTS.UPDATE_USER_METADATA.service,
|
|
41161
41295
|
body: args,
|
|
41162
41296
|
method: 'POST',
|
|
41163
41297
|
params: { username: args.username },
|
|
@@ -41186,45 +41320,45 @@ const userApiSlice = createApi({
|
|
|
41186
41320
|
};
|
|
41187
41321
|
},
|
|
41188
41322
|
}),
|
|
41323
|
+
/**
|
|
41324
|
+
* Make a user a platform admin, or demote them. Takes the DM platform-link
|
|
41325
|
+
* shape (`user_id`, `platform_key`, `is_admin`); DM syncs the edX org role.
|
|
41326
|
+
* The legacy `{ username, org, role, active }` shape still writes the edX
|
|
41327
|
+
* role directly and is deprecated.
|
|
41328
|
+
*/
|
|
41189
41329
|
updateUserRole: builder.mutation({
|
|
41190
|
-
query: (args) =>
|
|
41191
|
-
|
|
41192
|
-
|
|
41193
|
-
|
|
41194
|
-
|
|
41195
|
-
|
|
41330
|
+
query: (args) => 'user_id' in args
|
|
41331
|
+
? {
|
|
41332
|
+
url: USERS_ENDPOINTS.UPDATE_USER_ROLES.path(),
|
|
41333
|
+
service: USERS_ENDPOINTS.UPDATE_USER_ROLES.service,
|
|
41334
|
+
body: {
|
|
41335
|
+
user_id: args.user_id,
|
|
41336
|
+
platform_key: args.platform_key,
|
|
41337
|
+
is_admin: args.is_admin,
|
|
41338
|
+
},
|
|
41339
|
+
method: 'POST',
|
|
41340
|
+
}
|
|
41341
|
+
: {
|
|
41342
|
+
url: USERS_ENDPOINTS.UPDATE_USER_ROLES_EDX.path(),
|
|
41343
|
+
service: USERS_ENDPOINTS.UPDATE_USER_ROLES_EDX.service,
|
|
41344
|
+
body: args,
|
|
41345
|
+
method: 'POST',
|
|
41346
|
+
},
|
|
41196
41347
|
invalidatesTags: [featureTags.PLATFORM_USERS, ...USERS_QUERY_KEYS.GET_USER_ROLES()],
|
|
41197
41348
|
}),
|
|
41198
41349
|
/**
|
|
41199
|
-
*
|
|
41200
|
-
*
|
|
41201
|
-
*
|
|
41202
|
-
*
|
|
41203
|
-
*
|
|
41204
|
-
* someone else's returns 404.
|
|
41205
|
-
*
|
|
41206
|
-
* Defaults to the CMS/Studio host, where course-creation roles are fully
|
|
41207
|
-
* resolvable; pass `useLms` to fall back to the deprecated LMS host.
|
|
41350
|
+
* The signed-in user's course access roles (`course-staff`,
|
|
41351
|
+
* `course-instructor`, ...) plus a global `staff` row when they are edX
|
|
41352
|
+
* staff, from the edX enrollment roles API through DM's proxy. A user with
|
|
41353
|
+
* no roles returns `[]`. Org-wide roles are not listed here: DM holds them
|
|
41354
|
+
* on the user's platform link.
|
|
41208
41355
|
*/
|
|
41209
41356
|
getUserRoles: builder.query({
|
|
41210
|
-
query: (
|
|
41211
|
-
|
|
41212
|
-
|
|
41213
|
-
|
|
41214
|
-
|
|
41215
|
-
}
|
|
41216
|
-
if (email) {
|
|
41217
|
-
params.email = email;
|
|
41218
|
-
}
|
|
41219
|
-
if (userId !== undefined) {
|
|
41220
|
-
params.user_id = userId;
|
|
41221
|
-
}
|
|
41222
|
-
return {
|
|
41223
|
-
url: endpoint.path(),
|
|
41224
|
-
service: useLms ? endpoint.lmsService : endpoint.service,
|
|
41225
|
-
params,
|
|
41226
|
-
};
|
|
41227
|
-
},
|
|
41357
|
+
query: () => ({
|
|
41358
|
+
url: USERS_ENDPOINTS.GET_USER_ROLES.path(),
|
|
41359
|
+
service: USERS_ENDPOINTS.GET_USER_ROLES.service,
|
|
41360
|
+
}),
|
|
41361
|
+
transformResponse: mapEdxUserRoles,
|
|
41228
41362
|
providesTags: USERS_QUERY_KEYS.GET_USER_ROLES(),
|
|
41229
41363
|
}),
|
|
41230
41364
|
getUserMetadataEdx: builder.query({
|
|
@@ -44156,30 +44290,61 @@ const coursesApiSlice = createApi({
|
|
|
44156
44290
|
});
|
|
44157
44291
|
const { useGetUserEnrolledCoursesQuery, useLazyGetUserEnrolledCoursesQuery, useGetUserAssignedCoursesQuery, useLazyGetUserAssignedCoursesQuery, useGetLearnerCourseOutlineQuery, useLazyGetLearnerCourseOutlineQuery, } = coursesApiSlice;
|
|
44158
44292
|
|
|
44293
|
+
/** One request through the base query, unwrapped to its payload. */
|
|
44294
|
+
const fetchData = async (args, api, extraOptions) => {
|
|
44295
|
+
const result = await iblFetchBaseQuery(args, api, extraOptions);
|
|
44296
|
+
if (result.error) {
|
|
44297
|
+
throw result.error;
|
|
44298
|
+
}
|
|
44299
|
+
return result.data;
|
|
44300
|
+
};
|
|
44301
|
+
/**
|
|
44302
|
+
* DM's catalog user endpoints take `username=<self>` where the edX plugin
|
|
44303
|
+
* inferred the caller from the JWT; a caller that passes none gets the stored
|
|
44304
|
+
* user.
|
|
44305
|
+
*/
|
|
44306
|
+
const fetchForUser = async (path, params, username, api, extraOptions) => {
|
|
44307
|
+
const user = username !== null && username !== void 0 ? username : (await getStoredUsername());
|
|
44308
|
+
if (!user) {
|
|
44309
|
+
return { error: { status: 400, data: 'No username available' } };
|
|
44310
|
+
}
|
|
44311
|
+
const search = new URLSearchParams({ username: user, ...params });
|
|
44312
|
+
const data = await fetchData({ url: `${path}?${search.toString()}`, service: SERVICES.DM, method: 'GET' }, api, extraOptions);
|
|
44313
|
+
return { data };
|
|
44314
|
+
};
|
|
44159
44315
|
const courseMetadataApiSlice = createApi({
|
|
44160
44316
|
reducerPath: 'courseMetadataApiSlice',
|
|
44161
44317
|
baseQuery: iblFetchBaseQuery,
|
|
44162
44318
|
endpoints: (builder) => ({
|
|
44319
|
+
/**
|
|
44320
|
+
* The edX plugin's `course_metadata` payload, served by DM (to signed-in
|
|
44321
|
+
* and anonymous callers alike).
|
|
44322
|
+
*/
|
|
44163
44323
|
getCourseMetaData: builder.query({
|
|
44164
44324
|
query: ({ courseKey }) => ({
|
|
44165
|
-
url: `/
|
|
44166
|
-
service: SERVICES.
|
|
44325
|
+
url: `/v1/courses/metadata?course_id=${encodeURIComponent(courseKey)}`,
|
|
44326
|
+
service: SERVICES.DM,
|
|
44167
44327
|
method: 'GET',
|
|
44168
44328
|
}),
|
|
44329
|
+
// DM leaves the price null where the plugin said "Free".
|
|
44330
|
+
transformResponse: (course) => {
|
|
44331
|
+
var _a;
|
|
44332
|
+
return ({
|
|
44333
|
+
...course,
|
|
44334
|
+
course_price: (_a = course.course_price) !== null && _a !== void 0 ? _a : 'Free',
|
|
44335
|
+
});
|
|
44336
|
+
},
|
|
44169
44337
|
}),
|
|
44338
|
+
/**
|
|
44339
|
+
* The completion outline, from DM. DM answers 404 for a course the user is
|
|
44340
|
+
* not enrolled in, where the edX plugin returned an empty outline.
|
|
44341
|
+
*/
|
|
44170
44342
|
getCourseCompletionOutlines: builder.query({
|
|
44171
|
-
|
|
44172
|
-
url: `/api/ibl/completion/course_outline/${courseKey}?course_id=${encodeURIComponent(courseKey)}`,
|
|
44173
|
-
service: SERVICES.LMS,
|
|
44174
|
-
method: 'GET',
|
|
44175
|
-
}),
|
|
44343
|
+
queryFn: ({ courseKey, username }, api, extraOptions) => fetchForUser('/api/catalog/enrollment/courses/completion/', { course_id: courseKey, endpoint: 'outline' }, username, api, extraOptions),
|
|
44176
44344
|
}),
|
|
44345
|
+
/** Enrollment eligibility, from DM. Same fields as the edX plugin plus `is_eligible`. */
|
|
44177
44346
|
getCourseEligibility: builder.query({
|
|
44178
|
-
|
|
44179
|
-
url: `/api/ibl/enrollment/enroll_status?course_id=${encodeURIComponent(courseKey)}`,
|
|
44180
|
-
service: SERVICES.LMS,
|
|
44181
|
-
method: 'GET',
|
|
44182
|
-
}),
|
|
44347
|
+
queryFn: ({ courseKey, username }, api, extraOptions) => fetchForUser('/api/catalog/eligibility/courses/check/', { course_id: courseKey }, username, api, extraOptions),
|
|
44183
44348
|
}),
|
|
44184
44349
|
createCourseEnrollment: builder.mutation({
|
|
44185
44350
|
query: (body) => ({
|
|
@@ -44222,38 +44387,54 @@ const edxSsoApiSlice = createApi({
|
|
|
44222
44387
|
});
|
|
44223
44388
|
const { useGetEdxSSOTokenQuery, useLazyGetEdxSSOTokenQuery } = edxSsoApiSlice;
|
|
44224
44389
|
|
|
44390
|
+
// Endpoints DM's edX proxy admits use `SERVICES.STUDIO` (proxied when
|
|
44391
|
+
// `Config.edxProxyEnabled`). The rest are pinned to the Studio host: the
|
|
44392
|
+
// `api/ibl` manage endpoints the proxy refuses, and the session + CSRF views.
|
|
44225
44393
|
const STUDIO_AUTHORING_ENDPOINTS = {
|
|
44394
|
+
// Course-creator app endpoint, not under `api/ibl` so the proxy reaches it.
|
|
44395
|
+
// Takes `{ org, display_name, number, run }`, answers `{ course_parent_locator }`.
|
|
44226
44396
|
CREATE_COURSE: {
|
|
44227
|
-
path: (
|
|
44397
|
+
path: () => '/api/v1/ibl/course/create',
|
|
44228
44398
|
service: SERVICES.STUDIO,
|
|
44229
44399
|
},
|
|
44400
|
+
// Libraries still go through the plugin's manage endpoint.
|
|
44401
|
+
CREATE_LIBRARY: {
|
|
44402
|
+
path: (contentType) => `/api/ibl/manage/${contentType}/`,
|
|
44403
|
+
service: SERVICES.STUDIO_DIRECT,
|
|
44404
|
+
},
|
|
44405
|
+
// TODO(iblai-platform#2707 B5): no DM or proxy replacement for course delete.
|
|
44230
44406
|
DELETE_COURSE: {
|
|
44231
44407
|
path: () => '/api/ibl/manage/course/delete',
|
|
44232
|
-
service: SERVICES.
|
|
44408
|
+
service: SERVICES.STUDIO_DIRECT,
|
|
44233
44409
|
},
|
|
44410
|
+
// TODO(iblai-platform#2707 row 13 / B6): the edX half could become a
|
|
44411
|
+
// `contentstore/v1/course_details` PUT through the proxy, but the DM catalog
|
|
44412
|
+
// half (`/api/catalog/metadata/course/`) is DM-admin only, so the combined
|
|
44413
|
+
// plugin endpoint stays until platform admins can write catalog metadata.
|
|
44234
44414
|
COURSE_SETTINGS: {
|
|
44235
44415
|
path: (contentType) => `/api/ibl/v1/${contentType}_settings/`,
|
|
44236
|
-
service: SERVICES.
|
|
44416
|
+
service: SERVICES.STUDIO_DIRECT,
|
|
44237
44417
|
},
|
|
44418
|
+
// Session + CSRF views, not JWT-capable: stay on the Studio host.
|
|
44238
44419
|
CREATE_XBLOCK: {
|
|
44239
44420
|
path: () => '/xblock/',
|
|
44240
|
-
service: SERVICES.
|
|
44421
|
+
service: SERVICES.STUDIO_DIRECT,
|
|
44241
44422
|
},
|
|
44242
44423
|
UPDATE_XBLOCK: {
|
|
44243
44424
|
path: (locator) => `/xblock/${locator}`,
|
|
44244
|
-
service: SERVICES.
|
|
44425
|
+
service: SERVICES.STUDIO_DIRECT,
|
|
44245
44426
|
},
|
|
44246
44427
|
SCORM_SUBMIT: {
|
|
44247
44428
|
path: (locator) => `/xblock/${locator}/handler/studio_submit`,
|
|
44248
|
-
service: SERVICES.
|
|
44429
|
+
service: SERVICES.STUDIO_DIRECT,
|
|
44249
44430
|
},
|
|
44250
44431
|
UPLOAD_ASSET: {
|
|
44251
44432
|
path: (courseKey) => `/assets/${courseKey}/`,
|
|
44252
|
-
service: SERVICES.
|
|
44433
|
+
service: SERVICES.STUDIO_DIRECT,
|
|
44253
44434
|
},
|
|
44254
44435
|
ADVANCED_SETTINGS: {
|
|
44255
44436
|
path: (courseKey) => `/settings/advanced/${courseKey}`,
|
|
44256
|
-
service: SERVICES.
|
|
44437
|
+
service: SERVICES.STUDIO_DIRECT,
|
|
44257
44438
|
},
|
|
44258
44439
|
VIDEO_UPLOAD: {
|
|
44259
44440
|
path: (courseKey) => `/api/v1/ibl/course/${courseKey}/s3-upload`,
|
|
@@ -44261,23 +44442,88 @@ const STUDIO_AUTHORING_ENDPOINTS = {
|
|
|
44261
44442
|
},
|
|
44262
44443
|
};
|
|
44263
44444
|
|
|
44445
|
+
const RUN_SUFFIX_ALPHABET = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
|
|
44264
44446
|
/**
|
|
44265
|
-
*
|
|
44266
|
-
*
|
|
44267
|
-
|
|
44447
|
+
* A course number derived from the display name: letters, digits and single
|
|
44448
|
+
* hyphens, at most 30 characters, `COURSE` when nothing usable is left.
|
|
44449
|
+
*/
|
|
44450
|
+
const courseNumberFromDisplayName = (displayName) => {
|
|
44451
|
+
const number = displayName
|
|
44452
|
+
.trim()
|
|
44453
|
+
.replace(/[^A-Za-z0-9]+/g, '-')
|
|
44454
|
+
.replace(/^-+|-+$/g, '')
|
|
44455
|
+
.slice(0, 30)
|
|
44456
|
+
.replace(/-+$/, '');
|
|
44457
|
+
return number || 'COURSE';
|
|
44458
|
+
};
|
|
44459
|
+
/** A run like `2026_a1B`: the year plus a short random suffix, as Studio's own generator makes them. */
|
|
44460
|
+
const generateCourseRun = (now = new Date()) => {
|
|
44461
|
+
let suffix = '';
|
|
44462
|
+
for (let index = 0; index < 3; index += 1) {
|
|
44463
|
+
suffix += RUN_SUFFIX_ALPHABET[Math.floor(Math.random() * RUN_SUFFIX_ALPHABET.length)];
|
|
44464
|
+
}
|
|
44465
|
+
return `${now.getFullYear()}_${suffix}`;
|
|
44466
|
+
};
|
|
44467
|
+
/**
|
|
44468
|
+
* The course-creator endpoint needs `number` and `run`, which the old plugin
|
|
44469
|
+
* endpoint generated itself; fill them in when the caller only gave `org` and
|
|
44470
|
+
* `display_name`.
|
|
44471
|
+
*/
|
|
44472
|
+
const withCourseNumberAndRun = (courseData) => {
|
|
44473
|
+
var _a, _b;
|
|
44474
|
+
return ({
|
|
44475
|
+
...courseData,
|
|
44476
|
+
number: (_a = courseData.number) !== null && _a !== void 0 ? _a : courseNumberFromDisplayName(courseData.display_name),
|
|
44477
|
+
run: (_b = courseData.run) !== null && _b !== void 0 ? _b : generateCourseRun(),
|
|
44478
|
+
});
|
|
44479
|
+
};
|
|
44480
|
+
/** `block-v1:ORG+NUM+RUN+type@course+block@course` → `course-v1:ORG+NUM+RUN`. */
|
|
44481
|
+
const courseKeyFromLocator = (locator) => {
|
|
44482
|
+
const match = /^block-v1:(.+)\+type@course\+block@course$/.exec(locator);
|
|
44483
|
+
return match ? `course-v1:${match[1]}` : undefined;
|
|
44484
|
+
};
|
|
44485
|
+
|
|
44486
|
+
/**
|
|
44487
|
+
* Studio (Open edX CMS) course-authoring endpoints. Course creation and video
|
|
44488
|
+
* upload reach Studio through DM's edX proxy when `Config.edxProxyEnabled`;
|
|
44489
|
+
* the rest hit the Studio host (`Config.studioUrl`) with cookie-session auth +
|
|
44490
|
+
* CSRF token, mirroring how Studio's own frontend talks to it.
|
|
44268
44491
|
*/
|
|
44269
44492
|
const studioAuthoringApiSlice = createApi({
|
|
44270
44493
|
reducerPath: 'studioAuthoringApiSlice',
|
|
44271
44494
|
baseQuery: iblFetchBaseQuery,
|
|
44272
44495
|
endpoints: (builder) => ({
|
|
44273
|
-
/**
|
|
44496
|
+
/**
|
|
44497
|
+
* Create the course (or library) shell. Returns `course_key`.
|
|
44498
|
+
*
|
|
44499
|
+
* A course goes to the course-creator endpoint, which needs `number` and
|
|
44500
|
+
* `run` (generated from the display name when absent) and answers with the
|
|
44501
|
+
* root block locator; `course_key` is derived from it. A library still uses
|
|
44502
|
+
* the plugin's manage endpoint on the Studio host.
|
|
44503
|
+
*/
|
|
44274
44504
|
createStudioCourse: builder.mutation({
|
|
44275
|
-
query: ({ courseData, contentType = 'course' }) =>
|
|
44276
|
-
|
|
44277
|
-
|
|
44278
|
-
|
|
44279
|
-
|
|
44280
|
-
|
|
44505
|
+
query: ({ courseData, contentType = 'course' }) => contentType === 'course'
|
|
44506
|
+
? {
|
|
44507
|
+
url: STUDIO_AUTHORING_ENDPOINTS.CREATE_COURSE.path(),
|
|
44508
|
+
service: STUDIO_AUTHORING_ENDPOINTS.CREATE_COURSE.service,
|
|
44509
|
+
method: 'POST',
|
|
44510
|
+
body: withCourseNumberAndRun(courseData),
|
|
44511
|
+
}
|
|
44512
|
+
: {
|
|
44513
|
+
url: STUDIO_AUTHORING_ENDPOINTS.CREATE_LIBRARY.path(contentType),
|
|
44514
|
+
service: STUDIO_AUTHORING_ENDPOINTS.CREATE_LIBRARY.service,
|
|
44515
|
+
method: 'POST',
|
|
44516
|
+
body: courseData,
|
|
44517
|
+
},
|
|
44518
|
+
transformResponse: (response) => {
|
|
44519
|
+
var _a;
|
|
44520
|
+
return ({
|
|
44521
|
+
...response,
|
|
44522
|
+
course_key: (_a = response.course_key) !== null && _a !== void 0 ? _a : (typeof response.course_parent_locator === 'string'
|
|
44523
|
+
? courseKeyFromLocator(response.course_parent_locator)
|
|
44524
|
+
: undefined),
|
|
44525
|
+
});
|
|
44526
|
+
},
|
|
44281
44527
|
}),
|
|
44282
44528
|
/** Delete a course — used as rollback when a later creation step fails. */
|
|
44283
44529
|
deleteStudioCourse: builder.mutation({
|
|
@@ -47166,9 +47412,11 @@ const edxProctoringApiSlice = createApi({
|
|
|
47166
47412
|
const { useGetExamInfoQuery, useLazyGetExamInfoQuery, useUpdateExamAttemptMutation, useStartExamMutation, } = edxProctoringApiSlice;
|
|
47167
47413
|
|
|
47168
47414
|
const RETIREMENT_ENDPOINTS = {
|
|
47415
|
+
// Retires the caller (no body). Answers 202: the retirement then runs
|
|
47416
|
+
// asynchronously on DM and edX.
|
|
47169
47417
|
SELF_RETIRE: {
|
|
47170
|
-
service: SERVICES.
|
|
47171
|
-
path: () => `/api/
|
|
47418
|
+
service: SERVICES.DM,
|
|
47419
|
+
path: () => `/api/core/users/delete/`,
|
|
47172
47420
|
},
|
|
47173
47421
|
};
|
|
47174
47422
|
|
|
@@ -49948,7 +50196,8 @@ const skillsMiddleware = [
|
|
|
49948
50196
|
userLlmUsageApiSlice.middleware,
|
|
49949
50197
|
];
|
|
49950
50198
|
|
|
49951
|
-
const initializeDataLayer = (dmUrl, lmsUrl, legacyLmsUrl, storageService, httpErrorHandler = {}, studioUrl, refreshAuthToken) => {
|
|
50199
|
+
const initializeDataLayer = (dmUrl, lmsUrl, legacyLmsUrl, storageService, httpErrorHandler = {}, studioUrl, refreshAuthToken, options) => {
|
|
50200
|
+
var _a;
|
|
49952
50201
|
IblDataLayer.storage = storageService;
|
|
49953
50202
|
Config.dmUrl = dmUrl;
|
|
49954
50203
|
Config.lmsUrl = lmsUrl;
|
|
@@ -49958,6 +50207,7 @@ const initializeDataLayer = (dmUrl, lmsUrl, legacyLmsUrl, storageService, httpEr
|
|
|
49958
50207
|
Config.studioUrl = studioUrl;
|
|
49959
50208
|
}
|
|
49960
50209
|
Config.refreshAuthToken = refreshAuthToken;
|
|
50210
|
+
Config.edxProxyEnabled = (_a = options === null || options === void 0 ? void 0 : options.edxProxy) !== null && _a !== void 0 ? _a : false;
|
|
49961
50211
|
};
|
|
49962
50212
|
|
|
49963
50213
|
export { AGENT_SKILLS_ENDPOINTS, AGENT_SKILLS_REDUCER_PATH, AGENT_SKILLS_TAG_TYPES, APP_IDENTIFIERS, AUDIT_LOGS_ENDPOINTS, AUDIT_LOGS_QUERY_KEYS, AUDIT_LOGS_REDUCER_PATH, BASE_AGENT_TEMPLATE_SLUGS, CALL_CONFIGURATIONS_ENDPOINTS, CALL_CONFIGURATIONS_REDUCER_PATH, CALL_CONFIGURATIONS_TAGS, CHAT_HISTORY_PAGE_PARAM, CHAT_HISTORY_PAGE_SIZE, CHAT_HISTORY_PAGE_SIZE_PARAM, CHAT_PRIVACY_MODES, CLAW_ENDPOINTS, CLAW_REDUCER_PATH, CLAW_TAG_TYPES, CORE_CUSTOM_ENDPOINTS, CORE_CUSTOM_REDUCER_PATH, CORE_FAKE_CUSTOM_REDUCER_PATH, CREDENTIALS_CUSTOM_ENDPOINTS, CREDENTIALS_CUSTOM_REDUCER_PATH, CUSTOM_AI_SEARCH_ENDPOINTS, CUSTOM_AI_SEARCH_QUERY_KEYS, CUSTOM_AI_SEARCH_REDUCER_PATH, CUSTOM_DOMAIN_ENDPOINTS, CUSTOM_DOMAIN_QUERY_KEYS, CUSTOM_DOMAIN_REDUCER_PATH, ChatPrivacyModeEnum, DEFAULT_PRIVACY_ACTION, DEFAULT_PRIVACY_RESPONSE, DISCLAIMERS_ENDPOINTS, DISCLAIMERS_QUERY_KEYS, DISCLAIMERS_REDUCER_PATH, EDX_PROCTORING_ENDPOINTS, EVALUATIONS_ENDPOINTS, EVALUATIONS_REDUCER_PATH, EVALUATIONS_TAGS, GLOBAL_SEARCH_DEFAULTS, GLOBAL_SEARCH_PATH, GRADING_ENDPOINTS, GRADING_QUERY_KEYS, GRADING_REDUCER_PATH, HOSTING_ENDPOINTS, HOSTING_QUERY_KEYS, HOSTING_REDUCER_PATH, IblDataLayer, LEARNER_COMPLETION_PATH, LOGO_ENDPOINTS, MCP_ENDPOINTS, MCP_REDUCER_PATH, MCP_TAG_TYPES, MEMORY_QUERY_KEYS, MEMORY_REDUCER_PATH, MEMSEARCH_ENDPOINTS, MENTORS_QUERY_KEYS, MENTORS_REDUCER_PATH, MENTOR_CUSTOM_ENDPOINTS, MENTOR_CUSTOM_REDUCER_PATH, MENTOR_ENDPOINTS, MENTOR_SKILL_ASSIGNMENTS_PAGE_SIZE, NEVER_RETRY_STATUSES, NOTIFICATIONS_CUSTOM_ENDPOINTS, NOTIFICATIONS_CUSTOM_REDUCER_PATH, NOTIFICATIONS_CUSTOM_TAGS, PLATFORM_AUDIT_ACTION_CODES, PLATFORM_AUDIT_EVENT_TYPES, PLATFORM_AUDIT_LOGS_MAX_LIMIT, PLATFORM_CONFIGURATION_TAG, PLATFORM_CUSTOM_ENDPOINTS, PLATFORM_CUSTOM_REDUCER_PATH, PLATFORM_MEMBERSHIP_TAG, PRIVACY_ACTIONS, PRIVACY_BLOCKED_ERROR_KIND, PRIVACY_ENTITY_TYPES, PRIVACY_TARGET_SYSTEM, PROJECTS_CUSTOM_ENDPOINTS, PROJECTS_CUSTOM_REDUCER_PATH, PROJECTS_QUERY_KEYS, QUERY_PARAMS, RETIREMENT_ENDPOINTS, SERVICES, SPEND_CAPS_ENDPOINTS, SPEND_CAPS_QUERY_KEYS, SPEND_CAPS_REDUCER_PATH, SPEND_CAP_EXCEEDED_ERROR_CODE, STORAGE_KEYS, STUDIO_AUTHORING_ENDPOINTS, SUGGESTED_PRIVACY_ENTITIES, SUPPORT_TICKETS_ENDPOINTS, SUPPORT_TICKETS_REDUCER_PATH, SUPPORT_TICKETS_TAGS, TENANT_IDENTIFIERS, TENANT_LOGO_ENDPOINTS, TENANT_LOGO_QUERY_KEYS, TENANT_LOGO_REDUCER_PATH, URL_PATTERNS, USER_CHAT_HISTORY_ENDPOINTS, USER_CHAT_HISTORY_QUERY_KEYS, USER_CHAT_HISTORY_REDUCER_PATH, USER_CHAT_HISTORY_REPORT_ACTIVE_STATES, USER_LLM_RECENT_ACTIVITY_PAGE_SIZE, USER_LLM_USAGE_ENDPOINTS, USER_LLM_USAGE_ERROR_MESSAGES, USER_LLM_USAGE_MAX_LIMIT, USER_LLM_USAGE_QUERY_KEYS, USER_LLM_USAGE_REDUCER_PATH, USER_PROGRESS_DATA_POINTS, USER_PROGRESS_SUMMARY_TYPE, VERCEL_SPA, VIRTUAL_MACHINE_DEFAULT_BILLING, VIRTUAL_MACHINE_EGRESS_PROFILES, VIRTUAL_MACHINE_ENDPOINTS, VIRTUAL_MACHINE_ENV_VAR_PATTERN, VIRTUAL_MACHINE_HOST_PORT_PATTERN, VIRTUAL_MACHINE_MAX_POLICY_HOSTS, VIRTUAL_MACHINE_MAX_SECRETS_PER_MENTOR, VIRTUAL_MACHINE_PERMISSIONS, VIRTUAL_MACHINE_QUERY_KEYS, VIRTUAL_MACHINE_REDUCER_PATH, VIRTUAL_MACHINE_REJECTED_HOSTS, VIRTUAL_MACHINE_REJECTED_HOST_SUFFIXES, VIRTUAL_MACHINE_SECRET_VALUE_MIN_LENGTH, WATCHED_GROUPS_ENDPOINTS, WATCHED_GROUPS_QUERY_KEYS, WATCHED_GROUPS_REDUCER_PATH, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, WORKFLOWS_ENDPOINTS, WORKFLOWS_QUERY_KEYS, WORKFLOWS_REDUCER_PATH, agentSkillsApiSlice, analyticsApiSlice, apiKeysApiReducer, apiKeysApiSlice, appApiReducer, appApiSlice, artifactsApiReducer, artifactsApiSlice, auditLogsApiSlice, authApiSlice, billingApiSlice, billingCustomSlice, buildGlobalSearchUrl, buildLearnerCompletionUrl, buildPinnedMessagesUrl, buildRecentMessagesUrl, buildSessionRetrieveUrl, buildSharedSessionRetrieveUrl, callConfigurationsApiReducer, callConfigurationsApiSlice, careerApiSlice, catalogApiSlice, chatApiSlice, chatCustomApiSlice, chatFilesApiSlice, chatHistoryApiSlice, chatPrivacyApiSlice, clawApiSlice, coreApiSlice, coreCustomApiSlice, coreFakeCustomPublicImageAssetApiSlice, countByType, courseMetadataApiSlice, coursesApiSlice, credentialsApiSlice, credentialsCustomApiSlice, customAiSearchApiSlice, customDomainApiSlice, datasetsApiSlice, disclaimersApiSlice, edxProctoringApiSlice, edxSsoApiSlice, evalTotalPages, evaluationsApiSlice, extractBoundMentorIds, fakeBaseQueryWithLogging, featureTags, fetchLatestMentorSessionId, fetchLearnerCompletion, fetchUserLlmUsage, filterCourseUserRoles, filterGlobalUserRoles, filterOrgUserRoles, filterSlashSkills, findResumeBlock, findUncoveredSecretHosts, flattenOutline, getNextRecentMessagesPageParam, getSections, getSpendCapExceededError, getUserRoleScope, getVirtualMachineApiError, getVirtualMachineErrorStatus, gradingApiSlice, hostingApiSlice, iblFakeBaseQuery, initializeDataLayer, isBaseAgentMentor, isIpAddressHost, isPoliciesResponse, isPrivacyBlockedError, isRejectedHostname, isRejectedIpAddress, isSpendCapExceededErrorBody, isUserLlmUsageEmpty, isValidHostPort, isVirtualMachineEgressNetworked, latestSessionIdFrom, llmsApiSlice, mcpApiSlice, memoryApiSlice, mentorApiReducer, mentorApiSlice, mentorCategoriesApiSlice, mentorCustomApiSlice, mentorMiddleware, mentorReducer, moderationLogsApiReducer, moderationLogsApiSlice, monetizationApiSlice, normalizeHostPort, normalizeLearnerCompletionError, normalizeOutline, normalizeUserLlmUsageError, notificationsApiSlice, notificationsCustomApiSlice, perLearnerApiSlice, periodicAgentsApiSlice, platformApiReducer, platformApiSlice, platformCustomApiSlice, projectsApiSlice, promptsApiSlice, readMeasure, recommendationPromptTypeEnum, reportsApiSlice, resolveEffectiveAgentSkills, retirementApiSlice, searchApiSlice, sessionApiSlice, skillsApiSlice, skillsMiddleware, skillsReducer, spendCapsApiSlice, splitHostPortInput, stripeApiSlice, studioAuthoringApiSlice, supportTicketsApiSlice, tenantApiReducer, tenantApiSlice, tenantLogoApiSlice, toUserLlmUsageEnvelope, toolsApiSlice, trainingDocumentsApiSlice, unwrapApiTokenList, useActivateWorkflowMutation, useAddEvalDatasetItemsMutation, useAddPinnedMessageMutation, useAddTrainingDocumentMutation, useAddWatchedUserMutation, useAddWatcherMutation, useAgreeToDisclaimerMutation, useAudioToTextMutation, useCancelSubscriptionMutation, useChatWithWorkflowMutation, useCheckAccessQuery, useCheckAccessUnscopedQuery, useCloseSupportTicketMutation, useConnectedServicesCallbackQuery, useCreateAdminProjectMutation, useCreateAgentSkillMutation, useCreateAgentSkillResourceMutation, useCreateApiKeyMutation, useCreateApplicationCourseAssignmentsMutation, useCreateApplicationDraftMutation, useCreateApplicationFormMutation, useCreateApplicationNoteMutation, useCreateApplicationPlacementsMutation, useCreateApplicationWaiverMutation, useCreateCallConfigurationMutation, useCreateCallCredentialsMutation, useCreateCatalogInvitationBulkMutation, useCreateCatalogInvitationCourseBulkMutation, useCreateCatalogInvitationCourseMutation, useCreateCatalogInvitationProgramBulkMutation, useCreateCatalogInvitationProgramMutation, useCreateCatalogPathwayEnrollmentMutation, useCreateCatalogPathwayMutation, useCreateCatalogPathwaySelfEnrollmentMutation, useCreateCatalogProgramMutation, useCreateCatalogProgramSelfEnrollmentMutation, useCreateCatalogRoleMutation, useCreateCheckoutMutation, useCreateClawInstanceMutation, useCreateClawMentorConfigMutation, useCreateCourseEnrollmentMutation, useCreateCredentialAssertionMutation, useCreateCredentialMutation, useCreateCustomDomainMutation, useCreateDisclaimerMutation, useCreateEvalDatasetMutation, useCreateEvalScoreConfigMutation, useCreateEvalScoreMutation, useCreateExternalMappingMutation, useCreateGlobalMemoryMutation, useCreateGraderCriterionMutation, useCreateGuestCheckoutMutation, useCreateHostingProjectDomainMutation, useCreateIntegrationCredentialMutation, useCreateLLMCredentialMutation, useCreateLtiKeyMutation, useCreateLtiMentorMutation, useCreateLtiToolMutation, useCreateMCPServerConnectionMutation, useCreateMCPServerMutation, useCreateMemoryCategoryMutation, useCreateMentorGraderConfigurationMutation, useCreateMentorMemoryMutation, useCreateMentorMutation, useCreateMentorSkillAssignmentMutation, useCreateNotificationPreviewMutation, useCreateOrUpdateUserDesiredSkillMutation, useCreateOrUpdateUserReportedSkillMutation, useCreatePeriodicAgentMutation, useCreatePlatformImageAssetMutation, useCreatePlatformUserGroupMutation, useCreatePriceMutation, useCreatePromptMutation, useCreateProviderConfigMutation, useCreateRbacGroupMutation, useCreateRbacPolicyMutation, useCreateRbacRoleMutation, useCreateRbacTeamsAccessMutation, useCreateRecommendedPromptMutation, useCreateRedirectTokenMutation, useCreateReportMutation, useCreateSessionIdMutation, useCreateShareableLinkMutation, useCreateSharedMemoryMutation, useCreateStripeCheckoutSessionMutation, useCreateStripeCustomerPortalMutation, useCreateStudioCourseMutation, useCreateStudioXblockMutation, useCreateSupportTicketMessageMutation, useCreateTrainingDocumentRetrainScheduleMutation, useCreateUserChatHistoryReportMutation, useCreateUserCompanyMutation, useCreateUserEducationMutation, useCreateUserExperienceMutation, useCreateUserInstitutionMutation, useCreateUserInvitationMutation, useCreateUserProjectMutation, useCreateUserResumeMutation, useCreateVirtualMachineNetworkPolicyMutation, useCreateVirtualMachineSecretMutation, useCreateWatchedGroupMutation, useCreateWorkflowMutation, useDeactivateWorkflowMutation, useDeleteAdminProjectMutation, useDeleteAgentSkillMutation, useDeleteAgentSkillResourceMutation, useDeleteAgentSpendCapMutation, useDeleteApiKeyMutation, useDeleteApplicationAttachmentMutation, useDeleteApplicationBlockMutation, useDeleteApplicationCourseAssignmentMutation, useDeleteApplicationNoteMutation, useDeleteApplicationWaiverMutation, useDeleteClawInstanceMutation, useDeleteClawMentorConfigMutation, useDeleteCourseCredentialMutation, useDeleteCredentialMutation, useDeleteCustomDomainMutation, useDeleteDisclaimerMutation, useDeleteEvalDatasetItemMutation, useDeleteEvalRunMutation, useDeleteEvalScoreMutation, useDeleteExternalMappingMutation, useDeleteGlobalMemoryMutation, useDeleteGraderCriterionMutation, useDeleteHostingDomainMutation, useDeleteHostingProjectDomainMutation, useDeleteIntegrationCredentialMutation, useDeleteLtiKeyMutation, useDeleteLtiMentorMutation, useDeleteLtiToolMutation, useDeleteMCPServerMutation, useDeleteMemoryCategoryMutation, useDeleteMentorMemoryMutation, useDeleteMentorMutation, useDeleteMentorSkillAssignmentMutation, useDeleteMessageMutation, useDeleteModerationLogMutation, useDeletePeriodicAgentMutation, useDeletePlatformConfigurationMutation, useDeletePlatformImageAssetMutation, useDeletePlatformUserGroupMutation, useDeletePriceMutation, useDeletePromptMutation, useDeleteProviderConfigMutation, useDeleteRbacGroupMutation, useDeleteRbacPolicyMutation, useDeleteRbacRoleMutation, useDeleteRecommendedPromptMutation, useDeleteSharedMemoryMutation, useDeleteStudioCourseMutation, useDeleteSupportTicketMessageMutation, useDeleteSupportTicketMutation, useDeleteTenantSpendCapMutation, useDeleteTrainingDocumentMutation, useDeleteUserEducationMutation, useDeleteUserExperienceMutation, useDeleteUserProjectMutation, useDeleteUserSpendCapMutation, useDeleteVirtualMachineNetworkPolicyMutation, useDeleteVirtualMachineSecretMutation, useDeleteWatchedGroupMutation, useDeleteWatcherMutation, useDeleteWorkflowMutation, useDisablePaywallMutation, useDisconnectServiceMutation, useEditMentorAndRefreshListMutation, useEditMentorJsonMutation, useEditMentorMutation, useEditSessionMutation, useEditTrainingDocumentMutation, useEnablePaywallMutation, useEvaluateEvalRunMutation, useExchangeAppleTokenMutation, useExportChatHistoryMutation, useExportEvalRunMutation, useForkMentorMutation, useGetAccessTimeHeatmapQuery, useGetAccessibleUsersQuery, useGetAccountBillingInfoQuery, useGetAdminProjectDetailsQuery, useGetAdminProjectsQuery, useGetAgentConfigQuery, useGetAgentCostQuery, useGetAgentSkillQuery, useGetAgentSkillResourceQuery, useGetAgentSkillResourcesQuery, useGetAgentSkillsQuery, useGetAgentSpendCapQuery, useGetAiSearchMentorsQuery, useGetAllMentorMemoriesQuery, useGetApiKeyFieldPermissionsQuery, useGetApiKeyQuery, useGetApiKeysQuery, useGetAppTokensMutation, useGetApplicationAdminDetailQuery, useGetApplicationBlocksQuery, useGetApplicationCourseAssignmentsQuery, useGetApplicationFormDetailQuery, useGetApplicationFormQuery, useGetApplicationFormsQuery, useGetApplicationNotesQuery, useGetApplicationPlacementsQuery, useGetApplicationStatusQuery, useGetApplicationsPipelineQuery, useGetApplicationsPipelineStatsQuery, useGetArtifactQuery, useGetArtifactVersionQuery, useGetAssignedProgramsQuery, useGetAuditLogsQuery, useGetAverageMessagesPerSessionQuery, useGetAverageRatingQuery, useGetCallConfigurationQuery, useGetCallConfigurationsQuery, useGetCatalogInvitationsCourseQuery, useGetCatalogInvitationsProgramQuery, useGetCatalogSearchQuery, useGetChatHistoryExportStatusQuery, useGetChatHistoryFilterQuery, useGetChatHistoryQuery, useGetChatMessageTtsQuery, useGetChatMessagesForSessionQuery, useGetChatPrivacyEffectiveQuery, useGetClawInstanceQuery, useGetClawInstancesQuery, useGetClawMentorConfigQuery, useGetConnectedServiceAuthUrlQuery, useGetConnectedServicesQuery, useGetContentAnalyticsDetailsQuery, useGetContentAnalyticsQuery, useGetConversationMemoriesQuery, useGetConversationQuery, useGetCourseCompletionOutlinesQuery, useGetCourseCompletionQuery, useGetCourseEligibilityQuery, useGetCourseMetaDataQuery, useGetCourseProgressQuery, useGetCredentialsListQuery, useGetCredentialsQuery, useGetCredentialsSchemaQuery, useGetCreditTransactionsQuery, useGetCustomDomainsQuery, useGetCustomMentorsQuery, useGetDatasetsQuery, useGetDepartmentMemberCheckQuery, useGetDesiredSkillsQuery, useGetDetailedFinancialStatsQuery, useGetDisclaimerAgreementsQuery, useGetDisclaimersQuery, useGetEdxSSOTokenQuery, useGetEnrollmentCourseSearchQuery, useGetEvalDatasetQuery, useGetEvalRunQuery, useGetEvalTaskStatusQuery, useGetExamInfoQuery, useGetExternalMappingQuery, useGetFileUploadUrlMutation, useGetFinancialStatsQuery, useGetFreeUsageCountQuery, useGetGlobalMemoriesQuery, useGetGradeResultQuery, useGetGraderCriterionQuery, useGetGuidedPromptsQuery, useGetHostingProjectDomainsQuery, useGetHostingProjectsQuery, useGetIntegrationCredentialsQuery, useGetIntegrationCredentialsSchemaQuery, useGetIssuersQuery, useGetItemSubscriptionQuery, useGetLLMCredentialsQuery, useGetLearnerCourseOutlineQuery, useGetLearnerDetailsQuery, useGetLlmAccessQuery, useGetLlmUsageMetricsQuery, useGetLlmUsageObservationsQuery, useGetLlmUsageTracesQuery, useGetLlmsQuery, useGetLtiKeyDetailQuery, useGetLtiKeysQuery, useGetLtiMentorDetailQuery, useGetLtiMentorsQuery, useGetLtiToolDetailQuery, useGetLtiToolsQuery, useGetMCPServerConnectionsQuery, useGetMCPServerQuery, useGetMCPServersQuery, useGetMaskedIntegrationCredentialsQuery, useGetMaskedLLMCredentialsQuery, useGetMemoryCategoriesAdminQuery, useGetMemsearchConfigQuery, useGetMemsearchStatusQuery, useGetMentorCategoriesQuery, useGetMentorCategoryGroupsQuery, useGetMentorDetailsQuery, useGetMentorGraderConfigurationQuery, useGetMentorMemoriesListQuery, useGetMentorMemoriesQuery, useGetMentorPublicSettingsQuery, useGetMentorSettingsQuery, useGetMentorSkillAssignmentQuery, useGetMentorSkillAssignmentsInfiniteQuery, useGetMentorSkillAssignmentsQuery, useGetMentorSummariesQuery, useGetMentorsQuery, useGetMfeContextQuery, useGetModelCostsQuery, useGetModerationLogsQuery, useGetMostDiscussedTopicsQuery, useGetMySubscriptionsQuery, useGetNodeTypesQuery, useGetNotificationContextQuery, useGetNotificationsCountQuery, useGetNotificationsQuery, useGetOAuthServicesQuery, useGetOverTimeActivityQuery, useGetOverviewSummaryQuery, useGetPathwayCompletionQuery, useGetPathwayListQuery, useGetPaywallConfigQuery, useGetPerLearnerActivityQuery, useGetPerLearnerInfoQuery, useGetPerUserCostsQuery, useGetPeriodicAgentLogsListQuery, useGetPeriodicAgentLogsQuery, useGetPeriodicAgentQuery, useGetPeriodicAgentsQuery, useGetPersonnalizedMentorsQuery, useGetPersonnalizedSearchQuery, useGetPinnedMessagesQuery, useGetPlatformAuditLogsQuery, useGetPlatformConfigurationsQuery, useGetPlatformImageAssetDetailsQuery, useGetPlatformImageAssetsListQuery, useGetPlatformInfoQuery, useGetPlatformMembershipQuery, useGetPlatformUserGroupDetailsQuery, useGetProgramCompletionQuery, useGetProgramListQuery, useGetPromptCategoriesQuery, useGetPromptsQuery, useGetPromptsSearchQuery, useGetProviderConfigQuery, useGetPublicMentorsQuery, useGetPublicPlatformImageAssetFileUrlQuery, useGetPublicPlatformMembershipQuery, useGetPublicPricingQuery, useGetRbacActionsDefinitionQuery, useGetRbacGroupDetailsQuery, useGetRbacGroupsQuery, useGetRbacMentorAccessListQuery, useGetRbacPermissionsMutation, useGetRbacPoliciesQuery, useGetRbacPolicyDetailsQuery, useGetRbacResourceDiscoveryQuery, useGetRbacResourceListQuery, useGetRbacRoleDetailsQuery, useGetRbacRolesQuery, useGetRbacTeamsAccessListQuery, useGetRecentMessageQuery, useGetRecentMessagesInfiniteQuery, useGetRecentlyAccessedMentorsQuery, useGetRecommendationsAiSearchQuery, useGetRecommendedPromptsListQuery, useGetRegisteredUsersTrendQuery, useGetReportDetailQuery, useGetReportedSkillsQuery, useGetReportsQuery, useGetResourceSearchQuery, useGetRevenueQuery, useGetSearchGlobalQuery, useGetSessionIdQuery, useGetSessionStatsQuery, useGetShareableLinkPublicQuery, useGetShareableLinkQuery, useGetSharedMemoriesQuery, useGetSharedSessionIdQuery, useGetSkillsPointsPercentileQuery, useGetSpendCapStatusQuery, useGetStripeConnectDashboardQuery, useGetStripeConnectStatusQuery, useGetStripeContextQuery, useGetStripePricingPageSessionQuery, useGetStudentMentorCreationStatusQuery, useGetSupportTicketMessageQuery, useGetSupportTicketMessagesQuery, useGetSupportTicketQuery, useGetSupportTicketsQuery, useGetTemplateDetailsQuery, useGetTemplatesQuery, useGetTenantChatPrivacyConfigQuery, useGetTenantCostQuery, useGetTenantMetadataQuery, useGetTenantSpendCapQuery, useGetToolsQuery, useGetTopStudentsByChatMessagesQuery, useGetTopicOverviewQuery, useGetTopicStatisticsQuery, useGetTopicsDetailsStatsQuery, useGetTopicsStatsQuery, useGetTopicsSummaryQuery, useGetTrainingDocumentRetrainScheduleQuery, useGetTrainingDocumentsQuery, useGetTranscriptsConversationHeadlineQuery, useGetTranscriptsMessagesDetailsQuery, useGetTranscriptsMessagesQuery, useGetUserAppsQuery, useGetUserAssignedCoursesQuery, useGetUserAssignedPathwaysQuery, useGetUserCatalogPathwaysQuery, useGetUserChatHistoryFilterQuery, useGetUserChatHistoryQuery, useGetUserChatHistoryReportStatusQuery, useGetUserChatHistoryReportsQuery, useGetUserChatHistorySessionQuery, useGetUserChatPrivacySettingsQuery, useGetUserCohortsOverTimeQuery, useGetUserCompaniesQuery, useGetUserCredentialsQuery, useGetUserDesiredSkillsQuery, useGetUserDetailsStatsQuery, useGetUserEarnedSkillsQuery, useGetUserEducationQuery, useGetUserEnrolledCoursesQuery, useGetUserEnrolledPathwaysQuery, useGetUserEnrolledProgramsQuery, useGetUserExperienceQuery, useGetUserInstitutionsQuery, useGetUserInvitationsQuery, useGetUserLlmUsageMetricsQuery, useGetUserLlmUsageObservationsQuery, useGetUserLlmUsageTracesQuery, useGetUserMemorySettingsQuery, useGetUserMetadataEdxQuery, useGetUserMetadataQuery, useGetUserMetricsPieChartQuery, useGetUserMetricsQuery, useGetUserPlatformMetadataQuery, useGetUserProfileSummaryQuery, useGetUserProjectDetailsQuery, useGetUserProjectsQuery, useGetUserReportedSkillsQuery, useGetUserResumeQuery, useGetUserRolesQuery, useGetUserSkillsPointsQuery, useGetUserSpendCapQuery, useGetUserTenantsQuery, useGetUsersAsAssertionsQuery, useGetUsersStatsQuery, useGetVectorDocumentsQuery, useGetVoiceQuery, useGetVoicesQuery, useGetWatchedGroupQuery, useGetWatchedGroupsQuery, useGetWatchedUsersQuery, useGetWatcherQuery, useGetWatchersQuery, useGetWorkflowQuery, useGetWorkflowsQuery, useHealthCheckClawInstanceMutation, useInviteApplicationCandidateMutation, useInviteUserMutation, useJoinTenantMutation, useLazyCheckAccessQuery, useLazyCheckAccessUnscopedQuery, useLazyConnectedServicesCallbackQuery, useLazyGetAccessibleUsersQuery, useLazyGetAccountBillingInfoQuery, useLazyGetAdminProjectDetailsQuery, useLazyGetAdminProjectsQuery, useLazyGetAgentConfigQuery, useLazyGetAgentSkillResourcesQuery, useLazyGetAgentSkillsQuery, useLazyGetAgentSpendCapQuery, useLazyGetAllMentorMemoriesQuery, useLazyGetApiKeyQuery, useLazyGetApiKeysQuery, useLazyGetApplicationAdminDetailQuery, useLazyGetApplicationAttachmentFileQuery, useLazyGetApplicationFormDetailQuery, useLazyGetApplicationFormQuery, useLazyGetApplicationFormsQuery, useLazyGetApplicationStatusQuery, useLazyGetApplicationsPipelineQuery, useLazyGetArtifactQuery, useLazyGetArtifactVersionQuery, useLazyGetAssignedProgramsQuery, useLazyGetAuditLogsQuery, useLazyGetCallConfigurationQuery, useLazyGetCallConfigurationsQuery, useLazyGetCatalogInvitationsCourseQuery, useLazyGetCatalogInvitationsProgramQuery, useLazyGetCatalogSearchQuery, useLazyGetChatHistoryExportStatusQuery, useLazyGetChatHistoryFilterQuery, useLazyGetChatHistoryQuery, useLazyGetChatMessageTtsQuery, useLazyGetChatMessagesForSessionQuery, useLazyGetChatPrivacyEffectiveQuery, useLazyGetClawInstanceQuery, useLazyGetClawInstancesQuery, useLazyGetClawMentorConfigQuery, useLazyGetConnectedServiceAuthUrlQuery, useLazyGetConnectedServicesQuery, useLazyGetConversationMemoriesQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseCompletionQuery, useLazyGetCourseEligibilityQuery, useLazyGetCourseMetaDataQuery, useLazyGetCourseProgressQuery, useLazyGetCredentialsListQuery, useLazyGetCredentialsQuery, useLazyGetCredentialsSchemaQuery, useLazyGetCustomDomainsQuery, useLazyGetCustomMentorsQuery, useLazyGetDatasetsQuery, useLazyGetDepartmentMemberCheckQuery, useLazyGetDesiredSkillsQuery, useLazyGetDisclaimerAgreementsQuery, useLazyGetDisclaimersQuery, useLazyGetDownloadReportFromURLQuery, useLazyGetEdxSSOTokenQuery, useLazyGetEnrollmentCourseSearchQuery, useLazyGetEvalRunQuery, useLazyGetEvalTaskStatusQuery, useLazyGetExamInfoQuery, useLazyGetExternalMappingQuery, useLazyGetFreeUsageCountQuery, useLazyGetGlobalMemoriesQuery, useLazyGetGradeResultQuery, useLazyGetGraderCriterionQuery, useLazyGetGuidedPromptsQuery, useLazyGetHostingProjectDomainsQuery, useLazyGetHostingProjectsQuery, useLazyGetIntegrationCredentialsQuery, useLazyGetIntegrationCredentialsSchemaQuery, useLazyGetIssuersQuery, useLazyGetItemSubscriptionQuery, useLazyGetLLMCredentialsQuery, useLazyGetLearnerCourseOutlineQuery, useLazyGetLlmsQuery, useLazyGetLtiKeyDetailQuery, useLazyGetMCPServerQuery, useLazyGetMCPServersQuery, useLazyGetMemoryCategoriesAdminQuery, useLazyGetMemsearchConfigQuery, useLazyGetMemsearchStatusQuery, useLazyGetMentorCategoriesQuery, useLazyGetMentorCategoryGroupsQuery, useLazyGetMentorDetailsQuery, useLazyGetMentorGraderConfigurationQuery, useLazyGetMentorMemoriesListQuery, useLazyGetMentorMemoriesQuery, useLazyGetMentorPublicSettingsQuery, useLazyGetMentorSettingsQuery, useLazyGetMentorSkillAssignmentsInfiniteQuery, useLazyGetMentorSkillAssignmentsQuery, useLazyGetMentorSummariesQuery, useLazyGetMentorsQuery, useLazyGetModerationLogsQuery, useLazyGetMySubscriptionsQuery, useLazyGetNodeTypesQuery, useLazyGetNotificationContextQuery, useLazyGetNotificationsCountQuery, useLazyGetNotificationsQuery, useLazyGetOAuthServicesQuery, useLazyGetOverTimeActivityQuery, useLazyGetPathwayCompletionQuery, useLazyGetPathwayListQuery, useLazyGetPaywallConfigQuery, useLazyGetPerLearnerActivityQuery, useLazyGetPerLearnerInfoQuery, useLazyGetPeriodicAgentLogsListQuery, useLazyGetPeriodicAgentLogsQuery, useLazyGetPeriodicAgentQuery, useLazyGetPeriodicAgentsQuery, useLazyGetPersonnalizedMentorsQuery, useLazyGetPersonnalizedSearchQuery, useLazyGetPinnedMessagesQuery, useLazyGetPlatformAuditLogsQuery, useLazyGetPlatformInfoQuery, useLazyGetPlatformMembershipQuery, useLazyGetProgramCompletionQuery, useLazyGetProgramListQuery, useLazyGetPromptCategoriesQuery, useLazyGetPromptsQuery, useLazyGetPromptsSearchQuery, useLazyGetProviderConfigQuery, useLazyGetPublicMentorsQuery, useLazyGetPublicPlatformImageAssetFileUrlQuery, useLazyGetPublicPlatformMembershipQuery, useLazyGetPublicPricingQuery, useLazyGetRbacActionsDefinitionQuery, useLazyGetRbacResourceDiscoveryQuery, useLazyGetRbacResourceListQuery, useLazyGetRbacRolesQuery, useLazyGetRbacTeamsAccessListQuery, useLazyGetRecentMessageQuery, useLazyGetRecentlyAccessedMentorsQuery, useLazyGetRecommendationsAiSearchQuery, useLazyGetRecommendedPromptsListQuery, useLazyGetReportDetailQuery, useLazyGetReportedSkillsQuery, useLazyGetReportsQuery, useLazyGetResourceSearchQuery, useLazyGetRevenueQuery, useLazyGetSearchGlobalQuery, useLazyGetSessionIdQuery, useLazyGetShareableLinkPublicQuery, useLazyGetShareableLinkQuery, useLazyGetSharedMemoriesQuery, useLazyGetSharedSessionIdQuery, useLazyGetSkillsPointsPercentileQuery, useLazyGetSpendCapStatusQuery, useLazyGetStripeConnectDashboardQuery, useLazyGetStripeConnectStatusQuery, useLazyGetStripeContextQuery, useLazyGetStripePricingPageSessionQuery, useLazyGetSupportTicketMessageQuery, useLazyGetSupportTicketMessagesQuery, useLazyGetSupportTicketQuery, useLazyGetSupportTicketsQuery, useLazyGetTemplateDetailsQuery, useLazyGetTemplatesQuery, useLazyGetTenantChatPrivacyConfigQuery, useLazyGetTenantMetadataQuery, useLazyGetTenantSpendCapQuery, useLazyGetToolsQuery, useLazyGetTrainingDocumentRetrainScheduleQuery, useLazyGetTrainingDocumentsQuery, useLazyGetUserAppsQuery, useLazyGetUserAssignedCoursesQuery, useLazyGetUserAssignedPathwaysQuery, useLazyGetUserCatalogPathwaysQuery, useLazyGetUserChatHistoryFilterQuery, useLazyGetUserChatHistoryQuery, useLazyGetUserChatHistoryReportStatusQuery, useLazyGetUserChatHistoryReportsQuery, useLazyGetUserChatHistorySessionQuery, useLazyGetUserChatPrivacySettingsQuery, useLazyGetUserCompaniesQuery, useLazyGetUserCredentialsQuery, useLazyGetUserDesiredSkillsQuery, useLazyGetUserEarnedSkillsQuery, useLazyGetUserEducationQuery, useLazyGetUserEnrolledCoursesQuery, useLazyGetUserEnrolledPathwaysQuery, useLazyGetUserEnrolledProgramsQuery, useLazyGetUserExperienceQuery, useLazyGetUserInstitutionsQuery, useLazyGetUserInvitationsQuery, useLazyGetUserMemorySettingsQuery, useLazyGetUserMetadataEdxQuery, useLazyGetUserMetadataQuery, useLazyGetUserPlatformMetadataQuery, useLazyGetUserProfileSummaryQuery, useLazyGetUserProjectDetailsQuery, useLazyGetUserProjectsQuery, useLazyGetUserReportedSkillsQuery, useLazyGetUserResumeQuery, useLazyGetUserRolesQuery, useLazyGetUserSkillsPointsQuery, useLazyGetUserSpendCapQuery, useLazyGetUserTenantsQuery, useLazyGetUsersAsAssertionsQuery, useLazyGetVectorDocumentsQuery, useLazyGetVoiceQuery, useLazyGetVoicesQuery, useLazyGetWatchedGroupQuery, useLazyGetWatchedGroupsQuery, useLazyGetWatchedUsersQuery, useLazyGetWatchersQuery, useLazyGetWorkflowQuery, useLazyGetWorkflowsQuery, useLazyListAgentSpendCapsQuery, useLazyListAgentUserSpendCapsQuery, useLazyListArtifactVersionsQuery, useLazyListArtifactsQuery, useLazyListEvalDatasetItemsQuery, useLazyListEvalDatasetsQuery, useLazyListEvalJudgesQuery, useLazyListEvalRunJudgesQuery, useLazyListEvalRunsQuery, useLazyListEvalScoresQuery, useLazyListGradeResultsQuery, useLazyListGraderCriteriaQuery, useLazyListItemSubscribersQuery, useLazyListOwnApplicationsQuery, useLazyListPaywallsQuery, useLazyListPricesQuery, useLazyListSubscribersQuery, useLazyListVirtualMachineNetworkPoliciesQuery, useLazyListVirtualMachineSecretsQuery, useLazyPlatformUserGroupsQuery, useLazyPlatformUsersQuery, useLazyRefreshJwtTokenQuery, useLazySeedMentorsQuery, useLazyStarredMentorsQuery, useLazyStartOAuthFlowQuery, useLazyUserPlatformsQuery, useLinkApplicationCandidateMutation, useListAgentSpendCapsQuery, useListAgentUserSpendCapsQuery, useListArtifactVersionsQuery, useListArtifactsQuery, useListEvalDatasetItemsQuery, useListEvalDatasetsQuery, useListEvalJudgesQuery, useListEvalRunJudgesQuery, useListEvalRunsQuery, useListEvalScoreConfigsQuery, useListEvalScoresQuery, useListGradeResultsQuery, useListGraderCriteriaQuery, useListItemSubscribersQuery, useListOwnApplicationsQuery, useListPaywallsQuery, useListPricesQuery, useListSubscribersQuery, useListVirtualMachineNetworkPoliciesQuery, useListVirtualMachineSecretsQuery, useMarkAllAsReadMutation, useOauthFindMutation, useOverrideGradeResultMutation, usePartialUpdateMCPServerMutation, usePartialUpdatePeriodicAgentMutation, usePartialUpdateRbacRoleMutation, usePatchMCPServerConnectionMutation, usePatchSupportTicketMessageMutation, usePatchSupportTicketMutation, usePatchWorkflowMutation, usePlatformInvitationsQuery, usePlatformUserGroupsQuery, usePlatformUsersQuery, usePublishWorkflowMutation, usePushClawConfigMutation, useRefreshVersionClawInstanceMutation, useRemoveProfileImageMutation, useRemoveWatchedUserMutation, useRenewApplicationMutation, useRenewSubscriptionMutation, useResetPasswordMutation, useResetTemplateMutation, useRevokeShareableLinkMutation, useSeedMentorsQuery, useSelfRetireMutation, useSendNotificationMutation, useSendTestTemplateEmailMutation, useSetCurrentVersionMutation, useSetLlmAccessMutation, useSetPlatformConfigurationsMutation, useSetStudentMentorCreationStatusMutation, useSetStudioAdvancedSettingsMutation, useStarMentorMutation, useStarredMentorsQuery, useStartEvalRunMutation, useStartExamMutation, useStartStripeConnectOnboardingMutation, useSubmitApplicationMutation, useSubmitApplicationOverrideMutation, useTestConnectivityClawInstanceMutation, useTimeTrackingMutation, useToggleTemplateMutation, useTransitionApplicationMutation, useTriggerAutoRechargeMutation, useUnPinMessageMutation, useUnpublishWorkflowMutation, useUnstarMentorMutation, useUpdateAdminProjectMutation, useUpdateAgentConfigMutation, useUpdateAgentSkillMutation, useUpdateAgentSkillResourceMutation, useUpdateApiKeyMutation, useUpdateApplicationFormMutation, useUpdateApplicationMutation, useUpdateApplicationNoteMutation, useUpdateApplicationPlacementMutation, useUpdateArtifactMutation, useUpdateAutoRechargeInfoMutation, useUpdateCallConfigurationMutation, useUpdateChatSessionMutation, useUpdateChatSessionSharedMutation, useUpdateClawInstanceMutation, useUpdateClawMentorConfigMutation, useUpdateCredentialMutation, useUpdateDisclaimerMutation, useUpdateEvalDatasetItemMutation, useUpdateExamAttemptMutation, useUpdateGlobalMemoryMutation, useUpdateGraderCriterionMutation, useUpdateHostingDomainMutation, useUpdateIntegrationCredentialMutation, useUpdateLtiKeyMutation, useUpdateLtiMentorMutation, useUpdateLtiToolMutation, useUpdateMCPServerMutation, useUpdateMemoryCategoryMutation, useUpdateMemsearchConfigMutation, useUpdateMentorGraderConfigurationMutation, useUpdateMentorMemoryMutation, useUpdateMentorSkillAssignmentMutation, useUpdateMessageFeedbackMutation, useUpdatePaywallMutation, useUpdatePeriodicAgentMutation, useUpdatePlatformImageAssetMutation, useUpdatePlatformInfoMutation, useUpdatePlatformMembershipMutation, useUpdatePlatformUserGroupMutation, useUpdatePlatformUserRoleWithPoliciesMutation, useUpdatePriceMutation, useUpdatePromptMutation, useUpdateRbacGroupMutation, useUpdateRbacMentorAccessMutation, useUpdateRbacPolicyMutation, useUpdateRbacRoleMutation, useUpdateRecommendedPromptMutation, useUpdateSessionDisableChathistoryMutation, useUpdateShareableLinkMutation, useUpdateSharedMemoryMutation, useUpdateStudioCourseSettingsMutation, useUpdateStudioXblockMutation, useUpdateSupportTicketMessageMutation, useUpdateSupportTicketMutation, useUpdateTemplateMutation, useUpdateTenantChatPrivacyConfigMutation, useUpdateTenantMetadataMutation, useUpdateUserAccountMutation, useUpdateUserChatPrivacySettingsMutation, useUpdateUserEducationMutation, useUpdateUserExperienceMutation, useUpdateUserMemorySettingsMutation, useUpdateUserMetadataEdxMutation, useUpdateUserMetadataMutation, useUpdateUserOnboardingStatusMutation, useUpdateUserPlatformMetadataMutation, useUpdateUserProjectMutation, useUpdateUserRoleMutation, useUpdateUserStatusMutation, useUpdateUserTrialStatusMutation, useUpdateVirtualMachineNetworkPolicyMutation, useUpdateVirtualMachineSecretMutation, useUpdateWatchedGroupMutation, useUpdateWatcherMutation, useUpdateWorkflowMutation, useUploadAgentSkillResourceAssetMutation, useUploadApplicationAttachmentMutation, useUploadCredentialImageMutation, useUploadDarkLogoMutation, useUploadEvalDatasetCsvMutation, useUploadLightLogoMutation, useUploadProfileImageMutation, useUploadStudioCourseAssetMutation, useUploadStudioCourseVideoMutation, useUploadStudioScormPackageMutation, useUpsertAgentSpendCapMutation, useUpsertTenantSpendCapMutation, useUpsertUserSpendCapMutation, useUserLlmCostByModel, useUserLlmCostByService, useUserLlmRecentActivity, useUserLlmSpendOverTime, useUserLlmTraceObservations, useUserLlmUsageMetrics, useUserLlmUsageObservations, useUserLlmUsageSummary, useUserLlmUsageTraces, useUserPlatformsQuery, useUsersGradesPassedQuery, useValidateWorkflowMutation, useWithdrawApplicationMutation, userApiSlice, userChatHistoryApiSlice, userInvitationsApiSlice, userLlmUsageApiSlice, validateHostPort, validateLearnerCompletionArgs, validateUserLlmUsageParams, virtualMachineApiSlice, watchedGroupsApiSlice, workflowsApiSlice };
|