@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.
- package/FUNCTIONS.md +232 -0
- package/README.md +493 -334
- package/bin/mcp-server.js +338 -1328
- package/bin/mcp-server.js.map +22 -21
- package/dist/commonjs/enums/index.d.ts +2 -0
- package/dist/commonjs/enums/index.d.ts.map +1 -0
- package/dist/commonjs/enums/index.js +18 -0
- package/dist/commonjs/enums/index.js.map +1 -0
- package/dist/commonjs/index.d.ts +4 -0
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +41 -1
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/models/errors/index.d.ts +1 -0
- package/dist/commonjs/models/errors/index.d.ts.map +1 -1
- package/dist/commonjs/models/errors/index.js +1 -0
- package/dist/commonjs/models/errors/index.js.map +1 -1
- package/dist/commonjs/models/index.d.ts +2 -0
- package/dist/commonjs/models/index.d.ts.map +1 -0
- package/dist/commonjs/models/index.js +18 -0
- package/dist/commonjs/models/index.js.map +1 -0
- package/dist/commonjs/models/operations/createuser.d.ts +8 -270
- package/dist/commonjs/models/operations/createuser.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createuser.js +17 -178
- package/dist/commonjs/models/operations/createuser.js.map +1 -1
- package/dist/commonjs/models/operations/getallstudents.d.ts +6 -206
- package/dist/commonjs/models/operations/getallstudents.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getallstudents.js +12 -132
- package/dist/commonjs/models/operations/getallstudents.js.map +1 -1
- package/dist/commonjs/models/operations/getallteachers.d.ts +6 -206
- package/dist/commonjs/models/operations/getallteachers.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getallteachers.js +12 -132
- package/dist/commonjs/models/operations/getallteachers.js.map +1 -1
- package/dist/commonjs/models/operations/getallusers.d.ts +6 -206
- package/dist/commonjs/models/operations/getallusers.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getallusers.js +12 -132
- package/dist/commonjs/models/operations/getallusers.js.map +1 -1
- package/dist/commonjs/models/operations/getclassesforuser.d.ts +4 -85
- package/dist/commonjs/models/operations/getclassesforuser.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getclassesforuser.js +8 -67
- package/dist/commonjs/models/operations/getclassesforuser.js.map +1 -1
- package/dist/commonjs/models/operations/getresourcesforuser.d.ts +5 -111
- package/dist/commonjs/models/operations/getresourcesforuser.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getresourcesforuser.js +10 -88
- package/dist/commonjs/models/operations/getresourcesforuser.js.map +1 -1
- package/dist/commonjs/models/operations/getstudent.d.ts +5 -174
- package/dist/commonjs/models/operations/getstudent.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getstudent.js +10 -108
- package/dist/commonjs/models/operations/getstudent.js.map +1 -1
- package/dist/commonjs/models/operations/getstudentsforclass.d.ts +6 -206
- package/dist/commonjs/models/operations/getstudentsforclass.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getstudentsforclass.js +12 -132
- package/dist/commonjs/models/operations/getstudentsforclass.js.map +1 -1
- package/dist/commonjs/models/operations/getstudentsforclassinschool.d.ts +6 -206
- package/dist/commonjs/models/operations/getstudentsforclassinschool.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getstudentsforclassinschool.js +12 -132
- package/dist/commonjs/models/operations/getstudentsforclassinschool.js.map +1 -1
- package/dist/commonjs/models/operations/getstudentsforschool.d.ts +6 -206
- package/dist/commonjs/models/operations/getstudentsforschool.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getstudentsforschool.js +12 -132
- package/dist/commonjs/models/operations/getstudentsforschool.js.map +1 -1
- package/dist/commonjs/models/operations/getteacher.d.ts +5 -174
- package/dist/commonjs/models/operations/getteacher.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getteacher.js +10 -108
- package/dist/commonjs/models/operations/getteacher.js.map +1 -1
- package/dist/commonjs/models/operations/getteachersforclass.d.ts +6 -206
- package/dist/commonjs/models/operations/getteachersforclass.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getteachersforclass.js +12 -132
- package/dist/commonjs/models/operations/getteachersforclass.js.map +1 -1
- package/dist/commonjs/models/operations/getteachersforclassinschool.d.ts +6 -206
- package/dist/commonjs/models/operations/getteachersforclassinschool.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getteachersforclassinschool.js +12 -132
- package/dist/commonjs/models/operations/getteachersforclassinschool.js.map +1 -1
- package/dist/commonjs/models/operations/getteachersforschool.d.ts +6 -206
- package/dist/commonjs/models/operations/getteachersforschool.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getteachersforschool.js +12 -132
- package/dist/commonjs/models/operations/getteachersforschool.js.map +1 -1
- package/dist/commonjs/models/operations/getuser.d.ts +5 -174
- package/dist/commonjs/models/operations/getuser.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getuser.js +10 -108
- package/dist/commonjs/models/operations/getuser.js.map +1 -1
- package/dist/commonjs/models/operations/getuserwithdemographics.d.ts +5 -174
- package/dist/commonjs/models/operations/getuserwithdemographics.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getuserwithdemographics.js +10 -108
- package/dist/commonjs/models/operations/getuserwithdemographics.js.map +1 -1
- package/dist/commonjs/models/operations/updateuser.d.ts +8 -270
- package/dist/commonjs/models/operations/updateuser.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updateuser.js +17 -178
- package/dist/commonjs/models/operations/updateuser.js.map +1 -1
- package/dist/commonjs/models/shared/enums.d.ts +440 -0
- package/dist/commonjs/models/shared/enums.d.ts.map +1 -0
- package/dist/commonjs/models/shared/enums.js +499 -0
- package/dist/commonjs/models/shared/enums.js.map +1 -0
- package/dist/commonjs/models/shared/index.d.ts +8 -0
- package/dist/commonjs/models/shared/index.d.ts.map +1 -0
- package/dist/commonjs/models/shared/index.js +24 -0
- package/dist/commonjs/models/shared/index.js.map +1 -0
- package/dist/commonjs/types/index.d.ts +1 -0
- package/dist/commonjs/types/index.d.ts.map +1 -1
- package/dist/commonjs/types/index.js +16 -0
- package/dist/commonjs/types/index.js.map +1 -1
- package/dist/esm/enums/index.d.ts +2 -0
- package/dist/esm/enums/index.d.ts.map +1 -0
- package/dist/esm/enums/index.js +2 -0
- package/dist/esm/enums/index.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +14 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/models/errors/index.d.ts +1 -0
- package/dist/esm/models/errors/index.d.ts.map +1 -1
- package/dist/esm/models/errors/index.js +1 -0
- package/dist/esm/models/errors/index.js.map +1 -1
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.d.ts.map +1 -0
- package/dist/esm/models/index.js +2 -0
- package/dist/esm/models/index.js.map +1 -0
- package/dist/esm/models/operations/createuser.d.ts +8 -270
- package/dist/esm/models/operations/createuser.d.ts.map +1 -1
- package/dist/esm/models/operations/createuser.js +15 -176
- package/dist/esm/models/operations/createuser.js.map +1 -1
- package/dist/esm/models/operations/getallstudents.d.ts +6 -206
- package/dist/esm/models/operations/getallstudents.d.ts.map +1 -1
- package/dist/esm/models/operations/getallstudents.js +11 -131
- package/dist/esm/models/operations/getallstudents.js.map +1 -1
- package/dist/esm/models/operations/getallteachers.d.ts +6 -206
- package/dist/esm/models/operations/getallteachers.d.ts.map +1 -1
- package/dist/esm/models/operations/getallteachers.js +11 -131
- package/dist/esm/models/operations/getallteachers.js.map +1 -1
- package/dist/esm/models/operations/getallusers.d.ts +6 -206
- package/dist/esm/models/operations/getallusers.d.ts.map +1 -1
- package/dist/esm/models/operations/getallusers.js +11 -131
- package/dist/esm/models/operations/getallusers.js.map +1 -1
- package/dist/esm/models/operations/getclassesforuser.d.ts +4 -85
- package/dist/esm/models/operations/getclassesforuser.d.ts.map +1 -1
- package/dist/esm/models/operations/getclassesforuser.js +7 -66
- package/dist/esm/models/operations/getclassesforuser.js.map +1 -1
- package/dist/esm/models/operations/getresourcesforuser.d.ts +5 -111
- package/dist/esm/models/operations/getresourcesforuser.d.ts.map +1 -1
- package/dist/esm/models/operations/getresourcesforuser.js +9 -87
- package/dist/esm/models/operations/getresourcesforuser.js.map +1 -1
- package/dist/esm/models/operations/getstudent.d.ts +5 -174
- package/dist/esm/models/operations/getstudent.d.ts.map +1 -1
- package/dist/esm/models/operations/getstudent.js +9 -107
- package/dist/esm/models/operations/getstudent.js.map +1 -1
- package/dist/esm/models/operations/getstudentsforclass.d.ts +6 -206
- package/dist/esm/models/operations/getstudentsforclass.d.ts.map +1 -1
- package/dist/esm/models/operations/getstudentsforclass.js +11 -131
- package/dist/esm/models/operations/getstudentsforclass.js.map +1 -1
- package/dist/esm/models/operations/getstudentsforclassinschool.d.ts +6 -206
- package/dist/esm/models/operations/getstudentsforclassinschool.d.ts.map +1 -1
- package/dist/esm/models/operations/getstudentsforclassinschool.js +11 -131
- package/dist/esm/models/operations/getstudentsforclassinschool.js.map +1 -1
- package/dist/esm/models/operations/getstudentsforschool.d.ts +6 -206
- package/dist/esm/models/operations/getstudentsforschool.d.ts.map +1 -1
- package/dist/esm/models/operations/getstudentsforschool.js +11 -131
- package/dist/esm/models/operations/getstudentsforschool.js.map +1 -1
- package/dist/esm/models/operations/getteacher.d.ts +5 -174
- package/dist/esm/models/operations/getteacher.d.ts.map +1 -1
- package/dist/esm/models/operations/getteacher.js +9 -107
- package/dist/esm/models/operations/getteacher.js.map +1 -1
- package/dist/esm/models/operations/getteachersforclass.d.ts +6 -206
- package/dist/esm/models/operations/getteachersforclass.d.ts.map +1 -1
- package/dist/esm/models/operations/getteachersforclass.js +11 -131
- package/dist/esm/models/operations/getteachersforclass.js.map +1 -1
- package/dist/esm/models/operations/getteachersforclassinschool.d.ts +6 -206
- package/dist/esm/models/operations/getteachersforclassinschool.d.ts.map +1 -1
- package/dist/esm/models/operations/getteachersforclassinschool.js +11 -131
- package/dist/esm/models/operations/getteachersforclassinschool.js.map +1 -1
- package/dist/esm/models/operations/getteachersforschool.d.ts +6 -206
- package/dist/esm/models/operations/getteachersforschool.d.ts.map +1 -1
- package/dist/esm/models/operations/getteachersforschool.js +11 -131
- package/dist/esm/models/operations/getteachersforschool.js.map +1 -1
- package/dist/esm/models/operations/getuser.d.ts +5 -174
- package/dist/esm/models/operations/getuser.d.ts.map +1 -1
- package/dist/esm/models/operations/getuser.js +9 -107
- package/dist/esm/models/operations/getuser.js.map +1 -1
- package/dist/esm/models/operations/getuserwithdemographics.d.ts +5 -174
- package/dist/esm/models/operations/getuserwithdemographics.d.ts.map +1 -1
- package/dist/esm/models/operations/getuserwithdemographics.js +9 -107
- package/dist/esm/models/operations/getuserwithdemographics.js.map +1 -1
- package/dist/esm/models/operations/updateuser.d.ts +8 -270
- package/dist/esm/models/operations/updateuser.d.ts.map +1 -1
- package/dist/esm/models/operations/updateuser.js +15 -176
- package/dist/esm/models/operations/updateuser.js.map +1 -1
- package/dist/esm/models/shared/enums.d.ts +440 -0
- package/dist/esm/models/shared/enums.d.ts.map +1 -0
- package/dist/esm/models/shared/enums.js +462 -0
- package/dist/esm/models/shared/enums.js.map +1 -0
- package/dist/esm/models/shared/index.d.ts +8 -0
- package/dist/esm/models/shared/index.d.ts.map +1 -0
- package/dist/esm/models/shared/index.js +8 -0
- package/dist/esm/models/shared/index.js.map +1 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/esm/types/index.d.ts.map +1 -1
- package/dist/esm/types/index.js +2 -0
- package/dist/esm/types/index.js.map +1 -1
- package/package.json +37 -64
- package/src/enums/index.ts +1 -0
- package/src/index.ts +44 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/index.ts +1 -0
- package/src/models/operations/createuser.ts +35 -238
- package/src/models/operations/getallstudents.ts +32 -170
- package/src/models/operations/getallteachers.ts +32 -170
- package/src/models/operations/getallusers.ts +32 -170
- package/src/models/operations/getclassesforuser.ts +20 -97
- package/src/models/operations/getresourcesforuser.ts +26 -127
- package/src/models/operations/getstudent.ts +26 -136
- package/src/models/operations/getstudentsforclass.ts +32 -180
- package/src/models/operations/getstudentsforclassinschool.ts +32 -188
- package/src/models/operations/getstudentsforschool.ts +32 -180
- package/src/models/operations/getteacher.ts +26 -136
- package/src/models/operations/getteachersforclass.ts +32 -180
- package/src/models/operations/getteachersforclassinschool.ts +32 -188
- package/src/models/operations/getteachersforschool.ts +32 -180
- package/src/models/operations/getuser.ts +26 -136
- package/src/models/operations/getuserwithdemographics.ts +26 -144
- package/src/models/operations/updateuser.ts +35 -238
- package/src/models/shared/enums.ts +567 -0
- package/src/models/shared/index.ts +8 -0
- package/src/types/index.ts +3 -0
- package/test/classlink.test.ts +26 -26
- package/vitest.config.ts +2 -2
- package/test/summary-reporter.ts +0 -114
|
@@ -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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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?:
|
|
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:
|
|
62
|
+
status: Status;
|
|
80
63
|
dateLastModified?: Date | undefined;
|
|
81
64
|
metadata?: { [k: string]: any } | null | undefined;
|
|
82
65
|
title: string;
|
|
83
|
-
roles?: Array<
|
|
84
|
-
importance?:
|
|
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:
|
|
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:
|
|
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:
|
|
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(
|
|
276
|
-
importance:
|
|
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:
|
|
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(
|
|
311
|
-
importance:
|
|
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:
|
|
53
|
-
role:
|
|
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:
|
|
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:
|
|
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:
|
|
340
|
-
role:
|
|
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:
|
|
364
|
-
role:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
484
|
+
status: Status$outboundSchema,
|
|
595
485
|
dateLastModified: z
|
|
596
486
|
.date()
|
|
597
487
|
.transform((v) => v.toISOString())
|