@iblai/data-layer 1.8.6 → 1.8.8
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 +27 -326
- package/dist/index.esm.js +46 -31
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +45 -32
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/src/features/analytics/custom-api-slice.d.ts +8 -311
- package/dist/src/features/reports/api-slice.d.ts +1 -1
- package/dist/src/features/user/api-slice.d.ts +14 -14
- package/dist/src/features/user/types.d.ts +6 -0
- package/dist/tests/features/analytics/custom-api-slice.test.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var react = require('@reduxjs/toolkit/query/react');
|
|
4
4
|
var query = require('@reduxjs/toolkit/query');
|
|
5
|
+
var react$1 = require('react');
|
|
5
6
|
|
|
6
7
|
class ApiError extends Error {
|
|
7
8
|
constructor(request, response, message) {
|
|
@@ -40241,8 +40242,8 @@ const USERS_ENDPOINTS = {
|
|
|
40241
40242
|
path: () => `/api/ibl/users/manage/metadata/`,
|
|
40242
40243
|
},
|
|
40243
40244
|
RESET_PASSWORD: {
|
|
40244
|
-
service: exports.SERVICES.
|
|
40245
|
-
path: () => `/account/password`,
|
|
40245
|
+
service: exports.SERVICES.LEGACY_LMS,
|
|
40246
|
+
path: () => `/ibl/edx/account/api/reset-password-token`,
|
|
40246
40247
|
},
|
|
40247
40248
|
UPDATE_USER_ROLES: {
|
|
40248
40249
|
service: exports.SERVICES.LMS,
|
|
@@ -40323,12 +40324,26 @@ const userApiSlice = react.createApi({
|
|
|
40323
40324
|
invalidatesTags: USERS_QUERY_KEYS.GET_USER_METADATA(),
|
|
40324
40325
|
}),
|
|
40325
40326
|
resetPassword: builder.mutation({
|
|
40326
|
-
query: (
|
|
40327
|
-
|
|
40328
|
-
|
|
40329
|
-
|
|
40330
|
-
|
|
40331
|
-
|
|
40327
|
+
query: ({ email, platformKey, redirectTo, app }) => {
|
|
40328
|
+
const payload = {
|
|
40329
|
+
email,
|
|
40330
|
+
};
|
|
40331
|
+
if (platformKey) {
|
|
40332
|
+
payload.platform_key = platformKey;
|
|
40333
|
+
}
|
|
40334
|
+
if (redirectTo) {
|
|
40335
|
+
payload.redirect_to = redirectTo;
|
|
40336
|
+
}
|
|
40337
|
+
if (app) {
|
|
40338
|
+
payload.app = app;
|
|
40339
|
+
}
|
|
40340
|
+
return {
|
|
40341
|
+
url: USERS_ENDPOINTS.RESET_PASSWORD.path(),
|
|
40342
|
+
service: USERS_ENDPOINTS.RESET_PASSWORD.service,
|
|
40343
|
+
body: payload,
|
|
40344
|
+
method: 'POST',
|
|
40345
|
+
};
|
|
40346
|
+
},
|
|
40332
40347
|
}),
|
|
40333
40348
|
updateUserRole: builder.mutation({
|
|
40334
40349
|
query: (args) => ({
|
|
@@ -42206,24 +42221,24 @@ const analyticsApiSlice = react.createApi({
|
|
|
42206
42221
|
});
|
|
42207
42222
|
const { useGetOverviewSummaryQuery, useGetConversationQuery, useGetMostDiscussedTopicsQuery, useGetAverageMessagesPerSessionQuery, useGetRegisteredUsersTrendQuery, useGetUserMetricsQuery, useGetUserMetricsPieChartQuery, useGetUserCohortsOverTimeQuery, useGetTopStudentsByChatMessagesQuery, useGetTopicOverviewQuery, useGetTopicsSummaryQuery, useGetTopicStatisticsQuery, useGetTopicsStatsQuery, useGetUsersStatsQuery, useGetSessionStatsQuery, useGetTopicsDetailsStatsQuery, useGetAccessTimeHeatmapQuery, useGetUserDetailsStatsQuery, useGetAverageRatingQuery, useGetFinancialStatsQuery, useGetDetailedFinancialStatsQuery, useGetTranscriptsMessagesQuery, useGetTranscriptsMessagesDetailsQuery, useTimeTrackingMutation, useGetTranscriptsConversationHeadlineQuery, useGetContentAnalyticsQuery, useGetContentAnalyticsDetailsQuery, useGetLearnerDetailsQuery, } = analyticsApiSlice;
|
|
42208
42223
|
|
|
42209
|
-
const
|
|
42210
|
-
|
|
42211
|
-
|
|
42212
|
-
|
|
42213
|
-
|
|
42214
|
-
getDownloadReportFromURL: builder.query({
|
|
42215
|
-
query: ({ url }) => ({
|
|
42216
|
-
url: url,
|
|
42217
|
-
service: exports.SERVICES.DM,
|
|
42224
|
+
const useLazyGetDownloadReportFromURLQuery = () => {
|
|
42225
|
+
const fetchReportBlob = react$1.useCallback(({ url }) => {
|
|
42226
|
+
const promise = (async () => {
|
|
42227
|
+
const authHeaders = await getHeaders(exports.SERVICES.DM);
|
|
42228
|
+
const response = await fetch(url, {
|
|
42218
42229
|
method: 'GET',
|
|
42219
|
-
|
|
42220
|
-
|
|
42221
|
-
|
|
42222
|
-
|
|
42223
|
-
|
|
42224
|
-
|
|
42225
|
-
|
|
42226
|
-
|
|
42230
|
+
credentials: 'omit',
|
|
42231
|
+
headers: { ...(authHeaders !== null && authHeaders !== void 0 ? authHeaders : {}) },
|
|
42232
|
+
});
|
|
42233
|
+
if (!response.ok) {
|
|
42234
|
+
throw new Error(`Failed to download report (status ${response.status})`);
|
|
42235
|
+
}
|
|
42236
|
+
return response.blob();
|
|
42237
|
+
})();
|
|
42238
|
+
return { unwrap: () => promise };
|
|
42239
|
+
}, []);
|
|
42240
|
+
return [fetchReportBlob];
|
|
42241
|
+
};
|
|
42227
42242
|
|
|
42228
42243
|
const reportsApiSlice = react.createApi({
|
|
42229
42244
|
reducerPath: 'reportsApiSlice',
|
|
@@ -42265,7 +42280,11 @@ const reportsApiSlice = react.createApi({
|
|
|
42265
42280
|
providesTags: ['reports'],
|
|
42266
42281
|
}),
|
|
42267
42282
|
getReportDetail: builder.query({
|
|
42268
|
-
...buildEndpointFromDmService(ReportsService.reportsPlatformsRetrieve2
|
|
42283
|
+
...buildEndpointFromDmService(({ key, reportName, mentor_unique_id }) => ReportsService.reportsPlatformsRetrieve2({
|
|
42284
|
+
key,
|
|
42285
|
+
reportName,
|
|
42286
|
+
mentorUniqueId: mentor_unique_id,
|
|
42287
|
+
})),
|
|
42269
42288
|
providesTags: ['reportDetail'],
|
|
42270
42289
|
}),
|
|
42271
42290
|
createReport: builder.mutation({
|
|
@@ -45606,7 +45625,6 @@ const mentorReducer = {
|
|
|
45606
45625
|
[artifactsApiSlice.reducerPath]: artifactsApiSlice.reducer,
|
|
45607
45626
|
[coreFakeCustomPublicImageAssetApiSlice.reducerPath]: coreFakeCustomPublicImageAssetApiSlice.reducer,
|
|
45608
45627
|
[billingCustomSlice.reducerPath]: billingCustomSlice.reducer,
|
|
45609
|
-
[analyticsCustomSlice.reducerPath]: analyticsCustomSlice.reducer,
|
|
45610
45628
|
[retirementApiSlice.reducerPath]: retirementApiSlice.reducer,
|
|
45611
45629
|
[auditLogsApiSlice.reducerPath]: auditLogsApiSlice.reducer,
|
|
45612
45630
|
[monetizationApiSlice.reducerPath]: monetizationApiSlice.reducer,
|
|
@@ -45662,7 +45680,6 @@ const mentorMiddleware = [
|
|
|
45662
45680
|
artifactsApiSlice.middleware,
|
|
45663
45681
|
coreFakeCustomPublicImageAssetApiSlice.middleware,
|
|
45664
45682
|
billingCustomSlice.middleware,
|
|
45665
|
-
analyticsCustomSlice.middleware,
|
|
45666
45683
|
retirementApiSlice.middleware,
|
|
45667
45684
|
auditLogsApiSlice.middleware,
|
|
45668
45685
|
monetizationApiSlice.middleware,
|
|
@@ -45706,7 +45723,6 @@ const skillsReducer = {
|
|
|
45706
45723
|
[artifactsApiSlice.reducerPath]: artifactsApiSlice.reducer,
|
|
45707
45724
|
[coreFakeCustomPublicImageAssetApiSlice.reducerPath]: coreFakeCustomPublicImageAssetApiSlice.reducer,
|
|
45708
45725
|
[billingCustomSlice.reducerPath]: billingCustomSlice.reducer,
|
|
45709
|
-
[analyticsCustomSlice.reducerPath]: analyticsCustomSlice.reducer,
|
|
45710
45726
|
[retirementApiSlice.reducerPath]: retirementApiSlice.reducer,
|
|
45711
45727
|
[monetizationApiSlice.reducerPath]: monetizationApiSlice.reducer,
|
|
45712
45728
|
[memoryApiSlice.reducerPath]: memoryApiSlice.reducer,
|
|
@@ -45748,7 +45764,6 @@ const skillsMiddleware = [
|
|
|
45748
45764
|
artifactsApiSlice.middleware,
|
|
45749
45765
|
coreFakeCustomPublicImageAssetApiSlice.middleware,
|
|
45750
45766
|
billingCustomSlice.middleware,
|
|
45751
|
-
analyticsCustomSlice.middleware,
|
|
45752
45767
|
retirementApiSlice.middleware,
|
|
45753
45768
|
monetizationApiSlice.middleware,
|
|
45754
45769
|
memoryApiSlice.middleware,
|
|
@@ -45844,7 +45859,6 @@ exports.WORKFLOWS_ENDPOINTS = WORKFLOWS_ENDPOINTS;
|
|
|
45844
45859
|
exports.WORKFLOWS_QUERY_KEYS = WORKFLOWS_QUERY_KEYS;
|
|
45845
45860
|
exports.WORKFLOWS_REDUCER_PATH = WORKFLOWS_REDUCER_PATH;
|
|
45846
45861
|
exports.analyticsApiSlice = analyticsApiSlice;
|
|
45847
|
-
exports.analyticsCustomSlice = analyticsCustomSlice;
|
|
45848
45862
|
exports.apiKeysApiReducer = apiKeysApiReducer;
|
|
45849
45863
|
exports.apiKeysApiSlice = apiKeysApiSlice;
|
|
45850
45864
|
exports.appApiReducer = appApiReducer;
|
|
@@ -46101,7 +46115,6 @@ exports.useGetDepartmentMemberCheckQuery = useGetDepartmentMemberCheckQuery;
|
|
|
46101
46115
|
exports.useGetDesiredSkillsQuery = useGetDesiredSkillsQuery;
|
|
46102
46116
|
exports.useGetDetailedFinancialStatsQuery = useGetDetailedFinancialStatsQuery;
|
|
46103
46117
|
exports.useGetDisclaimersQuery = useGetDisclaimersQuery;
|
|
46104
|
-
exports.useGetDownloadReportFromURLQuery = useGetDownloadReportFromURLQuery;
|
|
46105
46118
|
exports.useGetEdxSSOTokenQuery = useGetEdxSSOTokenQuery;
|
|
46106
46119
|
exports.useGetEnrollmentCourseSearchQuery = useGetEnrollmentCourseSearchQuery;
|
|
46107
46120
|
exports.useGetExamInfoQuery = useGetExamInfoQuery;
|