Update public exports and README for Client class
Exports Client, all lower-level modules, and all types from src/index.ts. Replaces Phase 7 (on-disk session persistence) with the Client class phase: session lives in the object, consumer handles persistence via toJSON/fromJSON.
This commit is contained in:
15
README.md
15
README.md
@@ -649,12 +649,17 @@ Phase 6: download
|
||||
- [x] Live integration test: logs in, decrypts collections and files, downloads
|
||||
a real JPEG from the dev account and verifies it on disk
|
||||
|
||||
Phase 7: session persistence
|
||||
Phase 7: Client class
|
||||
|
||||
- [ ] `SessionStore` writing an encrypted session blob with a key from the OS
|
||||
keychain (`keytar`) or a `0600` keyfile fallback
|
||||
- [ ] `Client.fromSavedSession()` and `Client.saveSession()`
|
||||
- [ ] `quack logout` deletes the session and the keychain entry
|
||||
- [x] `Client.login({ email, password, totp?, emailOTP? })` performs the full
|
||||
SRP handshake, key unwrap, returns a ready Client
|
||||
- [x] `Client.fromJSON(snapshot)` restores from a serialized snapshot
|
||||
- [x] `client.toJSON()` produces a `ClientSnapshot` the consumer can persist
|
||||
- [x] `client.whoami()`, `client.logout()`
|
||||
- [x] `client.listCollections()` with decryption
|
||||
- [x] `client.listFiles(collectionID, collectionKey)` with pagination
|
||||
- [x] `client.downloadFile(file, outPath?)` and `client.downloadThumbnail()`
|
||||
- [x] Literate test/client/usage.test.ts tutorial covering the entire API
|
||||
|
||||
Phase 8: CLI
|
||||
|
||||
|
||||
22
src/index.ts
22
src/index.ts
@@ -1,9 +1,31 @@
|
||||
export const VERSION = "0.0.0";
|
||||
|
||||
export { Client, type LoginOptions, type ClientSnapshot } from "./client.js";
|
||||
export { ApiClient, ApiError, type ApiClientOptions } from "./api/client.js";
|
||||
export { unwrapAuth, type UnwrapResult } from "./auth/unwrap.js";
|
||||
export {
|
||||
beginLogin,
|
||||
submitTOTP,
|
||||
requestEmailOTP,
|
||||
submitEmailOTP,
|
||||
} from "./auth/login.js";
|
||||
export { decryptCollection, decryptFile } from "./model/index.js";
|
||||
export { downloadFile, downloadThumbnail } from "./download/index.js";
|
||||
export type {
|
||||
AuthorizationResponse,
|
||||
KeyAttributes,
|
||||
LoginChallenge,
|
||||
SRPAttributes,
|
||||
} from "./auth/types.js";
|
||||
export type {
|
||||
Collection,
|
||||
CollectionType,
|
||||
EnteFile,
|
||||
FileBlob,
|
||||
FileMetadata,
|
||||
FileType,
|
||||
Microseconds,
|
||||
RawCollection,
|
||||
RawEnteFile,
|
||||
} from "./model/types.js";
|
||||
export type { DownloadResult } from "./download/index.js";
|
||||
|
||||
Reference in New Issue
Block a user