feat(messages): add htmlAsMarkdown to CleanMessagesRequest#740
Open
openclaw-sre-agent[bot] wants to merge 2 commits into
Open
feat(messages): add htmlAsMarkdown to CleanMessagesRequest#740openclaw-sre-agent[bot] wants to merge 2 commits into
openclaw-sre-agent[bot] wants to merge 2 commits into
Conversation
added 2 commits
June 16, 2026 15:29
The threads.find method silently dropped any queryParams passed to it, making it impossible to use the 'select' parameter to reduce field sets on single-thread fetches through the SDK's public API. This follows the same pattern established in folders.find (PR #686) and messages.find — destructure queryParams from FindThreadParams and forward it to the underlying _find call. Adds FindThreadQueryParams interface with the 'select' field and a test verifying queryParams are forwarded correctly. Fixes CUST-5472
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #740 +/- ##
=======================================
Coverage 98.90% 98.90%
=======================================
Files 42 42
Lines 1006 1006
Branches 90 90
=======================================
Hits 995 995
Misses 11 11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Summary
Adds the missing
htmlAsMarkdownoptional boolean field to theCleanMessagesRequestinterface in the Node SDK.Context
The Nylas v3 API's
PUT /v3/grants/{grant_id}/messages/cleanendpoint supports anhtml_as_markdownparameter (beta) that converts the cleaned message body to Markdown instead of returning plain text/HTML. This field was already documented in the API reference but was missing from the Node SDK's TypeScript interface.API spec:
html_as_markdown— boolean, optional, defaults tofalsetrue, theconversationfield in the response contains Markdown-formatted texttruewhenimages_as_markdownisfalseChanges
src/models/messages.ts— AddedhtmlAsMarkdown?: booleantoCleanMessagesRequestwith JSDoctests/resources/messages.spec.ts— UpdatedcleanMessagestest to includehtmlAsMarkdownTesting
All 35 tests in
messages.spec.tspass.Resolves TW-5222