Add support for Memos v0.25.1 and v0.26.1#56
Open
ccinoo wants to merge 1 commit intoRyoJerryYu:masterfrom
Open
Add support for Memos v0.25.1 and v0.26.1#56ccinoo wants to merge 1 commit intoRyoJerryYu:masterfrom
ccinoo wants to merge 1 commit intoRyoJerryYu:masterfrom
Conversation
This PR adds support for Memos API versions v0.25.1 and v0.26.1, addressing breaking changes in Memos v0.26.0 that migrated from gRPC-Web to Connect protocol. ## Changes ### v0.25.1 Support - Added `memos-v0.25.1.ts` API client using gRPC-Web with AttachmentService - Added `MemosFactory0251` and `MemosResourceFetcher0251` classes - Generated proto definitions from Memos v0.25.1 using buf ### v0.26.1 Support - Added `MemosPaginator0261` class using Obsidian's requestUrl (bypasses CORS) - Added `MemosResourceFetcher0261` using HTTP /file/ endpoint - Added `MemosFactory0261` - no gRPC clients needed, uses REST/Connect JSON ### Key v0.26.0 Breaking Changes Handled 1. **AuthService**: `GetCurrentSession` -> `GetCurrentUser` (skipped, not needed) 2. **AttachmentService**: `GetAttachmentBinary` removed (use HTTP /file/ endpoint) 3. **Protocol**: Server migrated to connect-rpc (CORS blocks gRPC-Web from Electron) ### Settings - Updated version dropdown: "v0.25.1": "v0.25.x", "v0.26.1": "v0.26.x and later" - Updated PluginSettings type to include v0.25.1 and v0.26.1 ### Adapter Updates - Added `attachments` property to Memo type (v0.25.1+ uses "attachments" instead of "resources") - Added `AttachmentCli` interface with `listAttachments` and `getAttachmentBinary` methods - Updated `AuthCli` to support both `getAuthStatus` (v0.22.0/v0.24.0) and `getCurrentSession` (v0.25.1)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for Memos API versions v0.25.1 and v0.26.1, addressing breaking changes in Memos v0.26.0 that migrated from gRPC-Web to Connect protocol.
Changes
v0.25.1 Support
memos-v0.25.1.tsAPI client using gRPC-Web with AttachmentServiceMemosFactory0251andMemosResourceFetcher0251classesv0.26.1 Support
MemosPaginator0261class using Obsidian's requestUrl (bypasses CORS)MemosResourceFetcher0261using HTTP /file/ endpointMemosFactory0261- no gRPC clients needed, uses REST/Connect JSONKey v0.26.0 Breaking Changes Handled
GetCurrentSession->GetCurrentUser(skipped, not needed)GetAttachmentBinaryremoved (use HTTP /file/ endpoint)Settings
Adapter Updates
attachmentsproperty to Memo type (v0.25.1+ uses "attachments" instead of "resources")AttachmentCliinterface withlistAttachmentsandgetAttachmentBinarymethodsAuthClito support bothgetAuthStatus(v0.22.0/v0.24.0) andgetCurrentSession(v0.25.1)