@sekolaos/shared-schema 1.0.1 → 1.0.3
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 +3 -0
- 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/index.js +3 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/user/student.schema.js +8 -6
- package/dist/cjs/user/student.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/index.js +3 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/user/student.schema.js +8 -6
- package/dist/esm/user/student.schema.js.map +1 -1
- 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/index.d.ts +3 -0
- package/dist/types/user/student.schema.d.ts +32 -22
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -74,10 +74,13 @@ export const validatePagination = (req, _res, next) => {
|
|
|
74
74
|
| `auth/auth.schema` | `loginRequestSchema`, `authSessionSchema`, `authenticatedUserRoleSummarySchema` |
|
|
75
75
|
| `academic/academic-year.schema` | `semesterEnum`, `academicYearSchema`, `createAcademicYearSchema`, `updateAcademicYearSchema`, `activateAcademicYearSchema` |
|
|
76
76
|
| `academic/class-room.schema` | `classroomSchema`, `createClassroomSchema`, `updateClassroomSchema`, `promoteClassStudentsSchema` |
|
|
77
|
+
| `academic/subject.schema` | `subjectSchema`, `createSubjectSchema`, `updateSubjectSchema` |
|
|
78
|
+
| `academic/teaching-schedule.schema` | `dayOfWeekEnum`, `teachingScheduleSchema`, `createTeachingScheduleSchema`, `updateTeachingScheduleSchema` |
|
|
77
79
|
| `user/user.schema` | `userSchema`, `userProfileSchema`, `createUserSchema`, `updateUserSchema`, `assignUserRolesRequestSchema` |
|
|
78
80
|
| `user/student.schema` | `studentSchema`, `studentOfflineSyncCacheSchema`, `createStudentSchema`, `updateStudentSchema`, `bulkImportStudentRowSchema`, `bulkImportStudentRequestSchema`, `bulkImportStudentResponseSchema` |
|
|
79
81
|
| `attendance/attendance-kiosk.schema` | `attendanceStatusEnum`, `kioskScanItemSchema`, `batchSyncAttendanceRequestSchema`, `batchSyncAttendanceResponseSchema` |
|
|
80
82
|
| `attendance/attendance-class.schema` | `classAttendanceUpdateItemSchema`, `updateClassAttendanceRequestSchema` |
|
|
83
|
+
| `attendance/picket-assignment.schema` | `picketAssignmentSchema`, `createPicketAssignmentSchema` |
|
|
81
84
|
| `attendance/barcode-rolling.schema` | `rollingBarcodePayloadSchema`, `teacherScanDynamicBarcodeRequestSchema` |
|
|
82
85
|
|
|
83
86
|
Semua tersedia lewat entry point tunggal:
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateSubjectSchema = exports.createSubjectSchema = exports.subjectSchema = exports.subjectCodeSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_schema_js_1 = require("../common/common.schema.js");
|
|
6
|
+
exports.subjectCodeSchema = zod_1.z.string().trim().min(2).max(20);
|
|
7
|
+
exports.subjectSchema = zod_1.z.object({
|
|
8
|
+
id: common_schema_js_1.uuidSchema,
|
|
9
|
+
tenantId: common_schema_js_1.uuidSchema,
|
|
10
|
+
code: exports.subjectCodeSchema,
|
|
11
|
+
name: zod_1.z.string().min(2).max(100),
|
|
12
|
+
description: zod_1.z.string().max(255).optional().nullable(),
|
|
13
|
+
isActive: zod_1.z.boolean().default(true),
|
|
14
|
+
});
|
|
15
|
+
exports.createSubjectSchema = exports.subjectSchema.pick({
|
|
16
|
+
code: true,
|
|
17
|
+
name: true,
|
|
18
|
+
description: true,
|
|
19
|
+
});
|
|
20
|
+
exports.updateSubjectSchema = exports.createSubjectSchema.partial();
|
|
21
|
+
//# sourceMappingURL=subject.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subject.schema.js","sourceRoot":"","sources":["../../../src/academic/subject.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,iEAAwD;AAE3C,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAErD,QAAA,aAAa,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,EAAE,EAAE,6BAAU;IACd,QAAQ,EAAE,6BAAU;IACpB,IAAI,EAAE,yBAAiB;IACvB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAChC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACtD,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;CACpC,CAAC,CAAC;AAEU,QAAA,mBAAmB,GAAG,qBAAa,CAAC,IAAI,CAAC;IACpD,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;IACV,WAAW,EAAE,IAAI;CAClB,CAAC,CAAC;AAEU,QAAA,mBAAmB,GAAG,2BAAmB,CAAC,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateTeachingScheduleSchema = exports.createTeachingScheduleSchema = exports.teachingScheduleSchema = exports.periodNumberSchema = exports.dayOfWeekEnum = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_schema_js_1 = require("../common/common.schema.js");
|
|
6
|
+
exports.dayOfWeekEnum = zod_1.z.enum(["SENIN", "SELASA", "RABU", "KAMIS", "JUMAT", "SABTU"]);
|
|
7
|
+
exports.periodNumberSchema = zod_1.z.number().int().min(1).max(15);
|
|
8
|
+
const teachingScheduleObjectSchema = zod_1.z.object({
|
|
9
|
+
id: common_schema_js_1.uuidSchema,
|
|
10
|
+
tenantId: common_schema_js_1.uuidSchema,
|
|
11
|
+
academicYearId: common_schema_js_1.uuidSchema,
|
|
12
|
+
classroomId: common_schema_js_1.uuidSchema,
|
|
13
|
+
classroomName: zod_1.z.string().optional(),
|
|
14
|
+
teacherUserId: common_schema_js_1.uuidSchema,
|
|
15
|
+
teacherName: zod_1.z.string().optional(),
|
|
16
|
+
subjectId: common_schema_js_1.uuidSchema,
|
|
17
|
+
subjectName: zod_1.z.string().optional(),
|
|
18
|
+
dayOfWeek: exports.dayOfWeekEnum,
|
|
19
|
+
startTime: common_schema_js_1.timeStringSchema,
|
|
20
|
+
endTime: common_schema_js_1.timeStringSchema,
|
|
21
|
+
periodNumber: exports.periodNumberSchema.optional(),
|
|
22
|
+
});
|
|
23
|
+
/** Aturan lintas-field: jam selesai harus lebih besar dari jam mulai. */
|
|
24
|
+
const addTimeRangeRule = (schema) => schema.refine((schedule) => schedule.startTime < schedule.endTime, {
|
|
25
|
+
message: "Jam selesai harus lebih besar dari jam mulai",
|
|
26
|
+
path: ["endTime"],
|
|
27
|
+
});
|
|
28
|
+
exports.teachingScheduleSchema = addTimeRangeRule(teachingScheduleObjectSchema);
|
|
29
|
+
exports.createTeachingScheduleSchema = addTimeRangeRule(teachingScheduleObjectSchema.omit({
|
|
30
|
+
id: true,
|
|
31
|
+
tenantId: true,
|
|
32
|
+
classroomName: true,
|
|
33
|
+
teacherName: true,
|
|
34
|
+
subjectName: true,
|
|
35
|
+
}));
|
|
36
|
+
exports.updateTeachingScheduleSchema = teachingScheduleObjectSchema
|
|
37
|
+
.omit({
|
|
38
|
+
id: true,
|
|
39
|
+
tenantId: true,
|
|
40
|
+
classroomName: true,
|
|
41
|
+
teacherName: true,
|
|
42
|
+
subjectName: true,
|
|
43
|
+
})
|
|
44
|
+
.partial()
|
|
45
|
+
.refine((schedule) => !schedule.startTime || !schedule.endTime || schedule.startTime < schedule.endTime, {
|
|
46
|
+
message: "Jam selesai harus lebih besar dari jam mulai",
|
|
47
|
+
path: ["endTime"],
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=teaching-schedule.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"teaching-schedule.schema.js","sourceRoot":"","sources":["../../../src/academic/teaching-schedule.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,iEAA0E;AAE7D,QAAA,aAAa,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAE/E,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAElE,MAAM,4BAA4B,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,EAAE,EAAE,6BAAU;IACd,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,CAAC,QAAQ,CAAC,SAAS,IAAI,CAAC,QAAQ,CAAC,OAAO,IAAI,QAAQ,CAAC,SAAS,GAAG,QAAQ,CAAC,OAAO,EAAE;IACvG,OAAO,EAAE,8CAA8C;IACvD,IAAI,EAAE,CAAC,SAAS,CAAC;CAClB,CAAC,CAAC"}
|
|
@@ -12,7 +12,7 @@ exports.classAttendanceUpdateItemSchema = zod_1.z.object({
|
|
|
12
12
|
exports.updateClassAttendanceRequestSchema = zod_1.z.object({
|
|
13
13
|
teachingScheduleId: common_schema_js_1.uuidSchema,
|
|
14
14
|
academicYearId: common_schema_js_1.uuidSchema,
|
|
15
|
-
|
|
15
|
+
classroomId: common_schema_js_1.uuidSchema,
|
|
16
16
|
date: zod_1.z.string().date(),
|
|
17
17
|
attendances: zod_1.z.array(exports.classAttendanceUpdateItemSchema).min(1),
|
|
18
18
|
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createPicketAssignmentSchema = exports.picketAssignmentSchema = exports.picketLocationSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_schema_js_1 = require("../common/common.schema.js");
|
|
6
|
+
const teaching_schedule_schema_js_1 = require("../academic/teaching-schedule.schema.js");
|
|
7
|
+
exports.picketLocationSchema = zod_1.z.string().trim().min(1).max(100);
|
|
8
|
+
exports.picketAssignmentSchema = zod_1.z.object({
|
|
9
|
+
id: common_schema_js_1.uuidSchema,
|
|
10
|
+
tenantId: common_schema_js_1.uuidSchema,
|
|
11
|
+
academicYearId: common_schema_js_1.uuidSchema,
|
|
12
|
+
teacherUserId: common_schema_js_1.uuidSchema,
|
|
13
|
+
teacherName: zod_1.z.string().optional(),
|
|
14
|
+
dayOfWeek: teaching_schedule_schema_js_1.dayOfWeekEnum,
|
|
15
|
+
location: exports.picketLocationSchema.default("Gerbang Utama"),
|
|
16
|
+
isActive: zod_1.z.boolean().default(true),
|
|
17
|
+
});
|
|
18
|
+
exports.createPicketAssignmentSchema = exports.picketAssignmentSchema.pick({
|
|
19
|
+
academicYearId: true,
|
|
20
|
+
teacherUserId: true,
|
|
21
|
+
dayOfWeek: true,
|
|
22
|
+
location: true,
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=picket-assignment.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"picket-assignment.schema.js","sourceRoot":"","sources":["../../../src/attendance/picket-assignment.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,iEAAwD;AACxD,yFAAwE;AAE3D,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAEzD,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,EAAE,EAAE,6BAAU;IACd,QAAQ,EAAE,6BAAU;IACpB,cAAc,EAAE,6BAAU;IAC1B,aAAa,EAAE,6BAAU;IACzB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,SAAS,EAAE,2CAAa;IACxB,QAAQ,EAAE,4BAAoB,CAAC,OAAO,CAAC,eAAe,CAAC;IACvD,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;CACpC,CAAC,CAAC;AAEU,QAAA,4BAA4B,GAAG,8BAAsB,CAAC,IAAI,CAAC;IACtE,cAAc,EAAE,IAAI;IACpB,aAAa,EAAE,IAAI;IACnB,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -22,9 +22,12 @@ __exportStar(require("./auth/role.schema.js"), exports);
|
|
|
22
22
|
__exportStar(require("./auth/auth.schema.js"), exports);
|
|
23
23
|
__exportStar(require("./academic/academic-year.schema.js"), exports);
|
|
24
24
|
__exportStar(require("./academic/class-room.schema.js"), exports);
|
|
25
|
+
__exportStar(require("./academic/subject.schema.js"), exports);
|
|
26
|
+
__exportStar(require("./academic/teaching-schedule.schema.js"), exports);
|
|
25
27
|
__exportStar(require("./user/user.schema.js"), exports);
|
|
26
28
|
__exportStar(require("./user/student.schema.js"), exports);
|
|
27
29
|
__exportStar(require("./attendance/attendance-kiosk.schema.js"), exports);
|
|
28
30
|
__exportStar(require("./attendance/attendance-class.schema.js"), exports);
|
|
31
|
+
__exportStar(require("./attendance/picket-assignment.schema.js"), exports);
|
|
29
32
|
__exportStar(require("./attendance/barcode-rolling.schema.js"), exports);
|
|
30
33
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,gEAA8C;AAC9C,4DAA0C;AAC1C,sEAAoD;AACpD,wDAAsC;AACtC,wDAAsC;AACtC,qEAAmD;AACnD,kEAAgD;AAChD,wDAAsC;AACtC,2DAAyC;AACzC,0EAAwD;AACxD,0EAAwD;AACxD,yEAAuD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,gEAA8C;AAC9C,4DAA0C;AAC1C,sEAAoD;AACpD,wDAAsC;AACtC,wDAAsC;AACtC,qEAAmD;AACnD,kEAAgD;AAChD,+DAA6C;AAC7C,yEAAuD;AACvD,wDAAsC;AACtC,2DAAyC;AACzC,0EAAwD;AACxD,0EAAwD;AACxD,2EAAyD;AACzD,yEAAuD"}
|
|
@@ -15,10 +15,11 @@ exports.studentSchema = zod_1.z.object({
|
|
|
15
15
|
nisn: exports.nisnSchema.optional().nullable(),
|
|
16
16
|
fullName: zod_1.z.string().min(2).max(255),
|
|
17
17
|
gender: exports.genderEnum,
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
classroomId: common_schema_js_1.uuidSchema,
|
|
19
|
+
classroomName: zod_1.z.string(),
|
|
20
20
|
parentPhone: exports.parentPhoneSchema.optional().nullable(),
|
|
21
21
|
barcodeValue: exports.barcodeValueSchema,
|
|
22
|
+
photoUrl: zod_1.z.string().url().optional().nullable(),
|
|
22
23
|
isActive: zod_1.z.boolean().default(true),
|
|
23
24
|
});
|
|
24
25
|
exports.createStudentSchema = zod_1.z.object({
|
|
@@ -26,17 +27,18 @@ exports.createStudentSchema = zod_1.z.object({
|
|
|
26
27
|
nisn: exports.nisnSchema.optional().nullable(),
|
|
27
28
|
fullName: zod_1.z.string().min(2).max(255),
|
|
28
29
|
gender: exports.genderEnum,
|
|
29
|
-
|
|
30
|
+
classroomId: common_schema_js_1.uuidSchema,
|
|
30
31
|
parentPhone: exports.parentPhoneSchema.optional().nullable(),
|
|
31
32
|
barcodeValue: exports.barcodeValueSchema.optional(),
|
|
33
|
+
photoUrl: zod_1.z.string().url().optional().nullable(),
|
|
32
34
|
});
|
|
33
35
|
exports.updateStudentSchema = exports.createStudentSchema.partial();
|
|
34
36
|
exports.studentOfflineSyncCacheSchema = exports.studentSchema.pick({
|
|
35
37
|
id: true,
|
|
36
38
|
nis: true,
|
|
37
39
|
fullName: true,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
classroomId: true,
|
|
41
|
+
classroomName: true,
|
|
40
42
|
barcodeValue: true,
|
|
41
43
|
});
|
|
42
44
|
exports.bulkImportStudentRowSchema = zod_1.z.object({
|
|
@@ -49,7 +51,7 @@ exports.bulkImportStudentRowSchema = zod_1.z.object({
|
|
|
49
51
|
});
|
|
50
52
|
exports.bulkImportStudentRequestSchema = zod_1.z.object({
|
|
51
53
|
academicYearId: common_schema_js_1.uuidSchema,
|
|
52
|
-
|
|
54
|
+
defaultclassroomId: common_schema_js_1.uuidSchema.optional(),
|
|
53
55
|
students: zod_1.z.array(exports.bulkImportStudentRowSchema).min(1, "Minimal harus ada 1 baris siswa"),
|
|
54
56
|
});
|
|
55
57
|
exports.bulkImportStudentResponseSchema = zod_1.z.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"student.schema.js","sourceRoot":"","sources":["../../../src/user/student.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,iEAAwD;AAE3C,QAAA,UAAU,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AAEhC,QAAA,SAAS,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AACtC,QAAA,UAAU,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,UAAU,EAAE,2BAA2B,CAAC,CAAC;AACvE,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAC/C,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,kBAAkB,EAAE,kDAAkD,CAAC,CAAC;AAE7G,QAAA,aAAa,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,EAAE,EAAE,6BAAU;IACd,QAAQ,EAAE,6BAAU;IACpB,GAAG,EAAE,iBAAS;IACd,IAAI,EAAE,kBAAU,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACtC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACpC,MAAM,EAAE,kBAAU;IAClB,WAAW,EAAE,6BAAU;IACvB,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE;IACzB,WAAW,EAAE,yBAAiB,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACpD,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C,GAAG,EAAE,CAAC,WAAW,EAAE;IAC5C,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAC3C,MAAM,EAAE,OAAC,CAAC,KAAK,CACb,OAAC,CAAC,MAAM,CAAC;QACP,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;QAChC,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC1B,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;KACpB,CAAC,CACH;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { uuidSchema } from "../common/common.schema.js";
|
|
3
|
+
export const subjectCodeSchema = z.string().trim().min(2).max(20);
|
|
4
|
+
export const subjectSchema = z.object({
|
|
5
|
+
id: uuidSchema,
|
|
6
|
+
tenantId: uuidSchema,
|
|
7
|
+
code: subjectCodeSchema,
|
|
8
|
+
name: z.string().min(2).max(100),
|
|
9
|
+
description: z.string().max(255).optional().nullable(),
|
|
10
|
+
isActive: z.boolean().default(true),
|
|
11
|
+
});
|
|
12
|
+
export const createSubjectSchema = subjectSchema.pick({
|
|
13
|
+
code: true,
|
|
14
|
+
name: true,
|
|
15
|
+
description: true,
|
|
16
|
+
});
|
|
17
|
+
export const updateSubjectSchema = createSubjectSchema.partial();
|
|
18
|
+
//# sourceMappingURL=subject.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subject.schema.js","sourceRoot":"","sources":["../../../src/academic/subject.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAElE,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,EAAE,EAAE,UAAU;IACd,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAChC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACtD,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;CACpC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAC,IAAI,CAAC;IACpD,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;IACV,WAAW,EAAE,IAAI;CAClB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { timeStringSchema, uuidSchema } from "../common/common.schema.js";
|
|
3
|
+
export const dayOfWeekEnum = z.enum(["SENIN", "SELASA", "RABU", "KAMIS", "JUMAT", "SABTU"]);
|
|
4
|
+
export const periodNumberSchema = z.number().int().min(1).max(15);
|
|
5
|
+
const teachingScheduleObjectSchema = z.object({
|
|
6
|
+
id: uuidSchema,
|
|
7
|
+
tenantId: uuidSchema,
|
|
8
|
+
academicYearId: uuidSchema,
|
|
9
|
+
classroomId: uuidSchema,
|
|
10
|
+
classroomName: z.string().optional(),
|
|
11
|
+
teacherUserId: uuidSchema,
|
|
12
|
+
teacherName: z.string().optional(),
|
|
13
|
+
subjectId: uuidSchema,
|
|
14
|
+
subjectName: z.string().optional(),
|
|
15
|
+
dayOfWeek: dayOfWeekEnum,
|
|
16
|
+
startTime: timeStringSchema,
|
|
17
|
+
endTime: timeStringSchema,
|
|
18
|
+
periodNumber: periodNumberSchema.optional(),
|
|
19
|
+
});
|
|
20
|
+
/** Aturan lintas-field: jam selesai harus lebih besar dari jam mulai. */
|
|
21
|
+
const addTimeRangeRule = (schema) => schema.refine((schedule) => schedule.startTime < schedule.endTime, {
|
|
22
|
+
message: "Jam selesai harus lebih besar dari jam mulai",
|
|
23
|
+
path: ["endTime"],
|
|
24
|
+
});
|
|
25
|
+
export const teachingScheduleSchema = addTimeRangeRule(teachingScheduleObjectSchema);
|
|
26
|
+
export const createTeachingScheduleSchema = addTimeRangeRule(teachingScheduleObjectSchema.omit({
|
|
27
|
+
id: true,
|
|
28
|
+
tenantId: true,
|
|
29
|
+
classroomName: true,
|
|
30
|
+
teacherName: true,
|
|
31
|
+
subjectName: true,
|
|
32
|
+
}));
|
|
33
|
+
export const updateTeachingScheduleSchema = teachingScheduleObjectSchema
|
|
34
|
+
.omit({
|
|
35
|
+
id: true,
|
|
36
|
+
tenantId: true,
|
|
37
|
+
classroomName: true,
|
|
38
|
+
teacherName: true,
|
|
39
|
+
subjectName: true,
|
|
40
|
+
})
|
|
41
|
+
.partial()
|
|
42
|
+
.refine((schedule) => !schedule.startTime || !schedule.endTime || schedule.startTime < schedule.endTime, {
|
|
43
|
+
message: "Jam selesai harus lebih besar dari jam mulai",
|
|
44
|
+
path: ["endTime"],
|
|
45
|
+
});
|
|
46
|
+
//# sourceMappingURL=teaching-schedule.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"teaching-schedule.schema.js","sourceRoot":"","sources":["../../../src/academic/teaching-schedule.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAE1E,MAAM,CAAC,M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AAE,IAAI;IACR,QAAQ,EAAE,IAAI;IACd,aAAa,EAAE,IAAI;IACnB,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,IAAI;CAClB,CAAC,CACH,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAG,4BAA4B;KACrE,IAAI,CAAC;IACJ,EAAE,EAAE,IAAI;IACR,QAAQ,EAAE,IAAI;IACd,aAAa,EAAE,IAAI;IACnB,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,IAAI;CAClB,CAAC;KACD,OAAO,EAAE;KACT,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,SAAS,IAAI,CAAC,QAAQ,CAAC,OAAO,IAAI,QAAQ,CAAC,SAAS,GAAG,QAAQ,CAAC,OAAO,EAAE;IACvG,OAAO,EAAE,8CAA8C;IACvD,IAAI,EAAE,CAAC,SAAS,CAAC;CAClB,CAAC,CAAC"}
|
|
@@ -9,7 +9,7 @@ export const classAttendanceUpdateItemSchema = z.object({
|
|
|
9
9
|
export const updateClassAttendanceRequestSchema = z.object({
|
|
10
10
|
teachingScheduleId: uuidSchema,
|
|
11
11
|
academicYearId: uuidSchema,
|
|
12
|
-
|
|
12
|
+
classroomId: uuidSchema,
|
|
13
13
|
date: z.string().date(),
|
|
14
14
|
attendances: z.array(classAttendanceUpdateItemSchema).min(1),
|
|
15
15
|
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { uuidSchema } from "../common/common.schema.js";
|
|
3
|
+
import { dayOfWeekEnum } from "../academic/teaching-schedule.schema.js";
|
|
4
|
+
export const picketLocationSchema = z.string().trim().min(1).max(100);
|
|
5
|
+
export const picketAssignmentSchema = z.object({
|
|
6
|
+
id: uuidSchema,
|
|
7
|
+
tenantId: uuidSchema,
|
|
8
|
+
academicYearId: uuidSchema,
|
|
9
|
+
teacherUserId: uuidSchema,
|
|
10
|
+
teacherName: z.string().optional(),
|
|
11
|
+
dayOfWeek: dayOfWeekEnum,
|
|
12
|
+
location: picketLocationSchema.default("Gerbang Utama"),
|
|
13
|
+
isActive: z.boolean().default(true),
|
|
14
|
+
});
|
|
15
|
+
export const createPicketAssignmentSchema = picketAssignmentSchema.pick({
|
|
16
|
+
academicYearId: true,
|
|
17
|
+
teacherUserId: true,
|
|
18
|
+
dayOfWeek: true,
|
|
19
|
+
location: true,
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=picket-assignment.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"picket-assignment.schema.js","sourceRoot":"","sources":["../../../src/attendance/picket-assignment.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAExE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAEtE,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,EAAE,EAAE,UAAU;IACd,QAAQ,EAAE,UAAU;IACpB,cAAc,EAAE,UAAU;IAC1B,aAAa,EAAE,UAAU;IACzB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,SAAS,EAAE,aAAa;IACxB,QAAQ,EAAE,oBAAoB,CAAC,OAAO,CAAC,eAAe,CAAC;IACvD,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;CACpC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG,sBAAsB,CAAC,IAAI,CAAC;IACtE,cAAc,EAAE,IAAI;IACpB,aAAa,EAAE,IAAI;IACnB,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -6,9 +6,12 @@ export * from "./auth/role.schema.js";
|
|
|
6
6
|
export * from "./auth/auth.schema.js";
|
|
7
7
|
export * from "./academic/academic-year.schema.js";
|
|
8
8
|
export * from "./academic/class-room.schema.js";
|
|
9
|
+
export * from "./academic/subject.schema.js";
|
|
10
|
+
export * from "./academic/teaching-schedule.schema.js";
|
|
9
11
|
export * from "./user/user.schema.js";
|
|
10
12
|
export * from "./user/student.schema.js";
|
|
11
13
|
export * from "./attendance/attendance-kiosk.schema.js";
|
|
12
14
|
export * from "./attendance/attendance-class.schema.js";
|
|
15
|
+
export * from "./attendance/picket-assignment.schema.js";
|
|
13
16
|
export * from "./attendance/barcode-rolling.schema.js";
|
|
14
17
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qCAAqC,CAAC;AACpD,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qCAAqC,CAAC;AACpD,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC;AACvD,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,wCAAwC,CAAC"}
|
|
@@ -12,10 +12,11 @@ export const studentSchema = z.object({
|
|
|
12
12
|
nisn: nisnSchema.optional().nullable(),
|
|
13
13
|
fullName: z.string().min(2).max(255),
|
|
14
14
|
gender: genderEnum,
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
classroomId: uuidSchema,
|
|
16
|
+
classroomName: z.string(),
|
|
17
17
|
parentPhone: parentPhoneSchema.optional().nullable(),
|
|
18
18
|
barcodeValue: barcodeValueSchema,
|
|
19
|
+
photoUrl: z.string().url().optional().nullable(),
|
|
19
20
|
isActive: z.boolean().default(true),
|
|
20
21
|
});
|
|
21
22
|
export const createStudentSchema = z.object({
|
|
@@ -23,17 +24,18 @@ export const createStudentSchema = z.object({
|
|
|
23
24
|
nisn: nisnSchema.optional().nullable(),
|
|
24
25
|
fullName: z.string().min(2).max(255),
|
|
25
26
|
gender: genderEnum,
|
|
26
|
-
|
|
27
|
+
classroomId: uuidSchema,
|
|
27
28
|
parentPhone: parentPhoneSchema.optional().nullable(),
|
|
28
29
|
barcodeValue: barcodeValueSchema.optional(),
|
|
30
|
+
photoUrl: z.string().url().optional().nullable(),
|
|
29
31
|
});
|
|
30
32
|
export const updateStudentSchema = createStudentSchema.partial();
|
|
31
33
|
export const studentOfflineSyncCacheSchema = studentSchema.pick({
|
|
32
34
|
id: true,
|
|
33
35
|
nis: true,
|
|
34
36
|
fullName: true,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
classroomId: true,
|
|
38
|
+
classroomName: true,
|
|
37
39
|
barcodeValue: true,
|
|
38
40
|
});
|
|
39
41
|
export const bulkImportStudentRowSchema = z.object({
|
|
@@ -46,7 +48,7 @@ export const bulkImportStudentRowSchema = z.object({
|
|
|
46
48
|
});
|
|
47
49
|
export const bulkImportStudentRequestSchema = z.object({
|
|
48
50
|
academicYearId: uuidSchema,
|
|
49
|
-
|
|
51
|
+
defaultclassroomId: uuidSchema.optional(),
|
|
50
52
|
students: z.array(bulkImportStudentRowSchema).min(1, "Minimal harus ada 1 baris siswa"),
|
|
51
53
|
});
|
|
52
54
|
export const bulkImportStudentResponseSchema = z.object({
|
|
@@ -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,UAAU,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AAE7C,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AACnD,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,UAAU,EAAE,2BAA2B,CAAC,CAAC;AACpF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAC5D,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,kBAAkB,EAAE,kDAAkD,CAAC,CAAC;AAE1H,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,EAAE,EAAE,UAAU;IACd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IAAI,EAAE;IAC3C,WAAW,EAAE,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"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const subjectCodeSchema: z.ZodString;
|
|
3
|
+
export declare const subjectSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
tenantId: z.ZodString;
|
|
6
|
+
code: z.ZodString;
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
9
|
+
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
code: string;
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
tenantId: string;
|
|
15
|
+
isActive: boolean;
|
|
16
|
+
description?: string | null | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
code: string;
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
tenantId: string;
|
|
22
|
+
isActive?: boolean | undefined;
|
|
23
|
+
description?: string | null | undefined;
|
|
24
|
+
}>;
|
|
25
|
+
export declare const createSubjectSchema: z.ZodObject<Pick<{
|
|
26
|
+
id: z.ZodString;
|
|
27
|
+
tenantId: z.ZodString;
|
|
28
|
+
code: z.ZodString;
|
|
29
|
+
name: z.ZodString;
|
|
30
|
+
description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
31
|
+
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
32
|
+
}, "code" | "name" | "description">, "strip", z.ZodTypeAny, {
|
|
33
|
+
code: string;
|
|
34
|
+
name: string;
|
|
35
|
+
description?: string | null | undefined;
|
|
36
|
+
}, {
|
|
37
|
+
code: string;
|
|
38
|
+
name: string;
|
|
39
|
+
description?: string | null | undefined;
|
|
40
|
+
}>;
|
|
41
|
+
export declare const updateSubjectSchema: z.ZodObject<{
|
|
42
|
+
code: z.ZodOptional<z.ZodString>;
|
|
43
|
+
name: z.ZodOptional<z.ZodString>;
|
|
44
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
code?: string | undefined;
|
|
47
|
+
name?: string | undefined;
|
|
48
|
+
description?: string | null | undefined;
|
|
49
|
+
}, {
|
|
50
|
+
code?: string | undefined;
|
|
51
|
+
name?: string | undefined;
|
|
52
|
+
description?: string | null | undefined;
|
|
53
|
+
}>;
|
|
54
|
+
export type Subject = z.infer<typeof subjectSchema>;
|
|
55
|
+
export type CreateSubjectInput = z.infer<typeof createSubjectSchema>;
|
|
56
|
+
export type UpdateSubjectInput = z.infer<typeof updateSubjectSchema>;
|
|
@@ -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>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -6,8 +6,11 @@ export * from "./auth/role.schema.js";
|
|
|
6
6
|
export * from "./auth/auth.schema.js";
|
|
7
7
|
export * from "./academic/academic-year.schema.js";
|
|
8
8
|
export * from "./academic/class-room.schema.js";
|
|
9
|
+
export * from "./academic/subject.schema.js";
|
|
10
|
+
export * from "./academic/teaching-schedule.schema.js";
|
|
9
11
|
export * from "./user/user.schema.js";
|
|
10
12
|
export * from "./user/student.schema.js";
|
|
11
13
|
export * from "./attendance/attendance-kiosk.schema.js";
|
|
12
14
|
export * from "./attendance/attendance-class.schema.js";
|
|
15
|
+
export * from "./attendance/picket-assignment.schema.js";
|
|
13
16
|
export * from "./attendance/barcode-rolling.schema.js";
|
|
@@ -11,85 +11,94 @@ export declare const studentSchema: z.ZodObject<{
|
|
|
11
11
|
nisn: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
12
12
|
fullName: z.ZodString;
|
|
13
13
|
gender: z.ZodEnum<["L", "P"]>;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
classroomId: z.ZodString;
|
|
15
|
+
classroomName: z.ZodString;
|
|
16
16
|
parentPhone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
17
17
|
barcodeValue: z.ZodString;
|
|
18
|
+
photoUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
18
19
|
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
19
20
|
}, "strip", z.ZodTypeAny, {
|
|
20
21
|
id: string;
|
|
21
22
|
tenantId: string;
|
|
22
23
|
isActive: boolean;
|
|
24
|
+
classroomId: string;
|
|
25
|
+
classroomName: string;
|
|
23
26
|
fullName: string;
|
|
24
27
|
nis: string;
|
|
25
28
|
gender: "L" | "P";
|
|
26
|
-
classRoomId: string;
|
|
27
|
-
classRoomName: string;
|
|
28
29
|
barcodeValue: string;
|
|
29
30
|
nisn?: string | null | undefined;
|
|
30
31
|
parentPhone?: string | null | undefined;
|
|
32
|
+
photoUrl?: string | null | undefined;
|
|
31
33
|
}, {
|
|
32
34
|
id: string;
|
|
33
35
|
tenantId: string;
|
|
36
|
+
classroomId: string;
|
|
37
|
+
classroomName: string;
|
|
34
38
|
fullName: string;
|
|
35
39
|
nis: string;
|
|
36
40
|
gender: "L" | "P";
|
|
37
|
-
classRoomId: string;
|
|
38
|
-
classRoomName: string;
|
|
39
41
|
barcodeValue: string;
|
|
40
42
|
isActive?: boolean | undefined;
|
|
41
43
|
nisn?: string | null | undefined;
|
|
42
44
|
parentPhone?: string | null | undefined;
|
|
45
|
+
photoUrl?: string | null | undefined;
|
|
43
46
|
}>;
|
|
44
47
|
export declare const createStudentSchema: z.ZodObject<{
|
|
45
48
|
nis: z.ZodString;
|
|
46
49
|
nisn: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
47
50
|
fullName: z.ZodString;
|
|
48
51
|
gender: z.ZodEnum<["L", "P"]>;
|
|
49
|
-
|
|
52
|
+
classroomId: z.ZodString;
|
|
50
53
|
parentPhone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
51
54
|
barcodeValue: z.ZodOptional<z.ZodString>;
|
|
55
|
+
photoUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
52
56
|
}, "strip", z.ZodTypeAny, {
|
|
57
|
+
classroomId: string;
|
|
53
58
|
fullName: string;
|
|
54
59
|
nis: string;
|
|
55
60
|
gender: "L" | "P";
|
|
56
|
-
classRoomId: string;
|
|
57
61
|
nisn?: string | null | undefined;
|
|
58
62
|
parentPhone?: string | null | undefined;
|
|
59
63
|
barcodeValue?: string | undefined;
|
|
64
|
+
photoUrl?: string | null | undefined;
|
|
60
65
|
}, {
|
|
66
|
+
classroomId: string;
|
|
61
67
|
fullName: string;
|
|
62
68
|
nis: string;
|
|
63
69
|
gender: "L" | "P";
|
|
64
|
-
classRoomId: string;
|
|
65
70
|
nisn?: string | null | undefined;
|
|
66
71
|
parentPhone?: string | null | undefined;
|
|
67
72
|
barcodeValue?: string | undefined;
|
|
73
|
+
photoUrl?: string | null | undefined;
|
|
68
74
|
}>;
|
|
69
75
|
export declare const updateStudentSchema: z.ZodObject<{
|
|
70
76
|
nis: z.ZodOptional<z.ZodString>;
|
|
71
77
|
nisn: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
72
78
|
fullName: z.ZodOptional<z.ZodString>;
|
|
73
79
|
gender: z.ZodOptional<z.ZodEnum<["L", "P"]>>;
|
|
74
|
-
|
|
80
|
+
classroomId: z.ZodOptional<z.ZodString>;
|
|
75
81
|
parentPhone: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
76
82
|
barcodeValue: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
83
|
+
photoUrl: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
77
84
|
}, "strip", z.ZodTypeAny, {
|
|
85
|
+
classroomId?: string | undefined;
|
|
78
86
|
fullName?: string | undefined;
|
|
79
87
|
nis?: string | undefined;
|
|
80
88
|
nisn?: string | null | undefined;
|
|
81
89
|
gender?: "L" | "P" | undefined;
|
|
82
|
-
classRoomId?: string | undefined;
|
|
83
90
|
parentPhone?: string | null | undefined;
|
|
84
91
|
barcodeValue?: string | undefined;
|
|
92
|
+
photoUrl?: string | null | undefined;
|
|
85
93
|
}, {
|
|
94
|
+
classroomId?: string | undefined;
|
|
86
95
|
fullName?: string | undefined;
|
|
87
96
|
nis?: string | undefined;
|
|
88
97
|
nisn?: string | null | undefined;
|
|
89
98
|
gender?: "L" | "P" | undefined;
|
|
90
|
-
classRoomId?: string | undefined;
|
|
91
99
|
parentPhone?: string | null | undefined;
|
|
92
100
|
barcodeValue?: string | undefined;
|
|
101
|
+
photoUrl?: string | null | undefined;
|
|
93
102
|
}>;
|
|
94
103
|
export declare const studentOfflineSyncCacheSchema: z.ZodObject<Pick<{
|
|
95
104
|
id: z.ZodString;
|
|
@@ -98,24 +107,25 @@ export declare const studentOfflineSyncCacheSchema: z.ZodObject<Pick<{
|
|
|
98
107
|
nisn: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
99
108
|
fullName: z.ZodString;
|
|
100
109
|
gender: z.ZodEnum<["L", "P"]>;
|
|
101
|
-
|
|
102
|
-
|
|
110
|
+
classroomId: z.ZodString;
|
|
111
|
+
classroomName: z.ZodString;
|
|
103
112
|
parentPhone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
104
113
|
barcodeValue: z.ZodString;
|
|
114
|
+
photoUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
105
115
|
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
106
|
-
}, "id" | "
|
|
116
|
+
}, "id" | "classroomId" | "classroomName" | "fullName" | "nis" | "barcodeValue">, "strip", z.ZodTypeAny, {
|
|
107
117
|
id: string;
|
|
118
|
+
classroomId: string;
|
|
119
|
+
classroomName: string;
|
|
108
120
|
fullName: string;
|
|
109
121
|
nis: string;
|
|
110
|
-
classRoomId: string;
|
|
111
|
-
classRoomName: string;
|
|
112
122
|
barcodeValue: string;
|
|
113
123
|
}, {
|
|
114
124
|
id: string;
|
|
125
|
+
classroomId: string;
|
|
126
|
+
classroomName: string;
|
|
115
127
|
fullName: string;
|
|
116
128
|
nis: string;
|
|
117
|
-
classRoomId: string;
|
|
118
|
-
classRoomName: string;
|
|
119
129
|
barcodeValue: string;
|
|
120
130
|
}>;
|
|
121
131
|
export declare const bulkImportStudentRowSchema: z.ZodObject<{
|
|
@@ -142,7 +152,7 @@ export declare const bulkImportStudentRowSchema: z.ZodObject<{
|
|
|
142
152
|
}>;
|
|
143
153
|
export declare const bulkImportStudentRequestSchema: z.ZodObject<{
|
|
144
154
|
academicYearId: z.ZodString;
|
|
145
|
-
|
|
155
|
+
defaultclassroomId: z.ZodOptional<z.ZodString>;
|
|
146
156
|
students: z.ZodArray<z.ZodObject<{
|
|
147
157
|
nis: z.ZodString;
|
|
148
158
|
nisn: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -175,7 +185,7 @@ export declare const bulkImportStudentRequestSchema: z.ZodObject<{
|
|
|
175
185
|
nisn?: string | null | undefined;
|
|
176
186
|
parentPhone?: string | null | undefined;
|
|
177
187
|
}[];
|
|
178
|
-
|
|
188
|
+
defaultclassroomId?: string | undefined;
|
|
179
189
|
}, {
|
|
180
190
|
academicYearId: string;
|
|
181
191
|
students: {
|
|
@@ -186,7 +196,7 @@ export declare const bulkImportStudentRequestSchema: z.ZodObject<{
|
|
|
186
196
|
nisn?: string | null | undefined;
|
|
187
197
|
parentPhone?: string | null | undefined;
|
|
188
198
|
}[];
|
|
189
|
-
|
|
199
|
+
defaultclassroomId?: string | undefined;
|
|
190
200
|
}>;
|
|
191
201
|
export declare const bulkImportStudentResponseSchema: z.ZodObject<{
|
|
192
202
|
totalProcessed: z.ZodNumber;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sekolaos/shared-schema",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Single source of truth untuk validasi skema data dan inferensi tipe TypeScript pada ekosistem Sekolaos (backend Express, kiosk presensi, dan modul lainnya).",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "Sekolaos",
|