notionary 0.2.25__tar.gz → 0.2.26__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {notionary-0.2.25 → notionary-0.2.26}/PKG-INFO +1 -1
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/callout/callout_models.py +1 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/database/client.py +0 -2
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/models.py +4 -9
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/notion_page.py +27 -31
- {notionary-0.2.25 → notionary-0.2.26}/pyproject.toml +1 -1
- {notionary-0.2.25 → notionary-0.2.26}/LICENSE +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/README.md +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/base_notion_client.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/_bootstrap.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/audio/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/audio/audio_element.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/audio/audio_markdown_node.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/audio/audio_models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/base_block_element.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/bookmark/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/bookmark/bookmark_element.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/bookmark/bookmark_markdown_node.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/bookmark/bookmark_models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/breadcrumbs/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/breadcrumbs/breadcrumb_element.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/breadcrumbs/breadcrumb_markdown_node.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/breadcrumbs/breadcrumb_models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/bulleted_list/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/bulleted_list/bulleted_list_element.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/bulleted_list/bulleted_list_markdown_node.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/bulleted_list/bulleted_list_models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/callout/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/callout/callout_element.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/callout/callout_markdown_node.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/child_database/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/child_database/child_database_element.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/child_database/child_database_models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/child_page/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/child_page/child_page_element.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/child_page/child_page_models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/client.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/code/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/code/code_element.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/code/code_markdown_node.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/code/code_models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/column/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/column/column_element.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/column/column_list_element.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/column/column_list_markdown_node.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/column/column_markdown_node.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/column/column_models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/divider/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/divider/divider_element.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/divider/divider_markdown_node.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/divider/divider_models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/embed/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/embed/embed_element.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/embed/embed_markdown_node.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/embed/embed_models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/equation/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/equation/equation_element.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/equation/equation_element_markdown_node.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/equation/equation_models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/file/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/file/file_element.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/file/file_element_markdown_node.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/file/file_element_models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/heading/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/heading/heading_element.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/heading/heading_markdown_node.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/heading/heading_models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/image_block/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/image_block/image_element.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/image_block/image_markdown_node.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/image_block/image_models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/markdown/markdown_builder.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/markdown/markdown_document_model.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/markdown/markdown_node.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/mixins/captions/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/mixins/captions/caption_markdown_node_mixin.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/mixins/captions/caption_mixin.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/mixins/file_upload/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/mixins/file_upload/file_upload_mixin.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/numbered_list/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/numbered_list/numbered_list_element.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/numbered_list/numbered_list_markdown_node.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/numbered_list/numbered_list_models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/paragraph/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/paragraph/paragraph_element.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/paragraph/paragraph_markdown_node.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/paragraph/paragraph_models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/pdf/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/pdf/pdf_element.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/pdf/pdf_markdown_node.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/pdf/pdf_models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/quote/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/quote/quote_element.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/quote/quote_markdown_node.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/quote/quote_models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/registry/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/registry/block_registry.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/rich_text/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/rich_text/rich_text_models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/rich_text/text_inline_formatter.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/syntax_prompt_builder.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/table/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/table/table_element.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/table/table_markdown_node.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/table/table_models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/table_of_contents/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/table_of_contents/table_of_contents_element.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/table_of_contents/table_of_contents_markdown_node.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/table_of_contents/table_of_contents_models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/todo/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/todo/todo_element.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/todo/todo_markdown_node.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/todo/todo_models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/toggle/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/toggle/toggle_element.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/toggle/toggle_markdown_node.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/toggle/toggle_models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/toggleable_heading/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/toggleable_heading/toggleable_heading_element.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/toggleable_heading/toggleable_heading_markdown_node.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/types.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/video/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/video/video_element.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/video/video_element_models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/video/video_markdown_node.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/comments/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/comments/client.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/comments/models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/database/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/database/database.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/database/database_filter_builder.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/database/database_provider.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/database/exceptions.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/database/factory.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/database/models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/database/notion_database.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/file_upload/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/file_upload/client.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/file_upload/models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/file_upload/notion_file_upload.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/client.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/markdown_whitespace_processor.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/page_content_deleting_service.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/page_content_writer.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/page_context.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/property_formatter.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/reader/handler/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/reader/handler/base_block_renderer.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/reader/handler/block_processing_context.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/reader/handler/block_rendering_context.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/reader/handler/column_list_renderer.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/reader/handler/column_renderer.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/reader/handler/equation_renderer.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/reader/handler/line_renderer.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/reader/handler/numbered_list_renderer.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/reader/handler/toggle_renderer.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/reader/handler/toggleable_heading_renderer.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/reader/page_content_retriever.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/search_filter_builder.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/utils.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/writer/handler/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/writer/handler/code_handler.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/writer/handler/column_handler.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/writer/handler/column_list_handler.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/writer/handler/equation_handler.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/writer/handler/line_handler.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/writer/handler/line_processing_context.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/writer/handler/regular_line_handler.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/writer/handler/table_handler.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/writer/handler/toggle_handler.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/writer/handler/toggleable_heading_handler.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/writer/markdown_to_notion_converter.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/writer/markdown_to_notion_converter_context.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/writer/markdown_to_notion_text_length_post_processor.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/page/writer/notion_text_length_processor.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/schemas/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/schemas/base.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/shared/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/shared/name_to_id_resolver.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/telemetry/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/telemetry/service.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/telemetry/views.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/user/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/user/base_notion_user.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/user/client.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/user/models.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/user/notion_bot_user.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/user/notion_user.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/user/notion_user_manager.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/util/__init__.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/util/concurrency_limiter.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/util/factory_decorator.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/util/factory_only.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/util/fuzzy.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/util/logging_mixin.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/util/page_id_utils.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/util/singleton.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/util/singleton_metaclass.py +0 -0
- {notionary-0.2.25 → notionary-0.2.26}/notionary/workspace.py +0 -0
@@ -2,6 +2,8 @@ from typing import Any, Literal, Optional, Union
|
|
2
2
|
|
3
3
|
from pydantic import BaseModel, ConfigDict
|
4
4
|
|
5
|
+
from notionary.blocks.models import ParentObject
|
6
|
+
|
5
7
|
|
6
8
|
class TextContent(BaseModel):
|
7
9
|
content: str
|
@@ -241,13 +243,6 @@ class NotionCover(BaseModel):
|
|
241
243
|
external: Optional[ExternalCover] = None
|
242
244
|
|
243
245
|
|
244
|
-
# Parent types for Pydantic
|
245
|
-
class NotionParent(BaseModel):
|
246
|
-
type: str # 'database_id', 'page_id', 'workspace'
|
247
|
-
database_id: Optional[str] = None
|
248
|
-
page_id: Optional[str] = None
|
249
|
-
|
250
|
-
|
251
246
|
# User type for Pydantic
|
252
247
|
class NotionUser(BaseModel):
|
253
248
|
object: str # 'user'
|
@@ -274,7 +269,7 @@ class NotionDatabaseResponse(BaseModel):
|
|
274
269
|
properties: dict[
|
275
270
|
str, Any
|
276
271
|
] # Using Any for flexibility with different property schemas
|
277
|
-
parent:
|
272
|
+
parent: ParentObject
|
278
273
|
url: str
|
279
274
|
public_url: Optional[str] = None
|
280
275
|
archived: bool
|
@@ -290,7 +285,7 @@ class NotionPageResponse(BaseModel):
|
|
290
285
|
last_edited_by: NotionUser
|
291
286
|
cover: Optional[NotionCover] = None
|
292
287
|
icon: Optional[Icon] = None
|
293
|
-
parent:
|
288
|
+
parent: ParentObject
|
294
289
|
archived: bool
|
295
290
|
in_trash: bool
|
296
291
|
properties: dict[str, Any]
|
@@ -1,13 +1,16 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
|
+
from ast import Dict
|
3
4
|
import asyncio
|
4
5
|
import random
|
5
6
|
from typing import TYPE_CHECKING, Any, Callable, Optional, Union
|
6
7
|
|
8
|
+
from yaml import Token
|
9
|
+
|
7
10
|
from notionary.blocks.client import NotionBlockClient
|
8
11
|
from notionary.comments import CommentClient, Comment
|
9
12
|
from notionary.blocks.syntax_prompt_builder import SyntaxPromptBuilder
|
10
|
-
from notionary.blocks.models import DatabaseParent
|
13
|
+
from notionary.blocks.models import DatabaseParent, ParentObject
|
11
14
|
from notionary.blocks.registry.block_registry import BlockRegistry
|
12
15
|
from notionary.database.client import NotionDatabaseClient
|
13
16
|
from notionary.file_upload.client import NotionFileUploadClient
|
@@ -61,6 +64,7 @@ class NotionPage(LoggingMixin):
|
|
61
64
|
|
62
65
|
self._client = NotionPageClient(token=token)
|
63
66
|
self._block_client = NotionBlockClient(token=token)
|
67
|
+
self._database_client = NotionDatabaseClient(token=token)
|
64
68
|
self._comment_client = CommentClient(token=token)
|
65
69
|
self._page_data = None
|
66
70
|
|
@@ -433,30 +437,20 @@ class NotionPage(LoggingMixin):
|
|
433
437
|
"""
|
434
438
|
Get the value of a specific property.
|
435
439
|
"""
|
436
|
-
if not self.
|
437
|
-
return None
|
438
|
-
|
439
|
-
database_property_schema = self._parent_database.properties.get(property_name)
|
440
|
-
|
441
|
-
if not database_property_schema:
|
440
|
+
if property_name not in self._properties:
|
442
441
|
self.logger.warning(
|
443
|
-
"Property '%s' not found in
|
442
|
+
"Property '%s' not found in page properties", property_name
|
444
443
|
)
|
445
444
|
return None
|
446
445
|
|
447
|
-
|
446
|
+
property_schema: dict = self._properties.get(property_name)
|
447
|
+
|
448
|
+
property_type = property_schema.get("type")
|
448
449
|
|
449
450
|
if property_type == "relation":
|
450
451
|
return await self._get_relation_property_values_by_name(property_name)
|
451
452
|
|
452
|
-
|
453
|
-
self.logger.warning(
|
454
|
-
"Property '%s' not found in page properties", property_name
|
455
|
-
)
|
456
|
-
return None
|
457
|
-
|
458
|
-
property_data = self._properties.get(property_name)
|
459
|
-
return extract_property_value(property_data)
|
453
|
+
return extract_property_value(property_schema)
|
460
454
|
|
461
455
|
async def _get_relation_property_values_by_name(
|
462
456
|
self, property_name: str
|
@@ -464,7 +458,7 @@ class NotionPage(LoggingMixin):
|
|
464
458
|
"""
|
465
459
|
Retrieve the titles of all related pages for a relation property.
|
466
460
|
"""
|
467
|
-
page_property_schema = self.
|
461
|
+
page_property_schema = self._properties.get(property_name)
|
468
462
|
relation_page_ids = [
|
469
463
|
rel.get("id") for rel in page_property_schema.get("relation", [])
|
470
464
|
]
|
@@ -477,23 +471,25 @@ class NotionPage(LoggingMixin):
|
|
477
471
|
"""
|
478
472
|
Get the available options for a property (select, multi_select, status, relation).
|
479
473
|
"""
|
480
|
-
if not self.
|
481
|
-
self.logger.
|
482
|
-
"
|
483
|
-
property_name,
|
474
|
+
if property_name not in self.properties:
|
475
|
+
self.logger.warning(
|
476
|
+
"Property '%s' not found in page properties", property_name
|
484
477
|
)
|
485
478
|
return []
|
486
479
|
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
return
|
480
|
+
property_schema: dict = self.properties.get(property_name)
|
481
|
+
property_type = property_schema.get("type")
|
482
|
+
|
483
|
+
if property_type in ["select", "multi_select", "status"]:
|
484
|
+
options = property_schema.get(property_type, {}).get("options", [])
|
485
|
+
return [option.get("name", "") for option in options]
|
486
|
+
|
487
|
+
if property_type == "relation" and self._parent_database:
|
488
|
+
return await self._parent_database._get_relation_options(property_name)
|
489
|
+
|
490
|
+
return []
|
496
491
|
|
492
|
+
# Fix this for pages that do not ah
|
497
493
|
async def set_property_value_by_name(self, property_name: str, value: Any) -> Any:
|
498
494
|
"""
|
499
495
|
Set the value of a specific property by its name.
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/breadcrumbs/breadcrumb_markdown_node.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/bulleted_list/bulleted_list_element.py
RENAMED
File without changes
|
{notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/bulleted_list/bulleted_list_markdown_node.py
RENAMED
File without changes
|
{notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/bulleted_list/bulleted_list_models.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/child_database/child_database_element.py
RENAMED
File without changes
|
{notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/child_database/child_database_models.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/equation/equation_element_markdown_node.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/mixins/file_upload/file_upload_mixin.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/numbered_list/numbered_list_element.py
RENAMED
File without changes
|
{notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/numbered_list/numbered_list_markdown_node.py
RENAMED
File without changes
|
{notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/numbered_list/numbered_list_models.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{notionary-0.2.25 → notionary-0.2.26}/notionary/blocks/table_of_contents/table_of_contents_models.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{notionary-0.2.25 → notionary-0.2.26}/notionary/page/reader/handler/block_processing_context.py
RENAMED
File without changes
|
{notionary-0.2.25 → notionary-0.2.26}/notionary/page/reader/handler/block_rendering_context.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{notionary-0.2.25 → notionary-0.2.26}/notionary/page/reader/handler/numbered_list_renderer.py
RENAMED
File without changes
|
File without changes
|
{notionary-0.2.25 → notionary-0.2.26}/notionary/page/reader/handler/toggleable_heading_renderer.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{notionary-0.2.25 → notionary-0.2.26}/notionary/page/writer/handler/line_processing_context.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{notionary-0.2.25 → notionary-0.2.26}/notionary/page/writer/handler/toggleable_heading_handler.py
RENAMED
File without changes
|
File without changes
|
{notionary-0.2.25 → notionary-0.2.26}/notionary/page/writer/markdown_to_notion_converter_context.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|