@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
@@ -2,22 +2,26 @@ import * as z from 'zod';
2
2
 
3
3
  import { remap as remap$ } from '../../lib/primitives.js';
4
4
  import { safeParse } from '../../lib/schemas.js';
5
- import { ClosedEnum } from '../../types/enums.js';
6
5
  import { Result as SafeParseResult } from '../../types/fp.js';
7
6
  import * as components from '../components/index.js';
8
7
  import { SDKValidationError } from '../errors/sdkvalidationerror.js';
9
-
10
- /**
11
- * The order to sort the response by
12
- */
13
- export const GetAllStudentsOrderBy = {
14
- Asc: 'asc',
15
- Desc: 'desc',
16
- } as const;
17
- /**
18
- * The order to sort the response by
19
- */
20
- export type GetAllStudentsOrderBy = ClosedEnum<typeof GetAllStudentsOrderBy>;
8
+ import {
9
+ EntityType,
10
+ EntityType$inboundSchema,
11
+ EntityType$outboundSchema,
12
+ OrderBy,
13
+ OrderBy$inboundSchema,
14
+ OrderBy$outboundSchema,
15
+ RoleType,
16
+ RoleType$inboundSchema,
17
+ RoleType$outboundSchema,
18
+ Status,
19
+ Status$inboundSchema,
20
+ Status$outboundSchema,
21
+ UserRole,
22
+ UserRole$inboundSchema,
23
+ UserRole$outboundSchema,
24
+ } from '../shared/enums.js';
21
25
 
22
26
  export type GetAllStudentsRequest = {
23
27
  /**
@@ -39,7 +43,7 @@ export type GetAllStudentsRequest = {
39
43
  /**
40
44
  * The order to sort the response by
41
45
  */
42
- orderBy?: GetAllStudentsOrderBy | undefined;
46
+ orderBy?: OrderBy | undefined;
43
47
  /**
44
48
  * The filter to apply to the response
45
49
  */
@@ -50,35 +54,11 @@ export type GetAllStudentsRequest = {
50
54
  search?: string | undefined;
51
55
  };
52
56
 
53
- export const GetAllStudentsStatus = {
54
- Active: 'active',
55
- Tobedeleted: 'tobedeleted',
56
- } as const;
57
- export type GetAllStudentsStatus = ClosedEnum<typeof GetAllStudentsStatus>;
58
-
59
57
  export type GetAllStudentsUserId = {
60
58
  type: string;
61
59
  identifier: string;
62
60
  };
63
61
 
64
- export const GetAllStudentsRoleType = {
65
- Primary: 'primary',
66
- Secondary: 'secondary',
67
- } as const;
68
- export type GetAllStudentsRoleType = ClosedEnum<typeof GetAllStudentsRoleType>;
69
-
70
- export const GetAllStudentsRoleEnum = {
71
- Administrator: 'administrator',
72
- Aide: 'aide',
73
- Guardian: 'guardian',
74
- Parent: 'parent',
75
- Proctor: 'proctor',
76
- Relative: 'relative',
77
- Student: 'student',
78
- Teacher: 'teacher',
79
- } as const;
80
- export type GetAllStudentsRoleEnum = ClosedEnum<typeof GetAllStudentsRoleEnum>;
81
-
82
62
  export type GetAllStudentsOrg = {
83
63
  href: string;
84
64
  sourcedId: string;
@@ -86,41 +66,18 @@ export type GetAllStudentsOrg = {
86
66
  };
87
67
 
88
68
  export type GetAllStudentsRole = {
89
- roleType: GetAllStudentsRoleType;
90
- role: GetAllStudentsRoleEnum;
69
+ roleType: RoleType;
70
+ role: UserRole;
91
71
  org: GetAllStudentsOrg;
92
72
  userProfile?: string | undefined;
93
73
  beginDate: string | null;
94
74
  endDate: string | null;
95
75
  };
96
76
 
97
- export const GetAllStudentsType = {
98
- AcademicSession: 'academicSession',
99
- AssessmentLineItem: 'assessmentLineItem',
100
- Category: 'category',
101
- Class: 'class',
102
- Course: 'course',
103
- Demographics: 'demographics',
104
- Enrollment: 'enrollment',
105
- GradingPeriod: 'gradingPeriod',
106
- LineItem: 'lineItem',
107
- Org: 'org',
108
- Resource: 'resource',
109
- Result: 'result',
110
- ScoreScale: 'scoreScale',
111
- Student: 'student',
112
- Teacher: 'teacher',
113
- Term: 'term',
114
- User: 'user',
115
- ComponentResource: 'componentResource',
116
- CourseComponent: 'courseComponent',
117
- } as const;
118
- export type GetAllStudentsType = ClosedEnum<typeof GetAllStudentsType>;
119
-
120
77
  export type GetAllStudentsAgent = {
121
78
  href: string;
122
79
  sourcedId: string;
123
- type: GetAllStudentsType;
80
+ type: EntityType;
124
81
  };
125
82
 
126
83
  export type GetAllStudentsPrimaryOrg = {
@@ -131,7 +88,7 @@ export type GetAllStudentsPrimaryOrg = {
131
88
 
132
89
  export type GetAllStudentsUser = {
133
90
  sourcedId: string;
134
- status: GetAllStudentsStatus;
91
+ status: Status;
135
92
  dateLastModified?: Date | undefined;
136
93
  metadata?: { [k: string]: any } | null | undefined;
137
94
  userMasterIdentifier?: string | null | undefined;
@@ -167,25 +124,6 @@ export type GetAllStudentsResponse = {
167
124
  result: GetAllStudentsResponseBody;
168
125
  };
169
126
 
170
- /** @internal */
171
- export const GetAllStudentsOrderBy$inboundSchema: z.ZodNativeEnum<typeof GetAllStudentsOrderBy> =
172
- z.nativeEnum(GetAllStudentsOrderBy);
173
-
174
- /** @internal */
175
- export const GetAllStudentsOrderBy$outboundSchema: z.ZodNativeEnum<typeof GetAllStudentsOrderBy> =
176
- GetAllStudentsOrderBy$inboundSchema;
177
-
178
- /**
179
- * @internal
180
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
181
- */
182
- export namespace GetAllStudentsOrderBy$ {
183
- /** @deprecated use `GetAllStudentsOrderBy$inboundSchema` instead. */
184
- export const inboundSchema = GetAllStudentsOrderBy$inboundSchema;
185
- /** @deprecated use `GetAllStudentsOrderBy$outboundSchema` instead. */
186
- export const outboundSchema = GetAllStudentsOrderBy$outboundSchema;
187
- }
188
-
189
127
  /** @internal */
190
128
  export const GetAllStudentsRequest$inboundSchema: z.ZodType<
191
129
  GetAllStudentsRequest,
@@ -196,7 +134,7 @@ export const GetAllStudentsRequest$inboundSchema: z.ZodType<
196
134
  limit: z.number().int().default(100),
197
135
  offset: z.number().int().default(0),
198
136
  sort: z.string().optional(),
199
- orderBy: GetAllStudentsOrderBy$inboundSchema.optional(),
137
+ orderBy: OrderBy$inboundSchema.optional(),
200
138
  filter: z.string().optional(),
201
139
  search: z.string().optional(),
202
140
  });
@@ -222,7 +160,7 @@ export const GetAllStudentsRequest$outboundSchema: z.ZodType<
222
160
  limit: z.number().int().default(100),
223
161
  offset: z.number().int().default(0),
224
162
  sort: z.string().optional(),
225
- orderBy: GetAllStudentsOrderBy$outboundSchema.optional(),
163
+ orderBy: OrderBy$outboundSchema.optional(),
226
164
  filter: z.string().optional(),
227
165
  search: z.string().optional(),
228
166
  });
@@ -254,25 +192,6 @@ export function getAllStudentsRequestFromJSON(
254
192
  );
255
193
  }
256
194
 
257
- /** @internal */
258
- export const GetAllStudentsStatus$inboundSchema: z.ZodNativeEnum<typeof GetAllStudentsStatus> =
259
- z.nativeEnum(GetAllStudentsStatus);
260
-
261
- /** @internal */
262
- export const GetAllStudentsStatus$outboundSchema: z.ZodNativeEnum<typeof GetAllStudentsStatus> =
263
- GetAllStudentsStatus$inboundSchema;
264
-
265
- /**
266
- * @internal
267
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
268
- */
269
- export namespace GetAllStudentsStatus$ {
270
- /** @deprecated use `GetAllStudentsStatus$inboundSchema` instead. */
271
- export const inboundSchema = GetAllStudentsStatus$inboundSchema;
272
- /** @deprecated use `GetAllStudentsStatus$outboundSchema` instead. */
273
- export const outboundSchema = GetAllStudentsStatus$outboundSchema;
274
- }
275
-
276
195
  /** @internal */
277
196
  export const GetAllStudentsUserId$inboundSchema: z.ZodType<
278
197
  GetAllStudentsUserId,
@@ -326,44 +245,6 @@ export function getAllStudentsUserIdFromJSON(
326
245
  );
327
246
  }
328
247
 
329
- /** @internal */
330
- export const GetAllStudentsRoleType$inboundSchema: z.ZodNativeEnum<typeof GetAllStudentsRoleType> =
331
- z.nativeEnum(GetAllStudentsRoleType);
332
-
333
- /** @internal */
334
- export const GetAllStudentsRoleType$outboundSchema: z.ZodNativeEnum<typeof GetAllStudentsRoleType> =
335
- GetAllStudentsRoleType$inboundSchema;
336
-
337
- /**
338
- * @internal
339
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
340
- */
341
- export namespace GetAllStudentsRoleType$ {
342
- /** @deprecated use `GetAllStudentsRoleType$inboundSchema` instead. */
343
- export const inboundSchema = GetAllStudentsRoleType$inboundSchema;
344
- /** @deprecated use `GetAllStudentsRoleType$outboundSchema` instead. */
345
- export const outboundSchema = GetAllStudentsRoleType$outboundSchema;
346
- }
347
-
348
- /** @internal */
349
- export const GetAllStudentsRoleEnum$inboundSchema: z.ZodNativeEnum<typeof GetAllStudentsRoleEnum> =
350
- z.nativeEnum(GetAllStudentsRoleEnum);
351
-
352
- /** @internal */
353
- export const GetAllStudentsRoleEnum$outboundSchema: z.ZodNativeEnum<typeof GetAllStudentsRoleEnum> =
354
- GetAllStudentsRoleEnum$inboundSchema;
355
-
356
- /**
357
- * @internal
358
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
359
- */
360
- export namespace GetAllStudentsRoleEnum$ {
361
- /** @deprecated use `GetAllStudentsRoleEnum$inboundSchema` instead. */
362
- export const inboundSchema = GetAllStudentsRoleEnum$inboundSchema;
363
- /** @deprecated use `GetAllStudentsRoleEnum$outboundSchema` instead. */
364
- export const outboundSchema = GetAllStudentsRoleEnum$outboundSchema;
365
- }
366
-
367
248
  /** @internal */
368
249
  export const GetAllStudentsOrg$inboundSchema: z.ZodType<GetAllStudentsOrg, z.ZodTypeDef, unknown> =
369
250
  z.object({
@@ -423,8 +304,8 @@ export const GetAllStudentsRole$inboundSchema: z.ZodType<
423
304
  z.ZodTypeDef,
424
305
  unknown
425
306
  > = z.object({
426
- roleType: GetAllStudentsRoleType$inboundSchema,
427
- role: GetAllStudentsRoleEnum$inboundSchema,
307
+ roleType: RoleType$inboundSchema,
308
+ role: UserRole$inboundSchema,
428
309
  org: z.lazy(() => GetAllStudentsOrg$inboundSchema),
429
310
  userProfile: z.string().optional(),
430
311
  beginDate: z.nullable(z.string()),
@@ -447,8 +328,8 @@ export const GetAllStudentsRole$outboundSchema: z.ZodType<
447
328
  z.ZodTypeDef,
448
329
  GetAllStudentsRole
449
330
  > = z.object({
450
- roleType: GetAllStudentsRoleType$outboundSchema,
451
- role: GetAllStudentsRoleEnum$outboundSchema,
331
+ roleType: RoleType$outboundSchema,
332
+ role: UserRole$outboundSchema,
452
333
  org: z.lazy(() => GetAllStudentsOrg$outboundSchema),
453
334
  userProfile: z.string().optional(),
454
335
  beginDate: z.nullable(z.string()),
@@ -482,25 +363,6 @@ export function getAllStudentsRoleFromJSON(
482
363
  );
483
364
  }
484
365
 
485
- /** @internal */
486
- export const GetAllStudentsType$inboundSchema: z.ZodNativeEnum<typeof GetAllStudentsType> =
487
- z.nativeEnum(GetAllStudentsType);
488
-
489
- /** @internal */
490
- export const GetAllStudentsType$outboundSchema: z.ZodNativeEnum<typeof GetAllStudentsType> =
491
- GetAllStudentsType$inboundSchema;
492
-
493
- /**
494
- * @internal
495
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
496
- */
497
- export namespace GetAllStudentsType$ {
498
- /** @deprecated use `GetAllStudentsType$inboundSchema` instead. */
499
- export const inboundSchema = GetAllStudentsType$inboundSchema;
500
- /** @deprecated use `GetAllStudentsType$outboundSchema` instead. */
501
- export const outboundSchema = GetAllStudentsType$outboundSchema;
502
- }
503
-
504
366
  /** @internal */
505
367
  export const GetAllStudentsAgent$inboundSchema: z.ZodType<
506
368
  GetAllStudentsAgent,
@@ -509,7 +371,7 @@ export const GetAllStudentsAgent$inboundSchema: z.ZodType<
509
371
  > = z.object({
510
372
  href: z.string(),
511
373
  sourcedId: z.string(),
512
- type: GetAllStudentsType$inboundSchema,
374
+ type: EntityType$inboundSchema,
513
375
  });
514
376
 
515
377
  /** @internal */
@@ -527,7 +389,7 @@ export const GetAllStudentsAgent$outboundSchema: z.ZodType<
527
389
  > = z.object({
528
390
  href: z.string(),
529
391
  sourcedId: z.string(),
530
- type: GetAllStudentsType$outboundSchema,
392
+ type: EntityType$outboundSchema,
531
393
  });
532
394
 
533
395
  /**
@@ -622,7 +484,7 @@ export const GetAllStudentsUser$inboundSchema: z.ZodType<
622
484
  unknown
623
485
  > = z.object({
624
486
  sourcedId: z.string(),
625
- status: GetAllStudentsStatus$inboundSchema,
487
+ status: Status$inboundSchema,
626
488
  dateLastModified: z
627
489
  .string()
628
490
  .datetime({ offset: true })
@@ -686,7 +548,7 @@ export const GetAllStudentsUser$outboundSchema: z.ZodType<
686
548
  GetAllStudentsUser
687
549
  > = z.object({
688
550
  sourcedId: z.string(),
689
- status: GetAllStudentsStatus$outboundSchema,
551
+ status: Status$outboundSchema,
690
552
  dateLastModified: z
691
553
  .date()
692
554
  .transform((v) => v.toISOString())
@@ -2,22 +2,26 @@ import * as z from 'zod';
2
2
 
3
3
  import { remap as remap$ } from '../../lib/primitives.js';
4
4
  import { safeParse } from '../../lib/schemas.js';
5
- import { ClosedEnum } from '../../types/enums.js';
6
5
  import { Result as SafeParseResult } from '../../types/fp.js';
7
6
  import * as components from '../components/index.js';
8
7
  import { SDKValidationError } from '../errors/sdkvalidationerror.js';
9
-
10
- /**
11
- * The order to sort the response by
12
- */
13
- export const GetAllTeachersOrderBy = {
14
- Asc: 'asc',
15
- Desc: 'desc',
16
- } as const;
17
- /**
18
- * The order to sort the response by
19
- */
20
- export type GetAllTeachersOrderBy = ClosedEnum<typeof GetAllTeachersOrderBy>;
8
+ import {
9
+ EntityType,
10
+ EntityType$inboundSchema,
11
+ EntityType$outboundSchema,
12
+ OrderBy,
13
+ OrderBy$inboundSchema,
14
+ OrderBy$outboundSchema,
15
+ RoleType,
16
+ RoleType$inboundSchema,
17
+ RoleType$outboundSchema,
18
+ Status,
19
+ Status$inboundSchema,
20
+ Status$outboundSchema,
21
+ UserRole,
22
+ UserRole$inboundSchema,
23
+ UserRole$outboundSchema,
24
+ } from '../shared/enums.js';
21
25
 
22
26
  export type GetAllTeachersRequest = {
23
27
  /**
@@ -39,7 +43,7 @@ export type GetAllTeachersRequest = {
39
43
  /**
40
44
  * The order to sort the response by
41
45
  */
42
- orderBy?: GetAllTeachersOrderBy | undefined;
46
+ orderBy?: OrderBy | undefined;
43
47
  /**
44
48
  * The filter to apply to the response
45
49
  */
@@ -50,35 +54,11 @@ export type GetAllTeachersRequest = {
50
54
  search?: string | undefined;
51
55
  };
52
56
 
53
- export const GetAllTeachersStatus = {
54
- Active: 'active',
55
- Tobedeleted: 'tobedeleted',
56
- } as const;
57
- export type GetAllTeachersStatus = ClosedEnum<typeof GetAllTeachersStatus>;
58
-
59
57
  export type GetAllTeachersUserId = {
60
58
  type: string;
61
59
  identifier: string;
62
60
  };
63
61
 
64
- export const GetAllTeachersRoleType = {
65
- Primary: 'primary',
66
- Secondary: 'secondary',
67
- } as const;
68
- export type GetAllTeachersRoleType = ClosedEnum<typeof GetAllTeachersRoleType>;
69
-
70
- export const GetAllTeachersRoleEnum = {
71
- Administrator: 'administrator',
72
- Aide: 'aide',
73
- Guardian: 'guardian',
74
- Parent: 'parent',
75
- Proctor: 'proctor',
76
- Relative: 'relative',
77
- Student: 'student',
78
- Teacher: 'teacher',
79
- } as const;
80
- export type GetAllTeachersRoleEnum = ClosedEnum<typeof GetAllTeachersRoleEnum>;
81
-
82
62
  export type GetAllTeachersOrg = {
83
63
  href: string;
84
64
  sourcedId: string;
@@ -86,41 +66,18 @@ export type GetAllTeachersOrg = {
86
66
  };
87
67
 
88
68
  export type GetAllTeachersRole = {
89
- roleType: GetAllTeachersRoleType;
90
- role: GetAllTeachersRoleEnum;
69
+ roleType: RoleType;
70
+ role: UserRole;
91
71
  org: GetAllTeachersOrg;
92
72
  userProfile?: string | undefined;
93
73
  beginDate: string | null;
94
74
  endDate: string | null;
95
75
  };
96
76
 
97
- export const GetAllTeachersType = {
98
- AcademicSession: 'academicSession',
99
- AssessmentLineItem: 'assessmentLineItem',
100
- Category: 'category',
101
- Class: 'class',
102
- Course: 'course',
103
- Demographics: 'demographics',
104
- Enrollment: 'enrollment',
105
- GradingPeriod: 'gradingPeriod',
106
- LineItem: 'lineItem',
107
- Org: 'org',
108
- Resource: 'resource',
109
- Result: 'result',
110
- ScoreScale: 'scoreScale',
111
- Student: 'student',
112
- Teacher: 'teacher',
113
- Term: 'term',
114
- User: 'user',
115
- ComponentResource: 'componentResource',
116
- CourseComponent: 'courseComponent',
117
- } as const;
118
- export type GetAllTeachersType = ClosedEnum<typeof GetAllTeachersType>;
119
-
120
77
  export type GetAllTeachersAgent = {
121
78
  href: string;
122
79
  sourcedId: string;
123
- type: GetAllTeachersType;
80
+ type: EntityType;
124
81
  };
125
82
 
126
83
  export type GetAllTeachersPrimaryOrg = {
@@ -131,7 +88,7 @@ export type GetAllTeachersPrimaryOrg = {
131
88
 
132
89
  export type GetAllTeachersUser = {
133
90
  sourcedId: string;
134
- status: GetAllTeachersStatus;
91
+ status: Status;
135
92
  dateLastModified?: Date | undefined;
136
93
  metadata?: { [k: string]: any } | null | undefined;
137
94
  userMasterIdentifier?: string | null | undefined;
@@ -167,25 +124,6 @@ export type GetAllTeachersResponse = {
167
124
  result: GetAllTeachersResponseBody;
168
125
  };
169
126
 
170
- /** @internal */
171
- export const GetAllTeachersOrderBy$inboundSchema: z.ZodNativeEnum<typeof GetAllTeachersOrderBy> =
172
- z.nativeEnum(GetAllTeachersOrderBy);
173
-
174
- /** @internal */
175
- export const GetAllTeachersOrderBy$outboundSchema: z.ZodNativeEnum<typeof GetAllTeachersOrderBy> =
176
- GetAllTeachersOrderBy$inboundSchema;
177
-
178
- /**
179
- * @internal
180
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
181
- */
182
- export namespace GetAllTeachersOrderBy$ {
183
- /** @deprecated use `GetAllTeachersOrderBy$inboundSchema` instead. */
184
- export const inboundSchema = GetAllTeachersOrderBy$inboundSchema;
185
- /** @deprecated use `GetAllTeachersOrderBy$outboundSchema` instead. */
186
- export const outboundSchema = GetAllTeachersOrderBy$outboundSchema;
187
- }
188
-
189
127
  /** @internal */
190
128
  export const GetAllTeachersRequest$inboundSchema: z.ZodType<
191
129
  GetAllTeachersRequest,
@@ -196,7 +134,7 @@ export const GetAllTeachersRequest$inboundSchema: z.ZodType<
196
134
  limit: z.number().int().default(100),
197
135
  offset: z.number().int().default(0),
198
136
  sort: z.string().optional(),
199
- orderBy: GetAllTeachersOrderBy$inboundSchema.optional(),
137
+ orderBy: OrderBy$inboundSchema.optional(),
200
138
  filter: z.string().optional(),
201
139
  search: z.string().optional(),
202
140
  });
@@ -222,7 +160,7 @@ export const GetAllTeachersRequest$outboundSchema: z.ZodType<
222
160
  limit: z.number().int().default(100),
223
161
  offset: z.number().int().default(0),
224
162
  sort: z.string().optional(),
225
- orderBy: GetAllTeachersOrderBy$outboundSchema.optional(),
163
+ orderBy: OrderBy$outboundSchema.optional(),
226
164
  filter: z.string().optional(),
227
165
  search: z.string().optional(),
228
166
  });
@@ -254,25 +192,6 @@ export function getAllTeachersRequestFromJSON(
254
192
  );
255
193
  }
256
194
 
257
- /** @internal */
258
- export const GetAllTeachersStatus$inboundSchema: z.ZodNativeEnum<typeof GetAllTeachersStatus> =
259
- z.nativeEnum(GetAllTeachersStatus);
260
-
261
- /** @internal */
262
- export const GetAllTeachersStatus$outboundSchema: z.ZodNativeEnum<typeof GetAllTeachersStatus> =
263
- GetAllTeachersStatus$inboundSchema;
264
-
265
- /**
266
- * @internal
267
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
268
- */
269
- export namespace GetAllTeachersStatus$ {
270
- /** @deprecated use `GetAllTeachersStatus$inboundSchema` instead. */
271
- export const inboundSchema = GetAllTeachersStatus$inboundSchema;
272
- /** @deprecated use `GetAllTeachersStatus$outboundSchema` instead. */
273
- export const outboundSchema = GetAllTeachersStatus$outboundSchema;
274
- }
275
-
276
195
  /** @internal */
277
196
  export const GetAllTeachersUserId$inboundSchema: z.ZodType<
278
197
  GetAllTeachersUserId,
@@ -326,44 +245,6 @@ export function getAllTeachersUserIdFromJSON(
326
245
  );
327
246
  }
328
247
 
329
- /** @internal */
330
- export const GetAllTeachersRoleType$inboundSchema: z.ZodNativeEnum<typeof GetAllTeachersRoleType> =
331
- z.nativeEnum(GetAllTeachersRoleType);
332
-
333
- /** @internal */
334
- export const GetAllTeachersRoleType$outboundSchema: z.ZodNativeEnum<typeof GetAllTeachersRoleType> =
335
- GetAllTeachersRoleType$inboundSchema;
336
-
337
- /**
338
- * @internal
339
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
340
- */
341
- export namespace GetAllTeachersRoleType$ {
342
- /** @deprecated use `GetAllTeachersRoleType$inboundSchema` instead. */
343
- export const inboundSchema = GetAllTeachersRoleType$inboundSchema;
344
- /** @deprecated use `GetAllTeachersRoleType$outboundSchema` instead. */
345
- export const outboundSchema = GetAllTeachersRoleType$outboundSchema;
346
- }
347
-
348
- /** @internal */
349
- export const GetAllTeachersRoleEnum$inboundSchema: z.ZodNativeEnum<typeof GetAllTeachersRoleEnum> =
350
- z.nativeEnum(GetAllTeachersRoleEnum);
351
-
352
- /** @internal */
353
- export const GetAllTeachersRoleEnum$outboundSchema: z.ZodNativeEnum<typeof GetAllTeachersRoleEnum> =
354
- GetAllTeachersRoleEnum$inboundSchema;
355
-
356
- /**
357
- * @internal
358
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
359
- */
360
- export namespace GetAllTeachersRoleEnum$ {
361
- /** @deprecated use `GetAllTeachersRoleEnum$inboundSchema` instead. */
362
- export const inboundSchema = GetAllTeachersRoleEnum$inboundSchema;
363
- /** @deprecated use `GetAllTeachersRoleEnum$outboundSchema` instead. */
364
- export const outboundSchema = GetAllTeachersRoleEnum$outboundSchema;
365
- }
366
-
367
248
  /** @internal */
368
249
  export const GetAllTeachersOrg$inboundSchema: z.ZodType<GetAllTeachersOrg, z.ZodTypeDef, unknown> =
369
250
  z.object({
@@ -423,8 +304,8 @@ export const GetAllTeachersRole$inboundSchema: z.ZodType<
423
304
  z.ZodTypeDef,
424
305
  unknown
425
306
  > = z.object({
426
- roleType: GetAllTeachersRoleType$inboundSchema,
427
- role: GetAllTeachersRoleEnum$inboundSchema,
307
+ roleType: RoleType$inboundSchema,
308
+ role: UserRole$inboundSchema,
428
309
  org: z.lazy(() => GetAllTeachersOrg$inboundSchema),
429
310
  userProfile: z.string().optional(),
430
311
  beginDate: z.nullable(z.string()),
@@ -447,8 +328,8 @@ export const GetAllTeachersRole$outboundSchema: z.ZodType<
447
328
  z.ZodTypeDef,
448
329
  GetAllTeachersRole
449
330
  > = z.object({
450
- roleType: GetAllTeachersRoleType$outboundSchema,
451
- role: GetAllTeachersRoleEnum$outboundSchema,
331
+ roleType: RoleType$outboundSchema,
332
+ role: UserRole$outboundSchema,
452
333
  org: z.lazy(() => GetAllTeachersOrg$outboundSchema),
453
334
  userProfile: z.string().optional(),
454
335
  beginDate: z.nullable(z.string()),
@@ -482,25 +363,6 @@ export function getAllTeachersRoleFromJSON(
482
363
  );
483
364
  }
484
365
 
485
- /** @internal */
486
- export const GetAllTeachersType$inboundSchema: z.ZodNativeEnum<typeof GetAllTeachersType> =
487
- z.nativeEnum(GetAllTeachersType);
488
-
489
- /** @internal */
490
- export const GetAllTeachersType$outboundSchema: z.ZodNativeEnum<typeof GetAllTeachersType> =
491
- GetAllTeachersType$inboundSchema;
492
-
493
- /**
494
- * @internal
495
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
496
- */
497
- export namespace GetAllTeachersType$ {
498
- /** @deprecated use `GetAllTeachersType$inboundSchema` instead. */
499
- export const inboundSchema = GetAllTeachersType$inboundSchema;
500
- /** @deprecated use `GetAllTeachersType$outboundSchema` instead. */
501
- export const outboundSchema = GetAllTeachersType$outboundSchema;
502
- }
503
-
504
366
  /** @internal */
505
367
  export const GetAllTeachersAgent$inboundSchema: z.ZodType<
506
368
  GetAllTeachersAgent,
@@ -509,7 +371,7 @@ export const GetAllTeachersAgent$inboundSchema: z.ZodType<
509
371
  > = z.object({
510
372
  href: z.string(),
511
373
  sourcedId: z.string(),
512
- type: GetAllTeachersType$inboundSchema,
374
+ type: EntityType$inboundSchema,
513
375
  });
514
376
 
515
377
  /** @internal */
@@ -527,7 +389,7 @@ export const GetAllTeachersAgent$outboundSchema: z.ZodType<
527
389
  > = z.object({
528
390
  href: z.string(),
529
391
  sourcedId: z.string(),
530
- type: GetAllTeachersType$outboundSchema,
392
+ type: EntityType$outboundSchema,
531
393
  });
532
394
 
533
395
  /**
@@ -622,7 +484,7 @@ export const GetAllTeachersUser$inboundSchema: z.ZodType<
622
484
  unknown
623
485
  > = z.object({
624
486
  sourcedId: z.string(),
625
- status: GetAllTeachersStatus$inboundSchema,
487
+ status: Status$inboundSchema,
626
488
  dateLastModified: z
627
489
  .string()
628
490
  .datetime({ offset: true })
@@ -686,7 +548,7 @@ export const GetAllTeachersUser$outboundSchema: z.ZodType<
686
548
  GetAllTeachersUser
687
549
  > = z.object({
688
550
  sourcedId: z.string(),
689
- status: GetAllTeachersStatus$outboundSchema,
551
+ status: Status$outboundSchema,
690
552
  dateLastModified: z
691
553
  .date()
692
554
  .transform((v) => v.toISOString())