@headless-lms/server 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (228) hide show
  1. package/README.md +14 -0
  2. package/dist/app/community-mail.d.ts +10 -10
  3. package/dist/app/community-mail.js +72 -28
  4. package/dist/app/community-mail.js.map +1 -1
  5. package/dist/app/container.d.ts +48 -10
  6. package/dist/app/container.js +268 -48
  7. package/dist/app/container.js.map +1 -1
  8. package/dist/app/notification-channels.d.ts +47 -0
  9. package/dist/app/notification-channels.js +175 -0
  10. package/dist/app/notification-channels.js.map +1 -0
  11. package/dist/app/notification-reads.d.ts +23 -0
  12. package/dist/app/notification-reads.js +74 -0
  13. package/dist/app/notification-reads.js.map +1 -0
  14. package/dist/app/platform.d.ts +14 -0
  15. package/dist/app/platform.js +14 -0
  16. package/dist/app/platform.js.map +1 -0
  17. package/dist/http/config.d.ts +4 -0
  18. package/dist/http/errors.d.ts +1 -0
  19. package/dist/http/errors.js +24 -4
  20. package/dist/http/errors.js.map +1 -1
  21. package/dist/http/fastify.d.ts +8 -0
  22. package/dist/http/mcp/catalogue.d.ts +11 -9
  23. package/dist/http/mcp/catalogue.js +15 -21
  24. package/dist/http/mcp/catalogue.js.map +1 -1
  25. package/dist/http/mcp/challenge.js +3 -3
  26. package/dist/http/mcp/challenge.js.map +1 -1
  27. package/dist/http/mcp/route.js +7 -7
  28. package/dist/http/mcp/route.js.map +1 -1
  29. package/dist/http/mcp/test-support.d.ts +6 -5
  30. package/dist/http/mcp/test-support.js +32 -11
  31. package/dist/http/mcp/test-support.js.map +1 -1
  32. package/dist/http/mcp/tool.d.ts +3 -9
  33. package/dist/http/mcp/tool.js +14 -6
  34. package/dist/http/mcp/tool.js.map +1 -1
  35. package/dist/http/mcp/tools/automations.js +10 -20
  36. package/dist/http/mcp/tools/automations.js.map +1 -1
  37. package/dist/http/mcp/tools/catalog.js +25 -42
  38. package/dist/http/mcp/tools/catalog.js.map +1 -1
  39. package/dist/http/mcp/tools/comments.js +9 -19
  40. package/dist/http/mcp/tools/comments.js.map +1 -1
  41. package/dist/http/mcp/tools/communities.js +16 -31
  42. package/dist/http/mcp/tools/communities.js.map +1 -1
  43. package/dist/http/mcp/tools/community-members.js +9 -16
  44. package/dist/http/mcp/tools/community-members.js.map +1 -1
  45. package/dist/http/mcp/tools/community-moderation.js +13 -25
  46. package/dist/http/mcp/tools/community-moderation.js.map +1 -1
  47. package/dist/http/mcp/tools/courses.js +11 -21
  48. package/dist/http/mcp/tools/courses.js.map +1 -1
  49. package/dist/http/mcp/tools/events.d.ts +6 -0
  50. package/dist/http/mcp/tools/events.js +170 -0
  51. package/dist/http/mcp/tools/events.js.map +1 -0
  52. package/dist/http/mcp/tools/index.d.ts +5 -1
  53. package/dist/http/mcp/tools/index.js +45 -10
  54. package/dist/http/mcp/tools/index.js.map +1 -1
  55. package/dist/http/mcp/tools/organization.d.ts +6 -0
  56. package/dist/http/mcp/tools/organization.js +214 -0
  57. package/dist/http/mcp/tools/organization.js.map +1 -0
  58. package/dist/http/mcp/tools/people.js +30 -49
  59. package/dist/http/mcp/tools/people.js.map +1 -1
  60. package/dist/http/plugins/auth.js +37 -8
  61. package/dist/http/plugins/auth.js.map +1 -1
  62. package/dist/http/plugins/error-handler.d.ts +5 -1
  63. package/dist/http/plugins/error-handler.js +13 -3
  64. package/dist/http/plugins/error-handler.js.map +1 -1
  65. package/dist/http/plugins/openapi.js +18 -2
  66. package/dist/http/plugins/openapi.js.map +1 -1
  67. package/dist/http/plugins/platform.d.ts +7 -0
  68. package/dist/http/plugins/platform.js +13 -0
  69. package/dist/http/plugins/platform.js.map +1 -0
  70. package/dist/http/routes/access.js +54 -36
  71. package/dist/http/routes/access.js.map +1 -1
  72. package/dist/http/routes/activities.js +45 -45
  73. package/dist/http/routes/activities.js.map +1 -1
  74. package/dist/http/routes/assets.js +30 -65
  75. package/dist/http/routes/assets.js.map +1 -1
  76. package/dist/http/routes/automations.js +37 -42
  77. package/dist/http/routes/automations.js.map +1 -1
  78. package/dist/http/routes/bundles.js +33 -36
  79. package/dist/http/routes/bundles.js.map +1 -1
  80. package/dist/http/routes/communities.js +144 -136
  81. package/dist/http/routes/communities.js.map +1 -1
  82. package/dist/http/routes/community-moderation.js +83 -137
  83. package/dist/http/routes/community-moderation.js.map +1 -1
  84. package/dist/http/routes/course-analytics.js +32 -15
  85. package/dist/http/routes/course-analytics.js.map +1 -1
  86. package/dist/http/routes/courses.js +25 -32
  87. package/dist/http/routes/courses.js.map +1 -1
  88. package/dist/http/routes/dashboard.js +9 -9
  89. package/dist/http/routes/dashboard.js.map +1 -1
  90. package/dist/http/routes/discussion.js +21 -39
  91. package/dist/http/routes/discussion.js.map +1 -1
  92. package/dist/http/routes/downloads.js +41 -47
  93. package/dist/http/routes/downloads.js.map +1 -1
  94. package/dist/http/routes/entitlements.js +19 -23
  95. package/dist/http/routes/entitlements.js.map +1 -1
  96. package/dist/http/routes/events.d.ts +7 -0
  97. package/dist/http/routes/events.js +333 -0
  98. package/dist/http/routes/events.js.map +1 -0
  99. package/dist/http/routes/integrations.js +40 -73
  100. package/dist/http/routes/integrations.js.map +1 -1
  101. package/dist/http/routes/member/assets.js +10 -13
  102. package/dist/http/routes/member/assets.js.map +1 -1
  103. package/dist/http/routes/member/chats.js +177 -75
  104. package/dist/http/routes/member/chats.js.map +1 -1
  105. package/dist/http/routes/member/comments.js +65 -26
  106. package/dist/http/routes/member/comments.js.map +1 -1
  107. package/dist/http/routes/member/community.js +68 -51
  108. package/dist/http/routes/member/community.js.map +1 -1
  109. package/dist/http/routes/member/courses.js +12 -19
  110. package/dist/http/routes/member/courses.js.map +1 -1
  111. package/dist/http/routes/member/devices.d.ts +7 -0
  112. package/dist/http/routes/member/devices.js +97 -0
  113. package/dist/http/routes/member/devices.js.map +1 -0
  114. package/dist/http/routes/member/downloads.js +6 -9
  115. package/dist/http/routes/member/downloads.js.map +1 -1
  116. package/dist/http/routes/member/events.d.ts +7 -0
  117. package/dist/http/routes/member/events.js +386 -0
  118. package/dist/http/routes/member/events.js.map +1 -0
  119. package/dist/http/routes/member/files.js +71 -46
  120. package/dist/http/routes/member/files.js.map +1 -1
  121. package/dist/http/routes/member/index.js +6 -0
  122. package/dist/http/routes/member/index.js.map +1 -1
  123. package/dist/http/routes/member/notification-settings.d.ts +7 -0
  124. package/dist/http/routes/member/notification-settings.js +100 -0
  125. package/dist/http/routes/member/notification-settings.js.map +1 -0
  126. package/dist/http/routes/member/notifications.js +69 -45
  127. package/dist/http/routes/member/notifications.js.map +1 -1
  128. package/dist/http/routes/member/org.js +5 -15
  129. package/dist/http/routes/member/org.js.map +1 -1
  130. package/dist/http/routes/member/posts.js +94 -95
  131. package/dist/http/routes/member/posts.js.map +1 -1
  132. package/dist/http/routes/member/profile.js +15 -6
  133. package/dist/http/routes/member/profile.js.map +1 -1
  134. package/dist/http/routes/member/progress.js +7 -11
  135. package/dist/http/routes/member/progress.js.map +1 -1
  136. package/dist/http/routes/organizations.js +415 -110
  137. package/dist/http/routes/organizations.js.map +1 -1
  138. package/dist/http/routes/platform.d.ts +7 -0
  139. package/dist/http/routes/platform.js +61 -0
  140. package/dist/http/routes/platform.js.map +1 -0
  141. package/dist/http/routes/students.js +12 -75
  142. package/dist/http/routes/students.js.map +1 -1
  143. package/dist/http/routes/webhooks.js +30 -39
  144. package/dist/http/routes/webhooks.js.map +1 -1
  145. package/dist/http/routes.js +9 -0
  146. package/dist/http/routes.js.map +1 -1
  147. package/dist/http/schemas/access.d.ts +346 -64
  148. package/dist/http/schemas/access.js +39 -12
  149. package/dist/http/schemas/access.js.map +1 -1
  150. package/dist/http/schemas/assets.d.ts +13 -8
  151. package/dist/http/schemas/assets.js +6 -5
  152. package/dist/http/schemas/assets.js.map +1 -1
  153. package/dist/http/schemas/automations.d.ts +4 -8
  154. package/dist/http/schemas/chats.d.ts +238 -36
  155. package/dist/http/schemas/chats.js +14 -7
  156. package/dist/http/schemas/chats.js.map +1 -1
  157. package/dist/http/schemas/community.d.ts +140 -33
  158. package/dist/http/schemas/community.js +25 -9
  159. package/dist/http/schemas/community.js.map +1 -1
  160. package/dist/http/schemas/course-analytics.d.ts +51 -1
  161. package/dist/http/schemas/course-analytics.js +19 -1
  162. package/dist/http/schemas/course-analytics.js.map +1 -1
  163. package/dist/http/schemas/dashboard.d.ts +1 -0
  164. package/dist/http/schemas/dashboard.js +2 -1
  165. package/dist/http/schemas/dashboard.js.map +1 -1
  166. package/dist/http/schemas/discussion.d.ts +45 -73
  167. package/dist/http/schemas/discussion.js +16 -4
  168. package/dist/http/schemas/discussion.js.map +1 -1
  169. package/dist/http/schemas/entitlements.d.ts +9 -12
  170. package/dist/http/schemas/entitlements.js +11 -5
  171. package/dist/http/schemas/entitlements.js.map +1 -1
  172. package/dist/http/schemas/events.d.ts +527 -0
  173. package/dist/http/schemas/events.js +64 -0
  174. package/dist/http/schemas/events.js.map +1 -0
  175. package/dist/http/schemas/files.d.ts +15 -5
  176. package/dist/http/schemas/files.js +10 -2
  177. package/dist/http/schemas/files.js.map +1 -1
  178. package/dist/http/schemas/index.d.ts +14 -12
  179. package/dist/http/schemas/index.js +14 -12
  180. package/dist/http/schemas/invites.d.ts +3 -47
  181. package/dist/http/schemas/invites.js +4 -25
  182. package/dist/http/schemas/invites.js.map +1 -1
  183. package/dist/http/schemas/member.d.ts +94 -7
  184. package/dist/http/schemas/member.js +7 -3
  185. package/dist/http/schemas/member.js.map +1 -1
  186. package/dist/http/schemas/members.d.ts +329 -65
  187. package/dist/http/schemas/members.js +67 -25
  188. package/dist/http/schemas/members.js.map +1 -1
  189. package/dist/http/schemas/notifications.d.ts +502 -175
  190. package/dist/http/schemas/notifications.js +148 -28
  191. package/dist/http/schemas/notifications.js.map +1 -1
  192. package/dist/http/schemas/platform.d.ts +37 -0
  193. package/dist/http/schemas/platform.js +19 -0
  194. package/dist/http/schemas/platform.js.map +1 -0
  195. package/dist/http/schemas/posts.d.ts +92 -38
  196. package/dist/http/schemas/posts.js +4 -4
  197. package/dist/http/schemas/posts.js.map +1 -1
  198. package/dist/http/schemas/profile.d.ts +1 -1
  199. package/dist/http/schemas/shared.d.ts +10 -13
  200. package/dist/http/schemas/shared.js +3 -11
  201. package/dist/http/schemas/shared.js.map +1 -1
  202. package/dist/http/schemas/students.d.ts +22 -0
  203. package/dist/http/schemas/students.js +3 -1
  204. package/dist/http/schemas/students.js.map +1 -1
  205. package/dist/http/scope.d.ts +9 -12
  206. package/dist/http/scope.js +30 -35
  207. package/dist/http/scope.js.map +1 -1
  208. package/dist/http/server.js +9 -0
  209. package/dist/http/server.js.map +1 -1
  210. package/dist/http/shutdown.d.ts +11 -0
  211. package/dist/http/shutdown.js +40 -0
  212. package/dist/http/shutdown.js.map +1 -0
  213. package/dist/http/sse.d.ts +19 -0
  214. package/dist/http/sse.js +104 -0
  215. package/dist/http/sse.js.map +1 -0
  216. package/dist/http/test-caller.d.ts +13 -0
  217. package/dist/http/test-caller.js +14 -0
  218. package/dist/http/test-caller.js.map +1 -0
  219. package/dist/http/well-known.js +2 -2
  220. package/dist/http/well-known.js.map +1 -1
  221. package/dist/index.d.ts +5 -2
  222. package/dist/index.js +4 -2
  223. package/dist/index.js.map +1 -1
  224. package/dist/packages/server/package.js +1 -1
  225. package/package.json +7 -6
  226. package/dist/http/routes/member/actor.d.ts +0 -14
  227. package/dist/http/routes/member/actor.js +0 -11
  228. package/dist/http/routes/member/actor.js.map +0 -1
@@ -1,73 +1,75 @@
1
1
  import { z } from "zod";
2
2
  //#region src/http/schemas/notifications.d.ts
3
- declare const Notification: z.ZodObject<{
4
- orgId: z.ZodString;
5
- id: z.ZodString;
6
- userId: z.ZodString;
7
- kind: z.ZodEnum<{
8
- newPostInSpace: "newPostInSpace";
9
- newCommentOnPost: "newCommentOnPost";
10
- replyToYourComment: "replyToYourComment";
11
- yourPostWasPublished: "yourPostWasPublished";
12
- yourPostWasRemoved: "yourPostWasRemoved";
13
- yourCommentWasRemoved: "yourCommentWasRemoved";
14
- requestApproved: "requestApproved";
15
- requestDeclined: "requestDeclined";
16
- invitedToSpace: "invitedToSpace";
17
- newMessage: "newMessage";
18
- messageRequest: "messageRequest";
19
- addedToGroupChat: "addedToGroupChat";
20
- youAreNowAModerator: "youAreNowAModerator";
21
- membershipEndingSoon: "membershipEndingSoon";
22
- welcomeToCommunity: "welcomeToCommunity";
23
- postAwaitingReview: "postAwaitingReview";
24
- joinRequest: "joinRequest";
25
- somethingWasFlagged: "somethingWasFlagged";
26
- messageWasFlagged: "messageWasFlagged";
27
- }>;
28
- actorOrgUserId: z.ZodNullable<z.ZodString>;
29
- communityId: z.ZodNullable<z.ZodString>;
30
- spaceId: z.ZodNullable<z.ZodString>;
31
- postId: z.ZodNullable<z.ZodString>;
32
- commentId: z.ZodNullable<z.ZodString>;
33
- chatId: z.ZodNullable<z.ZodString>;
34
- messageId: z.ZodNullable<z.ZodString>;
35
- createdAt: z.ZodCoercedDate<unknown>;
36
- readAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
37
- }, z.core.$strict>;
38
3
  declare const NotificationIdParam: z.ZodObject<{
39
4
  notificationId: z.ZodString;
40
5
  }, z.core.$strip>;
6
+ declare const NotificationFilterQuery: z.ZodObject<{
7
+ scope: z.ZodOptional<z.ZodEnum<{
8
+ community: "community";
9
+ org: "org";
10
+ }>>;
11
+ communityId: z.ZodOptional<z.ZodString>;
12
+ includeOrg: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodBoolean>>;
13
+ category: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>>;
14
+ reason: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodType<"subject" | "post_author" | "comment_author" | "message_author" | "follower" | "thread_participant" | "mentioned" | "participant" | "space_member" | "community_member" | "course_member" | "event_member" | "moderator", string, z.core.$ZodTypeInternals<"subject" | "post_author" | "comment_author" | "message_author" | "follower" | "thread_participant" | "mentioned" | "participant" | "space_member" | "community_member" | "course_member" | "event_member" | "moderator", string>>>>>;
15
+ type: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>>;
16
+ unread: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodBoolean>>;
17
+ }, z.core.$strict>;
18
+ declare const NotificationListQuery: z.ZodObject<{
19
+ page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
20
+ pageSize: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
21
+ scope: z.ZodOptional<z.ZodEnum<{
22
+ community: "community";
23
+ org: "org";
24
+ }>>;
25
+ communityId: z.ZodOptional<z.ZodString>;
26
+ includeOrg: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodBoolean>>;
27
+ category: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>>;
28
+ reason: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodType<"subject" | "post_author" | "comment_author" | "message_author" | "follower" | "thread_participant" | "mentioned" | "participant" | "space_member" | "community_member" | "course_member" | "event_member" | "moderator", string, z.core.$ZodTypeInternals<"subject" | "post_author" | "comment_author" | "message_author" | "follower" | "thread_participant" | "mentioned" | "participant" | "space_member" | "community_member" | "course_member" | "event_member" | "moderator", string>>>>>;
29
+ type: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>>;
30
+ unread: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodBoolean>>;
31
+ }, z.core.$strict>;
41
32
  declare const NotificationView: z.ZodObject<{
42
33
  id: z.ZodString;
43
- kind: z.ZodEnum<{
44
- newPostInSpace: "newPostInSpace";
45
- newCommentOnPost: "newCommentOnPost";
46
- replyToYourComment: "replyToYourComment";
47
- yourPostWasPublished: "yourPostWasPublished";
48
- yourPostWasRemoved: "yourPostWasRemoved";
49
- yourCommentWasRemoved: "yourCommentWasRemoved";
50
- requestApproved: "requestApproved";
51
- requestDeclined: "requestDeclined";
52
- invitedToSpace: "invitedToSpace";
53
- newMessage: "newMessage";
54
- messageRequest: "messageRequest";
55
- addedToGroupChat: "addedToGroupChat";
56
- youAreNowAModerator: "youAreNowAModerator";
57
- membershipEndingSoon: "membershipEndingSoon";
58
- welcomeToCommunity: "welcomeToCommunity";
59
- postAwaitingReview: "postAwaitingReview";
60
- joinRequest: "joinRequest";
61
- somethingWasFlagged: "somethingWasFlagged";
62
- messageWasFlagged: "messageWasFlagged";
34
+ type: z.ZodString;
35
+ scope: z.ZodEnum<{
36
+ chat: "chat";
37
+ community: "community";
38
+ org: "org";
39
+ space: "space";
63
40
  }>;
64
- createdAt: z.ZodCoercedDate<unknown>;
65
- readAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
66
- actor: z.ZodNullable<z.ZodObject<{
67
- orgUserId: z.ZodString;
68
- displayName: z.ZodNullable<z.ZodString>;
69
- imageUrl: z.ZodNullable<z.ZodString>;
70
- }, z.core.$strip>>;
41
+ reasons: z.ZodArray<z.ZodEnum<{
42
+ subject: "subject";
43
+ post_author: "post_author";
44
+ comment_author: "comment_author";
45
+ message_author: "message_author";
46
+ follower: "follower";
47
+ thread_participant: "thread_participant";
48
+ mentioned: "mentioned";
49
+ participant: "participant";
50
+ space_member: "space_member";
51
+ community_member: "community_member";
52
+ course_member: "course_member";
53
+ event_member: "event_member";
54
+ moderator: "moderator";
55
+ }>>;
56
+ matchedReason: z.ZodEnum<{
57
+ subject: "subject";
58
+ post_author: "post_author";
59
+ comment_author: "comment_author";
60
+ message_author: "message_author";
61
+ follower: "follower";
62
+ thread_participant: "thread_participant";
63
+ mentioned: "mentioned";
64
+ participant: "participant";
65
+ space_member: "space_member";
66
+ community_member: "community_member";
67
+ course_member: "course_member";
68
+ event_member: "event_member";
69
+ moderator: "moderator";
70
+ }>;
71
+ category: z.ZodString;
72
+ display: z.ZodRecord<z.ZodString, z.ZodType<import("@headless-lms/core/types").JsonValue, unknown, z.core.$ZodTypeInternals<import("@headless-lms/core/types").JsonValue, unknown>>>;
71
73
  community: z.ZodNullable<z.ZodObject<{
72
74
  id: z.ZodString;
73
75
  title: z.ZodString;
@@ -76,48 +78,92 @@ declare const NotificationView: z.ZodObject<{
76
78
  id: z.ZodString;
77
79
  name: z.ZodString;
78
80
  }, z.core.$strip>>;
79
- post: z.ZodNullable<z.ZodObject<{
81
+ actor: z.ZodNullable<z.ZodObject<{
82
+ orgUserId: z.ZodString;
83
+ name: z.ZodNullable<z.ZodString>;
84
+ imageUrl: z.ZodNullable<z.ZodString>;
85
+ }, z.core.$strip>>;
86
+ subject: z.ZodNullable<z.ZodObject<{
87
+ type: z.ZodEnum<{
88
+ message: "message";
89
+ chat: "chat";
90
+ community: "community";
91
+ course: "course";
92
+ download: "download";
93
+ event: "event";
94
+ bundle: "bundle";
95
+ activity: "activity";
96
+ space: "space";
97
+ post: "post";
98
+ comment: "comment";
99
+ }>;
80
100
  id: z.ZodString;
81
- title: z.ZodString;
101
+ title: z.ZodOptional<z.ZodString>;
102
+ excerpt: z.ZodOptional<z.ZodString>;
82
103
  }, z.core.$strip>>;
83
- commentId: z.ZodNullable<z.ZodString>;
84
- chat: z.ZodNullable<z.ZodObject<{
104
+ parent: z.ZodNullable<z.ZodObject<{
105
+ type: z.ZodEnum<{
106
+ message: "message";
107
+ chat: "chat";
108
+ community: "community";
109
+ course: "course";
110
+ download: "download";
111
+ event: "event";
112
+ bundle: "bundle";
113
+ activity: "activity";
114
+ space: "space";
115
+ post: "post";
116
+ comment: "comment";
117
+ }>;
85
118
  id: z.ZodString;
86
- title: z.ZodString;
119
+ title: z.ZodOptional<z.ZodString>;
120
+ excerpt: z.ZodOptional<z.ZodString>;
87
121
  }, z.core.$strip>>;
88
- messageId: z.ZodNullable<z.ZodString>;
122
+ createdAt: z.ZodCoercedDate<unknown>;
123
+ readAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
89
124
  }, z.core.$strip>;
90
125
  declare const NotificationsPage: z.ZodObject<{
91
126
  rows: z.ZodArray<z.ZodObject<{
92
127
  id: z.ZodString;
93
- kind: z.ZodEnum<{
94
- newPostInSpace: "newPostInSpace";
95
- newCommentOnPost: "newCommentOnPost";
96
- replyToYourComment: "replyToYourComment";
97
- yourPostWasPublished: "yourPostWasPublished";
98
- yourPostWasRemoved: "yourPostWasRemoved";
99
- yourCommentWasRemoved: "yourCommentWasRemoved";
100
- requestApproved: "requestApproved";
101
- requestDeclined: "requestDeclined";
102
- invitedToSpace: "invitedToSpace";
103
- newMessage: "newMessage";
104
- messageRequest: "messageRequest";
105
- addedToGroupChat: "addedToGroupChat";
106
- youAreNowAModerator: "youAreNowAModerator";
107
- membershipEndingSoon: "membershipEndingSoon";
108
- welcomeToCommunity: "welcomeToCommunity";
109
- postAwaitingReview: "postAwaitingReview";
110
- joinRequest: "joinRequest";
111
- somethingWasFlagged: "somethingWasFlagged";
112
- messageWasFlagged: "messageWasFlagged";
128
+ type: z.ZodString;
129
+ scope: z.ZodEnum<{
130
+ chat: "chat";
131
+ community: "community";
132
+ org: "org";
133
+ space: "space";
113
134
  }>;
114
- createdAt: z.ZodCoercedDate<unknown>;
115
- readAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
116
- actor: z.ZodNullable<z.ZodObject<{
117
- orgUserId: z.ZodString;
118
- displayName: z.ZodNullable<z.ZodString>;
119
- imageUrl: z.ZodNullable<z.ZodString>;
120
- }, z.core.$strip>>;
135
+ reasons: z.ZodArray<z.ZodEnum<{
136
+ subject: "subject";
137
+ post_author: "post_author";
138
+ comment_author: "comment_author";
139
+ message_author: "message_author";
140
+ follower: "follower";
141
+ thread_participant: "thread_participant";
142
+ mentioned: "mentioned";
143
+ participant: "participant";
144
+ space_member: "space_member";
145
+ community_member: "community_member";
146
+ course_member: "course_member";
147
+ event_member: "event_member";
148
+ moderator: "moderator";
149
+ }>>;
150
+ matchedReason: z.ZodEnum<{
151
+ subject: "subject";
152
+ post_author: "post_author";
153
+ comment_author: "comment_author";
154
+ message_author: "message_author";
155
+ follower: "follower";
156
+ thread_participant: "thread_participant";
157
+ mentioned: "mentioned";
158
+ participant: "participant";
159
+ space_member: "space_member";
160
+ community_member: "community_member";
161
+ course_member: "course_member";
162
+ event_member: "event_member";
163
+ moderator: "moderator";
164
+ }>;
165
+ category: z.ZodString;
166
+ display: z.ZodRecord<z.ZodString, z.ZodType<import("@headless-lms/core/types").JsonValue, unknown, z.core.$ZodTypeInternals<import("@headless-lms/core/types").JsonValue, unknown>>>;
121
167
  community: z.ZodNullable<z.ZodObject<{
122
168
  id: z.ZodString;
123
169
  title: z.ZodString;
@@ -126,102 +172,383 @@ declare const NotificationsPage: z.ZodObject<{
126
172
  id: z.ZodString;
127
173
  name: z.ZodString;
128
174
  }, z.core.$strip>>;
129
- post: z.ZodNullable<z.ZodObject<{
175
+ actor: z.ZodNullable<z.ZodObject<{
176
+ orgUserId: z.ZodString;
177
+ name: z.ZodNullable<z.ZodString>;
178
+ imageUrl: z.ZodNullable<z.ZodString>;
179
+ }, z.core.$strip>>;
180
+ subject: z.ZodNullable<z.ZodObject<{
181
+ type: z.ZodEnum<{
182
+ message: "message";
183
+ chat: "chat";
184
+ community: "community";
185
+ course: "course";
186
+ download: "download";
187
+ event: "event";
188
+ bundle: "bundle";
189
+ activity: "activity";
190
+ space: "space";
191
+ post: "post";
192
+ comment: "comment";
193
+ }>;
130
194
  id: z.ZodString;
131
- title: z.ZodString;
195
+ title: z.ZodOptional<z.ZodString>;
196
+ excerpt: z.ZodOptional<z.ZodString>;
132
197
  }, z.core.$strip>>;
133
- commentId: z.ZodNullable<z.ZodString>;
134
- chat: z.ZodNullable<z.ZodObject<{
198
+ parent: z.ZodNullable<z.ZodObject<{
199
+ type: z.ZodEnum<{
200
+ message: "message";
201
+ chat: "chat";
202
+ community: "community";
203
+ course: "course";
204
+ download: "download";
205
+ event: "event";
206
+ bundle: "bundle";
207
+ activity: "activity";
208
+ space: "space";
209
+ post: "post";
210
+ comment: "comment";
211
+ }>;
135
212
  id: z.ZodString;
136
- title: z.ZodString;
213
+ title: z.ZodOptional<z.ZodString>;
214
+ excerpt: z.ZodOptional<z.ZodString>;
137
215
  }, z.core.$strip>>;
138
- messageId: z.ZodNullable<z.ZodString>;
216
+ createdAt: z.ZodCoercedDate<unknown>;
217
+ readAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
139
218
  }, z.core.$strip>>;
140
219
  total: z.ZodNumber;
141
220
  page: z.ZodNumber;
142
221
  pageSize: z.ZodNumber;
143
222
  unreadCount: z.ZodNumber;
144
223
  }, z.core.$strip>;
145
- declare const MarkedRead: z.ZodObject<{
146
- updated: z.ZodNumber;
224
+ declare const NotificationUnreadCounts: z.ZodObject<{
225
+ org: z.ZodNumber;
226
+ communities: z.ZodArray<z.ZodObject<{
227
+ communityId: z.ZodString;
228
+ unread: z.ZodNumber;
229
+ }, z.core.$strip>>;
147
230
  }, z.core.$strip>;
148
- declare const NotificationPreference: z.ZodObject<{
149
- kind: z.ZodEnum<{
150
- newPostInSpace: "newPostInSpace";
151
- newCommentOnPost: "newCommentOnPost";
152
- replyToYourComment: "replyToYourComment";
153
- yourPostWasPublished: "yourPostWasPublished";
154
- yourPostWasRemoved: "yourPostWasRemoved";
155
- yourCommentWasRemoved: "yourCommentWasRemoved";
156
- requestApproved: "requestApproved";
157
- requestDeclined: "requestDeclined";
158
- invitedToSpace: "invitedToSpace";
159
- newMessage: "newMessage";
160
- messageRequest: "messageRequest";
161
- addedToGroupChat: "addedToGroupChat";
162
- youAreNowAModerator: "youAreNowAModerator";
163
- membershipEndingSoon: "membershipEndingSoon";
164
- welcomeToCommunity: "welcomeToCommunity";
165
- postAwaitingReview: "postAwaitingReview";
166
- joinRequest: "joinRequest";
167
- somethingWasFlagged: "somethingWasFlagged";
168
- messageWasFlagged: "messageWasFlagged";
231
+ declare const NotificationCategory: z.ZodObject<{
232
+ key: z.ZodString;
233
+ covers: z.ZodArray<z.ZodObject<{
234
+ type: z.ZodString;
235
+ reasons: z.ZodArray<z.ZodEnum<{
236
+ subject: "subject";
237
+ post_author: "post_author";
238
+ comment_author: "comment_author";
239
+ message_author: "message_author";
240
+ follower: "follower";
241
+ thread_participant: "thread_participant";
242
+ mentioned: "mentioned";
243
+ participant: "participant";
244
+ space_member: "space_member";
245
+ community_member: "community_member";
246
+ course_member: "course_member";
247
+ event_member: "event_member";
248
+ moderator: "moderator";
249
+ }>>;
250
+ }, z.core.$strict>>;
251
+ channels: z.ZodRecord<z.ZodString, z.ZodObject<{
252
+ default: z.ZodBoolean;
253
+ locked: z.ZodBoolean;
254
+ }, z.core.$strict>>;
255
+ perSpace: z.ZodOptional<z.ZodBoolean>;
256
+ spaceDefaults: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodBoolean>>>;
257
+ }, z.core.$strict>;
258
+ declare const NotificationCategoryList: z.ZodObject<{
259
+ categories: z.ZodArray<z.ZodObject<{
260
+ key: z.ZodString;
261
+ covers: z.ZodArray<z.ZodObject<{
262
+ type: z.ZodString;
263
+ reasons: z.ZodArray<z.ZodEnum<{
264
+ subject: "subject";
265
+ post_author: "post_author";
266
+ comment_author: "comment_author";
267
+ message_author: "message_author";
268
+ follower: "follower";
269
+ thread_participant: "thread_participant";
270
+ mentioned: "mentioned";
271
+ participant: "participant";
272
+ space_member: "space_member";
273
+ community_member: "community_member";
274
+ course_member: "course_member";
275
+ event_member: "event_member";
276
+ moderator: "moderator";
277
+ }>>;
278
+ }, z.core.$strict>>;
279
+ channels: z.ZodRecord<z.ZodString, z.ZodObject<{
280
+ default: z.ZodBoolean;
281
+ locked: z.ZodBoolean;
282
+ }, z.core.$strict>>;
283
+ perSpace: z.ZodOptional<z.ZodBoolean>;
284
+ spaceDefaults: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodBoolean>>>;
285
+ }, z.core.$strict>>;
286
+ source: z.ZodEnum<{
287
+ default: "default";
288
+ stored: "stored";
169
289
  }>;
170
- inApp: z.ZodBoolean;
171
- email: z.ZodBoolean;
290
+ }, z.core.$strip>;
291
+ declare const ReplaceNotificationCategories: z.ZodObject<{
292
+ categories: z.ZodArray<z.ZodObject<{
293
+ key: z.ZodString;
294
+ covers: z.ZodArray<z.ZodObject<{
295
+ type: z.ZodString;
296
+ reasons: z.ZodArray<z.ZodEnum<{
297
+ subject: "subject";
298
+ post_author: "post_author";
299
+ comment_author: "comment_author";
300
+ message_author: "message_author";
301
+ follower: "follower";
302
+ thread_participant: "thread_participant";
303
+ mentioned: "mentioned";
304
+ participant: "participant";
305
+ space_member: "space_member";
306
+ community_member: "community_member";
307
+ course_member: "course_member";
308
+ event_member: "event_member";
309
+ moderator: "moderator";
310
+ }>>;
311
+ }, z.core.$strict>>;
312
+ channels: z.ZodRecord<z.ZodString, z.ZodObject<{
313
+ default: z.ZodBoolean;
314
+ locked: z.ZodBoolean;
315
+ }, z.core.$strict>>;
316
+ perSpace: z.ZodOptional<z.ZodBoolean>;
317
+ spaceDefaults: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodBoolean>>>;
318
+ }, z.core.$strict>>;
172
319
  }, z.core.$strict>;
173
- declare const NotificationPreferences: z.ZodArray<z.ZodObject<{
174
- kind: z.ZodEnum<{
175
- newPostInSpace: "newPostInSpace";
176
- newCommentOnPost: "newCommentOnPost";
177
- replyToYourComment: "replyToYourComment";
178
- yourPostWasPublished: "yourPostWasPublished";
179
- yourPostWasRemoved: "yourPostWasRemoved";
180
- yourCommentWasRemoved: "yourCommentWasRemoved";
181
- requestApproved: "requestApproved";
182
- requestDeclined: "requestDeclined";
183
- invitedToSpace: "invitedToSpace";
184
- newMessage: "newMessage";
185
- messageRequest: "messageRequest";
186
- addedToGroupChat: "addedToGroupChat";
187
- youAreNowAModerator: "youAreNowAModerator";
188
- membershipEndingSoon: "membershipEndingSoon";
189
- welcomeToCommunity: "welcomeToCommunity";
190
- postAwaitingReview: "postAwaitingReview";
191
- joinRequest: "joinRequest";
192
- somethingWasFlagged: "somethingWasFlagged";
193
- messageWasFlagged: "messageWasFlagged";
320
+ declare const NotificationCategoryDefaults: z.ZodObject<{
321
+ categories: z.ZodArray<z.ZodObject<{
322
+ key: z.ZodString;
323
+ covers: z.ZodArray<z.ZodObject<{
324
+ type: z.ZodString;
325
+ reasons: z.ZodArray<z.ZodEnum<{
326
+ subject: "subject";
327
+ post_author: "post_author";
328
+ comment_author: "comment_author";
329
+ message_author: "message_author";
330
+ follower: "follower";
331
+ thread_participant: "thread_participant";
332
+ mentioned: "mentioned";
333
+ participant: "participant";
334
+ space_member: "space_member";
335
+ community_member: "community_member";
336
+ course_member: "course_member";
337
+ event_member: "event_member";
338
+ moderator: "moderator";
339
+ }>>;
340
+ }, z.core.$strict>>;
341
+ channels: z.ZodRecord<z.ZodString, z.ZodObject<{
342
+ default: z.ZodBoolean;
343
+ locked: z.ZodBoolean;
344
+ }, z.core.$strict>>;
345
+ perSpace: z.ZodOptional<z.ZodBoolean>;
346
+ spaceDefaults: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodBoolean>>>;
347
+ }, z.core.$strict>>;
348
+ }, z.core.$strip>;
349
+ declare const NotificationListScopeQuery: z.ZodObject<{
350
+ scope: z.ZodEnum<{
351
+ community: "community";
352
+ org: "org";
194
353
  }>;
195
- inApp: z.ZodBoolean;
196
- email: z.ZodBoolean;
197
- }, z.core.$strict>>;
198
- declare const SetNotificationPreferences: z.ZodObject<{
199
- preferences: z.ZodArray<z.ZodObject<{
200
- kind: z.ZodEnum<{
201
- newPostInSpace: "newPostInSpace";
202
- newCommentOnPost: "newCommentOnPost";
203
- replyToYourComment: "replyToYourComment";
204
- yourPostWasPublished: "yourPostWasPublished";
205
- yourPostWasRemoved: "yourPostWasRemoved";
206
- yourCommentWasRemoved: "yourCommentWasRemoved";
207
- requestApproved: "requestApproved";
208
- requestDeclined: "requestDeclined";
209
- invitedToSpace: "invitedToSpace";
210
- newMessage: "newMessage";
211
- messageRequest: "messageRequest";
212
- addedToGroupChat: "addedToGroupChat";
213
- youAreNowAModerator: "youAreNowAModerator";
214
- membershipEndingSoon: "membershipEndingSoon";
215
- welcomeToCommunity: "welcomeToCommunity";
216
- postAwaitingReview: "postAwaitingReview";
217
- joinRequest: "joinRequest";
218
- somethingWasFlagged: "somethingWasFlagged";
219
- messageWasFlagged: "messageWasFlagged";
354
+ }, z.core.$strict>;
355
+ declare const NotificationTypeInfo: z.ZodObject<{
356
+ type: z.ZodString;
357
+ scopes: z.ZodArray<z.ZodEnum<{
358
+ chat: "chat";
359
+ community: "community";
360
+ org: "org";
361
+ space: "space";
362
+ }>>;
363
+ reasons: z.ZodArray<z.ZodEnum<{
364
+ subject: "subject";
365
+ post_author: "post_author";
366
+ comment_author: "comment_author";
367
+ message_author: "message_author";
368
+ follower: "follower";
369
+ thread_participant: "thread_participant";
370
+ mentioned: "mentioned";
371
+ participant: "participant";
372
+ space_member: "space_member";
373
+ community_member: "community_member";
374
+ course_member: "course_member";
375
+ event_member: "event_member";
376
+ moderator: "moderator";
377
+ }>>;
378
+ }, z.core.$strip>;
379
+ declare const NotificationTypeInfos: z.ZodArray<z.ZodObject<{
380
+ type: z.ZodString;
381
+ scopes: z.ZodArray<z.ZodEnum<{
382
+ chat: "chat";
383
+ community: "community";
384
+ org: "org";
385
+ space: "space";
386
+ }>>;
387
+ reasons: z.ZodArray<z.ZodEnum<{
388
+ subject: "subject";
389
+ post_author: "post_author";
390
+ comment_author: "comment_author";
391
+ message_author: "message_author";
392
+ follower: "follower";
393
+ thread_participant: "thread_participant";
394
+ mentioned: "mentioned";
395
+ participant: "participant";
396
+ space_member: "space_member";
397
+ community_member: "community_member";
398
+ course_member: "course_member";
399
+ event_member: "event_member";
400
+ moderator: "moderator";
401
+ }>>;
402
+ }, z.core.$strip>>;
403
+ declare const NotificationChannelInfos: z.ZodArray<z.ZodObject<{
404
+ channel: z.ZodString;
405
+ }, z.core.$strip>>;
406
+ declare const CommunityNotificationSettings: z.ZodObject<{
407
+ communityId: z.ZodString;
408
+ digest: z.ZodNullable<z.ZodObject<{
409
+ cadence: z.ZodEnum<{
410
+ daily: "daily";
411
+ weekly: "weekly";
220
412
  }>;
221
- inApp: z.ZodBoolean;
222
- email: z.ZodBoolean;
413
+ weekday: z.ZodNumber;
414
+ hour: z.ZodNumber;
415
+ timeZone: z.ZodString;
416
+ }, z.core.$strict>>;
417
+ categories: z.ZodArray<z.ZodObject<{
418
+ key: z.ZodString;
419
+ perSpace: z.ZodBoolean;
420
+ channels: z.ZodArray<z.ZodObject<{
421
+ channel: z.ZodString;
422
+ enabled: z.ZodBoolean;
423
+ default: z.ZodBoolean;
424
+ source: z.ZodEnum<{
425
+ locked: "locked";
426
+ default: "default";
427
+ community: "community";
428
+ space: "space";
429
+ spaceDefault: "spaceDefault";
430
+ }>;
431
+ locked: z.ZodBoolean;
432
+ }, z.core.$strip>>;
433
+ spaces: z.ZodOptional<z.ZodArray<z.ZodObject<{
434
+ spaceId: z.ZodString;
435
+ name: z.ZodString;
436
+ channels: z.ZodArray<z.ZodObject<{
437
+ channel: z.ZodString;
438
+ enabled: z.ZodBoolean;
439
+ default: z.ZodBoolean;
440
+ source: z.ZodEnum<{
441
+ locked: "locked";
442
+ default: "default";
443
+ community: "community";
444
+ space: "space";
445
+ spaceDefault: "spaceDefault";
446
+ }>;
447
+ locked: z.ZodBoolean;
448
+ }, z.core.$strip>>;
449
+ }, z.core.$strip>>>;
450
+ }, z.core.$strip>>;
451
+ }, z.core.$strip>;
452
+ declare const OrgNotificationSettings: z.ZodObject<{
453
+ categories: z.ZodArray<z.ZodObject<{
454
+ key: z.ZodString;
455
+ perSpace: z.ZodBoolean;
456
+ channels: z.ZodArray<z.ZodObject<{
457
+ channel: z.ZodString;
458
+ enabled: z.ZodBoolean;
459
+ default: z.ZodBoolean;
460
+ source: z.ZodEnum<{
461
+ locked: "locked";
462
+ default: "default";
463
+ community: "community";
464
+ space: "space";
465
+ spaceDefault: "spaceDefault";
466
+ }>;
467
+ locked: z.ZodBoolean;
468
+ }, z.core.$strip>>;
469
+ spaces: z.ZodOptional<z.ZodArray<z.ZodObject<{
470
+ spaceId: z.ZodString;
471
+ name: z.ZodString;
472
+ channels: z.ZodArray<z.ZodObject<{
473
+ channel: z.ZodString;
474
+ enabled: z.ZodBoolean;
475
+ default: z.ZodBoolean;
476
+ source: z.ZodEnum<{
477
+ locked: "locked";
478
+ default: "default";
479
+ community: "community";
480
+ space: "space";
481
+ spaceDefault: "spaceDefault";
482
+ }>;
483
+ locked: z.ZodBoolean;
484
+ }, z.core.$strip>>;
485
+ }, z.core.$strip>>>;
486
+ }, z.core.$strip>>;
487
+ }, z.core.$strip>;
488
+ declare const PatchNotificationSettings: z.ZodObject<{
489
+ settings: z.ZodArray<z.ZodObject<{
490
+ category: z.ZodString;
491
+ spaceId: z.ZodOptional<z.ZodString>;
492
+ channel: z.ZodString;
493
+ enabled: z.ZodNullable<z.ZodBoolean>;
223
494
  }, z.core.$strict>>;
224
495
  }, z.core.$strict>;
496
+ declare const Device: z.ZodObject<{
497
+ id: z.ZodString;
498
+ provider: z.ZodEnum<{
499
+ apns: "apns";
500
+ fcm: "fcm";
501
+ webpush: "webpush";
502
+ }>;
503
+ token: z.ZodString;
504
+ p256dh: z.ZodNullable<z.ZodString>;
505
+ auth: z.ZodNullable<z.ZodString>;
506
+ appId: z.ZodNullable<z.ZodString>;
507
+ environment: z.ZodNullable<z.ZodEnum<{
508
+ production: "production";
509
+ sandbox: "sandbox";
510
+ }>>;
511
+ }, z.core.$strip>;
512
+ declare const DeviceList: z.ZodArray<z.ZodObject<{
513
+ lastSeenAt: z.ZodCoercedDate<unknown>;
514
+ id: z.ZodString;
515
+ provider: z.ZodEnum<{
516
+ apns: "apns";
517
+ fcm: "fcm";
518
+ webpush: "webpush";
519
+ }>;
520
+ token: z.ZodString;
521
+ p256dh: z.ZodNullable<z.ZodString>;
522
+ auth: z.ZodNullable<z.ZodString>;
523
+ appId: z.ZodNullable<z.ZodString>;
524
+ environment: z.ZodNullable<z.ZodEnum<{
525
+ production: "production";
526
+ sandbox: "sandbox";
527
+ }>>;
528
+ }, z.core.$strip>>;
529
+ declare const DeviceIdParam: z.ZodObject<{
530
+ deviceId: z.ZodString;
531
+ }, z.core.$strip>;
532
+ declare const RegisterDevice: z.ZodObject<{
533
+ provider: z.ZodEnum<{
534
+ apns: "apns";
535
+ fcm: "fcm";
536
+ webpush: "webpush";
537
+ }>;
538
+ token: z.ZodString;
539
+ keys: z.ZodOptional<z.ZodObject<{
540
+ p256dh: z.ZodString;
541
+ auth: z.ZodString;
542
+ }, z.core.$strict>>;
543
+ appId: z.ZodOptional<z.ZodString>;
544
+ environment: z.ZodOptional<z.ZodEnum<{
545
+ production: "production";
546
+ sandbox: "sandbox";
547
+ }>>;
548
+ }, z.core.$strict>;
549
+ declare const PushConfigView: z.ZodObject<{
550
+ vapidPublicKey: z.ZodNullable<z.ZodString>;
551
+ }, z.core.$strip>;
225
552
  //#endregion
226
- export { MarkedRead, Notification, NotificationIdParam, NotificationPreference, NotificationPreferences, NotificationView, NotificationsPage, SetNotificationPreferences };
553
+ export { CommunityNotificationSettings, Device, DeviceIdParam, DeviceList, NotificationCategory, NotificationCategoryDefaults, NotificationCategoryList, NotificationChannelInfos, NotificationFilterQuery, NotificationIdParam, NotificationListQuery, NotificationListScopeQuery, NotificationTypeInfo, NotificationTypeInfos, NotificationUnreadCounts, NotificationView, NotificationsPage, OrgNotificationSettings, PatchNotificationSettings, PushConfigView, RegisterDevice, ReplaceNotificationCategories };
227
554
  //# sourceMappingURL=notifications.d.ts.map