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