@skillstew/common 1.0.39 → 1.0.40

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.
@@ -7,6 +7,4 @@ export interface AppEvent<T extends EventName> {
7
7
  data: EventPayload<T>;
8
8
  traceId?: string;
9
9
  }
10
- export type UserRegisteredEvent = AppEvent<"user.registered">;
11
- export type UserVerifiedEvent = AppEvent<"user.verified">;
12
10
  export type AnyAppEvent = AppEvent<EventName>;
@@ -1,9 +1,13 @@
1
1
  import z from "zod";
2
2
  export declare const EventSchemas: {
3
+ readonly "resendVerificationLink.requested": z.ZodObject<{
4
+ email: z.ZodEmail;
5
+ token: z.ZodString;
6
+ }, z.core.$strip>;
3
7
  readonly "expert.registered": z.ZodObject<{
4
8
  id: z.ZodUUID;
5
9
  email: z.ZodEmail;
6
- token: z.ZodString;
10
+ token: z.ZodOptional<z.ZodString>;
7
11
  }, z.core.$strip>;
8
12
  readonly "expert.onboarded": z.ZodObject<{
9
13
  expertId: z.ZodUUID;
@@ -70,6 +74,7 @@ export declare const EventSchemas: {
70
74
  readonly "user.registered": z.ZodObject<{
71
75
  id: z.ZodUUID;
72
76
  email: z.ZodEmail;
77
+ token: z.ZodOptional<z.ZodString>;
73
78
  }, z.core.$strip>;
74
79
  readonly "user.verified": z.ZodObject<{
75
80
  id: z.ZodUUID;
@@ -5,7 +5,8 @@ const userEventsSchema_1 = require("./schemas/userEventsSchema");
5
5
  const skillsEventSchemas_1 = require("./schemas/skillsEventSchemas");
6
6
  const userConnectionEventSchemas_1 = require("./schemas/userConnectionEventSchemas");
7
7
  const expertEventsSchema_1 = require("./schemas/expertEventsSchema");
8
+ const authEventSchemas_1 = require("./schemas/authEventSchemas");
8
9
  // Union of all app event schemas
9
- exports.EventSchemas = Object.assign(Object.assign(Object.assign(Object.assign({}, userEventsSchema_1.UserEventSchemas), skillsEventSchemas_1.SkillsEventSchemas), userConnectionEventSchemas_1.ConnectionEventSchemas), expertEventsSchema_1.ExpertEventSchemas);
10
+ exports.EventSchemas = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, userEventsSchema_1.UserEventSchemas), skillsEventSchemas_1.SkillsEventSchemas), userConnectionEventSchemas_1.ConnectionEventSchemas), expertEventsSchema_1.ExpertEventSchemas), authEventSchemas_1.AuthEventSchemas);
10
11
  // Array of all event names
11
12
  exports.EventName = Object.keys(exports.EventSchemas);
@@ -0,0 +1,11 @@
1
+ import z from "zod";
2
+ export declare const resendVerificationLinkRequestedSchema: z.ZodObject<{
3
+ email: z.ZodEmail;
4
+ token: z.ZodString;
5
+ }, z.core.$strip>;
6
+ export declare const AuthEventSchemas: {
7
+ readonly "resendVerificationLink.requested": z.ZodObject<{
8
+ email: z.ZodEmail;
9
+ token: z.ZodString;
10
+ }, z.core.$strip>;
11
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.AuthEventSchemas = exports.resendVerificationLinkRequestedSchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ exports.resendVerificationLinkRequestedSchema = zod_1.default.object({
9
+ email: zod_1.default.email(),
10
+ token: zod_1.default.string(),
11
+ });
12
+ exports.AuthEventSchemas = {
13
+ "resendVerificationLink.requested": exports.resendVerificationLinkRequestedSchema,
14
+ };
@@ -2,7 +2,7 @@ import z from "zod";
2
2
  export declare const expertRegisteredSchema: z.ZodObject<{
3
3
  id: z.ZodUUID;
4
4
  email: z.ZodEmail;
5
- token: z.ZodString;
5
+ token: z.ZodOptional<z.ZodString>;
6
6
  }, z.core.$strip>;
7
7
  export declare const newExpertOnboardedSchema: z.ZodObject<{
8
8
  expertId: z.ZodUUID;
@@ -18,7 +18,7 @@ export declare const ExpertEventSchemas: {
18
18
  readonly "expert.registered": z.ZodObject<{
19
19
  id: z.ZodUUID;
20
20
  email: z.ZodEmail;
21
- token: z.ZodString;
21
+ token: z.ZodOptional<z.ZodString>;
22
22
  }, z.core.$strip>;
23
23
  readonly "expert.onboarded": z.ZodObject<{
24
24
  expertId: z.ZodUUID;
@@ -8,7 +8,7 @@ const zod_1 = __importDefault(require("zod"));
8
8
  exports.expertRegisteredSchema = zod_1.default.object({
9
9
  id: zod_1.default.uuid(),
10
10
  email: zod_1.default.email(),
11
- token: zod_1.default.string(),
11
+ token: zod_1.default.string().optional(),
12
12
  });
13
13
  exports.newExpertOnboardedSchema = zod_1.default.object({
14
14
  expertId: zod_1.default.uuid(),
@@ -2,6 +2,7 @@ import z from "zod";
2
2
  export declare const userRegisteredSchema: z.ZodObject<{
3
3
  id: z.ZodUUID;
4
4
  email: z.ZodEmail;
5
+ token: z.ZodOptional<z.ZodString>;
5
6
  }, z.core.$strip>;
6
7
  export declare const userVerifiedSchema: z.ZodObject<{
7
8
  id: z.ZodUUID;
@@ -22,6 +23,7 @@ export declare const UserEventSchemas: {
22
23
  readonly "user.registered": z.ZodObject<{
23
24
  id: z.ZodUUID;
24
25
  email: z.ZodEmail;
26
+ token: z.ZodOptional<z.ZodString>;
25
27
  }, z.core.$strip>;
26
28
  readonly "user.verified": z.ZodObject<{
27
29
  id: z.ZodUUID;
@@ -8,6 +8,7 @@ const zod_1 = __importDefault(require("zod"));
8
8
  exports.userRegisteredSchema = zod_1.default.object({
9
9
  id: zod_1.default.uuid(),
10
10
  email: zod_1.default.email(),
11
+ token: zod_1.default.string().optional(),
11
12
  });
12
13
  exports.userVerifiedSchema = zod_1.default.object({
13
14
  id: zod_1.default.uuid(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skillstew/common",
3
- "version": "1.0.39",
3
+ "version": "1.0.40",
4
4
  "main": "./build/index.js",
5
5
  "types": "./build/index.d.ts",
6
6
  "scripts": {
@@ -9,7 +9,4 @@ export interface AppEvent<T extends EventName> {
9
9
  traceId?: string;
10
10
  }
11
11
 
12
- export type UserRegisteredEvent = AppEvent<"user.registered">;
13
- export type UserVerifiedEvent = AppEvent<"user.verified">;
14
-
15
12
  export type AnyAppEvent = AppEvent<EventName>;
@@ -3,6 +3,7 @@ import { UserEventSchemas } from "./schemas/userEventsSchema";
3
3
  import { SkillsEventSchemas } from "./schemas/skillsEventSchemas";
4
4
  import { ConnectionEventSchemas } from "./schemas/userConnectionEventSchemas";
5
5
  import { ExpertEventSchemas } from "./schemas/expertEventsSchema";
6
+ import { AuthEventSchemas } from "./schemas/authEventSchemas";
6
7
 
7
8
  // Union of all app event schemas
8
9
 
@@ -11,6 +12,7 @@ export const EventSchemas = {
11
12
  ...SkillsEventSchemas,
12
13
  ...ConnectionEventSchemas,
13
14
  ...ExpertEventSchemas,
15
+ ...AuthEventSchemas,
14
16
  } as const;
15
17
 
16
18
  // Array of all event names
@@ -0,0 +1,10 @@
1
+ import z from "zod";
2
+
3
+ export const resendVerificationLinkRequestedSchema = z.object({
4
+ email: z.email(),
5
+ token: z.string(),
6
+ });
7
+
8
+ export const AuthEventSchemas = {
9
+ "resendVerificationLink.requested": resendVerificationLinkRequestedSchema,
10
+ } as const;
@@ -3,7 +3,7 @@ import z from "zod";
3
3
  export const expertRegisteredSchema = z.object({
4
4
  id: z.uuid(),
5
5
  email: z.email(),
6
- token: z.string(),
6
+ token: z.string().optional(),
7
7
  });
8
8
 
9
9
  export const newExpertOnboardedSchema = z.object({
@@ -3,6 +3,7 @@ import z from "zod";
3
3
  export const userRegisteredSchema = z.object({
4
4
  id: z.uuid(),
5
5
  email: z.email(),
6
+ token: z.string().optional(),
6
7
  });
7
8
 
8
9
  export const userVerifiedSchema = z.object({