@iblai/data-layer 1.5.4 → 1.5.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 +2771 -2
- package/dist/index.esm.js +328 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +358 -0
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/src/features/mentor/privacy.d.ts +61 -0
- package/dist/src/features/watched-groups/__tests__/watched-groups.test.d.ts +1 -0
- package/dist/src/features/watched-groups/api-slice.d.ts +2481 -0
- package/dist/src/features/watched-groups/constants.d.ts +66 -0
- package/dist/src/features/watched-groups/types.d.ts +143 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/reducers/__tests__/reducers.test.d.ts +1 -0
- package/dist/tests/features/mentor/privacy.test.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { SERVICES } from '@data-layer/constants';
|
|
2
|
+
export declare const WATCHED_GROUPS_REDUCER_PATH = "watchedGroupsApiSlice";
|
|
3
|
+
export declare const WATCHED_GROUPS_QUERY_KEYS: {
|
|
4
|
+
readonly WATCHED_GROUPS: "WATCHED_GROUPS";
|
|
5
|
+
readonly WATCHED_GROUP: "WATCHED_GROUP";
|
|
6
|
+
readonly WATCHED_USERS: "WATCHED_USERS";
|
|
7
|
+
readonly WATCHERS: "WATCHERS";
|
|
8
|
+
readonly WATCHER: "WATCHER";
|
|
9
|
+
};
|
|
10
|
+
export declare const WATCHED_GROUPS_ENDPOINTS: {
|
|
11
|
+
LIST_WATCHED_GROUPS: {
|
|
12
|
+
service: SERVICES;
|
|
13
|
+
path: () => string;
|
|
14
|
+
};
|
|
15
|
+
CREATE_WATCHED_GROUP: {
|
|
16
|
+
service: SERVICES;
|
|
17
|
+
path: () => string;
|
|
18
|
+
};
|
|
19
|
+
GET_WATCHED_GROUP: {
|
|
20
|
+
service: SERVICES;
|
|
21
|
+
path: (id: number) => string;
|
|
22
|
+
};
|
|
23
|
+
UPDATE_WATCHED_GROUP: {
|
|
24
|
+
service: SERVICES;
|
|
25
|
+
path: (id: number) => string;
|
|
26
|
+
};
|
|
27
|
+
DELETE_WATCHED_GROUP: {
|
|
28
|
+
service: SERVICES;
|
|
29
|
+
path: (id: number) => string;
|
|
30
|
+
};
|
|
31
|
+
LIST_WATCHED_USERS: {
|
|
32
|
+
service: SERVICES;
|
|
33
|
+
path: (watchedGroupPk: number) => string;
|
|
34
|
+
};
|
|
35
|
+
ADD_WATCHED_USER: {
|
|
36
|
+
service: SERVICES;
|
|
37
|
+
path: (watchedGroupPk: number) => string;
|
|
38
|
+
};
|
|
39
|
+
REMOVE_WATCHED_USER: {
|
|
40
|
+
service: SERVICES;
|
|
41
|
+
path: (watchedGroupPk: number, id: number) => string;
|
|
42
|
+
};
|
|
43
|
+
LIST_WATCHERS: {
|
|
44
|
+
service: SERVICES;
|
|
45
|
+
path: (watchedGroupPk: number) => string;
|
|
46
|
+
};
|
|
47
|
+
ADD_WATCHER: {
|
|
48
|
+
service: SERVICES;
|
|
49
|
+
path: (watchedGroupPk: number) => string;
|
|
50
|
+
};
|
|
51
|
+
GET_WATCHER: {
|
|
52
|
+
service: SERVICES;
|
|
53
|
+
path: (watchedGroupPk: number, id: number) => string;
|
|
54
|
+
};
|
|
55
|
+
UPDATE_WATCHER: {
|
|
56
|
+
service: SERVICES;
|
|
57
|
+
path: (watchedGroupPk: number, id: number) => string;
|
|
58
|
+
};
|
|
59
|
+
DELETE_WATCHER: {
|
|
60
|
+
service: SERVICES;
|
|
61
|
+
path: (watchedGroupPk: number, id: number) => string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export declare const WATCHER_NOTIFICATION_EVENTS: readonly ["USER_NOTIF_COURSE_ENROLLMENT", "ADMIN_NOTIF_COURSE_ENROLLMENT", "USER_NOTIF_USER_INACTIVITY", "USER_NOTIF_COURSE_COMPLETION", "USER_NOTIF_CREDENTIALS", "USER_NOTIF_LEARNER_PROGRESS", "PROACTIVE_LEARNER_NOTIFICATION", "ACTIVITY_NEW_CONTENT", "ACTIVITY_COURSE_MILESTONE", "SKILL_MASTERY_CHANGE", "PROGRAM_ENROLLMENT_CONFIRMATION", "PATHWAY_ENROLLMENT_CONFIRMATION", "COURSE_SCHEDULE_CHANGE", "COURSES_PROGRESS_SUMMARY", "SUBSECTION_GRADE_UPDATE"];
|
|
65
|
+
export type WatcherNotificationEvent = (typeof WATCHER_NOTIFICATION_EVENTS)[number];
|
|
66
|
+
export declare const WATCHER_NOTIFICATION_EVENT_LABELS: Record<WatcherNotificationEvent, string>;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
export interface PaginatedResponse<T> {
|
|
2
|
+
count: number;
|
|
3
|
+
next: string | null;
|
|
4
|
+
previous: string | null;
|
|
5
|
+
results: T[];
|
|
6
|
+
}
|
|
7
|
+
export interface WatchedGroupListItem {
|
|
8
|
+
id: number;
|
|
9
|
+
name: string;
|
|
10
|
+
platform_key: string;
|
|
11
|
+
}
|
|
12
|
+
export interface WatchedGroupDetail {
|
|
13
|
+
id: number;
|
|
14
|
+
name: string;
|
|
15
|
+
platform_key: string;
|
|
16
|
+
watcher_count: number;
|
|
17
|
+
watchers: WatcherSummary[] | string[];
|
|
18
|
+
watched_user_count: number;
|
|
19
|
+
watched_users: WatchedUserSummary[] | string[];
|
|
20
|
+
}
|
|
21
|
+
export interface WatcherSummary {
|
|
22
|
+
id: number;
|
|
23
|
+
username: string;
|
|
24
|
+
email: string;
|
|
25
|
+
events: string | string[];
|
|
26
|
+
}
|
|
27
|
+
export interface WatchedUserSummary {
|
|
28
|
+
id: number;
|
|
29
|
+
username: string;
|
|
30
|
+
email: string;
|
|
31
|
+
}
|
|
32
|
+
export interface WatchedGroupListParams {
|
|
33
|
+
limit?: number;
|
|
34
|
+
offset?: number;
|
|
35
|
+
platform_key?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface WatchedGroupDetailParams {
|
|
38
|
+
platform_key?: string;
|
|
39
|
+
watched_user_limit?: number;
|
|
40
|
+
watcher_limit?: number;
|
|
41
|
+
}
|
|
42
|
+
export interface WatcherCreatePayload {
|
|
43
|
+
watcher_id: number;
|
|
44
|
+
events: string[];
|
|
45
|
+
}
|
|
46
|
+
export interface CreateWatchedGroupBody {
|
|
47
|
+
name: string;
|
|
48
|
+
watched_users?: number[];
|
|
49
|
+
watchers?: WatcherCreatePayload[];
|
|
50
|
+
owner_id?: number;
|
|
51
|
+
}
|
|
52
|
+
export interface UpdateWatchedGroupBody {
|
|
53
|
+
name: string;
|
|
54
|
+
}
|
|
55
|
+
export interface AddWatchedUserBody {
|
|
56
|
+
user_id: number;
|
|
57
|
+
}
|
|
58
|
+
export interface UpdateWatcherBody {
|
|
59
|
+
events: string[];
|
|
60
|
+
}
|
|
61
|
+
export type GetWatchedGroupsArgs = {
|
|
62
|
+
params?: WatchedGroupListParams;
|
|
63
|
+
};
|
|
64
|
+
export type GetWatchedGroupArgs = {
|
|
65
|
+
id: number;
|
|
66
|
+
params?: WatchedGroupDetailParams;
|
|
67
|
+
};
|
|
68
|
+
export type CreateWatchedGroupArgs = {
|
|
69
|
+
body: CreateWatchedGroupBody;
|
|
70
|
+
params?: WatchedGroupDetailParams;
|
|
71
|
+
};
|
|
72
|
+
export type UpdateWatchedGroupArgs = {
|
|
73
|
+
id: number;
|
|
74
|
+
body: UpdateWatchedGroupBody;
|
|
75
|
+
params?: {
|
|
76
|
+
platform_key?: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
export type DeleteWatchedGroupArgs = {
|
|
80
|
+
id: number;
|
|
81
|
+
params?: {
|
|
82
|
+
platform_key?: string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
export type GetWatchedUsersArgs = {
|
|
86
|
+
watchedGroupPk: number;
|
|
87
|
+
params?: {
|
|
88
|
+
limit?: number;
|
|
89
|
+
offset?: number;
|
|
90
|
+
platform_key?: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
export type AddWatchedUserArgs = {
|
|
94
|
+
watchedGroupPk: number;
|
|
95
|
+
body: AddWatchedUserBody;
|
|
96
|
+
params?: {
|
|
97
|
+
platform_key?: string;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
export type RemoveWatchedUserArgs = {
|
|
101
|
+
watchedGroupPk: number;
|
|
102
|
+
id: number;
|
|
103
|
+
params?: {
|
|
104
|
+
platform_key?: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
export type GetWatchersArgs = {
|
|
108
|
+
watchedGroupPk: number;
|
|
109
|
+
params?: {
|
|
110
|
+
limit?: number;
|
|
111
|
+
offset?: number;
|
|
112
|
+
platform_key?: string;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
export type AddWatcherArgs = {
|
|
116
|
+
watchedGroupPk: number;
|
|
117
|
+
body: WatcherCreatePayload;
|
|
118
|
+
params?: {
|
|
119
|
+
platform_key?: string;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
export type GetWatcherArgs = {
|
|
123
|
+
watchedGroupPk: number;
|
|
124
|
+
id: number;
|
|
125
|
+
params?: {
|
|
126
|
+
platform_key?: string;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
export type UpdateWatcherArgs = {
|
|
130
|
+
watchedGroupPk: number;
|
|
131
|
+
id: number;
|
|
132
|
+
body: UpdateWatcherBody;
|
|
133
|
+
params?: {
|
|
134
|
+
platform_key?: string;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
export type DeleteWatcherArgs = {
|
|
138
|
+
watchedGroupPk: number;
|
|
139
|
+
id: number;
|
|
140
|
+
params?: {
|
|
141
|
+
platform_key?: string;
|
|
142
|
+
};
|
|
143
|
+
};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -63,6 +63,7 @@ export * from './features/mentor/custom-api-slice';
|
|
|
63
63
|
export * from './features/moderation-logs/api-slice';
|
|
64
64
|
export * from './features/mentor/constants';
|
|
65
65
|
export * from './features/mentor/types';
|
|
66
|
+
export * from './features/mentor/privacy';
|
|
66
67
|
export * from './features/memory/api-slice';
|
|
67
68
|
export * from './features/memory/constants';
|
|
68
69
|
export * from './features/memory/types';
|
|
@@ -104,6 +105,9 @@ export * from './features/workflows/constants';
|
|
|
104
105
|
export * from './features/audit-logs/api-slice';
|
|
105
106
|
export * from './features/audit-logs/constants';
|
|
106
107
|
export * from './features/audit-logs/types';
|
|
108
|
+
export * from './features/watched-groups/api-slice';
|
|
109
|
+
export * from './features/watched-groups/constants';
|
|
110
|
+
export * from './features/watched-groups/types';
|
|
107
111
|
export * from './reducers';
|
|
108
112
|
export * from './utils';
|
|
109
113
|
export type { CustomQueryArgs } from './features/utils';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|