@khorsheed/dsh-library 0.0.0-stage → 0.1.1
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 +19 -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 +66334 -0
- package/lib/index.js +3318 -0
- package/lib/profiles-CFrPQdfO.js +1692 -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 +129 -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 +167 -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 +231 -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/reveal.d.ts +21 -0
- package/lib/types/client/reveal.js +31 -0
- package/lib/types/client/store.d.ts +111 -0
- package/lib/types/client/store.js +48 -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,3811 @@
|
|
|
1
|
+
/* Generated by @deepseek-ai/dsh-typert-generator from FaceModel — do not edit. */
|
|
2
|
+
import { z } from 'zod'
|
|
3
|
+
|
|
4
|
+
import { createTypertRemoteInfo } from '@deepseek-ai/dsh-typert-protocol/remote-info'
|
|
5
|
+
|
|
6
|
+
let _khorsheed_dsh_library_library_adoptRoadmap_parameter_0$schema$value
|
|
7
|
+
const _khorsheed_dsh_library_library_adoptRoadmap_parameter_0$schema = () => (_khorsheed_dsh_library_library_adoptRoadmap_parameter_0$schema$value ??= z.object({
|
|
8
|
+
'projectId': z.string(),
|
|
9
|
+
'resourceId': z.string(),
|
|
10
|
+
}))
|
|
11
|
+
let _khorsheed_dsh_library_library_adoptRoadmap_result$schema$value
|
|
12
|
+
const _khorsheed_dsh_library_library_adoptRoadmap_result$schema = () => (_khorsheed_dsh_library_library_adoptRoadmap_result$schema$value ??= z.union([z.object({
|
|
13
|
+
'ok': z.literal(false).readonly(),
|
|
14
|
+
'error': z.union([z.literal("not-found"), z.literal("exists"), z.literal("io"), z.literal("unavailable"), z.literal("unbound"), z.literal("invalid"), z.literal("corrupt"), z.literal("storage-unavailable"), z.literal("evidence-gate"), z.literal("state-machine"), z.literal("ref-incomplete")]).readonly(),
|
|
15
|
+
'message': z.string().readonly().describe('The human/model-readable reason, written to teach the correct call.'),
|
|
16
|
+
}), z.object({
|
|
17
|
+
'ok': z.literal(true).readonly(),
|
|
18
|
+
'roadmap': z.object({
|
|
19
|
+
'primaryResourceId': z.string().readonly().optional().describe('The textbook whose path this is. Always present on anything written since the book-paths cut; a legacy project-level path (absent) is never read back.'),
|
|
20
|
+
'status': z.union([z.literal("draft"), z.literal("adopted")]).readonly(),
|
|
21
|
+
'nodes': z.array(z.object({
|
|
22
|
+
'id': z.string().readonly(),
|
|
23
|
+
'title': z.string().readonly(),
|
|
24
|
+
'goals': z.array(z.string()).readonly().describe('What the learner should be able to do after this node.'),
|
|
25
|
+
'dependsOn': z.array(z.string()).readonly().describe('Node ids that must be `done` before this one may leave `locked`.'),
|
|
26
|
+
'covers': z.array(z.object({
|
|
27
|
+
'ref': z.string().readonly(),
|
|
28
|
+
'locator': z.string().readonly().optional().describe('The contents rows drawn on ("1-5,7") — thick resources only.'),
|
|
29
|
+
'title': z.string().readonly().optional().describe('A url cover\'s display title.'),
|
|
30
|
+
'by': z.union([z.literal("web"), z.literal("model"), z.literal("user")]).readonly().optional().describe('web: fetched and checked; model: from the coach\'s memory, unverified; user: the learner gave it.'),
|
|
31
|
+
'verifiedAt': z.string().readonly().optional(),
|
|
32
|
+
})).readonly().describe('What the station draws on — at least one cover.'),
|
|
33
|
+
'state': z.union([z.literal("current"), z.literal("done"), z.literal("locked")]).readonly(),
|
|
34
|
+
'gate': z.union([z.literal("read"), z.literal("quiz"), z.literal("acceptance")]).readonly().describe('How the node completes: quiz | acceptance | read.'),
|
|
35
|
+
'quizStats': z.object({
|
|
36
|
+
'attempts': z.number().readonly(),
|
|
37
|
+
'lastRatio': z.number().readonly().optional(),
|
|
38
|
+
'bestRatio': z.number().readonly().optional(),
|
|
39
|
+
}).readonly().optional().describe('Quiz-gated nodes only — a read / acceptance node never carries one.'),
|
|
40
|
+
'points': z.array(z.object({
|
|
41
|
+
'id': z.string().readonly().describe('Stable slug (letters, digits, . _ -) — the mastery key.'),
|
|
42
|
+
'title': z.string().readonly().describe('The point as the learner reads it (「极限的定义」).'),
|
|
43
|
+
'notes': z.array(z.object({
|
|
44
|
+
'text': z.string().readonly(),
|
|
45
|
+
'term': z.string().readonly().optional().describe('The short name of the confusion, when the coach gave one (「反函数 vs 倒数」).'),
|
|
46
|
+
'at': z.string().readonly(),
|
|
47
|
+
'session': z.string().readonly().optional().describe('The session it came from.'),
|
|
48
|
+
})).readonly().optional().describe('What the coach noticed the learner stuck on here (a subject project\'s weak point lands on its point, not on a card).'),
|
|
49
|
+
})).readonly().optional().describe('Quiz-gated nodes only: the station\'s knowledge points (3-6), drafted with the roadmap and reviewed at adoption. Quiz questions reference them by id.'),
|
|
50
|
+
'acceptance': z.array(z.union([z.string(), z.object({
|
|
51
|
+
'line': z.string().readonly(),
|
|
52
|
+
'ref': z.string().readonly().optional(),
|
|
53
|
+
})])).readonly().optional().describe('Acceptance nodes only: the rubric lines as authored (the draft\'s and the display\'s source of truth; adoption materializes them into the node\'s practice assessment).'),
|
|
54
|
+
'notes': z.object({
|
|
55
|
+
'text': z.string().readonly().describe('Markdown body.'),
|
|
56
|
+
'updatedAt': z.string().readonly(),
|
|
57
|
+
'revisions': z.number().readonly().describe('1-based — the Nth version (「第 N 次更新」).'),
|
|
58
|
+
}).readonly().optional().describe('The station\'s 讲义, once the coach has taught it.'),
|
|
59
|
+
})).readonly(),
|
|
60
|
+
'passRatio': z.number().readonly().optional().describe('The pass threshold (default {@link DEFAULT_PASS_RATIO}).'),
|
|
61
|
+
'note': z.string().readonly().optional().describe('The coach\'s one-line pacing note on the draft card (「每周 3 章,约 4 周」).'),
|
|
62
|
+
'generatedAt': z.string().readonly(),
|
|
63
|
+
'adoptedAt': z.string().readonly().optional(),
|
|
64
|
+
}),
|
|
65
|
+
})]))
|
|
66
|
+
let _khorsheed_dsh_library_library_bindTarget_parameter_0$schema$value
|
|
67
|
+
const _khorsheed_dsh_library_library_bindTarget_parameter_0$schema = () => (_khorsheed_dsh_library_library_bindTarget_parameter_0$schema$value ??= z.string())
|
|
68
|
+
let _khorsheed_dsh_library_library_bindTarget_parameter_1$schema$value
|
|
69
|
+
const _khorsheed_dsh_library_library_bindTarget_parameter_1$schema = () => (_khorsheed_dsh_library_library_bindTarget_parameter_1$schema$value ??= z.object({
|
|
70
|
+
'binding': z.union([z.literal(null), z.object({
|
|
71
|
+
'projectId': z.string().readonly(),
|
|
72
|
+
'resourceId': z.string().readonly().optional(),
|
|
73
|
+
'previousProjectId': z.string().readonly().optional().describe('The project this session was bound to before a switch — what was said there is not this project\'s material.'),
|
|
74
|
+
})]),
|
|
75
|
+
}))
|
|
76
|
+
let _khorsheed_dsh_library_library_bindTarget_result$schema$value
|
|
77
|
+
const _khorsheed_dsh_library_library_bindTarget_result$schema = () => (_khorsheed_dsh_library_library_bindTarget_result$schema$value ??= z.union([z.object({
|
|
78
|
+
'ok': z.literal(false).readonly(),
|
|
79
|
+
'error': z.union([z.literal("not-found"), z.literal("exists"), z.literal("io"), z.literal("unavailable"), z.literal("unbound"), z.literal("invalid"), z.literal("corrupt"), z.literal("storage-unavailable"), z.literal("evidence-gate"), z.literal("state-machine"), z.literal("ref-incomplete")]).readonly(),
|
|
80
|
+
'message': z.string().readonly().describe('The human/model-readable reason, written to teach the correct call.'),
|
|
81
|
+
}), z.object({
|
|
82
|
+
'ok': z.literal(true).readonly(),
|
|
83
|
+
'binding': z.union([z.literal(null), z.object({
|
|
84
|
+
'projectId': z.string().readonly(),
|
|
85
|
+
'resourceId': z.string().readonly().optional(),
|
|
86
|
+
'previousProjectId': z.string().readonly().optional().describe('The project this session was bound to before a switch — what was said there is not this project\'s material.'),
|
|
87
|
+
})]),
|
|
88
|
+
})]))
|
|
89
|
+
let _khorsheed_dsh_library_library_boundTarget_parameter_0$schema$value
|
|
90
|
+
const _khorsheed_dsh_library_library_boundTarget_parameter_0$schema = () => (_khorsheed_dsh_library_library_boundTarget_parameter_0$schema$value ??= z.string())
|
|
91
|
+
let _khorsheed_dsh_library_library_boundTarget_result$schema$value
|
|
92
|
+
const _khorsheed_dsh_library_library_boundTarget_result$schema = () => (_khorsheed_dsh_library_library_boundTarget_result$schema$value ??= z.union([z.literal(null), z.object({
|
|
93
|
+
'projectId': z.string().readonly(),
|
|
94
|
+
'resourceId': z.string().readonly().optional(),
|
|
95
|
+
'previousProjectId': z.string().readonly().optional().describe('The project this session was bound to before a switch — what was said there is not this project\'s material.'),
|
|
96
|
+
})]))
|
|
97
|
+
let _khorsheed_dsh_library_library_capabilities_result$schema$value
|
|
98
|
+
const _khorsheed_dsh_library_library_capabilities_result$schema = () => (_khorsheed_dsh_library_library_capabilities_result$schema$value ??= z.object({
|
|
99
|
+
'protocolVersion': z.literal(1).readonly(),
|
|
100
|
+
'hasStorage': z.boolean().readonly().describe('Whether the state root accepts writes; when false every write refuses `storage-unavailable`.'),
|
|
101
|
+
'storageUnavailableReason': z.string().readonly().optional().describe('Why persistence is unavailable, when it is (the store\'s probe message).'),
|
|
102
|
+
'hasAttachments': z.boolean().readonly().describe('Whether an attachment store is mounted on the Context; when false the image routes refuse `unavailable`.'),
|
|
103
|
+
}))
|
|
104
|
+
let _khorsheed_dsh_library_library_createProject_parameter_0$schema$value
|
|
105
|
+
const _khorsheed_dsh_library_library_createProject_parameter_0$schema = () => (_khorsheed_dsh_library_library_createProject_parameter_0$schema$value ??= z.object({
|
|
106
|
+
'name': z.string(),
|
|
107
|
+
'template': z.union([z.literal("language"), z.literal("subject"), z.literal("custom")]).optional(),
|
|
108
|
+
'templateNote': z.string().optional(),
|
|
109
|
+
'goal': z.string().optional(),
|
|
110
|
+
'color': z.union([z.literal("ember"), z.literal("amber"), z.literal("moss"), z.literal("teal"), z.literal("sky"), z.literal("indigo"), z.literal("plum"), z.literal("rose")]).optional(),
|
|
111
|
+
'icon': z.union([z.literal("code"), z.literal("book"), z.literal("globe"), z.literal("brain"), z.literal("flask"), z.literal("atom"), z.literal("leaf"), z.literal("pen"), z.literal("music"), z.literal("scale"), z.literal("chart"), z.literal("compass")]).optional(),
|
|
112
|
+
}))
|
|
113
|
+
let _khorsheed_dsh_library_library_createProject_result$schema$value
|
|
114
|
+
const _khorsheed_dsh_library_library_createProject_result$schema = () => (_khorsheed_dsh_library_library_createProject_result$schema$value ??= z.union([z.object({
|
|
115
|
+
'ok': z.literal(false).readonly(),
|
|
116
|
+
'error': z.union([z.literal("not-found"), z.literal("exists"), z.literal("io"), z.literal("unavailable"), z.literal("unbound"), z.literal("invalid"), z.literal("corrupt"), z.literal("storage-unavailable"), z.literal("evidence-gate"), z.literal("state-machine"), z.literal("ref-incomplete")]).readonly(),
|
|
117
|
+
'message': z.string().readonly().describe('The human/model-readable reason, written to teach the correct call.'),
|
|
118
|
+
}), z.object({
|
|
119
|
+
'ok': z.literal(true).readonly(),
|
|
120
|
+
'project': z.object({
|
|
121
|
+
'id': z.string().readonly(),
|
|
122
|
+
'name': z.string().readonly(),
|
|
123
|
+
'template': z.union([z.literal("language"), z.literal("subject"), z.literal("custom")]).readonly(),
|
|
124
|
+
'color': z.union([z.literal("ember"), z.literal("amber"), z.literal("moss"), z.literal("teal"), z.literal("sky"), z.literal("indigo"), z.literal("plum"), z.literal("rose")]).readonly().optional(),
|
|
125
|
+
'icon': z.union([z.literal("code"), z.literal("book"), z.literal("globe"), z.literal("brain"), z.literal("flask"), z.literal("atom"), z.literal("leaf"), z.literal("pen"), z.literal("music"), z.literal("scale"), z.literal("chart"), z.literal("compass")]).readonly().optional(),
|
|
126
|
+
'templateNote': z.string().readonly().optional().describe('The learner\'s own words for a custom template.'),
|
|
127
|
+
'goal': z.string().readonly().optional().describe('The learner\'s goal (「学术类 7 分,12 月 14 日」).'),
|
|
128
|
+
'createdAt': z.string().readonly(),
|
|
129
|
+
}),
|
|
130
|
+
})]))
|
|
131
|
+
let _khorsheed_dsh_library_library_createRetake_parameter_0$schema$value
|
|
132
|
+
const _khorsheed_dsh_library_library_createRetake_parameter_0$schema = () => (_khorsheed_dsh_library_library_createRetake_parameter_0$schema$value ??= z.object({
|
|
133
|
+
'projectId': z.string(),
|
|
134
|
+
'resourceId': z.string().optional(),
|
|
135
|
+
'nodeId': z.string().optional(),
|
|
136
|
+
'keys': z.array(z.string()).optional(),
|
|
137
|
+
}))
|
|
138
|
+
let _khorsheed_dsh_library_library_createRetake_result$schema$value
|
|
139
|
+
const _khorsheed_dsh_library_library_createRetake_result$schema = () => (_khorsheed_dsh_library_library_createRetake_result$schema$value ??= z.union([z.object({
|
|
140
|
+
'ok': z.literal(false).readonly(),
|
|
141
|
+
'error': z.union([z.literal("not-found"), z.literal("exists"), z.literal("io"), z.literal("unavailable"), z.literal("unbound"), z.literal("invalid"), z.literal("corrupt"), z.literal("storage-unavailable"), z.literal("evidence-gate"), z.literal("state-machine"), z.literal("ref-incomplete")]).readonly(),
|
|
142
|
+
'message': z.string().readonly().describe('The human/model-readable reason, written to teach the correct call.'),
|
|
143
|
+
}), z.object({
|
|
144
|
+
'ok': z.literal(true).readonly(),
|
|
145
|
+
'assessment': z.object({
|
|
146
|
+
'id': z.string().readonly(),
|
|
147
|
+
'type': z.union([z.literal("quiz"), z.literal("practice"), z.literal("retake")]).readonly().describe('quiz: a paper; practice: an acceptance rubric; retake: a station\'s open misses, re-asked (never counts toward passing).'),
|
|
148
|
+
'scope': z.object({
|
|
149
|
+
'nodeId': z.string().readonly().optional().describe('The roadmap node this assessment gates, when it is a node assessment.'),
|
|
150
|
+
'resourceId': z.string().readonly().optional().describe('The resource whose content is quizzed; absent + nodeId present = a project-path station, both absent = free practice.'),
|
|
151
|
+
}).readonly(),
|
|
152
|
+
'focus': z.union([z.literal("mixed"), z.literal("book"), z.literal("mine")]).readonly().optional().describe('quiz: the learner\'s chosen source (absent on assessments stored before the choice existed = mixed).'),
|
|
153
|
+
'questions': z.array(z.object({
|
|
154
|
+
'id': z.string().readonly(),
|
|
155
|
+
'kind': z.union([z.literal("choice"), z.literal("fill"), z.literal("free")]).readonly().describe('`choice` carries options; `fill` / `free` are open answers.'),
|
|
156
|
+
'prompt': z.string().readonly(),
|
|
157
|
+
'options': z.array(z.string()).readonly().optional(),
|
|
158
|
+
'answer': z.string().readonly(),
|
|
159
|
+
'explanation': z.string().readonly().optional().describe('Why the answer is right — shown after answering.'),
|
|
160
|
+
'point': z.string().readonly().optional().describe('The gated station\'s point this question probes (a point id) — required once the station carries points; mastery aggregates by it.'),
|
|
161
|
+
'origin': z.object({
|
|
162
|
+
'assessmentId': z.string().readonly(),
|
|
163
|
+
'questionId': z.string().readonly(),
|
|
164
|
+
}).readonly().optional().describe('retake papers: the question this one re-asks.'),
|
|
165
|
+
'target': z.object({
|
|
166
|
+
'kind': z.union([z.literal("marked"), z.literal("asked"), z.literal("missed"), z.literal("topic")]).readonly(),
|
|
167
|
+
'cardIds': z.array(z.string()).readonly().optional().describe('The cards it probes (required for marked / asked / missed).'),
|
|
168
|
+
}).readonly(),
|
|
169
|
+
'evidence': z.object({
|
|
170
|
+
'kind': z.union([z.literal("web"), z.literal("photo"), z.literal("knowledge")]).readonly(),
|
|
171
|
+
'pageId': z.string().readonly().optional().describe('photo: the page whose text holds the quote.'),
|
|
172
|
+
'url': z.string().readonly().optional().describe('web: where the quote is from.'),
|
|
173
|
+
'quote': z.string().readonly().optional().describe('photo / web: the passage, verbatim.'),
|
|
174
|
+
}).readonly(),
|
|
175
|
+
})).readonly().optional().describe('quiz: the questions.'),
|
|
176
|
+
'rubric': z.array(z.object({
|
|
177
|
+
'id': z.string().readonly().describe('Stable id: L + 1-based position — verdicts name it, so a replan rewording the line never orphans history.'),
|
|
178
|
+
'line': z.string().readonly(),
|
|
179
|
+
'ref': z.string().readonly().optional().describe('The assessment that machine-checks this line.'),
|
|
180
|
+
})).readonly().optional().describe('practice: the materialized rubric (stable line ids).'),
|
|
181
|
+
'supersededBy': z.string().readonly().optional().describe('The assessment that replaced this one (a station\'s newer paper).'),
|
|
182
|
+
'createdAt': z.string().readonly(),
|
|
183
|
+
}),
|
|
184
|
+
})]))
|
|
185
|
+
let _khorsheed_dsh_library_library_deleteProject_parameter_0$schema$value
|
|
186
|
+
const _khorsheed_dsh_library_library_deleteProject_parameter_0$schema = () => (_khorsheed_dsh_library_library_deleteProject_parameter_0$schema$value ??= z.object({
|
|
187
|
+
'id': z.string(),
|
|
188
|
+
}))
|
|
189
|
+
let _khorsheed_dsh_library_library_deleteProject_result$schema$value
|
|
190
|
+
const _khorsheed_dsh_library_library_deleteProject_result$schema = () => (_khorsheed_dsh_library_library_deleteProject_result$schema$value ??= z.union([z.object({
|
|
191
|
+
'ok': z.literal(false).readonly(),
|
|
192
|
+
'error': z.union([z.literal("not-found"), z.literal("exists"), z.literal("io"), z.literal("unavailable"), z.literal("unbound"), z.literal("invalid"), z.literal("corrupt"), z.literal("storage-unavailable"), z.literal("evidence-gate"), z.literal("state-machine"), z.literal("ref-incomplete")]).readonly(),
|
|
193
|
+
'message': z.string().readonly().describe('The human/model-readable reason, written to teach the correct call.'),
|
|
194
|
+
}), z.object({
|
|
195
|
+
'ok': z.literal(true).readonly(),
|
|
196
|
+
'id': z.string(),
|
|
197
|
+
})]))
|
|
198
|
+
let _khorsheed_dsh_library_library_discardDraft_parameter_0$schema$value
|
|
199
|
+
const _khorsheed_dsh_library_library_discardDraft_parameter_0$schema = () => (_khorsheed_dsh_library_library_discardDraft_parameter_0$schema$value ??= z.object({
|
|
200
|
+
'projectId': z.string(),
|
|
201
|
+
'resourceId': z.string(),
|
|
202
|
+
}))
|
|
203
|
+
let _khorsheed_dsh_library_library_discardDraft_result$schema$value
|
|
204
|
+
const _khorsheed_dsh_library_library_discardDraft_result$schema = () => (_khorsheed_dsh_library_library_discardDraft_result$schema$value ??= z.union([z.object({
|
|
205
|
+
'ok': z.literal(false).readonly(),
|
|
206
|
+
'error': z.union([z.literal("not-found"), z.literal("exists"), z.literal("io"), z.literal("unavailable"), z.literal("unbound"), z.literal("invalid"), z.literal("corrupt"), z.literal("storage-unavailable"), z.literal("evidence-gate"), z.literal("state-machine"), z.literal("ref-incomplete")]).readonly(),
|
|
207
|
+
'message': z.string().readonly().describe('The human/model-readable reason, written to teach the correct call.'),
|
|
208
|
+
}), z.object({
|
|
209
|
+
'ok': z.literal(true).readonly(),
|
|
210
|
+
'resourceId': z.string(),
|
|
211
|
+
})]))
|
|
212
|
+
let _khorsheed_dsh_library_library_dueCards_parameter_0$schema$value
|
|
213
|
+
const _khorsheed_dsh_library_library_dueCards_parameter_0$schema = () => (_khorsheed_dsh_library_library_dueCards_parameter_0$schema$value ??= z.object({
|
|
214
|
+
'projectId': z.string().optional(),
|
|
215
|
+
'limit': z.number().optional(),
|
|
216
|
+
}))
|
|
217
|
+
let _khorsheed_dsh_library_library_dueCards_result$schema$value
|
|
218
|
+
const _khorsheed_dsh_library_library_dueCards_result$schema = () => (_khorsheed_dsh_library_library_dueCards_result$schema$value ??= z.object({
|
|
219
|
+
'cards': z.array(z.object({
|
|
220
|
+
'id': z.string().readonly(),
|
|
221
|
+
'kind': z.union([z.literal("word"), z.literal("concept")]).readonly(),
|
|
222
|
+
'term': z.string().readonly(),
|
|
223
|
+
'aliases': z.array(z.string()).readonly().describe('Other spellings / names the same card answers to (instalments, 不应期).'),
|
|
224
|
+
'gloss': z.string().readonly().describe('The meaning: the in-context sense for a word, a one-line explanation for a concept.'),
|
|
225
|
+
'userGloss': z.string().readonly().optional().describe('The learner\'s own handwritten gloss, kept apart from the model\'s.'),
|
|
226
|
+
'contexts': z.array(z.object({
|
|
227
|
+
'sentence': z.string().readonly(),
|
|
228
|
+
'resourceId': z.string().readonly().optional(),
|
|
229
|
+
'pageId': z.string().readonly().optional(),
|
|
230
|
+
'nodeId': z.string().readonly().optional(),
|
|
231
|
+
})).readonly(),
|
|
232
|
+
'resourceId': z.string().readonly().optional().describe('Hung on a resource when it came from one; absent = project-level (「不挂书」).'),
|
|
233
|
+
'sources': z.array(z.object({
|
|
234
|
+
'type': z.union([z.literal("manual"), z.literal("photo"), z.literal("quiz"), z.literal("chat")]).readonly(),
|
|
235
|
+
'ref': z.string().readonly().optional().describe('photo: the page id; quiz: the assessment id; chat: the session id when known.'),
|
|
236
|
+
'note': z.string().readonly().optional().describe('What happened, in a few words (「说老是记混」「T/F/NG 第 9 题」).'),
|
|
237
|
+
'weakened': z.boolean().readonly().optional().describe('This source raised the weakness by one (an undo lowers it back).'),
|
|
238
|
+
'at': z.string().readonly(),
|
|
239
|
+
})).readonly(),
|
|
240
|
+
'weakness': z.number().readonly().describe('0–3: how often the learner got stuck here (asked again, answered wrong).'),
|
|
241
|
+
'mastery': z.object({
|
|
242
|
+
'box': z.number().readonly(),
|
|
243
|
+
'dueAt': z.string().readonly(),
|
|
244
|
+
'streak': z.number().readonly(),
|
|
245
|
+
}).readonly(),
|
|
246
|
+
'status': z.union([z.literal("active"), z.literal("deleted"), z.literal("mastered")]).readonly(),
|
|
247
|
+
'createdAt': z.string().readonly(),
|
|
248
|
+
'updatedAt': z.string().readonly(),
|
|
249
|
+
'projectId': z.string(),
|
|
250
|
+
})),
|
|
251
|
+
}))
|
|
252
|
+
let _khorsheed_dsh_library_library_editCard_parameter_0$schema$value
|
|
253
|
+
const _khorsheed_dsh_library_library_editCard_parameter_0$schema = () => (_khorsheed_dsh_library_library_editCard_parameter_0$schema$value ??= z.object({
|
|
254
|
+
'projectId': z.string(),
|
|
255
|
+
'cardId': z.string(),
|
|
256
|
+
'patch': z.object({
|
|
257
|
+
'term': z.string().optional(),
|
|
258
|
+
'gloss': z.string().optional(),
|
|
259
|
+
'userGloss': z.string().optional(),
|
|
260
|
+
'aliases': z.array(z.string()).optional(),
|
|
261
|
+
'status': z.union([z.literal("active"), z.literal("deleted"), z.literal("mastered")]).optional(),
|
|
262
|
+
'resourceId': z.union([z.literal(null), z.string()]).optional(),
|
|
263
|
+
}),
|
|
264
|
+
}))
|
|
265
|
+
let _khorsheed_dsh_library_library_editCard_result$schema$value
|
|
266
|
+
const _khorsheed_dsh_library_library_editCard_result$schema = () => (_khorsheed_dsh_library_library_editCard_result$schema$value ??= z.union([z.object({
|
|
267
|
+
'ok': z.literal(false).readonly(),
|
|
268
|
+
'error': z.union([z.literal("not-found"), z.literal("exists"), z.literal("io"), z.literal("unavailable"), z.literal("unbound"), z.literal("invalid"), z.literal("corrupt"), z.literal("storage-unavailable"), z.literal("evidence-gate"), z.literal("state-machine"), z.literal("ref-incomplete")]).readonly(),
|
|
269
|
+
'message': z.string().readonly().describe('The human/model-readable reason, written to teach the correct call.'),
|
|
270
|
+
}), z.object({
|
|
271
|
+
'ok': z.literal(true).readonly(),
|
|
272
|
+
'card': z.object({
|
|
273
|
+
'id': z.string().readonly(),
|
|
274
|
+
'kind': z.union([z.literal("word"), z.literal("concept")]).readonly(),
|
|
275
|
+
'term': z.string().readonly(),
|
|
276
|
+
'aliases': z.array(z.string()).readonly().describe('Other spellings / names the same card answers to (instalments, 不应期).'),
|
|
277
|
+
'gloss': z.string().readonly().describe('The meaning: the in-context sense for a word, a one-line explanation for a concept.'),
|
|
278
|
+
'userGloss': z.string().readonly().optional().describe('The learner\'s own handwritten gloss, kept apart from the model\'s.'),
|
|
279
|
+
'contexts': z.array(z.object({
|
|
280
|
+
'sentence': z.string().readonly(),
|
|
281
|
+
'resourceId': z.string().readonly().optional(),
|
|
282
|
+
'pageId': z.string().readonly().optional(),
|
|
283
|
+
'nodeId': z.string().readonly().optional(),
|
|
284
|
+
})).readonly(),
|
|
285
|
+
'resourceId': z.string().readonly().optional().describe('Hung on a resource when it came from one; absent = project-level (「不挂书」).'),
|
|
286
|
+
'sources': z.array(z.object({
|
|
287
|
+
'type': z.union([z.literal("manual"), z.literal("photo"), z.literal("quiz"), z.literal("chat")]).readonly(),
|
|
288
|
+
'ref': z.string().readonly().optional().describe('photo: the page id; quiz: the assessment id; chat: the session id when known.'),
|
|
289
|
+
'note': z.string().readonly().optional().describe('What happened, in a few words (「说老是记混」「T/F/NG 第 9 题」).'),
|
|
290
|
+
'weakened': z.boolean().readonly().optional().describe('This source raised the weakness by one (an undo lowers it back).'),
|
|
291
|
+
'at': z.string().readonly(),
|
|
292
|
+
})).readonly(),
|
|
293
|
+
'weakness': z.number().readonly().describe('0–3: how often the learner got stuck here (asked again, answered wrong).'),
|
|
294
|
+
'mastery': z.object({
|
|
295
|
+
'box': z.number().readonly(),
|
|
296
|
+
'dueAt': z.string().readonly(),
|
|
297
|
+
'streak': z.number().readonly(),
|
|
298
|
+
}).readonly(),
|
|
299
|
+
'status': z.union([z.literal("active"), z.literal("deleted"), z.literal("mastered")]).readonly(),
|
|
300
|
+
'createdAt': z.string().readonly(),
|
|
301
|
+
'updatedAt': z.string().readonly(),
|
|
302
|
+
}),
|
|
303
|
+
})]))
|
|
304
|
+
let _khorsheed_dsh_library_library_getAssessment_parameter_0$schema$value
|
|
305
|
+
const _khorsheed_dsh_library_library_getAssessment_parameter_0$schema = () => (_khorsheed_dsh_library_library_getAssessment_parameter_0$schema$value ??= z.object({
|
|
306
|
+
'projectId': z.string(),
|
|
307
|
+
'assessmentId': z.string(),
|
|
308
|
+
}))
|
|
309
|
+
let _khorsheed_dsh_library_library_getAssessment_result$schema$value
|
|
310
|
+
const _khorsheed_dsh_library_library_getAssessment_result$schema = () => (_khorsheed_dsh_library_library_getAssessment_result$schema$value ??= z.union([z.object({
|
|
311
|
+
'ok': z.literal(false).readonly(),
|
|
312
|
+
'error': z.union([z.literal("not-found"), z.literal("exists"), z.literal("io"), z.literal("unavailable"), z.literal("unbound"), z.literal("invalid"), z.literal("corrupt"), z.literal("storage-unavailable"), z.literal("evidence-gate"), z.literal("state-machine"), z.literal("ref-incomplete")]).readonly(),
|
|
313
|
+
'message': z.string().readonly().describe('The human/model-readable reason, written to teach the correct call.'),
|
|
314
|
+
}), z.object({
|
|
315
|
+
'ok': z.literal(true).readonly(),
|
|
316
|
+
'assessment': z.object({
|
|
317
|
+
'id': z.string().readonly(),
|
|
318
|
+
'type': z.union([z.literal("quiz"), z.literal("practice"), z.literal("retake")]).readonly().describe('quiz: a paper; practice: an acceptance rubric; retake: a station\'s open misses, re-asked (never counts toward passing).'),
|
|
319
|
+
'scope': z.object({
|
|
320
|
+
'nodeId': z.string().readonly().optional().describe('The roadmap node this assessment gates, when it is a node assessment.'),
|
|
321
|
+
'resourceId': z.string().readonly().optional().describe('The resource whose content is quizzed; absent + nodeId present = a project-path station, both absent = free practice.'),
|
|
322
|
+
}).readonly(),
|
|
323
|
+
'focus': z.union([z.literal("mixed"), z.literal("book"), z.literal("mine")]).readonly().optional().describe('quiz: the learner\'s chosen source (absent on assessments stored before the choice existed = mixed).'),
|
|
324
|
+
'questions': z.array(z.object({
|
|
325
|
+
'id': z.string().readonly(),
|
|
326
|
+
'kind': z.union([z.literal("choice"), z.literal("fill"), z.literal("free")]).readonly().describe('`choice` carries options; `fill` / `free` are open answers.'),
|
|
327
|
+
'prompt': z.string().readonly(),
|
|
328
|
+
'options': z.array(z.string()).readonly().optional(),
|
|
329
|
+
'answer': z.string().readonly(),
|
|
330
|
+
'explanation': z.string().readonly().optional().describe('Why the answer is right — shown after answering.'),
|
|
331
|
+
'point': z.string().readonly().optional().describe('The gated station\'s point this question probes (a point id) — required once the station carries points; mastery aggregates by it.'),
|
|
332
|
+
'origin': z.object({
|
|
333
|
+
'assessmentId': z.string().readonly(),
|
|
334
|
+
'questionId': z.string().readonly(),
|
|
335
|
+
}).readonly().optional().describe('retake papers: the question this one re-asks.'),
|
|
336
|
+
'target': z.object({
|
|
337
|
+
'kind': z.union([z.literal("marked"), z.literal("asked"), z.literal("missed"), z.literal("topic")]).readonly(),
|
|
338
|
+
'cardIds': z.array(z.string()).readonly().optional().describe('The cards it probes (required for marked / asked / missed).'),
|
|
339
|
+
}).readonly(),
|
|
340
|
+
'evidence': z.object({
|
|
341
|
+
'kind': z.union([z.literal("web"), z.literal("photo"), z.literal("knowledge")]).readonly(),
|
|
342
|
+
'pageId': z.string().readonly().optional().describe('photo: the page whose text holds the quote.'),
|
|
343
|
+
'url': z.string().readonly().optional().describe('web: where the quote is from.'),
|
|
344
|
+
'quote': z.string().readonly().optional().describe('photo / web: the passage, verbatim.'),
|
|
345
|
+
}).readonly(),
|
|
346
|
+
})).readonly().optional().describe('quiz: the questions.'),
|
|
347
|
+
'rubric': z.array(z.object({
|
|
348
|
+
'id': z.string().readonly().describe('Stable id: L + 1-based position — verdicts name it, so a replan rewording the line never orphans history.'),
|
|
349
|
+
'line': z.string().readonly(),
|
|
350
|
+
'ref': z.string().readonly().optional().describe('The assessment that machine-checks this line.'),
|
|
351
|
+
})).readonly().optional().describe('practice: the materialized rubric (stable line ids).'),
|
|
352
|
+
'supersededBy': z.string().readonly().optional().describe('The assessment that replaced this one (a station\'s newer paper).'),
|
|
353
|
+
'createdAt': z.string().readonly(),
|
|
354
|
+
}),
|
|
355
|
+
})]))
|
|
356
|
+
let _khorsheed_dsh_library_library_getProject_parameter_0$schema$value
|
|
357
|
+
const _khorsheed_dsh_library_library_getProject_parameter_0$schema = () => (_khorsheed_dsh_library_library_getProject_parameter_0$schema$value ??= z.object({
|
|
358
|
+
'id': z.string(),
|
|
359
|
+
}))
|
|
360
|
+
let _khorsheed_dsh_library_library_getProject_result$schema$value
|
|
361
|
+
const _khorsheed_dsh_library_library_getProject_result$schema = () => (_khorsheed_dsh_library_library_getProject_result$schema$value ??= z.union([z.object({
|
|
362
|
+
'ok': z.literal(false).readonly(),
|
|
363
|
+
'error': z.union([z.literal("not-found"), z.literal("exists"), z.literal("io"), z.literal("unavailable"), z.literal("unbound"), z.literal("invalid"), z.literal("corrupt"), z.literal("storage-unavailable"), z.literal("evidence-gate"), z.literal("state-machine"), z.literal("ref-incomplete")]).readonly(),
|
|
364
|
+
'message': z.string().readonly().describe('The human/model-readable reason, written to teach the correct call.'),
|
|
365
|
+
}), z.object({
|
|
366
|
+
'ok': z.literal(true).readonly(),
|
|
367
|
+
'project': z.object({
|
|
368
|
+
'resources': z.array(z.object({
|
|
369
|
+
'id': z.string().readonly(),
|
|
370
|
+
'title': z.string().readonly(),
|
|
371
|
+
'kind': z.union([z.literal("article"), z.literal("tool"), z.literal("book"), z.literal("video"), z.literal("repo"), z.literal("course"), z.literal("hardware")]).readonly(),
|
|
372
|
+
'seq': z.number().readonly().optional().describe('A textbook\'s place in the study order (1-based); absent on a thin link.'),
|
|
373
|
+
'origin': z.union([z.literal("learner"), z.literal("picked"), z.literal("authored")]).readonly().optional().describe('Where the entry came from.'),
|
|
374
|
+
'roadmap': z.object({
|
|
375
|
+
'done': z.number().readonly(),
|
|
376
|
+
'total': z.number().readonly(),
|
|
377
|
+
}).readonly().optional().describe('Adopted-roadmap progress; only a thick resource (toc) can carry one.'),
|
|
378
|
+
'current': z.object({
|
|
379
|
+
'id': z.string().readonly(),
|
|
380
|
+
'title': z.string().readonly(),
|
|
381
|
+
}).readonly().optional().describe('The first current node, when one is in progress.'),
|
|
382
|
+
'hasDraft': z.boolean().readonly().describe('A draft is waiting for the learner\'s 采用.'),
|
|
383
|
+
'draftTotal': z.number().readonly().optional().describe('The waiting draft\'s station count.'),
|
|
384
|
+
})).readonly().describe('Every shelf entry (thick and thin) with its progress.'),
|
|
385
|
+
'cardCount': z.number().readonly().describe('Live cards (not deleted).'),
|
|
386
|
+
'dueCount': z.number().readonly().describe('Live, unmastered cards due for review right now.'),
|
|
387
|
+
'lastActiveAt': z.string().readonly().describe('When anything last happened in the project (its newest event, else its creation) — the list sorts by it.'),
|
|
388
|
+
'openMisses': z.number().readonly().optional().describe('Open misses (待订正) across every station of the project\'s textbooks.'),
|
|
389
|
+
'id': z.string().readonly(),
|
|
390
|
+
'name': z.string().readonly(),
|
|
391
|
+
'template': z.union([z.literal("language"), z.literal("subject"), z.literal("custom")]).readonly(),
|
|
392
|
+
'color': z.union([z.literal("ember"), z.literal("amber"), z.literal("moss"), z.literal("teal"), z.literal("sky"), z.literal("indigo"), z.literal("plum"), z.literal("rose")]).readonly().optional(),
|
|
393
|
+
'icon': z.union([z.literal("code"), z.literal("book"), z.literal("globe"), z.literal("brain"), z.literal("flask"), z.literal("atom"), z.literal("leaf"), z.literal("pen"), z.literal("music"), z.literal("scale"), z.literal("chart"), z.literal("compass")]).readonly().optional(),
|
|
394
|
+
'templateNote': z.string().readonly().optional().describe('The learner\'s own words for a custom template.'),
|
|
395
|
+
'goal': z.string().readonly().optional().describe('The learner\'s goal (「学术类 7 分,12 月 14 日」).'),
|
|
396
|
+
'createdAt': z.string().readonly(),
|
|
397
|
+
}),
|
|
398
|
+
'resources': z.array(z.object({
|
|
399
|
+
'id': z.string().readonly(),
|
|
400
|
+
'title': z.string().readonly(),
|
|
401
|
+
'kind': z.union([z.literal("article"), z.literal("tool"), z.literal("book"), z.literal("video"), z.literal("repo"), z.literal("course"), z.literal("hardware")]).readonly(),
|
|
402
|
+
'url': z.string().readonly().optional().describe('A thin link\'s address; a thick resource may carry one (the web copy).'),
|
|
403
|
+
'note': z.string().readonly().optional().describe('The coach\'s one line: why it is on the shelf (「热身站的读物,只看两节」).'),
|
|
404
|
+
'origin': z.union([z.literal("learner"), z.literal("picked"), z.literal("authored")]).readonly().optional().describe('Where it came from.'),
|
|
405
|
+
'seq': z.number().readonly().optional().describe('A textbook\'s place in the project\'s study order, 1-based and gapless; thin links carry none.'),
|
|
406
|
+
'toc': z.array(z.object({
|
|
407
|
+
'n': z.number().readonly().describe('1-based position — what cover locators count.'),
|
|
408
|
+
'title': z.string().readonly(),
|
|
409
|
+
'part': z.string().readonly().optional().describe('The part / test / unit it sits under, when the resource groups chapters.'),
|
|
410
|
+
})).readonly().optional().describe('The thick/thin switch: present (and non-empty) = thick.'),
|
|
411
|
+
'tocSource': z.object({
|
|
412
|
+
'by': z.union([z.literal("web"), z.literal("model"), z.literal("photo")]).readonly(),
|
|
413
|
+
'url': z.string().readonly().optional(),
|
|
414
|
+
'verifiedAt': z.string().readonly().optional(),
|
|
415
|
+
}).readonly().optional(),
|
|
416
|
+
'meta': z.object({
|
|
417
|
+
'bookKind': z.union([z.literal("material"), z.literal("knowledge")]).readonly().optional(),
|
|
418
|
+
'short': z.string().readonly().optional().describe('The cover\'s abbreviation (「剑5」「PNS」); derived from the title when absent.'),
|
|
419
|
+
'extras': z.array(z.object({
|
|
420
|
+
'title': z.string().readonly(),
|
|
421
|
+
'note': z.string().readonly().optional().describe('One line from the coach: what it is for.'),
|
|
422
|
+
'where': z.string().readonly().optional().describe('Where it is in the resource (「p.152」).'),
|
|
423
|
+
'when': z.union([z.literal("reference"), z.literal("before")]).readonly(),
|
|
424
|
+
})).readonly().optional(),
|
|
425
|
+
'author': z.string().readonly().optional(),
|
|
426
|
+
'edition': z.string().readonly().optional(),
|
|
427
|
+
'isbn': z.string().readonly().optional(),
|
|
428
|
+
}).readonly().optional(),
|
|
429
|
+
'createdAt': z.string().readonly(),
|
|
430
|
+
})),
|
|
431
|
+
})]))
|
|
432
|
+
let _khorsheed_dsh_library_library_getResource_parameter_0$schema$value
|
|
433
|
+
const _khorsheed_dsh_library_library_getResource_parameter_0$schema = () => (_khorsheed_dsh_library_library_getResource_parameter_0$schema$value ??= z.object({
|
|
434
|
+
'projectId': z.string(),
|
|
435
|
+
'resourceId': z.string(),
|
|
436
|
+
}))
|
|
437
|
+
let _khorsheed_dsh_library_library_getResource_result$schema$value
|
|
438
|
+
const _khorsheed_dsh_library_library_getResource_result$schema = () => (_khorsheed_dsh_library_library_getResource_result$schema$value ??= z.union([z.object({
|
|
439
|
+
'ok': z.literal(false).readonly(),
|
|
440
|
+
'error': z.union([z.literal("not-found"), z.literal("exists"), z.literal("io"), z.literal("unavailable"), z.literal("unbound"), z.literal("invalid"), z.literal("corrupt"), z.literal("storage-unavailable"), z.literal("evidence-gate"), z.literal("state-machine"), z.literal("ref-incomplete")]).readonly(),
|
|
441
|
+
'message': z.string().readonly().describe('The human/model-readable reason, written to teach the correct call.'),
|
|
442
|
+
}), z.object({
|
|
443
|
+
'ok': z.literal(true).readonly(),
|
|
444
|
+
'resource': z.object({
|
|
445
|
+
'id': z.string().readonly(),
|
|
446
|
+
'title': z.string().readonly(),
|
|
447
|
+
'kind': z.union([z.literal("article"), z.literal("tool"), z.literal("book"), z.literal("video"), z.literal("repo"), z.literal("course"), z.literal("hardware")]).readonly(),
|
|
448
|
+
'url': z.string().readonly().optional().describe('A thin link\'s address; a thick resource may carry one (the web copy).'),
|
|
449
|
+
'note': z.string().readonly().optional().describe('The coach\'s one line: why it is on the shelf (「热身站的读物,只看两节」).'),
|
|
450
|
+
'origin': z.union([z.literal("learner"), z.literal("picked"), z.literal("authored")]).readonly().optional().describe('Where it came from.'),
|
|
451
|
+
'seq': z.number().readonly().optional().describe('A textbook\'s place in the project\'s study order, 1-based and gapless; thin links carry none.'),
|
|
452
|
+
'toc': z.array(z.object({
|
|
453
|
+
'n': z.number().readonly().describe('1-based position — what cover locators count.'),
|
|
454
|
+
'title': z.string().readonly(),
|
|
455
|
+
'part': z.string().readonly().optional().describe('The part / test / unit it sits under, when the resource groups chapters.'),
|
|
456
|
+
})).readonly().optional().describe('The thick/thin switch: present (and non-empty) = thick.'),
|
|
457
|
+
'tocSource': z.object({
|
|
458
|
+
'by': z.union([z.literal("web"), z.literal("model"), z.literal("photo")]).readonly(),
|
|
459
|
+
'url': z.string().readonly().optional(),
|
|
460
|
+
'verifiedAt': z.string().readonly().optional(),
|
|
461
|
+
}).readonly().optional(),
|
|
462
|
+
'meta': z.object({
|
|
463
|
+
'bookKind': z.union([z.literal("material"), z.literal("knowledge")]).readonly().optional(),
|
|
464
|
+
'short': z.string().readonly().optional().describe('The cover\'s abbreviation (「剑5」「PNS」); derived from the title when absent.'),
|
|
465
|
+
'extras': z.array(z.object({
|
|
466
|
+
'title': z.string().readonly(),
|
|
467
|
+
'note': z.string().readonly().optional().describe('One line from the coach: what it is for.'),
|
|
468
|
+
'where': z.string().readonly().optional().describe('Where it is in the resource (「p.152」).'),
|
|
469
|
+
'when': z.union([z.literal("reference"), z.literal("before")]).readonly(),
|
|
470
|
+
})).readonly().optional(),
|
|
471
|
+
'author': z.string().readonly().optional(),
|
|
472
|
+
'edition': z.string().readonly().optional(),
|
|
473
|
+
'isbn': z.string().readonly().optional(),
|
|
474
|
+
}).readonly().optional(),
|
|
475
|
+
'createdAt': z.string().readonly(),
|
|
476
|
+
}),
|
|
477
|
+
})]))
|
|
478
|
+
let _khorsheed_dsh_library_library_getRoadmap_parameter_0$schema$value
|
|
479
|
+
const _khorsheed_dsh_library_library_getRoadmap_parameter_0$schema = () => (_khorsheed_dsh_library_library_getRoadmap_parameter_0$schema$value ??= z.object({
|
|
480
|
+
'projectId': z.string(),
|
|
481
|
+
'resourceId': z.string(),
|
|
482
|
+
}))
|
|
483
|
+
let _khorsheed_dsh_library_library_getRoadmap_result$schema$value
|
|
484
|
+
const _khorsheed_dsh_library_library_getRoadmap_result$schema = () => (_khorsheed_dsh_library_library_getRoadmap_result$schema$value ??= z.object({
|
|
485
|
+
'roadmap': z.object({
|
|
486
|
+
'primaryResourceId': z.string().readonly().optional().describe('The textbook whose path this is. Always present on anything written since the book-paths cut; a legacy project-level path (absent) is never read back.'),
|
|
487
|
+
'status': z.union([z.literal("draft"), z.literal("adopted")]).readonly(),
|
|
488
|
+
'nodes': z.array(z.object({
|
|
489
|
+
'id': z.string().readonly(),
|
|
490
|
+
'title': z.string().readonly(),
|
|
491
|
+
'goals': z.array(z.string()).readonly().describe('What the learner should be able to do after this node.'),
|
|
492
|
+
'dependsOn': z.array(z.string()).readonly().describe('Node ids that must be `done` before this one may leave `locked`.'),
|
|
493
|
+
'covers': z.array(z.object({
|
|
494
|
+
'ref': z.string().readonly(),
|
|
495
|
+
'locator': z.string().readonly().optional().describe('The contents rows drawn on ("1-5,7") — thick resources only.'),
|
|
496
|
+
'title': z.string().readonly().optional().describe('A url cover\'s display title.'),
|
|
497
|
+
'by': z.union([z.literal("web"), z.literal("model"), z.literal("user")]).readonly().optional().describe('web: fetched and checked; model: from the coach\'s memory, unverified; user: the learner gave it.'),
|
|
498
|
+
'verifiedAt': z.string().readonly().optional(),
|
|
499
|
+
})).readonly().describe('What the station draws on — at least one cover.'),
|
|
500
|
+
'state': z.union([z.literal("current"), z.literal("done"), z.literal("locked")]).readonly(),
|
|
501
|
+
'gate': z.union([z.literal("read"), z.literal("quiz"), z.literal("acceptance")]).readonly().describe('How the node completes: quiz | acceptance | read.'),
|
|
502
|
+
'quizStats': z.object({
|
|
503
|
+
'attempts': z.number().readonly(),
|
|
504
|
+
'lastRatio': z.number().readonly().optional(),
|
|
505
|
+
'bestRatio': z.number().readonly().optional(),
|
|
506
|
+
}).readonly().optional().describe('Quiz-gated nodes only — a read / acceptance node never carries one.'),
|
|
507
|
+
'points': z.array(z.object({
|
|
508
|
+
'id': z.string().readonly().describe('Stable slug (letters, digits, . _ -) — the mastery key.'),
|
|
509
|
+
'title': z.string().readonly().describe('The point as the learner reads it (「极限的定义」).'),
|
|
510
|
+
'notes': z.array(z.object({
|
|
511
|
+
'text': z.string().readonly(),
|
|
512
|
+
'term': z.string().readonly().optional().describe('The short name of the confusion, when the coach gave one (「反函数 vs 倒数」).'),
|
|
513
|
+
'at': z.string().readonly(),
|
|
514
|
+
'session': z.string().readonly().optional().describe('The session it came from.'),
|
|
515
|
+
})).readonly().optional().describe('What the coach noticed the learner stuck on here (a subject project\'s weak point lands on its point, not on a card).'),
|
|
516
|
+
})).readonly().optional().describe('Quiz-gated nodes only: the station\'s knowledge points (3-6), drafted with the roadmap and reviewed at adoption. Quiz questions reference them by id.'),
|
|
517
|
+
'acceptance': z.array(z.union([z.string(), z.object({
|
|
518
|
+
'line': z.string().readonly(),
|
|
519
|
+
'ref': z.string().readonly().optional(),
|
|
520
|
+
})])).readonly().optional().describe('Acceptance nodes only: the rubric lines as authored (the draft\'s and the display\'s source of truth; adoption materializes them into the node\'s practice assessment).'),
|
|
521
|
+
'notes': z.object({
|
|
522
|
+
'text': z.string().readonly().describe('Markdown body.'),
|
|
523
|
+
'updatedAt': z.string().readonly(),
|
|
524
|
+
'revisions': z.number().readonly().describe('1-based — the Nth version (「第 N 次更新」).'),
|
|
525
|
+
}).readonly().optional().describe('The station\'s 讲义, once the coach has taught it.'),
|
|
526
|
+
})).readonly(),
|
|
527
|
+
'passRatio': z.number().readonly().optional().describe('The pass threshold (default {@link DEFAULT_PASS_RATIO}).'),
|
|
528
|
+
'note': z.string().readonly().optional().describe('The coach\'s one-line pacing note on the draft card (「每周 3 章,约 4 周」).'),
|
|
529
|
+
'generatedAt': z.string().readonly(),
|
|
530
|
+
'adoptedAt': z.string().readonly().optional(),
|
|
531
|
+
}).optional(),
|
|
532
|
+
'draft': z.object({
|
|
533
|
+
'primaryResourceId': z.string().readonly().optional().describe('The textbook whose path this is. Always present on anything written since the book-paths cut; a legacy project-level path (absent) is never read back.'),
|
|
534
|
+
'status': z.union([z.literal("draft"), z.literal("adopted")]).readonly(),
|
|
535
|
+
'nodes': z.array(z.object({
|
|
536
|
+
'id': z.string().readonly(),
|
|
537
|
+
'title': z.string().readonly(),
|
|
538
|
+
'goals': z.array(z.string()).readonly().describe('What the learner should be able to do after this node.'),
|
|
539
|
+
'dependsOn': z.array(z.string()).readonly().describe('Node ids that must be `done` before this one may leave `locked`.'),
|
|
540
|
+
'covers': z.array(z.object({
|
|
541
|
+
'ref': z.string().readonly(),
|
|
542
|
+
'locator': z.string().readonly().optional().describe('The contents rows drawn on ("1-5,7") — thick resources only.'),
|
|
543
|
+
'title': z.string().readonly().optional().describe('A url cover\'s display title.'),
|
|
544
|
+
'by': z.union([z.literal("web"), z.literal("model"), z.literal("user")]).readonly().optional().describe('web: fetched and checked; model: from the coach\'s memory, unverified; user: the learner gave it.'),
|
|
545
|
+
'verifiedAt': z.string().readonly().optional(),
|
|
546
|
+
})).readonly().describe('What the station draws on — at least one cover.'),
|
|
547
|
+
'state': z.union([z.literal("current"), z.literal("done"), z.literal("locked")]).readonly(),
|
|
548
|
+
'gate': z.union([z.literal("read"), z.literal("quiz"), z.literal("acceptance")]).readonly().describe('How the node completes: quiz | acceptance | read.'),
|
|
549
|
+
'quizStats': z.object({
|
|
550
|
+
'attempts': z.number().readonly(),
|
|
551
|
+
'lastRatio': z.number().readonly().optional(),
|
|
552
|
+
'bestRatio': z.number().readonly().optional(),
|
|
553
|
+
}).readonly().optional().describe('Quiz-gated nodes only — a read / acceptance node never carries one.'),
|
|
554
|
+
'points': z.array(z.object({
|
|
555
|
+
'id': z.string().readonly().describe('Stable slug (letters, digits, . _ -) — the mastery key.'),
|
|
556
|
+
'title': z.string().readonly().describe('The point as the learner reads it (「极限的定义」).'),
|
|
557
|
+
'notes': z.array(z.object({
|
|
558
|
+
'text': z.string().readonly(),
|
|
559
|
+
'term': z.string().readonly().optional().describe('The short name of the confusion, when the coach gave one (「反函数 vs 倒数」).'),
|
|
560
|
+
'at': z.string().readonly(),
|
|
561
|
+
'session': z.string().readonly().optional().describe('The session it came from.'),
|
|
562
|
+
})).readonly().optional().describe('What the coach noticed the learner stuck on here (a subject project\'s weak point lands on its point, not on a card).'),
|
|
563
|
+
})).readonly().optional().describe('Quiz-gated nodes only: the station\'s knowledge points (3-6), drafted with the roadmap and reviewed at adoption. Quiz questions reference them by id.'),
|
|
564
|
+
'acceptance': z.array(z.union([z.string(), z.object({
|
|
565
|
+
'line': z.string().readonly(),
|
|
566
|
+
'ref': z.string().readonly().optional(),
|
|
567
|
+
})])).readonly().optional().describe('Acceptance nodes only: the rubric lines as authored (the draft\'s and the display\'s source of truth; adoption materializes them into the node\'s practice assessment).'),
|
|
568
|
+
'notes': z.object({
|
|
569
|
+
'text': z.string().readonly().describe('Markdown body.'),
|
|
570
|
+
'updatedAt': z.string().readonly(),
|
|
571
|
+
'revisions': z.number().readonly().describe('1-based — the Nth version (「第 N 次更新」).'),
|
|
572
|
+
}).readonly().optional().describe('The station\'s 讲义, once the coach has taught it.'),
|
|
573
|
+
})).readonly(),
|
|
574
|
+
'passRatio': z.number().readonly().optional().describe('The pass threshold (default {@link DEFAULT_PASS_RATIO}).'),
|
|
575
|
+
'note': z.string().readonly().optional().describe('The coach\'s one-line pacing note on the draft card (「每周 3 章,约 4 周」).'),
|
|
576
|
+
'generatedAt': z.string().readonly(),
|
|
577
|
+
'adoptedAt': z.string().readonly().optional(),
|
|
578
|
+
}).optional(),
|
|
579
|
+
}))
|
|
580
|
+
let _khorsheed_dsh_library_library_latestActivity_result$schema$value
|
|
581
|
+
const _khorsheed_dsh_library_library_latestActivity_result$schema = () => (_khorsheed_dsh_library_library_latestActivity_result$schema$value ??= z.object({
|
|
582
|
+
'at': z.string().optional(),
|
|
583
|
+
'session': z.object({
|
|
584
|
+
'id': z.string(),
|
|
585
|
+
'at': z.string(),
|
|
586
|
+
}).optional(),
|
|
587
|
+
}))
|
|
588
|
+
let _khorsheed_dsh_library_library_listAssessments_parameter_0$schema$value
|
|
589
|
+
const _khorsheed_dsh_library_library_listAssessments_parameter_0$schema = () => (_khorsheed_dsh_library_library_listAssessments_parameter_0$schema$value ??= z.object({
|
|
590
|
+
'projectId': z.string(),
|
|
591
|
+
'resourceId': z.string().optional(),
|
|
592
|
+
'nodeId': z.string().optional(),
|
|
593
|
+
'type': z.union([z.literal("quiz"), z.literal("practice")]).optional(),
|
|
594
|
+
}))
|
|
595
|
+
let _khorsheed_dsh_library_library_listAssessments_result$schema$value
|
|
596
|
+
const _khorsheed_dsh_library_library_listAssessments_result$schema = () => (_khorsheed_dsh_library_library_listAssessments_result$schema$value ??= z.object({
|
|
597
|
+
'assessments': z.array(z.object({
|
|
598
|
+
'id': z.string().readonly(),
|
|
599
|
+
'type': z.union([z.literal("quiz"), z.literal("practice"), z.literal("retake")]).readonly().describe('quiz: a paper; practice: an acceptance rubric; retake: a station\'s open misses, re-asked (never counts toward passing).'),
|
|
600
|
+
'scope': z.object({
|
|
601
|
+
'nodeId': z.string().readonly().optional().describe('The roadmap node this assessment gates, when it is a node assessment.'),
|
|
602
|
+
'resourceId': z.string().readonly().optional().describe('The resource whose content is quizzed; absent + nodeId present = a project-path station, both absent = free practice.'),
|
|
603
|
+
}).readonly(),
|
|
604
|
+
'focus': z.union([z.literal("mixed"), z.literal("book"), z.literal("mine")]).readonly().optional().describe('quiz: the learner\'s chosen source (absent on assessments stored before the choice existed = mixed).'),
|
|
605
|
+
'questions': z.array(z.object({
|
|
606
|
+
'id': z.string().readonly(),
|
|
607
|
+
'kind': z.union([z.literal("choice"), z.literal("fill"), z.literal("free")]).readonly().describe('`choice` carries options; `fill` / `free` are open answers.'),
|
|
608
|
+
'prompt': z.string().readonly(),
|
|
609
|
+
'options': z.array(z.string()).readonly().optional(),
|
|
610
|
+
'answer': z.string().readonly(),
|
|
611
|
+
'explanation': z.string().readonly().optional().describe('Why the answer is right — shown after answering.'),
|
|
612
|
+
'point': z.string().readonly().optional().describe('The gated station\'s point this question probes (a point id) — required once the station carries points; mastery aggregates by it.'),
|
|
613
|
+
'origin': z.object({
|
|
614
|
+
'assessmentId': z.string().readonly(),
|
|
615
|
+
'questionId': z.string().readonly(),
|
|
616
|
+
}).readonly().optional().describe('retake papers: the question this one re-asks.'),
|
|
617
|
+
'target': z.object({
|
|
618
|
+
'kind': z.union([z.literal("marked"), z.literal("asked"), z.literal("missed"), z.literal("topic")]).readonly(),
|
|
619
|
+
'cardIds': z.array(z.string()).readonly().optional().describe('The cards it probes (required for marked / asked / missed).'),
|
|
620
|
+
}).readonly(),
|
|
621
|
+
'evidence': z.object({
|
|
622
|
+
'kind': z.union([z.literal("web"), z.literal("photo"), z.literal("knowledge")]).readonly(),
|
|
623
|
+
'pageId': z.string().readonly().optional().describe('photo: the page whose text holds the quote.'),
|
|
624
|
+
'url': z.string().readonly().optional().describe('web: where the quote is from.'),
|
|
625
|
+
'quote': z.string().readonly().optional().describe('photo / web: the passage, verbatim.'),
|
|
626
|
+
}).readonly(),
|
|
627
|
+
})).readonly().optional().describe('quiz: the questions.'),
|
|
628
|
+
'rubric': z.array(z.object({
|
|
629
|
+
'id': z.string().readonly().describe('Stable id: L + 1-based position — verdicts name it, so a replan rewording the line never orphans history.'),
|
|
630
|
+
'line': z.string().readonly(),
|
|
631
|
+
'ref': z.string().readonly().optional().describe('The assessment that machine-checks this line.'),
|
|
632
|
+
})).readonly().optional().describe('practice: the materialized rubric (stable line ids).'),
|
|
633
|
+
'supersededBy': z.string().readonly().optional().describe('The assessment that replaced this one (a station\'s newer paper).'),
|
|
634
|
+
'createdAt': z.string().readonly(),
|
|
635
|
+
})),
|
|
636
|
+
}))
|
|
637
|
+
let _khorsheed_dsh_library_library_listAttempts_parameter_0$schema$value
|
|
638
|
+
const _khorsheed_dsh_library_library_listAttempts_parameter_0$schema = () => (_khorsheed_dsh_library_library_listAttempts_parameter_0$schema$value ??= z.object({
|
|
639
|
+
'projectId': z.string(),
|
|
640
|
+
'nodeId': z.string().optional(),
|
|
641
|
+
'assessmentId': z.string().optional(),
|
|
642
|
+
}))
|
|
643
|
+
let _khorsheed_dsh_library_library_listAttempts_result$schema$value
|
|
644
|
+
const _khorsheed_dsh_library_library_listAttempts_result$schema = () => (_khorsheed_dsh_library_library_listAttempts_result$schema$value ??= z.object({
|
|
645
|
+
'attempts': z.array(z.object({
|
|
646
|
+
'id': z.string().readonly(),
|
|
647
|
+
'assessmentId': z.string().readonly().optional().describe('The assessment judged. Always set on v5 writes.'),
|
|
648
|
+
'nodeId': z.string().readonly().optional().describe('Legacy v4 key: the acceptance station accepted, before practice rubrics materialized as assessments. Read compatibility only — new attempts never carry it; readers resolve it through the node\'s current practice assessment.'),
|
|
649
|
+
'verdicts': z.array(z.object({
|
|
650
|
+
'task': z.string().readonly().describe('The question id or rubric line id this verdict judges.'),
|
|
651
|
+
'criterion': z.string().readonly(),
|
|
652
|
+
'pass': z.boolean().readonly(),
|
|
653
|
+
'ratio': z.number().readonly().optional().describe('Partial credit (defaults to pass ? 1 : 0).'),
|
|
654
|
+
'evidence': z.string().readonly(),
|
|
655
|
+
'by': z.union([z.literal("auto"), z.literal("user"), z.literal("self"), z.literal("llm")]).readonly().describe('auto: the machine\'s verdict on a ref acceptance line (never accepted from a caller).'),
|
|
656
|
+
'void': z.boolean().readonly().optional().describe('The learner flagged the question as broken (「这题有问题」): it counts for nothing.'),
|
|
657
|
+
'missedCard': z.object({
|
|
658
|
+
'term': z.string().readonly(),
|
|
659
|
+
'gloss': z.string().readonly(),
|
|
660
|
+
}).readonly().optional().describe('A missed question with no target card: the card to create for it.'),
|
|
661
|
+
})).readonly(),
|
|
662
|
+
'ratio': z.number().readonly().describe('Credit over the non-void verdicts — the node\'s unlock input.'),
|
|
663
|
+
'at': z.string().readonly(),
|
|
664
|
+
})),
|
|
665
|
+
}))
|
|
666
|
+
let _khorsheed_dsh_library_library_listCards_parameter_0$schema$value
|
|
667
|
+
const _khorsheed_dsh_library_library_listCards_parameter_0$schema = () => (_khorsheed_dsh_library_library_listCards_parameter_0$schema$value ??= z.object({
|
|
668
|
+
'projectId': z.string().readonly(),
|
|
669
|
+
'query': z.string().readonly().optional(),
|
|
670
|
+
'resourceId': z.string().readonly().optional(),
|
|
671
|
+
'nodeId': z.string().readonly().optional().describe('Cards met in this node (a context or a source page on it).'),
|
|
672
|
+
'kind': z.union([z.literal("word"), z.literal("concept")]).readonly().optional(),
|
|
673
|
+
'source': z.union([z.literal("manual"), z.literal("photo"), z.literal("quiz"), z.literal("chat")]).readonly().optional(),
|
|
674
|
+
'weakMin': z.number().readonly().optional(),
|
|
675
|
+
'due': z.boolean().readonly().optional(),
|
|
676
|
+
'includeMastered': z.boolean().readonly().optional().describe('Include mastered cards (default: active only).'),
|
|
677
|
+
'limit': z.number().readonly().optional(),
|
|
678
|
+
'sort': z.union([z.literal("recent"), z.literal("weak"), z.literal("due")]).readonly().optional().describe('`weak` (default): weakness, then due date; `recent`: newest first; `due`: due date.'),
|
|
679
|
+
}))
|
|
680
|
+
let _khorsheed_dsh_library_library_listCards_result$schema$value
|
|
681
|
+
const _khorsheed_dsh_library_library_listCards_result$schema = () => (_khorsheed_dsh_library_library_listCards_result$schema$value ??= z.object({
|
|
682
|
+
'cards': z.array(z.object({
|
|
683
|
+
'id': z.string().readonly(),
|
|
684
|
+
'kind': z.union([z.literal("word"), z.literal("concept")]).readonly(),
|
|
685
|
+
'term': z.string().readonly(),
|
|
686
|
+
'aliases': z.array(z.string()).readonly().describe('Other spellings / names the same card answers to (instalments, 不应期).'),
|
|
687
|
+
'gloss': z.string().readonly().describe('The meaning: the in-context sense for a word, a one-line explanation for a concept.'),
|
|
688
|
+
'userGloss': z.string().readonly().optional().describe('The learner\'s own handwritten gloss, kept apart from the model\'s.'),
|
|
689
|
+
'contexts': z.array(z.object({
|
|
690
|
+
'sentence': z.string().readonly(),
|
|
691
|
+
'resourceId': z.string().readonly().optional(),
|
|
692
|
+
'pageId': z.string().readonly().optional(),
|
|
693
|
+
'nodeId': z.string().readonly().optional(),
|
|
694
|
+
})).readonly(),
|
|
695
|
+
'resourceId': z.string().readonly().optional().describe('Hung on a resource when it came from one; absent = project-level (「不挂书」).'),
|
|
696
|
+
'sources': z.array(z.object({
|
|
697
|
+
'type': z.union([z.literal("manual"), z.literal("photo"), z.literal("quiz"), z.literal("chat")]).readonly(),
|
|
698
|
+
'ref': z.string().readonly().optional().describe('photo: the page id; quiz: the assessment id; chat: the session id when known.'),
|
|
699
|
+
'note': z.string().readonly().optional().describe('What happened, in a few words (「说老是记混」「T/F/NG 第 9 题」).'),
|
|
700
|
+
'weakened': z.boolean().readonly().optional().describe('This source raised the weakness by one (an undo lowers it back).'),
|
|
701
|
+
'at': z.string().readonly(),
|
|
702
|
+
})).readonly(),
|
|
703
|
+
'weakness': z.number().readonly().describe('0–3: how often the learner got stuck here (asked again, answered wrong).'),
|
|
704
|
+
'mastery': z.object({
|
|
705
|
+
'box': z.number().readonly(),
|
|
706
|
+
'dueAt': z.string().readonly(),
|
|
707
|
+
'streak': z.number().readonly(),
|
|
708
|
+
}).readonly(),
|
|
709
|
+
'status': z.union([z.literal("active"), z.literal("deleted"), z.literal("mastered")]).readonly(),
|
|
710
|
+
'createdAt': z.string().readonly(),
|
|
711
|
+
'updatedAt': z.string().readonly(),
|
|
712
|
+
})),
|
|
713
|
+
'total': z.number(),
|
|
714
|
+
}))
|
|
715
|
+
let _khorsheed_dsh_library_library_listEvents_parameter_0$schema$value
|
|
716
|
+
const _khorsheed_dsh_library_library_listEvents_parameter_0$schema = () => (_khorsheed_dsh_library_library_listEvents_parameter_0$schema$value ??= z.object({
|
|
717
|
+
'projectId': z.string(),
|
|
718
|
+
'limit': z.number().optional(),
|
|
719
|
+
'types': z.array(z.union([z.literal("resource.added"), z.literal("roadmap.drafted"), z.literal("roadmap.adopted"), z.literal("page.recorded"), z.literal("cards.recorded"), z.literal("card.edited"), z.literal("quiz.created"), z.literal("attempt.assessed"), z.literal("node.completed"), z.literal("node.unlocked"), z.literal("node.noted"), z.literal("point.changed")])).optional(),
|
|
720
|
+
}))
|
|
721
|
+
let _khorsheed_dsh_library_library_listEvents_result$schema$value
|
|
722
|
+
const _khorsheed_dsh_library_library_listEvents_result$schema = () => (_khorsheed_dsh_library_library_listEvents_result$schema$value ??= z.object({
|
|
723
|
+
'events': z.array(z.object({
|
|
724
|
+
'at': z.string().readonly(),
|
|
725
|
+
'type': z.union([z.literal("resource.added"), z.literal("roadmap.drafted"), z.literal("roadmap.adopted"), z.literal("page.recorded"), z.literal("cards.recorded"), z.literal("card.edited"), z.literal("quiz.created"), z.literal("attempt.assessed"), z.literal("node.completed"), z.literal("node.unlocked"), z.literal("node.noted"), z.literal("point.changed")]).readonly(),
|
|
726
|
+
'id': z.string().readonly().optional().describe('The object the event is about (a resource / assessment / node / page id).'),
|
|
727
|
+
'title': z.string().readonly().optional().describe('Its display name, so a reader needs no join (cards.recorded: the terms).'),
|
|
728
|
+
'resourceId': z.string().readonly().optional(),
|
|
729
|
+
'source': z.union([z.literal("manual"), z.literal("photo"), z.literal("quiz"), z.literal("chat")]).readonly().optional().describe('cards.recorded: where they came from (the 「教练最近记下」 filter).'),
|
|
730
|
+
'session': z.string().readonly().optional().describe('cards.recorded from a chat: the session that noted them (its sidebar toasts them).'),
|
|
731
|
+
'ids': z.array(z.string()).readonly().optional().describe('cards.recorded: the card ids, so a toast can undo them.'),
|
|
732
|
+
'count': z.number().readonly().optional().describe('Small numeric summaries (nodes / questions / added / merged).'),
|
|
733
|
+
'count2': z.number().readonly().optional(),
|
|
734
|
+
'ratio': z.number().readonly().optional(),
|
|
735
|
+
'nodeId': z.string().readonly().optional().describe('point.changed: the station and the states.'),
|
|
736
|
+
'from': z.union([z.literal("mastered"), z.literal("weak"), z.literal("untested"), z.literal("practicing")]).readonly().optional(),
|
|
737
|
+
'to': z.union([z.literal("mastered"), z.literal("weak"), z.literal("untested"), z.literal("practicing")]).readonly().optional(),
|
|
738
|
+
'detail': z.string().readonly().optional().describe('point.changed: why, in one line (「2 题待订正」「教练备注:…」).'),
|
|
739
|
+
})),
|
|
740
|
+
}))
|
|
741
|
+
let _khorsheed_dsh_library_library_listPages_parameter_0$schema$value
|
|
742
|
+
const _khorsheed_dsh_library_library_listPages_parameter_0$schema = () => (_khorsheed_dsh_library_library_listPages_parameter_0$schema$value ??= z.object({
|
|
743
|
+
'projectId': z.string(),
|
|
744
|
+
'resourceId': z.string(),
|
|
745
|
+
'nodeId': z.string().optional(),
|
|
746
|
+
}))
|
|
747
|
+
let _khorsheed_dsh_library_library_listPages_result$schema$value
|
|
748
|
+
const _khorsheed_dsh_library_library_listPages_result$schema = () => (_khorsheed_dsh_library_library_listPages_result$schema$value ??= z.object({
|
|
749
|
+
'pages': z.array(z.object({
|
|
750
|
+
'id': z.string().readonly(),
|
|
751
|
+
'resourceId': z.string().readonly().describe('The thick resource photographed.'),
|
|
752
|
+
'nodeId': z.string().readonly().optional(),
|
|
753
|
+
'label': z.string().readonly().optional().describe('What the learner calls it (「p.16」).'),
|
|
754
|
+
'attachment': z.object({
|
|
755
|
+
'attachmentId': z.string().readonly(),
|
|
756
|
+
'mediaType': z.string().readonly(),
|
|
757
|
+
'bytes': z.number().readonly(),
|
|
758
|
+
'width': z.number().readonly(),
|
|
759
|
+
'height': z.number().readonly(),
|
|
760
|
+
}).readonly(),
|
|
761
|
+
'text': z.string().readonly().describe('The page\'s recognized printed text — a photo-evidence quote is checked against it.'),
|
|
762
|
+
'marks': z.array(z.object({
|
|
763
|
+
'text': z.string().readonly().describe('The underlined word / phrase / concept, as printed.'),
|
|
764
|
+
'sentence': z.string().readonly().optional().describe('The sentence it sits in, as printed.'),
|
|
765
|
+
'handNote': z.string().readonly().optional().describe('The learner\'s handwritten gloss beside it, transcribed.'),
|
|
766
|
+
'gloss': z.string().readonly().optional().describe('The recognizer\'s in-context meaning (a word) or one-line explanation (a concept).'),
|
|
767
|
+
'uncertain': z.boolean().readonly().optional().describe('The recognizer could not tell (a strike-through? a stray line?) — never auto-carded.'),
|
|
768
|
+
})).readonly(),
|
|
769
|
+
'cardIds': z.array(z.string()).readonly().describe('The cards this page\'s marks became or merged into.'),
|
|
770
|
+
'at': z.string().readonly(),
|
|
771
|
+
})),
|
|
772
|
+
}))
|
|
773
|
+
let _khorsheed_dsh_library_library_listProjects_result$schema$value
|
|
774
|
+
const _khorsheed_dsh_library_library_listProjects_result$schema = () => (_khorsheed_dsh_library_library_listProjects_result$schema$value ??= z.object({
|
|
775
|
+
'projects': z.array(z.object({
|
|
776
|
+
'resources': z.array(z.object({
|
|
777
|
+
'id': z.string().readonly(),
|
|
778
|
+
'title': z.string().readonly(),
|
|
779
|
+
'kind': z.union([z.literal("article"), z.literal("tool"), z.literal("book"), z.literal("video"), z.literal("repo"), z.literal("course"), z.literal("hardware")]).readonly(),
|
|
780
|
+
'seq': z.number().readonly().optional().describe('A textbook\'s place in the study order (1-based); absent on a thin link.'),
|
|
781
|
+
'origin': z.union([z.literal("learner"), z.literal("picked"), z.literal("authored")]).readonly().optional().describe('Where the entry came from.'),
|
|
782
|
+
'roadmap': z.object({
|
|
783
|
+
'done': z.number().readonly(),
|
|
784
|
+
'total': z.number().readonly(),
|
|
785
|
+
}).readonly().optional().describe('Adopted-roadmap progress; only a thick resource (toc) can carry one.'),
|
|
786
|
+
'current': z.object({
|
|
787
|
+
'id': z.string().readonly(),
|
|
788
|
+
'title': z.string().readonly(),
|
|
789
|
+
}).readonly().optional().describe('The first current node, when one is in progress.'),
|
|
790
|
+
'hasDraft': z.boolean().readonly().describe('A draft is waiting for the learner\'s 采用.'),
|
|
791
|
+
'draftTotal': z.number().readonly().optional().describe('The waiting draft\'s station count.'),
|
|
792
|
+
})).readonly().describe('Every shelf entry (thick and thin) with its progress.'),
|
|
793
|
+
'cardCount': z.number().readonly().describe('Live cards (not deleted).'),
|
|
794
|
+
'dueCount': z.number().readonly().describe('Live, unmastered cards due for review right now.'),
|
|
795
|
+
'lastActiveAt': z.string().readonly().describe('When anything last happened in the project (its newest event, else its creation) — the list sorts by it.'),
|
|
796
|
+
'openMisses': z.number().readonly().optional().describe('Open misses (待订正) across every station of the project\'s textbooks.'),
|
|
797
|
+
'id': z.string().readonly(),
|
|
798
|
+
'name': z.string().readonly(),
|
|
799
|
+
'template': z.union([z.literal("language"), z.literal("subject"), z.literal("custom")]).readonly(),
|
|
800
|
+
'color': z.union([z.literal("ember"), z.literal("amber"), z.literal("moss"), z.literal("teal"), z.literal("sky"), z.literal("indigo"), z.literal("plum"), z.literal("rose")]).readonly().optional(),
|
|
801
|
+
'icon': z.union([z.literal("code"), z.literal("book"), z.literal("globe"), z.literal("brain"), z.literal("flask"), z.literal("atom"), z.literal("leaf"), z.literal("pen"), z.literal("music"), z.literal("scale"), z.literal("chart"), z.literal("compass")]).readonly().optional(),
|
|
802
|
+
'templateNote': z.string().readonly().optional().describe('The learner\'s own words for a custom template.'),
|
|
803
|
+
'goal': z.string().readonly().optional().describe('The learner\'s goal (「学术类 7 分,12 月 14 日」).'),
|
|
804
|
+
'createdAt': z.string().readonly(),
|
|
805
|
+
})),
|
|
806
|
+
}))
|
|
807
|
+
let _khorsheed_dsh_library_library_listResources_parameter_0$schema$value
|
|
808
|
+
const _khorsheed_dsh_library_library_listResources_parameter_0$schema = () => (_khorsheed_dsh_library_library_listResources_parameter_0$schema$value ??= z.object({
|
|
809
|
+
'projectId': z.string(),
|
|
810
|
+
}))
|
|
811
|
+
let _khorsheed_dsh_library_library_listResources_result$schema$value
|
|
812
|
+
const _khorsheed_dsh_library_library_listResources_result$schema = () => (_khorsheed_dsh_library_library_listResources_result$schema$value ??= z.object({
|
|
813
|
+
'resources': z.array(z.object({
|
|
814
|
+
'id': z.string().readonly(),
|
|
815
|
+
'title': z.string().readonly(),
|
|
816
|
+
'kind': z.union([z.literal("article"), z.literal("tool"), z.literal("book"), z.literal("video"), z.literal("repo"), z.literal("course"), z.literal("hardware")]).readonly(),
|
|
817
|
+
'url': z.string().readonly().optional().describe('A thin link\'s address; a thick resource may carry one (the web copy).'),
|
|
818
|
+
'note': z.string().readonly().optional().describe('The coach\'s one line: why it is on the shelf (「热身站的读物,只看两节」).'),
|
|
819
|
+
'origin': z.union([z.literal("learner"), z.literal("picked"), z.literal("authored")]).readonly().optional().describe('Where it came from.'),
|
|
820
|
+
'seq': z.number().readonly().optional().describe('A textbook\'s place in the project\'s study order, 1-based and gapless; thin links carry none.'),
|
|
821
|
+
'toc': z.array(z.object({
|
|
822
|
+
'n': z.number().readonly().describe('1-based position — what cover locators count.'),
|
|
823
|
+
'title': z.string().readonly(),
|
|
824
|
+
'part': z.string().readonly().optional().describe('The part / test / unit it sits under, when the resource groups chapters.'),
|
|
825
|
+
})).readonly().optional().describe('The thick/thin switch: present (and non-empty) = thick.'),
|
|
826
|
+
'tocSource': z.object({
|
|
827
|
+
'by': z.union([z.literal("web"), z.literal("model"), z.literal("photo")]).readonly(),
|
|
828
|
+
'url': z.string().readonly().optional(),
|
|
829
|
+
'verifiedAt': z.string().readonly().optional(),
|
|
830
|
+
}).readonly().optional(),
|
|
831
|
+
'meta': z.object({
|
|
832
|
+
'bookKind': z.union([z.literal("material"), z.literal("knowledge")]).readonly().optional(),
|
|
833
|
+
'short': z.string().readonly().optional().describe('The cover\'s abbreviation (「剑5」「PNS」); derived from the title when absent.'),
|
|
834
|
+
'extras': z.array(z.object({
|
|
835
|
+
'title': z.string().readonly(),
|
|
836
|
+
'note': z.string().readonly().optional().describe('One line from the coach: what it is for.'),
|
|
837
|
+
'where': z.string().readonly().optional().describe('Where it is in the resource (「p.152」).'),
|
|
838
|
+
'when': z.union([z.literal("reference"), z.literal("before")]).readonly(),
|
|
839
|
+
})).readonly().optional(),
|
|
840
|
+
'author': z.string().readonly().optional(),
|
|
841
|
+
'edition': z.string().readonly().optional(),
|
|
842
|
+
'isbn': z.string().readonly().optional(),
|
|
843
|
+
}).readonly().optional(),
|
|
844
|
+
'createdAt': z.string().readonly(),
|
|
845
|
+
})),
|
|
846
|
+
}))
|
|
847
|
+
let _khorsheed_dsh_library_library_markNodeRead_parameter_0$schema$value
|
|
848
|
+
const _khorsheed_dsh_library_library_markNodeRead_parameter_0$schema = () => (_khorsheed_dsh_library_library_markNodeRead_parameter_0$schema$value ??= z.object({
|
|
849
|
+
'projectId': z.string(),
|
|
850
|
+
'resourceId': z.string().optional(),
|
|
851
|
+
'nodeId': z.string(),
|
|
852
|
+
}))
|
|
853
|
+
let _khorsheed_dsh_library_library_markNodeRead_result$schema$value
|
|
854
|
+
const _khorsheed_dsh_library_library_markNodeRead_result$schema = () => (_khorsheed_dsh_library_library_markNodeRead_result$schema$value ??= z.union([z.object({
|
|
855
|
+
'ok': z.literal(false).readonly(),
|
|
856
|
+
'error': z.union([z.literal("not-found"), z.literal("exists"), z.literal("io"), z.literal("unavailable"), z.literal("unbound"), z.literal("invalid"), z.literal("corrupt"), z.literal("storage-unavailable"), z.literal("evidence-gate"), z.literal("state-machine"), z.literal("ref-incomplete")]).readonly(),
|
|
857
|
+
'message': z.string().readonly().describe('The human/model-readable reason, written to teach the correct call.'),
|
|
858
|
+
}), z.object({
|
|
859
|
+
'ok': z.literal(true).readonly(),
|
|
860
|
+
'roadmap': z.object({
|
|
861
|
+
'primaryResourceId': z.string().readonly().optional().describe('The textbook whose path this is. Always present on anything written since the book-paths cut; a legacy project-level path (absent) is never read back.'),
|
|
862
|
+
'status': z.union([z.literal("draft"), z.literal("adopted")]).readonly(),
|
|
863
|
+
'nodes': z.array(z.object({
|
|
864
|
+
'id': z.string().readonly(),
|
|
865
|
+
'title': z.string().readonly(),
|
|
866
|
+
'goals': z.array(z.string()).readonly().describe('What the learner should be able to do after this node.'),
|
|
867
|
+
'dependsOn': z.array(z.string()).readonly().describe('Node ids that must be `done` before this one may leave `locked`.'),
|
|
868
|
+
'covers': z.array(z.object({
|
|
869
|
+
'ref': z.string().readonly(),
|
|
870
|
+
'locator': z.string().readonly().optional().describe('The contents rows drawn on ("1-5,7") — thick resources only.'),
|
|
871
|
+
'title': z.string().readonly().optional().describe('A url cover\'s display title.'),
|
|
872
|
+
'by': z.union([z.literal("web"), z.literal("model"), z.literal("user")]).readonly().optional().describe('web: fetched and checked; model: from the coach\'s memory, unverified; user: the learner gave it.'),
|
|
873
|
+
'verifiedAt': z.string().readonly().optional(),
|
|
874
|
+
})).readonly().describe('What the station draws on — at least one cover.'),
|
|
875
|
+
'state': z.union([z.literal("current"), z.literal("done"), z.literal("locked")]).readonly(),
|
|
876
|
+
'gate': z.union([z.literal("read"), z.literal("quiz"), z.literal("acceptance")]).readonly().describe('How the node completes: quiz | acceptance | read.'),
|
|
877
|
+
'quizStats': z.object({
|
|
878
|
+
'attempts': z.number().readonly(),
|
|
879
|
+
'lastRatio': z.number().readonly().optional(),
|
|
880
|
+
'bestRatio': z.number().readonly().optional(),
|
|
881
|
+
}).readonly().optional().describe('Quiz-gated nodes only — a read / acceptance node never carries one.'),
|
|
882
|
+
'points': z.array(z.object({
|
|
883
|
+
'id': z.string().readonly().describe('Stable slug (letters, digits, . _ -) — the mastery key.'),
|
|
884
|
+
'title': z.string().readonly().describe('The point as the learner reads it (「极限的定义」).'),
|
|
885
|
+
'notes': z.array(z.object({
|
|
886
|
+
'text': z.string().readonly(),
|
|
887
|
+
'term': z.string().readonly().optional().describe('The short name of the confusion, when the coach gave one (「反函数 vs 倒数」).'),
|
|
888
|
+
'at': z.string().readonly(),
|
|
889
|
+
'session': z.string().readonly().optional().describe('The session it came from.'),
|
|
890
|
+
})).readonly().optional().describe('What the coach noticed the learner stuck on here (a subject project\'s weak point lands on its point, not on a card).'),
|
|
891
|
+
})).readonly().optional().describe('Quiz-gated nodes only: the station\'s knowledge points (3-6), drafted with the roadmap and reviewed at adoption. Quiz questions reference them by id.'),
|
|
892
|
+
'acceptance': z.array(z.union([z.string(), z.object({
|
|
893
|
+
'line': z.string().readonly(),
|
|
894
|
+
'ref': z.string().readonly().optional(),
|
|
895
|
+
})])).readonly().optional().describe('Acceptance nodes only: the rubric lines as authored (the draft\'s and the display\'s source of truth; adoption materializes them into the node\'s practice assessment).'),
|
|
896
|
+
'notes': z.object({
|
|
897
|
+
'text': z.string().readonly().describe('Markdown body.'),
|
|
898
|
+
'updatedAt': z.string().readonly(),
|
|
899
|
+
'revisions': z.number().readonly().describe('1-based — the Nth version (「第 N 次更新」).'),
|
|
900
|
+
}).readonly().optional().describe('The station\'s 讲义, once the coach has taught it.'),
|
|
901
|
+
})).readonly(),
|
|
902
|
+
'passRatio': z.number().readonly().optional().describe('The pass threshold (default {@link DEFAULT_PASS_RATIO}).'),
|
|
903
|
+
'note': z.string().readonly().optional().describe('The coach\'s one-line pacing note on the draft card (「每周 3 章,约 4 周」).'),
|
|
904
|
+
'generatedAt': z.string().readonly(),
|
|
905
|
+
'adoptedAt': z.string().readonly().optional(),
|
|
906
|
+
}),
|
|
907
|
+
'unlocked': z.array(z.string()),
|
|
908
|
+
})]))
|
|
909
|
+
let _khorsheed_dsh_library_library_moveResource_parameter_0$schema$value
|
|
910
|
+
const _khorsheed_dsh_library_library_moveResource_parameter_0$schema = () => (_khorsheed_dsh_library_library_moveResource_parameter_0$schema$value ??= z.object({
|
|
911
|
+
'projectId': z.string(),
|
|
912
|
+
'resourceId': z.string(),
|
|
913
|
+
'seq': z.number(),
|
|
914
|
+
}))
|
|
915
|
+
let _khorsheed_dsh_library_library_moveResource_result$schema$value
|
|
916
|
+
const _khorsheed_dsh_library_library_moveResource_result$schema = () => (_khorsheed_dsh_library_library_moveResource_result$schema$value ??= z.union([z.object({
|
|
917
|
+
'ok': z.literal(false).readonly(),
|
|
918
|
+
'error': z.union([z.literal("not-found"), z.literal("exists"), z.literal("io"), z.literal("unavailable"), z.literal("unbound"), z.literal("invalid"), z.literal("corrupt"), z.literal("storage-unavailable"), z.literal("evidence-gate"), z.literal("state-machine"), z.literal("ref-incomplete")]).readonly(),
|
|
919
|
+
'message': z.string().readonly().describe('The human/model-readable reason, written to teach the correct call.'),
|
|
920
|
+
}), z.object({
|
|
921
|
+
'ok': z.literal(true).readonly(),
|
|
922
|
+
'resources': z.array(z.object({
|
|
923
|
+
'id': z.string().readonly(),
|
|
924
|
+
'title': z.string().readonly(),
|
|
925
|
+
'kind': z.union([z.literal("article"), z.literal("tool"), z.literal("book"), z.literal("video"), z.literal("repo"), z.literal("course"), z.literal("hardware")]).readonly(),
|
|
926
|
+
'url': z.string().readonly().optional().describe('A thin link\'s address; a thick resource may carry one (the web copy).'),
|
|
927
|
+
'note': z.string().readonly().optional().describe('The coach\'s one line: why it is on the shelf (「热身站的读物,只看两节」).'),
|
|
928
|
+
'origin': z.union([z.literal("learner"), z.literal("picked"), z.literal("authored")]).readonly().optional().describe('Where it came from.'),
|
|
929
|
+
'seq': z.number().readonly().optional().describe('A textbook\'s place in the project\'s study order, 1-based and gapless; thin links carry none.'),
|
|
930
|
+
'toc': z.array(z.object({
|
|
931
|
+
'n': z.number().readonly().describe('1-based position — what cover locators count.'),
|
|
932
|
+
'title': z.string().readonly(),
|
|
933
|
+
'part': z.string().readonly().optional().describe('The part / test / unit it sits under, when the resource groups chapters.'),
|
|
934
|
+
})).readonly().optional().describe('The thick/thin switch: present (and non-empty) = thick.'),
|
|
935
|
+
'tocSource': z.object({
|
|
936
|
+
'by': z.union([z.literal("web"), z.literal("model"), z.literal("photo")]).readonly(),
|
|
937
|
+
'url': z.string().readonly().optional(),
|
|
938
|
+
'verifiedAt': z.string().readonly().optional(),
|
|
939
|
+
}).readonly().optional(),
|
|
940
|
+
'meta': z.object({
|
|
941
|
+
'bookKind': z.union([z.literal("material"), z.literal("knowledge")]).readonly().optional(),
|
|
942
|
+
'short': z.string().readonly().optional().describe('The cover\'s abbreviation (「剑5」「PNS」); derived from the title when absent.'),
|
|
943
|
+
'extras': z.array(z.object({
|
|
944
|
+
'title': z.string().readonly(),
|
|
945
|
+
'note': z.string().readonly().optional().describe('One line from the coach: what it is for.'),
|
|
946
|
+
'where': z.string().readonly().optional().describe('Where it is in the resource (「p.152」).'),
|
|
947
|
+
'when': z.union([z.literal("reference"), z.literal("before")]).readonly(),
|
|
948
|
+
})).readonly().optional(),
|
|
949
|
+
'author': z.string().readonly().optional(),
|
|
950
|
+
'edition': z.string().readonly().optional(),
|
|
951
|
+
'isbn': z.string().readonly().optional(),
|
|
952
|
+
}).readonly().optional(),
|
|
953
|
+
'createdAt': z.string().readonly(),
|
|
954
|
+
})),
|
|
955
|
+
})]))
|
|
956
|
+
let _khorsheed_dsh_library_library_putAttempt_parameter_0$schema$value
|
|
957
|
+
const _khorsheed_dsh_library_library_putAttempt_parameter_0$schema = () => (_khorsheed_dsh_library_library_putAttempt_parameter_0$schema$value ??= z.object({
|
|
958
|
+
'projectId': z.string(),
|
|
959
|
+
'assessmentId': z.string().optional(),
|
|
960
|
+
'quizId': z.string().optional(),
|
|
961
|
+
'nodeId': z.string().optional(),
|
|
962
|
+
'resourceId': z.string().optional(),
|
|
963
|
+
'verdicts': z.array(z.object({
|
|
964
|
+
'task': z.string().readonly().describe('The question id or rubric line id this verdict judges.'),
|
|
965
|
+
'criterion': z.string().readonly(),
|
|
966
|
+
'pass': z.boolean().readonly(),
|
|
967
|
+
'ratio': z.number().readonly().optional().describe('Partial credit (defaults to pass ? 1 : 0).'),
|
|
968
|
+
'evidence': z.string().readonly(),
|
|
969
|
+
'by': z.union([z.literal("auto"), z.literal("user"), z.literal("self"), z.literal("llm")]).readonly().describe('auto: the machine\'s verdict on a ref acceptance line (never accepted from a caller).'),
|
|
970
|
+
'void': z.boolean().readonly().optional().describe('The learner flagged the question as broken (「这题有问题」): it counts for nothing.'),
|
|
971
|
+
'missedCard': z.object({
|
|
972
|
+
'term': z.string().readonly(),
|
|
973
|
+
'gloss': z.string().readonly(),
|
|
974
|
+
}).readonly().optional().describe('A missed question with no target card: the card to create for it.'),
|
|
975
|
+
})),
|
|
976
|
+
}))
|
|
977
|
+
let _khorsheed_dsh_library_library_putAttempt_result$schema$value
|
|
978
|
+
const _khorsheed_dsh_library_library_putAttempt_result$schema = () => (_khorsheed_dsh_library_library_putAttempt_result$schema$value ??= z.union([z.object({
|
|
979
|
+
'ok': z.literal(false).readonly(),
|
|
980
|
+
'error': z.union([z.literal("not-found"), z.literal("exists"), z.literal("io"), z.literal("unavailable"), z.literal("unbound"), z.literal("invalid"), z.literal("corrupt"), z.literal("storage-unavailable"), z.literal("evidence-gate"), z.literal("state-machine"), z.literal("ref-incomplete")]).readonly(),
|
|
981
|
+
'message': z.string().readonly().describe('The human/model-readable reason, written to teach the correct call.'),
|
|
982
|
+
}), z.object({
|
|
983
|
+
'ok': z.literal(true).readonly(),
|
|
984
|
+
'attempt': z.object({
|
|
985
|
+
'id': z.string().readonly(),
|
|
986
|
+
'assessmentId': z.string().readonly().optional().describe('The assessment judged. Always set on v5 writes.'),
|
|
987
|
+
'nodeId': z.string().readonly().optional().describe('Legacy v4 key: the acceptance station accepted, before practice rubrics materialized as assessments. Read compatibility only — new attempts never carry it; readers resolve it through the node\'s current practice assessment.'),
|
|
988
|
+
'verdicts': z.array(z.object({
|
|
989
|
+
'task': z.string().readonly().describe('The question id or rubric line id this verdict judges.'),
|
|
990
|
+
'criterion': z.string().readonly(),
|
|
991
|
+
'pass': z.boolean().readonly(),
|
|
992
|
+
'ratio': z.number().readonly().optional().describe('Partial credit (defaults to pass ? 1 : 0).'),
|
|
993
|
+
'evidence': z.string().readonly(),
|
|
994
|
+
'by': z.union([z.literal("auto"), z.literal("user"), z.literal("self"), z.literal("llm")]).readonly().describe('auto: the machine\'s verdict on a ref acceptance line (never accepted from a caller).'),
|
|
995
|
+
'void': z.boolean().readonly().optional().describe('The learner flagged the question as broken (「这题有问题」): it counts for nothing.'),
|
|
996
|
+
'missedCard': z.object({
|
|
997
|
+
'term': z.string().readonly(),
|
|
998
|
+
'gloss': z.string().readonly(),
|
|
999
|
+
}).readonly().optional().describe('A missed question with no target card: the card to create for it.'),
|
|
1000
|
+
})).readonly(),
|
|
1001
|
+
'ratio': z.number().readonly().describe('Credit over the non-void verdicts — the node\'s unlock input.'),
|
|
1002
|
+
'at': z.string().readonly(),
|
|
1003
|
+
}).readonly(),
|
|
1004
|
+
'cardUpdates': z.array(z.object({
|
|
1005
|
+
'id': z.string().readonly(),
|
|
1006
|
+
'term': z.string().readonly(),
|
|
1007
|
+
'weakness': z.number().readonly(),
|
|
1008
|
+
'mastery': z.object({
|
|
1009
|
+
'box': z.number().readonly(),
|
|
1010
|
+
'dueAt': z.string().readonly(),
|
|
1011
|
+
'streak': z.number().readonly(),
|
|
1012
|
+
}).readonly(),
|
|
1013
|
+
'created': z.boolean().readonly().optional(),
|
|
1014
|
+
})).readonly(),
|
|
1015
|
+
'unlocked': z.array(z.string()).readonly().describe('Nodes that left `locked` because of this attempt.'),
|
|
1016
|
+
'completed': z.string().readonly().optional().describe('The node this assessment gated, when it completed.'),
|
|
1017
|
+
'passRatio': z.number().readonly(),
|
|
1018
|
+
'pointChanges': z.array(z.object({
|
|
1019
|
+
'nodeId': z.string().readonly(),
|
|
1020
|
+
'pointId': z.string().readonly(),
|
|
1021
|
+
'title': z.string().readonly(),
|
|
1022
|
+
'from': z.union([z.literal("mastered"), z.literal("weak"), z.literal("untested"), z.literal("practicing")]).readonly(),
|
|
1023
|
+
'to': z.union([z.literal("mastered"), z.literal("weak"), z.literal("untested"), z.literal("practicing")]).readonly(),
|
|
1024
|
+
})).readonly().optional().describe('Knowledge points whose state this sitting moved.'),
|
|
1025
|
+
})]))
|
|
1026
|
+
let _khorsheed_dsh_library_library_putResource_parameter_0$schema$value
|
|
1027
|
+
const _khorsheed_dsh_library_library_putResource_parameter_0$schema = () => (_khorsheed_dsh_library_library_putResource_parameter_0$schema$value ??= z.object({
|
|
1028
|
+
'projectId': z.string(),
|
|
1029
|
+
'resourceId': z.string().optional(),
|
|
1030
|
+
'title': z.string(),
|
|
1031
|
+
'kind': z.union([z.literal("article"), z.literal("tool"), z.literal("book"), z.literal("video"), z.literal("repo"), z.literal("course"), z.literal("hardware")]),
|
|
1032
|
+
'url': z.string().optional(),
|
|
1033
|
+
'note': z.string().optional(),
|
|
1034
|
+
'origin': z.union([z.literal("learner"), z.literal("picked"), z.literal("authored")]).optional(),
|
|
1035
|
+
'seq': z.number().optional(),
|
|
1036
|
+
'toc': z.array(z.object({
|
|
1037
|
+
'title': z.string(),
|
|
1038
|
+
'part': z.string().optional(),
|
|
1039
|
+
})).optional(),
|
|
1040
|
+
'tocSource': z.object({
|
|
1041
|
+
'by': z.union([z.literal("web"), z.literal("model"), z.literal("photo")]).readonly(),
|
|
1042
|
+
'url': z.string().readonly().optional(),
|
|
1043
|
+
'verifiedAt': z.string().readonly().optional(),
|
|
1044
|
+
}).optional(),
|
|
1045
|
+
'bookKind': z.union([z.literal("material"), z.literal("knowledge")]).optional(),
|
|
1046
|
+
'short': z.string().optional(),
|
|
1047
|
+
'extras': z.array(z.object({
|
|
1048
|
+
'title': z.string(),
|
|
1049
|
+
'note': z.string().optional(),
|
|
1050
|
+
'where': z.string().optional(),
|
|
1051
|
+
'when': z.union([z.literal("reference"), z.literal("before")]).optional(),
|
|
1052
|
+
})).optional(),
|
|
1053
|
+
'author': z.string().optional(),
|
|
1054
|
+
'edition': z.string().optional(),
|
|
1055
|
+
'isbn': z.string().optional(),
|
|
1056
|
+
'from': z.object({
|
|
1057
|
+
'projectId': z.string(),
|
|
1058
|
+
'resourceId': z.string(),
|
|
1059
|
+
}).optional(),
|
|
1060
|
+
}))
|
|
1061
|
+
let _khorsheed_dsh_library_library_putResource_result$schema$value
|
|
1062
|
+
const _khorsheed_dsh_library_library_putResource_result$schema = () => (_khorsheed_dsh_library_library_putResource_result$schema$value ??= z.union([z.object({
|
|
1063
|
+
'ok': z.literal(false).readonly(),
|
|
1064
|
+
'error': z.union([z.literal("not-found"), z.literal("exists"), z.literal("io"), z.literal("unavailable"), z.literal("unbound"), z.literal("invalid"), z.literal("corrupt"), z.literal("storage-unavailable"), z.literal("evidence-gate"), z.literal("state-machine"), z.literal("ref-incomplete")]).readonly(),
|
|
1065
|
+
'message': z.string().readonly().describe('The human/model-readable reason, written to teach the correct call.'),
|
|
1066
|
+
}), z.object({
|
|
1067
|
+
'ok': z.literal(true).readonly(),
|
|
1068
|
+
'resource': z.object({
|
|
1069
|
+
'id': z.string().readonly(),
|
|
1070
|
+
'title': z.string().readonly(),
|
|
1071
|
+
'kind': z.union([z.literal("article"), z.literal("tool"), z.literal("book"), z.literal("video"), z.literal("repo"), z.literal("course"), z.literal("hardware")]).readonly(),
|
|
1072
|
+
'url': z.string().readonly().optional().describe('A thin link\'s address; a thick resource may carry one (the web copy).'),
|
|
1073
|
+
'note': z.string().readonly().optional().describe('The coach\'s one line: why it is on the shelf (「热身站的读物,只看两节」).'),
|
|
1074
|
+
'origin': z.union([z.literal("learner"), z.literal("picked"), z.literal("authored")]).readonly().optional().describe('Where it came from.'),
|
|
1075
|
+
'seq': z.number().readonly().optional().describe('A textbook\'s place in the project\'s study order, 1-based and gapless; thin links carry none.'),
|
|
1076
|
+
'toc': z.array(z.object({
|
|
1077
|
+
'n': z.number().readonly().describe('1-based position — what cover locators count.'),
|
|
1078
|
+
'title': z.string().readonly(),
|
|
1079
|
+
'part': z.string().readonly().optional().describe('The part / test / unit it sits under, when the resource groups chapters.'),
|
|
1080
|
+
})).readonly().optional().describe('The thick/thin switch: present (and non-empty) = thick.'),
|
|
1081
|
+
'tocSource': z.object({
|
|
1082
|
+
'by': z.union([z.literal("web"), z.literal("model"), z.literal("photo")]).readonly(),
|
|
1083
|
+
'url': z.string().readonly().optional(),
|
|
1084
|
+
'verifiedAt': z.string().readonly().optional(),
|
|
1085
|
+
}).readonly().optional(),
|
|
1086
|
+
'meta': z.object({
|
|
1087
|
+
'bookKind': z.union([z.literal("material"), z.literal("knowledge")]).readonly().optional(),
|
|
1088
|
+
'short': z.string().readonly().optional().describe('The cover\'s abbreviation (「剑5」「PNS」); derived from the title when absent.'),
|
|
1089
|
+
'extras': z.array(z.object({
|
|
1090
|
+
'title': z.string().readonly(),
|
|
1091
|
+
'note': z.string().readonly().optional().describe('One line from the coach: what it is for.'),
|
|
1092
|
+
'where': z.string().readonly().optional().describe('Where it is in the resource (「p.152」).'),
|
|
1093
|
+
'when': z.union([z.literal("reference"), z.literal("before")]).readonly(),
|
|
1094
|
+
})).readonly().optional(),
|
|
1095
|
+
'author': z.string().readonly().optional(),
|
|
1096
|
+
'edition': z.string().readonly().optional(),
|
|
1097
|
+
'isbn': z.string().readonly().optional(),
|
|
1098
|
+
}).readonly().optional(),
|
|
1099
|
+
'createdAt': z.string().readonly(),
|
|
1100
|
+
}),
|
|
1101
|
+
})]))
|
|
1102
|
+
let _khorsheed_dsh_library_library_readPagePhoto_parameter_0$schema$value
|
|
1103
|
+
const _khorsheed_dsh_library_library_readPagePhoto_parameter_0$schema = () => (_khorsheed_dsh_library_library_readPagePhoto_parameter_0$schema$value ??= z.object({
|
|
1104
|
+
'projectId': z.string(),
|
|
1105
|
+
'pageId': z.string(),
|
|
1106
|
+
}))
|
|
1107
|
+
let _khorsheed_dsh_library_library_readPagePhoto_result$schema$value
|
|
1108
|
+
const _khorsheed_dsh_library_library_readPagePhoto_result$schema = () => (_khorsheed_dsh_library_library_readPagePhoto_result$schema$value ??= z.union([z.object({
|
|
1109
|
+
'ok': z.literal(false).readonly(),
|
|
1110
|
+
'error': z.union([z.literal("not-found"), z.literal("exists"), z.literal("io"), z.literal("unavailable"), z.literal("unbound"), z.literal("invalid"), z.literal("corrupt"), z.literal("storage-unavailable"), z.literal("evidence-gate"), z.literal("state-machine"), z.literal("ref-incomplete")]).readonly(),
|
|
1111
|
+
'message': z.string().readonly().describe('The human/model-readable reason, written to teach the correct call.'),
|
|
1112
|
+
}), z.object({
|
|
1113
|
+
'ok': z.literal(true).readonly(),
|
|
1114
|
+
'data': z.string(),
|
|
1115
|
+
'mediaType': z.string(),
|
|
1116
|
+
})]))
|
|
1117
|
+
let _khorsheed_dsh_library_library_recentChanges_parameter_0$schema$value
|
|
1118
|
+
const _khorsheed_dsh_library_library_recentChanges_parameter_0$schema = () => (_khorsheed_dsh_library_library_recentChanges_parameter_0$schema$value ??= z.object({
|
|
1119
|
+
'limit': z.number().optional(),
|
|
1120
|
+
}))
|
|
1121
|
+
let _khorsheed_dsh_library_library_recentChanges_result$schema$value
|
|
1122
|
+
const _khorsheed_dsh_library_library_recentChanges_result$schema = () => (_khorsheed_dsh_library_library_recentChanges_result$schema$value ??= z.object({
|
|
1123
|
+
'changes': z.array(z.object({
|
|
1124
|
+
'at': z.string().readonly(),
|
|
1125
|
+
'type': z.union([z.literal("resource.added"), z.literal("roadmap.drafted"), z.literal("roadmap.adopted"), z.literal("page.recorded"), z.literal("cards.recorded"), z.literal("card.edited"), z.literal("quiz.created"), z.literal("attempt.assessed"), z.literal("node.completed"), z.literal("node.unlocked"), z.literal("node.noted"), z.literal("point.changed")]).readonly(),
|
|
1126
|
+
'id': z.string().readonly().optional().describe('The object the event is about (a resource / assessment / node / page id).'),
|
|
1127
|
+
'title': z.string().readonly().optional().describe('Its display name, so a reader needs no join (cards.recorded: the terms).'),
|
|
1128
|
+
'resourceId': z.string().readonly().optional(),
|
|
1129
|
+
'source': z.union([z.literal("manual"), z.literal("photo"), z.literal("quiz"), z.literal("chat")]).readonly().optional().describe('cards.recorded: where they came from (the 「教练最近记下」 filter).'),
|
|
1130
|
+
'session': z.string().readonly().optional().describe('cards.recorded from a chat: the session that noted them (its sidebar toasts them).'),
|
|
1131
|
+
'ids': z.array(z.string()).readonly().optional().describe('cards.recorded: the card ids, so a toast can undo them.'),
|
|
1132
|
+
'count': z.number().readonly().optional().describe('Small numeric summaries (nodes / questions / added / merged).'),
|
|
1133
|
+
'count2': z.number().readonly().optional(),
|
|
1134
|
+
'ratio': z.number().readonly().optional(),
|
|
1135
|
+
'nodeId': z.string().readonly().optional().describe('point.changed: the station and the states.'),
|
|
1136
|
+
'from': z.union([z.literal("mastered"), z.literal("weak"), z.literal("untested"), z.literal("practicing")]).readonly().optional(),
|
|
1137
|
+
'to': z.union([z.literal("mastered"), z.literal("weak"), z.literal("untested"), z.literal("practicing")]).readonly().optional(),
|
|
1138
|
+
'detail': z.string().readonly().optional().describe('point.changed: why, in one line (「2 题待订正」「教练备注:…」).'),
|
|
1139
|
+
'projectId': z.string(),
|
|
1140
|
+
'projectName': z.string(),
|
|
1141
|
+
})),
|
|
1142
|
+
}))
|
|
1143
|
+
let _khorsheed_dsh_library_library_recentRecords_parameter_0$schema$value
|
|
1144
|
+
const _khorsheed_dsh_library_library_recentRecords_parameter_0$schema = () => (_khorsheed_dsh_library_library_recentRecords_parameter_0$schema$value ??= z.object({
|
|
1145
|
+
'limit': z.number().optional(),
|
|
1146
|
+
}))
|
|
1147
|
+
let _khorsheed_dsh_library_library_recentRecords_result$schema$value
|
|
1148
|
+
const _khorsheed_dsh_library_library_recentRecords_result$schema = () => (_khorsheed_dsh_library_library_recentRecords_result$schema$value ??= z.object({
|
|
1149
|
+
'records': z.array(z.object({
|
|
1150
|
+
'at': z.string().readonly(),
|
|
1151
|
+
'type': z.union([z.literal("resource.added"), z.literal("roadmap.drafted"), z.literal("roadmap.adopted"), z.literal("page.recorded"), z.literal("cards.recorded"), z.literal("card.edited"), z.literal("quiz.created"), z.literal("attempt.assessed"), z.literal("node.completed"), z.literal("node.unlocked"), z.literal("node.noted"), z.literal("point.changed")]).readonly(),
|
|
1152
|
+
'id': z.string().readonly().optional().describe('The object the event is about (a resource / assessment / node / page id).'),
|
|
1153
|
+
'title': z.string().readonly().optional().describe('Its display name, so a reader needs no join (cards.recorded: the terms).'),
|
|
1154
|
+
'resourceId': z.string().readonly().optional(),
|
|
1155
|
+
'source': z.union([z.literal("manual"), z.literal("photo"), z.literal("quiz"), z.literal("chat")]).readonly().optional().describe('cards.recorded: where they came from (the 「教练最近记下」 filter).'),
|
|
1156
|
+
'session': z.string().readonly().optional().describe('cards.recorded from a chat: the session that noted them (its sidebar toasts them).'),
|
|
1157
|
+
'ids': z.array(z.string()).readonly().optional().describe('cards.recorded: the card ids, so a toast can undo them.'),
|
|
1158
|
+
'count': z.number().readonly().optional().describe('Small numeric summaries (nodes / questions / added / merged).'),
|
|
1159
|
+
'count2': z.number().readonly().optional(),
|
|
1160
|
+
'ratio': z.number().readonly().optional(),
|
|
1161
|
+
'nodeId': z.string().readonly().optional().describe('point.changed: the station and the states.'),
|
|
1162
|
+
'from': z.union([z.literal("mastered"), z.literal("weak"), z.literal("untested"), z.literal("practicing")]).readonly().optional(),
|
|
1163
|
+
'to': z.union([z.literal("mastered"), z.literal("weak"), z.literal("untested"), z.literal("practicing")]).readonly().optional(),
|
|
1164
|
+
'detail': z.string().readonly().optional().describe('point.changed: why, in one line (「2 题待订正」「教练备注:…」).'),
|
|
1165
|
+
'projectId': z.string(),
|
|
1166
|
+
'projectName': z.string(),
|
|
1167
|
+
})),
|
|
1168
|
+
}))
|
|
1169
|
+
let _khorsheed_dsh_library_library_recordPage_parameter_0$schema$value
|
|
1170
|
+
const _khorsheed_dsh_library_library_recordPage_parameter_0$schema = () => (_khorsheed_dsh_library_library_recordPage_parameter_0$schema$value ??= z.object({
|
|
1171
|
+
'projectId': z.string(),
|
|
1172
|
+
'resourceId': z.string(),
|
|
1173
|
+
'nodeId': z.string().optional(),
|
|
1174
|
+
'label': z.string().optional(),
|
|
1175
|
+
'attachment': z.object({
|
|
1176
|
+
'attachmentId': z.string().readonly(),
|
|
1177
|
+
'mediaType': z.string().readonly(),
|
|
1178
|
+
'bytes': z.number().readonly(),
|
|
1179
|
+
'width': z.number().readonly(),
|
|
1180
|
+
'height': z.number().readonly(),
|
|
1181
|
+
}),
|
|
1182
|
+
'text': z.string(),
|
|
1183
|
+
'marks': z.array(z.object({
|
|
1184
|
+
'text': z.string().readonly().describe('The underlined word / phrase / concept, as printed.'),
|
|
1185
|
+
'sentence': z.string().readonly().optional().describe('The sentence it sits in, as printed.'),
|
|
1186
|
+
'handNote': z.string().readonly().optional().describe('The learner\'s handwritten gloss beside it, transcribed.'),
|
|
1187
|
+
'gloss': z.string().readonly().optional().describe('The recognizer\'s in-context meaning (a word) or one-line explanation (a concept).'),
|
|
1188
|
+
'uncertain': z.boolean().readonly().optional().describe('The recognizer could not tell (a strike-through? a stray line?) — never auto-carded.'),
|
|
1189
|
+
})),
|
|
1190
|
+
}))
|
|
1191
|
+
let _khorsheed_dsh_library_library_recordPage_result$schema$value
|
|
1192
|
+
const _khorsheed_dsh_library_library_recordPage_result$schema = () => (_khorsheed_dsh_library_library_recordPage_result$schema$value ??= z.union([z.object({
|
|
1193
|
+
'ok': z.literal(false).readonly(),
|
|
1194
|
+
'error': z.union([z.literal("not-found"), z.literal("exists"), z.literal("io"), z.literal("unavailable"), z.literal("unbound"), z.literal("invalid"), z.literal("corrupt"), z.literal("storage-unavailable"), z.literal("evidence-gate"), z.literal("state-machine"), z.literal("ref-incomplete")]).readonly(),
|
|
1195
|
+
'message': z.string().readonly().describe('The human/model-readable reason, written to teach the correct call.'),
|
|
1196
|
+
}), z.object({
|
|
1197
|
+
'ok': z.literal(true).readonly(),
|
|
1198
|
+
'page': z.object({
|
|
1199
|
+
'id': z.string().readonly(),
|
|
1200
|
+
'resourceId': z.string().readonly().describe('The thick resource photographed.'),
|
|
1201
|
+
'nodeId': z.string().readonly().optional(),
|
|
1202
|
+
'label': z.string().readonly().optional().describe('What the learner calls it (「p.16」).'),
|
|
1203
|
+
'attachment': z.object({
|
|
1204
|
+
'attachmentId': z.string().readonly(),
|
|
1205
|
+
'mediaType': z.string().readonly(),
|
|
1206
|
+
'bytes': z.number().readonly(),
|
|
1207
|
+
'width': z.number().readonly(),
|
|
1208
|
+
'height': z.number().readonly(),
|
|
1209
|
+
}).readonly(),
|
|
1210
|
+
'text': z.string().readonly().describe('The page\'s recognized printed text — a photo-evidence quote is checked against it.'),
|
|
1211
|
+
'marks': z.array(z.object({
|
|
1212
|
+
'text': z.string().readonly().describe('The underlined word / phrase / concept, as printed.'),
|
|
1213
|
+
'sentence': z.string().readonly().optional().describe('The sentence it sits in, as printed.'),
|
|
1214
|
+
'handNote': z.string().readonly().optional().describe('The learner\'s handwritten gloss beside it, transcribed.'),
|
|
1215
|
+
'gloss': z.string().readonly().optional().describe('The recognizer\'s in-context meaning (a word) or one-line explanation (a concept).'),
|
|
1216
|
+
'uncertain': z.boolean().readonly().optional().describe('The recognizer could not tell (a strike-through? a stray line?) — never auto-carded.'),
|
|
1217
|
+
})).readonly(),
|
|
1218
|
+
'cardIds': z.array(z.string()).readonly().describe('The cards this page\'s marks became or merged into.'),
|
|
1219
|
+
'at': z.string().readonly(),
|
|
1220
|
+
}),
|
|
1221
|
+
'cards': z.object({
|
|
1222
|
+
'added': z.array(z.object({
|
|
1223
|
+
'id': z.string().readonly(),
|
|
1224
|
+
'kind': z.union([z.literal("word"), z.literal("concept")]).readonly(),
|
|
1225
|
+
'term': z.string().readonly(),
|
|
1226
|
+
'aliases': z.array(z.string()).readonly().describe('Other spellings / names the same card answers to (instalments, 不应期).'),
|
|
1227
|
+
'gloss': z.string().readonly().describe('The meaning: the in-context sense for a word, a one-line explanation for a concept.'),
|
|
1228
|
+
'userGloss': z.string().readonly().optional().describe('The learner\'s own handwritten gloss, kept apart from the model\'s.'),
|
|
1229
|
+
'contexts': z.array(z.object({
|
|
1230
|
+
'sentence': z.string().readonly(),
|
|
1231
|
+
'resourceId': z.string().readonly().optional(),
|
|
1232
|
+
'pageId': z.string().readonly().optional(),
|
|
1233
|
+
'nodeId': z.string().readonly().optional(),
|
|
1234
|
+
})).readonly(),
|
|
1235
|
+
'resourceId': z.string().readonly().optional().describe('Hung on a resource when it came from one; absent = project-level (「不挂书」).'),
|
|
1236
|
+
'sources': z.array(z.object({
|
|
1237
|
+
'type': z.union([z.literal("manual"), z.literal("photo"), z.literal("quiz"), z.literal("chat")]).readonly(),
|
|
1238
|
+
'ref': z.string().readonly().optional().describe('photo: the page id; quiz: the assessment id; chat: the session id when known.'),
|
|
1239
|
+
'note': z.string().readonly().optional().describe('What happened, in a few words (「说老是记混」「T/F/NG 第 9 题」).'),
|
|
1240
|
+
'weakened': z.boolean().readonly().optional().describe('This source raised the weakness by one (an undo lowers it back).'),
|
|
1241
|
+
'at': z.string().readonly(),
|
|
1242
|
+
})).readonly(),
|
|
1243
|
+
'weakness': z.number().readonly().describe('0–3: how often the learner got stuck here (asked again, answered wrong).'),
|
|
1244
|
+
'mastery': z.object({
|
|
1245
|
+
'box': z.number().readonly(),
|
|
1246
|
+
'dueAt': z.string().readonly(),
|
|
1247
|
+
'streak': z.number().readonly(),
|
|
1248
|
+
}).readonly(),
|
|
1249
|
+
'status': z.union([z.literal("active"), z.literal("deleted"), z.literal("mastered")]).readonly(),
|
|
1250
|
+
'createdAt': z.string().readonly(),
|
|
1251
|
+
'updatedAt': z.string().readonly(),
|
|
1252
|
+
})).readonly(),
|
|
1253
|
+
'merged': z.array(z.object({
|
|
1254
|
+
'id': z.string().readonly(),
|
|
1255
|
+
'kind': z.union([z.literal("word"), z.literal("concept")]).readonly(),
|
|
1256
|
+
'term': z.string().readonly(),
|
|
1257
|
+
'aliases': z.array(z.string()).readonly().describe('Other spellings / names the same card answers to (instalments, 不应期).'),
|
|
1258
|
+
'gloss': z.string().readonly().describe('The meaning: the in-context sense for a word, a one-line explanation for a concept.'),
|
|
1259
|
+
'userGloss': z.string().readonly().optional().describe('The learner\'s own handwritten gloss, kept apart from the model\'s.'),
|
|
1260
|
+
'contexts': z.array(z.object({
|
|
1261
|
+
'sentence': z.string().readonly(),
|
|
1262
|
+
'resourceId': z.string().readonly().optional(),
|
|
1263
|
+
'pageId': z.string().readonly().optional(),
|
|
1264
|
+
'nodeId': z.string().readonly().optional(),
|
|
1265
|
+
})).readonly(),
|
|
1266
|
+
'resourceId': z.string().readonly().optional().describe('Hung on a resource when it came from one; absent = project-level (「不挂书」).'),
|
|
1267
|
+
'sources': z.array(z.object({
|
|
1268
|
+
'type': z.union([z.literal("manual"), z.literal("photo"), z.literal("quiz"), z.literal("chat")]).readonly(),
|
|
1269
|
+
'ref': z.string().readonly().optional().describe('photo: the page id; quiz: the assessment id; chat: the session id when known.'),
|
|
1270
|
+
'note': z.string().readonly().optional().describe('What happened, in a few words (「说老是记混」「T/F/NG 第 9 题」).'),
|
|
1271
|
+
'weakened': z.boolean().readonly().optional().describe('This source raised the weakness by one (an undo lowers it back).'),
|
|
1272
|
+
'at': z.string().readonly(),
|
|
1273
|
+
})).readonly(),
|
|
1274
|
+
'weakness': z.number().readonly().describe('0–3: how often the learner got stuck here (asked again, answered wrong).'),
|
|
1275
|
+
'mastery': z.object({
|
|
1276
|
+
'box': z.number().readonly(),
|
|
1277
|
+
'dueAt': z.string().readonly(),
|
|
1278
|
+
'streak': z.number().readonly(),
|
|
1279
|
+
}).readonly(),
|
|
1280
|
+
'status': z.union([z.literal("active"), z.literal("deleted"), z.literal("mastered")]).readonly(),
|
|
1281
|
+
'createdAt': z.string().readonly(),
|
|
1282
|
+
'updatedAt': z.string().readonly(),
|
|
1283
|
+
})).readonly(),
|
|
1284
|
+
'pending': z.array(z.object({
|
|
1285
|
+
'index': z.number().readonly(),
|
|
1286
|
+
'term': z.string().readonly(),
|
|
1287
|
+
'candidates': z.array(z.object({
|
|
1288
|
+
'id': z.string().readonly(),
|
|
1289
|
+
'term': z.string().readonly(),
|
|
1290
|
+
'gloss': z.string().readonly(),
|
|
1291
|
+
})).readonly(),
|
|
1292
|
+
})).readonly().describe('Near-duplicates held back — resend each with mergeInto or asNew.'),
|
|
1293
|
+
}),
|
|
1294
|
+
'uncertain': z.array(z.string()),
|
|
1295
|
+
})]))
|
|
1296
|
+
let _khorsheed_dsh_library_library_removeResource_parameter_0$schema$value
|
|
1297
|
+
const _khorsheed_dsh_library_library_removeResource_parameter_0$schema = () => (_khorsheed_dsh_library_library_removeResource_parameter_0$schema$value ??= z.object({
|
|
1298
|
+
'projectId': z.string(),
|
|
1299
|
+
'resourceId': z.string(),
|
|
1300
|
+
}))
|
|
1301
|
+
let _khorsheed_dsh_library_library_removeResource_result$schema$value
|
|
1302
|
+
const _khorsheed_dsh_library_library_removeResource_result$schema = () => (_khorsheed_dsh_library_library_removeResource_result$schema$value ??= z.union([z.object({
|
|
1303
|
+
'ok': z.literal(false).readonly(),
|
|
1304
|
+
'error': z.union([z.literal("not-found"), z.literal("exists"), z.literal("io"), z.literal("unavailable"), z.literal("unbound"), z.literal("invalid"), z.literal("corrupt"), z.literal("storage-unavailable"), z.literal("evidence-gate"), z.literal("state-machine"), z.literal("ref-incomplete")]).readonly(),
|
|
1305
|
+
'message': z.string().readonly().describe('The human/model-readable reason, written to teach the correct call.'),
|
|
1306
|
+
}), z.object({
|
|
1307
|
+
'ok': z.literal(true).readonly(),
|
|
1308
|
+
'id': z.string(),
|
|
1309
|
+
})]))
|
|
1310
|
+
let _khorsheed_dsh_library_library_reviewCard_parameter_0$schema$value
|
|
1311
|
+
const _khorsheed_dsh_library_library_reviewCard_parameter_0$schema = () => (_khorsheed_dsh_library_library_reviewCard_parameter_0$schema$value ??= z.object({
|
|
1312
|
+
'projectId': z.string(),
|
|
1313
|
+
'cardId': z.string(),
|
|
1314
|
+
'rating': z.union([z.literal("forgot"), z.literal("fuzzy"), z.literal("recalled")]),
|
|
1315
|
+
}))
|
|
1316
|
+
let _khorsheed_dsh_library_library_reviewCard_result$schema$value
|
|
1317
|
+
const _khorsheed_dsh_library_library_reviewCard_result$schema = () => (_khorsheed_dsh_library_library_reviewCard_result$schema$value ??= z.union([z.object({
|
|
1318
|
+
'ok': z.literal(false).readonly(),
|
|
1319
|
+
'error': z.union([z.literal("not-found"), z.literal("exists"), z.literal("io"), z.literal("unavailable"), z.literal("unbound"), z.literal("invalid"), z.literal("corrupt"), z.literal("storage-unavailable"), z.literal("evidence-gate"), z.literal("state-machine"), z.literal("ref-incomplete")]).readonly(),
|
|
1320
|
+
'message': z.string().readonly().describe('The human/model-readable reason, written to teach the correct call.'),
|
|
1321
|
+
}), z.object({
|
|
1322
|
+
'ok': z.literal(true).readonly(),
|
|
1323
|
+
'card': z.object({
|
|
1324
|
+
'id': z.string().readonly(),
|
|
1325
|
+
'kind': z.union([z.literal("word"), z.literal("concept")]).readonly(),
|
|
1326
|
+
'term': z.string().readonly(),
|
|
1327
|
+
'aliases': z.array(z.string()).readonly().describe('Other spellings / names the same card answers to (instalments, 不应期).'),
|
|
1328
|
+
'gloss': z.string().readonly().describe('The meaning: the in-context sense for a word, a one-line explanation for a concept.'),
|
|
1329
|
+
'userGloss': z.string().readonly().optional().describe('The learner\'s own handwritten gloss, kept apart from the model\'s.'),
|
|
1330
|
+
'contexts': z.array(z.object({
|
|
1331
|
+
'sentence': z.string().readonly(),
|
|
1332
|
+
'resourceId': z.string().readonly().optional(),
|
|
1333
|
+
'pageId': z.string().readonly().optional(),
|
|
1334
|
+
'nodeId': z.string().readonly().optional(),
|
|
1335
|
+
})).readonly(),
|
|
1336
|
+
'resourceId': z.string().readonly().optional().describe('Hung on a resource when it came from one; absent = project-level (「不挂书」).'),
|
|
1337
|
+
'sources': z.array(z.object({
|
|
1338
|
+
'type': z.union([z.literal("manual"), z.literal("photo"), z.literal("quiz"), z.literal("chat")]).readonly(),
|
|
1339
|
+
'ref': z.string().readonly().optional().describe('photo: the page id; quiz: the assessment id; chat: the session id when known.'),
|
|
1340
|
+
'note': z.string().readonly().optional().describe('What happened, in a few words (「说老是记混」「T/F/NG 第 9 题」).'),
|
|
1341
|
+
'weakened': z.boolean().readonly().optional().describe('This source raised the weakness by one (an undo lowers it back).'),
|
|
1342
|
+
'at': z.string().readonly(),
|
|
1343
|
+
})).readonly(),
|
|
1344
|
+
'weakness': z.number().readonly().describe('0–3: how often the learner got stuck here (asked again, answered wrong).'),
|
|
1345
|
+
'mastery': z.object({
|
|
1346
|
+
'box': z.number().readonly(),
|
|
1347
|
+
'dueAt': z.string().readonly(),
|
|
1348
|
+
'streak': z.number().readonly(),
|
|
1349
|
+
}).readonly(),
|
|
1350
|
+
'status': z.union([z.literal("active"), z.literal("deleted"), z.literal("mastered")]).readonly(),
|
|
1351
|
+
'createdAt': z.string().readonly(),
|
|
1352
|
+
'updatedAt': z.string().readonly(),
|
|
1353
|
+
}),
|
|
1354
|
+
})]))
|
|
1355
|
+
let _khorsheed_dsh_library_library_savePhoto_parameter_0$schema$value
|
|
1356
|
+
const _khorsheed_dsh_library_library_savePhoto_parameter_0$schema = () => (_khorsheed_dsh_library_library_savePhoto_parameter_0$schema$value ??= z.object({
|
|
1357
|
+
'data': z.string(),
|
|
1358
|
+
'mediaType': z.string(),
|
|
1359
|
+
}))
|
|
1360
|
+
let _khorsheed_dsh_library_library_savePhoto_result$schema$value
|
|
1361
|
+
const _khorsheed_dsh_library_library_savePhoto_result$schema = () => (_khorsheed_dsh_library_library_savePhoto_result$schema$value ??= z.union([z.object({
|
|
1362
|
+
'ok': z.literal(false).readonly(),
|
|
1363
|
+
'error': z.union([z.literal("not-found"), z.literal("exists"), z.literal("io"), z.literal("unavailable"), z.literal("unbound"), z.literal("invalid"), z.literal("corrupt"), z.literal("storage-unavailable"), z.literal("evidence-gate"), z.literal("state-machine"), z.literal("ref-incomplete")]).readonly(),
|
|
1364
|
+
'message': z.string().readonly().describe('The human/model-readable reason, written to teach the correct call.'),
|
|
1365
|
+
}), z.object({
|
|
1366
|
+
'ok': z.literal(true).readonly(),
|
|
1367
|
+
'attachment': z.object({
|
|
1368
|
+
'attachmentId': z.string().readonly(),
|
|
1369
|
+
'mediaType': z.string().readonly(),
|
|
1370
|
+
'bytes': z.number().readonly(),
|
|
1371
|
+
'width': z.number().readonly(),
|
|
1372
|
+
'height': z.number().readonly(),
|
|
1373
|
+
}),
|
|
1374
|
+
})]))
|
|
1375
|
+
let _khorsheed_dsh_library_library_setBookKind_parameter_0$schema$value
|
|
1376
|
+
const _khorsheed_dsh_library_library_setBookKind_parameter_0$schema = () => (_khorsheed_dsh_library_library_setBookKind_parameter_0$schema$value ??= z.object({
|
|
1377
|
+
'projectId': z.string(),
|
|
1378
|
+
'resourceId': z.string(),
|
|
1379
|
+
'bookKind': z.union([z.literal("material"), z.literal("knowledge")]),
|
|
1380
|
+
}))
|
|
1381
|
+
let _khorsheed_dsh_library_library_setBookKind_result$schema$value
|
|
1382
|
+
const _khorsheed_dsh_library_library_setBookKind_result$schema = () => (_khorsheed_dsh_library_library_setBookKind_result$schema$value ??= z.union([z.object({
|
|
1383
|
+
'ok': z.literal(false).readonly(),
|
|
1384
|
+
'error': z.union([z.literal("not-found"), z.literal("exists"), z.literal("io"), z.literal("unavailable"), z.literal("unbound"), z.literal("invalid"), z.literal("corrupt"), z.literal("storage-unavailable"), z.literal("evidence-gate"), z.literal("state-machine"), z.literal("ref-incomplete")]).readonly(),
|
|
1385
|
+
'message': z.string().readonly().describe('The human/model-readable reason, written to teach the correct call.'),
|
|
1386
|
+
}), z.object({
|
|
1387
|
+
'ok': z.literal(true).readonly(),
|
|
1388
|
+
'resource': z.object({
|
|
1389
|
+
'id': z.string().readonly(),
|
|
1390
|
+
'title': z.string().readonly(),
|
|
1391
|
+
'kind': z.union([z.literal("article"), z.literal("tool"), z.literal("book"), z.literal("video"), z.literal("repo"), z.literal("course"), z.literal("hardware")]).readonly(),
|
|
1392
|
+
'url': z.string().readonly().optional().describe('A thin link\'s address; a thick resource may carry one (the web copy).'),
|
|
1393
|
+
'note': z.string().readonly().optional().describe('The coach\'s one line: why it is on the shelf (「热身站的读物,只看两节」).'),
|
|
1394
|
+
'origin': z.union([z.literal("learner"), z.literal("picked"), z.literal("authored")]).readonly().optional().describe('Where it came from.'),
|
|
1395
|
+
'seq': z.number().readonly().optional().describe('A textbook\'s place in the project\'s study order, 1-based and gapless; thin links carry none.'),
|
|
1396
|
+
'toc': z.array(z.object({
|
|
1397
|
+
'n': z.number().readonly().describe('1-based position — what cover locators count.'),
|
|
1398
|
+
'title': z.string().readonly(),
|
|
1399
|
+
'part': z.string().readonly().optional().describe('The part / test / unit it sits under, when the resource groups chapters.'),
|
|
1400
|
+
})).readonly().optional().describe('The thick/thin switch: present (and non-empty) = thick.'),
|
|
1401
|
+
'tocSource': z.object({
|
|
1402
|
+
'by': z.union([z.literal("web"), z.literal("model"), z.literal("photo")]).readonly(),
|
|
1403
|
+
'url': z.string().readonly().optional(),
|
|
1404
|
+
'verifiedAt': z.string().readonly().optional(),
|
|
1405
|
+
}).readonly().optional(),
|
|
1406
|
+
'meta': z.object({
|
|
1407
|
+
'bookKind': z.union([z.literal("material"), z.literal("knowledge")]).readonly().optional(),
|
|
1408
|
+
'short': z.string().readonly().optional().describe('The cover\'s abbreviation (「剑5」「PNS」); derived from the title when absent.'),
|
|
1409
|
+
'extras': z.array(z.object({
|
|
1410
|
+
'title': z.string().readonly(),
|
|
1411
|
+
'note': z.string().readonly().optional().describe('One line from the coach: what it is for.'),
|
|
1412
|
+
'where': z.string().readonly().optional().describe('Where it is in the resource (「p.152」).'),
|
|
1413
|
+
'when': z.union([z.literal("reference"), z.literal("before")]).readonly(),
|
|
1414
|
+
})).readonly().optional(),
|
|
1415
|
+
'author': z.string().readonly().optional(),
|
|
1416
|
+
'edition': z.string().readonly().optional(),
|
|
1417
|
+
'isbn': z.string().readonly().optional(),
|
|
1418
|
+
}).readonly().optional(),
|
|
1419
|
+
'createdAt': z.string().readonly(),
|
|
1420
|
+
}),
|
|
1421
|
+
})]))
|
|
1422
|
+
let _khorsheed_dsh_library_library_stats_result$schema$value
|
|
1423
|
+
const _khorsheed_dsh_library_library_stats_result$schema = () => (_khorsheed_dsh_library_library_stats_result$schema$value ??= z.object({
|
|
1424
|
+
'projects': z.number(),
|
|
1425
|
+
'books': z.number(),
|
|
1426
|
+
'cards': z.number(),
|
|
1427
|
+
'due': z.number(),
|
|
1428
|
+
'quizzes': z.number(),
|
|
1429
|
+
'attempts': z.number(),
|
|
1430
|
+
}))
|
|
1431
|
+
let _khorsheed_dsh_library_library_undoCards_parameter_0$schema$value
|
|
1432
|
+
const _khorsheed_dsh_library_library_undoCards_parameter_0$schema = () => (_khorsheed_dsh_library_library_undoCards_parameter_0$schema$value ??= z.object({
|
|
1433
|
+
'projectId': z.string(),
|
|
1434
|
+
'ids': z.array(z.string()),
|
|
1435
|
+
'at': z.string(),
|
|
1436
|
+
}))
|
|
1437
|
+
let _khorsheed_dsh_library_library_undoCards_result$schema$value
|
|
1438
|
+
const _khorsheed_dsh_library_library_undoCards_result$schema = () => (_khorsheed_dsh_library_library_undoCards_result$schema$value ??= z.union([z.object({
|
|
1439
|
+
'ok': z.literal(false).readonly(),
|
|
1440
|
+
'error': z.union([z.literal("not-found"), z.literal("exists"), z.literal("io"), z.literal("unavailable"), z.literal("unbound"), z.literal("invalid"), z.literal("corrupt"), z.literal("storage-unavailable"), z.literal("evidence-gate"), z.literal("state-machine"), z.literal("ref-incomplete")]).readonly(),
|
|
1441
|
+
'message': z.string().readonly().describe('The human/model-readable reason, written to teach the correct call.'),
|
|
1442
|
+
}), z.object({
|
|
1443
|
+
'ok': z.literal(true).readonly(),
|
|
1444
|
+
'removed': z.number(),
|
|
1445
|
+
'reverted': z.number(),
|
|
1446
|
+
})]))
|
|
1447
|
+
let _khorsheed_dsh_library_library_updateProject_parameter_0$schema$value
|
|
1448
|
+
const _khorsheed_dsh_library_library_updateProject_parameter_0$schema = () => (_khorsheed_dsh_library_library_updateProject_parameter_0$schema$value ??= z.object({
|
|
1449
|
+
'id': z.string(),
|
|
1450
|
+
'patch': z.object({
|
|
1451
|
+
'name': z.string().readonly().optional(),
|
|
1452
|
+
'goal': z.string().readonly().optional(),
|
|
1453
|
+
'template': z.union([z.literal("language"), z.literal("subject"), z.literal("custom")]).readonly().optional(),
|
|
1454
|
+
'color': z.union([z.literal("ember"), z.literal("amber"), z.literal("moss"), z.literal("teal"), z.literal("sky"), z.literal("indigo"), z.literal("plum"), z.literal("rose")]).readonly().optional(),
|
|
1455
|
+
'icon': z.union([z.literal("code"), z.literal("book"), z.literal("globe"), z.literal("brain"), z.literal("flask"), z.literal("atom"), z.literal("leaf"), z.literal("pen"), z.literal("music"), z.literal("scale"), z.literal("chart"), z.literal("compass")]).readonly().optional(),
|
|
1456
|
+
}),
|
|
1457
|
+
}))
|
|
1458
|
+
let _khorsheed_dsh_library_library_updateProject_result$schema$value
|
|
1459
|
+
const _khorsheed_dsh_library_library_updateProject_result$schema = () => (_khorsheed_dsh_library_library_updateProject_result$schema$value ??= z.union([z.object({
|
|
1460
|
+
'ok': z.literal(false).readonly(),
|
|
1461
|
+
'error': z.union([z.literal("not-found"), z.literal("exists"), z.literal("io"), z.literal("unavailable"), z.literal("unbound"), z.literal("invalid"), z.literal("corrupt"), z.literal("storage-unavailable"), z.literal("evidence-gate"), z.literal("state-machine"), z.literal("ref-incomplete")]).readonly(),
|
|
1462
|
+
'message': z.string().readonly().describe('The human/model-readable reason, written to teach the correct call.'),
|
|
1463
|
+
}), z.object({
|
|
1464
|
+
'ok': z.literal(true).readonly(),
|
|
1465
|
+
'project': z.object({
|
|
1466
|
+
'id': z.string().readonly(),
|
|
1467
|
+
'name': z.string().readonly(),
|
|
1468
|
+
'template': z.union([z.literal("language"), z.literal("subject"), z.literal("custom")]).readonly(),
|
|
1469
|
+
'color': z.union([z.literal("ember"), z.literal("amber"), z.literal("moss"), z.literal("teal"), z.literal("sky"), z.literal("indigo"), z.literal("plum"), z.literal("rose")]).readonly().optional(),
|
|
1470
|
+
'icon': z.union([z.literal("code"), z.literal("book"), z.literal("globe"), z.literal("brain"), z.literal("flask"), z.literal("atom"), z.literal("leaf"), z.literal("pen"), z.literal("music"), z.literal("scale"), z.literal("chart"), z.literal("compass")]).readonly().optional(),
|
|
1471
|
+
'templateNote': z.string().readonly().optional().describe('The learner\'s own words for a custom template.'),
|
|
1472
|
+
'goal': z.string().readonly().optional().describe('The learner\'s goal (「学术类 7 分,12 月 14 日」).'),
|
|
1473
|
+
'createdAt': z.string().readonly(),
|
|
1474
|
+
}),
|
|
1475
|
+
})]))
|
|
1476
|
+
let _khorsheed_dsh_library_library_writeCards_parameter_0$schema$value
|
|
1477
|
+
const _khorsheed_dsh_library_library_writeCards_parameter_0$schema = () => (_khorsheed_dsh_library_library_writeCards_parameter_0$schema$value ??= z.object({
|
|
1478
|
+
'projectId': z.string(),
|
|
1479
|
+
'resourceId': z.string().optional(),
|
|
1480
|
+
'cards': z.array(z.object({
|
|
1481
|
+
'kind': z.union([z.literal("word"), z.literal("concept")]).readonly(),
|
|
1482
|
+
'term': z.string().readonly(),
|
|
1483
|
+
'aliases': z.array(z.string()).readonly().optional(),
|
|
1484
|
+
'gloss': z.string().readonly(),
|
|
1485
|
+
'userGloss': z.string().readonly().optional(),
|
|
1486
|
+
'context': z.object({
|
|
1487
|
+
'sentence': z.string().readonly(),
|
|
1488
|
+
'pageId': z.string().readonly().optional(),
|
|
1489
|
+
'nodeId': z.string().readonly().optional(),
|
|
1490
|
+
}).readonly().optional(),
|
|
1491
|
+
'source': z.object({
|
|
1492
|
+
'type': z.union([z.literal("manual"), z.literal("photo"), z.literal("quiz"), z.literal("chat")]).readonly(),
|
|
1493
|
+
'ref': z.string().readonly().optional(),
|
|
1494
|
+
'note': z.string().readonly().optional(),
|
|
1495
|
+
}).readonly(),
|
|
1496
|
+
'resourceId': z.string().readonly().optional().describe('Hang it on this resource (defaults to the call\'s resource, when one applies).'),
|
|
1497
|
+
'weaken': z.boolean().readonly().optional().describe('The learner showed they are stuck: raise weakness by one.'),
|
|
1498
|
+
'mergeInto': z.string().readonly().optional().describe('Decide a near-duplicate: merge into this existing card …'),
|
|
1499
|
+
'asNew': z.boolean().readonly().optional().describe('… or keep it as a new card on purpose.'),
|
|
1500
|
+
})),
|
|
1501
|
+
}))
|
|
1502
|
+
let _khorsheed_dsh_library_library_writeCards_result$schema$value
|
|
1503
|
+
const _khorsheed_dsh_library_library_writeCards_result$schema = () => (_khorsheed_dsh_library_library_writeCards_result$schema$value ??= z.union([z.object({
|
|
1504
|
+
'ok': z.literal(false).readonly(),
|
|
1505
|
+
'error': z.union([z.literal("not-found"), z.literal("exists"), z.literal("io"), z.literal("unavailable"), z.literal("unbound"), z.literal("invalid"), z.literal("corrupt"), z.literal("storage-unavailable"), z.literal("evidence-gate"), z.literal("state-machine"), z.literal("ref-incomplete")]).readonly(),
|
|
1506
|
+
'message': z.string().readonly().describe('The human/model-readable reason, written to teach the correct call.'),
|
|
1507
|
+
}), z.object({
|
|
1508
|
+
'ok': z.literal(true).readonly(),
|
|
1509
|
+
'added': z.array(z.object({
|
|
1510
|
+
'id': z.string().readonly(),
|
|
1511
|
+
'kind': z.union([z.literal("word"), z.literal("concept")]).readonly(),
|
|
1512
|
+
'term': z.string().readonly(),
|
|
1513
|
+
'aliases': z.array(z.string()).readonly().describe('Other spellings / names the same card answers to (instalments, 不应期).'),
|
|
1514
|
+
'gloss': z.string().readonly().describe('The meaning: the in-context sense for a word, a one-line explanation for a concept.'),
|
|
1515
|
+
'userGloss': z.string().readonly().optional().describe('The learner\'s own handwritten gloss, kept apart from the model\'s.'),
|
|
1516
|
+
'contexts': z.array(z.object({
|
|
1517
|
+
'sentence': z.string().readonly(),
|
|
1518
|
+
'resourceId': z.string().readonly().optional(),
|
|
1519
|
+
'pageId': z.string().readonly().optional(),
|
|
1520
|
+
'nodeId': z.string().readonly().optional(),
|
|
1521
|
+
})).readonly(),
|
|
1522
|
+
'resourceId': z.string().readonly().optional().describe('Hung on a resource when it came from one; absent = project-level (「不挂书」).'),
|
|
1523
|
+
'sources': z.array(z.object({
|
|
1524
|
+
'type': z.union([z.literal("manual"), z.literal("photo"), z.literal("quiz"), z.literal("chat")]).readonly(),
|
|
1525
|
+
'ref': z.string().readonly().optional().describe('photo: the page id; quiz: the assessment id; chat: the session id when known.'),
|
|
1526
|
+
'note': z.string().readonly().optional().describe('What happened, in a few words (「说老是记混」「T/F/NG 第 9 题」).'),
|
|
1527
|
+
'weakened': z.boolean().readonly().optional().describe('This source raised the weakness by one (an undo lowers it back).'),
|
|
1528
|
+
'at': z.string().readonly(),
|
|
1529
|
+
})).readonly(),
|
|
1530
|
+
'weakness': z.number().readonly().describe('0–3: how often the learner got stuck here (asked again, answered wrong).'),
|
|
1531
|
+
'mastery': z.object({
|
|
1532
|
+
'box': z.number().readonly(),
|
|
1533
|
+
'dueAt': z.string().readonly(),
|
|
1534
|
+
'streak': z.number().readonly(),
|
|
1535
|
+
}).readonly(),
|
|
1536
|
+
'status': z.union([z.literal("active"), z.literal("deleted"), z.literal("mastered")]).readonly(),
|
|
1537
|
+
'createdAt': z.string().readonly(),
|
|
1538
|
+
'updatedAt': z.string().readonly(),
|
|
1539
|
+
})).readonly(),
|
|
1540
|
+
'merged': z.array(z.object({
|
|
1541
|
+
'id': z.string().readonly(),
|
|
1542
|
+
'kind': z.union([z.literal("word"), z.literal("concept")]).readonly(),
|
|
1543
|
+
'term': z.string().readonly(),
|
|
1544
|
+
'aliases': z.array(z.string()).readonly().describe('Other spellings / names the same card answers to (instalments, 不应期).'),
|
|
1545
|
+
'gloss': z.string().readonly().describe('The meaning: the in-context sense for a word, a one-line explanation for a concept.'),
|
|
1546
|
+
'userGloss': z.string().readonly().optional().describe('The learner\'s own handwritten gloss, kept apart from the model\'s.'),
|
|
1547
|
+
'contexts': z.array(z.object({
|
|
1548
|
+
'sentence': z.string().readonly(),
|
|
1549
|
+
'resourceId': z.string().readonly().optional(),
|
|
1550
|
+
'pageId': z.string().readonly().optional(),
|
|
1551
|
+
'nodeId': z.string().readonly().optional(),
|
|
1552
|
+
})).readonly(),
|
|
1553
|
+
'resourceId': z.string().readonly().optional().describe('Hung on a resource when it came from one; absent = project-level (「不挂书」).'),
|
|
1554
|
+
'sources': z.array(z.object({
|
|
1555
|
+
'type': z.union([z.literal("manual"), z.literal("photo"), z.literal("quiz"), z.literal("chat")]).readonly(),
|
|
1556
|
+
'ref': z.string().readonly().optional().describe('photo: the page id; quiz: the assessment id; chat: the session id when known.'),
|
|
1557
|
+
'note': z.string().readonly().optional().describe('What happened, in a few words (「说老是记混」「T/F/NG 第 9 题」).'),
|
|
1558
|
+
'weakened': z.boolean().readonly().optional().describe('This source raised the weakness by one (an undo lowers it back).'),
|
|
1559
|
+
'at': z.string().readonly(),
|
|
1560
|
+
})).readonly(),
|
|
1561
|
+
'weakness': z.number().readonly().describe('0–3: how often the learner got stuck here (asked again, answered wrong).'),
|
|
1562
|
+
'mastery': z.object({
|
|
1563
|
+
'box': z.number().readonly(),
|
|
1564
|
+
'dueAt': z.string().readonly(),
|
|
1565
|
+
'streak': z.number().readonly(),
|
|
1566
|
+
}).readonly(),
|
|
1567
|
+
'status': z.union([z.literal("active"), z.literal("deleted"), z.literal("mastered")]).readonly(),
|
|
1568
|
+
'createdAt': z.string().readonly(),
|
|
1569
|
+
'updatedAt': z.string().readonly(),
|
|
1570
|
+
})).readonly(),
|
|
1571
|
+
'pending': z.array(z.object({
|
|
1572
|
+
'index': z.number().readonly(),
|
|
1573
|
+
'term': z.string().readonly(),
|
|
1574
|
+
'candidates': z.array(z.object({
|
|
1575
|
+
'id': z.string().readonly(),
|
|
1576
|
+
'term': z.string().readonly(),
|
|
1577
|
+
'gloss': z.string().readonly(),
|
|
1578
|
+
})).readonly(),
|
|
1579
|
+
})).readonly().describe('Near-duplicates held back — resend each with mergeInto or asNew.'),
|
|
1580
|
+
})]))
|
|
1581
|
+
let _khorsheed_dsh_library_library_adoptRoadmap_parameter_0_strict$schema$value
|
|
1582
|
+
const _khorsheed_dsh_library_library_adoptRoadmap_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_adoptRoadmap_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1583
|
+
'projectId': z.string(),
|
|
1584
|
+
'resourceId': z.string(),
|
|
1585
|
+
}))
|
|
1586
|
+
let _khorsheed_dsh_library_library_bindTarget_parameter_0_strict$schema$value
|
|
1587
|
+
const _khorsheed_dsh_library_library_bindTarget_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_bindTarget_parameter_0_strict$schema$value ??= z.string())
|
|
1588
|
+
let _khorsheed_dsh_library_library_bindTarget_parameter_1_strict$schema$value
|
|
1589
|
+
const _khorsheed_dsh_library_library_bindTarget_parameter_1_strict$schema = () => (_khorsheed_dsh_library_library_bindTarget_parameter_1_strict$schema$value ??= z.strictObject({
|
|
1590
|
+
'binding': z.union([z.literal(null), z.strictObject({
|
|
1591
|
+
'projectId': z.string().readonly(),
|
|
1592
|
+
'resourceId': z.string().readonly().optional(),
|
|
1593
|
+
'previousProjectId': z.string().readonly().optional().describe('The project this session was bound to before a switch — what was said there is not this project\'s material.'),
|
|
1594
|
+
})]),
|
|
1595
|
+
}))
|
|
1596
|
+
let _khorsheed_dsh_library_library_boundTarget_parameter_0_strict$schema$value
|
|
1597
|
+
const _khorsheed_dsh_library_library_boundTarget_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_boundTarget_parameter_0_strict$schema$value ??= z.string())
|
|
1598
|
+
let _khorsheed_dsh_library_library_createProject_parameter_0_strict$schema$value
|
|
1599
|
+
const _khorsheed_dsh_library_library_createProject_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_createProject_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1600
|
+
'name': z.string(),
|
|
1601
|
+
'template': z.union([z.literal("language"), z.literal("subject"), z.literal("custom")]).optional(),
|
|
1602
|
+
'templateNote': z.string().optional(),
|
|
1603
|
+
'goal': z.string().optional(),
|
|
1604
|
+
'color': z.union([z.literal("ember"), z.literal("amber"), z.literal("moss"), z.literal("teal"), z.literal("sky"), z.literal("indigo"), z.literal("plum"), z.literal("rose")]).optional(),
|
|
1605
|
+
'icon': z.union([z.literal("code"), z.literal("book"), z.literal("globe"), z.literal("brain"), z.literal("flask"), z.literal("atom"), z.literal("leaf"), z.literal("pen"), z.literal("music"), z.literal("scale"), z.literal("chart"), z.literal("compass")]).optional(),
|
|
1606
|
+
}))
|
|
1607
|
+
let _khorsheed_dsh_library_library_createRetake_parameter_0_strict$schema$value
|
|
1608
|
+
const _khorsheed_dsh_library_library_createRetake_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_createRetake_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1609
|
+
'projectId': z.string(),
|
|
1610
|
+
'resourceId': z.string().optional(),
|
|
1611
|
+
'nodeId': z.string().optional(),
|
|
1612
|
+
'keys': z.array(z.string()).optional(),
|
|
1613
|
+
}))
|
|
1614
|
+
let _khorsheed_dsh_library_library_deleteProject_parameter_0_strict$schema$value
|
|
1615
|
+
const _khorsheed_dsh_library_library_deleteProject_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_deleteProject_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1616
|
+
'id': z.string(),
|
|
1617
|
+
}))
|
|
1618
|
+
let _khorsheed_dsh_library_library_discardDraft_parameter_0_strict$schema$value
|
|
1619
|
+
const _khorsheed_dsh_library_library_discardDraft_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_discardDraft_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1620
|
+
'projectId': z.string(),
|
|
1621
|
+
'resourceId': z.string(),
|
|
1622
|
+
}))
|
|
1623
|
+
let _khorsheed_dsh_library_library_dueCards_parameter_0_strict$schema$value
|
|
1624
|
+
const _khorsheed_dsh_library_library_dueCards_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_dueCards_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1625
|
+
'projectId': z.string().optional(),
|
|
1626
|
+
'limit': z.number().optional(),
|
|
1627
|
+
}))
|
|
1628
|
+
let _khorsheed_dsh_library_library_editCard_parameter_0_strict$schema$value
|
|
1629
|
+
const _khorsheed_dsh_library_library_editCard_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_editCard_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1630
|
+
'projectId': z.string(),
|
|
1631
|
+
'cardId': z.string(),
|
|
1632
|
+
'patch': z.strictObject({
|
|
1633
|
+
'term': z.string().optional(),
|
|
1634
|
+
'gloss': z.string().optional(),
|
|
1635
|
+
'userGloss': z.string().optional(),
|
|
1636
|
+
'aliases': z.array(z.string()).optional(),
|
|
1637
|
+
'status': z.union([z.literal("active"), z.literal("deleted"), z.literal("mastered")]).optional(),
|
|
1638
|
+
'resourceId': z.union([z.literal(null), z.string()]).optional(),
|
|
1639
|
+
}),
|
|
1640
|
+
}))
|
|
1641
|
+
let _khorsheed_dsh_library_library_getAssessment_parameter_0_strict$schema$value
|
|
1642
|
+
const _khorsheed_dsh_library_library_getAssessment_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_getAssessment_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1643
|
+
'projectId': z.string(),
|
|
1644
|
+
'assessmentId': z.string(),
|
|
1645
|
+
}))
|
|
1646
|
+
let _khorsheed_dsh_library_library_getProject_parameter_0_strict$schema$value
|
|
1647
|
+
const _khorsheed_dsh_library_library_getProject_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_getProject_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1648
|
+
'id': z.string(),
|
|
1649
|
+
}))
|
|
1650
|
+
let _khorsheed_dsh_library_library_getResource_parameter_0_strict$schema$value
|
|
1651
|
+
const _khorsheed_dsh_library_library_getResource_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_getResource_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1652
|
+
'projectId': z.string(),
|
|
1653
|
+
'resourceId': z.string(),
|
|
1654
|
+
}))
|
|
1655
|
+
let _khorsheed_dsh_library_library_getRoadmap_parameter_0_strict$schema$value
|
|
1656
|
+
const _khorsheed_dsh_library_library_getRoadmap_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_getRoadmap_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1657
|
+
'projectId': z.string(),
|
|
1658
|
+
'resourceId': z.string(),
|
|
1659
|
+
}))
|
|
1660
|
+
let _khorsheed_dsh_library_library_listAssessments_parameter_0_strict$schema$value
|
|
1661
|
+
const _khorsheed_dsh_library_library_listAssessments_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_listAssessments_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1662
|
+
'projectId': z.string(),
|
|
1663
|
+
'resourceId': z.string().optional(),
|
|
1664
|
+
'nodeId': z.string().optional(),
|
|
1665
|
+
'type': z.union([z.literal("quiz"), z.literal("practice")]).optional(),
|
|
1666
|
+
}))
|
|
1667
|
+
let _khorsheed_dsh_library_library_listAttempts_parameter_0_strict$schema$value
|
|
1668
|
+
const _khorsheed_dsh_library_library_listAttempts_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_listAttempts_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1669
|
+
'projectId': z.string(),
|
|
1670
|
+
'nodeId': z.string().optional(),
|
|
1671
|
+
'assessmentId': z.string().optional(),
|
|
1672
|
+
}))
|
|
1673
|
+
let _khorsheed_dsh_library_library_listCards_parameter_0_strict$schema$value
|
|
1674
|
+
const _khorsheed_dsh_library_library_listCards_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_listCards_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1675
|
+
'projectId': z.string().readonly(),
|
|
1676
|
+
'query': z.string().readonly().optional(),
|
|
1677
|
+
'resourceId': z.string().readonly().optional(),
|
|
1678
|
+
'nodeId': z.string().readonly().optional().describe('Cards met in this node (a context or a source page on it).'),
|
|
1679
|
+
'kind': z.union([z.literal("word"), z.literal("concept")]).readonly().optional(),
|
|
1680
|
+
'source': z.union([z.literal("manual"), z.literal("photo"), z.literal("quiz"), z.literal("chat")]).readonly().optional(),
|
|
1681
|
+
'weakMin': z.number().readonly().optional(),
|
|
1682
|
+
'due': z.boolean().readonly().optional(),
|
|
1683
|
+
'includeMastered': z.boolean().readonly().optional().describe('Include mastered cards (default: active only).'),
|
|
1684
|
+
'limit': z.number().readonly().optional(),
|
|
1685
|
+
'sort': z.union([z.literal("recent"), z.literal("weak"), z.literal("due")]).readonly().optional().describe('`weak` (default): weakness, then due date; `recent`: newest first; `due`: due date.'),
|
|
1686
|
+
}))
|
|
1687
|
+
let _khorsheed_dsh_library_library_listEvents_parameter_0_strict$schema$value
|
|
1688
|
+
const _khorsheed_dsh_library_library_listEvents_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_listEvents_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1689
|
+
'projectId': z.string(),
|
|
1690
|
+
'limit': z.number().optional(),
|
|
1691
|
+
'types': z.array(z.union([z.literal("resource.added"), z.literal("roadmap.drafted"), z.literal("roadmap.adopted"), z.literal("page.recorded"), z.literal("cards.recorded"), z.literal("card.edited"), z.literal("quiz.created"), z.literal("attempt.assessed"), z.literal("node.completed"), z.literal("node.unlocked"), z.literal("node.noted"), z.literal("point.changed")])).optional(),
|
|
1692
|
+
}))
|
|
1693
|
+
let _khorsheed_dsh_library_library_listPages_parameter_0_strict$schema$value
|
|
1694
|
+
const _khorsheed_dsh_library_library_listPages_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_listPages_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1695
|
+
'projectId': z.string(),
|
|
1696
|
+
'resourceId': z.string(),
|
|
1697
|
+
'nodeId': z.string().optional(),
|
|
1698
|
+
}))
|
|
1699
|
+
let _khorsheed_dsh_library_library_listResources_parameter_0_strict$schema$value
|
|
1700
|
+
const _khorsheed_dsh_library_library_listResources_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_listResources_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1701
|
+
'projectId': z.string(),
|
|
1702
|
+
}))
|
|
1703
|
+
let _khorsheed_dsh_library_library_markNodeRead_parameter_0_strict$schema$value
|
|
1704
|
+
const _khorsheed_dsh_library_library_markNodeRead_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_markNodeRead_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1705
|
+
'projectId': z.string(),
|
|
1706
|
+
'resourceId': z.string().optional(),
|
|
1707
|
+
'nodeId': z.string(),
|
|
1708
|
+
}))
|
|
1709
|
+
let _khorsheed_dsh_library_library_moveResource_parameter_0_strict$schema$value
|
|
1710
|
+
const _khorsheed_dsh_library_library_moveResource_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_moveResource_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1711
|
+
'projectId': z.string(),
|
|
1712
|
+
'resourceId': z.string(),
|
|
1713
|
+
'seq': z.number(),
|
|
1714
|
+
}))
|
|
1715
|
+
let _khorsheed_dsh_library_library_putAttempt_parameter_0_strict$schema$value
|
|
1716
|
+
const _khorsheed_dsh_library_library_putAttempt_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_putAttempt_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1717
|
+
'projectId': z.string(),
|
|
1718
|
+
'assessmentId': z.string().optional(),
|
|
1719
|
+
'quizId': z.string().optional(),
|
|
1720
|
+
'nodeId': z.string().optional(),
|
|
1721
|
+
'resourceId': z.string().optional(),
|
|
1722
|
+
'verdicts': z.array(z.strictObject({
|
|
1723
|
+
'task': z.string().readonly().describe('The question id or rubric line id this verdict judges.'),
|
|
1724
|
+
'criterion': z.string().readonly(),
|
|
1725
|
+
'pass': z.boolean().readonly(),
|
|
1726
|
+
'ratio': z.number().readonly().optional().describe('Partial credit (defaults to pass ? 1 : 0).'),
|
|
1727
|
+
'evidence': z.string().readonly(),
|
|
1728
|
+
'by': z.union([z.literal("auto"), z.literal("user"), z.literal("self"), z.literal("llm")]).readonly().describe('auto: the machine\'s verdict on a ref acceptance line (never accepted from a caller).'),
|
|
1729
|
+
'void': z.boolean().readonly().optional().describe('The learner flagged the question as broken (「这题有问题」): it counts for nothing.'),
|
|
1730
|
+
'missedCard': z.strictObject({
|
|
1731
|
+
'term': z.string().readonly(),
|
|
1732
|
+
'gloss': z.string().readonly(),
|
|
1733
|
+
}).readonly().optional().describe('A missed question with no target card: the card to create for it.'),
|
|
1734
|
+
})),
|
|
1735
|
+
}))
|
|
1736
|
+
let _khorsheed_dsh_library_library_putResource_parameter_0_strict$schema$value
|
|
1737
|
+
const _khorsheed_dsh_library_library_putResource_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_putResource_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1738
|
+
'projectId': z.string(),
|
|
1739
|
+
'resourceId': z.string().optional(),
|
|
1740
|
+
'title': z.string(),
|
|
1741
|
+
'kind': z.union([z.literal("article"), z.literal("tool"), z.literal("book"), z.literal("video"), z.literal("repo"), z.literal("course"), z.literal("hardware")]),
|
|
1742
|
+
'url': z.string().optional(),
|
|
1743
|
+
'note': z.string().optional(),
|
|
1744
|
+
'origin': z.union([z.literal("learner"), z.literal("picked"), z.literal("authored")]).optional(),
|
|
1745
|
+
'seq': z.number().optional(),
|
|
1746
|
+
'toc': z.array(z.strictObject({
|
|
1747
|
+
'title': z.string(),
|
|
1748
|
+
'part': z.string().optional(),
|
|
1749
|
+
})).optional(),
|
|
1750
|
+
'tocSource': z.strictObject({
|
|
1751
|
+
'by': z.union([z.literal("web"), z.literal("model"), z.literal("photo")]).readonly(),
|
|
1752
|
+
'url': z.string().readonly().optional(),
|
|
1753
|
+
'verifiedAt': z.string().readonly().optional(),
|
|
1754
|
+
}).optional(),
|
|
1755
|
+
'bookKind': z.union([z.literal("material"), z.literal("knowledge")]).optional(),
|
|
1756
|
+
'short': z.string().optional(),
|
|
1757
|
+
'extras': z.array(z.strictObject({
|
|
1758
|
+
'title': z.string(),
|
|
1759
|
+
'note': z.string().optional(),
|
|
1760
|
+
'where': z.string().optional(),
|
|
1761
|
+
'when': z.union([z.literal("reference"), z.literal("before")]).optional(),
|
|
1762
|
+
})).optional(),
|
|
1763
|
+
'author': z.string().optional(),
|
|
1764
|
+
'edition': z.string().optional(),
|
|
1765
|
+
'isbn': z.string().optional(),
|
|
1766
|
+
'from': z.strictObject({
|
|
1767
|
+
'projectId': z.string(),
|
|
1768
|
+
'resourceId': z.string(),
|
|
1769
|
+
}).optional(),
|
|
1770
|
+
}))
|
|
1771
|
+
let _khorsheed_dsh_library_library_readPagePhoto_parameter_0_strict$schema$value
|
|
1772
|
+
const _khorsheed_dsh_library_library_readPagePhoto_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_readPagePhoto_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1773
|
+
'projectId': z.string(),
|
|
1774
|
+
'pageId': z.string(),
|
|
1775
|
+
}))
|
|
1776
|
+
let _khorsheed_dsh_library_library_recentChanges_parameter_0_strict$schema$value
|
|
1777
|
+
const _khorsheed_dsh_library_library_recentChanges_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_recentChanges_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1778
|
+
'limit': z.number().optional(),
|
|
1779
|
+
}))
|
|
1780
|
+
let _khorsheed_dsh_library_library_recentRecords_parameter_0_strict$schema$value
|
|
1781
|
+
const _khorsheed_dsh_library_library_recentRecords_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_recentRecords_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1782
|
+
'limit': z.number().optional(),
|
|
1783
|
+
}))
|
|
1784
|
+
let _khorsheed_dsh_library_library_recordPage_parameter_0_strict$schema$value
|
|
1785
|
+
const _khorsheed_dsh_library_library_recordPage_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_recordPage_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1786
|
+
'projectId': z.string(),
|
|
1787
|
+
'resourceId': z.string(),
|
|
1788
|
+
'nodeId': z.string().optional(),
|
|
1789
|
+
'label': z.string().optional(),
|
|
1790
|
+
'attachment': z.strictObject({
|
|
1791
|
+
'attachmentId': z.string().readonly(),
|
|
1792
|
+
'mediaType': z.string().readonly(),
|
|
1793
|
+
'bytes': z.number().readonly(),
|
|
1794
|
+
'width': z.number().readonly(),
|
|
1795
|
+
'height': z.number().readonly(),
|
|
1796
|
+
}),
|
|
1797
|
+
'text': z.string(),
|
|
1798
|
+
'marks': z.array(z.strictObject({
|
|
1799
|
+
'text': z.string().readonly().describe('The underlined word / phrase / concept, as printed.'),
|
|
1800
|
+
'sentence': z.string().readonly().optional().describe('The sentence it sits in, as printed.'),
|
|
1801
|
+
'handNote': z.string().readonly().optional().describe('The learner\'s handwritten gloss beside it, transcribed.'),
|
|
1802
|
+
'gloss': z.string().readonly().optional().describe('The recognizer\'s in-context meaning (a word) or one-line explanation (a concept).'),
|
|
1803
|
+
'uncertain': z.boolean().readonly().optional().describe('The recognizer could not tell (a strike-through? a stray line?) — never auto-carded.'),
|
|
1804
|
+
})),
|
|
1805
|
+
}))
|
|
1806
|
+
let _khorsheed_dsh_library_library_removeResource_parameter_0_strict$schema$value
|
|
1807
|
+
const _khorsheed_dsh_library_library_removeResource_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_removeResource_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1808
|
+
'projectId': z.string(),
|
|
1809
|
+
'resourceId': z.string(),
|
|
1810
|
+
}))
|
|
1811
|
+
let _khorsheed_dsh_library_library_reviewCard_parameter_0_strict$schema$value
|
|
1812
|
+
const _khorsheed_dsh_library_library_reviewCard_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_reviewCard_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1813
|
+
'projectId': z.string(),
|
|
1814
|
+
'cardId': z.string(),
|
|
1815
|
+
'rating': z.union([z.literal("forgot"), z.literal("fuzzy"), z.literal("recalled")]),
|
|
1816
|
+
}))
|
|
1817
|
+
let _khorsheed_dsh_library_library_savePhoto_parameter_0_strict$schema$value
|
|
1818
|
+
const _khorsheed_dsh_library_library_savePhoto_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_savePhoto_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1819
|
+
'data': z.string(),
|
|
1820
|
+
'mediaType': z.string(),
|
|
1821
|
+
}))
|
|
1822
|
+
let _khorsheed_dsh_library_library_setBookKind_parameter_0_strict$schema$value
|
|
1823
|
+
const _khorsheed_dsh_library_library_setBookKind_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_setBookKind_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1824
|
+
'projectId': z.string(),
|
|
1825
|
+
'resourceId': z.string(),
|
|
1826
|
+
'bookKind': z.union([z.literal("material"), z.literal("knowledge")]),
|
|
1827
|
+
}))
|
|
1828
|
+
let _khorsheed_dsh_library_library_undoCards_parameter_0_strict$schema$value
|
|
1829
|
+
const _khorsheed_dsh_library_library_undoCards_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_undoCards_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1830
|
+
'projectId': z.string(),
|
|
1831
|
+
'ids': z.array(z.string()),
|
|
1832
|
+
'at': z.string(),
|
|
1833
|
+
}))
|
|
1834
|
+
let _khorsheed_dsh_library_library_updateProject_parameter_0_strict$schema$value
|
|
1835
|
+
const _khorsheed_dsh_library_library_updateProject_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_updateProject_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1836
|
+
'id': z.string(),
|
|
1837
|
+
'patch': z.strictObject({
|
|
1838
|
+
'name': z.string().readonly().optional(),
|
|
1839
|
+
'goal': z.string().readonly().optional(),
|
|
1840
|
+
'template': z.union([z.literal("language"), z.literal("subject"), z.literal("custom")]).readonly().optional(),
|
|
1841
|
+
'color': z.union([z.literal("ember"), z.literal("amber"), z.literal("moss"), z.literal("teal"), z.literal("sky"), z.literal("indigo"), z.literal("plum"), z.literal("rose")]).readonly().optional(),
|
|
1842
|
+
'icon': z.union([z.literal("code"), z.literal("book"), z.literal("globe"), z.literal("brain"), z.literal("flask"), z.literal("atom"), z.literal("leaf"), z.literal("pen"), z.literal("music"), z.literal("scale"), z.literal("chart"), z.literal("compass")]).readonly().optional(),
|
|
1843
|
+
}),
|
|
1844
|
+
}))
|
|
1845
|
+
let _khorsheed_dsh_library_library_writeCards_parameter_0_strict$schema$value
|
|
1846
|
+
const _khorsheed_dsh_library_library_writeCards_parameter_0_strict$schema = () => (_khorsheed_dsh_library_library_writeCards_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1847
|
+
'projectId': z.string(),
|
|
1848
|
+
'resourceId': z.string().optional(),
|
|
1849
|
+
'cards': z.array(z.strictObject({
|
|
1850
|
+
'kind': z.union([z.literal("word"), z.literal("concept")]).readonly(),
|
|
1851
|
+
'term': z.string().readonly(),
|
|
1852
|
+
'aliases': z.array(z.string()).readonly().optional(),
|
|
1853
|
+
'gloss': z.string().readonly(),
|
|
1854
|
+
'userGloss': z.string().readonly().optional(),
|
|
1855
|
+
'context': z.strictObject({
|
|
1856
|
+
'sentence': z.string().readonly(),
|
|
1857
|
+
'pageId': z.string().readonly().optional(),
|
|
1858
|
+
'nodeId': z.string().readonly().optional(),
|
|
1859
|
+
}).readonly().optional(),
|
|
1860
|
+
'source': z.strictObject({
|
|
1861
|
+
'type': z.union([z.literal("manual"), z.literal("photo"), z.literal("quiz"), z.literal("chat")]).readonly(),
|
|
1862
|
+
'ref': z.string().readonly().optional(),
|
|
1863
|
+
'note': z.string().readonly().optional(),
|
|
1864
|
+
}).readonly(),
|
|
1865
|
+
'resourceId': z.string().readonly().optional().describe('Hang it on this resource (defaults to the call\'s resource, when one applies).'),
|
|
1866
|
+
'weaken': z.boolean().readonly().optional().describe('The learner showed they are stuck: raise weakness by one.'),
|
|
1867
|
+
'mergeInto': z.string().readonly().optional().describe('Decide a near-duplicate: merge into this existing card …'),
|
|
1868
|
+
'asNew': z.boolean().readonly().optional().describe('… or keep it as a new card on purpose.'),
|
|
1869
|
+
})),
|
|
1870
|
+
}))
|
|
1871
|
+
|
|
1872
|
+
const $remote = createTypertRemoteInfo({
|
|
1873
|
+
package: '@khorsheed/dsh-library',
|
|
1874
|
+
methods: {
|
|
1875
|
+
'library/adoptRoadmap': {
|
|
1876
|
+
service: 'libraryRemote',
|
|
1877
|
+
description: 'The learner\'s 采用.',
|
|
1878
|
+
invocation: { kind: 'direct' },
|
|
1879
|
+
parameters: [
|
|
1880
|
+
{
|
|
1881
|
+
name: 'request',
|
|
1882
|
+
source: 'json',
|
|
1883
|
+
codec: {
|
|
1884
|
+
mode: 'strict',
|
|
1885
|
+
typeSymbol: '@khorsheed/dsh-library#library/adoptRoadmap:request',
|
|
1886
|
+
create: _khorsheed_dsh_library_library_adoptRoadmap_parameter_0$schema,
|
|
1887
|
+
schema: _khorsheed_dsh_library_library_adoptRoadmap_parameter_0$schema(),
|
|
1888
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"}},"required":["projectId","resourceId"],"additionalProperties":true},
|
|
1889
|
+
},
|
|
1890
|
+
strictCodec: {
|
|
1891
|
+
mode: 'strict',
|
|
1892
|
+
typeSymbol: '@khorsheed/dsh-library#library/adoptRoadmap:request',
|
|
1893
|
+
create: _khorsheed_dsh_library_library_adoptRoadmap_parameter_0_strict$schema,
|
|
1894
|
+
schema: _khorsheed_dsh_library_library_adoptRoadmap_parameter_0_strict$schema(),
|
|
1895
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"}},"required":["projectId","resourceId"],"additionalProperties":false},
|
|
1896
|
+
},
|
|
1897
|
+
},
|
|
1898
|
+
],
|
|
1899
|
+
result: {
|
|
1900
|
+
mode: 'strict',
|
|
1901
|
+
typeSymbol: '@khorsheed/dsh-library/types#LibraryOutcome',
|
|
1902
|
+
create: _khorsheed_dsh_library_library_adoptRoadmap_result$schema,
|
|
1903
|
+
schema: _khorsheed_dsh_library_library_adoptRoadmap_result$schema(),
|
|
1904
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","enum":["not-found","exists","io","unavailable","unbound","invalid","corrupt","storage-unavailable","evidence-gate","state-machine","ref-incomplete"]},"message":{"type":"string","description":"The human/model-readable reason, written to teach the correct call."}},"required":["ok","error","message"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"roadmap":{"type":"object","properties":{"primaryResourceId":{"type":"string","description":"The textbook whose path this is. Always present on anything written since the book-paths cut; a legacy project-level path (absent) is never read back."},"status":{"type":"string","enum":["draft","adopted"]},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"goals":{"type":"array","items":{"type":"string"},"description":"What the learner should be able to do after this node."},"dependsOn":{"type":"array","items":{"type":"string"},"description":"Node ids that must be `done` before this one may leave `locked`."},"covers":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string"},"locator":{"type":"string","description":"The contents rows drawn on (\"1-5,7\") — thick resources only."},"title":{"type":"string","description":"A url cover's display title."},"by":{"type":"string","enum":["web","model","user"],"description":"web: fetched and checked; model: from the coach's memory, unverified; user: the learner gave it."},"verifiedAt":{"type":"string"}},"required":["ref"],"additionalProperties":true},"description":"What the station draws on — at least one cover."},"state":{"type":"string","enum":["current","done","locked"]},"gate":{"type":"string","enum":["read","quiz","acceptance"],"description":"How the node completes: quiz | acceptance | read."},"quizStats":{"type":"object","properties":{"attempts":{"type":"number"},"lastRatio":{"type":"number"},"bestRatio":{"type":"number"}},"required":["attempts"],"additionalProperties":true,"description":"Quiz-gated nodes only — a read / acceptance node never carries one."},"points":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable slug (letters, digits, . _ -) — the mastery key."},"title":{"type":"string","description":"The point as the learner reads it (「极限的定义」)."},"notes":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"term":{"type":"string","description":"The short name of the confusion, when the coach gave one (「反函数 vs 倒数」)."},"at":{"type":"string"},"session":{"type":"string","description":"The session it came from."}},"required":["text","at"],"additionalProperties":true},"description":"What the coach noticed the learner stuck on here (a subject project's weak point lands on its point, not on a card)."}},"required":["id","title"],"additionalProperties":true},"description":"Quiz-gated nodes only: the station's knowledge points (3-6), drafted with the roadmap and reviewed at adoption. Quiz questions reference them by id."},"acceptance":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"object","properties":{"line":{"type":"string"},"ref":{"type":"string"}},"required":["line"],"additionalProperties":true}]},"description":"Acceptance nodes only: the rubric lines as authored (the draft's and the display's source of truth; adoption materializes them into the node's practice assessment)."},"notes":{"type":"object","properties":{"text":{"type":"string","description":"Markdown body."},"updatedAt":{"type":"string"},"revisions":{"type":"number","description":"1-based — the Nth version (「第 N 次更新」)."}},"required":["text","updatedAt","revisions"],"additionalProperties":true,"description":"The station's 讲义, once the coach has taught it."}},"required":["id","title","goals","dependsOn","covers","state","gate"],"additionalProperties":true}},"passRatio":{"type":"number","description":"The pass threshold (default {@link DEFAULT_PASS_RATIO})."},"note":{"type":"string","description":"The coach's one-line pacing note on the draft card (「每周 3 章,约 4 周」)."},"generatedAt":{"type":"string"},"adoptedAt":{"type":"string"}},"required":["status","nodes","generatedAt"],"additionalProperties":true}},"required":["ok","roadmap"],"additionalProperties":true}]},
|
|
1905
|
+
},
|
|
1906
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":180,"column":3},
|
|
1907
|
+
},
|
|
1908
|
+
'library/bindTarget': {
|
|
1909
|
+
service: 'libraryRemote',
|
|
1910
|
+
description: 'Bind the calling session to a project / resource (null unbinds).',
|
|
1911
|
+
invocation: { kind: 'direct' },
|
|
1912
|
+
parameters: [
|
|
1913
|
+
{
|
|
1914
|
+
name: 'sessionId',
|
|
1915
|
+
source: 'json',
|
|
1916
|
+
codec: {
|
|
1917
|
+
mode: 'strict',
|
|
1918
|
+
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
1919
|
+
create: _khorsheed_dsh_library_library_bindTarget_parameter_0$schema,
|
|
1920
|
+
schema: _khorsheed_dsh_library_library_bindTarget_parameter_0$schema(),
|
|
1921
|
+
jsonSchema: {"type":"string"},
|
|
1922
|
+
},
|
|
1923
|
+
strictCodec: {
|
|
1924
|
+
mode: 'strict',
|
|
1925
|
+
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
1926
|
+
create: _khorsheed_dsh_library_library_bindTarget_parameter_0_strict$schema,
|
|
1927
|
+
schema: _khorsheed_dsh_library_library_bindTarget_parameter_0_strict$schema(),
|
|
1928
|
+
jsonSchema: {"type":"string"},
|
|
1929
|
+
},
|
|
1930
|
+
},
|
|
1931
|
+
{
|
|
1932
|
+
name: 'request',
|
|
1933
|
+
source: 'json',
|
|
1934
|
+
codec: {
|
|
1935
|
+
mode: 'strict',
|
|
1936
|
+
typeSymbol: '@khorsheed/dsh-library#library/bindTarget:request',
|
|
1937
|
+
create: _khorsheed_dsh_library_library_bindTarget_parameter_1$schema,
|
|
1938
|
+
schema: _khorsheed_dsh_library_library_bindTarget_parameter_1$schema(),
|
|
1939
|
+
jsonSchema: {"type":"object","properties":{"binding":{"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"},"previousProjectId":{"type":"string","description":"The project this session was bound to before a switch — what was said there is not this project's material."}},"required":["projectId"],"additionalProperties":true}]}},"required":["binding"],"additionalProperties":true},
|
|
1940
|
+
},
|
|
1941
|
+
strictCodec: {
|
|
1942
|
+
mode: 'strict',
|
|
1943
|
+
typeSymbol: '@khorsheed/dsh-library#library/bindTarget:request',
|
|
1944
|
+
create: _khorsheed_dsh_library_library_bindTarget_parameter_1_strict$schema,
|
|
1945
|
+
schema: _khorsheed_dsh_library_library_bindTarget_parameter_1_strict$schema(),
|
|
1946
|
+
jsonSchema: {"type":"object","properties":{"binding":{"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"},"previousProjectId":{"type":"string","description":"The project this session was bound to before a switch — what was said there is not this project's material."}},"required":["projectId"],"additionalProperties":false}]}},"required":["binding"],"additionalProperties":false},
|
|
1947
|
+
},
|
|
1948
|
+
},
|
|
1949
|
+
],
|
|
1950
|
+
result: {
|
|
1951
|
+
mode: 'strict',
|
|
1952
|
+
typeSymbol: '@khorsheed/dsh-library/types#LibraryOutcome',
|
|
1953
|
+
create: _khorsheed_dsh_library_library_bindTarget_result$schema,
|
|
1954
|
+
schema: _khorsheed_dsh_library_library_bindTarget_result$schema(),
|
|
1955
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","enum":["not-found","exists","io","unavailable","unbound","invalid","corrupt","storage-unavailable","evidence-gate","state-machine","ref-incomplete"]},"message":{"type":"string","description":"The human/model-readable reason, written to teach the correct call."}},"required":["ok","error","message"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"binding":{"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"},"previousProjectId":{"type":"string","description":"The project this session was bound to before a switch — what was said there is not this project's material."}},"required":["projectId"],"additionalProperties":true}]}},"required":["ok","binding"],"additionalProperties":true}]},
|
|
1956
|
+
},
|
|
1957
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":308,"column":3},
|
|
1958
|
+
},
|
|
1959
|
+
'library/boundTarget': {
|
|
1960
|
+
service: 'libraryRemote',
|
|
1961
|
+
description: 'The calling session\'s binding, or null.',
|
|
1962
|
+
invocation: { kind: 'direct' },
|
|
1963
|
+
parameters: [
|
|
1964
|
+
{
|
|
1965
|
+
name: 'sessionId',
|
|
1966
|
+
source: 'json',
|
|
1967
|
+
codec: {
|
|
1968
|
+
mode: 'strict',
|
|
1969
|
+
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
1970
|
+
create: _khorsheed_dsh_library_library_boundTarget_parameter_0$schema,
|
|
1971
|
+
schema: _khorsheed_dsh_library_library_boundTarget_parameter_0$schema(),
|
|
1972
|
+
jsonSchema: {"type":"string"},
|
|
1973
|
+
},
|
|
1974
|
+
strictCodec: {
|
|
1975
|
+
mode: 'strict',
|
|
1976
|
+
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
1977
|
+
create: _khorsheed_dsh_library_library_boundTarget_parameter_0_strict$schema,
|
|
1978
|
+
schema: _khorsheed_dsh_library_library_boundTarget_parameter_0_strict$schema(),
|
|
1979
|
+
jsonSchema: {"type":"string"},
|
|
1980
|
+
},
|
|
1981
|
+
},
|
|
1982
|
+
],
|
|
1983
|
+
result: {
|
|
1984
|
+
mode: 'strict',
|
|
1985
|
+
typeSymbol: '@khorsheed/dsh-library#library/boundTarget:result',
|
|
1986
|
+
create: _khorsheed_dsh_library_library_boundTarget_result$schema,
|
|
1987
|
+
schema: _khorsheed_dsh_library_library_boundTarget_result$schema(),
|
|
1988
|
+
jsonSchema: {"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"},"previousProjectId":{"type":"string","description":"The project this session was bound to before a switch — what was said there is not this project's material."}},"required":["projectId"],"additionalProperties":true}]},
|
|
1989
|
+
},
|
|
1990
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":302,"column":9},
|
|
1991
|
+
},
|
|
1992
|
+
'library/capabilities': {
|
|
1993
|
+
service: 'libraryRemote',
|
|
1994
|
+
description: 'What this composition can do: storage and attachments, with the reason — the display contract.',
|
|
1995
|
+
invocation: { kind: 'direct' },
|
|
1996
|
+
parameters: [
|
|
1997
|
+
],
|
|
1998
|
+
result: {
|
|
1999
|
+
mode: 'strict',
|
|
2000
|
+
typeSymbol: '@khorsheed/dsh-library/types#LibraryCapabilities',
|
|
2001
|
+
create: _khorsheed_dsh_library_library_capabilities_result$schema,
|
|
2002
|
+
schema: _khorsheed_dsh_library_library_capabilities_result$schema(),
|
|
2003
|
+
jsonSchema: {"type":"object","properties":{"protocolVersion":{"type":"number","const":1},"hasStorage":{"type":"boolean","description":"Whether the state root accepts writes; when false every write refuses `storage-unavailable`."},"storageUnavailableReason":{"type":"string","description":"Why persistence is unavailable, when it is (the store's probe message)."},"hasAttachments":{"type":"boolean","description":"Whether an attachment store is mounted on the Context; when false the image routes refuse `unavailable`."}},"required":["protocolVersion","hasStorage","hasAttachments"],"additionalProperties":true},
|
|
2004
|
+
},
|
|
2005
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":78,"column":3},
|
|
2006
|
+
},
|
|
2007
|
+
'library/createProject': {
|
|
2008
|
+
service: 'libraryRemote',
|
|
2009
|
+
description: 'Create a project.',
|
|
2010
|
+
invocation: { kind: 'direct' },
|
|
2011
|
+
parameters: [
|
|
2012
|
+
{
|
|
2013
|
+
name: 'request',
|
|
2014
|
+
source: 'json',
|
|
2015
|
+
codec: {
|
|
2016
|
+
mode: 'strict',
|
|
2017
|
+
typeSymbol: '@khorsheed/dsh-library#library/createProject:request',
|
|
2018
|
+
create: _khorsheed_dsh_library_library_createProject_parameter_0$schema,
|
|
2019
|
+
schema: _khorsheed_dsh_library_library_createProject_parameter_0$schema(),
|
|
2020
|
+
jsonSchema: {"type":"object","properties":{"name":{"type":"string"},"template":{"type":"string","enum":["language","subject","custom"]},"templateNote":{"type":"string"},"goal":{"type":"string"},"color":{"type":"string","enum":["ember","amber","moss","teal","sky","indigo","plum","rose"]},"icon":{"type":"string","enum":["code","book","globe","brain","flask","atom","leaf","pen","music","scale","chart","compass"]}},"required":["name"],"additionalProperties":true},
|
|
2021
|
+
},
|
|
2022
|
+
strictCodec: {
|
|
2023
|
+
mode: 'strict',
|
|
2024
|
+
typeSymbol: '@khorsheed/dsh-library#library/createProject:request',
|
|
2025
|
+
create: _khorsheed_dsh_library_library_createProject_parameter_0_strict$schema,
|
|
2026
|
+
schema: _khorsheed_dsh_library_library_createProject_parameter_0_strict$schema(),
|
|
2027
|
+
jsonSchema: {"type":"object","properties":{"name":{"type":"string"},"template":{"type":"string","enum":["language","subject","custom"]},"templateNote":{"type":"string"},"goal":{"type":"string"},"color":{"type":"string","enum":["ember","amber","moss","teal","sky","indigo","plum","rose"]},"icon":{"type":"string","enum":["code","book","globe","brain","flask","atom","leaf","pen","music","scale","chart","compass"]}},"required":["name"],"additionalProperties":false},
|
|
2028
|
+
},
|
|
2029
|
+
},
|
|
2030
|
+
],
|
|
2031
|
+
result: {
|
|
2032
|
+
mode: 'strict',
|
|
2033
|
+
typeSymbol: '@khorsheed/dsh-library/types#LibraryOutcome',
|
|
2034
|
+
create: _khorsheed_dsh_library_library_createProject_result$schema,
|
|
2035
|
+
schema: _khorsheed_dsh_library_library_createProject_result$schema(),
|
|
2036
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","enum":["not-found","exists","io","unavailable","unbound","invalid","corrupt","storage-unavailable","evidence-gate","state-machine","ref-incomplete"]},"message":{"type":"string","description":"The human/model-readable reason, written to teach the correct call."}},"required":["ok","error","message"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"project":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"template":{"type":"string","enum":["language","subject","custom"]},"color":{"type":"string","enum":["ember","amber","moss","teal","sky","indigo","plum","rose"]},"icon":{"type":"string","enum":["code","book","globe","brain","flask","atom","leaf","pen","music","scale","chart","compass"]},"templateNote":{"type":"string","description":"The learner's own words for a custom template."},"goal":{"type":"string","description":"The learner's goal (「学术类 7 分,12 月 14 日」)."},"createdAt":{"type":"string"}},"required":["id","name","template","createdAt"],"additionalProperties":true}},"required":["ok","project"],"additionalProperties":true}]},
|
|
2037
|
+
},
|
|
2038
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":98,"column":3},
|
|
2039
|
+
},
|
|
2040
|
+
'library/createRetake': {
|
|
2041
|
+
service: 'libraryRemote',
|
|
2042
|
+
description: '订正: a retake paper over a station\'s open misses (all, or the keys named).',
|
|
2043
|
+
invocation: { kind: 'direct' },
|
|
2044
|
+
parameters: [
|
|
2045
|
+
{
|
|
2046
|
+
name: 'request',
|
|
2047
|
+
source: 'json',
|
|
2048
|
+
codec: {
|
|
2049
|
+
mode: 'strict',
|
|
2050
|
+
typeSymbol: '@khorsheed/dsh-library#library/createRetake:request',
|
|
2051
|
+
create: _khorsheed_dsh_library_library_createRetake_parameter_0$schema,
|
|
2052
|
+
schema: _khorsheed_dsh_library_library_createRetake_parameter_0$schema(),
|
|
2053
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"},"nodeId":{"type":"string"},"keys":{"type":"array","items":{"type":"string"}}},"required":["projectId"],"additionalProperties":true},
|
|
2054
|
+
},
|
|
2055
|
+
strictCodec: {
|
|
2056
|
+
mode: 'strict',
|
|
2057
|
+
typeSymbol: '@khorsheed/dsh-library#library/createRetake:request',
|
|
2058
|
+
create: _khorsheed_dsh_library_library_createRetake_parameter_0_strict$schema,
|
|
2059
|
+
schema: _khorsheed_dsh_library_library_createRetake_parameter_0_strict$schema(),
|
|
2060
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"},"nodeId":{"type":"string"},"keys":{"type":"array","items":{"type":"string"}}},"required":["projectId"],"additionalProperties":false},
|
|
2061
|
+
},
|
|
2062
|
+
},
|
|
2063
|
+
],
|
|
2064
|
+
result: {
|
|
2065
|
+
mode: 'strict',
|
|
2066
|
+
typeSymbol: '@khorsheed/dsh-library/types#LibraryOutcome',
|
|
2067
|
+
create: _khorsheed_dsh_library_library_createRetake_result$schema,
|
|
2068
|
+
schema: _khorsheed_dsh_library_library_createRetake_result$schema(),
|
|
2069
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","enum":["not-found","exists","io","unavailable","unbound","invalid","corrupt","storage-unavailable","evidence-gate","state-machine","ref-incomplete"]},"message":{"type":"string","description":"The human/model-readable reason, written to teach the correct call."}},"required":["ok","error","message"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"assessment":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["quiz","practice","retake"],"description":"quiz: a paper; practice: an acceptance rubric; retake: a station's open misses, re-asked (never counts toward passing)."},"scope":{"type":"object","properties":{"nodeId":{"type":"string","description":"The roadmap node this assessment gates, when it is a node assessment."},"resourceId":{"type":"string","description":"The resource whose content is quizzed; absent + nodeId present = a project-path station, both absent = free practice."}},"required":[],"additionalProperties":true},"focus":{"type":"string","enum":["mixed","book","mine"],"description":"quiz: the learner's chosen source (absent on assessments stored before the choice existed = mixed)."},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["choice","fill","free"],"description":"`choice` carries options; `fill` / `free` are open answers."},"prompt":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"answer":{"type":"string"},"explanation":{"type":"string","description":"Why the answer is right — shown after answering."},"point":{"type":"string","description":"The gated station's point this question probes (a point id) — required once the station carries points; mastery aggregates by it."},"origin":{"type":"object","properties":{"assessmentId":{"type":"string"},"questionId":{"type":"string"}},"required":["assessmentId","questionId"],"additionalProperties":true,"description":"retake papers: the question this one re-asks."},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["marked","asked","missed","topic"]},"cardIds":{"type":"array","items":{"type":"string"},"description":"The cards it probes (required for marked / asked / missed)."}},"required":["kind"],"additionalProperties":true},"evidence":{"type":"object","properties":{"kind":{"type":"string","enum":["web","photo","knowledge"]},"pageId":{"type":"string","description":"photo: the page whose text holds the quote."},"url":{"type":"string","description":"web: where the quote is from."},"quote":{"type":"string","description":"photo / web: the passage, verbatim."}},"required":["kind"],"additionalProperties":true}},"required":["id","kind","prompt","answer","target","evidence"],"additionalProperties":true},"description":"quiz: the questions."},"rubric":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable id: L + 1-based position — verdicts name it, so a replan rewording the line never orphans history."},"line":{"type":"string"},"ref":{"type":"string","description":"The assessment that machine-checks this line."}},"required":["id","line"],"additionalProperties":true},"description":"practice: the materialized rubric (stable line ids)."},"supersededBy":{"type":"string","description":"The assessment that replaced this one (a station's newer paper)."},"createdAt":{"type":"string"}},"required":["id","type","scope","createdAt"],"additionalProperties":true}},"required":["ok","assessment"],"additionalProperties":true}]},
|
|
2070
|
+
},
|
|
2071
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":329,"column":3},
|
|
2072
|
+
},
|
|
2073
|
+
'library/deleteProject': {
|
|
2074
|
+
service: 'libraryRemote',
|
|
2075
|
+
description: 'Delete a project and everything it holds.',
|
|
2076
|
+
invocation: { kind: 'direct' },
|
|
2077
|
+
parameters: [
|
|
2078
|
+
{
|
|
2079
|
+
name: 'request',
|
|
2080
|
+
source: 'json',
|
|
2081
|
+
codec: {
|
|
2082
|
+
mode: 'strict',
|
|
2083
|
+
typeSymbol: '@khorsheed/dsh-library#library/deleteProject:request',
|
|
2084
|
+
create: _khorsheed_dsh_library_library_deleteProject_parameter_0$schema,
|
|
2085
|
+
schema: _khorsheed_dsh_library_library_deleteProject_parameter_0$schema(),
|
|
2086
|
+
jsonSchema: {"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":true},
|
|
2087
|
+
},
|
|
2088
|
+
strictCodec: {
|
|
2089
|
+
mode: 'strict',
|
|
2090
|
+
typeSymbol: '@khorsheed/dsh-library#library/deleteProject:request',
|
|
2091
|
+
create: _khorsheed_dsh_library_library_deleteProject_parameter_0_strict$schema,
|
|
2092
|
+
schema: _khorsheed_dsh_library_library_deleteProject_parameter_0_strict$schema(),
|
|
2093
|
+
jsonSchema: {"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},
|
|
2094
|
+
},
|
|
2095
|
+
},
|
|
2096
|
+
],
|
|
2097
|
+
result: {
|
|
2098
|
+
mode: 'strict',
|
|
2099
|
+
typeSymbol: '@khorsheed/dsh-library/types#LibraryOutcome',
|
|
2100
|
+
create: _khorsheed_dsh_library_library_deleteProject_result$schema,
|
|
2101
|
+
schema: _khorsheed_dsh_library_library_deleteProject_result$schema(),
|
|
2102
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","enum":["not-found","exists","io","unavailable","unbound","invalid","corrupt","storage-unavailable","evidence-gate","state-machine","ref-incomplete"]},"message":{"type":"string","description":"The human/model-readable reason, written to teach the correct call."}},"required":["ok","error","message"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"id":{"type":"string"}},"required":["ok","id"],"additionalProperties":true}]},
|
|
2103
|
+
},
|
|
2104
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":110,"column":3},
|
|
2105
|
+
},
|
|
2106
|
+
'library/discardDraft': {
|
|
2107
|
+
service: 'libraryRemote',
|
|
2108
|
+
description: 'Drop a draft.',
|
|
2109
|
+
invocation: { kind: 'direct' },
|
|
2110
|
+
parameters: [
|
|
2111
|
+
{
|
|
2112
|
+
name: 'request',
|
|
2113
|
+
source: 'json',
|
|
2114
|
+
codec: {
|
|
2115
|
+
mode: 'strict',
|
|
2116
|
+
typeSymbol: '@khorsheed/dsh-library#library/discardDraft:request',
|
|
2117
|
+
create: _khorsheed_dsh_library_library_discardDraft_parameter_0$schema,
|
|
2118
|
+
schema: _khorsheed_dsh_library_library_discardDraft_parameter_0$schema(),
|
|
2119
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"}},"required":["projectId","resourceId"],"additionalProperties":true},
|
|
2120
|
+
},
|
|
2121
|
+
strictCodec: {
|
|
2122
|
+
mode: 'strict',
|
|
2123
|
+
typeSymbol: '@khorsheed/dsh-library#library/discardDraft:request',
|
|
2124
|
+
create: _khorsheed_dsh_library_library_discardDraft_parameter_0_strict$schema,
|
|
2125
|
+
schema: _khorsheed_dsh_library_library_discardDraft_parameter_0_strict$schema(),
|
|
2126
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"}},"required":["projectId","resourceId"],"additionalProperties":false},
|
|
2127
|
+
},
|
|
2128
|
+
},
|
|
2129
|
+
],
|
|
2130
|
+
result: {
|
|
2131
|
+
mode: 'strict',
|
|
2132
|
+
typeSymbol: '@khorsheed/dsh-library/types#LibraryOutcome',
|
|
2133
|
+
create: _khorsheed_dsh_library_library_discardDraft_result$schema,
|
|
2134
|
+
schema: _khorsheed_dsh_library_library_discardDraft_result$schema(),
|
|
2135
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","enum":["not-found","exists","io","unavailable","unbound","invalid","corrupt","storage-unavailable","evidence-gate","state-machine","ref-incomplete"]},"message":{"type":"string","description":"The human/model-readable reason, written to teach the correct call."}},"required":["ok","error","message"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"resourceId":{"type":"string"}},"required":["ok","resourceId"],"additionalProperties":true}]},
|
|
2136
|
+
},
|
|
2137
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":186,"column":3},
|
|
2138
|
+
},
|
|
2139
|
+
'library/dueCards': {
|
|
2140
|
+
service: 'libraryRemote',
|
|
2141
|
+
description: 'Due cards across projects (or one).',
|
|
2142
|
+
invocation: { kind: 'direct' },
|
|
2143
|
+
parameters: [
|
|
2144
|
+
{
|
|
2145
|
+
name: 'request',
|
|
2146
|
+
source: 'json',
|
|
2147
|
+
codec: {
|
|
2148
|
+
mode: 'strict',
|
|
2149
|
+
typeSymbol: '@khorsheed/dsh-library#library/dueCards:request',
|
|
2150
|
+
create: _khorsheed_dsh_library_library_dueCards_parameter_0$schema,
|
|
2151
|
+
schema: _khorsheed_dsh_library_library_dueCards_parameter_0$schema(),
|
|
2152
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"limit":{"type":"number"}},"required":[],"additionalProperties":true},
|
|
2153
|
+
},
|
|
2154
|
+
strictCodec: {
|
|
2155
|
+
mode: 'strict',
|
|
2156
|
+
typeSymbol: '@khorsheed/dsh-library#library/dueCards:request',
|
|
2157
|
+
create: _khorsheed_dsh_library_library_dueCards_parameter_0_strict$schema,
|
|
2158
|
+
schema: _khorsheed_dsh_library_library_dueCards_parameter_0_strict$schema(),
|
|
2159
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"limit":{"type":"number"}},"required":[],"additionalProperties":false},
|
|
2160
|
+
},
|
|
2161
|
+
},
|
|
2162
|
+
],
|
|
2163
|
+
result: {
|
|
2164
|
+
mode: 'strict',
|
|
2165
|
+
typeSymbol: '@khorsheed/dsh-library#library/dueCards:result',
|
|
2166
|
+
create: _khorsheed_dsh_library_library_dueCards_result$schema,
|
|
2167
|
+
schema: _khorsheed_dsh_library_library_dueCards_result$schema(),
|
|
2168
|
+
jsonSchema: {"type":"object","properties":{"cards":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["word","concept"]},"term":{"type":"string"},"aliases":{"type":"array","items":{"type":"string"},"description":"Other spellings / names the same card answers to (instalments, 不应期)."},"gloss":{"type":"string","description":"The meaning: the in-context sense for a word, a one-line explanation for a concept."},"userGloss":{"type":"string","description":"The learner's own handwritten gloss, kept apart from the model's."},"contexts":{"type":"array","items":{"type":"object","properties":{"sentence":{"type":"string"},"resourceId":{"type":"string"},"pageId":{"type":"string"},"nodeId":{"type":"string"}},"required":["sentence"],"additionalProperties":true}},"resourceId":{"type":"string","description":"Hung on a resource when it came from one; absent = project-level (「不挂书」)."},"sources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["manual","photo","quiz","chat"]},"ref":{"type":"string","description":"photo: the page id; quiz: the assessment id; chat: the session id when known."},"note":{"type":"string","description":"What happened, in a few words (「说老是记混」「T/F/NG 第 9 题」)."},"weakened":{"type":"boolean","description":"This source raised the weakness by one (an undo lowers it back)."},"at":{"type":"string"}},"required":["type","at"],"additionalProperties":true}},"weakness":{"type":"number","description":"0–3: how often the learner got stuck here (asked again, answered wrong)."},"mastery":{"type":"object","properties":{"box":{"type":"number"},"dueAt":{"type":"string"},"streak":{"type":"number"}},"required":["box","dueAt","streak"],"additionalProperties":true},"status":{"type":"string","enum":["active","deleted","mastered"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"projectId":{"type":"string"}},"required":["id","kind","term","aliases","gloss","contexts","sources","weakness","mastery","status","createdAt","updatedAt","projectId"],"additionalProperties":true}}},"required":["cards"],"additionalProperties":true},
|
|
2169
|
+
},
|
|
2170
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":240,"column":3},
|
|
2171
|
+
},
|
|
2172
|
+
'library/editCard': {
|
|
2173
|
+
service: 'libraryRemote',
|
|
2174
|
+
description: 'Edit one card.',
|
|
2175
|
+
invocation: { kind: 'direct' },
|
|
2176
|
+
parameters: [
|
|
2177
|
+
{
|
|
2178
|
+
name: 'request',
|
|
2179
|
+
source: 'json',
|
|
2180
|
+
codec: {
|
|
2181
|
+
mode: 'strict',
|
|
2182
|
+
typeSymbol: '@khorsheed/dsh-library#library/editCard:request',
|
|
2183
|
+
create: _khorsheed_dsh_library_library_editCard_parameter_0$schema,
|
|
2184
|
+
schema: _khorsheed_dsh_library_library_editCard_parameter_0$schema(),
|
|
2185
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"cardId":{"type":"string"},"patch":{"type":"object","properties":{"term":{"type":"string"},"gloss":{"type":"string"},"userGloss":{"type":"string"},"aliases":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","deleted","mastered"]},"resourceId":{"oneOf":[{"type":"null","const":null},{"type":"string"}]}},"required":[],"additionalProperties":true}},"required":["projectId","cardId","patch"],"additionalProperties":true},
|
|
2186
|
+
},
|
|
2187
|
+
strictCodec: {
|
|
2188
|
+
mode: 'strict',
|
|
2189
|
+
typeSymbol: '@khorsheed/dsh-library#library/editCard:request',
|
|
2190
|
+
create: _khorsheed_dsh_library_library_editCard_parameter_0_strict$schema,
|
|
2191
|
+
schema: _khorsheed_dsh_library_library_editCard_parameter_0_strict$schema(),
|
|
2192
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"cardId":{"type":"string"},"patch":{"type":"object","properties":{"term":{"type":"string"},"gloss":{"type":"string"},"userGloss":{"type":"string"},"aliases":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","deleted","mastered"]},"resourceId":{"oneOf":[{"type":"null","const":null},{"type":"string"}]}},"required":[],"additionalProperties":false}},"required":["projectId","cardId","patch"],"additionalProperties":false},
|
|
2193
|
+
},
|
|
2194
|
+
},
|
|
2195
|
+
],
|
|
2196
|
+
result: {
|
|
2197
|
+
mode: 'strict',
|
|
2198
|
+
typeSymbol: '@khorsheed/dsh-library/types#LibraryOutcome',
|
|
2199
|
+
create: _khorsheed_dsh_library_library_editCard_result$schema,
|
|
2200
|
+
schema: _khorsheed_dsh_library_library_editCard_result$schema(),
|
|
2201
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","enum":["not-found","exists","io","unavailable","unbound","invalid","corrupt","storage-unavailable","evidence-gate","state-machine","ref-incomplete"]},"message":{"type":"string","description":"The human/model-readable reason, written to teach the correct call."}},"required":["ok","error","message"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"card":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["word","concept"]},"term":{"type":"string"},"aliases":{"type":"array","items":{"type":"string"},"description":"Other spellings / names the same card answers to (instalments, 不应期)."},"gloss":{"type":"string","description":"The meaning: the in-context sense for a word, a one-line explanation for a concept."},"userGloss":{"type":"string","description":"The learner's own handwritten gloss, kept apart from the model's."},"contexts":{"type":"array","items":{"type":"object","properties":{"sentence":{"type":"string"},"resourceId":{"type":"string"},"pageId":{"type":"string"},"nodeId":{"type":"string"}},"required":["sentence"],"additionalProperties":true}},"resourceId":{"type":"string","description":"Hung on a resource when it came from one; absent = project-level (「不挂书」)."},"sources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["manual","photo","quiz","chat"]},"ref":{"type":"string","description":"photo: the page id; quiz: the assessment id; chat: the session id when known."},"note":{"type":"string","description":"What happened, in a few words (「说老是记混」「T/F/NG 第 9 题」)."},"weakened":{"type":"boolean","description":"This source raised the weakness by one (an undo lowers it back)."},"at":{"type":"string"}},"required":["type","at"],"additionalProperties":true}},"weakness":{"type":"number","description":"0–3: how often the learner got stuck here (asked again, answered wrong)."},"mastery":{"type":"object","properties":{"box":{"type":"number"},"dueAt":{"type":"string"},"streak":{"type":"number"}},"required":["box","dueAt","streak"],"additionalProperties":true},"status":{"type":"string","enum":["active","deleted","mastered"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","kind","term","aliases","gloss","contexts","sources","weakness","mastery","status","createdAt","updatedAt"],"additionalProperties":true}},"required":["ok","card"],"additionalProperties":true}]},
|
|
2202
|
+
},
|
|
2203
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":252,"column":3},
|
|
2204
|
+
},
|
|
2205
|
+
'library/getAssessment': {
|
|
2206
|
+
service: 'libraryRemote',
|
|
2207
|
+
description: 'One assessment, whole.',
|
|
2208
|
+
invocation: { kind: 'direct' },
|
|
2209
|
+
parameters: [
|
|
2210
|
+
{
|
|
2211
|
+
name: 'request',
|
|
2212
|
+
source: 'json',
|
|
2213
|
+
codec: {
|
|
2214
|
+
mode: 'strict',
|
|
2215
|
+
typeSymbol: '@khorsheed/dsh-library#library/getAssessment:request',
|
|
2216
|
+
create: _khorsheed_dsh_library_library_getAssessment_parameter_0$schema,
|
|
2217
|
+
schema: _khorsheed_dsh_library_library_getAssessment_parameter_0$schema(),
|
|
2218
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"assessmentId":{"type":"string"}},"required":["projectId","assessmentId"],"additionalProperties":true},
|
|
2219
|
+
},
|
|
2220
|
+
strictCodec: {
|
|
2221
|
+
mode: 'strict',
|
|
2222
|
+
typeSymbol: '@khorsheed/dsh-library#library/getAssessment:request',
|
|
2223
|
+
create: _khorsheed_dsh_library_library_getAssessment_parameter_0_strict$schema,
|
|
2224
|
+
schema: _khorsheed_dsh_library_library_getAssessment_parameter_0_strict$schema(),
|
|
2225
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"assessmentId":{"type":"string"}},"required":["projectId","assessmentId"],"additionalProperties":false},
|
|
2226
|
+
},
|
|
2227
|
+
},
|
|
2228
|
+
],
|
|
2229
|
+
result: {
|
|
2230
|
+
mode: 'strict',
|
|
2231
|
+
typeSymbol: '@khorsheed/dsh-library/types#LibraryOutcome',
|
|
2232
|
+
create: _khorsheed_dsh_library_library_getAssessment_result$schema,
|
|
2233
|
+
schema: _khorsheed_dsh_library_library_getAssessment_result$schema(),
|
|
2234
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","enum":["not-found","exists","io","unavailable","unbound","invalid","corrupt","storage-unavailable","evidence-gate","state-machine","ref-incomplete"]},"message":{"type":"string","description":"The human/model-readable reason, written to teach the correct call."}},"required":["ok","error","message"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"assessment":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["quiz","practice","retake"],"description":"quiz: a paper; practice: an acceptance rubric; retake: a station's open misses, re-asked (never counts toward passing)."},"scope":{"type":"object","properties":{"nodeId":{"type":"string","description":"The roadmap node this assessment gates, when it is a node assessment."},"resourceId":{"type":"string","description":"The resource whose content is quizzed; absent + nodeId present = a project-path station, both absent = free practice."}},"required":[],"additionalProperties":true},"focus":{"type":"string","enum":["mixed","book","mine"],"description":"quiz: the learner's chosen source (absent on assessments stored before the choice existed = mixed)."},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["choice","fill","free"],"description":"`choice` carries options; `fill` / `free` are open answers."},"prompt":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"answer":{"type":"string"},"explanation":{"type":"string","description":"Why the answer is right — shown after answering."},"point":{"type":"string","description":"The gated station's point this question probes (a point id) — required once the station carries points; mastery aggregates by it."},"origin":{"type":"object","properties":{"assessmentId":{"type":"string"},"questionId":{"type":"string"}},"required":["assessmentId","questionId"],"additionalProperties":true,"description":"retake papers: the question this one re-asks."},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["marked","asked","missed","topic"]},"cardIds":{"type":"array","items":{"type":"string"},"description":"The cards it probes (required for marked / asked / missed)."}},"required":["kind"],"additionalProperties":true},"evidence":{"type":"object","properties":{"kind":{"type":"string","enum":["web","photo","knowledge"]},"pageId":{"type":"string","description":"photo: the page whose text holds the quote."},"url":{"type":"string","description":"web: where the quote is from."},"quote":{"type":"string","description":"photo / web: the passage, verbatim."}},"required":["kind"],"additionalProperties":true}},"required":["id","kind","prompt","answer","target","evidence"],"additionalProperties":true},"description":"quiz: the questions."},"rubric":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable id: L + 1-based position — verdicts name it, so a replan rewording the line never orphans history."},"line":{"type":"string"},"ref":{"type":"string","description":"The assessment that machine-checks this line."}},"required":["id","line"],"additionalProperties":true},"description":"practice: the materialized rubric (stable line ids)."},"supersededBy":{"type":"string","description":"The assessment that replaced this one (a station's newer paper)."},"createdAt":{"type":"string"}},"required":["id","type","scope","createdAt"],"additionalProperties":true}},"required":["ok","assessment"],"additionalProperties":true}]},
|
|
2235
|
+
},
|
|
2236
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":282,"column":3},
|
|
2237
|
+
},
|
|
2238
|
+
'library/getProject': {
|
|
2239
|
+
service: 'libraryRemote',
|
|
2240
|
+
description: 'One project\'s summary plus its resources.',
|
|
2241
|
+
invocation: { kind: 'direct' },
|
|
2242
|
+
parameters: [
|
|
2243
|
+
{
|
|
2244
|
+
name: 'request',
|
|
2245
|
+
source: 'json',
|
|
2246
|
+
codec: {
|
|
2247
|
+
mode: 'strict',
|
|
2248
|
+
typeSymbol: '@khorsheed/dsh-library#library/getProject:request',
|
|
2249
|
+
create: _khorsheed_dsh_library_library_getProject_parameter_0$schema,
|
|
2250
|
+
schema: _khorsheed_dsh_library_library_getProject_parameter_0$schema(),
|
|
2251
|
+
jsonSchema: {"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":true},
|
|
2252
|
+
},
|
|
2253
|
+
strictCodec: {
|
|
2254
|
+
mode: 'strict',
|
|
2255
|
+
typeSymbol: '@khorsheed/dsh-library#library/getProject:request',
|
|
2256
|
+
create: _khorsheed_dsh_library_library_getProject_parameter_0_strict$schema,
|
|
2257
|
+
schema: _khorsheed_dsh_library_library_getProject_parameter_0_strict$schema(),
|
|
2258
|
+
jsonSchema: {"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},
|
|
2259
|
+
},
|
|
2260
|
+
},
|
|
2261
|
+
],
|
|
2262
|
+
result: {
|
|
2263
|
+
mode: 'strict',
|
|
2264
|
+
typeSymbol: '@khorsheed/dsh-library/types#LibraryOutcome',
|
|
2265
|
+
create: _khorsheed_dsh_library_library_getProject_result$schema,
|
|
2266
|
+
schema: _khorsheed_dsh_library_library_getProject_result$schema(),
|
|
2267
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","enum":["not-found","exists","io","unavailable","unbound","invalid","corrupt","storage-unavailable","evidence-gate","state-machine","ref-incomplete"]},"message":{"type":"string","description":"The human/model-readable reason, written to teach the correct call."}},"required":["ok","error","message"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"project":{"type":"object","properties":{"resources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["article","tool","book","video","repo","course","hardware"]},"seq":{"type":"number","description":"A textbook's place in the study order (1-based); absent on a thin link."},"origin":{"type":"string","enum":["learner","picked","authored"],"description":"Where the entry came from."},"roadmap":{"type":"object","properties":{"done":{"type":"number"},"total":{"type":"number"}},"required":["done","total"],"additionalProperties":true,"description":"Adopted-roadmap progress; only a thick resource (toc) can carry one."},"current":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":true,"description":"The first current node, when one is in progress."},"hasDraft":{"type":"boolean","description":"A draft is waiting for the learner's 采用."},"draftTotal":{"type":"number","description":"The waiting draft's station count."}},"required":["id","title","kind","hasDraft"],"additionalProperties":true},"description":"Every shelf entry (thick and thin) with its progress."},"cardCount":{"type":"number","description":"Live cards (not deleted)."},"dueCount":{"type":"number","description":"Live, unmastered cards due for review right now."},"lastActiveAt":{"type":"string","description":"When anything last happened in the project (its newest event, else its creation) — the list sorts by it."},"openMisses":{"type":"number","description":"Open misses (待订正) across every station of the project's textbooks."},"id":{"type":"string"},"name":{"type":"string"},"template":{"type":"string","enum":["language","subject","custom"]},"color":{"type":"string","enum":["ember","amber","moss","teal","sky","indigo","plum","rose"]},"icon":{"type":"string","enum":["code","book","globe","brain","flask","atom","leaf","pen","music","scale","chart","compass"]},"templateNote":{"type":"string","description":"The learner's own words for a custom template."},"goal":{"type":"string","description":"The learner's goal (「学术类 7 分,12 月 14 日」)."},"createdAt":{"type":"string"}},"required":["resources","cardCount","dueCount","lastActiveAt","id","name","template","createdAt"],"additionalProperties":true},"resources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["article","tool","book","video","repo","course","hardware"]},"url":{"type":"string","description":"A thin link's address; a thick resource may carry one (the web copy)."},"note":{"type":"string","description":"The coach's one line: why it is on the shelf (「热身站的读物,只看两节」)."},"origin":{"type":"string","enum":["learner","picked","authored"],"description":"Where it came from."},"seq":{"type":"number","description":"A textbook's place in the project's study order, 1-based and gapless; thin links carry none."},"toc":{"type":"array","items":{"type":"object","properties":{"n":{"type":"number","description":"1-based position — what cover locators count."},"title":{"type":"string"},"part":{"type":"string","description":"The part / test / unit it sits under, when the resource groups chapters."}},"required":["n","title"],"additionalProperties":true},"description":"The thick/thin switch: present (and non-empty) = thick."},"tocSource":{"type":"object","properties":{"by":{"type":"string","enum":["web","model","photo"]},"url":{"type":"string"},"verifiedAt":{"type":"string"}},"required":["by"],"additionalProperties":true},"meta":{"type":"object","properties":{"bookKind":{"type":"string","enum":["material","knowledge"]},"short":{"type":"string","description":"The cover's abbreviation (「剑5」「PNS」); derived from the title when absent."},"extras":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"note":{"type":"string","description":"One line from the coach: what it is for."},"where":{"type":"string","description":"Where it is in the resource (「p.152」)."},"when":{"type":"string","enum":["reference","before"]}},"required":["title","when"],"additionalProperties":true}},"author":{"type":"string"},"edition":{"type":"string"},"isbn":{"type":"string"}},"required":[],"additionalProperties":true},"createdAt":{"type":"string"}},"required":["id","title","kind","createdAt"],"additionalProperties":true}}},"required":["ok","project","resources"],"additionalProperties":true}]},
|
|
2268
|
+
},
|
|
2269
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":92,"column":3},
|
|
2270
|
+
},
|
|
2271
|
+
'library/getResource': {
|
|
2272
|
+
service: 'libraryRemote',
|
|
2273
|
+
description: 'One shelf entry, whole.',
|
|
2274
|
+
invocation: { kind: 'direct' },
|
|
2275
|
+
parameters: [
|
|
2276
|
+
{
|
|
2277
|
+
name: 'request',
|
|
2278
|
+
source: 'json',
|
|
2279
|
+
codec: {
|
|
2280
|
+
mode: 'strict',
|
|
2281
|
+
typeSymbol: '@khorsheed/dsh-library#library/getResource:request',
|
|
2282
|
+
create: _khorsheed_dsh_library_library_getResource_parameter_0$schema,
|
|
2283
|
+
schema: _khorsheed_dsh_library_library_getResource_parameter_0$schema(),
|
|
2284
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"}},"required":["projectId","resourceId"],"additionalProperties":true},
|
|
2285
|
+
},
|
|
2286
|
+
strictCodec: {
|
|
2287
|
+
mode: 'strict',
|
|
2288
|
+
typeSymbol: '@khorsheed/dsh-library#library/getResource:request',
|
|
2289
|
+
create: _khorsheed_dsh_library_library_getResource_parameter_0_strict$schema,
|
|
2290
|
+
schema: _khorsheed_dsh_library_library_getResource_parameter_0_strict$schema(),
|
|
2291
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"}},"required":["projectId","resourceId"],"additionalProperties":false},
|
|
2292
|
+
},
|
|
2293
|
+
},
|
|
2294
|
+
],
|
|
2295
|
+
result: {
|
|
2296
|
+
mode: 'strict',
|
|
2297
|
+
typeSymbol: '@khorsheed/dsh-library/types#LibraryOutcome',
|
|
2298
|
+
create: _khorsheed_dsh_library_library_getResource_result$schema,
|
|
2299
|
+
schema: _khorsheed_dsh_library_library_getResource_result$schema(),
|
|
2300
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","enum":["not-found","exists","io","unavailable","unbound","invalid","corrupt","storage-unavailable","evidence-gate","state-machine","ref-incomplete"]},"message":{"type":"string","description":"The human/model-readable reason, written to teach the correct call."}},"required":["ok","error","message"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"resource":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["article","tool","book","video","repo","course","hardware"]},"url":{"type":"string","description":"A thin link's address; a thick resource may carry one (the web copy)."},"note":{"type":"string","description":"The coach's one line: why it is on the shelf (「热身站的读物,只看两节」)."},"origin":{"type":"string","enum":["learner","picked","authored"],"description":"Where it came from."},"seq":{"type":"number","description":"A textbook's place in the project's study order, 1-based and gapless; thin links carry none."},"toc":{"type":"array","items":{"type":"object","properties":{"n":{"type":"number","description":"1-based position — what cover locators count."},"title":{"type":"string"},"part":{"type":"string","description":"The part / test / unit it sits under, when the resource groups chapters."}},"required":["n","title"],"additionalProperties":true},"description":"The thick/thin switch: present (and non-empty) = thick."},"tocSource":{"type":"object","properties":{"by":{"type":"string","enum":["web","model","photo"]},"url":{"type":"string"},"verifiedAt":{"type":"string"}},"required":["by"],"additionalProperties":true},"meta":{"type":"object","properties":{"bookKind":{"type":"string","enum":["material","knowledge"]},"short":{"type":"string","description":"The cover's abbreviation (「剑5」「PNS」); derived from the title when absent."},"extras":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"note":{"type":"string","description":"One line from the coach: what it is for."},"where":{"type":"string","description":"Where it is in the resource (「p.152」)."},"when":{"type":"string","enum":["reference","before"]}},"required":["title","when"],"additionalProperties":true}},"author":{"type":"string"},"edition":{"type":"string"},"isbn":{"type":"string"}},"required":[],"additionalProperties":true},"createdAt":{"type":"string"}},"required":["id","title","kind","createdAt"],"additionalProperties":true}},"required":["ok","resource"],"additionalProperties":true}]},
|
|
2301
|
+
},
|
|
2302
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":118,"column":3},
|
|
2303
|
+
},
|
|
2304
|
+
'library/getRoadmap': {
|
|
2305
|
+
service: 'libraryRemote',
|
|
2306
|
+
description: 'One textbook\'s adopted roadmap and its pending draft.',
|
|
2307
|
+
invocation: { kind: 'direct' },
|
|
2308
|
+
parameters: [
|
|
2309
|
+
{
|
|
2310
|
+
name: 'request',
|
|
2311
|
+
source: 'json',
|
|
2312
|
+
codec: {
|
|
2313
|
+
mode: 'strict',
|
|
2314
|
+
typeSymbol: '@khorsheed/dsh-library#library/getRoadmap:request',
|
|
2315
|
+
create: _khorsheed_dsh_library_library_getRoadmap_parameter_0$schema,
|
|
2316
|
+
schema: _khorsheed_dsh_library_library_getRoadmap_parameter_0$schema(),
|
|
2317
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"}},"required":["projectId","resourceId"],"additionalProperties":true},
|
|
2318
|
+
},
|
|
2319
|
+
strictCodec: {
|
|
2320
|
+
mode: 'strict',
|
|
2321
|
+
typeSymbol: '@khorsheed/dsh-library#library/getRoadmap:request',
|
|
2322
|
+
create: _khorsheed_dsh_library_library_getRoadmap_parameter_0_strict$schema,
|
|
2323
|
+
schema: _khorsheed_dsh_library_library_getRoadmap_parameter_0_strict$schema(),
|
|
2324
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"}},"required":["projectId","resourceId"],"additionalProperties":false},
|
|
2325
|
+
},
|
|
2326
|
+
},
|
|
2327
|
+
],
|
|
2328
|
+
result: {
|
|
2329
|
+
mode: 'strict',
|
|
2330
|
+
typeSymbol: '@khorsheed/dsh-library#library/getRoadmap:result',
|
|
2331
|
+
create: _khorsheed_dsh_library_library_getRoadmap_result$schema,
|
|
2332
|
+
schema: _khorsheed_dsh_library_library_getRoadmap_result$schema(),
|
|
2333
|
+
jsonSchema: {"type":"object","properties":{"roadmap":{"type":"object","properties":{"primaryResourceId":{"type":"string","description":"The textbook whose path this is. Always present on anything written since the book-paths cut; a legacy project-level path (absent) is never read back."},"status":{"type":"string","enum":["draft","adopted"]},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"goals":{"type":"array","items":{"type":"string"},"description":"What the learner should be able to do after this node."},"dependsOn":{"type":"array","items":{"type":"string"},"description":"Node ids that must be `done` before this one may leave `locked`."},"covers":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string"},"locator":{"type":"string","description":"The contents rows drawn on (\"1-5,7\") — thick resources only."},"title":{"type":"string","description":"A url cover's display title."},"by":{"type":"string","enum":["web","model","user"],"description":"web: fetched and checked; model: from the coach's memory, unverified; user: the learner gave it."},"verifiedAt":{"type":"string"}},"required":["ref"],"additionalProperties":true},"description":"What the station draws on — at least one cover."},"state":{"type":"string","enum":["current","done","locked"]},"gate":{"type":"string","enum":["read","quiz","acceptance"],"description":"How the node completes: quiz | acceptance | read."},"quizStats":{"type":"object","properties":{"attempts":{"type":"number"},"lastRatio":{"type":"number"},"bestRatio":{"type":"number"}},"required":["attempts"],"additionalProperties":true,"description":"Quiz-gated nodes only — a read / acceptance node never carries one."},"points":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable slug (letters, digits, . _ -) — the mastery key."},"title":{"type":"string","description":"The point as the learner reads it (「极限的定义」)."},"notes":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"term":{"type":"string","description":"The short name of the confusion, when the coach gave one (「反函数 vs 倒数」)."},"at":{"type":"string"},"session":{"type":"string","description":"The session it came from."}},"required":["text","at"],"additionalProperties":true},"description":"What the coach noticed the learner stuck on here (a subject project's weak point lands on its point, not on a card)."}},"required":["id","title"],"additionalProperties":true},"description":"Quiz-gated nodes only: the station's knowledge points (3-6), drafted with the roadmap and reviewed at adoption. Quiz questions reference them by id."},"acceptance":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"object","properties":{"line":{"type":"string"},"ref":{"type":"string"}},"required":["line"],"additionalProperties":true}]},"description":"Acceptance nodes only: the rubric lines as authored (the draft's and the display's source of truth; adoption materializes them into the node's practice assessment)."},"notes":{"type":"object","properties":{"text":{"type":"string","description":"Markdown body."},"updatedAt":{"type":"string"},"revisions":{"type":"number","description":"1-based — the Nth version (「第 N 次更新」)."}},"required":["text","updatedAt","revisions"],"additionalProperties":true,"description":"The station's 讲义, once the coach has taught it."}},"required":["id","title","goals","dependsOn","covers","state","gate"],"additionalProperties":true}},"passRatio":{"type":"number","description":"The pass threshold (default {@link DEFAULT_PASS_RATIO})."},"note":{"type":"string","description":"The coach's one-line pacing note on the draft card (「每周 3 章,约 4 周」)."},"generatedAt":{"type":"string"},"adoptedAt":{"type":"string"}},"required":["status","nodes","generatedAt"],"additionalProperties":true},"draft":{"type":"object","properties":{"primaryResourceId":{"type":"string","description":"The textbook whose path this is. Always present on anything written since the book-paths cut; a legacy project-level path (absent) is never read back."},"status":{"type":"string","enum":["draft","adopted"]},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"goals":{"type":"array","items":{"type":"string"},"description":"What the learner should be able to do after this node."},"dependsOn":{"type":"array","items":{"type":"string"},"description":"Node ids that must be `done` before this one may leave `locked`."},"covers":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string"},"locator":{"type":"string","description":"The contents rows drawn on (\"1-5,7\") — thick resources only."},"title":{"type":"string","description":"A url cover's display title."},"by":{"type":"string","enum":["web","model","user"],"description":"web: fetched and checked; model: from the coach's memory, unverified; user: the learner gave it."},"verifiedAt":{"type":"string"}},"required":["ref"],"additionalProperties":true},"description":"What the station draws on — at least one cover."},"state":{"type":"string","enum":["current","done","locked"]},"gate":{"type":"string","enum":["read","quiz","acceptance"],"description":"How the node completes: quiz | acceptance | read."},"quizStats":{"type":"object","properties":{"attempts":{"type":"number"},"lastRatio":{"type":"number"},"bestRatio":{"type":"number"}},"required":["attempts"],"additionalProperties":true,"description":"Quiz-gated nodes only — a read / acceptance node never carries one."},"points":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable slug (letters, digits, . _ -) — the mastery key."},"title":{"type":"string","description":"The point as the learner reads it (「极限的定义」)."},"notes":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"term":{"type":"string","description":"The short name of the confusion, when the coach gave one (「反函数 vs 倒数」)."},"at":{"type":"string"},"session":{"type":"string","description":"The session it came from."}},"required":["text","at"],"additionalProperties":true},"description":"What the coach noticed the learner stuck on here (a subject project's weak point lands on its point, not on a card)."}},"required":["id","title"],"additionalProperties":true},"description":"Quiz-gated nodes only: the station's knowledge points (3-6), drafted with the roadmap and reviewed at adoption. Quiz questions reference them by id."},"acceptance":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"object","properties":{"line":{"type":"string"},"ref":{"type":"string"}},"required":["line"],"additionalProperties":true}]},"description":"Acceptance nodes only: the rubric lines as authored (the draft's and the display's source of truth; adoption materializes them into the node's practice assessment)."},"notes":{"type":"object","properties":{"text":{"type":"string","description":"Markdown body."},"updatedAt":{"type":"string"},"revisions":{"type":"number","description":"1-based — the Nth version (「第 N 次更新」)."}},"required":["text","updatedAt","revisions"],"additionalProperties":true,"description":"The station's 讲义, once the coach has taught it."}},"required":["id","title","goals","dependsOn","covers","state","gate"],"additionalProperties":true}},"passRatio":{"type":"number","description":"The pass threshold (default {@link DEFAULT_PASS_RATIO})."},"note":{"type":"string","description":"The coach's one-line pacing note on the draft card (「每周 3 章,约 4 周」)."},"generatedAt":{"type":"string"},"adoptedAt":{"type":"string"}},"required":["status","nodes","generatedAt"],"additionalProperties":true}},"required":[],"additionalProperties":true},
|
|
2334
|
+
},
|
|
2335
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":174,"column":3},
|
|
2336
|
+
},
|
|
2337
|
+
'library/latestActivity': {
|
|
2338
|
+
service: 'libraryRemote',
|
|
2339
|
+
description: 'The newest event\'s timestamp anywhere — the pane polls it to re-read (no push channel).',
|
|
2340
|
+
invocation: { kind: 'direct' },
|
|
2341
|
+
parameters: [
|
|
2342
|
+
],
|
|
2343
|
+
result: {
|
|
2344
|
+
mode: 'strict',
|
|
2345
|
+
typeSymbol: '@khorsheed/dsh-library#library/latestActivity:result',
|
|
2346
|
+
create: _khorsheed_dsh_library_library_latestActivity_result$schema,
|
|
2347
|
+
schema: _khorsheed_dsh_library_library_latestActivity_result$schema(),
|
|
2348
|
+
jsonSchema: {"type":"object","properties":{"at":{"type":"string"},"session":{"type":"object","properties":{"id":{"type":"string"},"at":{"type":"string"}},"required":["id","at"],"additionalProperties":true}},"required":[],"additionalProperties":true},
|
|
2349
|
+
},
|
|
2350
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":340,"column":3},
|
|
2351
|
+
},
|
|
2352
|
+
'library/listAssessments': {
|
|
2353
|
+
service: 'libraryRemote',
|
|
2354
|
+
description: 'A project\'s assessments, optionally one resource\'s / node\'s / one type\'s.',
|
|
2355
|
+
invocation: { kind: 'direct' },
|
|
2356
|
+
parameters: [
|
|
2357
|
+
{
|
|
2358
|
+
name: 'request',
|
|
2359
|
+
source: 'json',
|
|
2360
|
+
codec: {
|
|
2361
|
+
mode: 'strict',
|
|
2362
|
+
typeSymbol: '@khorsheed/dsh-library#library/listAssessments:request',
|
|
2363
|
+
create: _khorsheed_dsh_library_library_listAssessments_parameter_0$schema,
|
|
2364
|
+
schema: _khorsheed_dsh_library_library_listAssessments_parameter_0$schema(),
|
|
2365
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"},"nodeId":{"type":"string"},"type":{"type":"string","enum":["quiz","practice"]}},"required":["projectId"],"additionalProperties":true},
|
|
2366
|
+
},
|
|
2367
|
+
strictCodec: {
|
|
2368
|
+
mode: 'strict',
|
|
2369
|
+
typeSymbol: '@khorsheed/dsh-library#library/listAssessments:request',
|
|
2370
|
+
create: _khorsheed_dsh_library_library_listAssessments_parameter_0_strict$schema,
|
|
2371
|
+
schema: _khorsheed_dsh_library_library_listAssessments_parameter_0_strict$schema(),
|
|
2372
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"},"nodeId":{"type":"string"},"type":{"type":"string","enum":["quiz","practice"]}},"required":["projectId"],"additionalProperties":false},
|
|
2373
|
+
},
|
|
2374
|
+
},
|
|
2375
|
+
],
|
|
2376
|
+
result: {
|
|
2377
|
+
mode: 'strict',
|
|
2378
|
+
typeSymbol: '@khorsheed/dsh-library#library/listAssessments:result',
|
|
2379
|
+
create: _khorsheed_dsh_library_library_listAssessments_result$schema,
|
|
2380
|
+
schema: _khorsheed_dsh_library_library_listAssessments_result$schema(),
|
|
2381
|
+
jsonSchema: {"type":"object","properties":{"assessments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["quiz","practice","retake"],"description":"quiz: a paper; practice: an acceptance rubric; retake: a station's open misses, re-asked (never counts toward passing)."},"scope":{"type":"object","properties":{"nodeId":{"type":"string","description":"The roadmap node this assessment gates, when it is a node assessment."},"resourceId":{"type":"string","description":"The resource whose content is quizzed; absent + nodeId present = a project-path station, both absent = free practice."}},"required":[],"additionalProperties":true},"focus":{"type":"string","enum":["mixed","book","mine"],"description":"quiz: the learner's chosen source (absent on assessments stored before the choice existed = mixed)."},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["choice","fill","free"],"description":"`choice` carries options; `fill` / `free` are open answers."},"prompt":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"answer":{"type":"string"},"explanation":{"type":"string","description":"Why the answer is right — shown after answering."},"point":{"type":"string","description":"The gated station's point this question probes (a point id) — required once the station carries points; mastery aggregates by it."},"origin":{"type":"object","properties":{"assessmentId":{"type":"string"},"questionId":{"type":"string"}},"required":["assessmentId","questionId"],"additionalProperties":true,"description":"retake papers: the question this one re-asks."},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["marked","asked","missed","topic"]},"cardIds":{"type":"array","items":{"type":"string"},"description":"The cards it probes (required for marked / asked / missed)."}},"required":["kind"],"additionalProperties":true},"evidence":{"type":"object","properties":{"kind":{"type":"string","enum":["web","photo","knowledge"]},"pageId":{"type":"string","description":"photo: the page whose text holds the quote."},"url":{"type":"string","description":"web: where the quote is from."},"quote":{"type":"string","description":"photo / web: the passage, verbatim."}},"required":["kind"],"additionalProperties":true}},"required":["id","kind","prompt","answer","target","evidence"],"additionalProperties":true},"description":"quiz: the questions."},"rubric":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable id: L + 1-based position — verdicts name it, so a replan rewording the line never orphans history."},"line":{"type":"string"},"ref":{"type":"string","description":"The assessment that machine-checks this line."}},"required":["id","line"],"additionalProperties":true},"description":"practice: the materialized rubric (stable line ids)."},"supersededBy":{"type":"string","description":"The assessment that replaced this one (a station's newer paper)."},"createdAt":{"type":"string"}},"required":["id","type","scope","createdAt"],"additionalProperties":true}}},"required":["assessments"],"additionalProperties":true},
|
|
2382
|
+
},
|
|
2383
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":276,"column":3},
|
|
2384
|
+
},
|
|
2385
|
+
'library/listAttempts': {
|
|
2386
|
+
service: 'libraryRemote',
|
|
2387
|
+
description: 'A project\'s graded sittings, newest first; `nodeId` narrows to one station\'s history, `assessmentId` to one assessment\'s.',
|
|
2388
|
+
invocation: { kind: 'direct' },
|
|
2389
|
+
parameters: [
|
|
2390
|
+
{
|
|
2391
|
+
name: 'request',
|
|
2392
|
+
source: 'json',
|
|
2393
|
+
codec: {
|
|
2394
|
+
mode: 'strict',
|
|
2395
|
+
typeSymbol: '@khorsheed/dsh-library#library/listAttempts:request',
|
|
2396
|
+
create: _khorsheed_dsh_library_library_listAttempts_parameter_0$schema,
|
|
2397
|
+
schema: _khorsheed_dsh_library_library_listAttempts_parameter_0$schema(),
|
|
2398
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"nodeId":{"type":"string"},"assessmentId":{"type":"string"}},"required":["projectId"],"additionalProperties":true},
|
|
2399
|
+
},
|
|
2400
|
+
strictCodec: {
|
|
2401
|
+
mode: 'strict',
|
|
2402
|
+
typeSymbol: '@khorsheed/dsh-library#library/listAttempts:request',
|
|
2403
|
+
create: _khorsheed_dsh_library_library_listAttempts_parameter_0_strict$schema,
|
|
2404
|
+
schema: _khorsheed_dsh_library_library_listAttempts_parameter_0_strict$schema(),
|
|
2405
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"nodeId":{"type":"string"},"assessmentId":{"type":"string"}},"required":["projectId"],"additionalProperties":false},
|
|
2406
|
+
},
|
|
2407
|
+
},
|
|
2408
|
+
],
|
|
2409
|
+
result: {
|
|
2410
|
+
mode: 'strict',
|
|
2411
|
+
typeSymbol: '@khorsheed/dsh-library#library/listAttempts:result',
|
|
2412
|
+
create: _khorsheed_dsh_library_library_listAttempts_result$schema,
|
|
2413
|
+
schema: _khorsheed_dsh_library_library_listAttempts_result$schema(),
|
|
2414
|
+
jsonSchema: {"type":"object","properties":{"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"assessmentId":{"type":"string","description":"The assessment judged. Always set on v5 writes."},"nodeId":{"type":"string","description":"Legacy v4 key: the acceptance station accepted, before practice rubrics materialized as assessments. Read compatibility only — new attempts never carry it; readers resolve it through the node's current practice assessment."},"verdicts":{"type":"array","items":{"type":"object","properties":{"task":{"type":"string","description":"The question id or rubric line id this verdict judges."},"criterion":{"type":"string"},"pass":{"type":"boolean"},"ratio":{"type":"number","description":"Partial credit (defaults to pass ? 1 : 0)."},"evidence":{"type":"string"},"by":{"type":"string","enum":["auto","user","self","llm"],"description":"auto: the machine's verdict on a ref acceptance line (never accepted from a caller)."},"void":{"type":"boolean","description":"The learner flagged the question as broken (「这题有问题」): it counts for nothing."},"missedCard":{"type":"object","properties":{"term":{"type":"string"},"gloss":{"type":"string"}},"required":["term","gloss"],"additionalProperties":true,"description":"A missed question with no target card: the card to create for it."}},"required":["task","criterion","pass","evidence","by"],"additionalProperties":true}},"ratio":{"type":"number","description":"Credit over the non-void verdicts — the node's unlock input."},"at":{"type":"string"}},"required":["id","verdicts","ratio","at"],"additionalProperties":true}}},"required":["attempts"],"additionalProperties":true},
|
|
2415
|
+
},
|
|
2416
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":294,"column":3},
|
|
2417
|
+
},
|
|
2418
|
+
'library/listCards': {
|
|
2419
|
+
service: 'libraryRemote',
|
|
2420
|
+
description: 'Cards, filtered and sorted.',
|
|
2421
|
+
invocation: { kind: 'direct' },
|
|
2422
|
+
parameters: [
|
|
2423
|
+
{
|
|
2424
|
+
name: 'request',
|
|
2425
|
+
source: 'json',
|
|
2426
|
+
codec: {
|
|
2427
|
+
mode: 'strict',
|
|
2428
|
+
typeSymbol: '@khorsheed/dsh-library/types#LibraryCardQuery',
|
|
2429
|
+
create: _khorsheed_dsh_library_library_listCards_parameter_0$schema,
|
|
2430
|
+
schema: _khorsheed_dsh_library_library_listCards_parameter_0$schema(),
|
|
2431
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"query":{"type":"string"},"resourceId":{"type":"string"},"nodeId":{"type":"string","description":"Cards met in this node (a context or a source page on it)."},"kind":{"type":"string","enum":["word","concept"]},"source":{"type":"string","enum":["manual","photo","quiz","chat"]},"weakMin":{"type":"number"},"due":{"type":"boolean"},"includeMastered":{"type":"boolean","description":"Include mastered cards (default: active only)."},"limit":{"type":"number"},"sort":{"type":"string","enum":["recent","weak","due"],"description":"`weak` (default): weakness, then due date; `recent`: newest first; `due`: due date."}},"required":["projectId"],"additionalProperties":true},
|
|
2432
|
+
},
|
|
2433
|
+
strictCodec: {
|
|
2434
|
+
mode: 'strict',
|
|
2435
|
+
typeSymbol: '@khorsheed/dsh-library/types#LibraryCardQuery',
|
|
2436
|
+
create: _khorsheed_dsh_library_library_listCards_parameter_0_strict$schema,
|
|
2437
|
+
schema: _khorsheed_dsh_library_library_listCards_parameter_0_strict$schema(),
|
|
2438
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"query":{"type":"string"},"resourceId":{"type":"string"},"nodeId":{"type":"string","description":"Cards met in this node (a context or a source page on it)."},"kind":{"type":"string","enum":["word","concept"]},"source":{"type":"string","enum":["manual","photo","quiz","chat"]},"weakMin":{"type":"number"},"due":{"type":"boolean"},"includeMastered":{"type":"boolean","description":"Include mastered cards (default: active only)."},"limit":{"type":"number"},"sort":{"type":"string","enum":["recent","weak","due"],"description":"`weak` (default): weakness, then due date; `recent`: newest first; `due`: due date."}},"required":["projectId"],"additionalProperties":false},
|
|
2439
|
+
},
|
|
2440
|
+
},
|
|
2441
|
+
],
|
|
2442
|
+
result: {
|
|
2443
|
+
mode: 'strict',
|
|
2444
|
+
typeSymbol: '@khorsheed/dsh-library#library/listCards:result',
|
|
2445
|
+
create: _khorsheed_dsh_library_library_listCards_result$schema,
|
|
2446
|
+
schema: _khorsheed_dsh_library_library_listCards_result$schema(),
|
|
2447
|
+
jsonSchema: {"type":"object","properties":{"cards":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["word","concept"]},"term":{"type":"string"},"aliases":{"type":"array","items":{"type":"string"},"description":"Other spellings / names the same card answers to (instalments, 不应期)."},"gloss":{"type":"string","description":"The meaning: the in-context sense for a word, a one-line explanation for a concept."},"userGloss":{"type":"string","description":"The learner's own handwritten gloss, kept apart from the model's."},"contexts":{"type":"array","items":{"type":"object","properties":{"sentence":{"type":"string"},"resourceId":{"type":"string"},"pageId":{"type":"string"},"nodeId":{"type":"string"}},"required":["sentence"],"additionalProperties":true}},"resourceId":{"type":"string","description":"Hung on a resource when it came from one; absent = project-level (「不挂书」)."},"sources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["manual","photo","quiz","chat"]},"ref":{"type":"string","description":"photo: the page id; quiz: the assessment id; chat: the session id when known."},"note":{"type":"string","description":"What happened, in a few words (「说老是记混」「T/F/NG 第 9 题」)."},"weakened":{"type":"boolean","description":"This source raised the weakness by one (an undo lowers it back)."},"at":{"type":"string"}},"required":["type","at"],"additionalProperties":true}},"weakness":{"type":"number","description":"0–3: how often the learner got stuck here (asked again, answered wrong)."},"mastery":{"type":"object","properties":{"box":{"type":"number"},"dueAt":{"type":"string"},"streak":{"type":"number"}},"required":["box","dueAt","streak"],"additionalProperties":true},"status":{"type":"string","enum":["active","deleted","mastered"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","kind","term","aliases","gloss","contexts","sources","weakness","mastery","status","createdAt","updatedAt"],"additionalProperties":true}},"total":{"type":"number"}},"required":["cards","total"],"additionalProperties":true},
|
|
2448
|
+
},
|
|
2449
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":234,"column":3},
|
|
2450
|
+
},
|
|
2451
|
+
'library/listEvents': {
|
|
2452
|
+
service: 'libraryRemote',
|
|
2453
|
+
description: 'One project\'s audit trail, newest first.',
|
|
2454
|
+
invocation: { kind: 'direct' },
|
|
2455
|
+
parameters: [
|
|
2456
|
+
{
|
|
2457
|
+
name: 'request',
|
|
2458
|
+
source: 'json',
|
|
2459
|
+
codec: {
|
|
2460
|
+
mode: 'strict',
|
|
2461
|
+
typeSymbol: '@khorsheed/dsh-library#library/listEvents:request',
|
|
2462
|
+
create: _khorsheed_dsh_library_library_listEvents_parameter_0$schema,
|
|
2463
|
+
schema: _khorsheed_dsh_library_library_listEvents_parameter_0$schema(),
|
|
2464
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"limit":{"type":"number"},"types":{"type":"array","items":{"type":"string","enum":["resource.added","roadmap.drafted","roadmap.adopted","page.recorded","cards.recorded","card.edited","quiz.created","attempt.assessed","node.completed","node.unlocked","node.noted","point.changed"]}}},"required":["projectId"],"additionalProperties":true},
|
|
2465
|
+
},
|
|
2466
|
+
strictCodec: {
|
|
2467
|
+
mode: 'strict',
|
|
2468
|
+
typeSymbol: '@khorsheed/dsh-library#library/listEvents:request',
|
|
2469
|
+
create: _khorsheed_dsh_library_library_listEvents_parameter_0_strict$schema,
|
|
2470
|
+
schema: _khorsheed_dsh_library_library_listEvents_parameter_0_strict$schema(),
|
|
2471
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"limit":{"type":"number"},"types":{"type":"array","items":{"type":"string","enum":["resource.added","roadmap.drafted","roadmap.adopted","page.recorded","cards.recorded","card.edited","quiz.created","attempt.assessed","node.completed","node.unlocked","node.noted","point.changed"]}}},"required":["projectId"],"additionalProperties":false},
|
|
2472
|
+
},
|
|
2473
|
+
},
|
|
2474
|
+
],
|
|
2475
|
+
result: {
|
|
2476
|
+
mode: 'strict',
|
|
2477
|
+
typeSymbol: '@khorsheed/dsh-library#library/listEvents:result',
|
|
2478
|
+
create: _khorsheed_dsh_library_library_listEvents_result$schema,
|
|
2479
|
+
schema: _khorsheed_dsh_library_library_listEvents_result$schema(),
|
|
2480
|
+
jsonSchema: {"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"type":{"type":"string","enum":["resource.added","roadmap.drafted","roadmap.adopted","page.recorded","cards.recorded","card.edited","quiz.created","attempt.assessed","node.completed","node.unlocked","node.noted","point.changed"]},"id":{"type":"string","description":"The object the event is about (a resource / assessment / node / page id)."},"title":{"type":"string","description":"Its display name, so a reader needs no join (cards.recorded: the terms)."},"resourceId":{"type":"string"},"source":{"type":"string","enum":["manual","photo","quiz","chat"],"description":"cards.recorded: where they came from (the 「教练最近记下」 filter)."},"session":{"type":"string","description":"cards.recorded from a chat: the session that noted them (its sidebar toasts them)."},"ids":{"type":"array","items":{"type":"string"},"description":"cards.recorded: the card ids, so a toast can undo them."},"count":{"type":"number","description":"Small numeric summaries (nodes / questions / added / merged)."},"count2":{"type":"number"},"ratio":{"type":"number"},"nodeId":{"type":"string","description":"point.changed: the station and the states."},"from":{"type":"string","enum":["mastered","weak","untested","practicing"]},"to":{"type":"string","enum":["mastered","weak","untested","practicing"]},"detail":{"type":"string","description":"point.changed: why, in one line (「2 题待订正」「教练备注:…」)."}},"required":["at","type"],"additionalProperties":true}}},"required":["events"],"additionalProperties":true},
|
|
2481
|
+
},
|
|
2482
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":316,"column":3},
|
|
2483
|
+
},
|
|
2484
|
+
'library/listPages': {
|
|
2485
|
+
service: 'libraryRemote',
|
|
2486
|
+
description: 'One resource\'s pages, optionally one node\'s.',
|
|
2487
|
+
invocation: { kind: 'direct' },
|
|
2488
|
+
parameters: [
|
|
2489
|
+
{
|
|
2490
|
+
name: 'request',
|
|
2491
|
+
source: 'json',
|
|
2492
|
+
codec: {
|
|
2493
|
+
mode: 'strict',
|
|
2494
|
+
typeSymbol: '@khorsheed/dsh-library#library/listPages:request',
|
|
2495
|
+
create: _khorsheed_dsh_library_library_listPages_parameter_0$schema,
|
|
2496
|
+
schema: _khorsheed_dsh_library_library_listPages_parameter_0$schema(),
|
|
2497
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"},"nodeId":{"type":"string"}},"required":["projectId","resourceId"],"additionalProperties":true},
|
|
2498
|
+
},
|
|
2499
|
+
strictCodec: {
|
|
2500
|
+
mode: 'strict',
|
|
2501
|
+
typeSymbol: '@khorsheed/dsh-library#library/listPages:request',
|
|
2502
|
+
create: _khorsheed_dsh_library_library_listPages_parameter_0_strict$schema,
|
|
2503
|
+
schema: _khorsheed_dsh_library_library_listPages_parameter_0_strict$schema(),
|
|
2504
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"},"nodeId":{"type":"string"}},"required":["projectId","resourceId"],"additionalProperties":false},
|
|
2505
|
+
},
|
|
2506
|
+
},
|
|
2507
|
+
],
|
|
2508
|
+
result: {
|
|
2509
|
+
mode: 'strict',
|
|
2510
|
+
typeSymbol: '@khorsheed/dsh-library#library/listPages:result',
|
|
2511
|
+
create: _khorsheed_dsh_library_library_listPages_result$schema,
|
|
2512
|
+
schema: _khorsheed_dsh_library_library_listPages_result$schema(),
|
|
2513
|
+
jsonSchema: {"type":"object","properties":{"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"resourceId":{"type":"string","description":"The thick resource photographed."},"nodeId":{"type":"string"},"label":{"type":"string","description":"What the learner calls it (「p.16」)."},"attachment":{"type":"object","properties":{"attachmentId":{"type":"string"},"mediaType":{"type":"string"},"bytes":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"}},"required":["attachmentId","mediaType","bytes","width","height"],"additionalProperties":true},"text":{"type":"string","description":"The page's recognized printed text — a photo-evidence quote is checked against it."},"marks":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"The underlined word / phrase / concept, as printed."},"sentence":{"type":"string","description":"The sentence it sits in, as printed."},"handNote":{"type":"string","description":"The learner's handwritten gloss beside it, transcribed."},"gloss":{"type":"string","description":"The recognizer's in-context meaning (a word) or one-line explanation (a concept)."},"uncertain":{"type":"boolean","description":"The recognizer could not tell (a strike-through? a stray line?) — never auto-carded."}},"required":["text"],"additionalProperties":true}},"cardIds":{"type":"array","items":{"type":"string"},"description":"The cards this page's marks became or merged into."},"at":{"type":"string"}},"required":["id","resourceId","attachment","text","marks","cardIds","at"],"additionalProperties":true}}},"required":["pages"],"additionalProperties":true},
|
|
2514
|
+
},
|
|
2515
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":200,"column":3},
|
|
2516
|
+
},
|
|
2517
|
+
'library/listProjects': {
|
|
2518
|
+
service: 'libraryRemote',
|
|
2519
|
+
description: 'Every project with its shelf progress and card tallies.',
|
|
2520
|
+
invocation: { kind: 'direct' },
|
|
2521
|
+
parameters: [
|
|
2522
|
+
],
|
|
2523
|
+
result: {
|
|
2524
|
+
mode: 'strict',
|
|
2525
|
+
typeSymbol: '@khorsheed/dsh-library#library/listProjects:result',
|
|
2526
|
+
create: _khorsheed_dsh_library_library_listProjects_result$schema,
|
|
2527
|
+
schema: _khorsheed_dsh_library_library_listProjects_result$schema(),
|
|
2528
|
+
jsonSchema: {"type":"object","properties":{"projects":{"type":"array","items":{"type":"object","properties":{"resources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["article","tool","book","video","repo","course","hardware"]},"seq":{"type":"number","description":"A textbook's place in the study order (1-based); absent on a thin link."},"origin":{"type":"string","enum":["learner","picked","authored"],"description":"Where the entry came from."},"roadmap":{"type":"object","properties":{"done":{"type":"number"},"total":{"type":"number"}},"required":["done","total"],"additionalProperties":true,"description":"Adopted-roadmap progress; only a thick resource (toc) can carry one."},"current":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":true,"description":"The first current node, when one is in progress."},"hasDraft":{"type":"boolean","description":"A draft is waiting for the learner's 采用."},"draftTotal":{"type":"number","description":"The waiting draft's station count."}},"required":["id","title","kind","hasDraft"],"additionalProperties":true},"description":"Every shelf entry (thick and thin) with its progress."},"cardCount":{"type":"number","description":"Live cards (not deleted)."},"dueCount":{"type":"number","description":"Live, unmastered cards due for review right now."},"lastActiveAt":{"type":"string","description":"When anything last happened in the project (its newest event, else its creation) — the list sorts by it."},"openMisses":{"type":"number","description":"Open misses (待订正) across every station of the project's textbooks."},"id":{"type":"string"},"name":{"type":"string"},"template":{"type":"string","enum":["language","subject","custom"]},"color":{"type":"string","enum":["ember","amber","moss","teal","sky","indigo","plum","rose"]},"icon":{"type":"string","enum":["code","book","globe","brain","flask","atom","leaf","pen","music","scale","chart","compass"]},"templateNote":{"type":"string","description":"The learner's own words for a custom template."},"goal":{"type":"string","description":"The learner's goal (「学术类 7 分,12 月 14 日」)."},"createdAt":{"type":"string"}},"required":["resources","cardCount","dueCount","lastActiveAt","id","name","template","createdAt"],"additionalProperties":true}}},"required":["projects"],"additionalProperties":true},
|
|
2529
|
+
},
|
|
2530
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":86,"column":3},
|
|
2531
|
+
},
|
|
2532
|
+
'library/listResources': {
|
|
2533
|
+
service: 'libraryRemote',
|
|
2534
|
+
description: 'A project\'s shelf: textbooks in study order, then links oldest first.',
|
|
2535
|
+
invocation: { kind: 'direct' },
|
|
2536
|
+
parameters: [
|
|
2537
|
+
{
|
|
2538
|
+
name: 'request',
|
|
2539
|
+
source: 'json',
|
|
2540
|
+
codec: {
|
|
2541
|
+
mode: 'strict',
|
|
2542
|
+
typeSymbol: '@khorsheed/dsh-library#library/listResources:request',
|
|
2543
|
+
create: _khorsheed_dsh_library_library_listResources_parameter_0$schema,
|
|
2544
|
+
schema: _khorsheed_dsh_library_library_listResources_parameter_0$schema(),
|
|
2545
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"}},"required":["projectId"],"additionalProperties":true},
|
|
2546
|
+
},
|
|
2547
|
+
strictCodec: {
|
|
2548
|
+
mode: 'strict',
|
|
2549
|
+
typeSymbol: '@khorsheed/dsh-library#library/listResources:request',
|
|
2550
|
+
create: _khorsheed_dsh_library_library_listResources_parameter_0_strict$schema,
|
|
2551
|
+
schema: _khorsheed_dsh_library_library_listResources_parameter_0_strict$schema(),
|
|
2552
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"}},"required":["projectId"],"additionalProperties":false},
|
|
2553
|
+
},
|
|
2554
|
+
},
|
|
2555
|
+
],
|
|
2556
|
+
result: {
|
|
2557
|
+
mode: 'strict',
|
|
2558
|
+
typeSymbol: '@khorsheed/dsh-library#library/listResources:result',
|
|
2559
|
+
create: _khorsheed_dsh_library_library_listResources_result$schema,
|
|
2560
|
+
schema: _khorsheed_dsh_library_library_listResources_result$schema(),
|
|
2561
|
+
jsonSchema: {"type":"object","properties":{"resources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["article","tool","book","video","repo","course","hardware"]},"url":{"type":"string","description":"A thin link's address; a thick resource may carry one (the web copy)."},"note":{"type":"string","description":"The coach's one line: why it is on the shelf (「热身站的读物,只看两节」)."},"origin":{"type":"string","enum":["learner","picked","authored"],"description":"Where it came from."},"seq":{"type":"number","description":"A textbook's place in the project's study order, 1-based and gapless; thin links carry none."},"toc":{"type":"array","items":{"type":"object","properties":{"n":{"type":"number","description":"1-based position — what cover locators count."},"title":{"type":"string"},"part":{"type":"string","description":"The part / test / unit it sits under, when the resource groups chapters."}},"required":["n","title"],"additionalProperties":true},"description":"The thick/thin switch: present (and non-empty) = thick."},"tocSource":{"type":"object","properties":{"by":{"type":"string","enum":["web","model","photo"]},"url":{"type":"string"},"verifiedAt":{"type":"string"}},"required":["by"],"additionalProperties":true},"meta":{"type":"object","properties":{"bookKind":{"type":"string","enum":["material","knowledge"]},"short":{"type":"string","description":"The cover's abbreviation (「剑5」「PNS」); derived from the title when absent."},"extras":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"note":{"type":"string","description":"One line from the coach: what it is for."},"where":{"type":"string","description":"Where it is in the resource (「p.152」)."},"when":{"type":"string","enum":["reference","before"]}},"required":["title","when"],"additionalProperties":true}},"author":{"type":"string"},"edition":{"type":"string"},"isbn":{"type":"string"}},"required":[],"additionalProperties":true},"createdAt":{"type":"string"}},"required":["id","title","kind","createdAt"],"additionalProperties":true}}},"required":["resources"],"additionalProperties":true},
|
|
2562
|
+
},
|
|
2563
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":124,"column":3},
|
|
2564
|
+
},
|
|
2565
|
+
'library/markNodeRead': {
|
|
2566
|
+
service: 'libraryRemote',
|
|
2567
|
+
description: '「读完」 a read node.',
|
|
2568
|
+
invocation: { kind: 'direct' },
|
|
2569
|
+
parameters: [
|
|
2570
|
+
{
|
|
2571
|
+
name: 'request',
|
|
2572
|
+
source: 'json',
|
|
2573
|
+
codec: {
|
|
2574
|
+
mode: 'strict',
|
|
2575
|
+
typeSymbol: '@khorsheed/dsh-library#library/markNodeRead:request',
|
|
2576
|
+
create: _khorsheed_dsh_library_library_markNodeRead_parameter_0$schema,
|
|
2577
|
+
schema: _khorsheed_dsh_library_library_markNodeRead_parameter_0$schema(),
|
|
2578
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"},"nodeId":{"type":"string"}},"required":["projectId","nodeId"],"additionalProperties":true},
|
|
2579
|
+
},
|
|
2580
|
+
strictCodec: {
|
|
2581
|
+
mode: 'strict',
|
|
2582
|
+
typeSymbol: '@khorsheed/dsh-library#library/markNodeRead:request',
|
|
2583
|
+
create: _khorsheed_dsh_library_library_markNodeRead_parameter_0_strict$schema,
|
|
2584
|
+
schema: _khorsheed_dsh_library_library_markNodeRead_parameter_0_strict$schema(),
|
|
2585
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"},"nodeId":{"type":"string"}},"required":["projectId","nodeId"],"additionalProperties":false},
|
|
2586
|
+
},
|
|
2587
|
+
},
|
|
2588
|
+
],
|
|
2589
|
+
result: {
|
|
2590
|
+
mode: 'strict',
|
|
2591
|
+
typeSymbol: '@khorsheed/dsh-library/types#LibraryOutcome',
|
|
2592
|
+
create: _khorsheed_dsh_library_library_markNodeRead_result$schema,
|
|
2593
|
+
schema: _khorsheed_dsh_library_library_markNodeRead_result$schema(),
|
|
2594
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","enum":["not-found","exists","io","unavailable","unbound","invalid","corrupt","storage-unavailable","evidence-gate","state-machine","ref-incomplete"]},"message":{"type":"string","description":"The human/model-readable reason, written to teach the correct call."}},"required":["ok","error","message"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"roadmap":{"type":"object","properties":{"primaryResourceId":{"type":"string","description":"The textbook whose path this is. Always present on anything written since the book-paths cut; a legacy project-level path (absent) is never read back."},"status":{"type":"string","enum":["draft","adopted"]},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"goals":{"type":"array","items":{"type":"string"},"description":"What the learner should be able to do after this node."},"dependsOn":{"type":"array","items":{"type":"string"},"description":"Node ids that must be `done` before this one may leave `locked`."},"covers":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string"},"locator":{"type":"string","description":"The contents rows drawn on (\"1-5,7\") — thick resources only."},"title":{"type":"string","description":"A url cover's display title."},"by":{"type":"string","enum":["web","model","user"],"description":"web: fetched and checked; model: from the coach's memory, unverified; user: the learner gave it."},"verifiedAt":{"type":"string"}},"required":["ref"],"additionalProperties":true},"description":"What the station draws on — at least one cover."},"state":{"type":"string","enum":["current","done","locked"]},"gate":{"type":"string","enum":["read","quiz","acceptance"],"description":"How the node completes: quiz | acceptance | read."},"quizStats":{"type":"object","properties":{"attempts":{"type":"number"},"lastRatio":{"type":"number"},"bestRatio":{"type":"number"}},"required":["attempts"],"additionalProperties":true,"description":"Quiz-gated nodes only — a read / acceptance node never carries one."},"points":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable slug (letters, digits, . _ -) — the mastery key."},"title":{"type":"string","description":"The point as the learner reads it (「极限的定义」)."},"notes":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"term":{"type":"string","description":"The short name of the confusion, when the coach gave one (「反函数 vs 倒数」)."},"at":{"type":"string"},"session":{"type":"string","description":"The session it came from."}},"required":["text","at"],"additionalProperties":true},"description":"What the coach noticed the learner stuck on here (a subject project's weak point lands on its point, not on a card)."}},"required":["id","title"],"additionalProperties":true},"description":"Quiz-gated nodes only: the station's knowledge points (3-6), drafted with the roadmap and reviewed at adoption. Quiz questions reference them by id."},"acceptance":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"object","properties":{"line":{"type":"string"},"ref":{"type":"string"}},"required":["line"],"additionalProperties":true}]},"description":"Acceptance nodes only: the rubric lines as authored (the draft's and the display's source of truth; adoption materializes them into the node's practice assessment)."},"notes":{"type":"object","properties":{"text":{"type":"string","description":"Markdown body."},"updatedAt":{"type":"string"},"revisions":{"type":"number","description":"1-based — the Nth version (「第 N 次更新」)."}},"required":["text","updatedAt","revisions"],"additionalProperties":true,"description":"The station's 讲义, once the coach has taught it."}},"required":["id","title","goals","dependsOn","covers","state","gate"],"additionalProperties":true}},"passRatio":{"type":"number","description":"The pass threshold (default {@link DEFAULT_PASS_RATIO})."},"note":{"type":"string","description":"The coach's one-line pacing note on the draft card (「每周 3 章,约 4 周」)."},"generatedAt":{"type":"string"},"adoptedAt":{"type":"string"}},"required":["status","nodes","generatedAt"],"additionalProperties":true},"unlocked":{"type":"array","items":{"type":"string"}}},"required":["ok","roadmap","unlocked"],"additionalProperties":true}]},
|
|
2595
|
+
},
|
|
2596
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":192,"column":3},
|
|
2597
|
+
},
|
|
2598
|
+
'library/moveResource': {
|
|
2599
|
+
service: 'libraryRemote',
|
|
2600
|
+
description: 'Move a textbook to another place in the study order.',
|
|
2601
|
+
invocation: { kind: 'direct' },
|
|
2602
|
+
parameters: [
|
|
2603
|
+
{
|
|
2604
|
+
name: 'request',
|
|
2605
|
+
source: 'json',
|
|
2606
|
+
codec: {
|
|
2607
|
+
mode: 'strict',
|
|
2608
|
+
typeSymbol: '@khorsheed/dsh-library#library/moveResource:request',
|
|
2609
|
+
create: _khorsheed_dsh_library_library_moveResource_parameter_0$schema,
|
|
2610
|
+
schema: _khorsheed_dsh_library_library_moveResource_parameter_0$schema(),
|
|
2611
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"},"seq":{"type":"number"}},"required":["projectId","resourceId","seq"],"additionalProperties":true},
|
|
2612
|
+
},
|
|
2613
|
+
strictCodec: {
|
|
2614
|
+
mode: 'strict',
|
|
2615
|
+
typeSymbol: '@khorsheed/dsh-library#library/moveResource:request',
|
|
2616
|
+
create: _khorsheed_dsh_library_library_moveResource_parameter_0_strict$schema,
|
|
2617
|
+
schema: _khorsheed_dsh_library_library_moveResource_parameter_0_strict$schema(),
|
|
2618
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"},"seq":{"type":"number"}},"required":["projectId","resourceId","seq"],"additionalProperties":false},
|
|
2619
|
+
},
|
|
2620
|
+
},
|
|
2621
|
+
],
|
|
2622
|
+
result: {
|
|
2623
|
+
mode: 'strict',
|
|
2624
|
+
typeSymbol: '@khorsheed/dsh-library/types#LibraryOutcome',
|
|
2625
|
+
create: _khorsheed_dsh_library_library_moveResource_result$schema,
|
|
2626
|
+
schema: _khorsheed_dsh_library_library_moveResource_result$schema(),
|
|
2627
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","enum":["not-found","exists","io","unavailable","unbound","invalid","corrupt","storage-unavailable","evidence-gate","state-machine","ref-incomplete"]},"message":{"type":"string","description":"The human/model-readable reason, written to teach the correct call."}},"required":["ok","error","message"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"resources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["article","tool","book","video","repo","course","hardware"]},"url":{"type":"string","description":"A thin link's address; a thick resource may carry one (the web copy)."},"note":{"type":"string","description":"The coach's one line: why it is on the shelf (「热身站的读物,只看两节」)."},"origin":{"type":"string","enum":["learner","picked","authored"],"description":"Where it came from."},"seq":{"type":"number","description":"A textbook's place in the project's study order, 1-based and gapless; thin links carry none."},"toc":{"type":"array","items":{"type":"object","properties":{"n":{"type":"number","description":"1-based position — what cover locators count."},"title":{"type":"string"},"part":{"type":"string","description":"The part / test / unit it sits under, when the resource groups chapters."}},"required":["n","title"],"additionalProperties":true},"description":"The thick/thin switch: present (and non-empty) = thick."},"tocSource":{"type":"object","properties":{"by":{"type":"string","enum":["web","model","photo"]},"url":{"type":"string"},"verifiedAt":{"type":"string"}},"required":["by"],"additionalProperties":true},"meta":{"type":"object","properties":{"bookKind":{"type":"string","enum":["material","knowledge"]},"short":{"type":"string","description":"The cover's abbreviation (「剑5」「PNS」); derived from the title when absent."},"extras":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"note":{"type":"string","description":"One line from the coach: what it is for."},"where":{"type":"string","description":"Where it is in the resource (「p.152」)."},"when":{"type":"string","enum":["reference","before"]}},"required":["title","when"],"additionalProperties":true}},"author":{"type":"string"},"edition":{"type":"string"},"isbn":{"type":"string"}},"required":[],"additionalProperties":true},"createdAt":{"type":"string"}},"required":["id","title","kind","createdAt"],"additionalProperties":true}}},"required":["ok","resources"],"additionalProperties":true}]},
|
|
2628
|
+
},
|
|
2629
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":160,"column":3},
|
|
2630
|
+
},
|
|
2631
|
+
'library/putAttempt': {
|
|
2632
|
+
service: 'libraryRemote',
|
|
2633
|
+
description: 'Grade a sitting answered in the sidebar (choice / fill judged in the page).',
|
|
2634
|
+
invocation: { kind: 'direct' },
|
|
2635
|
+
parameters: [
|
|
2636
|
+
{
|
|
2637
|
+
name: 'request',
|
|
2638
|
+
source: 'json',
|
|
2639
|
+
codec: {
|
|
2640
|
+
mode: 'strict',
|
|
2641
|
+
typeSymbol: '@khorsheed/dsh-library#library/putAttempt:request',
|
|
2642
|
+
create: _khorsheed_dsh_library_library_putAttempt_parameter_0$schema,
|
|
2643
|
+
schema: _khorsheed_dsh_library_library_putAttempt_parameter_0$schema(),
|
|
2644
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"assessmentId":{"type":"string"},"quizId":{"type":"string"},"nodeId":{"type":"string"},"resourceId":{"type":"string"},"verdicts":{"type":"array","items":{"type":"object","properties":{"task":{"type":"string","description":"The question id or rubric line id this verdict judges."},"criterion":{"type":"string"},"pass":{"type":"boolean"},"ratio":{"type":"number","description":"Partial credit (defaults to pass ? 1 : 0)."},"evidence":{"type":"string"},"by":{"type":"string","enum":["auto","user","self","llm"],"description":"auto: the machine's verdict on a ref acceptance line (never accepted from a caller)."},"void":{"type":"boolean","description":"The learner flagged the question as broken (「这题有问题」): it counts for nothing."},"missedCard":{"type":"object","properties":{"term":{"type":"string"},"gloss":{"type":"string"}},"required":["term","gloss"],"additionalProperties":true,"description":"A missed question with no target card: the card to create for it."}},"required":["task","criterion","pass","evidence","by"],"additionalProperties":true}}},"required":["projectId","verdicts"],"additionalProperties":true},
|
|
2645
|
+
},
|
|
2646
|
+
strictCodec: {
|
|
2647
|
+
mode: 'strict',
|
|
2648
|
+
typeSymbol: '@khorsheed/dsh-library#library/putAttempt:request',
|
|
2649
|
+
create: _khorsheed_dsh_library_library_putAttempt_parameter_0_strict$schema,
|
|
2650
|
+
schema: _khorsheed_dsh_library_library_putAttempt_parameter_0_strict$schema(),
|
|
2651
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"assessmentId":{"type":"string"},"quizId":{"type":"string"},"nodeId":{"type":"string"},"resourceId":{"type":"string"},"verdicts":{"type":"array","items":{"type":"object","properties":{"task":{"type":"string","description":"The question id or rubric line id this verdict judges."},"criterion":{"type":"string"},"pass":{"type":"boolean"},"ratio":{"type":"number","description":"Partial credit (defaults to pass ? 1 : 0)."},"evidence":{"type":"string"},"by":{"type":"string","enum":["auto","user","self","llm"],"description":"auto: the machine's verdict on a ref acceptance line (never accepted from a caller)."},"void":{"type":"boolean","description":"The learner flagged the question as broken (「这题有问题」): it counts for nothing."},"missedCard":{"type":"object","properties":{"term":{"type":"string"},"gloss":{"type":"string"}},"required":["term","gloss"],"additionalProperties":false,"description":"A missed question with no target card: the card to create for it."}},"required":["task","criterion","pass","evidence","by"],"additionalProperties":false}}},"required":["projectId","verdicts"],"additionalProperties":false},
|
|
2652
|
+
},
|
|
2653
|
+
},
|
|
2654
|
+
],
|
|
2655
|
+
result: {
|
|
2656
|
+
mode: 'strict',
|
|
2657
|
+
typeSymbol: '@khorsheed/dsh-library/types#LibraryOutcome',
|
|
2658
|
+
create: _khorsheed_dsh_library_library_putAttempt_result$schema,
|
|
2659
|
+
schema: _khorsheed_dsh_library_library_putAttempt_result$schema(),
|
|
2660
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","enum":["not-found","exists","io","unavailable","unbound","invalid","corrupt","storage-unavailable","evidence-gate","state-machine","ref-incomplete"]},"message":{"type":"string","description":"The human/model-readable reason, written to teach the correct call."}},"required":["ok","error","message"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"attempt":{"type":"object","properties":{"id":{"type":"string"},"assessmentId":{"type":"string","description":"The assessment judged. Always set on v5 writes."},"nodeId":{"type":"string","description":"Legacy v4 key: the acceptance station accepted, before practice rubrics materialized as assessments. Read compatibility only — new attempts never carry it; readers resolve it through the node's current practice assessment."},"verdicts":{"type":"array","items":{"type":"object","properties":{"task":{"type":"string","description":"The question id or rubric line id this verdict judges."},"criterion":{"type":"string"},"pass":{"type":"boolean"},"ratio":{"type":"number","description":"Partial credit (defaults to pass ? 1 : 0)."},"evidence":{"type":"string"},"by":{"type":"string","enum":["auto","user","self","llm"],"description":"auto: the machine's verdict on a ref acceptance line (never accepted from a caller)."},"void":{"type":"boolean","description":"The learner flagged the question as broken (「这题有问题」): it counts for nothing."},"missedCard":{"type":"object","properties":{"term":{"type":"string"},"gloss":{"type":"string"}},"required":["term","gloss"],"additionalProperties":true,"description":"A missed question with no target card: the card to create for it."}},"required":["task","criterion","pass","evidence","by"],"additionalProperties":true}},"ratio":{"type":"number","description":"Credit over the non-void verdicts — the node's unlock input."},"at":{"type":"string"}},"required":["id","verdicts","ratio","at"],"additionalProperties":true},"cardUpdates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"term":{"type":"string"},"weakness":{"type":"number"},"mastery":{"type":"object","properties":{"box":{"type":"number"},"dueAt":{"type":"string"},"streak":{"type":"number"}},"required":["box","dueAt","streak"],"additionalProperties":true},"created":{"type":"boolean"}},"required":["id","term","weakness","mastery"],"additionalProperties":true}},"unlocked":{"type":"array","items":{"type":"string"},"description":"Nodes that left `locked` because of this attempt."},"completed":{"type":"string","description":"The node this assessment gated, when it completed."},"passRatio":{"type":"number"},"pointChanges":{"type":"array","items":{"type":"object","properties":{"nodeId":{"type":"string"},"pointId":{"type":"string"},"title":{"type":"string"},"from":{"type":"string","enum":["mastered","weak","untested","practicing"]},"to":{"type":"string","enum":["mastered","weak","untested","practicing"]}},"required":["nodeId","pointId","title","from","to"],"additionalProperties":true},"description":"Knowledge points whose state this sitting moved."}},"required":["ok","attempt","cardUpdates","unlocked","passRatio"],"additionalProperties":true}]},
|
|
2661
|
+
},
|
|
2662
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":288,"column":3},
|
|
2663
|
+
},
|
|
2664
|
+
'library/putResource': {
|
|
2665
|
+
service: 'libraryRemote',
|
|
2666
|
+
description: 'Put one entry on the shelf (a thin link from the sidebar\'s add form).',
|
|
2667
|
+
invocation: { kind: 'direct' },
|
|
2668
|
+
parameters: [
|
|
2669
|
+
{
|
|
2670
|
+
name: 'request',
|
|
2671
|
+
source: 'json',
|
|
2672
|
+
codec: {
|
|
2673
|
+
mode: 'strict',
|
|
2674
|
+
typeSymbol: '@khorsheed/dsh-library#library/putResource:request',
|
|
2675
|
+
create: _khorsheed_dsh_library_library_putResource_parameter_0$schema,
|
|
2676
|
+
schema: _khorsheed_dsh_library_library_putResource_parameter_0$schema(),
|
|
2677
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["article","tool","book","video","repo","course","hardware"]},"url":{"type":"string"},"note":{"type":"string"},"origin":{"type":"string","enum":["learner","picked","authored"]},"seq":{"type":"number"},"toc":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"part":{"type":"string"}},"required":["title"],"additionalProperties":true}},"tocSource":{"type":"object","properties":{"by":{"type":"string","enum":["web","model","photo"]},"url":{"type":"string"},"verifiedAt":{"type":"string"}},"required":["by"],"additionalProperties":true},"bookKind":{"type":"string","enum":["material","knowledge"]},"short":{"type":"string"},"extras":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"note":{"type":"string"},"where":{"type":"string"},"when":{"type":"string","enum":["reference","before"]}},"required":["title"],"additionalProperties":true}},"author":{"type":"string"},"edition":{"type":"string"},"isbn":{"type":"string"},"from":{"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"}},"required":["projectId","resourceId"],"additionalProperties":true}},"required":["projectId","title","kind"],"additionalProperties":true},
|
|
2678
|
+
},
|
|
2679
|
+
strictCodec: {
|
|
2680
|
+
mode: 'strict',
|
|
2681
|
+
typeSymbol: '@khorsheed/dsh-library#library/putResource:request',
|
|
2682
|
+
create: _khorsheed_dsh_library_library_putResource_parameter_0_strict$schema,
|
|
2683
|
+
schema: _khorsheed_dsh_library_library_putResource_parameter_0_strict$schema(),
|
|
2684
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["article","tool","book","video","repo","course","hardware"]},"url":{"type":"string"},"note":{"type":"string"},"origin":{"type":"string","enum":["learner","picked","authored"]},"seq":{"type":"number"},"toc":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"part":{"type":"string"}},"required":["title"],"additionalProperties":false}},"tocSource":{"type":"object","properties":{"by":{"type":"string","enum":["web","model","photo"]},"url":{"type":"string"},"verifiedAt":{"type":"string"}},"required":["by"],"additionalProperties":false},"bookKind":{"type":"string","enum":["material","knowledge"]},"short":{"type":"string"},"extras":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"note":{"type":"string"},"where":{"type":"string"},"when":{"type":"string","enum":["reference","before"]}},"required":["title"],"additionalProperties":false}},"author":{"type":"string"},"edition":{"type":"string"},"isbn":{"type":"string"},"from":{"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"}},"required":["projectId","resourceId"],"additionalProperties":false}},"required":["projectId","title","kind"],"additionalProperties":false},
|
|
2685
|
+
},
|
|
2686
|
+
},
|
|
2687
|
+
],
|
|
2688
|
+
result: {
|
|
2689
|
+
mode: 'strict',
|
|
2690
|
+
typeSymbol: '@khorsheed/dsh-library/types#LibraryOutcome',
|
|
2691
|
+
create: _khorsheed_dsh_library_library_putResource_result$schema,
|
|
2692
|
+
schema: _khorsheed_dsh_library_library_putResource_result$schema(),
|
|
2693
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","enum":["not-found","exists","io","unavailable","unbound","invalid","corrupt","storage-unavailable","evidence-gate","state-machine","ref-incomplete"]},"message":{"type":"string","description":"The human/model-readable reason, written to teach the correct call."}},"required":["ok","error","message"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"resource":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["article","tool","book","video","repo","course","hardware"]},"url":{"type":"string","description":"A thin link's address; a thick resource may carry one (the web copy)."},"note":{"type":"string","description":"The coach's one line: why it is on the shelf (「热身站的读物,只看两节」)."},"origin":{"type":"string","enum":["learner","picked","authored"],"description":"Where it came from."},"seq":{"type":"number","description":"A textbook's place in the project's study order, 1-based and gapless; thin links carry none."},"toc":{"type":"array","items":{"type":"object","properties":{"n":{"type":"number","description":"1-based position — what cover locators count."},"title":{"type":"string"},"part":{"type":"string","description":"The part / test / unit it sits under, when the resource groups chapters."}},"required":["n","title"],"additionalProperties":true},"description":"The thick/thin switch: present (and non-empty) = thick."},"tocSource":{"type":"object","properties":{"by":{"type":"string","enum":["web","model","photo"]},"url":{"type":"string"},"verifiedAt":{"type":"string"}},"required":["by"],"additionalProperties":true},"meta":{"type":"object","properties":{"bookKind":{"type":"string","enum":["material","knowledge"]},"short":{"type":"string","description":"The cover's abbreviation (「剑5」「PNS」); derived from the title when absent."},"extras":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"note":{"type":"string","description":"One line from the coach: what it is for."},"where":{"type":"string","description":"Where it is in the resource (「p.152」)."},"when":{"type":"string","enum":["reference","before"]}},"required":["title","when"],"additionalProperties":true}},"author":{"type":"string"},"edition":{"type":"string"},"isbn":{"type":"string"}},"required":[],"additionalProperties":true},"createdAt":{"type":"string"}},"required":["id","title","kind","createdAt"],"additionalProperties":true}},"required":["ok","resource"],"additionalProperties":true}]},
|
|
2694
|
+
},
|
|
2695
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":130,"column":3},
|
|
2696
|
+
},
|
|
2697
|
+
'library/readPagePhoto': {
|
|
2698
|
+
service: 'libraryRemote',
|
|
2699
|
+
description: 'One page\'s photo, base64 — whitelisted to recorded pages.',
|
|
2700
|
+
invocation: { kind: 'direct' },
|
|
2701
|
+
parameters: [
|
|
2702
|
+
{
|
|
2703
|
+
name: 'request',
|
|
2704
|
+
source: 'json',
|
|
2705
|
+
codec: {
|
|
2706
|
+
mode: 'strict',
|
|
2707
|
+
typeSymbol: '@khorsheed/dsh-library#library/readPagePhoto:request',
|
|
2708
|
+
create: _khorsheed_dsh_library_library_readPagePhoto_parameter_0$schema,
|
|
2709
|
+
schema: _khorsheed_dsh_library_library_readPagePhoto_parameter_0$schema(),
|
|
2710
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"pageId":{"type":"string"}},"required":["projectId","pageId"],"additionalProperties":true},
|
|
2711
|
+
},
|
|
2712
|
+
strictCodec: {
|
|
2713
|
+
mode: 'strict',
|
|
2714
|
+
typeSymbol: '@khorsheed/dsh-library#library/readPagePhoto:request',
|
|
2715
|
+
create: _khorsheed_dsh_library_library_readPagePhoto_parameter_0_strict$schema,
|
|
2716
|
+
schema: _khorsheed_dsh_library_library_readPagePhoto_parameter_0_strict$schema(),
|
|
2717
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"pageId":{"type":"string"}},"required":["projectId","pageId"],"additionalProperties":false},
|
|
2718
|
+
},
|
|
2719
|
+
},
|
|
2720
|
+
],
|
|
2721
|
+
result: {
|
|
2722
|
+
mode: 'strict',
|
|
2723
|
+
typeSymbol: '@khorsheed/dsh-library/types#LibraryOutcome',
|
|
2724
|
+
create: _khorsheed_dsh_library_library_readPagePhoto_result$schema,
|
|
2725
|
+
schema: _khorsheed_dsh_library_library_readPagePhoto_result$schema(),
|
|
2726
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","enum":["not-found","exists","io","unavailable","unbound","invalid","corrupt","storage-unavailable","evidence-gate","state-machine","ref-incomplete"]},"message":{"type":"string","description":"The human/model-readable reason, written to teach the correct call."}},"required":["ok","error","message"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"string"},"mediaType":{"type":"string"}},"required":["ok","data","mediaType"],"additionalProperties":true}]},
|
|
2727
|
+
},
|
|
2728
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":206,"column":3},
|
|
2729
|
+
},
|
|
2730
|
+
'library/recentChanges': {
|
|
2731
|
+
service: 'libraryRemote',
|
|
2732
|
+
description: 'The newest knowledge-point state changes (今日 「最近的变化」).',
|
|
2733
|
+
invocation: { kind: 'direct' },
|
|
2734
|
+
parameters: [
|
|
2735
|
+
{
|
|
2736
|
+
name: 'request',
|
|
2737
|
+
source: 'json',
|
|
2738
|
+
codec: {
|
|
2739
|
+
mode: 'strict',
|
|
2740
|
+
typeSymbol: '@khorsheed/dsh-library#library/recentChanges:request',
|
|
2741
|
+
create: _khorsheed_dsh_library_library_recentChanges_parameter_0$schema,
|
|
2742
|
+
schema: _khorsheed_dsh_library_library_recentChanges_parameter_0$schema(),
|
|
2743
|
+
jsonSchema: {"type":"object","properties":{"limit":{"type":"number"}},"required":[],"additionalProperties":true},
|
|
2744
|
+
},
|
|
2745
|
+
strictCodec: {
|
|
2746
|
+
mode: 'strict',
|
|
2747
|
+
typeSymbol: '@khorsheed/dsh-library#library/recentChanges:request',
|
|
2748
|
+
create: _khorsheed_dsh_library_library_recentChanges_parameter_0_strict$schema,
|
|
2749
|
+
schema: _khorsheed_dsh_library_library_recentChanges_parameter_0_strict$schema(),
|
|
2750
|
+
jsonSchema: {"type":"object","properties":{"limit":{"type":"number"}},"required":[],"additionalProperties":false},
|
|
2751
|
+
},
|
|
2752
|
+
},
|
|
2753
|
+
],
|
|
2754
|
+
result: {
|
|
2755
|
+
mode: 'strict',
|
|
2756
|
+
typeSymbol: '@khorsheed/dsh-library#library/recentChanges:result',
|
|
2757
|
+
create: _khorsheed_dsh_library_library_recentChanges_result$schema,
|
|
2758
|
+
schema: _khorsheed_dsh_library_library_recentChanges_result$schema(),
|
|
2759
|
+
jsonSchema: {"type":"object","properties":{"changes":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"type":{"type":"string","enum":["resource.added","roadmap.drafted","roadmap.adopted","page.recorded","cards.recorded","card.edited","quiz.created","attempt.assessed","node.completed","node.unlocked","node.noted","point.changed"]},"id":{"type":"string","description":"The object the event is about (a resource / assessment / node / page id)."},"title":{"type":"string","description":"Its display name, so a reader needs no join (cards.recorded: the terms)."},"resourceId":{"type":"string"},"source":{"type":"string","enum":["manual","photo","quiz","chat"],"description":"cards.recorded: where they came from (the 「教练最近记下」 filter)."},"session":{"type":"string","description":"cards.recorded from a chat: the session that noted them (its sidebar toasts them)."},"ids":{"type":"array","items":{"type":"string"},"description":"cards.recorded: the card ids, so a toast can undo them."},"count":{"type":"number","description":"Small numeric summaries (nodes / questions / added / merged)."},"count2":{"type":"number"},"ratio":{"type":"number"},"nodeId":{"type":"string","description":"point.changed: the station and the states."},"from":{"type":"string","enum":["mastered","weak","untested","practicing"]},"to":{"type":"string","enum":["mastered","weak","untested","practicing"]},"detail":{"type":"string","description":"point.changed: why, in one line (「2 题待订正」「教练备注:…」)."},"projectId":{"type":"string"},"projectName":{"type":"string"}},"required":["at","type","projectId","projectName"],"additionalProperties":true}}},"required":["changes"],"additionalProperties":true},
|
|
2760
|
+
},
|
|
2761
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":323,"column":3},
|
|
2762
|
+
},
|
|
2763
|
+
'library/recentRecords': {
|
|
2764
|
+
service: 'libraryRemote',
|
|
2765
|
+
invocation: { kind: 'direct' },
|
|
2766
|
+
parameters: [
|
|
2767
|
+
{
|
|
2768
|
+
name: 'request',
|
|
2769
|
+
source: 'json',
|
|
2770
|
+
codec: {
|
|
2771
|
+
mode: 'strict',
|
|
2772
|
+
typeSymbol: '@khorsheed/dsh-library#library/recentRecords:request',
|
|
2773
|
+
create: _khorsheed_dsh_library_library_recentRecords_parameter_0$schema,
|
|
2774
|
+
schema: _khorsheed_dsh_library_library_recentRecords_parameter_0$schema(),
|
|
2775
|
+
jsonSchema: {"type":"object","properties":{"limit":{"type":"number"}},"required":[],"additionalProperties":true},
|
|
2776
|
+
},
|
|
2777
|
+
strictCodec: {
|
|
2778
|
+
mode: 'strict',
|
|
2779
|
+
typeSymbol: '@khorsheed/dsh-library#library/recentRecords:request',
|
|
2780
|
+
create: _khorsheed_dsh_library_library_recentRecords_parameter_0_strict$schema,
|
|
2781
|
+
schema: _khorsheed_dsh_library_library_recentRecords_parameter_0_strict$schema(),
|
|
2782
|
+
jsonSchema: {"type":"object","properties":{"limit":{"type":"number"}},"required":[],"additionalProperties":false},
|
|
2783
|
+
},
|
|
2784
|
+
},
|
|
2785
|
+
],
|
|
2786
|
+
result: {
|
|
2787
|
+
mode: 'strict',
|
|
2788
|
+
typeSymbol: '@khorsheed/dsh-library#library/recentRecords:result',
|
|
2789
|
+
create: _khorsheed_dsh_library_library_recentRecords_result$schema,
|
|
2790
|
+
schema: _khorsheed_dsh_library_library_recentRecords_result$schema(),
|
|
2791
|
+
jsonSchema: {"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"type":{"type":"string","enum":["resource.added","roadmap.drafted","roadmap.adopted","page.recorded","cards.recorded","card.edited","quiz.created","attempt.assessed","node.completed","node.unlocked","node.noted","point.changed"]},"id":{"type":"string","description":"The object the event is about (a resource / assessment / node / page id)."},"title":{"type":"string","description":"Its display name, so a reader needs no join (cards.recorded: the terms)."},"resourceId":{"type":"string"},"source":{"type":"string","enum":["manual","photo","quiz","chat"],"description":"cards.recorded: where they came from (the 「教练最近记下」 filter)."},"session":{"type":"string","description":"cards.recorded from a chat: the session that noted them (its sidebar toasts them)."},"ids":{"type":"array","items":{"type":"string"},"description":"cards.recorded: the card ids, so a toast can undo them."},"count":{"type":"number","description":"Small numeric summaries (nodes / questions / added / merged)."},"count2":{"type":"number"},"ratio":{"type":"number"},"nodeId":{"type":"string","description":"point.changed: the station and the states."},"from":{"type":"string","enum":["mastered","weak","untested","practicing"]},"to":{"type":"string","enum":["mastered","weak","untested","practicing"]},"detail":{"type":"string","description":"point.changed: why, in one line (「2 题待订正」「教练备注:…」)."},"projectId":{"type":"string"},"projectName":{"type":"string"}},"required":["at","type","projectId","projectName"],"additionalProperties":true}}},"required":["records"],"additionalProperties":true},
|
|
2792
|
+
},
|
|
2793
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":334,"column":3},
|
|
2794
|
+
},
|
|
2795
|
+
'library/recordPage': {
|
|
2796
|
+
service: 'libraryRemote',
|
|
2797
|
+
description: 'Record a recognized page and card its marks.',
|
|
2798
|
+
invocation: { kind: 'direct' },
|
|
2799
|
+
parameters: [
|
|
2800
|
+
{
|
|
2801
|
+
name: 'request',
|
|
2802
|
+
source: 'json',
|
|
2803
|
+
codec: {
|
|
2804
|
+
mode: 'strict',
|
|
2805
|
+
typeSymbol: '@khorsheed/dsh-library#library/recordPage:request',
|
|
2806
|
+
create: _khorsheed_dsh_library_library_recordPage_parameter_0$schema,
|
|
2807
|
+
schema: _khorsheed_dsh_library_library_recordPage_parameter_0$schema(),
|
|
2808
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"},"nodeId":{"type":"string"},"label":{"type":"string"},"attachment":{"type":"object","properties":{"attachmentId":{"type":"string"},"mediaType":{"type":"string"},"bytes":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"}},"required":["attachmentId","mediaType","bytes","width","height"],"additionalProperties":true},"text":{"type":"string"},"marks":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"The underlined word / phrase / concept, as printed."},"sentence":{"type":"string","description":"The sentence it sits in, as printed."},"handNote":{"type":"string","description":"The learner's handwritten gloss beside it, transcribed."},"gloss":{"type":"string","description":"The recognizer's in-context meaning (a word) or one-line explanation (a concept)."},"uncertain":{"type":"boolean","description":"The recognizer could not tell (a strike-through? a stray line?) — never auto-carded."}},"required":["text"],"additionalProperties":true}}},"required":["projectId","resourceId","attachment","text","marks"],"additionalProperties":true},
|
|
2809
|
+
},
|
|
2810
|
+
strictCodec: {
|
|
2811
|
+
mode: 'strict',
|
|
2812
|
+
typeSymbol: '@khorsheed/dsh-library#library/recordPage:request',
|
|
2813
|
+
create: _khorsheed_dsh_library_library_recordPage_parameter_0_strict$schema,
|
|
2814
|
+
schema: _khorsheed_dsh_library_library_recordPage_parameter_0_strict$schema(),
|
|
2815
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"},"nodeId":{"type":"string"},"label":{"type":"string"},"attachment":{"type":"object","properties":{"attachmentId":{"type":"string"},"mediaType":{"type":"string"},"bytes":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"}},"required":["attachmentId","mediaType","bytes","width","height"],"additionalProperties":false},"text":{"type":"string"},"marks":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"The underlined word / phrase / concept, as printed."},"sentence":{"type":"string","description":"The sentence it sits in, as printed."},"handNote":{"type":"string","description":"The learner's handwritten gloss beside it, transcribed."},"gloss":{"type":"string","description":"The recognizer's in-context meaning (a word) or one-line explanation (a concept)."},"uncertain":{"type":"boolean","description":"The recognizer could not tell (a strike-through? a stray line?) — never auto-carded."}},"required":["text"],"additionalProperties":false}}},"required":["projectId","resourceId","attachment","text","marks"],"additionalProperties":false},
|
|
2816
|
+
},
|
|
2817
|
+
},
|
|
2818
|
+
],
|
|
2819
|
+
result: {
|
|
2820
|
+
mode: 'strict',
|
|
2821
|
+
typeSymbol: '@khorsheed/dsh-library/types#LibraryOutcome',
|
|
2822
|
+
create: _khorsheed_dsh_library_library_recordPage_result$schema,
|
|
2823
|
+
schema: _khorsheed_dsh_library_library_recordPage_result$schema(),
|
|
2824
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","enum":["not-found","exists","io","unavailable","unbound","invalid","corrupt","storage-unavailable","evidence-gate","state-machine","ref-incomplete"]},"message":{"type":"string","description":"The human/model-readable reason, written to teach the correct call."}},"required":["ok","error","message"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"page":{"type":"object","properties":{"id":{"type":"string"},"resourceId":{"type":"string","description":"The thick resource photographed."},"nodeId":{"type":"string"},"label":{"type":"string","description":"What the learner calls it (「p.16」)."},"attachment":{"type":"object","properties":{"attachmentId":{"type":"string"},"mediaType":{"type":"string"},"bytes":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"}},"required":["attachmentId","mediaType","bytes","width","height"],"additionalProperties":true},"text":{"type":"string","description":"The page's recognized printed text — a photo-evidence quote is checked against it."},"marks":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"The underlined word / phrase / concept, as printed."},"sentence":{"type":"string","description":"The sentence it sits in, as printed."},"handNote":{"type":"string","description":"The learner's handwritten gloss beside it, transcribed."},"gloss":{"type":"string","description":"The recognizer's in-context meaning (a word) or one-line explanation (a concept)."},"uncertain":{"type":"boolean","description":"The recognizer could not tell (a strike-through? a stray line?) — never auto-carded."}},"required":["text"],"additionalProperties":true}},"cardIds":{"type":"array","items":{"type":"string"},"description":"The cards this page's marks became or merged into."},"at":{"type":"string"}},"required":["id","resourceId","attachment","text","marks","cardIds","at"],"additionalProperties":true},"cards":{"type":"object","properties":{"added":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["word","concept"]},"term":{"type":"string"},"aliases":{"type":"array","items":{"type":"string"},"description":"Other spellings / names the same card answers to (instalments, 不应期)."},"gloss":{"type":"string","description":"The meaning: the in-context sense for a word, a one-line explanation for a concept."},"userGloss":{"type":"string","description":"The learner's own handwritten gloss, kept apart from the model's."},"contexts":{"type":"array","items":{"type":"object","properties":{"sentence":{"type":"string"},"resourceId":{"type":"string"},"pageId":{"type":"string"},"nodeId":{"type":"string"}},"required":["sentence"],"additionalProperties":true}},"resourceId":{"type":"string","description":"Hung on a resource when it came from one; absent = project-level (「不挂书」)."},"sources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["manual","photo","quiz","chat"]},"ref":{"type":"string","description":"photo: the page id; quiz: the assessment id; chat: the session id when known."},"note":{"type":"string","description":"What happened, in a few words (「说老是记混」「T/F/NG 第 9 题」)."},"weakened":{"type":"boolean","description":"This source raised the weakness by one (an undo lowers it back)."},"at":{"type":"string"}},"required":["type","at"],"additionalProperties":true}},"weakness":{"type":"number","description":"0–3: how often the learner got stuck here (asked again, answered wrong)."},"mastery":{"type":"object","properties":{"box":{"type":"number"},"dueAt":{"type":"string"},"streak":{"type":"number"}},"required":["box","dueAt","streak"],"additionalProperties":true},"status":{"type":"string","enum":["active","deleted","mastered"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","kind","term","aliases","gloss","contexts","sources","weakness","mastery","status","createdAt","updatedAt"],"additionalProperties":true}},"merged":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["word","concept"]},"term":{"type":"string"},"aliases":{"type":"array","items":{"type":"string"},"description":"Other spellings / names the same card answers to (instalments, 不应期)."},"gloss":{"type":"string","description":"The meaning: the in-context sense for a word, a one-line explanation for a concept."},"userGloss":{"type":"string","description":"The learner's own handwritten gloss, kept apart from the model's."},"contexts":{"type":"array","items":{"type":"object","properties":{"sentence":{"type":"string"},"resourceId":{"type":"string"},"pageId":{"type":"string"},"nodeId":{"type":"string"}},"required":["sentence"],"additionalProperties":true}},"resourceId":{"type":"string","description":"Hung on a resource when it came from one; absent = project-level (「不挂书」)."},"sources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["manual","photo","quiz","chat"]},"ref":{"type":"string","description":"photo: the page id; quiz: the assessment id; chat: the session id when known."},"note":{"type":"string","description":"What happened, in a few words (「说老是记混」「T/F/NG 第 9 题」)."},"weakened":{"type":"boolean","description":"This source raised the weakness by one (an undo lowers it back)."},"at":{"type":"string"}},"required":["type","at"],"additionalProperties":true}},"weakness":{"type":"number","description":"0–3: how often the learner got stuck here (asked again, answered wrong)."},"mastery":{"type":"object","properties":{"box":{"type":"number"},"dueAt":{"type":"string"},"streak":{"type":"number"}},"required":["box","dueAt","streak"],"additionalProperties":true},"status":{"type":"string","enum":["active","deleted","mastered"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","kind","term","aliases","gloss","contexts","sources","weakness","mastery","status","createdAt","updatedAt"],"additionalProperties":true}},"pending":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"term":{"type":"string"},"candidates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"term":{"type":"string"},"gloss":{"type":"string"}},"required":["id","term","gloss"],"additionalProperties":true}}},"required":["index","term","candidates"],"additionalProperties":true},"description":"Near-duplicates held back — resend each with mergeInto or asNew."}},"required":["added","merged","pending"],"additionalProperties":true},"uncertain":{"type":"array","items":{"type":"string"}}},"required":["ok","page","cards","uncertain"],"additionalProperties":true}]},
|
|
2825
|
+
},
|
|
2826
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":218,"column":3},
|
|
2827
|
+
},
|
|
2828
|
+
'library/removeResource': {
|
|
2829
|
+
service: 'libraryRemote',
|
|
2830
|
+
description: 'Remove a shelf entry (its cards stay, unhung).',
|
|
2831
|
+
invocation: { kind: 'direct' },
|
|
2832
|
+
parameters: [
|
|
2833
|
+
{
|
|
2834
|
+
name: 'request',
|
|
2835
|
+
source: 'json',
|
|
2836
|
+
codec: {
|
|
2837
|
+
mode: 'strict',
|
|
2838
|
+
typeSymbol: '@khorsheed/dsh-library#library/removeResource:request',
|
|
2839
|
+
create: _khorsheed_dsh_library_library_removeResource_parameter_0$schema,
|
|
2840
|
+
schema: _khorsheed_dsh_library_library_removeResource_parameter_0$schema(),
|
|
2841
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"}},"required":["projectId","resourceId"],"additionalProperties":true},
|
|
2842
|
+
},
|
|
2843
|
+
strictCodec: {
|
|
2844
|
+
mode: 'strict',
|
|
2845
|
+
typeSymbol: '@khorsheed/dsh-library#library/removeResource:request',
|
|
2846
|
+
create: _khorsheed_dsh_library_library_removeResource_parameter_0_strict$schema,
|
|
2847
|
+
schema: _khorsheed_dsh_library_library_removeResource_parameter_0_strict$schema(),
|
|
2848
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"}},"required":["projectId","resourceId"],"additionalProperties":false},
|
|
2849
|
+
},
|
|
2850
|
+
},
|
|
2851
|
+
],
|
|
2852
|
+
result: {
|
|
2853
|
+
mode: 'strict',
|
|
2854
|
+
typeSymbol: '@khorsheed/dsh-library/types#LibraryOutcome',
|
|
2855
|
+
create: _khorsheed_dsh_library_library_removeResource_result$schema,
|
|
2856
|
+
schema: _khorsheed_dsh_library_library_removeResource_result$schema(),
|
|
2857
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","enum":["not-found","exists","io","unavailable","unbound","invalid","corrupt","storage-unavailable","evidence-gate","state-machine","ref-incomplete"]},"message":{"type":"string","description":"The human/model-readable reason, written to teach the correct call."}},"required":["ok","error","message"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"id":{"type":"string"}},"required":["ok","id"],"additionalProperties":true}]},
|
|
2858
|
+
},
|
|
2859
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":166,"column":3},
|
|
2860
|
+
},
|
|
2861
|
+
'library/reviewCard': {
|
|
2862
|
+
service: 'libraryRemote',
|
|
2863
|
+
description: 'One flashcard review.',
|
|
2864
|
+
invocation: { kind: 'direct' },
|
|
2865
|
+
parameters: [
|
|
2866
|
+
{
|
|
2867
|
+
name: 'request',
|
|
2868
|
+
source: 'json',
|
|
2869
|
+
codec: {
|
|
2870
|
+
mode: 'strict',
|
|
2871
|
+
typeSymbol: '@khorsheed/dsh-library#library/reviewCard:request',
|
|
2872
|
+
create: _khorsheed_dsh_library_library_reviewCard_parameter_0$schema,
|
|
2873
|
+
schema: _khorsheed_dsh_library_library_reviewCard_parameter_0$schema(),
|
|
2874
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"cardId":{"type":"string"},"rating":{"type":"string","enum":["forgot","fuzzy","recalled"]}},"required":["projectId","cardId","rating"],"additionalProperties":true},
|
|
2875
|
+
},
|
|
2876
|
+
strictCodec: {
|
|
2877
|
+
mode: 'strict',
|
|
2878
|
+
typeSymbol: '@khorsheed/dsh-library#library/reviewCard:request',
|
|
2879
|
+
create: _khorsheed_dsh_library_library_reviewCard_parameter_0_strict$schema,
|
|
2880
|
+
schema: _khorsheed_dsh_library_library_reviewCard_parameter_0_strict$schema(),
|
|
2881
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"cardId":{"type":"string"},"rating":{"type":"string","enum":["forgot","fuzzy","recalled"]}},"required":["projectId","cardId","rating"],"additionalProperties":false},
|
|
2882
|
+
},
|
|
2883
|
+
},
|
|
2884
|
+
],
|
|
2885
|
+
result: {
|
|
2886
|
+
mode: 'strict',
|
|
2887
|
+
typeSymbol: '@khorsheed/dsh-library/types#LibraryOutcome',
|
|
2888
|
+
create: _khorsheed_dsh_library_library_reviewCard_result$schema,
|
|
2889
|
+
schema: _khorsheed_dsh_library_library_reviewCard_result$schema(),
|
|
2890
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","enum":["not-found","exists","io","unavailable","unbound","invalid","corrupt","storage-unavailable","evidence-gate","state-machine","ref-incomplete"]},"message":{"type":"string","description":"The human/model-readable reason, written to teach the correct call."}},"required":["ok","error","message"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"card":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["word","concept"]},"term":{"type":"string"},"aliases":{"type":"array","items":{"type":"string"},"description":"Other spellings / names the same card answers to (instalments, 不应期)."},"gloss":{"type":"string","description":"The meaning: the in-context sense for a word, a one-line explanation for a concept."},"userGloss":{"type":"string","description":"The learner's own handwritten gloss, kept apart from the model's."},"contexts":{"type":"array","items":{"type":"object","properties":{"sentence":{"type":"string"},"resourceId":{"type":"string"},"pageId":{"type":"string"},"nodeId":{"type":"string"}},"required":["sentence"],"additionalProperties":true}},"resourceId":{"type":"string","description":"Hung on a resource when it came from one; absent = project-level (「不挂书」)."},"sources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["manual","photo","quiz","chat"]},"ref":{"type":"string","description":"photo: the page id; quiz: the assessment id; chat: the session id when known."},"note":{"type":"string","description":"What happened, in a few words (「说老是记混」「T/F/NG 第 9 题」)."},"weakened":{"type":"boolean","description":"This source raised the weakness by one (an undo lowers it back)."},"at":{"type":"string"}},"required":["type","at"],"additionalProperties":true}},"weakness":{"type":"number","description":"0–3: how often the learner got stuck here (asked again, answered wrong)."},"mastery":{"type":"object","properties":{"box":{"type":"number"},"dueAt":{"type":"string"},"streak":{"type":"number"}},"required":["box","dueAt","streak"],"additionalProperties":true},"status":{"type":"string","enum":["active","deleted","mastered"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","kind","term","aliases","gloss","contexts","sources","weakness","mastery","status","createdAt","updatedAt"],"additionalProperties":true}},"required":["ok","card"],"additionalProperties":true}]},
|
|
2891
|
+
},
|
|
2892
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":268,"column":3},
|
|
2893
|
+
},
|
|
2894
|
+
'library/savePhoto': {
|
|
2895
|
+
service: 'libraryRemote',
|
|
2896
|
+
description: 'Save a browser-uploaded photo into the attachment store.',
|
|
2897
|
+
invocation: { kind: 'direct' },
|
|
2898
|
+
parameters: [
|
|
2899
|
+
{
|
|
2900
|
+
name: 'request',
|
|
2901
|
+
source: 'json',
|
|
2902
|
+
codec: {
|
|
2903
|
+
mode: 'strict',
|
|
2904
|
+
typeSymbol: '@khorsheed/dsh-library#library/savePhoto:request',
|
|
2905
|
+
create: _khorsheed_dsh_library_library_savePhoto_parameter_0$schema,
|
|
2906
|
+
schema: _khorsheed_dsh_library_library_savePhoto_parameter_0$schema(),
|
|
2907
|
+
jsonSchema: {"type":"object","properties":{"data":{"type":"string"},"mediaType":{"type":"string"}},"required":["data","mediaType"],"additionalProperties":true},
|
|
2908
|
+
},
|
|
2909
|
+
strictCodec: {
|
|
2910
|
+
mode: 'strict',
|
|
2911
|
+
typeSymbol: '@khorsheed/dsh-library#library/savePhoto:request',
|
|
2912
|
+
create: _khorsheed_dsh_library_library_savePhoto_parameter_0_strict$schema,
|
|
2913
|
+
schema: _khorsheed_dsh_library_library_savePhoto_parameter_0_strict$schema(),
|
|
2914
|
+
jsonSchema: {"type":"object","properties":{"data":{"type":"string"},"mediaType":{"type":"string"}},"required":["data","mediaType"],"additionalProperties":false},
|
|
2915
|
+
},
|
|
2916
|
+
},
|
|
2917
|
+
],
|
|
2918
|
+
result: {
|
|
2919
|
+
mode: 'strict',
|
|
2920
|
+
typeSymbol: '@khorsheed/dsh-library/types#LibraryOutcome',
|
|
2921
|
+
create: _khorsheed_dsh_library_library_savePhoto_result$schema,
|
|
2922
|
+
schema: _khorsheed_dsh_library_library_savePhoto_result$schema(),
|
|
2923
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","enum":["not-found","exists","io","unavailable","unbound","invalid","corrupt","storage-unavailable","evidence-gate","state-machine","ref-incomplete"]},"message":{"type":"string","description":"The human/model-readable reason, written to teach the correct call."}},"required":["ok","error","message"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"attachment":{"type":"object","properties":{"attachmentId":{"type":"string"},"mediaType":{"type":"string"},"bytes":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"}},"required":["attachmentId","mediaType","bytes","width","height"],"additionalProperties":true}},"required":["ok","attachment"],"additionalProperties":true}]},
|
|
2924
|
+
},
|
|
2925
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":212,"column":3},
|
|
2926
|
+
},
|
|
2927
|
+
'library/setBookKind': {
|
|
2928
|
+
service: 'libraryRemote',
|
|
2929
|
+
description: 'Switch a textbook between 知识型 and 材料型.',
|
|
2930
|
+
invocation: { kind: 'direct' },
|
|
2931
|
+
parameters: [
|
|
2932
|
+
{
|
|
2933
|
+
name: 'request',
|
|
2934
|
+
source: 'json',
|
|
2935
|
+
codec: {
|
|
2936
|
+
mode: 'strict',
|
|
2937
|
+
typeSymbol: '@khorsheed/dsh-library#library/setBookKind:request',
|
|
2938
|
+
create: _khorsheed_dsh_library_library_setBookKind_parameter_0$schema,
|
|
2939
|
+
schema: _khorsheed_dsh_library_library_setBookKind_parameter_0$schema(),
|
|
2940
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"},"bookKind":{"type":"string","enum":["material","knowledge"]}},"required":["projectId","resourceId","bookKind"],"additionalProperties":true},
|
|
2941
|
+
},
|
|
2942
|
+
strictCodec: {
|
|
2943
|
+
mode: 'strict',
|
|
2944
|
+
typeSymbol: '@khorsheed/dsh-library#library/setBookKind:request',
|
|
2945
|
+
create: _khorsheed_dsh_library_library_setBookKind_parameter_0_strict$schema,
|
|
2946
|
+
schema: _khorsheed_dsh_library_library_setBookKind_parameter_0_strict$schema(),
|
|
2947
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"},"bookKind":{"type":"string","enum":["material","knowledge"]}},"required":["projectId","resourceId","bookKind"],"additionalProperties":false},
|
|
2948
|
+
},
|
|
2949
|
+
},
|
|
2950
|
+
],
|
|
2951
|
+
result: {
|
|
2952
|
+
mode: 'strict',
|
|
2953
|
+
typeSymbol: '@khorsheed/dsh-library/types#LibraryOutcome',
|
|
2954
|
+
create: _khorsheed_dsh_library_library_setBookKind_result$schema,
|
|
2955
|
+
schema: _khorsheed_dsh_library_library_setBookKind_result$schema(),
|
|
2956
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","enum":["not-found","exists","io","unavailable","unbound","invalid","corrupt","storage-unavailable","evidence-gate","state-machine","ref-incomplete"]},"message":{"type":"string","description":"The human/model-readable reason, written to teach the correct call."}},"required":["ok","error","message"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"resource":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["article","tool","book","video","repo","course","hardware"]},"url":{"type":"string","description":"A thin link's address; a thick resource may carry one (the web copy)."},"note":{"type":"string","description":"The coach's one line: why it is on the shelf (「热身站的读物,只看两节」)."},"origin":{"type":"string","enum":["learner","picked","authored"],"description":"Where it came from."},"seq":{"type":"number","description":"A textbook's place in the project's study order, 1-based and gapless; thin links carry none."},"toc":{"type":"array","items":{"type":"object","properties":{"n":{"type":"number","description":"1-based position — what cover locators count."},"title":{"type":"string"},"part":{"type":"string","description":"The part / test / unit it sits under, when the resource groups chapters."}},"required":["n","title"],"additionalProperties":true},"description":"The thick/thin switch: present (and non-empty) = thick."},"tocSource":{"type":"object","properties":{"by":{"type":"string","enum":["web","model","photo"]},"url":{"type":"string"},"verifiedAt":{"type":"string"}},"required":["by"],"additionalProperties":true},"meta":{"type":"object","properties":{"bookKind":{"type":"string","enum":["material","knowledge"]},"short":{"type":"string","description":"The cover's abbreviation (「剑5」「PNS」); derived from the title when absent."},"extras":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"note":{"type":"string","description":"One line from the coach: what it is for."},"where":{"type":"string","description":"Where it is in the resource (「p.152」)."},"when":{"type":"string","enum":["reference","before"]}},"required":["title","when"],"additionalProperties":true}},"author":{"type":"string"},"edition":{"type":"string"},"isbn":{"type":"string"}},"required":[],"additionalProperties":true},"createdAt":{"type":"string"}},"required":["id","title","kind","createdAt"],"additionalProperties":true}},"required":["ok","resource"],"additionalProperties":true}]},
|
|
2957
|
+
},
|
|
2958
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":154,"column":3},
|
|
2959
|
+
},
|
|
2960
|
+
'library/stats': {
|
|
2961
|
+
service: 'libraryRemote',
|
|
2962
|
+
description: 'The whole-library tally.',
|
|
2963
|
+
invocation: { kind: 'direct' },
|
|
2964
|
+
parameters: [
|
|
2965
|
+
],
|
|
2966
|
+
result: {
|
|
2967
|
+
mode: 'strict',
|
|
2968
|
+
typeSymbol: '@khorsheed/dsh-library#library/stats:result',
|
|
2969
|
+
create: _khorsheed_dsh_library_library_stats_result$schema,
|
|
2970
|
+
schema: _khorsheed_dsh_library_library_stats_result$schema(),
|
|
2971
|
+
jsonSchema: {"type":"object","properties":{"projects":{"type":"number"},"books":{"type":"number"},"cards":{"type":"number"},"due":{"type":"number"},"quizzes":{"type":"number"},"attempts":{"type":"number"}},"required":["projects","books","cards","due","quizzes","attempts"],"additionalProperties":true},
|
|
2972
|
+
},
|
|
2973
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":346,"column":3},
|
|
2974
|
+
},
|
|
2975
|
+
'library/undoCards': {
|
|
2976
|
+
service: 'libraryRemote',
|
|
2977
|
+
description: 'The toast\'s 撤销.',
|
|
2978
|
+
invocation: { kind: 'direct' },
|
|
2979
|
+
parameters: [
|
|
2980
|
+
{
|
|
2981
|
+
name: 'request',
|
|
2982
|
+
source: 'json',
|
|
2983
|
+
codec: {
|
|
2984
|
+
mode: 'strict',
|
|
2985
|
+
typeSymbol: '@khorsheed/dsh-library#library/undoCards:request',
|
|
2986
|
+
create: _khorsheed_dsh_library_library_undoCards_parameter_0$schema,
|
|
2987
|
+
schema: _khorsheed_dsh_library_library_undoCards_parameter_0$schema(),
|
|
2988
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"ids":{"type":"array","items":{"type":"string"}},"at":{"type":"string"}},"required":["projectId","ids","at"],"additionalProperties":true},
|
|
2989
|
+
},
|
|
2990
|
+
strictCodec: {
|
|
2991
|
+
mode: 'strict',
|
|
2992
|
+
typeSymbol: '@khorsheed/dsh-library#library/undoCards:request',
|
|
2993
|
+
create: _khorsheed_dsh_library_library_undoCards_parameter_0_strict$schema,
|
|
2994
|
+
schema: _khorsheed_dsh_library_library_undoCards_parameter_0_strict$schema(),
|
|
2995
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"ids":{"type":"array","items":{"type":"string"}},"at":{"type":"string"}},"required":["projectId","ids","at"],"additionalProperties":false},
|
|
2996
|
+
},
|
|
2997
|
+
},
|
|
2998
|
+
],
|
|
2999
|
+
result: {
|
|
3000
|
+
mode: 'strict',
|
|
3001
|
+
typeSymbol: '@khorsheed/dsh-library/types#LibraryOutcome',
|
|
3002
|
+
create: _khorsheed_dsh_library_library_undoCards_result$schema,
|
|
3003
|
+
schema: _khorsheed_dsh_library_library_undoCards_result$schema(),
|
|
3004
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","enum":["not-found","exists","io","unavailable","unbound","invalid","corrupt","storage-unavailable","evidence-gate","state-machine","ref-incomplete"]},"message":{"type":"string","description":"The human/model-readable reason, written to teach the correct call."}},"required":["ok","error","message"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"removed":{"type":"number"},"reverted":{"type":"number"}},"required":["ok","removed","reverted"],"additionalProperties":true}]},
|
|
3005
|
+
},
|
|
3006
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":262,"column":3},
|
|
3007
|
+
},
|
|
3008
|
+
'library/updateProject': {
|
|
3009
|
+
service: 'libraryRemote',
|
|
3010
|
+
description: 'Change a project\'s look, goal or name.',
|
|
3011
|
+
invocation: { kind: 'direct' },
|
|
3012
|
+
parameters: [
|
|
3013
|
+
{
|
|
3014
|
+
name: 'request',
|
|
3015
|
+
source: 'json',
|
|
3016
|
+
codec: {
|
|
3017
|
+
mode: 'strict',
|
|
3018
|
+
typeSymbol: '@khorsheed/dsh-library#library/updateProject:request',
|
|
3019
|
+
create: _khorsheed_dsh_library_library_updateProject_parameter_0$schema,
|
|
3020
|
+
schema: _khorsheed_dsh_library_library_updateProject_parameter_0$schema(),
|
|
3021
|
+
jsonSchema: {"type":"object","properties":{"id":{"type":"string"},"patch":{"type":"object","properties":{"name":{"type":"string"},"goal":{"type":"string"},"template":{"type":"string","enum":["language","subject","custom"]},"color":{"type":"string","enum":["ember","amber","moss","teal","sky","indigo","plum","rose"]},"icon":{"type":"string","enum":["code","book","globe","brain","flask","atom","leaf","pen","music","scale","chart","compass"]}},"required":[],"additionalProperties":true}},"required":["id","patch"],"additionalProperties":true},
|
|
3022
|
+
},
|
|
3023
|
+
strictCodec: {
|
|
3024
|
+
mode: 'strict',
|
|
3025
|
+
typeSymbol: '@khorsheed/dsh-library#library/updateProject:request',
|
|
3026
|
+
create: _khorsheed_dsh_library_library_updateProject_parameter_0_strict$schema,
|
|
3027
|
+
schema: _khorsheed_dsh_library_library_updateProject_parameter_0_strict$schema(),
|
|
3028
|
+
jsonSchema: {"type":"object","properties":{"id":{"type":"string"},"patch":{"type":"object","properties":{"name":{"type":"string"},"goal":{"type":"string"},"template":{"type":"string","enum":["language","subject","custom"]},"color":{"type":"string","enum":["ember","amber","moss","teal","sky","indigo","plum","rose"]},"icon":{"type":"string","enum":["code","book","globe","brain","flask","atom","leaf","pen","music","scale","chart","compass"]}},"required":[],"additionalProperties":false}},"required":["id","patch"],"additionalProperties":false},
|
|
3029
|
+
},
|
|
3030
|
+
},
|
|
3031
|
+
],
|
|
3032
|
+
result: {
|
|
3033
|
+
mode: 'strict',
|
|
3034
|
+
typeSymbol: '@khorsheed/dsh-library/types#LibraryOutcome',
|
|
3035
|
+
create: _khorsheed_dsh_library_library_updateProject_result$schema,
|
|
3036
|
+
schema: _khorsheed_dsh_library_library_updateProject_result$schema(),
|
|
3037
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","enum":["not-found","exists","io","unavailable","unbound","invalid","corrupt","storage-unavailable","evidence-gate","state-machine","ref-incomplete"]},"message":{"type":"string","description":"The human/model-readable reason, written to teach the correct call."}},"required":["ok","error","message"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"project":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"template":{"type":"string","enum":["language","subject","custom"]},"color":{"type":"string","enum":["ember","amber","moss","teal","sky","indigo","plum","rose"]},"icon":{"type":"string","enum":["code","book","globe","brain","flask","atom","leaf","pen","music","scale","chart","compass"]},"templateNote":{"type":"string","description":"The learner's own words for a custom template."},"goal":{"type":"string","description":"The learner's goal (「学术类 7 分,12 月 14 日」)."},"createdAt":{"type":"string"}},"required":["id","name","template","createdAt"],"additionalProperties":true}},"required":["ok","project"],"additionalProperties":true}]},
|
|
3038
|
+
},
|
|
3039
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":104,"column":3},
|
|
3040
|
+
},
|
|
3041
|
+
'library/writeCards': {
|
|
3042
|
+
service: 'libraryRemote',
|
|
3043
|
+
description: 'Record cards by hand.',
|
|
3044
|
+
invocation: { kind: 'direct' },
|
|
3045
|
+
parameters: [
|
|
3046
|
+
{
|
|
3047
|
+
name: 'request',
|
|
3048
|
+
source: 'json',
|
|
3049
|
+
codec: {
|
|
3050
|
+
mode: 'strict',
|
|
3051
|
+
typeSymbol: '@khorsheed/dsh-library#library/writeCards:request',
|
|
3052
|
+
create: _khorsheed_dsh_library_library_writeCards_parameter_0$schema,
|
|
3053
|
+
schema: _khorsheed_dsh_library_library_writeCards_parameter_0$schema(),
|
|
3054
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"},"cards":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["word","concept"]},"term":{"type":"string"},"aliases":{"type":"array","items":{"type":"string"}},"gloss":{"type":"string"},"userGloss":{"type":"string"},"context":{"type":"object","properties":{"sentence":{"type":"string"},"pageId":{"type":"string"},"nodeId":{"type":"string"}},"required":["sentence"],"additionalProperties":true},"source":{"type":"object","properties":{"type":{"type":"string","enum":["manual","photo","quiz","chat"]},"ref":{"type":"string"},"note":{"type":"string"}},"required":["type"],"additionalProperties":true},"resourceId":{"type":"string","description":"Hang it on this resource (defaults to the call's resource, when one applies)."},"weaken":{"type":"boolean","description":"The learner showed they are stuck: raise weakness by one."},"mergeInto":{"type":"string","description":"Decide a near-duplicate: merge into this existing card …"},"asNew":{"type":"boolean","description":"… or keep it as a new card on purpose."}},"required":["kind","term","gloss","source"],"additionalProperties":true}}},"required":["projectId","cards"],"additionalProperties":true},
|
|
3055
|
+
},
|
|
3056
|
+
strictCodec: {
|
|
3057
|
+
mode: 'strict',
|
|
3058
|
+
typeSymbol: '@khorsheed/dsh-library#library/writeCards:request',
|
|
3059
|
+
create: _khorsheed_dsh_library_library_writeCards_parameter_0_strict$schema,
|
|
3060
|
+
schema: _khorsheed_dsh_library_library_writeCards_parameter_0_strict$schema(),
|
|
3061
|
+
jsonSchema: {"type":"object","properties":{"projectId":{"type":"string"},"resourceId":{"type":"string"},"cards":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["word","concept"]},"term":{"type":"string"},"aliases":{"type":"array","items":{"type":"string"}},"gloss":{"type":"string"},"userGloss":{"type":"string"},"context":{"type":"object","properties":{"sentence":{"type":"string"},"pageId":{"type":"string"},"nodeId":{"type":"string"}},"required":["sentence"],"additionalProperties":false},"source":{"type":"object","properties":{"type":{"type":"string","enum":["manual","photo","quiz","chat"]},"ref":{"type":"string"},"note":{"type":"string"}},"required":["type"],"additionalProperties":false},"resourceId":{"type":"string","description":"Hang it on this resource (defaults to the call's resource, when one applies)."},"weaken":{"type":"boolean","description":"The learner showed they are stuck: raise weakness by one."},"mergeInto":{"type":"string","description":"Decide a near-duplicate: merge into this existing card …"},"asNew":{"type":"boolean","description":"… or keep it as a new card on purpose."}},"required":["kind","term","gloss","source"],"additionalProperties":false}}},"required":["projectId","cards"],"additionalProperties":false},
|
|
3062
|
+
},
|
|
3063
|
+
},
|
|
3064
|
+
],
|
|
3065
|
+
result: {
|
|
3066
|
+
mode: 'strict',
|
|
3067
|
+
typeSymbol: '@khorsheed/dsh-library/types#LibraryOutcome',
|
|
3068
|
+
create: _khorsheed_dsh_library_library_writeCards_result$schema,
|
|
3069
|
+
schema: _khorsheed_dsh_library_library_writeCards_result$schema(),
|
|
3070
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string","enum":["not-found","exists","io","unavailable","unbound","invalid","corrupt","storage-unavailable","evidence-gate","state-machine","ref-incomplete"]},"message":{"type":"string","description":"The human/model-readable reason, written to teach the correct call."}},"required":["ok","error","message"],"additionalProperties":true},{"type":"object","properties":{"ok":{"type":"boolean","const":true},"added":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["word","concept"]},"term":{"type":"string"},"aliases":{"type":"array","items":{"type":"string"},"description":"Other spellings / names the same card answers to (instalments, 不应期)."},"gloss":{"type":"string","description":"The meaning: the in-context sense for a word, a one-line explanation for a concept."},"userGloss":{"type":"string","description":"The learner's own handwritten gloss, kept apart from the model's."},"contexts":{"type":"array","items":{"type":"object","properties":{"sentence":{"type":"string"},"resourceId":{"type":"string"},"pageId":{"type":"string"},"nodeId":{"type":"string"}},"required":["sentence"],"additionalProperties":true}},"resourceId":{"type":"string","description":"Hung on a resource when it came from one; absent = project-level (「不挂书」)."},"sources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["manual","photo","quiz","chat"]},"ref":{"type":"string","description":"photo: the page id; quiz: the assessment id; chat: the session id when known."},"note":{"type":"string","description":"What happened, in a few words (「说老是记混」「T/F/NG 第 9 题」)."},"weakened":{"type":"boolean","description":"This source raised the weakness by one (an undo lowers it back)."},"at":{"type":"string"}},"required":["type","at"],"additionalProperties":true}},"weakness":{"type":"number","description":"0–3: how often the learner got stuck here (asked again, answered wrong)."},"mastery":{"type":"object","properties":{"box":{"type":"number"},"dueAt":{"type":"string"},"streak":{"type":"number"}},"required":["box","dueAt","streak"],"additionalProperties":true},"status":{"type":"string","enum":["active","deleted","mastered"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","kind","term","aliases","gloss","contexts","sources","weakness","mastery","status","createdAt","updatedAt"],"additionalProperties":true}},"merged":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["word","concept"]},"term":{"type":"string"},"aliases":{"type":"array","items":{"type":"string"},"description":"Other spellings / names the same card answers to (instalments, 不应期)."},"gloss":{"type":"string","description":"The meaning: the in-context sense for a word, a one-line explanation for a concept."},"userGloss":{"type":"string","description":"The learner's own handwritten gloss, kept apart from the model's."},"contexts":{"type":"array","items":{"type":"object","properties":{"sentence":{"type":"string"},"resourceId":{"type":"string"},"pageId":{"type":"string"},"nodeId":{"type":"string"}},"required":["sentence"],"additionalProperties":true}},"resourceId":{"type":"string","description":"Hung on a resource when it came from one; absent = project-level (「不挂书」)."},"sources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["manual","photo","quiz","chat"]},"ref":{"type":"string","description":"photo: the page id; quiz: the assessment id; chat: the session id when known."},"note":{"type":"string","description":"What happened, in a few words (「说老是记混」「T/F/NG 第 9 题」)."},"weakened":{"type":"boolean","description":"This source raised the weakness by one (an undo lowers it back)."},"at":{"type":"string"}},"required":["type","at"],"additionalProperties":true}},"weakness":{"type":"number","description":"0–3: how often the learner got stuck here (asked again, answered wrong)."},"mastery":{"type":"object","properties":{"box":{"type":"number"},"dueAt":{"type":"string"},"streak":{"type":"number"}},"required":["box","dueAt","streak"],"additionalProperties":true},"status":{"type":"string","enum":["active","deleted","mastered"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","kind","term","aliases","gloss","contexts","sources","weakness","mastery","status","createdAt","updatedAt"],"additionalProperties":true}},"pending":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"term":{"type":"string"},"candidates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"term":{"type":"string"},"gloss":{"type":"string"}},"required":["id","term","gloss"],"additionalProperties":true}}},"required":["index","term","candidates"],"additionalProperties":true},"description":"Near-duplicates held back — resend each with mergeInto or asNew."}},"required":["ok","added","merged","pending"],"additionalProperties":true}]},
|
|
3071
|
+
},
|
|
3072
|
+
sourceLocation: {"file":"packages/library/src/remote.ts","line":246,"column":3},
|
|
3073
|
+
},
|
|
3074
|
+
},
|
|
3075
|
+
}, z)
|
|
3076
|
+
|
|
3077
|
+
export const TYPERT = {
|
|
3078
|
+
package: '@khorsheed/dsh-library',
|
|
3079
|
+
face: 'host',
|
|
3080
|
+
schemas: [
|
|
3081
|
+
],
|
|
3082
|
+
get invocations() { return $remote.descriptors },
|
|
3083
|
+
model: {
|
|
3084
|
+
"services": [
|
|
3085
|
+
{
|
|
3086
|
+
"tags": [],
|
|
3087
|
+
"key": "library",
|
|
3088
|
+
"exportName": "LibraryService",
|
|
3089
|
+
"members": [
|
|
3090
|
+
{
|
|
3091
|
+
"kind": "method",
|
|
3092
|
+
"name": "getBinding",
|
|
3093
|
+
"signature": "getBinding(sessionId: string): LibraryBinding | undefined",
|
|
3094
|
+
"summary": "The project / resource a session works on, when it is bound.",
|
|
3095
|
+
"jsDoc": "/** The project / resource a session works on, when it is bound. */"
|
|
3096
|
+
},
|
|
3097
|
+
{
|
|
3098
|
+
"kind": "method",
|
|
3099
|
+
"name": "setBinding",
|
|
3100
|
+
"signature": "async setBinding(sessionId: string, binding: LibraryBinding | null): Promise<LibraryOutcome<{ binding: LibraryBinding | null }>>",
|
|
3101
|
+
"summary": "Bind a session (null unbinds).",
|
|
3102
|
+
"jsDoc": "/** Bind a session (null unbinds). The project and resource must exist. */"
|
|
3103
|
+
},
|
|
3104
|
+
{
|
|
3105
|
+
"kind": "method",
|
|
3106
|
+
"name": "bindingSummary",
|
|
3107
|
+
"signature": "bindingSummary(sessionId: string, cardLimit: number = 12): { binding?: LibraryBinding project?: LibraryProject resource?: LibraryResource textbooks: LibraryResourceProgress[] /** The bound textbook's current station and its points' mastery (where the coach is teaching now). */ station?: { id: string; title: string; mastery: LibraryStationMastery } weakCards: LibraryCard[] }",
|
|
3108
|
+
"summary": "The bound session's working set, read synchronously (the per-turn prompt context renders inside a synchronous callback): the project, the bound resource, every textbook's path state in study order (so the coach reads what the learner adopted, discarded or reordered in the sidebar, every turn), and the weakest live cards.",
|
|
3109
|
+
"jsDoc": "/**\n * The bound session's working set, read synchronously (the per-turn prompt\n * context renders inside a synchronous callback): the project, the bound\n * resource, every textbook's path state in study order (so the coach reads\n * what the learner adopted, discarded or reordered in the sidebar, every\n * turn), and the weakest live cards.\n */"
|
|
3110
|
+
},
|
|
3111
|
+
{
|
|
3112
|
+
"kind": "method",
|
|
3113
|
+
"name": "listEvents",
|
|
3114
|
+
"signature": "async listEvents(request: { projectId: string; limit?: number; types?: readonly LibraryEventType[] }): Promise<{ events: LibraryEvent[] }>",
|
|
3115
|
+
"summary": "One project's audit trail, newest first, optionally some types only.",
|
|
3116
|
+
"jsDoc": "/** One project's audit trail, newest first, optionally some types only. */"
|
|
3117
|
+
},
|
|
3118
|
+
{
|
|
3119
|
+
"kind": "method",
|
|
3120
|
+
"name": "projectName",
|
|
3121
|
+
"signature": "projectName(projectId: string): string | undefined",
|
|
3122
|
+
"summary": "A project's name, when it exists (synchronous — the per-turn context reads it).",
|
|
3123
|
+
"jsDoc": "/** A project's name, when it exists (synchronous — the per-turn context reads it). */"
|
|
3124
|
+
},
|
|
3125
|
+
{
|
|
3126
|
+
"kind": "method",
|
|
3127
|
+
"name": "recentChanges",
|
|
3128
|
+
"signature": "async recentChanges(request: { limit?: number }): Promise<{ changes: (LibraryEvent & { projectId: string; projectName: string })[] }>",
|
|
3129
|
+
"summary": "The newest knowledge-point state changes across projects (今日 「最近的变化」).",
|
|
3130
|
+
"jsDoc": "/** The newest knowledge-point state changes across projects (今日 「最近的变化」). */"
|
|
3131
|
+
},
|
|
3132
|
+
{
|
|
3133
|
+
"kind": "method",
|
|
3134
|
+
"name": "recentRecords",
|
|
3135
|
+
"signature": "async recentRecords(request: { limit?: number }): Promise<{ records: (LibraryEvent & { projectId: string; projectName: string })[] }>"
|
|
3136
|
+
},
|
|
3137
|
+
{
|
|
3138
|
+
"kind": "method",
|
|
3139
|
+
"name": "latestActivity",
|
|
3140
|
+
"signature": "async latestActivity(): Promise<{ at?: string; session?: { id: string; at: string } }>",
|
|
3141
|
+
"summary": "The newest event's timestamp across the library — the pane's change poll.",
|
|
3142
|
+
"jsDoc": "/**\n * The newest event's timestamp across the library — the pane's change poll.\n * The Remote face is request/response (no push), so the sidebar learns\n * host-side writes (a landed quiz, a recorded page) by polling this and\n * re-reading when it moves. Writes that log no event (creating a project)\n * move it too. `session` names the newest session-made write, so the client\n * can reveal the library next to the conversation that just started using it.\n */"
|
|
3143
|
+
},
|
|
3144
|
+
{
|
|
3145
|
+
"kind": "method",
|
|
3146
|
+
"name": "stats",
|
|
3147
|
+
"signature": "async stats(): Promise<{ projects: number; books: number; cards: number; due: number; quizzes: number; attempts: number }>",
|
|
3148
|
+
"summary": "The whole-library tally.",
|
|
3149
|
+
"jsDoc": "/** The whole-library tally. */"
|
|
3150
|
+
}
|
|
3151
|
+
],
|
|
3152
|
+
"types": [
|
|
3153
|
+
{
|
|
3154
|
+
"name": "LibraryBinding",
|
|
3155
|
+
"declaration": "export interface LibraryBinding {\n readonly projectId: string;\n readonly resourceId?: string;\n readonly previousProjectId?: string;\n}"
|
|
3156
|
+
},
|
|
3157
|
+
{
|
|
3158
|
+
"name": "LibraryBookKind",
|
|
3159
|
+
"declaration": "export type LibraryBookKind = 'knowledge' | 'material';"
|
|
3160
|
+
},
|
|
3161
|
+
{
|
|
3162
|
+
"name": "LibraryCard",
|
|
3163
|
+
"declaration": "export interface LibraryCard {\n readonly id: string;\n readonly kind: LibraryCardKind;\n readonly term: string;\n readonly aliases: readonly string[];\n readonly gloss: string;\n readonly userGloss?: string;\n readonly contexts: readonly LibraryCardContext[];\n readonly resourceId?: string;\n readonly sources: readonly LibraryCardSource[];\n readonly weakness: number;\n readonly mastery: LibraryMastery;\n readonly status: 'active' | 'mastered' | 'deleted';\n readonly createdAt: string;\n readonly updatedAt: string;\n}"
|
|
3164
|
+
},
|
|
3165
|
+
{
|
|
3166
|
+
"name": "LibraryCardContext",
|
|
3167
|
+
"declaration": "export interface LibraryCardContext {\n readonly sentence: string;\n readonly resourceId?: string;\n readonly pageId?: string;\n readonly nodeId?: string;\n}"
|
|
3168
|
+
},
|
|
3169
|
+
{
|
|
3170
|
+
"name": "LibraryCardKind",
|
|
3171
|
+
"declaration": "export type LibraryCardKind = 'word' | 'concept';"
|
|
3172
|
+
},
|
|
3173
|
+
{
|
|
3174
|
+
"name": "LibraryCardSource",
|
|
3175
|
+
"declaration": "export interface LibraryCardSource {\n readonly type: LibraryCardSourceType;\n readonly ref?: string;\n readonly note?: string;\n readonly weakened?: boolean;\n readonly at: string;\n}"
|
|
3176
|
+
},
|
|
3177
|
+
{
|
|
3178
|
+
"name": "LibraryCardSourceType",
|
|
3179
|
+
"declaration": "export type LibraryCardSourceType = 'photo' | 'chat' | 'quiz' | 'manual';"
|
|
3180
|
+
},
|
|
3181
|
+
{
|
|
3182
|
+
"name": "LibraryColor",
|
|
3183
|
+
"declaration": "export type LibraryColor = typeof LIBRARY_COLORS[number];"
|
|
3184
|
+
},
|
|
3185
|
+
{
|
|
3186
|
+
"name": "LibraryErrorCode",
|
|
3187
|
+
"declaration": "export type LibraryErrorCode = 'not-found' | 'exists' | 'invalid' | 'corrupt' | 'io' | 'storage-unavailable' | 'evidence-gate' | 'state-machine' | 'unavailable' | 'ref-incomplete' | 'unbound';"
|
|
3188
|
+
},
|
|
3189
|
+
{
|
|
3190
|
+
"name": "LibraryEvent",
|
|
3191
|
+
"declaration": "export interface LibraryEvent {\n readonly at: string;\n readonly type: LibraryEventType;\n readonly id?: string;\n readonly title?: string;\n readonly resourceId?: string;\n readonly source?: LibraryCardSourceType;\n readonly session?: string;\n readonly ids?: readonly string[];\n readonly count?: number;\n readonly count2?: number;\n readonly ratio?: number;\n readonly nodeId?: string;\n readonly from?: LibraryPointState;\n readonly to?: LibraryPointState;\n readonly detail?: string;\n}"
|
|
3192
|
+
},
|
|
3193
|
+
{
|
|
3194
|
+
"name": "LibraryEventType",
|
|
3195
|
+
"declaration": "export type LibraryEventType = 'resource.added' | 'roadmap.drafted' | 'roadmap.adopted' | 'page.recorded' | 'cards.recorded' | 'card.edited' | 'quiz.created' | 'attempt.assessed' | 'node.completed' | 'node.unlocked' | 'node.noted' | 'point.changed';"
|
|
3196
|
+
},
|
|
3197
|
+
{
|
|
3198
|
+
"name": "LibraryIcon",
|
|
3199
|
+
"declaration": "export type LibraryIcon = typeof LIBRARY_ICONS[number];"
|
|
3200
|
+
},
|
|
3201
|
+
{
|
|
3202
|
+
"name": "LibraryMastery",
|
|
3203
|
+
"declaration": "export interface LibraryMastery {\n readonly box: number;\n readonly dueAt: string;\n readonly streak: number;\n}"
|
|
3204
|
+
},
|
|
3205
|
+
{
|
|
3206
|
+
"name": "LibraryOpenMiss",
|
|
3207
|
+
"declaration": "export interface LibraryOpenMiss {\n readonly key: string;\n readonly assessmentId: string;\n readonly questionId: string;\n readonly question: LibraryQuizQuestion;\n readonly at: string;\n}"
|
|
3208
|
+
},
|
|
3209
|
+
{
|
|
3210
|
+
"name": "LibraryOutcome",
|
|
3211
|
+
"declaration": "export type LibraryOutcome<T> = ({ readonly ok: true; } & T) | LibraryRefusal;"
|
|
3212
|
+
},
|
|
3213
|
+
{
|
|
3214
|
+
"name": "LibraryPointMastery",
|
|
3215
|
+
"declaration": "export interface LibraryPointMastery {\n readonly id: string;\n readonly title: string;\n readonly state: LibraryPointState;\n readonly open: readonly LibraryOpenMiss[];\n readonly notes: readonly LibraryPointNote[];\n readonly lastProbe?: { readonly at: string; readonly pass: boolean; };\n readonly asked: number;\n readonly right: number;\n readonly rightSittings: number;\n readonly history: readonly LibraryPointSitting[];\n}"
|
|
3216
|
+
},
|
|
3217
|
+
{
|
|
3218
|
+
"name": "LibraryPointNote",
|
|
3219
|
+
"declaration": "export interface LibraryPointNote {\n readonly text: string;\n readonly term?: string;\n readonly at: string;\n readonly session?: string;\n}"
|
|
3220
|
+
},
|
|
3221
|
+
{
|
|
3222
|
+
"name": "LibraryPointSitting",
|
|
3223
|
+
"declaration": "export interface LibraryPointSitting {\n readonly at: string;\n readonly retake: boolean;\n readonly total: number;\n readonly right: number;\n}"
|
|
3224
|
+
},
|
|
3225
|
+
{
|
|
3226
|
+
"name": "LibraryPointState",
|
|
3227
|
+
"declaration": "export type LibraryPointState = 'untested' | 'weak' | 'practicing' | 'mastered';"
|
|
3228
|
+
},
|
|
3229
|
+
{
|
|
3230
|
+
"name": "LibraryProject",
|
|
3231
|
+
"declaration": "export interface LibraryProject {\n readonly id: string;\n readonly name: string;\n readonly template: LibraryTemplate;\n readonly color?: LibraryColor;\n readonly icon?: LibraryIcon;\n readonly templateNote?: string;\n readonly goal?: string;\n readonly createdAt: string;\n}"
|
|
3232
|
+
},
|
|
3233
|
+
{
|
|
3234
|
+
"name": "LibraryQuestionEvidence",
|
|
3235
|
+
"declaration": "export interface LibraryQuestionEvidence {\n readonly kind: 'photo' | 'web' | 'knowledge';\n readonly pageId?: string;\n readonly url?: string;\n readonly quote?: string;\n}"
|
|
3236
|
+
},
|
|
3237
|
+
{
|
|
3238
|
+
"name": "LibraryQuestionTarget",
|
|
3239
|
+
"declaration": "export interface LibraryQuestionTarget {\n readonly kind: 'marked' | 'asked' | 'missed' | 'topic';\n readonly cardIds?: readonly string[];\n}"
|
|
3240
|
+
},
|
|
3241
|
+
{
|
|
3242
|
+
"name": "LibraryQuizQuestion",
|
|
3243
|
+
"declaration": "export interface LibraryQuizQuestion {\n readonly id: string;\n readonly kind: 'choice' | 'fill' | 'free';\n readonly prompt: string;\n readonly options?: readonly string[];\n readonly answer: string;\n readonly explanation?: string;\n readonly point?: string;\n readonly origin?: { readonly assessmentId: string; readonly questionId: string; };\n readonly target: LibraryQuestionTarget;\n readonly evidence: LibraryQuestionEvidence;\n}"
|
|
3244
|
+
},
|
|
3245
|
+
{
|
|
3246
|
+
"name": "LibraryRefusal",
|
|
3247
|
+
"declaration": "export interface LibraryRefusal {\n readonly ok: false;\n readonly error: LibraryErrorCode;\n readonly message: string;\n}"
|
|
3248
|
+
},
|
|
3249
|
+
{
|
|
3250
|
+
"name": "LibraryResource",
|
|
3251
|
+
"declaration": "export interface LibraryResource {\n readonly id: string;\n readonly title: string;\n readonly kind: LibraryResourceKind;\n readonly url?: string;\n readonly note?: string;\n readonly origin?: LibraryResourceOrigin;\n readonly seq?: number;\n readonly toc?: readonly LibraryTocEntry[];\n readonly tocSource?: LibraryTocSource;\n readonly meta?: LibraryResourceMeta;\n readonly createdAt: string;\n}"
|
|
3252
|
+
},
|
|
3253
|
+
{
|
|
3254
|
+
"name": "LibraryResourceExtra",
|
|
3255
|
+
"declaration": "export interface LibraryResourceExtra {\n readonly title: string;\n readonly note?: string;\n readonly where?: string;\n readonly when: 'before' | 'reference';\n}"
|
|
3256
|
+
},
|
|
3257
|
+
{
|
|
3258
|
+
"name": "LibraryResourceKind",
|
|
3259
|
+
"declaration": "export type LibraryResourceKind = typeof LIBRARY_RESOURCE_KINDS[number];"
|
|
3260
|
+
},
|
|
3261
|
+
{
|
|
3262
|
+
"name": "LibraryResourceMeta",
|
|
3263
|
+
"declaration": "export interface LibraryResourceMeta {\n readonly bookKind?: LibraryBookKind;\n readonly short?: string;\n readonly extras?: readonly LibraryResourceExtra[];\n readonly author?: string;\n readonly edition?: string;\n readonly isbn?: string;\n}"
|
|
3264
|
+
},
|
|
3265
|
+
{
|
|
3266
|
+
"name": "LibraryResourceOrigin",
|
|
3267
|
+
"declaration": "export type LibraryResourceOrigin = typeof LIBRARY_RESOURCE_ORIGINS[number];"
|
|
3268
|
+
},
|
|
3269
|
+
{
|
|
3270
|
+
"name": "LibraryResourceProgress",
|
|
3271
|
+
"declaration": "export interface LibraryResourceProgress {\n readonly id: string;\n readonly title: string;\n readonly kind: LibraryResourceKind;\n readonly seq?: number;\n readonly origin?: LibraryResourceOrigin;\n readonly roadmap?: { readonly done: number; readonly total: number; };\n readonly current?: { readonly id: string; readonly title: string; };\n readonly hasDraft: boolean;\n readonly draftTotal?: number;\n}"
|
|
3272
|
+
},
|
|
3273
|
+
{
|
|
3274
|
+
"name": "LibraryStationMastery",
|
|
3275
|
+
"declaration": "export interface LibraryStationMastery {\n readonly points: readonly LibraryPointMastery[];\n readonly open: readonly LibraryOpenMiss[];\n}"
|
|
3276
|
+
},
|
|
3277
|
+
{
|
|
3278
|
+
"name": "LibraryTemplate",
|
|
3279
|
+
"declaration": "export type LibraryTemplate = 'language' | 'subject' | 'custom';"
|
|
3280
|
+
},
|
|
3281
|
+
{
|
|
3282
|
+
"name": "LibraryTocEntry",
|
|
3283
|
+
"declaration": "export interface LibraryTocEntry {\n readonly n: number;\n readonly title: string;\n readonly part?: string;\n}"
|
|
3284
|
+
},
|
|
3285
|
+
{
|
|
3286
|
+
"name": "LibraryTocSource",
|
|
3287
|
+
"declaration": "export interface LibraryTocSource {\n readonly by: 'web' | 'model' | 'photo';\n readonly url?: string;\n readonly verifiedAt?: string;\n}"
|
|
3288
|
+
}
|
|
3289
|
+
]
|
|
3290
|
+
},
|
|
3291
|
+
{
|
|
3292
|
+
"description": "The wire namespace is `library`: the browser calls `remote.library.*`.",
|
|
3293
|
+
"summary": "The wire namespace is `library`: the browser calls `remote.library.*`.",
|
|
3294
|
+
"tags": [],
|
|
3295
|
+
"jsDoc": "/** The wire namespace is `library`: the browser calls `remote.library.*`. */",
|
|
3296
|
+
"key": "libraryRemote",
|
|
3297
|
+
"exportName": "LibraryRemoteService",
|
|
3298
|
+
"members": [
|
|
3299
|
+
{
|
|
3300
|
+
"kind": "method",
|
|
3301
|
+
"name": "capabilities",
|
|
3302
|
+
"signature": "@Remote('capabilities') capabilities(): Promise<LibraryCapabilities>",
|
|
3303
|
+
"summary": "What this composition can do: storage and attachments, with the reason — the display contract.",
|
|
3304
|
+
"jsDoc": "/** What this composition can do: storage and attachments, with the reason — the display contract. */"
|
|
3305
|
+
},
|
|
3306
|
+
{
|
|
3307
|
+
"kind": "method",
|
|
3308
|
+
"name": "listProjects",
|
|
3309
|
+
"signature": "@Remote('listProjects') listProjects(): Promise<{ projects: LibraryProjectSummary[] }>",
|
|
3310
|
+
"summary": "Every project with its shelf progress and card tallies.",
|
|
3311
|
+
"jsDoc": "/** Every project with its shelf progress and card tallies. */"
|
|
3312
|
+
},
|
|
3313
|
+
{
|
|
3314
|
+
"kind": "method",
|
|
3315
|
+
"name": "getProject",
|
|
3316
|
+
"signature": "@Remote('getProject') getProject(request: { id: string }): Promise<LibraryOutcome<{ project: LibraryProjectSummary; resources: LibraryResource[] }>>",
|
|
3317
|
+
"summary": "One project's summary plus its resources.",
|
|
3318
|
+
"jsDoc": "/** One project's summary plus its resources. */"
|
|
3319
|
+
},
|
|
3320
|
+
{
|
|
3321
|
+
"kind": "method",
|
|
3322
|
+
"name": "createProject",
|
|
3323
|
+
"signature": "@Remote('createProject') createProject(request: { name: string; template?: LibraryTemplate; templateNote?: string; goal?: string; color?: LibraryColor; icon?: LibraryIcon }): Promise<LibraryOutcome<{ project: LibraryProject }>>",
|
|
3324
|
+
"summary": "Create a project.",
|
|
3325
|
+
"jsDoc": "/** Create a project. */"
|
|
3326
|
+
},
|
|
3327
|
+
{
|
|
3328
|
+
"kind": "method",
|
|
3329
|
+
"name": "updateProject",
|
|
3330
|
+
"signature": "@Remote('updateProject') updateProject(request: { id: string; patch: LibraryProjectPatch }): Promise<LibraryOutcome<{ project: LibraryProject }>>",
|
|
3331
|
+
"summary": "Change a project's look, goal or name.",
|
|
3332
|
+
"jsDoc": "/** Change a project's look, goal or name. */"
|
|
3333
|
+
},
|
|
3334
|
+
{
|
|
3335
|
+
"kind": "method",
|
|
3336
|
+
"name": "deleteProject",
|
|
3337
|
+
"signature": "@Remote('deleteProject') deleteProject(request: { id: string }): Promise<LibraryOutcome<{ id: string }>>",
|
|
3338
|
+
"summary": "Delete a project and everything it holds.",
|
|
3339
|
+
"jsDoc": "/** Delete a project and everything it holds. */"
|
|
3340
|
+
},
|
|
3341
|
+
{
|
|
3342
|
+
"kind": "method",
|
|
3343
|
+
"name": "getResource",
|
|
3344
|
+
"signature": "@Remote('getResource') getResource(request: { projectId: string; resourceId: string }): Promise<LibraryOutcome<{ resource: LibraryResource }>>",
|
|
3345
|
+
"summary": "One shelf entry, whole.",
|
|
3346
|
+
"jsDoc": "/** One shelf entry, whole. */"
|
|
3347
|
+
},
|
|
3348
|
+
{
|
|
3349
|
+
"kind": "method",
|
|
3350
|
+
"name": "listResources",
|
|
3351
|
+
"signature": "@Remote('listResources') listResources(request: { projectId: string }): Promise<{ resources: LibraryResource[] }>",
|
|
3352
|
+
"summary": "A project's shelf: textbooks in study order, then links oldest first.",
|
|
3353
|
+
"jsDoc": "/** A project's shelf: textbooks in study order, then links oldest first. */"
|
|
3354
|
+
},
|
|
3355
|
+
{
|
|
3356
|
+
"kind": "method",
|
|
3357
|
+
"name": "putResource",
|
|
3358
|
+
"signature": "@Remote('putResource') putResource(request: { projectId: string resourceId?: string title: string kind: LibraryResourceKind url?: string note?: string origin?: LibraryResourceOrigin seq?: number toc?: readonly { title: string; part?: string }[] tocSource?: LibraryTocSource bookKind?: LibraryBookKind short?: string extras?: readonly { title: string; note?: string; where?: string; when?: 'before' | 'reference' }[] author?: string edition?: string isbn?: string from?: { projectId: string; resourceId: string } }): Promise<LibraryOutcome<{ resource: LibraryResource }>>",
|
|
3359
|
+
"summary": "Put one entry on the shelf (a thin link from the sidebar's add form).",
|
|
3360
|
+
"jsDoc": "/** Put one entry on the shelf (a thin link from the sidebar's add form). */"
|
|
3361
|
+
},
|
|
3362
|
+
{
|
|
3363
|
+
"kind": "method",
|
|
3364
|
+
"name": "setBookKind",
|
|
3365
|
+
"signature": "@Remote('setBookKind') setBookKind(request: { projectId: string; resourceId: string; bookKind: 'knowledge' | 'material' }): Promise<LibraryOutcome<{ resource: LibraryResource }>>",
|
|
3366
|
+
"summary": "Switch a textbook between 知识型 and 材料型.",
|
|
3367
|
+
"jsDoc": "/** Switch a textbook between 知识型 and 材料型. */"
|
|
3368
|
+
},
|
|
3369
|
+
{
|
|
3370
|
+
"kind": "method",
|
|
3371
|
+
"name": "moveResource",
|
|
3372
|
+
"signature": "@Remote('moveResource') moveResource(request: { projectId: string; resourceId: string; seq: number }): Promise<LibraryOutcome<{ resources: LibraryResource[] }>>",
|
|
3373
|
+
"summary": "Move a textbook to another place in the study order.",
|
|
3374
|
+
"jsDoc": "/** Move a textbook to another place in the study order. */"
|
|
3375
|
+
},
|
|
3376
|
+
{
|
|
3377
|
+
"kind": "method",
|
|
3378
|
+
"name": "removeResource",
|
|
3379
|
+
"signature": "@Remote('removeResource') removeResource(request: { projectId: string; resourceId: string }): Promise<LibraryOutcome<{ id: string }>>",
|
|
3380
|
+
"summary": "Remove a shelf entry (its cards stay, unhung).",
|
|
3381
|
+
"jsDoc": "/** Remove a shelf entry (its cards stay, unhung). */"
|
|
3382
|
+
},
|
|
3383
|
+
{
|
|
3384
|
+
"kind": "method",
|
|
3385
|
+
"name": "getRoadmap",
|
|
3386
|
+
"signature": "@Remote('getRoadmap') getRoadmap(request: { projectId: string; resourceId: string }): Promise<{ roadmap?: LibraryRoadmap; draft?: LibraryRoadmap }>",
|
|
3387
|
+
"summary": "One textbook's adopted roadmap and its pending draft.",
|
|
3388
|
+
"jsDoc": "/** One textbook's adopted roadmap and its pending draft. */"
|
|
3389
|
+
},
|
|
3390
|
+
{
|
|
3391
|
+
"kind": "method",
|
|
3392
|
+
"name": "adoptRoadmap",
|
|
3393
|
+
"signature": "@Remote('adoptRoadmap') adoptRoadmap(request: { projectId: string; resourceId: string }): Promise<LibraryOutcome<{ roadmap: LibraryRoadmap }>>",
|
|
3394
|
+
"summary": "The learner's 采用.",
|
|
3395
|
+
"jsDoc": "/** The learner's 采用. */"
|
|
3396
|
+
},
|
|
3397
|
+
{
|
|
3398
|
+
"kind": "method",
|
|
3399
|
+
"name": "discardDraft",
|
|
3400
|
+
"signature": "@Remote('discardDraft') discardDraft(request: { projectId: string; resourceId: string }): Promise<LibraryOutcome<{ resourceId: string }>>",
|
|
3401
|
+
"summary": "Drop a draft.",
|
|
3402
|
+
"jsDoc": "/** Drop a draft. */"
|
|
3403
|
+
},
|
|
3404
|
+
{
|
|
3405
|
+
"kind": "method",
|
|
3406
|
+
"name": "markNodeRead",
|
|
3407
|
+
"signature": "@Remote('markNodeRead') markNodeRead(request: { projectId: string; resourceId?: string; nodeId: string }): Promise<LibraryOutcome<{ roadmap: LibraryRoadmap; unlocked: string[] }>>",
|
|
3408
|
+
"summary": "「读完」 a read node.",
|
|
3409
|
+
"jsDoc": "/** 「读完」 a read node. */"
|
|
3410
|
+
},
|
|
3411
|
+
{
|
|
3412
|
+
"kind": "method",
|
|
3413
|
+
"name": "listPages",
|
|
3414
|
+
"signature": "@Remote('listPages') listPages(request: { projectId: string; resourceId: string; nodeId?: string }): Promise<{ pages: LibraryPage[] }>",
|
|
3415
|
+
"summary": "One resource's pages, optionally one node's.",
|
|
3416
|
+
"jsDoc": "/** One resource's pages, optionally one node's. */"
|
|
3417
|
+
},
|
|
3418
|
+
{
|
|
3419
|
+
"kind": "method",
|
|
3420
|
+
"name": "readPagePhoto",
|
|
3421
|
+
"signature": "@Remote('readPagePhoto') readPagePhoto(request: { projectId: string; pageId: string }): Promise<LibraryOutcome<{ data: string; mediaType: string }>>",
|
|
3422
|
+
"summary": "One page's photo, base64 — whitelisted to recorded pages.",
|
|
3423
|
+
"jsDoc": "/** One page's photo, base64 — whitelisted to recorded pages. */"
|
|
3424
|
+
},
|
|
3425
|
+
{
|
|
3426
|
+
"kind": "method",
|
|
3427
|
+
"name": "savePhoto",
|
|
3428
|
+
"signature": "@Remote('savePhoto') savePhoto(request: { data: string; mediaType: string }): Promise<LibraryOutcome<{ attachment: LibraryAttachmentRef }>>",
|
|
3429
|
+
"summary": "Save a browser-uploaded photo into the attachment store.",
|
|
3430
|
+
"jsDoc": "/** Save a browser-uploaded photo into the attachment store. */"
|
|
3431
|
+
},
|
|
3432
|
+
{
|
|
3433
|
+
"kind": "method",
|
|
3434
|
+
"name": "recordPage",
|
|
3435
|
+
"signature": "@Remote('recordPage') recordPage(request: { projectId: string resourceId: string nodeId?: string label?: string attachment: LibraryAttachmentRef text: string marks: readonly LibraryMark[] }): Promise<LibraryOutcome<{ page: LibraryPage; cards: LibraryCardWriteResult; uncertain: string[] }>>",
|
|
3436
|
+
"summary": "Record a recognized page and card its marks.",
|
|
3437
|
+
"jsDoc": "/** Record a recognized page and card its marks. */"
|
|
3438
|
+
},
|
|
3439
|
+
{
|
|
3440
|
+
"kind": "method",
|
|
3441
|
+
"name": "listCards",
|
|
3442
|
+
"signature": "@Remote('listCards') listCards(request: LibraryCardQuery): Promise<{ cards: LibraryCard[]; total: number }>",
|
|
3443
|
+
"summary": "Cards, filtered and sorted.",
|
|
3444
|
+
"jsDoc": "/** Cards, filtered and sorted. */"
|
|
3445
|
+
},
|
|
3446
|
+
{
|
|
3447
|
+
"kind": "method",
|
|
3448
|
+
"name": "dueCards",
|
|
3449
|
+
"signature": "@Remote('dueCards') dueCards(request: { projectId?: string; limit?: number }): Promise<{ cards: (LibraryCard & { projectId: string })[] }>",
|
|
3450
|
+
"summary": "Due cards across projects (or one).",
|
|
3451
|
+
"jsDoc": "/** Due cards across projects (or one). */"
|
|
3452
|
+
},
|
|
3453
|
+
{
|
|
3454
|
+
"kind": "method",
|
|
3455
|
+
"name": "writeCards",
|
|
3456
|
+
"signature": "@Remote('writeCards') writeCards(request: { projectId: string; resourceId?: string; cards: readonly LibraryCardInput[] }): Promise<LibraryOutcome<LibraryCardWriteResult>>",
|
|
3457
|
+
"summary": "Record cards by hand.",
|
|
3458
|
+
"jsDoc": "/** Record cards by hand. */"
|
|
3459
|
+
},
|
|
3460
|
+
{
|
|
3461
|
+
"kind": "method",
|
|
3462
|
+
"name": "editCard",
|
|
3463
|
+
"signature": "@Remote('editCard') editCard(request: { projectId: string cardId: string patch: { term?: string; gloss?: string; userGloss?: string; aliases?: readonly string[]; status?: LibraryCard['status']; resourceId?: string | null } }): Promise<LibraryOutcome<{ card: LibraryCard }>>",
|
|
3464
|
+
"summary": "Edit one card.",
|
|
3465
|
+
"jsDoc": "/** Edit one card. */"
|
|
3466
|
+
},
|
|
3467
|
+
{
|
|
3468
|
+
"kind": "method",
|
|
3469
|
+
"name": "undoCards",
|
|
3470
|
+
"signature": "@Remote('undoCards') undoCards(request: { projectId: string; ids: readonly string[]; at: string }): Promise<LibraryOutcome<{ removed: number; reverted: number }>>",
|
|
3471
|
+
"summary": "The toast's 撤销.",
|
|
3472
|
+
"jsDoc": "/** The toast's 撤销. */"
|
|
3473
|
+
},
|
|
3474
|
+
{
|
|
3475
|
+
"kind": "method",
|
|
3476
|
+
"name": "reviewCard",
|
|
3477
|
+
"signature": "@Remote('reviewCard') reviewCard(request: { projectId: string; cardId: string; rating: LibraryReviewRating }): Promise<LibraryOutcome<{ card: LibraryCard }>>",
|
|
3478
|
+
"summary": "One flashcard review.",
|
|
3479
|
+
"jsDoc": "/** One flashcard review. */"
|
|
3480
|
+
},
|
|
3481
|
+
{
|
|
3482
|
+
"kind": "method",
|
|
3483
|
+
"name": "listAssessments",
|
|
3484
|
+
"signature": "@Remote('listAssessments') listAssessments(request: { projectId: string; resourceId?: string; nodeId?: string; type?: 'quiz' | 'practice' }): Promise<{ assessments: LibraryAssessment[] }>",
|
|
3485
|
+
"summary": "A project's assessments, optionally one resource's / node's / one type's.",
|
|
3486
|
+
"jsDoc": "/** A project's assessments, optionally one resource's / node's / one type's. */"
|
|
3487
|
+
},
|
|
3488
|
+
{
|
|
3489
|
+
"kind": "method",
|
|
3490
|
+
"name": "getAssessment",
|
|
3491
|
+
"signature": "@Remote('getAssessment') getAssessment(request: { projectId: string; assessmentId: string }): Promise<LibraryOutcome<{ assessment: LibraryAssessment }>>",
|
|
3492
|
+
"summary": "One assessment, whole.",
|
|
3493
|
+
"jsDoc": "/** One assessment, whole. */"
|
|
3494
|
+
},
|
|
3495
|
+
{
|
|
3496
|
+
"kind": "method",
|
|
3497
|
+
"name": "putAttempt",
|
|
3498
|
+
"signature": "@Remote('putAttempt') putAttempt(request: { projectId: string; assessmentId?: string; quizId?: string; nodeId?: string; resourceId?: string; verdicts: readonly LibraryVerdict[] }): Promise<LibraryOutcome<LibraryAssessResult>>",
|
|
3499
|
+
"summary": "Grade a sitting answered in the sidebar (choice / fill judged in the page).",
|
|
3500
|
+
"jsDoc": "/** Grade a sitting answered in the sidebar (choice / fill judged in the page). */"
|
|
3501
|
+
},
|
|
3502
|
+
{
|
|
3503
|
+
"kind": "method",
|
|
3504
|
+
"name": "listAttempts",
|
|
3505
|
+
"signature": "@Remote('listAttempts') listAttempts(request: { projectId: string; nodeId?: string; assessmentId?: string }): Promise<{ attempts: LibraryAttempt[] }>",
|
|
3506
|
+
"summary": "A project's graded sittings, newest first; `nodeId` narrows to one station's history, `assessmentId` to one assessment's.",
|
|
3507
|
+
"jsDoc": "/** A project's graded sittings, newest first; `nodeId` narrows to one station's history, `assessmentId` to one assessment's. */"
|
|
3508
|
+
},
|
|
3509
|
+
{
|
|
3510
|
+
"kind": "method",
|
|
3511
|
+
"name": "boundTarget",
|
|
3512
|
+
"signature": "@Remote('boundTarget') async boundTarget(sessionId: SessionId): Promise<LibraryBinding | null>",
|
|
3513
|
+
"summary": "The calling session's binding, or null.",
|
|
3514
|
+
"jsDoc": "/** The calling session's binding, or null. */"
|
|
3515
|
+
},
|
|
3516
|
+
{
|
|
3517
|
+
"kind": "method",
|
|
3518
|
+
"name": "bindTarget",
|
|
3519
|
+
"signature": "@Remote('bindTarget') bindTarget(sessionId: SessionId, request: { binding: LibraryBinding | null }): Promise<LibraryOutcome<{ binding: LibraryBinding | null }>>",
|
|
3520
|
+
"summary": "Bind the calling session to a project / resource (null unbinds).",
|
|
3521
|
+
"jsDoc": "/** Bind the calling session to a project / resource (null unbinds). */"
|
|
3522
|
+
},
|
|
3523
|
+
{
|
|
3524
|
+
"kind": "method",
|
|
3525
|
+
"name": "listEvents",
|
|
3526
|
+
"signature": "@Remote('listEvents') listEvents(request: { projectId: string; limit?: number; types?: readonly LibraryEventType[] }): Promise<{ events: LibraryEvent[] }>",
|
|
3527
|
+
"summary": "One project's audit trail, newest first.",
|
|
3528
|
+
"jsDoc": "/** One project's audit trail, newest first. */"
|
|
3529
|
+
},
|
|
3530
|
+
{
|
|
3531
|
+
"kind": "method",
|
|
3532
|
+
"name": "recentChanges",
|
|
3533
|
+
"signature": "@Remote('recentChanges') recentChanges(request: { limit?: number }): Promise<{ changes: (LibraryEvent & { projectId: string; projectName: string })[] }>",
|
|
3534
|
+
"summary": "The newest knowledge-point state changes (今日 「最近的变化」).",
|
|
3535
|
+
"jsDoc": "/** The newest knowledge-point state changes (今日 「最近的变化」). */"
|
|
3536
|
+
},
|
|
3537
|
+
{
|
|
3538
|
+
"kind": "method",
|
|
3539
|
+
"name": "createRetake",
|
|
3540
|
+
"signature": "@Remote('createRetake') createRetake(request: { projectId: string; resourceId?: string; nodeId?: string; keys?: readonly string[] }): Promise<LibraryOutcome<{ assessment: LibraryAssessment }>>",
|
|
3541
|
+
"summary": "订正: a retake paper over a station's open misses (all, or the keys named).",
|
|
3542
|
+
"jsDoc": "/** 订正: a retake paper over a station's open misses (all, or the keys named). */"
|
|
3543
|
+
},
|
|
3544
|
+
{
|
|
3545
|
+
"kind": "method",
|
|
3546
|
+
"name": "recentRecords",
|
|
3547
|
+
"signature": "@Remote('recentRecords') recentRecords(request: { limit?: number }): Promise<{ records: (LibraryEvent & { projectId: string; projectName: string })[] }>"
|
|
3548
|
+
},
|
|
3549
|
+
{
|
|
3550
|
+
"kind": "method",
|
|
3551
|
+
"name": "latestActivity",
|
|
3552
|
+
"signature": "@Remote('latestActivity') latestActivity(): Promise<{ at?: string; session?: { id: string; at: string } }>",
|
|
3553
|
+
"summary": "The newest event's timestamp anywhere — the pane polls it to re-read (no push channel).",
|
|
3554
|
+
"jsDoc": "/** The newest event's timestamp anywhere — the pane polls it to re-read (no push channel). */"
|
|
3555
|
+
},
|
|
3556
|
+
{
|
|
3557
|
+
"kind": "method",
|
|
3558
|
+
"name": "stats",
|
|
3559
|
+
"signature": "@Remote('stats') stats(): Promise<{ projects: number; books: number; cards: number; due: number; quizzes: number; attempts: number }>",
|
|
3560
|
+
"summary": "The whole-library tally.",
|
|
3561
|
+
"jsDoc": "/** The whole-library tally. */"
|
|
3562
|
+
}
|
|
3563
|
+
],
|
|
3564
|
+
"types": [
|
|
3565
|
+
{
|
|
3566
|
+
"name": "Branded",
|
|
3567
|
+
"declaration": "export type Branded<B extends string> = string & { readonly [BRAND]: B; };"
|
|
3568
|
+
},
|
|
3569
|
+
{
|
|
3570
|
+
"name": "LibraryAcceptanceInput",
|
|
3571
|
+
"declaration": "export type LibraryAcceptanceInput = string | { readonly line: string; readonly ref?: string; };"
|
|
3572
|
+
},
|
|
3573
|
+
{
|
|
3574
|
+
"name": "LibraryAcceptanceLine",
|
|
3575
|
+
"declaration": "export interface LibraryAcceptanceLine {\n readonly id: string;\n readonly line: string;\n readonly ref?: string;\n}"
|
|
3576
|
+
},
|
|
3577
|
+
{
|
|
3578
|
+
"name": "LibraryAssessment",
|
|
3579
|
+
"declaration": "export interface LibraryAssessment {\n readonly id: string;\n readonly type: 'quiz' | 'practice' | 'retake';\n readonly scope: { readonly nodeId?: string; readonly resourceId?: string; };\n readonly focus?: LibraryQuizFocus;\n readonly questions?: readonly LibraryQuizQuestion[];\n readonly rubric?: readonly LibraryAcceptanceLine[];\n readonly supersededBy?: string;\n readonly createdAt: string;\n}"
|
|
3580
|
+
},
|
|
3581
|
+
{
|
|
3582
|
+
"name": "LibraryAssessResult",
|
|
3583
|
+
"declaration": "export interface LibraryAssessResult {\n readonly attempt: LibraryAttempt;\n readonly cardUpdates: readonly LibraryCardUpdate[];\n readonly unlocked: readonly string[];\n readonly completed?: string;\n readonly passRatio: number;\n readonly pointChanges?: readonly LibraryPointChange[];\n}"
|
|
3584
|
+
},
|
|
3585
|
+
{
|
|
3586
|
+
"name": "LibraryAttachmentRef",
|
|
3587
|
+
"declaration": "export interface LibraryAttachmentRef {\n readonly attachmentId: string;\n readonly mediaType: string;\n readonly bytes: number;\n readonly width: number;\n readonly height: number;\n}"
|
|
3588
|
+
},
|
|
3589
|
+
{
|
|
3590
|
+
"name": "LibraryAttempt",
|
|
3591
|
+
"declaration": "export interface LibraryAttempt {\n readonly id: string;\n readonly assessmentId?: string;\n readonly nodeId?: string;\n readonly verdicts: readonly LibraryVerdict[];\n readonly ratio: number;\n readonly at: string;\n}"
|
|
3592
|
+
},
|
|
3593
|
+
{
|
|
3594
|
+
"name": "LibraryBinding",
|
|
3595
|
+
"declaration": "export interface LibraryBinding {\n readonly projectId: string;\n readonly resourceId?: string;\n readonly previousProjectId?: string;\n}"
|
|
3596
|
+
},
|
|
3597
|
+
{
|
|
3598
|
+
"name": "LibraryBookKind",
|
|
3599
|
+
"declaration": "export type LibraryBookKind = 'knowledge' | 'material';"
|
|
3600
|
+
},
|
|
3601
|
+
{
|
|
3602
|
+
"name": "LibraryCapabilities",
|
|
3603
|
+
"declaration": "export interface LibraryCapabilities {\n readonly protocolVersion: 1;\n readonly hasStorage: boolean;\n readonly storageUnavailableReason?: string;\n readonly hasAttachments: boolean;\n}"
|
|
3604
|
+
},
|
|
3605
|
+
{
|
|
3606
|
+
"name": "LibraryCard",
|
|
3607
|
+
"declaration": "export interface LibraryCard {\n readonly id: string;\n readonly kind: LibraryCardKind;\n readonly term: string;\n readonly aliases: readonly string[];\n readonly gloss: string;\n readonly userGloss?: string;\n readonly contexts: readonly LibraryCardContext[];\n readonly resourceId?: string;\n readonly sources: readonly LibraryCardSource[];\n readonly weakness: number;\n readonly mastery: LibraryMastery;\n readonly status: 'active' | 'mastered' | 'deleted';\n readonly createdAt: string;\n readonly updatedAt: string;\n}"
|
|
3608
|
+
},
|
|
3609
|
+
{
|
|
3610
|
+
"name": "LibraryCardContext",
|
|
3611
|
+
"declaration": "export interface LibraryCardContext {\n readonly sentence: string;\n readonly resourceId?: string;\n readonly pageId?: string;\n readonly nodeId?: string;\n}"
|
|
3612
|
+
},
|
|
3613
|
+
{
|
|
3614
|
+
"name": "LibraryCardInput",
|
|
3615
|
+
"declaration": "export interface LibraryCardInput {\n readonly kind: LibraryCardKind;\n readonly term: string;\n readonly aliases?: readonly string[];\n readonly gloss: string;\n readonly userGloss?: string;\n readonly context?: { readonly sentence: string; readonly pageId?: string; readonly nodeId?: string; };\n readonly source: { readonly type: LibraryCardSourceType; readonly ref?: string; readonly note?: string; };\n readonly resourceId?: string;\n readonly weaken?: boolean;\n readonly mergeInto?: string;\n readonly asNew?: boolean;\n}"
|
|
3616
|
+
},
|
|
3617
|
+
{
|
|
3618
|
+
"name": "LibraryCardKind",
|
|
3619
|
+
"declaration": "export type LibraryCardKind = 'word' | 'concept';"
|
|
3620
|
+
},
|
|
3621
|
+
{
|
|
3622
|
+
"name": "LibraryCardPending",
|
|
3623
|
+
"declaration": "export interface LibraryCardPending {\n readonly index: number;\n readonly term: string;\n readonly candidates: readonly { readonly id: string; readonly term: string; readonly gloss: string; }[];\n}"
|
|
3624
|
+
},
|
|
3625
|
+
{
|
|
3626
|
+
"name": "LibraryCardQuery",
|
|
3627
|
+
"declaration": "export interface LibraryCardQuery {\n readonly projectId: string;\n readonly query?: string;\n readonly resourceId?: string;\n readonly nodeId?: string;\n readonly kind?: LibraryCardKind;\n readonly source?: LibraryCardSourceType;\n readonly weakMin?: number;\n readonly due?: boolean;\n readonly includeMastered?: boolean;\n readonly limit?: number;\n readonly sort?: 'weak' | 'recent' | 'due';\n}"
|
|
3628
|
+
},
|
|
3629
|
+
{
|
|
3630
|
+
"name": "LibraryCardSource",
|
|
3631
|
+
"declaration": "export interface LibraryCardSource {\n readonly type: LibraryCardSourceType;\n readonly ref?: string;\n readonly note?: string;\n readonly weakened?: boolean;\n readonly at: string;\n}"
|
|
3632
|
+
},
|
|
3633
|
+
{
|
|
3634
|
+
"name": "LibraryCardSourceType",
|
|
3635
|
+
"declaration": "export type LibraryCardSourceType = 'photo' | 'chat' | 'quiz' | 'manual';"
|
|
3636
|
+
},
|
|
3637
|
+
{
|
|
3638
|
+
"name": "LibraryCardUpdate",
|
|
3639
|
+
"declaration": "export interface LibraryCardUpdate {\n readonly id: string;\n readonly term: string;\n readonly weakness: number;\n readonly mastery: LibraryMastery;\n readonly created?: boolean;\n}"
|
|
3640
|
+
},
|
|
3641
|
+
{
|
|
3642
|
+
"name": "LibraryCardWriteResult",
|
|
3643
|
+
"declaration": "export interface LibraryCardWriteResult {\n readonly added: readonly LibraryCard[];\n readonly merged: readonly LibraryCard[];\n readonly pending: readonly LibraryCardPending[];\n}"
|
|
3644
|
+
},
|
|
3645
|
+
{
|
|
3646
|
+
"name": "LibraryColor",
|
|
3647
|
+
"declaration": "export type LibraryColor = typeof LIBRARY_COLORS[number];"
|
|
3648
|
+
},
|
|
3649
|
+
{
|
|
3650
|
+
"name": "LibraryErrorCode",
|
|
3651
|
+
"declaration": "export type LibraryErrorCode = 'not-found' | 'exists' | 'invalid' | 'corrupt' | 'io' | 'storage-unavailable' | 'evidence-gate' | 'state-machine' | 'unavailable' | 'ref-incomplete' | 'unbound';"
|
|
3652
|
+
},
|
|
3653
|
+
{
|
|
3654
|
+
"name": "LibraryEvent",
|
|
3655
|
+
"declaration": "export interface LibraryEvent {\n readonly at: string;\n readonly type: LibraryEventType;\n readonly id?: string;\n readonly title?: string;\n readonly resourceId?: string;\n readonly source?: LibraryCardSourceType;\n readonly session?: string;\n readonly ids?: readonly string[];\n readonly count?: number;\n readonly count2?: number;\n readonly ratio?: number;\n readonly nodeId?: string;\n readonly from?: LibraryPointState;\n readonly to?: LibraryPointState;\n readonly detail?: string;\n}"
|
|
3656
|
+
},
|
|
3657
|
+
{
|
|
3658
|
+
"name": "LibraryEventType",
|
|
3659
|
+
"declaration": "export type LibraryEventType = 'resource.added' | 'roadmap.drafted' | 'roadmap.adopted' | 'page.recorded' | 'cards.recorded' | 'card.edited' | 'quiz.created' | 'attempt.assessed' | 'node.completed' | 'node.unlocked' | 'node.noted' | 'point.changed';"
|
|
3660
|
+
},
|
|
3661
|
+
{
|
|
3662
|
+
"name": "LibraryIcon",
|
|
3663
|
+
"declaration": "export type LibraryIcon = typeof LIBRARY_ICONS[number];"
|
|
3664
|
+
},
|
|
3665
|
+
{
|
|
3666
|
+
"name": "LibraryMark",
|
|
3667
|
+
"declaration": "export interface LibraryMark {\n readonly text: string;\n readonly sentence?: string;\n readonly handNote?: string;\n readonly gloss?: string;\n readonly uncertain?: boolean;\n}"
|
|
3668
|
+
},
|
|
3669
|
+
{
|
|
3670
|
+
"name": "LibraryMastery",
|
|
3671
|
+
"declaration": "export interface LibraryMastery {\n readonly box: number;\n readonly dueAt: string;\n readonly streak: number;\n}"
|
|
3672
|
+
},
|
|
3673
|
+
{
|
|
3674
|
+
"name": "LibraryNodeCover",
|
|
3675
|
+
"declaration": "export interface LibraryNodeCover {\n readonly ref: string;\n readonly locator?: string;\n readonly title?: string;\n readonly by?: 'web' | 'model' | 'user';\n readonly verifiedAt?: string;\n}"
|
|
3676
|
+
},
|
|
3677
|
+
{
|
|
3678
|
+
"name": "LibraryNodeNotes",
|
|
3679
|
+
"declaration": "export interface LibraryNodeNotes {\n readonly text: string;\n readonly updatedAt: string;\n readonly revisions: number;\n}"
|
|
3680
|
+
},
|
|
3681
|
+
{
|
|
3682
|
+
"name": "LibraryOutcome",
|
|
3683
|
+
"declaration": "export type LibraryOutcome<T> = ({ readonly ok: true; } & T) | LibraryRefusal;"
|
|
3684
|
+
},
|
|
3685
|
+
{
|
|
3686
|
+
"name": "LibraryPage",
|
|
3687
|
+
"declaration": "export interface LibraryPage {\n readonly id: string;\n readonly resourceId: string;\n readonly nodeId?: string;\n readonly label?: string;\n readonly attachment: LibraryAttachmentRef;\n readonly text: string;\n readonly marks: readonly LibraryMark[];\n readonly cardIds: readonly string[];\n readonly at: string;\n}"
|
|
3688
|
+
},
|
|
3689
|
+
{
|
|
3690
|
+
"name": "LibraryPoint",
|
|
3691
|
+
"declaration": "export interface LibraryPoint {\n readonly id: string;\n readonly title: string;\n readonly notes?: readonly LibraryPointNote[];\n}"
|
|
3692
|
+
},
|
|
3693
|
+
{
|
|
3694
|
+
"name": "LibraryPointChange",
|
|
3695
|
+
"declaration": "export interface LibraryPointChange {\n readonly nodeId: string;\n readonly pointId: string;\n readonly title: string;\n readonly from: LibraryPointState;\n readonly to: LibraryPointState;\n}"
|
|
3696
|
+
},
|
|
3697
|
+
{
|
|
3698
|
+
"name": "LibraryPointNote",
|
|
3699
|
+
"declaration": "export interface LibraryPointNote {\n readonly text: string;\n readonly term?: string;\n readonly at: string;\n readonly session?: string;\n}"
|
|
3700
|
+
},
|
|
3701
|
+
{
|
|
3702
|
+
"name": "LibraryPointState",
|
|
3703
|
+
"declaration": "export type LibraryPointState = 'untested' | 'weak' | 'practicing' | 'mastered';"
|
|
3704
|
+
},
|
|
3705
|
+
{
|
|
3706
|
+
"name": "LibraryProject",
|
|
3707
|
+
"declaration": "export interface LibraryProject {\n readonly id: string;\n readonly name: string;\n readonly template: LibraryTemplate;\n readonly color?: LibraryColor;\n readonly icon?: LibraryIcon;\n readonly templateNote?: string;\n readonly goal?: string;\n readonly createdAt: string;\n}"
|
|
3708
|
+
},
|
|
3709
|
+
{
|
|
3710
|
+
"name": "LibraryProjectPatch",
|
|
3711
|
+
"declaration": "export interface LibraryProjectPatch {\n readonly name?: string;\n readonly goal?: string;\n readonly template?: LibraryTemplate;\n readonly color?: LibraryColor;\n readonly icon?: LibraryIcon;\n}"
|
|
3712
|
+
},
|
|
3713
|
+
{
|
|
3714
|
+
"name": "LibraryProjectSummary",
|
|
3715
|
+
"declaration": "export interface LibraryProjectSummary extends LibraryProject {\n readonly resources: readonly LibraryResourceProgress[];\n readonly cardCount: number;\n readonly dueCount: number;\n readonly lastActiveAt: string;\n readonly openMisses?: number;\n}"
|
|
3716
|
+
},
|
|
3717
|
+
{
|
|
3718
|
+
"name": "LibraryQuestionEvidence",
|
|
3719
|
+
"declaration": "export interface LibraryQuestionEvidence {\n readonly kind: 'photo' | 'web' | 'knowledge';\n readonly pageId?: string;\n readonly url?: string;\n readonly quote?: string;\n}"
|
|
3720
|
+
},
|
|
3721
|
+
{
|
|
3722
|
+
"name": "LibraryQuestionTarget",
|
|
3723
|
+
"declaration": "export interface LibraryQuestionTarget {\n readonly kind: 'marked' | 'asked' | 'missed' | 'topic';\n readonly cardIds?: readonly string[];\n}"
|
|
3724
|
+
},
|
|
3725
|
+
{
|
|
3726
|
+
"name": "LibraryQuizFocus",
|
|
3727
|
+
"declaration": "export type LibraryQuizFocus = 'mine' | 'book' | 'mixed';"
|
|
3728
|
+
},
|
|
3729
|
+
{
|
|
3730
|
+
"name": "LibraryQuizQuestion",
|
|
3731
|
+
"declaration": "export interface LibraryQuizQuestion {\n readonly id: string;\n readonly kind: 'choice' | 'fill' | 'free';\n readonly prompt: string;\n readonly options?: readonly string[];\n readonly answer: string;\n readonly explanation?: string;\n readonly point?: string;\n readonly origin?: { readonly assessmentId: string; readonly questionId: string; };\n readonly target: LibraryQuestionTarget;\n readonly evidence: LibraryQuestionEvidence;\n}"
|
|
3732
|
+
},
|
|
3733
|
+
{
|
|
3734
|
+
"name": "LibraryQuizStats",
|
|
3735
|
+
"declaration": "export interface LibraryQuizStats {\n readonly attempts: number;\n readonly lastRatio?: number;\n readonly bestRatio?: number;\n}"
|
|
3736
|
+
},
|
|
3737
|
+
{
|
|
3738
|
+
"name": "LibraryRefusal",
|
|
3739
|
+
"declaration": "export interface LibraryRefusal {\n readonly ok: false;\n readonly error: LibraryErrorCode;\n readonly message: string;\n}"
|
|
3740
|
+
},
|
|
3741
|
+
{
|
|
3742
|
+
"name": "LibraryResource",
|
|
3743
|
+
"declaration": "export interface LibraryResource {\n readonly id: string;\n readonly title: string;\n readonly kind: LibraryResourceKind;\n readonly url?: string;\n readonly note?: string;\n readonly origin?: LibraryResourceOrigin;\n readonly seq?: number;\n readonly toc?: readonly LibraryTocEntry[];\n readonly tocSource?: LibraryTocSource;\n readonly meta?: LibraryResourceMeta;\n readonly createdAt: string;\n}"
|
|
3744
|
+
},
|
|
3745
|
+
{
|
|
3746
|
+
"name": "LibraryResourceExtra",
|
|
3747
|
+
"declaration": "export interface LibraryResourceExtra {\n readonly title: string;\n readonly note?: string;\n readonly where?: string;\n readonly when: 'before' | 'reference';\n}"
|
|
3748
|
+
},
|
|
3749
|
+
{
|
|
3750
|
+
"name": "LibraryResourceKind",
|
|
3751
|
+
"declaration": "export type LibraryResourceKind = typeof LIBRARY_RESOURCE_KINDS[number];"
|
|
3752
|
+
},
|
|
3753
|
+
{
|
|
3754
|
+
"name": "LibraryResourceMeta",
|
|
3755
|
+
"declaration": "export interface LibraryResourceMeta {\n readonly bookKind?: LibraryBookKind;\n readonly short?: string;\n readonly extras?: readonly LibraryResourceExtra[];\n readonly author?: string;\n readonly edition?: string;\n readonly isbn?: string;\n}"
|
|
3756
|
+
},
|
|
3757
|
+
{
|
|
3758
|
+
"name": "LibraryResourceOrigin",
|
|
3759
|
+
"declaration": "export type LibraryResourceOrigin = typeof LIBRARY_RESOURCE_ORIGINS[number];"
|
|
3760
|
+
},
|
|
3761
|
+
{
|
|
3762
|
+
"name": "LibraryResourceProgress",
|
|
3763
|
+
"declaration": "export interface LibraryResourceProgress {\n readonly id: string;\n readonly title: string;\n readonly kind: LibraryResourceKind;\n readonly seq?: number;\n readonly origin?: LibraryResourceOrigin;\n readonly roadmap?: { readonly done: number; readonly total: number; };\n readonly current?: { readonly id: string; readonly title: string; };\n readonly hasDraft: boolean;\n readonly draftTotal?: number;\n}"
|
|
3764
|
+
},
|
|
3765
|
+
{
|
|
3766
|
+
"name": "LibraryReviewRating",
|
|
3767
|
+
"declaration": "export type LibraryReviewRating = 'forgot' | 'fuzzy' | 'recalled';"
|
|
3768
|
+
},
|
|
3769
|
+
{
|
|
3770
|
+
"name": "LibraryRoadmap",
|
|
3771
|
+
"declaration": "export interface LibraryRoadmap {\n readonly primaryResourceId?: string;\n readonly status: 'draft' | 'adopted';\n readonly nodes: readonly RoadmapNode[];\n readonly passRatio?: number;\n readonly note?: string;\n readonly generatedAt: string;\n readonly adoptedAt?: string;\n}"
|
|
3772
|
+
},
|
|
3773
|
+
{
|
|
3774
|
+
"name": "LibraryTemplate",
|
|
3775
|
+
"declaration": "export type LibraryTemplate = 'language' | 'subject' | 'custom';"
|
|
3776
|
+
},
|
|
3777
|
+
{
|
|
3778
|
+
"name": "LibraryTocEntry",
|
|
3779
|
+
"declaration": "export interface LibraryTocEntry {\n readonly n: number;\n readonly title: string;\n readonly part?: string;\n}"
|
|
3780
|
+
},
|
|
3781
|
+
{
|
|
3782
|
+
"name": "LibraryTocSource",
|
|
3783
|
+
"declaration": "export interface LibraryTocSource {\n readonly by: 'web' | 'model' | 'photo';\n readonly url?: string;\n readonly verifiedAt?: string;\n}"
|
|
3784
|
+
},
|
|
3785
|
+
{
|
|
3786
|
+
"name": "LibraryVerdict",
|
|
3787
|
+
"declaration": "export interface LibraryVerdict {\n readonly task: string;\n readonly criterion: string;\n readonly pass: boolean;\n readonly ratio?: number;\n readonly evidence: string;\n readonly by: 'llm' | 'self' | 'user' | 'auto';\n readonly void?: boolean;\n readonly missedCard?: { readonly term: string; readonly gloss: string; };\n}"
|
|
3788
|
+
},
|
|
3789
|
+
{
|
|
3790
|
+
"name": "RoadmapNode",
|
|
3791
|
+
"declaration": "export interface RoadmapNode {\n readonly id: string;\n readonly title: string;\n readonly goals: readonly string[];\n readonly dependsOn: readonly string[];\n readonly covers: readonly LibraryNodeCover[];\n readonly state: RoadmapNodeState;\n readonly gate: RoadmapNodeGate;\n readonly quizStats?: LibraryQuizStats;\n readonly points?: readonly LibraryPoint[];\n readonly acceptance?: readonly LibraryAcceptanceInput[];\n readonly notes?: LibraryNodeNotes;\n}"
|
|
3792
|
+
},
|
|
3793
|
+
{
|
|
3794
|
+
"name": "RoadmapNodeGate",
|
|
3795
|
+
"declaration": "export type RoadmapNodeGate = 'quiz' | 'acceptance' | 'read';"
|
|
3796
|
+
},
|
|
3797
|
+
{
|
|
3798
|
+
"name": "RoadmapNodeState",
|
|
3799
|
+
"declaration": "export type RoadmapNodeState = 'locked' | 'current' | 'done';"
|
|
3800
|
+
},
|
|
3801
|
+
{
|
|
3802
|
+
"name": "SessionId",
|
|
3803
|
+
"declaration": "export type SessionId = Branded<'SessionId'>;"
|
|
3804
|
+
}
|
|
3805
|
+
]
|
|
3806
|
+
}
|
|
3807
|
+
],
|
|
3808
|
+
"events": [],
|
|
3809
|
+
"objects": []
|
|
3810
|
+
},
|
|
3811
|
+
}
|