@eduware/oneroster 1.2.3 → 1.2.5

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 (194) hide show
  1. package/README.md +28 -17
  2. package/bin/mcp-server.js +338 -1328
  3. package/bin/mcp-server.js.map +22 -21
  4. package/dist/commonjs/index.d.ts +4 -0
  5. package/dist/commonjs/index.d.ts.map +1 -1
  6. package/dist/commonjs/index.js +41 -1
  7. package/dist/commonjs/index.js.map +1 -1
  8. package/dist/commonjs/models/errors/index.d.ts +1 -0
  9. package/dist/commonjs/models/errors/index.d.ts.map +1 -1
  10. package/dist/commonjs/models/errors/index.js +1 -0
  11. package/dist/commonjs/models/errors/index.js.map +1 -1
  12. package/dist/commonjs/models/operations/createuser.d.ts +8 -270
  13. package/dist/commonjs/models/operations/createuser.d.ts.map +1 -1
  14. package/dist/commonjs/models/operations/createuser.js +17 -178
  15. package/dist/commonjs/models/operations/createuser.js.map +1 -1
  16. package/dist/commonjs/models/operations/getallstudents.d.ts +6 -206
  17. package/dist/commonjs/models/operations/getallstudents.d.ts.map +1 -1
  18. package/dist/commonjs/models/operations/getallstudents.js +12 -132
  19. package/dist/commonjs/models/operations/getallstudents.js.map +1 -1
  20. package/dist/commonjs/models/operations/getallteachers.d.ts +6 -206
  21. package/dist/commonjs/models/operations/getallteachers.d.ts.map +1 -1
  22. package/dist/commonjs/models/operations/getallteachers.js +12 -132
  23. package/dist/commonjs/models/operations/getallteachers.js.map +1 -1
  24. package/dist/commonjs/models/operations/getallusers.d.ts +6 -206
  25. package/dist/commonjs/models/operations/getallusers.d.ts.map +1 -1
  26. package/dist/commonjs/models/operations/getallusers.js +12 -132
  27. package/dist/commonjs/models/operations/getallusers.js.map +1 -1
  28. package/dist/commonjs/models/operations/getclassesforuser.d.ts +4 -85
  29. package/dist/commonjs/models/operations/getclassesforuser.d.ts.map +1 -1
  30. package/dist/commonjs/models/operations/getclassesforuser.js +8 -67
  31. package/dist/commonjs/models/operations/getclassesforuser.js.map +1 -1
  32. package/dist/commonjs/models/operations/getresourcesforuser.d.ts +5 -111
  33. package/dist/commonjs/models/operations/getresourcesforuser.d.ts.map +1 -1
  34. package/dist/commonjs/models/operations/getresourcesforuser.js +10 -88
  35. package/dist/commonjs/models/operations/getresourcesforuser.js.map +1 -1
  36. package/dist/commonjs/models/operations/getstudent.d.ts +5 -174
  37. package/dist/commonjs/models/operations/getstudent.d.ts.map +1 -1
  38. package/dist/commonjs/models/operations/getstudent.js +10 -108
  39. package/dist/commonjs/models/operations/getstudent.js.map +1 -1
  40. package/dist/commonjs/models/operations/getstudentsforclass.d.ts +6 -206
  41. package/dist/commonjs/models/operations/getstudentsforclass.d.ts.map +1 -1
  42. package/dist/commonjs/models/operations/getstudentsforclass.js +12 -132
  43. package/dist/commonjs/models/operations/getstudentsforclass.js.map +1 -1
  44. package/dist/commonjs/models/operations/getstudentsforclassinschool.d.ts +6 -206
  45. package/dist/commonjs/models/operations/getstudentsforclassinschool.d.ts.map +1 -1
  46. package/dist/commonjs/models/operations/getstudentsforclassinschool.js +12 -132
  47. package/dist/commonjs/models/operations/getstudentsforclassinschool.js.map +1 -1
  48. package/dist/commonjs/models/operations/getstudentsforschool.d.ts +6 -206
  49. package/dist/commonjs/models/operations/getstudentsforschool.d.ts.map +1 -1
  50. package/dist/commonjs/models/operations/getstudentsforschool.js +12 -132
  51. package/dist/commonjs/models/operations/getstudentsforschool.js.map +1 -1
  52. package/dist/commonjs/models/operations/getteacher.d.ts +5 -174
  53. package/dist/commonjs/models/operations/getteacher.d.ts.map +1 -1
  54. package/dist/commonjs/models/operations/getteacher.js +10 -108
  55. package/dist/commonjs/models/operations/getteacher.js.map +1 -1
  56. package/dist/commonjs/models/operations/getteachersforclass.d.ts +6 -206
  57. package/dist/commonjs/models/operations/getteachersforclass.d.ts.map +1 -1
  58. package/dist/commonjs/models/operations/getteachersforclass.js +12 -132
  59. package/dist/commonjs/models/operations/getteachersforclass.js.map +1 -1
  60. package/dist/commonjs/models/operations/getteachersforclassinschool.d.ts +6 -206
  61. package/dist/commonjs/models/operations/getteachersforclassinschool.d.ts.map +1 -1
  62. package/dist/commonjs/models/operations/getteachersforclassinschool.js +12 -132
  63. package/dist/commonjs/models/operations/getteachersforclassinschool.js.map +1 -1
  64. package/dist/commonjs/models/operations/getteachersforschool.d.ts +6 -206
  65. package/dist/commonjs/models/operations/getteachersforschool.d.ts.map +1 -1
  66. package/dist/commonjs/models/operations/getteachersforschool.js +12 -132
  67. package/dist/commonjs/models/operations/getteachersforschool.js.map +1 -1
  68. package/dist/commonjs/models/operations/getuser.d.ts +5 -174
  69. package/dist/commonjs/models/operations/getuser.d.ts.map +1 -1
  70. package/dist/commonjs/models/operations/getuser.js +10 -108
  71. package/dist/commonjs/models/operations/getuser.js.map +1 -1
  72. package/dist/commonjs/models/operations/getuserwithdemographics.d.ts +5 -174
  73. package/dist/commonjs/models/operations/getuserwithdemographics.d.ts.map +1 -1
  74. package/dist/commonjs/models/operations/getuserwithdemographics.js +10 -108
  75. package/dist/commonjs/models/operations/getuserwithdemographics.js.map +1 -1
  76. package/dist/commonjs/models/operations/updateuser.d.ts +8 -270
  77. package/dist/commonjs/models/operations/updateuser.d.ts.map +1 -1
  78. package/dist/commonjs/models/operations/updateuser.js +17 -178
  79. package/dist/commonjs/models/operations/updateuser.js.map +1 -1
  80. package/dist/commonjs/models/shared/enums.d.ts +440 -0
  81. package/dist/commonjs/models/shared/enums.d.ts.map +1 -0
  82. package/dist/commonjs/models/shared/enums.js +499 -0
  83. package/dist/commonjs/models/shared/enums.js.map +1 -0
  84. package/dist/commonjs/models/shared/index.d.ts +8 -0
  85. package/dist/commonjs/models/shared/index.d.ts.map +1 -0
  86. package/dist/commonjs/models/shared/index.js +24 -0
  87. package/dist/commonjs/models/shared/index.js.map +1 -0
  88. package/dist/esm/index.d.ts +4 -0
  89. package/dist/esm/index.d.ts.map +1 -1
  90. package/dist/esm/index.js +14 -0
  91. package/dist/esm/index.js.map +1 -1
  92. package/dist/esm/models/errors/index.d.ts +1 -0
  93. package/dist/esm/models/errors/index.d.ts.map +1 -1
  94. package/dist/esm/models/errors/index.js +1 -0
  95. package/dist/esm/models/errors/index.js.map +1 -1
  96. package/dist/esm/models/operations/createuser.d.ts +8 -270
  97. package/dist/esm/models/operations/createuser.d.ts.map +1 -1
  98. package/dist/esm/models/operations/createuser.js +15 -176
  99. package/dist/esm/models/operations/createuser.js.map +1 -1
  100. package/dist/esm/models/operations/getallstudents.d.ts +6 -206
  101. package/dist/esm/models/operations/getallstudents.d.ts.map +1 -1
  102. package/dist/esm/models/operations/getallstudents.js +11 -131
  103. package/dist/esm/models/operations/getallstudents.js.map +1 -1
  104. package/dist/esm/models/operations/getallteachers.d.ts +6 -206
  105. package/dist/esm/models/operations/getallteachers.d.ts.map +1 -1
  106. package/dist/esm/models/operations/getallteachers.js +11 -131
  107. package/dist/esm/models/operations/getallteachers.js.map +1 -1
  108. package/dist/esm/models/operations/getallusers.d.ts +6 -206
  109. package/dist/esm/models/operations/getallusers.d.ts.map +1 -1
  110. package/dist/esm/models/operations/getallusers.js +11 -131
  111. package/dist/esm/models/operations/getallusers.js.map +1 -1
  112. package/dist/esm/models/operations/getclassesforuser.d.ts +4 -85
  113. package/dist/esm/models/operations/getclassesforuser.d.ts.map +1 -1
  114. package/dist/esm/models/operations/getclassesforuser.js +7 -66
  115. package/dist/esm/models/operations/getclassesforuser.js.map +1 -1
  116. package/dist/esm/models/operations/getresourcesforuser.d.ts +5 -111
  117. package/dist/esm/models/operations/getresourcesforuser.d.ts.map +1 -1
  118. package/dist/esm/models/operations/getresourcesforuser.js +9 -87
  119. package/dist/esm/models/operations/getresourcesforuser.js.map +1 -1
  120. package/dist/esm/models/operations/getstudent.d.ts +5 -174
  121. package/dist/esm/models/operations/getstudent.d.ts.map +1 -1
  122. package/dist/esm/models/operations/getstudent.js +9 -107
  123. package/dist/esm/models/operations/getstudent.js.map +1 -1
  124. package/dist/esm/models/operations/getstudentsforclass.d.ts +6 -206
  125. package/dist/esm/models/operations/getstudentsforclass.d.ts.map +1 -1
  126. package/dist/esm/models/operations/getstudentsforclass.js +11 -131
  127. package/dist/esm/models/operations/getstudentsforclass.js.map +1 -1
  128. package/dist/esm/models/operations/getstudentsforclassinschool.d.ts +6 -206
  129. package/dist/esm/models/operations/getstudentsforclassinschool.d.ts.map +1 -1
  130. package/dist/esm/models/operations/getstudentsforclassinschool.js +11 -131
  131. package/dist/esm/models/operations/getstudentsforclassinschool.js.map +1 -1
  132. package/dist/esm/models/operations/getstudentsforschool.d.ts +6 -206
  133. package/dist/esm/models/operations/getstudentsforschool.d.ts.map +1 -1
  134. package/dist/esm/models/operations/getstudentsforschool.js +11 -131
  135. package/dist/esm/models/operations/getstudentsforschool.js.map +1 -1
  136. package/dist/esm/models/operations/getteacher.d.ts +5 -174
  137. package/dist/esm/models/operations/getteacher.d.ts.map +1 -1
  138. package/dist/esm/models/operations/getteacher.js +9 -107
  139. package/dist/esm/models/operations/getteacher.js.map +1 -1
  140. package/dist/esm/models/operations/getteachersforclass.d.ts +6 -206
  141. package/dist/esm/models/operations/getteachersforclass.d.ts.map +1 -1
  142. package/dist/esm/models/operations/getteachersforclass.js +11 -131
  143. package/dist/esm/models/operations/getteachersforclass.js.map +1 -1
  144. package/dist/esm/models/operations/getteachersforclassinschool.d.ts +6 -206
  145. package/dist/esm/models/operations/getteachersforclassinschool.d.ts.map +1 -1
  146. package/dist/esm/models/operations/getteachersforclassinschool.js +11 -131
  147. package/dist/esm/models/operations/getteachersforclassinschool.js.map +1 -1
  148. package/dist/esm/models/operations/getteachersforschool.d.ts +6 -206
  149. package/dist/esm/models/operations/getteachersforschool.d.ts.map +1 -1
  150. package/dist/esm/models/operations/getteachersforschool.js +11 -131
  151. package/dist/esm/models/operations/getteachersforschool.js.map +1 -1
  152. package/dist/esm/models/operations/getuser.d.ts +5 -174
  153. package/dist/esm/models/operations/getuser.d.ts.map +1 -1
  154. package/dist/esm/models/operations/getuser.js +9 -107
  155. package/dist/esm/models/operations/getuser.js.map +1 -1
  156. package/dist/esm/models/operations/getuserwithdemographics.d.ts +5 -174
  157. package/dist/esm/models/operations/getuserwithdemographics.d.ts.map +1 -1
  158. package/dist/esm/models/operations/getuserwithdemographics.js +9 -107
  159. package/dist/esm/models/operations/getuserwithdemographics.js.map +1 -1
  160. package/dist/esm/models/operations/updateuser.d.ts +8 -270
  161. package/dist/esm/models/operations/updateuser.d.ts.map +1 -1
  162. package/dist/esm/models/operations/updateuser.js +15 -176
  163. package/dist/esm/models/operations/updateuser.js.map +1 -1
  164. package/dist/esm/models/shared/enums.d.ts +440 -0
  165. package/dist/esm/models/shared/enums.d.ts.map +1 -0
  166. package/dist/esm/models/shared/enums.js +462 -0
  167. package/dist/esm/models/shared/enums.js.map +1 -0
  168. package/dist/esm/models/shared/index.d.ts +8 -0
  169. package/dist/esm/models/shared/index.d.ts.map +1 -0
  170. package/dist/esm/models/shared/index.js +8 -0
  171. package/dist/esm/models/shared/index.js.map +1 -0
  172. package/package.json +55 -1
  173. package/src/index.ts +44 -0
  174. package/src/models/errors/index.ts +1 -0
  175. package/src/models/operations/createuser.ts +35 -238
  176. package/src/models/operations/getallstudents.ts +32 -170
  177. package/src/models/operations/getallteachers.ts +32 -170
  178. package/src/models/operations/getallusers.ts +32 -170
  179. package/src/models/operations/getclassesforuser.ts +20 -97
  180. package/src/models/operations/getresourcesforuser.ts +26 -127
  181. package/src/models/operations/getstudent.ts +26 -136
  182. package/src/models/operations/getstudentsforclass.ts +32 -180
  183. package/src/models/operations/getstudentsforclassinschool.ts +32 -188
  184. package/src/models/operations/getstudentsforschool.ts +32 -180
  185. package/src/models/operations/getteacher.ts +26 -136
  186. package/src/models/operations/getteachersforclass.ts +32 -180
  187. package/src/models/operations/getteachersforclassinschool.ts +32 -188
  188. package/src/models/operations/getteachersforschool.ts +32 -180
  189. package/src/models/operations/getuser.ts +26 -136
  190. package/src/models/operations/getuserwithdemographics.ts +26 -144
  191. package/src/models/operations/updateuser.ts +35 -238
  192. package/src/models/shared/enums.ts +567 -0
  193. package/src/models/shared/index.ts +8 -0
  194. package/test/classlink.test.ts +26 -26
@@ -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())