@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.
Files changed (205) hide show
  1. package/dist/assets/events.d.ts +9 -9
  2. package/dist/assets/index.d.ts +3 -2
  3. package/dist/assets/index.js +2 -1
  4. package/dist/assets/jobs.d.ts +15 -0
  5. package/dist/assets/jobs.js +30 -0
  6. package/dist/assets/jobs.js.map +1 -0
  7. package/dist/assets/ports.d.ts +4 -3
  8. package/dist/assets/service.d.ts +0 -1
  9. package/dist/assets/service.js +0 -4
  10. package/dist/assets/service.js.map +1 -1
  11. package/dist/automations/actions.js +2 -63
  12. package/dist/automations/actions.js.map +1 -1
  13. package/dist/automations/catalog.d.ts +1 -2
  14. package/dist/automations/catalog.js +69 -62
  15. package/dist/automations/catalog.js.map +1 -1
  16. package/dist/automations/community-derivations.js +4 -4
  17. package/dist/automations/community-derivations.js.map +1 -1
  18. package/dist/automations/community-mail.d.ts +3 -17
  19. package/dist/automations/community-mail.js +1 -21
  20. package/dist/automations/community-mail.js.map +1 -1
  21. package/dist/automations/events.d.ts +0 -10
  22. package/dist/automations/index.d.ts +11 -4
  23. package/dist/automations/index.js +8 -1
  24. package/dist/automations/notifications/debounce.d.ts +25 -0
  25. package/dist/automations/notifications/debounce.js +93 -0
  26. package/dist/automations/notifications/debounce.js.map +1 -0
  27. package/dist/automations/notifications/defaults.d.ts +8 -0
  28. package/dist/automations/notifications/defaults.js +316 -0
  29. package/dist/automations/notifications/defaults.js.map +1 -0
  30. package/dist/automations/notifications/delivery.d.ts +28 -0
  31. package/dist/automations/notifications/delivery.js +88 -0
  32. package/dist/automations/notifications/delivery.js.map +1 -0
  33. package/dist/automations/notifications/processor.d.ts +64 -0
  34. package/dist/automations/notifications/processor.js +270 -0
  35. package/dist/automations/notifications/processor.js.map +1 -0
  36. package/dist/automations/notifications/rules/content.d.ts +6 -0
  37. package/dist/automations/notifications/rules/content.js +39 -0
  38. package/dist/automations/notifications/rules/content.js.map +1 -0
  39. package/dist/automations/notifications/rules/discussion.d.ts +7 -0
  40. package/dist/automations/notifications/rules/discussion.js +678 -0
  41. package/dist/automations/notifications/rules/discussion.js.map +1 -0
  42. package/dist/automations/notifications/rules/entitlements.d.ts +6 -0
  43. package/dist/automations/notifications/rules/entitlements.js +249 -0
  44. package/dist/automations/notifications/rules/entitlements.js.map +1 -0
  45. package/dist/automations/notifications/rules/index.d.ts +6 -0
  46. package/dist/automations/notifications/rules/index.js +15 -0
  47. package/dist/automations/notifications/rules/index.js.map +1 -0
  48. package/dist/automations/notifications/rules/organizations.d.ts +6 -0
  49. package/dist/automations/notifications/rules/organizations.js +28 -0
  50. package/dist/automations/notifications/rules/organizations.js.map +1 -0
  51. package/dist/automations/notifications/rules/recipients.d.ts +32 -0
  52. package/dist/automations/notifications/rules/recipients.js +99 -0
  53. package/dist/automations/notifications/rules/recipients.js.map +1 -0
  54. package/dist/automations/notifications/service.d.ts +27 -0
  55. package/dist/automations/notifications/service.js +45 -0
  56. package/dist/automations/notifications/service.js.map +1 -0
  57. package/dist/automations/notifications/types.d.ts +7 -0
  58. package/dist/automations/notifications/types.js +473 -0
  59. package/dist/automations/notifications/types.js.map +1 -0
  60. package/dist/automations/ports.d.ts +119 -5
  61. package/dist/automations/service.d.ts +10 -13
  62. package/dist/automations/service.js +21 -83
  63. package/dist/automations/service.js.map +1 -1
  64. package/dist/content/events.d.ts +130 -80
  65. package/dist/content/events.js +11 -0
  66. package/dist/content/events.js.map +1 -1
  67. package/dist/content/index.d.ts +6 -4
  68. package/dist/content/index.js +3 -1
  69. package/dist/content/model.d.ts +2 -2
  70. package/dist/content/notification-categories.d.ts +36 -0
  71. package/dist/content/notification-categories.js +64 -0
  72. package/dist/content/notification-categories.js.map +1 -0
  73. package/dist/content/ports.d.ts +25 -6
  74. package/dist/content/service.d.ts +4 -4
  75. package/dist/content/service.js +24 -8
  76. package/dist/content/service.js.map +1 -1
  77. package/dist/content/titles.d.ts +22 -0
  78. package/dist/content/titles.js +69 -0
  79. package/dist/content/titles.js.map +1 -0
  80. package/dist/content/types.d.ts +2 -2
  81. package/dist/discussion/chats.d.ts +9 -4
  82. package/dist/discussion/chats.js +80 -47
  83. package/dist/discussion/chats.js.map +1 -1
  84. package/dist/discussion/digests.d.ts +24 -0
  85. package/dist/discussion/digests.js +104 -0
  86. package/dist/discussion/digests.js.map +1 -0
  87. package/dist/discussion/events.d.ts +194 -28
  88. package/dist/discussion/events.js +74 -17
  89. package/dist/discussion/events.js.map +1 -1
  90. package/dist/discussion/index.d.ts +7 -2
  91. package/dist/discussion/index.js +6 -1
  92. package/dist/discussion/jobs.d.ts +16 -0
  93. package/dist/discussion/jobs.js +40 -0
  94. package/dist/discussion/jobs.js.map +1 -0
  95. package/dist/discussion/mentions.d.ts +11 -0
  96. package/dist/discussion/mentions.js +35 -0
  97. package/dist/discussion/mentions.js.map +1 -0
  98. package/dist/discussion/ports.d.ts +107 -24
  99. package/dist/discussion/ports.js.map +1 -1
  100. package/dist/discussion/posts.d.ts +18 -8
  101. package/dist/discussion/posts.js +207 -155
  102. package/dist/discussion/posts.js.map +1 -1
  103. package/dist/discussion/service.d.ts +17 -8
  104. package/dist/discussion/service.js +105 -41
  105. package/dist/discussion/service.js.map +1 -1
  106. package/dist/discussion/subscriptions.d.ts +37 -0
  107. package/dist/discussion/subscriptions.js +99 -0
  108. package/dist/discussion/subscriptions.js.map +1 -0
  109. package/dist/discussion/titles.d.ts +26 -0
  110. package/dist/discussion/titles.js +84 -0
  111. package/dist/discussion/titles.js.map +1 -0
  112. package/dist/entitlements/events.d.ts +20 -20
  113. package/dist/entitlements/index.d.ts +2 -1
  114. package/dist/entitlements/index.js +2 -1
  115. package/dist/entitlements/jobs.d.ts +12 -0
  116. package/dist/entitlements/jobs.js +18 -0
  117. package/dist/entitlements/jobs.js.map +1 -0
  118. package/dist/entitlements/ports.d.ts +7 -3
  119. package/dist/entitlements/service.d.ts +5 -2
  120. package/dist/entitlements/service.js +23 -3
  121. package/dist/entitlements/service.js.map +1 -1
  122. package/dist/identity/devices.d.ts +30 -0
  123. package/dist/identity/devices.js +107 -0
  124. package/dist/identity/devices.js.map +1 -0
  125. package/dist/identity/events.d.ts +2 -2
  126. package/dist/identity/index.d.ts +5 -4
  127. package/dist/identity/index.js +3 -2
  128. package/dist/identity/model.d.ts +2 -2
  129. package/dist/identity/notification-settings.d.ts +28 -0
  130. package/dist/identity/notification-settings.js +113 -0
  131. package/dist/identity/notification-settings.js.map +1 -0
  132. package/dist/identity/ports.d.ts +78 -54
  133. package/dist/integrations/events.d.ts +3 -3
  134. package/dist/organizations/events.d.ts +32 -32
  135. package/dist/organizations/index.d.ts +2 -1
  136. package/dist/organizations/index.js +2 -1
  137. package/dist/organizations/notification-categories.d.ts +32 -0
  138. package/dist/organizations/notification-categories.js +51 -0
  139. package/dist/organizations/notification-categories.js.map +1 -0
  140. package/dist/organizations/ports.d.ts +3 -0
  141. package/dist/organizations/service.d.ts +2 -0
  142. package/dist/organizations/service.js +7 -0
  143. package/dist/organizations/service.js.map +1 -1
  144. package/dist/progress/events.d.ts +14 -14
  145. package/dist/reporting/member/index.d.ts +2 -2
  146. package/dist/reporting/member/model.d.ts +56 -23
  147. package/dist/reporting/member/ports.d.ts +9 -6
  148. package/dist/reporting/member/service.d.ts +33 -14
  149. package/dist/reporting/member/service.js +138 -60
  150. package/dist/reporting/member/service.js.map +1 -1
  151. package/dist/shared/errors.d.ts +13 -1
  152. package/dist/shared/errors.js +18 -1
  153. package/dist/shared/errors.js.map +1 -1
  154. package/dist/shared/id.d.ts +3 -0
  155. package/dist/shared/id.js +4 -1
  156. package/dist/shared/id.js.map +1 -1
  157. package/dist/shared/mailer.d.ts +11 -1
  158. package/dist/shared/mailer.js +32 -5
  159. package/dist/shared/mailer.js.map +1 -1
  160. package/dist/shared/notification-categories.d.ts +16 -0
  161. package/dist/shared/notification-categories.js +94 -0
  162. package/dist/shared/notification-categories.js.map +1 -0
  163. package/dist/shared/notification-settings.d.ts +14 -0
  164. package/dist/shared/notification-settings.js +61 -0
  165. package/dist/shared/notification-settings.js.map +1 -0
  166. package/dist/shared/ports.d.ts +48 -2
  167. package/dist/shared/settings.d.ts +2 -1
  168. package/dist/shared/settings.js +1 -0
  169. package/dist/shared/settings.js.map +1 -1
  170. package/dist/types/automations.d.ts +8 -2
  171. package/dist/types/content.d.ts +2 -2
  172. package/dist/types/discussion.d.ts +2 -2
  173. package/dist/types/email-templates.d.ts +97 -3
  174. package/dist/types/identity.d.ts +2 -2
  175. package/dist/types/index.d.ts +7 -6
  176. package/dist/types/notifications.d.ts +157 -0
  177. package/dist/types/notifications.js +1 -0
  178. package/dist/types/schemas/automations.d.ts +1 -10
  179. package/dist/types/schemas/automations.js +1 -3
  180. package/dist/types/schemas/automations.js.map +1 -1
  181. package/dist/types/schemas/content.d.ts +62 -1
  182. package/dist/types/schemas/content.js +25 -3
  183. package/dist/types/schemas/content.js.map +1 -1
  184. package/dist/types/schemas/discussion.d.ts +85 -12
  185. package/dist/types/schemas/discussion.js +47 -13
  186. package/dist/types/schemas/discussion.js.map +1 -1
  187. package/dist/types/schemas/identity.d.ts +1 -85
  188. package/dist/types/schemas/identity.js +1 -42
  189. package/dist/types/schemas/identity.js.map +1 -1
  190. package/dist/types/schemas/index.d.ts +6 -5
  191. package/dist/types/schemas/index.js +6 -5
  192. package/dist/types/schemas/notifications.d.ts +95 -0
  193. package/dist/types/schemas/notifications.js +56 -0
  194. package/dist/types/schemas/notifications.js.map +1 -0
  195. package/dist/types/schemas/progress.d.ts +3 -3
  196. package/package.json +1 -1
  197. package/dist/automations/community-notifications.d.ts +0 -16
  198. package/dist/automations/community-notifications.js +0 -84
  199. package/dist/automations/community-notifications.js.map +0 -1
  200. package/dist/automations/seeds.d.ts +0 -17
  201. package/dist/automations/seeds.js +0 -235
  202. package/dist/automations/seeds.js.map +0 -1
  203. package/dist/identity/notifications.d.ts +0 -27
  204. package/dist/identity/notifications.js +0 -101
  205. package/dist/identity/notifications.js.map +0 -1
@@ -47,17 +47,18 @@ declare const contentEvents: {
47
47
  createdAt: unknown;
48
48
  updatedAt: unknown;
49
49
  }, z.ZodObject<{
50
- type: z.ZodLiteral<"course">;
51
- orgId: z.ZodString;
52
50
  id: z.ZodString;
53
- status: z.ZodEnum<{
54
- draft: "draft";
55
- published: "published";
56
- }>;
51
+ orgId: z.ZodString;
57
52
  createdAt: z.ZodCoercedDate<unknown>;
58
53
  updatedAt: z.ZodCoercedDate<unknown>;
54
+ type: z.ZodLiteral<"course">;
59
55
  title: z.ZodString;
60
56
  description: z.ZodString;
57
+ status: z.ZodEnum<{
58
+ draft: "draft";
59
+ published: "published";
60
+ }>;
61
+ category: z.ZodString;
61
62
  settings: z.ZodObject<{
62
63
  transcriptDownloads: z.ZodBoolean;
63
64
  comments: z.ZodOptional<z.ZodObject<{
@@ -68,7 +69,6 @@ declare const contentEvents: {
68
69
  }, z.core.$strict>>;
69
70
  }, z.core.$strict>;
70
71
  slug: z.ZodString;
71
- category: z.ZodString;
72
72
  thumbnailAssetId: z.ZodNullable<z.ZodString>;
73
73
  }, z.core.$strip>>;
74
74
  courseUpdated: RuntimeEventDefinition<VersionedDomainEvent<{
@@ -114,17 +114,18 @@ declare const contentEvents: {
114
114
  createdAt: unknown;
115
115
  updatedAt: unknown;
116
116
  }, z.ZodObject<{
117
- type: z.ZodLiteral<"course">;
118
- orgId: z.ZodString;
119
117
  id: z.ZodString;
120
- status: z.ZodEnum<{
121
- draft: "draft";
122
- published: "published";
123
- }>;
118
+ orgId: z.ZodString;
124
119
  createdAt: z.ZodCoercedDate<unknown>;
125
120
  updatedAt: z.ZodCoercedDate<unknown>;
121
+ type: z.ZodLiteral<"course">;
126
122
  title: z.ZodString;
127
123
  description: z.ZodString;
124
+ status: z.ZodEnum<{
125
+ draft: "draft";
126
+ published: "published";
127
+ }>;
128
+ category: z.ZodString;
128
129
  settings: z.ZodObject<{
129
130
  transcriptDownloads: z.ZodBoolean;
130
131
  comments: z.ZodOptional<z.ZodObject<{
@@ -135,7 +136,6 @@ declare const contentEvents: {
135
136
  }, z.core.$strict>>;
136
137
  }, z.core.$strict>;
137
138
  slug: z.ZodString;
138
- category: z.ZodString;
139
139
  thumbnailAssetId: z.ZodNullable<z.ZodString>;
140
140
  }, z.core.$strip>>;
141
141
  courseDeleted: RuntimeEventDefinition<VersionedDomainEvent<{
@@ -181,17 +181,18 @@ declare const contentEvents: {
181
181
  createdAt: unknown;
182
182
  updatedAt: unknown;
183
183
  }, z.ZodObject<{
184
- type: z.ZodLiteral<"course">;
185
- orgId: z.ZodString;
186
184
  id: z.ZodString;
187
- status: z.ZodEnum<{
188
- draft: "draft";
189
- published: "published";
190
- }>;
185
+ orgId: z.ZodString;
191
186
  createdAt: z.ZodCoercedDate<unknown>;
192
187
  updatedAt: z.ZodCoercedDate<unknown>;
188
+ type: z.ZodLiteral<"course">;
193
189
  title: z.ZodString;
194
190
  description: z.ZodString;
191
+ status: z.ZodEnum<{
192
+ draft: "draft";
193
+ published: "published";
194
+ }>;
195
+ category: z.ZodString;
195
196
  settings: z.ZodObject<{
196
197
  transcriptDownloads: z.ZodBoolean;
197
198
  comments: z.ZodOptional<z.ZodObject<{
@@ -202,7 +203,6 @@ declare const contentEvents: {
202
203
  }, z.core.$strict>>;
203
204
  }, z.core.$strict>;
204
205
  slug: z.ZodString;
205
- category: z.ZodString;
206
206
  thumbnailAssetId: z.ZodNullable<z.ZodString>;
207
207
  }, z.core.$strip>>;
208
208
  moduleCreated: RuntimeEventDefinition<VersionedDomainEvent<{
@@ -222,8 +222,8 @@ declare const contentEvents: {
222
222
  createdAt: unknown;
223
223
  updatedAt: unknown;
224
224
  }, z.ZodObject<{
225
- orgId: z.ZodString;
226
225
  id: z.ZodString;
226
+ orgId: z.ZodString;
227
227
  createdAt: z.ZodCoercedDate<unknown>;
228
228
  updatedAt: z.ZodCoercedDate<unknown>;
229
229
  title: z.ZodString;
@@ -247,8 +247,8 @@ declare const contentEvents: {
247
247
  createdAt: unknown;
248
248
  updatedAt: unknown;
249
249
  }, z.ZodObject<{
250
- orgId: z.ZodString;
251
250
  id: z.ZodString;
251
+ orgId: z.ZodString;
252
252
  createdAt: z.ZodCoercedDate<unknown>;
253
253
  updatedAt: z.ZodCoercedDate<unknown>;
254
254
  title: z.ZodString;
@@ -272,8 +272,8 @@ declare const contentEvents: {
272
272
  createdAt: unknown;
273
273
  updatedAt: unknown;
274
274
  }, z.ZodObject<{
275
- orgId: z.ZodString;
276
275
  id: z.ZodString;
276
+ orgId: z.ZodString;
277
277
  createdAt: z.ZodCoercedDate<unknown>;
278
278
  updatedAt: z.ZodCoercedDate<unknown>;
279
279
  title: z.ZodString;
@@ -297,8 +297,8 @@ declare const contentEvents: {
297
297
  createdAt: unknown;
298
298
  updatedAt: unknown;
299
299
  }[], z.ZodArray<z.ZodObject<{
300
- orgId: z.ZodString;
301
300
  id: z.ZodString;
301
+ orgId: z.ZodString;
302
302
  createdAt: z.ZodCoercedDate<unknown>;
303
303
  updatedAt: z.ZodCoercedDate<unknown>;
304
304
  title: z.ZodString;
@@ -324,13 +324,13 @@ declare const contentEvents: {
324
324
  createdAt: unknown;
325
325
  updatedAt: unknown;
326
326
  }, z.ZodObject<{
327
- orgId: z.ZodString;
328
327
  id: z.ZodString;
328
+ orgId: z.ZodString;
329
329
  createdAt: z.ZodCoercedDate<unknown>;
330
330
  updatedAt: z.ZodCoercedDate<unknown>;
331
+ moduleId: z.ZodString;
331
332
  courseId: z.ZodString;
332
333
  seq: z.ZodNumber;
333
- moduleId: z.ZodString;
334
334
  }, z.core.$strip>>;
335
335
  activityUpdated: RuntimeEventDefinition<VersionedDomainEvent<{
336
336
  orgId: string;
@@ -351,13 +351,13 @@ declare const contentEvents: {
351
351
  createdAt: unknown;
352
352
  updatedAt: unknown;
353
353
  }, z.ZodObject<{
354
- orgId: z.ZodString;
355
354
  id: z.ZodString;
355
+ orgId: z.ZodString;
356
356
  createdAt: z.ZodCoercedDate<unknown>;
357
357
  updatedAt: z.ZodCoercedDate<unknown>;
358
+ moduleId: z.ZodString;
358
359
  courseId: z.ZodString;
359
360
  seq: z.ZodNumber;
360
- moduleId: z.ZodString;
361
361
  }, z.core.$strip>>;
362
362
  activityDeleted: RuntimeEventDefinition<VersionedDomainEvent<{
363
363
  orgId: string;
@@ -378,14 +378,27 @@ declare const contentEvents: {
378
378
  createdAt: unknown;
379
379
  updatedAt: unknown;
380
380
  }, z.ZodObject<{
381
- orgId: z.ZodString;
382
381
  id: z.ZodString;
382
+ orgId: z.ZodString;
383
383
  createdAt: z.ZodCoercedDate<unknown>;
384
384
  updatedAt: z.ZodCoercedDate<unknown>;
385
+ moduleId: z.ZodString;
385
386
  courseId: z.ZodString;
386
387
  seq: z.ZodNumber;
387
- moduleId: z.ZodString;
388
388
  }, z.core.$strip>>;
389
+ activityPublished: RuntimeEventDefinition<VersionedDomainEvent<{
390
+ activityId: string;
391
+ moduleId: string;
392
+ courseId: string;
393
+ }, "content.course.activity.published", 1>, {
394
+ activityId: string;
395
+ moduleId: string;
396
+ courseId: string;
397
+ }, z.ZodObject<{
398
+ activityId: z.ZodString;
399
+ moduleId: z.ZodString;
400
+ courseId: z.ZodString;
401
+ }, z.core.$strict>>;
389
402
  activitiesReordered: RuntimeEventDefinition<VersionedDomainEvent<{
390
403
  orgId: string;
391
404
  id: string;
@@ -403,8 +416,8 @@ declare const contentEvents: {
403
416
  createdAt: unknown;
404
417
  updatedAt: unknown;
405
418
  }, z.ZodObject<{
406
- orgId: z.ZodString;
407
419
  id: z.ZodString;
420
+ orgId: z.ZodString;
408
421
  createdAt: z.ZodCoercedDate<unknown>;
409
422
  updatedAt: z.ZodCoercedDate<unknown>;
410
423
  title: z.ZodString;
@@ -436,19 +449,19 @@ declare const contentEvents: {
436
449
  createdAt: unknown;
437
450
  updatedAt: unknown;
438
451
  }, z.ZodObject<{
439
- type: z.ZodLiteral<"download">;
440
- orgId: z.ZodString;
441
452
  id: z.ZodString;
442
- status: z.ZodEnum<{
443
- draft: "draft";
444
- published: "published";
445
- }>;
453
+ orgId: z.ZodString;
446
454
  createdAt: z.ZodCoercedDate<unknown>;
447
455
  updatedAt: z.ZodCoercedDate<unknown>;
456
+ type: z.ZodLiteral<"download">;
448
457
  title: z.ZodString;
449
458
  description: z.ZodString;
450
- slug: z.ZodString;
459
+ status: z.ZodEnum<{
460
+ draft: "draft";
461
+ published: "published";
462
+ }>;
451
463
  category: z.ZodString;
464
+ slug: z.ZodString;
452
465
  thumbnailAssetId: z.ZodNullable<z.ZodString>;
453
466
  }, z.core.$strip>>;
454
467
  downloadUpdated: RuntimeEventDefinition<VersionedDomainEvent<{
@@ -476,19 +489,19 @@ declare const contentEvents: {
476
489
  createdAt: unknown;
477
490
  updatedAt: unknown;
478
491
  }, z.ZodObject<{
479
- type: z.ZodLiteral<"download">;
480
- orgId: z.ZodString;
481
492
  id: z.ZodString;
482
- status: z.ZodEnum<{
483
- draft: "draft";
484
- published: "published";
485
- }>;
493
+ orgId: z.ZodString;
486
494
  createdAt: z.ZodCoercedDate<unknown>;
487
495
  updatedAt: z.ZodCoercedDate<unknown>;
496
+ type: z.ZodLiteral<"download">;
488
497
  title: z.ZodString;
489
498
  description: z.ZodString;
490
- slug: z.ZodString;
499
+ status: z.ZodEnum<{
500
+ draft: "draft";
501
+ published: "published";
502
+ }>;
491
503
  category: z.ZodString;
504
+ slug: z.ZodString;
492
505
  thumbnailAssetId: z.ZodNullable<z.ZodString>;
493
506
  }, z.core.$strip>>;
494
507
  downloadDeleted: RuntimeEventDefinition<VersionedDomainEvent<{
@@ -516,19 +529,19 @@ declare const contentEvents: {
516
529
  createdAt: unknown;
517
530
  updatedAt: unknown;
518
531
  }, z.ZodObject<{
519
- type: z.ZodLiteral<"download">;
520
- orgId: z.ZodString;
521
532
  id: z.ZodString;
522
- status: z.ZodEnum<{
523
- draft: "draft";
524
- published: "published";
525
- }>;
533
+ orgId: z.ZodString;
526
534
  createdAt: z.ZodCoercedDate<unknown>;
527
535
  updatedAt: z.ZodCoercedDate<unknown>;
536
+ type: z.ZodLiteral<"download">;
528
537
  title: z.ZodString;
529
538
  description: z.ZodString;
530
- slug: z.ZodString;
539
+ status: z.ZodEnum<{
540
+ draft: "draft";
541
+ published: "published";
542
+ }>;
531
543
  category: z.ZodString;
544
+ slug: z.ZodString;
532
545
  thumbnailAssetId: z.ZodNullable<z.ZodString>;
533
546
  }, z.core.$strip>>;
534
547
  downloadAssetAdded: RuntimeEventDefinition<VersionedDomainEvent<{
@@ -558,13 +571,13 @@ declare const contentEvents: {
558
571
  }, z.ZodObject<{
559
572
  downloadId: z.ZodString;
560
573
  assets: z.ZodArray<z.ZodObject<{
561
- orgId: z.ZodString;
562
574
  id: z.ZodString;
575
+ orgId: z.ZodString;
563
576
  createdAt: z.ZodCoercedDate<unknown>;
564
577
  updatedAt: z.ZodCoercedDate<unknown>;
565
578
  seq: z.ZodNumber;
566
- downloadId: z.ZodString;
567
579
  assetId: z.ZodString;
580
+ downloadId: z.ZodString;
568
581
  displayName: z.ZodNullable<z.ZodString>;
569
582
  }, z.core.$strip>>;
570
583
  }, z.core.$strip>>;
@@ -595,13 +608,13 @@ declare const contentEvents: {
595
608
  }, z.ZodObject<{
596
609
  downloadId: z.ZodString;
597
610
  assets: z.ZodArray<z.ZodObject<{
598
- orgId: z.ZodString;
599
611
  id: z.ZodString;
612
+ orgId: z.ZodString;
600
613
  createdAt: z.ZodCoercedDate<unknown>;
601
614
  updatedAt: z.ZodCoercedDate<unknown>;
602
615
  seq: z.ZodNumber;
603
- downloadId: z.ZodString;
604
616
  assetId: z.ZodString;
617
+ downloadId: z.ZodString;
605
618
  displayName: z.ZodNullable<z.ZodString>;
606
619
  }, z.core.$strip>>;
607
620
  }, z.core.$strip>>;
@@ -632,13 +645,13 @@ declare const contentEvents: {
632
645
  }, z.ZodObject<{
633
646
  downloadId: z.ZodString;
634
647
  assets: z.ZodArray<z.ZodObject<{
635
- orgId: z.ZodString;
636
648
  id: z.ZodString;
649
+ orgId: z.ZodString;
637
650
  createdAt: z.ZodCoercedDate<unknown>;
638
651
  updatedAt: z.ZodCoercedDate<unknown>;
639
652
  seq: z.ZodNumber;
640
- downloadId: z.ZodString;
641
653
  assetId: z.ZodString;
654
+ downloadId: z.ZodString;
642
655
  displayName: z.ZodNullable<z.ZodString>;
643
656
  }, z.core.$strip>>;
644
657
  }, z.core.$strip>>;
@@ -669,13 +682,13 @@ declare const contentEvents: {
669
682
  }, z.ZodObject<{
670
683
  downloadId: z.ZodString;
671
684
  assets: z.ZodArray<z.ZodObject<{
672
- orgId: z.ZodString;
673
685
  id: z.ZodString;
686
+ orgId: z.ZodString;
674
687
  createdAt: z.ZodCoercedDate<unknown>;
675
688
  updatedAt: z.ZodCoercedDate<unknown>;
676
689
  seq: z.ZodNumber;
677
- downloadId: z.ZodString;
678
690
  assetId: z.ZodString;
691
+ downloadId: z.ZodString;
679
692
  displayName: z.ZodNullable<z.ZodString>;
680
693
  }, z.core.$strip>>;
681
694
  }, z.core.$strip>>;
@@ -775,6 +788,12 @@ declare const contentEvents: {
775
788
  groupChats: boolean;
776
789
  groupSize: number;
777
790
  };
791
+ digest: {
792
+ cadence: "daily" | "weekly";
793
+ weekday: number;
794
+ hour: number;
795
+ timeZone: string;
796
+ } | null;
778
797
  };
779
798
  createdAt: Date;
780
799
  updatedAt: Date;
@@ -797,21 +816,27 @@ declare const contentEvents: {
797
816
  groupChats: boolean;
798
817
  groupSize: number;
799
818
  };
819
+ digest: {
820
+ cadence: "daily" | "weekly";
821
+ weekday: number;
822
+ hour: number;
823
+ timeZone: string;
824
+ } | null;
800
825
  };
801
826
  createdAt: unknown;
802
827
  updatedAt: unknown;
803
828
  }, z.ZodObject<{
804
- type: z.ZodLiteral<"community">;
805
- orgId: z.ZodString;
806
829
  id: z.ZodString;
807
- status: z.ZodEnum<{
808
- draft: "draft";
809
- published: "published";
810
- }>;
830
+ orgId: z.ZodString;
811
831
  createdAt: z.ZodCoercedDate<unknown>;
812
832
  updatedAt: z.ZodCoercedDate<unknown>;
833
+ type: z.ZodLiteral<"community">;
813
834
  title: z.ZodString;
814
835
  description: z.ZodString;
836
+ status: z.ZodEnum<{
837
+ draft: "draft";
838
+ published: "published";
839
+ }>;
815
840
  slug: z.ZodString;
816
841
  thumbnailAssetId: z.ZodNullable<z.ZodString>;
817
842
  }, z.core.$strip>>;
@@ -834,6 +859,12 @@ declare const contentEvents: {
834
859
  groupChats: boolean;
835
860
  groupSize: number;
836
861
  };
862
+ digest: {
863
+ cadence: "daily" | "weekly";
864
+ weekday: number;
865
+ hour: number;
866
+ timeZone: string;
867
+ } | null;
837
868
  };
838
869
  createdAt: Date;
839
870
  updatedAt: Date;
@@ -856,21 +887,27 @@ declare const contentEvents: {
856
887
  groupChats: boolean;
857
888
  groupSize: number;
858
889
  };
890
+ digest: {
891
+ cadence: "daily" | "weekly";
892
+ weekday: number;
893
+ hour: number;
894
+ timeZone: string;
895
+ } | null;
859
896
  };
860
897
  createdAt: unknown;
861
898
  updatedAt: unknown;
862
899
  }, z.ZodObject<{
863
- type: z.ZodLiteral<"community">;
864
- orgId: z.ZodString;
865
900
  id: z.ZodString;
866
- status: z.ZodEnum<{
867
- draft: "draft";
868
- published: "published";
869
- }>;
901
+ orgId: z.ZodString;
870
902
  createdAt: z.ZodCoercedDate<unknown>;
871
903
  updatedAt: z.ZodCoercedDate<unknown>;
904
+ type: z.ZodLiteral<"community">;
872
905
  title: z.ZodString;
873
906
  description: z.ZodString;
907
+ status: z.ZodEnum<{
908
+ draft: "draft";
909
+ published: "published";
910
+ }>;
874
911
  slug: z.ZodString;
875
912
  thumbnailAssetId: z.ZodNullable<z.ZodString>;
876
913
  }, z.core.$strip>>;
@@ -893,6 +930,12 @@ declare const contentEvents: {
893
930
  groupChats: boolean;
894
931
  groupSize: number;
895
932
  };
933
+ digest: {
934
+ cadence: "daily" | "weekly";
935
+ weekday: number;
936
+ hour: number;
937
+ timeZone: string;
938
+ } | null;
896
939
  };
897
940
  createdAt: Date;
898
941
  updatedAt: Date;
@@ -915,21 +958,27 @@ declare const contentEvents: {
915
958
  groupChats: boolean;
916
959
  groupSize: number;
917
960
  };
961
+ digest: {
962
+ cadence: "daily" | "weekly";
963
+ weekday: number;
964
+ hour: number;
965
+ timeZone: string;
966
+ } | null;
918
967
  };
919
968
  createdAt: unknown;
920
969
  updatedAt: unknown;
921
970
  }, z.ZodObject<{
922
- type: z.ZodLiteral<"community">;
923
- orgId: z.ZodString;
924
971
  id: z.ZodString;
925
- status: z.ZodEnum<{
926
- draft: "draft";
927
- published: "published";
928
- }>;
972
+ orgId: z.ZodString;
929
973
  createdAt: z.ZodCoercedDate<unknown>;
930
974
  updatedAt: z.ZodCoercedDate<unknown>;
975
+ type: z.ZodLiteral<"community">;
931
976
  title: z.ZodString;
932
977
  description: z.ZodString;
978
+ status: z.ZodEnum<{
979
+ draft: "draft";
980
+ published: "published";
981
+ }>;
933
982
  slug: z.ZodString;
934
983
  thumbnailAssetId: z.ZodNullable<z.ZodString>;
935
984
  }, z.core.$strip>>;
@@ -1372,6 +1421,7 @@ type CourseModulesReordered = EventOf<typeof contentEvents.modulesReordered>;
1372
1421
  type CourseActivityCreated = EventOf<typeof contentEvents.activityCreated>;
1373
1422
  type CourseActivityUpdated = EventOf<typeof contentEvents.activityUpdated>;
1374
1423
  type CourseActivityDeleted = EventOf<typeof contentEvents.activityDeleted>;
1424
+ type CourseActivityPublished = EventOf<typeof contentEvents.activityPublished>;
1375
1425
  type CourseActivitiesReordered = EventOf<typeof contentEvents.activitiesReordered>;
1376
1426
  type DownloadCreated = EventOf<typeof contentEvents.downloadCreated>;
1377
1427
  type DownloadUpdated = EventOf<typeof contentEvents.downloadUpdated>;
@@ -1394,5 +1444,5 @@ type CommunitySpaceDeleted = EventOf<typeof contentEvents.spaceDeleted>;
1394
1444
  type CommunitySpacesReordered = EventOf<typeof contentEvents.spacesReordered>;
1395
1445
  type ContentEvent = EventOfValues<typeof contentEvents>;
1396
1446
  //#endregion
1397
- export { BundleCreated, BundleDeleted, BundleItemAdded, BundleItemRemoved, BundleUpdated, CommunityCreated, CommunityDeleted, CommunitySpaceCreated, CommunitySpaceDeleted, CommunitySpaceUpdated, CommunitySpacesReordered, CommunityUpdated, ContentEvent, CourseActivitiesReordered, CourseActivityCreated, CourseActivityDeleted, CourseActivityUpdated, CourseCreated, CourseDeleted, CourseModuleCreated, CourseModuleDeleted, CourseModuleUpdated, CourseModulesReordered, CourseUpdated, DownloadAssetAdded, DownloadAssetRemoved, DownloadAssetRenamed, DownloadAssetsReordered, DownloadCreated, DownloadDeleted, DownloadUpdated, contentEvents };
1447
+ export { BundleCreated, BundleDeleted, BundleItemAdded, BundleItemRemoved, BundleUpdated, CommunityCreated, CommunityDeleted, CommunitySpaceCreated, CommunitySpaceDeleted, CommunitySpaceUpdated, CommunitySpacesReordered, CommunityUpdated, ContentEvent, CourseActivitiesReordered, CourseActivityCreated, CourseActivityDeleted, CourseActivityPublished, CourseActivityUpdated, CourseCreated, CourseDeleted, CourseModuleCreated, CourseModuleDeleted, CourseModuleUpdated, CourseModulesReordered, CourseUpdated, DownloadAssetAdded, DownloadAssetRemoved, DownloadAssetRenamed, DownloadAssetsReordered, DownloadCreated, DownloadDeleted, DownloadUpdated, contentEvents };
1398
1448
  //# sourceMappingURL=events.d.ts.map
@@ -3,6 +3,11 @@ import { activitySchema, bundleItemSchema, bundleSchema, communitySchema, course
3
3
  import { defineEvent } from "../shared/events.js";
4
4
  import { z } from "zod";
5
5
  //#region src/content/events.ts
6
+ const activityPublishedSchema = z.object({
7
+ activityId: idSchema,
8
+ moduleId: idSchema,
9
+ courseId: idSchema
10
+ }).strict();
6
11
  const downloadAssetsEventSchema = z.object({
7
12
  downloadId: idSchema,
8
13
  assets: z.array(downloadAssetSchema)
@@ -132,6 +137,12 @@ const contentEvents = {
132
137
  data: activitySchema,
133
138
  publicData: publicActivity
134
139
  }),
140
+ activityPublished: defineEvent({
141
+ type: "content.course.activity.published",
142
+ version: 1,
143
+ data: activityPublishedSchema,
144
+ publicData: activityPublishedSchema
145
+ }),
135
146
  activitiesReordered: defineEvent({
136
147
  type: "content.course.activities.reordered",
137
148
  version: 1,
@@ -1 +1 @@
1
- {"version":3,"file":"events.js","names":[],"sources":["../../src/content/events.ts"],"sourcesContent":["import { z } from 'zod';\nimport {\n activitySchema,\n bundleItemSchema,\n bundleSchema,\n communitySchema,\n courseSchema,\n downloadAssetSchema,\n downloadSchema,\n idSchema,\n moduleSchema,\n spaceDetailSchema,\n} from '../types/schemas/index.js';\nimport { defineEvent, type EventOf, type EventOfValues } from '../shared/ports.js';\n\nconst downloadAssetsEventSchema = z\n .object({\n downloadId: idSchema,\n assets: z.array(downloadAssetSchema),\n })\n .strict();\n\nconst bundleItemsEventSchema = z\n .object({\n bundleId: idSchema,\n items: z.array(bundleItemSchema),\n })\n .strict();\n\nconst publicCourse = courseSchema\n .pick({\n orgId: true,\n id: true,\n type: true,\n title: true,\n slug: true,\n description: true,\n status: true,\n category: true,\n thumbnailAssetId: true,\n settings: true,\n createdAt: true,\n updatedAt: true,\n })\n .strip();\n\nconst publicModule = moduleSchema\n .pick({\n orgId: true,\n id: true,\n courseId: true,\n title: true,\n seq: true,\n createdAt: true,\n updatedAt: true,\n })\n .strip();\n\nconst publicActivity = activitySchema\n .pick({\n orgId: true,\n id: true,\n moduleId: true,\n courseId: true,\n seq: true,\n createdAt: true,\n updatedAt: true,\n })\n .strip();\n\nconst publicDownload = downloadSchema\n .pick({\n orgId: true,\n id: true,\n type: true,\n title: true,\n slug: true,\n description: true,\n status: true,\n category: true,\n thumbnailAssetId: true,\n createdAt: true,\n updatedAt: true,\n })\n .strip();\n\nconst publicDownloadAsset = downloadAssetSchema\n .pick({\n orgId: true,\n id: true,\n downloadId: true,\n assetId: true,\n seq: true,\n displayName: true,\n createdAt: true,\n updatedAt: true,\n })\n .strip();\n\nconst publicCommunity = communitySchema.omit({ settings: true }).strip();\n\nconst publicDownloadAssets = z.object({\n downloadId: idSchema,\n assets: z.array(publicDownloadAsset),\n});\n\nexport const contentEvents = {\n courseCreated: defineEvent({\n type: 'content.course.created',\n version: 1,\n data: courseSchema,\n publicData: publicCourse,\n }),\n courseUpdated: defineEvent({\n type: 'content.course.updated',\n version: 1,\n data: courseSchema,\n publicData: publicCourse,\n }),\n courseDeleted: defineEvent({\n type: 'content.course.deleted',\n version: 1,\n data: courseSchema,\n publicData: publicCourse,\n }),\n moduleCreated: defineEvent({\n type: 'content.course.module.created',\n version: 1,\n data: moduleSchema,\n publicData: publicModule,\n }),\n moduleUpdated: defineEvent({\n type: 'content.course.module.updated',\n version: 1,\n data: moduleSchema,\n publicData: publicModule,\n }),\n moduleDeleted: defineEvent({\n type: 'content.course.module.deleted',\n version: 1,\n data: moduleSchema,\n publicData: publicModule,\n }),\n modulesReordered: defineEvent({\n type: 'content.course.modules.reordered',\n version: 1,\n data: z.array(moduleSchema),\n publicData: z.array(publicModule),\n }),\n activityCreated: defineEvent({\n type: 'content.course.activity.created',\n version: 1,\n data: activitySchema,\n publicData: publicActivity,\n }),\n activityUpdated: defineEvent({\n type: 'content.course.activity.updated',\n version: 1,\n data: activitySchema,\n publicData: publicActivity,\n }),\n activityDeleted: defineEvent({\n type: 'content.course.activity.deleted',\n version: 1,\n data: activitySchema,\n publicData: publicActivity,\n }),\n activitiesReordered: defineEvent({\n type: 'content.course.activities.reordered',\n version: 1,\n data: moduleSchema,\n publicData: publicModule,\n }),\n downloadCreated: defineEvent({\n type: 'content.download.created',\n version: 1,\n data: downloadSchema,\n publicData: publicDownload,\n }),\n downloadUpdated: defineEvent({\n type: 'content.download.updated',\n version: 1,\n data: downloadSchema,\n publicData: publicDownload,\n }),\n downloadDeleted: defineEvent({\n type: 'content.download.deleted',\n version: 1,\n data: downloadSchema,\n publicData: publicDownload,\n }),\n downloadAssetAdded: defineEvent({\n type: 'content.download.asset.added',\n version: 1,\n data: downloadAssetsEventSchema,\n publicData: publicDownloadAssets,\n }),\n downloadAssetRemoved: defineEvent({\n type: 'content.download.asset.removed',\n version: 1,\n data: downloadAssetsEventSchema,\n publicData: publicDownloadAssets,\n }),\n downloadAssetRenamed: defineEvent({\n type: 'content.download.asset.renamed',\n version: 1,\n data: downloadAssetsEventSchema,\n publicData: publicDownloadAssets,\n }),\n downloadAssetsReordered: defineEvent({\n type: 'content.download.assets.reordered',\n version: 1,\n data: downloadAssetsEventSchema,\n publicData: publicDownloadAssets,\n }),\n bundleCreated: defineEvent({\n type: 'content.bundle.created',\n version: 1,\n data: bundleSchema,\n }),\n bundleUpdated: defineEvent({\n type: 'content.bundle.updated',\n version: 1,\n data: bundleSchema,\n }),\n bundleDeleted: defineEvent({\n type: 'content.bundle.deleted',\n version: 1,\n data: bundleSchema,\n }),\n bundleItemAdded: defineEvent({\n type: 'content.bundle.item.added',\n version: 1,\n data: bundleItemsEventSchema,\n }),\n bundleItemRemoved: defineEvent({\n type: 'content.bundle.item.removed',\n version: 1,\n data: bundleItemsEventSchema,\n }),\n communityCreated: defineEvent({\n type: 'content.community.created',\n version: 1,\n data: communitySchema,\n publicData: publicCommunity,\n }),\n communityUpdated: defineEvent({\n type: 'content.community.updated',\n version: 1,\n data: communitySchema,\n publicData: publicCommunity,\n }),\n communityDeleted: defineEvent({\n type: 'content.community.deleted',\n version: 1,\n data: communitySchema,\n publicData: publicCommunity,\n }),\n spaceCreated: defineEvent({\n type: 'content.community.space.created',\n version: 1,\n data: spaceDetailSchema,\n publicData: spaceDetailSchema,\n }),\n spaceUpdated: defineEvent({\n type: 'content.community.space.updated',\n version: 1,\n data: spaceDetailSchema,\n publicData: spaceDetailSchema,\n }),\n spaceDeleted: defineEvent({\n type: 'content.community.space.deleted',\n version: 1,\n data: spaceDetailSchema,\n publicData: spaceDetailSchema,\n }),\n spacesReordered: defineEvent({\n type: 'content.community.spaces.reordered',\n version: 1,\n data: z.array(spaceDetailSchema),\n publicData: z.array(spaceDetailSchema),\n }),\n};\n\nexport type CourseCreated = EventOf<typeof contentEvents.courseCreated>;\nexport type CourseUpdated = EventOf<typeof contentEvents.courseUpdated>;\nexport type CourseDeleted = EventOf<typeof contentEvents.courseDeleted>;\nexport type CourseModuleCreated = EventOf<typeof contentEvents.moduleCreated>;\nexport type CourseModuleUpdated = EventOf<typeof contentEvents.moduleUpdated>;\nexport type CourseModuleDeleted = EventOf<typeof contentEvents.moduleDeleted>;\nexport type CourseModulesReordered = EventOf<typeof contentEvents.modulesReordered>;\nexport type CourseActivityCreated = EventOf<typeof contentEvents.activityCreated>;\nexport type CourseActivityUpdated = EventOf<typeof contentEvents.activityUpdated>;\nexport type CourseActivityDeleted = EventOf<typeof contentEvents.activityDeleted>;\nexport type CourseActivitiesReordered = EventOf<typeof contentEvents.activitiesReordered>;\nexport type DownloadCreated = EventOf<typeof contentEvents.downloadCreated>;\nexport type DownloadUpdated = EventOf<typeof contentEvents.downloadUpdated>;\nexport type DownloadDeleted = EventOf<typeof contentEvents.downloadDeleted>;\nexport type DownloadAssetAdded = EventOf<typeof contentEvents.downloadAssetAdded>;\nexport type DownloadAssetRemoved = EventOf<typeof contentEvents.downloadAssetRemoved>;\nexport type DownloadAssetRenamed = EventOf<typeof contentEvents.downloadAssetRenamed>;\nexport type DownloadAssetsReordered = EventOf<typeof contentEvents.downloadAssetsReordered>;\nexport type BundleCreated = EventOf<typeof contentEvents.bundleCreated>;\nexport type BundleUpdated = EventOf<typeof contentEvents.bundleUpdated>;\nexport type BundleDeleted = EventOf<typeof contentEvents.bundleDeleted>;\nexport type BundleItemAdded = EventOf<typeof contentEvents.bundleItemAdded>;\nexport type BundleItemRemoved = EventOf<typeof contentEvents.bundleItemRemoved>;\nexport type CommunityCreated = EventOf<typeof contentEvents.communityCreated>;\nexport type CommunityUpdated = EventOf<typeof contentEvents.communityUpdated>;\nexport type CommunityDeleted = EventOf<typeof contentEvents.communityDeleted>;\nexport type CommunitySpaceCreated = EventOf<typeof contentEvents.spaceCreated>;\nexport type CommunitySpaceUpdated = EventOf<typeof contentEvents.spaceUpdated>;\nexport type CommunitySpaceDeleted = EventOf<typeof contentEvents.spaceDeleted>;\nexport type CommunitySpacesReordered = EventOf<typeof contentEvents.spacesReordered>;\nexport type ContentEvent = EventOfValues<typeof contentEvents>;\n"],"mappings":"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"}
1
+ {"version":3,"file":"events.js","names":[],"sources":["../../src/content/events.ts"],"sourcesContent":["import { z } from 'zod';\nimport {\n activitySchema,\n bundleItemSchema,\n bundleSchema,\n communitySchema,\n courseSchema,\n downloadAssetSchema,\n downloadSchema,\n idSchema,\n moduleSchema,\n spaceDetailSchema,\n} from '../types/schemas/index.js';\nimport { defineEvent, type EventOf, type EventOfValues } from '../shared/ports.js';\n\nconst activityPublishedSchema = z\n .object({ activityId: idSchema, moduleId: idSchema, courseId: idSchema })\n .strict();\n\nconst downloadAssetsEventSchema = z\n .object({\n downloadId: idSchema,\n assets: z.array(downloadAssetSchema),\n })\n .strict();\n\nconst bundleItemsEventSchema = z\n .object({\n bundleId: idSchema,\n items: z.array(bundleItemSchema),\n })\n .strict();\n\nconst publicCourse = courseSchema\n .pick({\n orgId: true,\n id: true,\n type: true,\n title: true,\n slug: true,\n description: true,\n status: true,\n category: true,\n thumbnailAssetId: true,\n settings: true,\n createdAt: true,\n updatedAt: true,\n })\n .strip();\n\nconst publicModule = moduleSchema\n .pick({\n orgId: true,\n id: true,\n courseId: true,\n title: true,\n seq: true,\n createdAt: true,\n updatedAt: true,\n })\n .strip();\n\nconst publicActivity = activitySchema\n .pick({\n orgId: true,\n id: true,\n moduleId: true,\n courseId: true,\n seq: true,\n createdAt: true,\n updatedAt: true,\n })\n .strip();\n\nconst publicDownload = downloadSchema\n .pick({\n orgId: true,\n id: true,\n type: true,\n title: true,\n slug: true,\n description: true,\n status: true,\n category: true,\n thumbnailAssetId: true,\n createdAt: true,\n updatedAt: true,\n })\n .strip();\n\nconst publicDownloadAsset = downloadAssetSchema\n .pick({\n orgId: true,\n id: true,\n downloadId: true,\n assetId: true,\n seq: true,\n displayName: true,\n createdAt: true,\n updatedAt: true,\n })\n .strip();\n\nconst publicCommunity = communitySchema.omit({ settings: true }).strip();\n\nconst publicDownloadAssets = z.object({\n downloadId: idSchema,\n assets: z.array(publicDownloadAsset),\n});\n\nexport const contentEvents = {\n courseCreated: defineEvent({\n type: 'content.course.created',\n version: 1,\n data: courseSchema,\n publicData: publicCourse,\n }),\n courseUpdated: defineEvent({\n type: 'content.course.updated',\n version: 1,\n data: courseSchema,\n publicData: publicCourse,\n }),\n courseDeleted: defineEvent({\n type: 'content.course.deleted',\n version: 1,\n data: courseSchema,\n publicData: publicCourse,\n }),\n moduleCreated: defineEvent({\n type: 'content.course.module.created',\n version: 1,\n data: moduleSchema,\n publicData: publicModule,\n }),\n moduleUpdated: defineEvent({\n type: 'content.course.module.updated',\n version: 1,\n data: moduleSchema,\n publicData: publicModule,\n }),\n moduleDeleted: defineEvent({\n type: 'content.course.module.deleted',\n version: 1,\n data: moduleSchema,\n publicData: publicModule,\n }),\n modulesReordered: defineEvent({\n type: 'content.course.modules.reordered',\n version: 1,\n data: z.array(moduleSchema),\n publicData: z.array(publicModule),\n }),\n activityCreated: defineEvent({\n type: 'content.course.activity.created',\n version: 1,\n data: activitySchema,\n publicData: publicActivity,\n }),\n activityUpdated: defineEvent({\n type: 'content.course.activity.updated',\n version: 1,\n data: activitySchema,\n publicData: publicActivity,\n }),\n activityDeleted: defineEvent({\n type: 'content.course.activity.deleted',\n version: 1,\n data: activitySchema,\n publicData: publicActivity,\n }),\n activityPublished: defineEvent({\n type: 'content.course.activity.published',\n version: 1,\n data: activityPublishedSchema,\n publicData: activityPublishedSchema,\n }),\n activitiesReordered: defineEvent({\n type: 'content.course.activities.reordered',\n version: 1,\n data: moduleSchema,\n publicData: publicModule,\n }),\n downloadCreated: defineEvent({\n type: 'content.download.created',\n version: 1,\n data: downloadSchema,\n publicData: publicDownload,\n }),\n downloadUpdated: defineEvent({\n type: 'content.download.updated',\n version: 1,\n data: downloadSchema,\n publicData: publicDownload,\n }),\n downloadDeleted: defineEvent({\n type: 'content.download.deleted',\n version: 1,\n data: downloadSchema,\n publicData: publicDownload,\n }),\n downloadAssetAdded: defineEvent({\n type: 'content.download.asset.added',\n version: 1,\n data: downloadAssetsEventSchema,\n publicData: publicDownloadAssets,\n }),\n downloadAssetRemoved: defineEvent({\n type: 'content.download.asset.removed',\n version: 1,\n data: downloadAssetsEventSchema,\n publicData: publicDownloadAssets,\n }),\n downloadAssetRenamed: defineEvent({\n type: 'content.download.asset.renamed',\n version: 1,\n data: downloadAssetsEventSchema,\n publicData: publicDownloadAssets,\n }),\n downloadAssetsReordered: defineEvent({\n type: 'content.download.assets.reordered',\n version: 1,\n data: downloadAssetsEventSchema,\n publicData: publicDownloadAssets,\n }),\n bundleCreated: defineEvent({\n type: 'content.bundle.created',\n version: 1,\n data: bundleSchema,\n }),\n bundleUpdated: defineEvent({\n type: 'content.bundle.updated',\n version: 1,\n data: bundleSchema,\n }),\n bundleDeleted: defineEvent({\n type: 'content.bundle.deleted',\n version: 1,\n data: bundleSchema,\n }),\n bundleItemAdded: defineEvent({\n type: 'content.bundle.item.added',\n version: 1,\n data: bundleItemsEventSchema,\n }),\n bundleItemRemoved: defineEvent({\n type: 'content.bundle.item.removed',\n version: 1,\n data: bundleItemsEventSchema,\n }),\n communityCreated: defineEvent({\n type: 'content.community.created',\n version: 1,\n data: communitySchema,\n publicData: publicCommunity,\n }),\n communityUpdated: defineEvent({\n type: 'content.community.updated',\n version: 1,\n data: communitySchema,\n publicData: publicCommunity,\n }),\n communityDeleted: defineEvent({\n type: 'content.community.deleted',\n version: 1,\n data: communitySchema,\n publicData: publicCommunity,\n }),\n spaceCreated: defineEvent({\n type: 'content.community.space.created',\n version: 1,\n data: spaceDetailSchema,\n publicData: spaceDetailSchema,\n }),\n spaceUpdated: defineEvent({\n type: 'content.community.space.updated',\n version: 1,\n data: spaceDetailSchema,\n publicData: spaceDetailSchema,\n }),\n spaceDeleted: defineEvent({\n type: 'content.community.space.deleted',\n version: 1,\n data: spaceDetailSchema,\n publicData: spaceDetailSchema,\n }),\n spacesReordered: defineEvent({\n type: 'content.community.spaces.reordered',\n version: 1,\n data: z.array(spaceDetailSchema),\n publicData: z.array(spaceDetailSchema),\n }),\n};\n\nexport type CourseCreated = EventOf<typeof contentEvents.courseCreated>;\nexport type CourseUpdated = EventOf<typeof contentEvents.courseUpdated>;\nexport type CourseDeleted = EventOf<typeof contentEvents.courseDeleted>;\nexport type CourseModuleCreated = EventOf<typeof contentEvents.moduleCreated>;\nexport type CourseModuleUpdated = EventOf<typeof contentEvents.moduleUpdated>;\nexport type CourseModuleDeleted = EventOf<typeof contentEvents.moduleDeleted>;\nexport type CourseModulesReordered = EventOf<typeof contentEvents.modulesReordered>;\nexport type CourseActivityCreated = EventOf<typeof contentEvents.activityCreated>;\nexport type CourseActivityUpdated = EventOf<typeof contentEvents.activityUpdated>;\nexport type CourseActivityDeleted = EventOf<typeof contentEvents.activityDeleted>;\nexport type CourseActivityPublished = EventOf<typeof contentEvents.activityPublished>;\nexport type CourseActivitiesReordered = EventOf<typeof contentEvents.activitiesReordered>;\nexport type DownloadCreated = EventOf<typeof contentEvents.downloadCreated>;\nexport type DownloadUpdated = EventOf<typeof contentEvents.downloadUpdated>;\nexport type DownloadDeleted = EventOf<typeof contentEvents.downloadDeleted>;\nexport type DownloadAssetAdded = EventOf<typeof contentEvents.downloadAssetAdded>;\nexport type DownloadAssetRemoved = EventOf<typeof contentEvents.downloadAssetRemoved>;\nexport type DownloadAssetRenamed = EventOf<typeof contentEvents.downloadAssetRenamed>;\nexport type DownloadAssetsReordered = EventOf<typeof contentEvents.downloadAssetsReordered>;\nexport type BundleCreated = EventOf<typeof contentEvents.bundleCreated>;\nexport type BundleUpdated = EventOf<typeof contentEvents.bundleUpdated>;\nexport type BundleDeleted = EventOf<typeof contentEvents.bundleDeleted>;\nexport type BundleItemAdded = EventOf<typeof contentEvents.bundleItemAdded>;\nexport type BundleItemRemoved = EventOf<typeof contentEvents.bundleItemRemoved>;\nexport type CommunityCreated = EventOf<typeof contentEvents.communityCreated>;\nexport type CommunityUpdated = EventOf<typeof contentEvents.communityUpdated>;\nexport type CommunityDeleted = EventOf<typeof contentEvents.communityDeleted>;\nexport type CommunitySpaceCreated = EventOf<typeof contentEvents.spaceCreated>;\nexport type CommunitySpaceUpdated = EventOf<typeof contentEvents.spaceUpdated>;\nexport type CommunitySpaceDeleted = EventOf<typeof contentEvents.spaceDeleted>;\nexport type CommunitySpacesReordered = EventOf<typeof contentEvents.spacesReordered>;\nexport type ContentEvent = EventOfValues<typeof contentEvents>;\n"],"mappings":"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"}
@@ -1,8 +1,10 @@
1
1
  import { Page } from "../types/shared.js";
2
- import { Activity, ActivityAsset, ActivityView, AddDownloadAssetInput, Bundle, BundleItem, Community, CommunityStatus, CommunityView, Course, CourseSettings, CourseStatus, CourseView, CreateBundleInput, CreateCommunityInput, CreateCourseInput, CreateDownloadInput, CreateSpaceInput, DmSettings, Download, DownloadAsset, DownloadFile, DownloadStatus, DownloadView, ListBundlesQuery, ListCommunitiesQuery, ListCoursesQuery, ListDownloadsQuery, Module, PatchDmSettingsInput, ReorderDownloadAssetsInput, SaveActivityInput, SetSpaceTopicsInput, Space, SpaceAccessRule, SpaceDetail, SpaceLink, SpaceTopic, UpdateBundleInput, UpdateCommunityInput, UpdateCourseInput, UpdateDownloadInput, UpdateSpaceInput } from "../types/schemas/content.js";
2
+ import { Activity, ActivityAsset, ActivityView, AddDownloadAssetInput, Bundle, BundleItem, Community, CommunityStatus, CommunityView, Course, CourseSettings, CourseStatus, CourseView, CreateBundleInput, CreateCommunityInput, CreateCourseInput, CreateDownloadInput, CreateSpaceInput, DigestSchedule, DmSettings, Download, DownloadAsset, DownloadFile, DownloadStatus, DownloadView, ListBundlesQuery, ListCommunitiesQuery, ListCoursesQuery, ListDownloadsQuery, Module, PatchCommunitySettingsInput, PatchDmSettingsInput, ReorderDownloadAssetsInput, SaveActivityInput, SetSpaceTopicsInput, Space, SpaceAccessRule, SpaceDetail, SpaceLink, SpaceTopic, UpdateBundleInput, UpdateCommunityInput, UpdateCourseInput, UpdateDownloadInput, UpdateSpaceInput } from "../types/schemas/content.js";
3
3
  import "./model.js";
4
4
  import "./types.js";
5
- import { BundlesService, CommunitiesService, CommunityReader, ContentRepository, ContentService as ContentService$1, CourseManagementService, DownloadablesService, SpaceRowLock } from "./ports.js";
5
+ import { BundlesService, CommunitiesService, CommunityDigest, CommunityReader, ContentRepository, ContentService as ContentService$1, CourseManagementService, DownloadablesService, ItemTitle, ItemTitleAccess, ItemTitles, SpaceRowLock } from "./ports.js";
6
6
  import { ContentService } from "./service.js";
7
- import { BundleCreated, BundleDeleted, BundleItemAdded, BundleItemRemoved, BundleUpdated, CommunityCreated, CommunityDeleted, CommunitySpaceCreated, CommunitySpaceDeleted, CommunitySpaceUpdated, CommunitySpacesReordered, CommunityUpdated, ContentEvent, CourseActivitiesReordered, CourseActivityCreated, CourseActivityDeleted, CourseActivityUpdated, CourseCreated, CourseDeleted, CourseModuleCreated, CourseModuleDeleted, CourseModuleUpdated, CourseModulesReordered, CourseUpdated, DownloadCreated, DownloadDeleted, DownloadUpdated, contentEvents } from "./events.js";
8
- export { type Activity, type ActivityAsset, type ActivityView, type AddDownloadAssetInput, type Bundle, type BundleCreated, type BundleDeleted, type BundleItem, type BundleItemAdded, type BundleItemRemoved, type BundleUpdated, type BundlesService, type CommunitiesService, type Community, type CommunityCreated, type CommunityDeleted, type CommunityReader, type CommunitySpaceCreated, type CommunitySpaceDeleted, type CommunitySpaceUpdated, type CommunitySpacesReordered, type CommunityStatus, type CommunityUpdated, type CommunityView, type ContentEvent, type ContentRepository, ContentService, type ContentService$1 as ContentServicePort, type Course, type CourseActivitiesReordered, type CourseActivityCreated, type CourseActivityDeleted, type CourseActivityUpdated, type CourseCreated, type CourseDeleted, type CourseManagementService, type CourseModuleCreated, type CourseModuleDeleted, type CourseModuleUpdated, type CourseModulesReordered, type CourseSettings, type CourseStatus, type CourseUpdated, type CourseView, type CreateBundleInput, type CreateCommunityInput, type CreateCourseInput, type CreateDownloadInput, type CreateSpaceInput, type DmSettings, type Download, type DownloadAsset, type DownloadCreated, type DownloadDeleted, type DownloadFile, type DownloadStatus, type DownloadUpdated, type DownloadView, type DownloadablesService, type ListBundlesQuery, type ListCommunitiesQuery, type ListCoursesQuery, type ListDownloadsQuery, type Module, type Page, type PatchDmSettingsInput, type ReorderDownloadAssetsInput, type SaveActivityInput, type SetSpaceTopicsInput, type Space, type SpaceAccessRule, type SpaceDetail, type SpaceLink, type SpaceRowLock, type SpaceTopic, type UpdateBundleInput, type UpdateCommunityInput, type UpdateCourseInput, type UpdateDownloadInput, type UpdateSpaceInput, contentEvents };
7
+ import { CommunityNotificationCategories } from "./notification-categories.js";
8
+ import { ContentItemTitles, activityTitle } from "./titles.js";
9
+ import { BundleCreated, BundleDeleted, BundleItemAdded, BundleItemRemoved, BundleUpdated, CommunityCreated, CommunityDeleted, CommunitySpaceCreated, CommunitySpaceDeleted, CommunitySpaceUpdated, CommunitySpacesReordered, CommunityUpdated, ContentEvent, CourseActivitiesReordered, CourseActivityCreated, CourseActivityDeleted, CourseActivityPublished, CourseActivityUpdated, CourseCreated, CourseDeleted, CourseModuleCreated, CourseModuleDeleted, CourseModuleUpdated, CourseModulesReordered, CourseUpdated, DownloadCreated, DownloadDeleted, DownloadUpdated, contentEvents } from "./events.js";
10
+ export { type Activity, type ActivityAsset, type ActivityView, type AddDownloadAssetInput, type Bundle, type BundleCreated, type BundleDeleted, type BundleItem, type BundleItemAdded, type BundleItemRemoved, type BundleUpdated, type BundlesService, type CommunitiesService, type Community, type CommunityCreated, type CommunityDeleted, type CommunityDigest, CommunityNotificationCategories, type CommunityReader, type CommunitySpaceCreated, type CommunitySpaceDeleted, type CommunitySpaceUpdated, type CommunitySpacesReordered, type CommunityStatus, type CommunityUpdated, type CommunityView, type ContentEvent, ContentItemTitles, type ContentRepository, ContentService, type ContentService$1 as ContentServicePort, type Course, type CourseActivitiesReordered, type CourseActivityCreated, type CourseActivityDeleted, type CourseActivityPublished, type CourseActivityUpdated, type CourseCreated, type CourseDeleted, type CourseManagementService, type CourseModuleCreated, type CourseModuleDeleted, type CourseModuleUpdated, type CourseModulesReordered, type CourseSettings, type CourseStatus, type CourseUpdated, type CourseView, type CreateBundleInput, type CreateCommunityInput, type CreateCourseInput, type CreateDownloadInput, type CreateSpaceInput, type DigestSchedule, type DmSettings, type Download, type DownloadAsset, type DownloadCreated, type DownloadDeleted, type DownloadFile, type DownloadStatus, type DownloadUpdated, type DownloadView, type DownloadablesService, type ItemTitle, type ItemTitleAccess, type ItemTitles, type ListBundlesQuery, type ListCommunitiesQuery, type ListCoursesQuery, type ListDownloadsQuery, type Module, type Page, type PatchCommunitySettingsInput, type PatchDmSettingsInput, type ReorderDownloadAssetsInput, type SaveActivityInput, type SetSpaceTopicsInput, type Space, type SpaceAccessRule, type SpaceDetail, type SpaceLink, type SpaceRowLock, type SpaceTopic, type UpdateBundleInput, type UpdateCommunityInput, type UpdateCourseInput, type UpdateDownloadInput, type UpdateSpaceInput, activityTitle, contentEvents };
@@ -1,3 +1,5 @@
1
1
  import { contentEvents } from "./events.js";
2
2
  import { ContentService } from "./service.js";
3
- export { ContentService, contentEvents };
3
+ import { CommunityNotificationCategories } from "./notification-categories.js";
4
+ import { ContentItemTitles, activityTitle } from "./titles.js";
5
+ export { CommunityNotificationCategories, ContentItemTitles, ContentService, activityTitle, contentEvents };
@@ -1,3 +1,3 @@
1
- import { Activity, ActivityAsset, ActivitySettings, ActivityView, Bundle, BundleItem, Community, CommunitySettings, CommunityStatus, CommunityView, ContentItem, ContentType, Course, CourseSettings, CourseStatus, CourseView, DmSettings, Download, DownloadAsset, DownloadFile, DownloadStatus, DownloadView, Module, SaveActivityInput, Space, SpaceAccessRule, SpaceDetail, SpaceLink, SpaceSettings, SpaceTopic } from "../types/schemas/content.js";
1
+ import { Activity, ActivityAsset, ActivitySettings, ActivityView, Bundle, BundleItem, Community, CommunitySettings, CommunityStatus, CommunityView, ContentItem, ContentType, Course, CourseSettings, CourseStatus, CourseView, DigestSchedule, DmSettings, Download, DownloadAsset, DownloadFile, DownloadStatus, DownloadView, Module, SaveActivityInput, Space, SpaceAccessRule, SpaceDetail, SpaceLink, SpaceSettings, SpaceTopic } from "../types/schemas/content.js";
2
2
  import "../types/index.js";
3
- export type { Activity, ActivityAsset, ActivitySettings, ActivityView, Bundle, BundleItem, Community, CommunitySettings, CommunityStatus, CommunityView, ContentItem, ContentType, Course, CourseSettings, CourseStatus, CourseView, DmSettings, Download, DownloadAsset, DownloadFile, DownloadStatus, DownloadView, Module, SaveActivityInput, Space, SpaceAccessRule, SpaceDetail, SpaceLink, SpaceSettings, SpaceTopic };
3
+ export type { Activity, ActivityAsset, ActivitySettings, ActivityView, Bundle, BundleItem, Community, CommunitySettings, CommunityStatus, CommunityView, ContentItem, ContentType, Course, CourseSettings, CourseStatus, CourseView, DigestSchedule, DmSettings, Download, DownloadAsset, DownloadFile, DownloadStatus, DownloadView, Module, SaveActivityInput, Space, SpaceAccessRule, SpaceDetail, SpaceLink, SpaceSettings, SpaceTopic };
@@ -0,0 +1,36 @@
1
+ import { Logger } from "../types/ports.js";
2
+ import { NotificationCategory } from "../types/notifications.js";
3
+ import "../types/index.js";
4
+ import { ChannelRegistry, NotificationCategoryService, NotificationTypeRegistry } from "../shared/ports.js";
5
+ import { ContentRepository } from "./ports.js";
6
+ import { SettingsService } from "../shared/settings.js";
7
+ //#region src/content/notification-categories.d.ts
8
+ type CommunityNotificationCategoriesParams = {
9
+ communities: Pick<ContentRepository, 'findCommunityById'>;
10
+ settings: SettingsService;
11
+ types: NotificationTypeRegistry;
12
+ channels: ChannelRegistry;
13
+ logger?: Logger;
14
+ };
15
+ declare class CommunityNotificationCategories implements NotificationCategoryService {
16
+ private readonly communities;
17
+ private readonly settings;
18
+ private readonly types;
19
+ private readonly channels;
20
+ private readonly logger;
21
+ constructor(params: CommunityNotificationCategoriesParams);
22
+ get(orgId: string, communityId: string): Promise<{
23
+ categories: NotificationCategory[];
24
+ source: 'default' | 'stored';
25
+ }>;
26
+ replace(orgId: string, communityId: string, categories: NotificationCategory[]): Promise<{
27
+ categories: NotificationCategory[];
28
+ source: 'stored';
29
+ }>;
30
+ reset(orgId: string, communityId: string): Promise<void>;
31
+ defaults(): NotificationCategory[];
32
+ private assertCommunity;
33
+ }
34
+ //#endregion
35
+ export { CommunityNotificationCategories, CommunityNotificationCategoriesParams };
36
+ //# sourceMappingURL=notification-categories.d.ts.map