@khorsheed/dsh-library 0.0.0-stage → 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.
- package/CHANGELOG.md +14 -0
- package/README.en.md +49 -0
- package/README.i18n.yaml +6 -0
- package/README.md +48 -2
- package/cordis.patch.yml +17 -0
- package/lib/client.js +66276 -0
- package/lib/index.js +3318 -0
- package/lib/profiles-BXM8xNUf.js +1608 -0
- package/lib/profiles-BrbeM-bi.js +1635 -0
- package/lib/profiles-CFrPQdfO.js +1692 -0
- package/lib/profiles-DxtzIUvd.js +1632 -0
- package/lib/profiles-O0ddEit3.js +1631 -0
- package/lib/profiles-Oj-zBAY9.js +1692 -0
- package/lib/profiles-gIEviEuO.js +1610 -0
- package/lib/store-CIcZgTsg.js +1456 -0
- package/lib/store-DfYOmS44.js +1418 -0
- package/lib/tool.js +1597 -0
- package/lib/typert.host.d.ts +3 -0
- package/lib/typert.host.js +3811 -0
- package/lib/typert.remote-client.d.ts +137 -0
- package/lib/typert.remote-client.js +3077 -0
- package/lib/types/cards.d.ts +41 -0
- package/lib/types/cards.js +111 -0
- package/lib/types/client/LibraryPane.d.ts +26 -0
- package/lib/types/client/LibraryPane.js +117 -0
- package/lib/types/client/bind/BindChip.d.ts +33 -0
- package/lib/types/client/bind/BindChip.js +102 -0
- package/lib/types/client/contract.d.ts +164 -0
- package/lib/types/client/contract.js +1 -0
- package/lib/types/client/covers.d.ts +36 -0
- package/lib/types/client/covers.js +66 -0
- package/lib/types/client/definition.d.ts +27 -0
- package/lib/types/client/definition.js +32 -0
- package/lib/types/client/icons-local.d.ts +41 -0
- package/lib/types/client/icons-local.js +25 -0
- package/lib/types/client/icons.d.ts +27 -0
- package/lib/types/client/icons.js +11 -0
- package/lib/types/client/index.d.ts +35 -0
- package/lib/types/client/index.js +219 -0
- package/lib/types/client/judge.d.ts +70 -0
- package/lib/types/client/judge.js +262 -0
- package/lib/types/client/locales.d.ts +553 -0
- package/lib/types/client/locales.js +1076 -0
- package/lib/types/client/look.d.ts +63 -0
- package/lib/types/client/look.js +64 -0
- package/lib/types/client/math.d.ts +24 -0
- package/lib/types/client/math.js +47 -0
- package/lib/types/client/mistakes.d.ts +21 -0
- package/lib/types/client/mistakes.js +28 -0
- package/lib/types/client/preset-visibility.d.ts +109 -0
- package/lib/types/client/preset-visibility.js +123 -0
- package/lib/types/client/quiz-drafts.d.ts +29 -0
- package/lib/types/client/quiz-drafts.js +50 -0
- package/lib/types/client/store.d.ts +109 -0
- package/lib/types/client/store.js +44 -0
- package/lib/types/client/titles.d.ts +17 -0
- package/lib/types/client/titles.js +23 -0
- package/lib/types/client/ui.d.ts +96 -0
- package/lib/types/client/ui.js +124 -0
- package/lib/types/client/views/book.d.ts +57 -0
- package/lib/types/client/views/book.js +164 -0
- package/lib/types/client/views/cards.d.ts +17 -0
- package/lib/types/client/views/cards.js +53 -0
- package/lib/types/client/views/home.d.ts +26 -0
- package/lib/types/client/views/home.js +263 -0
- package/lib/types/client/views/lesson.d.ts +42 -0
- package/lib/types/client/views/lesson.js +146 -0
- package/lib/types/client/views/path.d.ts +32 -0
- package/lib/types/client/views/path.js +64 -0
- package/lib/types/client/views/quiz.d.ts +42 -0
- package/lib/types/client/views/quiz.js +366 -0
- package/lib/types/client/views/station-quiz.d.ts +43 -0
- package/lib/types/client/views/station-quiz.js +203 -0
- package/lib/types/client/views/station.d.ts +18 -0
- package/lib/types/client/views/station.js +142 -0
- package/lib/types/image-refs.d.ts +35 -0
- package/lib/types/image-refs.js +71 -0
- package/lib/types/index.d.ts +51 -0
- package/lib/types/index.js +31 -0
- package/lib/types/mastery.d.ts +81 -0
- package/lib/types/mastery.js +110 -0
- package/lib/types/profiles.d.ts +31 -0
- package/lib/types/profiles.js +25 -0
- package/lib/types/remote.d.ts +355 -0
- package/lib/types/remote.js +332 -0
- package/lib/types/service/assess.d.ts +144 -0
- package/lib/types/service/assess.js +773 -0
- package/lib/types/service/bindings.d.ts +92 -0
- package/lib/types/service/bindings.js +198 -0
- package/lib/types/service/cards.d.ts +85 -0
- package/lib/types/service/cards.js +320 -0
- package/lib/types/service/core.d.ts +124 -0
- package/lib/types/service/core.js +169 -0
- package/lib/types/service/pages.d.ts +60 -0
- package/lib/types/service/pages.js +125 -0
- package/lib/types/service/roadmap.d.ts +99 -0
- package/lib/types/service/roadmap.js +284 -0
- package/lib/types/service/rules.d.ts +63 -0
- package/lib/types/service/rules.js +245 -0
- package/lib/types/service/shelf.d.ts +136 -0
- package/lib/types/service/shelf.js +422 -0
- package/lib/types/service.d.ts +42 -0
- package/lib/types/service.js +41 -0
- package/lib/types/store.d.ts +257 -0
- package/lib/types/store.js +1376 -0
- package/lib/types/tool-definition.d.ts +49 -0
- package/lib/types/tool-definition.js +49 -0
- package/lib/types/tool.d.ts +71 -0
- package/lib/types/tool.js +174 -0
- package/lib/types/tools/assess.d.ts +11 -0
- package/lib/types/tools/assess.js +82 -0
- package/lib/types/tools/binding.d.ts +11 -0
- package/lib/types/tools/binding.js +46 -0
- package/lib/types/tools/cards.d.ts +11 -0
- package/lib/types/tools/cards.js +100 -0
- package/lib/types/tools/kit.d.ts +215 -0
- package/lib/types/tools/kit.js +281 -0
- package/lib/types/tools/notes.d.ts +11 -0
- package/lib/types/tools/notes.js +40 -0
- package/lib/types/tools/page.d.ts +11 -0
- package/lib/types/tools/page.js +59 -0
- package/lib/types/tools/project.d.ts +11 -0
- package/lib/types/tools/project.js +67 -0
- package/lib/types/tools/quiz.d.ts +11 -0
- package/lib/types/tools/quiz.js +74 -0
- package/lib/types/tools/read.d.ts +11 -0
- package/lib/types/tools/read.js +127 -0
- package/lib/types/tools/resource.d.ts +11 -0
- package/lib/types/tools/resource.js +147 -0
- package/lib/types/tools/roadmap.d.ts +11 -0
- package/lib/types/tools/roadmap.js +102 -0
- package/lib/types/types.d.ts +752 -0
- package/lib/types/types.js +159 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +135 -3
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
2
|
+
var useValue = arguments.length > 2;
|
|
3
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
4
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
5
|
+
}
|
|
6
|
+
return useValue ? value : void 0;
|
|
7
|
+
};
|
|
8
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
9
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
10
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
11
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
12
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
13
|
+
var _, done = false;
|
|
14
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
15
|
+
var context = {};
|
|
16
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
17
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
18
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
19
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
20
|
+
if (kind === "accessor") {
|
|
21
|
+
if (result === void 0) continue;
|
|
22
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
23
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
24
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
25
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
26
|
+
}
|
|
27
|
+
else if (_ = accept(result)) {
|
|
28
|
+
if (kind === "field") initializers.unshift(_);
|
|
29
|
+
else descriptor[key] = _;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
33
|
+
done = true;
|
|
34
|
+
};
|
|
35
|
+
import { Remote, TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol';
|
|
36
|
+
/** The wire namespace is `library`: the browser calls `remote.library.*`. */
|
|
37
|
+
let LibraryRemoteService = (() => {
|
|
38
|
+
let _classSuper = TypertRemoteService;
|
|
39
|
+
let _instanceExtraInitializers = [];
|
|
40
|
+
let _capabilities_decorators;
|
|
41
|
+
let _listProjects_decorators;
|
|
42
|
+
let _getProject_decorators;
|
|
43
|
+
let _createProject_decorators;
|
|
44
|
+
let _updateProject_decorators;
|
|
45
|
+
let _deleteProject_decorators;
|
|
46
|
+
let _getResource_decorators;
|
|
47
|
+
let _listResources_decorators;
|
|
48
|
+
let _putResource_decorators;
|
|
49
|
+
let _setBookKind_decorators;
|
|
50
|
+
let _moveResource_decorators;
|
|
51
|
+
let _removeResource_decorators;
|
|
52
|
+
let _getRoadmap_decorators;
|
|
53
|
+
let _adoptRoadmap_decorators;
|
|
54
|
+
let _discardDraft_decorators;
|
|
55
|
+
let _markNodeRead_decorators;
|
|
56
|
+
let _listPages_decorators;
|
|
57
|
+
let _readPagePhoto_decorators;
|
|
58
|
+
let _savePhoto_decorators;
|
|
59
|
+
let _recordPage_decorators;
|
|
60
|
+
let _listCards_decorators;
|
|
61
|
+
let _dueCards_decorators;
|
|
62
|
+
let _writeCards_decorators;
|
|
63
|
+
let _editCard_decorators;
|
|
64
|
+
let _undoCards_decorators;
|
|
65
|
+
let _reviewCard_decorators;
|
|
66
|
+
let _listAssessments_decorators;
|
|
67
|
+
let _getAssessment_decorators;
|
|
68
|
+
let _putAttempt_decorators;
|
|
69
|
+
let _listAttempts_decorators;
|
|
70
|
+
let _boundTarget_decorators;
|
|
71
|
+
let _bindTarget_decorators;
|
|
72
|
+
let _listEvents_decorators;
|
|
73
|
+
let _recentChanges_decorators;
|
|
74
|
+
let _createRetake_decorators;
|
|
75
|
+
let _recentRecords_decorators;
|
|
76
|
+
let _latestActivity_decorators;
|
|
77
|
+
let _stats_decorators;
|
|
78
|
+
return class LibraryRemoteService extends _classSuper {
|
|
79
|
+
static {
|
|
80
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
81
|
+
_capabilities_decorators = [Remote('capabilities')];
|
|
82
|
+
_listProjects_decorators = [Remote('listProjects')];
|
|
83
|
+
_getProject_decorators = [Remote('getProject')];
|
|
84
|
+
_createProject_decorators = [Remote('createProject')];
|
|
85
|
+
_updateProject_decorators = [Remote('updateProject')];
|
|
86
|
+
_deleteProject_decorators = [Remote('deleteProject')];
|
|
87
|
+
_getResource_decorators = [Remote('getResource')];
|
|
88
|
+
_listResources_decorators = [Remote('listResources')];
|
|
89
|
+
_putResource_decorators = [Remote('putResource')];
|
|
90
|
+
_setBookKind_decorators = [Remote('setBookKind')];
|
|
91
|
+
_moveResource_decorators = [Remote('moveResource')];
|
|
92
|
+
_removeResource_decorators = [Remote('removeResource')];
|
|
93
|
+
_getRoadmap_decorators = [Remote('getRoadmap')];
|
|
94
|
+
_adoptRoadmap_decorators = [Remote('adoptRoadmap')];
|
|
95
|
+
_discardDraft_decorators = [Remote('discardDraft')];
|
|
96
|
+
_markNodeRead_decorators = [Remote('markNodeRead')];
|
|
97
|
+
_listPages_decorators = [Remote('listPages')];
|
|
98
|
+
_readPagePhoto_decorators = [Remote('readPagePhoto')];
|
|
99
|
+
_savePhoto_decorators = [Remote('savePhoto')];
|
|
100
|
+
_recordPage_decorators = [Remote('recordPage')];
|
|
101
|
+
_listCards_decorators = [Remote('listCards')];
|
|
102
|
+
_dueCards_decorators = [Remote('dueCards')];
|
|
103
|
+
_writeCards_decorators = [Remote('writeCards')];
|
|
104
|
+
_editCard_decorators = [Remote('editCard')];
|
|
105
|
+
_undoCards_decorators = [Remote('undoCards')];
|
|
106
|
+
_reviewCard_decorators = [Remote('reviewCard')];
|
|
107
|
+
_listAssessments_decorators = [Remote('listAssessments')];
|
|
108
|
+
_getAssessment_decorators = [Remote('getAssessment')];
|
|
109
|
+
_putAttempt_decorators = [Remote('putAttempt')];
|
|
110
|
+
_listAttempts_decorators = [Remote('listAttempts')];
|
|
111
|
+
_boundTarget_decorators = [Remote('boundTarget')];
|
|
112
|
+
_bindTarget_decorators = [Remote('bindTarget')];
|
|
113
|
+
_listEvents_decorators = [Remote('listEvents')];
|
|
114
|
+
_recentChanges_decorators = [Remote('recentChanges')];
|
|
115
|
+
_createRetake_decorators = [Remote('createRetake')];
|
|
116
|
+
_recentRecords_decorators = [Remote('recentRecords')];
|
|
117
|
+
_latestActivity_decorators = [Remote('latestActivity')];
|
|
118
|
+
_stats_decorators = [Remote('stats')];
|
|
119
|
+
__esDecorate(this, null, _capabilities_decorators, { kind: "method", name: "capabilities", static: false, private: false, access: { has: obj => "capabilities" in obj, get: obj => obj.capabilities }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
120
|
+
__esDecorate(this, null, _listProjects_decorators, { kind: "method", name: "listProjects", static: false, private: false, access: { has: obj => "listProjects" in obj, get: obj => obj.listProjects }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
121
|
+
__esDecorate(this, null, _getProject_decorators, { kind: "method", name: "getProject", static: false, private: false, access: { has: obj => "getProject" in obj, get: obj => obj.getProject }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
122
|
+
__esDecorate(this, null, _createProject_decorators, { kind: "method", name: "createProject", static: false, private: false, access: { has: obj => "createProject" in obj, get: obj => obj.createProject }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
123
|
+
__esDecorate(this, null, _updateProject_decorators, { kind: "method", name: "updateProject", static: false, private: false, access: { has: obj => "updateProject" in obj, get: obj => obj.updateProject }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
124
|
+
__esDecorate(this, null, _deleteProject_decorators, { kind: "method", name: "deleteProject", static: false, private: false, access: { has: obj => "deleteProject" in obj, get: obj => obj.deleteProject }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
125
|
+
__esDecorate(this, null, _getResource_decorators, { kind: "method", name: "getResource", static: false, private: false, access: { has: obj => "getResource" in obj, get: obj => obj.getResource }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
126
|
+
__esDecorate(this, null, _listResources_decorators, { kind: "method", name: "listResources", static: false, private: false, access: { has: obj => "listResources" in obj, get: obj => obj.listResources }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
127
|
+
__esDecorate(this, null, _putResource_decorators, { kind: "method", name: "putResource", static: false, private: false, access: { has: obj => "putResource" in obj, get: obj => obj.putResource }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
128
|
+
__esDecorate(this, null, _setBookKind_decorators, { kind: "method", name: "setBookKind", static: false, private: false, access: { has: obj => "setBookKind" in obj, get: obj => obj.setBookKind }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
129
|
+
__esDecorate(this, null, _moveResource_decorators, { kind: "method", name: "moveResource", static: false, private: false, access: { has: obj => "moveResource" in obj, get: obj => obj.moveResource }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
130
|
+
__esDecorate(this, null, _removeResource_decorators, { kind: "method", name: "removeResource", static: false, private: false, access: { has: obj => "removeResource" in obj, get: obj => obj.removeResource }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
131
|
+
__esDecorate(this, null, _getRoadmap_decorators, { kind: "method", name: "getRoadmap", static: false, private: false, access: { has: obj => "getRoadmap" in obj, get: obj => obj.getRoadmap }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
132
|
+
__esDecorate(this, null, _adoptRoadmap_decorators, { kind: "method", name: "adoptRoadmap", static: false, private: false, access: { has: obj => "adoptRoadmap" in obj, get: obj => obj.adoptRoadmap }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
133
|
+
__esDecorate(this, null, _discardDraft_decorators, { kind: "method", name: "discardDraft", static: false, private: false, access: { has: obj => "discardDraft" in obj, get: obj => obj.discardDraft }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
134
|
+
__esDecorate(this, null, _markNodeRead_decorators, { kind: "method", name: "markNodeRead", static: false, private: false, access: { has: obj => "markNodeRead" in obj, get: obj => obj.markNodeRead }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
135
|
+
__esDecorate(this, null, _listPages_decorators, { kind: "method", name: "listPages", static: false, private: false, access: { has: obj => "listPages" in obj, get: obj => obj.listPages }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
136
|
+
__esDecorate(this, null, _readPagePhoto_decorators, { kind: "method", name: "readPagePhoto", static: false, private: false, access: { has: obj => "readPagePhoto" in obj, get: obj => obj.readPagePhoto }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
137
|
+
__esDecorate(this, null, _savePhoto_decorators, { kind: "method", name: "savePhoto", static: false, private: false, access: { has: obj => "savePhoto" in obj, get: obj => obj.savePhoto }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
138
|
+
__esDecorate(this, null, _recordPage_decorators, { kind: "method", name: "recordPage", static: false, private: false, access: { has: obj => "recordPage" in obj, get: obj => obj.recordPage }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
139
|
+
__esDecorate(this, null, _listCards_decorators, { kind: "method", name: "listCards", static: false, private: false, access: { has: obj => "listCards" in obj, get: obj => obj.listCards }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
140
|
+
__esDecorate(this, null, _dueCards_decorators, { kind: "method", name: "dueCards", static: false, private: false, access: { has: obj => "dueCards" in obj, get: obj => obj.dueCards }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
141
|
+
__esDecorate(this, null, _writeCards_decorators, { kind: "method", name: "writeCards", static: false, private: false, access: { has: obj => "writeCards" in obj, get: obj => obj.writeCards }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
142
|
+
__esDecorate(this, null, _editCard_decorators, { kind: "method", name: "editCard", static: false, private: false, access: { has: obj => "editCard" in obj, get: obj => obj.editCard }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
143
|
+
__esDecorate(this, null, _undoCards_decorators, { kind: "method", name: "undoCards", static: false, private: false, access: { has: obj => "undoCards" in obj, get: obj => obj.undoCards }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
144
|
+
__esDecorate(this, null, _reviewCard_decorators, { kind: "method", name: "reviewCard", static: false, private: false, access: { has: obj => "reviewCard" in obj, get: obj => obj.reviewCard }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
145
|
+
__esDecorate(this, null, _listAssessments_decorators, { kind: "method", name: "listAssessments", static: false, private: false, access: { has: obj => "listAssessments" in obj, get: obj => obj.listAssessments }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
146
|
+
__esDecorate(this, null, _getAssessment_decorators, { kind: "method", name: "getAssessment", static: false, private: false, access: { has: obj => "getAssessment" in obj, get: obj => obj.getAssessment }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
147
|
+
__esDecorate(this, null, _putAttempt_decorators, { kind: "method", name: "putAttempt", static: false, private: false, access: { has: obj => "putAttempt" in obj, get: obj => obj.putAttempt }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
148
|
+
__esDecorate(this, null, _listAttempts_decorators, { kind: "method", name: "listAttempts", static: false, private: false, access: { has: obj => "listAttempts" in obj, get: obj => obj.listAttempts }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
149
|
+
__esDecorate(this, null, _boundTarget_decorators, { kind: "method", name: "boundTarget", static: false, private: false, access: { has: obj => "boundTarget" in obj, get: obj => obj.boundTarget }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
150
|
+
__esDecorate(this, null, _bindTarget_decorators, { kind: "method", name: "bindTarget", static: false, private: false, access: { has: obj => "bindTarget" in obj, get: obj => obj.bindTarget }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
151
|
+
__esDecorate(this, null, _listEvents_decorators, { kind: "method", name: "listEvents", static: false, private: false, access: { has: obj => "listEvents" in obj, get: obj => obj.listEvents }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
152
|
+
__esDecorate(this, null, _recentChanges_decorators, { kind: "method", name: "recentChanges", static: false, private: false, access: { has: obj => "recentChanges" in obj, get: obj => obj.recentChanges }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
153
|
+
__esDecorate(this, null, _createRetake_decorators, { kind: "method", name: "createRetake", static: false, private: false, access: { has: obj => "createRetake" in obj, get: obj => obj.createRetake }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
154
|
+
__esDecorate(this, null, _recentRecords_decorators, { kind: "method", name: "recentRecords", static: false, private: false, access: { has: obj => "recentRecords" in obj, get: obj => obj.recentRecords }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
155
|
+
__esDecorate(this, null, _latestActivity_decorators, { kind: "method", name: "latestActivity", static: false, private: false, access: { has: obj => "latestActivity" in obj, get: obj => obj.latestActivity }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
156
|
+
__esDecorate(this, null, _stats_decorators, { kind: "method", name: "stats", static: false, private: false, access: { has: obj => "stats" in obj, get: obj => obj.stats }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
157
|
+
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
158
|
+
}
|
|
159
|
+
static inject = ['library'];
|
|
160
|
+
constructor(ctx, _config = {}) {
|
|
161
|
+
super(ctx, 'libraryRemote', { namespace: 'library' });
|
|
162
|
+
__runInitializers(this, _instanceExtraInitializers);
|
|
163
|
+
}
|
|
164
|
+
/** The service core this face delegates to. */
|
|
165
|
+
get core() {
|
|
166
|
+
return this.ctx.library;
|
|
167
|
+
}
|
|
168
|
+
/* -------------------------------------------------------- capabilities */
|
|
169
|
+
/** What this composition can do: storage and attachments, with the reason — the display contract. */
|
|
170
|
+
capabilities() {
|
|
171
|
+
return this.core.capabilities();
|
|
172
|
+
}
|
|
173
|
+
/* ------------------------------------------------------------ projects */
|
|
174
|
+
/** Every project with its shelf progress and card tallies. */
|
|
175
|
+
listProjects() {
|
|
176
|
+
return this.core.listProjects();
|
|
177
|
+
}
|
|
178
|
+
/** One project's summary plus its resources. */
|
|
179
|
+
getProject(request) {
|
|
180
|
+
return this.core.getProject(request);
|
|
181
|
+
}
|
|
182
|
+
/** Create a project. */
|
|
183
|
+
createProject(request) {
|
|
184
|
+
return this.core.createProject(request);
|
|
185
|
+
}
|
|
186
|
+
/** Change a project's look, goal or name. */
|
|
187
|
+
updateProject(request) {
|
|
188
|
+
return this.core.updateProject(request);
|
|
189
|
+
}
|
|
190
|
+
/** Delete a project and everything it holds. */
|
|
191
|
+
deleteProject(request) {
|
|
192
|
+
return this.core.deleteProject(request);
|
|
193
|
+
}
|
|
194
|
+
/* ------------------------------------------------------------ resources */
|
|
195
|
+
/** One shelf entry, whole. */
|
|
196
|
+
getResource(request) {
|
|
197
|
+
return this.core.getResource(request);
|
|
198
|
+
}
|
|
199
|
+
/** A project's shelf: textbooks in study order, then links oldest first. */
|
|
200
|
+
listResources(request) {
|
|
201
|
+
return this.core.listResources(request);
|
|
202
|
+
}
|
|
203
|
+
/** Put one entry on the shelf (a thin link from the sidebar's add form). */
|
|
204
|
+
putResource(request) {
|
|
205
|
+
return this.core.putResource(request);
|
|
206
|
+
}
|
|
207
|
+
/** Switch a textbook between 知识型 and 材料型. */
|
|
208
|
+
setBookKind(request) {
|
|
209
|
+
return this.core.setBookKind(request);
|
|
210
|
+
}
|
|
211
|
+
/** Move a textbook to another place in the study order. */
|
|
212
|
+
moveResource(request) {
|
|
213
|
+
return this.core.moveResource(request);
|
|
214
|
+
}
|
|
215
|
+
/** Remove a shelf entry (its cards stay, unhung). */
|
|
216
|
+
removeResource(request) {
|
|
217
|
+
return this.core.removeResource(request);
|
|
218
|
+
}
|
|
219
|
+
/* ------------------------------------------------------------- roadmap */
|
|
220
|
+
/** One textbook's adopted roadmap and its pending draft. */
|
|
221
|
+
getRoadmap(request) {
|
|
222
|
+
return this.core.getRoadmap(request);
|
|
223
|
+
}
|
|
224
|
+
/** The learner's 采用. */
|
|
225
|
+
adoptRoadmap(request) {
|
|
226
|
+
return this.core.adoptRoadmap(request);
|
|
227
|
+
}
|
|
228
|
+
/** Drop a draft. */
|
|
229
|
+
discardDraft(request) {
|
|
230
|
+
return this.core.discardDraft(request);
|
|
231
|
+
}
|
|
232
|
+
/** 「读完」 a read node. */
|
|
233
|
+
markNodeRead(request) {
|
|
234
|
+
return this.core.markNodeRead(request);
|
|
235
|
+
}
|
|
236
|
+
/* --------------------------------------------------------------- pages */
|
|
237
|
+
/** One resource's pages, optionally one node's. */
|
|
238
|
+
listPages(request) {
|
|
239
|
+
return this.core.listPages(request);
|
|
240
|
+
}
|
|
241
|
+
/** One page's photo, base64 — whitelisted to recorded pages. */
|
|
242
|
+
readPagePhoto(request) {
|
|
243
|
+
return this.core.readPagePhoto(request);
|
|
244
|
+
}
|
|
245
|
+
/** Save a browser-uploaded photo into the attachment store. */
|
|
246
|
+
savePhoto(request) {
|
|
247
|
+
return this.core.savePhoto(request);
|
|
248
|
+
}
|
|
249
|
+
/** Record a recognized page and card its marks. */
|
|
250
|
+
recordPage(request) {
|
|
251
|
+
return this.core.recordPage(request);
|
|
252
|
+
}
|
|
253
|
+
/* --------------------------------------------------------------- cards */
|
|
254
|
+
/** Cards, filtered and sorted. */
|
|
255
|
+
listCards(request) {
|
|
256
|
+
return this.core.listCards(request);
|
|
257
|
+
}
|
|
258
|
+
/** Due cards across projects (or one). */
|
|
259
|
+
dueCards(request) {
|
|
260
|
+
return this.core.dueCards(request);
|
|
261
|
+
}
|
|
262
|
+
/** Record cards by hand. */
|
|
263
|
+
writeCards(request) {
|
|
264
|
+
return this.core.writeCards(request);
|
|
265
|
+
}
|
|
266
|
+
/** Edit one card. */
|
|
267
|
+
editCard(request) {
|
|
268
|
+
return this.core.editCard(request);
|
|
269
|
+
}
|
|
270
|
+
/** The toast's 撤销. */
|
|
271
|
+
undoCards(request) {
|
|
272
|
+
return this.core.undoCards(request);
|
|
273
|
+
}
|
|
274
|
+
/** One flashcard review. */
|
|
275
|
+
reviewCard(request) {
|
|
276
|
+
return this.core.reviewCard(request);
|
|
277
|
+
}
|
|
278
|
+
/* ---------------------------------------------------------- assessments */
|
|
279
|
+
/** A project's assessments, optionally one resource's / node's / one type's. */
|
|
280
|
+
listAssessments(request) {
|
|
281
|
+
return this.core.listAssessments(request);
|
|
282
|
+
}
|
|
283
|
+
/** One assessment, whole. */
|
|
284
|
+
getAssessment(request) {
|
|
285
|
+
return this.core.getAssessment(request);
|
|
286
|
+
}
|
|
287
|
+
/** Grade a sitting answered in the sidebar (choice / fill judged in the page). */
|
|
288
|
+
putAttempt(request) {
|
|
289
|
+
return this.core.putAttempt(request);
|
|
290
|
+
}
|
|
291
|
+
/** A project's graded sittings, newest first; `nodeId` narrows to one station's history, `assessmentId` to one assessment's. */
|
|
292
|
+
listAttempts(request) {
|
|
293
|
+
return this.core.listAttempts(request);
|
|
294
|
+
}
|
|
295
|
+
/* ------------------------------------------------------------- bindings */
|
|
296
|
+
/** The calling session's binding, or null. */
|
|
297
|
+
async boundTarget(sessionId) {
|
|
298
|
+
return this.core.getBinding(String(sessionId)) ?? null;
|
|
299
|
+
}
|
|
300
|
+
/** Bind the calling session to a project / resource (null unbinds). */
|
|
301
|
+
bindTarget(sessionId, request) {
|
|
302
|
+
return this.core.setBinding(String(sessionId), request.binding);
|
|
303
|
+
}
|
|
304
|
+
/* --------------------------------------------------------------- events */
|
|
305
|
+
/** One project's audit trail, newest first. */
|
|
306
|
+
listEvents(request) {
|
|
307
|
+
return this.core.listEvents(request);
|
|
308
|
+
}
|
|
309
|
+
/** 「教练最近记下」 across projects. */
|
|
310
|
+
/** The newest knowledge-point state changes (今日 「最近的变化」). */
|
|
311
|
+
recentChanges(request) {
|
|
312
|
+
return this.core.recentChanges(request);
|
|
313
|
+
}
|
|
314
|
+
/** 订正: a retake paper over a station's open misses (all, or the keys named). */
|
|
315
|
+
createRetake(request) {
|
|
316
|
+
return this.core.createRetake(request);
|
|
317
|
+
}
|
|
318
|
+
recentRecords(request) {
|
|
319
|
+
return this.core.recentRecords(request);
|
|
320
|
+
}
|
|
321
|
+
/** The newest event's timestamp anywhere — the pane polls it to re-read (no push channel). */
|
|
322
|
+
latestActivity() {
|
|
323
|
+
return this.core.latestActivity();
|
|
324
|
+
}
|
|
325
|
+
/** The whole-library tally. */
|
|
326
|
+
stats() {
|
|
327
|
+
return this.core.stats();
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
})();
|
|
331
|
+
export { LibraryRemoteService };
|
|
332
|
+
export default LibraryRemoteService;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Assessments and attempts: quizzes (the two-axis checks), the assess cascade, acceptance sittings.
|
|
3
|
+
*
|
|
4
|
+
* One layer of the library service (see `service/core.ts` for the layering):
|
|
5
|
+
* the methods are the service's own, moved here verbatim by domain.
|
|
6
|
+
*
|
|
7
|
+
* @module @khorsheed/dsh-library/service/assess
|
|
8
|
+
*/
|
|
9
|
+
import { type LibraryAssessResult, type LibraryPointChange, type LibraryAssessment, type LibraryAttempt, type LibraryCard, type LibraryOutcome, type LibraryProject, type LibraryQuizFocus, type LibraryQuizQuestion, type LibraryPoint, type LibraryRoadmap, type LibraryTemplate, type LibraryVerdict } from '../types.ts';
|
|
10
|
+
import { type LibraryOpenMiss, type LibraryPointMastery, type LibraryStationMastery } from '../mastery.ts';
|
|
11
|
+
import { LibraryServicePages } from './pages.ts';
|
|
12
|
+
export declare class LibraryServiceAssess extends LibraryServicePages {
|
|
13
|
+
/** A project's assessments, optionally one resource's / node's / one type's. */
|
|
14
|
+
listAssessments(request: {
|
|
15
|
+
projectId: string;
|
|
16
|
+
resourceId?: string;
|
|
17
|
+
nodeId?: string;
|
|
18
|
+
type?: 'quiz' | 'practice';
|
|
19
|
+
}): Promise<{
|
|
20
|
+
assessments: LibraryAssessment[];
|
|
21
|
+
}>;
|
|
22
|
+
/** One assessment, whole. */
|
|
23
|
+
getAssessment(request: {
|
|
24
|
+
projectId: string;
|
|
25
|
+
assessmentId: string;
|
|
26
|
+
}): Promise<LibraryOutcome<{
|
|
27
|
+
assessment: LibraryAssessment;
|
|
28
|
+
}>>;
|
|
29
|
+
/**
|
|
30
|
+
* Store a quiz behind the two-axis checks. Target: a marked / asked / missed
|
|
31
|
+
* question names the live cards it probes. Evidence: a photo quote names a
|
|
32
|
+
* recorded page (a quote the page text lacks comes back as a warning); a web
|
|
33
|
+
* quote carries its url; whether domain knowledge may back a CONTENT question
|
|
34
|
+
* is judged on the gated node's covers (a material book, a thin link or a
|
|
35
|
+
* bare url among them demands a verbatim quote) — a resource-scoped quiz
|
|
36
|
+
* without a node keeps the resource-level rule, and a scopeless free quiz
|
|
37
|
+
* allows knowledge. A node-scoped quiz supersedes the station's live one.
|
|
38
|
+
*/
|
|
39
|
+
putQuiz(request: {
|
|
40
|
+
projectId: string;
|
|
41
|
+
quiz: {
|
|
42
|
+
scope: {
|
|
43
|
+
resourceId?: string;
|
|
44
|
+
nodeId?: string;
|
|
45
|
+
};
|
|
46
|
+
focus?: LibraryQuizFocus;
|
|
47
|
+
questions: readonly LibraryQuizQuestion[];
|
|
48
|
+
/** Append knowledge points to the gated station (a genuine gap in the split) — ids must be new; an existing id is referenced, never re-added. */
|
|
49
|
+
addPoints?: readonly LibraryPoint[];
|
|
50
|
+
};
|
|
51
|
+
}): Promise<LibraryOutcome<{
|
|
52
|
+
quiz: LibraryAssessment;
|
|
53
|
+
warnings: string[];
|
|
54
|
+
}>>;
|
|
55
|
+
/**
|
|
56
|
+
* Grade a sitting — the only cascading write. Two shapes, exactly one key:
|
|
57
|
+
* `assessmentId` (or the legacy alias `quizId`) judges a stored quiz;
|
|
58
|
+
* `nodeId` accepts an ACCEPTANCE station — resolved to the node's current
|
|
59
|
+
* practice assessment, each verdict's task naming one rubric line (its id
|
|
60
|
+
* L1…, or the line verbatim).
|
|
61
|
+
*
|
|
62
|
+
* Void verdicts count for nothing. Every probed card moves: a pass climbs a
|
|
63
|
+
* Leitner box and eases weakness by one; a fail resets to box 0 (due
|
|
64
|
+
* tomorrow) and adds weakness. A failed line with no card gets one
|
|
65
|
+
* (`missedCard`). The gated node's stats update (quiz nodes); at or above
|
|
66
|
+
* the pass ratio it completes and unlocks its dependents.
|
|
67
|
+
*/
|
|
68
|
+
putAttempt(request: {
|
|
69
|
+
projectId: string;
|
|
70
|
+
assessmentId?: string;
|
|
71
|
+
quizId?: string;
|
|
72
|
+
nodeId?: string;
|
|
73
|
+
/** The textbook whose path the acceptance station sits on (omitted: the textbook whose path holds the node). */
|
|
74
|
+
resourceId?: string;
|
|
75
|
+
verdicts: readonly LibraryVerdict[];
|
|
76
|
+
}): Promise<LibraryOutcome<LibraryAssessResult>>;
|
|
77
|
+
/** The quiz path of putAttempt: verdicts judged against a stored quiz's questions. */
|
|
78
|
+
protected putQuizAttempt(project: LibraryProject, assessmentId: string, verdicts: readonly LibraryVerdict[]): Promise<LibraryOutcome<LibraryAssessResult>>;
|
|
79
|
+
/**
|
|
80
|
+
* The practice path of putAttempt: acceptance of a hands-on station, judged
|
|
81
|
+
* against the node's current practice assessment (materialized at adoption).
|
|
82
|
+
* No probed cards — a failed acceptance line with a `missedCard` leaves (or
|
|
83
|
+
* re-weakens) a card; at the pass ratio the station completes.
|
|
84
|
+
*/
|
|
85
|
+
protected putPracticeAttempt(project: LibraryProject, nodeId: string, resourceId: string | undefined, verdicts: readonly LibraryVerdict[]): Promise<LibraryOutcome<LibraryAssessResult>>;
|
|
86
|
+
/** Every open miss across the project's adopted quiz stations, newest first. */
|
|
87
|
+
protected projectOpenMisses(projectId: string): LibraryOpenMiss[];
|
|
88
|
+
/** A station's mastery as the ledger stands (undefined off a station, or for a node no adopted path holds). */
|
|
89
|
+
protected stationMasteryOf(projectId: string, nodeId: string | undefined, resourceId?: string): LibraryStationMastery | undefined;
|
|
90
|
+
/**
|
|
91
|
+
* The points a write moved, read against `before`; each change is ledgered
|
|
92
|
+
* as a `point.changed` event (今日 「最近的变化」). Call inside the lock,
|
|
93
|
+
* after the write.
|
|
94
|
+
*/
|
|
95
|
+
protected pointChangesSince(projectId: string, nodeId: string | undefined, resourceId: string | undefined, before: LibraryStationMastery | undefined, at: string): LibraryPointChange[];
|
|
96
|
+
/**
|
|
97
|
+
* 订正: a retake paper re-asking a station's open misses (all, or the keys
|
|
98
|
+
* named — `${assessmentId}:${questionId}`). Its verdicts move the points,
|
|
99
|
+
* never the station's pass record. No coach needed: the questions exist.
|
|
100
|
+
*/
|
|
101
|
+
createRetake(request: {
|
|
102
|
+
projectId: string;
|
|
103
|
+
resourceId?: string;
|
|
104
|
+
nodeId?: string;
|
|
105
|
+
keys?: readonly string[];
|
|
106
|
+
}): Promise<LibraryOutcome<{
|
|
107
|
+
assessment: LibraryAssessment;
|
|
108
|
+
}>>;
|
|
109
|
+
/**
|
|
110
|
+
* A coach note on a knowledge point: the learner stuck on it here. The
|
|
111
|
+
* point turns weak until a newer probe passes (subject projects — a weak
|
|
112
|
+
* point lands on its point, not on a card).
|
|
113
|
+
*/
|
|
114
|
+
notePoint(request: {
|
|
115
|
+
projectId: string;
|
|
116
|
+
resourceId?: string;
|
|
117
|
+
nodeId: string;
|
|
118
|
+
pointId: string;
|
|
119
|
+
text: string;
|
|
120
|
+
term?: string;
|
|
121
|
+
session?: string;
|
|
122
|
+
}): Promise<LibraryOutcome<{
|
|
123
|
+
point: LibraryPointMastery;
|
|
124
|
+
changes: LibraryPointChange[];
|
|
125
|
+
}>>;
|
|
126
|
+
/** The roadmap holding one node: the hinted textbook's first, then every adopted path of the project. */
|
|
127
|
+
protected findNodeRoadmap(projectId: string, nodeId: string, resourceId?: string): LibraryRoadmap | undefined;
|
|
128
|
+
/** The card a missed, card-less question leaves behind. */
|
|
129
|
+
protected missedCardFor(question: LibraryQuizQuestion, verdict: LibraryVerdict, quiz: LibraryAssessment, resourceId: string | undefined, template: LibraryTemplate, at: string): LibraryCard;
|
|
130
|
+
/**
|
|
131
|
+
* A project's graded sittings, newest first. `nodeId` narrows to one node's
|
|
132
|
+
* history: sittings keyed to an assessment scoped on it, plus legacy v4
|
|
133
|
+
* acceptance sittings that named the node directly. `assessmentId` narrows
|
|
134
|
+
* to one assessment's sittings.
|
|
135
|
+
*/
|
|
136
|
+
listAttempts(request: {
|
|
137
|
+
projectId: string;
|
|
138
|
+
nodeId?: string;
|
|
139
|
+
assessmentId?: string;
|
|
140
|
+
}): Promise<{
|
|
141
|
+
attempts: LibraryAttempt[];
|
|
142
|
+
}>;
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=assess.d.ts.map
|