@headless-lms/core 0.2.0 → 0.4.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/assets/events.d.ts +42 -24
- package/dist/assets/events.js +1 -1
- package/dist/assets/events.js.map +1 -1
- package/dist/assets/file-urls.d.ts +20 -0
- package/dist/assets/file-urls.js +25 -0
- package/dist/assets/file-urls.js.map +1 -0
- package/dist/assets/index.d.ts +6 -4
- package/dist/assets/index.js +4 -2
- package/dist/assets/jobs.d.ts +15 -0
- package/dist/assets/jobs.js +30 -0
- package/dist/assets/jobs.js.map +1 -0
- package/dist/assets/model.d.ts +2 -2
- package/dist/assets/ports.d.ts +46 -15
- package/dist/assets/service.d.ts +38 -7
- package/dist/assets/service.js +287 -38
- package/dist/assets/service.js.map +1 -1
- package/dist/automations/actions.d.ts +13 -24
- package/dist/automations/actions.js +106 -42
- package/dist/automations/actions.js.map +1 -1
- package/dist/automations/catalog.js +226 -3
- package/dist/automations/catalog.js.map +1 -1
- package/dist/automations/community-derivations.d.ts +14 -0
- package/dist/automations/community-derivations.js +439 -0
- package/dist/automations/community-derivations.js.map +1 -0
- package/dist/automations/community-mail.d.ts +98 -0
- package/dist/automations/community-mail.js +70 -0
- package/dist/automations/community-mail.js.map +1 -0
- package/dist/automations/events.d.ts +18 -0
- package/dist/automations/index.d.ts +13 -4
- package/dist/automations/index.js +10 -2
- package/dist/automations/model.d.ts +10 -3
- package/dist/automations/model.js +15 -2
- package/dist/automations/model.js.map +1 -1
- package/dist/automations/notifications/debounce.d.ts +25 -0
- package/dist/automations/notifications/debounce.js +93 -0
- package/dist/automations/notifications/debounce.js.map +1 -0
- package/dist/automations/notifications/defaults.d.ts +8 -0
- package/dist/automations/notifications/defaults.js +316 -0
- package/dist/automations/notifications/defaults.js.map +1 -0
- package/dist/automations/notifications/delivery.d.ts +28 -0
- package/dist/automations/notifications/delivery.js +88 -0
- package/dist/automations/notifications/delivery.js.map +1 -0
- package/dist/automations/notifications/processor.d.ts +64 -0
- package/dist/automations/notifications/processor.js +270 -0
- package/dist/automations/notifications/processor.js.map +1 -0
- package/dist/automations/notifications/rules/content.d.ts +6 -0
- package/dist/automations/notifications/rules/content.js +39 -0
- package/dist/automations/notifications/rules/content.js.map +1 -0
- package/dist/automations/notifications/rules/discussion.d.ts +7 -0
- package/dist/automations/notifications/rules/discussion.js +678 -0
- package/dist/automations/notifications/rules/discussion.js.map +1 -0
- package/dist/automations/notifications/rules/entitlements.d.ts +6 -0
- package/dist/automations/notifications/rules/entitlements.js +249 -0
- package/dist/automations/notifications/rules/entitlements.js.map +1 -0
- package/dist/automations/notifications/rules/index.d.ts +6 -0
- package/dist/automations/notifications/rules/index.js +15 -0
- package/dist/automations/notifications/rules/index.js.map +1 -0
- package/dist/automations/notifications/rules/organizations.d.ts +6 -0
- package/dist/automations/notifications/rules/organizations.js +28 -0
- package/dist/automations/notifications/rules/organizations.js.map +1 -0
- package/dist/automations/notifications/rules/recipients.d.ts +32 -0
- package/dist/automations/notifications/rules/recipients.js +99 -0
- package/dist/automations/notifications/rules/recipients.js.map +1 -0
- package/dist/automations/notifications/service.d.ts +27 -0
- package/dist/automations/notifications/service.js +45 -0
- package/dist/automations/notifications/service.js.map +1 -0
- package/dist/automations/notifications/types.d.ts +7 -0
- package/dist/automations/notifications/types.js +473 -0
- package/dist/automations/notifications/types.js.map +1 -0
- package/dist/automations/ports.d.ts +121 -3
- package/dist/automations/schedule.d.ts +6 -0
- package/dist/automations/schedule.js +41 -0
- package/dist/automations/schedule.js.map +1 -0
- package/dist/automations/service.d.ts +20 -4
- package/dist/automations/service.js +246 -45
- package/dist/automations/service.js.map +1 -1
- package/dist/content/events.d.ts +712 -50
- package/dist/content/events.js +55 -1
- package/dist/content/events.js.map +1 -1
- package/dist/content/index.d.ts +6 -4
- package/dist/content/index.js +3 -1
- package/dist/content/model.d.ts +2 -2
- package/dist/content/notification-categories.d.ts +36 -0
- package/dist/content/notification-categories.js +64 -0
- package/dist/content/notification-categories.js.map +1 -0
- package/dist/content/ports.d.ts +90 -18
- package/dist/content/service.d.ts +57 -18
- package/dist/content/service.js +520 -25
- package/dist/content/service.js.map +1 -1
- package/dist/content/titles.d.ts +22 -0
- package/dist/content/titles.js +69 -0
- package/dist/content/titles.js.map +1 -0
- package/dist/content/types.d.ts +2 -2
- package/dist/discussion/authors.d.ts +10 -0
- package/dist/discussion/authors.js +23 -0
- package/dist/discussion/authors.js.map +1 -0
- package/dist/discussion/chats.d.ts +109 -0
- package/dist/discussion/chats.js +831 -0
- package/dist/discussion/chats.js.map +1 -0
- package/dist/discussion/digests.d.ts +24 -0
- package/dist/discussion/digests.js +104 -0
- package/dist/discussion/digests.js.map +1 -0
- package/dist/discussion/events.d.ts +785 -56
- package/dist/discussion/events.js +165 -5
- package/dist/discussion/events.js.map +1 -1
- package/dist/discussion/index.d.ts +12 -3
- package/dist/discussion/index.js +9 -1
- package/dist/discussion/jobs.d.ts +16 -0
- package/dist/discussion/jobs.js +40 -0
- package/dist/discussion/jobs.js.map +1 -0
- package/dist/discussion/mentions.d.ts +11 -0
- package/dist/discussion/mentions.js +35 -0
- package/dist/discussion/mentions.js.map +1 -0
- package/dist/discussion/ports.d.ts +372 -28
- package/dist/discussion/ports.js +6 -1
- package/dist/discussion/ports.js.map +1 -0
- package/dist/discussion/posts.d.ts +113 -0
- package/dist/discussion/posts.js +775 -0
- package/dist/discussion/posts.js.map +1 -0
- package/dist/discussion/service.d.ts +42 -11
- package/dist/discussion/service.js +364 -85
- package/dist/discussion/service.js.map +1 -1
- package/dist/discussion/subscriptions.d.ts +37 -0
- package/dist/discussion/subscriptions.js +99 -0
- package/dist/discussion/subscriptions.js.map +1 -0
- package/dist/discussion/titles.d.ts +26 -0
- package/dist/discussion/titles.js +84 -0
- package/dist/discussion/titles.js.map +1 -0
- package/dist/entitlements/events.d.ts +178 -11
- package/dist/entitlements/events.js +28 -1
- package/dist/entitlements/events.js.map +1 -1
- package/dist/entitlements/index.d.ts +6 -4
- package/dist/entitlements/index.js +3 -1
- package/dist/entitlements/jobs.d.ts +12 -0
- package/dist/entitlements/jobs.js +18 -0
- package/dist/entitlements/jobs.js.map +1 -0
- package/dist/entitlements/model.d.ts +3 -2
- package/dist/entitlements/ports.d.ts +128 -11
- package/dist/entitlements/rules.d.ts +12 -0
- package/dist/entitlements/rules.js +17 -0
- package/dist/entitlements/rules.js.map +1 -0
- package/dist/entitlements/service.d.ts +57 -3
- package/dist/entitlements/service.js +492 -2
- package/dist/entitlements/service.js.map +1 -1
- package/dist/identity/access.d.ts +6 -0
- package/dist/identity/access.js +7 -0
- package/dist/identity/access.js.map +1 -0
- package/dist/identity/devices.d.ts +30 -0
- package/dist/identity/devices.js +107 -0
- package/dist/identity/devices.js.map +1 -0
- package/dist/identity/events.d.ts +2 -2
- package/dist/identity/index.d.ts +7 -4
- package/dist/identity/index.js +4 -1
- package/dist/identity/model.d.ts +2 -1
- package/dist/identity/notification-settings.d.ts +28 -0
- package/dist/identity/notification-settings.js +113 -0
- package/dist/identity/notification-settings.js.map +1 -0
- package/dist/identity/ports.d.ts +97 -3
- package/dist/identity/service.d.ts +14 -3
- package/dist/identity/service.js +62 -5
- package/dist/identity/service.js.map +1 -1
- package/dist/integrations/events.d.ts +3 -3
- package/dist/integrations/model.js +1 -1
- package/dist/integrations/model.js.map +1 -1
- package/dist/integrations/service.js +2 -2
- package/dist/integrations/service.js.map +1 -1
- package/dist/organizations/access-scopes.d.ts +19 -0
- package/dist/organizations/access-scopes.js +89 -0
- package/dist/organizations/access-scopes.js.map +1 -0
- package/dist/organizations/events.d.ts +75 -33
- package/dist/organizations/events.js +6 -0
- package/dist/organizations/events.js.map +1 -1
- package/dist/organizations/index.d.ts +8 -6
- package/dist/organizations/index.js +5 -3
- package/dist/organizations/members.d.ts +8 -5
- package/dist/organizations/members.js.map +1 -1
- package/dist/organizations/notification-categories.d.ts +32 -0
- package/dist/organizations/notification-categories.js +51 -0
- package/dist/organizations/notification-categories.js.map +1 -0
- package/dist/organizations/ports.d.ts +17 -11
- package/dist/organizations/roles.d.ts +6 -10
- package/dist/organizations/roles.js +19 -7
- package/dist/organizations/roles.js.map +1 -1
- package/dist/organizations/service.d.ts +22 -11
- package/dist/organizations/service.js +164 -47
- package/dist/organizations/service.js.map +1 -1
- package/dist/organizations/types.d.ts +1 -10
- package/dist/progress/events.d.ts +14 -14
- package/dist/progress/index.d.ts +2 -2
- package/dist/progress/ports.d.ts +6 -1
- package/dist/progress/service.d.ts +3 -1
- package/dist/progress/service.js +6 -2
- package/dist/progress/service.js.map +1 -1
- package/dist/reporting/admin/index.d.ts +4 -0
- package/dist/reporting/admin/index.js +2 -0
- package/dist/reporting/admin/model.d.ts +108 -0
- package/dist/reporting/admin/ports.d.ts +27 -0
- package/dist/reporting/admin/service.d.ts +22 -0
- package/dist/reporting/admin/service.js +38 -0
- package/dist/reporting/admin/service.js.map +1 -0
- package/dist/reporting/member/index.d.ts +5 -0
- package/dist/reporting/member/index.js +2 -0
- package/dist/reporting/member/model.d.ts +157 -0
- package/dist/reporting/member/ports.d.ts +48 -0
- package/dist/reporting/member/service.d.ts +92 -0
- package/dist/reporting/member/service.js +364 -0
- package/dist/reporting/member/service.js.map +1 -0
- package/dist/shared/actor.d.ts +9 -0
- package/dist/shared/errors.d.ts +19 -1
- package/dist/shared/errors.js +27 -1
- package/dist/shared/errors.js.map +1 -1
- package/dist/shared/id.d.ts +14 -0
- package/dist/shared/id.js +15 -1
- package/dist/shared/id.js.map +1 -1
- package/dist/shared/mailer.d.ts +15 -2
- package/dist/shared/mailer.js +32 -5
- package/dist/shared/mailer.js.map +1 -1
- package/dist/shared/network.d.ts +10 -0
- package/dist/shared/network.js +211 -0
- package/dist/shared/network.js.map +1 -0
- package/dist/shared/notification-categories.d.ts +16 -0
- package/dist/shared/notification-categories.js +94 -0
- package/dist/shared/notification-categories.js.map +1 -0
- package/dist/shared/notification-settings.d.ts +14 -0
- package/dist/shared/notification-settings.js +61 -0
- package/dist/shared/notification-settings.js.map +1 -0
- package/dist/shared/ports.d.ts +48 -2
- package/dist/shared/settings.d.ts +2 -1
- package/dist/shared/settings.js +1 -0
- package/dist/shared/settings.js.map +1 -1
- package/dist/types/assets.d.ts +2 -2
- package/dist/types/automations.d.ts +15 -1
- package/dist/types/content.d.ts +2 -2
- package/dist/types/discussion.d.ts +11 -3
- package/dist/types/email-templates.d.ts +216 -1
- package/dist/types/entitlements.d.ts +2 -2
- package/dist/types/identity.d.ts +48 -2
- package/dist/types/index.d.ts +9 -8
- package/dist/types/notifications.d.ts +157 -0
- package/dist/types/ports.d.ts +6 -0
- package/dist/types/schemas/assets.d.ts +65 -37
- package/dist/types/schemas/assets.js +17 -12
- package/dist/types/schemas/assets.js.map +1 -1
- package/dist/types/schemas/automations.d.ts +9 -1
- package/dist/types/schemas/automations.js +13 -6
- package/dist/types/schemas/automations.js.map +1 -1
- package/dist/types/schemas/content.d.ts +396 -3
- package/dist/types/schemas/content.js +161 -3
- package/dist/types/schemas/content.js.map +1 -1
- package/dist/types/schemas/discussion.d.ts +443 -3
- package/dist/types/schemas/discussion.js +233 -4
- package/dist/types/schemas/discussion.js.map +1 -1
- package/dist/types/schemas/entitlements.d.ts +36 -2
- package/dist/types/schemas/entitlements.js +23 -1
- package/dist/types/schemas/entitlements.js.map +1 -1
- package/dist/types/schemas/identity.d.ts +27 -1
- package/dist/types/schemas/identity.js +14 -2
- package/dist/types/schemas/identity.js.map +1 -1
- package/dist/types/schemas/index.d.ts +9 -8
- package/dist/types/schemas/index.js +9 -8
- package/dist/types/schemas/notifications.d.ts +95 -0
- package/dist/types/schemas/notifications.js +56 -0
- package/dist/types/schemas/notifications.js.map +1 -0
- package/dist/types/schemas/organizations.d.ts +8 -0
- package/dist/types/schemas/organizations.js +2 -0
- package/dist/types/schemas/organizations.js.map +1 -1
- package/dist/types/schemas/progress.d.ts +3 -3
- package/dist/types/schemas/shared.d.ts +3 -1
- package/dist/types/schemas/shared.js +5 -1
- package/dist/types/schemas/shared.js.map +1 -1
- package/package.json +2 -2
- package/dist/reporting/courses/index.d.ts +0 -4
- package/dist/reporting/courses/index.js +0 -2
- package/dist/reporting/courses/model.d.ts +0 -24
- package/dist/reporting/courses/ports.d.ts +0 -13
- package/dist/reporting/courses/service.d.ts +0 -19
- package/dist/reporting/courses/service.js +0 -20
- package/dist/reporting/courses/service.js.map +0 -1
- package/dist/reporting/dashboard/index.d.ts +0 -4
- package/dist/reporting/dashboard/index.js +0 -2
- package/dist/reporting/dashboard/model.d.ts +0 -14
- package/dist/reporting/dashboard/ports.d.ts +0 -13
- package/dist/reporting/dashboard/service.d.ts +0 -19
- package/dist/reporting/dashboard/service.js +0 -20
- package/dist/reporting/dashboard/service.js.map +0 -1
- package/dist/reporting/learn/index.d.ts +0 -5
- package/dist/reporting/learn/index.js +0 -2
- package/dist/reporting/learn/model.d.ts +0 -23
- package/dist/reporting/learn/ports.d.ts +0 -43
- package/dist/reporting/learn/service.d.ts +0 -49
- package/dist/reporting/learn/service.js +0 -116
- package/dist/reporting/learn/service.js.map +0 -1
- package/dist/reporting/students/index.d.ts +0 -4
- package/dist/reporting/students/index.js +0 -2
- package/dist/reporting/students/model.d.ts +0 -51
- package/dist/reporting/students/model.js +0 -1
- package/dist/reporting/students/ports.d.ts +0 -15
- package/dist/reporting/students/ports.js +0 -1
- package/dist/reporting/students/service.d.ts +0 -20
- package/dist/reporting/students/service.js +0 -23
- package/dist/reporting/students/service.js.map +0 -1
- /package/dist/reporting/{courses → admin}/model.js +0 -0
- /package/dist/reporting/{courses → admin}/ports.js +0 -0
- /package/dist/reporting/{dashboard → member}/model.js +0 -0
- /package/dist/reporting/{dashboard → member}/ports.js +0 -0
- /package/dist/{reporting/learn/model.js → shared/actor.js} +0 -0
- /package/dist/{reporting/learn/ports.js → types/notifications.js} +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//#region src/reporting/admin/service.ts
|
|
2
|
+
var AdminReportServiceImpl = class {
|
|
3
|
+
repo;
|
|
4
|
+
constructor(params) {
|
|
5
|
+
this.repo = params.repo;
|
|
6
|
+
}
|
|
7
|
+
overview(orgId) {
|
|
8
|
+
return this.repo.overview(orgId);
|
|
9
|
+
}
|
|
10
|
+
enrollments(orgId, days) {
|
|
11
|
+
return this.repo.enrollments(orgId, days);
|
|
12
|
+
}
|
|
13
|
+
courseAnalytics(orgId, courseId) {
|
|
14
|
+
return this.repo.courseAnalytics(orgId, courseId);
|
|
15
|
+
}
|
|
16
|
+
courseEnrollments(orgId, courseId, days) {
|
|
17
|
+
return this.repo.courseEnrollments(orgId, courseId, days);
|
|
18
|
+
}
|
|
19
|
+
listStudents(orgId, query) {
|
|
20
|
+
return this.repo.listStudents(orgId, query);
|
|
21
|
+
}
|
|
22
|
+
getStudent(orgId, id) {
|
|
23
|
+
return this.repo.getStudent(orgId, id);
|
|
24
|
+
}
|
|
25
|
+
studentAnalytics(orgId, id) {
|
|
26
|
+
return this.repo.studentAnalytics(orgId, id);
|
|
27
|
+
}
|
|
28
|
+
communityAnalytics(orgId, communityId) {
|
|
29
|
+
return this.repo.communityAnalytics(orgId, communityId);
|
|
30
|
+
}
|
|
31
|
+
communityMembers(orgId, communityId, query) {
|
|
32
|
+
return this.repo.communityMembers(orgId, communityId, query);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { AdminReportServiceImpl };
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.js","names":[],"sources":["../../../src/reporting/admin/service.ts"],"sourcesContent":["import type {\n CommunityAnalytics,\n CommunityMember,\n CommunityMembersQuery,\n CourseAnalytics,\n CourseEnrollmentPoint,\n EnrollmentPoint,\n OverviewStats,\n Page,\n Student,\n StudentAnalytics,\n StudentsQuery,\n} from './model.js';\nimport type { AdminReportRepository, AdminReportService } from './ports.js';\n\nexport type AdminReportServiceParams = {\n repo: AdminReportRepository;\n};\n\nexport class AdminReportServiceImpl implements AdminReportService {\n private readonly repo: AdminReportRepository;\n\n constructor(params: AdminReportServiceParams) {\n this.repo = params.repo;\n }\n\n overview(orgId: string): Promise<OverviewStats> {\n return this.repo.overview(orgId);\n }\n\n enrollments(orgId: string, days: number): Promise<EnrollmentPoint[]> {\n return this.repo.enrollments(orgId, days);\n }\n\n courseAnalytics(orgId: string, courseId: string): Promise<CourseAnalytics | null> {\n return this.repo.courseAnalytics(orgId, courseId);\n }\n\n courseEnrollments(\n orgId: string,\n courseId: string,\n days: number,\n ): Promise<CourseEnrollmentPoint[] | null> {\n return this.repo.courseEnrollments(orgId, courseId, days);\n }\n\n listStudents(orgId: string, query: StudentsQuery): Promise<Page<Student>> {\n return this.repo.listStudents(orgId, query);\n }\n\n getStudent(orgId: string, id: string): Promise<Student | null> {\n return this.repo.getStudent(orgId, id);\n }\n\n studentAnalytics(orgId: string, id: string): Promise<StudentAnalytics | null> {\n return this.repo.studentAnalytics(orgId, id);\n }\n\n communityAnalytics(orgId: string, communityId: string): Promise<CommunityAnalytics | null> {\n return this.repo.communityAnalytics(orgId, communityId);\n }\n\n communityMembers(\n orgId: string,\n communityId: string,\n query: CommunityMembersQuery,\n ): Promise<Page<CommunityMember> | null> {\n return this.repo.communityMembers(orgId, communityId, query);\n }\n}\n"],"mappings":";AAmBA,IAAa,yBAAb,MAAkE;CAChE;CAEA,YAAY,QAAkC;EAC5C,KAAK,OAAO,OAAO;CACrB;CAEA,SAAS,OAAuC;EAC9C,OAAO,KAAK,KAAK,SAAS,KAAK;CACjC;CAEA,YAAY,OAAe,MAA0C;EACnE,OAAO,KAAK,KAAK,YAAY,OAAO,IAAI;CAC1C;CAEA,gBAAgB,OAAe,UAAmD;EAChF,OAAO,KAAK,KAAK,gBAAgB,OAAO,QAAQ;CAClD;CAEA,kBACE,OACA,UACA,MACyC;EACzC,OAAO,KAAK,KAAK,kBAAkB,OAAO,UAAU,IAAI;CAC1D;CAEA,aAAa,OAAe,OAA8C;EACxE,OAAO,KAAK,KAAK,aAAa,OAAO,KAAK;CAC5C;CAEA,WAAW,OAAe,IAAqC;EAC7D,OAAO,KAAK,KAAK,WAAW,OAAO,EAAE;CACvC;CAEA,iBAAiB,OAAe,IAA8C;EAC5E,OAAO,KAAK,KAAK,iBAAiB,OAAO,EAAE;CAC7C;CAEA,mBAAmB,OAAe,aAAyD;EACzF,OAAO,KAAK,KAAK,mBAAmB,OAAO,WAAW;CACxD;CAEA,iBACE,OACA,aACA,OACuC;EACvC,OAAO,KAAK,KAAK,iBAAiB,OAAO,aAAa,KAAK;CAC7D;AACF"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CourseView, Module } from "../../types/schemas/content.js";
|
|
2
|
+
import { CommunityHome, CommunityHomeSpace, CommunityNotificationSettingsView, CourseProgressView, DirectoryEntry, DirectoryQuery, DirectoryRow, LockedCommunitySpace, NotificationItemView, NotificationSettingsCategoryView, NotificationUnreadCounts, NotificationView, NotificationsView, OpenCommunitySpace, OrgNotificationSettingsView, SettingsChannelView } from "./model.js";
|
|
3
|
+
import { MemberReportRepository, MemberReportService } from "./ports.js";
|
|
4
|
+
import { MemberReportServiceImpl } from "./service.js";
|
|
5
|
+
export { type CommunityHome, type CommunityHomeSpace, type CommunityNotificationSettingsView, type CourseProgressView, type CourseView, type DirectoryEntry, type DirectoryQuery, type DirectoryRow, type LockedCommunitySpace, type MemberReportRepository, type MemberReportService, MemberReportServiceImpl, type Module, type NotificationItemView, type NotificationSettingsCategoryView, type NotificationUnreadCounts, type NotificationView, type NotificationsView, type OpenCommunitySpace, type OrgNotificationSettingsView, type SettingsChannelView };
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { JsonValue } from "../../types/shared.js";
|
|
2
|
+
import { ActivityView, CourseView, DigestSchedule, DownloadFile, DownloadView, Module } from "../../types/schemas/content.js";
|
|
3
|
+
import { SubscriptionView } from "../../types/schemas/discussion.js";
|
|
4
|
+
import { Reason, Scope, SubjectRef } from "../../types/notifications.js";
|
|
5
|
+
import "../../types/index.js";
|
|
6
|
+
import "../../content/index.js";
|
|
7
|
+
import { ResolvedChannel } from "../../shared/notification-settings.js";
|
|
8
|
+
//#region src/reporting/member/model.d.ts
|
|
9
|
+
/** Per-course progress for the student surface. Derived on read against the
|
|
10
|
+
* current published structure — never stored. */
|
|
11
|
+
interface DirectoryRow {
|
|
12
|
+
orgUserId: string;
|
|
13
|
+
userId: string;
|
|
14
|
+
role: string;
|
|
15
|
+
displayName: string | null;
|
|
16
|
+
headline: string | null;
|
|
17
|
+
bio: string | null;
|
|
18
|
+
imageAssetId: string | null;
|
|
19
|
+
}
|
|
20
|
+
interface DirectoryQuery {
|
|
21
|
+
page: number;
|
|
22
|
+
pageSize: number;
|
|
23
|
+
search?: string;
|
|
24
|
+
}
|
|
25
|
+
interface DirectoryEntry extends DirectoryRow {
|
|
26
|
+
imageUrl: string | null;
|
|
27
|
+
}
|
|
28
|
+
interface CommunityHomeLink {
|
|
29
|
+
id: string;
|
|
30
|
+
contentId: string;
|
|
31
|
+
type: 'course' | 'download' | 'community';
|
|
32
|
+
title: string;
|
|
33
|
+
}
|
|
34
|
+
interface CommunityHomeSpaceBase {
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
memberCount: number;
|
|
38
|
+
accessRule: 'all_members' | 'by_request' | 'by_invite';
|
|
39
|
+
standing: 'open' | 'member' | 'requested' | 'invited' | 'full' | 'none';
|
|
40
|
+
}
|
|
41
|
+
/** A space the viewer can see but not open: enough to request, accept or ask. */
|
|
42
|
+
interface LockedCommunitySpace extends CommunityHomeSpaceBase {
|
|
43
|
+
locked: true;
|
|
44
|
+
}
|
|
45
|
+
interface OpenCommunitySpace extends CommunityHomeSpaceBase {
|
|
46
|
+
locked: false;
|
|
47
|
+
description: string | null;
|
|
48
|
+
capacity: number | null;
|
|
49
|
+
settings: {
|
|
50
|
+
comments: boolean;
|
|
51
|
+
reactions: boolean;
|
|
52
|
+
requireReview: boolean;
|
|
53
|
+
};
|
|
54
|
+
topics: {
|
|
55
|
+
id: string;
|
|
56
|
+
name: string;
|
|
57
|
+
}[];
|
|
58
|
+
links: CommunityHomeLink[];
|
|
59
|
+
subscription: SubscriptionView | null;
|
|
60
|
+
}
|
|
61
|
+
type CommunityHomeSpace = LockedCommunitySpace | OpenCommunitySpace;
|
|
62
|
+
interface CommunityHome {
|
|
63
|
+
communityId: string;
|
|
64
|
+
title: string;
|
|
65
|
+
description: string;
|
|
66
|
+
thumbnailUrl: string | null;
|
|
67
|
+
dm: {
|
|
68
|
+
enabled: boolean;
|
|
69
|
+
memberToMember: boolean;
|
|
70
|
+
memberToStaff: boolean;
|
|
71
|
+
staffToAnyone: boolean;
|
|
72
|
+
firstMessageIsRequest: boolean;
|
|
73
|
+
groupChats: boolean;
|
|
74
|
+
groupSize: number;
|
|
75
|
+
};
|
|
76
|
+
spaces: CommunityHomeSpace[];
|
|
77
|
+
}
|
|
78
|
+
interface CourseProgressView {
|
|
79
|
+
/** Keyed by activity id; absent key = not started. */
|
|
80
|
+
activities: Record<string, 'in-progress' | 'completed'>;
|
|
81
|
+
/** Integer 0–100: completed ÷ current published activities, rounded. */
|
|
82
|
+
percent: number;
|
|
83
|
+
/** The course target's own record says so. */
|
|
84
|
+
completed: boolean;
|
|
85
|
+
/** Per-activity reported state (the record's position map); absent key = none reported. */
|
|
86
|
+
positions: Record<string, unknown>;
|
|
87
|
+
}
|
|
88
|
+
interface NotificationItemView {
|
|
89
|
+
type: SubjectRef['type'];
|
|
90
|
+
id: string;
|
|
91
|
+
title?: string;
|
|
92
|
+
excerpt?: string;
|
|
93
|
+
}
|
|
94
|
+
interface NotificationView {
|
|
95
|
+
id: string;
|
|
96
|
+
type: string;
|
|
97
|
+
scope: Scope;
|
|
98
|
+
reasons: Reason[];
|
|
99
|
+
matchedReason: Reason;
|
|
100
|
+
category: string;
|
|
101
|
+
display: Record<string, JsonValue>;
|
|
102
|
+
community: {
|
|
103
|
+
id: string;
|
|
104
|
+
title: string;
|
|
105
|
+
} | null;
|
|
106
|
+
space: {
|
|
107
|
+
id: string;
|
|
108
|
+
name: string;
|
|
109
|
+
} | null;
|
|
110
|
+
actor: {
|
|
111
|
+
orgUserId: string;
|
|
112
|
+
name: string | null;
|
|
113
|
+
imageUrl: string | null;
|
|
114
|
+
} | null;
|
|
115
|
+
subject: NotificationItemView | null;
|
|
116
|
+
parent: NotificationItemView | null;
|
|
117
|
+
createdAt: Date;
|
|
118
|
+
readAt: Date | null;
|
|
119
|
+
}
|
|
120
|
+
interface NotificationUnreadCounts {
|
|
121
|
+
org: number;
|
|
122
|
+
communities: {
|
|
123
|
+
communityId: string;
|
|
124
|
+
unread: number;
|
|
125
|
+
}[];
|
|
126
|
+
}
|
|
127
|
+
interface NotificationsView {
|
|
128
|
+
rows: NotificationView[];
|
|
129
|
+
total: number;
|
|
130
|
+
page: number;
|
|
131
|
+
pageSize: number;
|
|
132
|
+
unreadCount: number;
|
|
133
|
+
}
|
|
134
|
+
interface SettingsChannelView extends ResolvedChannel {
|
|
135
|
+
default: boolean;
|
|
136
|
+
}
|
|
137
|
+
interface NotificationSettingsCategoryView {
|
|
138
|
+
key: string;
|
|
139
|
+
perSpace: boolean;
|
|
140
|
+
channels: SettingsChannelView[];
|
|
141
|
+
spaces?: {
|
|
142
|
+
spaceId: string;
|
|
143
|
+
name: string;
|
|
144
|
+
channels: SettingsChannelView[];
|
|
145
|
+
}[];
|
|
146
|
+
}
|
|
147
|
+
interface CommunityNotificationSettingsView {
|
|
148
|
+
communityId: string;
|
|
149
|
+
digest: DigestSchedule | null;
|
|
150
|
+
categories: NotificationSettingsCategoryView[];
|
|
151
|
+
}
|
|
152
|
+
interface OrgNotificationSettingsView {
|
|
153
|
+
categories: NotificationSettingsCategoryView[];
|
|
154
|
+
}
|
|
155
|
+
//#endregion
|
|
156
|
+
export { type ActivityView, CommunityHome, CommunityHomeLink, CommunityHomeSpace, CommunityNotificationSettingsView, CourseProgressView, type CourseView, DirectoryEntry, DirectoryQuery, DirectoryRow, type DownloadFile, type DownloadView, LockedCommunitySpace, type Module, NotificationItemView, NotificationSettingsCategoryView, NotificationUnreadCounts, NotificationView, NotificationsView, OpenCommunitySpace, OrgNotificationSettingsView, SettingsChannelView };
|
|
157
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Page } from "../../types/shared.js";
|
|
2
|
+
import { ActivityView, CourseView, DownloadFile, DownloadView, Module } from "../../types/schemas/content.js";
|
|
3
|
+
import { NotificationFilter } from "../../types/notifications.js";
|
|
4
|
+
import "../../types/index.js";
|
|
5
|
+
import { Actor } from "../../shared/actor.js";
|
|
6
|
+
import { CommunityHome, CommunityHomeSpace, CommunityNotificationSettingsView, CourseProgressView, DirectoryEntry, DirectoryQuery, DirectoryRow, NotificationUnreadCounts, NotificationView, NotificationsView, OrgNotificationSettingsView } from "./model.js";
|
|
7
|
+
//#region src/reporting/member/ports.d.ts
|
|
8
|
+
interface MemberReportService {
|
|
9
|
+
listCourses(orgId: string, orgUserId: string): Promise<CourseView[]>;
|
|
10
|
+
getCourse(orgId: string, orgUserId: string, courseId: string): Promise<CourseView | null>;
|
|
11
|
+
listModules(orgId: string, orgUserId: string, courseId: string): Promise<Module[] | null>;
|
|
12
|
+
listActivities(orgId: string, orgUserId: string, courseId: string): Promise<ActivityView[] | null>;
|
|
13
|
+
courseProgress(orgId: string, orgUserId: string, courseId: string): Promise<CourseProgressView | null>;
|
|
14
|
+
listDownloads(orgId: string, orgUserId: string): Promise<DownloadView[]>;
|
|
15
|
+
getDownload(orgId: string, orgUserId: string, downloadId: string): Promise<{
|
|
16
|
+
download: DownloadView;
|
|
17
|
+
assets: DownloadFile[];
|
|
18
|
+
} | null>;
|
|
19
|
+
/** Signed URL of a course, download or community thumbnail: published, or staff. */
|
|
20
|
+
thumbnailFile(orgId: string, actor: Actor, owner: 'course' | 'download' | 'community', id: string): Promise<string | null>;
|
|
21
|
+
/** Signed URL of an asset the activity links, for a student who can open its course. */
|
|
22
|
+
activityFile(orgId: string, actor: Actor, activityId: string, assetId: string): Promise<string | null>;
|
|
23
|
+
/** Signed download URL of a file in a download the student can open. */
|
|
24
|
+
downloadFile(orgId: string, actor: Actor, downloadId: string, assetId: string): Promise<string | null>;
|
|
25
|
+
/** Signed URL of an org user's profile photo, when it belongs to this org. */
|
|
26
|
+
personImage(orgId: string, orgUserId: string): Promise<string | null>;
|
|
27
|
+
directory(orgId: string, actor: Actor, communityId: string, query: DirectoryQuery): Promise<Page<DirectoryEntry> | null>;
|
|
28
|
+
communityHome(orgId: string, actor: Actor, communityId: string): Promise<CommunityHome | null>;
|
|
29
|
+
communitySpace(orgId: string, actor: Actor, communityId: string, spaceId: string): Promise<CommunityHomeSpace | null>;
|
|
30
|
+
notifications(orgId: string, actor: Actor, userId: string, filter: NotificationFilter, page: {
|
|
31
|
+
page: number;
|
|
32
|
+
pageSize: number;
|
|
33
|
+
}): Promise<NotificationsView>;
|
|
34
|
+
notification(orgId: string, actor: Actor, userId: string, notificationId: string): Promise<NotificationView | null>;
|
|
35
|
+
notificationUnreadCounts(orgId: string, actor: Actor, userId: string): Promise<NotificationUnreadCounts>;
|
|
36
|
+
/** The person's notification settings in a community they can open, resolved per channel. */
|
|
37
|
+
communityNotificationSettings(orgId: string, actor: Actor, userId: string, communityId: string): Promise<CommunityNotificationSettingsView | null>;
|
|
38
|
+
/** The person's notification settings for the org's categories. */
|
|
39
|
+
orgNotificationSettings(orgId: string, userId: string): Promise<OrgNotificationSettingsView>;
|
|
40
|
+
}
|
|
41
|
+
interface MemberReportRepository {
|
|
42
|
+
directory(orgId: string, communityId: string, query: DirectoryQuery): Promise<Page<DirectoryRow>>;
|
|
43
|
+
spaceMemberCounts(orgId: string, communityId: string): Promise<Record<string, number>>;
|
|
44
|
+
people(orgId: string, orgUserIds: string[]): Promise<DirectoryRow[]>;
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { MemberReportRepository, MemberReportService };
|
|
48
|
+
//# sourceMappingURL=ports.d.ts.map
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { Page } from "../../types/shared.js";
|
|
2
|
+
import { ActivityView, CourseView, DownloadFile, DownloadView, Module } from "../../types/schemas/content.js";
|
|
3
|
+
import { NotificationFilter } from "../../types/notifications.js";
|
|
4
|
+
import "../../types/index.js";
|
|
5
|
+
import { ChannelRegistry, NotificationCategoryService } from "../../shared/ports.js";
|
|
6
|
+
import { FileUrls } from "../../assets/file-urls.js";
|
|
7
|
+
import { AssetFiles } from "../../assets/ports.js";
|
|
8
|
+
import "../../assets/index.js";
|
|
9
|
+
import { Actor } from "../../shared/actor.js";
|
|
10
|
+
import { ContentService, ItemTitles } from "../../content/ports.js";
|
|
11
|
+
import "../../content/index.js";
|
|
12
|
+
import { NotificationSettingsService } from "../../identity/ports.js";
|
|
13
|
+
import "../../identity/index.js";
|
|
14
|
+
import { EntitlementsService } from "../../entitlements/ports.js";
|
|
15
|
+
import "../../entitlements/index.js";
|
|
16
|
+
import { NotificationsService } from "../../automations/ports.js";
|
|
17
|
+
import "../../automations/index.js";
|
|
18
|
+
import { ItemTitles as ItemTitles$1, SubscriptionService } from "../../discussion/ports.js";
|
|
19
|
+
import "../../discussion/index.js";
|
|
20
|
+
import { ProgressService } from "../../progress/ports.js";
|
|
21
|
+
import "../../progress/index.js";
|
|
22
|
+
import { CommunityHome, CommunityHomeSpace, CommunityNotificationSettingsView, CourseProgressView, DirectoryEntry, DirectoryQuery, NotificationUnreadCounts, NotificationView, NotificationsView, OrgNotificationSettingsView } from "./model.js";
|
|
23
|
+
import { MemberReportRepository, MemberReportService } from "./ports.js";
|
|
24
|
+
//#region src/reporting/member/service.d.ts
|
|
25
|
+
type MemberAccess = Pick<EntitlementsService, 'isCommunityMember' | 'openSpaceIds' | 'spaceStandings' | 'hasAccess' | 'listAccessibleContent' | 'openCommunityIds'>;
|
|
26
|
+
type MemberReportServiceParams = {
|
|
27
|
+
repo: MemberReportRepository;
|
|
28
|
+
content: ContentService;
|
|
29
|
+
progress: ProgressService;
|
|
30
|
+
files: Pick<AssetFiles, 'signFile'>;
|
|
31
|
+
fileUrls: FileUrls;
|
|
32
|
+
access: MemberAccess;
|
|
33
|
+
notifications: Pick<NotificationsService, 'list' | 'get' | 'unreadCounts'>;
|
|
34
|
+
titles: {
|
|
35
|
+
discussion: ItemTitles$1;
|
|
36
|
+
content: ItemTitles;
|
|
37
|
+
};
|
|
38
|
+
subscriptions: Pick<SubscriptionService, 'viewerSubscriptions'>;
|
|
39
|
+
notificationCategories: {
|
|
40
|
+
community: Pick<NotificationCategoryService, 'get'>;
|
|
41
|
+
org: Pick<NotificationCategoryService, 'get'>;
|
|
42
|
+
};
|
|
43
|
+
notificationSettings: Pick<NotificationSettingsService, 'get'>;
|
|
44
|
+
channels: Pick<ChannelRegistry, 'list'>;
|
|
45
|
+
};
|
|
46
|
+
declare class MemberReportServiceImpl implements MemberReportService {
|
|
47
|
+
private readonly repo;
|
|
48
|
+
private readonly content;
|
|
49
|
+
private readonly progress;
|
|
50
|
+
private readonly files;
|
|
51
|
+
private readonly fileUrls;
|
|
52
|
+
private readonly access;
|
|
53
|
+
private readonly notificationList;
|
|
54
|
+
private readonly titles;
|
|
55
|
+
private readonly subscriptions;
|
|
56
|
+
private readonly notificationCategories;
|
|
57
|
+
private readonly notificationSettings;
|
|
58
|
+
private readonly channels;
|
|
59
|
+
constructor(params: MemberReportServiceParams);
|
|
60
|
+
communityNotificationSettings(orgId: string, actor: Actor, userId: string, communityId: string): Promise<CommunityNotificationSettingsView | null>;
|
|
61
|
+
orgNotificationSettings(orgId: string, userId: string): Promise<OrgNotificationSettingsView>;
|
|
62
|
+
private settingsView;
|
|
63
|
+
notifications(orgId: string, actor: Actor, userId: string, filter: NotificationFilter, page: {
|
|
64
|
+
page: number;
|
|
65
|
+
pageSize: number;
|
|
66
|
+
}): Promise<NotificationsView>;
|
|
67
|
+
notification(orgId: string, actor: Actor, userId: string, notificationId: string): Promise<NotificationView | null>;
|
|
68
|
+
notificationUnreadCounts(orgId: string, actor: Actor, userId: string): Promise<NotificationUnreadCounts>;
|
|
69
|
+
private describeNotifications;
|
|
70
|
+
listCourses(orgId: string, orgUserId: string): Promise<CourseView[]>;
|
|
71
|
+
getCourse(orgId: string, orgUserId: string, courseId: string): Promise<CourseView | null>;
|
|
72
|
+
listModules(orgId: string, orgUserId: string, courseId: string): Promise<Module[] | null>;
|
|
73
|
+
listActivities(orgId: string, orgUserId: string, courseId: string): Promise<ActivityView[] | null>;
|
|
74
|
+
courseProgress(orgId: string, orgUserId: string, courseId: string): Promise<CourseProgressView | null>;
|
|
75
|
+
listDownloads(orgId: string, orgUserId: string): Promise<DownloadView[]>;
|
|
76
|
+
getDownload(orgId: string, orgUserId: string, downloadId: string): Promise<{
|
|
77
|
+
download: DownloadView;
|
|
78
|
+
assets: DownloadFile[];
|
|
79
|
+
} | null>;
|
|
80
|
+
thumbnailFile(orgId: string, actor: Actor, owner: 'course' | 'download' | 'community', id: string): Promise<string | null>;
|
|
81
|
+
activityFile(orgId: string, actor: Actor, activityId: string, assetId: string): Promise<string | null>;
|
|
82
|
+
downloadFile(orgId: string, actor: Actor, downloadId: string, assetId: string): Promise<string | null>;
|
|
83
|
+
personImage(orgId: string, orgUserId: string): Promise<string | null>;
|
|
84
|
+
directory(orgId: string, actor: Actor, communityId: string, query: DirectoryQuery): Promise<Page<DirectoryEntry> | null>;
|
|
85
|
+
communityHome(orgId: string, actor: Actor, communityId: string): Promise<CommunityHome | null>;
|
|
86
|
+
communitySpace(orgId: string, actor: Actor, communityId: string, spaceId: string): Promise<CommunityHomeSpace | null>;
|
|
87
|
+
private homeSpaces;
|
|
88
|
+
private linkViews;
|
|
89
|
+
}
|
|
90
|
+
//#endregion
|
|
91
|
+
export { MemberReportServiceImpl, MemberReportServiceParams };
|
|
92
|
+
//# sourceMappingURL=service.d.ts.map
|