@khorsheed/dsh-reader 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +90 -0
- package/README.i18n.yaml +6 -0
- package/README.md +90 -0
- package/cordis.patch.yml +13 -0
- package/lib/client.js +15119 -0
- package/lib/index.js +3660 -0
- package/lib/invariant.js +38 -0
- package/lib/typert.host.d.ts +3 -0
- package/lib/typert.host.js +1738 -0
- package/lib/typert.remote-client.d.ts +82 -0
- package/lib/typert.remote-client.js +1115 -0
- package/lib/types/arxiv.d.ts +47 -0
- package/lib/types/arxiv.js +76 -0
- package/lib/types/client/ReaderPane.d.ts +71 -0
- package/lib/types/client/ReaderPane.js +3135 -0
- package/lib/types/client/contract.d.ts +254 -0
- package/lib/types/client/contract.js +1 -0
- package/lib/types/client/definition.d.ts +27 -0
- package/lib/types/client/definition.js +32 -0
- package/lib/types/client/extract-article.d.ts +102 -0
- package/lib/types/client/extract-article.js +1024 -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 +34 -0
- package/lib/types/client/index.js +222 -0
- package/lib/types/client/locales.d.ts +391 -0
- package/lib/types/client/locales.js +382 -0
- package/lib/types/client/parse-rss.d.ts +69 -0
- package/lib/types/client/parse-rss.js +656 -0
- package/lib/types/client/quote.d.ts +89 -0
- package/lib/types/client/quote.js +119 -0
- package/lib/types/client/selectors.d.ts +167 -0
- package/lib/types/client/selectors.js +413 -0
- package/lib/types/client/session.d.ts +171 -0
- package/lib/types/client/session.js +223 -0
- package/lib/types/client/store.d.ts +181 -0
- package/lib/types/client/store.js +226 -0
- package/lib/types/client/translate.d.ts +379 -0
- package/lib/types/client/translate.js +873 -0
- package/lib/types/index.d.ts +48 -0
- package/lib/types/index.js +25 -0
- package/lib/types/invariant.d.ts +29 -0
- package/lib/types/invariant.js +38 -0
- package/lib/types/link-resolvers.d.ts +107 -0
- package/lib/types/link-resolvers.js +299 -0
- package/lib/types/remote.d.ts +224 -0
- package/lib/types/remote.js +275 -0
- package/lib/types/schedule.d.ts +78 -0
- package/lib/types/schedule.js +114 -0
- package/lib/types/service.d.ts +633 -0
- package/lib/types/service.js +1697 -0
- package/lib/types/store.d.ts +224 -0
- package/lib/types/store.js +916 -0
- package/lib/types/types.d.ts +710 -0
- package/lib/types/types.js +182 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +128 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/* Generated by @deepseek-ai/dsh-typert-generator from the Host FaceModel — do not edit. */
|
|
2
|
+
import type {
|
|
3
|
+
RemoteResult,
|
|
4
|
+
TypertRemoteContribution,
|
|
5
|
+
} from '@deepseek-ai/dsh-typert-protocol'
|
|
6
|
+
import type { ReaderAddFailure, ReaderAddOutcome, ReaderAddRefusal, ReaderAnnotationOutcome, ReaderBackfillCandidate, ReaderBody, ReaderCapabilities, ReaderEntryBodyView, ReaderEntryFetchState, ReaderEntryTranslationView, ReaderMutationOutcome, ReaderRecentEntry, ReaderRefreshResult, ReaderSentenceLearn, ReaderSourceSummary, ReaderStorageStats, ReaderTag } from '@khorsheed/dsh-reader/types'
|
|
7
|
+
|
|
8
|
+
declare module '@deepseek-ai/dsh-typert-protocol' {
|
|
9
|
+
interface TypertRemoteNamespace$726561646572 {
|
|
10
|
+
addSource: (request: { url: string; label?: string; }) => Promise<RemoteResult<ReaderAddOutcome | ReaderAddRefusal | ReaderAddFailure>>
|
|
11
|
+
capabilities: () => Promise<RemoteResult<ReaderCapabilities>>
|
|
12
|
+
clearRecent: () => Promise<RemoteResult<{ removed: number; }>>
|
|
13
|
+
clearTranslations: () => Promise<RemoteResult<{ clearedEntries: number; clearedMemory: boolean; }>>
|
|
14
|
+
createTag: (request: { name: string; }) => Promise<RemoteResult<ReaderTag | ReaderAnnotationOutcome>>
|
|
15
|
+
deleteTag: (request: { id: string; }) => Promise<RemoteResult<ReaderAnnotationOutcome>>
|
|
16
|
+
entryFetchStates: (request: { entryIds: readonly string[]; }) => Promise<RemoteResult<{ states: Record<string, ReaderEntryFetchState>; }>>
|
|
17
|
+
entryTags: (request: { entryId: string; }) => Promise<RemoteResult<{ tags: ReaderTag[]; }>>
|
|
18
|
+
fetchEntryBody: (request: { entryId: string; url: string; }) => Promise<RemoteResult<{ entryId: string; url?: string; raw?: string; rawFile?: string; truncated?: boolean; error?: string; }>>
|
|
19
|
+
getBodies: (request: { ids: string[]; }) => Promise<RemoteResult<{ bodies: ReaderBody[]; }>>
|
|
20
|
+
getCachePolicy: () => Promise<RemoteResult<{ ttlHours: number; maxEntries: number; translationBudgetChars: number; }>>
|
|
21
|
+
getEntryBody: (request: { entryId: string; url: string; feedHtml?: string; }) => Promise<RemoteResult<ReaderEntryBodyView>>
|
|
22
|
+
getEntryTranslation: (request: { entryId: string; }) => Promise<RemoteResult<{ translation?: ReaderEntryTranslationView; }>>
|
|
23
|
+
getRawBody: (request: { entryId: string; }) => Promise<RemoteResult<{ entryId: string; raw?: string; url?: string; truncated?: boolean; error?: string; }>>
|
|
24
|
+
getSentenceTranslations: (request: { pair: string; hashes: readonly string[]; }) => Promise<RemoteResult<{ translations: Record<string, string>; }>>
|
|
25
|
+
getStorageStats: () => Promise<RemoteResult<ReaderStorageStats>>
|
|
26
|
+
listBackfillCandidates: (request: { entries: readonly { entryId: string; url: string; label: string; hasBody: boolean; }[]; limit?: number; }) => Promise<RemoteResult<{ candidates: ReaderBackfillCandidate[]; }>>
|
|
27
|
+
listRecent: () => Promise<RemoteResult<{ entries: ReaderRecentEntry[]; }>>
|
|
28
|
+
listSources: () => Promise<RemoteResult<{ sources: ReaderSourceSummary[]; }>>
|
|
29
|
+
listTags: () => Promise<RemoteResult<{ tags: ReaderTag[]; counts: Record<string, number>; }>>
|
|
30
|
+
pruneTags: () => Promise<RemoteResult<{ removed: number; }>>
|
|
31
|
+
quoteToSideChat: (request: { contextKey: string; label: string; text: string; }) => Promise<RemoteResult<'ok' | 'unavailable'>>
|
|
32
|
+
recordRead: (request: { entryId: string; sourceId: string; title: string; url?: string; }) => Promise<RemoteResult<{ entries: number; }>>
|
|
33
|
+
refresh: (request: { ids?: string[]; }) => Promise<RemoteResult<{ results: ReaderRefreshResult[]; }>>
|
|
34
|
+
rememberSentences: (request: { pair: string; entries: readonly ReaderSentenceLearn[]; recalled?: readonly ReaderSentenceLearn[]; entryId?: string; bodyHash?: string; }) => Promise<RemoteResult<{ stored: number; }>>
|
|
35
|
+
removeSource: (request: { id: string; entryIds?: readonly string[]; }) => Promise<RemoteResult<ReaderMutationOutcome>>
|
|
36
|
+
renameTag: (request: { id: string; name: string; }) => Promise<RemoteResult<ReaderAnnotationOutcome>>
|
|
37
|
+
setCachePolicy: (request: { ttlHours: number; maxEntries?: number; translationBudgetChars?: number; }) => Promise<RemoteResult<ReaderAnnotationOutcome>>
|
|
38
|
+
storeEntryBody: (request: { entryId: string; url: string; html: string; truncated?: boolean; scriptFigures?: number; bodyHash?: string; title?: string; excerpt?: string; }) => Promise<RemoteResult<ReaderEntryBodyView>>
|
|
39
|
+
tagEntry: (request: { entryId: string; tagId: string; on: boolean; }) => Promise<RemoteResult<ReaderAnnotationOutcome>>
|
|
40
|
+
updateSource: (request: { id: string; enabled?: boolean; label?: string; url?: string; timeOfDay?: string; }) => Promise<RemoteResult<ReaderMutationOutcome>>
|
|
41
|
+
}
|
|
42
|
+
interface TypertRemoteMap {
|
|
43
|
+
'reader/addSource': (request: { url: string; label?: string; }) => Promise<RemoteResult<ReaderAddOutcome | ReaderAddRefusal | ReaderAddFailure>>
|
|
44
|
+
'reader/capabilities': () => Promise<RemoteResult<ReaderCapabilities>>
|
|
45
|
+
'reader/clearRecent': () => Promise<RemoteResult<{ removed: number; }>>
|
|
46
|
+
'reader/clearTranslations': () => Promise<RemoteResult<{ clearedEntries: number; clearedMemory: boolean; }>>
|
|
47
|
+
'reader/createTag': (request: { name: string; }) => Promise<RemoteResult<ReaderTag | ReaderAnnotationOutcome>>
|
|
48
|
+
'reader/deleteTag': (request: { id: string; }) => Promise<RemoteResult<ReaderAnnotationOutcome>>
|
|
49
|
+
'reader/entryFetchStates': (request: { entryIds: readonly string[]; }) => Promise<RemoteResult<{ states: Record<string, ReaderEntryFetchState>; }>>
|
|
50
|
+
'reader/entryTags': (request: { entryId: string; }) => Promise<RemoteResult<{ tags: ReaderTag[]; }>>
|
|
51
|
+
'reader/fetchEntryBody': (request: { entryId: string; url: string; }) => Promise<RemoteResult<{ entryId: string; url?: string; raw?: string; rawFile?: string; truncated?: boolean; error?: string; }>>
|
|
52
|
+
'reader/getBodies': (request: { ids: string[]; }) => Promise<RemoteResult<{ bodies: ReaderBody[]; }>>
|
|
53
|
+
'reader/getCachePolicy': () => Promise<RemoteResult<{ ttlHours: number; maxEntries: number; translationBudgetChars: number; }>>
|
|
54
|
+
'reader/getEntryBody': (request: { entryId: string; url: string; feedHtml?: string; }) => Promise<RemoteResult<ReaderEntryBodyView>>
|
|
55
|
+
'reader/getEntryTranslation': (request: { entryId: string; }) => Promise<RemoteResult<{ translation?: ReaderEntryTranslationView; }>>
|
|
56
|
+
'reader/getRawBody': (request: { entryId: string; }) => Promise<RemoteResult<{ entryId: string; raw?: string; url?: string; truncated?: boolean; error?: string; }>>
|
|
57
|
+
'reader/getSentenceTranslations': (request: { pair: string; hashes: readonly string[]; }) => Promise<RemoteResult<{ translations: Record<string, string>; }>>
|
|
58
|
+
'reader/getStorageStats': () => Promise<RemoteResult<ReaderStorageStats>>
|
|
59
|
+
'reader/listBackfillCandidates': (request: { entries: readonly { entryId: string; url: string; label: string; hasBody: boolean; }[]; limit?: number; }) => Promise<RemoteResult<{ candidates: ReaderBackfillCandidate[]; }>>
|
|
60
|
+
'reader/listRecent': () => Promise<RemoteResult<{ entries: ReaderRecentEntry[]; }>>
|
|
61
|
+
'reader/listSources': () => Promise<RemoteResult<{ sources: ReaderSourceSummary[]; }>>
|
|
62
|
+
'reader/listTags': () => Promise<RemoteResult<{ tags: ReaderTag[]; counts: Record<string, number>; }>>
|
|
63
|
+
'reader/pruneTags': () => Promise<RemoteResult<{ removed: number; }>>
|
|
64
|
+
'reader/quoteToSideChat': (request: { contextKey: string; label: string; text: string; }) => Promise<RemoteResult<'ok' | 'unavailable'>>
|
|
65
|
+
'reader/recordRead': (request: { entryId: string; sourceId: string; title: string; url?: string; }) => Promise<RemoteResult<{ entries: number; }>>
|
|
66
|
+
'reader/refresh': (request: { ids?: string[]; }) => Promise<RemoteResult<{ results: ReaderRefreshResult[]; }>>
|
|
67
|
+
'reader/rememberSentences': (request: { pair: string; entries: readonly ReaderSentenceLearn[]; recalled?: readonly ReaderSentenceLearn[]; entryId?: string; bodyHash?: string; }) => Promise<RemoteResult<{ stored: number; }>>
|
|
68
|
+
'reader/removeSource': (request: { id: string; entryIds?: readonly string[]; }) => Promise<RemoteResult<ReaderMutationOutcome>>
|
|
69
|
+
'reader/renameTag': (request: { id: string; name: string; }) => Promise<RemoteResult<ReaderAnnotationOutcome>>
|
|
70
|
+
'reader/setCachePolicy': (request: { ttlHours: number; maxEntries?: number; translationBudgetChars?: number; }) => Promise<RemoteResult<ReaderAnnotationOutcome>>
|
|
71
|
+
'reader/storeEntryBody': (request: { entryId: string; url: string; html: string; truncated?: boolean; scriptFigures?: number; bodyHash?: string; title?: string; excerpt?: string; }) => Promise<RemoteResult<ReaderEntryBodyView>>
|
|
72
|
+
'reader/tagEntry': (request: { entryId: string; tagId: string; on: boolean; }) => Promise<RemoteResult<ReaderAnnotationOutcome>>
|
|
73
|
+
'reader/updateSource': (request: { id: string; enabled?: boolean; label?: string; url?: string; timeOfDay?: string; }) => Promise<RemoteResult<ReaderMutationOutcome>>
|
|
74
|
+
}
|
|
75
|
+
interface TypertRemoteNamespaceMap {
|
|
76
|
+
'reader': TypertRemoteNamespace$726561646572
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export declare const TYPERT_REMOTE: TypertRemoteContribution
|
|
81
|
+
export default TYPERT_REMOTE
|
|
82
|
+
//# sourceMappingURL=typert.remote-client.d.ts.map
|