@sekolaos/shared-schema 1.0.0 → 1.0.1
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 +5 -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/common/common.schema.js +3 -1
- package/dist/cjs/common/common.schema.js.map +1 -1
- package/dist/cjs/index.js +1 -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 +44 -5
- 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/common/common.schema.js +2 -0
- package/dist/esm/common/common.schema.js.map +1 -1
- package/dist/esm/index.js +1 -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 +43 -4
- 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/common/common.schema.d.ts +4 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/tenant/attendance-shift.schema.d.ts +97 -0
- package/dist/types/user/student.schema.d.ts +171 -0
- package/dist/types/user/user.schema.d.ts +130 -0
- package/package.json +1 -1
|
@@ -1,17 +1,33 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { uuidSchema } from "../common/common.schema.js";
|
|
3
|
+
export const genderEnum = z.enum(["L", "P"]);
|
|
4
|
+
export const nisSchema = z.string().min(3).max(30);
|
|
5
|
+
export const nisnSchema = z.string().regex(/^\d{10}$/, "NISN harus 10 digit angka");
|
|
6
|
+
export const barcodeValueSchema = z.string().min(3).max(50);
|
|
7
|
+
export const parentPhoneSchema = z.string().regex(/^\+?[0-9]{8,15}$/, "Nomor telepon orang tua tidak valid (8-15 digit)");
|
|
3
8
|
export const studentSchema = z.object({
|
|
4
9
|
id: uuidSchema,
|
|
5
10
|
tenantId: uuidSchema,
|
|
6
|
-
nis:
|
|
7
|
-
nisn:
|
|
11
|
+
nis: nisSchema,
|
|
12
|
+
nisn: nisnSchema.optional().nullable(),
|
|
8
13
|
fullName: z.string().min(2).max(255),
|
|
9
|
-
gender:
|
|
14
|
+
gender: genderEnum,
|
|
10
15
|
classRoomId: uuidSchema,
|
|
11
16
|
classRoomName: z.string(),
|
|
12
|
-
|
|
17
|
+
parentPhone: parentPhoneSchema.optional().nullable(),
|
|
18
|
+
barcodeValue: barcodeValueSchema,
|
|
13
19
|
isActive: z.boolean().default(true),
|
|
14
20
|
});
|
|
21
|
+
export const createStudentSchema = z.object({
|
|
22
|
+
nis: nisSchema,
|
|
23
|
+
nisn: nisnSchema.optional().nullable(),
|
|
24
|
+
fullName: z.string().min(2).max(255),
|
|
25
|
+
gender: genderEnum,
|
|
26
|
+
classRoomId: uuidSchema,
|
|
27
|
+
parentPhone: parentPhoneSchema.optional().nullable(),
|
|
28
|
+
barcodeValue: barcodeValueSchema.optional(),
|
|
29
|
+
});
|
|
30
|
+
export const updateStudentSchema = createStudentSchema.partial();
|
|
15
31
|
export const studentOfflineSyncCacheSchema = studentSchema.pick({
|
|
16
32
|
id: true,
|
|
17
33
|
nis: true,
|
|
@@ -20,4 +36,27 @@ export const studentOfflineSyncCacheSchema = studentSchema.pick({
|
|
|
20
36
|
classRoomName: true,
|
|
21
37
|
barcodeValue: true,
|
|
22
38
|
});
|
|
39
|
+
export const bulkImportStudentRowSchema = z.object({
|
|
40
|
+
nis: z.string().min(3).max(30).trim(),
|
|
41
|
+
nisn: z.string().trim().optional().nullable(),
|
|
42
|
+
fullName: z.string().min(2).max(255).trim(),
|
|
43
|
+
gender: genderEnum,
|
|
44
|
+
className: z.string().min(1).max(50).trim(),
|
|
45
|
+
parentPhone: z.string().trim().optional().nullable(),
|
|
46
|
+
});
|
|
47
|
+
export const bulkImportStudentRequestSchema = z.object({
|
|
48
|
+
academicYearId: uuidSchema,
|
|
49
|
+
defaultClassRoomId: uuidSchema.optional(),
|
|
50
|
+
students: z.array(bulkImportStudentRowSchema).min(1, "Minimal harus ada 1 baris siswa"),
|
|
51
|
+
});
|
|
52
|
+
export const bulkImportStudentResponseSchema = z.object({
|
|
53
|
+
totalProcessed: z.number().int().nonnegative(),
|
|
54
|
+
totalSuccess: z.number().int().nonnegative(),
|
|
55
|
+
totalFailed: z.number().int().nonnegative(),
|
|
56
|
+
errors: z.array(z.object({
|
|
57
|
+
row: z.number().int().positive(),
|
|
58
|
+
nis: z.string().optional(),
|
|
59
|
+
message: z.string(),
|
|
60
|
+
})),
|
|
61
|
+
});
|
|
23
62
|
//# sourceMappingURL=student.schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"student.schema.js","sourceRoot":"","sources":["../../../src/user/student.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"student.schema.js","sourceRoot":"","sources":["../../../src/user/student.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,4BA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CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACrD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,cAAc,EAAE,UAAU;IAC1B,kBAAkB,EAAE,UAAU,CAAC,QAAQ,EAAE;IACzC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,iCAAiC,CAAC;CACxF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACtD,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAC9C,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAC5C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAC3C,MAAM,EAAE,CAAC,CAAC,KAAK,CACb,CAAC,CAAC,MAAM,CAAC;QACP,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;QAChC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC1B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;KACpB,CAAC,CACH;CACF,CAAC,CAAC"}
|
|
@@ -1,11 +1,53 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { uuidSchema } from "../common/common.schema.js";
|
|
2
|
+
import { timestampSchema, uuidSchema } from "../common/common.schema.js";
|
|
3
|
+
import { authenticatedUserRoleSummarySchema } from "../auth/auth.schema.js";
|
|
4
|
+
export const usernameSchema = z
|
|
5
|
+
.string()
|
|
6
|
+
.min(3)
|
|
7
|
+
.max(50)
|
|
8
|
+
.regex(/^[a-zA-Z0-9._-]+$/, "Username hanya boleh berisi huruf, angka, titik, underscore, dan strip");
|
|
9
|
+
export const passwordSchema = z.string().min(6, "Password minimal 6 karakter").max(128);
|
|
10
|
+
export const nipSchema = z.string().max(30).regex(/^\d{8,18}$/, "NIP/NUPTK harus berupa 8-18 digit angka");
|
|
11
|
+
export const phoneNumberSchema = z.string().regex(/^\+?[0-9]{8,15}$/, "Nomor telepon tidak valid (8-15 digit)");
|
|
3
12
|
export const userSchema = z.object({
|
|
4
13
|
id: uuidSchema,
|
|
5
14
|
tenantId: uuidSchema,
|
|
6
|
-
username:
|
|
15
|
+
username: usernameSchema,
|
|
7
16
|
email: z.string().email().optional().nullable(),
|
|
8
17
|
fullName: z.string().min(2).max(255),
|
|
9
18
|
isActive: z.boolean().default(true),
|
|
10
19
|
});
|
|
20
|
+
export const userProfileSchema = z.object({
|
|
21
|
+
id: uuidSchema,
|
|
22
|
+
tenantId: uuidSchema,
|
|
23
|
+
username: usernameSchema,
|
|
24
|
+
email: z.string().email(),
|
|
25
|
+
fullName: z.string().min(2).max(255),
|
|
26
|
+
nip: nipSchema.optional().nullable(),
|
|
27
|
+
phoneNumber: phoneNumberSchema.optional().nullable(),
|
|
28
|
+
isActive: z.boolean().default(true),
|
|
29
|
+
roles: z.array(authenticatedUserRoleSummarySchema).optional(),
|
|
30
|
+
createdAt: timestampSchema,
|
|
31
|
+
updatedAt: timestampSchema,
|
|
32
|
+
});
|
|
33
|
+
export const createUserSchema = z.object({
|
|
34
|
+
username: usernameSchema,
|
|
35
|
+
email: z.string().email(),
|
|
36
|
+
password: passwordSchema,
|
|
37
|
+
fullName: z.string().min(2).max(255),
|
|
38
|
+
nip: nipSchema.optional().nullable(),
|
|
39
|
+
phoneNumber: phoneNumberSchema.optional().nullable(),
|
|
40
|
+
roleIds: z.array(uuidSchema).min(1, "Minimal tentukan 1 role awal"),
|
|
41
|
+
academicYearId: uuidSchema,
|
|
42
|
+
});
|
|
43
|
+
export const updateUserSchema = createUserSchema.omit({
|
|
44
|
+
password: true,
|
|
45
|
+
roleIds: true,
|
|
46
|
+
academicYearId: true,
|
|
47
|
+
}).partial();
|
|
48
|
+
export const assignUserRolesRequestSchema = z.object({
|
|
49
|
+
userId: uuidSchema,
|
|
50
|
+
academicYearId: uuidSchema,
|
|
51
|
+
roleIds: z.array(uuidSchema).min(1, "Minimal pilih 1 peran"),
|
|
52
|
+
});
|
|
11
53
|
//# sourceMappingURL=user.schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.schema.js","sourceRoot":"","sources":["../../../src/user/user.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"user.schema.js","sourceRoot":"","sources":["../../../src/user/user.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,kCAAkC,EAAE,MAAM,wBAAwB,CAAC;AAE5E,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC;KAC5B,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,EAAE,CAAC;KACP,KAAK,CAAC,mBAAmB,EAAE,wEAAwE,CAAC,CAAC;AAExG,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,6BAA6B,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAExF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,EAAE,yCAAyC,CAAC,CAAC;AAE3G,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CA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IACxB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;IACzB,QAAQ,EAAE,cAAc;IACxB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACpC,GAAG,EAAE,SAAS,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACpC,WAAW,EAAE,iBAAiB,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACpD,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,8BAA8B,CAAC;IACnE,cAAc,EAAE,UAAU;CAC3B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,IAAI,CAAC;IACpD,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;IACb,cAAc,EAAE,IAAI;CACrB,CAAC,CAAC,OAAO,EAAE,CAAC;AAEb,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,MAAM,EAAE,UAAU;IAClB,cAAc,EAAE,UAAU;IAC1B,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,uBAAuB,CAAC;CAC7D,CAAC,CAAC"}
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const semesterEnum: z.ZodEnum<["GANJIL", "GENAP"]>;
|
|
3
|
-
export declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
name:
|
|
7
|
-
|
|
8
|
-
isActive:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
export declare const academicYearNameSchema: z.ZodString;
|
|
4
|
+
export declare const academicYearSchema: z.ZodEffects<z.ZodType<{
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
tenantId: string;
|
|
8
|
+
isActive: boolean;
|
|
9
|
+
semester: "GANJIL" | "GENAP";
|
|
10
|
+
startDate: string;
|
|
11
|
+
endDate: string;
|
|
12
|
+
}, z.ZodTypeDef, {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
tenantId: string;
|
|
16
|
+
isActive: boolean;
|
|
17
|
+
semester: "GANJIL" | "GENAP";
|
|
18
|
+
startDate: string;
|
|
19
|
+
endDate: string;
|
|
20
|
+
}>, {
|
|
12
21
|
id: string;
|
|
13
22
|
name: string;
|
|
14
23
|
tenantId: string;
|
|
@@ -25,5 +34,62 @@ export declare const academicYearSchema: z.ZodObject<{
|
|
|
25
34
|
startDate: string;
|
|
26
35
|
endDate: string;
|
|
27
36
|
}>;
|
|
37
|
+
export declare const createAcademicYearSchema: z.ZodEffects<z.ZodType<{
|
|
38
|
+
name: string;
|
|
39
|
+
semester: "GANJIL" | "GENAP";
|
|
40
|
+
startDate: string;
|
|
41
|
+
endDate: string;
|
|
42
|
+
}, z.ZodTypeDef, {
|
|
43
|
+
name: string;
|
|
44
|
+
semester: "GANJIL" | "GENAP";
|
|
45
|
+
startDate: string;
|
|
46
|
+
endDate: string;
|
|
47
|
+
}>, {
|
|
48
|
+
name: string;
|
|
49
|
+
semester: "GANJIL" | "GENAP";
|
|
50
|
+
startDate: string;
|
|
51
|
+
endDate: string;
|
|
52
|
+
}, {
|
|
53
|
+
name: string;
|
|
54
|
+
semester: "GANJIL" | "GENAP";
|
|
55
|
+
startDate: string;
|
|
56
|
+
endDate: string;
|
|
57
|
+
}>;
|
|
58
|
+
export declare const updateAcademicYearSchema: z.ZodEffects<z.ZodObject<{
|
|
59
|
+
name: z.ZodOptional<z.ZodString>;
|
|
60
|
+
semester: z.ZodOptional<z.ZodEnum<["GANJIL", "GENAP"]>>;
|
|
61
|
+
startDate: z.ZodOptional<z.ZodString>;
|
|
62
|
+
endDate: z.ZodOptional<z.ZodString>;
|
|
63
|
+
}, "strip", z.ZodTypeAny, {
|
|
64
|
+
name?: string | undefined;
|
|
65
|
+
semester?: "GANJIL" | "GENAP" | undefined;
|
|
66
|
+
startDate?: string | undefined;
|
|
67
|
+
endDate?: string | undefined;
|
|
68
|
+
}, {
|
|
69
|
+
name?: string | undefined;
|
|
70
|
+
semester?: "GANJIL" | "GENAP" | undefined;
|
|
71
|
+
startDate?: string | undefined;
|
|
72
|
+
endDate?: string | undefined;
|
|
73
|
+
}>, {
|
|
74
|
+
name?: string | undefined;
|
|
75
|
+
semester?: "GANJIL" | "GENAP" | undefined;
|
|
76
|
+
startDate?: string | undefined;
|
|
77
|
+
endDate?: string | undefined;
|
|
78
|
+
}, {
|
|
79
|
+
name?: string | undefined;
|
|
80
|
+
semester?: "GANJIL" | "GENAP" | undefined;
|
|
81
|
+
startDate?: string | undefined;
|
|
82
|
+
endDate?: string | undefined;
|
|
83
|
+
}>;
|
|
84
|
+
export declare const activateAcademicYearSchema: z.ZodObject<{
|
|
85
|
+
academicYearId: z.ZodString;
|
|
86
|
+
}, "strip", z.ZodTypeAny, {
|
|
87
|
+
academicYearId: string;
|
|
88
|
+
}, {
|
|
89
|
+
academicYearId: string;
|
|
90
|
+
}>;
|
|
28
91
|
export type Semester = z.infer<typeof semesterEnum>;
|
|
29
92
|
export type AcademicYear = z.infer<typeof academicYearSchema>;
|
|
93
|
+
export type CreateAcademicYearInput = z.infer<typeof createAcademicYearSchema>;
|
|
94
|
+
export type UpdateAcademicYearInput = z.infer<typeof updateAcademicYearSchema>;
|
|
95
|
+
export type ActivateAcademicYearInput = z.infer<typeof activateAcademicYearSchema>;
|
|
@@ -1,27 +1,86 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const classroomSchema: z.ZodObject<{
|
|
3
3
|
id: z.ZodString;
|
|
4
4
|
tenantId: z.ZodString;
|
|
5
5
|
academicYearId: z.ZodString;
|
|
6
6
|
name: z.ZodString;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
gradeLevel: z.ZodString;
|
|
8
|
+
homeroomTeacherId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
9
|
+
homeroomTeacherName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
10
|
+
totalStudents: z.ZodDefault<z.ZodNumber>;
|
|
10
11
|
}, "strip", z.ZodTypeAny, {
|
|
11
12
|
id: string;
|
|
12
13
|
name: string;
|
|
13
14
|
tenantId: string;
|
|
14
15
|
academicYearId: string;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
gradeLevel: string;
|
|
17
|
+
totalStudents: number;
|
|
18
|
+
homeroomTeacherId?: string | null | undefined;
|
|
19
|
+
homeroomTeacherName?: string | null | undefined;
|
|
18
20
|
}, {
|
|
19
21
|
id: string;
|
|
20
22
|
name: string;
|
|
21
23
|
tenantId: string;
|
|
22
24
|
academicYearId: string;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
gradeLevel: string;
|
|
26
|
+
homeroomTeacherId?: string | null | undefined;
|
|
27
|
+
homeroomTeacherName?: string | null | undefined;
|
|
28
|
+
totalStudents?: number | undefined;
|
|
26
29
|
}>;
|
|
27
|
-
export
|
|
30
|
+
export declare const createClassroomSchema: z.ZodObject<Pick<{
|
|
31
|
+
id: z.ZodString;
|
|
32
|
+
tenantId: z.ZodString;
|
|
33
|
+
academicYearId: z.ZodString;
|
|
34
|
+
name: z.ZodString;
|
|
35
|
+
gradeLevel: z.ZodString;
|
|
36
|
+
homeroomTeacherId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
37
|
+
homeroomTeacherName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
38
|
+
totalStudents: z.ZodDefault<z.ZodNumber>;
|
|
39
|
+
}, "name" | "academicYearId" | "gradeLevel" | "homeroomTeacherId">, "strip", z.ZodTypeAny, {
|
|
40
|
+
name: string;
|
|
41
|
+
academicYearId: string;
|
|
42
|
+
gradeLevel: string;
|
|
43
|
+
homeroomTeacherId?: string | null | undefined;
|
|
44
|
+
}, {
|
|
45
|
+
name: string;
|
|
46
|
+
academicYearId: string;
|
|
47
|
+
gradeLevel: string;
|
|
48
|
+
homeroomTeacherId?: string | null | undefined;
|
|
49
|
+
}>;
|
|
50
|
+
export declare const updateClassroomSchema: z.ZodObject<{
|
|
51
|
+
name: z.ZodOptional<z.ZodString>;
|
|
52
|
+
academicYearId: z.ZodOptional<z.ZodString>;
|
|
53
|
+
gradeLevel: z.ZodOptional<z.ZodString>;
|
|
54
|
+
homeroomTeacherId: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
55
|
+
}, "strip", z.ZodTypeAny, {
|
|
56
|
+
name?: string | undefined;
|
|
57
|
+
academicYearId?: string | undefined;
|
|
58
|
+
gradeLevel?: string | undefined;
|
|
59
|
+
homeroomTeacherId?: string | null | undefined;
|
|
60
|
+
}, {
|
|
61
|
+
name?: string | undefined;
|
|
62
|
+
academicYearId?: string | undefined;
|
|
63
|
+
gradeLevel?: string | undefined;
|
|
64
|
+
homeroomTeacherId?: string | null | undefined;
|
|
65
|
+
}>;
|
|
66
|
+
export declare const promoteClassStudentsSchema: z.ZodObject<{
|
|
67
|
+
sourceClassroomId: z.ZodString;
|
|
68
|
+
targetClassroomId: z.ZodString;
|
|
69
|
+
targetAcademicYearId: z.ZodString;
|
|
70
|
+
studentIds: z.ZodArray<z.ZodString, "many">;
|
|
71
|
+
}, "strip", z.ZodTypeAny, {
|
|
72
|
+
sourceClassroomId: string;
|
|
73
|
+
targetClassroomId: string;
|
|
74
|
+
targetAcademicYearId: string;
|
|
75
|
+
studentIds: string[];
|
|
76
|
+
}, {
|
|
77
|
+
sourceClassroomId: string;
|
|
78
|
+
targetClassroomId: string;
|
|
79
|
+
targetAcademicYearId: string;
|
|
80
|
+
studentIds: string[];
|
|
81
|
+
}>;
|
|
82
|
+
export type ClassRoom = z.infer<typeof classroomSchema>;
|
|
83
|
+
export type Classroom = ClassRoom;
|
|
84
|
+
export type CreateClassroomInput = z.infer<typeof createClassroomSchema>;
|
|
85
|
+
export type UpdateClassroomInput = z.infer<typeof updateClassroomSchema>;
|
|
86
|
+
export type PromoteClassStudentsInput = z.infer<typeof promoteClassStudentsSchema>;
|
|
@@ -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,6 +1,7 @@
|
|
|
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";
|
|
@@ -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;
|
|
@@ -8,6 +13,7 @@ export declare const studentSchema: z.ZodObject<{
|
|
|
8
13
|
gender: z.ZodEnum<["L", "P"]>;
|
|
9
14
|
classRoomId: z.ZodString;
|
|
10
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, {
|
|
@@ -21,6 +27,7 @@ export declare const studentSchema: z.ZodObject<{
|
|
|
21
27
|
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;
|
|
@@ -32,6 +39,57 @@ export declare const studentSchema: z.ZodObject<{
|
|
|
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
|
+
fullName: string;
|
|
54
|
+
nis: string;
|
|
55
|
+
gender: "L" | "P";
|
|
56
|
+
classRoomId: string;
|
|
57
|
+
nisn?: string | null | undefined;
|
|
58
|
+
parentPhone?: string | null | undefined;
|
|
59
|
+
barcodeValue?: string | undefined;
|
|
60
|
+
}, {
|
|
61
|
+
fullName: string;
|
|
62
|
+
nis: string;
|
|
63
|
+
gender: "L" | "P";
|
|
64
|
+
classRoomId: string;
|
|
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
|
+
fullName?: string | undefined;
|
|
79
|
+
nis?: string | undefined;
|
|
80
|
+
nisn?: string | null | undefined;
|
|
81
|
+
gender?: "L" | "P" | undefined;
|
|
82
|
+
classRoomId?: string | undefined;
|
|
83
|
+
parentPhone?: string | null | undefined;
|
|
84
|
+
barcodeValue?: string | undefined;
|
|
85
|
+
}, {
|
|
86
|
+
fullName?: string | undefined;
|
|
87
|
+
nis?: string | undefined;
|
|
88
|
+
nisn?: string | null | undefined;
|
|
89
|
+
gender?: "L" | "P" | undefined;
|
|
90
|
+
classRoomId?: string | 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;
|
|
@@ -42,6 +100,7 @@ export declare const studentOfflineSyncCacheSchema: z.ZodObject<Pick<{
|
|
|
42
100
|
gender: z.ZodEnum<["L", "P"]>;
|
|
43
101
|
classRoomId: z.ZodString;
|
|
44
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
106
|
}, "id" | "fullName" | "nis" | "classRoomId" | "classRoomName" | "barcodeValue">, "strip", z.ZodTypeAny, {
|
|
@@ -59,5 +118,117 @@ export declare const studentOfflineSyncCacheSchema: z.ZodObject<Pick<{
|
|
|
59
118
|
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>;
|