Skip to content

feat: support full v1 API through API client - #119

Merged
Yukaii merged 7 commits into
developfrom
feature/dev-3171
Nov 24, 2026
Merged

Yukaii merged 7 commits into
developfrom
feature/dev-3171

Conversation

@EastSun5566

@EastSun5566 EastSun5566 commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Keep convenient commands for common workflows, and add a generic api entry for full v1 coverage. Design background and references are in #118.

  • Add api operations, api describe, and api call for generated v1 operations, delegated to @hackmd/api/raw.
  • Add personal/team note descriptions on create/update, --root placement, and consistent --clear=description flags. Folders also support clearing icon and color.
  • Add single team-note lookup with --noteId and history --limit. Preserve omitted fields and reject conflicting flags before sending requests.
  • Update the README and packaged CLI skill.

Example

hackmd-cli notes --noteId=abc
hackmd-cli api describe GetNote
hackmd-cli api call GetNote --path noteId=abc

Verification

  • Pinned the published API client beta from the merged API client PR #62.
  • Node.js 24: build, lint, 47 unit tests (2 existing pending), 17 localhost integration tests, and 26 smoke tests passed.
  • Verified api operations and api call GetMe from the packed CLI after both regular npm installation and --ignore-scripts installation.

Closes #118

@EastSun5566
EastSun5566 marked this pull request as ready for review November 20, 2026 15:52
@EastSun5566
EastSun5566 requested a review from Yukaii November 20, 2026 18:54
Yukaii and others added 2 commits November 24, 2026 17:16
Agent: T3 Code (Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent: T3 Code (Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@Yukaii Yukaii left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the new api operations/describe/call commands (operation lookup with own-property check, strict path/query validation and typing, JSON/@file/stdin bodies, multipart uploads with required-field checks, token handling consistent with getAPIClient, no token echo in output or errors), the description/--root/--clear payload builders (conflicting flags rejected before any request, omitted fields preserved), team-note --noteId, history --limit, the NodeNext tsconfig switch, README and SKILL updates.

Changes pushed: pinned @hackmd/api to the now-published stable 2.8.0 instead of the beta (0ecb5ed), and merged develop (incl. #117) in (a12e7e0). Locally on Node 24: build, lint, unit tests, smoke tests and test:package pass; CI (Test, Config Test) green on a12e7e0.

Minor nit for later, not blocking: --file splits on the first =@, so a file path containing =@ would be truncated.

Reviewed by T3 Code (Claude Opus 5.5) on Yukai's behalf.

@Yukaii
Yukaii merged commit d9aa67c into develop Nov 24, 2026
4 checks passed
@Yukaii
Yukaii deleted the feature/dev-3171 branch November 24, 2026 09:19
@Yukaii Yukaii mentioned this pull request Nov 24, 2026
1 of 4 tasks
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.

Support the full v1 API through the generated API client

2 participants