@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
|
@@ -0,0 +1,560 @@
|
|
|
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"],
|
|
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: ["moderator"],
|
|
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: "role.assigned",
|
|
460
|
+
scopes: ["org"],
|
|
461
|
+
reasons: ["subject"],
|
|
462
|
+
display: { org: [
|
|
463
|
+
"roleName",
|
|
464
|
+
"place",
|
|
465
|
+
"contentId",
|
|
466
|
+
"contentType"
|
|
467
|
+
] },
|
|
468
|
+
email: { org: { template: "roleAssigned" } },
|
|
469
|
+
push: { org: {
|
|
470
|
+
title: "You are now {{roleName}}",
|
|
471
|
+
body: "You are now {{roleName}} {{place}}"
|
|
472
|
+
} }
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
type: "event.granted",
|
|
476
|
+
scopes: ["org"],
|
|
477
|
+
reasons: ["event_member"],
|
|
478
|
+
display: { org: [
|
|
479
|
+
"eventTitle",
|
|
480
|
+
"startsAt",
|
|
481
|
+
"endsAt",
|
|
482
|
+
"timeZone"
|
|
483
|
+
] },
|
|
484
|
+
email: { org: { template: "eventGranted" } },
|
|
485
|
+
push: { org: {
|
|
486
|
+
title: "You're going to {{eventTitle}}",
|
|
487
|
+
body: "Add it to your calendar"
|
|
488
|
+
} }
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
type: "event.starting_soon",
|
|
492
|
+
scopes: ["org"],
|
|
493
|
+
reasons: ["event_member"],
|
|
494
|
+
display: { org: [
|
|
495
|
+
"eventTitle",
|
|
496
|
+
"startsAt",
|
|
497
|
+
"endsAt",
|
|
498
|
+
"timeZone",
|
|
499
|
+
"leadText"
|
|
500
|
+
] },
|
|
501
|
+
email: { org: { template: "eventStartingSoon" } },
|
|
502
|
+
push: { org: {
|
|
503
|
+
title: "{{eventTitle}} starts in {{leadText}}",
|
|
504
|
+
body: "Open the event for the link"
|
|
505
|
+
} }
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
type: "event.changed",
|
|
509
|
+
scopes: ["org"],
|
|
510
|
+
reasons: ["event_member"],
|
|
511
|
+
display: { org: [
|
|
512
|
+
"eventTitle",
|
|
513
|
+
"startsAt",
|
|
514
|
+
"endsAt",
|
|
515
|
+
"timeZone",
|
|
516
|
+
"changed"
|
|
517
|
+
] },
|
|
518
|
+
email: { org: { template: "eventChanged" } },
|
|
519
|
+
push: { org: {
|
|
520
|
+
title: "{{eventTitle}} has changed",
|
|
521
|
+
body: "See the new details"
|
|
522
|
+
} }
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
type: "event.canceled",
|
|
526
|
+
scopes: ["org"],
|
|
527
|
+
reasons: ["event_member"],
|
|
528
|
+
display: { org: [
|
|
529
|
+
"eventTitle",
|
|
530
|
+
"startsAt",
|
|
531
|
+
"endsAt",
|
|
532
|
+
"timeZone"
|
|
533
|
+
] },
|
|
534
|
+
email: { org: { template: "eventCanceled" } },
|
|
535
|
+
push: { org: {
|
|
536
|
+
title: "{{eventTitle}} was canceled",
|
|
537
|
+
body: ""
|
|
538
|
+
} }
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
type: "event.revoked",
|
|
542
|
+
scopes: ["org"],
|
|
543
|
+
reasons: ["event_member"],
|
|
544
|
+
display: { org: [
|
|
545
|
+
"eventTitle",
|
|
546
|
+
"startsAt",
|
|
547
|
+
"endsAt",
|
|
548
|
+
"timeZone"
|
|
549
|
+
] },
|
|
550
|
+
email: { org: { template: "eventRevoked" } },
|
|
551
|
+
push: { org: {
|
|
552
|
+
title: "You're no longer going to {{eventTitle}}",
|
|
553
|
+
body: ""
|
|
554
|
+
} }
|
|
555
|
+
}
|
|
556
|
+
];
|
|
557
|
+
//#endregion
|
|
558
|
+
export { NOTIFICATION_TYPES };
|
|
559
|
+
|
|
560
|
+
//# 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'],\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: ['moderator'],\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: 'role.assigned',\n scopes: ['org'],\n reasons: ['subject'],\n display: { org: ['roleName', 'place', 'contentId', 'contentType'] },\n email: { org: { template: 'roleAssigned' } },\n push: {\n org: { title: 'You are now {{roleName}}', body: 'You are now {{roleName}} {{place}}' },\n },\n },\n {\n type: 'event.granted',\n scopes: ['org'],\n reasons: ['event_member'],\n display: { org: ['eventTitle', 'startsAt', 'endsAt', 'timeZone'] },\n email: { org: { template: 'eventGranted' } },\n push: { org: { title: \"You're going to {{eventTitle}}\", body: 'Add it to your calendar' } },\n },\n {\n type: 'event.starting_soon',\n scopes: ['org'],\n reasons: ['event_member'],\n display: { org: ['eventTitle', 'startsAt', 'endsAt', 'timeZone', 'leadText'] },\n email: { org: { template: 'eventStartingSoon' } },\n push: {\n org: { title: '{{eventTitle}} starts in {{leadText}}', body: 'Open the event for the link' },\n },\n },\n {\n type: 'event.changed',\n scopes: ['org'],\n reasons: ['event_member'],\n display: { org: ['eventTitle', 'startsAt', 'endsAt', 'timeZone', 'changed'] },\n email: { org: { template: 'eventChanged' } },\n push: { org: { title: '{{eventTitle}} has changed', body: 'See the new details' } },\n },\n {\n type: 'event.canceled',\n scopes: ['org'],\n reasons: ['event_member'],\n display: { org: ['eventTitle', 'startsAt', 'endsAt', 'timeZone'] },\n email: { org: { template: 'eventCanceled' } },\n push: { org: { title: '{{eventTitle}} was canceled', body: '' } },\n },\n {\n type: 'event.revoked',\n scopes: ['org'],\n reasons: ['event_member'],\n display: { org: ['eventTitle', 'startsAt', 'endsAt', 'timeZone'] },\n email: { org: { template: 'eventRevoked' } },\n push: { org: { title: \"You're no longer going to {{eventTitle}}\", body: '' } },\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,SAAS;EACnB,SAAS,EAAE,OAAO,CAAC,aAAa,WAAW,EAAE;EAC7C,OAAO,EAAE,OAAO,EAAE,UAAU,uBAAuB,EAAE;EACrD,MAAM,EACJ,OAAO;GACL,OAAO;GACP,MAAM;EACR,EACF;CACF;CACA;EACE,MAAM;EACN,QAAQ,CAAC,OAAO;EAChB,SAAS,CAAC,WAAW;EACrB,SAAS,EAAE,OAAO;GAAC;GAAa;GAAa;EAAY,EAAE;EAC3D,OAAO,EAAE,OAAO,EAAE,UAAU,qBAAqB,EAAE;EACnD,MAAM,EACJ,OAAO;GAC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