@iblai/data-layer 1.9.5 → 1.9.7

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
@@ -39052,6 +39052,7 @@ exports.SERVICES = void 0;
39052
39052
  SERVICES["LMS"] = "LMS";
39053
39053
  SERVICES["DM"] = "DM";
39054
39054
  SERVICES["AXD"] = "AXD";
39055
+ SERVICES["STUDIO"] = "STUDIO";
39055
39056
  })(exports.SERVICES || (exports.SERVICES = {}));
39056
39057
 
39057
39058
  class Config {
@@ -39061,6 +39062,7 @@ Config.lmsUrl = 'https://learn.iblai.app';
39061
39062
  Config.dmUrl = 'https://base.manager.iblai.app';
39062
39063
  Config.axdUrl = 'https://base.manager.iblai.app';
39063
39064
  Config.mentorIframeUrl = 'https://mentor.iblai.tech';
39065
+ Config.studioUrl = 'https://studio.iblai.app';
39064
39066
  Config.httpErrorHandlers = {};
39065
39067
 
39066
39068
  class IblDataLayer {
@@ -39127,10 +39129,23 @@ const getServiceUrl = (service) => {
39127
39129
  return Config.lmsUrl;
39128
39130
  case exports.SERVICES.DM:
39129
39131
  return Config.dmUrl;
39132
+ case exports.SERVICES.STUDIO:
39133
+ return Config.studioUrl;
39130
39134
  default:
39131
39135
  return Config.dmUrl;
39132
39136
  }
39133
39137
  };
39138
+ /**
39139
+ * Read a cookie value by name. Returns null outside the browser or when the
39140
+ * cookie is absent. Used for Studio's CSRF token (`csrftoken`).
39141
+ */
39142
+ const getCookieValue = (name) => {
39143
+ if (typeof document === 'undefined') {
39144
+ return null;
39145
+ }
39146
+ const match = document.cookie.match(new RegExp(`(?:^|;\\s*)${name}=([^;]*)`));
39147
+ return match ? decodeURIComponent(match[1]) : null;
39148
+ };
39134
39149
  /**
39135
39150
  * Get the headers required for API requests based on the provided service type.
39136
39151
  */
@@ -39154,7 +39169,8 @@ const getHeaders = async (service) => {
39154
39169
  return; // No Authorization header when no valid token
39155
39170
  }
39156
39171
  let prefix;
39157
- if (service === exports.SERVICES.LMS) {
39172
+ // Studio (Open edX CMS) accepts the same edX token as the LMS.
39173
+ if (service === exports.SERVICES.LMS || service === exports.SERVICES.STUDIO) {
39158
39174
  if (token.length > 30) {
39159
39175
  prefix = 'JWT';
39160
39176
  }
@@ -39257,7 +39273,7 @@ const isErrorObject = (data) => {
39257
39273
  const baseQuery = (service, jsonContentType = true, contentType, skipAuth = false) => query.fetchBaseQuery({
39258
39274
  baseUrl: getServiceUrl(service),
39259
39275
  timeout: 30000, // 30 second timeout
39260
- credentials: service === exports.SERVICES.LEGACY_LMS ? 'include' : 'omit',
39276
+ credentials: service === exports.SERVICES.LEGACY_LMS || service === exports.SERVICES.STUDIO ? 'include' : 'omit',
39261
39277
  prepareHeaders: async (headers) => {
39262
39278
  // Only add auth headers if skipAuth is false
39263
39279
  if (!skipAuth) {
@@ -39275,6 +39291,18 @@ const baseQuery = (service, jsonContentType = true, contentType, skipAuth = fals
39275
39291
  if (contentType) {
39276
39292
  headers.set('Content-Type', contentType);
39277
39293
  }
39294
+ // Studio (Open edX CMS) endpoints require the Django CSRF token and only
39295
+ // return JSON when asked for it explicitly.
39296
+ if (service === exports.SERVICES.STUDIO) {
39297
+ const csrfToken = getCookieValue('csrftoken');
39298
+ if (csrfToken) {
39299
+ headers.set('X-CSRFToken', csrfToken);
39300
+ }
39301
+ if (!headers.has('Accept')) {
39302
+ headers.set('Accept', 'application/json');
39303
+ }
39304
+ headers.set('X-Requested-With', 'XMLHttpRequest');
39305
+ }
39278
39306
  // Add CSRF protection headers for LMS service
39279
39307
  if (service === exports.SERVICES.LMS) {
39280
39308
  // Use mentorIframeUrl for both origin and referer
@@ -39304,7 +39332,28 @@ const NON_RETRYABLE_STATUS_CODES = [402, 401];
39304
39332
  * Uses `retry.fail()` to immediately bail out of the retry loop.
39305
39333
  */
39306
39334
  const withNonRetryableErrors = (query$1) => async (args, api, extraOptions) => {
39307
- const result = await query$1(args, api, extraOptions);
39335
+ let result;
39336
+ try {
39337
+ result = await query$1(args, api, extraOptions);
39338
+ }
39339
+ catch (e) {
39340
+ // RTK's `retry` only counts attempts for errors RETURNED as `{ error }`
39341
+ // (wrapped in HandledError); a THROWN exception bypasses its
39342
+ // retryCondition and makes the `while (true)` loop spin forever —
39343
+ // an eternal 'pending' query with no network request and no surfaced
39344
+ // error. fetchBaseQuery can throw before fetch (e.g. from
39345
+ // prepareHeaders), so convert throws into returned errors to keep the
39346
+ // retry loop bounded.
39347
+ const message = e instanceof Error ? `${e.name}: ${e.message}` : String(e);
39348
+ return {
39349
+ error: {
39350
+ status: 'FETCH_ERROR',
39351
+ // `data` is what iblFetchBaseQuery propagates to callers/logs.
39352
+ data: message,
39353
+ error: message,
39354
+ },
39355
+ };
39356
+ }
39308
39357
  if (result.error && NON_RETRYABLE_STATUS_CODES.includes(result.error.status)) {
39309
39358
  query.retry.fail(result.error);
39310
39359
  }
@@ -42834,6 +42883,155 @@ const edxSsoApiSlice = react.createApi({
42834
42883
  });
42835
42884
  const { useGetEdxSSOTokenQuery, useLazyGetEdxSSOTokenQuery } = edxSsoApiSlice;
42836
42885
 
42886
+ const STUDIO_AUTHORING_ENDPOINTS = {
42887
+ CREATE_COURSE: {
42888
+ path: (contentType) => `/api/ibl/manage/${contentType}/`,
42889
+ service: exports.SERVICES.STUDIO,
42890
+ },
42891
+ DELETE_COURSE: {
42892
+ path: () => '/api/ibl/manage/course/delete',
42893
+ service: exports.SERVICES.STUDIO,
42894
+ },
42895
+ COURSE_SETTINGS: {
42896
+ path: (contentType) => `/api/ibl/v1/${contentType}_settings/`,
42897
+ service: exports.SERVICES.STUDIO,
42898
+ },
42899
+ CREATE_XBLOCK: {
42900
+ path: () => '/xblock/',
42901
+ service: exports.SERVICES.STUDIO,
42902
+ },
42903
+ UPDATE_XBLOCK: {
42904
+ path: (locator) => `/xblock/${locator}`,
42905
+ service: exports.SERVICES.STUDIO,
42906
+ },
42907
+ SCORM_SUBMIT: {
42908
+ path: (locator) => `/xblock/${locator}/handler/studio_submit`,
42909
+ service: exports.SERVICES.STUDIO,
42910
+ },
42911
+ UPLOAD_ASSET: {
42912
+ path: (courseKey) => `/assets/${courseKey}/`,
42913
+ service: exports.SERVICES.STUDIO,
42914
+ },
42915
+ ADVANCED_SETTINGS: {
42916
+ path: (courseKey) => `/settings/advanced/${courseKey}`,
42917
+ service: exports.SERVICES.STUDIO,
42918
+ },
42919
+ VIDEO_UPLOAD: {
42920
+ path: (courseKey) => `/api/v1/ibl/course/${courseKey}/s3-upload`,
42921
+ service: exports.SERVICES.STUDIO,
42922
+ },
42923
+ };
42924
+
42925
+ /**
42926
+ * Studio (Open edX CMS) course-authoring endpoints. These hit the Studio host
42927
+ * (`Config.studioUrl`) with cookie-session auth + CSRF token, mirroring how
42928
+ * Studio's own frontend talks to it.
42929
+ */
42930
+ const studioAuthoringApiSlice = react.createApi({
42931
+ reducerPath: 'studioAuthoringApiSlice',
42932
+ baseQuery: iblFetchBaseQuery,
42933
+ endpoints: (builder) => ({
42934
+ /** Create the course (or library) shell. Returns `course_key`. */
42935
+ createStudioCourse: builder.mutation({
42936
+ query: ({ courseData, contentType = 'course' }) => ({
42937
+ url: STUDIO_AUTHORING_ENDPOINTS.CREATE_COURSE.path(contentType),
42938
+ service: STUDIO_AUTHORING_ENDPOINTS.CREATE_COURSE.service,
42939
+ method: 'POST',
42940
+ body: courseData,
42941
+ }),
42942
+ }),
42943
+ /** Delete a course — used as rollback when a later creation step fails. */
42944
+ deleteStudioCourse: builder.mutation({
42945
+ query: ({ courseKey }) => ({
42946
+ url: STUDIO_AUTHORING_ENDPOINTS.DELETE_COURSE.path(),
42947
+ service: STUDIO_AUTHORING_ENDPOINTS.DELETE_COURSE.service,
42948
+ method: 'POST',
42949
+ body: { course_key: courseKey },
42950
+ }),
42951
+ }),
42952
+ /** Set the full course settings/metadata payload. */
42953
+ updateStudioCourseSettings: builder.mutation({
42954
+ query: ({ settings, contentType = 'course' }) => ({
42955
+ url: STUDIO_AUTHORING_ENDPOINTS.COURSE_SETTINGS.path(contentType),
42956
+ service: STUDIO_AUTHORING_ENDPOINTS.COURSE_SETTINGS.service,
42957
+ method: 'POST',
42958
+ body: settings,
42959
+ }),
42960
+ }),
42961
+ /**
42962
+ * Create an xblock node (chapter / sequential / vertical / video / scorm)
42963
+ * under `parent_locator`.
42964
+ */
42965
+ createStudioXblock: builder.mutation({
42966
+ query: (blockData) => ({
42967
+ url: STUDIO_AUTHORING_ENDPOINTS.CREATE_XBLOCK.path(),
42968
+ service: STUDIO_AUTHORING_ENDPOINTS.CREATE_XBLOCK.service,
42969
+ method: 'POST',
42970
+ body: blockData,
42971
+ }),
42972
+ }),
42973
+ /**
42974
+ * Update an existing xblock by locator — used for video metadata and for
42975
+ * publishing a unit (`{ publish: 'make_public' }`).
42976
+ */
42977
+ updateStudioXblock: builder.mutation({
42978
+ query: ({ locator, blockData }) => ({
42979
+ url: STUDIO_AUTHORING_ENDPOINTS.UPDATE_XBLOCK.path(encodeURIComponent(locator)),
42980
+ service: STUDIO_AUTHORING_ENDPOINTS.UPDATE_XBLOCK.service,
42981
+ method: 'POST',
42982
+ body: blockData,
42983
+ }),
42984
+ }),
42985
+ /** Upload the SCORM zip to the scorm xblock's `studio_submit` handler. */
42986
+ uploadStudioScormPackage: builder.mutation({
42987
+ query: ({ locator, formData }) => ({
42988
+ url: STUDIO_AUTHORING_ENDPOINTS.SCORM_SUBMIT.path(encodeURIComponent(locator)),
42989
+ service: STUDIO_AUTHORING_ENDPOINTS.SCORM_SUBMIT.service,
42990
+ method: 'POST',
42991
+ body: formData,
42992
+ isJson: false,
42993
+ }),
42994
+ }),
42995
+ /** Upload a course asset (e.g. the course card image). */
42996
+ uploadStudioCourseAsset: builder.mutation({
42997
+ query: ({ courseKey, formData }) => ({
42998
+ url: STUDIO_AUTHORING_ENDPOINTS.UPLOAD_ASSET.path(encodeURIComponent(courseKey)),
42999
+ service: STUDIO_AUTHORING_ENDPOINTS.UPLOAD_ASSET.service,
43000
+ method: 'POST',
43001
+ body: formData,
43002
+ isJson: true,
43003
+ // Asset upload is authenticated by the Studio session cookie + CSRF
43004
+ // token alone; no Authorization header.
43005
+ skipAuth: true,
43006
+ // Matches how Studio's own frontend requests the asset endpoint. Set
43007
+ // explicitly so the base query keeps it instead of defaulting to
43008
+ // `application/json`.
43009
+ headers: { Accept: 'application/json, text/plain, */*' },
43010
+ }),
43011
+ }),
43012
+ /** Set Studio advanced settings (e.g. enable the `scorm` module). */
43013
+ setStudioAdvancedSettings: builder.mutation({
43014
+ query: ({ courseKey, settings }) => ({
43015
+ url: STUDIO_AUTHORING_ENDPOINTS.ADVANCED_SETTINGS.path(encodeURIComponent(courseKey)),
43016
+ service: STUDIO_AUTHORING_ENDPOINTS.ADVANCED_SETTINGS.service,
43017
+ method: 'POST',
43018
+ body: settings,
43019
+ }),
43020
+ }),
43021
+ /** Upload a raw video file to course storage; returns `{ file_url }`. */
43022
+ uploadStudioCourseVideo: builder.mutation({
43023
+ query: ({ courseKey, formData }) => ({
43024
+ url: STUDIO_AUTHORING_ENDPOINTS.VIDEO_UPLOAD.path(encodeURIComponent(courseKey)),
43025
+ service: STUDIO_AUTHORING_ENDPOINTS.VIDEO_UPLOAD.service,
43026
+ method: 'POST',
43027
+ body: formData,
43028
+ isJson: false,
43029
+ }),
43030
+ }),
43031
+ }),
43032
+ });
43033
+ const { useCreateStudioCourseMutation, useDeleteStudioCourseMutation, useUpdateStudioCourseSettingsMutation, useCreateStudioXblockMutation, useUpdateStudioXblockMutation, useUploadStudioScormPackageMutation, useUploadStudioCourseAssetMutation, useSetStudioAdvancedSettingsMutation, useUploadStudioCourseVideoMutation, } = studioAuthoringApiSlice;
43034
+
42837
43035
  const searchApiSlice = react.createApi({
42838
43036
  reducerPath: 'searchApiSlice',
42839
43037
  baseQuery: iblFakeBaseQuery,
@@ -43312,6 +43510,163 @@ const notificationsCustomApiSlice = react.createApi({
43312
43510
  });
43313
43511
  const { useGetTemplatesQuery, useLazyGetTemplatesQuery, useGetTemplateDetailsQuery, useLazyGetTemplateDetailsQuery, useUpdateTemplateMutation, useToggleTemplateMutation, } = notificationsCustomApiSlice;
43314
43512
 
43513
+ const SUPPORT_TICKETS_REDUCER_PATH = 'supportTicketsApiSlice';
43514
+ const SUPPORT_TICKETS_TAGS = {
43515
+ TICKETS: 'SUPPORT_TICKETS',
43516
+ TICKET: 'SUPPORT_TICKET',
43517
+ TICKET_MESSAGES: 'SUPPORT_TICKET_MESSAGES',
43518
+ };
43519
+ const SUPPORT_TICKETS_ENDPOINTS = {
43520
+ TICKETS: {
43521
+ service: exports.SERVICES.DM,
43522
+ path: (org, userId) => `/api/ai-mentor/orgs/${org}/users/${userId}/support-tickets/`,
43523
+ },
43524
+ TICKET: {
43525
+ service: exports.SERVICES.DM,
43526
+ path: (org, userId, id) => `/api/ai-mentor/orgs/${org}/users/${userId}/support-tickets/${id}/`,
43527
+ },
43528
+ TICKET_CLOSE: {
43529
+ service: exports.SERVICES.DM,
43530
+ path: (org, userId, id) => `/api/ai-mentor/orgs/${org}/users/${userId}/support-tickets/${id}/close/`,
43531
+ },
43532
+ TICKET_MESSAGES: {
43533
+ service: exports.SERVICES.DM,
43534
+ path: (org, userId) => `/api/ai-mentor/orgs/${org}/users/${userId}/support-ticket-messages/`,
43535
+ },
43536
+ TICKET_MESSAGE: {
43537
+ service: exports.SERVICES.DM,
43538
+ path: (org, userId, id) => `/api/ai-mentor/orgs/${org}/users/${userId}/support-ticket-messages/${id}/`,
43539
+ },
43540
+ };
43541
+
43542
+ /**
43543
+ * Human Support ticket endpoints
43544
+ * (`/api/ai-mentor/orgs/{org}/users/{user_id}/support-tickets/` and
43545
+ * `/api/ai-mentor/orgs/{org}/users/{user_id}/support-ticket-messages/`).
43546
+ *
43547
+ * Hand-written: these endpoints are newer than the pinned `@iblai/iblai-api`
43548
+ * release, so there is no generated service method to wrap yet.
43549
+ */
43550
+ const supportTicketsApiSlice = react.createApi({
43551
+ reducerPath: SUPPORT_TICKETS_REDUCER_PATH,
43552
+ tagTypes: [...Object.values(SUPPORT_TICKETS_TAGS)],
43553
+ baseQuery: iblFetchBaseQuery,
43554
+ endpoints: (builder) => ({
43555
+ getSupportTickets: builder.query({
43556
+ query: ({ org, userId, mentorId, page, pageSize, session, status, username }) => ({
43557
+ url: SUPPORT_TICKETS_ENDPOINTS.TICKETS.path(org, userId),
43558
+ service: SUPPORT_TICKETS_ENDPOINTS.TICKETS.service,
43559
+ params: {
43560
+ mentor_id: mentorId,
43561
+ page,
43562
+ page_size: pageSize,
43563
+ session,
43564
+ status,
43565
+ username,
43566
+ },
43567
+ }),
43568
+ providesTags: [SUPPORT_TICKETS_TAGS.TICKETS],
43569
+ }),
43570
+ getSupportTicket: builder.query({
43571
+ query: ({ org, userId, id }) => ({
43572
+ url: SUPPORT_TICKETS_ENDPOINTS.TICKET.path(org, userId, id),
43573
+ service: SUPPORT_TICKETS_ENDPOINTS.TICKET.service,
43574
+ }),
43575
+ providesTags: [SUPPORT_TICKETS_TAGS.TICKET],
43576
+ }),
43577
+ updateSupportTicket: builder.mutation({
43578
+ query: ({ org, userId, id, body }) => ({
43579
+ url: SUPPORT_TICKETS_ENDPOINTS.TICKET.path(org, userId, id),
43580
+ service: SUPPORT_TICKETS_ENDPOINTS.TICKET.service,
43581
+ method: 'PUT',
43582
+ body,
43583
+ }),
43584
+ invalidatesTags: [SUPPORT_TICKETS_TAGS.TICKETS, SUPPORT_TICKETS_TAGS.TICKET],
43585
+ }),
43586
+ patchSupportTicket: builder.mutation({
43587
+ query: ({ org, userId, id, body }) => ({
43588
+ url: SUPPORT_TICKETS_ENDPOINTS.TICKET.path(org, userId, id),
43589
+ service: SUPPORT_TICKETS_ENDPOINTS.TICKET.service,
43590
+ method: 'PATCH',
43591
+ body,
43592
+ }),
43593
+ invalidatesTags: [SUPPORT_TICKETS_TAGS.TICKETS, SUPPORT_TICKETS_TAGS.TICKET],
43594
+ }),
43595
+ deleteSupportTicket: builder.mutation({
43596
+ query: ({ org, userId, id }) => ({
43597
+ url: SUPPORT_TICKETS_ENDPOINTS.TICKET.path(org, userId, id),
43598
+ service: SUPPORT_TICKETS_ENDPOINTS.TICKET.service,
43599
+ method: 'DELETE',
43600
+ }),
43601
+ invalidatesTags: [SUPPORT_TICKETS_TAGS.TICKETS],
43602
+ }),
43603
+ closeSupportTicket: builder.mutation({
43604
+ query: ({ org, userId, id }) => ({
43605
+ url: SUPPORT_TICKETS_ENDPOINTS.TICKET_CLOSE.path(org, userId, id),
43606
+ service: SUPPORT_TICKETS_ENDPOINTS.TICKET_CLOSE.service,
43607
+ method: 'POST',
43608
+ }),
43609
+ invalidatesTags: [SUPPORT_TICKETS_TAGS.TICKETS, SUPPORT_TICKETS_TAGS.TICKET],
43610
+ }),
43611
+ getSupportTicketMessages: builder.query({
43612
+ query: ({ org, userId, ticket, sender, page, pageSize }) => ({
43613
+ url: SUPPORT_TICKETS_ENDPOINTS.TICKET_MESSAGES.path(org, userId),
43614
+ service: SUPPORT_TICKETS_ENDPOINTS.TICKET_MESSAGES.service,
43615
+ params: {
43616
+ ticket,
43617
+ sender,
43618
+ page,
43619
+ page_size: pageSize,
43620
+ },
43621
+ }),
43622
+ providesTags: [SUPPORT_TICKETS_TAGS.TICKET_MESSAGES],
43623
+ }),
43624
+ getSupportTicketMessage: builder.query({
43625
+ query: ({ org, userId, id }) => ({
43626
+ url: SUPPORT_TICKETS_ENDPOINTS.TICKET_MESSAGE.path(org, userId, id),
43627
+ service: SUPPORT_TICKETS_ENDPOINTS.TICKET_MESSAGE.service,
43628
+ }),
43629
+ providesTags: [SUPPORT_TICKETS_TAGS.TICKET_MESSAGES],
43630
+ }),
43631
+ createSupportTicketMessage: builder.mutation({
43632
+ query: ({ org, userId, body }) => ({
43633
+ url: SUPPORT_TICKETS_ENDPOINTS.TICKET_MESSAGES.path(org, userId),
43634
+ service: SUPPORT_TICKETS_ENDPOINTS.TICKET_MESSAGES.service,
43635
+ method: 'POST',
43636
+ body,
43637
+ }),
43638
+ invalidatesTags: [SUPPORT_TICKETS_TAGS.TICKET_MESSAGES],
43639
+ }),
43640
+ updateSupportTicketMessage: builder.mutation({
43641
+ query: ({ org, userId, id, body }) => ({
43642
+ url: SUPPORT_TICKETS_ENDPOINTS.TICKET_MESSAGE.path(org, userId, id),
43643
+ service: SUPPORT_TICKETS_ENDPOINTS.TICKET_MESSAGE.service,
43644
+ method: 'PUT',
43645
+ body,
43646
+ }),
43647
+ invalidatesTags: [SUPPORT_TICKETS_TAGS.TICKET_MESSAGES],
43648
+ }),
43649
+ patchSupportTicketMessage: builder.mutation({
43650
+ query: ({ org, userId, id, body }) => ({
43651
+ url: SUPPORT_TICKETS_ENDPOINTS.TICKET_MESSAGE.path(org, userId, id),
43652
+ service: SUPPORT_TICKETS_ENDPOINTS.TICKET_MESSAGE.service,
43653
+ method: 'PATCH',
43654
+ body,
43655
+ }),
43656
+ invalidatesTags: [SUPPORT_TICKETS_TAGS.TICKET_MESSAGES],
43657
+ }),
43658
+ deleteSupportTicketMessage: builder.mutation({
43659
+ query: ({ org, userId, id }) => ({
43660
+ url: SUPPORT_TICKETS_ENDPOINTS.TICKET_MESSAGE.path(org, userId, id),
43661
+ service: SUPPORT_TICKETS_ENDPOINTS.TICKET_MESSAGE.service,
43662
+ method: 'DELETE',
43663
+ }),
43664
+ invalidatesTags: [SUPPORT_TICKETS_TAGS.TICKET_MESSAGES],
43665
+ }),
43666
+ }),
43667
+ });
43668
+ const { useGetSupportTicketsQuery, useLazyGetSupportTicketsQuery, useGetSupportTicketQuery, useLazyGetSupportTicketQuery, useUpdateSupportTicketMutation, usePatchSupportTicketMutation, useDeleteSupportTicketMutation, useCloseSupportTicketMutation, useGetSupportTicketMessagesQuery, useLazyGetSupportTicketMessagesQuery, useGetSupportTicketMessageQuery, useLazyGetSupportTicketMessageQuery, useCreateSupportTicketMessageMutation, useUpdateSupportTicketMessageMutation, usePatchSupportTicketMessageMutation, useDeleteSupportTicketMessageMutation, } = supportTicketsApiSlice;
43669
+
43315
43670
  const MENTOR_CUSTOM_REDUCER_PATH = 'mentorCustomApiSlice';
43316
43671
  const MENTOR_ENDPOINTS = {
43317
43672
  EDIT_MENTOR_SETTINGS: {
@@ -46247,11 +46602,13 @@ const mentorReducer = {
46247
46602
  [coursesApiSlice.reducerPath]: coursesApiSlice.reducer,
46248
46603
  [courseMetadataApiSlice.reducerPath]: courseMetadataApiSlice.reducer,
46249
46604
  [edxSsoApiSlice.reducerPath]: edxSsoApiSlice.reducer,
46605
+ [studioAuthoringApiSlice.reducerPath]: studioAuthoringApiSlice.reducer,
46250
46606
  [clawApiSlice.reducerPath]: clawApiSlice.reducer,
46251
46607
  [evaluationsApiSlice.reducerPath]: evaluationsApiSlice.reducer,
46252
46608
  [watchedGroupsApiSlice.reducerPath]: watchedGroupsApiSlice.reducer,
46253
46609
  [chatPrivacyApiSlice.reducerPath]: chatPrivacyApiSlice.reducer,
46254
46610
  [skillsApiSlice.reducerPath]: skillsApiSlice.reducer,
46611
+ [supportTicketsApiSlice.reducerPath]: supportTicketsApiSlice.reducer,
46255
46612
  };
46256
46613
  const mentorMiddleware = [
46257
46614
  mentorApiSlice.middleware,
@@ -46304,11 +46661,13 @@ const mentorMiddleware = [
46304
46661
  coursesApiSlice.middleware,
46305
46662
  courseMetadataApiSlice.middleware,
46306
46663
  edxSsoApiSlice.middleware,
46664
+ studioAuthoringApiSlice.middleware,
46307
46665
  clawApiSlice.middleware,
46308
46666
  evaluationsApiSlice.middleware,
46309
46667
  watchedGroupsApiSlice.middleware,
46310
46668
  chatPrivacyApiSlice.middleware,
46311
46669
  skillsApiSlice.middleware,
46670
+ supportTicketsApiSlice.middleware,
46312
46671
  ];
46313
46672
 
46314
46673
  const skillsReducer = {
@@ -46349,6 +46708,7 @@ const skillsReducer = {
46349
46708
  [coursesApiSlice.reducerPath]: coursesApiSlice.reducer,
46350
46709
  [courseMetadataApiSlice.reducerPath]: courseMetadataApiSlice.reducer,
46351
46710
  [edxSsoApiSlice.reducerPath]: edxSsoApiSlice.reducer,
46711
+ [studioAuthoringApiSlice.reducerPath]: studioAuthoringApiSlice.reducer,
46352
46712
  [watchedGroupsApiSlice.reducerPath]: watchedGroupsApiSlice.reducer,
46353
46713
  [chatPrivacyApiSlice.reducerPath]: chatPrivacyApiSlice.reducer,
46354
46714
  };
@@ -46390,16 +46750,20 @@ const skillsMiddleware = [
46390
46750
  coursesApiSlice.middleware,
46391
46751
  courseMetadataApiSlice.middleware,
46392
46752
  edxSsoApiSlice.middleware,
46753
+ studioAuthoringApiSlice.middleware,
46393
46754
  watchedGroupsApiSlice.middleware,
46394
46755
  chatPrivacyApiSlice.middleware,
46395
46756
  ];
46396
46757
 
46397
- const initializeDataLayer = (dmUrl, lmsUrl, legacyLmsUrl, storageService, httpErrorHandler = {}) => {
46758
+ const initializeDataLayer = (dmUrl, lmsUrl, legacyLmsUrl, storageService, httpErrorHandler = {}, studioUrl) => {
46398
46759
  IblDataLayer.storage = storageService;
46399
46760
  Config.dmUrl = dmUrl;
46400
46761
  Config.lmsUrl = lmsUrl;
46401
46762
  Config.legacyLmsUrl = legacyLmsUrl;
46402
46763
  Config.httpErrorHandlers = httpErrorHandler;
46764
+ if (studioUrl) {
46765
+ Config.studioUrl = studioUrl;
46766
+ }
46403
46767
  };
46404
46768
 
46405
46769
  exports.APP_IDENTIFIERS = APP_IDENTIFIERS;
@@ -46467,7 +46831,11 @@ exports.PROJECTS_QUERY_KEYS = PROJECTS_QUERY_KEYS;
46467
46831
  exports.QUERY_PARAMS = QUERY_PARAMS;
46468
46832
  exports.RETIREMENT_ENDPOINTS = RETIREMENT_ENDPOINTS;
46469
46833
  exports.STORAGE_KEYS = STORAGE_KEYS;
46834
+ exports.STUDIO_AUTHORING_ENDPOINTS = STUDIO_AUTHORING_ENDPOINTS;
46470
46835
  exports.SUGGESTED_PRIVACY_ENTITIES = SUGGESTED_PRIVACY_ENTITIES;
46836
+ exports.SUPPORT_TICKETS_ENDPOINTS = SUPPORT_TICKETS_ENDPOINTS;
46837
+ exports.SUPPORT_TICKETS_REDUCER_PATH = SUPPORT_TICKETS_REDUCER_PATH;
46838
+ exports.SUPPORT_TICKETS_TAGS = SUPPORT_TICKETS_TAGS;
46471
46839
  exports.TENANT_IDENTIFIERS = TENANT_IDENTIFIERS;
46472
46840
  exports.TENANT_LOGO_ENDPOINTS = TENANT_LOGO_ENDPOINTS;
46473
46841
  exports.TENANT_LOGO_QUERY_KEYS = TENANT_LOGO_QUERY_KEYS;
@@ -46556,6 +46924,8 @@ exports.skillsApiSlice = skillsApiSlice;
46556
46924
  exports.skillsMiddleware = skillsMiddleware;
46557
46925
  exports.skillsReducer = skillsReducer;
46558
46926
  exports.stripeApiSlice = stripeApiSlice;
46927
+ exports.studioAuthoringApiSlice = studioAuthoringApiSlice;
46928
+ exports.supportTicketsApiSlice = supportTicketsApiSlice;
46559
46929
  exports.tenantApiReducer = tenantApiReducer;
46560
46930
  exports.tenantApiSlice = tenantApiSlice;
46561
46931
  exports.tenantLogoApiSlice = tenantLogoApiSlice;
@@ -46573,6 +46943,7 @@ exports.useCancelSubscriptionMutation = useCancelSubscriptionMutation;
46573
46943
  exports.useChatWithWorkflowMutation = useChatWithWorkflowMutation;
46574
46944
  exports.useCheckAccessQuery = useCheckAccessQuery;
46575
46945
  exports.useCheckAccessUnscopedQuery = useCheckAccessUnscopedQuery;
46946
+ exports.useCloseSupportTicketMutation = useCloseSupportTicketMutation;
46576
46947
  exports.useConnectedServicesCallbackQuery = useConnectedServicesCallbackQuery;
46577
46948
  exports.useCreateAdminProjectMutation = useCreateAdminProjectMutation;
46578
46949
  exports.useCreateAgentSkillMutation = useCreateAgentSkillMutation;
@@ -46636,6 +47007,9 @@ exports.useCreateSessionIdMutation = useCreateSessionIdMutation;
46636
47007
  exports.useCreateShareableLinkMutation = useCreateShareableLinkMutation;
46637
47008
  exports.useCreateStripeCheckoutSessionMutation = useCreateStripeCheckoutSessionMutation;
46638
47009
  exports.useCreateStripeCustomerPortalMutation = useCreateStripeCustomerPortalMutation;
47010
+ exports.useCreateStudioCourseMutation = useCreateStudioCourseMutation;
47011
+ exports.useCreateStudioXblockMutation = useCreateStudioXblockMutation;
47012
+ exports.useCreateSupportTicketMessageMutation = useCreateSupportTicketMessageMutation;
46639
47013
  exports.useCreateTrainingDocumentRetrainScheduleMutation = useCreateTrainingDocumentRetrainScheduleMutation;
46640
47014
  exports.useCreateUserCompanyMutation = useCreateUserCompanyMutation;
46641
47015
  exports.useCreateUserEducationMutation = useCreateUserEducationMutation;
@@ -46684,6 +47058,9 @@ exports.useDeleteRbacGroupMutation = useDeleteRbacGroupMutation;
46684
47058
  exports.useDeleteRbacPolicyMutation = useDeleteRbacPolicyMutation;
46685
47059
  exports.useDeleteRbacRoleMutation = useDeleteRbacRoleMutation;
46686
47060
  exports.useDeleteRecommendedPromptMutation = useDeleteRecommendedPromptMutation;
47061
+ exports.useDeleteStudioCourseMutation = useDeleteStudioCourseMutation;
47062
+ exports.useDeleteSupportTicketMessageMutation = useDeleteSupportTicketMessageMutation;
47063
+ exports.useDeleteSupportTicketMutation = useDeleteSupportTicketMutation;
46687
47064
  exports.useDeleteTrainingDocumentMutation = useDeleteTrainingDocumentMutation;
46688
47065
  exports.useDeleteUserEducationMutation = useDeleteUserEducationMutation;
46689
47066
  exports.useDeleteUserExperienceMutation = useDeleteUserExperienceMutation;
@@ -46874,6 +47251,10 @@ exports.useGetStripeConnectStatusQuery = useGetStripeConnectStatusQuery;
46874
47251
  exports.useGetStripeContextQuery = useGetStripeContextQuery;
46875
47252
  exports.useGetStripePricingPageSessionQuery = useGetStripePricingPageSessionQuery;
46876
47253
  exports.useGetStudentMentorCreationStatusQuery = useGetStudentMentorCreationStatusQuery;
47254
+ exports.useGetSupportTicketMessageQuery = useGetSupportTicketMessageQuery;
47255
+ exports.useGetSupportTicketMessagesQuery = useGetSupportTicketMessagesQuery;
47256
+ exports.useGetSupportTicketQuery = useGetSupportTicketQuery;
47257
+ exports.useGetSupportTicketsQuery = useGetSupportTicketsQuery;
46877
47258
  exports.useGetTemplateDetailsQuery = useGetTemplateDetailsQuery;
46878
47259
  exports.useGetTemplatesQuery = useGetTemplatesQuery;
46879
47260
  exports.useGetTenantChatPrivacyConfigQuery = useGetTenantChatPrivacyConfigQuery;
@@ -47067,6 +47448,10 @@ exports.useLazyGetStripeConnectDashboardQuery = useLazyGetStripeConnectDashboard
47067
47448
  exports.useLazyGetStripeConnectStatusQuery = useLazyGetStripeConnectStatusQuery;
47068
47449
  exports.useLazyGetStripeContextQuery = useLazyGetStripeContextQuery;
47069
47450
  exports.useLazyGetStripePricingPageSessionQuery = useLazyGetStripePricingPageSessionQuery;
47451
+ exports.useLazyGetSupportTicketMessageQuery = useLazyGetSupportTicketMessageQuery;
47452
+ exports.useLazyGetSupportTicketMessagesQuery = useLazyGetSupportTicketMessagesQuery;
47453
+ exports.useLazyGetSupportTicketQuery = useLazyGetSupportTicketQuery;
47454
+ exports.useLazyGetSupportTicketsQuery = useLazyGetSupportTicketsQuery;
47070
47455
  exports.useLazyGetTemplateDetailsQuery = useLazyGetTemplateDetailsQuery;
47071
47456
  exports.useLazyGetTemplatesQuery = useLazyGetTemplatesQuery;
47072
47457
  exports.useLazyGetTenantChatPrivacyConfigQuery = useLazyGetTenantChatPrivacyConfigQuery;
@@ -47147,6 +47532,8 @@ exports.usePartialUpdateMCPServerMutation = usePartialUpdateMCPServerMutation;
47147
47532
  exports.usePartialUpdatePeriodicAgentMutation = usePartialUpdatePeriodicAgentMutation;
47148
47533
  exports.usePartialUpdateRbacRoleMutation = usePartialUpdateRbacRoleMutation;
47149
47534
  exports.usePatchMCPServerConnectionMutation = usePatchMCPServerConnectionMutation;
47535
+ exports.usePatchSupportTicketMessageMutation = usePatchSupportTicketMessageMutation;
47536
+ exports.usePatchSupportTicketMutation = usePatchSupportTicketMutation;
47150
47537
  exports.usePatchWorkflowMutation = usePatchWorkflowMutation;
47151
47538
  exports.usePlatformInvitationsQuery = usePlatformInvitationsQuery;
47152
47539
  exports.usePlatformUserGroupsQuery = usePlatformUserGroupsQuery;
@@ -47165,6 +47552,7 @@ exports.useSendNotificationMutation = useSendNotificationMutation;
47165
47552
  exports.useSetCurrentVersionMutation = useSetCurrentVersionMutation;
47166
47553
  exports.useSetPlatformConfigurationsMutation = useSetPlatformConfigurationsMutation;
47167
47554
  exports.useSetStudentMentorCreationStatusMutation = useSetStudentMentorCreationStatusMutation;
47555
+ exports.useSetStudioAdvancedSettingsMutation = useSetStudioAdvancedSettingsMutation;
47168
47556
  exports.useStarMentorMutation = useStarMentorMutation;
47169
47557
  exports.useStarredMentorsQuery = useStarredMentorsQuery;
47170
47558
  exports.useStartEvalRunMutation = useStartEvalRunMutation;
@@ -47218,6 +47606,10 @@ exports.useUpdateRbacRoleMutation = useUpdateRbacRoleMutation;
47218
47606
  exports.useUpdateRecommendedPromptMutation = useUpdateRecommendedPromptMutation;
47219
47607
  exports.useUpdateSessionDisableChathistoryMutation = useUpdateSessionDisableChathistoryMutation;
47220
47608
  exports.useUpdateShareableLinkMutation = useUpdateShareableLinkMutation;
47609
+ exports.useUpdateStudioCourseSettingsMutation = useUpdateStudioCourseSettingsMutation;
47610
+ exports.useUpdateStudioXblockMutation = useUpdateStudioXblockMutation;
47611
+ exports.useUpdateSupportTicketMessageMutation = useUpdateSupportTicketMessageMutation;
47612
+ exports.useUpdateSupportTicketMutation = useUpdateSupportTicketMutation;
47221
47613
  exports.useUpdateTemplateMutation = useUpdateTemplateMutation;
47222
47614
  exports.useUpdateTenantChatPrivacyConfigMutation = useUpdateTenantChatPrivacyConfigMutation;
47223
47615
  exports.useUpdateTenantMetadataMutation = useUpdateTenantMetadataMutation;
@@ -47242,6 +47634,9 @@ exports.useUploadDarkLogoMutation = useUploadDarkLogoMutation;
47242
47634
  exports.useUploadEvalDatasetCsvMutation = useUploadEvalDatasetCsvMutation;
47243
47635
  exports.useUploadLightLogoMutation = useUploadLightLogoMutation;
47244
47636
  exports.useUploadProfileImageMutation = useUploadProfileImageMutation;
47637
+ exports.useUploadStudioCourseAssetMutation = useUploadStudioCourseAssetMutation;
47638
+ exports.useUploadStudioCourseVideoMutation = useUploadStudioCourseVideoMutation;
47639
+ exports.useUploadStudioScormPackageMutation = useUploadStudioScormPackageMutation;
47245
47640
  exports.useUsersGradesPassedQuery = useUsersGradesPassedQuery;
47246
47641
  exports.useValidateWorkflowMutation = useValidateWorkflowMutation;
47247
47642
  exports.userApiSlice = userApiSlice;