@iblai/data-layer 1.34.0 → 1.35.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 +352 -105
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +352 -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/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);
|
|
@@ -40546,13 +40615,15 @@ const authApiSlice = createApi({
|
|
|
40546
40615
|
const { useGetMfeContextQuery, useExchangeAppleTokenMutation, useGetAppTokensMutation, useLazyRefreshJwtTokenQuery, } = authApiSlice;
|
|
40547
40616
|
|
|
40548
40617
|
const TENANTS_ENDPOINTS = {
|
|
40618
|
+
// The DM view the edX `/api/ibl/users/manage/platform/` endpoint used to
|
|
40619
|
+
// proxy; takes `username=<self>`.
|
|
40549
40620
|
GET_USER_TENANTS: {
|
|
40550
|
-
service: SERVICES.
|
|
40551
|
-
path: () => `/api/
|
|
40621
|
+
service: SERVICES.DM,
|
|
40622
|
+
path: () => `/api/core/users/platforms/`,
|
|
40552
40623
|
},
|
|
40553
40624
|
};
|
|
40554
40625
|
const TENANTS_QUERY_KEYS = {
|
|
40555
|
-
GET_USER_TENANTS: () => [
|
|
40626
|
+
GET_USER_TENANTS: () => ['USER_TENANTS'],
|
|
40556
40627
|
};
|
|
40557
40628
|
|
|
40558
40629
|
const tenantApiSlice = createApi({
|
|
@@ -40568,11 +40639,18 @@ const tenantApiSlice = createApi({
|
|
|
40568
40639
|
...buildEndpointFromDmServiceLegacy(CoreService.coreOrgsMetadataUpdate),
|
|
40569
40640
|
invalidatesTags: ['TenantMetadata'],
|
|
40570
40641
|
}),
|
|
40642
|
+
/** The platforms the signed-in user is linked to. `username` defaults to the stored user. */
|
|
40571
40643
|
getUserTenants: builder.query({
|
|
40572
|
-
queryFn: async () => {
|
|
40644
|
+
queryFn: async (args) => {
|
|
40645
|
+
var _a;
|
|
40573
40646
|
try {
|
|
40574
|
-
const
|
|
40575
|
-
|
|
40647
|
+
const username = (_a = args === null || args === void 0 ? void 0 : args.username) !== null && _a !== void 0 ? _a : (await getStoredUsername());
|
|
40648
|
+
if (!username) {
|
|
40649
|
+
return { error: { status: 'CUSTOM_ERROR', data: 'No username available' } };
|
|
40650
|
+
}
|
|
40651
|
+
const { service, path } = TENANTS_ENDPOINTS.GET_USER_TENANTS;
|
|
40652
|
+
const authHeaders = await getHeaders(service);
|
|
40653
|
+
const response = await fetch(`${getServiceUrl(service)}${path()}?username=${encodeURIComponent(username)}`, {
|
|
40576
40654
|
headers: {
|
|
40577
40655
|
...authHeaders,
|
|
40578
40656
|
},
|
|
@@ -41056,28 +41134,41 @@ const platformApiReducer = platformApiSlice.reducer;
|
|
|
41056
41134
|
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
41135
|
|
|
41058
41136
|
const USERS_ENDPOINTS = {
|
|
41137
|
+
// The merged edX + DM profile, served by DM itself (the same payload the edX
|
|
41138
|
+
// `/api/ibl/users/manage/metadata/` endpoint used to proxy).
|
|
41059
41139
|
GET_USER_METADATA: {
|
|
41060
|
-
service: SERVICES.
|
|
41140
|
+
service: SERVICES.DM,
|
|
41141
|
+
path: () => `/api/core/users/metadata/proxy/`,
|
|
41142
|
+
},
|
|
41143
|
+
// TODO(iblai-platform#2707 B1): the write still goes to the edX plugin. Its
|
|
41144
|
+
// edX half could be a merge-patch on `/api/user/v1/accounts/<self>`, but the
|
|
41145
|
+
// DM-only fields (title, about, public_metadata, tour/onboarding flags) have
|
|
41146
|
+
// no self-write endpoint on DM yet, and splitting the call would drop them.
|
|
41147
|
+
UPDATE_USER_METADATA: {
|
|
41148
|
+
service: SERVICES.LMS_DIRECT,
|
|
41061
41149
|
path: () => `/api/ibl/users/manage/metadata/`,
|
|
41062
41150
|
},
|
|
41063
41151
|
RESET_PASSWORD: {
|
|
41064
41152
|
service: SERVICES.LEGACY_LMS,
|
|
41065
41153
|
path: () => `/ibl/edx/account/api/reset-password-token`,
|
|
41066
41154
|
},
|
|
41155
|
+
// Platform-admin flag on a user's platform link; DM syncs the matching edX
|
|
41156
|
+
// org role itself.
|
|
41067
41157
|
UPDATE_USER_ROLES: {
|
|
41068
|
-
service: SERVICES.
|
|
41158
|
+
service: SERVICES.DM,
|
|
41159
|
+
path: () => `/api/core/users/platforms/`,
|
|
41160
|
+
},
|
|
41161
|
+
/** @deprecated The edX role write behind the legacy `{ username, org, role, active }` shape. */
|
|
41162
|
+
UPDATE_USER_ROLES_EDX: {
|
|
41163
|
+
service: SERVICES.LMS_DIRECT,
|
|
41069
41164
|
path: () => `/api/ibl/users/manage/roles/`,
|
|
41070
41165
|
},
|
|
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.
|
|
41166
|
+
// The caller's course access roles from the edX enrollment API, mapped onto
|
|
41167
|
+
// the keys the plugin listing used (`course-staff`, ...). Org-wide roles live
|
|
41168
|
+
// on the DM side (`/api/core/users/platforms/` → is_admin / is_staff).
|
|
41077
41169
|
GET_USER_ROLES: {
|
|
41078
|
-
service: SERVICES.
|
|
41079
|
-
|
|
41080
|
-
path: () => `/api/ibl/users/manage/roles/`,
|
|
41170
|
+
service: SERVICES.LMS,
|
|
41171
|
+
path: () => `/api/enrollment/v1/roles/`,
|
|
41081
41172
|
},
|
|
41082
41173
|
UPLOAD_PROFILE_IMAGE: {
|
|
41083
41174
|
service: SERVICES.LMS,
|
|
@@ -41111,11 +41202,13 @@ const USERS_ENDPOINTS = {
|
|
|
41111
41202
|
};
|
|
41112
41203
|
const USERS_QUERY_KEYS = {
|
|
41113
41204
|
GET_USER_METADATA: () => ['USER_METADATA'],
|
|
41205
|
+
UPDATE_USER_METADATA: () => ['USER_METADATA'],
|
|
41114
41206
|
GET_USER_PLATFORM_METADATA: () => ['USER_PLATFORM_METADATA'],
|
|
41115
41207
|
GET_USER_METADATA_EDX: () => ['USER_METADATA_EDX'],
|
|
41116
41208
|
GET_USER_PROFILE_SUMMARY: () => ['USER_PROFILE_SUMMARY'],
|
|
41117
41209
|
RESET_PASSWORD: () => ['RESET_PASSWORD'],
|
|
41118
41210
|
UPDATE_USER_ROLES: () => ['UPDATE_USER_ROLES'],
|
|
41211
|
+
UPDATE_USER_ROLES_EDX: () => ['UPDATE_USER_ROLES'],
|
|
41119
41212
|
GET_USER_ROLES: () => ['USER_ROLES'],
|
|
41120
41213
|
UPLOAD_PROFILE_IMAGE: () => ['UPLOAD_PROFILE_IMAGE'],
|
|
41121
41214
|
EDX_UPDATE_USER_METADATA: () => ['EDX_UPDATE_USER_METADATA'],
|
|
@@ -41124,6 +41217,44 @@ const USERS_QUERY_KEYS = {
|
|
|
41124
41217
|
};
|
|
41125
41218
|
const USERS_REDUCER_PATH = 'userApiSlice';
|
|
41126
41219
|
|
|
41220
|
+
/**
|
|
41221
|
+
* Open edX `CourseAccessRole` names → the keys the edX plugin's role listing
|
|
41222
|
+
* used, which the role filters and the apps' staff checks are written against.
|
|
41223
|
+
*/
|
|
41224
|
+
const EDX_ROLE_KEYS = {
|
|
41225
|
+
staff: 'staff',
|
|
41226
|
+
instructor: 'instructor',
|
|
41227
|
+
limited_staff: 'limited-staff',
|
|
41228
|
+
finance_admin: 'finance-admin',
|
|
41229
|
+
sales_admin: 'sales-admin',
|
|
41230
|
+
beta_testers: 'beta-tester',
|
|
41231
|
+
library_user: 'library-user',
|
|
41232
|
+
ccx_coach: 'ccx-coach',
|
|
41233
|
+
data_researcher: 'data-researcher',
|
|
41234
|
+
course_creator_group: 'course-creator',
|
|
41235
|
+
support: 'support-staff',
|
|
41236
|
+
};
|
|
41237
|
+
const roleKey = (edxRole) => { var _a; return (_a = EDX_ROLE_KEYS[edxRole]) !== null && _a !== void 0 ? _a : edxRole.replace(/_/g, '-'); };
|
|
41238
|
+
/**
|
|
41239
|
+
* Maps the edX enrollment roles API (`GET /api/enrollment/v1/roles/`) onto the
|
|
41240
|
+
* `UserRole[]` shape the plugin listing returned: course rows become
|
|
41241
|
+
* `course-<role>`, org rows `org-<role>`, and the global `is_staff` flag a
|
|
41242
|
+
* `staff` row. The edX API only lists `CourseAccessRole` rows, so org-wide
|
|
41243
|
+
* roles granted on the DM side (platform admin / staff) are not included.
|
|
41244
|
+
*/
|
|
41245
|
+
const mapEdxUserRoles = (response) => {
|
|
41246
|
+
var _a;
|
|
41247
|
+
const roles = ((_a = response === null || response === void 0 ? void 0 : response.roles) !== null && _a !== void 0 ? _a : []).map(({ role, org, course_id }) => {
|
|
41248
|
+
const key = roleKey(role);
|
|
41249
|
+
const scoped = course_id ? `course-${key}` : org ? `org-${key}` : key;
|
|
41250
|
+
return { role: scoped, org: org !== null && org !== void 0 ? org : '', course: course_id !== null && course_id !== void 0 ? course_id : '' };
|
|
41251
|
+
});
|
|
41252
|
+
if (response === null || response === void 0 ? void 0 : response.is_staff) {
|
|
41253
|
+
roles.unshift({ role: 'staff', org: '', course: '' });
|
|
41254
|
+
}
|
|
41255
|
+
return roles;
|
|
41256
|
+
};
|
|
41257
|
+
|
|
41127
41258
|
const userApiSlice = createApi({
|
|
41128
41259
|
reducerPath: USERS_REDUCER_PATH,
|
|
41129
41260
|
baseQuery: iblFetchBaseQuery,
|
|
@@ -41146,8 +41277,8 @@ const userApiSlice = createApi({
|
|
|
41146
41277
|
}),
|
|
41147
41278
|
updateUserMetadata: builder.mutation({
|
|
41148
41279
|
query: (args) => ({
|
|
41149
|
-
url: USERS_ENDPOINTS.
|
|
41150
|
-
service: USERS_ENDPOINTS.
|
|
41280
|
+
url: USERS_ENDPOINTS.UPDATE_USER_METADATA.path(),
|
|
41281
|
+
service: USERS_ENDPOINTS.UPDATE_USER_METADATA.service,
|
|
41151
41282
|
body: args,
|
|
41152
41283
|
method: 'POST',
|
|
41153
41284
|
params: { username: args.username },
|
|
@@ -41156,8 +41287,8 @@ const userApiSlice = createApi({
|
|
|
41156
41287
|
}),
|
|
41157
41288
|
updateUserAccount: builder.mutation({
|
|
41158
41289
|
query: (args) => ({
|
|
41159
|
-
url: USERS_ENDPOINTS.
|
|
41160
|
-
service: USERS_ENDPOINTS.
|
|
41290
|
+
url: USERS_ENDPOINTS.UPDATE_USER_METADATA.path(),
|
|
41291
|
+
service: USERS_ENDPOINTS.UPDATE_USER_METADATA.service,
|
|
41161
41292
|
body: args,
|
|
41162
41293
|
method: 'POST',
|
|
41163
41294
|
params: { username: args.username },
|
|
@@ -41186,45 +41317,45 @@ const userApiSlice = createApi({
|
|
|
41186
41317
|
};
|
|
41187
41318
|
},
|
|
41188
41319
|
}),
|
|
41320
|
+
/**
|
|
41321
|
+
* Make a user a platform admin, or demote them. Takes the DM platform-link
|
|
41322
|
+
* shape (`user_id`, `platform_key`, `is_admin`); DM syncs the edX org role.
|
|
41323
|
+
* The legacy `{ username, org, role, active }` shape still writes the edX
|
|
41324
|
+
* role directly and is deprecated.
|
|
41325
|
+
*/
|
|
41189
41326
|
updateUserRole: builder.mutation({
|
|
41190
|
-
query: (args) =>
|
|
41191
|
-
|
|
41192
|
-
|
|
41193
|
-
|
|
41194
|
-
|
|
41195
|
-
|
|
41327
|
+
query: (args) => 'user_id' in args
|
|
41328
|
+
? {
|
|
41329
|
+
url: USERS_ENDPOINTS.UPDATE_USER_ROLES.path(),
|
|
41330
|
+
service: USERS_ENDPOINTS.UPDATE_USER_ROLES.service,
|
|
41331
|
+
body: {
|
|
41332
|
+
user_id: args.user_id,
|
|
41333
|
+
platform_key: args.platform_key,
|
|
41334
|
+
is_admin: args.is_admin,
|
|
41335
|
+
},
|
|
41336
|
+
method: 'POST',
|
|
41337
|
+
}
|
|
41338
|
+
: {
|
|
41339
|
+
url: USERS_ENDPOINTS.UPDATE_USER_ROLES_EDX.path(),
|
|
41340
|
+
service: USERS_ENDPOINTS.UPDATE_USER_ROLES_EDX.service,
|
|
41341
|
+
body: args,
|
|
41342
|
+
method: 'POST',
|
|
41343
|
+
},
|
|
41196
41344
|
invalidatesTags: [featureTags.PLATFORM_USERS, ...USERS_QUERY_KEYS.GET_USER_ROLES()],
|
|
41197
41345
|
}),
|
|
41198
41346
|
/**
|
|
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.
|
|
41347
|
+
* The signed-in user's course access roles (`course-staff`,
|
|
41348
|
+
* `course-instructor`, ...) plus a global `staff` row when they are edX
|
|
41349
|
+
* staff, from the edX enrollment roles API through DM's proxy. A user with
|
|
41350
|
+
* no roles returns `[]`. Org-wide roles are not listed here: DM holds them
|
|
41351
|
+
* on the user's platform link.
|
|
41208
41352
|
*/
|
|
41209
41353
|
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
|
-
},
|
|
41354
|
+
query: () => ({
|
|
41355
|
+
url: USERS_ENDPOINTS.GET_USER_ROLES.path(),
|
|
41356
|
+
service: USERS_ENDPOINTS.GET_USER_ROLES.service,
|
|
41357
|
+
}),
|
|
41358
|
+
transformResponse: mapEdxUserRoles,
|
|
41228
41359
|
providesTags: USERS_QUERY_KEYS.GET_USER_ROLES(),
|
|
41229
41360
|
}),
|
|
41230
41361
|
getUserMetadataEdx: builder.query({
|
|
@@ -44156,30 +44287,61 @@ const coursesApiSlice = createApi({
|
|
|
44156
44287
|
});
|
|
44157
44288
|
const { useGetUserEnrolledCoursesQuery, useLazyGetUserEnrolledCoursesQuery, useGetUserAssignedCoursesQuery, useLazyGetUserAssignedCoursesQuery, useGetLearnerCourseOutlineQuery, useLazyGetLearnerCourseOutlineQuery, } = coursesApiSlice;
|
|
44158
44289
|
|
|
44290
|
+
/** One request through the base query, unwrapped to its payload. */
|
|
44291
|
+
const fetchData = async (args, api, extraOptions) => {
|
|
44292
|
+
const result = await iblFetchBaseQuery(args, api, extraOptions);
|
|
44293
|
+
if (result.error) {
|
|
44294
|
+
throw result.error;
|
|
44295
|
+
}
|
|
44296
|
+
return result.data;
|
|
44297
|
+
};
|
|
44298
|
+
/**
|
|
44299
|
+
* DM's catalog user endpoints take `username=<self>` where the edX plugin
|
|
44300
|
+
* inferred the caller from the JWT; a caller that passes none gets the stored
|
|
44301
|
+
* user.
|
|
44302
|
+
*/
|
|
44303
|
+
const fetchForUser = async (path, params, username, api, extraOptions) => {
|
|
44304
|
+
const user = username !== null && username !== void 0 ? username : (await getStoredUsername());
|
|
44305
|
+
if (!user) {
|
|
44306
|
+
return { error: { status: 400, data: 'No username available' } };
|
|
44307
|
+
}
|
|
44308
|
+
const search = new URLSearchParams({ username: user, ...params });
|
|
44309
|
+
const data = await fetchData({ url: `${path}?${search.toString()}`, service: SERVICES.DM, method: 'GET' }, api, extraOptions);
|
|
44310
|
+
return { data };
|
|
44311
|
+
};
|
|
44159
44312
|
const courseMetadataApiSlice = createApi({
|
|
44160
44313
|
reducerPath: 'courseMetadataApiSlice',
|
|
44161
44314
|
baseQuery: iblFetchBaseQuery,
|
|
44162
44315
|
endpoints: (builder) => ({
|
|
44316
|
+
/**
|
|
44317
|
+
* The edX plugin's `course_metadata` payload, served by DM (to signed-in
|
|
44318
|
+
* and anonymous callers alike).
|
|
44319
|
+
*/
|
|
44163
44320
|
getCourseMetaData: builder.query({
|
|
44164
44321
|
query: ({ courseKey }) => ({
|
|
44165
|
-
url: `/
|
|
44166
|
-
service: SERVICES.
|
|
44322
|
+
url: `/v1/courses/metadata?course_id=${encodeURIComponent(courseKey)}`,
|
|
44323
|
+
service: SERVICES.DM,
|
|
44167
44324
|
method: 'GET',
|
|
44168
44325
|
}),
|
|
44326
|
+
// DM leaves the price null where the plugin said "Free".
|
|
44327
|
+
transformResponse: (course) => {
|
|
44328
|
+
var _a;
|
|
44329
|
+
return ({
|
|
44330
|
+
...course,
|
|
44331
|
+
course_price: (_a = course.course_price) !== null && _a !== void 0 ? _a : 'Free',
|
|
44332
|
+
});
|
|
44333
|
+
},
|
|
44169
44334
|
}),
|
|
44335
|
+
/**
|
|
44336
|
+
* The completion outline, from DM. DM answers 404 for a course the user is
|
|
44337
|
+
* not enrolled in, where the edX plugin returned an empty outline.
|
|
44338
|
+
*/
|
|
44170
44339
|
getCourseCompletionOutlines: builder.query({
|
|
44171
|
-
|
|
44172
|
-
url: `/api/ibl/completion/course_outline/${courseKey}?course_id=${encodeURIComponent(courseKey)}`,
|
|
44173
|
-
service: SERVICES.LMS,
|
|
44174
|
-
method: 'GET',
|
|
44175
|
-
}),
|
|
44340
|
+
queryFn: ({ courseKey, username }, api, extraOptions) => fetchForUser('/api/catalog/enrollment/courses/completion/', { course_id: courseKey, endpoint: 'outline' }, username, api, extraOptions),
|
|
44176
44341
|
}),
|
|
44342
|
+
/** Enrollment eligibility, from DM. Same fields as the edX plugin plus `is_eligible`. */
|
|
44177
44343
|
getCourseEligibility: builder.query({
|
|
44178
|
-
|
|
44179
|
-
url: `/api/ibl/enrollment/enroll_status?course_id=${encodeURIComponent(courseKey)}`,
|
|
44180
|
-
service: SERVICES.LMS,
|
|
44181
|
-
method: 'GET',
|
|
44182
|
-
}),
|
|
44344
|
+
queryFn: ({ courseKey, username }, api, extraOptions) => fetchForUser('/api/catalog/eligibility/courses/check/', { course_id: courseKey }, username, api, extraOptions),
|
|
44183
44345
|
}),
|
|
44184
44346
|
createCourseEnrollment: builder.mutation({
|
|
44185
44347
|
query: (body) => ({
|
|
@@ -44222,38 +44384,54 @@ const edxSsoApiSlice = createApi({
|
|
|
44222
44384
|
});
|
|
44223
44385
|
const { useGetEdxSSOTokenQuery, useLazyGetEdxSSOTokenQuery } = edxSsoApiSlice;
|
|
44224
44386
|
|
|
44387
|
+
// Endpoints DM's edX proxy admits use `SERVICES.STUDIO` (proxied when
|
|
44388
|
+
// `Config.edxProxyEnabled`). The rest are pinned to the Studio host: the
|
|
44389
|
+
// `api/ibl` manage endpoints the proxy refuses, and the session + CSRF views.
|
|
44225
44390
|
const STUDIO_AUTHORING_ENDPOINTS = {
|
|
44391
|
+
// Course-creator app endpoint, not under `api/ibl` so the proxy reaches it.
|
|
44392
|
+
// Takes `{ org, display_name, number, run }`, answers `{ course_parent_locator }`.
|
|
44226
44393
|
CREATE_COURSE: {
|
|
44227
|
-
path: (
|
|
44394
|
+
path: () => '/api/v1/ibl/course/create',
|
|
44228
44395
|
service: SERVICES.STUDIO,
|
|
44229
44396
|
},
|
|
44397
|
+
// Libraries still go through the plugin's manage endpoint.
|
|
44398
|
+
CREATE_LIBRARY: {
|
|
44399
|
+
path: (contentType) => `/api/ibl/manage/${contentType}/`,
|
|
44400
|
+
service: SERVICES.STUDIO_DIRECT,
|
|
44401
|
+
},
|
|
44402
|
+
// TODO(iblai-platform#2707 B5): no DM or proxy replacement for course delete.
|
|
44230
44403
|
DELETE_COURSE: {
|
|
44231
44404
|
path: () => '/api/ibl/manage/course/delete',
|
|
44232
|
-
service: SERVICES.
|
|
44405
|
+
service: SERVICES.STUDIO_DIRECT,
|
|
44233
44406
|
},
|
|
44407
|
+
// TODO(iblai-platform#2707 row 13 / B6): the edX half could become a
|
|
44408
|
+
// `contentstore/v1/course_details` PUT through the proxy, but the DM catalog
|
|
44409
|
+
// half (`/api/catalog/metadata/course/`) is DM-admin only, so the combined
|
|
44410
|
+
// plugin endpoint stays until platform admins can write catalog metadata.
|
|
44234
44411
|
COURSE_SETTINGS: {
|
|
44235
44412
|
path: (contentType) => `/api/ibl/v1/${contentType}_settings/`,
|
|
44236
|
-
service: SERVICES.
|
|
44413
|
+
service: SERVICES.STUDIO_DIRECT,
|
|
44237
44414
|
},
|
|
44415
|
+
// Session + CSRF views, not JWT-capable: stay on the Studio host.
|
|
44238
44416
|
CREATE_XBLOCK: {
|
|
44239
44417
|
path: () => '/xblock/',
|
|
44240
|
-
service: SERVICES.
|
|
44418
|
+
service: SERVICES.STUDIO_DIRECT,
|
|
44241
44419
|
},
|
|
44242
44420
|
UPDATE_XBLOCK: {
|
|
44243
44421
|
path: (locator) => `/xblock/${locator}`,
|
|
44244
|
-
service: SERVICES.
|
|
44422
|
+
service: SERVICES.STUDIO_DIRECT,
|
|
44245
44423
|
},
|
|
44246
44424
|
SCORM_SUBMIT: {
|
|
44247
44425
|
path: (locator) => `/xblock/${locator}/handler/studio_submit`,
|
|
44248
|
-
service: SERVICES.
|
|
44426
|
+
service: SERVICES.STUDIO_DIRECT,
|
|
44249
44427
|
},
|
|
44250
44428
|
UPLOAD_ASSET: {
|
|
44251
44429
|
path: (courseKey) => `/assets/${courseKey}/`,
|
|
44252
|
-
service: SERVICES.
|
|
44430
|
+
service: SERVICES.STUDIO_DIRECT,
|
|
44253
44431
|
},
|
|
44254
44432
|
ADVANCED_SETTINGS: {
|
|
44255
44433
|
path: (courseKey) => `/settings/advanced/${courseKey}`,
|
|
44256
|
-
service: SERVICES.
|
|
44434
|
+
service: SERVICES.STUDIO_DIRECT,
|
|
44257
44435
|
},
|
|
44258
44436
|
VIDEO_UPLOAD: {
|
|
44259
44437
|
path: (courseKey) => `/api/v1/ibl/course/${courseKey}/s3-upload`,
|
|
@@ -44261,23 +44439,88 @@ const STUDIO_AUTHORING_ENDPOINTS = {
|
|
|
44261
44439
|
},
|
|
44262
44440
|
};
|
|
44263
44441
|
|
|
44442
|
+
const RUN_SUFFIX_ALPHABET = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
|
|
44264
44443
|
/**
|
|
44265
|
-
*
|
|
44266
|
-
*
|
|
44267
|
-
|
|
44444
|
+
* A course number derived from the display name: letters, digits and single
|
|
44445
|
+
* hyphens, at most 30 characters, `COURSE` when nothing usable is left.
|
|
44446
|
+
*/
|
|
44447
|
+
const courseNumberFromDisplayName = (displayName) => {
|
|
44448
|
+
const number = displayName
|
|
44449
|
+
.trim()
|
|
44450
|
+
.replace(/[^A-Za-z0-9]+/g, '-')
|
|
44451
|
+
.replace(/^-+|-+$/g, '')
|
|
44452
|
+
.slice(0, 30)
|
|
44453
|
+
.replace(/-+$/, '');
|
|
44454
|
+
return number || 'COURSE';
|
|
44455
|
+
};
|
|
44456
|
+
/** A run like `2026_a1B`: the year plus a short random suffix, as Studio's own generator makes them. */
|
|
44457
|
+
const generateCourseRun = (now = new Date()) => {
|
|
44458
|
+
let suffix = '';
|
|
44459
|
+
for (let index = 0; index < 3; index += 1) {
|
|
44460
|
+
suffix += RUN_SUFFIX_ALPHABET[Math.floor(Math.random() * RUN_SUFFIX_ALPHABET.length)];
|
|
44461
|
+
}
|
|
44462
|
+
return `${now.getFullYear()}_${suffix}`;
|
|
44463
|
+
};
|
|
44464
|
+
/**
|
|
44465
|
+
* The course-creator endpoint needs `number` and `run`, which the old plugin
|
|
44466
|
+
* endpoint generated itself; fill them in when the caller only gave `org` and
|
|
44467
|
+
* `display_name`.
|
|
44468
|
+
*/
|
|
44469
|
+
const withCourseNumberAndRun = (courseData) => {
|
|
44470
|
+
var _a, _b;
|
|
44471
|
+
return ({
|
|
44472
|
+
...courseData,
|
|
44473
|
+
number: (_a = courseData.number) !== null && _a !== void 0 ? _a : courseNumberFromDisplayName(courseData.display_name),
|
|
44474
|
+
run: (_b = courseData.run) !== null && _b !== void 0 ? _b : generateCourseRun(),
|
|
44475
|
+
});
|
|
44476
|
+
};
|
|
44477
|
+
/** `block-v1:ORG+NUM+RUN+type@course+block@course` → `course-v1:ORG+NUM+RUN`. */
|
|
44478
|
+
const courseKeyFromLocator = (locator) => {
|
|
44479
|
+
const match = /^block-v1:(.+)\+type@course\+block@course$/.exec(locator);
|
|
44480
|
+
return match ? `course-v1:${match[1]}` : undefined;
|
|
44481
|
+
};
|
|
44482
|
+
|
|
44483
|
+
/**
|
|
44484
|
+
* Studio (Open edX CMS) course-authoring endpoints. Course creation and video
|
|
44485
|
+
* upload reach Studio through DM's edX proxy when `Config.edxProxyEnabled`;
|
|
44486
|
+
* the rest hit the Studio host (`Config.studioUrl`) with cookie-session auth +
|
|
44487
|
+
* CSRF token, mirroring how Studio's own frontend talks to it.
|
|
44268
44488
|
*/
|
|
44269
44489
|
const studioAuthoringApiSlice = createApi({
|
|
44270
44490
|
reducerPath: 'studioAuthoringApiSlice',
|
|
44271
44491
|
baseQuery: iblFetchBaseQuery,
|
|
44272
44492
|
endpoints: (builder) => ({
|
|
44273
|
-
/**
|
|
44493
|
+
/**
|
|
44494
|
+
* Create the course (or library) shell. Returns `course_key`.
|
|
44495
|
+
*
|
|
44496
|
+
* A course goes to the course-creator endpoint, which needs `number` and
|
|
44497
|
+
* `run` (generated from the display name when absent) and answers with the
|
|
44498
|
+
* root block locator; `course_key` is derived from it. A library still uses
|
|
44499
|
+
* the plugin's manage endpoint on the Studio host.
|
|
44500
|
+
*/
|
|
44274
44501
|
createStudioCourse: builder.mutation({
|
|
44275
|
-
query: ({ courseData, contentType = 'course' }) =>
|
|
44276
|
-
|
|
44277
|
-
|
|
44278
|
-
|
|
44279
|
-
|
|
44280
|
-
|
|
44502
|
+
query: ({ courseData, contentType = 'course' }) => contentType === 'course'
|
|
44503
|
+
? {
|
|
44504
|
+
url: STUDIO_AUTHORING_ENDPOINTS.CREATE_COURSE.path(),
|
|
44505
|
+
service: STUDIO_AUTHORING_ENDPOINTS.CREATE_COURSE.service,
|
|
44506
|
+
method: 'POST',
|
|
44507
|
+
body: withCourseNumberAndRun(courseData),
|
|
44508
|
+
}
|
|
44509
|
+
: {
|
|
44510
|
+
url: STUDIO_AUTHORING_ENDPOINTS.CREATE_LIBRARY.path(contentType),
|
|
44511
|
+
service: STUDIO_AUTHORING_ENDPOINTS.CREATE_LIBRARY.service,
|
|
44512
|
+
method: 'POST',
|
|
44513
|
+
body: courseData,
|
|
44514
|
+
},
|
|
44515
|
+
transformResponse: (response) => {
|
|
44516
|
+
var _a;
|
|
44517
|
+
return ({
|
|
44518
|
+
...response,
|
|
44519
|
+
course_key: (_a = response.course_key) !== null && _a !== void 0 ? _a : (typeof response.course_parent_locator === 'string'
|
|
44520
|
+
? courseKeyFromLocator(response.course_parent_locator)
|
|
44521
|
+
: undefined),
|
|
44522
|
+
});
|
|
44523
|
+
},
|
|
44281
44524
|
}),
|
|
44282
44525
|
/** Delete a course — used as rollback when a later creation step fails. */
|
|
44283
44526
|
deleteStudioCourse: builder.mutation({
|
|
@@ -47166,9 +47409,11 @@ const edxProctoringApiSlice = createApi({
|
|
|
47166
47409
|
const { useGetExamInfoQuery, useLazyGetExamInfoQuery, useUpdateExamAttemptMutation, useStartExamMutation, } = edxProctoringApiSlice;
|
|
47167
47410
|
|
|
47168
47411
|
const RETIREMENT_ENDPOINTS = {
|
|
47412
|
+
// Retires the caller (no body). Answers 202: the retirement then runs
|
|
47413
|
+
// asynchronously on DM and edX.
|
|
47169
47414
|
SELF_RETIRE: {
|
|
47170
|
-
service: SERVICES.
|
|
47171
|
-
path: () => `/api/
|
|
47415
|
+
service: SERVICES.DM,
|
|
47416
|
+
path: () => `/api/core/users/delete/`,
|
|
47172
47417
|
},
|
|
47173
47418
|
};
|
|
47174
47419
|
|
|
@@ -49948,7 +50193,8 @@ const skillsMiddleware = [
|
|
|
49948
50193
|
userLlmUsageApiSlice.middleware,
|
|
49949
50194
|
];
|
|
49950
50195
|
|
|
49951
|
-
const initializeDataLayer = (dmUrl, lmsUrl, legacyLmsUrl, storageService, httpErrorHandler = {}, studioUrl, refreshAuthToken) => {
|
|
50196
|
+
const initializeDataLayer = (dmUrl, lmsUrl, legacyLmsUrl, storageService, httpErrorHandler = {}, studioUrl, refreshAuthToken, options) => {
|
|
50197
|
+
var _a;
|
|
49952
50198
|
IblDataLayer.storage = storageService;
|
|
49953
50199
|
Config.dmUrl = dmUrl;
|
|
49954
50200
|
Config.lmsUrl = lmsUrl;
|
|
@@ -49958,6 +50204,7 @@ const initializeDataLayer = (dmUrl, lmsUrl, legacyLmsUrl, storageService, httpEr
|
|
|
49958
50204
|
Config.studioUrl = studioUrl;
|
|
49959
50205
|
}
|
|
49960
50206
|
Config.refreshAuthToken = refreshAuthToken;
|
|
50207
|
+
Config.edxProxyEnabled = (_a = options === null || options === void 0 ? void 0 : options.edxProxy) !== null && _a !== void 0 ? _a : false;
|
|
49961
50208
|
};
|
|
49962
50209
|
|
|
49963
50210
|
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 };
|