@timeback/oneroster 0.1.0

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 (85) hide show
  1. package/README.md +295 -0
  2. package/dist/client.d.ts +125 -0
  3. package/dist/client.d.ts.map +1 -0
  4. package/dist/constants.d.ts +23 -0
  5. package/dist/constants.d.ts.map +1 -0
  6. package/dist/errors.d.ts +7 -0
  7. package/dist/errors.d.ts.map +1 -0
  8. package/dist/errors.js +1414 -0
  9. package/dist/factory.d.ts +100 -0
  10. package/dist/factory.d.ts.map +1 -0
  11. package/dist/index.d.ts +42 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +2614 -0
  14. package/dist/lib/index.d.ts +11 -0
  15. package/dist/lib/index.d.ts.map +1 -0
  16. package/dist/lib/pagination.d.ts +30 -0
  17. package/dist/lib/pagination.d.ts.map +1 -0
  18. package/dist/lib/resolve.d.ts +21 -0
  19. package/dist/lib/resolve.d.ts.map +1 -0
  20. package/dist/lib/transport.d.ts +32 -0
  21. package/dist/lib/transport.d.ts.map +1 -0
  22. package/dist/resources/assessment/index.d.ts +6 -0
  23. package/dist/resources/assessment/index.d.ts.map +1 -0
  24. package/dist/resources/assessment/line-items.d.ts +38 -0
  25. package/dist/resources/assessment/line-items.d.ts.map +1 -0
  26. package/dist/resources/assessment/results.d.ts +25 -0
  27. package/dist/resources/assessment/results.d.ts.map +1 -0
  28. package/dist/resources/base.d.ts +181 -0
  29. package/dist/resources/base.d.ts.map +1 -0
  30. package/dist/resources/gradebook/categories.d.ts +16 -0
  31. package/dist/resources/gradebook/categories.d.ts.map +1 -0
  32. package/dist/resources/gradebook/index.d.ts +8 -0
  33. package/dist/resources/gradebook/index.d.ts.map +1 -0
  34. package/dist/resources/gradebook/line-items.d.ts +52 -0
  35. package/dist/resources/gradebook/line-items.d.ts.map +1 -0
  36. package/dist/resources/gradebook/results.d.ts +24 -0
  37. package/dist/resources/gradebook/results.d.ts.map +1 -0
  38. package/dist/resources/gradebook/score-scales.d.ts +16 -0
  39. package/dist/resources/gradebook/score-scales.d.ts.map +1 -0
  40. package/dist/resources/index.d.ts +11 -0
  41. package/dist/resources/index.d.ts.map +1 -0
  42. package/dist/resources/resources/index.d.ts +5 -0
  43. package/dist/resources/resources/index.d.ts.map +1 -0
  44. package/dist/resources/resources/resources.d.ts +39 -0
  45. package/dist/resources/resources/resources.d.ts.map +1 -0
  46. package/dist/resources/rostering/academic-sessions.d.ts +97 -0
  47. package/dist/resources/rostering/academic-sessions.d.ts.map +1 -0
  48. package/dist/resources/rostering/classes.d.ts +276 -0
  49. package/dist/resources/rostering/classes.d.ts.map +1 -0
  50. package/dist/resources/rostering/courses.d.ts +75 -0
  51. package/dist/resources/rostering/courses.d.ts.map +1 -0
  52. package/dist/resources/rostering/demographics.d.ts +18 -0
  53. package/dist/resources/rostering/demographics.d.ts.map +1 -0
  54. package/dist/resources/rostering/enrollments.d.ts +28 -0
  55. package/dist/resources/rostering/enrollments.d.ts.map +1 -0
  56. package/dist/resources/rostering/index.d.ts +12 -0
  57. package/dist/resources/rostering/index.d.ts.map +1 -0
  58. package/dist/resources/rostering/orgs.d.ts +18 -0
  59. package/dist/resources/rostering/orgs.d.ts.map +1 -0
  60. package/dist/resources/rostering/schools.d.ts +214 -0
  61. package/dist/resources/rostering/schools.d.ts.map +1 -0
  62. package/dist/resources/rostering/users.d.ts +191 -0
  63. package/dist/resources/rostering/users.d.ts.map +1 -0
  64. package/dist/types/base.d.ts +127 -0
  65. package/dist/types/base.d.ts.map +1 -0
  66. package/dist/types/callable.d.ts +246 -0
  67. package/dist/types/callable.d.ts.map +1 -0
  68. package/dist/types/client.d.ts +58 -0
  69. package/dist/types/client.d.ts.map +1 -0
  70. package/dist/types/filters.d.ts +165 -0
  71. package/dist/types/filters.d.ts.map +1 -0
  72. package/dist/types/gradebook.d.ts +262 -0
  73. package/dist/types/gradebook.d.ts.map +1 -0
  74. package/dist/types/index.d.ts +13 -0
  75. package/dist/types/index.d.ts.map +1 -0
  76. package/dist/types/resources.d.ts +191 -0
  77. package/dist/types/resources.d.ts.map +1 -0
  78. package/dist/types/rostering.d.ts +732 -0
  79. package/dist/types/rostering.d.ts.map +1 -0
  80. package/dist/types.d.ts +10 -0
  81. package/dist/types.d.ts.map +1 -0
  82. package/dist/types.js +0 -0
  83. package/dist/utils.d.ts +51 -0
  84. package/dist/utils.d.ts.map +1 -0
  85. package/package.json +41 -0
@@ -0,0 +1,262 @@
1
+ /**
2
+ * OneRoster Gradebook Types
3
+ *
4
+ * Types for gradebook entities: results, line items, categories, score scales, assessments.
5
+ */
6
+ import type { ScoreStatus } from '@timeback/types';
7
+ import type { Base, LearningObjectiveSet, Ref } from './base';
8
+ /**
9
+ * A value within a score scale (e.g., "A" = 90-100).
10
+ */
11
+ export interface ScoreScaleValue {
12
+ /** Left-hand side of the range (e.g., "90") */
13
+ itemValueLHS: string;
14
+ /** Right-hand side of the range (e.g., "100") */
15
+ itemValueRHS: string;
16
+ /** Display value (e.g., "A") */
17
+ value?: string;
18
+ /** Description of this score level */
19
+ description?: string;
20
+ }
21
+ /**
22
+ * A grading scale defining how scores are interpreted.
23
+ *
24
+ * Score scales can be associated with classes or courses and define
25
+ * the mapping between numeric scores and letter grades.
26
+ */
27
+ export interface ScoreScale extends Base {
28
+ /** Scale title (e.g., "Standard Grading Scale") */
29
+ title: string;
30
+ /** Type of scale */
31
+ type?: string;
32
+ /** Class this scale applies to */
33
+ class?: Ref;
34
+ /** Course this scale applies to */
35
+ course?: Ref | null;
36
+ /** Values defining the scale */
37
+ scoreScaleValue?: ScoreScaleValue[];
38
+ /** Minimum possible score */
39
+ minScore?: number;
40
+ /** Maximum possible score */
41
+ maxScore?: number;
42
+ }
43
+ /**
44
+ * A category for organizing line items (e.g., "Homework", "Tests", "Projects").
45
+ */
46
+ export interface Category extends Base {
47
+ /** Category name */
48
+ title: string;
49
+ /** Weight for grade calculation (0.0 to 1.0) */
50
+ weight?: number | null;
51
+ }
52
+ /**
53
+ * Input for creating/updating a category.
54
+ */
55
+ export interface CategoryCreateInput {
56
+ /** Category name */
57
+ title: string;
58
+ /** Status */
59
+ status: 'active' | 'tobedeleted';
60
+ /** Client-supplied sourcedId (optional) */
61
+ sourcedId?: string;
62
+ /** Weight for grade calculation (0.0 to 1.0) */
63
+ weight?: number | null;
64
+ /** Metadata */
65
+ metadata?: Record<string, unknown> | null;
66
+ }
67
+ /**
68
+ * A line item (assignment, test, or other gradable item).
69
+ *
70
+ * Line items represent work that students complete and receive grades for.
71
+ */
72
+ export interface LineItem extends Base {
73
+ /** Title of the assignment */
74
+ title: string;
75
+ /** Description of the assignment */
76
+ description?: string | null;
77
+ /** Date the assignment was given (ISO 8601 datetime) */
78
+ assignDate: string;
79
+ /** Due date for the assignment (ISO 8601 datetime) */
80
+ dueDate: string;
81
+ /** Class this line item belongs to */
82
+ class: Ref;
83
+ /** School */
84
+ school: Ref;
85
+ /** Category for this line item */
86
+ category: Ref;
87
+ /** Grading period */
88
+ gradingPeriod?: Ref | null;
89
+ /** Academic session */
90
+ academicSession?: Ref | null;
91
+ /** Score scale to use for grading */
92
+ scoreScale?: Ref | null;
93
+ /** Minimum possible score */
94
+ resultValueMin?: number | null;
95
+ /** Maximum possible score */
96
+ resultValueMax?: number | null;
97
+ /** Associated learning objectives */
98
+ learningObjectiveSet?: LearningObjectiveSet;
99
+ }
100
+ /**
101
+ * A result (grade) for a student on a line item.
102
+ *
103
+ * Results record the score a student received on an assignment.
104
+ */
105
+ export interface Result extends Base {
106
+ /** Line item this result is for */
107
+ lineItem: Ref;
108
+ /** Student who received this grade */
109
+ student: Ref;
110
+ /** Class (optional, for context) */
111
+ class?: Ref | null;
112
+ /** Score scale used */
113
+ scoreScale?: Ref | null;
114
+ /** Status of the score */
115
+ scoreStatus: ScoreStatus;
116
+ /** Numeric score */
117
+ score?: number | null;
118
+ /** Text-based score */
119
+ textScore?: string | null;
120
+ /** Date the score was recorded */
121
+ scoreDate: string;
122
+ /** Teacher comment */
123
+ comment?: string | null;
124
+ /** Learning objective scores */
125
+ learningObjectiveSet?: LearningObjectiveSet;
126
+ /** Whether work is in progress */
127
+ inProgress?: string;
128
+ /** Whether work is incomplete */
129
+ incomplete?: string;
130
+ /** Whether submission was late */
131
+ late?: string;
132
+ /** Whether submission is missing */
133
+ missing?: string;
134
+ }
135
+ /**
136
+ * An assessment line item for standardized or formal assessments.
137
+ *
138
+ * Assessment line items are similar to line items but designed for
139
+ * formal assessments with more detailed tracking capabilities.
140
+ */
141
+ export interface AssessmentLineItem extends Base {
142
+ /** Assessment title */
143
+ title: string;
144
+ /** Assessment description */
145
+ description?: string | null;
146
+ /** Class this assessment is for */
147
+ class?: Ref | null;
148
+ /** Parent assessment (for hierarchical assessments) */
149
+ parentAssessmentLineItem?: Ref | null;
150
+ /** Score scale */
151
+ scoreScale?: Ref | null;
152
+ /** Minimum possible score */
153
+ resultValueMin?: number | null;
154
+ /** Maximum possible score */
155
+ resultValueMax?: number | null;
156
+ /** Course component reference (proprietary extension) */
157
+ component?: Ref | null;
158
+ /** Component resource reference (proprietary extension) */
159
+ componentResource?: Ref | null;
160
+ /** Learning objectives */
161
+ learningObjectiveSet?: LearningObjectiveSet;
162
+ /** Course reference (proprietary extension) */
163
+ course?: Ref | null;
164
+ }
165
+ /**
166
+ * A result for an assessment line item.
167
+ */
168
+ export interface AssessmentResult extends Base {
169
+ /** Assessment this result is for */
170
+ assessmentLineItem: Ref;
171
+ /** Student who took the assessment */
172
+ student: Ref;
173
+ /** Numeric score */
174
+ score?: number | null;
175
+ /** Text-based score */
176
+ textScore?: string | null;
177
+ /** Date of the assessment */
178
+ scoreDate: string;
179
+ /** Score scale used */
180
+ scoreScale?: Ref | null;
181
+ /** Percentile ranking */
182
+ scorePercentile?: number | null;
183
+ /** Status of the score */
184
+ scoreStatus: ScoreStatus;
185
+ /** Teacher/grader comment */
186
+ comment?: string | null;
187
+ /** Learning objective scores */
188
+ learningObjectiveSet?: LearningObjectiveSet;
189
+ /** Whether assessment is in progress */
190
+ inProgress?: string | null;
191
+ /** Whether assessment is incomplete */
192
+ incomplete?: string | null;
193
+ /** Whether submission was late */
194
+ late?: string | null;
195
+ /** Whether assessment is missing */
196
+ missing?: string | null;
197
+ }
198
+ /**
199
+ * Input for creating a new line item.
200
+ */
201
+ export interface LineItemCreateInput {
202
+ /** Title of the assignment */
203
+ title: string;
204
+ /** Class this line item belongs to */
205
+ class: Ref;
206
+ /** School */
207
+ school: Ref;
208
+ /** Category for this line item */
209
+ category: Ref;
210
+ /** Date the assignment was given (ISO 8601 datetime, e.g., "2024-09-01T00:00:00Z") */
211
+ assignDate: string;
212
+ /** Due date for the assignment (ISO 8601 datetime, e.g., "2024-09-15T00:00:00Z") */
213
+ dueDate: string;
214
+ /** Status */
215
+ status: 'active' | 'tobedeleted';
216
+ /** Client-supplied sourcedId (optional) */
217
+ sourcedId?: string;
218
+ /** Description of the assignment */
219
+ description?: string | null;
220
+ /** Grading period */
221
+ gradingPeriod?: Ref | null;
222
+ /** Academic session */
223
+ academicSession?: Ref | null;
224
+ /** Score scale to use for grading */
225
+ scoreScale?: Ref | null;
226
+ /** Minimum possible score */
227
+ resultValueMin?: number | null;
228
+ /** Maximum possible score */
229
+ resultValueMax?: number | null;
230
+ /** Associated learning objectives */
231
+ learningObjectiveSet?: LearningObjectiveSet;
232
+ }
233
+ /**
234
+ * Input for creating a new result.
235
+ */
236
+ export interface ResultCreateInput {
237
+ /** Line item this result is for */
238
+ lineItem: Ref;
239
+ /** Student who received this grade */
240
+ student: Ref;
241
+ /** Date the score was recorded */
242
+ scoreDate: string;
243
+ /** Status of the score */
244
+ scoreStatus: ScoreStatus;
245
+ /** Status */
246
+ status: 'active' | 'tobedeleted';
247
+ /** Client-supplied sourcedId (optional) */
248
+ sourcedId?: string;
249
+ /** Class (optional, for context) */
250
+ class?: Ref | null;
251
+ /** Score scale used */
252
+ scoreScale?: Ref | null;
253
+ /** Numeric score */
254
+ score?: number | null;
255
+ /** Text-based score */
256
+ textScore?: string | null;
257
+ /** Teacher comment */
258
+ comment?: string | null;
259
+ /** Learning objective scores */
260
+ learningObjectiveSet?: LearningObjectiveSet;
261
+ }
262
+ //# sourceMappingURL=gradebook.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gradebook.d.ts","sourceRoot":"","sources":["../../src/types/gradebook.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,oBAAoB,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAE7D;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B,+CAA+C;IAC/C,YAAY,EAAE,MAAM,CAAA;IACpB,iDAAiD;IACjD,YAAY,EAAE,MAAM,CAAA;IACpB,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAA;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,UAAW,SAAQ,IAAI;IACvC,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAA;IACb,oBAAoB;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,kCAAkC;IAClC,KAAK,CAAC,EAAE,GAAG,CAAA;IACX,mCAAmC;IACnC,MAAM,CAAC,EAAE,GAAG,GAAG,IAAI,CAAA;IACnB,gCAAgC;IAChC,eAAe,CAAC,EAAE,eAAe,EAAE,CAAA;IACnC,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,QAAS,SAAQ,IAAI;IACrC,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB;AAED;;GAEG;AACH,MAAM,WAA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tB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,gCAAgC;IAChC,oBAAoB,CAAC,EAAE,oBAAoB,CAAA;CAC3C"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * OneRoster Types
3
+ *
4
+ * All types for the OneRoster SDK.
5
+ */
6
+ export * from './base';
7
+ export * from './callable';
8
+ export * from './client';
9
+ export * from './filters';
10
+ export * from './gradebook';
11
+ export * from './resources';
12
+ export * from './rostering';
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,QAAQ,CAAA;AACtB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA"}
@@ -0,0 +1,191 @@
1
+ /**
2
+ * OneRoster Resources Types
3
+ *
4
+ * Types for digital learning resources and content.
5
+ */
6
+ import type { LessonType } from '@timeback/types';
7
+ import type { Base, LearningObjectiveSet, Ref } from './base';
8
+ /**
9
+ * Resource type - determines which path prefix to use.
10
+ */
11
+ export type ResourceType = 'rostering' | 'gradebook' | 'resources';
12
+ /**
13
+ * Common metadata fields shared across all resource types.
14
+ */
15
+ export interface BaseResourceMetadata {
16
+ /** Academic subject area (e.g., "Math", "Science", "Language") */
17
+ subject?: string;
18
+ /** Array or range of grade levels (e.g., ["03", "04"]) */
19
+ grades?: string[];
20
+ /** Language of the content, using standard IETF BCP 47 codes (e.g., "en-US") */
21
+ language?: string;
22
+ /** Experience points (XP) assigned for completing this resource */
23
+ xp?: number;
24
+ /** Learning objectives this resource is aligned to */
25
+ learningObjectiveSet?: LearningObjectiveSet;
26
+ /** Array of topic-related tags or important terms covered by the content */
27
+ keywords?: string[];
28
+ /** Direct content URL or support URL */
29
+ url?: string;
30
+ /** Estimated seconds for a student to consume the content */
31
+ timeLength?: number;
32
+ /** UI label for the activity badge (e.g., "Article", "Exercise", "Quiz", "Video"). */
33
+ activityType?: string;
34
+ /** Extensible for custom vendor-specific fields */
35
+ [key: string]: unknown;
36
+ }
37
+ /**
38
+ * Metadata for QTI (IMS Question and Test Interoperability) resources.
39
+ */
40
+ export interface QtiResourceMetadata extends BaseResourceMetadata {
41
+ type: 'qti';
42
+ /** Specific QTI type: "qti-question", "qti-test", "qti-test-bank", "qti-stimulus" */
43
+ subType?: 'qti-question' | 'qti-test' | 'qti-test-bank' | 'qti-stimulus';
44
+ }
45
+ /**
46
+ * Metadata for textual resources (PDFs, eBooks, etc.).
47
+ */
48
+ export interface TextualResourceMetadata extends BaseResourceMetadata {
49
+ type: 'text';
50
+ /** File or content format (e.g., "pdf", "epub", "docx", "html") */
51
+ format?: string;
52
+ /** Name of the person or organization that created the content */
53
+ author?: string;
54
+ /** Number of pages if applicable */
55
+ pageCount?: number;
56
+ /** Number of words in the content */
57
+ wordLength?: number;
58
+ }
59
+ /**
60
+ * Metadata for audio recordings.
61
+ */
62
+ export interface AudioResourceMetadata extends BaseResourceMetadata {
63
+ type: 'audio';
64
+ /** Length of the audio in HH:MM:SS format */
65
+ duration?: string;
66
+ /** Audio format (e.g., "mp3", "wav") */
67
+ format?: string;
68
+ /** Name of the speaker or narrator */
69
+ speaker?: string;
70
+ }
71
+ /**
72
+ * Metadata for video content.
73
+ */
74
+ export interface VideoResourceMetadata extends BaseResourceMetadata {
75
+ type: 'video';
76
+ /** Length of the video in HH:MM:SS format */
77
+ duration?: string;
78
+ /** Indicates if closed captions are available */
79
+ captionsAvailable?: boolean;
80
+ /** Video format (e.g., "mp4", "webm", "mov") */
81
+ format?: string;
82
+ }
83
+ /**
84
+ * Metadata for interactive 3rd party tools (Desmos, LTI apps, etc.).
85
+ */
86
+ export interface InteractiveResourceMetadata extends BaseResourceMetadata {
87
+ type: 'interactive';
88
+ /** The URL used to launch the tool, often via LTI or similar protocols */
89
+ launchUrl?: string;
90
+ /** Name of the external tool provider (e.g., "Desmos", "Khan Academy") */
91
+ toolProvider?: string;
92
+ /** Teaching method supported (e.g., "exploratory", "direct-instruction") */
93
+ instructionalMethod?: string;
94
+ }
95
+ /**
96
+ * Metadata for visual resources (images, diagrams, etc.).
97
+ */
98
+ export interface VisualResourceMetadata extends BaseResourceMetadata {
99
+ type: 'visual';
100
+ /** Image format (e.g., "png", "jpeg", "svg", "pdf") */
101
+ format?: string;
102
+ /** Dimensions in pixels (e.g., "1920x1080") */
103
+ resolution?: string;
104
+ }
105
+ /**
106
+ * Metadata for structured course materials.
107
+ */
108
+ export interface CourseMaterialResourceMetadata extends BaseResourceMetadata {
109
+ type: 'course-material';
110
+ /** Material classification: "unit", "course", "resource-collection" */
111
+ subType?: 'unit' | 'course' | 'resource-collection';
112
+ /** Name of the person or organization who created the material */
113
+ author?: string;
114
+ /** File format (e.g., "docx", "pdf", "cc") */
115
+ format?: string;
116
+ /** Teaching method supported (e.g., "direct-instruction", "project-based") */
117
+ instructionalMethod?: string;
118
+ }
119
+ /**
120
+ * Metadata for a collection of assessments served in sequence.
121
+ */
122
+ export interface AssessmentBankResourceMetadata extends BaseResourceMetadata {
123
+ type: 'assessment-bank';
124
+ /** Array of individual test Resource IDs included in this bank */
125
+ resources: string[];
126
+ }
127
+ /**
128
+ * Union of all valid resource metadata types.
129
+ * Uses the `type` field as a discriminator.
130
+ */
131
+ export type ResourceMetadata = QtiResourceMetadata | TextualResourceMetadata | AudioResourceMetadata | VideoResourceMetadata | InteractiveResourceMetadata | VisualResourceMetadata | CourseMaterialResourceMetadata | AssessmentBankResourceMetadata | BaseResourceMetadata;
132
+ /**
133
+ * A digital learning resource (content, activity, or material).
134
+ *
135
+ * Resources represent external content that can be assigned to
136
+ * students through courses and classes.
137
+ */
138
+ export interface Resource extends Base {
139
+ /** Resource title */
140
+ title: string;
141
+ /** Roles this resource is intended for */
142
+ roles?: ('primary' | 'secondary')[];
143
+ /** Importance level of this resource */
144
+ importance?: 'primary' | 'secondary';
145
+ /** Vendor's identifier for this resource */
146
+ vendorResourceId: string;
147
+ /** Vendor identifier */
148
+ vendorId?: string;
149
+ /** Application identifier */
150
+ applicationId?: string;
151
+ /** Content-specific metadata */
152
+ metadata?: ResourceMetadata | null;
153
+ }
154
+ /**
155
+ * A resource linked to a course component.
156
+ *
157
+ * Component resources map digital content to specific parts
158
+ * of a course structure.
159
+ */
160
+ export interface ComponentResource extends Base {
161
+ /** Resource title */
162
+ title: string;
163
+ /** Course component this resource belongs to */
164
+ courseComponent: Ref;
165
+ /** The resource being linked */
166
+ resource: Ref;
167
+ /** Display order within the component */
168
+ sortOrder?: number;
169
+ /** Type of lesson (proprietary extension) */
170
+ lessonType?: LessonType;
171
+ }
172
+ /**
173
+ * Input for creating a new component resource.
174
+ */
175
+ export interface ComponentResourceCreateInput {
176
+ /** Resource title */
177
+ title: string;
178
+ /** Course component this resource belongs to */
179
+ courseComponent: Ref;
180
+ /** The resource being linked */
181
+ resource: Ref;
182
+ /** Status */
183
+ status: 'active' | 'tobedeleted';
184
+ /** Client-supplied sourcedId (optional) */
185
+ sourcedId?: string;
186
+ /** Display order within the component */
187
+ sortOrder?: number;
188
+ /** Type of lesson */
189
+ lessonType?: LessonType | null;
190
+ }
191
+ //# sourceMappingURL=resources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../src/types/resources.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,IAAI,EAAE,oBAAoB,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAE7D;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAAA;AAElE;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC,kEAAkE;IAClE,OAAO,CAAC,EAAE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