@headless-lms/core 0.3.0 → 0.5.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 +24 -18
- package/dist/assets/file-urls.d.ts +11 -7
- package/dist/assets/file-urls.js +14 -4
- package/dist/assets/file-urls.js.map +1 -1
- package/dist/assets/index.d.ts +5 -4
- package/dist/assets/index.js +4 -3
- 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/ports.d.ts +37 -17
- package/dist/assets/service.d.ts +30 -15
- package/dist/assets/service.js +229 -59
- package/dist/assets/service.js.map +1 -1
- package/dist/automations/actions.js +2 -63
- package/dist/automations/actions.js.map +1 -1
- package/dist/automations/catalog.d.ts +1 -2
- package/dist/automations/catalog.js +137 -65
- package/dist/automations/catalog.js.map +1 -1
- package/dist/automations/community-derivations.js +20 -20
- package/dist/automations/community-derivations.js.map +1 -1
- package/dist/automations/community-mail.d.ts +36 -20
- package/dist/automations/community-mail.js +32 -24
- package/dist/automations/community-mail.js.map +1 -1
- package/dist/automations/event-permissions.d.ts +12 -0
- package/dist/automations/event-permissions.js +38 -0
- package/dist/automations/event-permissions.js.map +1 -0
- package/dist/automations/events.d.ts +0 -10
- package/dist/automations/index.d.ts +12 -4
- package/dist/automations/index.js +9 -1
- package/dist/automations/notifications/applicable.d.ts +8 -0
- package/dist/automations/notifications/applicable.js +12 -0
- package/dist/automations/notifications/applicable.js.map +1 -0
- 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 +346 -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 +96 -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 +276 -0
- package/dist/automations/notifications/rules/entitlements.js.map +1 -0
- package/dist/automations/notifications/rules/events.d.ts +9 -0
- package/dist/automations/notifications/rules/events.js +27 -0
- package/dist/automations/notifications/rules/events.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 +35 -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 +98 -0
- package/dist/automations/notifications/rules/recipients.js.map +1 -0
- package/dist/automations/notifications/service.d.ts +29 -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 +560 -0
- package/dist/automations/notifications/types.js.map +1 -0
- package/dist/automations/ports.d.ts +134 -21
- package/dist/automations/service.d.ts +30 -30
- package/dist/automations/service.js +111 -144
- package/dist/automations/service.js.map +1 -1
- package/dist/content/event-sight.d.ts +11 -0
- package/dist/content/event-sight.js +11 -0
- package/dist/content/event-sight.js.map +1 -0
- package/dist/content/events.d.ts +437 -46
- package/dist/content/events.js +45 -1
- package/dist/content/events.js.map +1 -1
- package/dist/content/index.d.ts +8 -4
- package/dist/content/index.js +5 -1
- package/dist/content/jobs.d.ts +16 -0
- package/dist/content/jobs.js +37 -0
- package/dist/content/jobs.js.map +1 -0
- package/dist/content/model.d.ts +2 -2
- package/dist/content/notification-categories.d.ts +37 -0
- package/dist/content/notification-categories.js +73 -0
- package/dist/content/notification-categories.js.map +1 -0
- package/dist/content/ports.d.ts +132 -68
- package/dist/content/service.d.ts +100 -68
- package/dist/content/service.js +703 -146
- package/dist/content/service.js.map +1 -1
- package/dist/content/titles.d.ts +25 -0
- package/dist/content/titles.js +82 -0
- package/dist/content/titles.js.map +1 -0
- package/dist/content/types.d.ts +2 -2
- package/dist/discussion/authors.d.ts +4 -2
- package/dist/discussion/authors.js +9 -5
- package/dist/discussion/authors.js.map +1 -1
- package/dist/discussion/chats.d.ts +63 -39
- package/dist/discussion/chats.js +455 -190
- package/dist/discussion/chats.js.map +1 -1
- 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 +227 -23
- package/dist/discussion/events.js +114 -19
- package/dist/discussion/events.js.map +1 -1
- package/dist/discussion/index.d.ts +12 -4
- package/dist/discussion/index.js +9 -2
- 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/live.d.ts +106 -0
- package/dist/discussion/live.js +642 -0
- package/dist/discussion/live.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 +279 -114
- package/dist/discussion/ports.js.map +1 -1
- package/dist/discussion/posts.d.ts +60 -44
- package/dist/discussion/posts.js +453 -287
- package/dist/discussion/posts.js.map +1 -1
- package/dist/discussion/rules.d.ts +18 -0
- package/dist/discussion/rules.js +22 -0
- package/dist/discussion/rules.js.map +1 -0
- package/dist/discussion/service.d.ts +50 -35
- package/dist/discussion/service.js +333 -205
- package/dist/discussion/service.js.map +1 -1
- package/dist/discussion/subscriptions.d.ts +37 -0
- package/dist/discussion/subscriptions.js +115 -0
- package/dist/discussion/subscriptions.js.map +1 -0
- package/dist/discussion/titles.d.ts +28 -0
- package/dist/discussion/titles.js +98 -0
- package/dist/discussion/titles.js.map +1 -0
- package/dist/entitlements/events.d.ts +20 -20
- package/dist/entitlements/index.d.ts +5 -4
- package/dist/entitlements/index.js +3 -2
- 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 +2 -2
- package/dist/entitlements/ports.d.ts +68 -38
- package/dist/entitlements/rules.d.ts +3 -6
- package/dist/entitlements/rules.js +5 -10
- package/dist/entitlements/rules.js.map +1 -1
- package/dist/entitlements/service.d.ts +43 -28
- package/dist/entitlements/service.js +387 -160
- package/dist/entitlements/service.js.map +1 -1
- package/dist/identity/devices.d.ts +30 -0
- package/dist/identity/devices.js +109 -0
- package/dist/identity/devices.js.map +1 -0
- package/dist/identity/index.d.ts +6 -5
- package/dist/identity/index.js +4 -3
- package/dist/identity/model.d.ts +2 -2
- package/dist/identity/notification-settings.d.ts +28 -0
- package/dist/identity/notification-settings.js +114 -0
- package/dist/identity/notification-settings.js.map +1 -0
- package/dist/identity/ports.d.ts +80 -56
- package/dist/identity/service.d.ts +8 -7
- package/dist/identity/service.js +17 -13
- package/dist/identity/service.js.map +1 -1
- package/dist/integrations/ports.d.ts +9 -8
- package/dist/integrations/service.d.ts +9 -8
- package/dist/integrations/service.js +33 -16
- package/dist/integrations/service.js.map +1 -1
- package/dist/organizations/default-roles.d.ts +22 -0
- package/dist/organizations/default-roles.js +89 -0
- package/dist/organizations/default-roles.js.map +1 -0
- package/dist/organizations/effective-permissions.d.ts +45 -0
- package/dist/organizations/effective-permissions.js +113 -0
- package/dist/organizations/effective-permissions.js.map +1 -0
- package/dist/organizations/events.d.ts +320 -181
- package/dist/organizations/events.js +90 -18
- package/dist/organizations/events.js.map +1 -1
- package/dist/organizations/index.d.ts +15 -10
- package/dist/organizations/index.js +8 -3
- package/dist/organizations/members.d.ts +66 -8
- package/dist/organizations/members.js.map +1 -1
- package/dist/organizations/notification-catalog.d.ts +31 -0
- package/dist/organizations/notification-catalog.js +32 -0
- package/dist/organizations/notification-catalog.js.map +1 -0
- package/dist/organizations/notification-categories.d.ts +34 -0
- package/dist/organizations/notification-categories.js +66 -0
- package/dist/organizations/notification-categories.js.map +1 -0
- package/dist/organizations/org-roles.d.ts +33 -0
- package/dist/organizations/org-roles.js +49 -0
- package/dist/organizations/org-roles.js.map +1 -0
- package/dist/organizations/permissions.d.ts +311 -0
- package/dist/organizations/permissions.js +327 -0
- package/dist/organizations/permissions.js.map +1 -0
- package/dist/organizations/ports.d.ts +187 -65
- package/dist/organizations/service.d.ts +104 -35
- package/dist/organizations/service.js +1247 -323
- package/dist/organizations/service.js.map +1 -1
- package/dist/organizations/testing.d.ts +18 -0
- package/dist/organizations/testing.js +37 -0
- package/dist/organizations/testing.js.map +1 -0
- package/dist/organizations/types.d.ts +5 -16
- package/dist/progress/index.d.ts +2 -2
- package/dist/progress/ports.d.ts +11 -3
- package/dist/progress/service.d.ts +6 -5
- package/dist/progress/service.js +23 -8
- package/dist/progress/service.js.map +1 -1
- package/dist/reporting/admin/index.d.ts +6 -4
- package/dist/reporting/admin/model.d.ts +36 -3
- package/dist/reporting/admin/ports.d.ts +39 -14
- package/dist/reporting/admin/service.d.ts +32 -11
- package/dist/reporting/admin/service.js +102 -18
- package/dist/reporting/admin/service.js.map +1 -1
- package/dist/reporting/events/index.d.ts +27 -0
- package/dist/reporting/events/index.js +20 -0
- package/dist/reporting/events/index.js.map +1 -0
- package/dist/reporting/member/calendar.d.ts +11 -0
- package/dist/reporting/member/calendar.js +75 -0
- package/dist/reporting/member/calendar.js.map +1 -0
- package/dist/reporting/member/index.d.ts +3 -2
- package/dist/reporting/member/model.d.ts +80 -26
- package/dist/reporting/member/ports.d.ts +50 -28
- package/dist/reporting/member/service.d.ts +81 -35
- package/dist/reporting/member/service.js +438 -145
- package/dist/reporting/member/service.js.map +1 -1
- package/dist/shared/actor.d.ts +22 -3
- package/dist/shared/errors.d.ts +15 -2
- package/dist/shared/errors.js +21 -2
- package/dist/shared/errors.js.map +1 -1
- package/dist/shared/id.d.ts +7 -0
- package/dist/shared/id.js +8 -1
- package/dist/shared/id.js.map +1 -1
- package/dist/shared/logger.d.ts +2 -1
- package/dist/shared/logger.js +10 -1
- package/dist/shared/logger.js.map +1 -1
- package/dist/shared/mailer.d.ts +11 -1
- package/dist/shared/mailer.js +32 -5
- package/dist/shared/mailer.js.map +1 -1
- 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 +68 -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/automations.d.ts +8 -2
- package/dist/types/content.d.ts +2 -2
- package/dist/types/discussion.d.ts +4 -5
- package/dist/types/email-templates.d.ts +119 -6
- package/dist/types/entitlements.d.ts +2 -2
- package/dist/types/identity.d.ts +14 -17
- package/dist/types/index.d.ts +13 -12
- package/dist/types/index.js +2 -1
- package/dist/types/notifications.d.ts +157 -0
- package/dist/types/notifications.js +1 -0
- package/dist/types/organizations.d.ts +3 -2
- package/dist/types/ports.d.ts +8 -1
- package/dist/types/ports.js +7 -1
- package/dist/types/ports.js.map +1 -0
- package/dist/types/schemas/assets.d.ts +5 -5
- package/dist/types/schemas/assets.js +4 -3
- package/dist/types/schemas/assets.js.map +1 -1
- package/dist/types/schemas/automations.d.ts +1 -10
- package/dist/types/schemas/automations.js +1 -3
- package/dist/types/schemas/automations.js.map +1 -1
- package/dist/types/schemas/content.d.ts +596 -11
- package/dist/types/schemas/content.js +225 -9
- package/dist/types/schemas/content.js.map +1 -1
- package/dist/types/schemas/discussion.d.ts +362 -66
- package/dist/types/schemas/discussion.js +123 -15
- package/dist/types/schemas/discussion.js.map +1 -1
- package/dist/types/schemas/entitlements.d.ts +14 -1
- package/dist/types/schemas/entitlements.js +11 -4
- package/dist/types/schemas/entitlements.js.map +1 -1
- package/dist/types/schemas/identity.d.ts +1 -85
- package/dist/types/schemas/identity.js +1 -42
- package/dist/types/schemas/identity.js.map +1 -1
- package/dist/types/schemas/index.d.ts +8 -7
- package/dist/types/schemas/index.js +8 -7
- package/dist/types/schemas/notifications.d.ts +96 -0
- package/dist/types/schemas/notifications.js +57 -0
- package/dist/types/schemas/notifications.js.map +1 -0
- package/dist/types/schemas/organizations.d.ts +96 -60
- package/dist/types/schemas/organizations.js +78 -27
- package/dist/types/schemas/organizations.js.map +1 -1
- package/dist/types/schemas/progress.d.ts +0 -1
- package/dist/types/schemas/progress.js +0 -1
- package/dist/types/schemas/progress.js.map +1 -1
- package/package.json +1 -1
- package/dist/automations/community-notifications.d.ts +0 -16
- package/dist/automations/community-notifications.js +0 -84
- package/dist/automations/community-notifications.js.map +0 -1
- package/dist/automations/seeds.d.ts +0 -17
- package/dist/automations/seeds.js +0 -235
- package/dist/automations/seeds.js.map +0 -1
- package/dist/identity/notifications.d.ts +0 -27
- package/dist/identity/notifications.js +0 -101
- package/dist/identity/notifications.js.map +0 -1
- package/dist/organizations/access-scopes.d.ts +0 -19
- package/dist/organizations/access-scopes.js +0 -89
- package/dist/organizations/access-scopes.js.map +0 -1
- package/dist/organizations/roles.d.ts +0 -19
- package/dist/organizations/roles.js +0 -82
- package/dist/organizations/roles.js.map +0 -1
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { JsonValue } from "../../types/shared.js";
|
|
2
|
+
import { ActivityView, CourseView, DigestSchedule, DownloadFile, DownloadView, EventAttendee, MemberEvent, MemberEventSummary, MemberEventsQuery, Module } from "../../types/schemas/content.js";
|
|
3
|
+
import { Permission } from "../../types/schemas/organizations.js";
|
|
4
|
+
import { SubscriptionView } from "../../types/schemas/discussion.js";
|
|
5
|
+
import { Reason, Scope, SubjectRef } from "../../types/notifications.js";
|
|
6
|
+
import "../../types/index.js";
|
|
3
7
|
import "../../content/index.js";
|
|
4
|
-
import "
|
|
8
|
+
import { EventAttendeeRow, EventReader } from "../events/index.js";
|
|
9
|
+
import { ResolvedChannel } from "../../shared/notification-settings.js";
|
|
5
10
|
//#region src/reporting/member/model.d.ts
|
|
6
11
|
/** Per-course progress for the student surface. Derived on read against the
|
|
7
12
|
* current published structure — never stored. */
|
|
8
13
|
interface DirectoryRow {
|
|
9
14
|
orgUserId: string;
|
|
10
15
|
userId: string;
|
|
11
|
-
role: string;
|
|
12
16
|
displayName: string | null;
|
|
13
17
|
headline: string | null;
|
|
14
18
|
bio: string | null;
|
|
@@ -21,6 +25,25 @@ interface DirectoryQuery {
|
|
|
21
25
|
}
|
|
22
26
|
interface DirectoryEntry extends DirectoryRow {
|
|
23
27
|
imageUrl: string | null;
|
|
28
|
+
team: boolean;
|
|
29
|
+
roleName: string | null;
|
|
30
|
+
opensEverySpace: boolean;
|
|
31
|
+
}
|
|
32
|
+
interface MemberViewer {
|
|
33
|
+
orgUserId: string;
|
|
34
|
+
orgRole: {
|
|
35
|
+
key: string;
|
|
36
|
+
name: string;
|
|
37
|
+
};
|
|
38
|
+
permissions: Permission[];
|
|
39
|
+
orgPermissions: Permission[];
|
|
40
|
+
}
|
|
41
|
+
interface CommunityViewer {
|
|
42
|
+
permissions: Permission[];
|
|
43
|
+
opensEverySpace: boolean;
|
|
44
|
+
team: boolean;
|
|
45
|
+
roleName: string;
|
|
46
|
+
canCreateEvents: boolean;
|
|
24
47
|
}
|
|
25
48
|
interface CommunityHomeLink {
|
|
26
49
|
id: string;
|
|
@@ -53,6 +76,7 @@ interface OpenCommunitySpace extends CommunityHomeSpaceBase {
|
|
|
53
76
|
name: string;
|
|
54
77
|
}[];
|
|
55
78
|
links: CommunityHomeLink[];
|
|
79
|
+
subscription: SubscriptionView | null;
|
|
56
80
|
}
|
|
57
81
|
type CommunityHomeSpace = LockedCommunitySpace | OpenCommunitySpace;
|
|
58
82
|
interface CommunityHome {
|
|
@@ -63,13 +87,14 @@ interface CommunityHome {
|
|
|
63
87
|
dm: {
|
|
64
88
|
enabled: boolean;
|
|
65
89
|
memberToMember: boolean;
|
|
66
|
-
|
|
67
|
-
|
|
90
|
+
memberToTeam: boolean;
|
|
91
|
+
teamToAnyone: boolean;
|
|
68
92
|
firstMessageIsRequest: boolean;
|
|
69
93
|
groupChats: boolean;
|
|
70
94
|
groupSize: number;
|
|
71
95
|
};
|
|
72
96
|
spaces: CommunityHomeSpace[];
|
|
97
|
+
viewer: CommunityViewer;
|
|
73
98
|
}
|
|
74
99
|
interface CourseProgressView {
|
|
75
100
|
/** Keyed by activity id; absent key = not started. */
|
|
@@ -81,18 +106,20 @@ interface CourseProgressView {
|
|
|
81
106
|
/** Per-activity reported state (the record's position map); absent key = none reported. */
|
|
82
107
|
positions: Record<string, unknown>;
|
|
83
108
|
}
|
|
84
|
-
|
|
85
|
-
|
|
109
|
+
interface NotificationItemView {
|
|
110
|
+
type: SubjectRef['type'];
|
|
111
|
+
id: string;
|
|
112
|
+
title?: string;
|
|
113
|
+
excerpt?: string;
|
|
114
|
+
}
|
|
86
115
|
interface NotificationView {
|
|
87
116
|
id: string;
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
imageUrl: string | null;
|
|
95
|
-
} | null;
|
|
117
|
+
type: string;
|
|
118
|
+
scope: Scope;
|
|
119
|
+
reasons: Reason[];
|
|
120
|
+
matchedReason: Reason;
|
|
121
|
+
category: string;
|
|
122
|
+
display: Record<string, JsonValue>;
|
|
96
123
|
community: {
|
|
97
124
|
id: string;
|
|
98
125
|
title: string;
|
|
@@ -101,16 +128,22 @@ interface NotificationView {
|
|
|
101
128
|
id: string;
|
|
102
129
|
name: string;
|
|
103
130
|
} | null;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
commentId: string | null;
|
|
109
|
-
chat: {
|
|
110
|
-
id: string;
|
|
111
|
-
title: string;
|
|
131
|
+
actor: {
|
|
132
|
+
orgUserId: string;
|
|
133
|
+
name: string | null;
|
|
134
|
+
imageUrl: string | null;
|
|
112
135
|
} | null;
|
|
113
|
-
|
|
136
|
+
subject: NotificationItemView | null;
|
|
137
|
+
parent: NotificationItemView | null;
|
|
138
|
+
createdAt: Date;
|
|
139
|
+
readAt: Date | null;
|
|
140
|
+
}
|
|
141
|
+
interface NotificationUnreadCounts {
|
|
142
|
+
org: number;
|
|
143
|
+
communities: {
|
|
144
|
+
communityId: string;
|
|
145
|
+
unread: number;
|
|
146
|
+
}[];
|
|
114
147
|
}
|
|
115
148
|
interface NotificationsView {
|
|
116
149
|
rows: NotificationView[];
|
|
@@ -119,6 +152,27 @@ interface NotificationsView {
|
|
|
119
152
|
pageSize: number;
|
|
120
153
|
unreadCount: number;
|
|
121
154
|
}
|
|
155
|
+
interface SettingsChannelView extends ResolvedChannel {
|
|
156
|
+
default: boolean;
|
|
157
|
+
}
|
|
158
|
+
interface NotificationSettingsCategoryView {
|
|
159
|
+
key: string;
|
|
160
|
+
perSpace: boolean;
|
|
161
|
+
channels: SettingsChannelView[];
|
|
162
|
+
spaces?: {
|
|
163
|
+
spaceId: string;
|
|
164
|
+
name: string;
|
|
165
|
+
channels: SettingsChannelView[];
|
|
166
|
+
}[];
|
|
167
|
+
}
|
|
168
|
+
interface CommunityNotificationSettingsView {
|
|
169
|
+
communityId: string;
|
|
170
|
+
digest: DigestSchedule | null;
|
|
171
|
+
categories: NotificationSettingsCategoryView[];
|
|
172
|
+
}
|
|
173
|
+
interface OrgNotificationSettingsView {
|
|
174
|
+
categories: NotificationSettingsCategoryView[];
|
|
175
|
+
}
|
|
122
176
|
//#endregion
|
|
123
|
-
export { type ActivityView, CommunityHome, CommunityHomeLink, CommunityHomeSpace, CourseProgressView, type CourseView, DirectoryEntry, DirectoryQuery, DirectoryRow, type DownloadFile, type DownloadView, LockedCommunitySpace, type Module, NotificationView, NotificationsView, OpenCommunitySpace };
|
|
177
|
+
export { type ActivityView, CommunityHome, CommunityHomeLink, CommunityHomeSpace, CommunityNotificationSettingsView, CommunityViewer, CourseProgressView, type CourseView, DirectoryEntry, DirectoryQuery, DirectoryRow, type DownloadFile, type DownloadView, type EventAttendee, type EventAttendeeRow, type EventReader, LockedCommunitySpace, type MemberEvent, type MemberEventSummary, type MemberEventsQuery, MemberViewer, type Module, NotificationItemView, NotificationSettingsCategoryView, NotificationUnreadCounts, NotificationView, NotificationsView, OpenCommunitySpace, OrgNotificationSettingsView, SettingsChannelView };
|
|
124
178
|
//# sourceMappingURL=model.d.ts.map
|
|
@@ -1,44 +1,66 @@
|
|
|
1
1
|
import { Page } from "../../types/shared.js";
|
|
2
|
-
import { ActivityView, CourseView, DownloadFile, DownloadView, Module } from "../../types/schemas/content.js";
|
|
3
|
-
import {
|
|
2
|
+
import { ActivityView, CourseView, DownloadFile, DownloadView, EventAttendee, MemberEvent, MemberEventSummary, MemberEventsQuery, Module } from "../../types/schemas/content.js";
|
|
3
|
+
import { NotificationFilter } from "../../types/notifications.js";
|
|
4
4
|
import "../../types/index.js";
|
|
5
5
|
import { Actor } from "../../shared/actor.js";
|
|
6
|
+
import { MemberActor } from "../../identity/ports.js";
|
|
6
7
|
import "../../identity/index.js";
|
|
7
|
-
import {
|
|
8
|
+
import { EventAttendeeRow, EventFaces, EventReader } from "../events/index.js";
|
|
9
|
+
import { CommunityHome, CommunityHomeSpace, CommunityNotificationSettingsView, CourseProgressView, DirectoryEntry, DirectoryQuery, DirectoryRow, MemberViewer, NotificationUnreadCounts, NotificationView, NotificationsView, OrgNotificationSettingsView } from "./model.js";
|
|
8
10
|
//#region src/reporting/member/ports.d.ts
|
|
9
11
|
interface MemberReportService {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
/** Who the caller is in the org, and the permissions they hold. */
|
|
13
|
+
viewer(actor: Actor): MemberViewer;
|
|
14
|
+
listCourses(actor: Actor): Promise<CourseView[]>;
|
|
15
|
+
getCourse(courseId: string, actor: Actor): Promise<CourseView>;
|
|
16
|
+
listModules(courseId: string, actor: Actor): Promise<Module[]>;
|
|
17
|
+
listActivities(courseId: string, actor: Actor): Promise<ActivityView[]>;
|
|
18
|
+
courseProgress(courseId: string, actor: Actor): Promise<CourseProgressView>;
|
|
19
|
+
listDownloads(actor: Actor): Promise<DownloadView[]>;
|
|
20
|
+
getDownload(downloadId: string, actor: Actor): Promise<{
|
|
17
21
|
download: DownloadView;
|
|
18
22
|
assets: DownloadFile[];
|
|
19
|
-
}
|
|
20
|
-
/** Signed URL of a course, download or community thumbnail: published, or
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
personImage(orgId: string, orgUserId: string): Promise<string | null>;
|
|
28
|
-
directory(orgId: string, actor: Actor, communityId: string, query: DirectoryQuery): Promise<Page<DirectoryEntry> | null>;
|
|
29
|
-
communityHome(orgId: string, actor: Actor, communityId: string): Promise<CommunityHome | null>;
|
|
30
|
-
communitySpace(orgId: string, actor: Actor, communityId: string, spaceId: string): Promise<CommunityHomeSpace | null>;
|
|
31
|
-
notifications(orgId: string, actor: Actor, userId: string, query: {
|
|
23
|
+
}>;
|
|
24
|
+
/** Signed URL of a course, download or community thumbnail: published, or the item's read
|
|
25
|
+
* permission. An event's when the caller can read the event. */
|
|
26
|
+
thumbnailFile(owner: 'course' | 'download' | 'community' | 'event', id: string, actor: Actor): Promise<string>;
|
|
27
|
+
getEvent(eventId: string, actor: Actor): Promise<MemberEvent>;
|
|
28
|
+
listEvents(query: MemberEventsQuery, actor: Actor): Promise<Page<MemberEventSummary>>;
|
|
29
|
+
eventCalendar(eventId: string, actor: Actor): Promise<string>;
|
|
30
|
+
eventAttendees(eventId: string, query: {
|
|
32
31
|
page: number;
|
|
33
32
|
pageSize: number;
|
|
34
|
-
}): Promise<
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
}, actor: Actor): Promise<Page<EventAttendee>>;
|
|
34
|
+
eventFile(eventId: string, assetId: string, actor: Actor): Promise<string>;
|
|
35
|
+
/** Signed URL of an asset the activity links, for a person who can open its course. */
|
|
36
|
+
activityFile(activityId: string, assetId: string, actor: Actor): Promise<string>;
|
|
37
|
+
/** Signed download URL of a file in a download the person can open. */
|
|
38
|
+
downloadFile(downloadId: string, assetId: string, actor: Actor): Promise<string>;
|
|
39
|
+
directory(communityId: string, query: DirectoryQuery, actor: Actor): Promise<Page<DirectoryEntry>>;
|
|
40
|
+
communityHome(communityId: string, actor: Actor): Promise<CommunityHome>;
|
|
41
|
+
communitySpace(communityId: string, spaceId: string, actor: Actor): Promise<CommunityHomeSpace>;
|
|
42
|
+
notifications(filter: NotificationFilter, page: {
|
|
43
|
+
page: number;
|
|
44
|
+
pageSize: number;
|
|
45
|
+
}, actor: MemberActor): Promise<NotificationsView>;
|
|
46
|
+
notification(notificationId: string, actor: MemberActor): Promise<NotificationView>;
|
|
47
|
+
notificationUnreadCounts(actor: MemberActor): Promise<NotificationUnreadCounts>;
|
|
48
|
+
/** The person's notification settings in a community they can open, resolved per channel. */
|
|
49
|
+
communityNotificationSettings(communityId: string, actor: MemberActor): Promise<CommunityNotificationSettingsView>;
|
|
50
|
+
/** The person's notification settings for the org's categories. */
|
|
51
|
+
orgNotificationSettings(actor: MemberActor): Promise<OrgNotificationSettingsView>;
|
|
37
52
|
}
|
|
38
53
|
interface MemberReportRepository {
|
|
39
|
-
directory(orgId: string, communityId: string, query: DirectoryQuery): Promise<Page<DirectoryRow>>;
|
|
40
|
-
spaceMemberCounts(orgId: string, communityId: string): Promise<Record<string, number>>;
|
|
54
|
+
directory(orgId: string, communityId: string, query: DirectoryQuery, readerIds: string[]): Promise<Page<DirectoryRow>>;
|
|
55
|
+
spaceMemberCounts(orgId: string, communityId: string, excluding: string[]): Promise<Record<string, number>>;
|
|
41
56
|
people(orgId: string, orgUserIds: string[]): Promise<DirectoryRow[]>;
|
|
57
|
+
eventAttendees(orgId: string, eventId: string, page: {
|
|
58
|
+
page: number;
|
|
59
|
+
pageSize: number;
|
|
60
|
+
}): Promise<Page<EventAttendeeRow>>;
|
|
61
|
+
eventFaces(orgId: string, eventIds: string[], limit: number): Promise<Record<string, EventFaces>>;
|
|
62
|
+
directEventGrants(orgId: string, orgUserId: string, eventIds: string[]): Promise<string[]>;
|
|
63
|
+
events(orgId: string, query: MemberEventsQuery, reader: EventReader, now: Date): Promise<Page<string>>;
|
|
42
64
|
}
|
|
43
65
|
//#endregion
|
|
44
66
|
export { MemberReportRepository, MemberReportService };
|
|
@@ -1,35 +1,55 @@
|
|
|
1
1
|
import { Page } from "../../types/shared.js";
|
|
2
|
-
import { ActivityView, CourseView, DownloadFile, DownloadView, Module } from "../../types/schemas/content.js";
|
|
3
|
-
import {
|
|
2
|
+
import { ActivityView, CourseView, DownloadFile, DownloadView, EventAttendee, MemberEvent, MemberEventSummary, MemberEventsQuery, Module } from "../../types/schemas/content.js";
|
|
3
|
+
import { NotificationFilter } from "../../types/notifications.js";
|
|
4
4
|
import "../../types/index.js";
|
|
5
|
+
import { Actor } from "../../shared/actor.js";
|
|
6
|
+
import { ChannelRegistry, NotificationCategoryService } from "../../shared/ports.js";
|
|
5
7
|
import { FileUrls } from "../../assets/file-urls.js";
|
|
6
8
|
import { AssetFiles } from "../../assets/ports.js";
|
|
7
9
|
import "../../assets/index.js";
|
|
8
|
-
import {
|
|
9
|
-
import { ContentService } from "../../content/ports.js";
|
|
10
|
+
import { ContentService, ItemTitles } from "../../content/ports.js";
|
|
10
11
|
import "../../content/index.js";
|
|
11
|
-
import { NotificationInbox } from "../../identity/ports.js";
|
|
12
|
-
import "../../identity/index.js";
|
|
13
12
|
import { EntitlementsService } from "../../entitlements/ports.js";
|
|
14
13
|
import "../../entitlements/index.js";
|
|
15
|
-
import {
|
|
14
|
+
import { MemberActor, NotificationSettingsService } from "../../identity/ports.js";
|
|
15
|
+
import "../../identity/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";
|
|
16
19
|
import "../../discussion/index.js";
|
|
20
|
+
import { OrganizationService } from "../../organizations/ports.js";
|
|
21
|
+
import "../../organizations/index.js";
|
|
17
22
|
import { ProgressService } from "../../progress/ports.js";
|
|
18
23
|
import "../../progress/index.js";
|
|
19
|
-
import { CommunityHome, CommunityHomeSpace, CourseProgressView, DirectoryEntry, DirectoryQuery, NotificationView, NotificationsView } from "./model.js";
|
|
24
|
+
import { CommunityHome, CommunityHomeSpace, CommunityNotificationSettingsView, CourseProgressView, DirectoryEntry, DirectoryQuery, MemberViewer, NotificationUnreadCounts, NotificationView, NotificationsView, OrgNotificationSettingsView } from "./model.js";
|
|
20
25
|
import { MemberReportRepository, MemberReportService } from "./ports.js";
|
|
21
26
|
//#region src/reporting/member/service.d.ts
|
|
22
|
-
type MemberAccess = Pick<EntitlementsService, 'isCommunityMember' | 'openSpaceIds' | 'spaceStandings' | 'hasAccess' | 'listAccessibleContent'>;
|
|
27
|
+
type MemberAccess = Pick<EntitlementsService, 'isCommunityMember' | 'openSpaceIds' | 'spaceStandings' | 'hasAccess' | 'listAccessibleContent' | 'openCommunityIds' | 'opensEverySpace' | 'everySpaceOpeners'>;
|
|
28
|
+
type MemberContent = Pick<ContentService, 'findCourse' | 'listCourseModules' | 'listCourseActivityViews' | 'listCourseActivities' | 'listCourseActivityAssets' | 'getActivity' | 'findDownload' | 'listDownloadAssets' | 'findCommunity' | 'listSpaces' | 'getSpace' | 'findEvent' | 'findEvents' | 'eventFilesFor'>;
|
|
29
|
+
type MemberPeople = Pick<OrganizationService, 'systemActor' | 'permissionsOfMany' | 'holders'>;
|
|
30
|
+
type Owner = 'course' | 'download' | 'community' | 'event';
|
|
23
31
|
type MemberReportServiceParams = {
|
|
24
32
|
repo: MemberReportRepository;
|
|
25
|
-
content:
|
|
26
|
-
progress: ProgressService
|
|
33
|
+
content: MemberContent;
|
|
34
|
+
progress: Pick<ProgressService, 'get' | 'listByTargets'>;
|
|
27
35
|
files: Pick<AssetFiles, 'signFile'>;
|
|
28
36
|
fileUrls: FileUrls;
|
|
29
37
|
access: MemberAccess;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
38
|
+
people: MemberPeople;
|
|
39
|
+
notifications: Pick<NotificationsService, 'list' | 'get' | 'unreadCounts'>;
|
|
40
|
+
titles: {
|
|
41
|
+
discussion: ItemTitles$1;
|
|
42
|
+
content: ItemTitles;
|
|
43
|
+
};
|
|
44
|
+
subscriptions: Pick<SubscriptionService, 'viewerSubscriptions'>;
|
|
45
|
+
notificationCategories: {
|
|
46
|
+
community: Pick<NotificationCategoryService, 'get'>;
|
|
47
|
+
org: Pick<NotificationCategoryService, 'get'>;
|
|
48
|
+
};
|
|
49
|
+
notificationSettings: Pick<NotificationSettingsService, 'get'>;
|
|
50
|
+
channels: Pick<ChannelRegistry, 'list'>;
|
|
51
|
+
studentPortalUrl: string;
|
|
52
|
+
now?: () => Date;
|
|
33
53
|
};
|
|
34
54
|
declare class MemberReportServiceImpl implements MemberReportService {
|
|
35
55
|
private readonly repo;
|
|
@@ -38,33 +58,59 @@ declare class MemberReportServiceImpl implements MemberReportService {
|
|
|
38
58
|
private readonly files;
|
|
39
59
|
private readonly fileUrls;
|
|
40
60
|
private readonly access;
|
|
41
|
-
private readonly
|
|
42
|
-
private readonly
|
|
43
|
-
private readonly
|
|
61
|
+
private readonly people;
|
|
62
|
+
private readonly notificationList;
|
|
63
|
+
private readonly titles;
|
|
64
|
+
private readonly subscriptions;
|
|
65
|
+
private readonly notificationCategories;
|
|
66
|
+
private readonly notificationSettings;
|
|
67
|
+
private readonly channels;
|
|
68
|
+
private readonly studentPortalUrl;
|
|
69
|
+
private readonly now;
|
|
44
70
|
constructor(params: MemberReportServiceParams);
|
|
45
|
-
|
|
71
|
+
private system;
|
|
72
|
+
viewer(actor: Actor): MemberViewer;
|
|
73
|
+
communityNotificationSettings(communityId: string, actor: MemberActor): Promise<CommunityNotificationSettingsView>;
|
|
74
|
+
orgNotificationSettings(actor: MemberActor): Promise<OrgNotificationSettingsView>;
|
|
75
|
+
private settingsView;
|
|
76
|
+
notifications(filter: NotificationFilter, page: {
|
|
46
77
|
page: number;
|
|
47
78
|
pageSize: number;
|
|
48
|
-
}): Promise<NotificationsView>;
|
|
49
|
-
|
|
79
|
+
}, actor: MemberActor): Promise<NotificationsView>;
|
|
80
|
+
notification(notificationId: string, actor: MemberActor): Promise<NotificationView>;
|
|
81
|
+
notificationUnreadCounts(actor: MemberActor): Promise<NotificationUnreadCounts>;
|
|
50
82
|
private describeNotifications;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
83
|
+
private opensCourse;
|
|
84
|
+
private opensDownload;
|
|
85
|
+
listCourses(actor: Actor): Promise<CourseView[]>;
|
|
86
|
+
private requireCourse;
|
|
87
|
+
getCourse(courseId: string, actor: Actor): Promise<CourseView>;
|
|
88
|
+
listModules(courseId: string, actor: Actor): Promise<Module[]>;
|
|
89
|
+
listActivities(courseId: string, actor: Actor): Promise<ActivityView[]>;
|
|
90
|
+
courseProgress(courseId: string, actor: Actor): Promise<CourseProgressView>;
|
|
91
|
+
listDownloads(actor: Actor): Promise<DownloadView[]>;
|
|
92
|
+
getDownload(downloadId: string, actor: Actor): Promise<{
|
|
58
93
|
download: DownloadView;
|
|
59
94
|
assets: DownloadFile[];
|
|
60
|
-
}
|
|
61
|
-
thumbnailFile(
|
|
62
|
-
activityFile(
|
|
63
|
-
downloadFile(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
95
|
+
}>;
|
|
96
|
+
thumbnailFile(owner: Owner, id: string, actor: Actor): Promise<string>;
|
|
97
|
+
activityFile(activityId: string, assetId: string, actor: Actor): Promise<string>;
|
|
98
|
+
downloadFile(downloadId: string, assetId: string, actor: Actor): Promise<string>;
|
|
99
|
+
private seeEvents;
|
|
100
|
+
private requireEvent;
|
|
101
|
+
private eventSummaries;
|
|
102
|
+
private eventSummary;
|
|
103
|
+
getEvent(eventId: string, actor: Actor): Promise<MemberEvent>;
|
|
104
|
+
listEvents(query: MemberEventsQuery, actor: Actor): Promise<Page<MemberEventSummary>>;
|
|
105
|
+
eventCalendar(eventId: string, actor: Actor): Promise<string>;
|
|
106
|
+
eventAttendees(eventId: string, query: {
|
|
107
|
+
page: number;
|
|
108
|
+
pageSize: number;
|
|
109
|
+
}, actor: Actor): Promise<Page<EventAttendee>>;
|
|
110
|
+
eventFile(eventId: string, assetId: string, actor: Actor): Promise<string>;
|
|
111
|
+
directory(communityId: string, query: DirectoryQuery, actor: Actor): Promise<Page<DirectoryEntry>>;
|
|
112
|
+
communityHome(communityId: string, actor: Actor): Promise<CommunityHome>;
|
|
113
|
+
communitySpace(communityId: string, spaceId: string, actor: Actor): Promise<CommunityHomeSpace>;
|
|
68
114
|
private homeSpaces;
|
|
69
115
|
private linkViews;
|
|
70
116
|
}
|