@aibrains/shared-types 0.1.1 → 0.3.0

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.
Files changed (61) hide show
  1. package/dist/mappers/edfi/education-org.mapper.d.ts +156 -0
  2. package/dist/mappers/edfi/education-org.mapper.d.ts.map +1 -0
  3. package/dist/mappers/edfi/education-org.mapper.js +355 -0
  4. package/dist/mappers/edfi/education-org.mapper.js.map +1 -0
  5. package/dist/mappers/edfi/index.d.ts +1 -0
  6. package/dist/mappers/edfi/index.d.ts.map +1 -1
  7. package/dist/mappers/edfi/index.js +1 -0
  8. package/dist/mappers/edfi/index.js.map +1 -1
  9. package/dist/schemas/academics/assignment.schema.d.ts +10 -10
  10. package/dist/schemas/academics/course.schema.d.ts +10 -10
  11. package/dist/schemas/academics/grade.schema.d.ts +13 -13
  12. package/dist/schemas/enrollment/enrollment.schema.d.ts +49 -49
  13. package/dist/schemas/identity/academic-year.schema.d.ts +12 -12
  14. package/dist/schemas/identity/auth.schema.d.ts +10 -10
  15. package/dist/schemas/identity/credential.schema.d.ts +12 -12
  16. package/dist/schemas/identity/education-org-descriptors.d.ts +314 -0
  17. package/dist/schemas/identity/education-org-descriptors.d.ts.map +1 -0
  18. package/dist/schemas/identity/education-org-descriptors.js +245 -0
  19. package/dist/schemas/identity/education-org-descriptors.js.map +1 -0
  20. package/dist/schemas/identity/education-org-hierarchy.schema.d.ts +65 -0
  21. package/dist/schemas/identity/education-org-hierarchy.schema.d.ts.map +1 -0
  22. package/dist/schemas/identity/education-org-hierarchy.schema.js +46 -0
  23. package/dist/schemas/identity/education-org-hierarchy.schema.js.map +1 -0
  24. package/dist/schemas/identity/education-organization.schema.d.ts +127 -0
  25. package/dist/schemas/identity/education-organization.schema.d.ts.map +1 -0
  26. package/dist/schemas/identity/education-organization.schema.js +102 -0
  27. package/dist/schemas/identity/education-organization.schema.js.map +1 -0
  28. package/dist/schemas/identity/education-service-center.schema.d.ts +826 -0
  29. package/dist/schemas/identity/education-service-center.schema.d.ts.map +1 -0
  30. package/dist/schemas/identity/education-service-center.schema.js +85 -0
  31. package/dist/schemas/identity/education-service-center.schema.js.map +1 -0
  32. package/dist/schemas/identity/index.d.ts +8 -0
  33. package/dist/schemas/identity/index.d.ts.map +1 -1
  34. package/dist/schemas/identity/index.js +9 -0
  35. package/dist/schemas/identity/index.js.map +1 -1
  36. package/dist/schemas/identity/local-education-agency.schema.d.ts +888 -0
  37. package/dist/schemas/identity/local-education-agency.schema.d.ts.map +1 -0
  38. package/dist/schemas/identity/local-education-agency.schema.js +96 -0
  39. package/dist/schemas/identity/local-education-agency.schema.js.map +1 -0
  40. package/dist/schemas/identity/school.schema.d.ts +404 -0
  41. package/dist/schemas/identity/school.schema.d.ts.map +1 -1
  42. package/dist/schemas/identity/school.schema.js +35 -0
  43. package/dist/schemas/identity/school.schema.js.map +1 -1
  44. package/dist/schemas/identity/staff-assignment.schema.d.ts +240 -0
  45. package/dist/schemas/identity/staff-assignment.schema.d.ts.map +1 -0
  46. package/dist/schemas/identity/staff-assignment.schema.js +72 -0
  47. package/dist/schemas/identity/staff-assignment.schema.js.map +1 -0
  48. package/dist/schemas/identity/staff-employment-history.schema.d.ts +114 -0
  49. package/dist/schemas/identity/staff-employment-history.schema.d.ts.map +1 -0
  50. package/dist/schemas/identity/staff-employment-history.schema.js +31 -0
  51. package/dist/schemas/identity/staff-employment-history.schema.js.map +1 -0
  52. package/dist/schemas/identity/staff.schema.d.ts +482 -10
  53. package/dist/schemas/identity/staff.schema.d.ts.map +1 -1
  54. package/dist/schemas/identity/staff.schema.js +15 -1
  55. package/dist/schemas/identity/staff.schema.js.map +1 -1
  56. package/dist/schemas/identity/state-education-agency.schema.d.ts +511 -0
  57. package/dist/schemas/identity/state-education-agency.schema.d.ts.map +1 -0
  58. package/dist/schemas/identity/state-education-agency.schema.js +68 -0
  59. package/dist/schemas/identity/state-education-agency.schema.js.map +1 -0
  60. package/dist/schemas/identity/user.schema.d.ts +10 -10
  61. package/package.json +1 -1
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Education Organization Hierarchy Schemas - Identity Service
3
+ *
4
+ * Zod schemas for the hierarchy tree API response.
5
+ * Used by the GET /education-organizations/hierarchy endpoint.
6
+ */
7
+ import { z } from 'zod';
8
+ /**
9
+ * Base hierarchy node fields (non-recursive).
10
+ * Recursive `children` is added via z.lazy().
11
+ */
12
+ declare const hierarchyNodeBaseSchema: z.ZodObject<{
13
+ id: z.ZodString;
14
+ name: z.ZodString;
15
+ type: z.ZodEnum<["stateEducationAgency", "localEducationAgency", "school", "educationServiceCenter", "educationOrganizationNetwork", "organizationDepartment", "communityOrganization", "communityProvider", "postSecondaryInstitution"]>;
16
+ edfiId: z.ZodOptional<z.ZodNumber>;
17
+ status: z.ZodEnum<["Active", "Added", "ChangedAgency", "Closed", "Inactive", "New", "Reopened", "Future"]>;
18
+ schoolCount: z.ZodOptional<z.ZodNumber>;
19
+ studentCount: z.ZodOptional<z.ZodNumber>;
20
+ staffCount: z.ZodOptional<z.ZodNumber>;
21
+ }, "strip", z.ZodTypeAny, {
22
+ type: "stateEducationAgency" | "localEducationAgency" | "school" | "educationServiceCenter" | "educationOrganizationNetwork" | "organizationDepartment" | "communityOrganization" | "communityProvider" | "postSecondaryInstitution";
23
+ status: "Active" | "Added" | "ChangedAgency" | "Closed" | "Inactive" | "New" | "Reopened" | "Future";
24
+ name: string;
25
+ id: string;
26
+ studentCount?: number | undefined;
27
+ staffCount?: number | undefined;
28
+ schoolCount?: number | undefined;
29
+ edfiId?: number | undefined;
30
+ }, {
31
+ type: "stateEducationAgency" | "localEducationAgency" | "school" | "educationServiceCenter" | "educationOrganizationNetwork" | "organizationDepartment" | "communityOrganization" | "communityProvider" | "postSecondaryInstitution";
32
+ status: "Active" | "Added" | "ChangedAgency" | "Closed" | "Inactive" | "New" | "Reopened" | "Future";
33
+ name: string;
34
+ id: string;
35
+ studentCount?: number | undefined;
36
+ staffCount?: number | undefined;
37
+ schoolCount?: number | undefined;
38
+ edfiId?: number | undefined;
39
+ }>;
40
+ export type HierarchyNode = z.infer<typeof hierarchyNodeBaseSchema> & {
41
+ children: HierarchyNode[];
42
+ };
43
+ export declare const hierarchyNodeSchema: z.ZodType<HierarchyNode>;
44
+ /**
45
+ * Full hierarchy tree response.
46
+ * - `sea`: The root SEA node with all children (LEAs → Schools), or null if no SEA exists.
47
+ * - `educationServiceCenters`: ESCs are siblings to LEAs, not nested under them.
48
+ * - `unassigned`: Schools not linked to any LEA.
49
+ */
50
+ export declare const organizationHierarchyResponseSchema: z.ZodObject<{
51
+ sea: z.ZodNullable<z.ZodType<HierarchyNode, z.ZodTypeDef, HierarchyNode>>;
52
+ educationServiceCenters: z.ZodArray<z.ZodType<HierarchyNode, z.ZodTypeDef, HierarchyNode>, "many">;
53
+ unassigned: z.ZodArray<z.ZodType<HierarchyNode, z.ZodTypeDef, HierarchyNode>, "many">;
54
+ }, "strip", z.ZodTypeAny, {
55
+ sea: HierarchyNode | null;
56
+ educationServiceCenters: HierarchyNode[];
57
+ unassigned: HierarchyNode[];
58
+ }, {
59
+ sea: HierarchyNode | null;
60
+ educationServiceCenters: HierarchyNode[];
61
+ unassigned: HierarchyNode[];
62
+ }>;
63
+ export type OrganizationHierarchyResponseDto = z.infer<typeof organizationHierarchyResponseSchema>;
64
+ export {};
65
+ //# sourceMappingURL=education-org-hierarchy.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"education-org-hierarchy.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/identity/education-org-hierarchy.schema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB;;;GAGG;AACH,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS3B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,GAAG;IACpE,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CAEvD,CAAC;AAMH;;;;;GAKG;AACH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;EAI9C,CAAC;AAEH,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ /**
3
+ * Education Organization Hierarchy Schemas - Identity Service
4
+ *
5
+ * Zod schemas for the hierarchy tree API response.
6
+ * Used by the GET /education-organizations/hierarchy endpoint.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.organizationHierarchyResponseSchema = exports.hierarchyNodeSchema = void 0;
10
+ const zod_1 = require("zod");
11
+ const education_organization_schema_1 = require("./education-organization.schema");
12
+ // ============================================
13
+ // Hierarchy Node (Recursive)
14
+ // ============================================
15
+ /**
16
+ * Base hierarchy node fields (non-recursive).
17
+ * Recursive `children` is added via z.lazy().
18
+ */
19
+ const hierarchyNodeBaseSchema = zod_1.z.object({
20
+ id: zod_1.z.string().uuid(),
21
+ name: zod_1.z.string(),
22
+ type: education_organization_schema_1.educationOrgTypeSchema,
23
+ edfiId: zod_1.z.number().int().optional(), // Ed-Fi numeric ID (SEA/LEA/ESC/School ID)
24
+ status: education_organization_schema_1.operationalStatusSchema,
25
+ schoolCount: zod_1.z.number().int().min(0).optional(), // Aggregate: schools under this node
26
+ studentCount: zod_1.z.number().int().min(0).optional(), // Aggregate: students
27
+ staffCount: zod_1.z.number().int().min(0).optional(), // Aggregate: staff
28
+ });
29
+ exports.hierarchyNodeSchema = hierarchyNodeBaseSchema.extend({
30
+ children: zod_1.z.lazy(() => zod_1.z.array(exports.hierarchyNodeSchema)),
31
+ });
32
+ // ============================================
33
+ // Organization Hierarchy Response
34
+ // ============================================
35
+ /**
36
+ * Full hierarchy tree response.
37
+ * - `sea`: The root SEA node with all children (LEAs → Schools), or null if no SEA exists.
38
+ * - `educationServiceCenters`: ESCs are siblings to LEAs, not nested under them.
39
+ * - `unassigned`: Schools not linked to any LEA.
40
+ */
41
+ exports.organizationHierarchyResponseSchema = zod_1.z.object({
42
+ sea: exports.hierarchyNodeSchema.nullable(),
43
+ educationServiceCenters: zod_1.z.array(exports.hierarchyNodeSchema),
44
+ unassigned: zod_1.z.array(exports.hierarchyNodeSchema),
45
+ });
46
+ //# sourceMappingURL=education-org-hierarchy.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"education-org-hierarchy.schema.js","sourceRoot":"","sources":["../../../src/schemas/identity/education-org-hierarchy.schema.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,6BAAwB;AACxB,mFAAkG;AAElG,+CAA+C;AAC/C,6BAA6B;AAC7B,+CAA+C;AAE/C;;;GAGG;AACH,MAAM,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACrB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,sDAAsB;IAC5B,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,EAA4B,2CAA2C;IAC1G,MAAM,EAAE,uDAAuB;IAC/B,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAgB,qCAAqC;IACpG,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAe,sBAAsB;IACrF,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAiB,mBAAmB;CACnF,CAAC,CAAC;AAMU,QAAA,mBAAmB,GAA6B,uBAAuB,CAAC,MAAM,CAAC;IAC1F,QAAQ,EAAE,OAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,OAAC,CAAC,KAAK,CAAC,2BAAmB,CAAC,CAAC;CACrD,CAAC,CAAC;AAEH,+CAA+C;AAC/C,kCAAkC;AAClC,+CAA+C;AAE/C;;;;;GAKG;AACU,QAAA,mCAAmC,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1D,GAAG,EAAE,2BAAmB,CAAC,QAAQ,EAAE;IACnC,uBAAuB,EAAE,OAAC,CAAC,KAAK,CAAC,2BAAmB,CAAC;IACrD,UAAU,EAAE,OAAC,CAAC,KAAK,CAAC,2BAAmB,CAAC;CACzC,CAAC,CAAC"}
@@ -0,0 +1,127 @@
1
+ /**
2
+ * Education Organization Base Schemas - Identity Service
3
+ *
4
+ * Zod schemas for the EducationOrganization abstract base type and shared
5
+ * sub-types used by all concrete education organization entities (SEA, LEA, School, ESC).
6
+ *
7
+ * Ed-Fi Data Standard v5:
8
+ * https://docs.ed-fi.org/reference/data-exchange/data-standard/model-reference/education-organization-domain/
9
+ */
10
+ import { z } from 'zod';
11
+ /**
12
+ * All Ed-Fi education organization entity types.
13
+ * Includes future types for forward compatibility.
14
+ */
15
+ export declare const educationOrgTypeSchema: z.ZodEnum<["stateEducationAgency", "localEducationAgency", "school", "educationServiceCenter", "educationOrganizationNetwork", "organizationDepartment", "communityOrganization", "communityProvider", "postSecondaryInstitution"]>;
16
+ export type EducationOrgType = z.infer<typeof educationOrgTypeSchema>;
17
+ /**
18
+ * Re-export for convenience (Ed-Fi: OperationalStatusDescriptor)
19
+ */
20
+ export declare const operationalStatusSchema: z.ZodEnum<["Active", "Added", "ChangedAgency", "Closed", "Inactive", "New", "Reopened", "Future"]>;
21
+ export type OperationalStatus = z.infer<typeof operationalStatusSchema>;
22
+ export declare const educationOrgAddressSchema: z.ZodObject<{
23
+ addressTypeDescriptor: z.ZodEnum<["Physical", "Mailing", "Shipping"]>;
24
+ streetNumberName: z.ZodString;
25
+ apartmentRoomSuiteNumber: z.ZodOptional<z.ZodString>;
26
+ city: z.ZodString;
27
+ stateAbbreviationDescriptor: z.ZodEnum<["AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY", "DC", "AS", "GU", "MP", "PR", "VI"]>;
28
+ postalCode: z.ZodString;
29
+ nameOfCounty: z.ZodOptional<z.ZodString>;
30
+ countyFIPSCode: z.ZodOptional<z.ZodString>;
31
+ latitude: z.ZodOptional<z.ZodString>;
32
+ longitude: z.ZodOptional<z.ZodString>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ city: string;
35
+ addressTypeDescriptor: "Physical" | "Mailing" | "Shipping";
36
+ streetNumberName: string;
37
+ stateAbbreviationDescriptor: "AL" | "AK" | "AZ" | "AR" | "CA" | "CO" | "CT" | "DE" | "FL" | "GA" | "HI" | "ID" | "IL" | "IN" | "IA" | "KS" | "KY" | "LA" | "ME" | "MD" | "MA" | "MI" | "MN" | "MS" | "MO" | "MT" | "NE" | "NV" | "NH" | "NJ" | "NM" | "NY" | "NC" | "ND" | "OH" | "OK" | "OR" | "PA" | "RI" | "SC" | "SD" | "TN" | "TX" | "UT" | "VT" | "VA" | "WA" | "WV" | "WI" | "WY" | "DC" | "AS" | "GU" | "MP" | "PR" | "VI";
38
+ postalCode: string;
39
+ apartmentRoomSuiteNumber?: string | undefined;
40
+ nameOfCounty?: string | undefined;
41
+ countyFIPSCode?: string | undefined;
42
+ latitude?: string | undefined;
43
+ longitude?: string | undefined;
44
+ }, {
45
+ city: string;
46
+ addressTypeDescriptor: "Physical" | "Mailing" | "Shipping";
47
+ streetNumberName: string;
48
+ stateAbbreviationDescriptor: "AL" | "AK" | "AZ" | "AR" | "CA" | "CO" | "CT" | "DE" | "FL" | "GA" | "HI" | "ID" | "IL" | "IN" | "IA" | "KS" | "KY" | "LA" | "ME" | "MD" | "MA" | "MI" | "MN" | "MS" | "MO" | "MT" | "NE" | "NV" | "NH" | "NJ" | "NM" | "NY" | "NC" | "ND" | "OH" | "OK" | "OR" | "PA" | "RI" | "SC" | "SD" | "TN" | "TX" | "UT" | "VT" | "VA" | "WA" | "WV" | "WI" | "WY" | "DC" | "AS" | "GU" | "MP" | "PR" | "VI";
49
+ postalCode: string;
50
+ apartmentRoomSuiteNumber?: string | undefined;
51
+ nameOfCounty?: string | undefined;
52
+ countyFIPSCode?: string | undefined;
53
+ latitude?: string | undefined;
54
+ longitude?: string | undefined;
55
+ }>;
56
+ export type EducationOrgAddress = z.infer<typeof educationOrgAddressSchema>;
57
+ export declare const educationOrgIdentificationCodeSchema: z.ZodObject<{
58
+ identificationCode: z.ZodString;
59
+ educationOrganizationIdentificationSystemDescriptor: z.ZodEnum<["NCES", "SEA", "DUNS", "Federal", "Other"]>;
60
+ }, "strip", z.ZodTypeAny, {
61
+ identificationCode: string;
62
+ educationOrganizationIdentificationSystemDescriptor: "Other" | "NCES" | "SEA" | "DUNS" | "Federal";
63
+ }, {
64
+ identificationCode: string;
65
+ educationOrganizationIdentificationSystemDescriptor: "Other" | "NCES" | "SEA" | "DUNS" | "Federal";
66
+ }>;
67
+ export type EducationOrgIdentificationCode = z.infer<typeof educationOrgIdentificationCodeSchema>;
68
+ export declare const educationOrgIndicatorSchema: z.ZodObject<{
69
+ indicatorDescriptor: z.ZodString;
70
+ designatedBy: z.ZodOptional<z.ZodString>;
71
+ indicatorValue: z.ZodOptional<z.ZodString>;
72
+ indicatorLevelDescriptor: z.ZodOptional<z.ZodString>;
73
+ indicatorGroupDescriptor: z.ZodOptional<z.ZodString>;
74
+ }, "strip", z.ZodTypeAny, {
75
+ indicatorDescriptor: string;
76
+ designatedBy?: string | undefined;
77
+ indicatorValue?: string | undefined;
78
+ indicatorLevelDescriptor?: string | undefined;
79
+ indicatorGroupDescriptor?: string | undefined;
80
+ }, {
81
+ indicatorDescriptor: string;
82
+ designatedBy?: string | undefined;
83
+ indicatorValue?: string | undefined;
84
+ indicatorLevelDescriptor?: string | undefined;
85
+ indicatorGroupDescriptor?: string | undefined;
86
+ }>;
87
+ export type EducationOrgIndicator = z.infer<typeof educationOrgIndicatorSchema>;
88
+ export declare const institutionTelephoneSchema: z.ZodObject<{
89
+ telephoneNumber: z.ZodString;
90
+ institutionTelephoneNumberTypeDescriptor: z.ZodEnum<["Main", "Administrative", "Fax", "Attendance"]>;
91
+ }, "strip", z.ZodTypeAny, {
92
+ telephoneNumber: string;
93
+ institutionTelephoneNumberTypeDescriptor: "Main" | "Administrative" | "Fax" | "Attendance";
94
+ }, {
95
+ telephoneNumber: string;
96
+ institutionTelephoneNumberTypeDescriptor: "Main" | "Administrative" | "Fax" | "Attendance";
97
+ }>;
98
+ export type InstitutionTelephone = z.infer<typeof institutionTelephoneSchema>;
99
+ export declare const educationOrgCategorySchema: z.ZodObject<{
100
+ educationOrganizationCategoryDescriptor: z.ZodString;
101
+ }, "strip", z.ZodTypeAny, {
102
+ educationOrganizationCategoryDescriptor: string;
103
+ }, {
104
+ educationOrganizationCategoryDescriptor: string;
105
+ }>;
106
+ export type EducationOrgCategory = z.infer<typeof educationOrgCategorySchema>;
107
+ export declare const accountabilityRatingSchema: z.ZodObject<{
108
+ schoolYear: z.ZodNumber;
109
+ title: z.ZodString;
110
+ rating: z.ZodString;
111
+ ratingOrganization: z.ZodOptional<z.ZodString>;
112
+ ratingDate: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
113
+ }, "strip", z.ZodTypeAny, {
114
+ schoolYear: number;
115
+ title: string;
116
+ rating: string;
117
+ ratingOrganization?: string | undefined;
118
+ ratingDate?: string | undefined;
119
+ }, {
120
+ schoolYear: number;
121
+ title: string;
122
+ rating: string;
123
+ ratingOrganization?: string | undefined;
124
+ ratingDate?: string | undefined;
125
+ }>;
126
+ export type AccountabilityRating = z.infer<typeof accountabilityRatingSchema>;
127
+ //# sourceMappingURL=education-organization.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"education-organization.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/identity/education-organization.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB;;;GAGG;AACH,eAAO,MAAM,sBAAsB,qOAUjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAMtE;;GAEG;AACH,eAAO,MAAM,uBAAuB,oGAAoC,CAAC;AACzE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAOxE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAO5E,eAAO,MAAM,oCAAoC;;;;;;;;;EAG/C,CAAC;AACH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAOlG,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;EAMtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAOhF,eAAO,MAAM,0BAA0B;;;;;;;;;EAGrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAO9E,eAAO,MAAM,0BAA0B;;;;;;EAErC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAO9E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;EAMrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ /**
3
+ * Education Organization Base Schemas - Identity Service
4
+ *
5
+ * Zod schemas for the EducationOrganization abstract base type and shared
6
+ * sub-types used by all concrete education organization entities (SEA, LEA, School, ESC).
7
+ *
8
+ * Ed-Fi Data Standard v5:
9
+ * https://docs.ed-fi.org/reference/data-exchange/data-standard/model-reference/education-organization-domain/
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.accountabilityRatingSchema = exports.educationOrgCategorySchema = exports.institutionTelephoneSchema = exports.educationOrgIndicatorSchema = exports.educationOrgIdentificationCodeSchema = exports.educationOrgAddressSchema = exports.operationalStatusSchema = exports.educationOrgTypeSchema = void 0;
13
+ const zod_1 = require("zod");
14
+ const common_1 = require("../common");
15
+ const education_org_descriptors_1 = require("./education-org-descriptors");
16
+ // ============================================
17
+ // Education Organization Type
18
+ // ============================================
19
+ /**
20
+ * All Ed-Fi education organization entity types.
21
+ * Includes future types for forward compatibility.
22
+ */
23
+ exports.educationOrgTypeSchema = zod_1.z.enum([
24
+ 'stateEducationAgency',
25
+ 'localEducationAgency',
26
+ 'school',
27
+ 'educationServiceCenter',
28
+ 'educationOrganizationNetwork',
29
+ 'organizationDepartment',
30
+ 'communityOrganization',
31
+ 'communityProvider',
32
+ 'postSecondaryInstitution',
33
+ ]);
34
+ // ============================================
35
+ // Operational Status
36
+ // ============================================
37
+ /**
38
+ * Re-export for convenience (Ed-Fi: OperationalStatusDescriptor)
39
+ */
40
+ exports.operationalStatusSchema = education_org_descriptors_1.operationalStatusDescriptorSchema;
41
+ // ============================================
42
+ // Education Organization Address
43
+ // Ed-Fi: EducationOrganizationAddress
44
+ // ============================================
45
+ exports.educationOrgAddressSchema = zod_1.z.object({
46
+ addressTypeDescriptor: education_org_descriptors_1.addressTypeDescriptorSchema, // Ed-Fi: addressTypeDescriptor
47
+ streetNumberName: zod_1.z.string().max(150), // Ed-Fi: streetNumberName
48
+ apartmentRoomSuiteNumber: zod_1.z.string().max(50).optional(), // Ed-Fi: apartmentRoomSuiteNumber
49
+ city: zod_1.z.string().max(30), // Ed-Fi: city
50
+ stateAbbreviationDescriptor: education_org_descriptors_1.stateAbbreviationDescriptorSchema, // Ed-Fi: stateAbbreviationDescriptor
51
+ postalCode: zod_1.z.string().max(17), // Ed-Fi: postalCode
52
+ nameOfCounty: zod_1.z.string().max(30).optional(), // Ed-Fi: nameOfCounty
53
+ countyFIPSCode: zod_1.z.string().max(5).optional(), // Ed-Fi: countyFIPSCode
54
+ latitude: zod_1.z.string().max(20).optional(), // Ed-Fi: latitude
55
+ longitude: zod_1.z.string().max(20).optional(), // Ed-Fi: longitude
56
+ });
57
+ // ============================================
58
+ // Education Organization Identification Code
59
+ // Ed-Fi: EducationOrganizationIdentificationCode
60
+ // ============================================
61
+ exports.educationOrgIdentificationCodeSchema = zod_1.z.object({
62
+ identificationCode: zod_1.z.string().min(1).max(60), // Ed-Fi: identificationCode
63
+ educationOrganizationIdentificationSystemDescriptor: education_org_descriptors_1.educationOrganizationIdentificationSystemDescriptorSchema, // Ed-Fi: descriptor
64
+ });
65
+ // ============================================
66
+ // Education Organization Indicator
67
+ // Ed-Fi: EducationOrganizationIndicator
68
+ // ============================================
69
+ exports.educationOrgIndicatorSchema = zod_1.z.object({
70
+ indicatorDescriptor: zod_1.z.string().max(200), // Ed-Fi: indicatorDescriptor
71
+ designatedBy: zod_1.z.string().max(60).optional(), // Ed-Fi: designatedBy
72
+ indicatorValue: zod_1.z.string().max(60).optional(), // Ed-Fi: indicatorValue
73
+ indicatorLevelDescriptor: zod_1.z.string().max(200).optional(), // Ed-Fi: indicatorLevelDescriptor
74
+ indicatorGroupDescriptor: zod_1.z.string().max(200).optional(), // Ed-Fi: indicatorGroupDescriptor
75
+ });
76
+ // ============================================
77
+ // Institution Telephone
78
+ // Ed-Fi: InstitutionTelephone
79
+ // ============================================
80
+ exports.institutionTelephoneSchema = zod_1.z.object({
81
+ telephoneNumber: zod_1.z.string().min(1).max(24), // Ed-Fi: telephoneNumber
82
+ institutionTelephoneNumberTypeDescriptor: education_org_descriptors_1.institutionTelephoneNumberTypeDescriptorSchema, // Ed-Fi: descriptor
83
+ });
84
+ // ============================================
85
+ // Education Organization Category
86
+ // Ed-Fi: EducationOrganizationCategory (required on all entities)
87
+ // ============================================
88
+ exports.educationOrgCategorySchema = zod_1.z.object({
89
+ educationOrganizationCategoryDescriptor: zod_1.z.string().max(200), // Ed-Fi: descriptor URI
90
+ });
91
+ // ============================================
92
+ // Accountability Rating
93
+ // Ed-Fi: AccountabilityRating
94
+ // ============================================
95
+ exports.accountabilityRatingSchema = zod_1.z.object({
96
+ schoolYear: zod_1.z.number().int().min(1900).max(2100), // Ed-Fi: schoolYear
97
+ title: zod_1.z.string().min(1).max(100), // Ed-Fi: title
98
+ rating: zod_1.z.string().min(1).max(35), // Ed-Fi: rating
99
+ ratingOrganization: zod_1.z.string().max(35).optional(), // Ed-Fi: ratingOrganization
100
+ ratingDate: common_1.dateSchema.optional(), // Ed-Fi: ratingDate
101
+ });
102
+ //# sourceMappingURL=education-organization.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"education-organization.schema.js","sourceRoot":"","sources":["../../../src/schemas/identity/education-organization.schema.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAEH,6BAAwB;AACxB,sCAAuC;AACvC,2EAMqC;AAErC,+CAA+C;AAC/C,8BAA8B;AAC9B,+CAA+C;AAE/C;;;GAGG;AACU,QAAA,sBAAsB,GAAG,OAAC,CAAC,IAAI,CAAC;IAC3C,sBAAsB;IACtB,sBAAsB;IACtB,QAAQ;IACR,wBAAwB;IACxB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