notionary 0.3.1__tar.gz → 0.4.0__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.
Files changed (254) hide show
  1. {notionary-0.3.1 → notionary-0.4.0}/PKG-INFO +1 -1
  2. {notionary-0.3.1 → notionary-0.4.0}/notionary/__init__.py +6 -1
  3. {notionary-0.3.1 → notionary-0.4.0}/notionary/blocks/enums.py +0 -6
  4. {notionary-0.3.1 → notionary-0.4.0}/notionary/blocks/schemas.py +32 -78
  5. {notionary-0.3.1 → notionary-0.4.0}/notionary/comments/schemas.py +2 -29
  6. {notionary-0.3.1 → notionary-0.4.0}/notionary/data_source/properties/schemas.py +128 -107
  7. {notionary-0.3.1 → notionary-0.4.0}/notionary/data_source/schemas.py +2 -2
  8. {notionary-0.3.1 → notionary-0.4.0}/notionary/data_source/service.py +32 -23
  9. {notionary-0.3.1 → notionary-0.4.0}/notionary/database/schemas.py +2 -2
  10. {notionary-0.3.1 → notionary-0.4.0}/notionary/database/service.py +3 -5
  11. {notionary-0.3.1 → notionary-0.4.0}/notionary/exceptions/__init__.py +6 -2
  12. {notionary-0.3.1 → notionary-0.4.0}/notionary/exceptions/api.py +2 -2
  13. notionary-0.4.0/notionary/exceptions/base.py +2 -0
  14. {notionary-0.3.1 → notionary-0.4.0}/notionary/exceptions/block_parsing.py +3 -3
  15. {notionary-0.3.1 → notionary-0.4.0}/notionary/exceptions/data_source/builder.py +2 -2
  16. {notionary-0.3.1 → notionary-0.4.0}/notionary/exceptions/data_source/properties.py +3 -3
  17. notionary-0.4.0/notionary/exceptions/file_upload.py +67 -0
  18. {notionary-0.3.1 → notionary-0.4.0}/notionary/exceptions/properties.py +4 -4
  19. {notionary-0.3.1 → notionary-0.4.0}/notionary/exceptions/search.py +4 -4
  20. notionary-0.4.0/notionary/file_upload/__init__.py +4 -0
  21. notionary-0.4.0/notionary/file_upload/client.py +155 -0
  22. notionary-0.4.0/notionary/file_upload/config/__init__.py +17 -0
  23. notionary-0.4.0/notionary/file_upload/config/config.py +32 -0
  24. notionary-0.4.0/notionary/file_upload/config/constants.py +16 -0
  25. notionary-0.4.0/notionary/file_upload/file/reader.py +28 -0
  26. notionary-0.4.0/notionary/file_upload/query/__init__.py +7 -0
  27. notionary-0.4.0/notionary/file_upload/query/builder.py +54 -0
  28. notionary-0.4.0/notionary/file_upload/query/models.py +37 -0
  29. notionary-0.4.0/notionary/file_upload/schemas.py +78 -0
  30. notionary-0.4.0/notionary/file_upload/service.py +214 -0
  31. notionary-0.4.0/notionary/file_upload/validation/factory.py +64 -0
  32. notionary-0.4.0/notionary/file_upload/validation/impl/file_name_length.py +23 -0
  33. notionary-0.4.0/notionary/file_upload/validation/models.py +124 -0
  34. notionary-0.4.0/notionary/file_upload/validation/port.py +7 -0
  35. notionary-0.4.0/notionary/file_upload/validation/service.py +17 -0
  36. notionary-0.4.0/notionary/file_upload/validation/validators/__init__.py +11 -0
  37. notionary-0.4.0/notionary/file_upload/validation/validators/file_exists.py +15 -0
  38. notionary-0.4.0/notionary/file_upload/validation/validators/file_extension.py +122 -0
  39. notionary-0.4.0/notionary/file_upload/validation/validators/file_name_length.py +21 -0
  40. notionary-0.4.0/notionary/file_upload/validation/validators/upload_limit.py +31 -0
  41. {notionary-0.3.1 → notionary-0.4.0}/notionary/http/client.py +6 -22
  42. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/factory.py +8 -5
  43. notionary-0.4.0/notionary/page/content/parser/parsers/audio.py +15 -0
  44. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/parsers/embed.py +0 -2
  45. notionary-0.4.0/notionary/page/content/parser/parsers/file.py +15 -0
  46. notionary-0.4.0/notionary/page/content/parser/parsers/file_like_block.py +89 -0
  47. notionary-0.4.0/notionary/page/content/parser/parsers/image.py +15 -0
  48. notionary-0.4.0/notionary/page/content/parser/parsers/pdf.py +15 -0
  49. notionary-0.4.0/notionary/page/content/parser/parsers/video.py +15 -0
  50. notionary-0.4.0/notionary/page/content/renderer/renderers/audio.py +19 -0
  51. notionary-0.4.0/notionary/page/content/renderer/renderers/file.py +28 -0
  52. notionary-0.4.0/notionary/page/content/renderer/renderers/file_like_block.py +43 -0
  53. notionary-0.4.0/notionary/page/content/renderer/renderers/image.py +19 -0
  54. notionary-0.4.0/notionary/page/content/renderer/renderers/pdf.py +19 -0
  55. notionary-0.4.0/notionary/page/content/renderer/renderers/video.py +19 -0
  56. notionary-0.4.0/notionary/page/content/syntax/__init__.py +5 -0
  57. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/syntax/registry.py +38 -60
  58. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/properties/client.py +1 -1
  59. notionary-0.3.1/notionary/page/properties/models.py → notionary-0.4.0/notionary/page/properties/schemas.py +93 -107
  60. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/properties/service.py +1 -1
  61. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/schemas.py +3 -3
  62. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/service.py +1 -1
  63. notionary-0.4.0/notionary/shared/entity/dto_parsers.py +18 -0
  64. {notionary-0.3.1 → notionary-0.4.0}/notionary/shared/entity/entity_metadata_update_client.py +18 -4
  65. {notionary-0.3.1 → notionary-0.4.0}/notionary/shared/entity/schemas.py +6 -6
  66. {notionary-0.3.1 → notionary-0.4.0}/notionary/shared/entity/service.py +53 -30
  67. notionary-0.4.0/notionary/shared/models/file.py +49 -0
  68. notionary-0.4.0/notionary/shared/models/icon.py +21 -0
  69. {notionary-0.3.1 → notionary-0.4.0}/notionary/user/bot.py +12 -12
  70. {notionary-0.3.1 → notionary-0.4.0}/notionary/utils/decorators.py +8 -8
  71. notionary-0.4.0/notionary/workspace/__init__.py +4 -0
  72. notionary-0.4.0/notionary/workspace/query/__init__.py +4 -0
  73. {notionary-0.3.1 → notionary-0.4.0}/notionary/workspace/query/service.py +3 -17
  74. notionary-0.4.0/notionary/workspace/service.py +126 -0
  75. {notionary-0.3.1 → notionary-0.4.0}/pyproject.toml +1 -1
  76. notionary-0.3.1/notionary/exceptions/base.py +0 -2
  77. notionary-0.3.1/notionary/file_upload/client.py +0 -241
  78. notionary-0.3.1/notionary/file_upload/models.py +0 -69
  79. notionary-0.3.1/notionary/file_upload/service.py +0 -351
  80. notionary-0.3.1/notionary/page/content/parser/parsers/audio.py +0 -40
  81. notionary-0.3.1/notionary/page/content/parser/parsers/file.py +0 -42
  82. notionary-0.3.1/notionary/page/content/parser/parsers/image.py +0 -42
  83. notionary-0.3.1/notionary/page/content/parser/parsers/pdf.py +0 -42
  84. notionary-0.3.1/notionary/page/content/parser/parsers/video.py +0 -42
  85. notionary-0.3.1/notionary/page/content/renderer/renderers/audio.py +0 -31
  86. notionary-0.3.1/notionary/page/content/renderer/renderers/file.py +0 -40
  87. notionary-0.3.1/notionary/page/content/renderer/renderers/image.py +0 -31
  88. notionary-0.3.1/notionary/page/content/renderer/renderers/pdf.py +0 -31
  89. notionary-0.3.1/notionary/page/content/renderer/renderers/video.py +0 -31
  90. notionary-0.3.1/notionary/page/content/syntax/__init__.py +0 -4
  91. notionary-0.3.1/notionary/page/page_context.py +0 -50
  92. notionary-0.3.1/notionary/shared/entity/dto_parsers.py +0 -53
  93. notionary-0.3.1/notionary/shared/models/cover.py +0 -20
  94. notionary-0.3.1/notionary/shared/models/file.py +0 -21
  95. notionary-0.3.1/notionary/shared/models/icon.py +0 -28
  96. notionary-0.3.1/notionary/workspace/__init__.py +0 -4
  97. notionary-0.3.1/notionary/workspace/query/__init__.py +0 -3
  98. notionary-0.3.1/notionary/workspace/service.py +0 -126
  99. {notionary-0.3.1 → notionary-0.4.0}/.gitignore +0 -0
  100. {notionary-0.3.1 → notionary-0.4.0}/LICENSE +0 -0
  101. {notionary-0.3.1 → notionary-0.4.0}/README.md +0 -0
  102. {notionary-0.3.1 → notionary-0.4.0}/notionary/blocks/__init__.py +0 -0
  103. {notionary-0.3.1 → notionary-0.4.0}/notionary/blocks/client.py +0 -0
  104. {notionary-0.3.1 → notionary-0.4.0}/notionary/blocks/rich_text/markdown_rich_text_converter.py +0 -0
  105. {notionary-0.3.1 → notionary-0.4.0}/notionary/blocks/rich_text/models.py +0 -0
  106. {notionary-0.3.1 → notionary-0.4.0}/notionary/blocks/rich_text/name_id_resolver/__init__.py +0 -0
  107. {notionary-0.3.1 → notionary-0.4.0}/notionary/blocks/rich_text/name_id_resolver/data_source.py +0 -0
  108. {notionary-0.3.1 → notionary-0.4.0}/notionary/blocks/rich_text/name_id_resolver/database.py +0 -0
  109. {notionary-0.3.1 → notionary-0.4.0}/notionary/blocks/rich_text/name_id_resolver/page.py +0 -0
  110. {notionary-0.3.1 → notionary-0.4.0}/notionary/blocks/rich_text/name_id_resolver/person.py +0 -0
  111. {notionary-0.3.1 → notionary-0.4.0}/notionary/blocks/rich_text/name_id_resolver/port.py +0 -0
  112. {notionary-0.3.1 → notionary-0.4.0}/notionary/blocks/rich_text/rich_text_markdown_converter.py +0 -0
  113. {notionary-0.3.1 → notionary-0.4.0}/notionary/blocks/rich_text/rich_text_patterns.py +0 -0
  114. {notionary-0.3.1 → notionary-0.4.0}/notionary/comments/__init__.py +0 -0
  115. {notionary-0.3.1 → notionary-0.4.0}/notionary/comments/client.py +0 -0
  116. {notionary-0.3.1 → notionary-0.4.0}/notionary/comments/factory.py +0 -0
  117. {notionary-0.3.1 → notionary-0.4.0}/notionary/comments/models.py +0 -0
  118. {notionary-0.3.1 → notionary-0.4.0}/notionary/comments/service.py +0 -0
  119. {notionary-0.3.1 → notionary-0.4.0}/notionary/data_source/http/client.py +0 -0
  120. {notionary-0.3.1 → notionary-0.4.0}/notionary/data_source/http/data_source_instance_client.py +0 -0
  121. {notionary-0.3.1 → notionary-0.4.0}/notionary/data_source/query/__init__.py +0 -0
  122. {notionary-0.3.1 → notionary-0.4.0}/notionary/data_source/query/builder.py +0 -0
  123. {notionary-0.3.1 → notionary-0.4.0}/notionary/data_source/query/resolver.py +0 -0
  124. {notionary-0.3.1 → notionary-0.4.0}/notionary/data_source/query/schema.py +0 -0
  125. {notionary-0.3.1 → notionary-0.4.0}/notionary/data_source/query/validator.py +0 -0
  126. {notionary-0.3.1 → notionary-0.4.0}/notionary/data_source/schema/registry.py +0 -0
  127. {notionary-0.3.1 → notionary-0.4.0}/notionary/data_source/schema/service.py +0 -0
  128. {notionary-0.3.1 → notionary-0.4.0}/notionary/database/client.py +0 -0
  129. {notionary-0.3.1 → notionary-0.4.0}/notionary/database/database_metadata_update_client.py +0 -0
  130. {notionary-0.3.1 → notionary-0.4.0}/notionary/exceptions/data_source/__init__.py +0 -0
  131. {notionary-0.3.1 → notionary-0.4.0}/notionary/http/models.py +0 -0
  132. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/blocks/client.py +0 -0
  133. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/factory.py +0 -0
  134. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/__init__.py +0 -0
  135. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/builder.py +0 -0
  136. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/__init__.py +0 -0
  137. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/audio.py +0 -0
  138. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/base.py +0 -0
  139. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/bookmark.py +0 -0
  140. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/breadcrumb.py +0 -0
  141. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/bulleted_list.py +0 -0
  142. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/callout.py +0 -0
  143. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/code.py +0 -0
  144. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/columns.py +0 -0
  145. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/container.py +0 -0
  146. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/divider.py +0 -0
  147. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/embed.py +0 -0
  148. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/equation.py +0 -0
  149. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/file.py +0 -0
  150. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/heading.py +0 -0
  151. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/image.py +0 -0
  152. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/mixins/__init__.py +0 -0
  153. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/mixins/caption.py +0 -0
  154. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/numbered_list.py +0 -0
  155. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/paragraph.py +0 -0
  156. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/pdf.py +0 -0
  157. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/quote.py +0 -0
  158. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/space.py +0 -0
  159. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/table.py +0 -0
  160. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/table_of_contents.py +0 -0
  161. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/todo.py +0 -0
  162. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/toggle.py +0 -0
  163. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/markdown/nodes/video.py +0 -0
  164. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/context.py +0 -0
  165. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/parsers/__init__.py +0 -0
  166. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/parsers/base.py +0 -0
  167. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/parsers/bookmark.py +0 -0
  168. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/parsers/breadcrumb.py +0 -0
  169. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/parsers/bulleted_list.py +0 -0
  170. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/parsers/callout.py +0 -0
  171. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/parsers/caption.py +0 -0
  172. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/parsers/code.py +0 -0
  173. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/parsers/column.py +0 -0
  174. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/parsers/column_list.py +0 -0
  175. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/parsers/divider.py +0 -0
  176. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/parsers/equation.py +0 -0
  177. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/parsers/heading.py +0 -0
  178. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/parsers/numbered_list.py +0 -0
  179. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/parsers/paragraph.py +0 -0
  180. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/parsers/quote.py +0 -0
  181. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/parsers/space.py +0 -0
  182. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/parsers/table.py +0 -0
  183. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/parsers/table_of_contents.py +0 -0
  184. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/parsers/todo.py +0 -0
  185. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/parsers/toggle.py +0 -0
  186. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/post_processing/handlers/__init__.py +0 -0
  187. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/post_processing/handlers/rich_text_length.py +0 -0
  188. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/post_processing/handlers/rich_text_length_truncation.py +0 -0
  189. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/post_processing/port.py +0 -0
  190. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/post_processing/service.py +0 -0
  191. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/pre_processsing/handlers/__init__.py +0 -0
  192. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/pre_processsing/handlers/column_syntax.py +0 -0
  193. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/pre_processsing/handlers/indentation.py +0 -0
  194. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/pre_processsing/handlers/port.py +0 -0
  195. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/pre_processsing/handlers/video_syntax.py +0 -0
  196. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/pre_processsing/handlers/whitespace.py +0 -0
  197. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/pre_processsing/service.py +0 -0
  198. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/parser/service.py +0 -0
  199. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/context.py +0 -0
  200. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/factory.py +0 -0
  201. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/post_processing/handlers/__init__.py +0 -0
  202. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/post_processing/handlers/numbered_list.py +0 -0
  203. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/post_processing/port.py +0 -0
  204. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/post_processing/service.py +0 -0
  205. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/renderers/__init__.py +0 -0
  206. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/renderers/base.py +0 -0
  207. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/renderers/bookmark.py +0 -0
  208. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/renderers/breadcrumb.py +0 -0
  209. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/renderers/bulleted_list.py +0 -0
  210. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/renderers/callout.py +0 -0
  211. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/renderers/captioned_block.py +0 -0
  212. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/renderers/code.py +0 -0
  213. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/renderers/column.py +0 -0
  214. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/renderers/column_list.py +0 -0
  215. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/renderers/divider.py +0 -0
  216. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/renderers/embed.py +0 -0
  217. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/renderers/equation.py +0 -0
  218. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/renderers/fallback.py +0 -0
  219. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/renderers/heading.py +0 -0
  220. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/renderers/numbered_list.py +0 -0
  221. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/renderers/paragraph.py +0 -0
  222. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/renderers/quote.py +0 -0
  223. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/renderers/table.py +0 -0
  224. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/renderers/table_of_contents.py +0 -0
  225. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/renderers/table_row.py +0 -0
  226. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/renderers/todo.py +0 -0
  227. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/renderers/toggle.py +0 -0
  228. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/renderer/service.py +0 -0
  229. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/service.py +0 -0
  230. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/syntax/grammar.py +0 -0
  231. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/content/syntax/models.py +0 -0
  232. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/page_http_client.py +0 -0
  233. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/page_metadata_update_client.py +0 -0
  234. {notionary-0.3.1 → notionary-0.4.0}/notionary/page/properties/factory.py +0 -0
  235. {notionary-0.3.1 → notionary-0.4.0}/notionary/shared/entity/client.py +0 -0
  236. {notionary-0.3.1 → notionary-0.4.0}/notionary/shared/models/parent.py +0 -0
  237. {notionary-0.3.1 → notionary-0.4.0}/notionary/shared/properties/type.py +0 -0
  238. {notionary-0.3.1 → notionary-0.4.0}/notionary/shared/typings.py +0 -0
  239. {notionary-0.3.1 → notionary-0.4.0}/notionary/user/__init__.py +0 -0
  240. {notionary-0.3.1 → notionary-0.4.0}/notionary/user/base.py +0 -0
  241. {notionary-0.3.1 → notionary-0.4.0}/notionary/user/client.py +0 -0
  242. {notionary-0.3.1 → notionary-0.4.0}/notionary/user/factory.py +0 -0
  243. {notionary-0.3.1 → notionary-0.4.0}/notionary/user/person.py +0 -0
  244. {notionary-0.3.1 → notionary-0.4.0}/notionary/user/schemas.py +0 -0
  245. {notionary-0.3.1 → notionary-0.4.0}/notionary/user/service.py +0 -0
  246. {notionary-0.3.1 → notionary-0.4.0}/notionary/utils/date.py +0 -0
  247. {notionary-0.3.1 → notionary-0.4.0}/notionary/utils/fuzzy.py +0 -0
  248. {notionary-0.3.1 → notionary-0.4.0}/notionary/utils/mixins/logging.py +0 -0
  249. {notionary-0.3.1 → notionary-0.4.0}/notionary/utils/pagination.py +0 -0
  250. {notionary-0.3.1 → notionary-0.4.0}/notionary/utils/uuid_utils.py +0 -0
  251. {notionary-0.3.1 → notionary-0.4.0}/notionary/workspace/client.py +0 -0
  252. {notionary-0.3.1 → notionary-0.4.0}/notionary/workspace/query/builder.py +0 -0
  253. {notionary-0.3.1 → notionary-0.4.0}/notionary/workspace/query/models.py +0 -0
  254. {notionary-0.3.1 → notionary-0.4.0}/notionary/workspace/schemas.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: notionary
3
- Version: 0.3.1
3
+ Version: 0.4.0
4
4
  Summary: Python library for programmatic Notion workspace management - databases, pages, and content with advanced Markdown support
5
5
  Project-URL: Homepage, https://github.com/mathisarends/notionary
6
6
  Author-email: Mathis Arends <mathisarends27@gmail.com>
@@ -1,14 +1,19 @@
1
1
  from .data_source.service import NotionDataSource
2
2
  from .database.service import NotionDatabase
3
+ from .file_upload import FileUploadQuery, FileUploadQueryBuilder, NotionFileUpload
3
4
  from .page.content.markdown.builder import MarkdownBuilder
4
5
  from .page.service import NotionPage
5
- from .workspace import NotionWorkspace, NotionWorkspaceQueryConfigBuilder
6
+ from .workspace import NotionWorkspace, NotionWorkspaceQueryConfigBuilder, WorkspaceQueryConfig
6
7
 
7
8
  __all__ = [
9
+ "FileUploadQuery",
10
+ "FileUploadQueryBuilder",
8
11
  "MarkdownBuilder",
9
12
  "NotionDataSource",
10
13
  "NotionDatabase",
14
+ "NotionFileUpload",
11
15
  "NotionPage",
12
16
  "NotionWorkspace",
13
17
  "NotionWorkspaceQueryConfigBuilder",
18
+ "WorkspaceQueryConfig",
14
19
  ]
@@ -62,12 +62,6 @@ class BlockType(StrEnum):
62
62
  VIDEO = "video"
63
63
 
64
64
 
65
- class FileType(StrEnum):
66
- EXTERNAL = "external"
67
- FILE = "file"
68
- FILE_UPLOAD = "file_upload"
69
-
70
-
71
65
  class CodingLanguage(StrEnum):
72
66
  ABAP = "abap"
73
67
  ARDUINO = "arduino"
@@ -4,41 +4,38 @@ from typing import Annotated, Literal
4
4
 
5
5
  from pydantic import BaseModel, ConfigDict, Field
6
6
 
7
- from notionary.blocks.enums import BlockColor, BlockType, CodingLanguage, FileType
7
+ from notionary.blocks.enums import BlockColor, BlockType, CodingLanguage
8
8
  from notionary.blocks.rich_text.models import RichText
9
+ from notionary.shared.models.file import ExternalFile, FileUploadFile, NotionHostedFile
9
10
  from notionary.shared.models.icon import Icon
10
11
  from notionary.shared.models.parent import Parent
11
12
  from notionary.user.schemas import PartialUserDto
12
13
 
13
14
  # ============================================================================
14
- # File-related models
15
+ # File Data wrapper with caption
15
16
  # ============================================================================
16
17
 
17
18
 
18
- class ExternalFile(BaseModel):
19
- model_config = ConfigDict(from_attributes=True)
20
- url: str
19
+ class CaptionMixin(BaseModel):
20
+ caption: list[RichText] = Field(default_factory=list)
21
+ name: str | None = None
21
22
 
22
23
 
23
- class NotionHostedFile(BaseModel):
24
- model_config = ConfigDict(from_attributes=True)
25
- url: str
26
- expiry_time: str
24
+ class ExternalFileWithCaption(CaptionMixin, ExternalFile):
25
+ pass
27
26
 
28
27
 
29
- class FileUploadFile(BaseModel):
30
- model_config = ConfigDict(from_attributes=True)
31
- id: str
28
+ class NotionHostedFileWithCaption(CaptionMixin, NotionHostedFile):
29
+ pass
32
30
 
33
31
 
34
- class FileData(BaseModel):
35
- model_config = ConfigDict(from_attributes=True)
36
- caption: list[RichText] = Field(default_factory=list)
37
- type: FileType
38
- external: ExternalFile | None = None
39
- file: NotionHostedFile | None = None
40
- file_upload: FileUploadFile | None = None
41
- name: str | None = None
32
+ class FileUploadFileWithCaption(CaptionMixin, FileUploadFile):
33
+ pass
34
+
35
+
36
+ type FileWithCaption = Annotated[
37
+ ExternalFileWithCaption | NotionHostedFileWithCaption | FileUploadFileWithCaption, Field(discriminator="type")
38
+ ]
42
39
 
43
40
 
44
41
  # ============================================================================
@@ -65,24 +62,14 @@ class BaseBlock(BaseModel):
65
62
  # ============================================================================
66
63
 
67
64
 
68
- class AudioData(BaseModel):
69
- model_config = ConfigDict(from_attributes=True)
70
- caption: list[RichText] = Field(default_factory=list)
71
- type: FileType
72
- external: ExternalFile | None = None
73
- file: NotionHostedFile | None = None
74
- file_upload: FileUploadFile | None = None
75
- name: str | None = None
76
-
77
-
78
65
  class AudioBlock(BaseBlock):
79
66
  type: Literal[BlockType.AUDIO] = BlockType.AUDIO
80
- audio: AudioData
67
+ audio: FileWithCaption
81
68
 
82
69
 
83
70
  class CreateAudioBlock(BaseModel):
84
71
  type: Literal[BlockType.AUDIO] = BlockType.AUDIO
85
- audio: AudioData
72
+ audio: FileWithCaption
86
73
 
87
74
 
88
75
  # ============================================================================
@@ -90,8 +77,7 @@ class CreateAudioBlock(BaseModel):
90
77
  # ============================================================================
91
78
 
92
79
 
93
- class BookmarkData(BaseModel):
94
- caption: list[RichText] = Field(default_factory=list)
80
+ class BookmarkData(CaptionMixin):
95
81
  url: str
96
82
 
97
83
 
@@ -224,8 +210,7 @@ class CreateChildDatabaseBlock(BaseModel):
224
210
  # ============================================================================
225
211
 
226
212
 
227
- class CodeData(BaseModel):
228
- caption: list[RichText] = Field(default_factory=list)
213
+ class CodeData(CaptionMixin):
229
214
  rich_text: list[RichText]
230
215
  language: CodingLanguage = CodingLanguage.PLAIN_TEXT
231
216
 
@@ -311,9 +296,8 @@ class CreateDividerBlock(BaseModel):
311
296
  # ============================================================================
312
297
 
313
298
 
314
- class EmbedData(BaseModel):
299
+ class EmbedData(CaptionMixin):
315
300
  url: str
316
- caption: list[RichText] = Field(default_factory=list)
317
301
 
318
302
 
319
303
  class EmbedBlock(BaseBlock):
@@ -352,12 +336,12 @@ class CreateEquationBlock(BaseModel):
352
336
 
353
337
  class FileBlock(BaseBlock):
354
338
  type: Literal[BlockType.FILE] = BlockType.FILE
355
- file: FileData
339
+ file: FileWithCaption
356
340
 
357
341
 
358
342
  class CreateFileBlock(BaseModel):
359
343
  type: Literal[BlockType.FILE] = BlockType.FILE
360
- file: FileData
344
+ file: FileWithCaption
361
345
 
362
346
 
363
347
  # ============================================================================
@@ -416,24 +400,14 @@ CreateHeadingBlock = CreateHeading1Block | CreateHeading2Block | CreateHeading3B
416
400
  # ============================================================================
417
401
 
418
402
 
419
- class ImageData(BaseModel):
420
- model_config = ConfigDict(from_attributes=True)
421
- caption: list[RichText] = Field(default_factory=list)
422
- type: FileType
423
- external: ExternalFile | None = None
424
- file: NotionHostedFile | None = None
425
- file_upload: FileUploadFile | None = None
426
- name: str | None = None
427
-
428
-
429
403
  class ImageBlock(BaseBlock):
430
404
  type: Literal[BlockType.IMAGE] = BlockType.IMAGE
431
- image: ImageData
405
+ image: FileWithCaption
432
406
 
433
407
 
434
408
  class CreateImageBlock(BaseModel):
435
409
  type: Literal[BlockType.IMAGE] = BlockType.IMAGE
436
- image: ImageData
410
+ image: FileWithCaption
437
411
 
438
412
 
439
413
  # ============================================================================
@@ -497,24 +471,14 @@ class CreateParagraphBlock(BaseModel):
497
471
  # ============================================================================
498
472
 
499
473
 
500
- class PdfData(BaseModel):
501
- model_config = ConfigDict(from_attributes=True)
502
- caption: list[RichText] = Field(default_factory=list)
503
- type: FileType
504
- external: ExternalFile | None = None
505
- file: NotionHostedFile | None = None
506
- file_upload: FileUploadFile | None = None
507
- name: str | None = None
508
-
509
-
510
474
  class PdfBlock(BaseBlock):
511
475
  type: Literal[BlockType.PDF] = BlockType.PDF
512
- pdf: PdfData
476
+ pdf: FileWithCaption
513
477
 
514
478
 
515
479
  class CreatePdfBlock(BaseModel):
516
480
  type: Literal[BlockType.PDF] = BlockType.PDF
517
- pdf: PdfData
481
+ pdf: FileWithCaption
518
482
 
519
483
 
520
484
  # ============================================================================
@@ -669,31 +633,21 @@ class CreateToggleBlock(BaseModel):
669
633
  # ============================================================================
670
634
 
671
635
 
672
- class VideoData(BaseModel):
673
- model_config = ConfigDict(from_attributes=True)
674
- caption: list[RichText] = Field(default_factory=list)
675
- type: FileType
676
- external: ExternalFile | None = None
677
- file: NotionHostedFile | None = None
678
- file_upload: FileUploadFile | None = None
679
- name: str | None = None
680
-
681
-
682
636
  class VideoBlock(BaseBlock):
683
637
  type: Literal[BlockType.VIDEO] = BlockType.VIDEO
684
- video: VideoData
638
+ video: FileWithCaption
685
639
 
686
640
 
687
641
  class CreateVideoBlock(BaseModel):
688
642
  type: Literal[BlockType.VIDEO] = BlockType.VIDEO
689
- video: VideoData
643
+ video: FileWithCaption
690
644
 
691
645
 
692
646
  # ============================================================================
693
647
  # Block Union Type
694
648
  # ============================================================================
695
649
 
696
- Block = Annotated[
650
+ type Block = Annotated[
697
651
  (
698
652
  AudioBlock
699
653
  | BookmarkBlock
@@ -743,7 +697,7 @@ class BlockChildrenResponse(BaseModel):
743
697
  request_id: str
744
698
 
745
699
 
746
- BlockCreatePayload = Annotated[
700
+ type BlockCreatePayload = Annotated[
747
701
  (
748
702
  CreateAudioBlock
749
703
  | CreateBookmarkBlock
@@ -8,10 +8,6 @@ from pydantic import BaseModel, Field
8
8
 
9
9
  from notionary.blocks.rich_text.models import RichText
10
10
 
11
- # ---------------------------
12
- # Comment Parent
13
- # ---------------------------
14
-
15
11
 
16
12
  class CommentParentType(StrEnum):
17
13
  PAGE_ID = "page_id"
@@ -28,7 +24,7 @@ class BlockCommentParent(BaseModel):
28
24
  block_id: str
29
25
 
30
26
 
31
- CommentParent = PageCommentParent | BlockCommentParent
27
+ type CommentParent = PageCommentParent | BlockCommentParent
32
28
 
33
29
 
34
30
  # ---------------------------
@@ -96,7 +92,7 @@ class CustomCommentDisplayName(BaseModel):
96
92
  custom: CustomDisplayName
97
93
 
98
94
 
99
- CommentDisplayNameInput = IntegrationDisplayName | UserDisplayName | CustomCommentDisplayName
95
+ type CommentDisplayNameInput = IntegrationDisplayName | UserDisplayName | CustomCommentDisplayName
100
96
 
101
97
 
102
98
  class CommentDisplayNameDto(BaseModel):
@@ -189,8 +185,6 @@ class UserRef(BaseModel):
189
185
 
190
186
 
191
187
  class CommentDto(BaseModel):
192
- """Comment object as returned by the API"""
193
-
194
188
  object: Literal["comment"] = "comment"
195
189
  id: str
196
190
 
@@ -217,24 +211,3 @@ class CommentListResponse(BaseModel):
217
211
  results: list[CommentDto] = Field(default_factory=list)
218
212
  next_cursor: str | None = None
219
213
  has_more: bool = False
220
-
221
-
222
- # ---------------------------
223
- # Convenience Builders
224
- # ---------------------------
225
-
226
-
227
- class CommentDisplayNameBuilder:
228
- """Helper class to build display names easily"""
229
-
230
- @staticmethod
231
- def integration() -> IntegrationDisplayName:
232
- return IntegrationDisplayName()
233
-
234
- @staticmethod
235
- def user() -> UserDisplayName:
236
- return UserDisplayName()
237
-
238
- @staticmethod
239
- def custom(name: str) -> CustomCommentDisplayName:
240
- return CustomCommentDisplayName(custom=CustomDisplayName(name=name))