@skillstew/common 1.0.23 → 1.0.24
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/build/events/EventMap.d.ts +25 -0
- package/build/events/schemas/skillsEventSchemas.d.ts +30 -0
- package/build/events/schemas/skillsEventSchemas.js +11 -1
- package/build/events/schemas/userEventsSchema.d.ts +20 -0
- package/build/events/schemas/userEventsSchema.js +9 -1
- package/package.json +1 -1
- package/src/events/schemas/skillsEventSchemas.ts +13 -0
- package/src/events/schemas/userEventsSchema.ts +9 -0
|
@@ -7,6 +7,21 @@ export declare const EventSchemas: {
|
|
|
7
7
|
alternateNames: z.ZodArray<z.ZodString>;
|
|
8
8
|
status: z.ZodString;
|
|
9
9
|
}, z.core.$strip>;
|
|
10
|
+
readonly "skill.profileUpdated": z.ZodObject<{
|
|
11
|
+
userId: z.ZodUUID;
|
|
12
|
+
offered: z.ZodArray<z.ZodString>;
|
|
13
|
+
wanted: z.ZodArray<z.ZodString>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
readonly "skill.updated": z.ZodObject<{
|
|
16
|
+
id: z.ZodUUID;
|
|
17
|
+
name: z.ZodString;
|
|
18
|
+
normalizedName: z.ZodString;
|
|
19
|
+
alternateNames: z.ZodArray<z.ZodString>;
|
|
20
|
+
status: z.ZodString;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
readonly "skill.deleted": z.ZodObject<{
|
|
23
|
+
id: z.ZodUUID;
|
|
24
|
+
}, z.core.$strip>;
|
|
10
25
|
readonly "user.registered": z.ZodObject<{
|
|
11
26
|
id: z.ZodUUID;
|
|
12
27
|
email: z.ZodEmail;
|
|
@@ -14,6 +29,16 @@ export declare const EventSchemas: {
|
|
|
14
29
|
readonly "user.verified": z.ZodObject<{
|
|
15
30
|
id: z.ZodUUID;
|
|
16
31
|
}, z.core.$strip>;
|
|
32
|
+
readonly "user.profileUpdated": z.ZodObject<{
|
|
33
|
+
id: z.ZodUUID;
|
|
34
|
+
name: z.ZodString;
|
|
35
|
+
username: z.ZodString;
|
|
36
|
+
location: z.ZodObject<{
|
|
37
|
+
latitude: z.ZodNumber;
|
|
38
|
+
longitude: z.ZodNumber;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
languages: z.ZodArray<z.ZodString>;
|
|
41
|
+
}, z.core.$strip>;
|
|
17
42
|
};
|
|
18
43
|
export type EventName = keyof typeof EventSchemas;
|
|
19
44
|
export type EventPayload<T extends EventName> = z.infer<(typeof EventSchemas)[T]>;
|
|
@@ -6,6 +6,21 @@ export declare const skillCreatedSchema: z.ZodObject<{
|
|
|
6
6
|
alternateNames: z.ZodArray<z.ZodString>;
|
|
7
7
|
status: z.ZodString;
|
|
8
8
|
}, z.core.$strip>;
|
|
9
|
+
export declare const skillUpdatedSchema: z.ZodObject<{
|
|
10
|
+
id: z.ZodUUID;
|
|
11
|
+
name: z.ZodString;
|
|
12
|
+
normalizedName: z.ZodString;
|
|
13
|
+
alternateNames: z.ZodArray<z.ZodString>;
|
|
14
|
+
status: z.ZodString;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export declare const skillDeletedSchema: z.ZodObject<{
|
|
17
|
+
id: z.ZodUUID;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export declare const skillProfileUpdatedSchema: z.ZodObject<{
|
|
20
|
+
userId: z.ZodUUID;
|
|
21
|
+
offered: z.ZodArray<z.ZodString>;
|
|
22
|
+
wanted: z.ZodArray<z.ZodString>;
|
|
23
|
+
}, z.core.$strip>;
|
|
9
24
|
export declare const SkillsEventSchemas: {
|
|
10
25
|
readonly "skill.created": z.ZodObject<{
|
|
11
26
|
id: z.ZodUUID;
|
|
@@ -14,4 +29,19 @@ export declare const SkillsEventSchemas: {
|
|
|
14
29
|
alternateNames: z.ZodArray<z.ZodString>;
|
|
15
30
|
status: z.ZodString;
|
|
16
31
|
}, z.core.$strip>;
|
|
32
|
+
readonly "skill.profileUpdated": z.ZodObject<{
|
|
33
|
+
userId: z.ZodUUID;
|
|
34
|
+
offered: z.ZodArray<z.ZodString>;
|
|
35
|
+
wanted: z.ZodArray<z.ZodString>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
readonly "skill.updated": z.ZodObject<{
|
|
38
|
+
id: z.ZodUUID;
|
|
39
|
+
name: z.ZodString;
|
|
40
|
+
normalizedName: z.ZodString;
|
|
41
|
+
alternateNames: z.ZodArray<z.ZodString>;
|
|
42
|
+
status: z.ZodString;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
readonly "skill.deleted": z.ZodObject<{
|
|
45
|
+
id: z.ZodUUID;
|
|
46
|
+
}, z.core.$strip>;
|
|
17
47
|
};
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.SkillsEventSchemas = exports.skillCreatedSchema = void 0;
|
|
6
|
+
exports.SkillsEventSchemas = exports.skillProfileUpdatedSchema = exports.skillDeletedSchema = exports.skillUpdatedSchema = exports.skillCreatedSchema = void 0;
|
|
7
7
|
const zod_1 = __importDefault(require("zod"));
|
|
8
8
|
exports.skillCreatedSchema = zod_1.default.object({
|
|
9
9
|
id: zod_1.default.uuid(),
|
|
@@ -12,6 +12,16 @@ exports.skillCreatedSchema = zod_1.default.object({
|
|
|
12
12
|
alternateNames: zod_1.default.array(zod_1.default.string()),
|
|
13
13
|
status: zod_1.default.string(),
|
|
14
14
|
});
|
|
15
|
+
exports.skillUpdatedSchema = exports.skillCreatedSchema;
|
|
16
|
+
exports.skillDeletedSchema = zod_1.default.object({ id: zod_1.default.uuid() });
|
|
17
|
+
exports.skillProfileUpdatedSchema = zod_1.default.object({
|
|
18
|
+
userId: zod_1.default.uuid(),
|
|
19
|
+
offered: zod_1.default.array(zod_1.default.string()),
|
|
20
|
+
wanted: zod_1.default.array(zod_1.default.string()),
|
|
21
|
+
});
|
|
15
22
|
exports.SkillsEventSchemas = {
|
|
16
23
|
"skill.created": exports.skillCreatedSchema,
|
|
24
|
+
"skill.profileUpdated": exports.skillProfileUpdatedSchema,
|
|
25
|
+
"skill.updated": exports.skillUpdatedSchema,
|
|
26
|
+
"skill.deleted": exports.skillDeletedSchema,
|
|
17
27
|
};
|
|
@@ -6,6 +6,16 @@ export declare const userRegisteredSchema: z.ZodObject<{
|
|
|
6
6
|
export declare const userVerifiedSchema: z.ZodObject<{
|
|
7
7
|
id: z.ZodUUID;
|
|
8
8
|
}, z.core.$strip>;
|
|
9
|
+
export declare const userProfileUpdatedSchema: z.ZodObject<{
|
|
10
|
+
id: z.ZodUUID;
|
|
11
|
+
name: z.ZodString;
|
|
12
|
+
username: z.ZodString;
|
|
13
|
+
location: z.ZodObject<{
|
|
14
|
+
latitude: z.ZodNumber;
|
|
15
|
+
longitude: z.ZodNumber;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
languages: z.ZodArray<z.ZodString>;
|
|
18
|
+
}, z.core.$strip>;
|
|
9
19
|
export declare const UserEventSchemas: {
|
|
10
20
|
readonly "user.registered": z.ZodObject<{
|
|
11
21
|
id: z.ZodUUID;
|
|
@@ -14,4 +24,14 @@ export declare const UserEventSchemas: {
|
|
|
14
24
|
readonly "user.verified": z.ZodObject<{
|
|
15
25
|
id: z.ZodUUID;
|
|
16
26
|
}, z.core.$strip>;
|
|
27
|
+
readonly "user.profileUpdated": z.ZodObject<{
|
|
28
|
+
id: z.ZodUUID;
|
|
29
|
+
name: z.ZodString;
|
|
30
|
+
username: z.ZodString;
|
|
31
|
+
location: z.ZodObject<{
|
|
32
|
+
latitude: z.ZodNumber;
|
|
33
|
+
longitude: z.ZodNumber;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
languages: z.ZodArray<z.ZodString>;
|
|
36
|
+
}, z.core.$strip>;
|
|
17
37
|
};
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.UserEventSchemas = exports.userVerifiedSchema = exports.userRegisteredSchema = void 0;
|
|
6
|
+
exports.UserEventSchemas = exports.userProfileUpdatedSchema = exports.userVerifiedSchema = exports.userRegisteredSchema = void 0;
|
|
7
7
|
const zod_1 = __importDefault(require("zod"));
|
|
8
8
|
exports.userRegisteredSchema = zod_1.default.object({
|
|
9
9
|
id: zod_1.default.uuid(),
|
|
@@ -12,7 +12,15 @@ exports.userRegisteredSchema = zod_1.default.object({
|
|
|
12
12
|
exports.userVerifiedSchema = zod_1.default.object({
|
|
13
13
|
id: zod_1.default.uuid(),
|
|
14
14
|
});
|
|
15
|
+
exports.userProfileUpdatedSchema = zod_1.default.object({
|
|
16
|
+
id: zod_1.default.uuid(),
|
|
17
|
+
name: zod_1.default.string(),
|
|
18
|
+
username: zod_1.default.string(),
|
|
19
|
+
location: zod_1.default.object({ latitude: zod_1.default.number(), longitude: zod_1.default.number() }),
|
|
20
|
+
languages: zod_1.default.array(zod_1.default.string()),
|
|
21
|
+
});
|
|
15
22
|
exports.UserEventSchemas = {
|
|
16
23
|
"user.registered": exports.userRegisteredSchema,
|
|
17
24
|
"user.verified": exports.userVerifiedSchema,
|
|
25
|
+
"user.profileUpdated": exports.userProfileUpdatedSchema,
|
|
18
26
|
};
|
package/package.json
CHANGED
|
@@ -8,6 +8,19 @@ export const skillCreatedSchema = z.object({
|
|
|
8
8
|
status: z.string(),
|
|
9
9
|
});
|
|
10
10
|
|
|
11
|
+
export const skillUpdatedSchema = skillCreatedSchema;
|
|
12
|
+
|
|
13
|
+
export const skillDeletedSchema = z.object({ id: z.uuid() });
|
|
14
|
+
|
|
15
|
+
export const skillProfileUpdatedSchema = z.object({
|
|
16
|
+
userId: z.uuid(),
|
|
17
|
+
offered: z.array(z.string()),
|
|
18
|
+
wanted: z.array(z.string()),
|
|
19
|
+
});
|
|
20
|
+
|
|
11
21
|
export const SkillsEventSchemas = {
|
|
12
22
|
"skill.created": skillCreatedSchema,
|
|
23
|
+
"skill.profileUpdated": skillProfileUpdatedSchema,
|
|
24
|
+
"skill.updated": skillUpdatedSchema,
|
|
25
|
+
"skill.deleted": skillDeletedSchema,
|
|
13
26
|
} as const;
|
|
@@ -9,7 +9,16 @@ export const userVerifiedSchema = z.object({
|
|
|
9
9
|
id: z.uuid(),
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
+
export const userProfileUpdatedSchema = z.object({
|
|
13
|
+
id: z.uuid(),
|
|
14
|
+
name: z.string(),
|
|
15
|
+
username: z.string(),
|
|
16
|
+
location: z.object({ latitude: z.number(), longitude: z.number() }),
|
|
17
|
+
languages: z.array(z.string()),
|
|
18
|
+
});
|
|
19
|
+
|
|
12
20
|
export const UserEventSchemas = {
|
|
13
21
|
"user.registered": userRegisteredSchema,
|
|
14
22
|
"user.verified": userVerifiedSchema,
|
|
23
|
+
"user.profileUpdated": userProfileUpdatedSchema,
|
|
15
24
|
} as const;
|