@headless-lms/core 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/events.d.ts +27 -21
- package/dist/assets/file-urls.d.ts +11 -7
- package/dist/assets/file-urls.js +14 -4
- package/dist/assets/file-urls.js.map +1 -1
- package/dist/assets/index.d.ts +4 -4
- package/dist/assets/index.js +3 -3
- package/dist/assets/ports.d.ts +34 -15
- package/dist/assets/service.d.ts +30 -14
- package/dist/assets/service.js +230 -56
- package/dist/assets/service.js.map +1 -1
- package/dist/automations/actions.js.map +1 -1
- package/dist/automations/catalog.js +69 -4
- package/dist/automations/catalog.js.map +1 -1
- package/dist/automations/community-derivations.js +16 -16
- package/dist/automations/community-derivations.js.map +1 -1
- package/dist/automations/community-mail.d.ts +34 -4
- package/dist/automations/community-mail.js +32 -4
- package/dist/automations/community-mail.js.map +1 -1
- package/dist/automations/event-permissions.d.ts +12 -0
- package/dist/automations/event-permissions.js +38 -0
- package/dist/automations/event-permissions.js.map +1 -0
- package/dist/automations/index.d.ts +2 -1
- package/dist/automations/index.js +2 -1
- package/dist/automations/notifications/applicable.d.ts +8 -0
- package/dist/automations/notifications/applicable.js +12 -0
- package/dist/automations/notifications/applicable.js.map +1 -0
- package/dist/automations/notifications/debounce.js +1 -1
- package/dist/automations/notifications/debounce.js.map +1 -1
- package/dist/automations/notifications/defaults.js +33 -3
- package/dist/automations/notifications/defaults.js.map +1 -1
- package/dist/automations/notifications/processor.js +3 -3
- package/dist/automations/notifications/processor.js.map +1 -1
- package/dist/automations/notifications/rules/content.js +60 -3
- package/dist/automations/notifications/rules/content.js.map +1 -1
- package/dist/automations/notifications/rules/discussion.js +29 -29
- package/dist/automations/notifications/rules/discussion.js.map +1 -1
- package/dist/automations/notifications/rules/entitlements.js +36 -9
- package/dist/automations/notifications/rules/entitlements.js.map +1 -1
- package/dist/automations/notifications/rules/events.d.ts +9 -0
- package/dist/automations/notifications/rules/events.js +27 -0
- package/dist/automations/notifications/rules/events.js.map +1 -0
- package/dist/automations/notifications/rules/organizations.js +17 -10
- package/dist/automations/notifications/rules/organizations.js.map +1 -1
- package/dist/automations/notifications/rules/recipients.js +0 -1
- package/dist/automations/notifications/rules/recipients.js.map +1 -1
- package/dist/automations/notifications/service.d.ts +8 -6
- package/dist/automations/notifications/service.js +13 -13
- package/dist/automations/notifications/service.js.map +1 -1
- package/dist/automations/notifications/types.js +94 -7
- package/dist/automations/notifications/types.js.map +1 -1
- package/dist/automations/ports.d.ts +30 -31
- package/dist/automations/service.d.ts +20 -17
- package/dist/automations/service.js +91 -62
- package/dist/automations/service.js.map +1 -1
- package/dist/content/event-sight.d.ts +11 -0
- package/dist/content/event-sight.js +11 -0
- package/dist/content/event-sight.js.map +1 -0
- package/dist/content/events.d.ts +413 -72
- package/dist/content/events.js +34 -1
- package/dist/content/events.js.map +1 -1
- package/dist/content/index.d.ts +6 -4
- package/dist/content/index.js +3 -1
- package/dist/content/jobs.d.ts +16 -0
- package/dist/content/jobs.js +37 -0
- package/dist/content/jobs.js.map +1 -0
- package/dist/content/model.d.ts +2 -2
- package/dist/content/notification-categories.d.ts +5 -4
- package/dist/content/notification-categories.js +15 -6
- package/dist/content/notification-categories.js.map +1 -1
- package/dist/content/ports.d.ts +113 -68
- package/dist/content/service.d.ts +99 -67
- package/dist/content/service.js +680 -139
- package/dist/content/service.js.map +1 -1
- package/dist/content/titles.d.ts +6 -3
- package/dist/content/titles.js +37 -24
- package/dist/content/titles.js.map +1 -1
- package/dist/content/types.d.ts +2 -2
- package/dist/discussion/authors.d.ts +4 -2
- package/dist/discussion/authors.js +9 -5
- package/dist/discussion/authors.js.map +1 -1
- package/dist/discussion/chats.d.ts +56 -37
- package/dist/discussion/chats.js +393 -161
- package/dist/discussion/chats.js.map +1 -1
- package/dist/discussion/events.d.ts +77 -39
- package/dist/discussion/events.js +41 -3
- package/dist/discussion/events.js.map +1 -1
- package/dist/discussion/index.d.ts +8 -5
- package/dist/discussion/index.js +5 -3
- package/dist/discussion/live.d.ts +106 -0
- package/dist/discussion/live.js +642 -0
- package/dist/discussion/live.js.map +1 -0
- package/dist/discussion/mentions.js +2 -2
- package/dist/discussion/mentions.js.map +1 -1
- package/dist/discussion/ports.d.ts +182 -100
- package/dist/discussion/ports.js.map +1 -1
- package/dist/discussion/posts.d.ts +45 -39
- package/dist/discussion/posts.js +268 -154
- package/dist/discussion/posts.js.map +1 -1
- package/dist/discussion/rules.d.ts +18 -0
- package/dist/discussion/rules.js +22 -0
- package/dist/discussion/rules.js.map +1 -0
- package/dist/discussion/service.d.ts +37 -31
- package/dist/discussion/service.js +252 -188
- package/dist/discussion/service.js.map +1 -1
- package/dist/discussion/subscriptions.d.ts +8 -8
- package/dist/discussion/subscriptions.js +29 -13
- package/dist/discussion/subscriptions.js.map +1 -1
- package/dist/discussion/titles.d.ts +4 -2
- package/dist/discussion/titles.js +27 -13
- package/dist/discussion/titles.js.map +1 -1
- package/dist/entitlements/events.d.ts +20 -20
- package/dist/entitlements/index.d.ts +4 -4
- package/dist/entitlements/index.js +2 -2
- package/dist/entitlements/model.d.ts +2 -2
- package/dist/entitlements/ports.d.ts +65 -39
- package/dist/entitlements/rules.d.ts +3 -6
- package/dist/entitlements/rules.js +5 -10
- package/dist/entitlements/rules.js.map +1 -1
- package/dist/entitlements/service.d.ts +40 -28
- package/dist/entitlements/service.js +370 -163
- package/dist/entitlements/service.js.map +1 -1
- package/dist/identity/devices.d.ts +3 -3
- package/dist/identity/devices.js +7 -5
- package/dist/identity/devices.js.map +1 -1
- package/dist/identity/events.d.ts +2 -2
- package/dist/identity/index.d.ts +2 -2
- package/dist/identity/index.js +2 -2
- package/dist/identity/notification-settings.d.ts +1 -1
- package/dist/identity/notification-settings.js +3 -2
- package/dist/identity/notification-settings.js.map +1 -1
- package/dist/identity/ports.d.ts +7 -7
- package/dist/identity/service.d.ts +8 -7
- package/dist/identity/service.js +17 -13
- package/dist/identity/service.js.map +1 -1
- package/dist/integrations/events.d.ts +3 -3
- package/dist/integrations/ports.d.ts +9 -8
- package/dist/integrations/service.d.ts +9 -8
- package/dist/integrations/service.js +33 -16
- package/dist/integrations/service.js.map +1 -1
- package/dist/organizations/default-roles.d.ts +22 -0
- package/dist/organizations/default-roles.js +89 -0
- package/dist/organizations/default-roles.js.map +1 -0
- package/dist/organizations/effective-permissions.d.ts +45 -0
- package/dist/organizations/effective-permissions.js +113 -0
- package/dist/organizations/effective-permissions.js.map +1 -0
- package/dist/organizations/events.d.ts +320 -181
- package/dist/organizations/events.js +90 -18
- package/dist/organizations/events.js.map +1 -1
- package/dist/organizations/index.d.ts +14 -10
- package/dist/organizations/index.js +7 -3
- package/dist/organizations/members.d.ts +66 -8
- package/dist/organizations/members.js.map +1 -1
- package/dist/organizations/notification-catalog.d.ts +31 -0
- package/dist/organizations/notification-catalog.js +32 -0
- package/dist/organizations/notification-catalog.js.map +1 -0
- package/dist/organizations/notification-categories.d.ts +6 -4
- package/dist/organizations/notification-categories.js +25 -10
- package/dist/organizations/notification-categories.js.map +1 -1
- package/dist/organizations/org-roles.d.ts +33 -0
- package/dist/organizations/org-roles.js +49 -0
- package/dist/organizations/org-roles.js.map +1 -0
- package/dist/organizations/permissions.d.ts +311 -0
- package/dist/organizations/permissions.js +327 -0
- package/dist/organizations/permissions.js.map +1 -0
- package/dist/organizations/ports.d.ts +184 -65
- package/dist/organizations/service.d.ts +102 -35
- package/dist/organizations/service.js +1245 -328
- package/dist/organizations/service.js.map +1 -1
- package/dist/organizations/testing.d.ts +18 -0
- package/dist/organizations/testing.js +37 -0
- package/dist/organizations/testing.js.map +1 -0
- package/dist/organizations/types.d.ts +5 -16
- package/dist/progress/events.d.ts +14 -14
- package/dist/progress/index.d.ts +2 -2
- package/dist/progress/ports.d.ts +11 -3
- package/dist/progress/service.d.ts +6 -5
- package/dist/progress/service.js +23 -8
- package/dist/progress/service.js.map +1 -1
- package/dist/reporting/admin/index.d.ts +6 -4
- package/dist/reporting/admin/model.d.ts +36 -3
- package/dist/reporting/admin/ports.d.ts +39 -14
- package/dist/reporting/admin/service.d.ts +32 -11
- package/dist/reporting/admin/service.js +102 -18
- package/dist/reporting/admin/service.js.map +1 -1
- package/dist/reporting/events/index.d.ts +27 -0
- package/dist/reporting/events/index.js +20 -0
- package/dist/reporting/events/index.js.map +1 -0
- package/dist/reporting/member/calendar.d.ts +11 -0
- package/dist/reporting/member/calendar.js +75 -0
- package/dist/reporting/member/calendar.js.map +1 -0
- package/dist/reporting/member/index.d.ts +3 -2
- package/dist/reporting/member/model.d.ts +26 -5
- package/dist/reporting/member/ports.d.ts +48 -29
- package/dist/reporting/member/service.d.ts +56 -29
- package/dist/reporting/member/service.js +328 -113
- package/dist/reporting/member/service.js.map +1 -1
- package/dist/shared/actor.d.ts +22 -3
- package/dist/shared/errors.d.ts +2 -1
- package/dist/shared/errors.js +3 -1
- package/dist/shared/errors.js.map +1 -1
- package/dist/shared/id.d.ts +4 -0
- package/dist/shared/id.js +4 -0
- package/dist/shared/id.js.map +1 -1
- package/dist/shared/logger.d.ts +2 -1
- package/dist/shared/logger.js +10 -1
- package/dist/shared/logger.js.map +1 -1
- package/dist/shared/ports.d.ts +25 -5
- package/dist/types/content.d.ts +2 -2
- package/dist/types/discussion.d.ts +4 -5
- package/dist/types/email-templates.d.ts +22 -3
- package/dist/types/entitlements.d.ts +2 -2
- package/dist/types/identity.d.ts +13 -16
- package/dist/types/index.d.ts +9 -9
- package/dist/types/index.js +2 -1
- package/dist/types/notifications.d.ts +4 -4
- package/dist/types/organizations.d.ts +3 -2
- package/dist/types/ports.d.ts +8 -1
- package/dist/types/ports.js +7 -1
- package/dist/types/ports.js.map +1 -0
- package/dist/types/schemas/assets.d.ts +5 -5
- package/dist/types/schemas/assets.js +4 -3
- package/dist/types/schemas/assets.js.map +1 -1
- package/dist/types/schemas/content.d.ts +537 -13
- package/dist/types/schemas/content.js +201 -7
- package/dist/types/schemas/content.js.map +1 -1
- package/dist/types/schemas/discussion.d.ts +282 -59
- package/dist/types/schemas/discussion.js +77 -3
- package/dist/types/schemas/discussion.js.map +1 -1
- package/dist/types/schemas/entitlements.d.ts +14 -1
- package/dist/types/schemas/entitlements.js +11 -4
- package/dist/types/schemas/entitlements.js.map +1 -1
- package/dist/types/schemas/index.d.ts +5 -5
- package/dist/types/schemas/index.js +5 -5
- package/dist/types/schemas/notifications.d.ts +13 -12
- package/dist/types/schemas/notifications.js +3 -2
- package/dist/types/schemas/notifications.js.map +1 -1
- package/dist/types/schemas/organizations.d.ts +96 -60
- package/dist/types/schemas/organizations.js +78 -27
- package/dist/types/schemas/organizations.js.map +1 -1
- package/dist/types/schemas/progress.d.ts +3 -4
- package/dist/types/schemas/progress.js +0 -1
- package/dist/types/schemas/progress.js.map +1 -1
- package/package.json +1 -1
- package/dist/organizations/access-scopes.d.ts +0 -19
- package/dist/organizations/access-scopes.js +0 -89
- package/dist/organizations/access-scopes.js.map +0 -1
- package/dist/organizations/roles.d.ts +0 -19
- package/dist/organizations/roles.js +0 -82
- package/dist/organizations/roles.js.map +0 -1
|
@@ -54,13 +54,8 @@ declare const commentAuthorSchema: z.ZodObject<{
|
|
|
54
54
|
image: z.ZodNullable<z.ZodString>;
|
|
55
55
|
imageAssetId: z.ZodNullable<z.ZodString>;
|
|
56
56
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
admin: "admin";
|
|
60
|
-
instructor: "instructor";
|
|
61
|
-
moderator: "moderator";
|
|
62
|
-
student: "student";
|
|
63
|
-
}>;
|
|
57
|
+
team: z.ZodBoolean;
|
|
58
|
+
roleName: z.ZodNullable<z.ZodString>;
|
|
64
59
|
}, z.core.$strict>;
|
|
65
60
|
type CommentAuthor = z.infer<typeof commentAuthorSchema>;
|
|
66
61
|
declare const commentReactionSchema: z.ZodObject<{
|
|
@@ -132,13 +127,8 @@ declare const commentViewSchema: z.ZodObject<{
|
|
|
132
127
|
image: z.ZodNullable<z.ZodString>;
|
|
133
128
|
imageAssetId: z.ZodNullable<z.ZodString>;
|
|
134
129
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
admin: "admin";
|
|
138
|
-
instructor: "instructor";
|
|
139
|
-
moderator: "moderator";
|
|
140
|
-
student: "student";
|
|
141
|
-
}>;
|
|
130
|
+
team: z.ZodBoolean;
|
|
131
|
+
roleName: z.ZodNullable<z.ZodString>;
|
|
142
132
|
}, z.core.$strict>;
|
|
143
133
|
body: z.ZodNullable<z.ZodString>;
|
|
144
134
|
status: z.ZodEnum<{
|
|
@@ -155,13 +145,8 @@ declare const commentViewSchema: z.ZodObject<{
|
|
|
155
145
|
image: z.ZodNullable<z.ZodString>;
|
|
156
146
|
imageAssetId: z.ZodNullable<z.ZodString>;
|
|
157
147
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
admin: "admin";
|
|
161
|
-
instructor: "instructor";
|
|
162
|
-
moderator: "moderator";
|
|
163
|
-
student: "student";
|
|
164
|
-
}>;
|
|
148
|
+
team: z.ZodBoolean;
|
|
149
|
+
roleName: z.ZodNullable<z.ZodString>;
|
|
165
150
|
}, z.core.$strict>>;
|
|
166
151
|
reactions: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
167
152
|
viewerReaction: z.ZodOptional<z.ZodString>;
|
|
@@ -183,13 +168,8 @@ declare const commentReportSummarySchema: z.ZodObject<{
|
|
|
183
168
|
image: z.ZodNullable<z.ZodString>;
|
|
184
169
|
imageAssetId: z.ZodNullable<z.ZodString>;
|
|
185
170
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
admin: "admin";
|
|
189
|
-
instructor: "instructor";
|
|
190
|
-
moderator: "moderator";
|
|
191
|
-
student: "student";
|
|
192
|
-
}>;
|
|
171
|
+
team: z.ZodBoolean;
|
|
172
|
+
roleName: z.ZodNullable<z.ZodString>;
|
|
193
173
|
}, z.core.$strict>;
|
|
194
174
|
reason: z.ZodString;
|
|
195
175
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
@@ -216,13 +196,8 @@ declare const commentListItemSchema: z.ZodObject<{
|
|
|
216
196
|
image: z.ZodNullable<z.ZodString>;
|
|
217
197
|
imageAssetId: z.ZodNullable<z.ZodString>;
|
|
218
198
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
admin: "admin";
|
|
222
|
-
instructor: "instructor";
|
|
223
|
-
moderator: "moderator";
|
|
224
|
-
student: "student";
|
|
225
|
-
}>;
|
|
199
|
+
team: z.ZodBoolean;
|
|
200
|
+
roleName: z.ZodNullable<z.ZodString>;
|
|
226
201
|
}, z.core.$strict>;
|
|
227
202
|
authorEmail: z.ZodEmail;
|
|
228
203
|
removedBy: z.ZodNullable<z.ZodString>;
|
|
@@ -236,13 +211,8 @@ declare const commentListItemSchema: z.ZodObject<{
|
|
|
236
211
|
image: z.ZodNullable<z.ZodString>;
|
|
237
212
|
imageAssetId: z.ZodNullable<z.ZodString>;
|
|
238
213
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
admin: "admin";
|
|
242
|
-
instructor: "instructor";
|
|
243
|
-
moderator: "moderator";
|
|
244
|
-
student: "student";
|
|
245
|
-
}>;
|
|
214
|
+
team: z.ZodBoolean;
|
|
215
|
+
roleName: z.ZodNullable<z.ZodString>;
|
|
246
216
|
}, z.core.$strict>;
|
|
247
217
|
reason: z.ZodString;
|
|
248
218
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
@@ -268,9 +238,9 @@ declare const listCommentsQuerySchema: z.ZodObject<{
|
|
|
268
238
|
}, z.core.$strict>;
|
|
269
239
|
type ListCommentsQuery = z.infer<typeof listCommentsQuerySchema>;
|
|
270
240
|
declare const subscriptionItemTypeSchema: z.ZodEnum<{
|
|
271
|
-
post: "post";
|
|
272
241
|
space: "space";
|
|
273
242
|
chat: "chat";
|
|
243
|
+
post: "post";
|
|
274
244
|
}>;
|
|
275
245
|
type SubscriptionItemType = z.infer<typeof subscriptionItemTypeSchema>;
|
|
276
246
|
declare const subscriptionStateSchema: z.ZodEnum<{
|
|
@@ -282,9 +252,9 @@ declare const subscriptionSchema: z.ZodObject<{
|
|
|
282
252
|
orgId: z.ZodString;
|
|
283
253
|
orgUserId: z.ZodString;
|
|
284
254
|
itemType: z.ZodEnum<{
|
|
285
|
-
post: "post";
|
|
286
255
|
space: "space";
|
|
287
256
|
chat: "chat";
|
|
257
|
+
post: "post";
|
|
288
258
|
}>;
|
|
289
259
|
itemId: z.ZodString;
|
|
290
260
|
state: z.ZodEnum<{
|
|
@@ -339,6 +309,18 @@ declare const postSchema: z.ZodObject<{
|
|
|
339
309
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
340
310
|
}, z.core.$strict>;
|
|
341
311
|
type Post = z.output<typeof postSchema>;
|
|
312
|
+
declare const postAssetSchema: z.ZodObject<{
|
|
313
|
+
url: z.ZodString;
|
|
314
|
+
kind: z.ZodEnum<{
|
|
315
|
+
image: "image";
|
|
316
|
+
video: "video";
|
|
317
|
+
audio: "audio";
|
|
318
|
+
document: "document";
|
|
319
|
+
}>;
|
|
320
|
+
filename: z.ZodString;
|
|
321
|
+
size: z.ZodNumber;
|
|
322
|
+
}, z.core.$strict>;
|
|
323
|
+
type PostAsset = z.output<typeof postAssetSchema>;
|
|
342
324
|
declare const postViewSchema: z.ZodObject<{
|
|
343
325
|
orgId: z.ZodString;
|
|
344
326
|
id: z.ZodString;
|
|
@@ -366,6 +348,17 @@ declare const postViewSchema: z.ZodObject<{
|
|
|
366
348
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
367
349
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
368
350
|
coverUrl: z.ZodNullable<z.ZodString>;
|
|
351
|
+
assets: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
352
|
+
url: z.ZodString;
|
|
353
|
+
kind: z.ZodEnum<{
|
|
354
|
+
image: "image";
|
|
355
|
+
video: "video";
|
|
356
|
+
audio: "audio";
|
|
357
|
+
document: "document";
|
|
358
|
+
}>;
|
|
359
|
+
filename: z.ZodString;
|
|
360
|
+
size: z.ZodNumber;
|
|
361
|
+
}, z.core.$strict>>;
|
|
369
362
|
author: z.ZodObject<{
|
|
370
363
|
id: z.ZodString;
|
|
371
364
|
firstName: z.ZodNullable<z.ZodString>;
|
|
@@ -375,13 +368,8 @@ declare const postViewSchema: z.ZodObject<{
|
|
|
375
368
|
image: z.ZodNullable<z.ZodString>;
|
|
376
369
|
imageAssetId: z.ZodNullable<z.ZodString>;
|
|
377
370
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
admin: "admin";
|
|
381
|
-
instructor: "instructor";
|
|
382
|
-
moderator: "moderator";
|
|
383
|
-
student: "student";
|
|
384
|
-
}>;
|
|
371
|
+
team: z.ZodBoolean;
|
|
372
|
+
roleName: z.ZodNullable<z.ZodString>;
|
|
385
373
|
}, z.core.$strict>;
|
|
386
374
|
reactions: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
387
375
|
viewerReaction: z.ZodNullable<z.ZodString>;
|
|
@@ -427,6 +415,45 @@ declare const flaggedCommentSchema: z.ZodObject<{
|
|
|
427
415
|
}, z.core.$strict>;
|
|
428
416
|
}, z.core.$strict>;
|
|
429
417
|
type FlaggedComment = z.output<typeof flaggedCommentSchema>;
|
|
418
|
+
declare const flaggedCommentViewSchema: z.ZodObject<{
|
|
419
|
+
id: z.ZodString;
|
|
420
|
+
orgId: z.ZodString;
|
|
421
|
+
commentId: z.ZodString;
|
|
422
|
+
orgUserId: z.ZodString;
|
|
423
|
+
reason: z.ZodString;
|
|
424
|
+
resolvedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
425
|
+
resolution: z.ZodNullable<z.ZodEnum<{
|
|
426
|
+
removed: "removed";
|
|
427
|
+
dismissed: "dismissed";
|
|
428
|
+
}>>;
|
|
429
|
+
resolvedBy: z.ZodNullable<z.ZodString>;
|
|
430
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
431
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
432
|
+
comment: z.ZodObject<{
|
|
433
|
+
id: z.ZodString;
|
|
434
|
+
postId: z.ZodString;
|
|
435
|
+
body: z.ZodString;
|
|
436
|
+
orgUserId: z.ZodString;
|
|
437
|
+
status: z.ZodEnum<{
|
|
438
|
+
pending: "pending";
|
|
439
|
+
published: "published";
|
|
440
|
+
removed: "removed";
|
|
441
|
+
}>;
|
|
442
|
+
author: z.ZodObject<{
|
|
443
|
+
id: z.ZodString;
|
|
444
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
445
|
+
lastName: z.ZodNullable<z.ZodString>;
|
|
446
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
447
|
+
headline: z.ZodNullable<z.ZodString>;
|
|
448
|
+
image: z.ZodNullable<z.ZodString>;
|
|
449
|
+
imageAssetId: z.ZodNullable<z.ZodString>;
|
|
450
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
451
|
+
team: z.ZodBoolean;
|
|
452
|
+
roleName: z.ZodNullable<z.ZodString>;
|
|
453
|
+
}, z.core.$strict>;
|
|
454
|
+
}, z.core.$strict>;
|
|
455
|
+
}, z.core.$strict>;
|
|
456
|
+
type FlaggedCommentView = z.output<typeof flaggedCommentViewSchema>;
|
|
430
457
|
declare const postReactionSchema: z.ZodObject<{
|
|
431
458
|
orgId: z.ZodString;
|
|
432
459
|
postId: z.ZodString;
|
|
@@ -516,6 +543,7 @@ declare const messageSchema: z.ZodObject<{
|
|
|
516
543
|
orgUserId: z.ZodString;
|
|
517
544
|
body: z.ZodString;
|
|
518
545
|
replyToId: z.ZodNullable<z.ZodString>;
|
|
546
|
+
clientId: z.ZodNullable<z.ZodUUID>;
|
|
519
547
|
editedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
520
548
|
deletedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
521
549
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
@@ -535,6 +563,7 @@ declare const messageViewSchema: z.ZodObject<{
|
|
|
535
563
|
orgUserId: z.ZodString;
|
|
536
564
|
body: z.ZodString;
|
|
537
565
|
replyToId: z.ZodNullable<z.ZodString>;
|
|
566
|
+
clientId: z.ZodNullable<z.ZodUUID>;
|
|
538
567
|
editedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
539
568
|
deletedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
540
569
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
@@ -548,13 +577,8 @@ declare const messageViewSchema: z.ZodObject<{
|
|
|
548
577
|
image: z.ZodNullable<z.ZodString>;
|
|
549
578
|
imageAssetId: z.ZodNullable<z.ZodString>;
|
|
550
579
|
imageUrl: z.ZodNullable<z.ZodString>;
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
admin: "admin";
|
|
554
|
-
instructor: "instructor";
|
|
555
|
-
moderator: "moderator";
|
|
556
|
-
student: "student";
|
|
557
|
-
}>;
|
|
580
|
+
team: z.ZodBoolean;
|
|
581
|
+
roleName: z.ZodNullable<z.ZodString>;
|
|
558
582
|
}, z.core.$strict>;
|
|
559
583
|
attachments: z.ZodArray<z.ZodObject<{
|
|
560
584
|
assetId: z.ZodString;
|
|
@@ -568,6 +592,47 @@ declare const messageViewSchema: z.ZodObject<{
|
|
|
568
592
|
}, z.core.$strict>>;
|
|
569
593
|
}, z.core.$strict>;
|
|
570
594
|
type MessageView = z.output<typeof messageViewSchema>;
|
|
595
|
+
declare const liveMessageSchema: z.ZodObject<{
|
|
596
|
+
orgId: z.ZodString;
|
|
597
|
+
id: z.ZodString;
|
|
598
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
599
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
600
|
+
reactions: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
601
|
+
communityId: z.ZodString;
|
|
602
|
+
orgUserId: z.ZodString;
|
|
603
|
+
body: z.ZodString;
|
|
604
|
+
chatId: z.ZodString;
|
|
605
|
+
replyToId: z.ZodNullable<z.ZodString>;
|
|
606
|
+
clientId: z.ZodNullable<z.ZodUUID>;
|
|
607
|
+
editedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
608
|
+
deletedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
609
|
+
mentions: z.ZodArray<z.ZodObject<{
|
|
610
|
+
orgUserId: z.ZodString;
|
|
611
|
+
name: z.ZodString;
|
|
612
|
+
}, z.core.$strict>>;
|
|
613
|
+
sender: z.ZodObject<{
|
|
614
|
+
id: z.ZodString;
|
|
615
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
616
|
+
lastName: z.ZodNullable<z.ZodString>;
|
|
617
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
618
|
+
headline: z.ZodNullable<z.ZodString>;
|
|
619
|
+
image: z.ZodNullable<z.ZodString>;
|
|
620
|
+
imageAssetId: z.ZodNullable<z.ZodString>;
|
|
621
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
622
|
+
team: z.ZodBoolean;
|
|
623
|
+
roleName: z.ZodNullable<z.ZodString>;
|
|
624
|
+
}, z.core.$strict>;
|
|
625
|
+
attachments: z.ZodArray<z.ZodObject<{
|
|
626
|
+
assetId: z.ZodString;
|
|
627
|
+
url: z.ZodString;
|
|
628
|
+
}, z.core.$strict>>;
|
|
629
|
+
}, z.core.$strict>;
|
|
630
|
+
type LiveMessage = z.output<typeof liveMessageSchema>;
|
|
631
|
+
declare const chatUnreadSummarySchema: z.ZodObject<{
|
|
632
|
+
unread: z.ZodNumber;
|
|
633
|
+
requests: z.ZodNumber;
|
|
634
|
+
}, z.core.$strict>;
|
|
635
|
+
type ChatUnreadSummary = z.output<typeof chatUnreadSummarySchema>;
|
|
571
636
|
declare const chatLastMessageSchema: z.ZodObject<{
|
|
572
637
|
id: z.ZodString;
|
|
573
638
|
orgUserId: z.ZodString;
|
|
@@ -635,6 +700,164 @@ declare const digestRunSchema: z.ZodObject<{
|
|
|
635
700
|
lastDueAt: z.ZodCoercedDate<unknown>;
|
|
636
701
|
}, z.core.$strict>;
|
|
637
702
|
type DigestRun = z.output<typeof digestRunSchema>;
|
|
703
|
+
declare const chatLiveEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
704
|
+
type: z.ZodLiteral<"ready">;
|
|
705
|
+
heartbeatMs: z.ZodNumber;
|
|
706
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
707
|
+
type: z.ZodLiteral<"message.created">;
|
|
708
|
+
chatId: z.ZodString;
|
|
709
|
+
message: z.ZodObject<{
|
|
710
|
+
orgId: z.ZodString;
|
|
711
|
+
id: z.ZodString;
|
|
712
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
713
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
714
|
+
reactions: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
715
|
+
communityId: z.ZodString;
|
|
716
|
+
orgUserId: z.ZodString;
|
|
717
|
+
body: z.ZodString;
|
|
718
|
+
chatId: z.ZodString;
|
|
719
|
+
replyToId: z.ZodNullable<z.ZodString>;
|
|
720
|
+
clientId: z.ZodNullable<z.ZodUUID>;
|
|
721
|
+
editedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
722
|
+
deletedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
723
|
+
mentions: z.ZodArray<z.ZodObject<{
|
|
724
|
+
orgUserId: z.ZodString;
|
|
725
|
+
name: z.ZodString;
|
|
726
|
+
}, z.core.$strict>>;
|
|
727
|
+
sender: z.ZodObject<{
|
|
728
|
+
id: z.ZodString;
|
|
729
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
730
|
+
lastName: z.ZodNullable<z.ZodString>;
|
|
731
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
732
|
+
headline: z.ZodNullable<z.ZodString>;
|
|
733
|
+
image: z.ZodNullable<z.ZodString>;
|
|
734
|
+
imageAssetId: z.ZodNullable<z.ZodString>;
|
|
735
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
736
|
+
team: z.ZodBoolean;
|
|
737
|
+
roleName: z.ZodNullable<z.ZodString>;
|
|
738
|
+
}, z.core.$strict>;
|
|
739
|
+
attachments: z.ZodArray<z.ZodObject<{
|
|
740
|
+
assetId: z.ZodString;
|
|
741
|
+
url: z.ZodString;
|
|
742
|
+
}, z.core.$strict>>;
|
|
743
|
+
}, z.core.$strict>;
|
|
744
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
745
|
+
type: z.ZodLiteral<"message.updated">;
|
|
746
|
+
chatId: z.ZodString;
|
|
747
|
+
message: z.ZodObject<{
|
|
748
|
+
orgId: z.ZodString;
|
|
749
|
+
id: z.ZodString;
|
|
750
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
751
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
752
|
+
reactions: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
753
|
+
communityId: z.ZodString;
|
|
754
|
+
orgUserId: z.ZodString;
|
|
755
|
+
body: z.ZodString;
|
|
756
|
+
chatId: z.ZodString;
|
|
757
|
+
replyToId: z.ZodNullable<z.ZodString>;
|
|
758
|
+
clientId: z.ZodNullable<z.ZodUUID>;
|
|
759
|
+
editedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
760
|
+
deletedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
761
|
+
mentions: z.ZodArray<z.ZodObject<{
|
|
762
|
+
orgUserId: z.ZodString;
|
|
763
|
+
name: z.ZodString;
|
|
764
|
+
}, z.core.$strict>>;
|
|
765
|
+
sender: z.ZodObject<{
|
|
766
|
+
id: z.ZodString;
|
|
767
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
768
|
+
lastName: z.ZodNullable<z.ZodString>;
|
|
769
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
770
|
+
headline: z.ZodNullable<z.ZodString>;
|
|
771
|
+
image: z.ZodNullable<z.ZodString>;
|
|
772
|
+
imageAssetId: z.ZodNullable<z.ZodString>;
|
|
773
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
774
|
+
team: z.ZodBoolean;
|
|
775
|
+
roleName: z.ZodNullable<z.ZodString>;
|
|
776
|
+
}, z.core.$strict>;
|
|
777
|
+
attachments: z.ZodArray<z.ZodObject<{
|
|
778
|
+
assetId: z.ZodString;
|
|
779
|
+
url: z.ZodString;
|
|
780
|
+
}, z.core.$strict>>;
|
|
781
|
+
}, z.core.$strict>;
|
|
782
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
783
|
+
type: z.ZodLiteral<"message.deleted">;
|
|
784
|
+
chatId: z.ZodString;
|
|
785
|
+
messageId: z.ZodString;
|
|
786
|
+
deletedAt: z.ZodCoercedDate<unknown>;
|
|
787
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
788
|
+
type: z.ZodLiteral<"message.reactions">;
|
|
789
|
+
chatId: z.ZodString;
|
|
790
|
+
messageId: z.ZodString;
|
|
791
|
+
reactions: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
792
|
+
orgUserId: z.ZodString;
|
|
793
|
+
reaction: z.ZodNullable<z.ZodString>;
|
|
794
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
795
|
+
type: z.ZodLiteral<"chat.updated">;
|
|
796
|
+
chatId: z.ZodString;
|
|
797
|
+
chat: z.ZodObject<{
|
|
798
|
+
orgId: z.ZodString;
|
|
799
|
+
id: z.ZodString;
|
|
800
|
+
communityId: z.ZodString;
|
|
801
|
+
kind: z.ZodEnum<{
|
|
802
|
+
direct: "direct";
|
|
803
|
+
group: "group";
|
|
804
|
+
}>;
|
|
805
|
+
status: z.ZodEnum<{
|
|
806
|
+
pending: "pending";
|
|
807
|
+
open: "open";
|
|
808
|
+
closed: "closed";
|
|
809
|
+
}>;
|
|
810
|
+
createdBy: z.ZodNullable<z.ZodString>;
|
|
811
|
+
lockedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
812
|
+
lockedBy: z.ZodNullable<z.ZodString>;
|
|
813
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
814
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
815
|
+
}, z.core.$strict>;
|
|
816
|
+
participants: z.ZodArray<z.ZodObject<{
|
|
817
|
+
id: z.ZodString;
|
|
818
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
819
|
+
lastName: z.ZodNullable<z.ZodString>;
|
|
820
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
821
|
+
headline: z.ZodNullable<z.ZodString>;
|
|
822
|
+
image: z.ZodNullable<z.ZodString>;
|
|
823
|
+
imageAssetId: z.ZodNullable<z.ZodString>;
|
|
824
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
825
|
+
team: z.ZodBoolean;
|
|
826
|
+
roleName: z.ZodNullable<z.ZodString>;
|
|
827
|
+
}, z.core.$strict>>;
|
|
828
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
829
|
+
type: z.ZodLiteral<"chat.removed">;
|
|
830
|
+
chatId: z.ZodString;
|
|
831
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
832
|
+
type: z.ZodLiteral<"chat.state">;
|
|
833
|
+
chatId: z.ZodString;
|
|
834
|
+
unread: z.ZodNumber;
|
|
835
|
+
lastReadMessageId: z.ZodNullable<z.ZodString>;
|
|
836
|
+
subscription: z.ZodNullable<z.ZodObject<{
|
|
837
|
+
state: z.ZodEnum<{
|
|
838
|
+
following: "following";
|
|
839
|
+
muted: "muted";
|
|
840
|
+
}>;
|
|
841
|
+
mutedUntil: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
842
|
+
}, z.core.$strict>>;
|
|
843
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
844
|
+
unread: z.ZodNumber;
|
|
845
|
+
requests: z.ZodNumber;
|
|
846
|
+
type: z.ZodLiteral<"unread">;
|
|
847
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
848
|
+
type: z.ZodLiteral<"typing">;
|
|
849
|
+
chatId: z.ZodString;
|
|
850
|
+
orgUserId: z.ZodString;
|
|
851
|
+
until: z.ZodCoercedDate<unknown>;
|
|
852
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
853
|
+
type: z.ZodLiteral<"resync">;
|
|
854
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
855
|
+
type: z.ZodLiteral<"closed">;
|
|
856
|
+
reason: z.ZodEnum<{
|
|
857
|
+
shutdown: "shutdown";
|
|
858
|
+
}>;
|
|
859
|
+
}, z.core.$strict>], "type">;
|
|
860
|
+
type ChatLiveEvent = z.output<typeof chatLiveEventSchema>;
|
|
638
861
|
//#endregion
|
|
639
|
-
export { ActivityCommentsRule, BlockedUser, Chat, ChatKind, ChatLastMessage, ChatStatus, ChatUser, Comment, CommentAuthor, CommentFlagResolution, CommentInput, CommentListItem, CommentReaction, CommentReport, CommentReportInput, CommentReportSummary, CommentSettings, CommentStatus, CommentView, CommentsConfig, DigestRun, FlaggedComment, ListCommentsQuery, Mention, MentionItemType, MentionView, Message, MessageAttachment, MessageFile, MessageFlag, MessageFlagResolution, MessageReaction, MessageView, Post, PostBookmark, PostFlag, PostFlagResolution, PostReaction, PostStatus, PostView, ReactionCounts, ReactionEmoji, Subscription, SubscriptionItemType, SubscriptionState, SubscriptionView, activityCommentsRuleSchema, blockedUserSchema, chatKindSchema, chatLastMessageSchema, chatSchema, chatStatusSchema, chatUserSchema, commentAuthorSchema, commentFlagResolutionSchema, commentListItemSchema, commentReactionSchema, commentReportSchema, commentReportSummarySchema, commentSchema, commentSettingsSchema, commentStatusSchema, commentViewSchema, digestRunSchema, flaggedCommentSchema, listCommentsQuerySchema, mentionItemTypeSchema, mentionSchema, mentionViewSchema, messageAttachmentSchema, messageFileSchema, messageFlagResolutionSchema, messageFlagSchema, messageReactionSchema, messageSchema, messageViewSchema, postBookmarkSchema, postFlagResolutionSchema, postFlagSchema, postReactionSchema, postSchema, postStatusSchema, postViewSchema, reactionCountsSchema, reactionEmojiSchema, subscriptionItemTypeSchema, subscriptionSchema, subscriptionStateSchema, subscriptionViewSchema };
|
|
862
|
+
export { ActivityCommentsRule, BlockedUser, Chat, ChatKind, ChatLastMessage, ChatLiveEvent, ChatStatus, ChatUnreadSummary, ChatUser, Comment, CommentAuthor, CommentFlagResolution, CommentInput, CommentListItem, CommentReaction, CommentReport, CommentReportInput, CommentReportSummary, CommentSettings, CommentStatus, CommentView, CommentsConfig, DigestRun, FlaggedComment, FlaggedCommentView, ListCommentsQuery, LiveMessage, Mention, MentionItemType, MentionView, Message, MessageAttachment, MessageFile, MessageFlag, MessageFlagResolution, MessageReaction, MessageView, Post, PostAsset, PostBookmark, PostFlag, PostFlagResolution, PostReaction, PostStatus, PostView, ReactionCounts, ReactionEmoji, Subscription, SubscriptionItemType, SubscriptionState, SubscriptionView, activityCommentsRuleSchema, blockedUserSchema, chatKindSchema, chatLastMessageSchema, chatLiveEventSchema, chatSchema, chatStatusSchema, chatUnreadSummarySchema, chatUserSchema, commentAuthorSchema, commentFlagResolutionSchema, commentListItemSchema, commentReactionSchema, commentReportSchema, commentReportSummarySchema, commentSchema, commentSettingsSchema, commentStatusSchema, commentViewSchema, digestRunSchema, flaggedCommentSchema, flaggedCommentViewSchema, listCommentsQuerySchema, liveMessageSchema, mentionItemTypeSchema, mentionSchema, mentionViewSchema, messageAttachmentSchema, messageFileSchema, messageFlagResolutionSchema, messageFlagSchema, messageReactionSchema, messageSchema, messageViewSchema, postAssetSchema, postBookmarkSchema, postFlagResolutionSchema, postFlagSchema, postReactionSchema, postSchema, postStatusSchema, postViewSchema, reactionCountsSchema, reactionEmojiSchema, subscriptionItemTypeSchema, subscriptionSchema, subscriptionStateSchema, subscriptionViewSchema };
|
|
640
863
|
//# sourceMappingURL=discussion.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { emailSchema, idSchema, jsonValueSchema } from "./shared.js";
|
|
2
|
-
import {
|
|
2
|
+
import { assetKindSchema } from "./assets.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/types/schemas/discussion.ts
|
|
5
5
|
const commentStatusSchema = z.enum([
|
|
@@ -43,7 +43,8 @@ const commentAuthorSchema = z.object({
|
|
|
43
43
|
image: z.string().nullable(),
|
|
44
44
|
imageAssetId: idSchema.nullable(),
|
|
45
45
|
imageUrl: z.string().nullable(),
|
|
46
|
-
|
|
46
|
+
team: z.boolean(),
|
|
47
|
+
roleName: z.string().nullable()
|
|
47
48
|
}).strict();
|
|
48
49
|
const commentReactionSchema = z.object({
|
|
49
50
|
orgId: idSchema,
|
|
@@ -176,8 +177,15 @@ const postSchema = z.object({
|
|
|
176
177
|
createdAt: z.coerce.date(),
|
|
177
178
|
updatedAt: z.coerce.date()
|
|
178
179
|
}).strict();
|
|
180
|
+
const postAssetSchema = z.object({
|
|
181
|
+
url: z.string(),
|
|
182
|
+
kind: assetKindSchema,
|
|
183
|
+
filename: z.string(),
|
|
184
|
+
size: z.number().int().min(0)
|
|
185
|
+
}).strict();
|
|
179
186
|
const postViewSchema = postSchema.extend({
|
|
180
187
|
coverUrl: z.string().nullable(),
|
|
188
|
+
assets: z.record(idSchema, postAssetSchema),
|
|
181
189
|
author: commentAuthorSchema,
|
|
182
190
|
reactions: reactionCountsSchema,
|
|
183
191
|
viewerReaction: reactionEmojiSchema.nullable(),
|
|
@@ -193,6 +201,7 @@ const flaggedCommentSchema = commentReportSchema.extend({ comment: z.object({
|
|
|
193
201
|
orgUserId: idSchema,
|
|
194
202
|
status: commentStatusSchema
|
|
195
203
|
}).strict() }).strict();
|
|
204
|
+
const flaggedCommentViewSchema = commentReportSchema.extend({ comment: flaggedCommentSchema.shape.comment.extend({ author: commentAuthorSchema }).strict() }).strict();
|
|
196
205
|
const postReactionSchema = z.object({
|
|
197
206
|
orgId: idSchema,
|
|
198
207
|
postId: idSchema,
|
|
@@ -258,6 +267,7 @@ const messageSchema = z.object({
|
|
|
258
267
|
orgUserId: idSchema,
|
|
259
268
|
body: z.string(),
|
|
260
269
|
replyToId: idSchema.nullable(),
|
|
270
|
+
clientId: z.uuid().nullable(),
|
|
261
271
|
editedAt: z.coerce.date().nullable(),
|
|
262
272
|
deletedAt: z.coerce.date().nullable(),
|
|
263
273
|
createdAt: z.coerce.date(),
|
|
@@ -274,6 +284,11 @@ const messageViewSchema = messageSchema.extend({
|
|
|
274
284
|
viewerReaction: reactionEmojiSchema.nullable(),
|
|
275
285
|
mentions: z.array(mentionViewSchema)
|
|
276
286
|
}).strict();
|
|
287
|
+
const liveMessageSchema = messageViewSchema.omit({ viewerReaction: true });
|
|
288
|
+
const chatUnreadSummarySchema = z.object({
|
|
289
|
+
unread: z.number().int().min(0),
|
|
290
|
+
requests: z.number().int().min(0)
|
|
291
|
+
}).strict();
|
|
277
292
|
const chatLastMessageSchema = z.object({
|
|
278
293
|
id: idSchema,
|
|
279
294
|
orgUserId: idSchema,
|
|
@@ -330,7 +345,66 @@ const digestRunSchema = z.object({
|
|
|
330
345
|
communityId: idSchema,
|
|
331
346
|
lastDueAt: z.coerce.date()
|
|
332
347
|
}).strict();
|
|
348
|
+
const chatLiveEventSchema = z.discriminatedUnion("type", [
|
|
349
|
+
z.object({
|
|
350
|
+
type: z.literal("ready"),
|
|
351
|
+
heartbeatMs: z.number().int()
|
|
352
|
+
}).strict(),
|
|
353
|
+
z.object({
|
|
354
|
+
type: z.literal("message.created"),
|
|
355
|
+
chatId: idSchema,
|
|
356
|
+
message: liveMessageSchema
|
|
357
|
+
}).strict(),
|
|
358
|
+
z.object({
|
|
359
|
+
type: z.literal("message.updated"),
|
|
360
|
+
chatId: idSchema,
|
|
361
|
+
message: liveMessageSchema
|
|
362
|
+
}).strict(),
|
|
363
|
+
z.object({
|
|
364
|
+
type: z.literal("message.deleted"),
|
|
365
|
+
chatId: idSchema,
|
|
366
|
+
messageId: idSchema,
|
|
367
|
+
deletedAt: z.coerce.date()
|
|
368
|
+
}).strict(),
|
|
369
|
+
z.object({
|
|
370
|
+
type: z.literal("message.reactions"),
|
|
371
|
+
chatId: idSchema,
|
|
372
|
+
messageId: idSchema,
|
|
373
|
+
reactions: reactionCountsSchema,
|
|
374
|
+
orgUserId: idSchema,
|
|
375
|
+
reaction: reactionEmojiSchema.nullable()
|
|
376
|
+
}).strict(),
|
|
377
|
+
z.object({
|
|
378
|
+
type: z.literal("chat.updated"),
|
|
379
|
+
chatId: idSchema,
|
|
380
|
+
chat: chatSchema,
|
|
381
|
+
participants: z.array(commentAuthorSchema)
|
|
382
|
+
}).strict(),
|
|
383
|
+
z.object({
|
|
384
|
+
type: z.literal("chat.removed"),
|
|
385
|
+
chatId: idSchema
|
|
386
|
+
}).strict(),
|
|
387
|
+
z.object({
|
|
388
|
+
type: z.literal("chat.state"),
|
|
389
|
+
chatId: idSchema,
|
|
390
|
+
unread: z.number().int().min(0),
|
|
391
|
+
lastReadMessageId: idSchema.nullable(),
|
|
392
|
+
subscription: subscriptionViewSchema.nullable()
|
|
393
|
+
}).strict(),
|
|
394
|
+
chatUnreadSummarySchema.extend({ type: z.literal("unread") }).strict(),
|
|
395
|
+
z.object({
|
|
396
|
+
type: z.literal("typing"),
|
|
397
|
+
chatId: idSchema,
|
|
398
|
+
orgUserId: idSchema,
|
|
399
|
+
until: z.coerce.date()
|
|
400
|
+
}).strict(),
|
|
401
|
+
z.object({ type: z.literal("resync") }).strict(),
|
|
402
|
+
z.object({
|
|
403
|
+
type: z.literal("closed"),
|
|
404
|
+
reason: z.enum(["shutdown"])
|
|
405
|
+
}).strict()
|
|
406
|
+
]);
|
|
333
407
|
//#endregion
|
|
334
|
-
export { activityCommentsRuleSchema, blockedUserSchema, chatKindSchema, chatLastMessageSchema, chatSchema, chatStatusSchema, chatUserSchema, commentAuthorSchema, commentFlagResolutionSchema, commentListItemSchema, commentReactionSchema, commentReportSchema, commentReportSummarySchema, commentSchema, commentSettingsSchema, commentStatusSchema, commentViewSchema, digestRunSchema, flaggedCommentSchema, listCommentsQuerySchema, mentionItemTypeSchema, mentionSchema, mentionViewSchema, messageAttachmentSchema, messageFileSchema, messageFlagResolutionSchema, messageFlagSchema, messageReactionSchema, messageSchema, messageViewSchema, postBookmarkSchema, postFlagResolutionSchema, postFlagSchema, postReactionSchema, postSchema, postStatusSchema, postViewSchema, reactionCountsSchema, reactionEmojiSchema, subscriptionItemTypeSchema, subscriptionSchema, subscriptionStateSchema, subscriptionViewSchema };
|
|
408
|
+
export { activityCommentsRuleSchema, blockedUserSchema, chatKindSchema, chatLastMessageSchema, chatLiveEventSchema, chatSchema, chatStatusSchema, chatUnreadSummarySchema, chatUserSchema, commentAuthorSchema, commentFlagResolutionSchema, commentListItemSchema, commentReactionSchema, commentReportSchema, commentReportSummarySchema, commentSchema, commentSettingsSchema, commentStatusSchema, commentViewSchema, digestRunSchema, flaggedCommentSchema, flaggedCommentViewSchema, listCommentsQuerySchema, liveMessageSchema, mentionItemTypeSchema, mentionSchema, mentionViewSchema, messageAttachmentSchema, messageFileSchema, messageFlagResolutionSchema, messageFlagSchema, messageReactionSchema, messageSchema, messageViewSchema, postAssetSchema, postBookmarkSchema, postFlagResolutionSchema, postFlagSchema, postReactionSchema, postSchema, postStatusSchema, postViewSchema, reactionCountsSchema, reactionEmojiSchema, subscriptionItemTypeSchema, subscriptionSchema, subscriptionStateSchema, subscriptionViewSchema };
|
|
335
409
|
|
|
336
410
|
//# sourceMappingURL=discussion.js.map
|