@happyvertical/smrt-education 0.57.52 → 0.59.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.
- package/AGENTS.md +18 -8
- package/README.md +36 -2
- package/agents/class-crunchlabs.md +83 -0
- package/agents/course-bundle-import.md +108 -18
- package/agents/course-work-design.md +144 -0
- package/agents/group-sharing.md +5 -1
- package/agents/learner-plan.md +3 -3
- package/agents/learner-service.md +1 -1
- package/agents/lesson-materials.md +52 -0
- package/agents/{workbook-service.md → lesson-work-service.md} +164 -95
- package/agents/{workbook-test-matrix.md → lesson-work-test-matrix.md} +3 -3
- package/agents/photo-intake.md +37 -50
- package/agents/question-records.md +1 -1
- package/agents/submission-service.md +22 -6
- package/dist/catalog-contracts.d.ts +6 -2
- package/dist/catalog-contracts.d.ts.map +1 -1
- package/dist/catalog-materialization-service.d.ts.map +1 -1
- package/dist/catalog-policy.d.ts +11 -1
- package/dist/catalog-policy.d.ts.map +1 -1
- package/dist/catalog-preview.d.ts +6 -1
- package/dist/catalog-preview.d.ts.map +1 -1
- package/dist/catalog-service.d.ts +1 -1
- package/dist/catalog-service.d.ts.map +1 -1
- package/dist/catalog.d.ts +11 -0
- package/dist/catalog.d.ts.map +1 -1
- package/dist/chunks/course-authoring-contracts-C4Hqba-e.js +131 -0
- package/dist/chunks/course-authoring-contracts-C4Hqba-e.js.map +1 -0
- package/dist/chunks/course-bundle-zip-5KUe3C5H.js +323 -0
- package/dist/chunks/course-bundle-zip-5KUe3C5H.js.map +1 -0
- package/dist/chunks/{workbook-photo-service-BtMQsbhq.js → workbook-photo-service-CjcB0y8Y.js} +6151 -5091
- package/dist/chunks/workbook-photo-service-CjcB0y8Y.js.map +1 -0
- package/dist/course-authoring-contracts.d.ts +6 -2
- package/dist/course-authoring-contracts.d.ts.map +1 -1
- package/dist/course-authoring-service.d.ts.map +1 -1
- package/dist/course-bundle-contracts.d.ts +21 -3
- package/dist/course-bundle-contracts.d.ts.map +1 -1
- package/dist/course-bundle-manifest-util.d.ts +15 -0
- package/dist/course-bundle-manifest-util.d.ts.map +1 -0
- package/dist/course-bundle-manifest-v2.d.ts +66 -0
- package/dist/course-bundle-manifest-v2.d.ts.map +1 -0
- package/dist/course-bundle-models.d.ts +29 -1
- package/dist/course-bundle-models.d.ts.map +1 -1
- package/dist/course-bundle-service.d.ts +104 -5
- package/dist/course-bundle-service.d.ts.map +1 -1
- package/dist/course-bundle.d.ts +81 -2
- package/dist/course-bundle.d.ts.map +1 -1
- package/dist/course-work-migration.d.ts +27 -0
- package/dist/course-work-migration.d.ts.map +1 -0
- package/dist/document-converter.d.ts +30 -18
- package/dist/document-converter.d.ts.map +1 -1
- package/dist/group-sharing-contracts.d.ts +3 -3
- package/dist/group-sharing-contracts.d.ts.map +1 -1
- package/dist/group-sharing-policy.d.ts +4 -4
- package/dist/group-sharing-policy.d.ts.map +1 -1
- package/dist/group-sharing-reader.d.ts.map +1 -1
- package/dist/hearth-catalog-providers.d.ts +1 -1
- package/dist/hearth-catalog-providers.d.ts.map +1 -1
- package/dist/hearth-class-crunchlabs.d.ts +94 -0
- package/dist/hearth-class-crunchlabs.d.ts.map +1 -0
- package/dist/index.d.ts +18 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1968 -419
- package/dist/index.js.map +1 -1
- package/dist/ingestion.d.ts +12 -11
- package/dist/ingestion.d.ts.map +1 -1
- package/dist/ingestion.js +63 -56
- package/dist/ingestion.js.map +1 -1
- package/dist/learner-plan-service.d.ts +1 -1
- package/dist/learner-plan-service.d.ts.map +1 -1
- package/dist/learner-service.d.ts +19 -5
- package/dist/learner-service.d.ts.map +1 -1
- package/dist/lesson-assets.d.ts +66 -2
- package/dist/lesson-assets.d.ts.map +1 -1
- package/dist/lesson-pages.d.ts +36 -0
- package/dist/lesson-pages.d.ts.map +1 -0
- package/dist/{workbook-completion.d.ts → lesson-work-completion.d.ts} +10 -10
- package/dist/lesson-work-completion.d.ts.map +1 -0
- package/dist/{workbook-contracts.d.ts → lesson-work-contracts.d.ts} +100 -52
- package/dist/lesson-work-contracts.d.ts.map +1 -0
- package/dist/lesson-work-models.d.ts +118 -0
- package/dist/lesson-work-models.d.ts.map +1 -0
- package/dist/lesson-work-service.d.ts +239 -0
- package/dist/lesson-work-service.d.ts.map +1 -0
- package/dist/manifest.json +6830 -5333
- package/dist/node.d.ts +3 -0
- package/dist/node.d.ts.map +1 -0
- package/dist/node.js +134 -0
- package/dist/node.js.map +1 -0
- package/dist/smrt-knowledge.json +2260 -1705
- package/dist/sources/class-crunchlabs-files.d.ts +8 -0
- package/dist/sources/class-crunchlabs-files.d.ts.map +1 -0
- package/dist/sources/class-crunchlabs.d.ts +217 -0
- package/dist/sources/class-crunchlabs.d.ts.map +1 -0
- package/dist/submission-service.d.ts +135 -5
- package/dist/submission-service.d.ts.map +1 -1
- package/dist/submissions.d.ts +2 -0
- package/dist/submissions.d.ts.map +1 -1
- package/dist/work-answer-regions.d.ts +11 -0
- package/dist/work-answer-regions.d.ts.map +1 -0
- package/dist/work-layout.d.ts +13 -0
- package/dist/work-layout.d.ts.map +1 -0
- package/dist/workbook-photo-contracts.d.ts +9 -7
- package/dist/workbook-photo-contracts.d.ts.map +1 -1
- package/dist/workbook-photo-ingestion.d.ts +1 -1
- package/dist/workbook-photo-ingestion.d.ts.map +1 -1
- package/dist/workbook-photo-models.d.ts +5 -5
- package/dist/workbook-photo-models.d.ts.map +1 -1
- package/dist/workbook-photo-service.d.ts +13 -10
- package/dist/workbook-photo-service.d.ts.map +1 -1
- package/package.json +12 -8
- package/dist/chunks/workbook-photo-service-BtMQsbhq.js.map +0 -1
- package/dist/workbook-answer-regions.d.ts +0 -11
- package/dist/workbook-answer-regions.d.ts.map +0 -1
- package/dist/workbook-completion.d.ts.map +0 -1
- package/dist/workbook-contracts.d.ts.map +0 -1
- package/dist/workbook-layout.d.ts +0 -13
- package/dist/workbook-layout.d.ts.map +0 -1
- package/dist/workbook-models.d.ts +0 -129
- package/dist/workbook-models.d.ts.map +0 -1
- package/dist/workbook-service.d.ts +0 -163
- package/dist/workbook-service.d.ts.map +0 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ClassCrunchLabsFileSource } from './class-crunchlabs.js';
|
|
2
|
+
/**
|
|
3
|
+
* Every unit file under `directory`: plain files, and the entries of any `.zip`
|
|
4
|
+
* (a zip is not expanded into the filesystem, and a zip inside a zip is not
|
|
5
|
+
* opened). Symbolic links are skipped; hidden files are ignored.
|
|
6
|
+
*/
|
|
7
|
+
export declare function folderClassCrunchLabsSource(directory: string): ClassCrunchLabsFileSource;
|
|
8
|
+
//# sourceMappingURL=class-crunchlabs-files.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"class-crunchlabs-files.d.ts","sourceRoot":"","sources":["../../src/sources/class-crunchlabs-files.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAEV,yBAAyB,EAC1B,MAAM,uBAAuB,CAAC;AAiJ/B;;;;GAIG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,MAAM,GAChB,yBAAyB,CAgD3B"}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Class CrunchLabs unit downloads to a course bundle (SMRT #4616).
|
|
3
|
+
*
|
|
4
|
+
* A unit download is a folder (or the zip parts a Drive export splits it into)
|
|
5
|
+
* holding `<Unit>_All Unit Wide Materials` and `<Unit>_Lesson <n>` folders. Files
|
|
6
|
+
* are lettered: A teacher manual, B slides, C student mission log, D status check
|
|
7
|
+
* assessment (plus guidance, editable), E handouts, F extras, G videos. The
|
|
8
|
+
* videos are not read: their names (`Lnn.step_Video_Kind_Title`) are matched,
|
|
9
|
+
* by unit, lesson and step, to the unit's YouTube course playlist and become
|
|
10
|
+
* external references.
|
|
11
|
+
*
|
|
12
|
+
* `buildClassCrunchLabsBundle` reads such a download and returns a manifest
|
|
13
|
+
* version 2 bundle for `CourseBundleImportService`. Nothing here touches the
|
|
14
|
+
* network: the playlist comes from an injected `ClassCrunchLabsPlaylistSource`,
|
|
15
|
+
* and files from an injected `ClassCrunchLabsFileSource` (Node folder and zip
|
|
16
|
+
* readers are in `class-crunchlabs-files.ts`). The files are CrunchLabs' own
|
|
17
|
+
* downloads, never hosted by us.
|
|
18
|
+
*/
|
|
19
|
+
import type { DocumentConverter, OfficeDocumentKind } from '../document-converter.js';
|
|
20
|
+
export declare const CLASS_CRUNCHLABS_PROVIDER_ID: "class-crunchlabs";
|
|
21
|
+
export declare const CLASS_CRUNCHLABS_SUBJECT = "Science";
|
|
22
|
+
/** The licence a family's own copy of a CrunchLabs unit carries. */
|
|
23
|
+
export declare const CLASS_CRUNCHLABS_LICENSE_KIND: "personal-use-copy";
|
|
24
|
+
export declare class ClassCrunchLabsError extends Error {
|
|
25
|
+
readonly code: 'no_unit' | 'multiple_units' | 'empty_unit' | 'too_large' | 'access_denied';
|
|
26
|
+
readonly detail: readonly string[];
|
|
27
|
+
constructor(code: 'no_unit' | 'multiple_units' | 'empty_unit' | 'too_large' | 'access_denied', message: string, detail?: readonly string[]);
|
|
28
|
+
}
|
|
29
|
+
/** One file of a unit download. Bytes are read lazily, and only for files that are used. */
|
|
30
|
+
export interface ClassCrunchLabsFile {
|
|
31
|
+
/** Path inside its source (folder-relative, or the zip entry name). */
|
|
32
|
+
path: string;
|
|
33
|
+
size: number;
|
|
34
|
+
/** CRC-32 (lower-case hex) when known without reading, used to spot repeated exports. */
|
|
35
|
+
crc32?: string;
|
|
36
|
+
/** Orders repeated exports of the same unit: the larger value is the newer export. */
|
|
37
|
+
exportId?: string;
|
|
38
|
+
read(): Promise<Uint8Array>;
|
|
39
|
+
}
|
|
40
|
+
export interface ClassCrunchLabsFileSource {
|
|
41
|
+
files(): Promise<ClassCrunchLabsFile[]>;
|
|
42
|
+
}
|
|
43
|
+
/** An in-memory source (tests, or a host that already holds the files). */
|
|
44
|
+
export declare function memoryClassCrunchLabsSource(files: ReadonlyArray<{
|
|
45
|
+
path: string;
|
|
46
|
+
bytes?: Uint8Array;
|
|
47
|
+
size?: number;
|
|
48
|
+
exportId?: string;
|
|
49
|
+
crc32?: string;
|
|
50
|
+
}>): ClassCrunchLabsFileSource;
|
|
51
|
+
export interface ClassCrunchLabsPlaylistItem {
|
|
52
|
+
videoId: string;
|
|
53
|
+
title: string;
|
|
54
|
+
position: number;
|
|
55
|
+
}
|
|
56
|
+
/** A YouTube course playlist of the @ClassCrunchLabs channel. */
|
|
57
|
+
export interface ClassCrunchLabsPlaylist {
|
|
58
|
+
id: string;
|
|
59
|
+
title: string;
|
|
60
|
+
/** The unit the playlist belongs to when the source knows it; else derived from the title. */
|
|
61
|
+
unit?: string;
|
|
62
|
+
items: ClassCrunchLabsPlaylistItem[];
|
|
63
|
+
}
|
|
64
|
+
/** Injected: tests use fixtures, a host fetches the channel's playlists. Never called from a test with a network. */
|
|
65
|
+
export interface ClassCrunchLabsPlaylistSource {
|
|
66
|
+
playlists(): Promise<ClassCrunchLabsPlaylist[]>;
|
|
67
|
+
}
|
|
68
|
+
export type ClassCrunchLabsPageCounter = (input: {
|
|
69
|
+
bytes: Uint8Array;
|
|
70
|
+
kind: 'pdf' | OfficeDocumentKind;
|
|
71
|
+
}) => Promise<number | null>;
|
|
72
|
+
/** Case, punctuation and spacing insensitive key. */
|
|
73
|
+
export declare const classCrunchLabsKey: (value: string) => string;
|
|
74
|
+
export interface ClassCrunchLabsVideoName {
|
|
75
|
+
lesson: number;
|
|
76
|
+
/** Lower-case step such as `6` or `1b`. */
|
|
77
|
+
step: string;
|
|
78
|
+
/** The kind token as named, for example `MaterialsPrep`. */
|
|
79
|
+
kind: string;
|
|
80
|
+
/** Humanized title, `''` when the name has none. */
|
|
81
|
+
title: string;
|
|
82
|
+
}
|
|
83
|
+
/** Parse `Lnn.step_Video_Kind_Title_Unit.mp4`; null when the name is not a lesson video. */
|
|
84
|
+
export declare function parseClassCrunchLabsVideoName(fileName: string, unit: string): ClassCrunchLabsVideoName | null;
|
|
85
|
+
export interface ClassCrunchLabsVideoMatch {
|
|
86
|
+
lesson: number;
|
|
87
|
+
step: string;
|
|
88
|
+
kind: string;
|
|
89
|
+
title: string;
|
|
90
|
+
videoId: string;
|
|
91
|
+
playlistItem: string;
|
|
92
|
+
}
|
|
93
|
+
export interface ClassCrunchLabsVideoMiss {
|
|
94
|
+
lesson: number;
|
|
95
|
+
step: string;
|
|
96
|
+
kind: string;
|
|
97
|
+
title: string;
|
|
98
|
+
reason: 'no_playlist' | 'no_item' | 'ambiguous' | 'item_taken';
|
|
99
|
+
}
|
|
100
|
+
/** The (lesson, step) a playlist item title names: `L03.6`, `Lesson 3 ... Step 6`. */
|
|
101
|
+
export declare function parsePlaylistItemTitle(title: string): {
|
|
102
|
+
lesson: number;
|
|
103
|
+
step: string;
|
|
104
|
+
} | null;
|
|
105
|
+
/** The playlist for a unit: its title (or `unit`) names the unit; the shortest title wins. */
|
|
106
|
+
export declare function pickUnitPlaylist(playlists: readonly ClassCrunchLabsPlaylist[], unit: string): ClassCrunchLabsPlaylist | null;
|
|
107
|
+
/**
|
|
108
|
+
* Match lesson videos to playlist items by lesson and step. Two videos that
|
|
109
|
+
* share a step (a materials-prep and a hands-on video) are told apart by the
|
|
110
|
+
* item title naming their title or kind; if that cannot decide, they are left
|
|
111
|
+
* unmatched as `ambiguous` rather than guessed. Each item is used once.
|
|
112
|
+
*/
|
|
113
|
+
export declare function matchClassCrunchLabsVideos(videos: readonly ClassCrunchLabsVideoName[], playlist: ClassCrunchLabsPlaylist | null): {
|
|
114
|
+
matched: ClassCrunchLabsVideoMatch[];
|
|
115
|
+
unmatched: ClassCrunchLabsVideoMiss[];
|
|
116
|
+
unusedItems: number;
|
|
117
|
+
};
|
|
118
|
+
export interface ClassCrunchLabsBuildOptions {
|
|
119
|
+
files: ClassCrunchLabsFileSource;
|
|
120
|
+
/** Without one, videos are reported unmatched (`no_playlist`) and no reference is written. */
|
|
121
|
+
playlists?: ClassCrunchLabsPlaylistSource;
|
|
122
|
+
/** Which unit when the download holds several; matched ignoring case and punctuation. */
|
|
123
|
+
unit?: string;
|
|
124
|
+
/**
|
|
125
|
+
* How many pages a mission log has, to write its lesson page range. Without
|
|
126
|
+
* one, or when it returns null, the lesson gets no page rows (a warning says so).
|
|
127
|
+
*/
|
|
128
|
+
pageCounter?: ClassCrunchLabsPageCounter;
|
|
129
|
+
/**
|
|
130
|
+
* The unit-wide "(all lessons)" files (the combined manual, deck, mission log,
|
|
131
|
+
* status checks and handouts) repeat the per-lesson files and are large, so they
|
|
132
|
+
* are left out by default. The supply list, posters and other unit-wide extras
|
|
133
|
+
* are always course members.
|
|
134
|
+
*/
|
|
135
|
+
includeUnitWideAggregates?: boolean;
|
|
136
|
+
/** Largest bundle part in bytes; default 90 MiB, never above the bundle archive limit. */
|
|
137
|
+
maxPartBytes?: number;
|
|
138
|
+
}
|
|
139
|
+
export interface ClassCrunchLabsReport {
|
|
140
|
+
unit: string;
|
|
141
|
+
lessons: number;
|
|
142
|
+
members: number;
|
|
143
|
+
courseMembers: number;
|
|
144
|
+
/** Bundles the unit was split into (1 unless it is large). */
|
|
145
|
+
parts: number;
|
|
146
|
+
pages: Array<{
|
|
147
|
+
lesson: number;
|
|
148
|
+
path: string;
|
|
149
|
+
pages: number;
|
|
150
|
+
}>;
|
|
151
|
+
videos: {
|
|
152
|
+
playlist: {
|
|
153
|
+
id: string;
|
|
154
|
+
title: string;
|
|
155
|
+
} | null;
|
|
156
|
+
matched: ClassCrunchLabsVideoMatch[];
|
|
157
|
+
unmatched: ClassCrunchLabsVideoMiss[];
|
|
158
|
+
unusedPlaylistItems: number;
|
|
159
|
+
/** Unit-level videos (a teaser): a course has no video of its own, so none is written. */
|
|
160
|
+
unitLevel: string[];
|
|
161
|
+
};
|
|
162
|
+
/** Same bytes under another name or place: only the preferred copy is bundled. */
|
|
163
|
+
duplicates: Array<{
|
|
164
|
+
path: string;
|
|
165
|
+
duplicateOf: string;
|
|
166
|
+
}>;
|
|
167
|
+
/** The same file in more than one export of the unit. */
|
|
168
|
+
duplicateExports: number;
|
|
169
|
+
/** A file that differs between exports: the newer export is used. */
|
|
170
|
+
superseded: number;
|
|
171
|
+
ignored: Array<{
|
|
172
|
+
path: string;
|
|
173
|
+
reason: string;
|
|
174
|
+
}>;
|
|
175
|
+
warnings: string[];
|
|
176
|
+
}
|
|
177
|
+
/** One importable bundle: a manifest version 2 and the files it names. */
|
|
178
|
+
export interface ClassCrunchLabsBundlePart {
|
|
179
|
+
bundle: {
|
|
180
|
+
files: Array<{
|
|
181
|
+
path: string;
|
|
182
|
+
bytes: Uint8Array;
|
|
183
|
+
}>;
|
|
184
|
+
};
|
|
185
|
+
manifest: Record<string, unknown>;
|
|
186
|
+
/** The lesson numbers this part carries. */
|
|
187
|
+
lessons: number[];
|
|
188
|
+
}
|
|
189
|
+
export interface ClassCrunchLabsBuild {
|
|
190
|
+
unit: string;
|
|
191
|
+
/**
|
|
192
|
+
* The bundles to import, in order, each with `CourseBundleImportService`. A
|
|
193
|
+
* unit that fits one archive is one part; a large one is split by lesson
|
|
194
|
+
* (course-level members go in the first part), never by file.
|
|
195
|
+
*/
|
|
196
|
+
parts: ClassCrunchLabsBundlePart[];
|
|
197
|
+
/** The first part, for the usual single-bundle unit. */
|
|
198
|
+
bundle: ClassCrunchLabsBundlePart['bundle'];
|
|
199
|
+
manifest: Record<string, unknown>;
|
|
200
|
+
/** A family's own copy of a unit is a personal-use copy. */
|
|
201
|
+
licenseKind: typeof CLASS_CRUNCHLABS_LICENSE_KIND;
|
|
202
|
+
report: ClassCrunchLabsReport;
|
|
203
|
+
}
|
|
204
|
+
/** Read a Class CrunchLabs unit download and build a manifest version 2 bundle. */
|
|
205
|
+
export declare function buildClassCrunchLabsBundle(options: ClassCrunchLabsBuildOptions): Promise<ClassCrunchLabsBuild>;
|
|
206
|
+
/**
|
|
207
|
+
* A page counter for mission logs: PDFs are counted directly (`pdf-lib`), Word
|
|
208
|
+
* and PowerPoint files by asking the injected converter to render them. Without
|
|
209
|
+
* a converter, only PDFs are counted. The count is a convenience for the page
|
|
210
|
+
* range; the importer still renders the member itself.
|
|
211
|
+
*/
|
|
212
|
+
export declare function createClassCrunchLabsPageCounter(options?: {
|
|
213
|
+
converter?: DocumentConverter;
|
|
214
|
+
timeoutMs?: number;
|
|
215
|
+
maxBytes?: number;
|
|
216
|
+
}): ClassCrunchLabsPageCounter;
|
|
217
|
+
//# sourceMappingURL=class-crunchlabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"class-crunchlabs.d.ts","sourceRoot":"","sources":["../../src/sources/class-crunchlabs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AASH,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAOlC,eAAO,MAAM,4BAA4B,EAAG,kBAA2B,CAAC;AACxE,eAAO,MAAM,wBAAwB,YAAY,CAAC;AAClD,oEAAoE;AACpE,eAAO,MAAM,6BAA6B,EAAG,mBAA4B,CAAC;AAE1E,qBAAa,oBAAqB,SAAQ,KAAK;IAE3C,QAAQ,CAAC,IAAI,EACT,SAAS,GACT,gBAAgB,GAChB,YAAY,GACZ,WAAW,GACX,eAAe;IAEnB,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE;gBAPzB,IAAI,EACT,SAAS,GACT,gBAAgB,GAChB,YAAY,GACZ,WAAW,GACX,eAAe,EACnB,OAAO,EAAE,MAAM,EACN,MAAM,GAAE,SAAS,MAAM,EAAO;CAK1C;AAID,4FAA4F;AAC5F,MAAM,WAAW,mBAAmB;IAClC,uEAAuE;IACvE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,yFAAyF;IACzF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sFAAsF;IACtF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC;CAC7B;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KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,UAAU,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC;IAC9D,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,4CAA4C;IAC5C,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AACD,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,KAAK,EAAE,yBAAyB,EAAE,CAAC;IACnC,wDAAwD;IACxD,MAAM,EAAE,yBAAyB,CAAC,QAAQ,CAAC,CAAC;IAC5C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,4DAA4D;IAC5D,WAAW,EAAE,OAAO,6BAA6B,CAAC;IAClD,MAAM,EAAE,qBAAqB,CAAC;CAC/B;AAcD,mFAAmF;AACnF,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,oBAAoB,CAAC,CAua/B;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAC9C,OAAO,GAAE;IACP,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACd,GACL,0BAA0B,CAsC5B"}
|
|
@@ -2,12 +2,21 @@ import { type Asset, type AssetRuntime, type AssetRuntimeOptions } from '@happyv
|
|
|
2
2
|
import type { DatabaseInterface } from '@happyvertical/sql';
|
|
3
3
|
import type { CatalogAuthorizer } from './catalog-service.js';
|
|
4
4
|
import { type LearnerAuthorizer, type LearnerRequest, LearnerService, LearnerValidationError } from './learner-service.js';
|
|
5
|
+
import { type ExternalVideoProvider, type LessonAssetRelationship, type MaterialAudience } from './lesson-assets.js';
|
|
6
|
+
import type { WorkAssistance } from './lesson-work-contracts.js';
|
|
7
|
+
import { type LessonActivity } from './lesson-work-models.js';
|
|
5
8
|
import type { Grade, Submission, SubmissionKind } from './submissions.js';
|
|
6
9
|
/** A single captured page. No model patches or pre-existing asset IDs are accepted. */
|
|
7
10
|
export interface SubmissionPage {
|
|
8
11
|
name: string;
|
|
9
12
|
mimeType: 'image/jpeg' | 'image/png' | 'image/webp' | 'application/pdf';
|
|
10
13
|
data: Buffer;
|
|
14
|
+
/**
|
|
15
|
+
* The lesson page this file is (`p1`, `p12-back`); default `p<position>`.
|
|
16
|
+
* A correction may carry only the pages it replaces: a page keeps its key
|
|
17
|
+
* across the correction chain, so a host can show "page 2: v1, v2".
|
|
18
|
+
*/
|
|
19
|
+
pageKey?: string;
|
|
11
20
|
}
|
|
12
21
|
export interface SubmissionAssetClaim {
|
|
13
22
|
enrollmentId: string;
|
|
@@ -45,6 +54,7 @@ export type SubmissionView = Readonly<{
|
|
|
45
54
|
pages: ReadonlyArray<{
|
|
46
55
|
assetId: string;
|
|
47
56
|
sortOrder: number;
|
|
57
|
+
pageKey: string;
|
|
48
58
|
}>;
|
|
49
59
|
/** Guardian-origin photo work remains private until explicit feedback release. */
|
|
50
60
|
awaitingParentRelease?: boolean;
|
|
@@ -89,10 +99,36 @@ type CaptureRequest = LessonRequest & {
|
|
|
89
99
|
notes?: string;
|
|
90
100
|
intake?: SubmissionIntake;
|
|
91
101
|
};
|
|
92
|
-
/**
|
|
93
|
-
|
|
102
|
+
/**
|
|
103
|
+
* Book and loose-page work is captured only through `LessonWorkService`, which
|
|
104
|
+
* owns its receipt, correction-identity and release checks.
|
|
105
|
+
*/
|
|
106
|
+
export declare class LessonWorkWorkflowRequiredError extends Error {
|
|
94
107
|
constructor();
|
|
95
108
|
}
|
|
109
|
+
/** An external video reference is not an allowlisted YouTube id or URL. */
|
|
110
|
+
export declare class ExternalVideoReferenceError extends LearnerValidationError {
|
|
111
|
+
constructor();
|
|
112
|
+
}
|
|
113
|
+
/** One material as a learner or guardian may see it. */
|
|
114
|
+
export type LessonMaterialView = Readonly<{
|
|
115
|
+
id: string;
|
|
116
|
+
kind: 'file' | 'external-video';
|
|
117
|
+
scope: 'lesson' | 'course';
|
|
118
|
+
relationship: LessonAssetRelationship;
|
|
119
|
+
audience: MaterialAudience;
|
|
120
|
+
title: string;
|
|
121
|
+
/** Sort order for files, step order for videos. */
|
|
122
|
+
order: number;
|
|
123
|
+
/** Files only; sign with `signLessonMaterial` / `signCourseMaterial`. */
|
|
124
|
+
assetId: string | null;
|
|
125
|
+
provider: ExternalVideoProvider | null;
|
|
126
|
+
videoId: string | null;
|
|
127
|
+
/** Privacy-enhanced embed URL for an external video. */
|
|
128
|
+
embedUrl: string | null;
|
|
129
|
+
}>;
|
|
130
|
+
/** The page key a file carries: its own, or `p<position>` for older rows. */
|
|
131
|
+
export declare function submissionPageKey(pageKey: string, sortOrder: number): string;
|
|
96
132
|
/** Failure includes fresh asset identities only, for explicit storage reconciliation. */
|
|
97
133
|
export declare class SubmissionStorageCleanupError extends Error {
|
|
98
134
|
readonly assetIds: readonly string[];
|
|
@@ -122,20 +158,42 @@ export declare class SubmissionService extends LearnerService {
|
|
|
122
158
|
guardianOrigin: boolean;
|
|
123
159
|
released: boolean;
|
|
124
160
|
}>;
|
|
161
|
+
/**
|
|
162
|
+
* A submission's learner-owned page files and whether they are withheld
|
|
163
|
+
* from this actor (guardian-origin source awaiting release). The caller has
|
|
164
|
+
* already authorized the submission's learner and enrollment.
|
|
165
|
+
*/
|
|
166
|
+
protected submissionPages(row: Submission, actorUserId: string, pagesOnly?: boolean): Promise<{
|
|
167
|
+
pages: Array<{
|
|
168
|
+
assetId: string;
|
|
169
|
+
sortOrder: number;
|
|
170
|
+
pageKey: string;
|
|
171
|
+
}>;
|
|
172
|
+
awaitingParentRelease: boolean;
|
|
173
|
+
guardianOrigin: boolean;
|
|
174
|
+
learnerUserId: string;
|
|
175
|
+
}>;
|
|
125
176
|
private view;
|
|
126
177
|
/** Recheck the exact assignment without creating progress or accepting bytes.
|
|
127
178
|
* Trusted intake bridges call this before reading retained evidence.
|
|
128
179
|
*/
|
|
129
180
|
assertLessonAssignment(request: LessonRequest): Promise<void>;
|
|
130
|
-
/**
|
|
131
|
-
|
|
181
|
+
/**
|
|
182
|
+
* Refuse generic upload entry points for book and loose-page work, using
|
|
183
|
+
* the authoritative enrollment, lesson and predecessor. Hosts call this
|
|
184
|
+
* before creating a generic intake receipt.
|
|
185
|
+
*/
|
|
186
|
+
assertOrdinarySubmissionScope(request: LearnerRequest & {
|
|
132
187
|
enrollmentId: string;
|
|
133
188
|
lessonId?: string;
|
|
134
189
|
previousSubmissionId?: string;
|
|
135
190
|
}): Promise<void>;
|
|
136
191
|
captureSubmission(request: CaptureRequest): Promise<SubmissionView>;
|
|
137
192
|
/** Owning workflow extension; no browser input can grant this scoped path. */
|
|
138
|
-
protected
|
|
193
|
+
protected captureActivitySubmission(request: CaptureRequest, scope: {
|
|
194
|
+
activityId: string;
|
|
195
|
+
assistance: WorkAssistance;
|
|
196
|
+
}): Promise<SubmissionView>;
|
|
139
197
|
private captureSubmissionInScope;
|
|
140
198
|
/** Capture a blank workbook scan without claiming completion or a grade. */
|
|
141
199
|
captureBlankReference(request: LessonRequest & {
|
|
@@ -155,6 +213,22 @@ export declare class SubmissionService extends LearnerService {
|
|
|
155
213
|
getSubmission(request: SubmissionRequest): Promise<SubmissionView>;
|
|
156
214
|
/** Latest retained completed-work evidence; lesson completion is independent. */
|
|
157
215
|
getLatestLessonSubmission(request: LessonRequest): Promise<SubmissionView | null>;
|
|
216
|
+
/** The course work policy a new attempt snapshots (its enrollment's course). */
|
|
217
|
+
protected workPolicy(activity: LessonActivity): Promise<{
|
|
218
|
+
reviewRequired: boolean;
|
|
219
|
+
policyVersion: number;
|
|
220
|
+
}>;
|
|
221
|
+
/**
|
|
222
|
+
* Record a completed-work hand-in in the lesson work pipeline: the learner's
|
|
223
|
+
* activity on this lesson (created on first capture) and one immutable
|
|
224
|
+
* attempt bound to the submission, continuing its predecessor's episode.
|
|
225
|
+
*/
|
|
226
|
+
protected recordAttempt(request: LessonRequest, row: Submission, pages: readonly SubmissionPage[], assetIds: readonly string[], scope: {
|
|
227
|
+
activity: LessonActivity | null;
|
|
228
|
+
assistance: WorkAssistance;
|
|
229
|
+
}): Promise<void>;
|
|
230
|
+
/** A guardian grade on an ordinary lesson's current attempt completes it. */
|
|
231
|
+
private recordGradeCompletion;
|
|
158
232
|
private grade;
|
|
159
233
|
reviewSubmission(request: SubmissionRequest & {
|
|
160
234
|
score?: number | null;
|
|
@@ -196,6 +270,62 @@ export declare class SubmissionService extends LearnerService {
|
|
|
196
270
|
expiresAt: Date;
|
|
197
271
|
}>;
|
|
198
272
|
/** Sign only an exact authorized printable join; answer keys never qualify. */
|
|
273
|
+
/** Whether the actor is the learner themself (learner audience only). */
|
|
274
|
+
private learnerAudienceOnly;
|
|
275
|
+
private visibleTo;
|
|
276
|
+
private materialName;
|
|
277
|
+
/**
|
|
278
|
+
* A lesson's materials for this actor: files by role and audience, then
|
|
279
|
+
* external video references in step order. A learner sees only
|
|
280
|
+
* learner-audience material; keys and guidance never reach them.
|
|
281
|
+
*/
|
|
282
|
+
listLessonMaterials(request: LessonRequest): Promise<LessonMaterialView[]>;
|
|
283
|
+
/** Course-level materials (supply lists, posters) under the same audience rule. */
|
|
284
|
+
listCourseMaterials(request: LearnerRequest & {
|
|
285
|
+
enrollmentId: string;
|
|
286
|
+
}): Promise<LessonMaterialView[]>;
|
|
287
|
+
private signMaterial;
|
|
288
|
+
/** Sign one lesson file the actor may see (learners: learner audience only). */
|
|
289
|
+
signLessonMaterial(request: LessonRequest & {
|
|
290
|
+
materialId: string;
|
|
291
|
+
}): Promise<{
|
|
292
|
+
url: string;
|
|
293
|
+
expiresAt: Date;
|
|
294
|
+
}>;
|
|
295
|
+
/** Sign one course-level file the actor may see. */
|
|
296
|
+
signCourseMaterial(request: LearnerRequest & {
|
|
297
|
+
enrollmentId: string;
|
|
298
|
+
materialId: string;
|
|
299
|
+
}): Promise<{
|
|
300
|
+
url: string;
|
|
301
|
+
expiresAt: Date;
|
|
302
|
+
}>;
|
|
303
|
+
/** Re-save a family material join under the exact private-asset capability. */
|
|
304
|
+
private saveFamilyMaterial;
|
|
305
|
+
/** Family-owned, non-authored course rows only; authored material changes through authoring. */
|
|
306
|
+
private familyMaterialCourse;
|
|
307
|
+
/**
|
|
308
|
+
* Change who a family-owned material is for, within its role's bounds
|
|
309
|
+
* (keys and assessment guidance stay guardian-only). Guardian planning.
|
|
310
|
+
*/
|
|
311
|
+
setMaterialAudience(request: LearnerRequest & {
|
|
312
|
+
enrollmentId: string;
|
|
313
|
+
scope: 'lesson' | 'course';
|
|
314
|
+
kind: 'file' | 'external-video';
|
|
315
|
+
materialId: string;
|
|
316
|
+
audience: MaterialAudience;
|
|
317
|
+
}): Promise<LessonMaterialView>;
|
|
318
|
+
/**
|
|
319
|
+
* Add an allowlisted external video (a YouTube id or URL) to a family-owned
|
|
320
|
+
* lesson, with its title and step order. Nothing is downloaded. A replay of
|
|
321
|
+
* the same video, title, step and audience returns the same reference.
|
|
322
|
+
*/
|
|
323
|
+
addLessonVideo(request: LessonRequest & {
|
|
324
|
+
reference: string;
|
|
325
|
+
title: string;
|
|
326
|
+
stepOrder: number;
|
|
327
|
+
audience?: MaterialAudience;
|
|
328
|
+
}): Promise<LessonMaterialView>;
|
|
199
329
|
signLessonPrintable(request: LessonRequest & {
|
|
200
330
|
assetId: string;
|
|
201
331
|
}): Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submission-service.d.ts","sourceRoot":"","sources":["../src/submission-service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,KAAK,EACV,KAAK,YAAY,EACjB,KAAK,mBAAmB,EAGzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAa9D,OAAO,EAEL,KAAK,iBAAiB,EAEtB,KAA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EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,IAAI,CAAA;KAAE,CAAC;IA0C5C,gFAAgF;IAC1E,oBAAoB,CACxB,OAAO,EAAE,cAAc,GAAG;QACxB,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,SAAS;YACf,QAAQ,EAAE,MAAM,CAAC;YACjB,SAAS,EAAE,MAAM,CAAC;YAClB,QAAQ,EAAE,MAAM,CAAC;SAClB,EAAE,CAAC;KACL,GACA,OAAO,CAAC,aAAa,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CA4FjE"}
|
package/dist/submissions.d.ts
CHANGED
|
@@ -89,6 +89,8 @@ export declare class SubmissionAsset extends SmrtObject {
|
|
|
89
89
|
assetId: string;
|
|
90
90
|
relationship: SubmissionAssetRelationship;
|
|
91
91
|
sortOrder: number;
|
|
92
|
+
/** Lesson page this file is; '' on older rows reads as `p<sortOrder+1>`. */
|
|
93
|
+
pageKey: string;
|
|
92
94
|
constructor(options?: Record<string, unknown>);
|
|
93
95
|
save(options?: SmrtSaveOptions): Promise<this>;
|
|
94
96
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submissions.d.ts","sourceRoot":"","sources":["../src/submissions.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,UAAU,EACV,KAAK,eAAe,EAErB,MAAM,0BAA0B,CAAC;AAkElC,MAAM,MAAM,gBAAgB,GACxB,UAAU,GACV,YAAY,GACZ,cAAc,GACd,QAAQ,GACR,UAAU,CAAC;AACf,MAAM,MAAM,0BAA0B,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;AAC3E,MAAM,MAAM,2BAA2B,GAAG,MAAM,GAAG,YAAY,CAAC;AAChE,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,IAAI,GAAG,UAAU,GAAG,YAAY,CAAC;AACnE,4EAA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,EAAE,MAAM,GAAG,IAAI,CAAQ;IACM,KAAK,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC5B,YAAY,EAAE,MAAM,GAAG,IAAI,CAChE;IACqC,cAAc,EAAE,MAAM,GAAG,IAAI,CAClE;IACP,aAAa,SAAQ;IACrB;;;OAGG;IACsC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CACnE;IACP,QAAQ,SAAM;IACd,QAAQ,OAAc;gBAEV,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM;IAKjD,gBAAgB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAI3C,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAIvC,IAAI,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;CAsC9D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { WorkAnswerRegions, WorkQuestion } from './lesson-work-contracts.js';
|
|
2
|
+
/** Normalize presentation only. Never change answers, layout or verified anchors. */
|
|
3
|
+
export declare function normalizeWorkAnswerRegions(value: unknown, questions: readonly WorkQuestion[], sources: readonly {
|
|
4
|
+
assetId: string;
|
|
5
|
+
sha256?: string;
|
|
6
|
+
pageCount: number;
|
|
7
|
+
}[]): {
|
|
8
|
+
answerRegions?: WorkAnswerRegions;
|
|
9
|
+
answerRegionsOmission?: 'invalid';
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=work-answer-regions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"work-answer-regions.d.ts","sourceRoot":"","sources":["../src/work-answer-regions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,YAAY,EACb,MAAM,4BAA4B,CAAC;AACpC,qFAAqF;AACrF,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,OAAO,EACd,SAAS,EAAE,SAAS,YAAY,EAAE,EAClC,OAAO,EAAE,SAAS;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,EAAE,GAC1E;IACD,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,qBAAqB,CAAC,EAAE,SAAS,CAAC;CACnC,CAoEA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { WorkObservedLayout, WorkQuestion } from './lesson-work-contracts.js';
|
|
2
|
+
/** Copy only bounded observed metadata, dropping the entire layout on any error.
|
|
3
|
+
* This browser-safe helper never changes questions or grants source geometry.
|
|
4
|
+
*/
|
|
5
|
+
export declare function normalizeWorkObservedLayout(value: unknown, questions: readonly WorkQuestion[], sources: readonly {
|
|
6
|
+
assetId: string;
|
|
7
|
+
sha256?: string;
|
|
8
|
+
pageCount: number;
|
|
9
|
+
}[]): {
|
|
10
|
+
layout?: WorkObservedLayout;
|
|
11
|
+
layoutOmission?: 'invalid';
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=work-layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"work-layout.d.ts","sourceRoot":"","sources":["../src/work-layout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,YAAY,EACb,MAAM,4BAA4B,CAAC;AASpC;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,OAAO,EACd,SAAS,EAAE,SAAS,YAAY,EAAE,EAClC,OAAO,EAAE,SAAS;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,EAAE,GAC1E;IAAE,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAAC,cAAc,CAAC,EAAE,SAAS,CAAA;CAAE,CAgG7D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { LessonActivityView } from './lesson-work-contracts.js';
|
|
2
2
|
/** Activity keys identify a printed lesson, potentially spanning multiple pages. */
|
|
3
3
|
export interface WorkbookPhotoIdentification {
|
|
4
4
|
kind: 'lesson' | 'work' | 'cover' | 'reference' | 'uncertain';
|
|
@@ -23,19 +23,19 @@ export interface WorkbookPhotoProposal {
|
|
|
23
23
|
identityEvidence: string[];
|
|
24
24
|
/** A printed lesson/exercise identifier, never the page number alone. */
|
|
25
25
|
lessonEvidence: string;
|
|
26
|
-
/** Optional exact existing
|
|
26
|
+
/** Optional exact existing book course candidate (course id) from authorized discovery. */
|
|
27
27
|
workbookId?: string;
|
|
28
28
|
}
|
|
29
29
|
export interface WorkbookPhotoIntakeView {
|
|
30
30
|
id: string;
|
|
31
31
|
itemId: string;
|
|
32
|
-
/**
|
|
33
|
-
|
|
32
|
+
/** Book course of the exact latest retained book-context resolution, independent of filing. */
|
|
33
|
+
bookCourseId: string | null;
|
|
34
34
|
learnerId: string;
|
|
35
35
|
status: 'pending' | 'resolved' | 'captured';
|
|
36
36
|
identification: WorkbookPhotoIdentification | null;
|
|
37
37
|
proposal: WorkbookPhotoProposal | null;
|
|
38
|
-
activity:
|
|
38
|
+
activity: LessonActivityView | null;
|
|
39
39
|
submissionId: string | null;
|
|
40
40
|
originals: {
|
|
41
41
|
assetId: string;
|
|
@@ -45,9 +45,11 @@ export interface WorkbookPhotoIntakeView {
|
|
|
45
45
|
}[];
|
|
46
46
|
}
|
|
47
47
|
export declare function validateWorkbookPhotoIdentification(value: WorkbookPhotoIdentification): void;
|
|
48
|
-
|
|
48
|
+
/** A family book course offered to photo identification and the guardian picker. */
|
|
49
|
+
export interface PhotoBookCourseView {
|
|
50
|
+
/** Course id; the provider wire field `workbookId` carries this value. */
|
|
49
51
|
id: string;
|
|
50
|
-
|
|
52
|
+
bookKey: string;
|
|
51
53
|
title: string;
|
|
52
54
|
edition: string;
|
|
53
55
|
publisher?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workbook-photo-contracts.d.ts","sourceRoot":"","sources":["../src/workbook-photo-contracts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"workbook-photo-contracts.d.ts","sourceRoot":"","sources":["../src/workbook-photo-contracts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,oFAAoF;AACpF,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,WAAW,GAAG,WAAW,CAAC;IAC9D,QAAQ,CAAC,EAAE;QACT,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,QAAQ,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAClD,SAAS,CAAC,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,CAAC;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AACD,MAAM,WAAW,qBAAqB;IACpC,cAAc,EAAE,2BAA2B,CAAC;IAC5C,UAAU,EAAE,WAAW,GAAG,WAAW,CAAC;IACtC,iFAAiF;IACjF,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,yEAAyE;IACzE,cAAc,EAAE,MAAM,CAAC;IACvB,2FAA2F;IAC3F,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AACD,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,+FAA+F;IAC/F,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;IAC5C,cAAc,EAAE,2BAA2B,GAAG,IAAI,CAAC;IACnD,QAAQ,EAAE,qBAAqB,GAAG,IAAI,CAAC;IACvC,QAAQ,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACpC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE;QACT,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;KAChB,EAAE,CAAC;CACL;AACD,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,2BAA2B,GACjC,IAAI,CA0CN;AAED,oFAAoF;AACpF,MAAM,WAAW,mBAAmB;IAClC,0EAA0E;IAC1E,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -64,7 +64,7 @@ export declare function processWorkbookPhotoAnalysis(input: Parameters<typeof pr
|
|
|
64
64
|
revision: number;
|
|
65
65
|
};
|
|
66
66
|
intake: import("./workbook-photo-contracts.js").WorkbookPhotoIntakeView;
|
|
67
|
-
capture: import("./
|
|
67
|
+
capture: import("./lesson-work-contracts.js").WorkAttemptView | null;
|
|
68
68
|
assessmentRequired: boolean;
|
|
69
69
|
}>;
|
|
70
70
|
//# sourceMappingURL=workbook-photo-ingestion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workbook-photo-ingestion.d.ts","sourceRoot":"","sources":["../src/workbook-photo-ingestion.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAEL,KAAK,cAAc,EACnB,K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ACD,yFAAyF;AACzF,wBAAsB,0BAA0B,CAAC,KAAK,EAAE;IACtD,SAAS,EAAE,gBAAgB,CAAC;IAC5B,KAAK,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC;IAChC,SAAS,EAAE,oBAAoB,CAAC;IAChC,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;CAChB,4EA2CA;AACD,+FAA+F;AAC/F,wBAAsB,mCAAmC,CAAC,KAAK,EAAE;IAC/D,SAAS,EAAE,gBAAgB,CAAC;IAC5B,KAAK,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC;IAChC,SAAS,EAAE,oBAAoB,CAAC;IAChC,OAAO,EAAE,cAAc,GAAG;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;CAChD,4EAyFA;AACD,uFAAuF;AACvF,wBAAsB,4BAA4B,CAChD,KAAK,EAAE,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC,CAAC,CAAC,GAAG;IACtD,KAAK,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC;IAChC,SAAS,EAAE,oBAAoB,CAAC;IAChC,OAAO,EAAE,cAAc,GAAG;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;CAChD;;;;;;;;;;GA8BF"}
|
|
@@ -47,18 +47,18 @@ export declare class WorkbookPhotoDecision extends SmrtObject {
|
|
|
47
47
|
export declare class WorkbookPhotoDecisionCollection extends SmrtCollection<WorkbookPhotoDecision> {
|
|
48
48
|
static readonly _itemClass: typeof WorkbookPhotoDecision;
|
|
49
49
|
}
|
|
50
|
-
/** Versioned contextual metadata; never edits
|
|
51
|
-
export declare class
|
|
50
|
+
/** Versioned contextual metadata; never edits book identity or learning evidence. */
|
|
51
|
+
export declare class BookContextRevision extends SmrtObject {
|
|
52
52
|
tenantId: string;
|
|
53
53
|
learnerId: string;
|
|
54
54
|
delete(): Promise<void>;
|
|
55
|
-
|
|
55
|
+
courseId: string;
|
|
56
56
|
decisionId: string;
|
|
57
57
|
metadataJson: string;
|
|
58
58
|
constructor(options?: Record<string, unknown>);
|
|
59
59
|
save(options?: SmrtSaveOptions): Promise<this>;
|
|
60
60
|
}
|
|
61
|
-
export declare class
|
|
62
|
-
static readonly _itemClass: typeof
|
|
61
|
+
export declare class BookContextRevisionCollection extends SmrtCollection<BookContextRevision> {
|
|
62
|
+
static readonly _itemClass: typeof BookContextRevision;
|
|
63
63
|
}
|
|
64
64
|
//# sourceMappingURL=workbook-photo-models.d.ts.map
|