@sankira-dev/event-types 0.0.2 → 0.0.4
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/index.d.ts +426 -35
- package/dist/index.js +60 -12
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,36 +1,79 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
|
+
export declare const FeedbackCategorySchema: z.ZodEnum<["bug", "feature_request", "general", "other"]>;
|
|
3
|
+
export type FeedbackCategory = z.infer<typeof FeedbackCategorySchema>;
|
|
2
4
|
export declare const EntityTypeSchema: z.ZodEnum<["comment", "post", "user"]>;
|
|
3
5
|
export type EntityType = z.infer<typeof EntityTypeSchema>;
|
|
4
6
|
export declare const NotificationEntityTypeSchema: z.ZodEnum<["comment", "post", "space", "user"]>;
|
|
5
7
|
export type NotificationEntityType = z.infer<typeof NotificationEntityTypeSchema>;
|
|
6
8
|
export declare const NotificationEventTypeSchema: z.ZodEnum<["comment_replied", "comment_voted", "post_replied", "post_voted", "user_followed", "user_mentioned"]>;
|
|
7
9
|
export type NotificationEventType = z.infer<typeof NotificationEventTypeSchema>;
|
|
10
|
+
export declare const UserSchema: z.ZodObject<{
|
|
11
|
+
email: z.ZodString;
|
|
12
|
+
first_name: z.ZodString;
|
|
13
|
+
last_name: z.ZodString;
|
|
14
|
+
user_id: z.ZodNumber;
|
|
15
|
+
username: z.ZodString;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
username: string;
|
|
18
|
+
email: string;
|
|
19
|
+
first_name: string;
|
|
20
|
+
last_name: string;
|
|
21
|
+
user_id: number;
|
|
22
|
+
}, {
|
|
23
|
+
username: string;
|
|
24
|
+
email: string;
|
|
25
|
+
first_name: string;
|
|
26
|
+
last_name: string;
|
|
27
|
+
user_id: number;
|
|
28
|
+
}>;
|
|
29
|
+
export type User = z.infer<typeof UserSchema>;
|
|
8
30
|
export declare const ModerationReportResolvedSchema: z.ZodObject<{
|
|
9
31
|
action_taken: z.ZodString;
|
|
10
32
|
entity_type: z.ZodEnum<["comment", "post", "user"]>;
|
|
11
33
|
report_id: z.ZodNumber;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
34
|
+
reporter: z.ZodObject<{
|
|
35
|
+
email: z.ZodString;
|
|
36
|
+
first_name: z.ZodString;
|
|
37
|
+
last_name: z.ZodString;
|
|
38
|
+
user_id: z.ZodNumber;
|
|
39
|
+
username: z.ZodString;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
username: string;
|
|
42
|
+
email: string;
|
|
43
|
+
first_name: string;
|
|
44
|
+
last_name: string;
|
|
45
|
+
user_id: number;
|
|
46
|
+
}, {
|
|
47
|
+
username: string;
|
|
48
|
+
email: string;
|
|
49
|
+
first_name: string;
|
|
50
|
+
last_name: string;
|
|
51
|
+
user_id: number;
|
|
52
|
+
}>;
|
|
16
53
|
resolved_at: z.ZodDate;
|
|
17
54
|
}, "strip", z.ZodTypeAny, {
|
|
18
55
|
action_taken: string;
|
|
19
56
|
entity_type: "user" | "comment" | "post";
|
|
20
57
|
report_id: number;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
58
|
+
reporter: {
|
|
59
|
+
username: string;
|
|
60
|
+
email: string;
|
|
61
|
+
first_name: string;
|
|
62
|
+
last_name: string;
|
|
63
|
+
user_id: number;
|
|
64
|
+
};
|
|
25
65
|
resolved_at: Date;
|
|
26
66
|
}, {
|
|
27
67
|
action_taken: string;
|
|
28
68
|
entity_type: "user" | "comment" | "post";
|
|
29
69
|
report_id: number;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
70
|
+
reporter: {
|
|
71
|
+
username: string;
|
|
72
|
+
email: string;
|
|
73
|
+
first_name: string;
|
|
74
|
+
last_name: string;
|
|
75
|
+
user_id: number;
|
|
76
|
+
};
|
|
34
77
|
resolved_at: Date;
|
|
35
78
|
}>;
|
|
36
79
|
export type ModerationReportResolved = z.infer<typeof ModerationReportResolvedSchema>;
|
|
@@ -79,6 +122,159 @@ export declare const SignupLinkRequestedSchema: z.ZodObject<{
|
|
|
79
122
|
signup_link: string;
|
|
80
123
|
}>;
|
|
81
124
|
export type SignupLinkRequested = z.infer<typeof SignupLinkRequestedSchema>;
|
|
125
|
+
export declare const StaffPostApprovedSchema: z.ZodObject<{
|
|
126
|
+
approved_at: z.ZodDate;
|
|
127
|
+
post_id: z.ZodNumber;
|
|
128
|
+
post_slug: z.ZodString;
|
|
129
|
+
post_title: z.ZodString;
|
|
130
|
+
recipient: z.ZodObject<{
|
|
131
|
+
email: z.ZodString;
|
|
132
|
+
first_name: z.ZodString;
|
|
133
|
+
last_name: z.ZodString;
|
|
134
|
+
user_id: z.ZodNumber;
|
|
135
|
+
username: z.ZodString;
|
|
136
|
+
}, "strip", z.ZodTypeAny, {
|
|
137
|
+
username: string;
|
|
138
|
+
email: string;
|
|
139
|
+
first_name: string;
|
|
140
|
+
last_name: string;
|
|
141
|
+
user_id: number;
|
|
142
|
+
}, {
|
|
143
|
+
username: string;
|
|
144
|
+
email: string;
|
|
145
|
+
first_name: string;
|
|
146
|
+
last_name: string;
|
|
147
|
+
user_id: number;
|
|
148
|
+
}>;
|
|
149
|
+
}, "strip", z.ZodTypeAny, {
|
|
150
|
+
approved_at: Date;
|
|
151
|
+
post_id: number;
|
|
152
|
+
post_slug: string;
|
|
153
|
+
post_title: string;
|
|
154
|
+
recipient: {
|
|
155
|
+
username: string;
|
|
156
|
+
email: string;
|
|
157
|
+
first_name: string;
|
|
158
|
+
last_name: string;
|
|
159
|
+
user_id: number;
|
|
160
|
+
};
|
|
161
|
+
}, {
|
|
162
|
+
approved_at: Date;
|
|
163
|
+
post_id: number;
|
|
164
|
+
post_slug: string;
|
|
165
|
+
post_title: string;
|
|
166
|
+
recipient: {
|
|
167
|
+
username: string;
|
|
168
|
+
email: string;
|
|
169
|
+
first_name: string;
|
|
170
|
+
last_name: string;
|
|
171
|
+
user_id: number;
|
|
172
|
+
};
|
|
173
|
+
}>;
|
|
174
|
+
export type StaffPostApproved = z.infer<typeof StaffPostApprovedSchema>;
|
|
175
|
+
export declare const StaffPostRejectedSchema: z.ZodObject<{
|
|
176
|
+
post_id: z.ZodNumber;
|
|
177
|
+
post_slug: z.ZodString;
|
|
178
|
+
post_title: z.ZodString;
|
|
179
|
+
recipient: z.ZodObject<{
|
|
180
|
+
email: z.ZodString;
|
|
181
|
+
first_name: z.ZodString;
|
|
182
|
+
last_name: z.ZodString;
|
|
183
|
+
user_id: z.ZodNumber;
|
|
184
|
+
username: z.ZodString;
|
|
185
|
+
}, "strip", z.ZodTypeAny, {
|
|
186
|
+
username: string;
|
|
187
|
+
email: string;
|
|
188
|
+
first_name: string;
|
|
189
|
+
last_name: string;
|
|
190
|
+
user_id: number;
|
|
191
|
+
}, {
|
|
192
|
+
username: string;
|
|
193
|
+
email: string;
|
|
194
|
+
first_name: string;
|
|
195
|
+
last_name: string;
|
|
196
|
+
user_id: number;
|
|
197
|
+
}>;
|
|
198
|
+
rejected_at: z.ZodDate;
|
|
199
|
+
rejection_reason: z.ZodString;
|
|
200
|
+
}, "strip", z.ZodTypeAny, {
|
|
201
|
+
post_id: number;
|
|
202
|
+
post_slug: string;
|
|
203
|
+
post_title: string;
|
|
204
|
+
recipient: {
|
|
205
|
+
username: string;
|
|
206
|
+
email: string;
|
|
207
|
+
first_name: string;
|
|
208
|
+
last_name: string;
|
|
209
|
+
user_id: number;
|
|
210
|
+
};
|
|
211
|
+
rejected_at: Date;
|
|
212
|
+
rejection_reason: string;
|
|
213
|
+
}, {
|
|
214
|
+
post_id: number;
|
|
215
|
+
post_slug: string;
|
|
216
|
+
post_title: string;
|
|
217
|
+
recipient: {
|
|
218
|
+
username: string;
|
|
219
|
+
email: string;
|
|
220
|
+
first_name: string;
|
|
221
|
+
last_name: string;
|
|
222
|
+
user_id: number;
|
|
223
|
+
};
|
|
224
|
+
rejected_at: Date;
|
|
225
|
+
rejection_reason: string;
|
|
226
|
+
}>;
|
|
227
|
+
export type StaffPostRejected = z.infer<typeof StaffPostRejectedSchema>;
|
|
228
|
+
export declare const StaffPostSubmittedSchema: z.ZodObject<{
|
|
229
|
+
post_id: z.ZodNumber;
|
|
230
|
+
post_slug: z.ZodString;
|
|
231
|
+
post_title: z.ZodString;
|
|
232
|
+
recipient: z.ZodObject<{
|
|
233
|
+
email: z.ZodString;
|
|
234
|
+
first_name: z.ZodString;
|
|
235
|
+
last_name: z.ZodString;
|
|
236
|
+
user_id: z.ZodNumber;
|
|
237
|
+
username: z.ZodString;
|
|
238
|
+
}, "strip", z.ZodTypeAny, {
|
|
239
|
+
username: string;
|
|
240
|
+
email: string;
|
|
241
|
+
first_name: string;
|
|
242
|
+
last_name: string;
|
|
243
|
+
user_id: number;
|
|
244
|
+
}, {
|
|
245
|
+
username: string;
|
|
246
|
+
email: string;
|
|
247
|
+
first_name: string;
|
|
248
|
+
last_name: string;
|
|
249
|
+
user_id: number;
|
|
250
|
+
}>;
|
|
251
|
+
submitted_at: z.ZodDate;
|
|
252
|
+
}, "strip", z.ZodTypeAny, {
|
|
253
|
+
post_id: number;
|
|
254
|
+
post_slug: string;
|
|
255
|
+
post_title: string;
|
|
256
|
+
recipient: {
|
|
257
|
+
username: string;
|
|
258
|
+
email: string;
|
|
259
|
+
first_name: string;
|
|
260
|
+
last_name: string;
|
|
261
|
+
user_id: number;
|
|
262
|
+
};
|
|
263
|
+
submitted_at: Date;
|
|
264
|
+
}, {
|
|
265
|
+
post_id: number;
|
|
266
|
+
post_slug: string;
|
|
267
|
+
post_title: string;
|
|
268
|
+
recipient: {
|
|
269
|
+
username: string;
|
|
270
|
+
email: string;
|
|
271
|
+
first_name: string;
|
|
272
|
+
last_name: string;
|
|
273
|
+
user_id: number;
|
|
274
|
+
};
|
|
275
|
+
submitted_at: Date;
|
|
276
|
+
}>;
|
|
277
|
+
export type StaffPostSubmitted = z.infer<typeof StaffPostSubmittedSchema>;
|
|
82
278
|
export declare const TwoFactorOtpRequestedSchema: z.ZodObject<{
|
|
83
279
|
email: z.ZodString;
|
|
84
280
|
otp: z.ZodString;
|
|
@@ -93,26 +289,200 @@ export declare const TwoFactorOtpRequestedSchema: z.ZodObject<{
|
|
|
93
289
|
otp: string;
|
|
94
290
|
}>;
|
|
95
291
|
export type TwoFactorOtpRequested = z.infer<typeof TwoFactorOtpRequestedSchema>;
|
|
292
|
+
export declare const WriterApplicationAcceptedSchema: z.ZodObject<{
|
|
293
|
+
accepted_at: z.ZodDate;
|
|
294
|
+
application_slug: z.ZodString;
|
|
295
|
+
recipient: z.ZodObject<{
|
|
296
|
+
email: z.ZodString;
|
|
297
|
+
first_name: z.ZodString;
|
|
298
|
+
last_name: z.ZodString;
|
|
299
|
+
user_id: z.ZodNumber;
|
|
300
|
+
username: z.ZodString;
|
|
301
|
+
}, "strip", z.ZodTypeAny, {
|
|
302
|
+
username: string;
|
|
303
|
+
email: string;
|
|
304
|
+
first_name: string;
|
|
305
|
+
last_name: string;
|
|
306
|
+
user_id: number;
|
|
307
|
+
}, {
|
|
308
|
+
username: string;
|
|
309
|
+
email: string;
|
|
310
|
+
first_name: string;
|
|
311
|
+
last_name: string;
|
|
312
|
+
user_id: number;
|
|
313
|
+
}>;
|
|
314
|
+
}, "strip", z.ZodTypeAny, {
|
|
315
|
+
recipient: {
|
|
316
|
+
username: string;
|
|
317
|
+
email: string;
|
|
318
|
+
first_name: string;
|
|
319
|
+
last_name: string;
|
|
320
|
+
user_id: number;
|
|
321
|
+
};
|
|
322
|
+
accepted_at: Date;
|
|
323
|
+
application_slug: string;
|
|
324
|
+
}, {
|
|
325
|
+
recipient: {
|
|
326
|
+
username: string;
|
|
327
|
+
email: string;
|
|
328
|
+
first_name: string;
|
|
329
|
+
last_name: string;
|
|
330
|
+
user_id: number;
|
|
331
|
+
};
|
|
332
|
+
accepted_at: Date;
|
|
333
|
+
application_slug: string;
|
|
334
|
+
}>;
|
|
335
|
+
export type WriterApplicationAccepted = z.infer<typeof WriterApplicationAcceptedSchema>;
|
|
336
|
+
export declare const WriterApplicationRejectedSchema: z.ZodObject<{
|
|
337
|
+
application_slug: z.ZodString;
|
|
338
|
+
recipient: z.ZodObject<{
|
|
339
|
+
email: z.ZodString;
|
|
340
|
+
first_name: z.ZodString;
|
|
341
|
+
last_name: z.ZodString;
|
|
342
|
+
user_id: z.ZodNumber;
|
|
343
|
+
username: z.ZodString;
|
|
344
|
+
}, "strip", z.ZodTypeAny, {
|
|
345
|
+
username: string;
|
|
346
|
+
email: string;
|
|
347
|
+
first_name: string;
|
|
348
|
+
last_name: string;
|
|
349
|
+
user_id: number;
|
|
350
|
+
}, {
|
|
351
|
+
username: string;
|
|
352
|
+
email: string;
|
|
353
|
+
first_name: string;
|
|
354
|
+
last_name: string;
|
|
355
|
+
user_id: number;
|
|
356
|
+
}>;
|
|
357
|
+
rejected_at: z.ZodDate;
|
|
358
|
+
rejection_reason: z.ZodOptional<z.ZodUnion<[z.ZodNull, z.ZodString]>>;
|
|
359
|
+
}, "strip", z.ZodTypeAny, {
|
|
360
|
+
recipient: {
|
|
361
|
+
username: string;
|
|
362
|
+
email: string;
|
|
363
|
+
first_name: string;
|
|
364
|
+
last_name: string;
|
|
365
|
+
user_id: number;
|
|
366
|
+
};
|
|
367
|
+
rejected_at: Date;
|
|
368
|
+
application_slug: string;
|
|
369
|
+
rejection_reason?: string | null | undefined;
|
|
370
|
+
}, {
|
|
371
|
+
recipient: {
|
|
372
|
+
username: string;
|
|
373
|
+
email: string;
|
|
374
|
+
first_name: string;
|
|
375
|
+
last_name: string;
|
|
376
|
+
user_id: number;
|
|
377
|
+
};
|
|
378
|
+
rejected_at: Date;
|
|
379
|
+
application_slug: string;
|
|
380
|
+
rejection_reason?: string | null | undefined;
|
|
381
|
+
}>;
|
|
382
|
+
export type WriterApplicationRejected = z.infer<typeof WriterApplicationRejectedSchema>;
|
|
96
383
|
export declare const WriterApplicationSubmittedSchema: z.ZodObject<{
|
|
97
384
|
application_id: z.ZodNumber;
|
|
98
|
-
|
|
99
|
-
|
|
385
|
+
recipient: z.ZodObject<{
|
|
386
|
+
email: z.ZodString;
|
|
387
|
+
first_name: z.ZodString;
|
|
388
|
+
last_name: z.ZodString;
|
|
389
|
+
user_id: z.ZodNumber;
|
|
390
|
+
username: z.ZodString;
|
|
391
|
+
}, "strip", z.ZodTypeAny, {
|
|
392
|
+
username: string;
|
|
393
|
+
email: string;
|
|
394
|
+
first_name: string;
|
|
395
|
+
last_name: string;
|
|
396
|
+
user_id: number;
|
|
397
|
+
}, {
|
|
398
|
+
username: string;
|
|
399
|
+
email: string;
|
|
400
|
+
first_name: string;
|
|
401
|
+
last_name: string;
|
|
402
|
+
user_id: number;
|
|
403
|
+
}>;
|
|
100
404
|
submitted_at: z.ZodDate;
|
|
101
|
-
user_id: z.ZodNumber;
|
|
102
405
|
}, "strip", z.ZodTypeAny, {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
406
|
+
recipient: {
|
|
407
|
+
username: string;
|
|
408
|
+
email: string;
|
|
409
|
+
first_name: string;
|
|
410
|
+
last_name: string;
|
|
411
|
+
user_id: number;
|
|
412
|
+
};
|
|
106
413
|
submitted_at: Date;
|
|
107
|
-
user_id: number;
|
|
108
|
-
}, {
|
|
109
|
-
email: string;
|
|
110
|
-
full_name: string;
|
|
111
414
|
application_id: number;
|
|
415
|
+
}, {
|
|
416
|
+
recipient: {
|
|
417
|
+
username: string;
|
|
418
|
+
email: string;
|
|
419
|
+
first_name: string;
|
|
420
|
+
last_name: string;
|
|
421
|
+
user_id: number;
|
|
422
|
+
};
|
|
112
423
|
submitted_at: Date;
|
|
113
|
-
|
|
424
|
+
application_id: number;
|
|
114
425
|
}>;
|
|
115
426
|
export type WriterApplicationSubmitted = z.infer<typeof WriterApplicationSubmittedSchema>;
|
|
427
|
+
export declare const FeedbackSubmittedSchema: z.ZodObject<{
|
|
428
|
+
contact_me: z.ZodBoolean;
|
|
429
|
+
feedback_category: z.ZodEnum<["bug", "feature_request", "general", "other"]>;
|
|
430
|
+
message: z.ZodString;
|
|
431
|
+
page_url: z.ZodOptional<z.ZodString>;
|
|
432
|
+
recipient_email: z.ZodString;
|
|
433
|
+
submitted_at: z.ZodDate;
|
|
434
|
+
user: z.ZodObject<{
|
|
435
|
+
email: z.ZodString;
|
|
436
|
+
first_name: z.ZodString;
|
|
437
|
+
last_name: z.ZodString;
|
|
438
|
+
user_id: z.ZodNumber;
|
|
439
|
+
username: z.ZodString;
|
|
440
|
+
}, "strip", z.ZodTypeAny, {
|
|
441
|
+
username: string;
|
|
442
|
+
email: string;
|
|
443
|
+
first_name: string;
|
|
444
|
+
last_name: string;
|
|
445
|
+
user_id: number;
|
|
446
|
+
}, {
|
|
447
|
+
username: string;
|
|
448
|
+
email: string;
|
|
449
|
+
first_name: string;
|
|
450
|
+
last_name: string;
|
|
451
|
+
user_id: number;
|
|
452
|
+
}>;
|
|
453
|
+
user_profile_url: z.ZodString;
|
|
454
|
+
}, "strip", z.ZodTypeAny, {
|
|
455
|
+
message: string;
|
|
456
|
+
user: {
|
|
457
|
+
username: string;
|
|
458
|
+
email: string;
|
|
459
|
+
first_name: string;
|
|
460
|
+
last_name: string;
|
|
461
|
+
user_id: number;
|
|
462
|
+
};
|
|
463
|
+
submitted_at: Date;
|
|
464
|
+
contact_me: boolean;
|
|
465
|
+
feedback_category: "other" | "bug" | "feature_request" | "general";
|
|
466
|
+
recipient_email: string;
|
|
467
|
+
user_profile_url: string;
|
|
468
|
+
page_url?: string | undefined;
|
|
469
|
+
}, {
|
|
470
|
+
message: string;
|
|
471
|
+
user: {
|
|
472
|
+
username: string;
|
|
473
|
+
email: string;
|
|
474
|
+
first_name: string;
|
|
475
|
+
last_name: string;
|
|
476
|
+
user_id: number;
|
|
477
|
+
};
|
|
478
|
+
submitted_at: Date;
|
|
479
|
+
contact_me: boolean;
|
|
480
|
+
feedback_category: "other" | "bug" | "feature_request" | "general";
|
|
481
|
+
recipient_email: string;
|
|
482
|
+
user_profile_url: string;
|
|
483
|
+
page_url?: string | undefined;
|
|
484
|
+
}>;
|
|
485
|
+
export type FeedbackSubmitted = z.infer<typeof FeedbackSubmittedSchema>;
|
|
116
486
|
export declare const DigestItemSchema: z.ZodObject<{
|
|
117
487
|
actors: z.ZodArray<z.ZodObject<{
|
|
118
488
|
full_name: z.ZodString;
|
|
@@ -166,8 +536,6 @@ export declare const DigestItemSchema: z.ZodObject<{
|
|
|
166
536
|
export type DigestItem = z.infer<typeof DigestItemSchema>;
|
|
167
537
|
export declare const EmailDigestSchema: z.ZodObject<{
|
|
168
538
|
date: z.ZodDate;
|
|
169
|
-
email: z.ZodString;
|
|
170
|
-
first_name: z.ZodString;
|
|
171
539
|
items: z.ZodArray<z.ZodObject<{
|
|
172
540
|
actors: z.ZodArray<z.ZodObject<{
|
|
173
541
|
full_name: z.ZodString;
|
|
@@ -218,10 +586,26 @@ export declare const EmailDigestSchema: z.ZodObject<{
|
|
|
218
586
|
event_type: "comment_replied" | "comment_voted" | "post_replied" | "post_voted" | "user_followed" | "user_mentioned";
|
|
219
587
|
last_activity: Date;
|
|
220
588
|
}>, "many">;
|
|
221
|
-
|
|
222
|
-
|
|
589
|
+
recipient: z.ZodObject<{
|
|
590
|
+
email: z.ZodString;
|
|
591
|
+
first_name: z.ZodString;
|
|
592
|
+
last_name: z.ZodString;
|
|
593
|
+
user_id: z.ZodNumber;
|
|
594
|
+
username: z.ZodString;
|
|
595
|
+
}, "strip", z.ZodTypeAny, {
|
|
596
|
+
username: string;
|
|
597
|
+
email: string;
|
|
598
|
+
first_name: string;
|
|
599
|
+
last_name: string;
|
|
600
|
+
user_id: number;
|
|
601
|
+
}, {
|
|
602
|
+
username: string;
|
|
603
|
+
email: string;
|
|
604
|
+
first_name: string;
|
|
605
|
+
last_name: string;
|
|
606
|
+
user_id: number;
|
|
607
|
+
}>;
|
|
223
608
|
}, "strip", z.ZodTypeAny, {
|
|
224
|
-
email: string;
|
|
225
609
|
date: Date;
|
|
226
610
|
items: {
|
|
227
611
|
entity_type: "user" | "comment" | "post" | "space";
|
|
@@ -237,11 +621,14 @@ export declare const EmailDigestSchema: z.ZodObject<{
|
|
|
237
621
|
event_type: "comment_replied" | "comment_voted" | "post_replied" | "post_voted" | "user_followed" | "user_mentioned";
|
|
238
622
|
last_activity: Date;
|
|
239
623
|
}[];
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
624
|
+
recipient: {
|
|
625
|
+
username: string;
|
|
626
|
+
email: string;
|
|
627
|
+
first_name: string;
|
|
628
|
+
last_name: string;
|
|
629
|
+
user_id: number;
|
|
630
|
+
};
|
|
243
631
|
}, {
|
|
244
|
-
email: string;
|
|
245
632
|
date: Date;
|
|
246
633
|
items: {
|
|
247
634
|
entity_type: "user" | "comment" | "post" | "space";
|
|
@@ -257,8 +644,12 @@ export declare const EmailDigestSchema: z.ZodObject<{
|
|
|
257
644
|
event_type: "comment_replied" | "comment_voted" | "post_replied" | "post_voted" | "user_followed" | "user_mentioned";
|
|
258
645
|
last_activity: Date;
|
|
259
646
|
}[];
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
647
|
+
recipient: {
|
|
648
|
+
username: string;
|
|
649
|
+
email: string;
|
|
650
|
+
first_name: string;
|
|
651
|
+
last_name: string;
|
|
652
|
+
user_id: number;
|
|
653
|
+
};
|
|
263
654
|
}>;
|
|
264
655
|
export type EmailDigest = z.infer<typeof EmailDigestSchema>;
|
package/dist/index.js
CHANGED
|
@@ -33,8 +33,14 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.EmailDigestSchema = exports.DigestItemSchema = exports.WriterApplicationSubmittedSchema = exports.TwoFactorOtpRequestedSchema = exports.SignupLinkRequestedSchema = exports.PasswordResetSchema = exports.NotificationActorSchema = exports.ModerationReportResolvedSchema = exports.NotificationEventTypeSchema = exports.NotificationEntityTypeSchema = exports.EntityTypeSchema = void 0;
|
|
36
|
+
exports.EmailDigestSchema = exports.DigestItemSchema = exports.FeedbackSubmittedSchema = exports.WriterApplicationSubmittedSchema = exports.WriterApplicationRejectedSchema = exports.WriterApplicationAcceptedSchema = exports.TwoFactorOtpRequestedSchema = exports.StaffPostSubmittedSchema = exports.StaffPostRejectedSchema = exports.StaffPostApprovedSchema = exports.SignupLinkRequestedSchema = exports.PasswordResetSchema = exports.NotificationActorSchema = exports.ModerationReportResolvedSchema = exports.UserSchema = exports.NotificationEventTypeSchema = exports.NotificationEntityTypeSchema = exports.EntityTypeSchema = exports.FeedbackCategorySchema = void 0;
|
|
37
37
|
const z = __importStar(require("zod"));
|
|
38
|
+
exports.FeedbackCategorySchema = z.enum([
|
|
39
|
+
"bug",
|
|
40
|
+
"feature_request",
|
|
41
|
+
"general",
|
|
42
|
+
"other",
|
|
43
|
+
]);
|
|
38
44
|
exports.EntityTypeSchema = z.enum([
|
|
39
45
|
"comment",
|
|
40
46
|
"post",
|
|
@@ -54,14 +60,18 @@ exports.NotificationEventTypeSchema = z.enum([
|
|
|
54
60
|
"user_followed",
|
|
55
61
|
"user_mentioned",
|
|
56
62
|
]);
|
|
63
|
+
exports.UserSchema = z.object({
|
|
64
|
+
"email": z.string(),
|
|
65
|
+
"first_name": z.string(),
|
|
66
|
+
"last_name": z.string(),
|
|
67
|
+
"user_id": z.number(),
|
|
68
|
+
"username": z.string(),
|
|
69
|
+
});
|
|
57
70
|
exports.ModerationReportResolvedSchema = z.object({
|
|
58
71
|
"action_taken": z.string(),
|
|
59
72
|
"entity_type": exports.EntityTypeSchema,
|
|
60
73
|
"report_id": z.number(),
|
|
61
|
-
"
|
|
62
|
-
"reporter_first_name": z.string(),
|
|
63
|
-
"reporter_last_name": z.string(),
|
|
64
|
-
"reporter_user_id": z.number(),
|
|
74
|
+
"reporter": exports.UserSchema,
|
|
65
75
|
"resolved_at": z.coerce.date(),
|
|
66
76
|
});
|
|
67
77
|
exports.NotificationActorSchema = z.object({
|
|
@@ -80,17 +90,58 @@ exports.SignupLinkRequestedSchema = z.object({
|
|
|
80
90
|
"sent_at": z.coerce.date(),
|
|
81
91
|
"signup_link": z.string(),
|
|
82
92
|
});
|
|
93
|
+
exports.StaffPostApprovedSchema = z.object({
|
|
94
|
+
"approved_at": z.coerce.date(),
|
|
95
|
+
"post_id": z.number(),
|
|
96
|
+
"post_slug": z.string(),
|
|
97
|
+
"post_title": z.string(),
|
|
98
|
+
"recipient": exports.UserSchema,
|
|
99
|
+
});
|
|
100
|
+
exports.StaffPostRejectedSchema = z.object({
|
|
101
|
+
"post_id": z.number(),
|
|
102
|
+
"post_slug": z.string(),
|
|
103
|
+
"post_title": z.string(),
|
|
104
|
+
"recipient": exports.UserSchema,
|
|
105
|
+
"rejected_at": z.coerce.date(),
|
|
106
|
+
"rejection_reason": z.string(),
|
|
107
|
+
});
|
|
108
|
+
exports.StaffPostSubmittedSchema = z.object({
|
|
109
|
+
"post_id": z.number(),
|
|
110
|
+
"post_slug": z.string(),
|
|
111
|
+
"post_title": z.string(),
|
|
112
|
+
"recipient": exports.UserSchema,
|
|
113
|
+
"submitted_at": z.coerce.date(),
|
|
114
|
+
});
|
|
83
115
|
exports.TwoFactorOtpRequestedSchema = z.object({
|
|
84
116
|
"email": z.string(),
|
|
85
117
|
"otp": z.string(),
|
|
86
118
|
"sent_at": z.coerce.date(),
|
|
87
119
|
});
|
|
120
|
+
exports.WriterApplicationAcceptedSchema = z.object({
|
|
121
|
+
"accepted_at": z.coerce.date(),
|
|
122
|
+
"application_slug": z.string(),
|
|
123
|
+
"recipient": exports.UserSchema,
|
|
124
|
+
});
|
|
125
|
+
exports.WriterApplicationRejectedSchema = z.object({
|
|
126
|
+
"application_slug": z.string(),
|
|
127
|
+
"recipient": exports.UserSchema,
|
|
128
|
+
"rejected_at": z.coerce.date(),
|
|
129
|
+
"rejection_reason": z.union([z.null(), z.string()]).optional(),
|
|
130
|
+
});
|
|
88
131
|
exports.WriterApplicationSubmittedSchema = z.object({
|
|
89
132
|
"application_id": z.number(),
|
|
90
|
-
"
|
|
91
|
-
"full_name": z.string(),
|
|
133
|
+
"recipient": exports.UserSchema,
|
|
92
134
|
"submitted_at": z.coerce.date(),
|
|
93
|
-
|
|
135
|
+
});
|
|
136
|
+
exports.FeedbackSubmittedSchema = z.object({
|
|
137
|
+
"contact_me": z.boolean(),
|
|
138
|
+
"feedback_category": exports.FeedbackCategorySchema,
|
|
139
|
+
"message": z.string(),
|
|
140
|
+
"page_url": z.string().optional(),
|
|
141
|
+
"recipient_email": z.string(),
|
|
142
|
+
"submitted_at": z.coerce.date(),
|
|
143
|
+
"user": exports.UserSchema,
|
|
144
|
+
"user_profile_url": z.string(),
|
|
94
145
|
});
|
|
95
146
|
exports.DigestItemSchema = z.object({
|
|
96
147
|
"actors": z.array(exports.NotificationActorSchema),
|
|
@@ -103,9 +154,6 @@ exports.DigestItemSchema = z.object({
|
|
|
103
154
|
});
|
|
104
155
|
exports.EmailDigestSchema = z.object({
|
|
105
156
|
"date": z.coerce.date(),
|
|
106
|
-
"email": z.string(),
|
|
107
|
-
"first_name": z.string(),
|
|
108
157
|
"items": z.array(exports.DigestItemSchema),
|
|
109
|
-
"
|
|
110
|
-
"user_id": z.number(),
|
|
158
|
+
"recipient": exports.UserSchema,
|
|
111
159
|
});
|