@zyacreatives/shared 2.1.30 → 2.1.31
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/schemas/index.d.ts +1 -0
- package/dist/schemas/index.js +1 -0
- package/dist/schemas/job.d.ts +9 -0
- package/dist/schemas/job.js +13 -3
- package/dist/schemas/notification.d.ts +106 -0
- package/dist/schemas/notification.js +57 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/notification.d.ts +9 -0
- package/dist/types/notification.js +2 -0
- package/package.json +1 -1
- package/src/schemas/index.ts +1 -0
- package/src/schemas/job.ts +298 -256
- package/src/schemas/notification.ts +61 -0
- package/src/types/index.ts +1 -0
- package/src/types/notification.ts +34 -0
package/dist/schemas/index.d.ts
CHANGED
package/dist/schemas/index.js
CHANGED
package/dist/schemas/job.d.ts
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
export declare const MinimalJobEntitySchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodCUID2;
|
|
4
|
+
title: z.ZodString;
|
|
5
|
+
brandId: z.ZodCUID2;
|
|
6
|
+
jobType: z.ZodEnum<{
|
|
7
|
+
GIG: "GIG";
|
|
8
|
+
ROLE: "ROLE";
|
|
9
|
+
}>;
|
|
10
|
+
}, z.core.$strip>;
|
|
2
11
|
export declare const BaseJobEntitySchema: z.ZodObject<{
|
|
3
12
|
id: z.ZodCUID2;
|
|
4
13
|
title: z.ZodString;
|
package/dist/schemas/job.js
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetJobsOutputSchema = exports.GetJobsInputSchema = exports.GetCreatedJobsOutputSchema = exports.NormalizedJobSchema = exports.UpdateJobInputSchema = exports.UpdateGigJobInputSchema = exports.UpdateRoleJobInputSchema = exports.CreateGigJobInputSchema = exports.CreateRoleJobInputSchema = exports.CreateJobInputSchema = exports.JobWithRoleDetailsEntitySchema = exports.RoleJobEntitySchema = exports.JobWithGigDetailsEntitySchema = exports.GigJobEntitySchema = exports.JobEntitySchema = exports.JobIdSchema = exports.BaseJobEntitySchema = void 0;
|
|
3
|
+
exports.GetJobsOutputSchema = exports.GetJobsInputSchema = exports.GetCreatedJobsOutputSchema = exports.NormalizedJobSchema = exports.UpdateJobInputSchema = exports.UpdateGigJobInputSchema = exports.UpdateRoleJobInputSchema = exports.CreateGigJobInputSchema = exports.CreateRoleJobInputSchema = exports.CreateJobInputSchema = exports.JobWithRoleDetailsEntitySchema = exports.RoleJobEntitySchema = exports.JobWithGigDetailsEntitySchema = exports.GigJobEntitySchema = exports.JobEntitySchema = exports.JobIdSchema = exports.BaseJobEntitySchema = exports.MinimalJobEntitySchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const JobSectionEnum = zod_1.z.enum(Object.values(constants_1.JOB_SECTIONS));
|
|
7
|
+
exports.MinimalJobEntitySchema = zod_1.z.object({
|
|
8
|
+
id: zod_1.z.cuid2(),
|
|
9
|
+
title: zod_1.z.string(),
|
|
10
|
+
brandId: zod_1.z.cuid2(),
|
|
11
|
+
jobType: zod_1.z.enum(Object.values(constants_1.JOB_TYPE)),
|
|
12
|
+
});
|
|
7
13
|
exports.BaseJobEntitySchema = zod_1.z.object({
|
|
8
14
|
id: zod_1.z.cuid2(),
|
|
9
15
|
title: zod_1.z.string(),
|
|
@@ -157,7 +163,9 @@ exports.CreateRoleJobInputSchema = zod_1.z
|
|
|
157
163
|
.enum(Object.values(constants_1.WAGE_TYPES))
|
|
158
164
|
.optional(),
|
|
159
165
|
})
|
|
160
|
-
.refine(({ wagesMin, wagesMax }) => wagesMin === undefined ||
|
|
166
|
+
.refine(({ wagesMin, wagesMax }) => wagesMin === undefined ||
|
|
167
|
+
wagesMax === undefined ||
|
|
168
|
+
wagesMax > wagesMin, {
|
|
161
169
|
message: "wagesMax must be greater than wagesMin",
|
|
162
170
|
path: ["wagesMax"],
|
|
163
171
|
});
|
|
@@ -178,7 +186,9 @@ exports.CreateGigJobInputSchema = zod_1.z
|
|
|
178
186
|
.enum(Object.values(constants_1.WAGE_TYPES))
|
|
179
187
|
.optional(),
|
|
180
188
|
})
|
|
181
|
-
.refine(({ wagesMin, wagesMax }) => wagesMin === undefined ||
|
|
189
|
+
.refine(({ wagesMin, wagesMax }) => wagesMin === undefined ||
|
|
190
|
+
wagesMax === undefined ||
|
|
191
|
+
wagesMax > wagesMin, {
|
|
182
192
|
message: "wagesMax must be greater than wagesMin",
|
|
183
193
|
path: ["wagesMax"],
|
|
184
194
|
});
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { z } from "@hono/zod-openapi";
|
|
2
|
+
export declare const NotificationEntitySchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodCUID2;
|
|
4
|
+
recipientId: z.ZodCUID2;
|
|
5
|
+
actorId: z.ZodCUID2;
|
|
6
|
+
type: z.ZodEnum<{
|
|
7
|
+
readonly FOLLOW: "Follow";
|
|
8
|
+
readonly LIKE: "Like";
|
|
9
|
+
readonly COMMENT: "Comment";
|
|
10
|
+
readonly REPLY: "Reply";
|
|
11
|
+
readonly MESSAGE: "Message";
|
|
12
|
+
readonly JOB_APPLICATION: "Job Application";
|
|
13
|
+
readonly APPLICATION_STATUS_CHANGE: "Application Status Change";
|
|
14
|
+
readonly SYSTEM_STRIKE: "System Strike";
|
|
15
|
+
readonly PROJECT_FEATURED: "Project Featured";
|
|
16
|
+
}>;
|
|
17
|
+
parentId: z.ZodNullable<z.ZodOptional<z.ZodCUID2>>;
|
|
18
|
+
parentType: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
19
|
+
[x: string]: string;
|
|
20
|
+
}>>>;
|
|
21
|
+
isRead: z.ZodDefault<z.ZodBoolean>;
|
|
22
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
23
|
+
deletedAt: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export declare const MinimalNotificationEntitySchema: z.ZodObject<{
|
|
26
|
+
id: z.ZodCUID2;
|
|
27
|
+
recipientId: z.ZodCUID2;
|
|
28
|
+
actorId: z.ZodCUID2;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
export declare const NotificationDetailsEntitySchema: z.ZodObject<{
|
|
31
|
+
id: z.ZodCUID2;
|
|
32
|
+
recipientId: z.ZodCUID2;
|
|
33
|
+
actorId: z.ZodCUID2;
|
|
34
|
+
type: z.ZodEnum<{
|
|
35
|
+
readonly FOLLOW: "Follow";
|
|
36
|
+
readonly LIKE: "Like";
|
|
37
|
+
readonly COMMENT: "Comment";
|
|
38
|
+
readonly REPLY: "Reply";
|
|
39
|
+
readonly MESSAGE: "Message";
|
|
40
|
+
readonly JOB_APPLICATION: "Job Application";
|
|
41
|
+
readonly APPLICATION_STATUS_CHANGE: "Application Status Change";
|
|
42
|
+
readonly SYSTEM_STRIKE: "System Strike";
|
|
43
|
+
readonly PROJECT_FEATURED: "Project Featured";
|
|
44
|
+
}>;
|
|
45
|
+
parentId: z.ZodNullable<z.ZodOptional<z.ZodCUID2>>;
|
|
46
|
+
parentType: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
47
|
+
[x: string]: string;
|
|
48
|
+
}>>>;
|
|
49
|
+
isRead: z.ZodDefault<z.ZodBoolean>;
|
|
50
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
51
|
+
deletedAt: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
52
|
+
itemTitle: z.ZodOptional<z.ZodString>;
|
|
53
|
+
itemContent: z.ZodOptional<z.ZodString>;
|
|
54
|
+
itemImgUrl: z.ZodOptional<z.ZodString>;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
export declare const ListNotificationsInputSchema: z.ZodObject<{
|
|
57
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
58
|
+
readonly FOLLOW: "Follow";
|
|
59
|
+
readonly LIKE: "Like";
|
|
60
|
+
readonly COMMENT: "Comment";
|
|
61
|
+
readonly REPLY: "Reply";
|
|
62
|
+
readonly MESSAGE: "Message";
|
|
63
|
+
readonly JOB_APPLICATION: "Job Application";
|
|
64
|
+
readonly APPLICATION_STATUS_CHANGE: "Application Status Change";
|
|
65
|
+
readonly SYSTEM_STRIKE: "System Strike";
|
|
66
|
+
readonly PROJECT_FEATURED: "Project Featured";
|
|
67
|
+
}>>;
|
|
68
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
69
|
+
unreadOnly: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>>;
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
export declare const ListNotificationsOutputSchema: z.ZodObject<{
|
|
72
|
+
notifications: z.ZodArray<z.ZodObject<{
|
|
73
|
+
id: z.ZodCUID2;
|
|
74
|
+
recipientId: z.ZodCUID2;
|
|
75
|
+
actorId: z.ZodCUID2;
|
|
76
|
+
type: z.ZodEnum<{
|
|
77
|
+
readonly FOLLOW: "Follow";
|
|
78
|
+
readonly LIKE: "Like";
|
|
79
|
+
readonly COMMENT: "Comment";
|
|
80
|
+
readonly REPLY: "Reply";
|
|
81
|
+
readonly MESSAGE: "Message";
|
|
82
|
+
readonly JOB_APPLICATION: "Job Application";
|
|
83
|
+
readonly APPLICATION_STATUS_CHANGE: "Application Status Change";
|
|
84
|
+
readonly SYSTEM_STRIKE: "System Strike";
|
|
85
|
+
readonly PROJECT_FEATURED: "Project Featured";
|
|
86
|
+
}>;
|
|
87
|
+
parentId: z.ZodNullable<z.ZodOptional<z.ZodCUID2>>;
|
|
88
|
+
parentType: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
89
|
+
[x: string]: string;
|
|
90
|
+
}>>>;
|
|
91
|
+
isRead: z.ZodDefault<z.ZodBoolean>;
|
|
92
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
93
|
+
deletedAt: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
94
|
+
itemTitle: z.ZodOptional<z.ZodString>;
|
|
95
|
+
itemContent: z.ZodOptional<z.ZodString>;
|
|
96
|
+
itemImgUrl: z.ZodOptional<z.ZodString>;
|
|
97
|
+
}, z.core.$strip>>;
|
|
98
|
+
nextCursor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
99
|
+
unreadCount: z.ZodNumber;
|
|
100
|
+
}, z.core.$strip>;
|
|
101
|
+
export declare const MarkReadInputSchema: z.ZodObject<{
|
|
102
|
+
notificationIds: z.ZodArray<z.ZodCUID2>;
|
|
103
|
+
}, z.core.$strip>;
|
|
104
|
+
export declare const NotificationCountOutputSchema: z.ZodObject<{
|
|
105
|
+
unreadCount: z.ZodNumber;
|
|
106
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationCountOutputSchema = exports.MarkReadInputSchema = exports.ListNotificationsOutputSchema = exports.ListNotificationsInputSchema = exports.NotificationDetailsEntitySchema = exports.MinimalNotificationEntitySchema = exports.NotificationEntitySchema = void 0;
|
|
4
|
+
const zod_openapi_1 = require("@hono/zod-openapi");
|
|
5
|
+
const constants_1 = require("../constants");
|
|
6
|
+
exports.NotificationEntitySchema = zod_openapi_1.z
|
|
7
|
+
.object({
|
|
8
|
+
id: zod_openapi_1.z.cuid2().openapi({ example: "not_cksd0v6q0000s9a5y8z7p3x9" }),
|
|
9
|
+
recipientId: zod_openapi_1.z.cuid2().openapi({ example: "user_recipient_123" }),
|
|
10
|
+
actorId: zod_openapi_1.z.cuid2().openapi({ example: "user_actor_456" }),
|
|
11
|
+
type: zod_openapi_1.z.enum(constants_1.NOTIFICATION_TYPES).openapi({ example: "LIKE" }),
|
|
12
|
+
parentId: zod_openapi_1.z.cuid2().optional().nullable(),
|
|
13
|
+
parentType: zod_openapi_1.z
|
|
14
|
+
.enum(Object.values(constants_1.ACTIVITY_PARENT_TYPES))
|
|
15
|
+
.optional()
|
|
16
|
+
.nullable(),
|
|
17
|
+
isRead: zod_openapi_1.z.boolean().default(false).openapi({ example: false }),
|
|
18
|
+
createdAt: zod_openapi_1.z.coerce
|
|
19
|
+
.date()
|
|
20
|
+
.openapi({ example: "2025-10-13T09:00:00.000Z" }),
|
|
21
|
+
deletedAt: zod_openapi_1.z.coerce.date().optional().nullable(),
|
|
22
|
+
})
|
|
23
|
+
.openapi("NotificationEntity");
|
|
24
|
+
exports.MinimalNotificationEntitySchema = zod_openapi_1.z.object({
|
|
25
|
+
id: zod_openapi_1.z.cuid2(),
|
|
26
|
+
recipientId: zod_openapi_1.z.cuid2(),
|
|
27
|
+
actorId: zod_openapi_1.z.cuid2(),
|
|
28
|
+
});
|
|
29
|
+
exports.NotificationDetailsEntitySchema = exports.NotificationEntitySchema.extend({
|
|
30
|
+
itemTitle: zod_openapi_1.z.string().optional(),
|
|
31
|
+
itemContent: zod_openapi_1.z.string().optional(),
|
|
32
|
+
itemImgUrl: zod_openapi_1.z.string().optional(),
|
|
33
|
+
});
|
|
34
|
+
exports.ListNotificationsInputSchema = zod_openapi_1.z
|
|
35
|
+
.object({
|
|
36
|
+
type: zod_openapi_1.z
|
|
37
|
+
.enum(constants_1.NOTIFICATION_TYPES)
|
|
38
|
+
.openapi({ example: "LIKE" })
|
|
39
|
+
.optional(),
|
|
40
|
+
cursor: zod_openapi_1.z.string().optional(),
|
|
41
|
+
unreadOnly: zod_openapi_1.z
|
|
42
|
+
.preprocess((val) => val === "true" || val === true, zod_openapi_1.z.boolean())
|
|
43
|
+
.optional()
|
|
44
|
+
.default(false),
|
|
45
|
+
})
|
|
46
|
+
.openapi("ListNotificationsInput");
|
|
47
|
+
exports.ListNotificationsOutputSchema = zod_openapi_1.z.object({
|
|
48
|
+
notifications: zod_openapi_1.z.array(exports.NotificationDetailsEntitySchema),
|
|
49
|
+
nextCursor: zod_openapi_1.z.string().optional().nullable(),
|
|
50
|
+
unreadCount: zod_openapi_1.z.number().int().openapi({ example: 5 }),
|
|
51
|
+
});
|
|
52
|
+
exports.MarkReadInputSchema = zod_openapi_1.z.object({
|
|
53
|
+
notificationIds: zod_openapi_1.z.array(zod_openapi_1.z.cuid2()).min(1),
|
|
54
|
+
});
|
|
55
|
+
exports.NotificationCountOutputSchema = zod_openapi_1.z.object({
|
|
56
|
+
unreadCount: zod_openapi_1.z.number().int().openapi({ example: 12 }),
|
|
57
|
+
});
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "@hono/zod-openapi";
|
|
2
|
+
import type { NotificationEntitySchema, MinimalNotificationEntitySchema, NotificationDetailsEntitySchema, ListNotificationsInputSchema, ListNotificationsOutputSchema, MarkReadInputSchema, NotificationCountOutputSchema } from "../schemas/notification";
|
|
3
|
+
export type NotificationEntity = z.infer<typeof NotificationEntitySchema>;
|
|
4
|
+
export type MinimalNotificationEntity = z.infer<typeof MinimalNotificationEntitySchema>;
|
|
5
|
+
export type NotificationDetailsEntity = z.infer<typeof NotificationDetailsEntitySchema>;
|
|
6
|
+
export type ListNotificationsInput = z.infer<typeof ListNotificationsInputSchema>;
|
|
7
|
+
export type ListNotificationsOutput = z.infer<typeof ListNotificationsOutputSchema>;
|
|
8
|
+
export type MarkReadInput = z.infer<typeof MarkReadInputSchema>;
|
|
9
|
+
export type NotificationCountOutput = z.infer<typeof NotificationCountOutputSchema>;
|
package/package.json
CHANGED
package/src/schemas/index.ts
CHANGED
package/src/schemas/job.ts
CHANGED
|
@@ -1,322 +1,364 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
3
|
+
EMPLOYMENT_TYPE,
|
|
4
|
+
EmploymentType,
|
|
5
|
+
EXPERIENCE_LEVELS,
|
|
6
|
+
ExperienceLevel,
|
|
7
|
+
GIG_TYPE,
|
|
8
|
+
GigType,
|
|
9
|
+
JOB_LOCATIONS,
|
|
10
|
+
JOB_SECTIONS,
|
|
11
|
+
JOB_STATUS,
|
|
12
|
+
JOB_TYPE,
|
|
13
|
+
JobLocation,
|
|
14
|
+
JobStatus,
|
|
15
|
+
JobType,
|
|
16
|
+
WAGE_TYPES,
|
|
17
|
+
WAGES_CURRENCY,
|
|
18
|
+
WagesCurrency,
|
|
19
|
+
WageTypes,
|
|
20
|
+
WORK_MODE,
|
|
21
|
+
WorkMode,
|
|
22
22
|
} from "../constants";
|
|
23
23
|
|
|
24
24
|
const JobSectionEnum = z.enum(
|
|
25
|
-
|
|
25
|
+
Object.values(JOB_SECTIONS) as [string, ...string[]],
|
|
26
26
|
);
|
|
27
27
|
|
|
28
|
+
export const MinimalJobEntitySchema = z.object({
|
|
29
|
+
id: z.cuid2(),
|
|
30
|
+
title: z.string(),
|
|
31
|
+
brandId: z.cuid2(),
|
|
32
|
+
jobType: z.enum(Object.values(JOB_TYPE) as [JobType, ...JobType[]]),
|
|
33
|
+
});
|
|
34
|
+
|
|
28
35
|
export const BaseJobEntitySchema = z.object({
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
.enum(Object.values(
|
|
42
|
-
.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
36
|
+
id: z.cuid2(),
|
|
37
|
+
title: z.string(),
|
|
38
|
+
brandId: z.cuid2(),
|
|
39
|
+
jobType: z.enum(Object.values(JOB_TYPE) as [JobType, ...JobType[]]),
|
|
40
|
+
employmentType: z
|
|
41
|
+
.enum(
|
|
42
|
+
Object.values(EMPLOYMENT_TYPE) as [
|
|
43
|
+
EmploymentType,
|
|
44
|
+
...EmploymentType[],
|
|
45
|
+
],
|
|
46
|
+
)
|
|
47
|
+
.optional(),
|
|
48
|
+
workMode: z.enum(Object.values(WORK_MODE) as [WorkMode, ...WorkMode[]]),
|
|
49
|
+
status: z.enum(Object.values(JOB_STATUS) as [JobStatus, ...JobStatus[]]),
|
|
50
|
+
gigType: z
|
|
51
|
+
.enum(Object.values(GIG_TYPE) as [GigType, ...GigType[]])
|
|
52
|
+
.optional(),
|
|
53
|
+
location: z.enum(
|
|
54
|
+
Object.values(JOB_LOCATIONS) as [JobLocation, ...JobLocation[]],
|
|
55
|
+
),
|
|
56
|
+
jobSections: z
|
|
57
|
+
.array(JobSectionEnum)
|
|
58
|
+
.default([
|
|
59
|
+
JOB_SECTIONS.PERSONAL_INFORMATION,
|
|
60
|
+
JOB_SECTIONS.PROFESSIONAL_INFORMATION,
|
|
61
|
+
JOB_SECTIONS.RESUME,
|
|
62
|
+
JOB_SECTIONS.COVER_LETTER,
|
|
63
|
+
]),
|
|
64
|
+
createdAt: z.date(),
|
|
65
|
+
updatedAt: z.date(),
|
|
56
66
|
});
|
|
57
67
|
|
|
58
68
|
export const JobIdSchema = z.object({
|
|
59
|
-
|
|
69
|
+
jobId: z.cuid2(),
|
|
60
70
|
});
|
|
61
71
|
|
|
62
72
|
export const JobEntitySchema = z.object({
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
73
|
+
id: z.cuid2(),
|
|
74
|
+
title: z.string(),
|
|
75
|
+
brandId: z.cuid2(),
|
|
76
|
+
brandName: z.cuid2(),
|
|
77
|
+
brandImgUrl: z.cuid2().optional(),
|
|
78
|
+
jobType: z.enum(Object.values(JOB_TYPE) as [JobType, ...JobType[]]),
|
|
79
|
+
status: z.enum(Object.values(JOB_STATUS) as [JobStatus, ...JobStatus[]]),
|
|
80
|
+
employmentType: z
|
|
81
|
+
.enum(
|
|
82
|
+
Object.values(EMPLOYMENT_TYPE) as [
|
|
83
|
+
EmploymentType,
|
|
84
|
+
...EmploymentType[],
|
|
85
|
+
],
|
|
86
|
+
)
|
|
87
|
+
.optional(),
|
|
88
|
+
workMode: z.enum(Object.values(WORK_MODE) as [WorkMode, ...WorkMode[]]),
|
|
89
|
+
gigType: z
|
|
90
|
+
.enum(Object.values(GIG_TYPE) as [GigType, ...GigType[]])
|
|
91
|
+
.optional(),
|
|
92
|
+
location: z.enum(
|
|
93
|
+
Object.values(JOB_LOCATIONS) as [JobLocation, ...JobLocation[]],
|
|
94
|
+
),
|
|
95
|
+
jobSections: z
|
|
96
|
+
.array(JobSectionEnum)
|
|
97
|
+
.default([
|
|
98
|
+
JOB_SECTIONS.PERSONAL_INFORMATION,
|
|
99
|
+
JOB_SECTIONS.PROFESSIONAL_INFORMATION,
|
|
100
|
+
JOB_SECTIONS.RESUME,
|
|
101
|
+
JOB_SECTIONS.COVER_LETTER,
|
|
102
|
+
]),
|
|
103
|
+
isBookmarked: z.boolean(),
|
|
104
|
+
createdAt: z.date(),
|
|
105
|
+
updatedAt: z.date(),
|
|
93
106
|
});
|
|
94
107
|
|
|
95
108
|
export const GigJobEntitySchema = z.object({
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
id: z.cuid2(),
|
|
110
|
+
jobType: z.literal(JOB_TYPE.GIG),
|
|
111
|
+
overview: z.string(),
|
|
112
|
+
deliverables: z.string(),
|
|
113
|
+
employeeRequirements: z.string().optional(),
|
|
114
|
+
aboutCompany: z.string().optional(),
|
|
115
|
+
requiredSkills: z.array(z.string()),
|
|
116
|
+
wagesMin: z.number().optional(),
|
|
117
|
+
wagesMax: z.number().optional(),
|
|
118
|
+
wagesCurrency: z
|
|
119
|
+
.enum(
|
|
120
|
+
Object.values(WAGES_CURRENCY) as [
|
|
121
|
+
WagesCurrency,
|
|
122
|
+
...WagesCurrency[],
|
|
123
|
+
],
|
|
124
|
+
)
|
|
125
|
+
.optional(),
|
|
126
|
+
wagesType: z
|
|
127
|
+
.enum(Object.values(WAGE_TYPES) as [WageTypes, ...WageTypes[]])
|
|
128
|
+
.optional(),
|
|
111
129
|
});
|
|
112
130
|
|
|
113
131
|
export const JobWithGigDetailsEntitySchema = JobEntitySchema.extend(
|
|
114
|
-
|
|
132
|
+
GigJobEntitySchema.shape,
|
|
115
133
|
);
|
|
116
134
|
|
|
117
135
|
export const RoleJobEntitySchema = z.object({
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
.
|
|
132
|
-
.optional(),
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
+
id: z.cuid2(),
|
|
137
|
+
jobType: z.literal(JOB_TYPE.ROLE),
|
|
138
|
+
experienceLevel: z.enum(
|
|
139
|
+
Object.values(EXPERIENCE_LEVELS) as [
|
|
140
|
+
ExperienceLevel,
|
|
141
|
+
...ExperienceLevel[],
|
|
142
|
+
],
|
|
143
|
+
),
|
|
144
|
+
overview: z.string(),
|
|
145
|
+
keyResponsibilities: z.string(),
|
|
146
|
+
requiredSkills: z.array(z.string()),
|
|
147
|
+
employeeRequirements: z.string().optional(),
|
|
148
|
+
companyBenefits: z.string().optional(),
|
|
149
|
+
wagesMin: z.number().optional(),
|
|
150
|
+
wagesMax: z.number().optional(),
|
|
151
|
+
wagesCurrency: z
|
|
152
|
+
.enum(
|
|
153
|
+
Object.values(WAGES_CURRENCY) as [
|
|
154
|
+
WagesCurrency,
|
|
155
|
+
...WagesCurrency[],
|
|
156
|
+
],
|
|
157
|
+
)
|
|
158
|
+
.optional(),
|
|
159
|
+
wagesType: z
|
|
160
|
+
.enum(Object.values(WAGE_TYPES) as [WageTypes, ...WageTypes[]])
|
|
161
|
+
.optional(),
|
|
136
162
|
});
|
|
137
163
|
|
|
138
164
|
export const JobWithRoleDetailsEntitySchema = JobEntitySchema.extend(
|
|
139
|
-
|
|
165
|
+
RoleJobEntitySchema.shape,
|
|
140
166
|
);
|
|
141
167
|
|
|
142
168
|
const CreateJobInputBaseSchema = z.object({
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
169
|
+
title: z.string(),
|
|
170
|
+
brandId: z.cuid2(),
|
|
171
|
+
jobType: z.enum(Object.values(JOB_TYPE) as [JobType, ...JobType[]]),
|
|
146
172
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
173
|
+
employmentType: z
|
|
174
|
+
.enum(
|
|
175
|
+
Object.values(EMPLOYMENT_TYPE) as [
|
|
176
|
+
EmploymentType,
|
|
177
|
+
...EmploymentType[],
|
|
178
|
+
],
|
|
179
|
+
)
|
|
180
|
+
.optional(),
|
|
152
181
|
|
|
153
|
-
|
|
182
|
+
workMode: z.enum(Object.values(WORK_MODE) as [WorkMode, ...WorkMode[]]),
|
|
154
183
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
184
|
+
gigType: z
|
|
185
|
+
.enum(Object.values(GIG_TYPE) as [GigType, ...GigType[]])
|
|
186
|
+
.optional(),
|
|
158
187
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
188
|
+
location: z
|
|
189
|
+
.enum(Object.values(JOB_LOCATIONS) as [JobLocation, ...JobLocation[]])
|
|
190
|
+
.default(JOB_LOCATIONS.REMOTE),
|
|
162
191
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
192
|
+
jobSections: z
|
|
193
|
+
.array(JobSectionEnum)
|
|
194
|
+
.min(1, { message: "At least one job section must be provided." }),
|
|
166
195
|
});
|
|
167
196
|
|
|
168
197
|
export const CreateJobInputSchema = CreateJobInputBaseSchema.superRefine(
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
198
|
+
(data, ctx) => {
|
|
199
|
+
if (data.jobType === JOB_TYPE.ROLE && !data.employmentType) {
|
|
200
|
+
ctx.addIssue({
|
|
201
|
+
path: ["employmentType"],
|
|
202
|
+
code: "custom",
|
|
203
|
+
message: "employmentType is required for ROLE jobs",
|
|
204
|
+
});
|
|
205
|
+
}
|
|
177
206
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
207
|
+
if (data.jobType === JOB_TYPE.GIG && !data.gigType) {
|
|
208
|
+
ctx.addIssue({
|
|
209
|
+
path: ["gigType"],
|
|
210
|
+
code: "custom",
|
|
211
|
+
message: "gigType is required for GIG jobs",
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
},
|
|
186
215
|
).transform((data) => {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
216
|
+
if (data.jobType === JOB_TYPE.ROLE) {
|
|
217
|
+
return { ...data, gigType: undefined };
|
|
218
|
+
}
|
|
190
219
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
220
|
+
if (data.jobType === JOB_TYPE.GIG) {
|
|
221
|
+
return { ...data, employmentType: undefined };
|
|
222
|
+
}
|
|
194
223
|
|
|
195
|
-
|
|
224
|
+
return data;
|
|
196
225
|
});
|
|
197
226
|
|
|
198
227
|
export const CreateRoleJobInputSchema = z
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
228
|
+
.object({
|
|
229
|
+
id: z.cuid2(),
|
|
230
|
+
experienceLevel: z.enum(
|
|
231
|
+
Object.values(EXPERIENCE_LEVELS) as [
|
|
232
|
+
ExperienceLevel,
|
|
233
|
+
...ExperienceLevel[],
|
|
234
|
+
],
|
|
235
|
+
),
|
|
236
|
+
overview: z.string(),
|
|
237
|
+
keyResponsibilities: z.string(),
|
|
238
|
+
requiredSkills: z.array(z.string()),
|
|
239
|
+
employeeRequirements: z.string().optional(),
|
|
240
|
+
companyBenefits: z.string().optional(),
|
|
241
|
+
wagesMin: z.number().optional(),
|
|
242
|
+
wagesMax: z.number().optional(),
|
|
243
|
+
wagesCurrency: z
|
|
244
|
+
.enum(
|
|
245
|
+
Object.values(WAGES_CURRENCY) as [
|
|
246
|
+
WagesCurrency,
|
|
247
|
+
...WagesCurrency[],
|
|
248
|
+
],
|
|
249
|
+
)
|
|
250
|
+
.optional(),
|
|
251
|
+
wagesType: z
|
|
252
|
+
.enum(Object.values(WAGE_TYPES) as [WageTypes, ...WageTypes[]])
|
|
253
|
+
.optional(),
|
|
254
|
+
})
|
|
255
|
+
.refine(
|
|
256
|
+
({ wagesMin, wagesMax }) =>
|
|
257
|
+
wagesMin === undefined ||
|
|
258
|
+
wagesMax === undefined ||
|
|
259
|
+
wagesMax > wagesMin,
|
|
260
|
+
{
|
|
261
|
+
message: "wagesMax must be greater than wagesMin",
|
|
262
|
+
path: ["wagesMax"],
|
|
263
|
+
},
|
|
264
|
+
);
|
|
231
265
|
|
|
232
266
|
export const CreateGigJobInputSchema = z
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
267
|
+
.object({
|
|
268
|
+
id: z.cuid2(),
|
|
269
|
+
overview: z.string(),
|
|
270
|
+
deliverables: z.string(),
|
|
271
|
+
employeeRequirements: z.string().optional(),
|
|
272
|
+
aboutCompany: z.string().optional(),
|
|
273
|
+
requiredSkills: z.array(z.string()),
|
|
274
|
+
wagesMin: z.number().optional(),
|
|
275
|
+
wagesMax: z.number().optional(),
|
|
276
|
+
wagesCurrency: z
|
|
277
|
+
.enum(
|
|
278
|
+
Object.values(WAGES_CURRENCY) as [
|
|
279
|
+
WagesCurrency,
|
|
280
|
+
...WagesCurrency[],
|
|
281
|
+
],
|
|
282
|
+
)
|
|
283
|
+
.optional(),
|
|
284
|
+
wagesType: z
|
|
285
|
+
.enum(Object.values(WAGE_TYPES) as [WageTypes, ...WageTypes[]])
|
|
286
|
+
.optional(),
|
|
287
|
+
})
|
|
288
|
+
.refine(
|
|
289
|
+
({ wagesMin, wagesMax }) =>
|
|
290
|
+
wagesMin === undefined ||
|
|
291
|
+
wagesMax === undefined ||
|
|
292
|
+
wagesMax > wagesMin,
|
|
293
|
+
{
|
|
294
|
+
message: "wagesMax must be greater than wagesMin",
|
|
295
|
+
path: ["wagesMax"],
|
|
296
|
+
},
|
|
297
|
+
);
|
|
259
298
|
|
|
260
299
|
export const UpdateRoleJobInputSchema =
|
|
261
|
-
|
|
300
|
+
CreateRoleJobInputSchema.partial().required({ id: true });
|
|
262
301
|
|
|
263
302
|
export const UpdateGigJobInputSchema =
|
|
264
|
-
|
|
303
|
+
CreateGigJobInputSchema.partial().required({ id: true });
|
|
265
304
|
|
|
266
305
|
export const UpdateJobInputSchema = CreateJobInputBaseSchema.partial().extend({
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
306
|
+
id: z.cuid2(),
|
|
307
|
+
status: z
|
|
308
|
+
.enum(Object.values(JOB_STATUS) as [JobStatus, ...JobStatus[]])
|
|
309
|
+
.optional(),
|
|
271
310
|
});
|
|
272
311
|
|
|
273
312
|
export const NormalizedJobSchema = z.union([
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
313
|
+
JobWithGigDetailsEntitySchema,
|
|
314
|
+
JobEntitySchema,
|
|
315
|
+
JobWithRoleDetailsEntitySchema,
|
|
277
316
|
]);
|
|
278
317
|
|
|
279
318
|
export const GetCreatedJobsOutputSchema = z.object({
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
319
|
+
jobs: z.array(NormalizedJobSchema),
|
|
320
|
+
noOfJobs: z.number(),
|
|
321
|
+
noOfActiveJobs: z.number(),
|
|
322
|
+
noOfArchivedJobs: z.number(),
|
|
284
323
|
});
|
|
285
324
|
|
|
286
325
|
export const GetJobsInputSchema = z.object({
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
326
|
+
q: z.string().optional(),
|
|
327
|
+
jobType: z
|
|
328
|
+
.enum(Object.values(JOB_TYPE) as [JobType, ...JobType[]])
|
|
329
|
+
.optional(),
|
|
330
|
+
workMode: z
|
|
331
|
+
.enum(Object.values(WORK_MODE) as [WorkMode, ...WorkMode[]])
|
|
332
|
+
.optional(),
|
|
333
|
+
location: z
|
|
334
|
+
.enum(Object.values(JOB_LOCATIONS) as [JobLocation, ...JobLocation[]])
|
|
335
|
+
.optional(),
|
|
336
|
+
employmentType: z
|
|
337
|
+
.enum(
|
|
338
|
+
Object.values(EMPLOYMENT_TYPE) as [
|
|
339
|
+
EmploymentType,
|
|
340
|
+
...EmploymentType[],
|
|
341
|
+
],
|
|
342
|
+
)
|
|
343
|
+
.optional(),
|
|
344
|
+
gigType: z
|
|
345
|
+
.enum(Object.values(GIG_TYPE) as [GigType, ...GigType[]])
|
|
346
|
+
.optional(),
|
|
347
|
+
requiredSkills: z
|
|
348
|
+
.string()
|
|
349
|
+
.optional()
|
|
350
|
+
.describe("Comma-separated: React,Node.js"),
|
|
309
351
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
352
|
+
status: z.string().optional(),
|
|
353
|
+
page: z.coerce.number().min(1).default(1),
|
|
354
|
+
limit: z.coerce.number().min(1).max(100).default(20),
|
|
313
355
|
});
|
|
314
356
|
|
|
315
357
|
export const GetJobsOutputSchema = z.object({
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
358
|
+
jobs: z.array(NormalizedJobSchema),
|
|
359
|
+
total: z.number(),
|
|
360
|
+
page: z.number(),
|
|
361
|
+
totalPages: z.number(),
|
|
362
|
+
hasNextPage: z.boolean(),
|
|
363
|
+
hasPrevPage: z.boolean(),
|
|
322
364
|
});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { z } from "@hono/zod-openapi";
|
|
2
|
+
import { ACTIVITY_PARENT_TYPES, NOTIFICATION_TYPES } from "../constants";
|
|
3
|
+
|
|
4
|
+
export const NotificationEntitySchema = z
|
|
5
|
+
.object({
|
|
6
|
+
id: z.cuid2().openapi({ example: "not_cksd0v6q0000s9a5y8z7p3x9" }),
|
|
7
|
+
recipientId: z.cuid2().openapi({ example: "user_recipient_123" }),
|
|
8
|
+
actorId: z.cuid2().openapi({ example: "user_actor_456" }),
|
|
9
|
+
type: z.enum(NOTIFICATION_TYPES).openapi({ example: "LIKE" }),
|
|
10
|
+
parentId: z.cuid2().optional().nullable(),
|
|
11
|
+
parentType: z
|
|
12
|
+
.enum(Object.values(ACTIVITY_PARENT_TYPES) as [string, ...string[]])
|
|
13
|
+
.optional()
|
|
14
|
+
.nullable(),
|
|
15
|
+
isRead: z.boolean().default(false).openapi({ example: false }),
|
|
16
|
+
createdAt: z.coerce
|
|
17
|
+
.date()
|
|
18
|
+
.openapi({ example: "2025-10-13T09:00:00.000Z" }),
|
|
19
|
+
deletedAt: z.coerce.date().optional().nullable(),
|
|
20
|
+
})
|
|
21
|
+
.openapi("NotificationEntity");
|
|
22
|
+
|
|
23
|
+
export const MinimalNotificationEntitySchema = z.object({
|
|
24
|
+
id: z.cuid2(),
|
|
25
|
+
recipientId: z.cuid2(),
|
|
26
|
+
actorId: z.cuid2(),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export const NotificationDetailsEntitySchema = NotificationEntitySchema.extend({
|
|
30
|
+
itemTitle: z.string().optional(),
|
|
31
|
+
itemContent: z.string().optional(),
|
|
32
|
+
itemImgUrl: z.string().optional(),
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export const ListNotificationsInputSchema = z
|
|
36
|
+
.object({
|
|
37
|
+
type: z
|
|
38
|
+
.enum(NOTIFICATION_TYPES)
|
|
39
|
+
.openapi({ example: "LIKE" })
|
|
40
|
+
.optional(),
|
|
41
|
+
cursor: z.string().optional(),
|
|
42
|
+
unreadOnly: z
|
|
43
|
+
.preprocess((val) => val === "true" || val === true, z.boolean())
|
|
44
|
+
.optional()
|
|
45
|
+
.default(false),
|
|
46
|
+
})
|
|
47
|
+
.openapi("ListNotificationsInput");
|
|
48
|
+
|
|
49
|
+
export const ListNotificationsOutputSchema = z.object({
|
|
50
|
+
notifications: z.array(NotificationDetailsEntitySchema),
|
|
51
|
+
nextCursor: z.string().optional().nullable(),
|
|
52
|
+
unreadCount: z.number().int().openapi({ example: 5 }),
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export const MarkReadInputSchema = z.object({
|
|
56
|
+
notificationIds: z.array(z.cuid2()).min(1),
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
export const NotificationCountOutputSchema = z.object({
|
|
60
|
+
unreadCount: z.number().int().openapi({ example: 12 }),
|
|
61
|
+
});
|
package/src/types/index.ts
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from "@hono/zod-openapi";
|
|
2
|
+
import type {
|
|
3
|
+
NotificationEntitySchema,
|
|
4
|
+
MinimalNotificationEntitySchema,
|
|
5
|
+
NotificationDetailsEntitySchema,
|
|
6
|
+
ListNotificationsInputSchema,
|
|
7
|
+
ListNotificationsOutputSchema,
|
|
8
|
+
MarkReadInputSchema,
|
|
9
|
+
NotificationCountOutputSchema,
|
|
10
|
+
} from "../schemas/notification";
|
|
11
|
+
|
|
12
|
+
export type NotificationEntity = z.infer<typeof NotificationEntitySchema>;
|
|
13
|
+
|
|
14
|
+
export type MinimalNotificationEntity = z.infer<
|
|
15
|
+
typeof MinimalNotificationEntitySchema
|
|
16
|
+
>;
|
|
17
|
+
|
|
18
|
+
export type NotificationDetailsEntity = z.infer<
|
|
19
|
+
typeof NotificationDetailsEntitySchema
|
|
20
|
+
>;
|
|
21
|
+
|
|
22
|
+
export type ListNotificationsInput = z.infer<
|
|
23
|
+
typeof ListNotificationsInputSchema
|
|
24
|
+
>;
|
|
25
|
+
|
|
26
|
+
export type ListNotificationsOutput = z.infer<
|
|
27
|
+
typeof ListNotificationsOutputSchema
|
|
28
|
+
>;
|
|
29
|
+
|
|
30
|
+
export type MarkReadInput = z.infer<typeof MarkReadInputSchema>;
|
|
31
|
+
|
|
32
|
+
export type NotificationCountOutput = z.infer<
|
|
33
|
+
typeof NotificationCountOutputSchema
|
|
34
|
+
>;
|