@sankira-dev/event-types 1.0.1 → 1.1.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/index.d.ts CHANGED
@@ -9,6 +9,26 @@ export declare const NotificationEventTypeSchema: z.ZodEnum<["comment_replied",
9
9
  export type NotificationEventType = z.infer<typeof NotificationEventTypeSchema>;
10
10
  export declare const BanTypeSchema: z.ZodEnum<["permanent", "temporary"]>;
11
11
  export type BanType = z.infer<typeof BanTypeSchema>;
12
+ export declare const CustomEmailRequestedSchema: z.ZodObject<{
13
+ email_subject: z.ZodString;
14
+ message: z.ZodString;
15
+ recipient_email: z.ZodString;
16
+ reply_to: z.ZodOptional<z.ZodString>;
17
+ requested_at: z.ZodDate;
18
+ }, "strip", z.ZodTypeAny, {
19
+ message: string;
20
+ email_subject: string;
21
+ recipient_email: string;
22
+ requested_at: Date;
23
+ reply_to?: string | undefined;
24
+ }, {
25
+ message: string;
26
+ email_subject: string;
27
+ recipient_email: string;
28
+ requested_at: Date;
29
+ reply_to?: string | undefined;
30
+ }>;
31
+ export type CustomEmailRequested = z.infer<typeof CustomEmailRequestedSchema>;
12
32
  export declare const UserSchema: z.ZodObject<{
13
33
  email: z.ZodString;
14
34
  first_name: z.ZodString;
@@ -98,16 +118,49 @@ export declare const NotificationActorSchema: z.ZodObject<{
98
118
  export type NotificationActor = z.infer<typeof NotificationActorSchema>;
99
119
  export declare const PasswordResetSchema: z.ZodObject<{
100
120
  email: z.ZodString;
121
+ recipient: z.ZodOptional<z.ZodObject<{
122
+ email: z.ZodString;
123
+ first_name: z.ZodString;
124
+ last_name: z.ZodString;
125
+ user_id: z.ZodNumber;
126
+ username: z.ZodString;
127
+ }, "strip", z.ZodTypeAny, {
128
+ username: string;
129
+ email: string;
130
+ first_name: string;
131
+ last_name: string;
132
+ user_id: number;
133
+ }, {
134
+ username: string;
135
+ email: string;
136
+ first_name: string;
137
+ last_name: string;
138
+ user_id: number;
139
+ }>>;
101
140
  reset_link: z.ZodString;
102
141
  sent_at: z.ZodDate;
103
142
  }, "strip", z.ZodTypeAny, {
104
143
  email: string;
105
144
  reset_link: string;
106
145
  sent_at: Date;
146
+ recipient?: {
147
+ username: string;
148
+ email: string;
149
+ first_name: string;
150
+ last_name: string;
151
+ user_id: number;
152
+ } | undefined;
107
153
  }, {
108
154
  email: string;
109
155
  reset_link: string;
110
156
  sent_at: Date;
157
+ recipient?: {
158
+ username: string;
159
+ email: string;
160
+ first_name: string;
161
+ last_name: string;
162
+ user_id: number;
163
+ } | undefined;
111
164
  }>;
112
165
  export type PasswordReset = z.infer<typeof PasswordResetSchema>;
113
166
  export declare const SignupLinkRequestedSchema: z.ZodObject<{
@@ -149,10 +202,6 @@ export declare const StaffPostApprovedSchema: z.ZodObject<{
149
202
  user_id: number;
150
203
  }>;
151
204
  }, "strip", z.ZodTypeAny, {
152
- approved_at: Date;
153
- post_id: number;
154
- post_slug: string;
155
- post_title: string;
156
205
  recipient: {
157
206
  username: string;
158
207
  email: string;
@@ -160,11 +209,11 @@ export declare const StaffPostApprovedSchema: z.ZodObject<{
160
209
  last_name: string;
161
210
  user_id: number;
162
211
  };
163
- }, {
164
212
  approved_at: Date;
165
213
  post_id: number;
166
214
  post_slug: string;
167
215
  post_title: string;
216
+ }, {
168
217
  recipient: {
169
218
  username: string;
170
219
  email: string;
@@ -172,6 +221,10 @@ export declare const StaffPostApprovedSchema: z.ZodObject<{
172
221
  last_name: string;
173
222
  user_id: number;
174
223
  };
224
+ approved_at: Date;
225
+ post_id: number;
226
+ post_slug: string;
227
+ post_title: string;
175
228
  }>;
176
229
  export type StaffPostApproved = z.infer<typeof StaffPostApprovedSchema>;
177
230
  export declare const StaffPostRejectedSchema: z.ZodObject<{
@@ -200,9 +253,6 @@ export declare const StaffPostRejectedSchema: z.ZodObject<{
200
253
  rejected_at: z.ZodDate;
201
254
  rejection_reason: z.ZodString;
202
255
  }, "strip", z.ZodTypeAny, {
203
- post_id: number;
204
- post_slug: string;
205
- post_title: string;
206
256
  recipient: {
207
257
  username: string;
208
258
  email: string;
@@ -210,12 +260,12 @@ export declare const StaffPostRejectedSchema: z.ZodObject<{
210
260
  last_name: string;
211
261
  user_id: number;
212
262
  };
213
- rejected_at: Date;
214
- rejection_reason: string;
215
- }, {
216
263
  post_id: number;
217
264
  post_slug: string;
218
265
  post_title: string;
266
+ rejected_at: Date;
267
+ rejection_reason: string;
268
+ }, {
219
269
  recipient: {
220
270
  username: string;
221
271
  email: string;
@@ -223,6 +273,9 @@ export declare const StaffPostRejectedSchema: z.ZodObject<{
223
273
  last_name: string;
224
274
  user_id: number;
225
275
  };
276
+ post_id: number;
277
+ post_slug: string;
278
+ post_title: string;
226
279
  rejected_at: Date;
227
280
  rejection_reason: string;
228
281
  }>;
@@ -252,9 +305,6 @@ export declare const StaffPostSubmittedSchema: z.ZodObject<{
252
305
  }>;
253
306
  submitted_at: z.ZodDate;
254
307
  }, "strip", z.ZodTypeAny, {
255
- post_id: number;
256
- post_slug: string;
257
- post_title: string;
258
308
  recipient: {
259
309
  username: string;
260
310
  email: string;
@@ -262,11 +312,11 @@ export declare const StaffPostSubmittedSchema: z.ZodObject<{
262
312
  last_name: string;
263
313
  user_id: number;
264
314
  };
265
- submitted_at: Date;
266
- }, {
267
315
  post_id: number;
268
316
  post_slug: string;
269
317
  post_title: string;
318
+ submitted_at: Date;
319
+ }, {
270
320
  recipient: {
271
321
  username: string;
272
322
  email: string;
@@ -274,21 +324,57 @@ export declare const StaffPostSubmittedSchema: z.ZodObject<{
274
324
  last_name: string;
275
325
  user_id: number;
276
326
  };
327
+ post_id: number;
328
+ post_slug: string;
329
+ post_title: string;
277
330
  submitted_at: Date;
278
331
  }>;
279
332
  export type StaffPostSubmitted = z.infer<typeof StaffPostSubmittedSchema>;
280
333
  export declare const TwoFactorOtpRequestedSchema: z.ZodObject<{
281
334
  email: z.ZodString;
282
335
  otp: z.ZodString;
336
+ recipient: z.ZodOptional<z.ZodObject<{
337
+ email: z.ZodString;
338
+ first_name: z.ZodString;
339
+ last_name: z.ZodString;
340
+ user_id: z.ZodNumber;
341
+ username: z.ZodString;
342
+ }, "strip", z.ZodTypeAny, {
343
+ username: string;
344
+ email: string;
345
+ first_name: string;
346
+ last_name: string;
347
+ user_id: number;
348
+ }, {
349
+ username: string;
350
+ email: string;
351
+ first_name: string;
352
+ last_name: string;
353
+ user_id: number;
354
+ }>>;
283
355
  sent_at: z.ZodDate;
284
356
  }, "strip", z.ZodTypeAny, {
285
357
  email: string;
286
358
  sent_at: Date;
287
359
  otp: string;
360
+ recipient?: {
361
+ username: string;
362
+ email: string;
363
+ first_name: string;
364
+ last_name: string;
365
+ user_id: number;
366
+ } | undefined;
288
367
  }, {
289
368
  email: string;
290
369
  sent_at: Date;
291
370
  otp: string;
371
+ recipient?: {
372
+ username: string;
373
+ email: string;
374
+ first_name: string;
375
+ last_name: string;
376
+ user_id: number;
377
+ } | undefined;
292
378
  }>;
293
379
  export type TwoFactorOtpRequested = z.infer<typeof TwoFactorOtpRequestedSchema>;
294
380
  export declare const UserBannedSchema: z.ZodObject<{
@@ -562,10 +648,10 @@ export declare const FeedbackSubmittedSchema: z.ZodObject<{
562
648
  last_name: string;
563
649
  user_id: number;
564
650
  };
651
+ recipient_email: string;
565
652
  submitted_at: Date;
566
653
  contact_me: boolean;
567
654
  feedback_category: "other" | "bug" | "feature_request" | "general";
568
- recipient_email: string;
569
655
  user_profile_url: string;
570
656
  page_url?: string | undefined;
571
657
  }, {
@@ -577,10 +663,10 @@ export declare const FeedbackSubmittedSchema: z.ZodObject<{
577
663
  last_name: string;
578
664
  user_id: number;
579
665
  };
666
+ recipient_email: string;
580
667
  submitted_at: Date;
581
668
  contact_me: boolean;
582
669
  feedback_category: "other" | "bug" | "feature_request" | "general";
583
- recipient_email: string;
584
670
  user_profile_url: string;
585
671
  page_url?: string | undefined;
586
672
  }>;
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.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;
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.CustomEmailRequestedSchema = 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",
@@ -64,6 +64,13 @@ exports.BanTypeSchema = z.enum([
64
64
  "permanent",
65
65
  "temporary",
66
66
  ]);
67
+ exports.CustomEmailRequestedSchema = z.object({
68
+ "email_subject": z.string(),
69
+ "message": z.string(),
70
+ "recipient_email": z.string(),
71
+ "reply_to": z.string().optional(),
72
+ "requested_at": z.coerce.date(),
73
+ });
67
74
  exports.UserSchema = z.object({
68
75
  "email": z.string(),
69
76
  "first_name": z.string(),
@@ -86,6 +93,7 @@ exports.NotificationActorSchema = z.object({
86
93
  });
87
94
  exports.PasswordResetSchema = z.object({
88
95
  "email": z.string(),
96
+ "recipient": exports.UserSchema.optional(),
89
97
  "reset_link": z.string(),
90
98
  "sent_at": z.coerce.date(),
91
99
  });
@@ -119,6 +127,7 @@ exports.StaffPostSubmittedSchema = z.object({
119
127
  exports.TwoFactorOtpRequestedSchema = z.object({
120
128
  "email": z.string(),
121
129
  "otp": z.string(),
130
+ "recipient": exports.UserSchema.optional(),
122
131
  "sent_at": z.coerce.date(),
123
132
  });
124
133
  exports.UserBannedSchema = z.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sankira-dev/event-types",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "Event Types for Sankira",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -20,5 +20,5 @@
20
20
  "dependencies": {
21
21
  "zod": "^3.25.7"
22
22
  },
23
- "backendVersion": "v1.0.1"
23
+ "backendVersion": "v1.1.0"
24
24
  }