@sankira-dev/event-types 0.0.4 → 0.0.5-beta.1

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 CHANGED
@@ -7,6 +7,8 @@ export declare const NotificationEntityTypeSchema: z.ZodEnum<["comment", "post",
7
7
  export type NotificationEntityType = z.infer<typeof NotificationEntityTypeSchema>;
8
8
  export declare const NotificationEventTypeSchema: z.ZodEnum<["comment_replied", "comment_voted", "post_replied", "post_voted", "user_followed", "user_mentioned"]>;
9
9
  export type NotificationEventType = z.infer<typeof NotificationEventTypeSchema>;
10
+ export declare const BanTypeSchema: z.ZodEnum<["permanent", "temporary"]>;
11
+ export type BanType = z.infer<typeof BanTypeSchema>;
10
12
  export declare const UserSchema: z.ZodObject<{
11
13
  email: z.ZodString;
12
14
  first_name: z.ZodString;
@@ -289,6 +291,106 @@ export declare const TwoFactorOtpRequestedSchema: z.ZodObject<{
289
291
  otp: string;
290
292
  }>;
291
293
  export type TwoFactorOtpRequested = z.infer<typeof TwoFactorOtpRequestedSchema>;
294
+ export declare const UserBannedSchema: z.ZodObject<{
295
+ ban_duration_days: z.ZodOptional<z.ZodNumber>;
296
+ ban_type: z.ZodEnum<["permanent", "temporary"]>;
297
+ banned_at: z.ZodDate;
298
+ banned_until: z.ZodOptional<z.ZodDate>;
299
+ reason: z.ZodOptional<z.ZodString>;
300
+ user: z.ZodObject<{
301
+ email: z.ZodString;
302
+ first_name: z.ZodString;
303
+ last_name: z.ZodString;
304
+ user_id: z.ZodNumber;
305
+ username: z.ZodString;
306
+ }, "strip", z.ZodTypeAny, {
307
+ username: string;
308
+ email: string;
309
+ first_name: string;
310
+ last_name: string;
311
+ user_id: number;
312
+ }, {
313
+ username: string;
314
+ email: string;
315
+ first_name: string;
316
+ last_name: string;
317
+ user_id: number;
318
+ }>;
319
+ }, "strip", z.ZodTypeAny, {
320
+ user: {
321
+ username: string;
322
+ email: string;
323
+ first_name: string;
324
+ last_name: string;
325
+ user_id: number;
326
+ };
327
+ ban_type: "temporary" | "permanent";
328
+ banned_at: Date;
329
+ reason?: string | undefined;
330
+ ban_duration_days?: number | undefined;
331
+ banned_until?: Date | undefined;
332
+ }, {
333
+ user: {
334
+ username: string;
335
+ email: string;
336
+ first_name: string;
337
+ last_name: string;
338
+ user_id: number;
339
+ };
340
+ ban_type: "temporary" | "permanent";
341
+ banned_at: Date;
342
+ reason?: string | undefined;
343
+ ban_duration_days?: number | undefined;
344
+ banned_until?: Date | undefined;
345
+ }>;
346
+ export type UserBanned = z.infer<typeof UserBannedSchema>;
347
+ export declare const UserUnbannedSchema: z.ZodObject<{
348
+ auto_unbanned: z.ZodBoolean;
349
+ ban_type: z.ZodEnum<["permanent", "temporary"]>;
350
+ unbanned_at: z.ZodDate;
351
+ user: z.ZodObject<{
352
+ email: z.ZodString;
353
+ first_name: z.ZodString;
354
+ last_name: z.ZodString;
355
+ user_id: z.ZodNumber;
356
+ username: z.ZodString;
357
+ }, "strip", z.ZodTypeAny, {
358
+ username: string;
359
+ email: string;
360
+ first_name: string;
361
+ last_name: string;
362
+ user_id: number;
363
+ }, {
364
+ username: string;
365
+ email: string;
366
+ first_name: string;
367
+ last_name: string;
368
+ user_id: number;
369
+ }>;
370
+ }, "strip", z.ZodTypeAny, {
371
+ user: {
372
+ username: string;
373
+ email: string;
374
+ first_name: string;
375
+ last_name: string;
376
+ user_id: number;
377
+ };
378
+ ban_type: "temporary" | "permanent";
379
+ auto_unbanned: boolean;
380
+ unbanned_at: Date;
381
+ }, {
382
+ user: {
383
+ username: string;
384
+ email: string;
385
+ first_name: string;
386
+ last_name: string;
387
+ user_id: number;
388
+ };
389
+ ban_type: "temporary" | "permanent";
390
+ auto_unbanned: boolean;
391
+ unbanned_at: Date;
392
+ }>;
393
+ export type UserUnbanned = z.infer<typeof UserUnbannedSchema>;
292
394
  export declare const WriterApplicationAcceptedSchema: z.ZodObject<{
293
395
  accepted_at: z.ZodDate;
294
396
  application_slug: z.ZodString;
@@ -586,6 +688,7 @@ export declare const EmailDigestSchema: z.ZodObject<{
586
688
  event_type: "comment_replied" | "comment_voted" | "post_replied" | "post_voted" | "user_followed" | "user_mentioned";
587
689
  last_activity: Date;
588
690
  }>, "many">;
691
+ omitted_item_count: z.ZodNumber;
589
692
  recipient: z.ZodObject<{
590
693
  email: z.ZodString;
591
694
  first_name: z.ZodString;
@@ -628,6 +731,7 @@ export declare const EmailDigestSchema: z.ZodObject<{
628
731
  last_name: string;
629
732
  user_id: number;
630
733
  };
734
+ omitted_item_count: number;
631
735
  }, {
632
736
  date: Date;
633
737
  items: {
@@ -651,5 +755,6 @@ export declare const EmailDigestSchema: z.ZodObject<{
651
755
  last_name: string;
652
756
  user_id: number;
653
757
  };
758
+ omitted_item_count: number;
654
759
  }>;
655
760
  export type EmailDigest = z.infer<typeof EmailDigestSchema>;
package/dist/index.js CHANGED
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
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;
36
+ exports.EmailDigestSchema = exports.DigestItemSchema = exports.FeedbackSubmittedSchema = exports.WriterApplicationSubmittedSchema = exports.WriterApplicationRejectedSchema = exports.WriterApplicationAcceptedSchema = exports.UserUnbannedSchema = exports.UserBannedSchema = exports.TwoFactorOtpRequestedSchema = exports.StaffPostSubmittedSchema = exports.StaffPostRejectedSchema = exports.StaffPostApprovedSchema = exports.SignupLinkRequestedSchema = exports.PasswordResetSchema = exports.NotificationActorSchema = exports.ModerationReportResolvedSchema = exports.UserSchema = exports.BanTypeSchema = exports.NotificationEventTypeSchema = exports.NotificationEntityTypeSchema = exports.EntityTypeSchema = exports.FeedbackCategorySchema = void 0;
37
37
  const z = __importStar(require("zod"));
38
38
  exports.FeedbackCategorySchema = z.enum([
39
39
  "bug",
@@ -60,6 +60,10 @@ exports.NotificationEventTypeSchema = z.enum([
60
60
  "user_followed",
61
61
  "user_mentioned",
62
62
  ]);
63
+ exports.BanTypeSchema = z.enum([
64
+ "permanent",
65
+ "temporary",
66
+ ]);
63
67
  exports.UserSchema = z.object({
64
68
  "email": z.string(),
65
69
  "first_name": z.string(),
@@ -117,6 +121,20 @@ exports.TwoFactorOtpRequestedSchema = z.object({
117
121
  "otp": z.string(),
118
122
  "sent_at": z.coerce.date(),
119
123
  });
124
+ exports.UserBannedSchema = z.object({
125
+ "ban_duration_days": z.number().optional(),
126
+ "ban_type": exports.BanTypeSchema,
127
+ "banned_at": z.coerce.date(),
128
+ "banned_until": z.coerce.date().optional(),
129
+ "reason": z.string().optional(),
130
+ "user": exports.UserSchema,
131
+ });
132
+ exports.UserUnbannedSchema = z.object({
133
+ "auto_unbanned": z.boolean(),
134
+ "ban_type": exports.BanTypeSchema,
135
+ "unbanned_at": z.coerce.date(),
136
+ "user": exports.UserSchema,
137
+ });
120
138
  exports.WriterApplicationAcceptedSchema = z.object({
121
139
  "accepted_at": z.coerce.date(),
122
140
  "application_slug": z.string(),
@@ -155,5 +173,6 @@ exports.DigestItemSchema = z.object({
155
173
  exports.EmailDigestSchema = z.object({
156
174
  "date": z.coerce.date(),
157
175
  "items": z.array(exports.DigestItemSchema),
176
+ "omitted_item_count": z.number(),
158
177
  "recipient": exports.UserSchema,
159
178
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sankira-dev/event-types",
3
- "version": "0.0.4",
3
+ "version": "0.0.5-beta.1",
4
4
  "description": "Event Types for Sankira",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",