@timeback/oneroster 0.1.1 → 0.1.3
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/dist/errors.js +93 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15336 -180
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/pagination.d.ts +3 -0
- package/dist/lib/pagination.d.ts.map +1 -1
- package/dist/lib/validation.d.ts +21 -0
- package/dist/lib/validation.d.ts.map +1 -0
- package/dist/resources/assessment/line-items.d.ts.map +1 -1
- package/dist/resources/assessment/results.d.ts +6 -1
- package/dist/resources/assessment/results.d.ts.map +1 -1
- package/dist/resources/base.d.ts +41 -2
- package/dist/resources/base.d.ts.map +1 -1
- package/dist/resources/gradebook/categories.d.ts +5 -1
- package/dist/resources/gradebook/categories.d.ts.map +1 -1
- package/dist/resources/gradebook/line-items.d.ts.map +1 -1
- package/dist/resources/gradebook/results.d.ts +8 -3
- package/dist/resources/gradebook/results.d.ts.map +1 -1
- package/dist/resources/gradebook/score-scales.d.ts +5 -1
- package/dist/resources/gradebook/score-scales.d.ts.map +1 -1
- package/dist/resources/resources/resources.d.ts.map +1 -1
- package/dist/resources/resources/resources.type-test.d.ts +2 -0
- package/dist/resources/resources/resources.type-test.d.ts.map +1 -0
- package/dist/resources/rostering/academic-sessions.d.ts +8 -1
- package/dist/resources/rostering/academic-sessions.d.ts.map +1 -1
- package/dist/resources/rostering/classes.d.ts +3 -1
- package/dist/resources/rostering/classes.d.ts.map +1 -1
- package/dist/resources/rostering/courses.d.ts +1 -1
- package/dist/resources/rostering/courses.d.ts.map +1 -1
- package/dist/resources/rostering/demographics.d.ts +5 -1
- package/dist/resources/rostering/demographics.d.ts.map +1 -1
- package/dist/resources/rostering/enrollments.d.ts +7 -1
- package/dist/resources/rostering/enrollments.d.ts.map +1 -1
- package/dist/resources/rostering/orgs.d.ts +5 -1
- package/dist/resources/rostering/orgs.d.ts.map +1 -1
- package/dist/resources/rostering/schools.d.ts +2 -1
- package/dist/resources/rostering/schools.d.ts.map +1 -1
- package/dist/resources/rostering/users.d.ts +6 -1
- package/dist/resources/rostering/users.d.ts.map +1 -1
- package/dist/types/callable.d.ts +5 -7
- package/dist/types/callable.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -10
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/streamable.d.ts +36 -0
- package/dist/types/streamable.d.ts.map +1 -0
- package/package.json +3 -2
- package/dist/types/base.d.ts +0 -137
- package/dist/types/base.d.ts.map +0 -1
- package/dist/types/filters.d.ts +0 -165
- package/dist/types/filters.d.ts.map +0 -1
- package/dist/types/gradebook.d.ts +0 -262
- package/dist/types/gradebook.d.ts.map +0 -1
- package/dist/types/resources.d.ts +0 -191
- package/dist/types/resources.d.ts.map +0 -1
- package/dist/types/rostering.d.ts +0 -732
- package/dist/types/rostering.d.ts.map +0 -1
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Access all users regardless of role.
|
|
5
5
|
*/
|
|
6
|
+
import type { AgentInput } from '@timeback/types/zod';
|
|
6
7
|
import { Paginator } from '../../lib';
|
|
7
8
|
import type { ListParams } from '@timeback/internal-client-infra';
|
|
8
|
-
import type {
|
|
9
|
+
import type { Class, ClassFilterFields, CredentialCreateResponse, DecryptedCredential, OneRosterTransportLike, Resource, ResourceFilterFields, StudentsCallable, TeachersCallable, User, UserProfileCredential, UsersCallable } from '../../types';
|
|
9
10
|
/**
|
|
10
11
|
* Scoped resource for operations on a specific user.
|
|
11
12
|
*
|
|
@@ -80,6 +81,7 @@ export declare class ScopedUserResource {
|
|
|
80
81
|
*
|
|
81
82
|
* @param data - Agent input with the agent user reference
|
|
82
83
|
* @returns Promise resolving when complete
|
|
84
|
+
* @throws {InputValidationError} If agentSourcedId is empty
|
|
83
85
|
*/
|
|
84
86
|
addAgent(data: AgentInput): Promise<void>;
|
|
85
87
|
/**
|
|
@@ -87,6 +89,7 @@ export declare class ScopedUserResource {
|
|
|
87
89
|
*
|
|
88
90
|
* @param agentSourcedId - The sourcedId of the agent to remove
|
|
89
91
|
* @returns Promise resolving when complete
|
|
92
|
+
* @throws {InputValidationError} If agentSourcedId is empty
|
|
90
93
|
*/
|
|
91
94
|
removeAgent(agentSourcedId: string): Promise<void>;
|
|
92
95
|
/**
|
|
@@ -94,6 +97,7 @@ export declare class ScopedUserResource {
|
|
|
94
97
|
*
|
|
95
98
|
* @param credential - Credential data to create
|
|
96
99
|
* @returns Response with userProfileId, credentialId, and message
|
|
100
|
+
* @throws {InputValidationError} If type or username is empty
|
|
97
101
|
*/
|
|
98
102
|
createCredential(credential: Partial<UserProfileCredential>): Promise<CredentialCreateResponse>;
|
|
99
103
|
/**
|
|
@@ -101,6 +105,7 @@ export declare class ScopedUserResource {
|
|
|
101
105
|
*
|
|
102
106
|
* @param credentialId - The credential ID to decrypt
|
|
103
107
|
* @returns Decrypted credential with password
|
|
108
|
+
* @throws {InputValidationError} If credentialId is empty
|
|
104
109
|
*/
|
|
105
110
|
decryptCredential(credentialId: string): Promise<DecryptedCredential>;
|
|
106
111
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../src/resources/rostering/users.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../src/resources/rostering/users.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,KAAK,EAAE,UAAU,EAAmB,MAAM,qBAAqB,CAAA;AAEtE,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAKrC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,KAAK,EACX,KAAK,EACL,iBAAiB,EACjB,wBAAwB,EACxB,mBAAmB,EACnB,sBAAsB,EACtB,QAAQ,EACR,oBAAoB,EACp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Aa,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAOzF;CACD;AA6BD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,sBAAsB,GAAG,gBAAgB,CAY1F;AA6BD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,sBAAsB,GAAG,gBAAgB,CAY1F"}
|
package/dist/types/callable.d.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* access collection-level operations.
|
|
7
7
|
*/
|
|
8
8
|
import type { ListParams } from '@timeback/internal-client-infra';
|
|
9
|
+
import type { AssessmentLineItemCreateInput, ClassCreateInput, ComponentResourceCreateInput, CourseComponentCreateInput, CourseCreateInput, CourseStructureInput, LineItemCreateInput, ResourceCreateInput, SchoolCreateInput, UserCreateInput } from '@timeback/types/zod';
|
|
9
10
|
import type { Paginator } from '../lib';
|
|
10
11
|
import type { ScopedAssessmentLineItemResource } from '../resources/assessment/line-items';
|
|
11
12
|
import type { ScopedLineItemResource } from '../resources/gradebook/line-items';
|
|
@@ -15,8 +16,7 @@ import type { ScopedClassResource } from '../resources/rostering/classes';
|
|
|
15
16
|
import type { ScopedCourseResource } from '../resources/rostering/courses';
|
|
16
17
|
import type { ScopedSchoolResource } from '../resources/rostering/schools';
|
|
17
18
|
import type { ScopedStudentResource, ScopedTeacherResource, ScopedUserResource } from '../resources/rostering/users';
|
|
18
|
-
import type { Base } from './
|
|
19
|
-
import type { AcademicSession, AcademicSessionFilterFields, AssessmentLineItem, AssessmentLineItemFilterFields, Class, ClassCreateInput, ClassFilterFields, ComponentResource, ComponentResourceCreateInput, ComponentResourceFilterFields, Course, CourseComponent, CourseComponentCreateInput, CourseComponentFilterFields, CourseCreateInput, CourseFilterFields, CourseStructureInput, CreateResponse, LineItem, LineItemCreateInput, LineItemFilterFields, Organization, OrganizationFilterFields, Resource, ResourceFilterFields, SchoolCreateInput, User, UserCreateInput, UserFilterFields } from './index';
|
|
19
|
+
import type { AcademicSession, AcademicSessionFilterFields, AssessmentLineItem, AssessmentLineItemFilterFields, Base, Class, ClassFilterFields, ComponentResource, ComponentResourceFilterFields, Course, CourseComponent, CourseComponentFilterFields, CourseFilterFields, CreateResponse, LineItem, LineItemFilterFields, Organization, OrganizationFilterFields, Resource, ResourceFilterFields, User, UserFilterFields } from './index';
|
|
20
20
|
/**
|
|
21
21
|
* Base interface for callable resources.
|
|
22
22
|
* Resources that support scoping by ID implement this pattern.
|
|
@@ -208,9 +208,7 @@ export type TermsCallable = ReadOnlyCallableResource<AcademicSession, AcademicSe
|
|
|
208
208
|
* const results = await client.lineItems(lineItemId).results()
|
|
209
209
|
* ```
|
|
210
210
|
*/
|
|
211
|
-
export interface LineItemsCallable extends CallableResource<LineItem, LineItemFilterFields, ScopedLineItemResource> {
|
|
212
|
-
/** Create a new line item */
|
|
213
|
-
create(data: LineItemCreateInput): Promise<CreateResponse>;
|
|
211
|
+
export interface LineItemsCallable extends CallableResource<LineItem, LineItemFilterFields, ScopedLineItemResource, LineItemCreateInput> {
|
|
214
212
|
}
|
|
215
213
|
/**
|
|
216
214
|
* Callable assessment line items resource.
|
|
@@ -225,7 +223,7 @@ export interface LineItemsCallable extends CallableResource<LineItem, LineItemFi
|
|
|
225
223
|
* await client.assessmentLineItems.patch(id, { score: 95 })
|
|
226
224
|
* ```
|
|
227
225
|
*/
|
|
228
|
-
export interface AssessmentLineItemsCallable extends CallableResource<AssessmentLineItem, AssessmentLineItemFilterFields, ScopedAssessmentLineItemResource> {
|
|
226
|
+
export interface AssessmentLineItemsCallable extends CallableResource<AssessmentLineItem, AssessmentLineItemFilterFields, ScopedAssessmentLineItemResource, AssessmentLineItemCreateInput> {
|
|
229
227
|
/** Partially update an assessment line item (only specified fields are changed) */
|
|
230
228
|
patch(id: string, data: Partial<AssessmentLineItem>): Promise<void>;
|
|
231
229
|
}
|
|
@@ -247,7 +245,7 @@ export interface AssessmentLineItemsCallable extends CallableResource<Assessment
|
|
|
247
245
|
* await client.resources.export(resourceId)
|
|
248
246
|
* ```
|
|
249
247
|
*/
|
|
250
|
-
export interface ResourcesCallable extends CallableResource<Resource, ResourceFilterFields, ScopedResourceResource> {
|
|
248
|
+
export interface ResourcesCallable extends CallableResource<Resource, ResourceFilterFields, ScopedResourceResource, ResourceCreateInput> {
|
|
251
249
|
/** Export a resource to Common Cartridge (.zip) as an ArrayBuffer */
|
|
252
250
|
export(resourceId: string): Promise<ArrayBuffer>;
|
|
253
251
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callable.d.ts","sourceRoot":"","sources":["../../src/types/callable.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAA;AAC1F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAA;AAC/E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAA;AAC9E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAA;AAClF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAA;AACzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAA;AAC1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAA;AAC1E,OAAO,KAAK,EACX,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,MAAM,8BAA8B,CAAA;AACrC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"callable.d.ts","sourceRoot":"","sources":["../../src/types/callable.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,UAAU,EAA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GAYG;AACH,MAAM,MAAM,gBAAgB,GAAG,wBAAwB,CACtD,IAAI,EACJ,gBAAgB,EAChB,qBAAqB,CACrB,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,gBAAgB,GAAG,wBAAwB,CACtD,IAAI,EACJ,gBAAgB,EAChB,qBAAqB,CACrB,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,aAAa,GAAG,wBAAwB,CACnD,eAAe,EACf,2BAA2B,EAC3B,kBAAkB,CAClB,CAAA;AAMD;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB,CAC1D,QAAQ,EACR,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,CACnB;CAAG;AAMJ;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,2BAA4B,SAAQ,gBAAgB,CACpE,kBAAkB,EAClB,8BAA8B,EAC9B,gCAAgC,EAChC,6BAA6B,CAC7B;IACA,mFAAmF;IACnF,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACnE;AAMD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB,CAC1D,QAAQ,EACR,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,CACnB;IACA,qEAAqE;IACrE,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAA;CAChD"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* All types for the OneRoster SDK.
|
|
5
|
-
*/
|
|
6
|
-
export * from './base';
|
|
1
|
+
export * from '@timeback/types/protocols/oneroster';
|
|
2
|
+
export * from './streamable';
|
|
7
3
|
export * from './callable';
|
|
8
4
|
export * from './client';
|
|
9
|
-
export
|
|
10
|
-
export * from './gradebook';
|
|
11
|
-
export * from './resources';
|
|
12
|
-
export * from './rostering';
|
|
5
|
+
export type { AcademicSessionCreateInput, AgentInput, AssessmentLineItemCreateInput, AssessmentResultCreateInput, BulkResultsInput, CategoryCreateInput, ClassCreateInput, ComponentResourceCreateInput, CourseComponentCreateInput, CourseCreateInput, CourseStructureInput, DemographicsCreateInput, EnrollInput, EnrollmentCreateInput, LineItemCreateInput, OrgCreateInput, ResourceCreateInput, ResultCreateInput, SchoolCreateInput, ScoreScaleCreateInput, UserCreateInput, UserRoleInput, } from '@timeback/types/zod';
|
|
13
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAA;AACnD,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AAExB,YAAY,EACX,0BAA0B,EAC1B,UAAU,EACV,6BAA6B,EAC7B,2BAA2B,EAC3B,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAChB,4BAA4B,EAC5B,0BAA0B,EAC1B,iBAAiB,EACjB,oBAAoB,EACpB,uBAAuB,EACvB,WAAW,EACX,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,EACf,aAAa,GACb,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { PageResult } from '@timeback/internal-client-infra';
|
|
2
|
+
/**
|
|
3
|
+
* Common interface for resources that support streaming/listing.
|
|
4
|
+
*
|
|
5
|
+
* All OneRoster resource classes implement this interface, allowing
|
|
6
|
+
* generic code to work with any resource type.
|
|
7
|
+
*
|
|
8
|
+
* @typeParam T - The entity type returned by the resource
|
|
9
|
+
*/
|
|
10
|
+
export interface StreamableResource<T = unknown> {
|
|
11
|
+
/**
|
|
12
|
+
* List the first page of resources.
|
|
13
|
+
* @returns Promise resolving to the first page (data + pagination metadata)
|
|
14
|
+
*/
|
|
15
|
+
list(params?: Record<string, unknown>): Promise<PageResult<T>>;
|
|
16
|
+
/**
|
|
17
|
+
* List all resources, fetching all pages automatically.
|
|
18
|
+
* @returns Promise resolving to an array of all matching resources
|
|
19
|
+
*/
|
|
20
|
+
listAll?(params?: Record<string, unknown>): Promise<T[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Get the first matching resource, or undefined if none match.
|
|
23
|
+
* @returns The first matching resource, or undefined
|
|
24
|
+
*/
|
|
25
|
+
first?(params?: Record<string, unknown>): Promise<T | undefined>;
|
|
26
|
+
/**
|
|
27
|
+
* Stream resources with lazy pagination.
|
|
28
|
+
* @returns Async iterable for streaming results
|
|
29
|
+
*/
|
|
30
|
+
stream(params?: Record<string, unknown>): AsyncIterable<T>;
|
|
31
|
+
/**
|
|
32
|
+
* Get a single resource by sourcedId.
|
|
33
|
+
*/
|
|
34
|
+
get(sourcedId: string): Promise<T>;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=streamable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streamable.d.ts","sourceRoot":"","sources":["../../src/types/streamable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAEjE;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,GAAG,OAAO;IAC9C;;;OAGG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;IAE9D;;;OAGG;IACH,OAAO,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAAA;IAExD;;;OAGG;IACH,KAAK,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAAA;IAEhE;;;OAGG;IACH,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAA;IAE1D;;OAEG;IACH,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;CAClC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@timeback/oneroster",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
"@timeback/internal-test": "0.0.0",
|
|
34
34
|
"@timeback/internal-utils": "0.0.0",
|
|
35
35
|
"@timeback/types": "0.0.0",
|
|
36
|
-
"@types/bun": "latest"
|
|
36
|
+
"@types/bun": "latest",
|
|
37
|
+
"zod": "^4.2.1"
|
|
37
38
|
},
|
|
38
39
|
"peerDependencies": {
|
|
39
40
|
"typescript": "^5"
|
package/dist/types/base.d.ts
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OneRoster Base Types
|
|
3
|
-
*
|
|
4
|
-
* Common types used across all OneRoster entities.
|
|
5
|
-
* Primitives (TimebackSubject, TimebackGrade, etc.) come from `@timeback/types`.
|
|
6
|
-
*/
|
|
7
|
-
export type { IMSErrorResponse, LessonType, OneRosterUserRole, OrganizationType, ScoreStatus, TimebackGrade, TimebackSubject, } from '@timeback/types';
|
|
8
|
-
/**
|
|
9
|
-
* Base interface for all OneRoster entities.
|
|
10
|
-
*
|
|
11
|
-
* All OneRoster resources share these common fields for identification,
|
|
12
|
-
* status tracking, and extensibility.
|
|
13
|
-
*/
|
|
14
|
-
export interface Base {
|
|
15
|
-
/**
|
|
16
|
-
* Globally unique identifier for the entity.
|
|
17
|
-
* Typically a UUID assigned by the source system.
|
|
18
|
-
*/
|
|
19
|
-
sourcedId?: string;
|
|
20
|
-
/**
|
|
21
|
-
* The status of the entity.
|
|
22
|
-
* - `active`: Entity is current and valid
|
|
23
|
-
* - `tobedeleted`: Entity is marked for deletion
|
|
24
|
-
*/
|
|
25
|
-
status?: 'active' | 'tobedeleted';
|
|
26
|
-
/**
|
|
27
|
-
* ISO 8601 timestamp of the last modification.
|
|
28
|
-
* @example "2024-01-15T10:30:00Z"
|
|
29
|
-
*/
|
|
30
|
-
dateLastModified?: string;
|
|
31
|
-
/**
|
|
32
|
-
* Extensible metadata object for custom properties.
|
|
33
|
-
* Used for vendor-specific extensions.
|
|
34
|
-
*/
|
|
35
|
-
metadata?: Record<string, unknown> | null;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* A score for a specific learning objective.
|
|
39
|
-
*/
|
|
40
|
-
export interface LearningObjectiveResult {
|
|
41
|
-
/** Identifier of the learning objective */
|
|
42
|
-
learningObjectiveId: string;
|
|
43
|
-
/** Numeric score */
|
|
44
|
-
score?: number;
|
|
45
|
-
/** Text-based score (e.g., "Proficient") */
|
|
46
|
-
textScore?: string;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* A set of learning objectives with optional results.
|
|
50
|
-
*/
|
|
51
|
-
export interface LearningObjectiveSetItem {
|
|
52
|
-
/** Source system for these learning objectives */
|
|
53
|
-
source: string;
|
|
54
|
-
/** Learning objective IDs (for line items) */
|
|
55
|
-
learningObjectiveIds?: string[];
|
|
56
|
-
/** Learning objective results (for results) */
|
|
57
|
-
learningObjectiveResults?: LearningObjectiveResult[];
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Array of learning objective sets, or null if not applicable.
|
|
61
|
-
*/
|
|
62
|
-
export type LearningObjectiveSet = LearningObjectiveSetItem[] | null;
|
|
63
|
-
/**
|
|
64
|
-
* A reference to another OneRoster entity by sourcedId.
|
|
65
|
-
*/
|
|
66
|
-
export interface Ref {
|
|
67
|
-
/** The sourcedId of the referenced entity */
|
|
68
|
-
sourcedId: string;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* A reference with an optional type discriminator.
|
|
72
|
-
*/
|
|
73
|
-
export interface RefWithType extends Ref {
|
|
74
|
-
/** The type of the referenced entity (e.g., "user", "class") */
|
|
75
|
-
type?: string;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* A fully-qualified reference with href and type.
|
|
79
|
-
* Commonly returned in API responses for navigable links.
|
|
80
|
-
*/
|
|
81
|
-
export interface RefWithHref extends Ref {
|
|
82
|
-
/** The URL to fetch the referenced entity */
|
|
83
|
-
href: string;
|
|
84
|
-
/** The type of the referenced entity */
|
|
85
|
-
type: string;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Response returned when creating a new entity.
|
|
89
|
-
* Contains the mapping between supplied and allocated IDs.
|
|
90
|
-
*/
|
|
91
|
-
export interface CreateResponse {
|
|
92
|
-
sourcedIdPairs: {
|
|
93
|
-
/** The sourcedId provided in the create request */
|
|
94
|
-
suppliedSourcedId: string;
|
|
95
|
-
/** The sourcedId allocated by the server (may differ) */
|
|
96
|
-
allocatedSourcedId: string;
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Common interface for resources that support streaming/listing.
|
|
101
|
-
*
|
|
102
|
-
* All OneRoster resource classes implement this interface, allowing
|
|
103
|
-
* generic code to work with any resource type.
|
|
104
|
-
*
|
|
105
|
-
* @typeParam T - The entity type returned by the resource
|
|
106
|
-
*/
|
|
107
|
-
export interface StreamableResource<T = unknown> {
|
|
108
|
-
/**
|
|
109
|
-
* List the first page of resources.
|
|
110
|
-
* @returns Promise resolving to the first page (data + pagination metadata)
|
|
111
|
-
*/
|
|
112
|
-
list(params?: Record<string, unknown>): Promise<import('@timeback/internal-client-infra').PageResult<T>>;
|
|
113
|
-
/**
|
|
114
|
-
* List all resources, fetching all pages automatically.
|
|
115
|
-
* @returns Promise resolving to an array of all matching resources
|
|
116
|
-
*/
|
|
117
|
-
listAll?(params?: Record<string, unknown>): Promise<T[]>;
|
|
118
|
-
/**
|
|
119
|
-
* Get the first matching resource, or undefined if none match.
|
|
120
|
-
* @returns The first matching resource, or undefined
|
|
121
|
-
*/
|
|
122
|
-
first?(params?: Record<string, unknown>): Promise<T | undefined>;
|
|
123
|
-
/**
|
|
124
|
-
* Stream resources with lazy pagination.
|
|
125
|
-
* @returns Async iterable for streaming results
|
|
126
|
-
*/
|
|
127
|
-
stream(params?: Record<string, unknown>): AsyncIterable<T>;
|
|
128
|
-
/**
|
|
129
|
-
* Get a single resource by sourcedId.
|
|
130
|
-
*/
|
|
131
|
-
get(sourcedId: string): Promise<T>;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Re-export ToArrayOptions from client-common.
|
|
135
|
-
*/
|
|
136
|
-
export type { ToArrayOptions } from '@timeback/internal-client-infra';
|
|
137
|
-
//# sourceMappingURL=base.d.ts.map
|
package/dist/types/base.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/types/base.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,YAAY,EACX,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,eAAe,GACf,MAAM,iBAAiB,CAAA;AAExB;;;;;GAKG;AACH,MAAM,WAAW,IAAI;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;;OAIG;IACH,MAAM,CAAC,EAAE,QAAQ,GAA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GG;IACH,IAAI,CACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,OAAO,CAAC,OAAO,iCAAiC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;IAEnE;;;OAGG;IACH,OAAO,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAAA;IAExD;;;OAGG;IACH,KAAK,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAAA;IAEhE;;;OAGG;IACH,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAA;IAE1D;;OAEG;IACH,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;CAClC;AAMD;;GAEG;AACH,YAAY,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA"}
|
package/dist/types/filters.d.ts
DELETED
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Filter Field Types
|
|
3
|
-
*
|
|
4
|
-
* These types define the server-side filterable fields for each OneRoster entity.
|
|
5
|
-
* They may differ from the entity structure (e.g., `role` vs `roles`).
|
|
6
|
-
*/
|
|
7
|
-
import type { OneRosterUserRole, OrganizationType } from '@timeback/types';
|
|
8
|
-
/**
|
|
9
|
-
* Base fields available for filtering on all entities.
|
|
10
|
-
*/
|
|
11
|
-
export interface BaseFilterFields {
|
|
12
|
-
sourcedId: string;
|
|
13
|
-
status: 'active' | 'tobedeleted';
|
|
14
|
-
dateLastModified: Date;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Filterable fields for User entities.
|
|
18
|
-
*
|
|
19
|
-
* Note: The server accepts `role` (singular) even though the entity has `roles` (array).
|
|
20
|
-
*/
|
|
21
|
-
export interface UserFilterFields extends BaseFilterFields {
|
|
22
|
-
givenName: string;
|
|
23
|
-
familyName: string;
|
|
24
|
-
email: string;
|
|
25
|
-
username: string;
|
|
26
|
-
enabledUser: string;
|
|
27
|
-
identifier: string;
|
|
28
|
-
userMasterIdentifier: string;
|
|
29
|
-
/** Server accepts singular `role` for filtering, even though entity has `roles` array */
|
|
30
|
-
role: OneRosterUserRole;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Filterable fields for Organization/School entities.
|
|
34
|
-
*/
|
|
35
|
-
export interface OrganizationFilterFields extends BaseFilterFields {
|
|
36
|
-
name: string;
|
|
37
|
-
identifier: string;
|
|
38
|
-
type: OrganizationType;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Filterable fields for Class entities.
|
|
42
|
-
*/
|
|
43
|
-
export interface ClassFilterFields extends BaseFilterFields {
|
|
44
|
-
title: string;
|
|
45
|
-
classCode: string;
|
|
46
|
-
classType: 'homeroom' | 'scheduled';
|
|
47
|
-
location: string;
|
|
48
|
-
grades: string;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Filterable fields for Course entities.
|
|
52
|
-
*/
|
|
53
|
-
export interface CourseFilterFields extends BaseFilterFields {
|
|
54
|
-
title: string;
|
|
55
|
-
courseCode: string;
|
|
56
|
-
grades: string;
|
|
57
|
-
subjects: string;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Filterable fields for Enrollment entities.
|
|
61
|
-
*/
|
|
62
|
-
export interface EnrollmentFilterFields extends BaseFilterFields {
|
|
63
|
-
role: OneRosterUserRole;
|
|
64
|
-
primary: string;
|
|
65
|
-
beginDate: Date;
|
|
66
|
-
endDate: Date;
|
|
67
|
-
'class.sourcedId': string;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Filterable fields for AcademicSession entities.
|
|
71
|
-
*/
|
|
72
|
-
export interface AcademicSessionFilterFields extends BaseFilterFields {
|
|
73
|
-
title: string;
|
|
74
|
-
type: 'gradingPeriod' | 'semester' | 'schoolYear' | 'term';
|
|
75
|
-
startDate: Date;
|
|
76
|
-
endDate: Date;
|
|
77
|
-
schoolYear: string;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Filterable fields for LineItem (gradebook) entities.
|
|
81
|
-
*/
|
|
82
|
-
export interface LineItemFilterFields extends BaseFilterFields {
|
|
83
|
-
title: string;
|
|
84
|
-
description: string;
|
|
85
|
-
assignDate: Date;
|
|
86
|
-
dueDate: Date;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Filterable fields for Result (grade) entities.
|
|
90
|
-
*/
|
|
91
|
-
export interface ResultFilterFields extends BaseFilterFields {
|
|
92
|
-
score: number;
|
|
93
|
-
scoreDate: Date;
|
|
94
|
-
scoreStatus: 'exempt' | 'fully graded' | 'not submitted' | 'partially graded' | 'submitted';
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Filterable fields for Resource entities.
|
|
98
|
-
*/
|
|
99
|
-
export interface ResourceFilterFields extends BaseFilterFields {
|
|
100
|
-
title: string;
|
|
101
|
-
vendorResourceId: string;
|
|
102
|
-
importance: 'primary' | 'secondary';
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Filterable fields for CourseComponent entities.
|
|
106
|
-
*/
|
|
107
|
-
export interface CourseComponentFilterFields extends BaseFilterFields {
|
|
108
|
-
title: string;
|
|
109
|
-
resourceType: string;
|
|
110
|
-
'course.sourcedId': string;
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Filterable fields for ComponentResource entities.
|
|
114
|
-
*/
|
|
115
|
-
export interface ComponentResourceFilterFields extends BaseFilterFields {
|
|
116
|
-
title: string;
|
|
117
|
-
lessonType: string;
|
|
118
|
-
'courseComponent.sourcedId': string;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Filterable fields for AssessmentLineItem entities.
|
|
122
|
-
*/
|
|
123
|
-
export interface AssessmentLineItemFilterFields extends BaseFilterFields {
|
|
124
|
-
title: string;
|
|
125
|
-
description: string;
|
|
126
|
-
assignDate: Date;
|
|
127
|
-
dueDate: Date;
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Filterable fields for AssessmentResult entities.
|
|
131
|
-
*/
|
|
132
|
-
export interface AssessmentResultFilterFields extends BaseFilterFields {
|
|
133
|
-
score: number;
|
|
134
|
-
scoreDate: Date;
|
|
135
|
-
scoreStatus: string;
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Filterable fields for Demographics entities.
|
|
139
|
-
*/
|
|
140
|
-
export interface DemographicsFilterFields extends BaseFilterFields {
|
|
141
|
-
birthDate: string;
|
|
142
|
-
sex: 'male' | 'female';
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Filterable fields for Category entities.
|
|
146
|
-
*/
|
|
147
|
-
export interface CategoryFilterFields extends BaseFilterFields {
|
|
148
|
-
title: string;
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Filterable fields for ScoreScale entities.
|
|
152
|
-
*/
|
|
153
|
-
export interface ScoreScaleFilterFields extends BaseFilterFields {
|
|
154
|
-
title: string;
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Filterable fields for Resource entities.
|
|
158
|
-
*/
|
|
159
|
-
export interface ResourceFilterFields extends BaseFilterFields {
|
|
160
|
-
title: string;
|
|
161
|
-
vendorResourceId: string;
|
|
162
|
-
vendorId: string;
|
|
163
|
-
applicationId: string;
|
|
164
|
-
}
|
|
165
|
-
//# sourceMappingURL=filters.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filters.d.ts","sourceRoot":"","sources":["../../src/types/filters.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;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