@aibrains/shared-types 0.5.0 → 0.6.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/dist/schemas/academics/assignment.schema.d.ts +12 -12
- package/dist/schemas/academics/attendance.schema.d.ts +10 -10
- package/dist/schemas/academics/classroom.schema.d.ts +10 -10
- package/dist/schemas/academics/course-offering.schema.d.ts +188 -0
- package/dist/schemas/academics/course-offering.schema.d.ts.map +1 -0
- package/dist/schemas/academics/course-offering.schema.js +74 -0
- package/dist/schemas/academics/course-offering.schema.js.map +1 -0
- package/dist/schemas/academics/course-section.schema.d.ts +64 -6
- package/dist/schemas/academics/course-section.schema.d.ts.map +1 -1
- package/dist/schemas/academics/course-section.schema.js +10 -0
- package/dist/schemas/academics/course-section.schema.js.map +1 -1
- package/dist/schemas/academics/grade.schema.d.ts +12 -12
- package/dist/schemas/academics/index.d.ts +1 -0
- package/dist/schemas/academics/index.d.ts.map +1 -1
- package/dist/schemas/academics/index.js +1 -0
- package/dist/schemas/academics/index.js.map +1 -1
- package/dist/schemas/enrollment/enrollment.schema.d.ts +16 -0
- package/dist/schemas/enrollment/enrollment.schema.d.ts.map +1 -1
- package/dist/schemas/enrollment/enrollment.schema.js +4 -0
- package/dist/schemas/enrollment/enrollment.schema.js.map +1 -1
- package/dist/schemas/identity/class-period.schema.d.ts +216 -0
- package/dist/schemas/identity/class-period.schema.d.ts.map +1 -0
- package/dist/schemas/identity/class-period.schema.js +96 -0
- package/dist/schemas/identity/class-period.schema.js.map +1 -0
- package/dist/schemas/identity/index.d.ts +2 -0
- package/dist/schemas/identity/index.d.ts.map +1 -1
- package/dist/schemas/identity/index.js +3 -0
- package/dist/schemas/identity/index.js.map +1 -1
- package/dist/schemas/identity/location.schema.d.ts +194 -0
- package/dist/schemas/identity/location.schema.d.ts.map +1 -0
- package/dist/schemas/identity/location.schema.js +87 -0
- package/dist/schemas/identity/location.schema.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Class Period Schemas - Identity Service
|
|
3
|
+
*
|
|
4
|
+
* Zod schemas for standalone ClassPeriod entity management.
|
|
5
|
+
* Ed-Fi: ClassPeriod is a top-level entity representing a time block
|
|
6
|
+
* within a school day. Extracted from embedded BellSchedule periods
|
|
7
|
+
* to allow direct referencing by Section, CourseOffering, etc.
|
|
8
|
+
*
|
|
9
|
+
* @see https://api.ed-fi.org/v7.1/docs/swagger/index.html - ClassPeriod
|
|
10
|
+
*/
|
|
11
|
+
import { z } from 'zod';
|
|
12
|
+
/**
|
|
13
|
+
* Period type (aligned with bell-schedule.schema periodType)
|
|
14
|
+
*/
|
|
15
|
+
export declare const classPeriodTypeSchema: z.ZodEnum<["instructional", "homeroom", "lunch", "recess", "passing", "assembly", "advisory", "study_hall", "extracurricular"]>;
|
|
16
|
+
export type ClassPeriodType = z.infer<typeof classPeriodTypeSchema>;
|
|
17
|
+
export declare const createClassPeriodSchema: z.ZodEffects<z.ZodObject<{
|
|
18
|
+
classPeriodName: z.ZodString;
|
|
19
|
+
startTime: z.ZodString;
|
|
20
|
+
endTime: z.ZodString;
|
|
21
|
+
sortOrder: z.ZodDefault<z.ZodNumber>;
|
|
22
|
+
periodType: z.ZodDefault<z.ZodEnum<["instructional", "homeroom", "lunch", "recess", "passing", "assembly", "advisory", "study_hall", "extracurricular"]>>;
|
|
23
|
+
isAcademic: z.ZodDefault<z.ZodBoolean>;
|
|
24
|
+
description: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
startTime: string;
|
|
27
|
+
endTime: string;
|
|
28
|
+
classPeriodName: string;
|
|
29
|
+
periodType: "assembly" | "instructional" | "homeroom" | "lunch" | "recess" | "passing" | "advisory" | "study_hall" | "extracurricular";
|
|
30
|
+
sortOrder: number;
|
|
31
|
+
isAcademic: boolean;
|
|
32
|
+
description?: string | undefined;
|
|
33
|
+
}, {
|
|
34
|
+
startTime: string;
|
|
35
|
+
endTime: string;
|
|
36
|
+
classPeriodName: string;
|
|
37
|
+
description?: string | undefined;
|
|
38
|
+
periodType?: "assembly" | "instructional" | "homeroom" | "lunch" | "recess" | "passing" | "advisory" | "study_hall" | "extracurricular" | undefined;
|
|
39
|
+
sortOrder?: number | undefined;
|
|
40
|
+
isAcademic?: boolean | undefined;
|
|
41
|
+
}>, {
|
|
42
|
+
startTime: string;
|
|
43
|
+
endTime: string;
|
|
44
|
+
classPeriodName: string;
|
|
45
|
+
periodType: "assembly" | "instructional" | "homeroom" | "lunch" | "recess" | "passing" | "advisory" | "study_hall" | "extracurricular";
|
|
46
|
+
sortOrder: number;
|
|
47
|
+
isAcademic: boolean;
|
|
48
|
+
description?: string | undefined;
|
|
49
|
+
}, {
|
|
50
|
+
startTime: string;
|
|
51
|
+
endTime: string;
|
|
52
|
+
classPeriodName: string;
|
|
53
|
+
description?: string | undefined;
|
|
54
|
+
periodType?: "assembly" | "instructional" | "homeroom" | "lunch" | "recess" | "passing" | "advisory" | "study_hall" | "extracurricular" | undefined;
|
|
55
|
+
sortOrder?: number | undefined;
|
|
56
|
+
isAcademic?: boolean | undefined;
|
|
57
|
+
}>;
|
|
58
|
+
export type CreateClassPeriodDto = z.infer<typeof createClassPeriodSchema>;
|
|
59
|
+
export declare const updateClassPeriodSchema: z.ZodObject<{
|
|
60
|
+
classPeriodName: z.ZodOptional<z.ZodString>;
|
|
61
|
+
startTime: z.ZodOptional<z.ZodString>;
|
|
62
|
+
endTime: z.ZodOptional<z.ZodString>;
|
|
63
|
+
sortOrder: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
periodType: z.ZodOptional<z.ZodEnum<["instructional", "homeroom", "lunch", "recess", "passing", "assembly", "advisory", "study_hall", "extracurricular"]>>;
|
|
65
|
+
isAcademic: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
+
description: z.ZodOptional<z.ZodString>;
|
|
67
|
+
}, "strip", z.ZodTypeAny, {
|
|
68
|
+
description?: string | undefined;
|
|
69
|
+
startTime?: string | undefined;
|
|
70
|
+
endTime?: string | undefined;
|
|
71
|
+
classPeriodName?: string | undefined;
|
|
72
|
+
periodType?: "assembly" | "instructional" | "homeroom" | "lunch" | "recess" | "passing" | "advisory" | "study_hall" | "extracurricular" | undefined;
|
|
73
|
+
sortOrder?: number | undefined;
|
|
74
|
+
isAcademic?: boolean | undefined;
|
|
75
|
+
}, {
|
|
76
|
+
description?: string | undefined;
|
|
77
|
+
startTime?: string | undefined;
|
|
78
|
+
endTime?: string | undefined;
|
|
79
|
+
classPeriodName?: string | undefined;
|
|
80
|
+
periodType?: "assembly" | "instructional" | "homeroom" | "lunch" | "recess" | "passing" | "advisory" | "study_hall" | "extracurricular" | undefined;
|
|
81
|
+
sortOrder?: number | undefined;
|
|
82
|
+
isAcademic?: boolean | undefined;
|
|
83
|
+
}>;
|
|
84
|
+
export type UpdateClassPeriodDto = z.infer<typeof updateClassPeriodSchema>;
|
|
85
|
+
export declare const classPeriodResponseSchema: z.ZodObject<{
|
|
86
|
+
periodId: z.ZodString;
|
|
87
|
+
schoolId: z.ZodString;
|
|
88
|
+
tenantId: z.ZodString;
|
|
89
|
+
classPeriodName: z.ZodString;
|
|
90
|
+
startTime: z.ZodString;
|
|
91
|
+
endTime: z.ZodString;
|
|
92
|
+
durationMinutes: z.ZodNumber;
|
|
93
|
+
sortOrder: z.ZodNumber;
|
|
94
|
+
periodType: z.ZodEnum<["instructional", "homeroom", "lunch", "recess", "passing", "assembly", "advisory", "study_hall", "extracurricular"]>;
|
|
95
|
+
isAcademic: z.ZodBoolean;
|
|
96
|
+
description: z.ZodOptional<z.ZodString>;
|
|
97
|
+
createdAt: z.ZodString;
|
|
98
|
+
updatedAt: z.ZodString;
|
|
99
|
+
}, "strip", z.ZodTypeAny, {
|
|
100
|
+
tenantId: string;
|
|
101
|
+
createdAt: string;
|
|
102
|
+
updatedAt: string;
|
|
103
|
+
schoolId: string;
|
|
104
|
+
startTime: string;
|
|
105
|
+
endTime: string;
|
|
106
|
+
classPeriodName: string;
|
|
107
|
+
periodType: "assembly" | "instructional" | "homeroom" | "lunch" | "recess" | "passing" | "advisory" | "study_hall" | "extracurricular";
|
|
108
|
+
durationMinutes: number;
|
|
109
|
+
sortOrder: number;
|
|
110
|
+
isAcademic: boolean;
|
|
111
|
+
periodId: string;
|
|
112
|
+
description?: string | undefined;
|
|
113
|
+
}, {
|
|
114
|
+
tenantId: string;
|
|
115
|
+
createdAt: string;
|
|
116
|
+
updatedAt: string;
|
|
117
|
+
schoolId: string;
|
|
118
|
+
startTime: string;
|
|
119
|
+
endTime: string;
|
|
120
|
+
classPeriodName: string;
|
|
121
|
+
periodType: "assembly" | "instructional" | "homeroom" | "lunch" | "recess" | "passing" | "advisory" | "study_hall" | "extracurricular";
|
|
122
|
+
durationMinutes: number;
|
|
123
|
+
sortOrder: number;
|
|
124
|
+
isAcademic: boolean;
|
|
125
|
+
periodId: string;
|
|
126
|
+
description?: string | undefined;
|
|
127
|
+
}>;
|
|
128
|
+
export type ClassPeriodResponseDto = z.infer<typeof classPeriodResponseSchema>;
|
|
129
|
+
export declare const classPeriodListResponseSchema: z.ZodObject<{
|
|
130
|
+
items: z.ZodArray<z.ZodObject<{
|
|
131
|
+
periodId: z.ZodString;
|
|
132
|
+
schoolId: z.ZodString;
|
|
133
|
+
tenantId: z.ZodString;
|
|
134
|
+
classPeriodName: z.ZodString;
|
|
135
|
+
startTime: z.ZodString;
|
|
136
|
+
endTime: z.ZodString;
|
|
137
|
+
durationMinutes: z.ZodNumber;
|
|
138
|
+
sortOrder: z.ZodNumber;
|
|
139
|
+
periodType: z.ZodEnum<["instructional", "homeroom", "lunch", "recess", "passing", "assembly", "advisory", "study_hall", "extracurricular"]>;
|
|
140
|
+
isAcademic: z.ZodBoolean;
|
|
141
|
+
description: z.ZodOptional<z.ZodString>;
|
|
142
|
+
createdAt: z.ZodString;
|
|
143
|
+
updatedAt: z.ZodString;
|
|
144
|
+
}, "strip", z.ZodTypeAny, {
|
|
145
|
+
tenantId: string;
|
|
146
|
+
createdAt: string;
|
|
147
|
+
updatedAt: string;
|
|
148
|
+
schoolId: string;
|
|
149
|
+
startTime: string;
|
|
150
|
+
endTime: string;
|
|
151
|
+
classPeriodName: string;
|
|
152
|
+
periodType: "assembly" | "instructional" | "homeroom" | "lunch" | "recess" | "passing" | "advisory" | "study_hall" | "extracurricular";
|
|
153
|
+
durationMinutes: number;
|
|
154
|
+
sortOrder: number;
|
|
155
|
+
isAcademic: boolean;
|
|
156
|
+
periodId: string;
|
|
157
|
+
description?: string | undefined;
|
|
158
|
+
}, {
|
|
159
|
+
tenantId: string;
|
|
160
|
+
createdAt: string;
|
|
161
|
+
updatedAt: string;
|
|
162
|
+
schoolId: string;
|
|
163
|
+
startTime: string;
|
|
164
|
+
endTime: string;
|
|
165
|
+
classPeriodName: string;
|
|
166
|
+
periodType: "assembly" | "instructional" | "homeroom" | "lunch" | "recess" | "passing" | "advisory" | "study_hall" | "extracurricular";
|
|
167
|
+
durationMinutes: number;
|
|
168
|
+
sortOrder: number;
|
|
169
|
+
isAcademic: boolean;
|
|
170
|
+
periodId: string;
|
|
171
|
+
description?: string | undefined;
|
|
172
|
+
}>, "many">;
|
|
173
|
+
lastEvaluatedKey: z.ZodOptional<z.ZodString>;
|
|
174
|
+
hasMore: z.ZodBoolean;
|
|
175
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
176
|
+
}, "strip", z.ZodTypeAny, {
|
|
177
|
+
items: {
|
|
178
|
+
tenantId: string;
|
|
179
|
+
createdAt: string;
|
|
180
|
+
updatedAt: string;
|
|
181
|
+
schoolId: string;
|
|
182
|
+
startTime: string;
|
|
183
|
+
endTime: string;
|
|
184
|
+
classPeriodName: string;
|
|
185
|
+
periodType: "assembly" | "instructional" | "homeroom" | "lunch" | "recess" | "passing" | "advisory" | "study_hall" | "extracurricular";
|
|
186
|
+
durationMinutes: number;
|
|
187
|
+
sortOrder: number;
|
|
188
|
+
isAcademic: boolean;
|
|
189
|
+
periodId: string;
|
|
190
|
+
description?: string | undefined;
|
|
191
|
+
}[];
|
|
192
|
+
hasMore: boolean;
|
|
193
|
+
lastEvaluatedKey?: string | undefined;
|
|
194
|
+
total?: number | undefined;
|
|
195
|
+
}, {
|
|
196
|
+
items: {
|
|
197
|
+
tenantId: string;
|
|
198
|
+
createdAt: string;
|
|
199
|
+
updatedAt: string;
|
|
200
|
+
schoolId: string;
|
|
201
|
+
startTime: string;
|
|
202
|
+
endTime: string;
|
|
203
|
+
classPeriodName: string;
|
|
204
|
+
periodType: "assembly" | "instructional" | "homeroom" | "lunch" | "recess" | "passing" | "advisory" | "study_hall" | "extracurricular";
|
|
205
|
+
durationMinutes: number;
|
|
206
|
+
sortOrder: number;
|
|
207
|
+
isAcademic: boolean;
|
|
208
|
+
periodId: string;
|
|
209
|
+
description?: string | undefined;
|
|
210
|
+
}[];
|
|
211
|
+
hasMore: boolean;
|
|
212
|
+
lastEvaluatedKey?: string | undefined;
|
|
213
|
+
total?: number | undefined;
|
|
214
|
+
}>;
|
|
215
|
+
export type ClassPeriodListResponseDto = z.infer<typeof classPeriodListResponseSchema>;
|
|
216
|
+
//# sourceMappingURL=class-period.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"class-period.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/identity/class-period.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB;;GAEG;AACH,eAAO,MAAM,qBAAqB,iIAUhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAMpE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BnC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAM3E,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;EAQlC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAM3E,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBpC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAM/E,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA2D,CAAC;AACtG,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Class Period Schemas - Identity Service
|
|
4
|
+
*
|
|
5
|
+
* Zod schemas for standalone ClassPeriod entity management.
|
|
6
|
+
* Ed-Fi: ClassPeriod is a top-level entity representing a time block
|
|
7
|
+
* within a school day. Extracted from embedded BellSchedule periods
|
|
8
|
+
* to allow direct referencing by Section, CourseOffering, etc.
|
|
9
|
+
*
|
|
10
|
+
* @see https://api.ed-fi.org/v7.1/docs/swagger/index.html - ClassPeriod
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.classPeriodListResponseSchema = exports.classPeriodResponseSchema = exports.updateClassPeriodSchema = exports.createClassPeriodSchema = exports.classPeriodTypeSchema = void 0;
|
|
14
|
+
const zod_1 = require("zod");
|
|
15
|
+
const common_1 = require("../common");
|
|
16
|
+
// ============================================
|
|
17
|
+
// Enums
|
|
18
|
+
// ============================================
|
|
19
|
+
/**
|
|
20
|
+
* Period type (aligned with bell-schedule.schema periodType)
|
|
21
|
+
*/
|
|
22
|
+
exports.classPeriodTypeSchema = zod_1.z.enum([
|
|
23
|
+
'instructional',
|
|
24
|
+
'homeroom',
|
|
25
|
+
'lunch',
|
|
26
|
+
'recess',
|
|
27
|
+
'passing',
|
|
28
|
+
'assembly',
|
|
29
|
+
'advisory',
|
|
30
|
+
'study_hall',
|
|
31
|
+
'extracurricular',
|
|
32
|
+
]);
|
|
33
|
+
// ============================================
|
|
34
|
+
// Create Class Period Schema
|
|
35
|
+
// ============================================
|
|
36
|
+
exports.createClassPeriodSchema = zod_1.z.object({
|
|
37
|
+
// Ed-Fi Core
|
|
38
|
+
classPeriodName: zod_1.z.string()
|
|
39
|
+
.min(1, 'Period name is required')
|
|
40
|
+
.max(60, 'Period name must not exceed 60 characters'),
|
|
41
|
+
// Timing
|
|
42
|
+
startTime: common_1.timeSchema,
|
|
43
|
+
endTime: common_1.timeSchema,
|
|
44
|
+
// Ordering and classification
|
|
45
|
+
sortOrder: zod_1.z.number().int().min(0).max(20).default(0),
|
|
46
|
+
periodType: exports.classPeriodTypeSchema.default('instructional'),
|
|
47
|
+
// Whether this period counts as academic/instructional time
|
|
48
|
+
isAcademic: zod_1.z.boolean().default(true),
|
|
49
|
+
// Optional description
|
|
50
|
+
description: zod_1.z.string().max(255).optional(),
|
|
51
|
+
}).refine(data => {
|
|
52
|
+
const [startH, startM] = data.startTime.split(':').map(Number);
|
|
53
|
+
const [endH, endM] = data.endTime.split(':').map(Number);
|
|
54
|
+
return (endH * 60 + endM) > (startH * 60 + startM);
|
|
55
|
+
}, { message: 'End time must be after start time' });
|
|
56
|
+
// ============================================
|
|
57
|
+
// Update Class Period Schema
|
|
58
|
+
// ============================================
|
|
59
|
+
exports.updateClassPeriodSchema = zod_1.z.object({
|
|
60
|
+
classPeriodName: zod_1.z.string().min(1).max(60).optional(),
|
|
61
|
+
startTime: common_1.timeSchema.optional(),
|
|
62
|
+
endTime: common_1.timeSchema.optional(),
|
|
63
|
+
sortOrder: zod_1.z.number().int().min(0).max(20).optional(),
|
|
64
|
+
periodType: exports.classPeriodTypeSchema.optional(),
|
|
65
|
+
isAcademic: zod_1.z.boolean().optional(),
|
|
66
|
+
description: zod_1.z.string().max(255).optional(),
|
|
67
|
+
});
|
|
68
|
+
// ============================================
|
|
69
|
+
// Class Period Response Schema
|
|
70
|
+
// ============================================
|
|
71
|
+
exports.classPeriodResponseSchema = zod_1.z.object({
|
|
72
|
+
// Identifiers
|
|
73
|
+
periodId: zod_1.z.string().uuid(),
|
|
74
|
+
schoolId: zod_1.z.string().uuid(),
|
|
75
|
+
tenantId: zod_1.z.string().uuid(),
|
|
76
|
+
// Ed-Fi Core
|
|
77
|
+
classPeriodName: zod_1.z.string(),
|
|
78
|
+
// Timing
|
|
79
|
+
startTime: zod_1.z.string(),
|
|
80
|
+
endTime: zod_1.z.string(),
|
|
81
|
+
durationMinutes: zod_1.z.number().int(),
|
|
82
|
+
// Classification
|
|
83
|
+
sortOrder: zod_1.z.number().int(),
|
|
84
|
+
periodType: exports.classPeriodTypeSchema,
|
|
85
|
+
isAcademic: zod_1.z.boolean(),
|
|
86
|
+
// Description
|
|
87
|
+
description: zod_1.z.string().optional(),
|
|
88
|
+
// Metadata
|
|
89
|
+
createdAt: zod_1.z.string(),
|
|
90
|
+
updatedAt: zod_1.z.string(),
|
|
91
|
+
});
|
|
92
|
+
// ============================================
|
|
93
|
+
// Class Period List Response
|
|
94
|
+
// ============================================
|
|
95
|
+
exports.classPeriodListResponseSchema = (0, common_1.createPaginatedResponseSchema)(exports.classPeriodResponseSchema);
|
|
96
|
+
//# sourceMappingURL=class-period.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"class-period.schema.js","sourceRoot":"","sources":["../../../src/schemas/identity/class-period.schema.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAEH,6BAAwB;AACxB,sCAImB;AAEnB,+CAA+C;AAC/C,QAAQ;AACR,+CAA+C;AAE/C;;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AAE,OAAC,CAAC,MAAM,EAAE;IACnB,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAEjC,iBAAiB;IACjB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC3B,UAAU,EAAE,6BAAqB;IACjC,UAAU,EAAE,OAAC,CAAC,OAAO,EAAE;IAEvB,cAAc;IACd,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAElC,WAAW;IACX,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC;AAIH,+CAA+C;AAC/C,6BAA6B;AAC7B,+CAA+C;AAElC,QAAA,6BAA6B,GAAG,IAAA,sCAA6B,EAAC,iCAAyB,CAAC,CAAC"}
|
|
@@ -29,4 +29,6 @@ export * from './calendar.schema';
|
|
|
29
29
|
export * from './calendar-date.schema';
|
|
30
30
|
export * from './academic-session.schema';
|
|
31
31
|
export * from './school-year.schema';
|
|
32
|
+
export * from './class-period.schema';
|
|
33
|
+
export * from './location.schema';
|
|
32
34
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schemas/identity/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AAGpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AAGjD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAG/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schemas/identity/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AAGpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AAGjD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAG/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AAGrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC"}
|
|
@@ -48,4 +48,7 @@ __exportStar(require("./calendar.schema"), exports);
|
|
|
48
48
|
__exportStar(require("./calendar-date.schema"), exports);
|
|
49
49
|
__exportStar(require("./academic-session.schema"), exports);
|
|
50
50
|
__exportStar(require("./school-year.schema"), exports);
|
|
51
|
+
// Master Schedule (Ed-Fi aligned)
|
|
52
|
+
__exportStar(require("./class-period.schema"), exports);
|
|
53
|
+
__exportStar(require("./location.schema"), exports);
|
|
51
54
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schemas/identity/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;AAEH,gDAA8B;AAC9B,gDAA8B;AAC9B,oDAAkC;AAClC,kDAAgC;AAChC,kDAAgC;AAChC,gDAA8B;AAC9B,mDAAiC;AACjC,yDAAuC;AACvC,sDAAoC;AAEpC,gDAAgD;AAChD,8DAA4C;AAC5C,kEAAgD;AAChD,kEAAgD;AAChD,kEAAgD;AAChD,oEAAkD;AAClD,iEAA+C;AAC/C,mEAAiD;AAEjD,mCAAmC;AACnC,iDAA+B;AAC/B,4DAA0C;AAC1C,oEAAkD;AAClD,sDAAoC;AACpC,iDAA+B;AAE/B,sCAAsC;AACtC,yDAAuC;AACvC,oDAAkC;AAClC,yDAAuC;AACvC,4DAA0C;AAC1C,uDAAqC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schemas/identity/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;AAEH,gDAA8B;AAC9B,gDAA8B;AAC9B,oDAAkC;AAClC,kDAAgC;AAChC,kDAAgC;AAChC,gDAA8B;AAC9B,mDAAiC;AACjC,yDAAuC;AACvC,sDAAoC;AAEpC,gDAAgD;AAChD,8DAA4C;AAC5C,kEAAgD;AAChD,kEAAgD;AAChD,kEAAgD;AAChD,oEAAkD;AAClD,iEAA+C;AAC/C,mEAAiD;AAEjD,mCAAmC;AACnC,iDAA+B;AAC/B,4DAA0C;AAC1C,oEAAkD;AAClD,sDAAoC;AACpC,iDAA+B;AAE/B,sCAAsC;AACtC,yDAAuC;AACvC,oDAAkC;AAClC,yDAAuC;AACvC,4DAA0C;AAC1C,uDAAqC;AAErC,kCAAkC;AAClC,wDAAsC;AACtC,oDAAkC"}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Location Schemas - Identity Service
|
|
3
|
+
*
|
|
4
|
+
* Zod schemas for school location/room management.
|
|
5
|
+
* Ed-Fi: Location represents a physical space within a school
|
|
6
|
+
* (classroom, lab, gym, etc.) that can be assigned to sections.
|
|
7
|
+
*
|
|
8
|
+
* Replaces the Classroom entity in Academics with a canonical
|
|
9
|
+
* Location entity in Identity, enabling cross-service referencing.
|
|
10
|
+
*
|
|
11
|
+
* @see https://api.ed-fi.org/v7.1/docs/swagger/index.html - Location
|
|
12
|
+
*/
|
|
13
|
+
import { z } from 'zod';
|
|
14
|
+
/**
|
|
15
|
+
* Location type descriptor
|
|
16
|
+
*/
|
|
17
|
+
export declare const locationTypeSchema: z.ZodEnum<["classroom", "lab", "gym", "auditorium", "library", "office", "cafeteria", "other"]>;
|
|
18
|
+
export type LocationType = z.infer<typeof locationTypeSchema>;
|
|
19
|
+
export declare const createLocationSchema: z.ZodObject<{
|
|
20
|
+
roomNumber: z.ZodString;
|
|
21
|
+
buildingName: z.ZodOptional<z.ZodString>;
|
|
22
|
+
floorNumber: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
capacity: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
locationType: z.ZodDefault<z.ZodEnum<["classroom", "lab", "gym", "auditorium", "library", "office", "cafeteria", "other"]>>;
|
|
25
|
+
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
26
|
+
description: z.ZodOptional<z.ZodString>;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
isActive: boolean;
|
|
29
|
+
roomNumber: string;
|
|
30
|
+
locationType: "other" | "classroom" | "lab" | "gym" | "auditorium" | "library" | "office" | "cafeteria";
|
|
31
|
+
description?: string | undefined;
|
|
32
|
+
buildingName?: string | undefined;
|
|
33
|
+
floorNumber?: number | undefined;
|
|
34
|
+
capacity?: number | undefined;
|
|
35
|
+
}, {
|
|
36
|
+
roomNumber: string;
|
|
37
|
+
isActive?: boolean | undefined;
|
|
38
|
+
description?: string | undefined;
|
|
39
|
+
buildingName?: string | undefined;
|
|
40
|
+
floorNumber?: number | undefined;
|
|
41
|
+
capacity?: number | undefined;
|
|
42
|
+
locationType?: "other" | "classroom" | "lab" | "gym" | "auditorium" | "library" | "office" | "cafeteria" | undefined;
|
|
43
|
+
}>;
|
|
44
|
+
export type CreateLocationDto = z.infer<typeof createLocationSchema>;
|
|
45
|
+
export declare const updateLocationSchema: z.ZodObject<{
|
|
46
|
+
roomNumber: z.ZodOptional<z.ZodString>;
|
|
47
|
+
buildingName: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
48
|
+
floorNumber: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
49
|
+
capacity: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
50
|
+
locationType: z.ZodOptional<z.ZodDefault<z.ZodEnum<["classroom", "lab", "gym", "auditorium", "library", "office", "cafeteria", "other"]>>>;
|
|
51
|
+
isActive: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
52
|
+
description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
isActive?: boolean | undefined;
|
|
55
|
+
description?: string | undefined;
|
|
56
|
+
roomNumber?: string | undefined;
|
|
57
|
+
buildingName?: string | undefined;
|
|
58
|
+
floorNumber?: number | undefined;
|
|
59
|
+
capacity?: number | undefined;
|
|
60
|
+
locationType?: "other" | "classroom" | "lab" | "gym" | "auditorium" | "library" | "office" | "cafeteria" | undefined;
|
|
61
|
+
}, {
|
|
62
|
+
isActive?: boolean | undefined;
|
|
63
|
+
description?: string | undefined;
|
|
64
|
+
roomNumber?: string | undefined;
|
|
65
|
+
buildingName?: string | undefined;
|
|
66
|
+
floorNumber?: number | undefined;
|
|
67
|
+
capacity?: number | undefined;
|
|
68
|
+
locationType?: "other" | "classroom" | "lab" | "gym" | "auditorium" | "library" | "office" | "cafeteria" | undefined;
|
|
69
|
+
}>;
|
|
70
|
+
export type UpdateLocationDto = z.infer<typeof updateLocationSchema>;
|
|
71
|
+
export declare const locationResponseSchema: z.ZodObject<{
|
|
72
|
+
locationId: z.ZodString;
|
|
73
|
+
schoolId: z.ZodString;
|
|
74
|
+
tenantId: z.ZodString;
|
|
75
|
+
roomNumber: z.ZodString;
|
|
76
|
+
buildingName: z.ZodOptional<z.ZodString>;
|
|
77
|
+
floorNumber: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
capacity: z.ZodOptional<z.ZodNumber>;
|
|
79
|
+
locationType: z.ZodEnum<["classroom", "lab", "gym", "auditorium", "library", "office", "cafeteria", "other"]>;
|
|
80
|
+
isActive: z.ZodBoolean;
|
|
81
|
+
description: z.ZodOptional<z.ZodString>;
|
|
82
|
+
createdAt: z.ZodString;
|
|
83
|
+
updatedAt: z.ZodString;
|
|
84
|
+
}, "strip", z.ZodTypeAny, {
|
|
85
|
+
tenantId: string;
|
|
86
|
+
createdAt: string;
|
|
87
|
+
updatedAt: string;
|
|
88
|
+
schoolId: string;
|
|
89
|
+
isActive: boolean;
|
|
90
|
+
roomNumber: string;
|
|
91
|
+
locationType: "other" | "classroom" | "lab" | "gym" | "auditorium" | "library" | "office" | "cafeteria";
|
|
92
|
+
locationId: string;
|
|
93
|
+
description?: string | undefined;
|
|
94
|
+
buildingName?: string | undefined;
|
|
95
|
+
floorNumber?: number | undefined;
|
|
96
|
+
capacity?: number | undefined;
|
|
97
|
+
}, {
|
|
98
|
+
tenantId: string;
|
|
99
|
+
createdAt: string;
|
|
100
|
+
updatedAt: string;
|
|
101
|
+
schoolId: string;
|
|
102
|
+
isActive: boolean;
|
|
103
|
+
roomNumber: string;
|
|
104
|
+
locationType: "other" | "classroom" | "lab" | "gym" | "auditorium" | "library" | "office" | "cafeteria";
|
|
105
|
+
locationId: string;
|
|
106
|
+
description?: string | undefined;
|
|
107
|
+
buildingName?: string | undefined;
|
|
108
|
+
floorNumber?: number | undefined;
|
|
109
|
+
capacity?: number | undefined;
|
|
110
|
+
}>;
|
|
111
|
+
export type LocationResponseDto = z.infer<typeof locationResponseSchema>;
|
|
112
|
+
export declare const locationListResponseSchema: z.ZodObject<{
|
|
113
|
+
items: z.ZodArray<z.ZodObject<{
|
|
114
|
+
locationId: z.ZodString;
|
|
115
|
+
schoolId: z.ZodString;
|
|
116
|
+
tenantId: z.ZodString;
|
|
117
|
+
roomNumber: z.ZodString;
|
|
118
|
+
buildingName: z.ZodOptional<z.ZodString>;
|
|
119
|
+
floorNumber: z.ZodOptional<z.ZodNumber>;
|
|
120
|
+
capacity: z.ZodOptional<z.ZodNumber>;
|
|
121
|
+
locationType: z.ZodEnum<["classroom", "lab", "gym", "auditorium", "library", "office", "cafeteria", "other"]>;
|
|
122
|
+
isActive: z.ZodBoolean;
|
|
123
|
+
description: z.ZodOptional<z.ZodString>;
|
|
124
|
+
createdAt: z.ZodString;
|
|
125
|
+
updatedAt: z.ZodString;
|
|
126
|
+
}, "strip", z.ZodTypeAny, {
|
|
127
|
+
tenantId: string;
|
|
128
|
+
createdAt: string;
|
|
129
|
+
updatedAt: string;
|
|
130
|
+
schoolId: string;
|
|
131
|
+
isActive: boolean;
|
|
132
|
+
roomNumber: string;
|
|
133
|
+
locationType: "other" | "classroom" | "lab" | "gym" | "auditorium" | "library" | "office" | "cafeteria";
|
|
134
|
+
locationId: string;
|
|
135
|
+
description?: string | undefined;
|
|
136
|
+
buildingName?: string | undefined;
|
|
137
|
+
floorNumber?: number | undefined;
|
|
138
|
+
capacity?: number | undefined;
|
|
139
|
+
}, {
|
|
140
|
+
tenantId: string;
|
|
141
|
+
createdAt: string;
|
|
142
|
+
updatedAt: string;
|
|
143
|
+
schoolId: string;
|
|
144
|
+
isActive: boolean;
|
|
145
|
+
roomNumber: string;
|
|
146
|
+
locationType: "other" | "classroom" | "lab" | "gym" | "auditorium" | "library" | "office" | "cafeteria";
|
|
147
|
+
locationId: string;
|
|
148
|
+
description?: string | undefined;
|
|
149
|
+
buildingName?: string | undefined;
|
|
150
|
+
floorNumber?: number | undefined;
|
|
151
|
+
capacity?: number | undefined;
|
|
152
|
+
}>, "many">;
|
|
153
|
+
lastEvaluatedKey: z.ZodOptional<z.ZodString>;
|
|
154
|
+
hasMore: z.ZodBoolean;
|
|
155
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
156
|
+
}, "strip", z.ZodTypeAny, {
|
|
157
|
+
items: {
|
|
158
|
+
tenantId: string;
|
|
159
|
+
createdAt: string;
|
|
160
|
+
updatedAt: string;
|
|
161
|
+
schoolId: string;
|
|
162
|
+
isActive: boolean;
|
|
163
|
+
roomNumber: string;
|
|
164
|
+
locationType: "other" | "classroom" | "lab" | "gym" | "auditorium" | "library" | "office" | "cafeteria";
|
|
165
|
+
locationId: string;
|
|
166
|
+
description?: string | undefined;
|
|
167
|
+
buildingName?: string | undefined;
|
|
168
|
+
floorNumber?: number | undefined;
|
|
169
|
+
capacity?: number | undefined;
|
|
170
|
+
}[];
|
|
171
|
+
hasMore: boolean;
|
|
172
|
+
lastEvaluatedKey?: string | undefined;
|
|
173
|
+
total?: number | undefined;
|
|
174
|
+
}, {
|
|
175
|
+
items: {
|
|
176
|
+
tenantId: string;
|
|
177
|
+
createdAt: string;
|
|
178
|
+
updatedAt: string;
|
|
179
|
+
schoolId: string;
|
|
180
|
+
isActive: boolean;
|
|
181
|
+
roomNumber: string;
|
|
182
|
+
locationType: "other" | "classroom" | "lab" | "gym" | "auditorium" | "library" | "office" | "cafeteria";
|
|
183
|
+
locationId: string;
|
|
184
|
+
description?: string | undefined;
|
|
185
|
+
buildingName?: string | undefined;
|
|
186
|
+
floorNumber?: number | undefined;
|
|
187
|
+
capacity?: number | undefined;
|
|
188
|
+
}[];
|
|
189
|
+
hasMore: boolean;
|
|
190
|
+
lastEvaluatedKey?: string | undefined;
|
|
191
|
+
total?: number | undefined;
|
|
192
|
+
}>;
|
|
193
|
+
export type LocationListResponseDto = z.infer<typeof locationListResponseSchema>;
|
|
194
|
+
//# sourceMappingURL=location.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"location.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/identity/location.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB;;GAEG;AACH,eAAO,MAAM,kBAAkB,iGAS7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAM9D,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;EAqB/B,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAMrE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;EAAiC,CAAC;AAEnE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAMrE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BjC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAMzE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAwD,CAAC;AAChG,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Location Schemas - Identity Service
|
|
4
|
+
*
|
|
5
|
+
* Zod schemas for school location/room management.
|
|
6
|
+
* Ed-Fi: Location represents a physical space within a school
|
|
7
|
+
* (classroom, lab, gym, etc.) that can be assigned to sections.
|
|
8
|
+
*
|
|
9
|
+
* Replaces the Classroom entity in Academics with a canonical
|
|
10
|
+
* Location entity in Identity, enabling cross-service referencing.
|
|
11
|
+
*
|
|
12
|
+
* @see https://api.ed-fi.org/v7.1/docs/swagger/index.html - Location
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.locationListResponseSchema = exports.locationResponseSchema = exports.updateLocationSchema = exports.createLocationSchema = exports.locationTypeSchema = void 0;
|
|
16
|
+
const zod_1 = require("zod");
|
|
17
|
+
const common_1 = require("../common");
|
|
18
|
+
// ============================================
|
|
19
|
+
// Enums
|
|
20
|
+
// ============================================
|
|
21
|
+
/**
|
|
22
|
+
* Location type descriptor
|
|
23
|
+
*/
|
|
24
|
+
exports.locationTypeSchema = zod_1.z.enum([
|
|
25
|
+
'classroom',
|
|
26
|
+
'lab',
|
|
27
|
+
'gym',
|
|
28
|
+
'auditorium',
|
|
29
|
+
'library',
|
|
30
|
+
'office',
|
|
31
|
+
'cafeteria',
|
|
32
|
+
'other',
|
|
33
|
+
]);
|
|
34
|
+
// ============================================
|
|
35
|
+
// Create Location Schema
|
|
36
|
+
// ============================================
|
|
37
|
+
exports.createLocationSchema = zod_1.z.object({
|
|
38
|
+
// Ed-Fi Core: classroomIdentificationCode
|
|
39
|
+
roomNumber: zod_1.z.string()
|
|
40
|
+
.min(1, 'Room number is required')
|
|
41
|
+
.max(20, 'Room number must not exceed 20 characters'),
|
|
42
|
+
// Building info
|
|
43
|
+
buildingName: zod_1.z.string().max(100).optional(),
|
|
44
|
+
floorNumber: zod_1.z.number().int().optional(),
|
|
45
|
+
// Capacity
|
|
46
|
+
capacity: zod_1.z.number().int().min(1).max(500).optional(),
|
|
47
|
+
// Classification
|
|
48
|
+
locationType: exports.locationTypeSchema.default('classroom'),
|
|
49
|
+
// Status
|
|
50
|
+
isActive: zod_1.z.boolean().default(true),
|
|
51
|
+
// Description
|
|
52
|
+
description: zod_1.z.string().max(255).optional(),
|
|
53
|
+
});
|
|
54
|
+
// ============================================
|
|
55
|
+
// Update Location Schema
|
|
56
|
+
// ============================================
|
|
57
|
+
exports.updateLocationSchema = exports.createLocationSchema.partial();
|
|
58
|
+
// ============================================
|
|
59
|
+
// Location Response Schema
|
|
60
|
+
// ============================================
|
|
61
|
+
exports.locationResponseSchema = zod_1.z.object({
|
|
62
|
+
// Identifiers
|
|
63
|
+
locationId: zod_1.z.string().uuid(),
|
|
64
|
+
schoolId: zod_1.z.string().uuid(),
|
|
65
|
+
tenantId: zod_1.z.string().uuid(),
|
|
66
|
+
// Ed-Fi Core
|
|
67
|
+
roomNumber: zod_1.z.string(),
|
|
68
|
+
// Building info
|
|
69
|
+
buildingName: zod_1.z.string().optional(),
|
|
70
|
+
floorNumber: zod_1.z.number().int().optional(),
|
|
71
|
+
// Capacity
|
|
72
|
+
capacity: zod_1.z.number().int().optional(),
|
|
73
|
+
// Classification
|
|
74
|
+
locationType: exports.locationTypeSchema,
|
|
75
|
+
// Status
|
|
76
|
+
isActive: zod_1.z.boolean(),
|
|
77
|
+
// Description
|
|
78
|
+
description: zod_1.z.string().optional(),
|
|
79
|
+
// Metadata
|
|
80
|
+
createdAt: zod_1.z.string(),
|
|
81
|
+
updatedAt: zod_1.z.string(),
|
|
82
|
+
});
|
|
83
|
+
// ============================================
|
|
84
|
+
// Location List Response
|
|
85
|
+
// ============================================
|
|
86
|
+
exports.locationListResponseSchema = (0, common_1.createPaginatedResponseSchema)(exports.locationResponseSchema);
|
|
87
|
+
//# sourceMappingURL=location.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|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