Skip to content

Fix data source search and sync handling#90

Open
rossbrg wants to merge 1 commit into
Coastal-Programs:mainfrom
rossbrg:fix/data-source-cli-cleanups
Open

Fix data source search and sync handling#90
rossbrg wants to merge 1 commit into
Coastal-Programs:mainfrom
rossbrg:fix/data-source-cli-cleanups

Conversation

@rossbrg

@rossbrg rossbrg commented May 13, 2026

Copy link
Copy Markdown

Summary

Notion search now returns database-like objects through the data_source filter. This updates the CLI paths that still asked search for database objects, while keeping --property database as a compatibility alias for users.

This also pulls two small shared helpers into place:

  • clierrors.Wrap for repeated wrapped CLI errors
  • outputFormatExplicit for commands that need to know whether the caller requested structured output

Changes

  • Use data_source for search and sync filters.
  • Teach sync to cache results returned as data_source objects, including the parent database ID when Notion provides it.
  • Keep database/db as accepted search aliases.
  • Add tests for search filter behavior and sync cache output.
  • Replace repeated local error-wrapping boilerplate in the touched paths.

Testing

  • make test
  • make build
  • make lint

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