@skillstew/common 1.0.22 → 1.0.23

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.
@@ -1,5 +1,12 @@
1
1
  import z from "zod";
2
2
  export declare const EventSchemas: {
3
+ readonly "skill.created": z.ZodObject<{
4
+ id: z.ZodUUID;
5
+ name: z.ZodString;
6
+ normalizedName: z.ZodString;
7
+ alternateNames: z.ZodArray<z.ZodString>;
8
+ status: z.ZodString;
9
+ }, z.core.$strip>;
3
10
  readonly "user.registered": z.ZodObject<{
4
11
  id: z.ZodUUID;
5
12
  email: z.ZodEmail;
@@ -2,5 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EventSchemas = void 0;
4
4
  const userEventsSchema_1 = require("./schemas/userEventsSchema");
5
+ const skillsEventSchemas_1 = require("./schemas/skillsEventSchemas");
5
6
  // Union of all app event schemas
6
- exports.EventSchemas = Object.assign({}, userEventsSchema_1.UserEventSchemas);
7
+ exports.EventSchemas = Object.assign(Object.assign({}, userEventsSchema_1.UserEventSchemas), skillsEventSchemas_1.SkillsEventSchemas);
@@ -0,0 +1,17 @@
1
+ import z from "zod";
2
+ export declare const skillCreatedSchema: z.ZodObject<{
3
+ id: z.ZodUUID;
4
+ name: z.ZodString;
5
+ normalizedName: z.ZodString;
6
+ alternateNames: z.ZodArray<z.ZodString>;
7
+ status: z.ZodString;
8
+ }, z.core.$strip>;
9
+ export declare const SkillsEventSchemas: {
10
+ readonly "skill.created": z.ZodObject<{
11
+ id: z.ZodUUID;
12
+ name: z.ZodString;
13
+ normalizedName: z.ZodString;
14
+ alternateNames: z.ZodArray<z.ZodString>;
15
+ status: z.ZodString;
16
+ }, z.core.$strip>;
17
+ };
@@ -0,0 +1,17 @@
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.SkillsEventSchemas = exports.skillCreatedSchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ exports.skillCreatedSchema = zod_1.default.object({
9
+ id: zod_1.default.uuid(),
10
+ name: zod_1.default.string(),
11
+ normalizedName: zod_1.default.string(),
12
+ alternateNames: zod_1.default.array(zod_1.default.string()),
13
+ status: zod_1.default.string(),
14
+ });
15
+ exports.SkillsEventSchemas = {
16
+ "skill.created": exports.skillCreatedSchema,
17
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skillstew/common",
3
- "version": "1.0.22",
3
+ "version": "1.0.23",
4
4
  "main": "./build/index.js",
5
5
  "types": "./build/index.d.ts",
6
6
  "scripts": {
package/publish.sh CHANGED
@@ -18,7 +18,7 @@ git add .
18
18
  # Step 4: Prompt for a commit message
19
19
  echo "Enter commit message:"
20
20
  read COMMIT_MESSAGE
21
- git commit -m "[common] $COMMIT_MESSAGE"
21
+ git commit -m "$COMMIT_MESSAGE"
22
22
 
23
23
  # Step 5: Push to GitHub
24
24
  git push
@@ -1,10 +1,12 @@
1
1
  import z from "zod";
2
2
  import { UserEventSchemas } from "./schemas/userEventsSchema";
3
+ import { SkillsEventSchemas } from "./schemas/skillsEventSchemas";
3
4
 
4
5
  // Union of all app event schemas
5
6
 
6
7
  export const EventSchemas = {
7
8
  ...UserEventSchemas,
9
+ ...SkillsEventSchemas,
8
10
  } as const;
9
11
 
10
12
  // Union of all app event names
@@ -0,0 +1,13 @@
1
+ import z from "zod";
2
+
3
+ export const skillCreatedSchema = z.object({
4
+ id: z.uuid(),
5
+ name: z.string(),
6
+ normalizedName: z.string(),
7
+ alternateNames: z.array(z.string()),
8
+ status: z.string(),
9
+ });
10
+
11
+ export const SkillsEventSchemas = {
12
+ "skill.created": skillCreatedSchema,
13
+ } as const;