@skillstew/common 1.0.45 → 1.0.47
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 +28 -0
- package/build/events/schemas/expertEventsSchema.d.ts +16 -0
- package/build/events/schemas/expertEventsSchema.js +10 -1
- package/build/events/schemas/skillsEventSchemas.d.ts +40 -0
- package/build/events/schemas/skillsEventSchemas.js +24 -1
- package/package.json +1 -1
- package/src/events/schemas/expertEventsSchema.ts +10 -0
- package/src/events/schemas/skillsEventSchemas.ts +26 -0
|
@@ -33,6 +33,14 @@ export declare const EventSchemas: {
|
|
|
33
33
|
readonly "expert.verified": z.ZodObject<{
|
|
34
34
|
id: z.ZodUUID;
|
|
35
35
|
}, z.core.$strip>;
|
|
36
|
+
readonly "expert.application.submitted": z.ZodObject<{
|
|
37
|
+
applicationId: z.ZodUUID;
|
|
38
|
+
expertId: z.ZodUUID;
|
|
39
|
+
expertUsername: z.ZodOptional<z.ZodString>;
|
|
40
|
+
expertEmail: z.ZodEmail;
|
|
41
|
+
adminRecipientIds: z.ZodArray<z.ZodUUID>;
|
|
42
|
+
submittedAt: z.ZodCoercedDate<unknown>;
|
|
43
|
+
}, z.core.$strip>;
|
|
36
44
|
readonly "expert.application.approved": z.ZodObject<{
|
|
37
45
|
expertId: z.ZodUUID;
|
|
38
46
|
email: z.ZodEmail;
|
|
@@ -96,6 +104,26 @@ export declare const EventSchemas: {
|
|
|
96
104
|
readonly "skill.deleted": z.ZodObject<{
|
|
97
105
|
id: z.ZodUUID;
|
|
98
106
|
}, z.core.$strip>;
|
|
107
|
+
readonly "workshop.published": z.ZodObject<{
|
|
108
|
+
id: z.ZodUUID;
|
|
109
|
+
expertId: z.ZodString;
|
|
110
|
+
title: z.ZodString;
|
|
111
|
+
description: z.ZodNullable<z.ZodString>;
|
|
112
|
+
targetAudience: z.ZodNullable<z.ZodString>;
|
|
113
|
+
bannerImageKey: z.ZodNullable<z.ZodString>;
|
|
114
|
+
maxCohortSize: z.ZodNumber;
|
|
115
|
+
timezone: z.ZodString;
|
|
116
|
+
publishedAt: z.ZodISODateTime;
|
|
117
|
+
sessions: z.ZodArray<z.ZodObject<{
|
|
118
|
+
id: z.ZodUUID;
|
|
119
|
+
weekNumber: z.ZodNumber;
|
|
120
|
+
dayOfWeek: z.ZodNumber;
|
|
121
|
+
sessionOrder: z.ZodNumber;
|
|
122
|
+
title: z.ZodNullable<z.ZodString>;
|
|
123
|
+
description: z.ZodNullable<z.ZodString>;
|
|
124
|
+
startTime: z.ZodString;
|
|
125
|
+
}, z.core.$strip>>;
|
|
126
|
+
}, z.core.$strict>;
|
|
99
127
|
readonly "user.registered": z.ZodObject<{
|
|
100
128
|
id: z.ZodUUID;
|
|
101
129
|
email: z.ZodEmail;
|
|
@@ -22,6 +22,14 @@ export declare const expertApplicationApprovedSchema: z.ZodObject<{
|
|
|
22
22
|
email: z.ZodEmail;
|
|
23
23
|
approvedAt: z.ZodCoercedDate<unknown>;
|
|
24
24
|
}, z.core.$strip>;
|
|
25
|
+
export declare const expertApplicationSubmittedSchema: z.ZodObject<{
|
|
26
|
+
applicationId: z.ZodUUID;
|
|
27
|
+
expertId: z.ZodUUID;
|
|
28
|
+
expertUsername: z.ZodOptional<z.ZodString>;
|
|
29
|
+
expertEmail: z.ZodEmail;
|
|
30
|
+
adminRecipientIds: z.ZodArray<z.ZodUUID>;
|
|
31
|
+
submittedAt: z.ZodCoercedDate<unknown>;
|
|
32
|
+
}, z.core.$strip>;
|
|
25
33
|
export declare const expertApplicationRejectedSchema: z.ZodObject<{
|
|
26
34
|
expertId: z.ZodUUID;
|
|
27
35
|
email: z.ZodEmail;
|
|
@@ -47,6 +55,14 @@ export declare const ExpertEventSchemas: {
|
|
|
47
55
|
readonly "expert.verified": z.ZodObject<{
|
|
48
56
|
id: z.ZodUUID;
|
|
49
57
|
}, z.core.$strip>;
|
|
58
|
+
readonly "expert.application.submitted": z.ZodObject<{
|
|
59
|
+
applicationId: z.ZodUUID;
|
|
60
|
+
expertId: z.ZodUUID;
|
|
61
|
+
expertUsername: z.ZodOptional<z.ZodString>;
|
|
62
|
+
expertEmail: z.ZodEmail;
|
|
63
|
+
adminRecipientIds: z.ZodArray<z.ZodUUID>;
|
|
64
|
+
submittedAt: z.ZodCoercedDate<unknown>;
|
|
65
|
+
}, z.core.$strip>;
|
|
50
66
|
readonly "expert.application.approved": z.ZodObject<{
|
|
51
67
|
expertId: z.ZodUUID;
|
|
52
68
|
email: z.ZodEmail;
|
|
@@ -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.ExpertEventSchemas = exports.expertApplicationRejectedSchema = exports.expertApplicationApprovedSchema = exports.expertVerifiedSchema = exports.newExpertOnboardedSchema = exports.expertRegisteredSchema = void 0;
|
|
6
|
+
exports.ExpertEventSchemas = exports.expertApplicationRejectedSchema = exports.expertApplicationSubmittedSchema = exports.expertApplicationApprovedSchema = exports.expertVerifiedSchema = exports.newExpertOnboardedSchema = exports.expertRegisteredSchema = void 0;
|
|
7
7
|
const zod_1 = __importDefault(require("zod"));
|
|
8
8
|
exports.expertRegisteredSchema = zod_1.default.object({
|
|
9
9
|
id: zod_1.default.uuid(),
|
|
@@ -28,6 +28,14 @@ exports.expertApplicationApprovedSchema = zod_1.default.object({
|
|
|
28
28
|
email: zod_1.default.email(),
|
|
29
29
|
approvedAt: zod_1.default.coerce.date(),
|
|
30
30
|
});
|
|
31
|
+
exports.expertApplicationSubmittedSchema = zod_1.default.object({
|
|
32
|
+
applicationId: zod_1.default.uuid(),
|
|
33
|
+
expertId: zod_1.default.uuid(),
|
|
34
|
+
expertUsername: zod_1.default.string().optional(),
|
|
35
|
+
expertEmail: zod_1.default.email(),
|
|
36
|
+
adminRecipientIds: zod_1.default.array(zod_1.default.uuid()),
|
|
37
|
+
submittedAt: zod_1.default.coerce.date(),
|
|
38
|
+
});
|
|
31
39
|
exports.expertApplicationRejectedSchema = zod_1.default.object({
|
|
32
40
|
expertId: zod_1.default.uuid(),
|
|
33
41
|
email: zod_1.default.email(),
|
|
@@ -38,6 +46,7 @@ exports.ExpertEventSchemas = {
|
|
|
38
46
|
"expert.registered": exports.expertRegisteredSchema,
|
|
39
47
|
"expert.onboarded": exports.newExpertOnboardedSchema,
|
|
40
48
|
"expert.verified": exports.expertVerifiedSchema,
|
|
49
|
+
"expert.application.submitted": exports.expertApplicationSubmittedSchema,
|
|
41
50
|
"expert.application.approved": exports.expertApplicationApprovedSchema,
|
|
42
51
|
"expert.application.rejected": exports.expertApplicationRejectedSchema,
|
|
43
52
|
};
|
|
@@ -27,6 +27,26 @@ export declare const skillProfileUpdatedSchema: z.ZodObject<{
|
|
|
27
27
|
name: z.ZodString;
|
|
28
28
|
}, z.core.$strip>>;
|
|
29
29
|
}, z.core.$strict>;
|
|
30
|
+
export declare const workshopPublishedSchema: z.ZodObject<{
|
|
31
|
+
id: z.ZodUUID;
|
|
32
|
+
expertId: z.ZodString;
|
|
33
|
+
title: z.ZodString;
|
|
34
|
+
description: z.ZodNullable<z.ZodString>;
|
|
35
|
+
targetAudience: z.ZodNullable<z.ZodString>;
|
|
36
|
+
bannerImageKey: z.ZodNullable<z.ZodString>;
|
|
37
|
+
maxCohortSize: z.ZodNumber;
|
|
38
|
+
timezone: z.ZodString;
|
|
39
|
+
publishedAt: z.ZodISODateTime;
|
|
40
|
+
sessions: z.ZodArray<z.ZodObject<{
|
|
41
|
+
id: z.ZodUUID;
|
|
42
|
+
weekNumber: z.ZodNumber;
|
|
43
|
+
dayOfWeek: z.ZodNumber;
|
|
44
|
+
sessionOrder: z.ZodNumber;
|
|
45
|
+
title: z.ZodNullable<z.ZodString>;
|
|
46
|
+
description: z.ZodNullable<z.ZodString>;
|
|
47
|
+
startTime: z.ZodString;
|
|
48
|
+
}, z.core.$strip>>;
|
|
49
|
+
}, z.core.$strict>;
|
|
30
50
|
export declare const SkillsEventSchemas: {
|
|
31
51
|
readonly "skill.created": z.ZodObject<{
|
|
32
52
|
id: z.ZodUUID;
|
|
@@ -56,4 +76,24 @@ export declare const SkillsEventSchemas: {
|
|
|
56
76
|
readonly "skill.deleted": z.ZodObject<{
|
|
57
77
|
id: z.ZodUUID;
|
|
58
78
|
}, z.core.$strip>;
|
|
79
|
+
readonly "workshop.published": z.ZodObject<{
|
|
80
|
+
id: z.ZodUUID;
|
|
81
|
+
expertId: z.ZodString;
|
|
82
|
+
title: z.ZodString;
|
|
83
|
+
description: z.ZodNullable<z.ZodString>;
|
|
84
|
+
targetAudience: z.ZodNullable<z.ZodString>;
|
|
85
|
+
bannerImageKey: z.ZodNullable<z.ZodString>;
|
|
86
|
+
maxCohortSize: z.ZodNumber;
|
|
87
|
+
timezone: z.ZodString;
|
|
88
|
+
publishedAt: z.ZodISODateTime;
|
|
89
|
+
sessions: z.ZodArray<z.ZodObject<{
|
|
90
|
+
id: z.ZodUUID;
|
|
91
|
+
weekNumber: z.ZodNumber;
|
|
92
|
+
dayOfWeek: z.ZodNumber;
|
|
93
|
+
sessionOrder: z.ZodNumber;
|
|
94
|
+
title: z.ZodNullable<z.ZodString>;
|
|
95
|
+
description: z.ZodNullable<z.ZodString>;
|
|
96
|
+
startTime: z.ZodString;
|
|
97
|
+
}, z.core.$strip>>;
|
|
98
|
+
}, z.core.$strict>;
|
|
59
99
|
};
|
|
@@ -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.skillProfileUpdatedSchema = exports.skillDeletedSchema = exports.skillUpdatedSchema = exports.skillCreatedSchema = void 0;
|
|
6
|
+
exports.SkillsEventSchemas = exports.workshopPublishedSchema = 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(),
|
|
@@ -21,9 +21,32 @@ exports.skillProfileUpdatedSchema = zod_1.default
|
|
|
21
21
|
wanted: zod_1.default.array(zod_1.default.object({ id: zod_1.default.string(), name: zod_1.default.string() })),
|
|
22
22
|
})
|
|
23
23
|
.strict();
|
|
24
|
+
exports.workshopPublishedSchema = zod_1.default
|
|
25
|
+
.object({
|
|
26
|
+
id: zod_1.default.uuid(),
|
|
27
|
+
expertId: zod_1.default.string(),
|
|
28
|
+
title: zod_1.default.string(),
|
|
29
|
+
description: zod_1.default.string().nullable(),
|
|
30
|
+
targetAudience: zod_1.default.string().nullable(),
|
|
31
|
+
bannerImageKey: zod_1.default.string().nullable(),
|
|
32
|
+
maxCohortSize: zod_1.default.number(),
|
|
33
|
+
timezone: zod_1.default.string(),
|
|
34
|
+
publishedAt: zod_1.default.iso.datetime(),
|
|
35
|
+
sessions: zod_1.default.array(zod_1.default.object({
|
|
36
|
+
id: zod_1.default.uuid(),
|
|
37
|
+
weekNumber: zod_1.default.number().int(),
|
|
38
|
+
dayOfWeek: zod_1.default.number().int(),
|
|
39
|
+
sessionOrder: zod_1.default.number().int(),
|
|
40
|
+
title: zod_1.default.string().nullable(),
|
|
41
|
+
description: zod_1.default.string().nullable(),
|
|
42
|
+
startTime: zod_1.default.string(),
|
|
43
|
+
})),
|
|
44
|
+
})
|
|
45
|
+
.strict();
|
|
24
46
|
exports.SkillsEventSchemas = {
|
|
25
47
|
"skill.created": exports.skillCreatedSchema,
|
|
26
48
|
"skill.profileUpdated": exports.skillProfileUpdatedSchema,
|
|
27
49
|
"skill.updated": exports.skillUpdatedSchema,
|
|
28
50
|
"skill.deleted": exports.skillDeletedSchema,
|
|
51
|
+
"workshop.published": exports.workshopPublishedSchema,
|
|
29
52
|
};
|
package/package.json
CHANGED
|
@@ -27,6 +27,15 @@ export const expertApplicationApprovedSchema = z.object({
|
|
|
27
27
|
approvedAt: z.coerce.date(),
|
|
28
28
|
});
|
|
29
29
|
|
|
30
|
+
export const expertApplicationSubmittedSchema = z.object({
|
|
31
|
+
applicationId: z.uuid(),
|
|
32
|
+
expertId: z.uuid(),
|
|
33
|
+
expertUsername: z.string().optional(),
|
|
34
|
+
expertEmail: z.email(),
|
|
35
|
+
adminRecipientIds: z.array(z.uuid()),
|
|
36
|
+
submittedAt: z.coerce.date(),
|
|
37
|
+
});
|
|
38
|
+
|
|
30
39
|
export const expertApplicationRejectedSchema = z.object({
|
|
31
40
|
expertId: z.uuid(),
|
|
32
41
|
email: z.email(),
|
|
@@ -38,6 +47,7 @@ export const ExpertEventSchemas = {
|
|
|
38
47
|
"expert.registered": expertRegisteredSchema,
|
|
39
48
|
"expert.onboarded": newExpertOnboardedSchema,
|
|
40
49
|
"expert.verified": expertVerifiedSchema,
|
|
50
|
+
"expert.application.submitted": expertApplicationSubmittedSchema,
|
|
41
51
|
"expert.application.approved": expertApplicationApprovedSchema,
|
|
42
52
|
"expert.application.rejected": expertApplicationRejectedSchema,
|
|
43
53
|
} as const;
|
|
@@ -20,9 +20,35 @@ export const skillProfileUpdatedSchema = z
|
|
|
20
20
|
})
|
|
21
21
|
.strict();
|
|
22
22
|
|
|
23
|
+
export const workshopPublishedSchema = z
|
|
24
|
+
.object({
|
|
25
|
+
id: z.uuid(),
|
|
26
|
+
expertId: z.string(),
|
|
27
|
+
title: z.string(),
|
|
28
|
+
description: z.string().nullable(),
|
|
29
|
+
targetAudience: z.string().nullable(),
|
|
30
|
+
bannerImageKey: z.string().nullable(),
|
|
31
|
+
maxCohortSize: z.number(),
|
|
32
|
+
timezone: z.string(),
|
|
33
|
+
publishedAt: z.iso.datetime(),
|
|
34
|
+
sessions: z.array(
|
|
35
|
+
z.object({
|
|
36
|
+
id: z.uuid(),
|
|
37
|
+
weekNumber: z.number().int(),
|
|
38
|
+
dayOfWeek: z.number().int(),
|
|
39
|
+
sessionOrder: z.number().int(),
|
|
40
|
+
title: z.string().nullable(),
|
|
41
|
+
description: z.string().nullable(),
|
|
42
|
+
startTime: z.string(),
|
|
43
|
+
}),
|
|
44
|
+
),
|
|
45
|
+
})
|
|
46
|
+
.strict();
|
|
47
|
+
|
|
23
48
|
export const SkillsEventSchemas = {
|
|
24
49
|
"skill.created": skillCreatedSchema,
|
|
25
50
|
"skill.profileUpdated": skillProfileUpdatedSchema,
|
|
26
51
|
"skill.updated": skillUpdatedSchema,
|
|
27
52
|
"skill.deleted": skillDeletedSchema,
|
|
53
|
+
"workshop.published": workshopPublishedSchema,
|
|
28
54
|
} as const;
|