Skip to content

✨ Adding workspace filter to snippets/folders list and listAll() via page=all - #11

Merged
simonc merged 2 commits into
mainfrom
list-workspace-filter-and-list-all
Oct 2, 2026
Merged

simonc merged 2 commits into
mainfrom
list-workspace-filter-and-list-all

Conversation

@simonc

@simonc simonc commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Gaps raised while building the CLI.

Changes

  • snippets.list() and templateFolders.list() now require workspace_id (sent as q[workspace_id]). The backend applies WorkspaceOrNoneFilter, so without it these calls always returned an empty list.
  • New listAll() on workspaces, document templates, snippets and template folders: one request with page=all, returns a plain T[]. Backed by a new fetchAll helper in pagination.ts, since a page=all response carries no meta and fetchPage would reject it.
  • Document cards get no listAll(): their optimized index does not honor page=all.
  • README, llms.txt, CHANGELOG (Unreleased) and a minor changeset.

Notes

Making workspace_id required is a type-level change, released as minor because calls without it never returned data.

Tests

pnpm test (204 passing), pnpm lint, tsc --noEmit.

@simonc
simonc merged commit df48ead into main Oct 2, 2026
6 checks passed
@simonc
simonc deleted the list-workspace-filter-and-list-all branch October 2, 2026 13:46
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