@iblai/data-layer 1.12.5 → 1.12.6
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 +500 -7
- package/dist/index.esm.js +52 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +55 -1
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/src/features/notifications/__tests__/notifications-templates.test.d.ts +1 -0
- package/dist/src/features/notifications/constants.d.ts +9 -0
- package/dist/src/features/notifications/custom-api-slice.d.ts +391 -0
- package/dist/src/features/notifications/types.d.ts +96 -5
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -43839,6 +43839,7 @@ const NOTIFICATIONS_CUSTOM_TAGS = {
|
|
|
43839
43839
|
TEMPLATE_DETAILS: 'NOTIFICATIONS_CUSTOM_TEMPLATE_DETAILS',
|
|
43840
43840
|
UPDATE_TEMPLATE: 'NOTIFICATIONS_CUSTOM_UPDATE_TEMPLATE',
|
|
43841
43841
|
TOGGLE_TEMPLATE: 'NOTIFICATIONS_CUSTOM_TOGGLE_TEMPLATE',
|
|
43842
|
+
RESET_TEMPLATE: 'NOTIFICATIONS_CUSTOM_RESET_TEMPLATE',
|
|
43842
43843
|
};
|
|
43843
43844
|
const NOTIFICATIONS_CUSTOM_ENDPOINTS = {
|
|
43844
43845
|
GET_TEMPLATES: {
|
|
@@ -43857,6 +43858,14 @@ const NOTIFICATIONS_CUSTOM_ENDPOINTS = {
|
|
|
43857
43858
|
service: exports.SERVICES.DM,
|
|
43858
43859
|
path: (platformKey, notificationType) => `/api/notification/v1/platforms/${platformKey}/templates/${notificationType}/toggle/`,
|
|
43859
43860
|
},
|
|
43861
|
+
RESET_TEMPLATE: {
|
|
43862
|
+
service: exports.SERVICES.DM,
|
|
43863
|
+
path: (platformKey, notificationType) => `/api/notification/v1/platforms/${platformKey}/templates/${notificationType}/reset/`,
|
|
43864
|
+
},
|
|
43865
|
+
TEST_TEMPLATE: {
|
|
43866
|
+
service: exports.SERVICES.DM,
|
|
43867
|
+
path: (platformKey, notificationType) => `/api/notification/v1/platforms/${platformKey}/templates/${notificationType}/test/`,
|
|
43868
|
+
},
|
|
43860
43869
|
};
|
|
43861
43870
|
|
|
43862
43871
|
const notificationsCustomApiSlice = react.createApi({
|
|
@@ -43906,9 +43915,50 @@ const notificationsCustomApiSlice = react.createApi({
|
|
|
43906
43915
|
},
|
|
43907
43916
|
invalidatesTags: [NOTIFICATIONS_CUSTOM_TAGS.TEMPLATES],
|
|
43908
43917
|
}),
|
|
43918
|
+
/**
|
|
43919
|
+
* Discards the platform-specific copy of the template and reverts to the
|
|
43920
|
+
* platform default.
|
|
43921
|
+
*/
|
|
43922
|
+
resetTemplate: builder.mutation({
|
|
43923
|
+
query: (args) => {
|
|
43924
|
+
return {
|
|
43925
|
+
url: NOTIFICATIONS_CUSTOM_ENDPOINTS.RESET_TEMPLATE.path(args.platformKey, args.notificationType),
|
|
43926
|
+
service: NOTIFICATIONS_CUSTOM_ENDPOINTS.RESET_TEMPLATE.service,
|
|
43927
|
+
method: 'POST',
|
|
43928
|
+
};
|
|
43929
|
+
},
|
|
43930
|
+
invalidatesTags: [
|
|
43931
|
+
NOTIFICATIONS_CUSTOM_TAGS.TEMPLATES,
|
|
43932
|
+
NOTIFICATIONS_CUSTOM_TAGS.TEMPLATE_DETAILS,
|
|
43933
|
+
],
|
|
43934
|
+
}),
|
|
43935
|
+
/** Sends a one-off rendering of the template to `testEmail`. */
|
|
43936
|
+
sendTestTemplateEmail: builder.mutation({
|
|
43937
|
+
query: (args) => {
|
|
43938
|
+
return {
|
|
43939
|
+
url: NOTIFICATIONS_CUSTOM_ENDPOINTS.TEST_TEMPLATE.path(args.platformKey, args.notificationType),
|
|
43940
|
+
service: NOTIFICATIONS_CUSTOM_ENDPOINTS.TEST_TEMPLATE.service,
|
|
43941
|
+
method: 'POST',
|
|
43942
|
+
body: {
|
|
43943
|
+
test_email: args.testEmail,
|
|
43944
|
+
},
|
|
43945
|
+
};
|
|
43946
|
+
},
|
|
43947
|
+
}),
|
|
43909
43948
|
}),
|
|
43910
43949
|
});
|
|
43911
|
-
const { useGetTemplatesQuery, useLazyGetTemplatesQuery, useGetTemplateDetailsQuery, useLazyGetTemplateDetailsQuery, useUpdateTemplateMutation, useToggleTemplateMutation, } = notificationsCustomApiSlice;
|
|
43950
|
+
const { useGetTemplatesQuery, useLazyGetTemplatesQuery, useGetTemplateDetailsQuery, useLazyGetTemplateDetailsQuery, useUpdateTemplateMutation, useToggleTemplateMutation, useResetTemplateMutation, useSendTestTemplateEmailMutation, } = notificationsCustomApiSlice;
|
|
43951
|
+
|
|
43952
|
+
/** Notification type of the "User Progress Summary" template. */
|
|
43953
|
+
const USER_PROGRESS_SUMMARY_TYPE = 'COURSES_PROGRESS_SUMMARY';
|
|
43954
|
+
const USER_PROGRESS_DATA_POINTS = [
|
|
43955
|
+
'courses_progressed',
|
|
43956
|
+
'courses_completed',
|
|
43957
|
+
'credentials_earned',
|
|
43958
|
+
'time_spent',
|
|
43959
|
+
'active_days',
|
|
43960
|
+
'mentors_accessed',
|
|
43961
|
+
];
|
|
43912
43962
|
|
|
43913
43963
|
const SUPPORT_TICKETS_REDUCER_PATH = 'supportTicketsApiSlice';
|
|
43914
43964
|
const SUPPORT_TICKETS_TAGS = {
|
|
@@ -47754,6 +47804,8 @@ exports.TENANT_LOGO_ENDPOINTS = TENANT_LOGO_ENDPOINTS;
|
|
|
47754
47804
|
exports.TENANT_LOGO_QUERY_KEYS = TENANT_LOGO_QUERY_KEYS;
|
|
47755
47805
|
exports.TENANT_LOGO_REDUCER_PATH = TENANT_LOGO_REDUCER_PATH;
|
|
47756
47806
|
exports.URL_PATTERNS = URL_PATTERNS;
|
|
47807
|
+
exports.USER_PROGRESS_DATA_POINTS = USER_PROGRESS_DATA_POINTS;
|
|
47808
|
+
exports.USER_PROGRESS_SUMMARY_TYPE = USER_PROGRESS_SUMMARY_TYPE;
|
|
47757
47809
|
exports.WATCHED_GROUPS_ENDPOINTS = WATCHED_GROUPS_ENDPOINTS;
|
|
47758
47810
|
exports.WATCHED_GROUPS_QUERY_KEYS = WATCHED_GROUPS_QUERY_KEYS;
|
|
47759
47811
|
exports.WATCHED_GROUPS_REDUCER_PATH = WATCHED_GROUPS_REDUCER_PATH;
|
|
@@ -48523,10 +48575,12 @@ exports.useRemoveWatchedUserMutation = useRemoveWatchedUserMutation;
|
|
|
48523
48575
|
exports.useRenewApplicationMutation = useRenewApplicationMutation;
|
|
48524
48576
|
exports.useRenewSubscriptionMutation = useRenewSubscriptionMutation;
|
|
48525
48577
|
exports.useResetPasswordMutation = useResetPasswordMutation;
|
|
48578
|
+
exports.useResetTemplateMutation = useResetTemplateMutation;
|
|
48526
48579
|
exports.useRevokeShareableLinkMutation = useRevokeShareableLinkMutation;
|
|
48527
48580
|
exports.useSeedMentorsQuery = useSeedMentorsQuery;
|
|
48528
48581
|
exports.useSelfRetireMutation = useSelfRetireMutation;
|
|
48529
48582
|
exports.useSendNotificationMutation = useSendNotificationMutation;
|
|
48583
|
+
exports.useSendTestTemplateEmailMutation = useSendTestTemplateEmailMutation;
|
|
48530
48584
|
exports.useSetCurrentVersionMutation = useSetCurrentVersionMutation;
|
|
48531
48585
|
exports.useSetPlatformConfigurationsMutation = useSetPlatformConfigurationsMutation;
|
|
48532
48586
|
exports.useSetStudentMentorCreationStatusMutation = useSetStudentMentorCreationStatusMutation;
|