Skip to content

feat(messages): add htmlAsMarkdown to CleanMessagesRequest#740

Open
openclaw-sre-agent[bot] wants to merge 2 commits into
mainfrom
nines/TW-5222-add-html-as-markdown
Open

feat(messages): add htmlAsMarkdown to CleanMessagesRequest#740
openclaw-sre-agent[bot] wants to merge 2 commits into
mainfrom
nines/TW-5222-add-html-as-markdown

Conversation

@openclaw-sre-agent

@openclaw-sre-agent openclaw-sre-agent Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the missing htmlAsMarkdown optional boolean field to the CleanMessagesRequest interface in the Node SDK.

Context

The Nylas v3 API's PUT /v3/grants/{grant_id}/messages/clean endpoint supports an html_as_markdown parameter (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 to false
  • When true, the conversation field in the response contains Markdown-formatted text
  • Cannot be true when images_as_markdown is false

Changes

  • src/models/messages.ts — Added htmlAsMarkdown?: boolean to CleanMessagesRequest with JSDoc
  • tests/resources/messages.spec.ts — Updated cleanMessages test to include htmlAsMarkdown

Testing

All 35 tests in messages.spec.ts pass.

Resolves TW-5222

Nines AI SRE 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

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.90%. Comparing base (6a4734a) to head (fef2215).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant