@headless-lms/core 0.1.0 → 0.2.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 +66 -3
- package/dist/assets/events.js +19 -3
- package/dist/assets/events.js.map +1 -1
- package/dist/assets/service.js +5 -3
- package/dist/assets/service.js.map +1 -1
- package/dist/automations/actions.d.ts +11 -3
- package/dist/automations/actions.js +38 -5
- package/dist/automations/actions.js.map +1 -1
- package/dist/automations/catalog.d.ts +4 -1
- package/dist/automations/catalog.js +289 -188
- package/dist/automations/catalog.js.map +1 -1
- package/dist/automations/events.d.ts +46 -24
- package/dist/automations/events.js +5 -5
- package/dist/automations/events.js.map +1 -1
- package/dist/automations/index.d.ts +5 -5
- package/dist/automations/index.js +2 -2
- package/dist/automations/model.d.ts +13 -3
- package/dist/automations/model.js +23 -3
- package/dist/automations/model.js.map +1 -1
- package/dist/automations/ports.d.ts +23 -8
- package/dist/automations/service.d.ts +21 -5
- package/dist/automations/service.js +267 -47
- package/dist/automations/service.js.map +1 -1
- package/dist/automations/types.d.ts +2 -2
- package/dist/automations/webhook-signing.d.ts +7 -0
- package/dist/automations/webhook-signing.js +22 -0
- package/dist/automations/webhook-signing.js.map +1 -0
- package/dist/content/events.d.ts +401 -25
- package/dist/content/events.js +125 -19
- package/dist/content/events.js.map +1 -1
- package/dist/content/index.d.ts +5 -5
- package/dist/content/index.js +2 -2
- package/dist/content/model.d.ts +2 -2
- package/dist/content/ports.d.ts +42 -11
- package/dist/content/service.d.ts +15 -9
- package/dist/content/service.js +153 -45
- package/dist/content/service.js.map +1 -1
- package/dist/content/types.d.ts +2 -2
- package/dist/discussion/events.d.ts +60 -4
- package/dist/discussion/events.js +30 -4
- package/dist/discussion/events.js.map +1 -1
- package/dist/discussion/model.d.ts +1 -2
- package/dist/discussion/ports.d.ts +1 -1
- package/dist/discussion/service.d.ts +1 -1
- package/dist/discussion/service.js +11 -10
- package/dist/discussion/service.js.map +1 -1
- package/dist/entitlements/events.d.ts +96 -12
- package/dist/entitlements/events.js +21 -4
- package/dist/entitlements/events.js.map +1 -1
- package/dist/entitlements/service.js +1 -0
- package/dist/entitlements/service.js.map +1 -1
- package/dist/identity/events.d.ts +17 -3
- package/dist/identity/events.js +12 -2
- package/dist/identity/events.js.map +1 -1
- package/dist/identity/ports.d.ts +3 -0
- package/dist/identity/service.d.ts +3 -0
- package/dist/identity/service.js +12 -1
- package/dist/identity/service.js.map +1 -1
- package/dist/integrations/events.d.ts +27 -3
- package/dist/integrations/events.js +15 -3
- package/dist/integrations/events.js.map +1 -1
- package/dist/integrations/service.js +1 -1
- package/dist/integrations/service.js.map +1 -1
- package/dist/organizations/events.d.ts +178 -11
- package/dist/organizations/events.js +52 -9
- package/dist/organizations/events.js.map +1 -1
- package/dist/organizations/index.d.ts +3 -3
- package/dist/organizations/members.js.map +1 -1
- package/dist/organizations/ports.d.ts +6 -10
- package/dist/organizations/roles.js.map +1 -1
- package/dist/organizations/service.d.ts +9 -4
- package/dist/organizations/service.js +131 -72
- package/dist/organizations/service.js.map +1 -1
- package/dist/organizations/types.d.ts +2 -2
- package/dist/progress/events.d.ts +34 -2
- package/dist/progress/events.js +15 -2
- package/dist/progress/events.js.map +1 -1
- package/dist/progress/service.d.ts +2 -2
- package/dist/progress/service.js +4 -2
- package/dist/progress/service.js.map +1 -1
- package/dist/reporting/courses/index.d.ts +4 -0
- package/dist/reporting/courses/index.js +2 -0
- package/dist/reporting/courses/model.d.ts +24 -0
- package/dist/reporting/courses/model.js +1 -0
- package/dist/reporting/courses/ports.d.ts +13 -0
- package/dist/reporting/courses/ports.js +1 -0
- package/dist/reporting/courses/service.d.ts +19 -0
- package/dist/reporting/courses/service.js +20 -0
- package/dist/reporting/courses/service.js.map +1 -0
- package/dist/reporting/learn/model.d.ts +2 -2
- package/dist/reporting/learn/ports.d.ts +2 -1
- package/dist/reporting/learn/service.d.ts +2 -1
- package/dist/reporting/learn/service.js +5 -0
- package/dist/reporting/learn/service.js.map +1 -1
- package/dist/reporting/students/index.d.ts +2 -2
- package/dist/reporting/students/model.d.ts +21 -1
- package/dist/reporting/students/ports.d.ts +3 -1
- package/dist/reporting/students/service.d.ts +2 -1
- package/dist/reporting/students/service.js +3 -0
- package/dist/reporting/students/service.js.map +1 -1
- package/dist/shared/events.d.ts +5 -3
- package/dist/shared/events.js +1 -0
- package/dist/shared/events.js.map +1 -1
- package/dist/shared/id.d.ts +1 -0
- package/dist/shared/id.js +1 -0
- package/dist/shared/id.js.map +1 -1
- package/dist/shared/mailer.d.ts +2 -0
- package/dist/shared/mailer.js.map +1 -1
- package/dist/shared/settings.js.map +1 -1
- package/dist/types/automations.d.ts +13 -2
- package/dist/types/content.d.ts +2 -2
- package/dist/types/discussion.d.ts +3 -2
- package/dist/types/email-templates.d.ts +3 -1
- package/dist/types/events.d.ts +3 -3
- package/dist/types/index.d.ts +6 -6
- package/dist/types/organizations.d.ts +2 -2
- package/dist/types/ports.d.ts +1 -1
- package/dist/types/schemas/assets.d.ts +3 -0
- package/dist/types/schemas/assets.js +2 -1
- package/dist/types/schemas/assets.js.map +1 -1
- package/dist/types/schemas/automations.d.ts +71 -4
- package/dist/types/schemas/automations.js +35 -4
- package/dist/types/schemas/automations.js.map +1 -1
- package/dist/types/schemas/content.d.ts +51 -18
- package/dist/types/schemas/content.js +40 -13
- package/dist/types/schemas/content.js.map +1 -1
- package/dist/types/schemas/credentials.js.map +1 -1
- package/dist/types/schemas/discussion.d.ts +10 -2
- package/dist/types/schemas/discussion.js +12 -5
- package/dist/types/schemas/discussion.js.map +1 -1
- package/dist/types/schemas/entitlements.d.ts +8 -2
- package/dist/types/schemas/entitlements.js +10 -4
- package/dist/types/schemas/entitlements.js.map +1 -1
- package/dist/types/schemas/identity.d.ts +4 -4
- package/dist/types/schemas/identity.js +5 -5
- package/dist/types/schemas/identity.js.map +1 -1
- package/dist/types/schemas/index.d.ts +6 -6
- package/dist/types/schemas/index.js +6 -6
- package/dist/types/schemas/integrations.js.map +1 -1
- package/dist/types/schemas/organizations.d.ts +19 -5
- package/dist/types/schemas/organizations.js +12 -7
- package/dist/types/schemas/organizations.js.map +1 -1
- package/dist/types/schemas/outbox.d.ts +1 -0
- package/dist/types/schemas/outbox.js +1 -0
- package/dist/types/schemas/outbox.js.map +1 -1
- package/dist/types/schemas/progress.d.ts +1 -0
- package/dist/types/schemas/progress.js +1 -0
- package/dist/types/schemas/progress.js.map +1 -1
- package/dist/types/schemas/settings.js.map +1 -1
- package/dist/types/schemas/shared.d.ts +2 -1
- package/dist/types/schemas/shared.js +3 -1
- package/dist/types/schemas/shared.js.map +1 -1
- package/dist/types/shared.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { assetEvents } from "../assets/events.js";
|
|
2
1
|
import { entitlementEvents } from "../entitlements/events.js";
|
|
2
|
+
import { assetEvents } from "../assets/events.js";
|
|
3
3
|
import { contentEvents } from "../content/events.js";
|
|
4
4
|
import { discussionEvents } from "../discussion/events.js";
|
|
5
5
|
import { identityEvents } from "../identity/events.js";
|
|
@@ -13,11 +13,13 @@ const ALL_EMAIL_TEMPLATE_IDS = {
|
|
|
13
13
|
studentInvite: true,
|
|
14
14
|
memberInvite: true,
|
|
15
15
|
passwordReset: true,
|
|
16
|
+
passwordChanged: true,
|
|
16
17
|
emailVerification: true,
|
|
17
18
|
accessGranted: true,
|
|
18
19
|
accessRevoked: true,
|
|
19
20
|
courseCompleted: true
|
|
20
21
|
};
|
|
22
|
+
const DELIVER_WEBHOOK_ACTION = "deliverWebhook";
|
|
21
23
|
function catalogActions() {
|
|
22
24
|
return [{
|
|
23
25
|
type: "sendEmail",
|
|
@@ -30,195 +32,294 @@ function catalogActions() {
|
|
|
30
32
|
source: "system"
|
|
31
33
|
}];
|
|
32
34
|
}
|
|
35
|
+
const TRIGGERS = [
|
|
36
|
+
{
|
|
37
|
+
event: identityEvents.userCreated,
|
|
38
|
+
label: "User created",
|
|
39
|
+
category: "Users",
|
|
40
|
+
description: "a user was created"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
event: identityEvents.userUpdated,
|
|
44
|
+
label: "User updated",
|
|
45
|
+
category: "Users",
|
|
46
|
+
description: "a user was updated"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
event: organizationEvents.organizationCreated,
|
|
50
|
+
label: "Organization created",
|
|
51
|
+
category: "Organization",
|
|
52
|
+
description: "an organization was created"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
event: organizationEvents.organizationUpdated,
|
|
56
|
+
label: "Organization updated",
|
|
57
|
+
category: "Organization",
|
|
58
|
+
description: "an organization was updated"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
event: organizationEvents.organizationDeleted,
|
|
62
|
+
label: "Organization deleted",
|
|
63
|
+
category: "Organization",
|
|
64
|
+
description: "an organization was deleted"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
event: organizationEvents.orgUserLinked,
|
|
68
|
+
label: "Member joined",
|
|
69
|
+
category: "Organization",
|
|
70
|
+
description: "a user was linked to an organization"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
event: organizationEvents.orgUserDeleted,
|
|
74
|
+
label: "Member removed",
|
|
75
|
+
category: "Organization",
|
|
76
|
+
description: "a user was removed from an organization"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
event: organizationEvents.inviteCreated,
|
|
80
|
+
label: "Invite sent",
|
|
81
|
+
category: "Organization",
|
|
82
|
+
description: "an invite was created or re-issued"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
event: organizationEvents.inviteAccepted,
|
|
86
|
+
label: "Invite accepted",
|
|
87
|
+
category: "Organization",
|
|
88
|
+
description: "an invite was accepted"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
event: organizationEvents.studentCreated,
|
|
92
|
+
label: "Student created",
|
|
93
|
+
category: "Students",
|
|
94
|
+
description: "a student was created"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
event: organizationEvents.studentDeleted,
|
|
98
|
+
label: "Student deleted",
|
|
99
|
+
category: "Students",
|
|
100
|
+
description: "a student was deleted"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
event: organizationEvents.studentLinked,
|
|
104
|
+
label: "Student linked to account",
|
|
105
|
+
category: "Students",
|
|
106
|
+
description: "a pending student was linked to an auth account"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
event: contentEvents.courseCreated,
|
|
110
|
+
label: "Course created",
|
|
111
|
+
category: "Courses",
|
|
112
|
+
description: "a course was created"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
event: contentEvents.courseUpdated,
|
|
116
|
+
label: "Course updated",
|
|
117
|
+
category: "Courses",
|
|
118
|
+
description: "a course was updated"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
event: contentEvents.courseDeleted,
|
|
122
|
+
label: "Course deleted",
|
|
123
|
+
category: "Courses",
|
|
124
|
+
description: "a course was deleted"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
event: contentEvents.moduleCreated,
|
|
128
|
+
label: "Module created",
|
|
129
|
+
category: "Courses",
|
|
130
|
+
description: "a course module was created"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
event: contentEvents.moduleUpdated,
|
|
134
|
+
label: "Module updated",
|
|
135
|
+
category: "Courses",
|
|
136
|
+
description: "a course module was updated"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
event: contentEvents.moduleDeleted,
|
|
140
|
+
label: "Module deleted",
|
|
141
|
+
category: "Courses",
|
|
142
|
+
description: "a course module was deleted"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
event: contentEvents.modulesReordered,
|
|
146
|
+
label: "Modules reordered",
|
|
147
|
+
category: "Courses",
|
|
148
|
+
description: "course modules were reordered"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
event: contentEvents.activityCreated,
|
|
152
|
+
label: "Activity created",
|
|
153
|
+
category: "Courses",
|
|
154
|
+
description: "a course activity was created"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
event: contentEvents.activityUpdated,
|
|
158
|
+
label: "Activity updated",
|
|
159
|
+
category: "Courses",
|
|
160
|
+
description: "a course activity was updated"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
event: contentEvents.activityDeleted,
|
|
164
|
+
label: "Activity deleted",
|
|
165
|
+
category: "Courses",
|
|
166
|
+
description: "a course activity was deleted"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
event: contentEvents.activitiesReordered,
|
|
170
|
+
label: "Activities reordered",
|
|
171
|
+
category: "Courses",
|
|
172
|
+
description: "course activities were reordered"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
event: contentEvents.downloadCreated,
|
|
176
|
+
label: "Download created",
|
|
177
|
+
category: "Downloads",
|
|
178
|
+
description: "a download was created"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
event: contentEvents.downloadUpdated,
|
|
182
|
+
label: "Download updated",
|
|
183
|
+
category: "Downloads",
|
|
184
|
+
description: "a download was updated"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
event: contentEvents.downloadDeleted,
|
|
188
|
+
label: "Download deleted",
|
|
189
|
+
category: "Downloads",
|
|
190
|
+
description: "a download was deleted"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
event: contentEvents.downloadAssetAdded,
|
|
194
|
+
label: "Download file added",
|
|
195
|
+
category: "Downloads",
|
|
196
|
+
description: "a download asset was added"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
event: contentEvents.downloadAssetRemoved,
|
|
200
|
+
label: "Download file removed",
|
|
201
|
+
category: "Downloads",
|
|
202
|
+
description: "a download asset was removed"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
event: contentEvents.downloadAssetRenamed,
|
|
206
|
+
label: "Download file renamed",
|
|
207
|
+
category: "Downloads",
|
|
208
|
+
description: "a download asset was renamed"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
event: contentEvents.downloadAssetsReordered,
|
|
212
|
+
label: "Download files reordered",
|
|
213
|
+
category: "Downloads",
|
|
214
|
+
description: "download assets were reordered"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
event: entitlementEvents.entitlementCreated,
|
|
218
|
+
label: "Access granted",
|
|
219
|
+
category: "Access",
|
|
220
|
+
description: "a student was granted access to content"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
event: entitlementEvents.entitlementUpdated,
|
|
224
|
+
label: "Access updated",
|
|
225
|
+
category: "Access",
|
|
226
|
+
description: "an entitlement's status or expiry changed"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
event: entitlementEvents.entitlementDeleted,
|
|
230
|
+
label: "Access revoked",
|
|
231
|
+
category: "Access",
|
|
232
|
+
description: "a student's access to content was revoked"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
event: entitlementEvents.entitlementExpired,
|
|
236
|
+
label: "Access expired",
|
|
237
|
+
category: "Access",
|
|
238
|
+
description: "an entitlement passed its expiry"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
event: progressEvents.progressStarted,
|
|
242
|
+
label: "Progress started",
|
|
243
|
+
category: "Progress",
|
|
244
|
+
description: "a student started a progress record"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
event: progressEvents.progressCompleted,
|
|
248
|
+
label: "Progress completed",
|
|
249
|
+
category: "Progress",
|
|
250
|
+
description: "a student completed a progress record"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
event: integrationEvents.connectionCreated,
|
|
254
|
+
label: "Integration connected",
|
|
255
|
+
category: "Integrations",
|
|
256
|
+
description: "an integration connection was established"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
event: integrationEvents.connectionUpdated,
|
|
260
|
+
label: "Integration updated",
|
|
261
|
+
category: "Integrations",
|
|
262
|
+
description: "an integration connection changed"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
event: integrationEvents.connectionRemoved,
|
|
266
|
+
label: "Integration disconnected",
|
|
267
|
+
category: "Integrations",
|
|
268
|
+
description: "an integration connection was removed"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
event: discussionEvents.commentCreated,
|
|
272
|
+
label: "Comment created",
|
|
273
|
+
category: "Discussion",
|
|
274
|
+
description: "a comment was created"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
event: discussionEvents.commentPublished,
|
|
278
|
+
label: "Comment published",
|
|
279
|
+
category: "Discussion",
|
|
280
|
+
description: "a comment was published"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
event: discussionEvents.commentRemoved,
|
|
284
|
+
label: "Comment removed",
|
|
285
|
+
category: "Discussion",
|
|
286
|
+
description: "a comment was removed"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
event: discussionEvents.commentReported,
|
|
290
|
+
label: "Comment reported",
|
|
291
|
+
category: "Discussion",
|
|
292
|
+
description: "a comment was reported"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
event: assetEvents.assetCreated,
|
|
296
|
+
label: "Upload requested",
|
|
297
|
+
category: "Assets",
|
|
298
|
+
description: "an asset upload was requested"
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
event: assetEvents.assetReady,
|
|
302
|
+
label: "Upload ready",
|
|
303
|
+
category: "Assets",
|
|
304
|
+
description: "an asset was confirmed ready"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
event: assetEvents.assetDeleted,
|
|
308
|
+
label: "Asset deleted",
|
|
309
|
+
category: "Assets",
|
|
310
|
+
description: "an asset was deleted"
|
|
311
|
+
}
|
|
312
|
+
];
|
|
33
313
|
function catalogTriggers() {
|
|
34
|
-
return
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
description: "a user was updated"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
type: organizationEvents.organizationCreated.type,
|
|
45
|
-
description: "an organization was created"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
type: organizationEvents.organizationUpdated.type,
|
|
49
|
-
description: "an organization was updated"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
type: organizationEvents.organizationDeleted.type,
|
|
53
|
-
description: "an organization was deleted"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
type: organizationEvents.orgUserLinked.type,
|
|
57
|
-
description: "a user was linked to an organization"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
type: organizationEvents.orgUserDeleted.type,
|
|
61
|
-
description: "a user was removed from an organization"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
type: organizationEvents.inviteCreated.type,
|
|
65
|
-
description: "an invite was created or re-issued"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
type: organizationEvents.inviteAccepted.type,
|
|
69
|
-
description: "an invite was accepted"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
type: organizationEvents.studentCreated.type,
|
|
73
|
-
description: "a student was created"
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
type: organizationEvents.studentDeleted.type,
|
|
77
|
-
description: "a student was deleted"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
type: organizationEvents.studentLinked.type,
|
|
81
|
-
description: "a pending student was linked to an auth account"
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
type: contentEvents.courseCreated.type,
|
|
85
|
-
description: "a course was created"
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
type: contentEvents.courseUpdated.type,
|
|
89
|
-
description: "a course was updated"
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
type: contentEvents.courseDeleted.type,
|
|
93
|
-
description: "a course was deleted"
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
type: contentEvents.moduleCreated.type,
|
|
97
|
-
description: "a course module was created"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
type: contentEvents.moduleUpdated.type,
|
|
101
|
-
description: "a course module was updated"
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
type: contentEvents.moduleDeleted.type,
|
|
105
|
-
description: "a course module was deleted"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
type: contentEvents.modulesReordered.type,
|
|
109
|
-
description: "course modules were reordered"
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
type: contentEvents.activityCreated.type,
|
|
113
|
-
description: "a course activity was created"
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
type: contentEvents.activityUpdated.type,
|
|
117
|
-
description: "a course activity was updated"
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
type: contentEvents.activityDeleted.type,
|
|
121
|
-
description: "a course activity was deleted"
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
type: contentEvents.activitiesReordered.type,
|
|
125
|
-
description: "course activities were reordered"
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
type: contentEvents.downloadCreated.type,
|
|
129
|
-
description: "a download was created"
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
type: contentEvents.downloadUpdated.type,
|
|
133
|
-
description: "a download was updated"
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
type: contentEvents.downloadDeleted.type,
|
|
137
|
-
description: "a download was deleted"
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
type: contentEvents.downloadAssetAdded.type,
|
|
141
|
-
description: "a download asset was added"
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
type: contentEvents.downloadAssetRemoved.type,
|
|
145
|
-
description: "a download asset was removed"
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
type: contentEvents.downloadAssetRenamed.type,
|
|
149
|
-
description: "a download asset was renamed"
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
type: contentEvents.downloadAssetsReordered.type,
|
|
153
|
-
description: "download assets were reordered"
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
type: entitlementEvents.entitlementCreated.type,
|
|
157
|
-
description: "a student was granted access to content"
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
type: entitlementEvents.entitlementUpdated.type,
|
|
161
|
-
description: "an entitlement's status or expiry changed"
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
type: entitlementEvents.entitlementDeleted.type,
|
|
165
|
-
description: "a student's access to content was revoked"
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
type: entitlementEvents.entitlementExpired.type,
|
|
169
|
-
description: "an entitlement passed its expiry"
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
type: progressEvents.progressStarted.type,
|
|
173
|
-
description: "a student started a progress record"
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
type: progressEvents.progressCompleted.type,
|
|
177
|
-
description: "a student completed a progress record"
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
type: integrationEvents.connectionCreated.type,
|
|
181
|
-
description: "an integration connection was established"
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
type: integrationEvents.connectionUpdated.type,
|
|
185
|
-
description: "an integration connection changed"
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
type: integrationEvents.connectionRemoved.type,
|
|
189
|
-
description: "an integration connection was removed"
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
type: discussionEvents.commentCreated.type,
|
|
193
|
-
description: "a comment was created"
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
type: discussionEvents.commentPublished.type,
|
|
197
|
-
description: "a comment was published"
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
type: discussionEvents.commentRemoved.type,
|
|
201
|
-
description: "a comment was removed"
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
type: discussionEvents.commentReported.type,
|
|
205
|
-
description: "a comment was reported"
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
type: assetEvents.assetCreated.type,
|
|
209
|
-
description: "an asset upload was requested"
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
type: assetEvents.assetReady.type,
|
|
213
|
-
description: "an asset was confirmed ready"
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
type: assetEvents.assetDeleted.type,
|
|
217
|
-
description: "an asset was deleted"
|
|
218
|
-
}
|
|
219
|
-
];
|
|
314
|
+
return TRIGGERS.map(({ event, ...trigger }) => ({
|
|
315
|
+
type: event.type,
|
|
316
|
+
...trigger
|
|
317
|
+
}));
|
|
318
|
+
}
|
|
319
|
+
function publicDataSchema(type) {
|
|
320
|
+
return TRIGGERS.find((trigger) => trigger.event.type === type)?.event.publicData;
|
|
220
321
|
}
|
|
221
322
|
//#endregion
|
|
222
|
-
export { ALL_EMAIL_TEMPLATE_IDS, catalogActions, catalogTriggers };
|
|
323
|
+
export { ALL_EMAIL_TEMPLATE_IDS, DELIVER_WEBHOOK_ACTION, catalogActions, catalogTriggers, publicDataSchema };
|
|
223
324
|
|
|
224
325
|
//# sourceMappingURL=catalog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.js","names":[],"sources":["../../src/automations/catalog.ts"],"sourcesContent":["// automations context — the code-owned catalogs `availableActions()` and\n// `availableTriggers()` serve: built-in action definitions and the domain\n// event types automations may react to.\nimport type { EmailTemplateId } from '../types/index.js';\nimport { assetEvents } from '../assets/index.js';\nimport { contentEvents } from '../content/index.js';\nimport { discussionEvents } from '../discussion/index.js';\nimport { entitlementEvents } from '../entitlements/index.js';\nimport { identityEvents } from '../identity/index.js';\nimport { integrationEvents } from '../integrations/index.js';\nimport { organizationEvents } from '../organizations/index.js';\nimport { progressEvents } from '../progress/index.js';\nimport type { AvailableActions, AvailableTriggers } from './types.js';\n\n/** Every EmailTemplateId — a missing key here is a compile error, kept exhaustive by construction. */\nexport const ALL_EMAIL_TEMPLATE_IDS: Record<EmailTemplateId, true> = {\n magicLink: true,\n studentInvite: true,\n memberInvite: true,\n passwordReset: true,\n emailVerification: true,\n accessGranted: true,\n accessRevoked: true,\n courseCompleted: true,\n};\n\nexport function catalogActions(): AvailableActions {\n return [\n {\n type: 'sendEmail',\n description: 'Send a transactional email using a built-in template.',\n inputSchema: {\n type: 'object',\n required: ['template'],\n properties: {\n template: { enum: Object.keys(ALL_EMAIL_TEMPLATE_IDS) },\n },\n },\n source: 'system',\n },\n ];\n}\n\nexport function catalogTriggers(): AvailableTriggers['triggers'] {\n return [\n { type: identityEvents.userCreated.type, description: 'a user was created' },\n { type: identityEvents.userUpdated.type, description: 'a user was updated' },\n { type: organizationEvents.organizationCreated.type, description: 'an organization was created' },\n { type: organizationEvents.organizationUpdated.type, description: 'an organization was updated' },\n { type: organizationEvents.organizationDeleted.type, description: 'an organization was deleted' },\n { type: organizationEvents.orgUserLinked.type, description: 'a user was linked to an organization' },\n { type: organizationEvents.orgUserDeleted.type, description: 'a user was removed from an organization' },\n { type: organizationEvents.inviteCreated.type, description: 'an invite was created or re-issued' },\n { type: organizationEvents.inviteAccepted.type, description: 'an invite was accepted' },\n { type: organizationEvents.studentCreated.type, description: 'a student was created' },\n { type: organizationEvents.studentDeleted.type, description: 'a student was deleted' },\n { type: organizationEvents.studentLinked.type, description: 'a pending student was linked to an auth account' },\n { type: contentEvents.courseCreated.type, description: 'a course was created' },\n { type: contentEvents.courseUpdated.type, description: 'a course was updated' },\n { type: contentEvents.courseDeleted.type, description: 'a course was deleted' },\n { type: contentEvents.moduleCreated.type, description: 'a course module was created' },\n { type: contentEvents.moduleUpdated.type, description: 'a course module was updated' },\n { type: contentEvents.moduleDeleted.type, description: 'a course module was deleted' },\n { type: contentEvents.modulesReordered.type, description: 'course modules were reordered' },\n { type: contentEvents.activityCreated.type, description: 'a course activity was created' },\n { type: contentEvents.activityUpdated.type, description: 'a course activity was updated' },\n { type: contentEvents.activityDeleted.type, description: 'a course activity was deleted' },\n { type: contentEvents.activitiesReordered.type, description: 'course activities were reordered' },\n { type: contentEvents.downloadCreated.type, description: 'a download was created' },\n { type: contentEvents.downloadUpdated.type, description: 'a download was updated' },\n { type: contentEvents.downloadDeleted.type, description: 'a download was deleted' },\n { type: contentEvents.downloadAssetAdded.type, description: 'a download asset was added' },\n { type: contentEvents.downloadAssetRemoved.type, description: 'a download asset was removed' },\n { type: contentEvents.downloadAssetRenamed.type, description: 'a download asset was renamed' },\n { type: contentEvents.downloadAssetsReordered.type, description: 'download assets were reordered' },\n { type: entitlementEvents.entitlementCreated.type, description: 'a student was granted access to content' },\n { type: entitlementEvents.entitlementUpdated.type, description: \"an entitlement's status or expiry changed\" },\n { type: entitlementEvents.entitlementDeleted.type, description: \"a student's access to content was revoked\" },\n { type: entitlementEvents.entitlementExpired.type, description: 'an entitlement passed its expiry' },\n { type: progressEvents.progressStarted.type, description: 'a student started a progress record' },\n { type: progressEvents.progressCompleted.type, description: 'a student completed a progress record' },\n { type: integrationEvents.connectionCreated.type, description: 'an integration connection was established' },\n { type: integrationEvents.connectionUpdated.type, description: \"an integration connection changed\" },\n { type: integrationEvents.connectionRemoved.type, description: 'an integration connection was removed' },\n { type: discussionEvents.commentCreated.type, description: 'a comment was created' },\n { type: discussionEvents.commentPublished.type, description: 'a comment was published' },\n { type: discussionEvents.commentRemoved.type, description: 'a comment was removed' },\n { type: discussionEvents.commentReported.type, description: 'a comment was reported' },\n { type: assetEvents.assetCreated.type, description: 'an asset upload was requested' },\n { type: assetEvents.assetReady.type, description: 'an asset was confirmed ready' },\n { type: assetEvents.assetDeleted.type, description: 'an asset was deleted' },\n ];\n}\n"],"mappings":";;;;;;;;;;AAeA,MAAa,yBAAwD;CACnE,WAAW;CACX,eAAe;CACf,cAAc;CACd,eAAe;CACf,mBAAmB;CACnB,eAAe;CACf,eAAe;CACf,iBAAiB;AACnB;AAEA,SAAgB,iBAAmC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B;EACrF;GAAE,MAAM,YAAY,aAAa;GAAM,aAAa;EAAgC;EACpF;GAAE,MAAM,YAAY,WAAW;GAAM,aAAa;EAA+B;EACjF;GAAE,MAAM,YAAY,aAAa;GAAM,aAAa;EAAuB;CAC7E;AACF"}
|
|
1
|
+
{"version":3,"file":"catalog.js","names":[],"sources":["../../src/automations/catalog.ts"],"sourcesContent":["// automations context — the code-owned catalogs `availableActions()` and\n// `availableTriggers()` serve: built-in action definitions and the domain\n// event types automations may react to.\nimport type { z } from 'zod';\nimport type { EmailTemplateId } from '../types/index.js';\nimport { assetEvents } from '../assets/index.js';\nimport { contentEvents } from '../content/index.js';\nimport { discussionEvents } from '../discussion/index.js';\nimport { entitlementEvents } from '../entitlements/index.js';\nimport { identityEvents } from '../identity/index.js';\nimport { integrationEvents } from '../integrations/index.js';\nimport { organizationEvents } from '../organizations/index.js';\nimport { progressEvents } from '../progress/index.js';\nimport type { AvailableActions, AvailableTriggers } from './types.js';\n\n/** Every EmailTemplateId — a missing key here is a compile error, kept exhaustive by construction. */\nexport const ALL_EMAIL_TEMPLATE_IDS: Record<EmailTemplateId, true> = {\n magicLink: true,\n studentInvite: true,\n memberInvite: true,\n passwordReset: true,\n passwordChanged: true,\n emailVerification: true,\n accessGranted: true,\n accessRevoked: true,\n courseCompleted: true,\n};\n\nexport const DELIVER_WEBHOOK_ACTION = 'deliverWebhook';\n\nexport function catalogActions(): AvailableActions {\n return [\n {\n type: 'sendEmail',\n description: 'Send a transactional email using a built-in template.',\n inputSchema: {\n type: 'object',\n required: ['template'],\n properties: {\n template: { enum: Object.keys(ALL_EMAIL_TEMPLATE_IDS) },\n },\n },\n source: 'system',\n },\n ];\n}\n\ninterface CatalogTrigger {\n readonly event: { readonly type: string; readonly publicData: z.ZodType };\n readonly label: string;\n readonly category: string;\n readonly description: string;\n}\n\nconst TRIGGERS: CatalogTrigger[] = [\n {\n event: identityEvents.userCreated,\n label: 'User created',\n category: 'Users',\n description: 'a user was created',\n },\n {\n event: identityEvents.userUpdated,\n label: 'User updated',\n category: 'Users',\n description: 'a user was updated',\n },\n {\n event: organizationEvents.organizationCreated,\n label: 'Organization created',\n category: 'Organization',\n description: 'an organization was created',\n },\n {\n event: organizationEvents.organizationUpdated,\n label: 'Organization updated',\n category: 'Organization',\n description: 'an organization was updated',\n },\n {\n event: organizationEvents.organizationDeleted,\n label: 'Organization deleted',\n category: 'Organization',\n description: 'an organization was deleted',\n },\n {\n event: organizationEvents.orgUserLinked,\n label: 'Member joined',\n category: 'Organization',\n description: 'a user was linked to an organization',\n },\n {\n event: organizationEvents.orgUserDeleted,\n label: 'Member removed',\n category: 'Organization',\n description: 'a user was removed from an organization',\n },\n {\n event: organizationEvents.inviteCreated,\n label: 'Invite sent',\n category: 'Organization',\n description: 'an invite was created or re-issued',\n },\n {\n event: organizationEvents.inviteAccepted,\n label: 'Invite accepted',\n category: 'Organization',\n description: 'an invite was accepted',\n },\n {\n event: organizationEvents.studentCreated,\n label: 'Student created',\n category: 'Students',\n description: 'a student was created',\n },\n {\n event: organizationEvents.studentDeleted,\n label: 'Student deleted',\n category: 'Students',\n description: 'a student was deleted',\n },\n {\n event: organizationEvents.studentLinked,\n label: 'Student linked to account',\n category: 'Students',\n description: 'a pending student was linked to an auth account',\n },\n {\n event: contentEvents.courseCreated,\n label: 'Course created',\n category: 'Courses',\n description: 'a course was created',\n },\n {\n event: contentEvents.courseUpdated,\n label: 'Course updated',\n category: 'Courses',\n description: 'a course was updated',\n },\n {\n event: contentEvents.courseDeleted,\n label: 'Course deleted',\n category: 'Courses',\n description: 'a course was deleted',\n },\n {\n event: contentEvents.moduleCreated,\n label: 'Module created',\n category: 'Courses',\n description: 'a course module was created',\n },\n {\n event: contentEvents.moduleUpdated,\n label: 'Module updated',\n category: 'Courses',\n description: 'a course module was updated',\n },\n {\n event: contentEvents.moduleDeleted,\n label: 'Module deleted',\n category: 'Courses',\n description: 'a course module was deleted',\n },\n {\n event: contentEvents.modulesReordered,\n label: 'Modules reordered',\n category: 'Courses',\n description: 'course modules were reordered',\n },\n {\n event: contentEvents.activityCreated,\n label: 'Activity created',\n category: 'Courses',\n description: 'a course activity was created',\n },\n {\n event: contentEvents.activityUpdated,\n label: 'Activity updated',\n category: 'Courses',\n description: 'a course activity was updated',\n },\n {\n event: contentEvents.activityDeleted,\n label: 'Activity deleted',\n category: 'Courses',\n description: 'a course activity was deleted',\n },\n {\n event: contentEvents.activitiesReordered,\n label: 'Activities reordered',\n category: 'Courses',\n description: 'course activities were reordered',\n },\n {\n event: contentEvents.downloadCreated,\n label: 'Download created',\n category: 'Downloads',\n description: 'a download was created',\n },\n {\n event: contentEvents.downloadUpdated,\n label: 'Download updated',\n category: 'Downloads',\n description: 'a download was updated',\n },\n {\n event: contentEvents.downloadDeleted,\n label: 'Download deleted',\n category: 'Downloads',\n description: 'a download was deleted',\n },\n {\n event: contentEvents.downloadAssetAdded,\n label: 'Download file added',\n category: 'Downloads',\n description: 'a download asset was added',\n },\n {\n event: contentEvents.downloadAssetRemoved,\n label: 'Download file removed',\n category: 'Downloads',\n description: 'a download asset was removed',\n },\n {\n event: contentEvents.downloadAssetRenamed,\n label: 'Download file renamed',\n category: 'Downloads',\n description: 'a download asset was renamed',\n },\n {\n event: contentEvents.downloadAssetsReordered,\n label: 'Download files reordered',\n category: 'Downloads',\n description: 'download assets were reordered',\n },\n {\n event: entitlementEvents.entitlementCreated,\n label: 'Access granted',\n category: 'Access',\n description: 'a student was granted access to content',\n },\n {\n event: entitlementEvents.entitlementUpdated,\n label: 'Access updated',\n category: 'Access',\n description: \"an entitlement's status or expiry changed\",\n },\n {\n event: entitlementEvents.entitlementDeleted,\n label: 'Access revoked',\n category: 'Access',\n description: \"a student's access to content was revoked\",\n },\n {\n event: entitlementEvents.entitlementExpired,\n label: 'Access expired',\n category: 'Access',\n description: 'an entitlement passed its expiry',\n },\n {\n event: progressEvents.progressStarted,\n label: 'Progress started',\n category: 'Progress',\n description: 'a student started a progress record',\n },\n {\n event: progressEvents.progressCompleted,\n label: 'Progress completed',\n category: 'Progress',\n description: 'a student completed a progress record',\n },\n {\n event: integrationEvents.connectionCreated,\n label: 'Integration connected',\n category: 'Integrations',\n description: 'an integration connection was established',\n },\n {\n event: integrationEvents.connectionUpdated,\n label: 'Integration updated',\n category: 'Integrations',\n description: 'an integration connection changed',\n },\n {\n event: integrationEvents.connectionRemoved,\n label: 'Integration disconnected',\n category: 'Integrations',\n description: 'an integration connection was removed',\n },\n {\n event: discussionEvents.commentCreated,\n label: 'Comment created',\n category: 'Discussion',\n description: 'a comment was created',\n },\n {\n event: discussionEvents.commentPublished,\n label: 'Comment published',\n category: 'Discussion',\n description: 'a comment was published',\n },\n {\n event: discussionEvents.commentRemoved,\n label: 'Comment removed',\n category: 'Discussion',\n description: 'a comment was removed',\n },\n {\n event: discussionEvents.commentReported,\n label: 'Comment reported',\n category: 'Discussion',\n description: 'a comment was reported',\n },\n {\n event: assetEvents.assetCreated,\n label: 'Upload requested',\n category: 'Assets',\n description: 'an asset upload was requested',\n },\n {\n event: assetEvents.assetReady,\n label: 'Upload ready',\n category: 'Assets',\n description: 'an asset was confirmed ready',\n },\n {\n event: assetEvents.assetDeleted,\n label: 'Asset deleted',\n category: 'Assets',\n description: 'an asset was deleted',\n },\n];\n\nexport function catalogTriggers(): AvailableTriggers['triggers'] {\n return TRIGGERS.map(({ event, ...trigger }) => ({ type: event.type, ...trigger }));\n}\n\nexport function publicDataSchema(type: string): z.ZodType | undefined {\n return TRIGGERS.find((trigger) => trigger.event.type === type)?.event.publicData;\n}\n"],"mappings":";;;;;;;;;;AAgBA,MAAa,yBAAwD;CACnE,WAAW;CACX,eAAe;CACf,cAAc;CACd,eAAe;CACf,iBAAiB;CACjB,mBAAmB;CACnB,eAAe;CACf,eAAe;CACf,iBAAiB;AACnB;AAEA,MAAa,yBAAyB;AAEtC,SAAgB,iBAAmC;CACjD,OAAO,CACL;EACE,MAAM;EACN,aAAa;EACb,aAAa;GACX,MAAM;GACN,UAAU,CAAC,UAAU;GACrB,YAAY,EACV,UAAU,EAAE,MAAM,OAAO,KAAK,sBAAsB,EAAE,EACxD;EACF;EACA,QAAQ;CACV,CACF;AACF;AASA,MAAM,WAA6B;CACjC;EACE,OAAO,eAAe;EACtB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,eAAe;EACtB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,mBAAmB;EAC1B,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,mBAAmB;EAC1B,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,mBAAmB;EAC1B,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,mBAAmB;EAC1B,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,mBAAmB;EAC1B,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,mBAAmB;EAC1B,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,mBAAmB;EAC1B,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,mBAAmB;EAC1B,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,mBAAmB;EAC1B,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,mBAAmB;EAC1B,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,cAAc;EACrB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,cAAc;EACrB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,cAAc;EACrB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,cAAc;EACrB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,cAAc;EACrB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,cAAc;EACrB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,cAAc;EACrB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,cAAc;EACrB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,cAAc;EACrB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,cAAc;EACrB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,cAAc;EACrB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,cAAc;EACrB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,cAAc;EACrB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,cAAc;EACrB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,cAAc;EACrB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,cAAc;EACrB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,cAAc;EACrB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,cAAc;EACrB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,kBAAkB;EACzB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,kBAAkB;EACzB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,kBAAkB;EACzB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,kBAAkB;EACzB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,eAAe;EACtB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,eAAe;EACtB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,kBAAkB;EACzB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;EACE,OAAO,kBAAkB;EACzB,OAAO;EACP,UAAU;EACV,aAAa;CACf;CACA;E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