@headless-lms/core 0.3.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 +9 -9
- package/dist/assets/index.d.ts +3 -2
- package/dist/assets/index.js +2 -1
- 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 +4 -3
- package/dist/assets/service.d.ts +0 -1
- package/dist/assets/service.js +0 -4
- 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 +69 -62
- package/dist/automations/catalog.js.map +1 -1
- package/dist/automations/community-derivations.js +4 -4
- package/dist/automations/community-derivations.js.map +1 -1
- package/dist/automations/community-mail.d.ts +3 -17
- package/dist/automations/community-mail.js +1 -21
- package/dist/automations/community-mail.js.map +1 -1
- package/dist/automations/events.d.ts +0 -10
- package/dist/automations/index.d.ts +11 -4
- package/dist/automations/index.js +8 -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 +119 -5
- package/dist/automations/service.d.ts +10 -13
- package/dist/automations/service.js +21 -83
- package/dist/automations/service.js.map +1 -1
- package/dist/content/events.d.ts +130 -80
- package/dist/content/events.js +11 -0
- 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 +25 -6
- package/dist/content/service.d.ts +4 -4
- package/dist/content/service.js +24 -8
- 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/chats.d.ts +9 -4
- package/dist/discussion/chats.js +80 -47
- 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 +194 -28
- package/dist/discussion/events.js +74 -17
- package/dist/discussion/events.js.map +1 -1
- package/dist/discussion/index.d.ts +7 -2
- package/dist/discussion/index.js +6 -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 +107 -24
- package/dist/discussion/ports.js.map +1 -1
- package/dist/discussion/posts.d.ts +18 -8
- package/dist/discussion/posts.js +207 -155
- package/dist/discussion/posts.js.map +1 -1
- package/dist/discussion/service.d.ts +17 -8
- package/dist/discussion/service.js +105 -41
- 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 +20 -20
- package/dist/entitlements/index.d.ts +2 -1
- package/dist/entitlements/index.js +2 -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/ports.d.ts +7 -3
- package/dist/entitlements/service.d.ts +5 -2
- package/dist/entitlements/service.js +23 -3
- package/dist/entitlements/service.js.map +1 -1
- 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 +5 -4
- package/dist/identity/index.js +3 -2
- package/dist/identity/model.d.ts +2 -2
- 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 +78 -54
- package/dist/integrations/events.d.ts +3 -3
- package/dist/organizations/events.d.ts +32 -32
- package/dist/organizations/index.d.ts +2 -1
- package/dist/organizations/index.js +2 -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 +3 -0
- package/dist/organizations/service.d.ts +2 -0
- package/dist/organizations/service.js +7 -0
- package/dist/organizations/service.js.map +1 -1
- package/dist/progress/events.d.ts +14 -14
- package/dist/reporting/member/index.d.ts +2 -2
- package/dist/reporting/member/model.d.ts +56 -23
- package/dist/reporting/member/ports.d.ts +9 -6
- package/dist/reporting/member/service.d.ts +33 -14
- package/dist/reporting/member/service.js +138 -60
- package/dist/reporting/member/service.js.map +1 -1
- package/dist/shared/errors.d.ts +13 -1
- package/dist/shared/errors.js +18 -1
- package/dist/shared/errors.js.map +1 -1
- package/dist/shared/id.d.ts +3 -0
- package/dist/shared/id.js +4 -1
- package/dist/shared/id.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 +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/automations.d.ts +8 -2
- package/dist/types/content.d.ts +2 -2
- package/dist/types/discussion.d.ts +2 -2
- package/dist/types/email-templates.d.ts +97 -3
- package/dist/types/identity.d.ts +2 -2
- package/dist/types/index.d.ts +7 -6
- package/dist/types/notifications.d.ts +157 -0
- package/dist/types/notifications.js +1 -0
- 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 +62 -1
- package/dist/types/schemas/content.js +25 -3
- package/dist/types/schemas/content.js.map +1 -1
- package/dist/types/schemas/discussion.d.ts +85 -12
- package/dist/types/schemas/discussion.js +47 -13
- package/dist/types/schemas/discussion.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 +6 -5
- package/dist/types/schemas/index.js +6 -5
- 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/progress.d.ts +3 -3
- 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
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Logger } from "../../types/ports.js";
|
|
2
|
+
import { NotificationFilter } from "../../types/notifications.js";
|
|
3
|
+
import "../../types/index.js";
|
|
4
|
+
import "../../shared/ports.js";
|
|
5
|
+
import { ListedNotification, NotificationPage, NotificationsRepository, NotificationsService, UnreadCounts } from "../ports.js";
|
|
6
|
+
//#region src/automations/notifications/service.d.ts
|
|
7
|
+
declare class NotificationsServiceImpl implements NotificationsService {
|
|
8
|
+
private readonly repo;
|
|
9
|
+
private readonly logger;
|
|
10
|
+
constructor(params: {
|
|
11
|
+
repo: NotificationsRepository;
|
|
12
|
+
logger?: Logger;
|
|
13
|
+
});
|
|
14
|
+
list(orgId: string, userId: string, filter: NotificationFilter, page: {
|
|
15
|
+
page: number;
|
|
16
|
+
pageSize: number;
|
|
17
|
+
}): Promise<NotificationPage>;
|
|
18
|
+
get(orgId: string, userId: string, notificationId: string): Promise<ListedNotification | null>;
|
|
19
|
+
unreadCounts(orgId: string, userId: string, communityIds: string[]): Promise<UnreadCounts>;
|
|
20
|
+
markRead(orgId: string, userId: string, notificationId: string): Promise<void>;
|
|
21
|
+
markAllRead(orgId: string, userId: string, filter: NotificationFilter): Promise<{
|
|
22
|
+
marked: number;
|
|
23
|
+
}>;
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { NotificationsServiceImpl };
|
|
27
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { NotFoundError } from "../../shared/errors.js";
|
|
2
|
+
import { noopLogger } from "../../shared/logger.js";
|
|
3
|
+
//#region src/automations/notifications/service.ts
|
|
4
|
+
var NotificationsServiceImpl = class {
|
|
5
|
+
repo;
|
|
6
|
+
logger;
|
|
7
|
+
constructor(params) {
|
|
8
|
+
this.repo = params.repo;
|
|
9
|
+
this.logger = params.logger ?? noopLogger;
|
|
10
|
+
}
|
|
11
|
+
list(orgId, userId, filter, page) {
|
|
12
|
+
return this.repo.page(orgId, userId, filter, page);
|
|
13
|
+
}
|
|
14
|
+
get(orgId, userId, notificationId) {
|
|
15
|
+
return this.repo.find(orgId, userId, notificationId);
|
|
16
|
+
}
|
|
17
|
+
async unreadCounts(orgId, userId, communityIds) {
|
|
18
|
+
const ids = [...new Set(communityIds)];
|
|
19
|
+
const counts = await this.repo.unreadCounts(orgId, userId, ids);
|
|
20
|
+
const byCommunity = new Map(counts.communities.map((row) => [row.communityId, row.unread]));
|
|
21
|
+
return {
|
|
22
|
+
org: counts.org,
|
|
23
|
+
communities: ids.map((communityId) => ({
|
|
24
|
+
communityId,
|
|
25
|
+
unread: byCommunity.get(communityId) ?? 0
|
|
26
|
+
}))
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
async markRead(orgId, userId, notificationId) {
|
|
30
|
+
if (!await this.repo.markRead(orgId, userId, notificationId, /* @__PURE__ */ new Date())) throw new NotFoundError("Notification", notificationId);
|
|
31
|
+
}
|
|
32
|
+
async markAllRead(orgId, userId, filter) {
|
|
33
|
+
const marked = await this.repo.markAllRead(orgId, userId, filter, /* @__PURE__ */ new Date());
|
|
34
|
+
this.logger.debug("notifications marked read", {
|
|
35
|
+
orgId,
|
|
36
|
+
userId,
|
|
37
|
+
marked
|
|
38
|
+
});
|
|
39
|
+
return { marked };
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
//#endregion
|
|
43
|
+
export { NotificationsServiceImpl };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.js","names":[],"sources":["../../../src/automations/notifications/service.ts"],"sourcesContent":["import { NotFoundError } from '../../shared/errors.js';\nimport { noopLogger } from '../../shared/logger.js';\nimport type { Logger } from '../../shared/ports.js';\nimport type { NotificationFilter } from '../../types/index.js';\nimport type {\n ListedNotification,\n NotificationPage,\n NotificationsRepository,\n NotificationsService,\n UnreadCounts,\n} from '../ports.js';\n\nexport class NotificationsServiceImpl implements NotificationsService {\n private readonly repo: NotificationsRepository;\n private readonly logger: Logger;\n\n constructor(params: { repo: NotificationsRepository; logger?: Logger }) {\n this.repo = params.repo;\n this.logger = params.logger ?? noopLogger;\n }\n\n list(\n orgId: string,\n userId: string,\n filter: NotificationFilter,\n page: { page: number; pageSize: number },\n ): Promise<NotificationPage> {\n return this.repo.page(orgId, userId, filter, page);\n }\n\n get(orgId: string, userId: string, notificationId: string): Promise<ListedNotification | null> {\n return this.repo.find(orgId, userId, notificationId);\n }\n\n async unreadCounts(orgId: string, userId: string, communityIds: string[]): Promise<UnreadCounts> {\n const ids = [...new Set(communityIds)];\n const counts = await this.repo.unreadCounts(orgId, userId, ids);\n const byCommunity = new Map(counts.communities.map((row) => [row.communityId, row.unread]));\n return {\n org: counts.org,\n communities: ids.map((communityId) => ({\n communityId,\n unread: byCommunity.get(communityId) ?? 0,\n })),\n };\n }\n\n async markRead(orgId: string, userId: string, notificationId: string): Promise<void> {\n if (!(await this.repo.markRead(orgId, userId, notificationId, new Date()))) {\n throw new NotFoundError('Notification', notificationId);\n }\n }\n\n async markAllRead(\n orgId: string,\n userId: string,\n filter: NotificationFilter,\n ): Promise<{ marked: number }> {\n const marked = await this.repo.markAllRead(orgId, userId, filter, new Date());\n this.logger.debug('notifications marked read', { orgId, userId, marked });\n return { marked };\n }\n}\n"],"mappings":";;;AAYA,IAAa,2BAAb,MAAsE;CACpE;CACA;CAEA,YAAY,QAA4D;EACtE,KAAK,OAAO,OAAO;EACnB,KAAK,SAAS,OAAO,UAAU;CACjC;CAEA,KACE,OACA,QACA,QACA,MAC2B;EAC3B,OAAO,KAAK,KAAK,KAAK,OAAO,QAAQ,QAAQ,IAAI;CACnD;CAEA,IAAI,OAAe,QAAgB,gBAA4D;EAC7F,OAAO,KAAK,KAAK,KAAK,OAAO,QAAQ,cAAc;CACrD;CAEA,MAAM,aAAa,OAAe,QAAgB,cAA+C;EAC/F,MAAM,MAAM,CAAC,GAAG,IAAI,IAAI,YAAY,CAAC;EACrC,MAAM,SAAS,MAAM,KAAK,KAAK,aAAa,OAAO,QAAQ,GAAG;EAC9D,MAAM,cAAc,IAAI,IAAI,OAAO,YAAY,KAAK,QAAQ,CAAC,IAAI,aAAa,IAAI,MAAM,CAAC,CAAC;EAC1F,OAAO;GACL,KAAK,OAAO;GACZ,aAAa,IAAI,KAAK,iBAAiB;IACrC;IACA,QAAQ,YAAY,IAAI,WAAW,KAAK;GAC1C,EAAE;EACJ;CACF;CAEA,MAAM,SAAS,OAAe,QAAgB,gBAAuC;EACnF,IAAI,CAAE,MAAM,KAAK,KAAK,SAAS,OAAO,QAAQ,gCAAgB,IAAI,KAAK,CAAC,GACtE,MAAM,IAAI,cAAc,gBAAgB,cAAc;CAE1D;CAEA,MAAM,YACJ,OACA,QACA,QAC6B;EAC7B,MAAM,SAAS,MAAM,KAAK,KAAK,YAAY,OAAO,QAAQ,wBAAQ,IAAI,KAAK,CAAC;EAC5E,KAAK,OAAO,MAAM,6BAA6B;GAAE;GAAO;GAAQ;EAAO,CAAC;EACxE,OAAO,EAAE,OAAO;CAClB;AACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { NotificationTypeDeclaration } from "../../types/notifications.js";
|
|
2
|
+
import "../../types/index.js";
|
|
3
|
+
//#region src/automations/notifications/types.d.ts
|
|
4
|
+
declare const NOTIFICATION_TYPES: NotificationTypeDeclaration[];
|
|
5
|
+
//#endregion
|
|
6
|
+
export { NOTIFICATION_TYPES };
|
|
7
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
//#region src/automations/notifications/types.ts
|
|
2
|
+
const NOTIFICATION_TYPES = [
|
|
3
|
+
{
|
|
4
|
+
type: "post.published",
|
|
5
|
+
scopes: ["space"],
|
|
6
|
+
reasons: ["space_member"],
|
|
7
|
+
display: { space: [
|
|
8
|
+
"spaceName",
|
|
9
|
+
"postTitle",
|
|
10
|
+
"authorName",
|
|
11
|
+
"excerpt"
|
|
12
|
+
] },
|
|
13
|
+
email: { space: { template: "newPostInSpace" } },
|
|
14
|
+
push: { space: {
|
|
15
|
+
title: "New post in {{spaceName}}",
|
|
16
|
+
body: "{{authorName}}: {{postTitle}}"
|
|
17
|
+
} }
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
type: "post.approved",
|
|
21
|
+
scopes: ["space"],
|
|
22
|
+
reasons: ["subject"],
|
|
23
|
+
display: { space: ["postTitle", "spaceName"] },
|
|
24
|
+
email: { space: { template: "yourPostWasPublished" } },
|
|
25
|
+
push: { space: {
|
|
26
|
+
title: "Your post was published",
|
|
27
|
+
body: "{{postTitle}} is live in {{spaceName}}"
|
|
28
|
+
} }
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
type: "post.awaiting_review",
|
|
32
|
+
scopes: ["space"],
|
|
33
|
+
reasons: ["moderator"],
|
|
34
|
+
display: { space: [
|
|
35
|
+
"spaceName",
|
|
36
|
+
"postTitle",
|
|
37
|
+
"authorName"
|
|
38
|
+
] },
|
|
39
|
+
email: { space: { template: "postAwaitingReview" } },
|
|
40
|
+
push: { space: {
|
|
41
|
+
title: "Post awaiting review in {{spaceName}}",
|
|
42
|
+
body: "{{authorName}}: {{postTitle}}"
|
|
43
|
+
} }
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
type: "post.removed",
|
|
47
|
+
scopes: ["space"],
|
|
48
|
+
reasons: ["subject"],
|
|
49
|
+
display: { space: ["postTitle", "spaceName"] },
|
|
50
|
+
email: { space: { template: "yourPostWasRemoved" } },
|
|
51
|
+
push: { space: {
|
|
52
|
+
title: "Your post was removed",
|
|
53
|
+
body: "{{postTitle}} was removed from {{spaceName}}"
|
|
54
|
+
} }
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
type: "post.reacted",
|
|
58
|
+
scopes: ["space"],
|
|
59
|
+
reasons: ["post_author"],
|
|
60
|
+
display: { space: [
|
|
61
|
+
"postTitle",
|
|
62
|
+
"reactorName",
|
|
63
|
+
"reaction"
|
|
64
|
+
] },
|
|
65
|
+
email: { space: { template: "postReacted" } },
|
|
66
|
+
push: { space: {
|
|
67
|
+
title: "{{reactorName}} reacted to your post",
|
|
68
|
+
body: "{{reaction}} on {{postTitle}}"
|
|
69
|
+
} }
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
type: "comment.created",
|
|
73
|
+
scopes: ["space", "org"],
|
|
74
|
+
reasons: [
|
|
75
|
+
"post_author",
|
|
76
|
+
"comment_author",
|
|
77
|
+
"follower",
|
|
78
|
+
"thread_participant"
|
|
79
|
+
],
|
|
80
|
+
display: {
|
|
81
|
+
space: [
|
|
82
|
+
"postTitle",
|
|
83
|
+
"commenterName",
|
|
84
|
+
"excerpt"
|
|
85
|
+
],
|
|
86
|
+
org: [
|
|
87
|
+
"activityTitle",
|
|
88
|
+
"courseTitle",
|
|
89
|
+
"courseId",
|
|
90
|
+
"commenterName",
|
|
91
|
+
"excerpt"
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
email: {
|
|
95
|
+
space: {
|
|
96
|
+
template: "newCommentOnPost",
|
|
97
|
+
byReason: { comment_author: "replyToYourComment" }
|
|
98
|
+
},
|
|
99
|
+
org: { template: "activityCommentCreated" }
|
|
100
|
+
},
|
|
101
|
+
push: {
|
|
102
|
+
space: {
|
|
103
|
+
title: "{{commenterName}} commented on {{postTitle}}",
|
|
104
|
+
body: "{{excerpt}}"
|
|
105
|
+
},
|
|
106
|
+
org: {
|
|
107
|
+
title: "{{commenterName}} commented on {{activityTitle}}",
|
|
108
|
+
body: "{{excerpt}}"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
type: "comment.removed",
|
|
114
|
+
scopes: ["space", "org"],
|
|
115
|
+
reasons: ["subject"],
|
|
116
|
+
display: {
|
|
117
|
+
space: ["postTitle"],
|
|
118
|
+
org: [
|
|
119
|
+
"activityTitle",
|
|
120
|
+
"courseTitle",
|
|
121
|
+
"courseId"
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
email: {
|
|
125
|
+
space: { template: "yourCommentWasRemoved" },
|
|
126
|
+
org: { template: "activityCommentRemoved" }
|
|
127
|
+
},
|
|
128
|
+
push: {
|
|
129
|
+
space: {
|
|
130
|
+
title: "Your comment was removed",
|
|
131
|
+
body: "Your comment on {{postTitle}} was removed"
|
|
132
|
+
},
|
|
133
|
+
org: {
|
|
134
|
+
title: "Your comment was removed",
|
|
135
|
+
body: "Your comment on {{activityTitle}} was removed"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
type: "comment.reacted",
|
|
141
|
+
scopes: ["space", "org"],
|
|
142
|
+
reasons: ["comment_author"],
|
|
143
|
+
display: {
|
|
144
|
+
space: [
|
|
145
|
+
"postTitle",
|
|
146
|
+
"excerpt",
|
|
147
|
+
"reactorName",
|
|
148
|
+
"reaction"
|
|
149
|
+
],
|
|
150
|
+
org: [
|
|
151
|
+
"activityTitle",
|
|
152
|
+
"courseTitle",
|
|
153
|
+
"courseId",
|
|
154
|
+
"excerpt",
|
|
155
|
+
"reactorName",
|
|
156
|
+
"reaction"
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
email: {
|
|
160
|
+
space: { template: "commentReacted" },
|
|
161
|
+
org: { template: "activityCommentReacted" }
|
|
162
|
+
},
|
|
163
|
+
push: {
|
|
164
|
+
space: {
|
|
165
|
+
title: "{{reactorName}} reacted to your comment",
|
|
166
|
+
body: "{{reaction}} on your comment in {{postTitle}}"
|
|
167
|
+
},
|
|
168
|
+
org: {
|
|
169
|
+
title: "{{reactorName}} reacted to your comment",
|
|
170
|
+
body: "{{reaction}} on your comment in {{activityTitle}}"
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
type: "content.flagged",
|
|
176
|
+
scopes: ["space", "org"],
|
|
177
|
+
reasons: ["moderator", "staff"],
|
|
178
|
+
display: {
|
|
179
|
+
space: [
|
|
180
|
+
"spaceName",
|
|
181
|
+
"excerpt",
|
|
182
|
+
"reason"
|
|
183
|
+
],
|
|
184
|
+
org: [
|
|
185
|
+
"activityTitle",
|
|
186
|
+
"courseTitle",
|
|
187
|
+
"courseId",
|
|
188
|
+
"excerpt",
|
|
189
|
+
"reason"
|
|
190
|
+
]
|
|
191
|
+
},
|
|
192
|
+
email: {
|
|
193
|
+
space: { template: "somethingWasFlagged" },
|
|
194
|
+
org: { template: "activityCommentFlagged" }
|
|
195
|
+
},
|
|
196
|
+
push: {
|
|
197
|
+
space: {
|
|
198
|
+
title: "Something was flagged in {{spaceName}}",
|
|
199
|
+
body: "{{reason}}: {{excerpt}}"
|
|
200
|
+
},
|
|
201
|
+
org: {
|
|
202
|
+
title: "A comment was flagged in {{activityTitle}}",
|
|
203
|
+
body: "{{reason}}: {{excerpt}}"
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
type: "mention",
|
|
209
|
+
scopes: [
|
|
210
|
+
"space",
|
|
211
|
+
"chat",
|
|
212
|
+
"org"
|
|
213
|
+
],
|
|
214
|
+
reasons: ["mentioned"],
|
|
215
|
+
display: {
|
|
216
|
+
space: [
|
|
217
|
+
"authorName",
|
|
218
|
+
"excerpt",
|
|
219
|
+
"postTitle"
|
|
220
|
+
],
|
|
221
|
+
chat: [
|
|
222
|
+
"authorName",
|
|
223
|
+
"excerpt",
|
|
224
|
+
"chatTitle"
|
|
225
|
+
],
|
|
226
|
+
org: [
|
|
227
|
+
"authorName",
|
|
228
|
+
"excerpt",
|
|
229
|
+
"activityTitle",
|
|
230
|
+
"courseTitle",
|
|
231
|
+
"courseId"
|
|
232
|
+
]
|
|
233
|
+
},
|
|
234
|
+
email: {
|
|
235
|
+
space: { template: "mention" },
|
|
236
|
+
chat: { template: "mention" },
|
|
237
|
+
org: { template: "activityMention" }
|
|
238
|
+
},
|
|
239
|
+
push: {
|
|
240
|
+
space: {
|
|
241
|
+
title: "{{authorName}} mentioned you in {{postTitle}}",
|
|
242
|
+
body: "{{excerpt}}"
|
|
243
|
+
},
|
|
244
|
+
chat: {
|
|
245
|
+
title: "{{authorName}} mentioned you in {{chatTitle}}",
|
|
246
|
+
body: "{{excerpt}}"
|
|
247
|
+
},
|
|
248
|
+
org: {
|
|
249
|
+
title: "{{authorName}} mentioned you in {{activityTitle}}",
|
|
250
|
+
body: "{{excerpt}}"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
type: "message.sent",
|
|
256
|
+
scopes: ["chat"],
|
|
257
|
+
reasons: ["participant"],
|
|
258
|
+
display: { chat: [
|
|
259
|
+
"senderName",
|
|
260
|
+
"chatTitle",
|
|
261
|
+
"excerpt",
|
|
262
|
+
"count",
|
|
263
|
+
"summary"
|
|
264
|
+
] },
|
|
265
|
+
email: { chat: { template: "newMessage" } },
|
|
266
|
+
push: { chat: {
|
|
267
|
+
title: "{{chatTitle}}",
|
|
268
|
+
body: "{{senderName}}: {{summary}}"
|
|
269
|
+
} }
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
type: "message.reacted",
|
|
273
|
+
scopes: ["chat"],
|
|
274
|
+
reasons: ["message_author"],
|
|
275
|
+
display: { chat: [
|
|
276
|
+
"excerpt",
|
|
277
|
+
"reactorName",
|
|
278
|
+
"reaction"
|
|
279
|
+
] },
|
|
280
|
+
email: { chat: { template: "messageReacted" } },
|
|
281
|
+
push: { chat: {
|
|
282
|
+
title: "{{reactorName}} reacted to your message",
|
|
283
|
+
body: "{{reaction}} on {{excerpt}}"
|
|
284
|
+
} }
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
type: "message.flagged",
|
|
288
|
+
scopes: ["chat"],
|
|
289
|
+
reasons: ["staff"],
|
|
290
|
+
display: { chat: ["reason"] },
|
|
291
|
+
email: { chat: { template: "messageWasFlagged" } },
|
|
292
|
+
push: { chat: {
|
|
293
|
+
title: "A message was flagged",
|
|
294
|
+
body: "{{reason}}"
|
|
295
|
+
} }
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
type: "chat.request",
|
|
299
|
+
scopes: ["chat"],
|
|
300
|
+
reasons: ["participant"],
|
|
301
|
+
display: { chat: ["senderName", "excerpt"] },
|
|
302
|
+
email: { chat: { template: "messageRequest" } },
|
|
303
|
+
push: { chat: {
|
|
304
|
+
title: "{{senderName}} sent you a message request",
|
|
305
|
+
body: "{{excerpt}}"
|
|
306
|
+
} }
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
type: "chat.added",
|
|
310
|
+
scopes: ["chat"],
|
|
311
|
+
reasons: ["subject"],
|
|
312
|
+
display: { chat: ["adderName", "participantNames"] },
|
|
313
|
+
email: { chat: { template: "addedToGroupChat" } },
|
|
314
|
+
push: { chat: {
|
|
315
|
+
title: "{{adderName}} added you to a chat",
|
|
316
|
+
body: "With {{participantNames}}"
|
|
317
|
+
} }
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
type: "digest",
|
|
321
|
+
scopes: ["community"],
|
|
322
|
+
reasons: ["community_member"],
|
|
323
|
+
display: { community: [
|
|
324
|
+
"communityTitle",
|
|
325
|
+
"from",
|
|
326
|
+
"to",
|
|
327
|
+
"posts"
|
|
328
|
+
] },
|
|
329
|
+
email: { community: { template: "digest" } },
|
|
330
|
+
push: { community: {
|
|
331
|
+
title: "{{communityTitle}} digest",
|
|
332
|
+
body: "The latest posts in {{communityTitle}}"
|
|
333
|
+
} }
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
type: "space.join_requested",
|
|
337
|
+
scopes: ["space"],
|
|
338
|
+
reasons: ["moderator"],
|
|
339
|
+
display: { space: [
|
|
340
|
+
"spaceName",
|
|
341
|
+
"spaceId",
|
|
342
|
+
"memberName",
|
|
343
|
+
"seatsLeft"
|
|
344
|
+
] },
|
|
345
|
+
email: { space: { template: "joinRequest" } },
|
|
346
|
+
push: { space: {
|
|
347
|
+
title: "{{memberName}} asked to join {{spaceName}}",
|
|
348
|
+
body: "Seats left: {{seatsLeft}}"
|
|
349
|
+
} }
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
type: "space.invited",
|
|
353
|
+
scopes: ["space"],
|
|
354
|
+
reasons: ["subject"],
|
|
355
|
+
display: { space: [
|
|
356
|
+
"spaceName",
|
|
357
|
+
"spaceId",
|
|
358
|
+
"inviterName"
|
|
359
|
+
] },
|
|
360
|
+
email: { space: { template: "invitedToSpace" } },
|
|
361
|
+
push: { space: {
|
|
362
|
+
title: "{{inviterName}} invited you to {{spaceName}}",
|
|
363
|
+
body: "Open {{spaceName}} to accept"
|
|
364
|
+
} }
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
type: "space.request_approved",
|
|
368
|
+
scopes: ["space"],
|
|
369
|
+
reasons: ["subject"],
|
|
370
|
+
display: { space: ["spaceName", "spaceId"] },
|
|
371
|
+
email: { space: { template: "requestApproved" } },
|
|
372
|
+
push: { space: {
|
|
373
|
+
title: "You're in {{spaceName}}",
|
|
374
|
+
body: "Your request to join {{spaceName}} was approved"
|
|
375
|
+
} }
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
type: "space.request_declined",
|
|
379
|
+
scopes: ["space"],
|
|
380
|
+
reasons: ["subject"],
|
|
381
|
+
display: { space: ["spaceName", "spaceId"] },
|
|
382
|
+
email: { space: { template: "requestDeclined" } },
|
|
383
|
+
push: { space: {
|
|
384
|
+
title: "Request declined",
|
|
385
|
+
body: "Your request to join {{spaceName}} was declined"
|
|
386
|
+
} }
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
type: "community.welcome",
|
|
390
|
+
scopes: ["community"],
|
|
391
|
+
reasons: ["subject"],
|
|
392
|
+
display: { community: ["communityTitle", "spaceNames"] },
|
|
393
|
+
email: { community: { template: "welcomeToCommunity" } },
|
|
394
|
+
push: { community: {
|
|
395
|
+
title: "Welcome to {{communityTitle}}",
|
|
396
|
+
body: "You can open {{spaceNames}}"
|
|
397
|
+
} }
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
type: "community.ending_soon",
|
|
401
|
+
scopes: ["community"],
|
|
402
|
+
reasons: ["subject"],
|
|
403
|
+
display: { community: ["communityTitle", "expiresAt"] },
|
|
404
|
+
email: { community: { template: "membershipEndingSoon" } },
|
|
405
|
+
push: { community: {
|
|
406
|
+
title: "{{communityTitle}} ends soon",
|
|
407
|
+
body: "Your access to {{communityTitle}} ends within a week"
|
|
408
|
+
} }
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
type: "community.membership_ended",
|
|
412
|
+
scopes: ["org"],
|
|
413
|
+
reasons: ["subject"],
|
|
414
|
+
display: { org: ["communities"] },
|
|
415
|
+
email: { org: { template: "membershipEnded" } },
|
|
416
|
+
push: { org: {
|
|
417
|
+
title: "Your membership has ended",
|
|
418
|
+
body: "Your access to a community ended"
|
|
419
|
+
} }
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
type: "access.granted",
|
|
423
|
+
scopes: ["org"],
|
|
424
|
+
reasons: ["subject"],
|
|
425
|
+
display: { org: ["contentTitle", "contentType"] },
|
|
426
|
+
email: { org: { template: "accessGranted" } },
|
|
427
|
+
push: { org: {
|
|
428
|
+
title: "You now have access to {{contentTitle}}",
|
|
429
|
+
body: "Your {{contentType}} is ready"
|
|
430
|
+
} }
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
type: "access.revoked",
|
|
434
|
+
scopes: ["org"],
|
|
435
|
+
reasons: ["subject"],
|
|
436
|
+
display: { org: ["contentTitle"] },
|
|
437
|
+
email: { org: { template: "accessRevoked" } },
|
|
438
|
+
push: { org: {
|
|
439
|
+
title: "Access removed",
|
|
440
|
+
body: "You no longer have access to {{contentTitle}}"
|
|
441
|
+
} }
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
type: "course.activity_added",
|
|
445
|
+
scopes: ["org"],
|
|
446
|
+
reasons: ["course_member"],
|
|
447
|
+
display: { org: [
|
|
448
|
+
"courseTitle",
|
|
449
|
+
"moduleTitle",
|
|
450
|
+
"activityTitle"
|
|
451
|
+
] },
|
|
452
|
+
email: { org: { template: "courseActivityAdded" } },
|
|
453
|
+
push: { org: {
|
|
454
|
+
title: "New in {{courseTitle}}",
|
|
455
|
+
body: "{{activityTitle}} in {{moduleTitle}}"
|
|
456
|
+
} }
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
type: "moderator.assigned",
|
|
460
|
+
scopes: ["org"],
|
|
461
|
+
reasons: ["subject"],
|
|
462
|
+
display: { org: ["communityTitles"] },
|
|
463
|
+
email: { org: { template: "youAreNowAModerator" } },
|
|
464
|
+
push: { org: {
|
|
465
|
+
title: "You are now a moderator",
|
|
466
|
+
body: "You can moderate {{communityTitles}}"
|
|
467
|
+
} }
|
|
468
|
+
}
|
|
469
|
+
];
|
|
470
|
+
//#endregion
|
|
471
|
+
export { NOTIFICATION_TYPES };
|
|
472
|
+
|
|
473
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/automations/notifications/types.ts"],"sourcesContent":["import type { NotificationTypeDeclaration } from '../../types/index.js';\n\nexport const NOTIFICATION_TYPES: NotificationTypeDeclaration[] = [\n {\n type: 'post.published',\n scopes: ['space'],\n reasons: ['space_member'],\n display: { space: ['spaceName', 'postTitle', 'authorName', 'excerpt'] },\n email: { space: { template: 'newPostInSpace' } },\n push: { space: { title: 'New post in {{spaceName}}', body: '{{authorName}}: {{postTitle}}' } },\n },\n {\n type: 'post.approved',\n scopes: ['space'],\n reasons: ['subject'],\n display: { space: ['postTitle', 'spaceName'] },\n email: { space: { template: 'yourPostWasPublished' } },\n push: {\n space: {\n title: 'Your post was published',\n body: '{{postTitle}} is live in {{spaceName}}',\n },\n },\n },\n {\n type: 'post.awaiting_review',\n scopes: ['space'],\n reasons: ['moderator'],\n display: { space: ['spaceName', 'postTitle', 'authorName'] },\n email: { space: { template: 'postAwaitingReview' } },\n push: {\n space: {\n title: 'Post awaiting review in {{spaceName}}',\n body: '{{authorName}}: {{postTitle}}',\n },\n },\n },\n {\n type: 'post.removed',\n scopes: ['space'],\n reasons: ['subject'],\n display: { space: ['postTitle', 'spaceName'] },\n email: { space: { template: 'yourPostWasRemoved' } },\n push: {\n space: {\n title: 'Your post was removed',\n body: '{{postTitle}} was removed from {{spaceName}}',\n },\n },\n },\n {\n type: 'post.reacted',\n scopes: ['space'],\n reasons: ['post_author'],\n display: { space: ['postTitle', 'reactorName', 'reaction'] },\n email: { space: { template: 'postReacted' } },\n push: {\n space: {\n title: '{{reactorName}} reacted to your post',\n body: '{{reaction}} on {{postTitle}}',\n },\n },\n },\n {\n type: 'comment.created',\n scopes: ['space', 'org'],\n reasons: ['post_author', 'comment_author', 'follower', 'thread_participant'],\n display: {\n space: ['postTitle', 'commenterName', 'excerpt'],\n org: ['activityTitle', 'courseTitle', 'courseId', 'commenterName', 'excerpt'],\n },\n email: {\n space: { template: 'newCommentOnPost', byReason: { comment_author: 'replyToYourComment' } },\n org: { template: 'activityCommentCreated' },\n },\n push: {\n space: { title: '{{commenterName}} commented on {{postTitle}}', body: '{{excerpt}}' },\n org: { title: '{{commenterName}} commented on {{activityTitle}}', body: '{{excerpt}}' },\n },\n },\n {\n type: 'comment.removed',\n scopes: ['space', 'org'],\n reasons: ['subject'],\n display: {\n space: ['postTitle'],\n org: ['activityTitle', 'courseTitle', 'courseId'],\n },\n email: {\n space: { template: 'yourCommentWasRemoved' },\n org: { template: 'activityCommentRemoved' },\n },\n push: {\n space: {\n title: 'Your comment was removed',\n body: 'Your comment on {{postTitle}} was removed',\n },\n org: {\n title: 'Your comment was removed',\n body: 'Your comment on {{activityTitle}} was removed',\n },\n },\n },\n {\n type: 'comment.reacted',\n scopes: ['space', 'org'],\n reasons: ['comment_author'],\n display: {\n space: ['postTitle', 'excerpt', 'reactorName', 'reaction'],\n org: ['activityTitle', 'courseTitle', 'courseId', 'excerpt', 'reactorName', 'reaction'],\n },\n email: {\n space: { template: 'commentReacted' },\n org: { template: 'activityCommentReacted' },\n },\n push: {\n space: {\n title: '{{reactorName}} reacted to your comment',\n body: '{{reaction}} on your comment in {{postTitle}}',\n },\n org: {\n title: '{{reactorName}} reacted to your comment',\n body: '{{reaction}} on your comment in {{activityTitle}}',\n },\n },\n },\n {\n type: 'content.flagged',\n scopes: ['space', 'org'],\n reasons: ['moderator', 'staff'],\n display: {\n space: ['spaceName', 'excerpt', 'reason'],\n org: ['activityTitle', 'courseTitle', 'courseId', 'excerpt', 'reason'],\n },\n email: {\n space: { template: 'somethingWasFlagged' },\n org: { template: 'activityCommentFlagged' },\n },\n push: {\n space: { title: 'Something was flagged in {{spaceName}}', body: '{{reason}}: {{excerpt}}' },\n org: {\n title: 'A comment was flagged in {{activityTitle}}',\n body: '{{reason}}: {{excerpt}}',\n },\n },\n },\n {\n type: 'mention',\n scopes: ['space', 'chat', 'org'],\n reasons: ['mentioned'],\n display: {\n space: ['authorName', 'excerpt', 'postTitle'],\n chat: ['authorName', 'excerpt', 'chatTitle'],\n org: ['authorName', 'excerpt', 'activityTitle', 'courseTitle', 'courseId'],\n },\n email: {\n space: { template: 'mention' },\n chat: { template: 'mention' },\n org: { template: 'activityMention' },\n },\n push: {\n space: { title: '{{authorName}} mentioned you in {{postTitle}}', body: '{{excerpt}}' },\n chat: { title: '{{authorName}} mentioned you in {{chatTitle}}', body: '{{excerpt}}' },\n org: { title: '{{authorName}} mentioned you in {{activityTitle}}', body: '{{excerpt}}' },\n },\n },\n {\n type: 'message.sent',\n scopes: ['chat'],\n reasons: ['participant'],\n display: { chat: ['senderName', 'chatTitle', 'excerpt', 'count', 'summary'] },\n email: { chat: { template: 'newMessage' } },\n push: { chat: { title: '{{chatTitle}}', body: '{{senderName}}: {{summary}}' } },\n },\n {\n type: 'message.reacted',\n scopes: ['chat'],\n reasons: ['message_author'],\n display: { chat: ['excerpt', 'reactorName', 'reaction'] },\n email: { chat: { template: 'messageReacted' } },\n push: {\n chat: {\n title: '{{reactorName}} reacted to your message',\n body: '{{reaction}} on {{excerpt}}',\n },\n },\n },\n {\n type: 'message.flagged',\n scopes: ['chat'],\n reasons: ['staff'],\n display: { chat: ['reason'] },\n email: { chat: { template: 'messageWasFlagged' } },\n push: { chat: { title: 'A message was flagged', body: '{{reason}}' } },\n },\n {\n type: 'chat.request',\n scopes: ['chat'],\n reasons: ['participant'],\n display: { chat: ['senderName', 'excerpt'] },\n email: { chat: { template: 'messageRequest' } },\n push: { chat: { title: '{{senderName}} sent you a message request', body: '{{excerpt}}' } },\n },\n {\n type: 'chat.added',\n scopes: ['chat'],\n reasons: ['subject'],\n display: { chat: ['adderName', 'participantNames'] },\n email: { chat: { template: 'addedToGroupChat' } },\n push: {\n chat: { title: '{{adderName}} added you to a chat', body: 'With {{participantNames}}' },\n },\n },\n {\n type: 'digest',\n scopes: ['community'],\n reasons: ['community_member'],\n display: { community: ['communityTitle', 'from', 'to', 'posts'] },\n email: { community: { template: 'digest' } },\n push: {\n community: {\n title: '{{communityTitle}} digest',\n body: 'The latest posts in {{communityTitle}}',\n },\n },\n },\n {\n type: 'space.join_requested',\n scopes: ['space'],\n reasons: ['moderator'],\n display: { space: ['spaceName', 'spaceId', 'memberName', 'seatsLeft'] },\n email: { space: { template: 'joinRequest' } },\n push: {\n space: {\n title: '{{memberName}} asked to join {{spaceName}}',\n body: 'Seats left: {{seatsLeft}}',\n },\n },\n },\n {\n type: 'space.invited',\n scopes: ['space'],\n reasons: ['subject'],\n display: { space: ['spaceName', 'spaceId', 'inviterName'] },\n email: { space: { template: 'invitedToSpace' } },\n push: {\n space: {\n title: '{{inviterName}} invited you to {{spaceName}}',\n body: 'Open {{spaceName}} to accept',\n },\n },\n },\n {\n type: 'space.request_approved',\n scopes: ['space'],\n reasons: ['subject'],\n display: { space: ['spaceName', 'spaceId'] },\n email: { space: { template: 'requestApproved' } },\n push: {\n space: {\n title: \"You're in {{spaceName}}\",\n body: 'Your request to join {{spaceName}} was approved',\n },\n },\n },\n {\n type: 'space.request_declined',\n scopes: ['space'],\n reasons: ['subject'],\n display: { space: ['spaceName', 'spaceId'] },\n email: { space: { template: 'requestDeclined' } },\n push: {\n space: {\n title: 'Request declined',\n body: 'Your request to join {{spaceName}} was declined',\n },\n },\n },\n {\n type: 'community.welcome',\n scopes: ['community'],\n reasons: ['subject'],\n display: { community: ['communityTitle', 'spaceNames'] },\n email: { community: { template: 'welcomeToCommunity' } },\n push: {\n community: { title: 'Welcome to {{communityTitle}}', body: 'You can open {{spaceNames}}' },\n },\n },\n {\n type: 'community.ending_soon',\n scopes: ['community'],\n reasons: ['subject'],\n display: { community: ['communityTitle', 'expiresAt'] },\n email: { community: { template: 'membershipEndingSoon' } },\n push: {\n community: {\n title: '{{communityTitle}} ends soon',\n body: 'Your access to {{communityTitle}} ends within a week',\n },\n },\n },\n {\n type: 'community.membership_ended',\n scopes: ['org'],\n reasons: ['subject'],\n display: { org: ['communities'] },\n email: { org: { template: 'membershipEnded' } },\n push: { org: { title: 'Your membership has ended', body: 'Your access to a community ended' } },\n },\n {\n type: 'access.granted',\n scopes: ['org'],\n reasons: ['subject'],\n display: { org: ['contentTitle', 'contentType'] },\n email: { org: { template: 'accessGranted' } },\n push: {\n org: {\n title: 'You now have access to {{contentTitle}}',\n body: 'Your {{contentType}} is ready',\n },\n },\n },\n {\n type: 'access.revoked',\n scopes: ['org'],\n reasons: ['subject'],\n display: { org: ['contentTitle'] },\n email: { org: { template: 'accessRevoked' } },\n push: {\n org: { title: 'Access removed', body: 'You no longer have access to {{contentTitle}}' },\n },\n },\n {\n type: 'course.activity_added',\n scopes: ['org'],\n reasons: ['course_member'],\n display: { org: ['courseTitle', 'moduleTitle', 'activityTitle'] },\n email: { org: { template: 'courseActivityAdded' } },\n push: {\n org: { title: 'New in {{courseTitle}}', body: '{{activityTitle}} in {{moduleTitle}}' },\n },\n },\n {\n type: 'moderator.assigned',\n scopes: ['org'],\n reasons: ['subject'],\n display: { org: ['communityTitles'] },\n email: { org: { template: 'youAreNowAModerator' } },\n push: {\n org: { title: 'You are now a moderator', body: 'You can moderate {{communityTitles}}' },\n },\n },\n];\n"],"mappings":";AAEA,MAAa,qBAAoD;CAC/D;EACE,MAAM;EACN,QAAQ,CAAC,OAAO;EAChB,SAAS,CAAC,cAAc;EACxB,SAAS,EAAE,OAAO;GAAC;GAAa;GAAa;GAAc;EAAS,EAAE;EACtE,OAAO,EAAE,OAAO,EAAE,UAAU,iBAAiB,EAAE;EAC/C,MAAM,EAAE,OAAO;GAAE,OAAO;GAA6B,MAAM;EAAgC,EAAE;CAC/F;CACA;EACE,MAAM;EACN,QAAQ,CAAC,OAAO;EAChB,SAAS,CAAC,SA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