@sekolaos/shared-schema 1.0.0 → 1.0.2
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/README.md +8 -4
- package/dist/cjs/academic/academic-year.schema.js +32 -5
- package/dist/cjs/academic/academic-year.schema.js.map +1 -1
- package/dist/cjs/academic/class-room.schema.js +20 -6
- package/dist/cjs/academic/class-room.schema.js.map +1 -1
- package/dist/cjs/academic/subject.schema.js +21 -0
- package/dist/cjs/academic/subject.schema.js.map +1 -0
- package/dist/cjs/academic/teaching-schedule.schema.js +49 -0
- package/dist/cjs/academic/teaching-schedule.schema.js.map +1 -0
- package/dist/cjs/attendance/attendance-class.schema.js +1 -1
- package/dist/cjs/attendance/picket-assignment.schema.js +24 -0
- package/dist/cjs/attendance/picket-assignment.schema.js.map +1 -0
- package/dist/cjs/common/common.schema.js +3 -1
- package/dist/cjs/common/common.schema.js.map +1 -1
- package/dist/cjs/index.js +4 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/tenant/attendance-shift.schema.js +59 -0
- package/dist/cjs/tenant/attendance-shift.schema.js.map +1 -0
- package/dist/cjs/user/student.schema.js +48 -9
- package/dist/cjs/user/student.schema.js.map +1 -1
- package/dist/cjs/user/user.schema.js +44 -2
- package/dist/cjs/user/user.schema.js.map +1 -1
- package/dist/esm/academic/academic-year.schema.js +32 -5
- package/dist/esm/academic/academic-year.schema.js.map +1 -1
- package/dist/esm/academic/class-room.schema.js +19 -5
- package/dist/esm/academic/class-room.schema.js.map +1 -1
- package/dist/esm/academic/subject.schema.js +18 -0
- package/dist/esm/academic/subject.schema.js.map +1 -0
- package/dist/esm/academic/teaching-schedule.schema.js +46 -0
- package/dist/esm/academic/teaching-schedule.schema.js.map +1 -0
- package/dist/esm/attendance/attendance-class.schema.js +1 -1
- package/dist/esm/attendance/picket-assignment.schema.js +21 -0
- package/dist/esm/attendance/picket-assignment.schema.js.map +1 -0
- package/dist/esm/common/common.schema.js +2 -0
- package/dist/esm/common/common.schema.js.map +1 -1
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/tenant/attendance-shift.schema.js +56 -0
- package/dist/esm/tenant/attendance-shift.schema.js.map +1 -0
- package/dist/esm/user/student.schema.js +47 -8
- package/dist/esm/user/student.schema.js.map +1 -1
- package/dist/esm/user/user.schema.js +44 -2
- package/dist/esm/user/user.schema.js.map +1 -1
- package/dist/types/academic/academic-year.schema.d.ts +75 -9
- package/dist/types/academic/class-room.schema.d.ts +70 -11
- package/dist/types/academic/subject.schema.d.ts +56 -0
- package/dist/types/academic/teaching-schedule.schema.d.ts +147 -0
- package/dist/types/attendance/attendance-class.schema.d.ts +3 -3
- package/dist/types/attendance/barcode-rolling.schema.d.ts +2 -2
- package/dist/types/attendance/picket-assignment.schema.d.ts +53 -0
- package/dist/types/common/common.schema.d.ts +4 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/tenant/attendance-shift.schema.d.ts +97 -0
- package/dist/types/user/student.schema.d.ts +184 -13
- package/dist/types/user/user.schema.d.ts +130 -0
- package/package.json +1 -1
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const dayOfWeekEnum: z.ZodEnum<["SENIN", "SELASA", "RABU", "KAMIS", "JUMAT", "SABTU"]>;
|
|
3
|
+
export declare const periodNumberSchema: z.ZodNumber;
|
|
4
|
+
export declare const teachingScheduleSchema: z.ZodEffects<z.ZodType<{
|
|
5
|
+
id: string;
|
|
6
|
+
tenantId: string;
|
|
7
|
+
academicYearId: string;
|
|
8
|
+
classroomId: string;
|
|
9
|
+
teacherUserId: string;
|
|
10
|
+
subjectId: string;
|
|
11
|
+
dayOfWeek: "SENIN" | "SELASA" | "RABU" | "KAMIS" | "JUMAT" | "SABTU";
|
|
12
|
+
startTime: string;
|
|
13
|
+
endTime: string;
|
|
14
|
+
classroomName?: string | undefined;
|
|
15
|
+
teacherName?: string | undefined;
|
|
16
|
+
subjectName?: string | undefined;
|
|
17
|
+
periodNumber?: number | undefined;
|
|
18
|
+
}, z.ZodTypeDef, {
|
|
19
|
+
id: string;
|
|
20
|
+
tenantId: string;
|
|
21
|
+
academicYearId: string;
|
|
22
|
+
classroomId: string;
|
|
23
|
+
teacherUserId: string;
|
|
24
|
+
subjectId: string;
|
|
25
|
+
dayOfWeek: "SENIN" | "SELASA" | "RABU" | "KAMIS" | "JUMAT" | "SABTU";
|
|
26
|
+
startTime: string;
|
|
27
|
+
endTime: string;
|
|
28
|
+
classroomName?: string | undefined;
|
|
29
|
+
teacherName?: string | undefined;
|
|
30
|
+
subjectName?: string | undefined;
|
|
31
|
+
periodNumber?: number | undefined;
|
|
32
|
+
}>, {
|
|
33
|
+
id: string;
|
|
34
|
+
tenantId: string;
|
|
35
|
+
academicYearId: string;
|
|
36
|
+
classroomId: string;
|
|
37
|
+
teacherUserId: string;
|
|
38
|
+
subjectId: string;
|
|
39
|
+
dayOfWeek: "SENIN" | "SELASA" | "RABU" | "KAMIS" | "JUMAT" | "SABTU";
|
|
40
|
+
startTime: string;
|
|
41
|
+
endTime: string;
|
|
42
|
+
classroomName?: string | undefined;
|
|
43
|
+
teacherName?: string | undefined;
|
|
44
|
+
subjectName?: string | undefined;
|
|
45
|
+
periodNumber?: number | undefined;
|
|
46
|
+
}, {
|
|
47
|
+
id: string;
|
|
48
|
+
tenantId: string;
|
|
49
|
+
academicYearId: string;
|
|
50
|
+
classroomId: string;
|
|
51
|
+
teacherUserId: string;
|
|
52
|
+
subjectId: string;
|
|
53
|
+
dayOfWeek: "SENIN" | "SELASA" | "RABU" | "KAMIS" | "JUMAT" | "SABTU";
|
|
54
|
+
startTime: string;
|
|
55
|
+
endTime: string;
|
|
56
|
+
classroomName?: string | undefined;
|
|
57
|
+
teacherName?: string | undefined;
|
|
58
|
+
subjectName?: string | undefined;
|
|
59
|
+
periodNumber?: number | undefined;
|
|
60
|
+
}>;
|
|
61
|
+
export declare const createTeachingScheduleSchema: z.ZodEffects<z.ZodType<{
|
|
62
|
+
academicYearId: string;
|
|
63
|
+
classroomId: string;
|
|
64
|
+
teacherUserId: string;
|
|
65
|
+
subjectId: string;
|
|
66
|
+
dayOfWeek: "SENIN" | "SELASA" | "RABU" | "KAMIS" | "JUMAT" | "SABTU";
|
|
67
|
+
startTime: string;
|
|
68
|
+
endTime: string;
|
|
69
|
+
periodNumber?: number | undefined;
|
|
70
|
+
}, z.ZodTypeDef, {
|
|
71
|
+
academicYearId: string;
|
|
72
|
+
classroomId: string;
|
|
73
|
+
teacherUserId: string;
|
|
74
|
+
subjectId: string;
|
|
75
|
+
dayOfWeek: "SENIN" | "SELASA" | "RABU" | "KAMIS" | "JUMAT" | "SABTU";
|
|
76
|
+
startTime: string;
|
|
77
|
+
endTime: string;
|
|
78
|
+
periodNumber?: number | undefined;
|
|
79
|
+
}>, {
|
|
80
|
+
academicYearId: string;
|
|
81
|
+
classroomId: string;
|
|
82
|
+
teacherUserId: string;
|
|
83
|
+
subjectId: string;
|
|
84
|
+
dayOfWeek: "SENIN" | "SELASA" | "RABU" | "KAMIS" | "JUMAT" | "SABTU";
|
|
85
|
+
startTime: string;
|
|
86
|
+
endTime: string;
|
|
87
|
+
periodNumber?: number | undefined;
|
|
88
|
+
}, {
|
|
89
|
+
academicYearId: string;
|
|
90
|
+
classroomId: string;
|
|
91
|
+
teacherUserId: string;
|
|
92
|
+
subjectId: string;
|
|
93
|
+
dayOfWeek: "SENIN" | "SELASA" | "RABU" | "KAMIS" | "JUMAT" | "SABTU";
|
|
94
|
+
startTime: string;
|
|
95
|
+
endTime: string;
|
|
96
|
+
periodNumber?: number | undefined;
|
|
97
|
+
}>;
|
|
98
|
+
export declare const updateTeachingScheduleSchema: z.ZodEffects<z.ZodObject<{
|
|
99
|
+
academicYearId: z.ZodOptional<z.ZodString>;
|
|
100
|
+
classroomId: z.ZodOptional<z.ZodString>;
|
|
101
|
+
teacherUserId: z.ZodOptional<z.ZodString>;
|
|
102
|
+
subjectId: z.ZodOptional<z.ZodString>;
|
|
103
|
+
dayOfWeek: z.ZodOptional<z.ZodEnum<["SENIN", "SELASA", "RABU", "KAMIS", "JUMAT", "SABTU"]>>;
|
|
104
|
+
startTime: z.ZodOptional<z.ZodString>;
|
|
105
|
+
endTime: z.ZodOptional<z.ZodString>;
|
|
106
|
+
periodNumber: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
107
|
+
}, "strip", z.ZodTypeAny, {
|
|
108
|
+
academicYearId?: string | undefined;
|
|
109
|
+
classroomId?: string | undefined;
|
|
110
|
+
teacherUserId?: string | undefined;
|
|
111
|
+
subjectId?: string | undefined;
|
|
112
|
+
dayOfWeek?: "SENIN" | "SELASA" | "RABU" | "KAMIS" | "JUMAT" | "SABTU" | undefined;
|
|
113
|
+
startTime?: string | undefined;
|
|
114
|
+
endTime?: string | undefined;
|
|
115
|
+
periodNumber?: number | undefined;
|
|
116
|
+
}, {
|
|
117
|
+
academicYearId?: string | undefined;
|
|
118
|
+
classroomId?: string | undefined;
|
|
119
|
+
teacherUserId?: string | undefined;
|
|
120
|
+
subjectId?: string | undefined;
|
|
121
|
+
dayOfWeek?: "SENIN" | "SELASA" | "RABU" | "KAMIS" | "JUMAT" | "SABTU" | undefined;
|
|
122
|
+
startTime?: string | undefined;
|
|
123
|
+
endTime?: string | undefined;
|
|
124
|
+
periodNumber?: number | undefined;
|
|
125
|
+
}>, {
|
|
126
|
+
academicYearId?: string | undefined;
|
|
127
|
+
classroomId?: string | undefined;
|
|
128
|
+
teacherUserId?: string | undefined;
|
|
129
|
+
subjectId?: string | undefined;
|
|
130
|
+
dayOfWeek?: "SENIN" | "SELASA" | "RABU" | "KAMIS" | "JUMAT" | "SABTU" | undefined;
|
|
131
|
+
startTime?: string | undefined;
|
|
132
|
+
endTime?: string | undefined;
|
|
133
|
+
periodNumber?: number | undefined;
|
|
134
|
+
}, {
|
|
135
|
+
academicYearId?: string | undefined;
|
|
136
|
+
classroomId?: string | undefined;
|
|
137
|
+
teacherUserId?: string | undefined;
|
|
138
|
+
subjectId?: string | undefined;
|
|
139
|
+
dayOfWeek?: "SENIN" | "SELASA" | "RABU" | "KAMIS" | "JUMAT" | "SABTU" | undefined;
|
|
140
|
+
startTime?: string | undefined;
|
|
141
|
+
endTime?: string | undefined;
|
|
142
|
+
periodNumber?: number | undefined;
|
|
143
|
+
}>;
|
|
144
|
+
export type DayOfWeek = z.infer<typeof dayOfWeekEnum>;
|
|
145
|
+
export type TeachingSchedule = z.infer<typeof teachingScheduleSchema>;
|
|
146
|
+
export type CreateTeachingScheduleInput = z.infer<typeof createTeachingScheduleSchema>;
|
|
147
|
+
export type UpdateTeachingScheduleInput = z.infer<typeof updateTeachingScheduleSchema>;
|
|
@@ -15,7 +15,7 @@ export declare const classAttendanceUpdateItemSchema: z.ZodObject<{
|
|
|
15
15
|
export declare const updateClassAttendanceRequestSchema: z.ZodObject<{
|
|
16
16
|
teachingScheduleId: z.ZodString;
|
|
17
17
|
academicYearId: z.ZodString;
|
|
18
|
-
|
|
18
|
+
classroomId: z.ZodString;
|
|
19
19
|
date: z.ZodString;
|
|
20
20
|
attendances: z.ZodArray<z.ZodObject<{
|
|
21
21
|
studentId: z.ZodString;
|
|
@@ -33,7 +33,7 @@ export declare const updateClassAttendanceRequestSchema: z.ZodObject<{
|
|
|
33
33
|
}, "strip", z.ZodTypeAny, {
|
|
34
34
|
date: string;
|
|
35
35
|
academicYearId: string;
|
|
36
|
-
|
|
36
|
+
classroomId: string;
|
|
37
37
|
teachingScheduleId: string;
|
|
38
38
|
attendances: {
|
|
39
39
|
status: "HADIR" | "TERLAMBAT" | "IZIN" | "SAKIT" | "ALPA";
|
|
@@ -43,7 +43,7 @@ export declare const updateClassAttendanceRequestSchema: z.ZodObject<{
|
|
|
43
43
|
}, {
|
|
44
44
|
date: string;
|
|
45
45
|
academicYearId: string;
|
|
46
|
-
|
|
46
|
+
classroomId: string;
|
|
47
47
|
teachingScheduleId: string;
|
|
48
48
|
attendances: {
|
|
49
49
|
status: "HADIR" | "TERLAMBAT" | "IZIN" | "SAKIT" | "ALPA";
|
|
@@ -22,13 +22,13 @@ export declare const teacherScanDynamicBarcodeRequestSchema: z.ZodObject<{
|
|
|
22
22
|
scannedAt: z.ZodString;
|
|
23
23
|
}, "strip", z.ZodTypeAny, {
|
|
24
24
|
tenantId: string;
|
|
25
|
-
scannedAt: string;
|
|
26
25
|
teacherUserId: string;
|
|
26
|
+
scannedAt: string;
|
|
27
27
|
scannedPayload: string;
|
|
28
28
|
}, {
|
|
29
29
|
tenantId: string;
|
|
30
|
-
scannedAt: string;
|
|
31
30
|
teacherUserId: string;
|
|
31
|
+
scannedAt: string;
|
|
32
32
|
scannedPayload: string;
|
|
33
33
|
}>;
|
|
34
34
|
export type RollingBarcodePayload = z.infer<typeof rollingBarcodePayloadSchema>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const picketLocationSchema: z.ZodString;
|
|
3
|
+
export declare const picketAssignmentSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
tenantId: z.ZodString;
|
|
6
|
+
academicYearId: z.ZodString;
|
|
7
|
+
teacherUserId: z.ZodString;
|
|
8
|
+
teacherName: z.ZodOptional<z.ZodString>;
|
|
9
|
+
dayOfWeek: z.ZodEnum<["SENIN", "SELASA", "RABU", "KAMIS", "JUMAT", "SABTU"]>;
|
|
10
|
+
location: z.ZodDefault<z.ZodString>;
|
|
11
|
+
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
id: string;
|
|
14
|
+
tenantId: string;
|
|
15
|
+
academicYearId: string;
|
|
16
|
+
isActive: boolean;
|
|
17
|
+
teacherUserId: string;
|
|
18
|
+
dayOfWeek: "SENIN" | "SELASA" | "RABU" | "KAMIS" | "JUMAT" | "SABTU";
|
|
19
|
+
location: string;
|
|
20
|
+
teacherName?: string | undefined;
|
|
21
|
+
}, {
|
|
22
|
+
id: string;
|
|
23
|
+
tenantId: string;
|
|
24
|
+
academicYearId: string;
|
|
25
|
+
teacherUserId: string;
|
|
26
|
+
dayOfWeek: "SENIN" | "SELASA" | "RABU" | "KAMIS" | "JUMAT" | "SABTU";
|
|
27
|
+
isActive?: boolean | undefined;
|
|
28
|
+
teacherName?: string | undefined;
|
|
29
|
+
location?: string | undefined;
|
|
30
|
+
}>;
|
|
31
|
+
export declare const createPicketAssignmentSchema: z.ZodObject<Pick<{
|
|
32
|
+
id: z.ZodString;
|
|
33
|
+
tenantId: z.ZodString;
|
|
34
|
+
academicYearId: z.ZodString;
|
|
35
|
+
teacherUserId: z.ZodString;
|
|
36
|
+
teacherName: z.ZodOptional<z.ZodString>;
|
|
37
|
+
dayOfWeek: z.ZodEnum<["SENIN", "SELASA", "RABU", "KAMIS", "JUMAT", "SABTU"]>;
|
|
38
|
+
location: z.ZodDefault<z.ZodString>;
|
|
39
|
+
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
40
|
+
}, "academicYearId" | "teacherUserId" | "dayOfWeek" | "location">, "strip", z.ZodTypeAny, {
|
|
41
|
+
academicYearId: string;
|
|
42
|
+
teacherUserId: string;
|
|
43
|
+
dayOfWeek: "SENIN" | "SELASA" | "RABU" | "KAMIS" | "JUMAT" | "SABTU";
|
|
44
|
+
location: string;
|
|
45
|
+
}, {
|
|
46
|
+
academicYearId: string;
|
|
47
|
+
teacherUserId: string;
|
|
48
|
+
dayOfWeek: "SENIN" | "SELASA" | "RABU" | "KAMIS" | "JUMAT" | "SABTU";
|
|
49
|
+
location?: string | undefined;
|
|
50
|
+
}>;
|
|
51
|
+
export type PicketAssignment = z.infer<typeof picketAssignmentSchema>;
|
|
52
|
+
export type CreatePicketAssignmentInput = z.infer<typeof createPicketAssignmentSchema>;
|
|
53
|
+
export type CreatePicketAssignmentInputSchema = z.input<typeof createPicketAssignmentSchema>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const uuidSchema: z.ZodString;
|
|
3
3
|
export declare const timestampSchema: z.ZodString;
|
|
4
|
+
export declare const dateStringSchema: z.ZodString;
|
|
5
|
+
export declare const timeStringSchema: z.ZodString;
|
|
4
6
|
export declare const baseResponseSchema: <T extends z.ZodTypeAny>(dataSchema: T) => z.ZodObject<{
|
|
5
7
|
success: z.ZodBoolean;
|
|
6
8
|
message: z.ZodString;
|
|
@@ -43,5 +45,7 @@ export declare const apiErrorResponseSchema: z.ZodObject<{
|
|
|
43
45
|
}[] | undefined;
|
|
44
46
|
}>;
|
|
45
47
|
export type Uuid = z.infer<typeof uuidSchema>;
|
|
48
|
+
export type DateString = z.infer<typeof dateStringSchema>;
|
|
49
|
+
export type TimeString = z.infer<typeof timeStringSchema>;
|
|
46
50
|
export type BaseResponse<T extends z.ZodTypeAny> = z.infer<ReturnType<typeof baseResponseSchema<T>>>;
|
|
47
51
|
export type ApiErrorResponse = z.infer<typeof apiErrorResponseSchema>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
export * from "./common/common.schema.js";
|
|
2
2
|
export * from "./common/pagination.schema.js";
|
|
3
3
|
export * from "./tenant/tenant.schema.js";
|
|
4
|
+
export * from "./tenant/attendance-shift.schema.js";
|
|
4
5
|
export * from "./auth/role.schema.js";
|
|
5
6
|
export * from "./auth/auth.schema.js";
|
|
6
7
|
export * from "./academic/academic-year.schema.js";
|
|
7
8
|
export * from "./academic/class-room.schema.js";
|
|
9
|
+
export * from "./academic/subject.schema.js";
|
|
10
|
+
export * from "./academic/teaching-schedule.schema.js";
|
|
8
11
|
export * from "./user/user.schema.js";
|
|
9
12
|
export * from "./user/student.schema.js";
|
|
10
13
|
export * from "./attendance/attendance-kiosk.schema.js";
|
|
11
14
|
export * from "./attendance/attendance-class.schema.js";
|
|
15
|
+
export * from "./attendance/picket-assignment.schema.js";
|
|
12
16
|
export * from "./attendance/barcode-rolling.schema.js";
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const shiftTargetTypeEnum: z.ZodEnum<["SISWA", "GURU"]>;
|
|
3
|
+
export declare const attendanceShiftSchema: z.ZodEffects<z.ZodType<{
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
tenantId: string;
|
|
7
|
+
targetType: "SISWA" | "GURU";
|
|
8
|
+
checkInStart: string;
|
|
9
|
+
checkInEnd: string;
|
|
10
|
+
checkOutStart: string;
|
|
11
|
+
checkOutEnd: string;
|
|
12
|
+
lateToleranceMinutes?: number | undefined;
|
|
13
|
+
fridayCheckOutStart?: string | null | undefined;
|
|
14
|
+
fridayCheckOutEnd?: string | null | undefined;
|
|
15
|
+
}, z.ZodTypeDef, {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
tenantId: string;
|
|
19
|
+
targetType: "SISWA" | "GURU";
|
|
20
|
+
checkInStart: string;
|
|
21
|
+
checkInEnd: string;
|
|
22
|
+
checkOutStart: string;
|
|
23
|
+
checkOutEnd: string;
|
|
24
|
+
lateToleranceMinutes?: number | undefined;
|
|
25
|
+
fridayCheckOutStart?: string | null | undefined;
|
|
26
|
+
fridayCheckOutEnd?: string | null | undefined;
|
|
27
|
+
}>, {
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
tenantId: string;
|
|
31
|
+
targetType: "SISWA" | "GURU";
|
|
32
|
+
checkInStart: string;
|
|
33
|
+
checkInEnd: string;
|
|
34
|
+
checkOutStart: string;
|
|
35
|
+
checkOutEnd: string;
|
|
36
|
+
lateToleranceMinutes?: number | undefined;
|
|
37
|
+
fridayCheckOutStart?: string | null | undefined;
|
|
38
|
+
fridayCheckOutEnd?: string | null | undefined;
|
|
39
|
+
}, {
|
|
40
|
+
id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
tenantId: string;
|
|
43
|
+
targetType: "SISWA" | "GURU";
|
|
44
|
+
checkInStart: string;
|
|
45
|
+
checkInEnd: string;
|
|
46
|
+
checkOutStart: string;
|
|
47
|
+
checkOutEnd: string;
|
|
48
|
+
lateToleranceMinutes?: number | undefined;
|
|
49
|
+
fridayCheckOutStart?: string | null | undefined;
|
|
50
|
+
fridayCheckOutEnd?: string | null | undefined;
|
|
51
|
+
}>;
|
|
52
|
+
export declare const upsertAttendanceShiftSchema: z.ZodEffects<z.ZodType<{
|
|
53
|
+
name: string;
|
|
54
|
+
targetType: "SISWA" | "GURU";
|
|
55
|
+
checkInStart: string;
|
|
56
|
+
checkInEnd: string;
|
|
57
|
+
checkOutStart: string;
|
|
58
|
+
checkOutEnd: string;
|
|
59
|
+
lateToleranceMinutes?: number | undefined;
|
|
60
|
+
fridayCheckOutStart?: string | null | undefined;
|
|
61
|
+
fridayCheckOutEnd?: string | null | undefined;
|
|
62
|
+
}, z.ZodTypeDef, {
|
|
63
|
+
name: string;
|
|
64
|
+
targetType: "SISWA" | "GURU";
|
|
65
|
+
checkInStart: string;
|
|
66
|
+
checkInEnd: string;
|
|
67
|
+
checkOutStart: string;
|
|
68
|
+
checkOutEnd: string;
|
|
69
|
+
lateToleranceMinutes?: number | undefined;
|
|
70
|
+
fridayCheckOutStart?: string | null | undefined;
|
|
71
|
+
fridayCheckOutEnd?: string | null | undefined;
|
|
72
|
+
}>, {
|
|
73
|
+
name: string;
|
|
74
|
+
targetType: "SISWA" | "GURU";
|
|
75
|
+
checkInStart: string;
|
|
76
|
+
checkInEnd: string;
|
|
77
|
+
checkOutStart: string;
|
|
78
|
+
checkOutEnd: string;
|
|
79
|
+
lateToleranceMinutes?: number | undefined;
|
|
80
|
+
fridayCheckOutStart?: string | null | undefined;
|
|
81
|
+
fridayCheckOutEnd?: string | null | undefined;
|
|
82
|
+
}, {
|
|
83
|
+
name: string;
|
|
84
|
+
targetType: "SISWA" | "GURU";
|
|
85
|
+
checkInStart: string;
|
|
86
|
+
checkInEnd: string;
|
|
87
|
+
checkOutStart: string;
|
|
88
|
+
checkOutEnd: string;
|
|
89
|
+
lateToleranceMinutes?: number | undefined;
|
|
90
|
+
fridayCheckOutStart?: string | null | undefined;
|
|
91
|
+
fridayCheckOutEnd?: string | null | undefined;
|
|
92
|
+
}>;
|
|
93
|
+
export type ShiftTargetType = z.infer<typeof shiftTargetTypeEnum>;
|
|
94
|
+
export type AttendanceShift = z.infer<typeof attendanceShiftSchema>;
|
|
95
|
+
export type AttendanceShiftInput = z.input<typeof attendanceShiftSchema>;
|
|
96
|
+
export type UpsertAttendanceShiftInput = z.infer<typeof upsertAttendanceShiftSchema>;
|
|
97
|
+
export type UpsertAttendanceShiftSchemaInput = z.input<typeof upsertAttendanceShiftSchema>;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
export declare const genderEnum: z.ZodEnum<["L", "P"]>;
|
|
3
|
+
export declare const nisSchema: z.ZodString;
|
|
4
|
+
export declare const nisnSchema: z.ZodString;
|
|
5
|
+
export declare const barcodeValueSchema: z.ZodString;
|
|
6
|
+
export declare const parentPhoneSchema: z.ZodString;
|
|
2
7
|
export declare const studentSchema: z.ZodObject<{
|
|
3
8
|
id: z.ZodString;
|
|
4
9
|
tenantId: z.ZodString;
|
|
@@ -6,32 +11,85 @@ export declare const studentSchema: z.ZodObject<{
|
|
|
6
11
|
nisn: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
7
12
|
fullName: z.ZodString;
|
|
8
13
|
gender: z.ZodEnum<["L", "P"]>;
|
|
9
|
-
|
|
10
|
-
|
|
14
|
+
classroomId: z.ZodString;
|
|
15
|
+
classroomName: z.ZodString;
|
|
16
|
+
parentPhone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
11
17
|
barcodeValue: z.ZodString;
|
|
12
18
|
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
13
19
|
}, "strip", z.ZodTypeAny, {
|
|
14
20
|
id: string;
|
|
15
21
|
tenantId: string;
|
|
16
22
|
isActive: boolean;
|
|
23
|
+
classroomId: string;
|
|
24
|
+
classroomName: string;
|
|
17
25
|
fullName: string;
|
|
18
26
|
nis: string;
|
|
19
27
|
gender: "L" | "P";
|
|
20
|
-
classRoomId: string;
|
|
21
|
-
classRoomName: string;
|
|
22
28
|
barcodeValue: string;
|
|
23
29
|
nisn?: string | null | undefined;
|
|
30
|
+
parentPhone?: string | null | undefined;
|
|
24
31
|
}, {
|
|
25
32
|
id: string;
|
|
26
33
|
tenantId: string;
|
|
34
|
+
classroomId: string;
|
|
35
|
+
classroomName: string;
|
|
27
36
|
fullName: string;
|
|
28
37
|
nis: string;
|
|
29
38
|
gender: "L" | "P";
|
|
30
|
-
classRoomId: string;
|
|
31
|
-
classRoomName: string;
|
|
32
39
|
barcodeValue: string;
|
|
33
40
|
isActive?: boolean | undefined;
|
|
34
41
|
nisn?: string | null | undefined;
|
|
42
|
+
parentPhone?: string | null | undefined;
|
|
43
|
+
}>;
|
|
44
|
+
export declare const createStudentSchema: z.ZodObject<{
|
|
45
|
+
nis: z.ZodString;
|
|
46
|
+
nisn: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
47
|
+
fullName: z.ZodString;
|
|
48
|
+
gender: z.ZodEnum<["L", "P"]>;
|
|
49
|
+
classroomId: z.ZodString;
|
|
50
|
+
parentPhone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
51
|
+
barcodeValue: z.ZodOptional<z.ZodString>;
|
|
52
|
+
}, "strip", z.ZodTypeAny, {
|
|
53
|
+
classroomId: string;
|
|
54
|
+
fullName: string;
|
|
55
|
+
nis: string;
|
|
56
|
+
gender: "L" | "P";
|
|
57
|
+
nisn?: string | null | undefined;
|
|
58
|
+
parentPhone?: string | null | undefined;
|
|
59
|
+
barcodeValue?: string | undefined;
|
|
60
|
+
}, {
|
|
61
|
+
classroomId: string;
|
|
62
|
+
fullName: string;
|
|
63
|
+
nis: string;
|
|
64
|
+
gender: "L" | "P";
|
|
65
|
+
nisn?: string | null | undefined;
|
|
66
|
+
parentPhone?: string | null | undefined;
|
|
67
|
+
barcodeValue?: string | undefined;
|
|
68
|
+
}>;
|
|
69
|
+
export declare const updateStudentSchema: z.ZodObject<{
|
|
70
|
+
nis: z.ZodOptional<z.ZodString>;
|
|
71
|
+
nisn: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
72
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
73
|
+
gender: z.ZodOptional<z.ZodEnum<["L", "P"]>>;
|
|
74
|
+
classroomId: z.ZodOptional<z.ZodString>;
|
|
75
|
+
parentPhone: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
76
|
+
barcodeValue: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
77
|
+
}, "strip", z.ZodTypeAny, {
|
|
78
|
+
classroomId?: string | undefined;
|
|
79
|
+
fullName?: string | undefined;
|
|
80
|
+
nis?: string | undefined;
|
|
81
|
+
nisn?: string | null | undefined;
|
|
82
|
+
gender?: "L" | "P" | undefined;
|
|
83
|
+
parentPhone?: string | null | undefined;
|
|
84
|
+
barcodeValue?: string | undefined;
|
|
85
|
+
}, {
|
|
86
|
+
classroomId?: string | undefined;
|
|
87
|
+
fullName?: string | undefined;
|
|
88
|
+
nis?: string | undefined;
|
|
89
|
+
nisn?: string | null | undefined;
|
|
90
|
+
gender?: "L" | "P" | undefined;
|
|
91
|
+
parentPhone?: string | null | undefined;
|
|
92
|
+
barcodeValue?: string | undefined;
|
|
35
93
|
}>;
|
|
36
94
|
export declare const studentOfflineSyncCacheSchema: z.ZodObject<Pick<{
|
|
37
95
|
id: z.ZodString;
|
|
@@ -40,24 +98,137 @@ export declare const studentOfflineSyncCacheSchema: z.ZodObject<Pick<{
|
|
|
40
98
|
nisn: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
41
99
|
fullName: z.ZodString;
|
|
42
100
|
gender: z.ZodEnum<["L", "P"]>;
|
|
43
|
-
|
|
44
|
-
|
|
101
|
+
classroomId: z.ZodString;
|
|
102
|
+
classroomName: z.ZodString;
|
|
103
|
+
parentPhone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
45
104
|
barcodeValue: z.ZodString;
|
|
46
105
|
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
47
|
-
}, "id" | "
|
|
106
|
+
}, "id" | "classroomId" | "classroomName" | "fullName" | "nis" | "barcodeValue">, "strip", z.ZodTypeAny, {
|
|
48
107
|
id: string;
|
|
108
|
+
classroomId: string;
|
|
109
|
+
classroomName: string;
|
|
49
110
|
fullName: string;
|
|
50
111
|
nis: string;
|
|
51
|
-
classRoomId: string;
|
|
52
|
-
classRoomName: string;
|
|
53
112
|
barcodeValue: string;
|
|
54
113
|
}, {
|
|
55
114
|
id: string;
|
|
115
|
+
classroomId: string;
|
|
116
|
+
classroomName: string;
|
|
56
117
|
fullName: string;
|
|
57
118
|
nis: string;
|
|
58
|
-
classRoomId: string;
|
|
59
|
-
classRoomName: string;
|
|
60
119
|
barcodeValue: string;
|
|
61
120
|
}>;
|
|
121
|
+
export declare const bulkImportStudentRowSchema: z.ZodObject<{
|
|
122
|
+
nis: z.ZodString;
|
|
123
|
+
nisn: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
124
|
+
fullName: z.ZodString;
|
|
125
|
+
gender: z.ZodEnum<["L", "P"]>;
|
|
126
|
+
className: z.ZodString;
|
|
127
|
+
parentPhone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
128
|
+
}, "strip", z.ZodTypeAny, {
|
|
129
|
+
fullName: string;
|
|
130
|
+
nis: string;
|
|
131
|
+
gender: "L" | "P";
|
|
132
|
+
className: string;
|
|
133
|
+
nisn?: string | null | undefined;
|
|
134
|
+
parentPhone?: string | null | undefined;
|
|
135
|
+
}, {
|
|
136
|
+
fullName: string;
|
|
137
|
+
nis: string;
|
|
138
|
+
gender: "L" | "P";
|
|
139
|
+
className: string;
|
|
140
|
+
nisn?: string | null | undefined;
|
|
141
|
+
parentPhone?: string | null | undefined;
|
|
142
|
+
}>;
|
|
143
|
+
export declare const bulkImportStudentRequestSchema: z.ZodObject<{
|
|
144
|
+
academicYearId: z.ZodString;
|
|
145
|
+
defaultclassroomId: z.ZodOptional<z.ZodString>;
|
|
146
|
+
students: z.ZodArray<z.ZodObject<{
|
|
147
|
+
nis: z.ZodString;
|
|
148
|
+
nisn: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
149
|
+
fullName: z.ZodString;
|
|
150
|
+
gender: z.ZodEnum<["L", "P"]>;
|
|
151
|
+
className: z.ZodString;
|
|
152
|
+
parentPhone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
153
|
+
}, "strip", z.ZodTypeAny, {
|
|
154
|
+
fullName: string;
|
|
155
|
+
nis: string;
|
|
156
|
+
gender: "L" | "P";
|
|
157
|
+
className: string;
|
|
158
|
+
nisn?: string | null | undefined;
|
|
159
|
+
parentPhone?: string | null | undefined;
|
|
160
|
+
}, {
|
|
161
|
+
fullName: string;
|
|
162
|
+
nis: string;
|
|
163
|
+
gender: "L" | "P";
|
|
164
|
+
className: string;
|
|
165
|
+
nisn?: string | null | undefined;
|
|
166
|
+
parentPhone?: string | null | undefined;
|
|
167
|
+
}>, "many">;
|
|
168
|
+
}, "strip", z.ZodTypeAny, {
|
|
169
|
+
academicYearId: string;
|
|
170
|
+
students: {
|
|
171
|
+
fullName: string;
|
|
172
|
+
nis: string;
|
|
173
|
+
gender: "L" | "P";
|
|
174
|
+
className: string;
|
|
175
|
+
nisn?: string | null | undefined;
|
|
176
|
+
parentPhone?: string | null | undefined;
|
|
177
|
+
}[];
|
|
178
|
+
defaultclassroomId?: string | undefined;
|
|
179
|
+
}, {
|
|
180
|
+
academicYearId: string;
|
|
181
|
+
students: {
|
|
182
|
+
fullName: string;
|
|
183
|
+
nis: string;
|
|
184
|
+
gender: "L" | "P";
|
|
185
|
+
className: string;
|
|
186
|
+
nisn?: string | null | undefined;
|
|
187
|
+
parentPhone?: string | null | undefined;
|
|
188
|
+
}[];
|
|
189
|
+
defaultclassroomId?: string | undefined;
|
|
190
|
+
}>;
|
|
191
|
+
export declare const bulkImportStudentResponseSchema: z.ZodObject<{
|
|
192
|
+
totalProcessed: z.ZodNumber;
|
|
193
|
+
totalSuccess: z.ZodNumber;
|
|
194
|
+
totalFailed: z.ZodNumber;
|
|
195
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
196
|
+
row: z.ZodNumber;
|
|
197
|
+
nis: z.ZodOptional<z.ZodString>;
|
|
198
|
+
message: z.ZodString;
|
|
199
|
+
}, "strip", z.ZodTypeAny, {
|
|
200
|
+
message: string;
|
|
201
|
+
row: number;
|
|
202
|
+
nis?: string | undefined;
|
|
203
|
+
}, {
|
|
204
|
+
message: string;
|
|
205
|
+
row: number;
|
|
206
|
+
nis?: string | undefined;
|
|
207
|
+
}>, "many">;
|
|
208
|
+
}, "strip", z.ZodTypeAny, {
|
|
209
|
+
errors: {
|
|
210
|
+
message: string;
|
|
211
|
+
row: number;
|
|
212
|
+
nis?: string | undefined;
|
|
213
|
+
}[];
|
|
214
|
+
totalProcessed: number;
|
|
215
|
+
totalSuccess: number;
|
|
216
|
+
totalFailed: number;
|
|
217
|
+
}, {
|
|
218
|
+
errors: {
|
|
219
|
+
message: string;
|
|
220
|
+
row: number;
|
|
221
|
+
nis?: string | undefined;
|
|
222
|
+
}[];
|
|
223
|
+
totalProcessed: number;
|
|
224
|
+
totalSuccess: number;
|
|
225
|
+
totalFailed: number;
|
|
226
|
+
}>;
|
|
227
|
+
export type Gender = z.infer<typeof genderEnum>;
|
|
62
228
|
export type Student = z.infer<typeof studentSchema>;
|
|
229
|
+
export type CreateStudentInput = z.infer<typeof createStudentSchema>;
|
|
230
|
+
export type UpdateStudentInput = z.infer<typeof updateStudentSchema>;
|
|
63
231
|
export type StudentOfflineCache = z.infer<typeof studentOfflineSyncCacheSchema>;
|
|
232
|
+
export type BulkImportStudentRow = z.infer<typeof bulkImportStudentRowSchema>;
|
|
233
|
+
export type BulkImportStudentRequest = z.infer<typeof bulkImportStudentRequestSchema>;
|
|
234
|
+
export type BulkImportStudentResponse = z.infer<typeof bulkImportStudentResponseSchema>;
|