@eduware/oneroster 1.2.4 → 1.2.6

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 (224) hide show
  1. package/FUNCTIONS.md +232 -0
  2. package/README.md +493 -334
  3. package/bin/mcp-server.js +338 -1328
  4. package/bin/mcp-server.js.map +22 -21
  5. package/dist/commonjs/enums/index.d.ts +2 -0
  6. package/dist/commonjs/enums/index.d.ts.map +1 -0
  7. package/dist/commonjs/enums/index.js +18 -0
  8. package/dist/commonjs/enums/index.js.map +1 -0
  9. package/dist/commonjs/index.d.ts +4 -0
  10. package/dist/commonjs/index.d.ts.map +1 -1
  11. package/dist/commonjs/index.js +41 -1
  12. package/dist/commonjs/index.js.map +1 -1
  13. package/dist/commonjs/models/errors/index.d.ts +1 -0
  14. package/dist/commonjs/models/errors/index.d.ts.map +1 -1
  15. package/dist/commonjs/models/errors/index.js +1 -0
  16. package/dist/commonjs/models/errors/index.js.map +1 -1
  17. package/dist/commonjs/models/index.d.ts +2 -0
  18. package/dist/commonjs/models/index.d.ts.map +1 -0
  19. package/dist/commonjs/models/index.js +18 -0
  20. package/dist/commonjs/models/index.js.map +1 -0
  21. package/dist/commonjs/models/operations/createuser.d.ts +8 -270
  22. package/dist/commonjs/models/operations/createuser.d.ts.map +1 -1
  23. package/dist/commonjs/models/operations/createuser.js +17 -178
  24. package/dist/commonjs/models/operations/createuser.js.map +1 -1
  25. package/dist/commonjs/models/operations/getallstudents.d.ts +6 -206
  26. package/dist/commonjs/models/operations/getallstudents.d.ts.map +1 -1
  27. package/dist/commonjs/models/operations/getallstudents.js +12 -132
  28. package/dist/commonjs/models/operations/getallstudents.js.map +1 -1
  29. package/dist/commonjs/models/operations/getallteachers.d.ts +6 -206
  30. package/dist/commonjs/models/operations/getallteachers.d.ts.map +1 -1
  31. package/dist/commonjs/models/operations/getallteachers.js +12 -132
  32. package/dist/commonjs/models/operations/getallteachers.js.map +1 -1
  33. package/dist/commonjs/models/operations/getallusers.d.ts +6 -206
  34. package/dist/commonjs/models/operations/getallusers.d.ts.map +1 -1
  35. package/dist/commonjs/models/operations/getallusers.js +12 -132
  36. package/dist/commonjs/models/operations/getallusers.js.map +1 -1
  37. package/dist/commonjs/models/operations/getclassesforuser.d.ts +4 -85
  38. package/dist/commonjs/models/operations/getclassesforuser.d.ts.map +1 -1
  39. package/dist/commonjs/models/operations/getclassesforuser.js +8 -67
  40. package/dist/commonjs/models/operations/getclassesforuser.js.map +1 -1
  41. package/dist/commonjs/models/operations/getresourcesforuser.d.ts +5 -111
  42. package/dist/commonjs/models/operations/getresourcesforuser.d.ts.map +1 -1
  43. package/dist/commonjs/models/operations/getresourcesforuser.js +10 -88
  44. package/dist/commonjs/models/operations/getresourcesforuser.js.map +1 -1
  45. package/dist/commonjs/models/operations/getstudent.d.ts +5 -174
  46. package/dist/commonjs/models/operations/getstudent.d.ts.map +1 -1
  47. package/dist/commonjs/models/operations/getstudent.js +10 -108
  48. package/dist/commonjs/models/operations/getstudent.js.map +1 -1
  49. package/dist/commonjs/models/operations/getstudentsforclass.d.ts +6 -206
  50. package/dist/commonjs/models/operations/getstudentsforclass.d.ts.map +1 -1
  51. package/dist/commonjs/models/operations/getstudentsforclass.js +12 -132
  52. package/dist/commonjs/models/operations/getstudentsforclass.js.map +1 -1
  53. package/dist/commonjs/models/operations/getstudentsforclassinschool.d.ts +6 -206
  54. package/dist/commonjs/models/operations/getstudentsforclassinschool.d.ts.map +1 -1
  55. package/dist/commonjs/models/operations/getstudentsforclassinschool.js +12 -132
  56. package/dist/commonjs/models/operations/getstudentsforclassinschool.js.map +1 -1
  57. package/dist/commonjs/models/operations/getstudentsforschool.d.ts +6 -206
  58. package/dist/commonjs/models/operations/getstudentsforschool.d.ts.map +1 -1
  59. package/dist/commonjs/models/operations/getstudentsforschool.js +12 -132
  60. package/dist/commonjs/models/operations/getstudentsforschool.js.map +1 -1
  61. package/dist/commonjs/models/operations/getteacher.d.ts +5 -174
  62. package/dist/commonjs/models/operations/getteacher.d.ts.map +1 -1
  63. package/dist/commonjs/models/operations/getteacher.js +10 -108
  64. package/dist/commonjs/models/operations/getteacher.js.map +1 -1
  65. package/dist/commonjs/models/operations/getteachersforclass.d.ts +6 -206
  66. package/dist/commonjs/models/operations/getteachersforclass.d.ts.map +1 -1
  67. package/dist/commonjs/models/operations/getteachersforclass.js +12 -132
  68. package/dist/commonjs/models/operations/getteachersforclass.js.map +1 -1
  69. package/dist/commonjs/models/operations/getteachersforclassinschool.d.ts +6 -206
  70. package/dist/commonjs/models/operations/getteachersforclassinschool.d.ts.map +1 -1
  71. package/dist/commonjs/models/operations/getteachersforclassinschool.js +12 -132
  72. package/dist/commonjs/models/operations/getteachersforclassinschool.js.map +1 -1
  73. package/dist/commonjs/models/operations/getteachersforschool.d.ts +6 -206
  74. package/dist/commonjs/models/operations/getteachersforschool.d.ts.map +1 -1
  75. package/dist/commonjs/models/operations/getteachersforschool.js +12 -132
  76. package/dist/commonjs/models/operations/getteachersforschool.js.map +1 -1
  77. package/dist/commonjs/models/operations/getuser.d.ts +5 -174
  78. package/dist/commonjs/models/operations/getuser.d.ts.map +1 -1
  79. package/dist/commonjs/models/operations/getuser.js +10 -108
  80. package/dist/commonjs/models/operations/getuser.js.map +1 -1
  81. package/dist/commonjs/models/operations/getuserwithdemographics.d.ts +5 -174
  82. package/dist/commonjs/models/operations/getuserwithdemographics.d.ts.map +1 -1
  83. package/dist/commonjs/models/operations/getuserwithdemographics.js +10 -108
  84. package/dist/commonjs/models/operations/getuserwithdemographics.js.map +1 -1
  85. package/dist/commonjs/models/operations/updateuser.d.ts +8 -270
  86. package/dist/commonjs/models/operations/updateuser.d.ts.map +1 -1
  87. package/dist/commonjs/models/operations/updateuser.js +17 -178
  88. package/dist/commonjs/models/operations/updateuser.js.map +1 -1
  89. package/dist/commonjs/models/shared/enums.d.ts +440 -0
  90. package/dist/commonjs/models/shared/enums.d.ts.map +1 -0
  91. package/dist/commonjs/models/shared/enums.js +499 -0
  92. package/dist/commonjs/models/shared/enums.js.map +1 -0
  93. package/dist/commonjs/models/shared/index.d.ts +8 -0
  94. package/dist/commonjs/models/shared/index.d.ts.map +1 -0
  95. package/dist/commonjs/models/shared/index.js +24 -0
  96. package/dist/commonjs/models/shared/index.js.map +1 -0
  97. package/dist/commonjs/types/index.d.ts +1 -0
  98. package/dist/commonjs/types/index.d.ts.map +1 -1
  99. package/dist/commonjs/types/index.js +16 -0
  100. package/dist/commonjs/types/index.js.map +1 -1
  101. package/dist/esm/enums/index.d.ts +2 -0
  102. package/dist/esm/enums/index.d.ts.map +1 -0
  103. package/dist/esm/enums/index.js +2 -0
  104. package/dist/esm/enums/index.js.map +1 -0
  105. package/dist/esm/index.d.ts +4 -0
  106. package/dist/esm/index.d.ts.map +1 -1
  107. package/dist/esm/index.js +14 -0
  108. package/dist/esm/index.js.map +1 -1
  109. package/dist/esm/models/errors/index.d.ts +1 -0
  110. package/dist/esm/models/errors/index.d.ts.map +1 -1
  111. package/dist/esm/models/errors/index.js +1 -0
  112. package/dist/esm/models/errors/index.js.map +1 -1
  113. package/dist/esm/models/index.d.ts +2 -0
  114. package/dist/esm/models/index.d.ts.map +1 -0
  115. package/dist/esm/models/index.js +2 -0
  116. package/dist/esm/models/index.js.map +1 -0
  117. package/dist/esm/models/operations/createuser.d.ts +8 -270
  118. package/dist/esm/models/operations/createuser.d.ts.map +1 -1
  119. package/dist/esm/models/operations/createuser.js +15 -176
  120. package/dist/esm/models/operations/createuser.js.map +1 -1
  121. package/dist/esm/models/operations/getallstudents.d.ts +6 -206
  122. package/dist/esm/models/operations/getallstudents.d.ts.map +1 -1
  123. package/dist/esm/models/operations/getallstudents.js +11 -131
  124. package/dist/esm/models/operations/getallstudents.js.map +1 -1
  125. package/dist/esm/models/operations/getallteachers.d.ts +6 -206
  126. package/dist/esm/models/operations/getallteachers.d.ts.map +1 -1
  127. package/dist/esm/models/operations/getallteachers.js +11 -131
  128. package/dist/esm/models/operations/getallteachers.js.map +1 -1
  129. package/dist/esm/models/operations/getallusers.d.ts +6 -206
  130. package/dist/esm/models/operations/getallusers.d.ts.map +1 -1
  131. package/dist/esm/models/operations/getallusers.js +11 -131
  132. package/dist/esm/models/operations/getallusers.js.map +1 -1
  133. package/dist/esm/models/operations/getclassesforuser.d.ts +4 -85
  134. package/dist/esm/models/operations/getclassesforuser.d.ts.map +1 -1
  135. package/dist/esm/models/operations/getclassesforuser.js +7 -66
  136. package/dist/esm/models/operations/getclassesforuser.js.map +1 -1
  137. package/dist/esm/models/operations/getresourcesforuser.d.ts +5 -111
  138. package/dist/esm/models/operations/getresourcesforuser.d.ts.map +1 -1
  139. package/dist/esm/models/operations/getresourcesforuser.js +9 -87
  140. package/dist/esm/models/operations/getresourcesforuser.js.map +1 -1
  141. package/dist/esm/models/operations/getstudent.d.ts +5 -174
  142. package/dist/esm/models/operations/getstudent.d.ts.map +1 -1
  143. package/dist/esm/models/operations/getstudent.js +9 -107
  144. package/dist/esm/models/operations/getstudent.js.map +1 -1
  145. package/dist/esm/models/operations/getstudentsforclass.d.ts +6 -206
  146. package/dist/esm/models/operations/getstudentsforclass.d.ts.map +1 -1
  147. package/dist/esm/models/operations/getstudentsforclass.js +11 -131
  148. package/dist/esm/models/operations/getstudentsforclass.js.map +1 -1
  149. package/dist/esm/models/operations/getstudentsforclassinschool.d.ts +6 -206
  150. package/dist/esm/models/operations/getstudentsforclassinschool.d.ts.map +1 -1
  151. package/dist/esm/models/operations/getstudentsforclassinschool.js +11 -131
  152. package/dist/esm/models/operations/getstudentsforclassinschool.js.map +1 -1
  153. package/dist/esm/models/operations/getstudentsforschool.d.ts +6 -206
  154. package/dist/esm/models/operations/getstudentsforschool.d.ts.map +1 -1
  155. package/dist/esm/models/operations/getstudentsforschool.js +11 -131
  156. package/dist/esm/models/operations/getstudentsforschool.js.map +1 -1
  157. package/dist/esm/models/operations/getteacher.d.ts +5 -174
  158. package/dist/esm/models/operations/getteacher.d.ts.map +1 -1
  159. package/dist/esm/models/operations/getteacher.js +9 -107
  160. package/dist/esm/models/operations/getteacher.js.map +1 -1
  161. package/dist/esm/models/operations/getteachersforclass.d.ts +6 -206
  162. package/dist/esm/models/operations/getteachersforclass.d.ts.map +1 -1
  163. package/dist/esm/models/operations/getteachersforclass.js +11 -131
  164. package/dist/esm/models/operations/getteachersforclass.js.map +1 -1
  165. package/dist/esm/models/operations/getteachersforclassinschool.d.ts +6 -206
  166. package/dist/esm/models/operations/getteachersforclassinschool.d.ts.map +1 -1
  167. package/dist/esm/models/operations/getteachersforclassinschool.js +11 -131
  168. package/dist/esm/models/operations/getteachersforclassinschool.js.map +1 -1
  169. package/dist/esm/models/operations/getteachersforschool.d.ts +6 -206
  170. package/dist/esm/models/operations/getteachersforschool.d.ts.map +1 -1
  171. package/dist/esm/models/operations/getteachersforschool.js +11 -131
  172. package/dist/esm/models/operations/getteachersforschool.js.map +1 -1
  173. package/dist/esm/models/operations/getuser.d.ts +5 -174
  174. package/dist/esm/models/operations/getuser.d.ts.map +1 -1
  175. package/dist/esm/models/operations/getuser.js +9 -107
  176. package/dist/esm/models/operations/getuser.js.map +1 -1
  177. package/dist/esm/models/operations/getuserwithdemographics.d.ts +5 -174
  178. package/dist/esm/models/operations/getuserwithdemographics.d.ts.map +1 -1
  179. package/dist/esm/models/operations/getuserwithdemographics.js +9 -107
  180. package/dist/esm/models/operations/getuserwithdemographics.js.map +1 -1
  181. package/dist/esm/models/operations/updateuser.d.ts +8 -270
  182. package/dist/esm/models/operations/updateuser.d.ts.map +1 -1
  183. package/dist/esm/models/operations/updateuser.js +15 -176
  184. package/dist/esm/models/operations/updateuser.js.map +1 -1
  185. package/dist/esm/models/shared/enums.d.ts +440 -0
  186. package/dist/esm/models/shared/enums.d.ts.map +1 -0
  187. package/dist/esm/models/shared/enums.js +462 -0
  188. package/dist/esm/models/shared/enums.js.map +1 -0
  189. package/dist/esm/models/shared/index.d.ts +8 -0
  190. package/dist/esm/models/shared/index.d.ts.map +1 -0
  191. package/dist/esm/models/shared/index.js +8 -0
  192. package/dist/esm/models/shared/index.js.map +1 -0
  193. package/dist/esm/types/index.d.ts +1 -0
  194. package/dist/esm/types/index.d.ts.map +1 -1
  195. package/dist/esm/types/index.js +2 -0
  196. package/dist/esm/types/index.js.map +1 -1
  197. package/package.json +37 -64
  198. package/src/enums/index.ts +1 -0
  199. package/src/index.ts +44 -0
  200. package/src/models/errors/index.ts +1 -0
  201. package/src/models/index.ts +1 -0
  202. package/src/models/operations/createuser.ts +35 -238
  203. package/src/models/operations/getallstudents.ts +32 -170
  204. package/src/models/operations/getallteachers.ts +32 -170
  205. package/src/models/operations/getallusers.ts +32 -170
  206. package/src/models/operations/getclassesforuser.ts +20 -97
  207. package/src/models/operations/getresourcesforuser.ts +26 -127
  208. package/src/models/operations/getstudent.ts +26 -136
  209. package/src/models/operations/getstudentsforclass.ts +32 -180
  210. package/src/models/operations/getstudentsforclassinschool.ts +32 -188
  211. package/src/models/operations/getstudentsforschool.ts +32 -180
  212. package/src/models/operations/getteacher.ts +26 -136
  213. package/src/models/operations/getteachersforclass.ts +32 -180
  214. package/src/models/operations/getteachersforclassinschool.ts +32 -188
  215. package/src/models/operations/getteachersforschool.ts +32 -180
  216. package/src/models/operations/getuser.ts +26 -136
  217. package/src/models/operations/getuserwithdemographics.ts +26 -144
  218. package/src/models/operations/updateuser.ts +35 -238
  219. package/src/models/shared/enums.ts +567 -0
  220. package/src/models/shared/index.ts +8 -0
  221. package/src/types/index.ts +3 -0
  222. package/test/classlink.test.ts +26 -26
  223. package/vitest.config.ts +2 -2
  224. package/test/summary-reporter.ts +0 -114
@@ -0,0 +1,567 @@
1
+ /**
2
+ * OneRoster Specification Enums
3
+ *
4
+ * This file contains all enumerated vocabulary terms defined in the
5
+ * 1EdTech OneRoster v1.2 specification. These enums are shared across
6
+ * all operations to ensure consistency and reduce code duplication.
7
+ *
8
+ * @see https://www.imsglobal.org/oneroster-v12-final-specification
9
+ */
10
+
11
+ import * as z from 'zod';
12
+
13
+ import { ClosedEnum } from '../../types/enums.js';
14
+
15
+ // =============================================================================
16
+ // Table 6.3.2 - BaseStatusEnum
17
+ // =============================================================================
18
+
19
+ /**
20
+ * Status of a OneRoster record.
21
+ *
22
+ * @remarks
23
+ * - `active` - An active record
24
+ * - `tobedeleted` - Denotes that it is safe to delete the record
25
+ */
26
+ export const Status = {
27
+ /** An active record */
28
+ Active: 'active',
29
+ /** Denotes that it is safe to delete the record */
30
+ ToBeDeleted: 'tobedeleted',
31
+ } as const;
32
+ export type Status = ClosedEnum<typeof Status>;
33
+
34
+ /** @internal */
35
+ export const Status$inboundSchema: z.ZodNativeEnum<typeof Status> = z.nativeEnum(Status);
36
+ /** @internal */
37
+ export const Status$outboundSchema: z.ZodNativeEnum<typeof Status> = Status$inboundSchema;
38
+
39
+ // =============================================================================
40
+ // Table 6.3.11 - RoleTypeEnum
41
+ // =============================================================================
42
+
43
+ /**
44
+ * Type of role assignment (primary or secondary).
45
+ *
46
+ * @remarks
47
+ * - `primary` - Denotes that this is the primary role within the associated org.
48
+ * Only one role can be primary for each org.
49
+ * - `secondary` - Denotes this is a secondary role within the associated org
50
+ * i.e. some other role is the primary.
51
+ */
52
+ export const RoleType = {
53
+ /** Denotes that this is the primary role within the associated org */
54
+ Primary: 'primary',
55
+ /** Denotes this is a secondary role within the associated org */
56
+ Secondary: 'secondary',
57
+ } as const;
58
+ export type RoleType = ClosedEnum<typeof RoleType>;
59
+
60
+ /** @internal */
61
+ export const RoleType$inboundSchema: z.ZodNativeEnum<typeof RoleType> = z.nativeEnum(RoleType);
62
+ /** @internal */
63
+ export const RoleType$outboundSchema: z.ZodNativeEnum<typeof RoleType> = RoleType$inboundSchema;
64
+
65
+ // =============================================================================
66
+ // Table 6.3.12 - RoleEnum (User Roles)
67
+ // =============================================================================
68
+
69
+ /**
70
+ * User role types in OneRoster.
71
+ *
72
+ * @remarks
73
+ * Defines all possible roles a user can have within an organization.
74
+ */
75
+ export const UserRole = {
76
+ /** Someone who has administrative responsibility */
77
+ Administrator: 'administrator',
78
+ /** A classroom aide */
79
+ Aide: 'aide',
80
+ /** A school counselor */
81
+ Counselor: 'counselor',
82
+ /** A district-level administrator */
83
+ DistrictAdministrator: 'districtAdministrator',
84
+ /** A guardian of a student */
85
+ Guardian: 'guardian',
86
+ /** A parent of a student */
87
+ Parent: 'parent',
88
+ /** A school principal */
89
+ Principal: 'principal',
90
+ /** An exam proctor */
91
+ Proctor: 'proctor',
92
+ /** A relative of a student */
93
+ Relative: 'relative',
94
+ /** A site-level administrator */
95
+ SiteAdministrator: 'siteAdministrator',
96
+ /** A student at an organization */
97
+ Student: 'student',
98
+ /** A system-level administrator */
99
+ SystemAdministrator: 'systemAdministrator',
100
+ /** A teacher at an organization */
101
+ Teacher: 'teacher',
102
+ } as const;
103
+ export type UserRole = ClosedEnum<typeof UserRole>;
104
+
105
+ /** @internal */
106
+ export const UserRole$inboundSchema: z.ZodNativeEnum<typeof UserRole> = z.nativeEnum(UserRole);
107
+ /** @internal */
108
+ export const UserRole$outboundSchema: z.ZodNativeEnum<typeof UserRole> = UserRole$inboundSchema;
109
+
110
+ // =============================================================================
111
+ // Table 6.3.6 - EnrolRoleEnum (Enrollment Roles)
112
+ // =============================================================================
113
+
114
+ /**
115
+ * Enrollment role types.
116
+ *
117
+ * @remarks
118
+ * Defines the roles that can be assigned in an enrollment record.
119
+ * This is a subset of UserRole used specifically for class enrollments.
120
+ */
121
+ export const EnrollmentRole = {
122
+ /** Someone who has administrative responsibility for the Class */
123
+ Administrator: 'administrator',
124
+ /** Exam proctor */
125
+ Proctor: 'proctor',
126
+ /** A student at an organization e.g. School */
127
+ Student: 'student',
128
+ /** A Teacher at an organization e.g. School */
129
+ Teacher: 'teacher',
130
+ } as const;
131
+ export type EnrollmentRole = ClosedEnum<typeof EnrollmentRole>;
132
+
133
+ /** @internal */
134
+ export const EnrollmentRole$inboundSchema: z.ZodNativeEnum<typeof EnrollmentRole> =
135
+ z.nativeEnum(EnrollmentRole);
136
+ /** @internal */
137
+ export const EnrollmentRole$outboundSchema: z.ZodNativeEnum<typeof EnrollmentRole> =
138
+ EnrollmentRole$inboundSchema;
139
+
140
+ // =============================================================================
141
+ // Table 6.3.13 - SessionTypeEnum
142
+ // =============================================================================
143
+
144
+ /**
145
+ * Academic session types.
146
+ *
147
+ * @remarks
148
+ * Defines the types of academic sessions/periods.
149
+ */
150
+ export const SessionType = {
151
+ /** Denotes a period over which some grade/result is to be awarded */
152
+ GradingPeriod: 'gradingPeriod',
153
+ /** Denotes the school year */
154
+ SchoolYear: 'schoolYear',
155
+ /** Denotes a semester period. Typically there are two semesters per schoolYear */
156
+ Semester: 'semester',
157
+ /** Denotes a term period. Typically there are three terms per schoolYear */
158
+ Term: 'term',
159
+ } as const;
160
+ export type SessionType = ClosedEnum<typeof SessionType>;
161
+
162
+ /** @internal */
163
+ export const SessionType$inboundSchema: z.ZodNativeEnum<typeof SessionType> =
164
+ z.nativeEnum(SessionType);
165
+ /** @internal */
166
+ export const SessionType$outboundSchema: z.ZodNativeEnum<typeof SessionType> =
167
+ SessionType$inboundSchema;
168
+
169
+ // =============================================================================
170
+ // Table 6.3.4 - ClassTypeEnum
171
+ // =============================================================================
172
+
173
+ /**
174
+ * Class types.
175
+ *
176
+ * @remarks
177
+ * Defines the types of classes.
178
+ */
179
+ export const ClassType = {
180
+ /** The homeroom (form) assigned to the class */
181
+ Homeroom: 'homeroom',
182
+ /** The class as assigned in the timetable */
183
+ Scheduled: 'scheduled',
184
+ } as const;
185
+ export type ClassType = ClosedEnum<typeof ClassType>;
186
+
187
+ /** @internal */
188
+ export const ClassType$inboundSchema: z.ZodNativeEnum<typeof ClassType> = z.nativeEnum(ClassType);
189
+ /** @internal */
190
+ export const ClassType$outboundSchema: z.ZodNativeEnum<typeof ClassType> = ClassType$inboundSchema;
191
+
192
+ // =============================================================================
193
+ // Table 6.3.9 - OrgTypeEnum
194
+ // =============================================================================
195
+
196
+ /**
197
+ * Organization types.
198
+ *
199
+ * @remarks
200
+ * Defines the types of organizations in the education hierarchy.
201
+ */
202
+ export const OrgType = {
203
+ /** Denotes a department. A department may be a subset in a school or a set of schools */
204
+ Department: 'department',
205
+ /** Denotes a school district */
206
+ District: 'district',
207
+ /** Denotes a local organization. V1.0 instances used this value to identify districts */
208
+ Local: 'local',
209
+ /** Denotes a national level organization */
210
+ National: 'national',
211
+ /** Denotes a school. This is the unit of assignment for classes and enrollments */
212
+ School: 'school',
213
+ /** Denotes a state level organization */
214
+ State: 'state',
215
+ } as const;
216
+ export type OrgType = ClosedEnum<typeof OrgType>;
217
+
218
+ /** @internal */
219
+ export const OrgType$inboundSchema: z.ZodNativeEnum<typeof OrgType> = z.nativeEnum(OrgType);
220
+ /** @internal */
221
+ export const OrgType$outboundSchema: z.ZodNativeEnum<typeof OrgType> = OrgType$inboundSchema;
222
+
223
+ // =============================================================================
224
+ // Table 6.3.7 - GenderEnum
225
+ // =============================================================================
226
+
227
+ /**
228
+ * Gender values.
229
+ *
230
+ * @remarks
231
+ * Defines the gender values for demographics.
232
+ */
233
+ export const Gender = {
234
+ /** Gender of Female */
235
+ Female: 'female',
236
+ /** Gender of Male */
237
+ Male: 'male',
238
+ /** A gender that is known but which is not either Male or Female. Value added in OR 1.2 */
239
+ Other: 'other',
240
+ /** Unspecified as no data entry for this field has been made. Value added in OR 1.2 */
241
+ Unspecified: 'unspecified',
242
+ } as const;
243
+ export type Gender = ClosedEnum<typeof Gender>;
244
+
245
+ /** @internal */
246
+ export const Gender$inboundSchema: z.ZodNativeEnum<typeof Gender> = z.nativeEnum(Gender);
247
+ /** @internal */
248
+ export const Gender$outboundSchema: z.ZodNativeEnum<typeof Gender> = Gender$inboundSchema;
249
+
250
+ // =============================================================================
251
+ // Table 6.3.14 - TrueFalseEnum
252
+ // =============================================================================
253
+
254
+ /**
255
+ * Boolean string values.
256
+ *
257
+ * @remarks
258
+ * OneRoster uses string representations of boolean values.
259
+ */
260
+ export const TrueFalse = {
261
+ /** Requires the boolean value to be given as 'false' */
262
+ False: 'false',
263
+ /** Requires the boolean value to be given as 'true' */
264
+ True: 'true',
265
+ } as const;
266
+ export type TrueFalse = ClosedEnum<typeof TrueFalse>;
267
+
268
+ /** @internal */
269
+ export const TrueFalse$inboundSchema: z.ZodNativeEnum<typeof TrueFalse> = z.nativeEnum(TrueFalse);
270
+ /** @internal */
271
+ export const TrueFalse$outboundSchema: z.ZodNativeEnum<typeof TrueFalse> = TrueFalse$inboundSchema;
272
+
273
+ // =============================================================================
274
+ // Sort Order Enum (Common across all list operations)
275
+ // =============================================================================
276
+
277
+ /**
278
+ * Sort order for list operations.
279
+ *
280
+ * @remarks
281
+ * Defines the order direction for sorting results.
282
+ */
283
+ export const OrderBy = {
284
+ /** Ascending order */
285
+ Asc: 'asc',
286
+ /** Descending order */
287
+ Desc: 'desc',
288
+ } as const;
289
+ export type OrderBy = ClosedEnum<typeof OrderBy>;
290
+
291
+ /** @internal */
292
+ export const OrderBy$inboundSchema: z.ZodNativeEnum<typeof OrderBy> = z.nativeEnum(OrderBy);
293
+ /** @internal */
294
+ export const OrderBy$outboundSchema: z.ZodNativeEnum<typeof OrderBy> = OrderBy$inboundSchema;
295
+
296
+ // =============================================================================
297
+ // GUID Reference Type Enums
298
+ // =============================================================================
299
+
300
+ /**
301
+ * Table 6.3.1 - AcadSessionGUIDRefTypeEnum
302
+ */
303
+ export const AcademicSessionRefType = {
304
+ /** An object that is an 'Academic Session' */
305
+ AcademicSession: 'academicSession',
306
+ } as const;
307
+ export type AcademicSessionRefType = ClosedEnum<typeof AcademicSessionRefType>;
308
+
309
+ /** @internal */
310
+ export const AcademicSessionRefType$inboundSchema: z.ZodNativeEnum<typeof AcademicSessionRefType> =
311
+ z.nativeEnum(AcademicSessionRefType);
312
+ /** @internal */
313
+ export const AcademicSessionRefType$outboundSchema: z.ZodNativeEnum<typeof AcademicSessionRefType> =
314
+ AcademicSessionRefType$inboundSchema;
315
+
316
+ /**
317
+ * Table 6.3.3 - ClassGUIDRefTypeEnum
318
+ */
319
+ export const ClassRefType = {
320
+ /** An object that is a 'Class' */
321
+ Class: 'class',
322
+ } as const;
323
+ export type ClassRefType = ClosedEnum<typeof ClassRefType>;
324
+
325
+ /** @internal */
326
+ export const ClassRefType$inboundSchema: z.ZodNativeEnum<typeof ClassRefType> =
327
+ z.nativeEnum(ClassRefType);
328
+ /** @internal */
329
+ export const ClassRefType$outboundSchema: z.ZodNativeEnum<typeof ClassRefType> =
330
+ ClassRefType$inboundSchema;
331
+
332
+ /**
333
+ * Table 6.3.5 - CourseGUIDRefTypeEnum
334
+ */
335
+ export const CourseRefType = {
336
+ /** An object that is a 'Course' */
337
+ Course: 'course',
338
+ } as const;
339
+ export type CourseRefType = ClosedEnum<typeof CourseRefType>;
340
+
341
+ /** @internal */
342
+ export const CourseRefType$inboundSchema: z.ZodNativeEnum<typeof CourseRefType> =
343
+ z.nativeEnum(CourseRefType);
344
+ /** @internal */
345
+ export const CourseRefType$outboundSchema: z.ZodNativeEnum<typeof CourseRefType> =
346
+ CourseRefType$inboundSchema;
347
+
348
+ /**
349
+ * Table 6.3.8 - OrgGUIDRefTypeEnum
350
+ */
351
+ export const OrgRefType = {
352
+ /** An object that is an 'Org' */
353
+ Org: 'org',
354
+ } as const;
355
+ export type OrgRefType = ClosedEnum<typeof OrgRefType>;
356
+
357
+ /** @internal */
358
+ export const OrgRefType$inboundSchema: z.ZodNativeEnum<typeof OrgRefType> =
359
+ z.nativeEnum(OrgRefType);
360
+ /** @internal */
361
+ export const OrgRefType$outboundSchema: z.ZodNativeEnum<typeof OrgRefType> =
362
+ OrgRefType$inboundSchema;
363
+
364
+ /**
365
+ * Table 6.3.10 - ResourceGUIDRefTypeEnum
366
+ */
367
+ export const ResourceRefType = {
368
+ /** An object that is a 'Resource' */
369
+ Resource: 'resource',
370
+ } as const;
371
+ export type ResourceRefType = ClosedEnum<typeof ResourceRefType>;
372
+
373
+ /** @internal */
374
+ export const ResourceRefType$inboundSchema: z.ZodNativeEnum<typeof ResourceRefType> =
375
+ z.nativeEnum(ResourceRefType);
376
+ /** @internal */
377
+ export const ResourceRefType$outboundSchema: z.ZodNativeEnum<typeof ResourceRefType> =
378
+ ResourceRefType$inboundSchema;
379
+
380
+ /**
381
+ * Table 6.3.15 - UserGUIDRefTypeEnum
382
+ */
383
+ export const UserRefType = {
384
+ /** An object that is a 'User' */
385
+ User: 'user',
386
+ } as const;
387
+ export type UserRefType = ClosedEnum<typeof UserRefType>;
388
+
389
+ /** @internal */
390
+ export const UserRefType$inboundSchema: z.ZodNativeEnum<typeof UserRefType> =
391
+ z.nativeEnum(UserRefType);
392
+ /** @internal */
393
+ export const UserRefType$outboundSchema: z.ZodNativeEnum<typeof UserRefType> =
394
+ UserRefType$inboundSchema;
395
+
396
+ // =============================================================================
397
+ // Entity Type Enum (for GUID references across all entity types)
398
+ // =============================================================================
399
+
400
+ /**
401
+ * All OneRoster entity types.
402
+ *
403
+ * @remarks
404
+ * Used for GUID references that can point to any entity type.
405
+ */
406
+ export const EntityType = {
407
+ AcademicSession: 'academicSession',
408
+ AssessmentLineItem: 'assessmentLineItem',
409
+ AssessmentResult: 'assessmentResult',
410
+ Category: 'category',
411
+ Class: 'class',
412
+ ComponentResource: 'componentResource',
413
+ Course: 'course',
414
+ CourseComponent: 'courseComponent',
415
+ Demographics: 'demographics',
416
+ Enrollment: 'enrollment',
417
+ GradingPeriod: 'gradingPeriod',
418
+ LineItem: 'lineItem',
419
+ Org: 'org',
420
+ Resource: 'resource',
421
+ Result: 'result',
422
+ ScoreScale: 'scoreScale',
423
+ Student: 'student',
424
+ Teacher: 'teacher',
425
+ Term: 'term',
426
+ User: 'user',
427
+ } as const;
428
+ export type EntityType = ClosedEnum<typeof EntityType>;
429
+
430
+ /** @internal */
431
+ export const EntityType$inboundSchema: z.ZodNativeEnum<typeof EntityType> =
432
+ z.nativeEnum(EntityType);
433
+ /** @internal */
434
+ export const EntityType$outboundSchema: z.ZodNativeEnum<typeof EntityType> =
435
+ EntityType$inboundSchema;
436
+
437
+ // =============================================================================
438
+ // Score Status Enum (for Results)
439
+ // =============================================================================
440
+
441
+ /**
442
+ * Score status for result records.
443
+ *
444
+ * @remarks
445
+ * Indicates the status of a score/grade.
446
+ */
447
+ export const ScoreStatus = {
448
+ /** The score is exempt */
449
+ Exempt: 'exempt',
450
+ /** The score is fully graded */
451
+ FullyGraded: 'fully graded',
452
+ /** The score is not submitted */
453
+ NotSubmitted: 'not submitted',
454
+ /** The score is partially graded */
455
+ PartiallyGraded: 'partially graded',
456
+ /** The score is submitted */
457
+ Submitted: 'submitted',
458
+ } as const;
459
+ export type ScoreStatus = ClosedEnum<typeof ScoreStatus>;
460
+
461
+ /** @internal */
462
+ export const ScoreStatus$inboundSchema: z.ZodNativeEnum<typeof ScoreStatus> =
463
+ z.nativeEnum(ScoreStatus);
464
+ /** @internal */
465
+ export const ScoreStatus$outboundSchema: z.ZodNativeEnum<typeof ScoreStatus> =
466
+ ScoreStatus$inboundSchema;
467
+
468
+ // =============================================================================
469
+ // IMS Global Error Response Enums
470
+ // =============================================================================
471
+
472
+ /**
473
+ * Table 6.3.16 - imsx_CodeMajorEnum
474
+ *
475
+ * @remarks
476
+ * Major status codes for API responses.
477
+ */
478
+ export const CodeMajor = {
479
+ /** Denotes that the transaction request has failed */
480
+ Failure: 'failure',
481
+ /** Denotes that the request is being processed at the destination */
482
+ Processing: 'processing',
483
+ /** Denotes that the request has been successfully completed */
484
+ Success: 'success',
485
+ /** Denotes that the service provider does not support the requested operation */
486
+ Unsupported: 'unsupported',
487
+ } as const;
488
+ export type CodeMajor = ClosedEnum<typeof CodeMajor>;
489
+
490
+ /** @internal */
491
+ export const CodeMajor$inboundSchema: z.ZodNativeEnum<typeof CodeMajor> = z.nativeEnum(CodeMajor);
492
+ /** @internal */
493
+ export const CodeMajor$outboundSchema: z.ZodNativeEnum<typeof CodeMajor> = CodeMajor$inboundSchema;
494
+
495
+ /**
496
+ * Table 6.3.17 - imsx_CodeMinorValueEnum
497
+ *
498
+ * @remarks
499
+ * Minor status codes providing detailed error information.
500
+ */
501
+ export const CodeMinor = {
502
+ /** Server refuses to take action (HTTP 403) */
503
+ Forbidden: 'forbidden',
504
+ /** Request fully and successfully implemented (HTTP 200/201/204) */
505
+ FullSuccess: 'fullsuccess',
506
+ /** Catastrophic error (HTTP 500) */
507
+ InternalServerError: 'internal_server_error',
508
+ /** Invalid filter field supplied (HTTP 400) */
509
+ InvalidFilterField: 'invalid_filter_field',
510
+ /** Invalid selection field supplied (HTTP 400) */
511
+ InvalidSelectionField: 'invalid_selection_field',
512
+ /** Semantically erroneous JSON (HTTP 422) */
513
+ InvalidData: 'invaliddata',
514
+ /** Server receiving too many requests (HTTP 429) */
515
+ ServerBusy: 'server_busy',
516
+ /** Request not correctly authorised (HTTP 401) */
517
+ UnauthorisedRequest: 'unauthorisedrequest',
518
+ /** Supplied identifier is unknown (HTTP 404) */
519
+ UnknownObject: 'unknownobject',
520
+ } as const;
521
+ export type CodeMinor = ClosedEnum<typeof CodeMinor>;
522
+
523
+ /** @internal */
524
+ export const CodeMinor$inboundSchema: z.ZodNativeEnum<typeof CodeMinor> = z.nativeEnum(CodeMinor);
525
+ /** @internal */
526
+ export const CodeMinor$outboundSchema: z.ZodNativeEnum<typeof CodeMinor> = CodeMinor$inboundSchema;
527
+
528
+ /**
529
+ * Table 6.3.18 - imsx_SeverityEnum
530
+ *
531
+ * @remarks
532
+ * Severity level of the response status.
533
+ */
534
+ export const Severity = {
535
+ /** A significant error has occurred */
536
+ Error: 'error',
537
+ /** The request has been completed and a response was received */
538
+ Status: 'status',
539
+ /** The request has only been partially completed */
540
+ Warning: 'warning',
541
+ } as const;
542
+ export type Severity = ClosedEnum<typeof Severity>;
543
+
544
+ /** @internal */
545
+ export const Severity$inboundSchema: z.ZodNativeEnum<typeof Severity> = z.nativeEnum(Severity);
546
+ /** @internal */
547
+ export const Severity$outboundSchema: z.ZodNativeEnum<typeof Severity> = Severity$inboundSchema;
548
+
549
+ // =============================================================================
550
+ // Importance Enum (for Resources)
551
+ // =============================================================================
552
+
553
+ /**
554
+ * Importance level for resources.
555
+ */
556
+ export const Importance = {
557
+ Primary: 'primary',
558
+ Secondary: 'secondary',
559
+ } as const;
560
+ export type Importance = ClosedEnum<typeof Importance>;
561
+
562
+ /** @internal */
563
+ export const Importance$inboundSchema: z.ZodNativeEnum<typeof Importance> =
564
+ z.nativeEnum(Importance);
565
+ /** @internal */
566
+ export const Importance$outboundSchema: z.ZodNativeEnum<typeof Importance> =
567
+ Importance$inboundSchema;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Shared OneRoster Types and Enums
3
+ *
4
+ * This module exports all shared types and enums used across the OneRoster SDK.
5
+ * These are based on the 1EdTech OneRoster v1.2 specification.
6
+ */
7
+
8
+ export * from './enums.js';
@@ -5,3 +5,6 @@ export type { Result } from './fp.js';
5
5
  export type { PageIterator, Paginator } from './operations.js';
6
6
  export { createPageIterator } from './operations.js';
7
7
  export { RFCDate } from './rfcdate.js';
8
+
9
+ // Re-export API operations for a single runtime-compatible import path.
10
+ export * from '../models/operations/index.js';