@iblai/data-layer 1.19.1 → 1.21.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.js CHANGED
@@ -39082,13 +39082,13 @@ const SPEND_CAPS_REDUCER_PATH = 'spendCapsApiSlice';
39082
39082
  * provider rate limit, which also uses status 429.
39083
39083
  */
39084
39084
  const SPEND_CAP_EXCEEDED_ERROR_CODE = 'spend_cap_exceeded';
39085
- const encodePathSegment$1 = (value) => encodeURIComponent(value);
39086
- const tenantSpendCapPath = (org) => `/api/ai-mentor/orgs/${encodePathSegment$1(org)}/spend-caps/tenant/`;
39087
- const agentSpendCapPath = (org, mentorId) => `/api/ai-mentor/orgs/${encodePathSegment$1(org)}/agents/${encodePathSegment$1(mentorId)}/spend-cap/`;
39088
- const agentUserSpendCapsPath = (org, mentorId) => `/api/ai-mentor/orgs/${encodePathSegment$1(org)}/agents/${encodePathSegment$1(mentorId)}/spend-caps/users/`;
39089
- const userSpendCapPath = (org, mentorId, username) => `${agentUserSpendCapsPath(org, mentorId)}${encodePathSegment$1(username)}/`;
39090
- const spendCapStatusPath = (org, userId) => `/api/ai-mentor/orgs/${encodePathSegment$1(org)}/spend-caps/status/${encodePathSegment$1(userId)}/`;
39091
- const agentSpendCapsListPath = (org) => `/api/ai-mentor/orgs/${encodePathSegment$1(org)}/spend-caps/agents/`;
39085
+ const encodePathSegment$2 = (value) => encodeURIComponent(value);
39086
+ const tenantSpendCapPath = (org) => `/api/ai-mentor/orgs/${encodePathSegment$2(org)}/spend-caps/tenant/`;
39087
+ const agentSpendCapPath = (org, mentorId) => `/api/ai-mentor/orgs/${encodePathSegment$2(org)}/agents/${encodePathSegment$2(mentorId)}/spend-cap/`;
39088
+ const agentUserSpendCapsPath = (org, mentorId) => `/api/ai-mentor/orgs/${encodePathSegment$2(org)}/agents/${encodePathSegment$2(mentorId)}/spend-caps/users/`;
39089
+ const userSpendCapPath = (org, mentorId, username) => `${agentUserSpendCapsPath(org, mentorId)}${encodePathSegment$2(username)}/`;
39090
+ const spendCapStatusPath = (org, userId) => `/api/ai-mentor/orgs/${encodePathSegment$2(org)}/spend-caps/status/${encodePathSegment$2(userId)}/`;
39091
+ const agentSpendCapsListPath = (org) => `/api/ai-mentor/orgs/${encodePathSegment$2(org)}/spend-caps/agents/`;
39092
39092
  const SPEND_CAPS_ENDPOINTS = {
39093
39093
  GET_TENANT_SPEND_CAP: {
39094
39094
  service: exports.SERVICES.DM,
@@ -43735,6 +43735,187 @@ const perLearnerApiSlice = react.createApi({
43735
43735
  });
43736
43736
  const { useGetPerLearnerActivityQuery, useLazyGetPerLearnerActivityQuery, useGetPerLearnerInfoQuery, useLazyGetPerLearnerInfoQuery, useGetOverTimeActivityQuery, useLazyGetOverTimeActivityQuery, } = perLearnerApiSlice;
43737
43737
 
43738
+ const LEARNER_COMPLETION_PATH = '/api/catalog/enrollment/courses/completion/';
43739
+ const LEARNER_IDENTIFIER_KEYS = ['username', 'user_id', 'email'];
43740
+ const isPresent = (value) => value !== undefined && value !== null && String(value).trim() !== '';
43741
+ /**
43742
+ * Checks the args carry exactly one learner identifier plus `course_id` and
43743
+ * `platform_key`. Returns a reason string when they don't.
43744
+ */
43745
+ function validateLearnerCompletionArgs(args) {
43746
+ const identifiers = LEARNER_IDENTIFIER_KEYS.filter((key) => isPresent(args[key]));
43747
+ if (identifiers.length !== 1) {
43748
+ return 'Exactly one of username, user_id or email is required.';
43749
+ }
43750
+ if (!isPresent(args.course_id))
43751
+ return 'course_id is required.';
43752
+ if (!isPresent(args.platform_key))
43753
+ return 'platform_key is required.';
43754
+ return null;
43755
+ }
43756
+ /**
43757
+ * Builds the completion URL for one `endpoint` selector. Only the learner
43758
+ * identifier, `course_id` and `platform_key` are sent; the DM forwards
43759
+ * nothing else to edX.
43760
+ */
43761
+ function buildLearnerCompletionUrl(args, endpoint) {
43762
+ const params = new URLSearchParams();
43763
+ const record = args;
43764
+ for (const key of [...LEARNER_IDENTIFIER_KEYS, 'platform_key', 'course_id']) {
43765
+ if (isPresent(record[key]))
43766
+ params.set(key, String(record[key]));
43767
+ }
43768
+ params.set('endpoint', endpoint);
43769
+ return `${LEARNER_COMPLETION_PATH}?${params.toString()}`;
43770
+ }
43771
+ // 404 means "course not on tenant / learner not enrolled"; retrying won't
43772
+ // change that, and the outline call is heavy. 5xx keeps the default retries.
43773
+ const LEARNER_COMPLETION_MAX_RETRIES = 3;
43774
+ const learnerCompletionExtraOptions = {
43775
+ retryCondition: (error, _args, { attempt }) => attempt <= LEARNER_COMPLETION_MAX_RETRIES && (error === null || error === void 0 ? void 0 : error.status) !== 404,
43776
+ };
43777
+ /**
43778
+ * One completion request through `iblFetchBaseQuery` (DM token, token
43779
+ * refresh, registered error handlers). `iblFetchBaseQuery` throws on HTTP
43780
+ * errors, which RTK would turn into a SerializedError without the status;
43781
+ * catching here keeps `{ status, data }` so the UI can tell 403/404/502 apart.
43782
+ */
43783
+ async function fetchLearnerCompletion(args, endpoint, api, extraOptions = {}) {
43784
+ const invalid = validateLearnerCompletionArgs(args);
43785
+ if (invalid) {
43786
+ return {
43787
+ error: {
43788
+ status: 'CUSTOM_ERROR',
43789
+ error: invalid,
43790
+ data: { kind: 'invalid_request', error: invalid },
43791
+ },
43792
+ };
43793
+ }
43794
+ try {
43795
+ const result = await iblFetchBaseQuery({
43796
+ url: buildLearnerCompletionUrl(args, endpoint),
43797
+ service: exports.SERVICES.DM,
43798
+ method: 'GET',
43799
+ }, api, { ...learnerCompletionExtraOptions, ...extraOptions });
43800
+ if ('error' in result && result.error) {
43801
+ return { error: result.error };
43802
+ }
43803
+ return { data: result.data };
43804
+ }
43805
+ catch (error) {
43806
+ return { error: error };
43807
+ }
43808
+ }
43809
+ const completionError = (kind, status) => ({ kind, status, retryable: kind === 'unavailable' });
43810
+ /**
43811
+ * Maps a failed completion query onto the states the UI shows. 403 and 404
43812
+ * are deliberately coarse on the backend (one body for every hidden case),
43813
+ * so don't try to read more into them.
43814
+ */
43815
+ function normalizeLearnerCompletionError(error) {
43816
+ if (error === undefined || error === null)
43817
+ return null;
43818
+ if (typeof error !== 'object')
43819
+ return completionError('unknown');
43820
+ const { status, data } = error;
43821
+ if (status === 'CUSTOM_ERROR') {
43822
+ const kind = data === null || data === void 0 ? void 0 : data.kind;
43823
+ return completionError(kind === 'invalid_request' ? 'invalid_request' : 'unknown', status);
43824
+ }
43825
+ if (status === 'FETCH_ERROR' || status === 'TIMEOUT_ERROR') {
43826
+ return completionError('unavailable', status);
43827
+ }
43828
+ if (typeof status === 'number') {
43829
+ if (status === 400)
43830
+ return completionError('invalid_request', status);
43831
+ if (status === 401)
43832
+ return completionError('unauthorized', status);
43833
+ if (status === 403)
43834
+ return completionError('forbidden', status);
43835
+ if (status === 404)
43836
+ return completionError('not_enrolled', status);
43837
+ if (status === 502 || status === 503 || status === 504) {
43838
+ return completionError('unavailable', status);
43839
+ }
43840
+ return completionError('unknown', status);
43841
+ }
43842
+ return completionError('unknown');
43843
+ }
43844
+ /* ------------------------------------------------------------------------ */
43845
+ /* Outline helpers */
43846
+ /* ------------------------------------------------------------------------ */
43847
+ /** Fills the fields edX omits: `children ?? []`, `complete`/`resume_block ?? false`. */
43848
+ function normalizeOutline(block) {
43849
+ var _a, _b, _c;
43850
+ return {
43851
+ ...block,
43852
+ children: ((_a = block.children) !== null && _a !== void 0 ? _a : []).map(normalizeOutline),
43853
+ complete: (_b = block.complete) !== null && _b !== void 0 ? _b : false,
43854
+ resume_block: (_c = block.resume_block) !== null && _c !== void 0 ? _c : false,
43855
+ };
43856
+ }
43857
+ /** Depth-first, course order. The root has depth 0 and `parentId` null. */
43858
+ function flattenOutline(root) {
43859
+ const entries = [];
43860
+ const visit = (block, depth, parentId, parentPath) => {
43861
+ var _a;
43862
+ const path = [...parentPath, block.display_name];
43863
+ entries.push({ block, depth, parentId, path });
43864
+ for (const child of (_a = block.children) !== null && _a !== void 0 ? _a : [])
43865
+ visit(child, depth + 1, block.id, path);
43866
+ };
43867
+ visit(root, 0, null, []);
43868
+ return entries;
43869
+ }
43870
+ /**
43871
+ * Follows `resume_block: true` from the root to the deepest marked node (the
43872
+ * last-visited leaf). Returns null when the learner hasn't visited anything.
43873
+ */
43874
+ function findResumeBlock(root) {
43875
+ var _a, _b;
43876
+ // The root may or may not carry the flag itself; either way descend from it.
43877
+ let current = root.resume_block ? root : null;
43878
+ let candidates = (_a = root.children) !== null && _a !== void 0 ? _a : [];
43879
+ for (;;) {
43880
+ const next = candidates.find((block) => block.resume_block);
43881
+ if (!next)
43882
+ return current;
43883
+ current = next;
43884
+ candidates = (_b = next.children) !== null && _b !== void 0 ? _b : [];
43885
+ }
43886
+ }
43887
+ /** Counts leaves (blocks without children) by `type`. */
43888
+ function countByType(root) {
43889
+ var _a;
43890
+ const counts = {};
43891
+ for (const { block, depth } of flattenOutline(root)) {
43892
+ if (depth === 0 || block.children !== undefined)
43893
+ continue;
43894
+ // Childless containers (an empty vertical) aren't content.
43895
+ if (block.type === 'chapter' || block.type === 'sequential' || block.type === 'vertical') {
43896
+ continue;
43897
+ }
43898
+ counts[block.type] = ((_a = counts[block.type]) !== null && _a !== void 0 ? _a : 0) + 1;
43899
+ }
43900
+ return counts;
43901
+ }
43902
+ /** Top-level sections (chapters) for a summary view, in course order. */
43903
+ function getSections(root) {
43904
+ var _a;
43905
+ return ((_a = root.children) !== null && _a !== void 0 ? _a : [])
43906
+ .filter((block) => block.type === 'chapter')
43907
+ .map((block) => {
43908
+ var _a;
43909
+ return ({
43910
+ id: block.id,
43911
+ display_name: block.display_name,
43912
+ completion_percentage: block.completion_percentage,
43913
+ complete: (_a = block.complete) !== null && _a !== void 0 ? _a : false,
43914
+ block,
43915
+ });
43916
+ });
43917
+ }
43918
+
43738
43919
  const coursesApiSlice = react.createApi({
43739
43920
  reducerPath: 'coursesApiSlice',
43740
43921
  baseQuery: iblFetchBaseQuery,
@@ -43776,9 +43957,20 @@ const coursesApiSlice = react.createApi({
43776
43957
  },
43777
43958
  providesTags: ['user-assigned-courses'],
43778
43959
  }),
43960
+ /**
43961
+ * Per-learner course outline with block-level completion. Name the learner
43962
+ * with exactly one of `username` / `user_id` / `email`, even for one's own
43963
+ * data. Errors keep their HTTP status; map them with
43964
+ * `normalizeLearnerCompletionError`.
43965
+ */
43966
+ getLearnerCourseOutline: builder.query({
43967
+ queryFn: (args, api, extraOptions) => fetchLearnerCompletion(args, 'outline', api, extraOptions),
43968
+ // The outline is heavy on large courses; keep it around briefly.
43969
+ keepUnusedDataFor: 120,
43970
+ }),
43779
43971
  }),
43780
43972
  });
43781
- const { useGetUserEnrolledCoursesQuery, useLazyGetUserEnrolledCoursesQuery, useGetUserAssignedCoursesQuery, useLazyGetUserAssignedCoursesQuery, } = coursesApiSlice;
43973
+ const { useGetUserEnrolledCoursesQuery, useLazyGetUserEnrolledCoursesQuery, useGetUserAssignedCoursesQuery, useLazyGetUserAssignedCoursesQuery, useGetLearnerCourseOutlineQuery, useLazyGetLearnerCourseOutlineQuery, } = coursesApiSlice;
43782
43974
 
43783
43975
  const courseMetadataApiSlice = react.createApi({
43784
43976
  reducerPath: 'courseMetadataApiSlice',
@@ -46300,6 +46492,12 @@ function filterSlashSkills(skills, query) {
46300
46492
  });
46301
46493
  }
46302
46494
 
46495
+ // Backend contract: dl_iblai_services_app/views/custom_domain.py.
46496
+ // The listing is the unified one: it carries both the sign-in/app SPA domains
46497
+ // and the domains of deployed apps (`spa: 'vercel'`), which are mirrored here
46498
+ // by the hosting service. Only the SPA rows may be deleted through
46499
+ // /api/custom-domains/<id>/delete/ — a hosted row answers 400 and has to go
46500
+ // through the hosting domains route, so that Vercel is told as well.
46303
46501
  const CUSTOM_DOMAIN_REDUCER_PATH = 'customDomainApiSlice';
46304
46502
  const CUSTOM_DOMAIN_ENDPOINTS = {
46305
46503
  GET_CUSTOM_DOMAINS: {
@@ -46314,36 +46512,6 @@ const CUSTOM_DOMAIN_ENDPOINTS = {
46314
46512
  service: exports.SERVICES.DM,
46315
46513
  path: (domain_id) => `/api/custom-domains/${domain_id}/delete/`,
46316
46514
  },
46317
- /* GET_MENTOR_USER_SETTINGS: {
46318
- service: SERVICES.AXD,
46319
- path: (tenantKey: string, username: string, mentorId: string) =>
46320
- `/api/ai-mentor/orgs/${tenantKey}/users/${username}/mentors/${mentorId}/mentor-user-settings/`,
46321
- },
46322
- UPDATE_MENTOR_USER_SETTINGS: {
46323
- service: SERVICES.AXD,
46324
- path: (tenantKey: string, username: string, mentorId: string) =>
46325
- `/api/ai-mentor/orgs/${tenantKey}/users/${username}/mentors/${mentorId}/mentor-user-settings/`,
46326
- },
46327
- DELETE_MEMORY: {
46328
- service: SERVICES.AXD,
46329
- path: (tenantKey: string, username: string, memoryId: string) =>
46330
- `/api/ai-mentor/orgs/${tenantKey}/users/${username}/memory-entries/${memoryId}/`,
46331
- },
46332
- DELETE_MEMORY_BY_CATEGORY: {
46333
- service: SERVICES.AXD,
46334
- path: (tenantKey: string, username: string, category: string) =>
46335
- `/api/ai-mentor/orgs/${tenantKey}/users/${username}/memory-entries/${category}/`,
46336
- },
46337
- UPDATE_MEMORY_ENTRY: {
46338
- service: SERVICES.AXD,
46339
- path: (tenantKey: string, username: string, entryId: string) =>
46340
- `/api/ai-mentor/orgs/${tenantKey}/users/${username}/memory-entries/${entryId}/`,
46341
- },
46342
- CREATE_MEMORY: {
46343
- service: SERVICES.AXD,
46344
- path: (tenantKey: string, username: string) =>
46345
- `/api/ai-mentor/orgs/${tenantKey}/users/${username}/memories/`,
46346
- }, */
46347
46515
  };
46348
46516
  const CUSTOM_DOMAIN_QUERY_KEYS = {
46349
46517
  GET_CUSTOM_DOMAINS: () => ['CUSTOM_DOMAINS'],
@@ -46391,6 +46559,139 @@ const customDomainApiSlice = react.createApi({
46391
46559
  });
46392
46560
  const { useGetCustomDomainsQuery, useLazyGetCustomDomainsQuery, useCreateCustomDomainMutation, useDeleteCustomDomainMutation, } = customDomainApiSlice;
46393
46561
 
46562
+ /** A domain serving a deployed app rather than one of the sign-in/app SPAs. */
46563
+ const VERCEL_SPA = 'vercel';
46564
+
46565
+ // Backend contract: ibl_ai_mentor/views/hosting_views.py.
46566
+ // Domains for a hosted app live at two scopes, and the split is deliberate:
46567
+ // 1. Project-scoped — orgs/{org}/users/{username}/providers/vercel/hosting/dns/
46568
+ // Attaching needs a project, and projects belong to the user who deployed
46569
+ // them, so these sit under a user. GET lists, POST attaches, DELETE detaches.
46570
+ // 2. Org-scoped — orgs/{org}/providers/vercel/hosting/domains/{id}/
46571
+ // Re-verifying and dropping a domain are keyed by the CustomDomain row id,
46572
+ // because the screen that lists an organization's domains has neither a user
46573
+ // nor a project to scope by. POST re-verifies (and reclaims a lost domain),
46574
+ // DELETE detaches it everywhere.
46575
+ // The project listing is per user, not per organization — there is no
46576
+ // platform-wide listing, which is why "add a domain" can only offer the caller's
46577
+ // own deployed apps.
46578
+ const HOSTING_REDUCER_PATH = 'hostingApiSlice';
46579
+ const encodePathSegment$1 = (value) => encodeURIComponent(value);
46580
+ const userHostingPath = (org, username) => `/api/ai-mentor/orgs/${encodePathSegment$1(org)}/users/${encodePathSegment$1(username)}/providers/vercel/hosting`;
46581
+ const hostingProjectsPath = (org, username) => `${userHostingPath(org, username)}/deployment/`;
46582
+ const hostingProjectDomainsPath = (org, username) => `${userHostingPath(org, username)}/dns/`;
46583
+ const hostingDomainPath = (org, domainId) => `/api/ai-mentor/orgs/${encodePathSegment$1(org)}/providers/vercel/hosting/domains/${domainId}/`;
46584
+ const HOSTING_ENDPOINTS = {
46585
+ GET_HOSTING_PROJECTS: {
46586
+ service: exports.SERVICES.DM,
46587
+ path: hostingProjectsPath,
46588
+ },
46589
+ GET_HOSTING_PROJECT_DOMAINS: {
46590
+ service: exports.SERVICES.DM,
46591
+ path: hostingProjectDomainsPath,
46592
+ },
46593
+ CREATE_HOSTING_PROJECT_DOMAIN: {
46594
+ service: exports.SERVICES.DM,
46595
+ path: hostingProjectDomainsPath,
46596
+ },
46597
+ DELETE_HOSTING_PROJECT_DOMAIN: {
46598
+ service: exports.SERVICES.DM,
46599
+ path: hostingProjectDomainsPath,
46600
+ },
46601
+ UPDATE_HOSTING_DOMAIN: {
46602
+ service: exports.SERVICES.DM,
46603
+ path: hostingDomainPath,
46604
+ },
46605
+ DELETE_HOSTING_DOMAIN: {
46606
+ service: exports.SERVICES.DM,
46607
+ path: hostingDomainPath,
46608
+ },
46609
+ };
46610
+ const HOSTING_QUERY_KEYS = {
46611
+ HOSTING_PROJECTS: 'HOSTING_PROJECTS',
46612
+ HOSTING_PROJECT_DOMAINS: 'HOSTING_PROJECT_DOMAINS',
46613
+ };
46614
+
46615
+ const hostingApiSlice = react.createApi({
46616
+ reducerPath: HOSTING_REDUCER_PATH,
46617
+ tagTypes: [HOSTING_QUERY_KEYS.HOSTING_PROJECTS, HOSTING_QUERY_KEYS.HOSTING_PROJECT_DOMAINS],
46618
+ baseQuery: iblFetchBaseQuery,
46619
+ endpoints: (builder) => ({
46620
+ // The caller's own deployed apps. The backend scopes this to the path user,
46621
+ // so an admin cannot list another member's projects through it.
46622
+ getHostingProjects: builder.query({
46623
+ query: (args) => ({
46624
+ url: HOSTING_ENDPOINTS.GET_HOSTING_PROJECTS.path(args.org, args.username),
46625
+ service: HOSTING_ENDPOINTS.GET_HOSTING_PROJECTS.service,
46626
+ }),
46627
+ providesTags: [HOSTING_QUERY_KEYS.HOSTING_PROJECTS],
46628
+ }),
46629
+ getHostingProjectDomains: builder.query({
46630
+ query: (args) => ({
46631
+ url: HOSTING_ENDPOINTS.GET_HOSTING_PROJECT_DOMAINS.path(args.org, args.username),
46632
+ params: args.domain
46633
+ ? { project: args.project, domain: args.domain }
46634
+ : { project: args.project },
46635
+ service: HOSTING_ENDPOINTS.GET_HOSTING_PROJECT_DOMAINS.service,
46636
+ }),
46637
+ providesTags: (result, error, args) => [
46638
+ { type: HOSTING_QUERY_KEYS.HOSTING_PROJECT_DOMAINS, id: args.project },
46639
+ ],
46640
+ }),
46641
+ // Attach a domain the organization owns, or — with `domain` omitted — have
46642
+ // the platform assign a subdomain of its shared zone.
46643
+ createHostingProjectDomain: builder.mutation({
46644
+ query: (args) => ({
46645
+ url: HOSTING_ENDPOINTS.CREATE_HOSTING_PROJECT_DOMAIN.path(args.org, args.username),
46646
+ method: 'POST',
46647
+ body: args.domain
46648
+ ? { project: args.project, domain: args.domain }
46649
+ : { project: args.project },
46650
+ service: HOSTING_ENDPOINTS.CREATE_HOSTING_PROJECT_DOMAIN.service,
46651
+ }),
46652
+ invalidatesTags: (result, error, args) => [
46653
+ HOSTING_QUERY_KEYS.HOSTING_PROJECTS,
46654
+ { type: HOSTING_QUERY_KEYS.HOSTING_PROJECT_DOMAINS, id: args.project },
46655
+ ],
46656
+ }),
46657
+ deleteHostingProjectDomain: builder.mutation({
46658
+ query: (args) => ({
46659
+ url: HOSTING_ENDPOINTS.DELETE_HOSTING_PROJECT_DOMAIN.path(args.org, args.username),
46660
+ method: 'DELETE',
46661
+ params: { project: args.project, domain: args.domain },
46662
+ service: HOSTING_ENDPOINTS.DELETE_HOSTING_PROJECT_DOMAIN.service,
46663
+ }),
46664
+ invalidatesTags: (result, error, args) => [
46665
+ HOSTING_QUERY_KEYS.HOSTING_PROJECTS,
46666
+ { type: HOSTING_QUERY_KEYS.HOSTING_PROJECT_DOMAINS, id: args.project },
46667
+ ],
46668
+ }),
46669
+ // Re-ask whether the DNS records are live, store the answer, and hand back
46670
+ // the records. This is also how a domain lost to another organization comes
46671
+ // back: a successful verification reclaims it.
46672
+ updateHostingDomain: builder.mutation({
46673
+ query: (args) => ({
46674
+ url: HOSTING_ENDPOINTS.UPDATE_HOSTING_DOMAIN.path(args.org, args.domainId),
46675
+ method: 'POST',
46676
+ service: HOSTING_ENDPOINTS.UPDATE_HOSTING_DOMAIN.service,
46677
+ }),
46678
+ invalidatesTags: [HOSTING_QUERY_KEYS.HOSTING_PROJECTS],
46679
+ }),
46680
+ // Removes the domain everywhere, not just from one project: it is detached
46681
+ // at Vercel first, so nothing is left serving a site the organization no
46682
+ // longer tracks.
46683
+ deleteHostingDomain: builder.mutation({
46684
+ query: (args) => ({
46685
+ url: HOSTING_ENDPOINTS.DELETE_HOSTING_DOMAIN.path(args.org, args.domainId),
46686
+ method: 'DELETE',
46687
+ service: HOSTING_ENDPOINTS.DELETE_HOSTING_DOMAIN.service,
46688
+ }),
46689
+ invalidatesTags: [HOSTING_QUERY_KEYS.HOSTING_PROJECTS],
46690
+ }),
46691
+ }),
46692
+ });
46693
+ const { useGetHostingProjectsQuery, useLazyGetHostingProjectsQuery, useGetHostingProjectDomainsQuery, useLazyGetHostingProjectDomainsQuery, useCreateHostingProjectDomainMutation, useDeleteHostingProjectDomainMutation, useUpdateHostingDomainMutation, useDeleteHostingDomainMutation, } = hostingApiSlice;
46694
+
46394
46695
  const PLATFORM_CUSTOM_REDUCER_PATH = "platformCustomApiSlice";
46395
46696
  const PLATFORM_CONFIGURATION_TAG = "PlatformConfiguration";
46396
46697
  const PLATFORM_CUSTOM_ENDPOINTS = {
@@ -48853,6 +49154,7 @@ const mentorReducer = {
48853
49154
  [memoryApiSlice.reducerPath]: memoryApiSlice.reducer,
48854
49155
  [disclaimersApiSlice.reducerPath]: disclaimersApiSlice.reducer,
48855
49156
  [customDomainApiSlice.reducerPath]: customDomainApiSlice.reducer,
49157
+ [hostingApiSlice.reducerPath]: hostingApiSlice.reducer,
48856
49158
  [careerApiSlice.reducerPath]: careerApiSlice.reducer,
48857
49159
  [customAiSearchApiSlice.reducerPath]: customAiSearchApiSlice.reducer,
48858
49160
  [periodicAgentsApiSlice.reducerPath]: periodicAgentsApiSlice.reducer,
@@ -48917,6 +49219,7 @@ const mentorMiddleware = [
48917
49219
  memoryApiSlice.middleware,
48918
49220
  disclaimersApiSlice.middleware,
48919
49221
  customDomainApiSlice.middleware,
49222
+ hostingApiSlice.middleware,
48920
49223
  careerApiSlice.middleware,
48921
49224
  customAiSearchApiSlice.middleware,
48922
49225
  periodicAgentsApiSlice.middleware,
@@ -48970,6 +49273,7 @@ const skillsReducer = {
48970
49273
  [analyticsApiSlice.reducerPath]: analyticsApiSlice.reducer,
48971
49274
  [reportsApiSlice.reducerPath]: reportsApiSlice.reducer,
48972
49275
  [customDomainApiSlice.reducerPath]: customDomainApiSlice.reducer,
49276
+ [hostingApiSlice.reducerPath]: hostingApiSlice.reducer,
48973
49277
  [appApiSlice.reducerPath]: appApiSlice.reducer,
48974
49278
  [customAiSearchApiSlice.reducerPath]: customAiSearchApiSlice.reducer,
48975
49279
  [artifactsApiSlice.reducerPath]: artifactsApiSlice.reducer,
@@ -49017,6 +49321,7 @@ const skillsMiddleware = [
49017
49321
  analyticsApiSlice.middleware,
49018
49322
  reportsApiSlice.middleware,
49019
49323
  customDomainApiSlice.middleware,
49324
+ hostingApiSlice.middleware,
49020
49325
  appApiSlice.middleware,
49021
49326
  customAiSearchApiSlice.middleware,
49022
49327
  artifactsApiSlice.middleware,
@@ -49094,7 +49399,11 @@ exports.GLOBAL_SEARCH_PATH = GLOBAL_SEARCH_PATH;
49094
49399
  exports.GRADING_ENDPOINTS = GRADING_ENDPOINTS;
49095
49400
  exports.GRADING_QUERY_KEYS = GRADING_QUERY_KEYS;
49096
49401
  exports.GRADING_REDUCER_PATH = GRADING_REDUCER_PATH;
49402
+ exports.HOSTING_ENDPOINTS = HOSTING_ENDPOINTS;
49403
+ exports.HOSTING_QUERY_KEYS = HOSTING_QUERY_KEYS;
49404
+ exports.HOSTING_REDUCER_PATH = HOSTING_REDUCER_PATH;
49097
49405
  exports.IblDataLayer = IblDataLayer;
49406
+ exports.LEARNER_COMPLETION_PATH = LEARNER_COMPLETION_PATH;
49098
49407
  exports.LOGO_ENDPOINTS = LOGO_ENDPOINTS;
49099
49408
  exports.MCP_ENDPOINTS = MCP_ENDPOINTS;
49100
49409
  exports.MCP_REDUCER_PATH = MCP_REDUCER_PATH;
@@ -49155,6 +49464,7 @@ exports.USER_LLM_USAGE_QUERY_KEYS = USER_LLM_USAGE_QUERY_KEYS;
49155
49464
  exports.USER_LLM_USAGE_REDUCER_PATH = USER_LLM_USAGE_REDUCER_PATH;
49156
49465
  exports.USER_PROGRESS_DATA_POINTS = USER_PROGRESS_DATA_POINTS;
49157
49466
  exports.USER_PROGRESS_SUMMARY_TYPE = USER_PROGRESS_SUMMARY_TYPE;
49467
+ exports.VERCEL_SPA = VERCEL_SPA;
49158
49468
  exports.WATCHED_GROUPS_ENDPOINTS = WATCHED_GROUPS_ENDPOINTS;
49159
49469
  exports.WATCHED_GROUPS_QUERY_KEYS = WATCHED_GROUPS_QUERY_KEYS;
49160
49470
  exports.WATCHED_GROUPS_REDUCER_PATH = WATCHED_GROUPS_REDUCER_PATH;
@@ -49176,6 +49486,7 @@ exports.authApiSlice = authApiSlice;
49176
49486
  exports.billingApiSlice = billingApiSlice;
49177
49487
  exports.billingCustomSlice = billingCustomSlice;
49178
49488
  exports.buildGlobalSearchUrl = buildGlobalSearchUrl;
49489
+ exports.buildLearnerCompletionUrl = buildLearnerCompletionUrl;
49179
49490
  exports.buildRecentMessagesUrl = buildRecentMessagesUrl;
49180
49491
  exports.buildSessionRetrieveUrl = buildSessionRetrieveUrl;
49181
49492
  exports.buildSharedSessionRetrieveUrl = buildSharedSessionRetrieveUrl;
@@ -49192,6 +49503,7 @@ exports.clawApiSlice = clawApiSlice;
49192
49503
  exports.coreApiSlice = coreApiSlice;
49193
49504
  exports.coreCustomApiSlice = coreCustomApiSlice;
49194
49505
  exports.coreFakeCustomPublicImageAssetApiSlice = coreFakeCustomPublicImageAssetApiSlice;
49506
+ exports.countByType = countByType;
49195
49507
  exports.courseMetadataApiSlice = courseMetadataApiSlice;
49196
49508
  exports.coursesApiSlice = coursesApiSlice;
49197
49509
  exports.credentialsApiSlice = credentialsApiSlice;
@@ -49206,15 +49518,20 @@ exports.evalTotalPages = evalTotalPages;
49206
49518
  exports.evaluationsApiSlice = evaluationsApiSlice;
49207
49519
  exports.fakeBaseQueryWithLogging = fakeBaseQueryWithLogging;
49208
49520
  exports.featureTags = featureTags;
49521
+ exports.fetchLearnerCompletion = fetchLearnerCompletion;
49209
49522
  exports.fetchUserLlmUsage = fetchUserLlmUsage;
49210
49523
  exports.filterCourseUserRoles = filterCourseUserRoles;
49211
49524
  exports.filterGlobalUserRoles = filterGlobalUserRoles;
49212
49525
  exports.filterOrgUserRoles = filterOrgUserRoles;
49213
49526
  exports.filterSlashSkills = filterSlashSkills;
49527
+ exports.findResumeBlock = findResumeBlock;
49528
+ exports.flattenOutline = flattenOutline;
49214
49529
  exports.getNextRecentMessagesPageParam = getNextRecentMessagesPageParam;
49530
+ exports.getSections = getSections;
49215
49531
  exports.getSpendCapExceededError = getSpendCapExceededError;
49216
49532
  exports.getUserRoleScope = getUserRoleScope;
49217
49533
  exports.gradingApiSlice = gradingApiSlice;
49534
+ exports.hostingApiSlice = hostingApiSlice;
49218
49535
  exports.iblFakeBaseQuery = iblFakeBaseQuery;
49219
49536
  exports.initializeDataLayer = initializeDataLayer;
49220
49537
  exports.isBaseAgentMentor = isBaseAgentMentor;
@@ -49234,6 +49551,8 @@ exports.mentorReducer = mentorReducer;
49234
49551
  exports.moderationLogsApiReducer = moderationLogsApiReducer;
49235
49552
  exports.moderationLogsApiSlice = moderationLogsApiSlice;
49236
49553
  exports.monetizationApiSlice = monetizationApiSlice;
49554
+ exports.normalizeLearnerCompletionError = normalizeLearnerCompletionError;
49555
+ exports.normalizeOutline = normalizeOutline;
49237
49556
  exports.normalizeUserLlmUsageError = normalizeUserLlmUsageError;
49238
49557
  exports.notificationsApiSlice = notificationsApiSlice;
49239
49558
  exports.notificationsCustomApiSlice = notificationsCustomApiSlice;
@@ -49316,6 +49635,7 @@ exports.useCreateExternalMappingMutation = useCreateExternalMappingMutation;
49316
49635
  exports.useCreateGlobalMemoryMutation = useCreateGlobalMemoryMutation;
49317
49636
  exports.useCreateGraderCriterionMutation = useCreateGraderCriterionMutation;
49318
49637
  exports.useCreateGuestCheckoutMutation = useCreateGuestCheckoutMutation;
49638
+ exports.useCreateHostingProjectDomainMutation = useCreateHostingProjectDomainMutation;
49319
49639
  exports.useCreateIntegrationCredentialMutation = useCreateIntegrationCredentialMutation;
49320
49640
  exports.useCreateLLMCredentialMutation = useCreateLLMCredentialMutation;
49321
49641
  exports.useCreateLtiKeyMutation = useCreateLtiKeyMutation;
@@ -49385,6 +49705,8 @@ exports.useDeleteEvalScoreMutation = useDeleteEvalScoreMutation;
49385
49705
  exports.useDeleteExternalMappingMutation = useDeleteExternalMappingMutation;
49386
49706
  exports.useDeleteGlobalMemoryMutation = useDeleteGlobalMemoryMutation;
49387
49707
  exports.useDeleteGraderCriterionMutation = useDeleteGraderCriterionMutation;
49708
+ exports.useDeleteHostingDomainMutation = useDeleteHostingDomainMutation;
49709
+ exports.useDeleteHostingProjectDomainMutation = useDeleteHostingProjectDomainMutation;
49388
49710
  exports.useDeleteIntegrationCredentialMutation = useDeleteIntegrationCredentialMutation;
49389
49711
  exports.useDeleteLtiKeyMutation = useDeleteLtiKeyMutation;
49390
49712
  exports.useDeleteLtiMentorMutation = useDeleteLtiMentorMutation;
@@ -49518,11 +49840,14 @@ exports.useGetGlobalMemoriesQuery = useGetGlobalMemoriesQuery;
49518
49840
  exports.useGetGradeResultQuery = useGetGradeResultQuery;
49519
49841
  exports.useGetGraderCriterionQuery = useGetGraderCriterionQuery;
49520
49842
  exports.useGetGuidedPromptsQuery = useGetGuidedPromptsQuery;
49843
+ exports.useGetHostingProjectDomainsQuery = useGetHostingProjectDomainsQuery;
49844
+ exports.useGetHostingProjectsQuery = useGetHostingProjectsQuery;
49521
49845
  exports.useGetIntegrationCredentialsQuery = useGetIntegrationCredentialsQuery;
49522
49846
  exports.useGetIntegrationCredentialsSchemaQuery = useGetIntegrationCredentialsSchemaQuery;
49523
49847
  exports.useGetIssuersQuery = useGetIssuersQuery;
49524
49848
  exports.useGetItemSubscriptionQuery = useGetItemSubscriptionQuery;
49525
49849
  exports.useGetLLMCredentialsQuery = useGetLLMCredentialsQuery;
49850
+ exports.useGetLearnerCourseOutlineQuery = useGetLearnerCourseOutlineQuery;
49526
49851
  exports.useGetLearnerDetailsQuery = useGetLearnerDetailsQuery;
49527
49852
  exports.useGetLlmUsageMetricsQuery = useGetLlmUsageMetricsQuery;
49528
49853
  exports.useGetLlmUsageObservationsQuery = useGetLlmUsageObservationsQuery;
@@ -49781,11 +50106,14 @@ exports.useLazyGetGlobalMemoriesQuery = useLazyGetGlobalMemoriesQuery;
49781
50106
  exports.useLazyGetGradeResultQuery = useLazyGetGradeResultQuery;
49782
50107
  exports.useLazyGetGraderCriterionQuery = useLazyGetGraderCriterionQuery;
49783
50108
  exports.useLazyGetGuidedPromptsQuery = useLazyGetGuidedPromptsQuery;
50109
+ exports.useLazyGetHostingProjectDomainsQuery = useLazyGetHostingProjectDomainsQuery;
50110
+ exports.useLazyGetHostingProjectsQuery = useLazyGetHostingProjectsQuery;
49784
50111
  exports.useLazyGetIntegrationCredentialsQuery = useLazyGetIntegrationCredentialsQuery;
49785
50112
  exports.useLazyGetIntegrationCredentialsSchemaQuery = useLazyGetIntegrationCredentialsSchemaQuery;
49786
50113
  exports.useLazyGetIssuersQuery = useLazyGetIssuersQuery;
49787
50114
  exports.useLazyGetItemSubscriptionQuery = useLazyGetItemSubscriptionQuery;
49788
50115
  exports.useLazyGetLLMCredentialsQuery = useLazyGetLLMCredentialsQuery;
50116
+ exports.useLazyGetLearnerCourseOutlineQuery = useLazyGetLearnerCourseOutlineQuery;
49789
50117
  exports.useLazyGetLlmsQuery = useLazyGetLlmsQuery;
49790
50118
  exports.useLazyGetLtiKeyDetailQuery = useLazyGetLtiKeyDetailQuery;
49791
50119
  exports.useLazyGetMCPServerQuery = useLazyGetMCPServerQuery;
@@ -50029,6 +50357,7 @@ exports.useUpdateEvalDatasetItemMutation = useUpdateEvalDatasetItemMutation;
50029
50357
  exports.useUpdateExamAttemptMutation = useUpdateExamAttemptMutation;
50030
50358
  exports.useUpdateGlobalMemoryMutation = useUpdateGlobalMemoryMutation;
50031
50359
  exports.useUpdateGraderCriterionMutation = useUpdateGraderCriterionMutation;
50360
+ exports.useUpdateHostingDomainMutation = useUpdateHostingDomainMutation;
50032
50361
  exports.useUpdateIntegrationCredentialMutation = useUpdateIntegrationCredentialMutation;
50033
50362
  exports.useUpdateLtiKeyMutation = useUpdateLtiKeyMutation;
50034
50363
  exports.useUpdateLtiMentorMutation = useUpdateLtiMentorMutation;
@@ -50108,6 +50437,7 @@ exports.userApiSlice = userApiSlice;
50108
50437
  exports.userChatHistoryApiSlice = userChatHistoryApiSlice;
50109
50438
  exports.userInvitationsApiSlice = userInvitationsApiSlice;
50110
50439
  exports.userLlmUsageApiSlice = userLlmUsageApiSlice;
50440
+ exports.validateLearnerCompletionArgs = validateLearnerCompletionArgs;
50111
50441
  exports.validateUserLlmUsageParams = validateUserLlmUsageParams;
50112
50442
  exports.watchedGroupsApiSlice = watchedGroupsApiSlice;
50113
50443
  exports.workflowsApiSlice = workflowsApiSlice;