@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,21 +2,22 @@ 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 { SDKValidationError } from '../errors/sdkvalidationerror.js';
8
-
9
- /**
10
- * The order to sort the response by
11
- */
12
- export const GetResourcesForUserOrderBy = {
13
- Asc: 'asc',
14
- Desc: 'desc',
15
- } as const;
16
- /**
17
- * The order to sort the response by
18
- */
19
- export type GetResourcesForUserOrderBy = ClosedEnum<typeof GetResourcesForUserOrderBy>;
7
+ import {
8
+ Importance,
9
+ Importance$inboundSchema,
10
+ Importance$outboundSchema,
11
+ OrderBy,
12
+ OrderBy$inboundSchema,
13
+ OrderBy$outboundSchema,
14
+ RoleType,
15
+ RoleType$inboundSchema,
16
+ RoleType$outboundSchema,
17
+ Status,
18
+ Status$inboundSchema,
19
+ Status$outboundSchema,
20
+ } from '../shared/enums.js';
20
21
 
21
22
  export type GetResourcesForUserRequest = {
22
23
  /**
@@ -42,7 +43,7 @@ export type GetResourcesForUserRequest = {
42
43
  /**
43
44
  * The order to sort the response by
44
45
  */
45
- orderBy?: GetResourcesForUserOrderBy | undefined;
46
+ orderBy?: OrderBy | undefined;
46
47
  /**
47
48
  * The filter to apply to the response
48
49
  */
@@ -53,35 +54,17 @@ export type GetResourcesForUserRequest = {
53
54
  search?: string | undefined;
54
55
  };
55
56
 
56
- export const GetResourcesForUserStatus = {
57
- Active: 'active',
58
- Tobedeleted: 'tobedeleted',
59
- } as const;
60
- export type GetResourcesForUserStatus = ClosedEnum<typeof GetResourcesForUserStatus>;
61
-
62
- export const GetResourcesForUserRole = {
63
- Primary: 'primary',
64
- Secondary: 'secondary',
65
- } as const;
66
- export type GetResourcesForUserRole = ClosedEnum<typeof GetResourcesForUserRole>;
67
-
68
- export const GetResourcesForUserImportance = {
69
- Primary: 'primary',
70
- Secondary: 'secondary',
71
- } as const;
72
- export type GetResourcesForUserImportance = ClosedEnum<typeof GetResourcesForUserImportance>;
73
-
74
57
  /**
75
58
  * Represents a digital resource of some kind.
76
59
  */
77
60
  export type GetResourcesForUserResource = {
78
61
  sourcedId: string;
79
- status: GetResourcesForUserStatus;
62
+ status: Status;
80
63
  dateLastModified?: Date | undefined;
81
64
  metadata?: { [k: string]: any } | null | undefined;
82
65
  title: string;
83
- roles?: Array<GetResourcesForUserRole> | undefined;
84
- importance?: GetResourcesForUserImportance | undefined;
66
+ roles?: Array<RoleType> | undefined;
67
+ importance?: Importance | undefined;
85
68
  vendorResourceId: string;
86
69
  vendorId?: string | null | undefined;
87
70
  applicationId?: string | null | undefined;
@@ -98,27 +81,6 @@ export type GetResourcesForUserResponse = {
98
81
  result: GetResourcesForUserResponseBody;
99
82
  };
100
83
 
101
- /** @internal */
102
- export const GetResourcesForUserOrderBy$inboundSchema: z.ZodNativeEnum<
103
- typeof GetResourcesForUserOrderBy
104
- > = z.nativeEnum(GetResourcesForUserOrderBy);
105
-
106
- /** @internal */
107
- export const GetResourcesForUserOrderBy$outboundSchema: z.ZodNativeEnum<
108
- typeof GetResourcesForUserOrderBy
109
- > = GetResourcesForUserOrderBy$inboundSchema;
110
-
111
- /**
112
- * @internal
113
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
114
- */
115
- export namespace GetResourcesForUserOrderBy$ {
116
- /** @deprecated use `GetResourcesForUserOrderBy$inboundSchema` instead. */
117
- export const inboundSchema = GetResourcesForUserOrderBy$inboundSchema;
118
- /** @deprecated use `GetResourcesForUserOrderBy$outboundSchema` instead. */
119
- export const outboundSchema = GetResourcesForUserOrderBy$outboundSchema;
120
- }
121
-
122
84
  /** @internal */
123
85
  export const GetResourcesForUserRequest$inboundSchema: z.ZodType<
124
86
  GetResourcesForUserRequest,
@@ -130,7 +92,7 @@ export const GetResourcesForUserRequest$inboundSchema: z.ZodType<
130
92
  limit: z.number().int().default(100),
131
93
  offset: z.number().int().default(0),
132
94
  sort: z.string().optional(),
133
- orderBy: GetResourcesForUserOrderBy$inboundSchema.optional(),
95
+ orderBy: OrderBy$inboundSchema.optional(),
134
96
  filter: z.string().optional(),
135
97
  search: z.string().optional(),
136
98
  });
@@ -158,7 +120,7 @@ export const GetResourcesForUserRequest$outboundSchema: z.ZodType<
158
120
  limit: z.number().int().default(100),
159
121
  offset: z.number().int().default(0),
160
122
  sort: z.string().optional(),
161
- orderBy: GetResourcesForUserOrderBy$outboundSchema.optional(),
123
+ orderBy: OrderBy$outboundSchema.optional(),
162
124
  filter: z.string().optional(),
163
125
  search: z.string().optional(),
164
126
  });
@@ -194,69 +156,6 @@ export function getResourcesForUserRequestFromJSON(
194
156
  );
195
157
  }
196
158
 
197
- /** @internal */
198
- export const GetResourcesForUserStatus$inboundSchema: z.ZodNativeEnum<
199
- typeof GetResourcesForUserStatus
200
- > = z.nativeEnum(GetResourcesForUserStatus);
201
-
202
- /** @internal */
203
- export const GetResourcesForUserStatus$outboundSchema: z.ZodNativeEnum<
204
- typeof GetResourcesForUserStatus
205
- > = GetResourcesForUserStatus$inboundSchema;
206
-
207
- /**
208
- * @internal
209
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
210
- */
211
- export namespace GetResourcesForUserStatus$ {
212
- /** @deprecated use `GetResourcesForUserStatus$inboundSchema` instead. */
213
- export const inboundSchema = GetResourcesForUserStatus$inboundSchema;
214
- /** @deprecated use `GetResourcesForUserStatus$outboundSchema` instead. */
215
- export const outboundSchema = GetResourcesForUserStatus$outboundSchema;
216
- }
217
-
218
- /** @internal */
219
- export const GetResourcesForUserRole$inboundSchema: z.ZodNativeEnum<
220
- typeof GetResourcesForUserRole
221
- > = z.nativeEnum(GetResourcesForUserRole);
222
-
223
- /** @internal */
224
- export const GetResourcesForUserRole$outboundSchema: z.ZodNativeEnum<
225
- typeof GetResourcesForUserRole
226
- > = GetResourcesForUserRole$inboundSchema;
227
-
228
- /**
229
- * @internal
230
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
231
- */
232
- export namespace GetResourcesForUserRole$ {
233
- /** @deprecated use `GetResourcesForUserRole$inboundSchema` instead. */
234
- export const inboundSchema = GetResourcesForUserRole$inboundSchema;
235
- /** @deprecated use `GetResourcesForUserRole$outboundSchema` instead. */
236
- export const outboundSchema = GetResourcesForUserRole$outboundSchema;
237
- }
238
-
239
- /** @internal */
240
- export const GetResourcesForUserImportance$inboundSchema: z.ZodNativeEnum<
241
- typeof GetResourcesForUserImportance
242
- > = z.nativeEnum(GetResourcesForUserImportance);
243
-
244
- /** @internal */
245
- export const GetResourcesForUserImportance$outboundSchema: z.ZodNativeEnum<
246
- typeof GetResourcesForUserImportance
247
- > = GetResourcesForUserImportance$inboundSchema;
248
-
249
- /**
250
- * @internal
251
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
252
- */
253
- export namespace GetResourcesForUserImportance$ {
254
- /** @deprecated use `GetResourcesForUserImportance$inboundSchema` instead. */
255
- export const inboundSchema = GetResourcesForUserImportance$inboundSchema;
256
- /** @deprecated use `GetResourcesForUserImportance$outboundSchema` instead. */
257
- export const outboundSchema = GetResourcesForUserImportance$outboundSchema;
258
- }
259
-
260
159
  /** @internal */
261
160
  export const GetResourcesForUserResource$inboundSchema: z.ZodType<
262
161
  GetResourcesForUserResource,
@@ -264,7 +163,7 @@ export const GetResourcesForUserResource$inboundSchema: z.ZodType<
264
163
  unknown
265
164
  > = z.object({
266
165
  sourcedId: z.string(),
267
- status: GetResourcesForUserStatus$inboundSchema,
166
+ status: Status$inboundSchema,
268
167
  dateLastModified: z
269
168
  .string()
270
169
  .datetime({ offset: true })
@@ -272,8 +171,8 @@ export const GetResourcesForUserResource$inboundSchema: z.ZodType<
272
171
  .optional(),
273
172
  metadata: z.nullable(z.record(z.any())).optional(),
274
173
  title: z.string(),
275
- roles: z.array(GetResourcesForUserRole$inboundSchema).optional(),
276
- importance: GetResourcesForUserImportance$inboundSchema.optional(),
174
+ roles: z.array(RoleType$inboundSchema).optional(),
175
+ importance: Importance$inboundSchema.optional(),
277
176
  vendorResourceId: z.string(),
278
177
  vendorId: z.nullable(z.string()).optional(),
279
178
  applicationId: z.nullable(z.string()).optional(),
@@ -300,15 +199,15 @@ export const GetResourcesForUserResource$outboundSchema: z.ZodType<
300
199
  GetResourcesForUserResource
301
200
  > = z.object({
302
201
  sourcedId: z.string(),
303
- status: GetResourcesForUserStatus$outboundSchema,
202
+ status: Status$outboundSchema,
304
203
  dateLastModified: z
305
204
  .date()
306
205
  .transform((v) => v.toISOString())
307
206
  .optional(),
308
207
  metadata: z.nullable(z.record(z.any())).optional(),
309
208
  title: z.string(),
310
- roles: z.array(GetResourcesForUserRole$outboundSchema).optional(),
311
- importance: GetResourcesForUserImportance$outboundSchema.optional(),
209
+ roles: z.array(RoleType$outboundSchema).optional(),
210
+ importance: Importance$outboundSchema.optional(),
312
211
  vendorResourceId: z.string(),
313
212
  vendorId: z.nullable(z.string()).optional(),
314
213
  applicationId: z.nullable(z.string()).optional(),
@@ -1,10 +1,23 @@
1
1
  import * as z from 'zod';
2
2
 
3
3
  import { safeParse } from '../../lib/schemas.js';
4
- import { ClosedEnum } from '../../types/enums.js';
5
4
  import { Result as SafeParseResult } from '../../types/fp.js';
6
5
  import * as components from '../components/index.js';
7
6
  import { SDKValidationError } from '../errors/sdkvalidationerror.js';
7
+ import {
8
+ EntityType,
9
+ EntityType$inboundSchema,
10
+ EntityType$outboundSchema,
11
+ RoleType,
12
+ RoleType$inboundSchema,
13
+ RoleType$outboundSchema,
14
+ Status,
15
+ Status$inboundSchema,
16
+ Status$outboundSchema,
17
+ UserRole,
18
+ UserRole$inboundSchema,
19
+ UserRole$outboundSchema,
20
+ } from '../shared/enums.js';
8
21
 
9
22
  export type GetStudentRequest = {
10
23
  /**
@@ -13,35 +26,11 @@ export type GetStudentRequest = {
13
26
  sourcedId: string;
14
27
  };
15
28
 
16
- export const GetStudentStatus = {
17
- Active: 'active',
18
- Tobedeleted: 'tobedeleted',
19
- } as const;
20
- export type GetStudentStatus = ClosedEnum<typeof GetStudentStatus>;
21
-
22
29
  export type GetStudentUserId = {
23
30
  type: string;
24
31
  identifier: string;
25
32
  };
26
33
 
27
- export const GetStudentRoleType = {
28
- Primary: 'primary',
29
- Secondary: 'secondary',
30
- } as const;
31
- export type GetStudentRoleType = ClosedEnum<typeof GetStudentRoleType>;
32
-
33
- export const GetStudentRoleEnum = {
34
- Administrator: 'administrator',
35
- Aide: 'aide',
36
- Guardian: 'guardian',
37
- Parent: 'parent',
38
- Proctor: 'proctor',
39
- Relative: 'relative',
40
- Student: 'student',
41
- Teacher: 'teacher',
42
- } as const;
43
- export type GetStudentRoleEnum = ClosedEnum<typeof GetStudentRoleEnum>;
44
-
45
34
  export type GetStudentOrg = {
46
35
  href: string;
47
36
  sourcedId: string;
@@ -49,41 +38,18 @@ export type GetStudentOrg = {
49
38
  };
50
39
 
51
40
  export type GetStudentRole = {
52
- roleType: GetStudentRoleType;
53
- role: GetStudentRoleEnum;
41
+ roleType: RoleType;
42
+ role: UserRole;
54
43
  org: GetStudentOrg;
55
44
  userProfile?: string | undefined;
56
45
  beginDate: string | null;
57
46
  endDate: string | null;
58
47
  };
59
48
 
60
- export const GetStudentType = {
61
- AcademicSession: 'academicSession',
62
- AssessmentLineItem: 'assessmentLineItem',
63
- Category: 'category',
64
- Class: 'class',
65
- Course: 'course',
66
- Demographics: 'demographics',
67
- Enrollment: 'enrollment',
68
- GradingPeriod: 'gradingPeriod',
69
- LineItem: 'lineItem',
70
- Org: 'org',
71
- Resource: 'resource',
72
- Result: 'result',
73
- ScoreScale: 'scoreScale',
74
- Student: 'student',
75
- Teacher: 'teacher',
76
- Term: 'term',
77
- User: 'user',
78
- ComponentResource: 'componentResource',
79
- CourseComponent: 'courseComponent',
80
- } as const;
81
- export type GetStudentType = ClosedEnum<typeof GetStudentType>;
82
-
83
49
  export type GetStudentAgent = {
84
50
  href: string;
85
51
  sourcedId: string;
86
- type: GetStudentType;
52
+ type: EntityType;
87
53
  };
88
54
 
89
55
  export type GetStudentPrimaryOrg = {
@@ -94,7 +60,7 @@ export type GetStudentPrimaryOrg = {
94
60
 
95
61
  export type GetStudentUser = {
96
62
  sourcedId: string;
97
- status: GetStudentStatus;
63
+ status: Status;
98
64
  dateLastModified?: Date | undefined;
99
65
  metadata?: { [k: string]: any } | null | undefined;
100
66
  userMasterIdentifier?: string | null | undefined;
@@ -173,25 +139,6 @@ export function getStudentRequestFromJSON(
173
139
  );
174
140
  }
175
141
 
176
- /** @internal */
177
- export const GetStudentStatus$inboundSchema: z.ZodNativeEnum<typeof GetStudentStatus> =
178
- z.nativeEnum(GetStudentStatus);
179
-
180
- /** @internal */
181
- export const GetStudentStatus$outboundSchema: z.ZodNativeEnum<typeof GetStudentStatus> =
182
- GetStudentStatus$inboundSchema;
183
-
184
- /**
185
- * @internal
186
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
187
- */
188
- export namespace GetStudentStatus$ {
189
- /** @deprecated use `GetStudentStatus$inboundSchema` instead. */
190
- export const inboundSchema = GetStudentStatus$inboundSchema;
191
- /** @deprecated use `GetStudentStatus$outboundSchema` instead. */
192
- export const outboundSchema = GetStudentStatus$outboundSchema;
193
- }
194
-
195
142
  /** @internal */
196
143
  export const GetStudentUserId$inboundSchema: z.ZodType<GetStudentUserId, z.ZodTypeDef, unknown> =
197
144
  z.object({
@@ -242,44 +189,6 @@ export function getStudentUserIdFromJSON(
242
189
  );
243
190
  }
244
191
 
245
- /** @internal */
246
- export const GetStudentRoleType$inboundSchema: z.ZodNativeEnum<typeof GetStudentRoleType> =
247
- z.nativeEnum(GetStudentRoleType);
248
-
249
- /** @internal */
250
- export const GetStudentRoleType$outboundSchema: z.ZodNativeEnum<typeof GetStudentRoleType> =
251
- GetStudentRoleType$inboundSchema;
252
-
253
- /**
254
- * @internal
255
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
256
- */
257
- export namespace GetStudentRoleType$ {
258
- /** @deprecated use `GetStudentRoleType$inboundSchema` instead. */
259
- export const inboundSchema = GetStudentRoleType$inboundSchema;
260
- /** @deprecated use `GetStudentRoleType$outboundSchema` instead. */
261
- export const outboundSchema = GetStudentRoleType$outboundSchema;
262
- }
263
-
264
- /** @internal */
265
- export const GetStudentRoleEnum$inboundSchema: z.ZodNativeEnum<typeof GetStudentRoleEnum> =
266
- z.nativeEnum(GetStudentRoleEnum);
267
-
268
- /** @internal */
269
- export const GetStudentRoleEnum$outboundSchema: z.ZodNativeEnum<typeof GetStudentRoleEnum> =
270
- GetStudentRoleEnum$inboundSchema;
271
-
272
- /**
273
- * @internal
274
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
275
- */
276
- export namespace GetStudentRoleEnum$ {
277
- /** @deprecated use `GetStudentRoleEnum$inboundSchema` instead. */
278
- export const inboundSchema = GetStudentRoleEnum$inboundSchema;
279
- /** @deprecated use `GetStudentRoleEnum$outboundSchema` instead. */
280
- export const outboundSchema = GetStudentRoleEnum$outboundSchema;
281
- }
282
-
283
192
  /** @internal */
284
193
  export const GetStudentOrg$inboundSchema: z.ZodType<GetStudentOrg, z.ZodTypeDef, unknown> =
285
194
  z.object({
@@ -336,8 +245,8 @@ export function getStudentOrgFromJSON(
336
245
  /** @internal */
337
246
  export const GetStudentRole$inboundSchema: z.ZodType<GetStudentRole, z.ZodTypeDef, unknown> =
338
247
  z.object({
339
- roleType: GetStudentRoleType$inboundSchema,
340
- role: GetStudentRoleEnum$inboundSchema,
248
+ roleType: RoleType$inboundSchema,
249
+ role: UserRole$inboundSchema,
341
250
  org: z.lazy(() => GetStudentOrg$inboundSchema),
342
251
  userProfile: z.string().optional(),
343
252
  beginDate: z.nullable(z.string()),
@@ -360,8 +269,8 @@ export const GetStudentRole$outboundSchema: z.ZodType<
360
269
  z.ZodTypeDef,
361
270
  GetStudentRole
362
271
  > = z.object({
363
- roleType: GetStudentRoleType$outboundSchema,
364
- role: GetStudentRoleEnum$outboundSchema,
272
+ roleType: RoleType$outboundSchema,
273
+ role: UserRole$outboundSchema,
365
274
  org: z.lazy(() => GetStudentOrg$outboundSchema),
366
275
  userProfile: z.string().optional(),
367
276
  beginDate: z.nullable(z.string()),
@@ -395,31 +304,12 @@ export function getStudentRoleFromJSON(
395
304
  );
396
305
  }
397
306
 
398
- /** @internal */
399
- export const GetStudentType$inboundSchema: z.ZodNativeEnum<typeof GetStudentType> =
400
- z.nativeEnum(GetStudentType);
401
-
402
- /** @internal */
403
- export const GetStudentType$outboundSchema: z.ZodNativeEnum<typeof GetStudentType> =
404
- GetStudentType$inboundSchema;
405
-
406
- /**
407
- * @internal
408
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
409
- */
410
- export namespace GetStudentType$ {
411
- /** @deprecated use `GetStudentType$inboundSchema` instead. */
412
- export const inboundSchema = GetStudentType$inboundSchema;
413
- /** @deprecated use `GetStudentType$outboundSchema` instead. */
414
- export const outboundSchema = GetStudentType$outboundSchema;
415
- }
416
-
417
307
  /** @internal */
418
308
  export const GetStudentAgent$inboundSchema: z.ZodType<GetStudentAgent, z.ZodTypeDef, unknown> =
419
309
  z.object({
420
310
  href: z.string(),
421
311
  sourcedId: z.string(),
422
- type: GetStudentType$inboundSchema,
312
+ type: EntityType$inboundSchema,
423
313
  });
424
314
 
425
315
  /** @internal */
@@ -437,7 +327,7 @@ export const GetStudentAgent$outboundSchema: z.ZodType<
437
327
  > = z.object({
438
328
  href: z.string(),
439
329
  sourcedId: z.string(),
440
- type: GetStudentType$outboundSchema,
330
+ type: EntityType$outboundSchema,
441
331
  });
442
332
 
443
333
  /**
@@ -527,7 +417,7 @@ export function getStudentPrimaryOrgFromJSON(
527
417
  export const GetStudentUser$inboundSchema: z.ZodType<GetStudentUser, z.ZodTypeDef, unknown> =
528
418
  z.object({
529
419
  sourcedId: z.string(),
530
- status: GetStudentStatus$inboundSchema,
420
+ status: Status$inboundSchema,
531
421
  dateLastModified: z
532
422
  .string()
533
423
  .datetime({ offset: true })
@@ -591,7 +481,7 @@ export const GetStudentUser$outboundSchema: z.ZodType<
591
481
  GetStudentUser
592
482
  > = z.object({
593
483
  sourcedId: z.string(),
594
- status: GetStudentStatus$outboundSchema,
484
+ status: Status$outboundSchema,
595
485
  dateLastModified: z
596
486
  .date()
597
487
  .transform((v) => v.toISOString())