Repository navigation
feat: migrate to Notion API 2026-03-11 (and 2025-09-03) - #34
Merged
Merged
Conversation
Implements breaking changes from both upgrade guides: 2025-09-03: - Add DataSourceId variant to Parent enum - Add DataSourcesEndpoint with create/retrieve/update/query operations - Add DataSource object - Add data_source_id to RelationPropertyValue (alongside database_id) - Add DataSource variant to search FilterValue and PageOrDatabase response 2026-03-11: - Rename archived → in_trash across Page, Database, Block, and update requests - Replace after: String with position: AppendPosition in AppendBlockChildren - Add MeetingNotes block type (renamed from transcription) - Update Notion API version header to 2026-03-11 - Fix UpdateADataSourceRequest to use skip_serializing_none - Update all test fixtures to use in_trash Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move DateOrDateTime enum to property.rs and update DatePropertyValue.start/end to use Option<DateOrDateTime> instead of DateTime<Utc>, so Mention::Date can deserialize date-only strings like "2025-06-18" from Notion API responses. Fixes #33 https://claude.ai/code/session_01S5wxBMpq6XBJQg3P51UeZ8
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
Migrates the client to support Notion API versions 2025-09-03 and 2026-03-11, implementing all breaking changes from both upgrade guides.
2025-09-03 changes
DataSourcesEndpointwithcreate,retrieve,update, andqueryoperations at/v1/data_sources/*DataSourceobject (analogous toDatabasebut for multi-source databases)Parentenum: addedDataSourceIdvariant (data_source_id) alongside existingDatabaseIdRelationPropertyValue: addeddata_source_idfield (API returns both IDs for convenience; responses keepdatabase_idtoo)FilterValue: addedDataSourcevariant so callers can filter search results by data sourcePageOrDatabase: addedDataSourcevariant to handle data source objects in search results2026-03-11 changes
archived→in_trashonPage,Database,Block,UpdatePagePropertiesRequest, and all test fixturesAppendBlockChildren: replacedafter: Option<String>withposition: Option<AppendPosition>(supportsEnd,Start,AfterBlock)MeetingNotesblock type added (renamed fromtranscription)2026-03-11Fixes found during migration review
"archived"— updated to"in_trash"(tests were silently skipping the field viaserdeunknown-field tolerance)UpdateADataSourceRequestwas missing#[skip_serializing_none], causingnullfields to be serializedsynced_from_block.jsonandsearch_by_title_failure_with_missing_unique_id.jsonhad both"archived"and"in_trash"in the same object (Notion API transition period); deduplicated to"in_trash"onlyTest plan
cargo test)cargo build)2026-03-11🤖 Generated with Claude Code