@aibrains/shared-types 0.1.1 → 0.2.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 (53) hide show
  1. package/dist/schemas/academics/assignment.schema.d.ts +10 -10
  2. package/dist/schemas/academics/course.schema.d.ts +10 -10
  3. package/dist/schemas/academics/grade.schema.d.ts +13 -13
  4. package/dist/schemas/enrollment/enrollment.schema.d.ts +49 -49
  5. package/dist/schemas/identity/academic-year.schema.d.ts +12 -12
  6. package/dist/schemas/identity/auth.schema.d.ts +10 -10
  7. package/dist/schemas/identity/credential.schema.d.ts +12 -12
  8. package/dist/schemas/identity/education-org-descriptors.d.ts +314 -0
  9. package/dist/schemas/identity/education-org-descriptors.d.ts.map +1 -0
  10. package/dist/schemas/identity/education-org-descriptors.js +245 -0
  11. package/dist/schemas/identity/education-org-descriptors.js.map +1 -0
  12. package/dist/schemas/identity/education-org-hierarchy.schema.d.ts +65 -0
  13. package/dist/schemas/identity/education-org-hierarchy.schema.d.ts.map +1 -0
  14. package/dist/schemas/identity/education-org-hierarchy.schema.js +46 -0
  15. package/dist/schemas/identity/education-org-hierarchy.schema.js.map +1 -0
  16. package/dist/schemas/identity/education-organization.schema.d.ts +127 -0
  17. package/dist/schemas/identity/education-organization.schema.d.ts.map +1 -0
  18. package/dist/schemas/identity/education-organization.schema.js +102 -0
  19. package/dist/schemas/identity/education-organization.schema.js.map +1 -0
  20. package/dist/schemas/identity/education-service-center.schema.d.ts +826 -0
  21. package/dist/schemas/identity/education-service-center.schema.d.ts.map +1 -0
  22. package/dist/schemas/identity/education-service-center.schema.js +85 -0
  23. package/dist/schemas/identity/education-service-center.schema.js.map +1 -0
  24. package/dist/schemas/identity/index.d.ts +8 -0
  25. package/dist/schemas/identity/index.d.ts.map +1 -1
  26. package/dist/schemas/identity/index.js +9 -0
  27. package/dist/schemas/identity/index.js.map +1 -1
  28. package/dist/schemas/identity/local-education-agency.schema.d.ts +888 -0
  29. package/dist/schemas/identity/local-education-agency.schema.d.ts.map +1 -0
  30. package/dist/schemas/identity/local-education-agency.schema.js +96 -0
  31. package/dist/schemas/identity/local-education-agency.schema.js.map +1 -0
  32. package/dist/schemas/identity/school.schema.d.ts +404 -0
  33. package/dist/schemas/identity/school.schema.d.ts.map +1 -1
  34. package/dist/schemas/identity/school.schema.js +35 -0
  35. package/dist/schemas/identity/school.schema.js.map +1 -1
  36. package/dist/schemas/identity/staff-assignment.schema.d.ts +240 -0
  37. package/dist/schemas/identity/staff-assignment.schema.d.ts.map +1 -0
  38. package/dist/schemas/identity/staff-assignment.schema.js +72 -0
  39. package/dist/schemas/identity/staff-assignment.schema.js.map +1 -0
  40. package/dist/schemas/identity/staff-employment-history.schema.d.ts +114 -0
  41. package/dist/schemas/identity/staff-employment-history.schema.d.ts.map +1 -0
  42. package/dist/schemas/identity/staff-employment-history.schema.js +31 -0
  43. package/dist/schemas/identity/staff-employment-history.schema.js.map +1 -0
  44. package/dist/schemas/identity/staff.schema.d.ts +482 -10
  45. package/dist/schemas/identity/staff.schema.d.ts.map +1 -1
  46. package/dist/schemas/identity/staff.schema.js +15 -1
  47. package/dist/schemas/identity/staff.schema.js.map +1 -1
  48. package/dist/schemas/identity/state-education-agency.schema.d.ts +511 -0
  49. package/dist/schemas/identity/state-education-agency.schema.d.ts.map +1 -0
  50. package/dist/schemas/identity/state-education-agency.schema.js +68 -0
  51. package/dist/schemas/identity/state-education-agency.schema.js.map +1 -0
  52. package/dist/schemas/identity/user.schema.d.ts +10 -10
  53. package/package.json +1 -1
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ /**
3
+ * State Education Agency (SEA) Schemas - Identity Service
4
+ *
5
+ * Zod schemas for State Education Agency CRUD operations.
6
+ * SEA is the root entity in the Ed-Fi education organization hierarchy.
7
+ * One SEA per tenant (singleton).
8
+ *
9
+ * Ed-Fi: StateEducationAgency
10
+ * https://docs.ed-fi.org/reference/data-exchange/data-standard/model-reference/education-organization-domain/
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.seaResponseSchema = exports.updateStateEducationAgencySchema = exports.createStateEducationAgencySchema = void 0;
14
+ const zod_1 = require("zod");
15
+ const common_1 = require("../common");
16
+ const education_org_descriptors_1 = require("./education-org-descriptors");
17
+ const education_organization_schema_1 = require("./education-organization.schema");
18
+ // ============================================
19
+ // Create SEA Schema
20
+ // ============================================
21
+ exports.createStateEducationAgencySchema = zod_1.z.object({
22
+ // Ed-Fi Core Fields
23
+ stateEducationAgencyId: zod_1.z.number().int().positive(), // Ed-Fi: stateEducationAgencyId (numeric)
24
+ nameOfInstitution: zod_1.z.string().min(1).max(75), // Ed-Fi: nameOfInstitution
25
+ shortNameOfInstitution: zod_1.z.string().max(75).optional(), // Ed-Fi: shortNameOfInstitution
26
+ webSite: zod_1.z.string().url().optional(), // Ed-Fi: webSite
27
+ // Status
28
+ operationalStatusDescriptor: education_org_descriptors_1.operationalStatusDescriptorSchema.default('Active'),
29
+ // Ed-Fi Sub-Collections
30
+ categories: zod_1.z.array(education_organization_schema_1.educationOrgCategorySchema).min(1),
31
+ addresses: zod_1.z.array(education_organization_schema_1.educationOrgAddressSchema).optional(),
32
+ identificationCodes: zod_1.z.array(education_organization_schema_1.educationOrgIdentificationCodeSchema).optional(),
33
+ telephones: zod_1.z.array(education_organization_schema_1.institutionTelephoneSchema).optional(),
34
+ accountabilityRatings: zod_1.z.array(education_organization_schema_1.accountabilityRatingSchema).optional(),
35
+ });
36
+ // ============================================
37
+ // Update SEA Schema
38
+ // ============================================
39
+ exports.updateStateEducationAgencySchema = exports.createStateEducationAgencySchema.partial().omit({
40
+ stateEducationAgencyId: true, // Cannot change the Ed-Fi ID
41
+ });
42
+ // ============================================
43
+ // SEA Response Schema
44
+ // ============================================
45
+ exports.seaResponseSchema = zod_1.z.object({
46
+ // Identifiers
47
+ id: zod_1.z.string().uuid(), // Internal UUID
48
+ stateEducationAgencyId: zod_1.z.number().int(), // Ed-Fi numeric ID
49
+ tenantId: zod_1.z.string().uuid(),
50
+ // Ed-Fi Fields
51
+ nameOfInstitution: zod_1.z.string(),
52
+ shortNameOfInstitution: zod_1.z.string().optional(),
53
+ webSite: zod_1.z.string().optional(),
54
+ operationalStatusDescriptor: education_org_descriptors_1.operationalStatusDescriptorSchema,
55
+ // Sub-Collections
56
+ categories: zod_1.z.array(education_organization_schema_1.educationOrgCategorySchema),
57
+ addresses: zod_1.z.array(education_organization_schema_1.educationOrgAddressSchema).optional(),
58
+ identificationCodes: zod_1.z.array(education_organization_schema_1.educationOrgIdentificationCodeSchema).optional(),
59
+ telephones: zod_1.z.array(education_organization_schema_1.institutionTelephoneSchema).optional(),
60
+ accountabilityRatings: zod_1.z.array(education_organization_schema_1.accountabilityRatingSchema).optional(),
61
+ // Metadata
62
+ createdAt: common_1.isoDateSchema,
63
+ updatedAt: common_1.isoDateSchema,
64
+ createdBy: zod_1.z.string(),
65
+ updatedBy: zod_1.z.string(),
66
+ version: zod_1.z.number().int().min(0),
67
+ });
68
+ //# sourceMappingURL=state-education-agency.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state-education-agency.schema.js","sourceRoot":"","sources":["../../../src/schemas/identity/state-education-agency.schema.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAEH,6BAAwB;AACxB,sCAA0C;AAC1C,2EAAgF;AAChF,mFAMyC;AAEzC,+CAA+C;AAC/C,oBAAoB;AACpB,+CAA+C;AAElC,QAAA,gCAAgC,GAAG,OAAC,CAAC,MAAM,CAAC;IACvD,oBAAoB;IACpB,sBAAsB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAY,0CAA0C;IACzG,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAmB,2BAA2B;IAC1F,sBAAsB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CA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CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,2BAA2B,EAAE,6DAAiC;IAE9D,kBAAkB;IAClB,UAAU,EAAE,OAAC,CAAC,KAAK,CAAC,0DAA0B,CAAC;IAC/C,SAAS,EAAE,OAAC,CAAC,KAAK,CAAC,yDAAyB,CAAC,CAAC,QAAQ,EAAE;IACxD,mBAAmB,EAAE,OAAC,CAAC,KAAK,CAAC,oEAAoC,CAAC,CAAC,QAAQ,EAAE;IAC7E,UAAU,EAAE,OAAC,CAAC,KAAK,CAAC,0DAA0B,CAAC,CAAC,QAAQ,EAAE;IAC1D,qBAAqB,EAAE,OAAC,CAAC,KAAK,CAAC,0DAA0B,CAAC,CAAC,QAAQ,EAAE;IAErE,WAAW;IACX,SAAS,EAAE,sBAAa;IACxB,SAAS,EAAE,sBAAa;IACxB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACjC,CAAC,CAAC"}
@@ -53,8 +53,8 @@ export declare const createUserSchema: z.ZodObject<{
53
53
  schoolId?: string | undefined;
54
54
  department?: string | undefined;
55
55
  middleName?: string | undefined;
56
- globalRole?: "TenantAdmin" | "TenantUser" | undefined;
57
56
  temporaryPassword?: string | undefined;
57
+ globalRole?: "TenantAdmin" | "TenantUser" | undefined;
58
58
  staffRole?: "teacher" | "principal" | "vice_principal" | "counselor" | "librarian" | "nurse" | "admin_staff" | "support_staff" | "it_staff" | "substitute" | "contractor" | undefined;
59
59
  }, {
60
60
  email: string;
@@ -64,8 +64,8 @@ export declare const createUserSchema: z.ZodObject<{
64
64
  schoolId?: string | undefined;
65
65
  department?: string | undefined;
66
66
  middleName?: string | undefined;
67
- globalRole?: "TenantAdmin" | "TenantUser" | undefined;
68
67
  temporaryPassword?: string | undefined;
68
+ globalRole?: "TenantAdmin" | "TenantUser" | undefined;
69
69
  staffRole?: "teacher" | "principal" | "vice_principal" | "counselor" | "librarian" | "nurse" | "admin_staff" | "support_staff" | "it_staff" | "substitute" | "contractor" | undefined;
70
70
  }>;
71
71
  export type CreateUserDto = z.infer<typeof createUserSchema>;
@@ -178,8 +178,8 @@ export declare const userResponseSchema: z.ZodObject<{
178
178
  userId: string;
179
179
  email: string;
180
180
  firstName: string;
181
- lastName: string;
182
181
  globalRole: "TenantAdmin" | "TenantUser";
182
+ lastName: string;
183
183
  phone?: string | undefined;
184
184
  address?: {
185
185
  street2?: string | undefined;
@@ -202,8 +202,8 @@ export declare const userResponseSchema: z.ZodObject<{
202
202
  userId: string;
203
203
  email: string;
204
204
  firstName: string;
205
- lastName: string;
206
205
  globalRole: "TenantAdmin" | "TenantUser";
206
+ lastName: string;
207
207
  phone?: string | undefined;
208
208
  address?: {
209
209
  street2?: string | undefined;
@@ -267,8 +267,8 @@ export declare const userListResponseSchema: z.ZodObject<{
267
267
  userId: string;
268
268
  email: string;
269
269
  firstName: string;
270
- lastName: string;
271
270
  globalRole: "TenantAdmin" | "TenantUser";
271
+ lastName: string;
272
272
  phone?: string | undefined;
273
273
  address?: {
274
274
  street2?: string | undefined;
@@ -291,8 +291,8 @@ export declare const userListResponseSchema: z.ZodObject<{
291
291
  userId: string;
292
292
  email: string;
293
293
  firstName: string;
294
- lastName: string;
295
294
  globalRole: "TenantAdmin" | "TenantUser";
295
+ lastName: string;
296
296
  phone?: string | undefined;
297
297
  address?: {
298
298
  street2?: string | undefined;
@@ -320,8 +320,8 @@ export declare const userListResponseSchema: z.ZodObject<{
320
320
  userId: string;
321
321
  email: string;
322
322
  firstName: string;
323
- lastName: string;
324
323
  globalRole: "TenantAdmin" | "TenantUser";
324
+ lastName: string;
325
325
  phone?: string | undefined;
326
326
  address?: {
327
327
  street2?: string | undefined;
@@ -349,8 +349,8 @@ export declare const userListResponseSchema: z.ZodObject<{
349
349
  userId: string;
350
350
  email: string;
351
351
  firstName: string;
352
- lastName: string;
353
352
  globalRole: "TenantAdmin" | "TenantUser";
353
+ lastName: string;
354
354
  phone?: string | undefined;
355
355
  address?: {
356
356
  street2?: string | undefined;
@@ -864,8 +864,8 @@ export declare const currentUserProfileSchema: z.ZodObject<{
864
864
  userId: string;
865
865
  email: string;
866
866
  firstName: string;
867
- lastName: string;
868
867
  globalRole: "TenantAdmin" | "TenantUser";
868
+ lastName: string;
869
869
  assignments: {
870
870
  schoolId: string;
871
871
  schoolName: string;
@@ -894,8 +894,8 @@ export declare const currentUserProfileSchema: z.ZodObject<{
894
894
  userId: string;
895
895
  email: string;
896
896
  firstName: string;
897
- lastName: string;
898
897
  globalRole: "TenantAdmin" | "TenantUser";
898
+ lastName: string;
899
899
  assignments: {
900
900
  schoolId: string;
901
901
  schoolName: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aibrains/shared-types",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Shared Zod schemas, TypeScript types, and validators for Education data models.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",