Full Code of mariosimao/notion-sdk-php for AI

main 34a62ccdbe22 cached
401 files
796.9 KB
211.2k tokens
2375 symbols
1 requests
Download .txt
Showing preview only (892K chars total). Download the full file or copy to clipboard to get everything.
Repository: mariosimao/notion-sdk-php
Branch: main
Commit: 34a62ccdbe22
Files: 401
Total size: 796.9 KB

Directory structure:
gitextract_t8zjv04h/

├── .gitattributes
├── .github/
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   └── feature_request.md
│   ├── dependabot.yml
│   └── workflows/
│       ├── coding-standards.yml
│       ├── deploy.yml
│       ├── psalm.yml
│       ├── sponsors.yml
│       └── tests.yml
├── .gitignore
├── CHANGELOG.md
├── LICENSE
├── README.md
├── SECURITY.md
├── composer.json
├── docs/
│   ├── .vitepress/
│   │   ├── config.ts
│   │   └── theme/
│   │       ├── custom.css
│   │       └── index.js
│   ├── advanced/
│   │   └── configuration.md
│   ├── blocks/
│   │   ├── Bookmark.md
│   │   ├── Breadcrumb.md
│   │   ├── BulletedListItem.md
│   │   ├── Callout.md
│   │   ├── ChildDatabase.md
│   │   ├── ChildPage.md
│   │   ├── Code.md
│   │   ├── Column.md
│   │   ├── ColumnList.md
│   │   ├── Divider.md
│   │   ├── Embed.md
│   │   ├── EquationBlock.md
│   │   ├── FileBlock.md
│   │   ├── Heading.md
│   │   ├── Image.md
│   │   ├── LinkPreview.md
│   │   ├── NumberedListItem.md
│   │   ├── Paragraph.md
│   │   ├── Pdf.md
│   │   ├── Quote.md
│   │   └── index.md
│   ├── comments/
│   │   └── index.md
│   ├── getting-started.md
│   ├── how-to/
│   │   ├── add-content-to-page.md
│   │   ├── add-row-to-database.md
│   │   ├── create-a-page.md
│   │   ├── delete-a-page.md
│   │   ├── find-a-page.md
│   │   ├── list-database-pages.md
│   │   ├── query-database.md
│   │   └── update-a-page.md
│   ├── index.md
│   ├── package.json
│   ├── page-properties/
│   │   ├── People.md
│   │   └── index.md
│   ├── public/
│   │   └── favicons/
│   │       └── site.webmanifest
│   └── search/
│       └── index.md
├── infection.json
├── phpcs.xml
├── phpunit.xml
├── psalm.xml
├── src/
│   ├── Blocks/
│   │   ├── BlockFactory.php
│   │   ├── BlockInterface.php
│   │   ├── BlockMetadata.php
│   │   ├── BlockType.php
│   │   ├── Bookmark.php
│   │   ├── Breadcrumb.php
│   │   ├── BulletedListItem.php
│   │   ├── Callout.php
│   │   ├── ChildDatabase.php
│   │   ├── ChildPage.php
│   │   ├── Client.php
│   │   ├── Code.php
│   │   ├── CodeLanguage.php
│   │   ├── Column.php
│   │   ├── ColumnList.php
│   │   ├── Divider.php
│   │   ├── Embed.php
│   │   ├── EquationBlock.php
│   │   ├── FileBlock.php
│   │   ├── Heading1.php
│   │   ├── Heading2.php
│   │   ├── Heading3.php
│   │   ├── Image.php
│   │   ├── LinkPreview.php
│   │   ├── NumberedListItem.php
│   │   ├── Paragraph.php
│   │   ├── Pdf.php
│   │   ├── Quote.php
│   │   ├── Renderer/
│   │   │   ├── BlockRendererInterface.php
│   │   │   ├── Markdown/
│   │   │   │   ├── BookmarkRenderer.php
│   │   │   │   ├── BreadcrumbRenderer.php
│   │   │   │   ├── BulletedListItemRenderer.php
│   │   │   │   ├── CalloutRenderer.php
│   │   │   │   ├── ChildDatabaseRenderer.php
│   │   │   │   ├── ChildPageRenderer.php
│   │   │   │   ├── CodeRenderer.php
│   │   │   │   ├── ColumnListRenderer.php
│   │   │   │   ├── ColumnRenderer.php
│   │   │   │   ├── DividerRenderer.php
│   │   │   │   ├── EmbedRenderer.php
│   │   │   │   ├── EquationRenderer.php
│   │   │   │   ├── FileRenderer.php
│   │   │   │   ├── Heading1Renderer.php
│   │   │   │   ├── Heading2Renderer.php
│   │   │   │   ├── Heading3Renderer.php
│   │   │   │   ├── ImageRenderer.php
│   │   │   │   ├── LinkPreviewRenderer.php
│   │   │   │   ├── NumberedListItemRenderer.php
│   │   │   │   ├── ParagraphRenderer.php
│   │   │   │   ├── PdfRenderer.php
│   │   │   │   ├── QuoteRenderer.php
│   │   │   │   ├── RichTextRenderer.php
│   │   │   │   ├── TableOfContentsRenderer.php
│   │   │   │   ├── ToDoRenderer.php
│   │   │   │   ├── ToggleRenderer.php
│   │   │   │   └── VideoRenderer.php
│   │   │   ├── MarkdownRenderer.php
│   │   │   └── RendererInterface.php
│   │   ├── Table.php
│   │   ├── TableOfContents.php
│   │   ├── TableRow.php
│   │   ├── ToDo.php
│   │   ├── Toggle.php
│   │   ├── Unknown.php
│   │   └── Video.php
│   ├── Comments/
│   │   ├── Client.php
│   │   └── Comment.php
│   ├── Common/
│   │   ├── Annotations.php
│   │   ├── Color.php
│   │   ├── Date.php
│   │   ├── Emoji.php
│   │   ├── Equation.php
│   │   ├── File.php
│   │   ├── FileType.php
│   │   ├── Icon.php
│   │   ├── Mention.php
│   │   ├── MentionType.php
│   │   ├── ParentBlock.php
│   │   ├── ParentType.php
│   │   ├── RichText.php
│   │   ├── RichTextType.php
│   │   └── Text.php
│   ├── Configuration.php
│   ├── Databases/
│   │   ├── Client.php
│   │   ├── Database.php
│   │   ├── DatabaseParent.php
│   │   ├── DatabaseParentType.php
│   │   ├── Properties/
│   │   │   ├── Checkbox.php
│   │   │   ├── CreatedBy.php
│   │   │   ├── CreatedTime.php
│   │   │   ├── Date.php
│   │   │   ├── Email.php
│   │   │   ├── Files.php
│   │   │   ├── Formula.php
│   │   │   ├── LastEditedBy.php
│   │   │   ├── LastEditedTime.php
│   │   │   ├── MultiSelect.php
│   │   │   ├── Number.php
│   │   │   ├── NumberFormat.php
│   │   │   ├── People.php
│   │   │   ├── PhoneNumber.php
│   │   │   ├── PropertyCollection.php
│   │   │   ├── PropertyFactory.php
│   │   │   ├── PropertyInterface.php
│   │   │   ├── PropertyMetadata.php
│   │   │   ├── PropertyType.php
│   │   │   ├── Relation.php
│   │   │   ├── RelationType.php
│   │   │   ├── RichTextProperty.php
│   │   │   ├── Select.php
│   │   │   ├── SelectOption.php
│   │   │   ├── Status.php
│   │   │   ├── StatusGroup.php
│   │   │   ├── StatusOption.php
│   │   │   ├── Title.php
│   │   │   ├── UniqueId.php
│   │   │   ├── Unknown.php
│   │   │   └── Url.php
│   │   ├── Query/
│   │   │   ├── CheckboxFilter.php
│   │   │   ├── CompoundFilter.php
│   │   │   ├── Condition.php
│   │   │   ├── DateFilter.php
│   │   │   ├── Filter.php
│   │   │   ├── MultiSelectFilter.php
│   │   │   ├── NumberFilter.php
│   │   │   ├── Operator.php
│   │   │   ├── PeopleFilter.php
│   │   │   ├── RelationFilter.php
│   │   │   ├── Result.php
│   │   │   ├── SelectFilter.php
│   │   │   ├── Sort.php
│   │   │   ├── StatusFilter.php
│   │   │   └── TextFilter.php
│   │   └── Query.php
│   ├── Exceptions/
│   │   ├── ApiException.php
│   │   ├── BlockException.php
│   │   ├── ColumnException.php
│   │   ├── ColumnListException.php
│   │   ├── ConflictException.php
│   │   ├── DatabaseException.php
│   │   ├── FileUploadException.php
│   │   ├── HeadingException.php
│   │   ├── IconException.php
│   │   ├── NotionException.php
│   │   └── RelationException.php
│   ├── FileUploads/
│   │   ├── Client.php
│   │   ├── FileUpload.php
│   │   ├── FileUploadStatus.php
│   │   └── Mode.php
│   ├── Infrastructure/
│   │   └── Http.php
│   ├── Notion.php
│   ├── Pages/
│   │   ├── Client.php
│   │   ├── Page.php
│   │   ├── PageParent.php
│   │   ├── PageParentType.php
│   │   └── Properties/
│   │       ├── Checkbox.php
│   │       ├── CreatedBy.php
│   │       ├── CreatedTime.php
│   │       ├── Date.php
│   │       ├── Email.php
│   │       ├── Files.php
│   │       ├── Formula.php
│   │       ├── FormulaType.php
│   │       ├── LastEditedBy.php
│   │       ├── LastEditedTime.php
│   │       ├── MultiSelect.php
│   │       ├── Number.php
│   │       ├── People.php
│   │       ├── PhoneNumber.php
│   │       ├── PropertyCollection.php
│   │       ├── PropertyFactory.php
│   │       ├── PropertyInterface.php
│   │       ├── PropertyMetadata.php
│   │       ├── PropertyType.php
│   │       ├── Relation.php
│   │       ├── RichTextProperty.php
│   │       ├── Select.php
│   │       ├── Status.php
│   │       ├── Title.php
│   │       ├── UniqueId.php
│   │       ├── Unknown.php
│   │       └── Url.php
│   ├── Search/
│   │   ├── Client.php
│   │   ├── Filter.php
│   │   ├── FilterProperty.php
│   │   ├── FilterValue.php
│   │   ├── Query.php
│   │   ├── Result.php
│   │   ├── Sort.php
│   │   ├── SortDirection.php
│   │   └── SortTimestamp.php
│   └── Users/
│       ├── Bot.php
│       ├── Client.php
│       ├── Person.php
│       ├── User.php
│       ├── UserType.php
│       └── WorkspaceLimits.php
└── tests/
    ├── Integration/
    │   ├── BlocksTest.php
    │   ├── CommentsTest.php
    │   ├── DatabasesTest.php
    │   ├── Helper.php
    │   ├── PagesTest.php
    │   ├── SearchTest.php
    │   └── UsersTest.php
    └── Unit/
        ├── Blocks/
        │   ├── BlockMetadataTest.php
        │   ├── BookmarkTest.php
        │   ├── BreadcrumbTest.php
        │   ├── BulletedListItemTest.php
        │   ├── CalloutTest.php
        │   ├── ChildDatabaseTest.php
        │   ├── ChildPageTest.php
        │   ├── CodeTest.php
        │   ├── ColumnListTest.php
        │   ├── ColumnTest.php
        │   ├── DividerTest.php
        │   ├── EmbedTest.php
        │   ├── EquationBlockTest.php
        │   ├── FileBlockTest.php
        │   ├── Heading1Test.php
        │   ├── Heading2Test.php
        │   ├── Heading3Test.php
        │   ├── ImageTest.php
        │   ├── LinkPreviewTest.php
        │   ├── NumberedListItemTest.php
        │   ├── ParagraphTest.php
        │   ├── PdfTest.php
        │   ├── QuoteTest.php
        │   ├── Renderer/
        │   │   ├── Markdown/
        │   │   │   ├── BookmarkRendererTest.php
        │   │   │   ├── BreadcrumbRendererTest.php
        │   │   │   ├── BulletedListItemRendererTest.php
        │   │   │   ├── CalloutRendererTest.php
        │   │   │   ├── ChildDatabaseRendererTest.php
        │   │   │   ├── ChildPageRendererTest.php
        │   │   │   ├── CodeRendererTest.php
        │   │   │   ├── ColumnRendererTest.php
        │   │   │   ├── DividerRendererTest.php
        │   │   │   ├── EmbedRendererTest.php
        │   │   │   ├── EquationRendererTest.php
        │   │   │   ├── FileRendererTest.php
        │   │   │   ├── Heading1RendererTest.php
        │   │   │   ├── Heading2RendererTest.php
        │   │   │   ├── Heading3RendererTest.php
        │   │   │   ├── ImageRendererTest.php
        │   │   │   ├── LinkPreviewRendererTest.php
        │   │   │   ├── NumberedListItemRendererTest.php
        │   │   │   ├── ParagraphRendererTest.php
        │   │   │   ├── PdfRendererTest.php
        │   │   │   ├── QuoteRendererTest.php
        │   │   │   ├── TableOfContentsRendererTest.php
        │   │   │   ├── ToDoRendererTest.php
        │   │   │   ├── ToggleRendererTest.php
        │   │   │   └── VideoRendererTest.php
        │   │   └── MarkdownRendererTest.php
        │   ├── TableOfContentsTest.php
        │   ├── TableTest.php
        │   ├── ToDoTest.php
        │   ├── ToggleTest.php
        │   ├── UnknownTest.php
        │   └── VideoTest.php
        ├── Comments/
        │   └── CommentTest.php
        ├── Common/
        │   ├── AnnotationsTest.php
        │   ├── DateTest.php
        │   ├── EquationTest.php
        │   ├── FileTest.php
        │   ├── IconTest.php
        │   ├── MentionTest.php
        │   ├── ParentBlockTest.php
        │   ├── RichTextTest.php
        │   └── TextTest.php
        ├── ConfigurationTest.php
        ├── Databases/
        │   ├── DatabaseParentTest.php
        │   ├── DatabaseTest.php
        │   ├── Properties/
        │   │   ├── CheckboxTest.php
        │   │   ├── CreatedByTest.php
        │   │   ├── CreatedTimeTest.php
        │   │   ├── DateTest.php
        │   │   ├── EmailTest.php
        │   │   ├── FilesTest.php
        │   │   ├── FormulaTest.php
        │   │   ├── LastEditedByTest.php
        │   │   ├── LastEditedTimeTest.php
        │   │   ├── MultiSelectTest.php
        │   │   ├── NumberTest.php
        │   │   ├── PeopleTest.php
        │   │   ├── PhoneNumberTest.php
        │   │   ├── PropertyCollectionTest.php
        │   │   ├── PropertyMetadataTest.php
        │   │   ├── RelationTest.php
        │   │   ├── RichTextTest.php
        │   │   ├── SelectOptionTest.php
        │   │   ├── SelectTest.php
        │   │   ├── StatusTest.php
        │   │   ├── TitleTest.php
        │   │   ├── UniqueIdTest.php
        │   │   ├── UnknownTest.php
        │   │   └── UrlTest.php
        │   ├── Query/
        │   │   ├── CheckboxFilterTest.php
        │   │   ├── CompoundFilterTest.php
        │   │   ├── DateFilterTest.php
        │   │   ├── MultiSelectFilterTest.php
        │   │   ├── NumberFilterTest.php
        │   │   ├── PeopleFilterTest.php
        │   │   ├── RelationFilterTest.php
        │   │   ├── ResultTest.php
        │   │   ├── SelectFilterTest.php
        │   │   ├── SortTest.php
        │   │   ├── StatusFilterTest.php
        │   │   └── TextFilterTest.php
        │   └── QueryTest.php
        ├── Exceptions/
        │   └── ApiExceptionTest.php
        ├── Infrastructure/
        │   └── HttpTest.php
        ├── NotionTest.php
        ├── Pages/
        │   ├── PageParentTest.php
        │   ├── PageTest.php
        │   └── Properties/
        │       ├── CheckboxTest.php
        │       ├── CreatedByTest.php
        │       ├── CreatedTimeTest.php
        │       ├── DateTest.php
        │       ├── EmailTest.php
        │       ├── FilesTest.php
        │       ├── FormulaTest.php
        │       ├── LastEditedByTest.php
        │       ├── LastEditedTimeTest.php
        │       ├── MultiSelectTest.php
        │       ├── NumberTest.php
        │       ├── PeopleTest.php
        │       ├── PhoneNumberTest.php
        │       ├── PropertyCollectionTest.php
        │       ├── RelationTest.php
        │       ├── RichTextPropertyTest.php
        │       ├── SelectTest.php
        │       ├── StatusTest.php
        │       ├── TitleTest.php
        │       ├── UniqueIdTest.php
        │       ├── UnknownTest.php
        │       └── UrlTest.php
        ├── Search/
        │   ├── FilterTest.php
        │   ├── QueryTest.php
        │   └── SortTest.php
        └── Users/
            └── UserTest.php

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitattributes
================================================
*.php text eol=lf
/.github/ export-ignore
/docs/ export-ignore
/test/ export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/CHANGELOG.md export-ignore
/composer.lock export-ignore
/infection.json export-ignore
/phpcs.xml export-ignore
/phpunit.xml export-ignore
/psalm.xml export-ignore
/README.md export-ignore


================================================
FILE: .github/FUNDING.yml
================================================
github: [mariosimao]


================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: "[BUG] "
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Code snippet**
If applicable, add code snippets to help explain your problem.

**Environment (please complete the following information):**
 - OS: [e.g. iOS]
 - SDK Version [e.g. v1.0.0]

**Additional context**
Add any other context about the problem here.


================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
title: "[FEATURE] "
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.


================================================
FILE: .github/dependabot.yml
================================================
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
  - package-ecosystem: "composer" # See documentation for possible values
    directory: "/" # Location of package manifests
    schedule:
      interval: "weekly"


================================================
FILE: .github/workflows/coding-standards.yml
================================================
name: "Check Coding Standards"

on:
  pull_request:
  push:
    branches:
      - main

jobs:
  coding-standards:
    name: "Check Coding Standards"

    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Install PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: "8.1"
          tools: composer:v2, cs2pr

      - name: Install composer dependencies
        uses: ramsey/composer-install@1.3.0
        with:
          dependency-versions: locked
          composer-options: --no-ansi --no-interaction --no-progress

      - name: Run phpcs checks
        run: "composer ci:phpcs"

================================================
FILE: .github/workflows/deploy.yml
================================================
name: Deploy

on:
  push:
    branches:
      - main

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v3
        with:
          node-version: 16
      - run: cd docs && npm ci

      - name: Build
        run: cd docs && npm run docs:build

      - name: Deploy
        uses: peaceiris/actions-gh-pages@v3
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: docs/.vitepress/dist


================================================
FILE: .github/workflows/psalm.yml
================================================
name: "Static Analysis (Psalm)"

on:
  pull_request:
  push:
    branches:
      - main

jobs:
  psalm:
    name: Psalm

    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Install PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: "8.1"
          tools: none

      - name: Install composer dependencies
        uses: ramsey/composer-install@v3
        with:
          dependency-versions: locked
          composer-options: --no-ansi --no-interaction --no-progress

      - name: Run tests with psalm and send coverage report
        run: composer ci:psalm

================================================
FILE: .github/workflows/sponsors.yml
================================================
name: Generate Sponsors section on README
on:
  workflow_dispatch:
  schedule:
    - cron: 30 15 * * 0-6
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Generate Sponsors
        uses: JamesIves/github-sponsors-readme-action@v1
        with:
          token: ${{ secrets.PAT }}
          file: 'README.md'
          minimum: 1000
          
      - name: Create Pull Request
        uses: peter-evans/create-pull-request@v5


================================================
FILE: .github/workflows/tests.yml
================================================
on:
  pull_request:
  push:
    branches:
      - main

name: Tests

jobs:
  unit-tests:
    name: Unit tests (PHPUnit)

    runs-on: ${{ matrix.os }}

    strategy:
      fail-fast: false
      matrix:
        os:
          - ubuntu-latest

        php-version:
          - "8.1"

        dependencies:
          # - lowest
          - highest
          - locked

    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Install PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-version }}
          tools: none

      - name: Install composer dependencies
        uses: ramsey/composer-install@v3
        with:
          dependency-versions: ${{ matrix.dependencies }}

      - name: Run tests with phpunit
        run: |
          composer config --no-plugins allow-plugins.infection/extension-installer true
          composer ci:unit

  # integration-tests:
  #   name: Integration tests (PHPUnit)

  #   runs-on: ubuntu-latest

  #   steps:
  #     - name: Checkout
  #       uses: actions/checkout@v2

  #     - name: Install PHP
  #       uses: shivammathur/setup-php@v2
  #       with:
  #         php-version: "8.1"
  #         tools: none

  #     - name: Install composer dependencies
  #       uses: ramsey/composer-install@v3
  #       with:
  #         dependency-versions: ${{ matrix.locked }}
  #         composer-options: --no-ansi --no-interaction --no-progress

  #     - name: Run tests with phpunit
  #       env:
  #         NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}
  #         TEST_PAGE_ID: ${{ secrets.TEST_PAGE_ID }}
  #       run: composer ci:integration

  mutation-tests:
    name: "Mutation tests (Infection)"

    # if: ${{ always() }}
    # needs: [coverage]

    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Install PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: "8.1"
          coverage: "pcov"
          tools: none

      - name: Install composer dependencies
        uses: ramsey/composer-install@v3
        with:
          dependency-versions: locked
          composer-options: --no-ansi --no-interaction --no-progress

      - name: Run mutation tests with Infection
        env:
          NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}
          TEST_PAGE_ID: ${{ secrets.TEST_PAGE_ID }}
        run: composer ci:mutation

  coverage:
    name: Test coverage (PHPUnit)

    # if: ${{ always() }}
    # needs: [mutation-tests]

    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Install PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: "8.1"
          coverage: pcov
          tools: none

      - name: Install composer dependencies
        uses: ramsey/composer-install@v3
        with:
          dependency-versions: locked
          composer-options: --no-ansi --no-interaction --no-progress

      - name: Calculate test coverage
        env:
          NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}
          TEST_PAGE_ID: ${{ secrets.TEST_PAGE_ID }}
        run: composer ci:coverage

      - name: Send code coverage report to Codecov.io
        uses: codecov/codecov-action@v5
        env:
          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}


================================================
FILE: .gitignore
================================================
.infection
.phpunit.cache
coverage
dist
test.php
vendor
node_modules
.idea/


================================================
FILE: CHANGELOG.md
================================================
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [1.17.0] 2026-03-11

### Fixed
- Broken API requests after breaking change on archived property (#419)

## [v1.16.0] 2026-01-11

### Added
- Possibility to use custom Markdown renderers.
- Full support to file upload.

## [v1.15.0] 2025-09-22

### Fixed
- Error when updating pages with People properties.

### Build
- Fix failing CI actions due to outdated dependencies.

## [v1.14.0] 2024-04-22

### Added
- 'Change' methods to page properties (#342)
- Description to property metadata (#365)

### Docs
Update documentation website URL (#364)

### Build
- Bump vite from 3.2.7 to 3.2.8 in /docs (#335)
- Bump squizlabs/php_codesniffer from 3.8.0 to 3.8.1 (#334)
- Bump phpunit/phpunit from 10.5.5 to 10.5.7 (#332)
- Bump vimeo/psalm from 5.18.0 to 5.19.0 (#333)
- Bump phpunit/phpunit from 10.5.7 to 10.5.10 (#344)
- Bump squizlabs/php_codesniffer from 3.8.1 to 3.9.0 (#348)
- Bump vite from 3.2.8 to 3.2.10 in /docs (#363)
- Bump squizlabs/php_codesniffer from 3.9.0 to 3.9.1 (#361)
- Bump phpunit/phpunit from 10.5.10 to 10.5.16 (#362)
- Bump infection/infection from 0.27.9 to 0.27.11 (#359)

## [v1.13.0] 2024-01-10

### Added
- Support to inline databases (#330)

### Build
- Bump infection/infection from 0.27.8 to 0.27.9 (#327)
- Bump squizlabs/php_codesniffer from 3.7.2 to 3.8.0 (#328)
- Bump phpunit/phpunit from 10.5.3 to 10.5.5 (#329)

## [v1.12.0] 2023-12-31

### Added
- Add support to tables (#224)

### Fixed
- Allow DateFilter to filter created_time and last_edited_time
- Add formula to pages notUpdatableProps (#320)
- Use null fallback for missing array keys for optional user properties (#324)

### Documentation
- Fix page property example (#293)
- Recommend static analysers (#304)

### Build
- Bump infection/infection from 0.27.2 to 0.27.8 (#309)
- Bump phpunit/phpunit from 10.3.4 to 10.4.2 (#305)
- Bump postcss from 8.4.24 to 8.4.31 in /docs (#294)
- Bump phpunit/phpunit from 10.4.2 to 10.5.3 (#322)
- Bump vimeo/psalm from 5.15.0 to 5.18.0 (#321)
- Bump php-http/discovery from 1.19.1 to 1.19.2 (#316)
- Bump guzzlehttp/guzzle from 7.8.0 to 7.8.1 (#315)
- Bump brianium/paratest from 7.2.7 to 7.3.1 (#306)
- Fix tests CI (#325)

## [v1.11.1] 2023-09-25

### Fixed
- Error when Notion sends an empty response (#289)
### Build
- Bump brianium/paratest from 7.2.3 to 7.2.4 (#274)
- Bump vimeo/psalm from 5.14.0 to 5.14.1 (#275)
- Bump brianium/paratest from 7.2.4 to 7.2.5 (#277)
- Bump phpunit/phpunit from 10.3.1 to 10.3.2 (#278)
- Bump vimeo/psalm from 5.14.1 to 5.15.0 (#279)
- Bump guzzlehttp/guzzle from 7.7.0 to 7.8.0 (#280)
- Bump brianium/paratest from 7.2.5 to 7.2.6 (#283)
- Bump phpunit/phpunit from 10.3.2 to 10.3.3 (#284)
- Bump phpunit/phpunit from 10.3.3 to 10.3.4 (#286)
- Bump brianium/paratest from 7.2.6 to 7.2.7 (#288)
- Bump infection/infection from 0.27.0 to 0.27.2 (#287)

## [v1.11.0] 2023-08-02

### Added
- UniqueId page and database property (#268)
### Fixed
- Do not update Unique ID property (#269)
- Do not update Rollup properties (#272)
### Build
- Bump vimeo/psalm from 5.13.0 to 5.13.1 (#263)
- Bump phpunit/phpunit from 10.2.2 to 10.2.3 (#262)
- Bump phpunit/phpunit from 10.2.3 to 10.2.4 (#264)
- Bump php-http/discovery from 1.19.0 to 1.19.1 (#266)
- Bump phpunit/phpunit from 10.2.4 to 10.2.6 (#265)
- Bump brianium/paratest from 7.2.2 to 7.2.3 (#267)
- Bump vimeo/psalm from 5.13.1 to 5.14.0 (#271)

## [v1.10.0] 2023-06-27

### Added
- Page properties with empty values (#260)

### Build
- Bump php-http/discovery from 1.18.1 to 1.19.0 (#254)
- Bump brianium/paratest from 7.1.4 to 7.2.0 (#255)
- Bump vimeo/psalm from 5.12.0 to 5.13.0 (#259)
- Bump brianium/paratest from 7.2.0 to 7.2.2 (#258)

### Documentation
- Fix typo on `metadata` method (#253)

## [v1.9.0] 2023-06-15

### Added
- Caption on image block and file objects (#250)

### Fixed
- Do not update CreatedBy prop on pages (#251)

## [v1.8.1] 2023-06-12

### Fixed
- Rich Text mention creation (#241)
- Possible null pointer on RichText (#246)
- Change rich text URL
- Only send to API file name when set (#234)

### Build
- Bump phpunit/phpunit from 10.1.2 to 10.1.3 (#227)
- Bump guzzlehttp/guzzle from 7.5.1 to 7.6.1 (#226)
- Bump php-http/discovery from 1.18.0 to 1.18.1 (#228)
- Bump infection/infection from 0.26.21 to 0.27.0 (#229)
- Bump guzzlehttp/guzzle from 7.6.1 to 7.7.0 (#230)
- Bump vimeo/psalm from 5.11.0 to 5.12.0 (#233)
- Bump vite from 3.1.3 to 3.2.7 in /docs (#236)
- Bump phpunit/phpunit from 10.1.3 to 10.2.2 (#244)

### Test
- Fix file-related tests (#245)

### Chore
- Add sponsors to README (#237)

## [v1.8.0] 2023-05-09

### Added
- Support block as page and database parent (#214)
- `number_with_commas` format in Number database properties (#216)

### Fixed
- API error while updating page file property (#220)

### Build
- Bump php-http/discovery from 1.15.3 to 1.17.0 (#217)
- Bump infection/infection from 0.26.20 to 0.26.21 (#218)
- Bump brianium/paratest from 7.1.3 to 7.1.4 (#221)
- Bump php-http/discovery from 1.17.0 to 1.18.0 (#222)
- Bump vimeo/psalm from 5.9.0 to 5.11.0 (#223)

## [1.7.0] 2023-04-26

### Added
- Support block colors (#209)
- Render blocks as markdown (#207)

### Fixed
- API exception on query all pages (#211)

### Build
- Bump phpunit from 10.0.19 to 10.1.2 (#206)
- Bump infection from 0.26.19 to 0.26.20 (#204)
- Bump paratest from 7.1.2 to 7.1.3 (#205)
- Bump guzzle from 7.5.0 to 7.5.1 (#203)

## [1.6.2]

### Fixed
- Date filter JSON serialziation (#198)

## [1.6.1]

### Fixed
- Do not update created time page property. (#187)

## [1.6.0]

### Added
- This week on date filter for database queries. (#184)
- Relation filter for database queries. (#185)

## [1.5.0]

### Added
- Support unknown blocks and page/database properties. Pages and databases with unsuported resources will be loaded without errors. (#173)
- Page and database properties collection with typed getters. (#179)
- Search pages and databases.

## [1.4.1]

### Fixed
- Fix `Page::getProperty()` typo (#170)

### Chore
- Update dependencies (#171)

## [1.4.0]

### Added
- Support to comments (#163)

### Fixed
- Update options without color (#166)
- Prevent `LastEditedBy` errors on page update (#167)

### Documentation
- Document `People` page property (#162)

## [1.3.0]

### Added
- Configuration support for custom options (#155)
- Retry after `conflict_error` (#155)
- `changeColor` methods on `StatusOption` and `Status` property (#159)

### Fixed
- Status page property update (#159)

### Documentation
- Reflect breaking changes from v1 on the documentation.

## [1.2.0]

### Added
- Support to nullable page properties (#149)
  - Properties: `Date`, `Email`, `Number`, `PhoneNumber`, `Select`, `Url`.
  - New method `isEmpty()` on those properties.
- Support `Relation` database property (#150)

## [1.1.0]

### Added
- Add Query::addSort() (#144)
### Changed
- Improve PropertyFactory Exception message (#141)
- Deprecate Query::changeAddedSort() (#144)
### Documentation
- Correct documentation for `->change...()` methods (#145)
### Internal
- Remove toUpdateArray method from blocks (#136)
- Increase unit test coverage (#137)
- Add Intellij Idea default directory .idea to .gitignore (#142)
- Allow usage of secrets while running tests from forks (#143)

## [1.0.0]

### Added
- Add database description (#125)
- Add support to toggleable headings (#126)
- Add caption to Code block (#127)
- Add support to Status property (#132)
- Icon value object instead of `File|Emoji`
### Changed
- Unify constructor method names (#131)
- Require PHP 8.1
- Enums instead of constants for everything. Example: collor, block type, ...
- Readonly public properties and removal of getters
- Many method signatures were changed

## [1.0.0-beta.1]

### Added
- Add database description (#125)
- Add support to toggleable headings (#126)
- Add caption to Code block (#127)
- Add support to Status property (#132)

### Changed
- Unify constructor method names (#131)

### Documentation
- Express psr/http-client dependency on documentation (#128)
- Document blocks (#129)

## [1.0.0-beta.1]

### Added
- Icon value object instead of `File|Emoji`

### Changed
- Require PHP 8.1
- Enums instead of constants for everything. Example: collor, block type, ...
- Readonly public properties and removal of getters
- Many method signatures were changed

## [0.6.2] - 2022-08-19
### Fixed
- Missing `Files` page property (#105)

### Documentation
- How to add and update page properties (#104)
- How to get page content (#106)

## [0.6.1] - 2022-08-04

### Added
- Documentation website

### Fixed
- Method typo ~~`Block::lastEditedType()`~~ `Block::lastEditedTime()`

## [0.6.0] - 2022-07-04

### Added

- Add URL support to RichText objects (#89)

### Fixed

- Wrong object to array conversion

## [0.5.2] - 2022-06-22

### Fixed
- Handle empty value for select property (#86)

## [0.5.1] - 2022-06-02

### Fixed
- Add support to internal cover image (#80)

## [0.5.0] - 2022-05-12

### Added
- Query database (#5 and #75)

## [0.4.0] - 2022-03-24

### Added
- How to documentation for pages
- Find block (#58)
- Update block (#59)
- Append blocks (#60)
- Delete block (#61)

### Changed
- Notion version to `2022-02-22` (#69)

## [0.3.0] - 2021-12-04

### Added
- Find block children
- Find block children recursively
- Link preview block
- Column and column list blocks

### Changed
- Blocks `withChildren()` methods renamed to `changeChildren()`
## [0.2.0] - 2021-11-20
### Added
- Breadcrumb block
- Support discovery of more PSR clients with `php-http/discovery`

### Changed
- Clients require implementations of `RequestFactoryInterface`
- Rename `Notion\Client::createWithPsrClient()` to `createWithPsrImplementations()`
- Rename `Notion\Client` to `Notion\Notion`
- Rename `Notion\Databases\Database::withTitle()` to `withAdvancedTitle()`
- Use `list<RichText>` instead of `...RichText` on
  - `Bookmark::withCaption()`
  - `BulletedListItem::withText()`
  - `Callout::withText()`
  - `Code::withText()`
  - `Heading1::withText()`
  - `Heading2::withText()`
  - `Heading3::withText()`
  - `NumberedListItem::withText()`
  - `Paragraph::withText()`
  - `Quote::withText()`
  - `ToDo::withText()`
  - `Toggle::withText()`
  - `Database::withAdvancedTitle()`
  - `Title::withRichTexts()`
  - `RichTextProperty::withText()`
- Use `list<BlockInterface>` instead of `...BlockInterface` on
  - `BulletedListItem::withChildren()`
  - `Callout::withChildren()`
  - `NumberedListItem::withChildren()`
  - `Paragraph::withChildren()`
  - `Quote::withChildren()`
  - `ToDo::withChildren()`
  - `Toggle::withChildren()`
  - `Notion\Pages\Client::create()`
- Use `list<SelectOption>` instead of `...SelectOption` on
  - `Select::withOptions()`
  - `MultiSelect::withOptions()`
- Use `list<non-empty-string>` instead of `...string` on
  - `MultiSelect::fromIds()` and `MultiSelect::fromNames()`
  - `Relation::create()` and `Relation::withRelations()`
- Use `list<User>` instead of `...User` on
  - `People::create()` and `People::withPeople()`

## [0.1.0] - 2021-11-03
### Added
- Support to pages, databases and users API.
- Blocks
  - bookmark
  - bulleted list item
  - callout
  - child database
  - child page
  - code
  - divider
  - embed
  - equation
  - file
  - heading 1
  - heading 2
  - heading 3
  - image
  - numbered list item
  - paragraph
  - PDF
  - quote
  - table of contents
  - to do
  - toggle
  - video

- Database and Page properties:
  - checkbox
  - created by
  - created time
  - date
  - email
  - files
  - formula
  - last edited by
  - last edited time
  - multi select
  - number
  - people
  - phone number
  - rich text
  - select
  - title
  - URL

[0.1.0]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v0.1.0
[0.2.0]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v0.2.0
[0.3.0]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v0.3.0
[0.4.0]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v0.4.0
[0.5.0]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v0.5.0
[0.5.1]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v0.5.1
[0.5.2]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v0.5.2
[0.6.0]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v0.6.0
[0.6.1]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v0.6.1
[0.6.2]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v0.6.2
[1.0.0-beta.1]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v1.0.0-beta.1
[1.0.0-beta.2]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v1.0.0-beta.2
[1.0.0]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v1.0.0
[1.1.0]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v1.1.0
[1.2.0]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v1.2.0
[1.3.0]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v1.3.0
[1.4.0]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v1.4.0
[1.4.1]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v1.4.1
[1.5.0]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v1.5.0
[1.6.0]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v1.6.0
[1.6.1]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v1.6.1
[1.6.2]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v1.6.2
[1.7.0]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v1.7.0
[1.8.0]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v1.8.0
[1.8.1]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v1.8.1
[1.9.0]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v1.9.0
[1.10.0]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v1.10.0
[1.11.0]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v1.11.0
[1.11.1]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v1.11.1
[1.12.0]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v1.12.0
[1.13.0]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v1.13.0
[1.14.0]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v1.14.0
[1.15.0]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v1.15.0
[1.16.0]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v1.16.0
[1.17.0]: https://github.com/mariosimao/notion-sdk-php/releases/tag/v1.17.0
[Unreleased]: https://github.com/mariosimao/notion-sdk-php/compare/v1.17.0...HEAD


================================================
FILE: LICENSE
================================================
MIT License

Copyright (c) 2022 Mario Simão

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: README.md
================================================
<h1 align="center">notion-sdk-php</h1>
<p align="center">A complete Notion SDK for PHP developers.</p>

<p align="center">
<a href="https://mario.engineering/notion-sdk-php">
    <img src="./docs/public/logo.png" width="300">
</a>
</p>

<p align="center">
    <a href="https://app.codecov.io/gh/mariosimao/notion-sdk-php">
        <image src="https://img.shields.io/codecov/c/github/mariosimao/notion-sdk-php?token=ZKKCWDY4QX">
    </a>
    <a href="https://shepherd.dev/github/mariosimao/notion-sdk">
        <image src="https://shepherd.dev/github/mariosimao/notion-sdk/coverage.svg">
    </a>
    <a href="https://developers.notion.com/reference/versioning">
        <image src="https://img.shields.io/badge/API%20Version-2022--06--28-%23212121">
    </a>
    <a href="https://packagist.org/packages/mariosimao/notion-sdk-php">
        <image src="https://img.shields.io/packagist/php-v/mariosimao/notion-sdk-php?color=%23787CB5">
    </a>
    <a href="https://packagist.org/packages/mariosimao/notion-sdk-php">
        <image src="https://img.shields.io/packagist/dt/mariosimao/notion-sdk-php?color=%23FF8A65">
    </a>
</p>


## 📦 Installation

This project requires PHP 8.1 or higher. To install it with Composer run:

```bash
$ composer require mariosimao/notion-sdk-php
```

## 👩‍💻 Basic usage

Creating a page on Notion with the SDK is easy.

```php
use Notion\Blocks\Heading1;
use Notion\Blocks\ToDo;
use Notion\Common\Emoji;
use Notion\Notion;
use Notion\Pages\Page;
use Notion\Pages\PageParent;

$notion = Notion::create("secret_token");

$parent = PageParent::page("c986d7b0-7051-4f18-b165-cc0b9503ffc2");
$page = Page::create($parent)
            ->changeTitle("Shopping list")
            ->changeIcon(Emoji::fromString("🛒"));

$content = [
    Heading1::fromString("Supermarket"),
    ToDo::fromString("Tomato"),
    ToDo::fromString("Sugar"),
    ToDo::fromString("Apple"),
    ToDo::fromString("Milk"),
    Heading1::fromString("Mall"),
    ToDo::fromString("Black T-shirt"),
];

$page = $notion->pages()->create($page, $content);
```

## 📄 Documentation

Further documentation can be found at https://mariosimao.github.io/notion-sdk-php.

The Notion PHP SDK supports the usage of static analysers. We strongly recommend the usage of
either [vimeo/psalm](https://github.com/vimeo/psalm) or [phpstan/phpstan](https://github.com/phpstan/phpstan) in combination with this library, to avoid simple mistakes.

## 🏷️ Versioning

[SemVer](semver.org) is followed closely. Minor and patch releases should not introduce breaking changes to the codebase.

Any classes or methods marked as `@internal` are not intended for use outside of this library and are subject to breaking changes at any time, avoid using them.

## 🛠️ Maintenance & Support
When a new minor version (e.g. 1.3 -> 1.4) is released, the previous one (1.3) will continue to receive security and critical bug fixes for at least 3 months.

When a new major version is released (e.g. 1.6 -> 2.0), the previous one (1.6) will receive critical bug fixes for at least 3 months and security updates for 6 months after that new release comes out.

This policy may change in the future and exceptions may be made on a case-by-case basis.

## ❤️ Sponsors

An special thanks to all sponsors who activelly support the SDK!

<!-- sponsors --><!-- sponsors -->


================================================
FILE: SECURITY.md
================================================
# Security Policy

## Supported Versions

Versions that are currently being supported with security updates.

| Version | Supported          |
| ------- | ------------------ |
| 1.0.x   | :white_check_mark: |
| 0.x.x   | :x:                |

## Reporting a Vulnerability

Report a vulnerability via [GitHub Security Advisories](https://github.com/mariosimao/notion-sdk-php/security/advisories/new).


================================================
FILE: composer.json
================================================
{
    "name": "mariosimao/notion-sdk-php",
    "description": "A complete Notion SDK for PHP developers.",
    "type": "library",
    "license": "MIT",
    "homepage": "https://mariosimao.github.io/notion-sdk-php",
    "autoload": {
        "psr-4": {
            "Notion\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Notion\\Test\\": "tests/"
        }
    },
    "authors": [
        {
            "name": "Mario Simão",
            "email": "mariogsimao@gmail.com"
        }
    ],
    "require": {
        "php": ">=8.1",
        "php-http/discovery": "^1.15",
        "php-http/multipart-stream-builder": "^1.4",
        "psr/http-client-implementation": "^1.0",
        "psr/http-factory-implementation": "^1.0",
        "psr/http-message-implementation": "^1.0"
    },
    "require-dev": {
        "brianium/paratest": "7.3.2",
        "guzzlehttp/guzzle": "^7.5",
        "infection/infection": "^0.26.19 || ^0.27.0",
        "phpunit/phpunit": "10.5.63",
        "psalm/plugin-phpunit": "^0.18.4",
        "squizlabs/php_codesniffer": "^3.7",
        "vimeo/psalm": "^5.7"
    },
    "scripts": {
        "ci:phpcs": "phpcs -q --report=checkstyle | cs2pr",
        "ci:psalm": "psalm --output-format=github --shepherd --stats",
        "ci:coverage": [
            "Composer\\Config::disableProcessTimeout",
            "paratest --coverage-clover dist/phpunit/clover.xml"
        ],
        "ci:unit": "paratest --testsuite Unit",
        "ci:integration": "paratest --testsuite Integration",
        "ci:mutation": [
            "Composer\\Config::disableProcessTimeout",
            "infection --threads=max"
        ],
        "test": [
            "@test:phpcs",
            "@test:psalm",
            "@test:unit"
        ],
        "test:phpcs": "phpcs",
        "test:psalm": "psalm --no-cache",
        "test:unit": "phpunit --testsuite Unit",
        "test:integration": "paratest --testsuite Integration",
        "test:coverage": "paratest --coverage-html dist/phpunit/html && echo \"Open the result on your browser: $PWD/dist/phpunit/html/index.html\""
    },
    "config": {
        "allow-plugins": {
            "infection/extension-installer": true,
            "php-http/discovery": true
        },
        "sort-packages": true
    }
}


================================================
FILE: docs/.vitepress/config.ts
================================================
import fs from 'fs';
import { defineConfig } from 'vitepress';

const removeExtension = (filename: string) => filename.split('.').shift() ?? '';
const kebabToSpaced = (kebab: string) => kebab.split('-').join(' ');
const capitalizeFirstLetter = (name: string) => name.charAt(0).toUpperCase() + name.slice(1);

const blockTitle = (filename: string) => {
    return removeExtension(filename);
}

const howToTitle = (filename: string) => {
    const noExtension = removeExtension(filename);
    const spaced = kebabToSpaced(noExtension);

    return capitalizeFirstLetter(spaced);
}

const blockItems = fs.readdirSync('./blocks')
    .filter(file => file !== 'index.md')
    .sort()
    .map(file => ({
        text: blockTitle(file),
        link: `/blocks/${file}`,
    }));

const pagePropsItems = fs.readdirSync('./page-properties')
.filter(file => file !== 'index.md')
.sort()
.map(file => ({
    text: blockTitle(file),
    link: `/page-properties/${file}`,
}));

const howToItems = fs.readdirSync('./how-to')
    .filter(file => file !== 'index.md')
    .sort()
    .map(file => ({
        text: howToTitle(file),
        link: `/how-to/${file}`,
    }));

const basePath = '/notion-sdk-php/';

export default defineConfig({
    base: basePath,
    title: 'Notion SDK PHP',
    description: 'A complete Notion SDK for PHP developers.',
    lang: 'en-US',
    lastUpdated: true,
    head: [
        ['link', { rel: 'apple-touch-icon', sizes: '180x180', href: `${basePath}favicons/apple-touch-icon.png`}],
        ['link', { rel: 'icon', type: 'image/png', sizes: '32x32', href: `${basePath}favicons/favicon-32x32.png`}],
        ['link', { rel: 'icon', type: 'image/png', sizes: '16x16', href: `${basePath}favicons/favicon-16x16.png`}],
        ['link', { rel: 'manifest', href: `${basePath}favicons/site.webmanifest`}],
        ['link', { rel: 'shortcut icon', href: `${basePath}favicons/favicon.ico`}],
        ['meta', { name: 'theme-color', content: '#787CB5'}],
    ],
    themeConfig: {
        logo: '/logo.png',
        algolia: {
            appId: 'I6RXP3ZUR1',
            apiKey: 'd4fe90d3f1d686f71865fec455c3ac59',
            indexName: 'notion-sdk-php',
        },
        nav: [
            { text: 'Documentation', link: '/getting-started' },
            { text: 'Changelog', link: 'https://github.com/mariosimao/notion-sdk-php/blob/main/CHANGELOG.md'},
        ],
        socialLinks: [
            { icon: 'github', link: 'https://github.com/mariosimao/notion-sdk-php' },
            { icon: 'twitter', link: 'https://twitter.com/mariogsimao' },
        ],
        sidebar: [
            {
                text: 'Introduction',
                items: [
                    { text: 'Getting started', link: '/getting-started' },
                ],
            },
            {
                text: 'How to',
                collapsible: true,
                collapsed: true,
                items: [
                    ...howToItems,
                ],
            },
            {
                text: 'Blocks',
                collapsible: true,
                collapsed: true,
                items: [
                    { text: 'Introduction', link: '/blocks/' },
                    ...blockItems,
                ],
            },
            {
                text: 'Page properties',
                collapsible: true,
                collapsed: true,
                items: [
                    { text: 'Introduction', link: '/page-properties/' },
                    ...pagePropsItems,
                ],
            },
            {
                text: 'Comments',
                collapsible: true,
                collapsed: true,
                items: [
                    { text: 'Introduction', link: '/comments/' },
                ],
            },
            {
                text: 'Search',
                collapsible: true,
                collapsed: true,
                items: [
                    { text: 'Introduction', link: '/search/' },
                ],
            },
            {
                text: 'Advanced',
                collapsible: true,
                items: [
                    { text: 'Configuration', link: '/advanced/configuration' },
                ]
            }
        ],
        footer: {
            message: 'Released under the MIT License.',
            copyright: 'Copyright © 2021-present Mario Simão',
        },
    },
});


================================================
FILE: docs/.vitepress/theme/custom.css
================================================
:root {
    --vp-c-brand: #787CB5;
    --vp-c-brand-light: #B0B3D6;
    --vp-c-brand-lighter: var(--vp-c-indigo-lighter);
    --vp-c-brand-dark: #474A8A;
    --vp-c-brand-darker: var(--vp-c-indigo-darker);
}

.VPDoc img {
    border-style: solid;
    border-width: 0.5px;
    border-color: rgba(84, 84, 84, 0.65);
    border-radius: 8px;
}


================================================
FILE: docs/.vitepress/theme/index.js
================================================
import DefaultTheme from 'vitepress/theme'
import './custom.css'

export default DefaultTheme;


================================================
FILE: docs/advanced/configuration.md
================================================
# SDK Configuration

The SDK can be configured with custom options.

```php
$config = Configuration::create();

$notion = Notion::createFromConfig($config);
```

## Default values

| Option | Type | Default |
|--------|------|---------|
|[`retryOnConflict`](#retry-on-conflict)|bool|`true`|
|[`retryOnConflictAttempts`](#retry-on-conflict)|int|`1`|

## Retry on conflict

Sometimes, the Notion API responds with the following error

```json
{
    "code": "conflict_error",
    "message": "Conflict occurred while saving. Please try again."
}
```

The SDK provides a retry option (enabled by default) and sends the request again
until a success responde or when reaches the maximum number of attempts.

### Enable

```php
$token = $_ENV["NOTION_TOKEN"];

$retryAttempts = 3;
$config = Configuration::create($token)
            ->enableRetryOnConflict($retryAttempts);

$notion = Notion::createFromConfig($config);
```

### Disable

```php
$token = $_ENV["NOTION_TOKEN"];

$config = Configuration::create($token)
            ->disableRetryOnConflict();

$notion = Notion::createFromConfig($config);
```


================================================
FILE: docs/blocks/Bookmark.md
================================================
# Bookmark block

## Create

Creating a bookmark from a URL string:
```php
<?php

$bookmark = Bookmark::fromUrl("https://notion.so");
```

![](../images/bookmark.png)

## Add caption

```php
$caption = RichText::fromString("An awesome bookmark caption");

$bookmark = Bookmark::fromUrl("https://notion.so")
                    ->changeCaption($caption);
```

![](../images/bookmark-caption.png)

## Change URL

```php
$bookmark = Bookmark::fromUrl("https://notion.so");
$bookmark = $bookmark->changeUrl("https://google.com");

echo $bookmark->url;
```

Output:
```
https://google.com
```

## Change caption

```php
$oldCaption = RichText::fromString("An awesome bookmark caption");
$bookmark = Bookmark::fromUrl("https://notion.so")
                    ->changeCaption($oldCaption);

$newCaption = RichText::fromString("A new caption!");
$bookmark = $bookmark->changeCaption($newCaption);

echo RichText::multipleToString($bookmark->caption);
```

Output:
```
A new caption!
```

================================================
FILE: docs/blocks/Breadcrumb.md
================================================
# Breadcrumb

## Create

Creating a breadcrumb:
```php
<?php

$breadcrumb = Breadcrumb::create();
```

![](../images/breadcrumb.png)


================================================
FILE: docs/blocks/BulletedListItem.md
================================================
# Bulleted list item

## Create empty item

```php
$item = BulletedListItem::create();
```

## Create from string

Bulleted list items can be created from simple strings.

```php
$item = BulletedListItem::fromString("Item content");
```

![](../images/bulleted-list-item.jpg)

## Create from `RichText`

```php
$text = RichText::fromString("Item text")->italic();

$item = BulletedListItem::create()->changeText($text);
```

![](../images/bulleted-list-item-rich-text.jpg)

## Add text

```php
$item = BulletedListItem::fromString("Item text");
$item = $item->addText(
    RichText::fromString(" can be extended!")
);

echo $item->toString();
```

Output:
```
Item text can be extended!
```
## Add child

```php
$item = BulletedListItem::fromString("Item text");

$item = $item->addChild(
    Paragraph::fromString("A simple child paragraph.")
);
```

![](../images/bulleted-list-item-append-child.jpg)

## Change children

```php
$item = BulletedListItem::fromString("Item text")
    ->addChild(Paragraph::fromString("Old child"));

$item = $item->changeChildren(
    Paragraph::fromString("Child paragraph 1"),
    Paragraph::fromString("Child paragraph 2"),
);
```

![](../images/bulleted-list-item-change-children.jpg)

## Convert to string

Get item content as string

```php
$item = BulletedListItem::fromString("Item text");

echo $item->toString();
```

Output:

```
Item text
```

================================================
FILE: docs/blocks/Callout.md
================================================
# Callout

## Create

Creating an empty callout:

```php
$block = Callout::create();
```

![](../images/callout.png)

## Create from string

```php
$block = Callout::fromString("💡", "A brilliant idea");
```

![](../images/callout-from-string.png)

## Create from `RichText`

```php
$block = Callout::create()->changeText(
    RichText::fromString("Rich text ")->italic(),
    RichText::fromString("is")->underline(),
    RichText::fromString(" amazing")->bold(),
);
```

![](../images/callout-rich-text.png)

## Convert to string

```php
$block = Callout::fromString("💡", "A brilliant idea");

echo $block->toString();
```

Output:
```
A brilliant idea
```

## Change text

```php
$block = Callout::fromString("💡", "Old text");

$block = $block->changeText(
    RichText::fromString("New text"),
);

echo $block->toString();
```

Output:

```
New text
```

## Add text

```php
$block = Callout::fromString("💡", "ABC")
    ->addText(RichText::fromString("123"));

echo $block->toString();
```

Output:

```
ABC123
```

## Change icon

### Emoji

```php
$block = Callout::fromString("😎", "A brilliant idea");

$newIcon = Emoji::fromString("💡");
$block = $block->changeIcon($newIcon);

echo $block->icon->emoji->emoji;
```

Output:
```
💡
```

### File

```php
$block = Callout::fromString("😎", "A brilliant idea");

$newIcon = File::createExternal(
    "https://cdn-icons-png.flaticon.com/512/648/648675.png"
);
$block = $block->changeIcon($newIcon);

echo $block->icon->file->url;
```

Output:
```
https://cdn-icons-png.flaticon.com/512/648/648675.png
```

## Add child

```php
$block = Callout::create()
    ->chageIcon(Emoji::fromString("💡"))
    ->changeText(
        RichText::fromString("Heraclitus")->bold(),
        RichText::fromString(" once said:"),
    )->addChild(
        Quote::fromString("One cannot step twice in the same river")
    );
```

![](../images/callout-children.png)

## Change children

```php
$block = Callout::fromString("💡", "A brilliant idea")
    ->addChild(
        Paragraph::fromString("Old paragraph")
    );

$block = $block->changeChildren(
    Paragraph::fromString("New paragraph 1"),
    Paragraph::fromString("New paragraph 2"),
);

echo $block->children[0]->toString() . PHP_EOL;
echo $block->children[1]->toString() . PHP_EOL;
```

Output:
```
New paragraph 1
New paragraph 2
```


================================================
FILE: docs/blocks/ChildDatabase.md
================================================
# Child database

Child databases can only be added to a page by creating a new database.

However, a child database can be retreived from the page content.

```php
$pageId = "3f4ch4...";
$content = $notion->blocks()->findChildren($pageId);

/** @var ChildDatabase */
$childDatabase = $content[0];
echo $childDatabase->title;
```

================================================
FILE: docs/blocks/ChildPage.md
================================================
# Child page

Child pages can only be added to a page by creating a new page.

However, a child page can be retreived from the page content.

```php
$pageId = "3f4ch4...";
$content = $notion->blocks()->findChildren($pageId);

/** @var ChildPage */
$childPage = $content[0];
echo $childPage->title;
```

================================================
FILE: docs/blocks/Code.md
================================================
# Code

## Create empty

Creating an empty code block:

```php
$block = Code::create();
```

## Create from string

```php
$text = "<?php echo 'Hello, world!';";
$block = Code::createFromString($text, CodeLanguage::Php);
```

![](../images/code-rich-text.png)

## Create from `RichText`

```php
$text = [
    RichText::fromString("<?php\n"),
    RichText::fromString("echo 'Hello, world!';"),
];
$block = Code::create($text, CodeLanguage::Php);
```

![](../images/code-rich-text.png)

## Change language

```php
$block = Code::createFromString("console.log('Hello!');")->changeLanguage(CodeLanguage::Javascript);
```

![](../images/code-change-language.png)

## Append text

```php
$block = Code::create()
    ->addText(RichText::fromString("console.log('Hello!')"))
    ->changeLanguage(CodeLangugae::Javascript);
```

## Change text

```php
$text = [
    RichText::fromString("<?php\n"),
    RichText::fromString("echo 'Hello, world!';"),
];

$block = Code::create()
    ->changeText(...$text)
    ->changeLanguage(CodeLanguage::Php);
```

================================================
FILE: docs/blocks/Column.md
================================================
# Column

Columns should be used inside a [ColumnList](./ColumnList) block.

The block's children will define the content of the column.

## Create

```php
$column1 = Column::create(
    Heading1::fromString("Column 1"),
    Paragraph::fromString("This is column 1"),
);
$column2 = Column::create(
    Heading1::fromString("Column 2"),
    Paragraph::fromString("This is column 2"),
);

$columnList = ColumnList::create($column1, $column2);
```

![](../images/column-create.png)

## Add child block

```php
Column::create(
        Heading1::fromString("Column 1")
    )->addChild(
        Paragraph::fromString("This is column 1")
    );
```

::: tip
All blocks, but `Column` are allowed as children.
:::

## Change children

```php
Column::create()->changeChildren(
    Paragraph::fromString("This is column 1")
);
```


================================================
FILE: docs/blocks/ColumnList.md
================================================
# Column list

Column lists are blocks that contains [Columns](./Column) as children.

## Create

```php
$text = Paragraph::fromString("Column");
$col1 = Column::create($text);
$col2 = Column::create($text);
$col3 = Column::create($text);

$block = ColumnList::create($col1, $col2, $col3);
```

## Add column

```php
$col1 = Column::create();
$col2 = Column::create();
$col3 = Column::create();

$block = ColumnList::create($col1, $col2);
$block = $block->addChild($col3);
```

## Change columns

```php
$col1 = Column::create();
$col2 = Column::create();
$col3 = Column::create();

$block = ColumnList::create()
    ->changeColumns($col1, $col2, $col3);
```

================================================
FILE: docs/blocks/Divider.md
================================================
# Divider

## Create

```php
$block = Divider::create();
```

![](../images/divider.png)

================================================
FILE: docs/blocks/Embed.md
================================================
# Embed

Embed anything: PDFs, Google Docs, Google Maps, Spotify...

## Create

```php
$url = "https://goo.gl/maps/t7y33q3qfCBxr5489";
$block = Embed::create($url);
```

![](../images/embed-maps.png)


================================================
FILE: docs/blocks/EquationBlock.md
================================================
# Embed

Display a standalone math equation.

## Create

```php
$block = EquationBlock::create("
    |x| = \\begin{cases}
    x, &\\quad x \geq 0 \\\\
    -x, &\\quad x < 0
    \\end{cases}
");
```

![](../images/equation-block.png)

## Change equation

```php
$block = EquationBlock::create("a^2 + b^2 = c^2");
$newEquation = Equation::create("E = m * c^2");
$block = $block->changeEquation($newEquation);
```


================================================
FILE: docs/blocks/FileBlock.md
================================================
# File

Upload or embed with a link.

## Create

```php
$file = File::createExternal(
    "https://shakespeare.folger.edu/downloads/pdf/hamlet_PDF_FolgerShakespeare.pdf"
);
$block = FileBlock::create($file);
```

![](../images/file-block.png)


================================================
FILE: docs/blocks/Heading.md
================================================
# Heading

Small, medium and big section heading.

## Create from string

```php
$blocks = [
    Heading1::fromString("Heading 1"),
    Heading2::fromString("Heading 2"),
    Heading3::fromString("Heading 3"),
];
```

![](../images/heading-from-string.png)

## Create from `RichText`

```php
$block = Heading1::create(
    RichText::fromString("Heading "),
    RichText::fromString("with ")->italic(),
    RichText::fromString("Rich")->underline(),
    RichText::fromString("Text")->bold(),
);
```

![](../images/heading-from-rich-text.png)

## Convert to string

```php
$block = Heading1::create(
    RichText::fromString("Heading "),
    RichText::fromString("with ")->italic(),
    RichText::fromString("Rich")->underline(),
    RichText::fromString("Text")->bold(),
);

echo $block->toString();
```

Output:
```
Heading with RichText
```

## Change text

```php
$block = Heading1::fromString("Old heading");
$block = $block->changeText(
    RichText::fromString("New "),
    RichText::fromString("heading")->bold(),
);

echo $block->toString();
```

Output:

```
New heading
```

## Add text

```php
$block = Heading1::fromString("Heading");

$block = $block->addText(RichText::fromString(" extended"));

echo $block->toString();
```

Output

```
Heading extended
```


================================================
FILE: docs/blocks/Image.md
================================================
# Image

Upload or embed image with a link.

## Upload

The Notion API [currently does not support uploading new files](https://developers.notion.com/docs/working-with-files-and-media#uploading-files-and-media-via-the-notion-api).

## Embed with link

```php
$file = File::createExternal("https://www.placecage.com/640/360.png");
$block = Image::create($file);
```

## Change file

```php
$file = File::createExternal("https://www.placecage.com/640/360.png");
$block = Image::create($file);

// Add to a Notion page...

$newFile = File::creatExternal("https://www.fillmurray.com/640/360.png");
$block = $block->changeFile($newFile);
```

================================================
FILE: docs/blocks/LinkPreview.md
================================================
# Link Preview

This block cannot be created, only retrieved from the API.

```php
/** @var LinkPreview $block */
$block->url;      // Link URL
$block->metadata; // Block metadata
```

================================================
FILE: docs/blocks/NumberedListItem.md
================================================
# Numbered list item

List with numbering.

## Create from string

```php
$blocks = [
    NumberedListItem::fromString("First item"),
    NumberedListItem::fromString("Second item"),
    NumberedListItem::fromString("Third item"),
];
```

![](../images/numbered-list-item-from-string.png)



================================================
FILE: docs/blocks/Paragraph.md
================================================
# Paragraph block

## Working with strings

Creating a paragraph from a simple string:
```php
<?php

$paragraph = Paragraph::fromString("Simple paragraph.");
$paragraph->toString(); // "Simple paragraph."
```

![](../images/paragraph.png)

Or creating an empty paragraph:
```php
<?php

$paragraph = Paragraph::create();
$paragraph->toString(); // empty string
```

## Working with `RichText` objects

```php
<?php

// "Simple text" will be bold and italic
$text = RichText::fromString("Simple text")->bold()->italic();

$paragraph = Paragraph::create()->addText($text);
```

![](../images/paragraph-rich-text.png)

While working with multiple texts:

```php
$text = [
    RichText::fromString("Paragraphs can be "),
    RichText::fromString("bold")->bold(),
    RichText::fromString(", "),
    RichText::fromString("underlined")->underline(),
    RichText::fromString(" and much more!"),
];

$paragraph = Paragraph::create()->changeText(...$text);
```

Note that `changeText()` will replace the text on a new instance of `Paragraph`.

![](../images/paragraph-rich-text-multiple.png)


================================================
FILE: docs/blocks/Pdf.md
================================================
# PDF

Embed a PDF file.

## Create from a link

```php
$file = File::createExternal(
    "https://shakespeare.folger.edu/downloads/pdf/hamlet_PDF_FolgerShakespeare.pdf"
);
$block = Pdf::create($file);
```

## Change file

```php
$file = File::createExternal("https://example.com/sample1.pdf");
$block = Pdf::create($file);

// Add to a Notion page...

$newFile = File::creatExternal("https://example.com/sample2.pdf");
$block = $block->changeFile($newFile);
```


================================================
FILE: docs/blocks/Quote.md
================================================
# Quote

Capture a quote.

## Create from string

```php
$block = Quote::fromString(
    "The way to get started is to quit talking and begin doing."
);
```

![](../images/quote-from-string.png)


================================================
FILE: docs/blocks/index.md
================================================
# Blocks

## Introduction

Blocks are one of the main objects from the Notion. They are used to compose the
contents of a page. All available blocks are listed [bellow](#available-blocks).

## Metadata

All block objects have the `metadata()` method, witch exposes some metadata.

```php
$p = Paragraph::fromString("Simple paragraph.");

$p->metadata()->id;                              // a9f03ee5...
$p->metadata()->createdTime->format("Y-m-d");    // 2022-07-01
$p->metadata()->lastEditedTime->format("Y-m-d"); // 2022-07-01
$p->metadata()->inTrash;                         // false
$p->metadata()->hasChildren;                     // false
```

## Children

Some blocks additionally support adding or changing children. Children can be
any other type of block.

```php
/* Add child block */
$c = Callout::fromString("💡", "A brilliant idea");
$p = Paragraph::fromString("Simple paragraph.")
        ->addChild($c);

/* Change children blocks */
$p = $p->changeChildren(
    Paragraph::fromString("Nested paragraph 1"),
    Paragraph::fromString("Nested paragraph 2"),
);
count($p->children); // 2

/* Remove children blocks */
$p = $p->changeChildren();
```

## Available blocks

| Block                                  | Support children |
|----------------------------------------|:----------------:|
| [Bookmark](./Bookmark)                 | ❌              |
| [Breadcrumb](./Breadcrumb)             | ❌              |
| [BulletedListItem](./BulletedListItem) | ✔               |
| [Callout](./Callout)                   | ✔               |
| [ChildDatabase](./ChildDatabase)       | ❌              |
| [ChildPage](./ChildPage)               | ❌              |
| [Code](./Code)                         | ❌              |
| [Column](./Column)                     | ✔               |
| [ColumnList](./ColumnList)             | ✔               |
| [Divider](./Divider)                   | ❌              |
| [Embed](./Embed)                       | ❌              |
| [EquationBlock](./EquationBlock)       | ❌              |
| [FileBlock](./FileBlock)               | ❌              |
| [Heading1](./Heading)                  | ✔               |
| [Heading2](./Heading)                  | ✔               |
| [Heading3](./Heading)                  | ✔               |
| [Image](./Image)                       | ❌              |
| [LinkPreview](./LinkPreview)           | ❌              |
| [NumberedListItem](./NumberedListItem) | ✔               |
| [Paragraph](./Paragraph)               | ✔               |
| [PDF](./Pdf.md)                        | ❌              |
| [Quote](./Quote.md)                    | ✔               |
| TableOfContents                        | ❌              |
| ToDo                                   | ✔               |
| Toggle                                 | ✔               |
| Video                                  | ❌              |

================================================
FILE: docs/comments/index.md
================================================
# Comments

It is possible to comment on pages and blocks.

Comment objects have the following fields:

```php
$comment->id;               // cca26fdc...
$comment->createdTime;      // 2023-01-18
$comment->lastEditedTime;   // 2023-01-18
$comment->userId;           // 3f577044...
$comment->parent->id;       // 41ef05c4...
$comment->parent->type;     // ParentType (block, page, database)
$comment->discussionId;     // 311523ee...
$comment->text;             // RichText array
```

## Read comments

```php
$pageComments = $notion->comments()->list($pageId);
$blockComments = $notion->comments()->list($blockId);

foreach ($pageComments as $comment) {
    echo RichText::multipleToString($comment);
}
```

## Add page comment

```php
$text = RichText::fromString("A sample page comment.")
$comment = Comment::create($pageId, $text);

$notion->comments()->create($comment);
```

## Add comment on discussion

```php
$text = RichText::fromString("A sample discussion comment.")
$comment = Comment::createReply($discussionId, $text);

$notion->comments()->create($comment);
```


================================================
FILE: docs/getting-started.md
================================================
# Getting started

This section will help you setup a basic Notion application using
`notion-sdk-php` from ground up. If you already have an existing project, start
from [Step 2](#_2-install-notion-sdk-php).

## 1. Create a new project

Create and change into a new directory.

```bash
$ mkdir notion-app && cd notion-app
```

Then, initialize with Composer.

```bash
$ composer init
```

## 2. Install Notion SDK PHP

::: tip
An implementation of `psr/http-client` should be previously installed.

For example:
```bash
$ composer require guzzlehttp/guzzle
```
:::

Add `notion-sdk-php` as dependency for the project.

```bash
$ composer require mariosimao/notion-sdk-php
```


## 3. Get a Notion token

A Notion token will be needed to fully use this library. If you don't have one,
please refer to the [Authorization section](https://developers.notion.com/docs/authorization)
on the [Notion API documentation](https://developers.notion.com/).

## 4. Use the SDK

Test if everything is working by listing all users from the Notion workspace.

```php
<?php

require "vendor/autoload.php";

use Notion\Notion;

$token = "secret_token";
$notion = Notion::create($token);

$users = $notion->users()->findAll();

foreach ($users as $user) {
    echo $user->name . PHP_EOL;
}
```


================================================
FILE: docs/how-to/add-content-to-page.md
================================================
# Add content to page

```php
<?php

use Notion\Blocks\Paragraph;
use Notion\Notion;

$token = $_ENV["NOTION_SECRET"];
$notion = Notion::create($token);

$pageId = "c986d7b0-7051-4f18-b165-cc0b9503ffc2";

$content = [
    Paragraph::fromString("This paragraph will be appended."),
    Paragraph::fromString("This other paragraph too!"),
];

$notion->blocks()->append($pageId, $content);
```

================================================
FILE: docs/how-to/add-row-to-database.md
================================================
# Add row to database

Database rows on Notion are essentially pages where the parent is the database.

```php
<?php

use Notion\Blocks\Paragraph;
use Notion\Notion;

$token = $_ENV["NOTION_SECRET"];
$notion = Notion::create($token);

$databaseId = "your_database_id_here";
$parent = \Notion\Pages\PageParent::database($databaseId);

$title    = \Notion\Pages\Properties\Title::fromString("Superbad");
$release  = \Notion\Pages\Properties\Date::create(new DateTimeImmutable("2007-10-19"));
$category = \Notion\Pages\Properties\Select::fromName("Comedy");

$page = \Notion\Pages\Page::create($parent)
    ->addProperty("Title", $title)
    ->addProperty("Release date", $release)
    ->addProperty("Category", $category);

$page = $notion->pages()->create($page);
```

================================================
FILE: docs/how-to/create-a-page.md
================================================
# Create a page

## Empty page

```php
<?php

use Notion\Notion;
use Notion\Common\Emoji;
use Notion\Pages\Page;
use Notion\Pages\PageParent;

$token = $_ENV["NOTION_SECRET"];
$notion = Notion::create($token);

$parent = PageParent::page("c986d7b0-7051-4f18-b165-cc0b9503ffc2");
$page = Page::create($parent)
            ->changeTitle("Empty page")
            ->changeIcon(Emoji::fromString("⭐"));

$page = $notion->pages()->create($page);
```

## Page with content

```php
<?php

use Notion\Blocks\Heading1;
use Notion\Notion;
use Notion\Blocks\ToDo;
use Notion\Common\Emoji;
use Notion\Pages\Page;
use Notion\Pages\PageParent;

$token = $_ENV["NOTION_SECRET"];
$notion = Notion::create($token);

$parent = PageParent::page("c986d7b0-7051-4f18-b165-cc0b9503ffc2");
$page = Page::create($parent)
            ->changeTitle("Shopping list")
            ->changeIcon(Emoji::fromString("🛒"));

$content = [
    Heading1::fromString("Supermarket"),
    ToDo::fromString("Tomato"),
    ToDo::fromString("Sugar"),
    ToDo::fromString("Apple"),
    ToDo::fromString("Milk"),
    Heading1::fromString("Mall"),
    ToDo::fromString("Black T-shirt"),
];

$page = $notion->pages()->create($page, $content);
```


================================================
FILE: docs/how-to/delete-a-page.md
================================================
# Delete a page

Deleted pages are moved to trash. It is possible to recover pages in trash.

```php
<?php

use Notion\Notion;

$token = $_ENV["NOTION_SECRET"];
$notion = Notion::create($token);

$pageId = "c986d7b0-7051-4f18-b165-cc0b9503ffc2";
$page = $notion->pages()->find($pageId);
$page = $notion->pages()->delete($page);

$page->inTrash; // true
```

================================================
FILE: docs/how-to/find-a-page.md
================================================
# Find a page

It is possible to retrieve a page by knowing its ID.

```php
<?php

use Notion\Notion;

$token = $_ENV["NOTION_SECRET"];
$notion = Notion::create($token);

$pageId = "c986d7b0-7051-4f18-b165-cc0b9503ffc2";
$page = $notion->pages()->find($pageId);

echo $page->title()?->toString();
```
::: warning
When finding a page, you will not get the content of it, only meta information and properties.
:::

## Get page content

In Notion, pages behave like blocks where the content is their children.

You can fetch page content with

* `$notion->blocks()->findChildren($pageId)` or
* `$notion->blocks()->findChildrenRecursive($pageId)`

The second option iterates over the content to find also their children (useful for nested content).

```php
<?php

$token = $_ENV["NOTION_TOKEN"];
$notion = \Notion\Notion::create($token);

$pageId = "471373adacbe4247aa4b2ce06ed14026";
$content = $notion->blocks()->findChildren($pageId);
```


================================================
FILE: docs/how-to/list-database-pages.md
================================================
# List database pages

```php
<?php

use Notion\Notion;

$token = $_ENV["NOTION_SECRET"];
$notion = Notion::create($token);

$databaseId = "c986d7b0-7051-4f18-b165-cc0b9503ffc2";
$database = $notion->databases()->find($databaseId);

$pages = $notion->databases()->queryAllPages($database);

count($pages);
```


================================================
FILE: docs/how-to/query-database.md
================================================
# Query database

```php
<?php

use Notion\Notion;
use Notion\Databases\Query;
use Notion\Databases\Query\CompoundFilter;
use Notion\Databases\Query\DateFilter;
use Notion\Databases\Query\Sort;
use Notion\Databases\Query\TextFilter;

$token = $_ENV["NOTION_SECRET"];
$notion = Notion::create($token);

$databaseId = "c986d7b0-7051-4f18-b165-cc0b9503ffc2";
$database = $notion->databases()->find($databaseId);

$query = Query::create()
    ->changeFilter(
        CompoundFilter::and(
            DateFilter::createdTime()->pastWeek(),
            TextFilter::property("Name")->contains("John"),
        )
    )
    ->addSort(Sort::property("Name")->ascending())
    ->changePageSize(20);

$result = $notion->databases()->query($database, $query);

$pages = $result->pages; // array of Page
$result->hasMore; // true or false
$result->nextCursor // cursor ID or null
```


================================================
FILE: docs/how-to/update-a-page.md
================================================
# Update a page

## Update title

```php
<?php

use Notion\Notion;
use Notion\Common\Emoji;

$token = $_ENV["NOTION_SECRET"];
$notion = Notion::create($token);

$pageId = "c986d7b0-7051-4f18-b165-cc0b9503ffc2";
$page = $notion->pages()->find($pageId);
$page = $page->changeTitle("New title")
             ->changeIcon(Emoji::fromString(🚲));

$notion->pages()->update($page);
```

## Update properties

```php
<?php

use Notion\Notion;

$token = $_ENV["NOTION_SECRET"];
$notion = Notion::create($token);

$pageId = "c986d7b0-7051-4f18-b165-cc0b9503ffc2";
$page = $notion->pages()->find($pageId);

$updatedRelease = \Notion\Pages\Properties\Date::create(new DateTimeImmutable("2008-11-04"));
$page = $page->addProperty("Release date", $updatedRelease);

$notion->pages()->update($page);
```


================================================
FILE: docs/index.md
================================================
---
layout: home

titleTemplate: false
lastUpdated: false

hero:
  name: Notion SDK PHP
  text: "🐘 + 🇳 = 💜"
  tagline: A complete Notion SDK for PHP developers.
  image:
    src: /logo.png
  actions:
    - theme: brand
      text: Get Started
      link: /getting-started
    - theme: alt
      text: View on GitHub
      link: https://github.com/mariosimao/notion-sdk-php

features:
  - icon: ✔️
    title: Everything from Notion API
    details: The sky is the limit! Support to all blocks, objects and endpoints available.
  - icon: 💡
    title: Fully typed
    details: Stop guessing method names! Enjoy IDE autocompletes on a 100% typed API.
  - icon: ⛔
    title: No dependencies
    details: Goodbye dependency hell! You only need PHP 8.1 and your favorite implementation of PSR-18.
---


================================================
FILE: docs/package.json
================================================
{
  "name": "notion-sdk-php-docs",
  "description": "Notion SDK PHP documentation",
  "main": "index.js",
  "scripts": {
    "docs:dev": "vitepress dev . --host",
    "docs:build": "vitepress build .",
    "docs:serve": "vitepress serve ."
  },
  "author": "Mario Simão",
  "license": "MIT",
  "devDependencies": {
    "@types/node": "18.0.5",
    "vitepress": "1.0.0-alpha.16",
    "vue": "3.2.37"
  }
}


================================================
FILE: docs/page-properties/People.md
================================================
# People

A list of users.

## Get value

```php
// Find page
$page = $notion->pages()->find($pageId);

// Get value from column "Assignee"
/** @var \Notion\Pages\Properties\People $assignees */
$assignees = $page->getProperty("Assignees");

$users = $assignees->users; // array of Users
foreach ($users as $user) {
    echo $user->name;       // e.g. "Mario Simao"
}
```

## Add people property to a page

```php
// Get users
$assignee1 = $notion->users()->find("b548b6e7-da76-494b-8ede-1febf4796024");
$assignee2 = $notion->users()->find("dc1a838b-4d6f-4343-b012-be3a4d9fd0c6");

// Create property
$assignees = People::create($assignee1, $assignee2);

// Find page and change property
$page = $notion->pages()->find($pageId);
$page = $page->addProperty("Assignees", $assignees);

// Send to Notion
$notion->pages()->update($page);
```

## Update values
```php
// Get property
$page = $notion->pages()->find($pageId);
/** @var \Notion\Pages\Properties\People $assignees */
$assignees = $page->getProperty("Assignees");

// Fetch users
$assignee1 = $notion->users()->find("789653af-844b-4643-ae14-082d09cfc1f8");
$assignee2 = $notion->users()->find("31449c19-1a9b-456c-a63c-1fdc9b6c7c00");
$assignee3 = $notion->users()->find("d320799c-40d1-46e1-953a-e218f96aeefa");

// Add user to the list
$assignees = $assignees->addPerson($assignee3)

// Change the list
$assignees = $assignees->changePeople($assignee1, $assignee2);

// Remove user from the list
$assignees = $assignees->removePerson($assignee2->id);

// Update property and send to Notion
$page = $page->addProperty("Assignee", $assignees);
$notion->pages()->update($page);
```


================================================
FILE: docs/page-properties/index.md
================================================
# Page properties

## Introduction

A page is made up of page properties that contain data about the page. You can
use the Notion SDK to retrieve and update information of a page property.

Accourding to Notion documentation:
> If a page object’s Parent object is a database, then the property values
> conform to the database property schema. If a page object is not part of a
> database, then the only property value available for that page is its title.

All available properties are listed [bellow](#available-properties).

## Metadata

All page propety objects have the `metadata()` method, witch exposes
the ID and type of the property.

```php
$property->metadata()->id;  // a9f03ee5...
$property->metadata()->type // instance of Notion\Pages\Property\PropertyType
```

## Add page property

```php
use Notion\Pages\Properties\Number;

// Create property
$price = Number::create(59.99);

// Find page
$pageId = "249c7266-611a-416a-b2d4-2c7a833b6ac1";
$page = $notion->pages()->find($pageId);

// Add property to page
$page = $page->addProperty("Price", $price);

// Send to Notion
$notion->pages->update($page);
```

## Get page property
```php
// Find page
$pageId = "249c7266-611a-416a-b2d4-2c7a833b6ac1";
$page = $notion->pages()->find($pageId);

// Get property
/** @var \Notion\Pages\Properties\Number $releaseDate */
$price = $page->getProperty("Price");

$price->number;             // 59.99
$price->metadata()->id;     // d7b38593-cb6b-410d-8445-0eac9b774fe0
$price->metadata()->type;   // PropertyType::Number (enum)
```

## Update page property

```php
// Retrieve page
$pageId = "249c7266-611a-416a-b2d4-2c7a833b6ac1";
$page = $notion->pages()->find($pageId);

// Get property
/** @var \Notion\Pages\Properties\Number $releaseDate */
$price = $page->getProperty("Price");

// Update property
$price = $price->changeNumber(49.99);
$page = $page->addProperty("Price", $price);

// Send to Notion
$notion->pages()->update($page);
```

## Available properties

- Checkbox
- CreatedBy
- CreatedTime
- Date
- Email
- Files
- Formula
- LastEditedBy
- LastEditedTime
- MultiSelect
- Number
- People
- PhoneNumber
- Relation
- RichText
- Select


================================================
FILE: docs/public/favicons/site.webmanifest
================================================
{"name":"Notion SDK PHP","short_name":"Notion PHP","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#787CB5","display":"standalone"}

================================================
FILE: docs/search/index.md
================================================
# Search

## Introduction

Searches all parent or child pages and databases that have been shared with an
integration.

Returns all pages or databases, excluding duplicated linked databases, that have
titles that include the query param. If no query param is provided, then the
response contains all pages or databases that have been shared with the
integration.

::: warning
If you want to search a specific individual database, rather than across all
databases, then [query a database](../how-to/query-database.md) instead.
:::

## Searching

```php
use Notion\Search\Query;

$query = Query::title("Example"); // Search by page/database title...
$query = Query::all();            // ... or search everything

$result = $notion->search()->search($query);

$result->hasMore;    // bool
$result->nextCursor; // CursorId when hasMore is true
$result->results;    // array of Page and/or Database objects
```

## Query options

```php
use Notion\Search\Query;

$query = Query::title("Example");                                // Page or database title
$query = $query->filterByPages();                                // Return only pages
$query = $query->filterByDatabases();                            // Return only databases
$query = $query->sortByLastEditedTime(SortDirection::Ascending); // Results order

// Pagination
$query = $query->changePageSize(10);
$query = $query->changeNextCursor("70d73991-7e06-43d9-ad3c-3711213f1235")
```

================================================
FILE: infection.json
================================================
{
    "$schema": "vendor/infection/infection/resources/schema.json",
    "source": {
        "directories": [
            "src"
        ]
    },
    "logs": {
        "text": ".infection/infection.log",
        "summary": ".infection/summary.log",
        "json": ".infection/infection-log.json",
        "perMutator": ".infection/per-mutator.md"
    },
    "minMsi": 81,
    "minCoveredMsi": 89,
    "mutators": {
        "@default": true
    }
}


================================================
FILE: phpcs.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="notion-sdk-php">
    <description>Coding standard for the notion-sdk-php library.</description>
    <rule ref="PSR12"/>

    <file>src</file>
    <file>tests</file>

    <rule ref="PSR1.Methods.CamelCapsMethodName">
        <exclude-pattern>./tests/*</exclude-pattern>
    </rule>
</ruleset>


================================================
FILE: phpunit.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd"
  bootstrap="vendor/autoload.php"
  beStrictAboutOutputDuringTests="true"
  beStrictAboutChangesToGlobalState="true"
  failOnRisky="true"
  failOnWarning="true"
  cacheDirectory=".phpunit.cache"
>
  <testsuites>
    <testsuite name="Unit">
      <directory>tests/Unit</directory>
    </testsuite>
    <testsuite name="Integration">
      <directory>tests/Integration</directory>
    </testsuite>
  </testsuites>
  <coverage/>
  <source>
    <include>
      <directory suffix=".php">src</directory>
    </include>
  </source>
</phpunit>


================================================
FILE: psalm.xml
================================================
<psalm
    errorLevel="1"
    resolveFromConfigFile="true"
    memoizeMethodCallResults="true"
    findUnusedPsalmSuppress="false"
    findUnusedCode="false"
    findUnusedBaselineEntry="false"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="https://getpsalm.org/schema/config"
    xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
    <projectFiles>
        <directory name="src"/>
        <directory name="tests"/>
        <ignoreFiles>
            <directory name="vendor"/>
        </ignoreFiles>
    </projectFiles>

    <plugins>
        <pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
    </plugins>
</psalm>


================================================
FILE: src/Blocks/BlockFactory.php
================================================
<?php

namespace Notion\Blocks;

class BlockFactory
{
    /**
     * @param array{ type: string, ... } $array
     */
    public static function fromArray(array $array): BlockInterface
    {
        $type = $array["type"];

        return match ($type) {
            BlockType::Bookmark->value         => Bookmark::fromArray($array),
            BlockType::Breadcrumb->value       => Breadcrumb::fromArray($array),
            BlockType::BulletedListItem->value => BulletedListItem::fromArray($array),
            BlockType::Callout->value          => Callout::fromArray($array),
            BlockType::ChildDatabase->value    => ChildDatabase::fromArray($array),
            BlockType::ChildPage->value        => ChildPage::fromArray($array),
            BlockType::Code->value             => Code::fromArray($array),
            BlockType::Column->value           => Column::fromArray($array),
            BlockType::ColumnList->value       => ColumnList::fromArray($array),
            BlockType::Divider->value          => Divider::fromArray($array),
            BlockType::Embed->value            => Embed::fromArray($array),
            BlockType::Equation->value         => EquationBlock::fromArray($array),
            BlockType::File->value             => FileBlock::fromArray($array),
            BlockType::Heading1->value         => Heading1::fromArray($array),
            BlockType::Heading2->value         => Heading2::fromArray($array),
            BlockType::Heading3->value         => Heading3::fromArray($array),
            BlockType::Image->value            => Image::fromArray($array),
            BlockType::LinkPreview->value      => LinkPreview::fromArray($array),
            BlockType::NumberedListItem->value => NumberedListItem::fromArray($array),
            BlockType::Paragraph->value        => Paragraph::fromArray($array),
            BlockType::Pdf->value              => Pdf::fromArray($array),
            BlockType::Quote->value            => Quote::fromArray($array),
            BlockType::TableOfContents->value  => TableOfContents::fromArray($array),
            BlockType::ToDo->value             => ToDo::fromArray($array),
            BlockType::Toggle->value           => Toggle::fromArray($array),
            BlockType::Video->value            => Video::fromArray($array),
            default                            => Unknown::fromArray($array),
        };
    }
}


================================================
FILE: src/Blocks/BlockInterface.php
================================================
<?php

namespace Notion\Blocks;

/** @psalm-immutable */
interface BlockInterface
{
    public function metadata(): BlockMetadata;
    public function addChild(BlockInterface $child): self;
    public function changeChildren(BlockInterface ...$children): self;
    public function delete(): self;
    /**
     * @deprecated 1.17.0 Use `delete()` instead.
     * @codeCoverageIgnore
     */
    public function archive(): self;

    /** @internal */
    public static function fromArray(array $array): self;
    /** @internal */
    public function toArray(): array;
}


================================================
FILE: src/Blocks/BlockMetadata.php
================================================
<?php

namespace Notion\Blocks;

use DateTimeImmutable;
use Notion\Exceptions\BlockException;
use Notion\Common\Date;

/**
 * @psalm-type BlockMetadataJson = array{
 *      type: string,
 *      id: string,
 *      created_time: string,
 *      last_edited_time: string,
 *      in_trash: bool,
 *      has_children: bool,
 * }
 *
 * @psalm-immutable
 */
class BlockMetadata
{
    private function __construct(
        public readonly string $id,
        public readonly DateTimeImmutable $createdTime,
        public readonly DateTimeImmutable $lastEditedTime,
        public readonly bool $inTrash,
        public readonly bool $hasChildren,
        public readonly BlockType $type,
        private readonly string|null $unknownType = null
    ) {
        /** @psalm-suppress DeprecatedProperty */
        $this->archived = $inTrash;
    }

    /**
     * @deprecated 1.17.0 Use `$inTrash` instead.
     * @codeCoverageIgnore
     */
    public readonly bool $archived;

    /** @internal */
    public static function create(BlockType $type): self
    {
        $now = new DateTimeImmutable("now");

        return new self("", $now, $now, false, false, $type);
    }

    /**
     * @psalm-param BlockMetadataJson $array
     *
     * @internal
     */
    public static function fromArray(array $array): self
    {
        $type = BlockType::tryFrom($array["type"]) ?? BlockType::Unknown;

        return new self(
            $array["id"],
            new DateTimeImmutable($array["created_time"]),
            new DateTimeImmutable($array["last_edited_time"]),
            $array["in_trash"],
            $array["has_children"],
            $type,
            $type === BlockType::Unknown ? $array["type"] : null,
        );
    }

    /** @internal */
    public function toArray(): array
    {
        $type = $this->type !== BlockType::Unknown ? $this->type->value : $this->unknownType;

        $array = [
            "object"           => "block",
            "created_time"     => $this->createdTime->format(Date::FORMAT),
            "last_edited_time" => $this->lastEditedTime->format(Date::FORMAT),
            "in_trash"         => $this->inTrash,
            "has_children"     => $this->hasChildren,
            "type"             => $type,
        ];

        if ($this->id !== "") {
            $array["id"] = $this->id;
        }

        return $array;
    }

    /** @internal */
    public function delete(): self
    {
        return new self(
            $this->id,
            $this->createdTime,
            new DateTimeImmutable("now"),
            true,
            $this->hasChildren,
            $this->type,
        );
    }

    /** @internal */
    public function restore(): self
    {
        return new self(
            $this->id,
            $this->createdTime,
            new DateTimeImmutable("now"),
            false,
            $this->hasChildren,
            $this->type,
        );
    }

    /** @internal */
    public function updateHasChildren(bool $hasChildren): self
    {
        return new self(
            $this->id,
            $this->createdTime,
            new DateTimeImmutable("now"),
            $this->inTrash,
            $hasChildren,
            $this->type,
        );
    }

    public function update(): self
    {
        return new self(
            $this->id,
            $this->createdTime,
            new DateTimeImmutable("now"),
            $this->inTrash,
            $this->hasChildren,
            $this->type,
        );
    }

    /**
     * @internal
     *
     * @throws BlockException
     */
    public function checkType(BlockType $expectedType): void
    {
        if ($this->type !== $expectedType) {
            throw BlockException::wrongType($expectedType);
        }
    }
}


================================================
FILE: src/Blocks/BlockType.php
================================================
<?php

namespace Notion\Blocks;

enum BlockType: string
{
    case Paragraph = "paragraph";
    case Heading1 = "heading_1";
    case Heading2 = "heading_2";
    case Heading3 = "heading_3";
    case Callout = "callout";
    case Quote = "quote";
    case BulletedListItem = "bulleted_list_item";
    case NumberedListItem = "numbered_list_item";
    case ToDo = "to_do";
    case Toggle = "toggle";
    case Code = "code";
    case ChildPage = "child_page";
    case ChildDatabase = "child_database";
    case Embed = "embed";
    case Image = "image";
    case Video = "video";
    case File = "file";
    case Pdf = "pdf";
    case Bookmark = "bookmark";
    case Equation = "equation";
    case Divider = "divider";
    case Table = "table";
    case TableRow = "table_row";
    case TableOfContents = "table_of_contents";
    case Breadcrumb = "breadcrumb";
    case Column = "column";
    case ColumnList = "column_list";
    case LinkPreview = "link_preview";
    case Unknown = "unknown";
}


================================================
FILE: src/Blocks/Bookmark.php
================================================
<?php

namespace Notion\Blocks;

use Notion\Exceptions\BlockException;
use Notion\Common\RichText;

/**
 * Bookmark block
 *
 * @psalm-import-type BlockMetadataJson from BlockMetadata
 * @psalm-import-type RichTextJson from \Notion\Common\RichText
 *
 * @psalm-type BookmarkJson = array{
 *      bookmark: array{
 *          url: string,
 *          caption: RichTextJson[],
 *      },
 * }
 *
 * @psalm-immutable
 */
class Bookmark implements BlockInterface
{
    /** @param RichText[] $caption */
    private function __construct(
        private readonly BlockMetadata $metadata,
        public readonly string $url,
        public readonly array $caption
    ) {
        $metadata->checkType(BlockType::Bookmark);
    }

    /**
     * Create a bookmark from a URL
     */
    public static function fromUrl(string $url): self
    {
        $metadata = BlockMetadata::create(BlockType::Bookmark);

        return new self($metadata, $url, []);
    }

    public static function fromArray(array $array): self
    {
        /** @psalm-var BlockMetadataJson $array */
        $metadata = BlockMetadata::fromArray($array);

        /** @psalm-var BookmarkJson $array */
        $url = $array["bookmark"]["url"];

        $caption = array_map(fn($t) => RichText::fromArray($t), $array["bookmark"]["caption"]);

        return new self($metadata, $url, $caption);
    }

    public function toArray(): array
    {
        $array = $this->metadata->toArray();

        $array["bookmark"] = [
            "url" => $this->url,
            "caption" => array_map(fn(RichText $t) => $t->toArray(), $this->caption),
        ];

        return $array;
    }

    public function metadata(): BlockMetadata
    {
        return $this->metadata;
    }

    /** Change bookmark URL */
    public function changeUrl(string $url): self
    {
        return new self($this->metadata, $url, $this->caption);
    }

    /** Change bookmark caption */
    public function changeCaption(RichText ...$caption): self
    {
        return new self($this->metadata, $this->url, $caption);
    }

    public function addChild(BlockInterface $child): never
    {
        throw BlockException::noChindrenSupport();
    }

    public function changeChildren(BlockInterface ...$children): never
    {
        throw BlockException::noChindrenSupport();
    }

    public function delete(): BlockInterface
    {
        return new self(
            $this->metadata->delete(),
            $this->url,
            $this->caption,
        );
    }

    /**
     * @deprecated 1.17.0 Use `delete()` instead.
     * @codeCoverageIgnore
     */
    public function archive(): BlockInterface
    {
        return $this->delete();
    }
}


================================================
FILE: src/Blocks/Breadcrumb.php
================================================
<?php

namespace Notion\Blocks;

use Notion\Exceptions\BlockException;

/**
 * @psalm-import-type BlockMetadataJson from BlockMetadata
 *
 * @psalm-type BreadcrumbJson = array{
 *      breadcrumb: array<empty, empty>
 * }
 *
 * @psalm-immutable
 */
class Breadcrumb implements BlockInterface
{
    private function __construct(
        private readonly BlockMetadata $metadata
    ) {
        $metadata->checkType(BlockType::Breadcrumb);
    }

    public static function create(): self
    {
        $metadata = BlockMetadata::create(BlockType::Breadcrumb);

        return new self($metadata);
    }

    public static function fromArray(array $array): self
    {
        /** @psalm-var BlockMetadataJson $array */
        $metadata = BlockMetadata::fromArray($array);

        return new self($metadata);
    }

    public function toArray(): array
    {
        $array = $this->metadata->toArray();

        $array["breadcrumb"] = new \stdClass();

        return $array;
    }

    public function metadata(): BlockMetadata
    {
        return $this->metadata;
    }

    public function addChild(BlockInterface $child): never
    {
        throw BlockException::noChindrenSupport();
    }

    public function changeChildren(BlockInterface ...$children): never
    {
        throw BlockException::noChindrenSupport();
    }

    public function delete(): BlockInterface
    {
        return new self($this->metadata->delete());
    }

    /**
     * @deprecated 1.17.0 Use `delete()` instead.
     * @codeCoverageIgnore
     */
    public function archive(): BlockInterface
    {
        return $this->delete();
    }
}


================================================
FILE: src/Blocks/BulletedListItem.php
================================================
<?php

namespace Notion\Blocks;

use Notion\Common\Color;
use Notion\Common\RichText;

/**
 * Bulleted list item
 *
 * @psalm-import-type BlockMetadataJson from BlockMetadata
 * @psalm-import-type RichTextJson from \Notion\Common\RichText
 *
 * @psalm-type BulletedListItemJson = array{
 *      bulleted_list_item: array{
 *          rich_text: list<RichTextJson>,
 *          color?: string,
 *          children?: list<BlockMetadataJson>,
 *      },
 * }
 *
 * @psalm-immutable
 */
class BulletedListItem implements BlockInterface
{
    /**
     * @param RichText[] $text
     * @param BlockInterface[] $children
     */
    private function __construct(
        private readonly BlockMetadata $metadata,
        public readonly array $text,
        public readonly Color $color,
        public readonly array $children,
    ) {
        $this->metadata->checkType(BlockType::BulletedListItem);
    }

    /**
     * Create empty bulleted list item
     */
    public static function create(): self
    {
        $metadata = BlockMetadata::create(BlockType::BulletedListItem);

        return new self($metadata, [], Color::Default, []);
    }

    /**
     * Create bulleted list item from a string
     */
    public static function fromString(string $content): self
    {
        $metadata = BlockMetadata::create(BlockType::BulletedListItem);
        $text = [ RichText::fromString($content) ];

        return new self($metadata, $text, Color::Default, []);
    }

    public static function fromArray(array $array): self
    {
        /** @psalm-var BlockMetadataJson $array */
        $metadata = BlockMetadata::fromArray($array);

        /** @psalm-var BulletedListItemJson $array */
        $item = $array["bulleted_list_item"];

        $text = array_map(fn($t) => RichText::fromArray($t), $item["rich_text"]);

        $color = Color::tryFrom($item["color"] ?? "") ?? Color::Default;

        $children = array_map(fn($b) => BlockFactory::fromArray($b), $item["children"] ?? []);

        return new self($metadata, $text, $color, $children);
    }

    public function toArray(): array
    {
        $array = $this->metadata->toArray();

        $array["bulleted_list_item"] = [
            "rich_text" => array_map(fn(RichText $t) => $t->toArray(), $this->text),
            "color"     => $this->color->value,
            "children"  => array_map(fn(BlockInterface $b) => $b->toArray(), $this->children),
        ];

        return $array;
    }

    /** Get item content as string */
    public function toString(): string
    {
        return RichText::multipleToString(...$this->text);
    }

    public function metadata(): BlockMetadata
    {
        return $this->metadata;
    }

    public function changeText(RichText ...$text): self
    {
        return new self($this->metadata->update(), $text, $this->color, $this->children);
    }

    /**
     * add text to list item
     */
    public function addText(RichText $text): self
    {
        $texts = $this->text;
        $texts[] = $text;

        return new self($this->metadata, $texts, $this->color, $this->children);
    }

    public function changeChildren(BlockInterface ...$children): self
    {
        $hasChildren = (count($children) > 0);

        return new self(
            $this->metadata->updateHasChildren($hasChildren),
            $this->text,
            $this->color,
            $children,
        );
    }

    public function addChild(BlockInterface $child): self
    {
        $children = $this->children;
        $children[] = $child;

        return new self(
            $this->metadata->updateHasChildren(true),
            $this->text,
            $this->color,
            $children,
        );
    }

    public function changeColor(Color $color): self
    {
        return new self(
            $this->metadata->update(),
            $this->text,
            $color,
            $this->children,
        );
    }

    public function delete(): BlockInterface
    {
        return new self(
            $this->metadata->delete(),
            $this->text,
            $this->color,
            $this->children,
        );
    }

    /**
     * @deprecated 1.17.0 Use `delete()` instead.
     * @codeCoverageIgnore
     */
    public function archive(): BlockInterface
    {
        return $this->delete();
    }
}


================================================
FILE: src/Blocks/Callout.php
================================================
<?php

namespace Notion\Blocks;

use Notion\Common\Color;
use Notion\Common\Emoji;
use Notion\Common\File;
use Notion\Common\Icon;
use Notion\Common\RichText;

/**
 * @psalm-import-type BlockMetadataJson from BlockMetadata
 * @psalm-import-type RichTextJson from \Notion\Common\RichText
 * @psalm-import-type EmojiJson from \Notion\Common\Emoji
 * @psalm-import-type FileJson from \Notion\Common\File
 *
 * @psalm-type CalloutJson = array{
 *      callout: array{
 *          rich_text: list<RichTextJson>,
 *          color?: string,
 *          children?: list<BlockMetadataJson>,
 *          icon: EmojiJson|FileJson,
 *      },
 * }
 *
 * @psalm-immutable
 */
class Callout implements BlockInterface
{
    /**
     * @param RichText[] $text
     * @param BlockInterface[] $children
     */
    private function __construct(
        private readonly BlockMetadata $metadata,
        public readonly array $text,
        public readonly Icon $icon,
        public readonly Color $color,
        public readonly array $children,
    ) {
        $metadata->checkType(BlockType::Callout);
    }

    public static function create(): self
    {
        $metadata = BlockMetadata::create(BlockType::Callout);
        $icon = Icon::fromEmoji(Emoji::fromString("⭐"));

        return new self($metadata, [], $icon, Color::Default, []);
    }

    public static function fromString(string $emoji, string $content): self
    {
        $metadata = BlockMetadata::create(BlockType::Callout);
        $text = [ RichText::fromString($content) ];
        $icon = Icon::fromEmoji(Emoji::fromString($emoji));

        return new self($metadata, $text, $icon, Color::Default, []);
    }

    public static function fromArray(array $array): self
    {
        /** @psalm-var BlockMetadataJson $array */
        $metadata = BlockMetadata::fromArray($array);

        /** @psalm-var CalloutJson $array */
        $callout = $array["callout"];

        $text = array_map(fn($t) => RichText::fromArray($t), $callout["rich_text"]);

        $iconArray = $callout["icon"];
        if ($iconArray["type"] === "emoji") {
            /** @psalm-var EmojiJson $iconArray */
            $emoji = Emoji::fromArray($iconArray);
            $icon = Icon::fromEmoji($emoji);
        } else {
            /** @psalm-var FileJson $iconArray */
            $file = File::fromArray($iconArray);
            $icon = Icon::fromFile($file);
        }

        $color = Color::tryFrom($callout["color"] ?? "") ?? Color::Default;

        $children = array_map(fn($b) => BlockFactory::fromArray($b), $callout["children"] ?? []);

        return new self($metadata, $text, $icon, $color, $children);
    }

    public function toArray(): array
    {
        $array = $this->metadata->toArray();

        $array["callout"] = [
            "rich_text"     => array_map(fn(RichText $t) => $t->toArray(), $this->text),
            "icon"     => $this->icon->toArray(),
            "color"    => $this->color->value,
            "children" => array_map(fn(BlockInterface $b) => $b->toArray(), $this->children),
        ];

        return $array;
    }

    public function toString(): string
    {
        return RichText::multipleToString(...$this->text);
    }

    public function metadata(): BlockMetadata
    {
        return $this->metadata;
    }

    public function changeText(RichText ...$text): self
    {
        return new self($this->metadata, $text, $this->icon, $this->color, $this->children);
    }

    public function addText(RichText $text): self
    {
        $texts = $this->text;
        $texts[] = $text;

        return new self($this->metadata, $texts, $this->icon, $this->color, $this->children);
    }

    public function changeIcon(Emoji|File|Icon $icon): self
    {
        if ($icon instanceof Emoji) {
            $icon = Icon::fromEmoji($icon);
        }

        if ($icon instanceof File) {
            $icon = Icon::fromFile($icon);
        }

        return new self($this->metadata, $this->text, $icon, $this->color, $this->children);
    }

    public function changeChildren(BlockInterface ...$children): self
    {
        $hasChildren = (count($children) > 0);

        return new self(
            $this->metadata->updateHasChildren($hasChildren),
            $this->text,
            $this->icon,
            $this->color,
            $children,
        );
    }

    public function addChild(BlockInterface $child): self
    {
        $children = $this->children;
        $children[] = $child;

        return new self(
            $this->metadata->updateHasChildren(true),
            $this->text,
            $this->icon,
            $this->color,
            $children,
        );
    }

    public function changeColor(Color $color): self
    {
        return new self(
            $this->metadata->update(),
            $this->text,
            $this->icon,
            $color,
            $this->children,
        );
    }

    public function delete(): BlockInterface
    {
        return new self(
            $this->metadata->delete(),
            $this->text,
            $this->icon,
            $this->color,
            $this->children,
        );
    }

    /**
     * @deprecated 1.17.0 Use `delete()` instead.
     * @codeCoverageIgnore
     */
    public function archive(): BlockInterface
    {
        return $this->delete();
    }
}


================================================
FILE: src/Blocks/ChildDatabase.php
================================================
<?php

namespace Notion\Blocks;

use Notion\Exceptions\BlockException;

/**
 * @psalm-import-type BlockMetadataJson from BlockMetadata
 *
 * @psalm-type ChildDatabaseJson = array{
 *      child_database: array{ title: string },
 * }
 *
 * @psalm-immutable
 */
class ChildDatabase implements BlockInterface
{
    private function __construct(
        private readonly BlockMetadata $metadata,
        public readonly string $title
    ) {
        $metadata->checkType(BlockType::ChildDatabase);
    }

    public static function fromArray(array $array): self
    {
        /** @psalm-var BlockMetadataJson $array */
        $metadata = BlockMetadata::fromArray($array);

        /** @psalm-var ChildDatabaseJson $array */
        $databaseTitle = $array["child_database"]["title"];

        return new self($metadata, $databaseTitle);
    }

    public function toArray(): array
    {
        $array = $this->metadata->toArray();

        $array["child_database"] = [ "title" => $this->title ];

        return $array;
    }

    public function metadata(): BlockMetadata
    {
        return $this->metadata;
    }

    public function addChild(BlockInterface $child): never
    {
        throw BlockException::noChindrenSupport();
    }

    public function changeChildren(BlockInterface ...$children): never
    {
        throw BlockException::noChindrenSupport();
    }

    public function delete(): BlockInterface
    {
        return new self(
            $this->metadata->delete(),
            $this->title,
        );
    }

    /**
     * @deprecated 1.17.0 Use `delete()` instead.
     * @codeCoverageIgnore
     */
    public function archive(): BlockInterface
    {
        return $this->delete();
    }
}


================================================
FILE: src/Blocks/ChildPage.php
================================================
<?php

namespace Notion\Blocks;

use Notion\Exceptions\BlockException;

/**
 * @psalm-import-type BlockMetadataJson from BlockMetadata
 *
 * @psalm-type ChildPageJson = array{
 *      child_page: array{ title: string },
 * }
 *
 * @psalm-immutable
 */
class ChildPage implements BlockInterface
{
    private function __construct(
        private readonly BlockMetadata $metadata,
        public readonly string $title,
    ) {
        $metadata->checkType(BlockType::ChildPage);
    }

    public static function fromArray(array $array): self
    {
        /** @psalm-var BlockMetadataJson $array */
        $metadata = BlockMetadata::fromArray($array);

        /** @psalm-var ChildPageJson $array */
        $pageTitle = $array["child_page"]["title"];

        return new self($metadata, $pageTitle);
    }

    public function toArray(): array
    {
        $array = $this->metadata->toArray();

        $array["child_page"] = [ "title" => $this->title ];

        return $array;
    }

    public function metadata(): BlockMetadata
    {
        return $this->metadata;
    }

    public function addChild(BlockInterface $child): never
    {
        throw BlockException::noChindrenSupport();
    }

    public function changeChildren(BlockInterface ...$children): never
    {
        throw BlockException::noChindrenSupport();
    }

    public function delete(): BlockInterface
    {
        return new self(
            $this->metadata->delete(),
            $this->title,
        );
    }

    /**
     * @deprecated 1.17.0 Use `delete()` instead.
     * @codeCoverageIgnore
     */
    public function archive(): BlockInterface
    {
        return $this->delete();
    }
}


================================================
FILE: src/Blocks/Client.php
================================================
<?php

namespace Notion\Blocks;

use Notion\Blocks\BlockInterface;
use Notion\Configuration;
use Notion\Infrastructure\Http;

class Client
{
    /**
     * @internal Use `\Notion\Notion::blocks()` instead
     */
    public function __construct(
        private readonly Configuration $config,
    ) {
    }

    public function find(string $blockId): BlockInterface
    {
        $url = "https://api.notion.com/v1/blocks/{$blockId}";
        $request = Http::createRequest($url, $this->config);

        /** @var array{ type: string } $body */
        $body = Http::sendRequest($request, $this->config);

        return BlockFactory::fromArray($body);
    }

    /** @return BlockInterface[] */
    public function findChildren(string $blockId): array
    {
        $url = "https://api.notion.com/v1/blocks/{$blockId}/children";
        $request = Http::createRequest($url, $this->config);

        /** @var array{ results: list<array{ type: string }> } $body */
        $body = Http::sendRequest($request, $this->config);

        return array_map(
            fn(array $blockArray) => BlockFactory::fromArray($blockArray),
            $body["results"],
        );
    }

    /** @return BlockInterface[] */
    public function findChildrenRecursive(string $blockId): array
    {
        $children = $this->findChildren($blockId);
        return array_map(
            function (BlockInterface $block) {
                if ($block->metadata()->hasChildren) {
                    $blockChildren = $this->findChildrenRecursive($block->metadata()->id);
                    return $block->changeChildren(...$blockChildren);
                }

                return $block;
            },
            $children
        );
    }

    /**
     * @param BlockInterface[] $blocks
     *
     * @return BlockInterface[] Newly created blocks
     */
    public function append(string $blockId, array $blocks): array
    {
        $data = json_encode([
            "children" => array_map(fn(BlockInterface $b) => $b->toArray(), $blocks),
        ]);

        $url = "https://api.notion.com/v1/blocks/{$blockId}/children";
        $request = Http::createRequest($url, $this->config)
            ->withMethod("PATCH")
            ->withHeader("Content-Type", "application/json");
        $request->getBody()->write($data);

        /** @var array{ results: list<array{ type: string }> } $body */
        $body = Http::sendRequest($request, $this->config);

        return array_map(
            fn(array $blockArray): BlockInterface => BlockFactory::fromArray($blockArray),
            $body["results"],
        );
    }

    public function update(BlockInterface $block): BlockInterface
    {
        $blockId = $block->metadata()->id;
        $blockType = $block->metadata()->type->value;

        $data = $block->toArray();

        unset($data["type"]);
        unset($data["id"]);
        unset($data["created_time"]);
        unset($data["last_edited_time"]);
        unset($data["has_children"]);
        if (is_array($data[$blockType])) {
            unset($data[$blockType]["children"]);
        }

        $json = json_encode($data);

        $url = "https://api.notion.com/v1/blocks/{$blockId}";
        $request = Http::createRequest($url, $this->config)
            ->withMethod("PATCH")
            ->withHeader("Content-Type", "application/json");

        $request->getBody()->write($json);

        /** @var array{ type: string } $body */
        $body = Http::sendRequest($request, $this->config);

        return BlockFactory::fromArray($body);
    }

    public function delete(string $blockId): BlockInterface
    {
        $url = "https://api.notion.com/v1/blocks/{$blockId}";
        $request = Http::createRequest($url, $this->config)
            ->withMethod("DELETE");

        /** @var array{ type: string } $body */
        $body = Http::sendRequest($request, $this->config);

        return BlockFactory::fromArray($body);
    }
}


================================================
FILE: src/Blocks/Code.php
================================================
<?php

namespace Notion\Blocks;

use Notion\Exceptions\BlockException;
use Notion\Common\RichText;

/**
 * @psalm-import-type BlockMetadataJson from BlockMetadata
 * @psalm-import-type RichTextJson from \Notion\Common\RichText
 *
 * @psalm-type CodeJson = array{
 *      code: array{
 *          rich_text: RichTextJson[],
 *          caption: RichTextJson[],
 *          language: string,
 *      },
 * }
 *
 * @psalm-immutable
 */
class Code implements BlockInterface
{
    /**
     * @param RichText[] $text
     * @param RichText[] $caption
     */
    private function __construct(
        private readonly BlockMetadata $metadata,
        public readonly array $text,
        public readonly CodeLanguage $language,
        public readonly array $caption,
    ) {
        $metadata->checkType(BlockType::Code);
    }

    public static function create(): self
    {
        return self::fromText([]);
    }

    /** @param RichText[] $text */
    public static function fromText(
        array $text,
        CodeLanguage $language = CodeLanguage::PlainText,
    ): self {
        $metadata = BlockMetadata::create(BlockType::Code);

        return new self($metadata, $text, $language, []);
    }

    public static function fromString(
        string $code,
        CodeLanguage $language = CodeLanguage::PlainText,
    ): self {
        $metadata = BlockMetadata::create(BlockType::Code);
        $text = [ RichText::fromString($code) ];

        return new self($metadata, $text, $language, []);
    }

    public static function fromArray(array $array): self
    {
        /** @psalm-var BlockMetadataJson $array */
        $metadata = BlockMetadata::fromArray($array);

        /** @psalm-var CodeJson $array */
        $code = $array["code"];
        $text = array_map(fn($t) => RichText::fromArray($t), $code["rich_text"]);
        $caption = array_map(fn($t) => RichText::fromArray($t), $code["caption"]);
        $language = CodeLanguage::from($code["language"]);

        return new self($metadata, $text, $language, $caption);
    }

    public function toArray(): array
    {
        $array = $this->metadata->toArray();

        $array["code"] = [
            "rich_text" => array_map(fn(RichText $t) => $t->toArray(), $this->text),
            "caption"   => array_map(fn(RichText $t) => $t->toArray(), $this->caption),
            "language"  => $this->language->value,
        ];

        return $array;
    }

    public function toString(): string
    {
        return RichText::multipleToString(...$this->text);
    }

    public function metadata(): BlockMetadata
    {
        return $this->metadata;
    }

    public function changeText(RichText ...$text): self
    {
        return new self($this->metadata, $text, $this->language, $this->caption);
    }

    public function addText(RichText $text): self
    {
        $texts = $this->text;
        $texts[] = $text;

        return new self($this->metadata, $texts, $this->language, $this->caption);
    }

    public function changeLanguage(CodeLanguage $language): self
    {
        return new self($this->metadata, $this->text, $language, $this->caption);
    }

    public function changeCaption(RichText ...$caption): self
    {
        return new self($this->metadata, $this->text, $this->language, $caption);
    }

    public function addChild(BlockInterface $child): never
    {
        throw BlockException::noChindrenSupport();
    }

    public function changeChildren(BlockInterface ...$children): never
    {
        throw BlockException::noChindrenSupport();
    }

    public function delete(): BlockInterface
    {
        return new self(
            $this->metadata->delete(),
            $this->text,
            $this->language,
            $this->caption,
        );
    }

    /**
     * @deprecated 1.17.0 Use `delete()` instead.
     * @codeCoverageIgnore
     */
    public function archive(): BlockInterface
    {
        return $this->delete();
    }
}


================================================
FILE: src/Blocks/CodeLanguage.php
================================================
<?php

namespace Notion\Blocks;

enum CodeLanguage: string
{
    case Abap = "abap";
    case Arduino = "arduino";
    case Bash = "bash";
    case Basic = "basic";
    case C = "c";
    case Clojure = "clojure";
    case Coffeescript = "coffeescript";
    case Cpp = "c++";
    case CSharp = "c#";
    case Css = "css";
    case Dart = "dart";
    case Diff = "diff";
    case Docker = "docker";
    case Elixir = "elixir";
    case Elm = "elm";
    case Erlang = "erlang";
    case Flow = "flow";
    case Fortran = "fortran";
    case FSharp = "f#";
    case Gherkin = "gherkin";
    case Glsl = "glsl";
    case Go = "go";
    case Graphql = "graphql";
    case Groovy = "groovy";
    case Haskell = "haskell";
    case Html = "html";
    case Java = "java";
    case Javascript = "javascript";
    case Json = "json";
    case Julia = "julia";
    case Kotlin = "kotlin";
    case Latex = "latex";
    case Less = "less";
    case Lisp = "lisp";
    case Livescript = "livescript";
    case Lua = "lua";
    case Makefile = "makefile";
    case Markdown = "markdown";
    case Markup = "markup";
    case Matlab = "matlab";
    case Mermaid = "mermaid";
    case Nix = "nix";
    case ObjectiveC = "objective-c";
    case Ocaml = "ocaml";
    case Pascal = "pascal";
    case Perl = "perl";
    case Php = "php";
    case PlainText = "plain text";
    case Powershell = "powershell";
    case Prolog = "prolog";
    case Protobuf = "protobuf";
    case Python = "python";
    case R = "r";
    case Reason = "reason";
    case Ruby = "ruby";
    case Rust = "rust";
    case Sass = "sass";
    case Scala = "scala";
    case Scheme = "scheme";
    case Scss = "scss";
    case Shell = "shell";
    case Sql = "sql";
    case Swift = "swift";
    case Typescript = "typescript";
    case VbNet = "vb.net";
    case Verilog = "verilog";
    case Vhdl = "vhdl";
    case VisualBasic = "visual basic";
    case Webassembly = "webassembly";
    case Xml = "xml";
    case Yaml = "yaml";
}


================================================
FILE: src/Blocks/Column.php
================================================
<?php

namespace Notion\Blocks;

use Notion\Exceptions\ColumnException;

/**
 * @psalm-import-type BlockMetadataJson from BlockMetadata
 *
 * @psalm-type ColumnJson = array{
 *     column: array {
 *         children: list<BlockMetadataJson>
 *     },
 * }
 *
 * @psalm-immutable
 */
class Column implements BlockInterface
{
    /** @param BlockInterface[] $children */
    private function __construct(
        private readonly BlockMetadata $block,
        public readonly array $children,
    ) {
        foreach ($children as $child) {
            if ($child->metadata()->type === BlockType::Column) {
                throw ColumnException::columnInsideColumn();
            }
        }
    }

    public static function create(BlockInterface ...$children): self
    {
        $block = BlockMetadata::create(BlockType::Column);

        return new self($block, $children);
    }

    public static function fromArray(array $array): self
    {
        /** @psalm-var BlockMetadataJson $array */
        $block = BlockMetadata::fromArray($array);

        /** @psalm-var ColumnJson $array */
        $rawChildren = $array["column"]["children"] ?? [];
        $children = array_map(fn($child) => BlockFactory::fromArray($child), $rawChildren);

        return new self($block, $children);
    }

    public function addChild(BlockInterface $child): self
    {
        return new self($this->block, [...$this->children, $child]);
    }

    public function changeChildren(BlockInterface ...$children): self
    {
        return new self($this->block, $children);
    }

    public function toArray(): array
    {
        $array = $this->metadata()->toArray();

        $array["column"] = [
            "children" => array_map(fn ($child) => $child->toArray(), $this->children),
        ];

        return $array;
    }

    public function metadata(): BlockMetadata
    {
        return $this->block;
    }

    public function delete(): BlockInterface
    {
        return new self(
            $this->block->delete(),
            $this->children,
        );
    }

    /**
     * @deprecated 1.17.0 Use `delete()` instead.
     * @codeCoverageIgnore
     */
    public function archive(): BlockInterface
    {
        return $this->delete();
    }
}


================================================
FILE: src/Blocks/ColumnList.php
================================================
<?php

namespace Notion\Blocks;

use Notion\Exceptions\ColumnListException;

/**
 * @psalm-import-type BlockMetadataJson from BlockMetadata
 *
 * @psalm-type ColumnListJson = array{
 *     column_list: array{
 *         children: list<BlockMetadataJson>
 *     },
 * }
 *
 * @psalm-immutable
 */
class ColumnList implements BlockInterface
{
    /** @param Column[] $columns */
    private function __construct(
        private readonly BlockMetadata $metadata,
        public readonly array $columns,
    ) {
        $metadata->checkType(BlockType::ColumnList);
    }

    public static function create(Column ...$columns): self
    {
        $metadata = BlockMetadata::create(BlockType::ColumnList);

        return new self($metadata, $columns);
    }

    public static function fromArray(array $array): self
    {
        /** @psalm-var BlockMetadataJson $array */
        $metadata = BlockMetadata::fromArray($array);

        /** @psalm-var ColumnListJson $array */
        $rawColumns = $array["column_list"]["children"] ?? [];
        /** @var Column[] $columns */
        $columns = array_map(fn($child) => BlockFactory::fromArray($child), $rawColumns);

        return new self($metadata, $columns);
    }

    public function toArray(): array
    {
        $array = $this->metadata->toArray();

        $array["column_list"] = [
            "children" => array_map(fn (Column $c) => $c->toArray(), $this->columns),
        ];

        return $array;
    }

    public function metadata(): BlockMetadata
    {
        return $this->metadata;
    }

    public function addChild(BlockInterface $child): self
    {
        if ($child->metadata()->type !== BlockType::Column) {
            throw ColumnListException::childNotColumn();
        }

        /** @var Column $child */
        return new self($this->metadata(), [...$this->columns, $child]);
    }

    public function changeChildren(BlockInterface ...$children): self
    {
        foreach ($children as $child) {
            if ($child->metadata()->type !== BlockType::Column) {
                throw ColumnListException::childNotColumn();
            }
        }

        /** @var Column[] $children */
        return new self($this->metadata(), $children);
    }

    public function delete(): BlockInterface
    {
        return new self(
            $this->metadata->delete(),
            $this->columns,
        );
    }

    /**
     * @deprecated 1.17.0 Use `delete()` instead.
     * @codeCoverageIgnore
     */
    public function archive(): BlockInterface
    {
        return $this->delete();
    }
}


================================================
FILE: src/Blocks/Divider.php
================================================
<?php

namespace Notion\Blocks;

use Notion\Exceptions\BlockException;

/**
 * @psalm-import-type BlockMetadataJson from BlockMetadata
 *
 * @psalm-type DividerJson = array{
 *      divider: array<empty, empty>
 * }
 * @psalm-immutable
 */
class Divider implements BlockInterface
{
    private function __construct(
        private readonly BlockMetadata $metadata,
    ) {
        $metadata->checkType(BlockType::Divider);
    }

    public static function create(): self
    {
        $metadata = BlockMetadata::create(BlockType::Divider);

        return new self($metadata);
    }

    public static function fromArray(array $array): self
    {
        /** @psalm-var BlockMetadataJson $array */
        $metadata = BlockMetadata::fromArray($array);

        return new self($metadata);
    }

    public function toArray(): array
    {
        $array = $this->metadata->toArray();

        $array["divider"] = new \stdClass();

        return $array;
    }

    public function metadata(): BlockMetadata
    {
        return $this->metadata;
    }

    public function addChild(BlockInterface $child): never
    {
        throw BlockException::noChindrenSupport();
    }

    public function changeChildren(BlockInterface ...$children): never
    {
        throw BlockException::noChindrenSupport();
    }

    public function delete(): BlockInterface
    {
        return new self(
            $this->metadata->delete(),
        );
    }

    /**
     * @deprecated 1.17.0 Use `delete()` instead.
     * @codeCoverageIgnore
     */
    public function archive(): BlockInterface
    {
        return $this->delete();
    }
}


================================================
FILE: src/Blocks/Embed.php
================================================
<?php

namespace Notion\Blocks;

use Notion\Exceptions\BlockException;

/**
 * @psalm-import-type BlockMetadataJson from BlockMetadata
 *
 * @psalm-type EmbedJson = array{
 *      embed: array{ url: string },
 * }
 *
 * @psalm-immutable
 */
class Embed implements BlockInterface
{
    private function __construct(
        private readonly BlockMetadata $metadata,
        public readonly string $url,
    ) {
        $metadata->checkType(BlockType::Embed);
    }

    public static function fromUrl(string $url = ""): self
    {
        $metadata = BlockMetadata::create(BlockType::Embed);

        return new self($metadata, $url);
    }

    public static function fromArray(array $array): self
    {
        /** @psalm-var BlockMetadataJson $array */
        $metadata = BlockMetadata::fromArray($array);

        /** @psalm-var EmbedJson $array */
        $url = $array["embed"]["url"];

        return new self($metadata, $url);
    }

    public function toArray(): array
    {
        $array = $this->metadata->toArray();

        $array["embed"] = [ "url" => $this->url ];

        return $array;
    }

    public function metadata(): BlockMetadata
    {
        return $this->metadata;
    }

    public function changeUrl(string $url): self
    {
        return new self($this->metadata, $url);
    }

    public function addChild(BlockInterface $child): never
    {
        throw BlockException::noChindrenSupport();
    }

    public function changeChildren(BlockInterface ...$children): never
    {
        throw BlockException::noChindrenSupport();
    }

    public function delete(): BlockInterface
    {
        return new self(
            $this->metadata->delete(),
            $this->url,
        );
    }

    /**
     * @deprecated 1.17.0 Use `delete()` instead.
     * @codeCoverageIgnore
     */
    public function archive(): BlockInterface
    {
        return $this->delete();
    }
}


================================================
FILE: src/Blocks/EquationBlock.php
================================================
<?php

namespace Notion\Blocks;

use Notion\Exceptions\BlockException;
use Notion\Common\Equation;

/**
 * @psalm-import-type BlockMetadataJson from BlockMetadata
 * @psalm-import-type EquationJson from \Notion\Common\Equation
 *
 * @psalm-type EquationBlockMetadataJson = array{
 *      equation: EquationJson,
 * }
 *
 * @psalm-immutable
 */
class EquationBlock implements BlockInterface
{
    private function __construct(
        private readonly BlockMetadata $metadata,
        public readonly Equation $equation
    ) {
        $metadata->checkType(BlockType::Equation);
    }

    public static function fromString(string $expression = ""): self
    {
        $block = BlockMetadata::create(BlockType::Equation);
        $equation = Equation::fromString($expression);

        return new self($block, $equation);
    }

    public static function fromArray(array $array): self
    {
        /** @psalm-var BlockMetadataJson $array */
        $block = BlockMetadata::fromArray($array);

        /** @psalm-var EquationBlockMetadataJson $array */
        $equation = Equation::fromArray($array["equation"]);

        return new self($block, $equation);
    }

    public function toArray(): array
    {
        $array = $this->metadata->toArray();

        $array["equation"] = $this->equation->toArray();

        return $array;
    }

    public function metadata(): BlockMetadata
    {
        return $this->metadata;
    }

    public function changeEquation(Equation $equation): self
    {
        return new self($this->metadata, $equation);
    }

    public function addChild(BlockInterface $child): never
    {
        throw BlockException::noChindrenSupport();
    }

    public function changeChildren(BlockInterface ...$children): never
    {
        throw BlockException::noChindrenSupport();
    }

    public function delete(): BlockInterface
    {
        return new self(
            $this->metadata->delete(),
            $this->equation,
        );
    }

    /**
     * @deprecated 1.17.0 Use `delete()` instead.
     * @codeCoverageIgnore
     */
    public function archive(): BlockInterface
    {
        return $this->delete();
    }
}


================================================
FILE: src/Blocks/FileBlock.php
================================================
<?php

namespace Notion\Blocks;

use Notion\Exceptions\BlockException;
use Notion\Common\File;

/**
 * @psalm-import-type BlockMetadataJson from BlockMetadata
 * @psalm-import-type FileJson from \Notion\Common\File
 *
 * @psalm-type FileBlockMetadataJson = array{ file: FileJson }
 *
 * @psalm-immutable
 */
class FileBlock implements BlockInterface
{
    private function __construct(
        private readonly BlockMetadata $metadata,
        private readonly File $file,
    ) {
        $metadata->checkType(BlockType::File);
    }

    public static function fromFile(File $file): self
    {
        $metadata = BlockMetadata::create(BlockType::File);

        return new self($metadata, $file);
    }

    public static function fromArray(array $array): self
    {
        /** @psalm-var BlockMetadataJson $array */
        $metadata = BlockMetadata::fromArray($array);

        /** @psalm-var FileBlockMetadataJson $array */
        $file = File::fromArray($array["file"]);

        return new self($metadata, $file);
    }

    public function toArray(): array
    {
        $array = $this->metadata->toArray();

        $array["file"] = $this->file->toArray();

        return $array;
    }

    public function metadata(): BlockMetadata
    {
        return $this->metadata;
    }

    public function file(): File
    {
        return $this->file;
    }

    public function changeFile(File $file): self
    {
        return new self($this->metadata, $file);
    }

    public function addChild(BlockInterface $child): never
    {
        throw BlockException::noChindrenSupport();
    }

    public function changeChildren(BlockInterface ...$children): never
    {
        throw BlockException::noChindrenSupport();
    }

    public function delete(): BlockInterface
    {
        return new self(
            $this->metadata->delete(),
            $this->file,
        );
    }

    /**
     * @deprecated 1.17.0 Use `delete()` instead.
     * @codeCoverageIgnore
     */
    public function archive(): BlockInterface
    {
        return $this->delete();
    }
}


================================================
FILE: src/Blocks/Heading1.php
================================================
<?php

namespace Notion\Blocks;

use Notion\Common\Color;
use Notion\Exceptions\BlockException;
use Notion\Common\RichText;
use Notion\Exceptions\HeadingException;

/**
 * @psalm-import-type BlockMetadataJson from BlockMetadata
 * @psalm-import-type RichTextJson from \Notion\Common\RichText
 *
 * @psalm-type Heading1Json = array{
 *      heading_1: array{
 *          rich_text: RichTextJson[],
 *          is_toggleable: bool,
 *          color?: string,
 *          children?: BlockMetadataJson[]
 *      },
 * }
 *
 * @psalm-immutable
 */
class Heading1 implements BlockInterface
{
    /**
     * @param RichText[] $text
     * @param BlockInterface[]|null $children
     */
    private function __construct(
        private readonly BlockMetadata $metadata,
        public readonly array $text,
        public readonly bool $isToggleable,
        public readonly Color $color,
        public readonly array|null $children,
    ) {
        $metadata->checkType(BlockType::Heading1);
    }

    public static function fromText(RichText ...$text): self
    {
        $block = BlockMetadata::create(BlockType::Heading1);

        return new self($block, $text, false, Color::Default, []);
    }

    public static function fromString(string $content): self
    {
        $block = BlockMetadata::create(BlockType::Heading1);
        $text = [ RichText::fromString($content) ];

        return new self($block, $text, false, Color::Default, []);
    }

    public static function fromArray(array $array): self
    {
        /** @psalm-var BlockMetadataJson $array */
        $block = BlockMetadata::fromArray($array);

        /** @psalm-var Heading1Json $array */
        $heading = $array["heading_1"];

        $text = array_map(fn($t) => RichText::fromArray($t), $heading["rich_text"]);

        $isToggleable = $heading["is_toggleable"];

        $color = Color::tryFrom($heading["color"] ?? "") ?? Color::Default;

        $children = null;
        if ($isToggleable) {
            $children = array_map(fn($b) => BlockFactory::fromArray($b), $heading["children"] ?? []);
        }

        return new self($block, $text, $isToggleable, $color, $children);
    }

    public function toArray(): array
    {
        $array = $this->metadata->toArray();

        $array["heading_1"] = [
            "rich_text" => array_map(fn(RichText $t) => $t->toArray(), $this->text),
            "is_toggleable" => $this->isToggleable,
            "color" => $this->color->value,
            "children" => array_map(fn($b) => $b->toArray(), $this->children ?? [])
        ];

        return $array;
    }

    public function toString(): string
    {
        $string = "";
        foreach ($this->text as $richText) {
            $string = $string . $richText->plainText;
        }

        return $string;
    }

    public function metadata(): BlockMetadata
    {
        return $this->metadata;
    }

    public function changeText(RichText ...$text): self
    {
        return new self($this->metadata, $text, $this->isToggleable, $this->color, $this->children);
    }

    public function addText(RichText $text): self
    {
        $texts = $this->text;
        $texts[] = $text;

        return new self($this->metadata, $texts, $this->isToggleable, $this->color, $this->children);
    }

    public function toggllify(): self
    {
        return new self($this->metadata, $this->text, true, $this->color, []);
    }

    public function untogglify(): self
    {
        if (!empty($this->children)) {
            throw HeadingException::untogglifyWithChildren();
        }

        return new self($this->metadata, $this->text, false, $this->color, null);
    }

    public function changeColor(Color $color): self
    {
        return new self(
            $this->metadata->update(),
            $this->text,
            $this->isToggleable,
            $color,
            $this->children,
        );
    }

    public function addChild(BlockInterface $child): self
    {
        if (!$this->isToggleable) {
            throw BlockException::noChindrenSupport();
        }

        $children = $this->children ? [...$this->children, $child] : [$child];
        return new self(
            $this->metadata,
            $this->text,
            $this->isToggleable,
            $this->color,
            $children,
        );
    }

    public function changeChildren(BlockInterface ...$children): self
    {
        if (!$this->isToggleable) {
            throw BlockException::noChindrenSupport();
        }

        return new self($this->metadata, $this->text, $this->isToggleable, $this->color, $children);
    }

    public function delete(): BlockInterface
    {
        return new self(
            $this->metadata->delete(),
            $this->text,
            $this->isToggleable,
            $this->color,
            $this->children,
        );
    }

    /**
     * @deprecated 1.17.0 Use `delete()` instead.
     * @codeCoverageIgnore
     */
    public function archive(): BlockInterface
    {
        return $this->delete();
    }
}


================================================
FILE: src/Blocks/Heading2.php
================================================
<?php

namespace Notion\Blocks;

use Notion\Common\Color;
use Notion\Exceptions\BlockException;
use Notion\Common\RichText;
use Notion\Exceptions\HeadingException;

/**
 * @psalm-import-type BlockMetadataJson from BlockMetadata
 * @psalm-import-type RichTextJson from \Notion\Common\RichText
 *
 * @psalm-type Heading2Json = array{
 *      heading_2: array{
 *          rich_text: RichTextJson[],
 *          is_toggleable: bool,
 *          color?: string,
 *          children?: BlockMetadataJson[]
 *      },
 * }
 *
 * @psalm-immutable
 */
class Heading2 implements BlockInterface
{
    /**
     * @param RichText[] $text
     * @param BlockInterface[]|null $children
     */
    private function __construct(
        private readonly BlockMetadata $metadata,
        public readonly array $text,
        public readonly bool $isToggleable,
        public readonly Color $color,
        public readonly array|null $children,
    ) {
        $metadata->checkType(BlockType::Heading2);
    }

    public static function fromText(RichText ...$text): self
    {
        $block = BlockMetadata::create(BlockType::Heading2);

        return new self($block, $text, false, Color::Default, []);
    }

    public static function fromString(string $content): self
    {
        $block = BlockMetadata::create(BlockType::Heading2);
        $text = [ RichText::fromString($content) ];

        return new self($block, $text, false, Color::Default, []);
    }

    public static function fromArray(array $array): self
    {
        /** @psalm-var BlockMetadataJson $array */
        $block = BlockMetadata::fromArray($array);

        /** @psalm-var Heading2Json $array */
        $heading = $array["heading_2"];

        $text = array_map(fn($t) => RichText::fromArray($t), $heading["rich_text"]);

        $isToggleable = $heading["is_toggleable"];

        $color = Color::tryFrom($heading["color"] ?? "") ?? Color::Default;

        $children = null;
        if ($isToggleable) {
            $children = array_map(fn($b) => BlockFactory::fromArray($b), $heading["children"] ?? []);
        }

        return new self($block, $text, $isToggleable, $color, $children);
    }

    public function toArray(): array
    {
        $array = $this->metadata->toArray();

        $array["heading_2"] = [
            "rich_text" => array_map(fn(RichText $t) => $t->toArray(), $this->text),
            "is_toggleable" => $this->isToggleable,
            "color" => $this->color->value,
            "children" => array_map(fn($b) => $b->toArray(), $this->children ?? [])
        ];

        return $array;
    }

    public function toString(): string
    {
        $string = "";
        foreach ($this->text as $richText) {
            $string = $string . $richText->plainText;
        }

        return $string;
    }

    public function metadata(): BlockMetadata
    {
        return $this->metadata;
    }

    public function changeText(RichText ...$text): self
    {
        return new self($this->metadata, $text, $this->isToggleable, $this->color, $this->children);
    }

    public function addText(RichText $text): self
    {
        $texts = $this->text;
        $texts[] = $text;

        return new self($this->metadata, $texts, $this->isToggleable, $this->color, $this->children);
    }

    public function toggllify(): self
    {
        return new self($this->metadata, $this->text, true, $this->color, []);
    }

    public function untogglify(): self
    {
        if (!empty($this->children)) {
            throw HeadingException::untogglifyWithChildren();
        }

        return new self($this->metadata, $this->text, false, $this->color, null);
    }

    public function changeColor(Color $color): self
    {
        return new self(
            $this->metadata->update(),
            $this->text,
            $this->isToggleable,
            $color,
            $this->children,
        );
    }

    public function addChild(BlockInterface $child): self
    {
        if (!$this->isToggleable) {
            throw BlockException::noChindrenSupport();
        }

        $children = $this->children ? [...$this->children, $child] : [$child];
        return new self(
            $this->metadata,
            $this->text,
            $this->isToggleable,
            $this->color,
            $children,
        );
    }

    public function changeChildren(BlockInterface ...$children): self
    {
        if (!$this->isToggleable) {
            throw BlockException::noChindrenSupport();
        }

        return new self($this->metadata, $this->text, $this->isToggleable, $this->color, $children);
    }

    public function delete(): BlockInterface
    {
        return new self(
            $this->metadata->delete(),
            $this->text,
            $this->isToggleable,
            $this->color,
            $this->children,
        );
    }

    /**
     * @deprecated 1.17.0 Use `delete()` instead.
     * @codeCoverageIgnore
     */
    public function archive(): BlockInterface
    {
        return $this->delete();
    }
}


================================================
FILE: src/Blocks/Heading3.php
================================================
<?php

namespace Notion\Blocks;

use Notion\Common\Color;
use Notion\Exceptions\BlockException;
use Notion\Common\RichText;
use Notion\Exceptions\HeadingException;

/**
 * @psalm-import-type BlockMetadataJson from BlockMetadata
 * @psalm-import-type RichTextJson from \Notion\Common\RichText
 *
 * @psalm-type Heading3Json = array{
 *      heading_3: array{
 *          rich_text: RichTextJson[],
 *          is_toggleable: bool,
 *          color?: string,
 *          children?: BlockMetadataJson[]
 *      },
 * }
 *
 * @psalm-immutable
 */
class Heading3 implements BlockInterface
{
    /**
     * @param RichText[] $text
     * @param BlockInterface[]|null $children
     */
    private function __construct(
        private readonly BlockMetadata $metadata,
        public readonly array $text,
        public readonly bool $isToggleable,
        public readonly Color $color,
        public readonly array|null $children,
    ) {
        $metadata->checkType(BlockType::Heading3);
    }

    public static function fromText(RichText ...$text): self
    {
        $block = BlockMetadata::create(BlockType::Heading3);

        return new self($block, $text, false, Color::Default, []);
    }

    public static function fromString(string $content): self
    {
        $block = BlockMetadata::create(BlockType::Heading3);
        $text = [ RichText::fromString($content) ];

        return new self($block, $text, false, Color::Default, []);
    }

    public static function fromArray(array $array): self
    {
        /** @psalm-var BlockMetadataJson $array */
        $block = BlockMetadata::fromArray($array);

        /** @psalm-var Heading3Json $array */
        $heading = $array["heading_3"];

        $text = array_map(fn($t) => RichText::fromArray($t), $heading["rich_text"]);

        $isToggleable = $heading["is_toggleable"];

        $color = Color::tryFrom($heading["color"] ?? "") ?? Color::Default;

        $children = null;
        if ($isToggleable) {
            $children = array_map(fn($b) => BlockFactory::fromArray($b), $heading["children"] ?? []);
        }

        return new self($block, $text, $isToggleable, $color, $children);
    }

    public function toArray(): array
    {
        $array = $this->metadata->toArray();

        $array["heading_3"] = [
            "rich_text" => array_map(fn(RichText $t) => $t->toArray(), $this->text),
            "is_toggleable" => $this->isToggleable,
            "color" => $this->color->value,
            "children" => array_map(fn($b) => $b->toArray(), $this->children ?? [])
        ];

        return $array;
    }

    public function toString(): string
    {
        $string = "";
        foreach ($this->text as $richText) {
            $string = $string . $richText->plainText;
        }

        return $string;
    }

    public function metadata(): BlockMetadata
    {
        return $this->metadata;
    }

    public function changeText(RichText ...$text): self
    {
        return new self($this->metadata, $text, $this->isToggleable, $this->color, $this->children);
    }

    public function addText(RichText $text): self
    {
        $texts = $this->text;
        $texts[] = $text;

        return new self($this->metadata, $texts, $this->isToggleable, $this->color, $this->children);
    }

    public function toggllify(): self
    {
        return new self($this->metadata, $this->text, true, $this->color, []);
    }

    public function untogglify(): self
    {
        if (!empty($this->children)) {
            throw HeadingException::untogglifyWithChildren();
        }

        return new self($this->metadata, $this->text, false, $this->color, null);
    }

    public function changeColor(Color $color): self
    {
        return new self(
            $this->metadata->update(),
            $this->text,
            $this->isToggleable,
            $color,
            $this->children,
        );
    }

    public function addChild(BlockInterface $child): self
    {
        if (!$this->isToggleable) {
            throw BlockException::noChindrenSupport();
        }

        $children = $this->children ? [...$this->children, $child] : [$child];
        return new self(
            $this->metadata,
            $this->text,
            $this->isToggleable,
            $this->color,
            $children,
        );
    }

    public function changeChildren(BlockInterface ...$children): self
    {
        if (!$this->isToggleable) {
            throw BlockException::noChindrenSupport();
        }

        return new self($this->metadata, $this->text, $this->isToggleable, $this->color, $children);
    }

    public function delete(): BlockInterface
    {
        return new self(
            $this->metadata->delete(),
            $this->text,
            $this->isToggleable,
            $this->color,
            $this->children,
        );
    }

    /**
     * @deprecated 1.17.0 Use `delete()` instead.
     * @codeCoverageIgnore
     */
    public function archive(): BlockInterface
    {
        return $this->delete();
    }
}


================================================
FILE: src/Blocks/Image.php
================================================
<?php

namespace Notion\Blocks;

use Notion\Exceptions\BlockException;
use Notion\Common\File;
use Notion\Common\RichText;

/**
 * @psalm-import-type BlockMetadataJson from BlockMetadata
 * @psalm-import-type FileJson from \Notion\Common\File
 *
 * @psalm-type ImageJson = array{ image: FileJson }
 *
 * @psalm-immutable
 */
class Image implements BlockInterface
{
    private function __construct(
        private readonly BlockMetadata $metadata,
        public readonly File $file,
    ) {
        $metadata->checkType(BlockType::Image);
    }

    public static function fromFile(File $file): self
    {
        $block = BlockMetadata::create(BlockType::Image);

        return new self($block, $file);
    }

    public static function fromArray(array $array): self
    {
        /** @psalm-var BlockMetadataJson $array */
        $block = BlockMetadata::fromArray($array);

        /** @psalm-var ImageJson $array */
        $file = File::fromArray($array["image"]);

        return new self($block, $file);
    }

    public function toArray(): array
    {
        $array = $this->metadata->toArray();

        $array["image"] = $this->file->toArray();

        return $array;
    }

    public function metadata(): BlockMetadata
    {
        return $this->metadata;
    }

    public function changeFile(File $file): self
    {
        return new self($this->metadata, $file);
    }

    public function changeCaption(RichText ...$caption): self
    {
        return new self($this->metadata, $this->file->changeCaption(...$caption));
    }

    public function addChild(BlockInterface $child): never
    {
        throw BlockException::noChindrenSupport();
    }

    public function changeChildren(BlockInterface ...$children): never
    {
        throw BlockException::noChindrenSupport();
    }

    public function delete(): BlockInterface
    {
        return new self(
            $this->metadata->delete(),
            $this->file,
        );
    }

    /**
     * @deprecated 1.17.0 Use `delete()` instead.
     * @codeCoverageIgnore
     */
    public function archive(): BlockInterface
    {
        return $this->delete();
    }
}


================================================
FILE: src/Blocks/LinkPreview.php
================================================
<?php

namespace Notion\Blocks;

use Notion\Exceptions\BlockException;

/**
 * Link Preview block.
 *
 * This block cannot be created, only retrieved by the API.
 *
 * @psalm-import-type BlockMetadataJson from BlockMetadata
 *
 * @psalm-type LinkPreviewJson = array{
 *      link_preview: array{ url: string },
 * }
 *
 * @psalm-immutable
 */
class LinkPreview implements BlockInterface
{
    private function __construct(
        private readonly BlockMetadata $metadata,
        public readonly string $url
    ) {
        $metadata->checkType(BlockType::LinkPreview);
    }

    public static function fromArray(array $array): self
    {
        /** @psalm-var BlockMetadataJson $array */
        $block = BlockMetadata::fromArray($array);

        /** @psalm-var LinkPreviewJson $array */
        $url = $array["link_preview"]["url"];

        return new self($block, $url);
    }

    public function toArray(): array
    {
        $array = $this->metadata->toArray();

        $array["link_preview"] = [ "url" => $this->url ];

        return $array;
    }

    public function metadata(): BlockMetadata
    {
        return $this->metadata;
    }

    public function addChild(BlockInterface $child): never
    {
        throw BlockException::noChindrenSupport();
    }

    public function changeChildren(BlockInterface ...$children): never
    {
        throw BlockException::noChindrenSupport();
    }

    public function delete(): BlockInterface
    {
        return new self(
            $this->metadata->delete(),
            $this->url,
        );
    }

    /**
     * @deprecated 1.17.0 Use `delete()` instead.
     * @codeCoverageIgnore
     */
    public function archive(): BlockInterface
    {
        return $this->delete();
    }
}


================================================
FILE: src/Blocks/NumberedListItem.php
================================================
<?php

namespace Notion\Blocks;

use Notion\Common\Color;
use Notion\Common\RichText;

/**
 * @psalm-import-type BlockMetadataJson from BlockMetadata
 * @psalm-import-type RichTextJson from \Notion\Common\RichText
 *
 * @psalm-type NumberedListItemJson = array{
 *      numbered_list_item: array{
 *          rich_text: list<RichTextJson>,
 *          color?: string,
 *          children?: list<BlockMetadataJson>,
 *      },
 * }
 *
 * @psalm-immutable
 */
class NumberedListItem implements BlockInterface
{
    /**
     * @param RichText[] $text
     * @param \Notion\Blocks\BlockInterface[] $children
     */
    private function __construct(
        private readonly BlockMetadata $metadata,
        public readonly array $text,
        public readonly Color $color,
        public readonly array $children,
    ) {
        $metadata->checkType(BlockType::NumberedListItem);
    }

    public static function create(): self
    {
        $block = BlockMetadata::create(BlockType::NumberedListItem);

        return new self($block, [], Color::Default, []);
    }

    public static function fromString(string $content): self
    {
        $block = BlockMetadata::create(BlockType::NumberedListItem);
        $text = [ RichText::fromString($content) ];

        return new self($block, $text, Color::Default, []);
    }

    public static function fromArray(array $array): self
    {
        /** @psalm-var BlockMetadataJson $array */
        $block = BlockMetadata::fromArray($array);

        /** @psalm-var NumberedListItemJson $array */
        $item = $array["numbered_list_item"];

        $text = array_map(fn($t) => RichText::fromArray($t), $item["rich_text"]);

        $color = Color::tryFrom($item["color"] ?? "") ?? Color::Default;

        $children = array_map(fn($b) => BlockFactory::fromArray($b), $item["children"] ?? []);

        return new self($block, $text, $color, $children);
    }

    public function toArray(): array
    {
        $array = $this->metadata->toArray();

        $array["numbered_list_item"] = [
            "rich_text" => array_map(fn(RichText $t) => $t->toArray(), $this->text),
            "color"     => $this->color->value,
            "children"  => array_map(fn(BlockInterface $b) => $b->toArray(), $this->children),
        ];

        return $array;
    }

    public function toString(): string
    {
        return RichText::multipleToString(...$this->text);
    }

    public function metadata(): BlockMetadata
    {
        return $this->metadata;
    }

    public function changeText(RichText ...$text): self
    {
        return new self($this->metadata->update(), $text, $this->color, $this->children);
    }

    public function addText(RichText $text): self
    {
        $texts = $this->text;
        $texts[] = $text;

        return new self($this->metadata->update(), $texts, $this->color, $this->children);
    }

    public function addChild(BlockInterface $child): self
    {
        $children = $this->children;
        $children[] = $child;

        return new self(
            $this->metadata->updateHasChildren(true),
            $this->text,
            $this->color,
            $children,
        );
    }

    public function changeChildren(BlockInterface ...$children): self
    {
        $hasChildren = (count($children) > 0);

        return new self(
            $this->metadata->updateHasChildren($hasChildren),
            $this->text,
            $this->color,
            $children,
        );
    }

    public function changeColor(Color $color): self
    {
        return new self(
            $this->metadata->update(),
            $this->text,
            $color,
            $this->children,
        );
    }

    public function delete(): BlockInterface
    {
        return new self(
            $this->metadata->delete(),
            $this->text,
            $this->color,
            $this->children,
        );
    }

    /**
     * @deprecated 1.17.0 Use `delete()` instead.
     * @codeCoverageIgnore
     */
    public function archive(): BlockInterface
    {
        return $this->delete();
    }
}


================================================
FILE: src/Blocks/Paragraph.php
================================================
<?php

namespace Notion\Blocks;

use Notion\Common\Color;
use Notion\Common\RichText;

/**
 * @psalm-import-type BlockMetadataJson from BlockMetadata
 * @psalm-import-type RichTextJson from \Notion\Common\RichText
 *
 * @psalm-type ParagraphJson = array{
 *      paragraph: array{
 *          rich_text: list<RichTextJson>,
 *          children?: list<BlockMetadataJson>,
 *          color?: string,
 *      },
 * }
 *
 * @psalm-immutable
 */
class Paragraph implements BlockInterface
{
    /**
     * @param RichText[] $text
     * @param BlockInterface[] $children
     */
    private function __construct(
        private readonly BlockMetadata $metadata,
        public readonly array $text,
        public readonly array $children,
        public readonly Color $color,
    ) {
        $metadata->checkType(BlockType::Paragraph);
    }

    public static function create(): self
    {
        $block = BlockMetadata::create(BlockType::Paragraph);

        return new self($block, [], [], Color::Default);
    }

    public static function fromString(string $content): self
    {
        $block = BlockMetadata::create(BlockType::Paragraph);
        $text = [ RichText::fromString($content) ];

        return new self($block, $text, [], Color::Default);
    }

    public static function fromArray(array $array): self
    {
        /** @psalm-var BlockMetadataJson $array */
        $block = BlockMetadata::fromArray($array);

        /** @psalm-var ParagraphJson $array */
        $paragraph = $array["paragraph"];

        $text = array_map(fn($t) => RichText::fromArray($t), $paragraph["rich_text"]);

        $children = array_map(fn($b) => BlockFactory::fromArray($b), $paragraph["children"] ?? []);

        $color = Color::tryFrom($paragraph["color"] ?? "") ?? Color::Default;

        return new self($block, $text, $children, $color);
    }

    public function toArray(): array
    {
        $array = $this->metadata->toArray();

        $array["paragraph"] = [
            "rich_text" => array_map(fn(RichText $t) => $t->toArray(), $this->text),
            "children"  => array_map(fn(BlockInterface $b) => $b->toArray(), $this->children),
            "color"     => $this->color->value,
        ];

        return $array;
    }

    public function toString(): string
    {
        $string = "";
        foreach ($this->text as $richText) {
            $string = $string . $richText->plainText;
        }

        return $string;
    }

    public function metadata(): BlockMetadata
    {
        return $this->metadata;
    }

    /** @param RichText[] $text */
    public function changeText(array $text): self
    {
        return new self($this->metadata, $text, $this->children, $this->color);
    }

    public function addText(RichText $text): self
    {
        $texts = $this->text;
        $texts[] = $text;

        return new self($this->metadata, $texts, $this->children, $this->color);
    }

    public function changeChildren(BlockInterface ...$children): self
    {
        $hasChildren = (count($children) > 0);

        return new self(
            $this->metadata->updateHasChildren($hasChildren),
            $this->text,
            $children,
            $this->color,
        );
    }

    public function addChild(BlockInterface $child): self
    {
        $children = $this->children;
        $children[] = $child;

        return new self(
            $this->metadata->updateHasChildren(true),
            $this->text,
            $children,
            $this->color,
        );
    }

    public function changeColor(Color $color): self
    {
        return new self(
            $this->metadata->update(),
            $this->text,
            $this->children,
            $color,
        );
    }

    public function delete(): BlockInterface
    {
        return new self(
            $this->metadata->delete(),
            $this->text,
            $this->children,
            $this->color,
        );
    }

    /**
     * @deprecated 1.17.0 Use `delete()` instead.
     * @codeCoverageIgnore
     */
    public function archive(): BlockInterface
    {
        return $this->delete();
    }
}


================================================
FILE: src/Blocks/Pdf.php
================================================
<?php

namespace Notion\Blocks;

use Notion\Exceptions\BlockException;
use Notion\Common\File;

/**
 * @psalm-import-type BlockMetadataJson from BlockMetadata
 * @psalm-import-type FileJson from \Notion\Common\File
 *
 * @psalm-type PdfJson = array{ pdf: FileJson }
 *
 * @psalm-immutable
 */
class Pdf implements BlockInterface
{
    private function __construct(
        private readonly BlockMetadata $metadata,
        public readonly File $file
    ) {
        $metadata->checkType(BlockType::Pdf);
    }

    public static function fromFile(File $file): self
    {
        $block = BlockMetadata::create(BlockType::Pdf);

        return new self($block, $file);
    }

    public static function fromArray(array $array): self
    {
        /** @psalm-var BlockMetadataJson $array */
        $block = BlockMetadata::fromArray($array);

        /** @psalm-var PdfJson $array */
        $file = File::fromArray($array["pdf"]);

        return new self($block, $file);
    }

    public function toArray(): array
    {
        $array = $this->metadata->toArray();

        $array["pdf"] = $this->file->toArray();

        return $array;
    }

    public function metadata(): BlockMetadata
    {
        return $this->metadata;
    }

    public function changeFile(File $file): self
    {
        return new self($this->metadata, $file);
    }

    public function addChild(BlockInterface $child): never
    {
        throw BlockException::noChindrenSupport();
    }

    public function changeChildren(BlockInterface ...$children): never
    {
        throw BlockException::noChindrenSupport();
    }

    public function delete(): BlockInterface
    {
        return new self(
            $this->metadata->delete(),
            $this->file,
        );
    }

    /**
     * @deprecated 1.17.0 Use `delete()` instead.
     * @codeCoverageIgnore
     */
    public function archive(): BlockInterface
    {
        return $this->delete();
    }
}


================================================
FILE: src/Blocks/Quote.php
================================================
<?php

namespace Notion\Blocks;

use Notion\Common\Color;
use Notion\Exceptions\BlockException;
use Notion\Common\RichText;

/**
 * @psalm-import-type BlockMetadataJson from BlockMetadata
 * @psalm-import-type RichTextJson from \Notion\Common\RichText
 *
 * @psalm-type QuoteJson = array{
 *      quote: array{
 *          rich_text: list<RichTextJson>,
 *          color?: string,
 *          children: list<BlockMetadataJson>,
 *      },
 * }
 *
 * @psalm-immutable
 */
class Quote implements BlockInterface
{
    /**
     * @param RichText[] $text
     * @param BlockInterface[] $children
     */
    private function __construct(
        private readonly BlockMetadata $metadata,
        public readonly array $text,
        public readonly Color $color,
        public readonly array $children,
    ) {
        $metadata->checkType(BlockType::Quote);
    }

    public static function create(): self
    {
        $block = BlockMetadata::create(BlockType::Quote);

        return new self($block, [], Color::Default, []);
    }

    public static function fromString(string $content): self
    {
        $block = BlockMetadata::create(BlockType::Quote);
        $text = [ RichText::fromString($content) ];

        return new self($block, $text, Color::Default, []);
    }

    public static function fromArray(array $array): self
    {
        /** @psalm-var BlockMetadataJson $array */
        $block = BlockMetadata::fromArray($array);

        /** @psalm-var QuoteJson $array */
        $quote = $array["quote"];

        $text = array_map(fn($t) => RichText::fromArray($t), $quote["rich_text"]);

        $color = Color::tryFrom($quote["color"] ?? "") ?? Color::Default;

        $children = array_map(fn($b) => BlockFactory::fromArray($b), $quote["children"] ?? []);

        return new self($block, $text, $color, $children);
    }

    public function toArray(): array
    {
        $array = $this->metadata->toArray();

        $array["quote"] = [
            "rich_text"     => array_map(fn(RichText $t) => $t->toArray(), $this->text),
            "color"    => $this->color->value,
            "children" => array_map(fn(BlockInterface $b) => $b->toArray(), $this->children),
        ];

        return $array;
    }

    public function toString(): string
    {
        $string = "";
        foreach ($this->text as $richText) {
            $string = $string . $richText->plainText;
        }

        return $string;
    }

    public function metadata(): BlockMetadata
    {
        return $this->metadata;
    }

    /** @param RichText[] $text */
    public function changeText(array $text): self
    {
        return new self($this->metadata, $text, $this->color, $this->children);
    }

    public function addText(RichText $text): self
    {
        $texts = $this->text;
        $texts[] = $text;

        return new self($this->metadata, $texts, $this->color, $this->children);
    }

    public function changeChildren(BlockInterface ...$children): self
    {
        $hasChildren = (count($children) > 0);

        return new self(
            $this->metadata->updateHasChildren($hasChildren),
            $this->text,
            $this->color,
            $children,
        );
    }

    public function addChild(BlockInterface $child): self
    {
        $children = $this->children;
        $children[] = $child;

        return new self(
            $this->metadata->updateHasChildren(true),
            $this->text,
            $this->color,
            $children,
        );
    }

    public function changeColor(Color $color): self
    {
        return new self(
            $this->metadata->update(),
            $this->text,
            $color,
            $this->children,
        );
    }

    public function delete(): BlockInterface
    {
        return new self(
            $this->metadata->delete(),
            $this->text,
            $this->color,
            $this->children,
        );
    }

    /**
     * @deprecated 1.17.0 Use `delete()` instead.
     * @codeCoverageIgnore
     */
    public function archive(): BlockInterface
    {
        return $this->delete();
    }
}


================================================
FILE: src/Blocks/Renderer/BlockRendererInterface.php
================================================
<?php

namespace Notion\Blocks\Renderer;

use Notion\Blocks\BlockInterface;

interface BlockRendererInterface
{
    public static function render(BlockInterface $block, int $depth = 0): string;
}


================================================
FILE: src/Blocks/Renderer/Markdown/BookmarkRenderer.php
================================================
<?php

namespace Notion\Blocks\Renderer\Markdown;

use Notion\Blocks\BlockInterface;
use Notion\Blocks\Bookmark;
use Notion\Blocks\Renderer\BlockRendererInterface;
use Notion\Blocks\Renderer\MarkdownRenderer;

final class BookmarkRenderer implements BlockRendererInterface
{
    public static function render(BlockInterface $block, int $depth = 0): string
    {
        if (!$block instanceof Bookmark) {
            return "";
        }

        $url = $block->url;
        return MarkdownRenderer::ident("<{$url}>", $depth);
    }
}


================================================
FILE: src/Blocks/Renderer/Markdown/BreadcrumbRenderer.php
================================================
<?php

namespace Notion\Blocks\Renderer\Markdown;

use Notion\Blocks\BlockInterface;
use Notion\Blocks\Breadcrumb;
use Notion\Blocks\Renderer\BlockRendererInterface;
use Notion\Blocks\Renderer\MarkdownRenderer;

final class BreadcrumbRenderer implements BlockRendererInterface
{
    public static function render(BlockInterface $block, int $depth = 0): string
    {
        if (!$block instanceof Breadcrumb) {
            return "";
        }

        return MarkdownRenderer::ident("[Breadcrumb]", $depth);
    }
}


================================================
FILE: src/Blocks/Renderer/Markdown/BulletedListItemRenderer.php
================================================
<?php

namespace Notion\Blocks\Renderer\Markdown;

use Notion\Blocks\BlockInterface;
use Notion\Blocks\BulletedListItem;
use Notion\Blocks\Renderer\BlockRendererInterface;
use Notion\Blocks\Renderer\MarkdownRenderer;

final class BulletedListItemRenderer implements BlockRendererInterface
{
    public static function render(BlockInterface $block, int $depth = 0): string
    {
        if (!$block instanceof BulletedListItem) {
            return "";
        }

        $main = RichTextRenderer::render(...$block->text);
        $markdown = MarkdownRenderer::ident("- {$main}", $depth);

        foreach ($block->children as $child) {
            $markdown .= "\n" . MarkdownRenderer::renderBlock($child, $depth + 1);
        }

        return $markdown;
    }
}


================================================
FILE: src/Blocks/Renderer/Markdown/CalloutRenderer.php
================================================
<?php

namespace Notion\Blocks\Renderer\Markdown;

use Notion\Blocks\BlockInterface;
use Notion\Blocks\Callout;
use Notion\Blocks\Renderer\BlockRendererInterface;
use Notion\Blocks\Renderer\MarkdownRenderer;

final class CalloutRenderer implements BlockRendererInterface
{
    public static function render(BlockInterface $block, int $depth = 0): string
    {
        if (!$block instanceof Callout) {
            return "";
        }

        $emoji = $block->icon->isEmoji() ? $block->icon->emoji->toString() . " " : "";
        $text = RichTextRenderer::render(...$block->text);

        $markdown = MarkdownRenderer::ident("> {$emoji}{$text}", $depth);

        foreach ($block->children as $child) {
            $markdown .= "\n>\n> " . MarkdownRenderer::renderBlock($child, $depth);
        }

        return $markdown;
    }
}


================================================
FILE: src/Blocks/Renderer/Markdown/ChildDatabaseRenderer.php
================================================
<?php

namespace Notion\Blocks\Renderer\Markdown;

use Notion\Blocks\BlockInterface;
use Notion\Blocks\ChildDatabase;
use Notion\Blocks\Renderer\BlockRendererInterface;
use Notion\Blocks\Renderer\MarkdownRenderer;

final class ChildDatabaseRenderer implements BlockRendererInterface
{
    public static function render(BlockInterface $block, int $depth = 0): string
    {
        if (!$block instanceof ChildDatabase) {
            return "";
        }

        return MarkdownRenderer::ident($block->title, $depth);
    }
}


================================================
FILE: src/Blocks/Renderer/Markdown/ChildPageRenderer.php
================================================
<?php

namespace Notion\Blocks\Renderer\Markdown;

use Notion\Blocks\BlockInterface;
use Notion\Blocks\ChildPage;
use Notion\Blocks\Renderer\BlockRendererInterface;
use Notion\Blocks\Renderer\MarkdownRenderer;

final class ChildPageRenderer implements BlockRendererInterface
{
    public static function render(BlockInterface $block, int $depth = 0): string
    {
        if (!$block instanceof ChildPage) {
            return "";
        }

        return MarkdownRenderer::ident($block->title, $depth);
    }
}


================================================
FILE: src/Blocks/Renderer/Markdown/CodeRenderer.php
================================================
<?php

namespace Notion\Blocks\Renderer\Markdown;

use Notion\Blocks\BlockInterface;
use Notion\Blocks\Code;
use Notion\Blocks\Renderer\BlockRendererInterface;
use Notion\Blocks\Renderer\MarkdownRenderer;

final class CodeRenderer implements BlockRendererInterface
{
    public static function render(BlockInterface $block, int $depth = 0): string
    {
        if (!$block instanceof Code) {
            return "";
        }

        $language = $block->language->value;
        $code = RichTextRenderer::render(...$block->text);
        $markdown = "```{$language}\n{$code}\n```";

        return MarkdownRenderer::ident($markdown, $depth);
    }
}


================================================
FILE: src/Blocks/Renderer/Markdown/ColumnListRenderer.php
================================================
<?php

namespace Notion\Blocks\Renderer\Markdown;

use Notion\Blocks\BlockInterface;
use Notion\Blocks\ColumnList;
use Notion\Blocks\Renderer\BlockRendererInterface;
use Notion\Blocks\Renderer\MarkdownRenderer;

final class ColumnListRenderer implements BlockRendererInterface
{
    public static function render(BlockInterface $block, int $depth = 0): string
    {
        if (!$block instanceof ColumnList) {
            return "";
        }

        $markdown = "";
        $isFirst = true;
        foreach ($block->columns as $child) {
            $newLine = $isFirst ? "" : "\n\n";
            $markdown .= $newLine . MarkdownRenderer::renderBlock($child, $depth);
            $isFirst = false;
        }

        return $markdown;
    }
}


================================================
FILE: src/Blocks/Renderer/Markdown/ColumnRenderer.php
================================================
<?php

namespace Notion\Blocks\Renderer\Markdown;

use Notion\Blocks\BlockInterface;
use Notion\Blocks\Column;
use Notion\Blocks\Renderer\BlockRendererInterface;
use Notion\Blocks\Renderer\MarkdownRenderer;

final class ColumnRenderer implements BlockRendererInterface
{
    public static function render(BlockInterface $block, int $depth = 0): string
    {
        if (!$block instanceof Column) {
            return "";
        }

        $markdown = "";
        $isFirst = true;
        foreach ($block->children as $child) {
            $newLine = $isFirst ? "" : "\n\n";
            $markdown .= $newLine . MarkdownRenderer::renderBlock($child, $depth);
            $isFirst = false;
        }

        return $markdown;
    }
}


================================================
FILE: src/Blocks/Renderer/Markdown/DividerRenderer.php
================================================
<?php

namespace Notion\Blocks\Renderer\Markdown;

use Notion\Blocks\BlockInterface;
use Notion\Blocks\Divider;
use Notion\Blocks\Renderer\BlockRendererInterface;
use Notion\Blocks\Renderer\MarkdownRenderer;

final class DividerRenderer implements BlockRendererInterface
{
    public static function render(BlockInterface $block, int $depth = 0): string
    {
        if (!$block instanceof Divider) {
            return "";
        }

        return MarkdownRenderer::ident("---", $depth);
    }
}


================================================
FILE: src/Blocks/Renderer/Markdown/EmbedRenderer.php
================================================
<?php

namespace Notion\Blocks\Renderer\Markdown;

use Notion\Blocks\BlockInterface;
use Notion\Blocks\Embed;
use Notion\Blocks\Renderer\BlockRendererInterface;
use Notion\Blocks\Renderer\MarkdownRenderer;

final class EmbedRenderer implements BlockRendererInterface
{
    public static function render(BlockInterface $block, int $depth = 0): string
    {
        if (!$block instanceof Embed) {
            return "";
        }

        return MarkdownRenderer::ident($block->url, $depth);
    }
}


================================================
FILE: src/Blocks/Renderer/Markdown/EquationRenderer.php
================================================
<?php

namespace Notion\Blocks\Renderer\Markdown;

use Notion\Blocks\BlockInterface;
use Notion\Blocks\EquationBlock;
use Notion\Blocks\Renderer\BlockRendererInterface;
use Notion\Blocks\Renderer\MarkdownRenderer;

final class EquationRenderer implements BlockRendererInterface
{
    public static function render(BlockInterface $block, int $depth = 0): string
    {
        if (!$block instanceof EquationBlock) {
            return "";
        }

        $equation = $block->equation->expression;
        return MarkdownRenderer::ident("$$ {$equation} $$", $depth);
    }
}


================================================
FILE: src/Blocks/Renderer/Markdown/FileRenderer.php
================================================
<?php

namespace Notion\Blocks\Renderer\Markdown;

use Notion\Blocks\BlockInterface;
use Notion\Blocks\FileBlock;
use Notion\Blocks\Renderer\BlockRendererInterface;
use Notion\Blocks\Renderer\MarkdownRenderer;

final class FileRenderer implements BlockRendererInterface
{
    public static function render(BlockInterface $block, int $depth = 0): string
    {
        if (!$block instanceof FileBlock) {
            return "";
        }

        if ($block->file()->url === null) {
            return "";
        }

        return MarkdownRenderer::ident($block->file()->url, $depth);
    }
}


================================================
FILE: src/Blocks/Renderer/Markdown/Heading1Renderer.php
================================================
<?php

namespace Notion\Blocks\Renderer\Markdown;

use Notion\Blocks\BlockInterface;
use Notion\Blocks\Heading1;
use Notion\Blocks\Renderer\BlockRendererInterface;
use Notion\Blocks\Renderer\MarkdownRenderer;

final class Heading1Renderer implements BlockRendererInterface
{
    public static function render(BlockInterface $block, int $depth = 0): string
    {
        if (!$block instanceof Heading1) {
            return "";
        }

        $main = RichTextRenderer::render(...$block->text);
        return MarkdownRenderer::ident("# {$main}", $depth);
    }
}


================================================
FILE: src/Blocks/Renderer/Markdown/Heading2Renderer.php
================================================
<?php

namespace Notion\Blocks\Renderer\Markdown;

use Notion\Blocks\BlockInterface;
use Notion\Blocks\Heading2;
use Notion\Blocks\Renderer\BlockRendererInterface;
use Notion\Blocks\Renderer\MarkdownRenderer;

final class Heading2Renderer implements BlockRendererInterface
{
    public static function render(BlockInterface $block, int $depth = 0): string
    {
        if (!$block instanceof Heading2) {
            return "";
        }

        $main = RichTextRenderer::render(...$block->text);
        return MarkdownRenderer::ident("## {$main}", $depth);
    }
}


================================================
FILE: src/Blocks/Renderer/Markdown/Heading3Renderer.php
================================================
<?php

namespace Notion\Blocks\Renderer\Markdown;

use Notion\Blocks\BlockInterface;
use Notion\Blocks\Heading3;
use Notion\Blocks\Renderer\BlockRendererInterface;
use Notion\Blocks\Renderer\MarkdownRenderer;

final class Heading3Renderer implements BlockRendererInterface
{
    public static function render(BlockInterface $block, int $depth = 0): string
    {
        if (!$block instanceof Heading3) {
            return "";
        }

        $main = RichTextRenderer::render(...$block->text);
        return MarkdownRenderer::ident("### {$main}", $depth);
    }
}


================================================
FILE: src/Blocks/Renderer/Markdown/ImageRenderer.php
================================================
<?php

namespace Notion\Blocks\Renderer\Markdown;

use Notion\Blocks\BlockInterface;
use Notion\Blocks\Image;
use Notion\Blocks\Renderer\BlockRendererInterface;
use Notion\Blocks\Renderer\MarkdownRenderer;

final class ImageRenderer implements BlockRendererInterface
{
    public static function render(BlockInterface $block, int $depth = 0): string
    {
        if (!$block instanceof Image) {
            return "";
        }

        $url = $block->file->url;
        return MarkdownRenderer::ident("![]({$url})", $depth);
    }
}


================================================
FILE: src/Blocks/Renderer/Markdown/LinkPreviewRenderer.php
================================================
<?php

namespace Notion\Blocks\Renderer\Markdown;

use Notion\Blocks\BlockInterface;
use Notion\Blocks\LinkPreview;
use Notion\Blocks\Renderer\BlockRendererInterface;
use Notion\Blocks\Renderer\MarkdownRenderer;

final class LinkPreviewRenderer implements BlockRendererInterface
{
    public static function render(BlockInterface $block, int $depth = 0): string
    {
        if (!$block instanceof LinkPreview) {
            return "";
        }

        return MarkdownRenderer::ident($block->url, $depth);
    }
}


================================================
FILE: src/Blocks/Renderer/Markdown/NumberedListItemRenderer.php
================================================
<?php

namespace Notion\Blocks\Renderer\Markdown;

use Notion\Blocks\BlockInterface;
use Notion\Blocks\NumberedListItem;
use Notion\Blocks\Renderer\BlockRendererInterface;
use Notion\Blocks\Renderer\MarkdownRenderer;

final class NumberedListItemRenderer implements BlockRendererInterface
{
    public static function render(BlockInterface $block, int $depth = 0): string
    {
        if (!$block instanceof NumberedListItem) {
            return "";
        }

        $main = RichTextRenderer::render(...$block->text);
        $markdown = MarkdownRenderer::ident("1. {$main}", $depth);

        foreach ($block->children as $child) {
            $markdown .= "\n" . MarkdownRenderer::renderBlock($child, $depth + 1);
        }

        return $markdown;
    }
}


================================================
FILE: src/Blocks/Renderer/Markdown/ParagraphRenderer.php
================================================
<?php

namespace Notion\Blocks\Renderer\Markdown;

use Notion\Blocks\BlockInterface;
use Notion\Blocks\Paragraph;
use Notion\Blocks\Renderer\BlockRendererInterface;
use Notion\Blocks\Renderer\MarkdownRenderer;

final class ParagraphRenderer implements BlockRendererInterface
{
    public static function render(BlockInterface $block, int $depth = 0): string
    {
        if (!$block instanceof Paragraph) {
            return "";
        }

        $text = RichTextRenderer::render(...$block->text);
        $markdown = MarkdownRenderer::ident($text . "\n", $depth);

        foreach ($block->children as $child) {
            $markdown .= "\n\n" . MarkdownRenderer::renderBlock($child, $depth + 1);
        }

        return $markdown;
    }
}


================================================
FILE: src/Blocks/Renderer/Markdown/PdfRenderer.php
================================================
<?php

namespace Notion\Blocks\Renderer\Markdown;

use Notion\Blocks\BlockInterface;
use Notion\Blocks\Pdf;
use Notion\Blocks\Renderer\BlockRendererInterface;
use Notion\Blocks\Renderer\MarkdownRenderer;

final class PdfRenderer implements BlockRendererInterface
{
    public static function render(BlockInterface $block, int $depth = 0): string
    {
        if (!$block instanceof Pdf) {
            return "";
        }

        if ($block->file->url === null) {
            return "";
        }

        return MarkdownRenderer::ident($block->file->url, $depth);
    }
}


================================================
FILE: src/Blocks/Renderer/Markdown/QuoteRenderer.php
================================================
<?php

namespace Notion\Blocks\Renderer\Markdown;

use Notion\Blocks\BlockInterface;
use Notion\Blocks\Quote;
use Notion\Blocks\Renderer\BlockRendererInterface;
use Notion\Blocks\Renderer\MarkdownRenderer;

final class QuoteRenderer implements BlockRendererInterface
{
    public static function render(BlockInterface $block, int $depth = 0): string
    {
        if (!$block instanceof Quote) {
            return "";
        }

        $text = RichTextRenderer::render(...$block->text);

        $markdown = MarkdownRenderer::ident("> {$text}", $depth);

        foreach ($block->children as $child) {
            $markdown .= "\n>\n> " . MarkdownRenderer::renderBlock($child, $depth);
        }

        return $markdown;
    }
}


================================================
FILE: src/Blocks/Renderer/Markdown/RichTextRenderer.php
================================================
<?php

namespace Notion\Blocks\Renderer\Markdown;

use Notion\Common\RichText;

final class RichTextRenderer
{
    public static function render(RichText ...$text): string
    {
        $result = "";
        foreach ($text as $t) {
            $markdown = $t->plainText;

            if ($t->isEquation()) {
                $markdown = "\${$markdown}\$";
            }
            if ($t->annotations->isCode) {
                $markdown = "`{$markdown}`";
            }
            if ($t->annotations->isBold) {
                $markdown = self::around($markdown, "**");
            }
            if ($t->annotations->isItalic) {
                $markdown = self::around($markdown, "*");
            }
            if ($t->annotations->isStrikeThrough) {
                $markdown = self::around($markdown, "~~");
            }
            if ($t->annotations->isUnderline) {
                $markdown = "<u>{$markdown}</u>";
            }

            if ($t->href !== null) {
                $markdown = "[{$markdown}]({$t->href})";
            }

            $result = "{$result}{$markdown}";
        }

        return $result;
    }

    private static function around(string $text, string $around): string
    {
        preg_match("/^(\s*)/", $text, $leftSpace);
        preg_match("/(\s*)$/", $text, $righSpace);

        $text = trim($text);

        return "{$leftSpace[0]}{$around}{$text}{$around}{$righSpace[0]}";
    }
}


================================================
FILE: src/Blocks/Renderer/Markdown/TableOfContentsRenderer.php
================================================
<?php

namespace Notion\Blocks\Renderer\Markdown;

use Notion\Blocks\BlockInterface;
use Notion\Blocks\TableOfContents;
use Notion\Blocks\Renderer\BlockRendererInterface;
use Notion\Blocks\Renderer\MarkdownRenderer;

final class TableOfContentsRenderer implements BlockRendererInterface
{
    public static function render(BlockInterface $block, int $depth = 0): string
    {
        if (!$block instanceof TableOfContents) {
            return "";
        }

        return MarkdownRenderer::ident("[TableOfContents]", $depth);
    }
}


================================================
FILE: src/Blocks/Renderer/Markdown/ToDoRenderer.php
================================================
<?php

namespace Notion\Blocks\Renderer\Markdown;

use Notion\Blocks\BlockInterface;
use Notion\Blocks\ToDo;
use Notion\Blocks\Renderer\BlockRendererInterface;
use Notion\Blocks\Renderer\MarkdownRenderer;

final class ToDoRenderer implements BlockRendererInterface
{
    public static function render(BlockInterface $block, int $depth = 0): string
    {
        if (!$block instanceof ToDo) {
            return "";
        }

        $text = RichTextRenderer::render(...$block->text);
        $check = $block->checked ? "x" : " ";
        $markdown = MarkdownRenderer::ident("- [{$check}] {$text}", $depth);

        foreach ($block->children as $child) {
            $markdown .= "\n" . MarkdownRenderer::renderBlock($child, $depth + 1);
        }

        return $markdown;
    }
}


================================================
FILE: src/Blocks/Renderer/Markdown/ToggleRenderer.php
================================================
<?php

namespace Notion\Blocks\Renderer\Markdown;

use Notion\Blocks\BlockInterface;
use Notion\Blocks\Toggle;
use Notion\Blocks\Renderer\BlockRendererInterface;
use Notion\Blocks\Renderer\MarkdownRenderer;
use Notion\Common\RichText;

final class ToggleRenderer implements BlockRendererInterface
{
    public static function render(BlockInterface $block, int $depth = 0): string
    {
        if (!$block instanceof Toggle) {
            return "";
        }

        $text = RichText::multipleToString(...$block->text);

        $markdown = MarkdownRenderer::ident("<details>", $depth);

        $markdown .= MarkdownRenderer::ident("\n<summary>{$text}</summary>", $depth);
        foreach ($block->children as $child) {
            $markdown .= "\n\n" . MarkdownRenderer::renderBlock($child, $depth);
        }

        $markdown .= MarkdownRenderer::ident("</details>", $depth);

        return $markdown;
    }
}


================================================
FILE: src/Blocks/Renderer/Markdown/VideoRenderer.php
================================================
<?php

namespace Notion\Blocks\Renderer\Markdown;

use Notion\Blocks\BlockInterface;
use Notion\Blocks\Video;
use Notion\Blocks\Renderer\BlockRendererInterface;
use Notion\Blocks\Renderer\MarkdownRenderer;

final class VideoRenderer implements BlockRendererInterface
{
    public static function render(BlockInterface $block, int $depth = 0): string
    {
        if (!$block instanceof Video) {
            return "";
        }

        $url = $block->file->url;
        return MarkdownRenderer::ident("![]({$url})", $depth);
    }
}


================================================
FILE: src/Blocks/Renderer/MarkdownRenderer.php
================================================
<?php

namespace Notion\Blocks\Renderer;

use Notion\Blocks\BlockInterface;
use Notion\Blocks\BlockType;
use Notion\Blocks\Renderer\Markdown;

class MarkdownRenderer implements RendererInterface
{
    public static function render(BlockInterface ...$blocks): string
    {
        $markdown = "";
        foreach ($blocks as $block) {
            $markdown = $markdown . self::renderBlock($block, 0) . "\n";
        }

        return $markdown;
    }

    /**
     * Render blocks with custom renderers.
     *
     * @param array<value-of<BlockType>, BlockRendererInterface> $overrides
     * @param BlockInterface ...$blocks
     *
     * @return string
     */
    public static function renderWithOverrides(
        array $overrides,
        BlockInterface ...$blocks,
    ): string {
        $markdown = "";
        foreach ($blocks as $block) {
            $markdown = $markdown . self::renderBlock($block, 0, $overrides) . "\n";
        }

        return $markdown;
    }

    /**
     * Undocumented function
     *
     * @param BlockInterface $block
     * @param int $depth
     * @param array<value-of<BlockType>, BlockRendererInterface> $overrides
     *
     * @return string
     */
    public static function renderBlock(
        BlockInterface $block,
        int $depth = 0,
        array $overrides = []
    ): string {
        if (array_key_exists($block->metadata()->type->value, $overrides)) {
            $renderer = $overrides[$block->metadata()->type->value];
            return $renderer::render($block, $depth);
        }

        return match ($block->metadata()->type) {
            BlockType::Bookmark         => Markdown\BookmarkRenderer::render($block, $depth),
            BlockType::Breadcrumb       => Markdown\BreadcrumbRenderer::render($block, $depth),
            BlockType::BulletedListItem => Markdown\BulletedListItemRenderer::render($block, $depth),
            BlockType::Callout          => Markdown\CalloutRenderer::render($block, $depth),
            BlockType::ChildDatabase    => Markdown\ChildDatabaseRenderer::render($block, $depth),
            BlockType::ChildPage        => Markdown\ChildPageRenderer::render($block, $depth),
            BlockType::Code             => Markdown\CodeRenderer::render($block, $depth),
            BlockType::Column           => Markdown\ColumnRenderer::render($block, $depth),
            BlockType::ColumnList       => Markdown\ColumnListRenderer::render($block, $depth),
            BlockType::Divider          => Markdown\DividerRenderer::render($block, $depth),
            BlockType::Embed            => Markdown\EmbedRenderer::render($block, $depth),
            BlockType::Equation         => Markdown\EquationRenderer::render($block, $depth),
            BlockType::File             => Markdown\FileRenderer::render($block, $depth),
            BlockType::Heading1         => Markdown\Heading1Renderer::render($block, $depth),
            BlockType::Heading2         => Markdown\Heading2Renderer::render($block, $depth),
            BlockType::Heading3         => Markdown\Heading3Renderer::render($block, $depth),
            BlockType::Image            => Markdown\ImageRenderer::render($block, $depth),
            BlockType::LinkPreview      => Markdown\LinkPreviewRenderer::render($block, $depth),
            BlockType::NumberedListItem => Markdown\NumberedListItemRenderer::render($block, $depth),
            BlockType::Paragraph        => Markdown\ParagraphRenderer::render($block, $depth),
            BlockType::Pdf              => Markdown\PdfRenderer::render($block, $depth),
            BlockType::Quote            => Markdown\QuoteRenderer::render($block, $depth),
            BlockType::TableOfContents  => Markdown\TableOfContentsRenderer::render($block, $depth),
            BlockType::ToDo             => Markdown\ToDoRenderer::render($block, $depth),
            BlockType::Toggle           => Markdown\ToggleRenderer::render($block, $depth),
            BlockType::Video            => Markdown\VideoRenderer::render($block, $depth),
            default                     => "",
        };
    }

    public static function ident(string $text, int $depth): string
    {
        $lines = array_map(
            function (string $line) use ($depth): string {
                if (strlen($line) == 0) {
                    return $line;
                }

                $padding = str_repeat(" ", $depth * 2);
                return $padding . $line;
            },
            explode("\n", $text),
        );

        return implode("\n", $lines);
    }
}


================================================
FILE: src/Blocks/Renderer/RendererInterface.php
================================================
<?php

namespace Notion\Blocks\Renderer;

use Notion\Blocks\BlockInterface;

interface RendererInterface
{
    public static function render(BlockInterface ...$blocks): string;

    public static function renderBlock(BlockInterface $block, int $depth = 0): string;
}


================================================
FILE: src/Blocks/Table.php
================================================
<?php

namespace Notion\Blocks;

use Notion\Exceptions\BlockException;

/**
 * @psalm-import-type BlockMetadataJson from BlockMetadata
 * @psalm-import-type RichTextJson from \Notion\Common\RichText
 *
 * @psalm-type TableJson = array{
 *      table: array{
 *          table_width: int,
 *          has_column_header: bool,
 *          has_row_header: bool,
 *          children: list<BlockMetadataJson>,
 *      },
 * }
 *
 * @psalm-immutable
 */
class Table implements BlockInterface
{
    /** @param TableRow[] $rows */
    private function __construct(
        private readonly BlockMetadata $metadata,
        public readonly int $tableWidth,
        public readonly bool $hasColumnHeader,
        public readonly bool $hasRowHeader,
        public readonly array $rows,
    ) {
        $metadata->checkType(BlockType::Table);
    }

    public static function create(): self
    {
        $block = BlockMetadata::create(BlockType::Table);

        return new self($block, 1, false, false, []);
    }

    public static function fromArray(array $array): self
    {
        /** @psalm-var BlockMetadataJson $array */
        $block = BlockMetadata::fromArray($array);

        /** @psalm-var TableJson $array */
        $table = $array["table"];

        $tableWidth = $table["table_width"];
        $hasColumnHeader = $table["has_column_header"];
        $hasRowHeader = $table["has_row_header"];
        $rows = array_map(fn(array $row) => TableRow::fromArray($row), $table["children"]);

        return new self($block, $tableWidth, $hasColumnHeader, $hasRowHeader, $rows);
    }

    public function toArray(): array
    {
        $array = $this->metadata->toArray();

        $array["table"] = [
            "table_width"       => $this->tableWidth,
            "has_column_header" => $this->hasColumnHeader,
            "has_row_header"    => $this->hasRowHeader,
            "children"          => array_map(fn(TableRow $row) => $row->toArray(), $this->rows),
        ];

        return $array;
    }

    public function metadata(): BlockMetadata
    {
        return $this->metadata;
    }

    public function changeWidth(int $tableWidth): self
    {
        return new self(
            $this->metadata->update(),
            $tableWidth,
            $this->hasColumnHeader,
            $this->hasRowHeader,
            $this->rows,
        );
    }

    public function enableColumnHeader(): self
    {
        return new self(
            $this->metadata->update(),
            $this->tableWidth,
            true,
            $this->hasRowHeader,
            $this->rows,
        );
    }

    public function disableColumnHeader(): self
    {
        return new self(
            $this->metadata->update(),
            $this->tableWidth,
            false,
            $this->hasRowHeader,
            $this->rows,
        );
    }

    public function enableRowHeader(): self
    {
        return new self(
            $this->metadata->update(),
            $this->tableWidth,
            $this->hasColumnHeader,
            true,
            $this->rows,
        );
    }

    public function disableRowHeader(): self
    {
        return new self(
            $this->metadata->update(),
            $this->tableWidth,
            $this->hasColumnHeader,
            false,
            $this->rows,
        );
    }

    public function changeRows(TableRow ...$rows): self
    {
        $hasChildren = (count($rows) > 0);

        return new self(
            $this->metadata->updateHasChildren($hasChildren),
            $this->tableWidth,
            $this->hasColumnHeader,
            $this->hasRowHeader,
            $rows,
        );
    }

    public function addRow(TableRow $row): self
    {
        $rows = $this->rows;
        $rows[] = $row;

        return new self(
            $this->metadata->updateHasChildren(true),
            $this->tableWidth,
            $this->hasColumnHeader,
            $this->hasRowHeader,
            $rows,
        );
    }

    public function changeChildren(BlockInterface ...$children): self
    {
        foreach ($children as $child) {
            if ($child::class !== TableRow::class) {
                throw BlockException::wrongType(BlockType::TableRow);
            }
        }

        /** @psalm-var TableRow[] $children */
        return $this->changeRows(...$children);
    }

    public function addChild(BlockInterface $child): self
    {
        if ($child::class !== TableRow::class) {
            throw BlockException::wrongType(BlockType::TableRow);
        }

        /** @psalm-var TableRow $child */
        return $this->addRow($child);
    }

    public function delete(): BlockInterface
    {
        return new self(
            $this->metadata->delete(),
            $this->tableWidth,
            $this->hasColumnHeader,
            $this->hasRowHeader,
            $this->rows,
        );
    }

    /**
     * @deprecated 1.17.0 Use `delete()` instead.
     * @codeCoverageIgnore
     */
    public function archive(): BlockInterface
    {
        return $this->delete();
    }
}


================================================
FILE: src/Blocks/TableOfContents.php
================================================
<?php

namespace Notion\Blocks;

use Notion\Common\Color;
use Notion\Exceptions\BlockException;

/**
 * @psalm-import-type BlockMetadataJson from BlockMetadata
 *
 * @psalm-type TableOfContentsJson = array{
 *      table_of_contents: array{
 *          color?: string
 *      }
 * }
 *
 * @psalm-immutable
 */
class TableOfContents implements BlockInterface
{
    private function __construct(
        private readonly BlockMetadata $metadata,
        public readonly Color $color,
    ) {
        $metadata->checkType(BlockType::TableOfContents);
    }

    public static function create(): self
    {
        $block = BlockMetadata::create(BlockType::TableOfContents);

        return new self($block, Color::Default);
    }

    public static function fromArray(array $array): self
    {
        /** @psalm-var BlockMetadataJson $array */
        $block = BlockMetadata::fromArray($array);

        /** @psalm-var TableOfContentsJson $array */
        $toc = $array["table_of_contents"];

        $color = Color::tryFrom($toc["color"] ?? "") ?? Color::Default;

        return new self($block, $color);
    }

    public function toArray(): array
    {
        $array = $this->metadata->toArray();

        $array["table_of_contents"] = new \stdClass();

        return $array;
    }

    public function metadata(): BlockMetadata
    {
        return $this->metadata;
    }

    public function addChild(BlockInterface $child): never
    {
        throw BlockException::noChindrenSupport();
    }

    public function changeChildren(BlockInterface ...$children): never
    {
        throw BlockException::noChindrenSupport();
    }

    public function changeColor(Color $color): self
    {
        return new self(
            $this->metadata->update(),
            $color,
        );
    }

    public function delete(): BlockInterface
    {
        return new self(
            $this->metadata->delete(),
            $this->color,
        );
    }

    /**
     * @deprecated 1.17.0 Use `delete()` instead.
     * @codeCoverageIgnore
     */
    public function archive(): BlockInterface
    {
        return $this->delete();
    }
}


================================================
FILE: src/Blocks/TableRow.php
================================================
<?php

namespace Notion\Blocks;

use Notion\Common\RichText;
use Notion\Exceptions\BlockException;

/**
 * @psalm-import-type BlockMetadataJson from BlockMetadata
 * @psalm-import-type RichTextJson from \Notion\Common\RichText
 *
 * @psalm-type TableRowJson = array{
 *      table_row: array{
 *          cells: list<list<RichTextJson>>
 *      },
 * }
 *
 * @psalm-immutable
 */
class TableRow implements BlockInterface
{
    /** @param RichText[][] $cells */
    private function __construct(
        private readonly BlockMetadata $metadata,
        public readonly array $cells,
    ) {
        $metadata->checkType(BlockType::TableRow);
    }

    public static function create(): self
    {
        $block = BlockMetadata::create(BlockType::TableRow);

        return new self($block, []);
    }

    public static function fromArray(array $array): self
    {
        /** @psalm-var BlockMetadataJson $array */
        $metadata = BlockMetadata::fromArray($array);

        /** @psalm-var TableRowJson $array */
        $cells = array_map(
            fn(array $cell) => array_map(fn(array $text) => RichText::fromArray($text), $cell),
            $array["table_row"]["cells"],
        );

        return new self($metadata, $cells);
    }

    public function toArray(): array
    {
        $array = $this->metadata->toArray();

        $array["table_row"] = [
            "cells" => array_map(
                fn(array $c) => array_map(fn(RichText $t) => $t->toArray(), $c),
                $this->cells
            ),
        ];

        return $array;
    }

    public function addCell(RichText ...$cell): self
    {
        $cells = $this->cells;
        $cells[] = $cell;

        return new self($this->metadata, $cells);
    }

    public function metadata(): BlockMetadata
    {
        return $this->metadata;
    }

    public function changeChildren(BlockInterface ...$children): self
    {
        throw BlockException::noChindrenSupport();
    }

    public function addChild(BlockInterface $child): self
    {
        throw BlockException::noChindrenSupport();
    }

    public function delete(): BlockInterface
    {
        return new self(
            $this->metadata->delete(),
            $this->cells,
        );
    }

    /**
     * @deprecated 1.17.0 Use `delete()` instead.
     * @codeCoverageIgnore
     */
    public function archive(): BlockInterface
    {
        return $this->delete();
    }
}


================================================
FILE: src/Blocks/ToDo.php
================================================
<?php

namespace Notion\Blocks;

use Notion\Common\Color;
use Notion\Exceptions\BlockException;
use Notion\Common\RichText;

/**
 * @psalm-import-type BlockMetadataJson from BlockMetadata
 * @psalm-import-type RichTextJson from \Notion\Common\RichText
 *
 * @psalm-type ToDoJson = array{
 *      to_do: array{
 *          checked: bool,
 *          rich_text: list<RichTextJson>,
 *          color?: string,
 *          children?: list<BlockMetadataJson>,
 *      },
 * }
 *
 * @psalm-immutable
 */
class ToDo implements BlockInterface
{
    /**
     * @param RichText[] $text
     * @param BlockInterface[] $children
     */
    private function __construct(
        private readonly BlockMetadata $metadata,
        public readonly array $text,
        public readonly bool $checked,
        public readonly Color $color,
        public readonly array $children,
    ) {
        $metadata->checkType(BlockType::ToDo);
    }

    public static function create(): self
    {
        $block = BlockMetadata::create(BlockType::ToDo);

        return new self($block, [], false, Color::Default, []);
    }

    public static function fromString(string $content): self
    {
        $block = BlockMetadata::create(BlockType::ToDo);
        $text = [ RichText::fromString($content) ];

        return new self($block, $text, false, Color::Default, []);
    }

    public sta
Download .txt
gitextract_t8zjv04h/

├── .gitattributes
├── .github/
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   └── feature_request.md
│   ├── dependabot.yml
│   └── workflows/
│       ├── coding-standards.yml
│       ├── deploy.yml
│       ├── psalm.yml
│       ├── sponsors.yml
│       └── tests.yml
├── .gitignore
├── CHANGELOG.md
├── LICENSE
├── README.md
├── SECURITY.md
├── composer.json
├── docs/
│   ├── .vitepress/
│   │   ├── config.ts
│   │   └── theme/
│   │       ├── custom.css
│   │       └── index.js
│   ├── advanced/
│   │   └── configuration.md
│   ├── blocks/
│   │   ├── Bookmark.md
│   │   ├── Breadcrumb.md
│   │   ├── BulletedListItem.md
│   │   ├── Callout.md
│   │   ├── ChildDatabase.md
│   │   ├── ChildPage.md
│   │   ├── Code.md
│   │   ├── Column.md
│   │   ├── ColumnList.md
│   │   ├── Divider.md
│   │   ├── Embed.md
│   │   ├── EquationBlock.md
│   │   ├── FileBlock.md
│   │   ├── Heading.md
│   │   ├── Image.md
│   │   ├── LinkPreview.md
│   │   ├── NumberedListItem.md
│   │   ├── Paragraph.md
│   │   ├── Pdf.md
│   │   ├── Quote.md
│   │   └── index.md
│   ├── comments/
│   │   └── index.md
│   ├── getting-started.md
│   ├── how-to/
│   │   ├── add-content-to-page.md
│   │   ├── add-row-to-database.md
│   │   ├── create-a-page.md
│   │   ├── delete-a-page.md
│   │   ├── find-a-page.md
│   │   ├── list-database-pages.md
│   │   ├── query-database.md
│   │   └── update-a-page.md
│   ├── index.md
│   ├── package.json
│   ├── page-properties/
│   │   ├── People.md
│   │   └── index.md
│   ├── public/
│   │   └── favicons/
│   │       └── site.webmanifest
│   └── search/
│       └── index.md
├── infection.json
├── phpcs.xml
├── phpunit.xml
├── psalm.xml
├── src/
│   ├── Blocks/
│   │   ├── BlockFactory.php
│   │   ├── BlockInterface.php
│   │   ├── BlockMetadata.php
│   │   ├── BlockType.php
│   │   ├── Bookmark.php
│   │   ├── Breadcrumb.php
│   │   ├── BulletedListItem.php
│   │   ├── Callout.php
│   │   ├── ChildDatabase.php
│   │   ├── ChildPage.php
│   │   ├── Client.php
│   │   ├── Code.php
│   │   ├── CodeLanguage.php
│   │   ├── Column.php
│   │   ├── ColumnList.php
│   │   ├── Divider.php
│   │   ├── Embed.php
│   │   ├── EquationBlock.php
│   │   ├── FileBlock.php
│   │   ├── Heading1.php
│   │   ├── Heading2.php
│   │   ├── Heading3.php
│   │   ├── Image.php
│   │   ├── LinkPreview.php
│   │   ├── NumberedListItem.php
│   │   ├── Paragraph.php
│   │   ├── Pdf.php
│   │   ├── Quote.php
│   │   ├── Renderer/
│   │   │   ├── BlockRendererInterface.php
│   │   │   ├── Markdown/
│   │   │   │   ├── BookmarkRenderer.php
│   │   │   │   ├── BreadcrumbRenderer.php
│   │   │   │   ├── BulletedListItemRenderer.php
│   │   │   │   ├── CalloutRenderer.php
│   │   │   │   ├── ChildDatabaseRenderer.php
│   │   │   │   ├── ChildPageRenderer.php
│   │   │   │   ├── CodeRenderer.php
│   │   │   │   ├── ColumnListRenderer.php
│   │   │   │   ├── ColumnRenderer.php
│   │   │   │   ├── DividerRenderer.php
│   │   │   │   ├── EmbedRenderer.php
│   │   │   │   ├── EquationRenderer.php
│   │   │   │   ├── FileRenderer.php
│   │   │   │   ├── Heading1Renderer.php
│   │   │   │   ├── Heading2Renderer.php
│   │   │   │   ├── Heading3Renderer.php
│   │   │   │   ├── ImageRenderer.php
│   │   │   │   ├── LinkPreviewRenderer.php
│   │   │   │   ├── NumberedListItemRenderer.php
│   │   │   │   ├── ParagraphRenderer.php
│   │   │   │   ├── PdfRenderer.php
│   │   │   │   ├── QuoteRenderer.php
│   │   │   │   ├── RichTextRenderer.php
│   │   │   │   ├── TableOfContentsRenderer.php
│   │   │   │   ├── ToDoRenderer.php
│   │   │   │   ├── ToggleRenderer.php
│   │   │   │   └── VideoRenderer.php
│   │   │   ├── MarkdownRenderer.php
│   │   │   └── RendererInterface.php
│   │   ├── Table.php
│   │   ├── TableOfContents.php
│   │   ├── TableRow.php
│   │   ├── ToDo.php
│   │   ├── Toggle.php
│   │   ├── Unknown.php
│   │   └── Video.php
│   ├── Comments/
│   │   ├── Client.php
│   │   └── Comment.php
│   ├── Common/
│   │   ├── Annotations.php
│   │   ├── Color.php
│   │   ├── Date.php
│   │   ├── Emoji.php
│   │   ├── Equation.php
│   │   ├── File.php
│   │   ├── FileType.php
│   │   ├── Icon.php
│   │   ├── Mention.php
│   │   ├── MentionType.php
│   │   ├── ParentBlock.php
│   │   ├── ParentType.php
│   │   ├── RichText.php
│   │   ├── RichTextType.php
│   │   └── Text.php
│   ├── Configuration.php
│   ├── Databases/
│   │   ├── Client.php
│   │   ├── Database.php
│   │   ├── DatabaseParent.php
│   │   ├── DatabaseParentType.php
│   │   ├── Properties/
│   │   │   ├── Checkbox.php
│   │   │   ├── CreatedBy.php
│   │   │   ├── CreatedTime.php
│   │   │   ├── Date.php
│   │   │   ├── Email.php
│   │   │   ├── Files.php
│   │   │   ├── Formula.php
│   │   │   ├── LastEditedBy.php
│   │   │   ├── LastEditedTime.php
│   │   │   ├── MultiSelect.php
│   │   │   ├── Number.php
│   │   │   ├── NumberFormat.php
│   │   │   ├── People.php
│   │   │   ├── PhoneNumber.php
│   │   │   ├── PropertyCollection.php
│   │   │   ├── PropertyFactory.php
│   │   │   ├── PropertyInterface.php
│   │   │   ├── PropertyMetadata.php
│   │   │   ├── PropertyType.php
│   │   │   ├── Relation.php
│   │   │   ├── RelationType.php
│   │   │   ├── RichTextProperty.php
│   │   │   ├── Select.php
│   │   │   ├── SelectOption.php
│   │   │   ├── Status.php
│   │   │   ├── StatusGroup.php
│   │   │   ├── StatusOption.php
│   │   │   ├── Title.php
│   │   │   ├── UniqueId.php
│   │   │   ├── Unknown.php
│   │   │   └── Url.php
│   │   ├── Query/
│   │   │   ├── CheckboxFilter.php
│   │   │   ├── CompoundFilter.php
│   │   │   ├── Condition.php
│   │   │   ├── DateFilter.php
│   │   │   ├── Filter.php
│   │   │   ├── MultiSelectFilter.php
│   │   │   ├── NumberFilter.php
│   │   │   ├── Operator.php
│   │   │   ├── PeopleFilter.php
│   │   │   ├── RelationFilter.php
│   │   │   ├── Result.php
│   │   │   ├── SelectFilter.php
│   │   │   ├── Sort.php
│   │   │   ├── StatusFilter.php
│   │   │   └── TextFilter.php
│   │   └── Query.php
│   ├── Exceptions/
│   │   ├── ApiException.php
│   │   ├── BlockException.php
│   │   ├── ColumnException.php
│   │   ├── ColumnListException.php
│   │   ├── ConflictException.php
│   │   ├── DatabaseException.php
│   │   ├── FileUploadException.php
│   │   ├── HeadingException.php
│   │   ├── IconException.php
│   │   ├── NotionException.php
│   │   └── RelationException.php
│   ├── FileUploads/
│   │   ├── Client.php
│   │   ├── FileUpload.php
│   │   ├── FileUploadStatus.php
│   │   └── Mode.php
│   ├── Infrastructure/
│   │   └── Http.php
│   ├── Notion.php
│   ├── Pages/
│   │   ├── Client.php
│   │   ├── Page.php
│   │   ├── PageParent.php
│   │   ├── PageParentType.php
│   │   └── Properties/
│   │       ├── Checkbox.php
│   │       ├── CreatedBy.php
│   │       ├── CreatedTime.php
│   │       ├── Date.php
│   │       ├── Email.php
│   │       ├── Files.php
│   │       ├── Formula.php
│   │       ├── FormulaType.php
│   │       ├── LastEditedBy.php
│   │       ├── LastEditedTime.php
│   │       ├── MultiSelect.php
│   │       ├── Number.php
│   │       ├── People.php
│   │       ├── PhoneNumber.php
│   │       ├── PropertyCollection.php
│   │       ├── PropertyFactory.php
│   │       ├── PropertyInterface.php
│   │       ├── PropertyMetadata.php
│   │       ├── PropertyType.php
│   │       ├── Relation.php
│   │       ├── RichTextProperty.php
│   │       ├── Select.php
│   │       ├── Status.php
│   │       ├── Title.php
│   │       ├── UniqueId.php
│   │       ├── Unknown.php
│   │       └── Url.php
│   ├── Search/
│   │   ├── Client.php
│   │   ├── Filter.php
│   │   ├── FilterProperty.php
│   │   ├── FilterValue.php
│   │   ├── Query.php
│   │   ├── Result.php
│   │   ├── Sort.php
│   │   ├── SortDirection.php
│   │   └── SortTimestamp.php
│   └── Users/
│       ├── Bot.php
│       ├── Client.php
│       ├── Person.php
│       ├── User.php
│       ├── UserType.php
│       └── WorkspaceLimits.php
└── tests/
    ├── Integration/
    │   ├── BlocksTest.php
    │   ├── CommentsTest.php
    │   ├── DatabasesTest.php
    │   ├── Helper.php
    │   ├── PagesTest.php
    │   ├── SearchTest.php
    │   └── UsersTest.php
    └── Unit/
        ├── Blocks/
        │   ├── BlockMetadataTest.php
        │   ├── BookmarkTest.php
        │   ├── BreadcrumbTest.php
        │   ├── BulletedListItemTest.php
        │   ├── CalloutTest.php
        │   ├── ChildDatabaseTest.php
        │   ├── ChildPageTest.php
        │   ├── CodeTest.php
        │   ├── ColumnListTest.php
        │   ├── ColumnTest.php
        │   ├── DividerTest.php
        │   ├── EmbedTest.php
        │   ├── EquationBlockTest.php
        │   ├── FileBlockTest.php
        │   ├── Heading1Test.php
        │   ├── Heading2Test.php
        │   ├── Heading3Test.php
        │   ├── ImageTest.php
        │   ├── LinkPreviewTest.php
        │   ├── NumberedListItemTest.php
        │   ├── ParagraphTest.php
        │   ├── PdfTest.php
        │   ├── QuoteTest.php
        │   ├── Renderer/
        │   │   ├── Markdown/
        │   │   │   ├── BookmarkRendererTest.php
        │   │   │   ├── BreadcrumbRendererTest.php
        │   │   │   ├── BulletedListItemRendererTest.php
        │   │   │   ├── CalloutRendererTest.php
        │   │   │   ├── ChildDatabaseRendererTest.php
        │   │   │   ├── ChildPageRendererTest.php
        │   │   │   ├── CodeRendererTest.php
        │   │   │   ├── ColumnRendererTest.php
        │   │   │   ├── DividerRendererTest.php
        │   │   │   ├── EmbedRendererTest.php
        │   │   │   ├── EquationRendererTest.php
        │   │   │   ├── FileRendererTest.php
        │   │   │   ├── Heading1RendererTest.php
        │   │   │   ├── Heading2RendererTest.php
        │   │   │   ├── Heading3RendererTest.php
        │   │   │   ├── ImageRendererTest.php
        │   │   │   ├── LinkPreviewRendererTest.php
        │   │   │   ├── NumberedListItemRendererTest.php
        │   │   │   ├── ParagraphRendererTest.php
        │   │   │   ├── PdfRendererTest.php
        │   │   │   ├── QuoteRendererTest.php
        │   │   │   ├── TableOfContentsRendererTest.php
        │   │   │   ├── ToDoRendererTest.php
        │   │   │   ├── ToggleRendererTest.php
        │   │   │   └── VideoRendererTest.php
        │   │   └── MarkdownRendererTest.php
        │   ├── TableOfContentsTest.php
        │   ├── TableTest.php
        │   ├── ToDoTest.php
        │   ├── ToggleTest.php
        │   ├── UnknownTest.php
        │   └── VideoTest.php
        ├── Comments/
        │   └── CommentTest.php
        ├── Common/
        │   ├── AnnotationsTest.php
        │   ├── DateTest.php
        │   ├── EquationTest.php
        │   ├── FileTest.php
        │   ├── IconTest.php
        │   ├── MentionTest.php
        │   ├── ParentBlockTest.php
        │   ├── RichTextTest.php
        │   └── TextTest.php
        ├── ConfigurationTest.php
        ├── Databases/
        │   ├── DatabaseParentTest.php
        │   ├── DatabaseTest.php
        │   ├── Properties/
        │   │   ├── CheckboxTest.php
        │   │   ├── CreatedByTest.php
        │   │   ├── CreatedTimeTest.php
        │   │   ├── DateTest.php
        │   │   ├── EmailTest.php
        │   │   ├── FilesTest.php
        │   │   ├── FormulaTest.php
        │   │   ├── LastEditedByTest.php
        │   │   ├── LastEditedTimeTest.php
        │   │   ├── MultiSelectTest.php
        │   │   ├── NumberTest.php
        │   │   ├── PeopleTest.php
        │   │   ├── PhoneNumberTest.php
        │   │   ├── PropertyCollectionTest.php
        │   │   ├── PropertyMetadataTest.php
        │   │   ├── RelationTest.php
        │   │   ├── RichTextTest.php
        │   │   ├── SelectOptionTest.php
        │   │   ├── SelectTest.php
        │   │   ├── StatusTest.php
        │   │   ├── TitleTest.php
        │   │   ├── UniqueIdTest.php
        │   │   ├── UnknownTest.php
        │   │   └── UrlTest.php
        │   ├── Query/
        │   │   ├── CheckboxFilterTest.php
        │   │   ├── CompoundFilterTest.php
        │   │   ├── DateFilterTest.php
        │   │   ├── MultiSelectFilterTest.php
        │   │   ├── NumberFilterTest.php
        │   │   ├── PeopleFilterTest.php
        │   │   ├── RelationFilterTest.php
        │   │   ├── ResultTest.php
        │   │   ├── SelectFilterTest.php
        │   │   ├── SortTest.php
        │   │   ├── StatusFilterTest.php
        │   │   └── TextFilterTest.php
        │   └── QueryTest.php
        ├── Exceptions/
        │   └── ApiExceptionTest.php
        ├── Infrastructure/
        │   └── HttpTest.php
        ├── NotionTest.php
        ├── Pages/
        │   ├── PageParentTest.php
        │   ├── PageTest.php
        │   └── Properties/
        │       ├── CheckboxTest.php
        │       ├── CreatedByTest.php
        │       ├── CreatedTimeTest.php
        │       ├── DateTest.php
        │       ├── EmailTest.php
        │       ├── FilesTest.php
        │       ├── FormulaTest.php
        │       ├── LastEditedByTest.php
        │       ├── LastEditedTimeTest.php
        │       ├── MultiSelectTest.php
        │       ├── NumberTest.php
        │       ├── PeopleTest.php
        │       ├── PhoneNumberTest.php
        │       ├── PropertyCollectionTest.php
        │       ├── RelationTest.php
        │       ├── RichTextPropertyTest.php
        │       ├── SelectTest.php
        │       ├── StatusTest.php
        │       ├── TitleTest.php
        │       ├── UniqueIdTest.php
        │       ├── UnknownTest.php
        │       └── UrlTest.php
        ├── Search/
        │   ├── FilterTest.php
        │   ├── QueryTest.php
        │   └── SortTest.php
        └── Users/
            └── UserTest.php
Download .txt
Showing preview only (209K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2375 symbols across 318 files)

FILE: src/Blocks/BlockFactory.php
  class BlockFactory (line 5) | class BlockFactory
    method fromArray (line 10) | public static function fromArray(array $array): BlockInterface

FILE: src/Blocks/BlockInterface.php
  type BlockInterface (line 6) | interface BlockInterface
    method metadata (line 8) | public function metadata(): BlockMetadata;
    method addChild (line 9) | public function addChild(BlockInterface $child): self;
    method changeChildren (line 10) | public function changeChildren(BlockInterface ...$children): self;
    method delete (line 11) | public function delete(): self;
    method archive (line 16) | public function archive(): self;
    method fromArray (line 19) | public static function fromArray(array $array): self;
    method toArray (line 21) | public function toArray(): array;

FILE: src/Blocks/BlockMetadata.php
  class BlockMetadata (line 21) | class BlockMetadata
    method __construct (line 23) | private function __construct(
    method create (line 43) | public static function create(BlockType $type): self
    method fromArray (line 55) | public static function fromArray(array $array): self
    method toArray (line 71) | public function toArray(): array
    method delete (line 92) | public function delete(): self
    method restore (line 105) | public function restore(): self
    method updateHasChildren (line 118) | public function updateHasChildren(bool $hasChildren): self
    method update (line 130) | public function update(): self
    method checkType (line 147) | public function checkType(BlockType $expectedType): void

FILE: src/Blocks/Bookmark.php
  class Bookmark (line 23) | class Bookmark implements BlockInterface
    method __construct (line 26) | private function __construct(
    method fromUrl (line 37) | public static function fromUrl(string $url): self
    method fromArray (line 44) | public static function fromArray(array $array): self
    method toArray (line 57) | public function toArray(): array
    method metadata (line 69) | public function metadata(): BlockMetadata
    method changeUrl (line 75) | public function changeUrl(string $url): self
    method changeCaption (line 81) | public function changeCaption(RichText ...$caption): self
    method addChild (line 86) | public function addChild(BlockInterface $child): never
    method changeChildren (line 91) | public function changeChildren(BlockInterface ...$children): never
    method delete (line 96) | public function delete(): BlockInterface
    method archive (line 109) | public function archive(): BlockInterface

FILE: src/Blocks/Breadcrumb.php
  class Breadcrumb (line 16) | class Breadcrumb implements BlockInterface
    method __construct (line 18) | private function __construct(
    method create (line 24) | public static function create(): self
    method fromArray (line 31) | public static function fromArray(array $array): self
    method toArray (line 39) | public function toArray(): array
    method metadata (line 48) | public function metadata(): BlockMetadata
    method addChild (line 53) | public function addChild(BlockInterface $child): never
    method changeChildren (line 58) | public function changeChildren(BlockInterface ...$children): never
    method delete (line 63) | public function delete(): BlockInterface
    method archive (line 72) | public function archive(): BlockInterface

FILE: src/Blocks/BulletedListItem.php
  class BulletedListItem (line 24) | class BulletedListItem implements BlockInterface
    method __construct (line 30) | private function __construct(
    method create (line 42) | public static function create(): self
    method fromString (line 52) | public static function fromString(string $content): self
    method fromArray (line 60) | public static function fromArray(array $array): self
    method toArray (line 77) | public function toArray(): array
    method toString (line 91) | public function toString(): string
    method metadata (line 96) | public function metadata(): BlockMetadata
    method changeText (line 101) | public function changeText(RichText ...$text): self
    method addText (line 109) | public function addText(RichText $text): self
    method changeChildren (line 117) | public function changeChildren(BlockInterface ...$children): self
    method addChild (line 129) | public function addChild(BlockInterface $child): self
    method changeColor (line 142) | public function changeColor(Color $color): self
    method delete (line 152) | public function delete(): BlockInterface
    method archive (line 166) | public function archive(): BlockInterface

FILE: src/Blocks/Callout.php
  class Callout (line 28) | class Callout implements BlockInterface
    method __construct (line 34) | private function __construct(
    method create (line 44) | public static function create(): self
    method fromString (line 52) | public static function fromString(string $emoji, string $content): self
    method fromArray (line 61) | public static function fromArray(array $array): self
    method toArray (line 89) | public function toArray(): array
    method toString (line 103) | public function toString(): string
    method metadata (line 108) | public function metadata(): BlockMetadata
    method changeText (line 113) | public function changeText(RichText ...$text): self
    method addText (line 118) | public function addText(RichText $text): self
    method changeIcon (line 126) | public function changeIcon(Emoji|File|Icon $icon): self
    method changeChildren (line 139) | public function changeChildren(BlockInterface ...$children): self
    method addChild (line 152) | public function addChild(BlockInterface $child): self
    method changeColor (line 166) | public function changeColor(Color $color): self
    method delete (line 177) | public function delete(): BlockInterface
    method archive (line 192) | public function archive(): BlockInterface

FILE: src/Blocks/ChildDatabase.php
  class ChildDatabase (line 16) | class ChildDatabase implements BlockInterface
    method __construct (line 18) | private function __construct(
    method fromArray (line 25) | public static function fromArray(array $array): self
    method toArray (line 36) | public function toArray(): array
    method metadata (line 45) | public function metadata(): BlockMetadata
    method addChild (line 50) | public function addChild(BlockInterface $child): never
    method changeChildren (line 55) | public function changeChildren(BlockInterface ...$children): never
    method delete (line 60) | public function delete(): BlockInterface
    method archive (line 72) | public function archive(): BlockInterface

FILE: src/Blocks/ChildPage.php
  class ChildPage (line 16) | class ChildPage implements BlockInterface
    method __construct (line 18) | private function __construct(
    method fromArray (line 25) | public static function fromArray(array $array): self
    method toArray (line 36) | public function toArray(): array
    method metadata (line 45) | public function metadata(): BlockMetadata
    method addChild (line 50) | public function addChild(BlockInterface $child): never
    method changeChildren (line 55) | public function changeChildren(BlockInterface ...$children): never
    method delete (line 60) | public function delete(): BlockInterface
    method archive (line 72) | public function archive(): BlockInterface

FILE: src/Blocks/Client.php
  class Client (line 9) | class Client
    method __construct (line 14) | public function __construct(
    method find (line 19) | public function find(string $blockId): BlockInterface
    method findChildren (line 31) | public function findChildren(string $blockId): array
    method findChildrenRecursive (line 46) | public function findChildrenRecursive(string $blockId): array
    method append (line 67) | public function append(string $blockId, array $blocks): array
    method update (line 88) | public function update(BlockInterface $block): BlockInterface
    method delete (line 119) | public function delete(string $blockId): BlockInterface

FILE: src/Blocks/Code.php
  class Code (line 22) | class Code implements BlockInterface
    method __construct (line 28) | private function __construct(
    method create (line 37) | public static function create(): self
    method fromText (line 43) | public static function fromText(
    method fromString (line 52) | public static function fromString(
    method fromArray (line 62) | public static function fromArray(array $array): self
    method toArray (line 76) | public function toArray(): array
    method toString (line 89) | public function toString(): string
    method metadata (line 94) | public function metadata(): BlockMetadata
    method changeText (line 99) | public function changeText(RichText ...$text): self
    method addText (line 104) | public function addText(RichText $text): self
    method changeLanguage (line 112) | public function changeLanguage(CodeLanguage $language): self
    method changeCaption (line 117) | public function changeCaption(RichText ...$caption): self
    method addChild (line 122) | public function addChild(BlockInterface $child): never
    method changeChildren (line 127) | public function changeChildren(BlockInterface ...$children): never
    method delete (line 132) | public function delete(): BlockInterface
    method archive (line 146) | public function archive(): BlockInterface

FILE: src/Blocks/Column.php
  class Column (line 18) | class Column implements BlockInterface
    method __construct (line 21) | private function __construct(
    method create (line 32) | public static function create(BlockInterface ...$children): self
    method fromArray (line 39) | public static function fromArray(array $array): self
    method addChild (line 51) | public function addChild(BlockInterface $child): self
    method changeChildren (line 56) | public function changeChildren(BlockInterface ...$children): self
    method toArray (line 61) | public function toArray(): array
    method metadata (line 72) | public function metadata(): BlockMetadata
    method delete (line 77) | public function delete(): BlockInterface
    method archive (line 89) | public function archive(): BlockInterface

FILE: src/Blocks/ColumnList.php
  class ColumnList (line 18) | class ColumnList implements BlockInterface
    method __construct (line 21) | private function __construct(
    method create (line 28) | public static function create(Column ...$columns): self
    method fromArray (line 35) | public static function fromArray(array $array): self
    method toArray (line 48) | public function toArray(): array
    method metadata (line 59) | public function metadata(): BlockMetadata
    method addChild (line 64) | public function addChild(BlockInterface $child): self
    method changeChildren (line 74) | public function changeChildren(BlockInterface ...$children): self
    method delete (line 86) | public function delete(): BlockInterface
    method archive (line 98) | public function archive(): BlockInterface

FILE: src/Blocks/Divider.php
  class Divider (line 15) | class Divider implements BlockInterface
    method __construct (line 17) | private function __construct(
    method create (line 23) | public static function create(): self
    method fromArray (line 30) | public static function fromArray(array $array): self
    method toArray (line 38) | public function toArray(): array
    method metadata (line 47) | public function metadata(): BlockMetadata
    method addChild (line 52) | public function addChild(BlockInterface $child): never
    method changeChildren (line 57) | public function changeChildren(BlockInterface ...$children): never
    method delete (line 62) | public function delete(): BlockInterface
    method archive (line 73) | public function archive(): BlockInterface

FILE: src/Blocks/Embed.php
  class Embed (line 16) | class Embed implements BlockInterface
    method __construct (line 18) | private function __construct(
    method fromUrl (line 25) | public static function fromUrl(string $url = ""): self
    method fromArray (line 32) | public static function fromArray(array $array): self
    method toArray (line 43) | public function toArray(): array
    method metadata (line 52) | public function metadata(): BlockMetadata
    method changeUrl (line 57) | public function changeUrl(string $url): self
    method addChild (line 62) | public function addChild(BlockInterface $child): never
    method changeChildren (line 67) | public function changeChildren(BlockInterface ...$children): never
    method delete (line 72) | public function delete(): BlockInterface
    method archive (line 84) | public function archive(): BlockInterface

FILE: src/Blocks/EquationBlock.php
  class EquationBlock (line 18) | class EquationBlock implements BlockInterface
    method __construct (line 20) | private function __construct(
    method fromString (line 27) | public static function fromString(string $expression = ""): self
    method fromArray (line 35) | public static function fromArray(array $array): self
    method toArray (line 46) | public function toArray(): array
    method metadata (line 55) | public function metadata(): BlockMetadata
    method changeEquation (line 60) | public function changeEquation(Equation $equation): self
    method addChild (line 65) | public function addChild(BlockInterface $child): never
    method changeChildren (line 70) | public function changeChildren(BlockInterface ...$children): never
    method delete (line 75) | public function delete(): BlockInterface
    method archive (line 87) | public function archive(): BlockInterface

FILE: src/Blocks/FileBlock.php
  class FileBlock (line 16) | class FileBlock implements BlockInterface
    method __construct (line 18) | private function __construct(
    method fromFile (line 25) | public static function fromFile(File $file): self
    method fromArray (line 32) | public static function fromArray(array $array): self
    method toArray (line 43) | public function toArray(): array
    method metadata (line 52) | public function metadata(): BlockMetadata
    method file (line 57) | public function file(): File
    method changeFile (line 62) | public function changeFile(File $file): self
    method addChild (line 67) | public function addChild(BlockInterface $child): never
    method changeChildren (line 72) | public function changeChildren(BlockInterface ...$children): never
    method delete (line 77) | public function delete(): BlockInterface
    method archive (line 89) | public function archive(): BlockInterface

FILE: src/Blocks/Heading1.php
  class Heading1 (line 25) | class Heading1 implements BlockInterface
    method __construct (line 31) | private function __construct(
    method fromText (line 41) | public static function fromText(RichText ...$text): self
    method fromString (line 48) | public static function fromString(string $content): self
    method fromArray (line 56) | public static function fromArray(array $array): self
    method toArray (line 78) | public function toArray(): array
    method toString (line 92) | public function toString(): string
    method metadata (line 102) | public function metadata(): BlockMetadata
    method changeText (line 107) | public function changeText(RichText ...$text): self
    method addText (line 112) | public function addText(RichText $text): self
    method toggllify (line 120) | public function toggllify(): self
    method untogglify (line 125) | public function untogglify(): self
    method changeColor (line 134) | public function changeColor(Color $color): self
    method addChild (line 145) | public function addChild(BlockInterface $child): self
    method changeChildren (line 161) | public function changeChildren(BlockInterface ...$children): self
    method delete (line 170) | public function delete(): BlockInterface
    method archive (line 185) | public function archive(): BlockInterface

FILE: src/Blocks/Heading2.php
  class Heading2 (line 25) | class Heading2 implements BlockInterface
    method __construct (line 31) | private function __construct(
    method fromText (line 41) | public static function fromText(RichText ...$text): self
    method fromString (line 48) | public static function fromString(string $content): self
    method fromArray (line 56) | public static function fromArray(array $array): self
    method toArray (line 78) | public function toArray(): array
    method toString (line 92) | public function toString(): string
    method metadata (line 102) | public function metadata(): BlockMetadata
    method changeText (line 107) | public function changeText(RichText ...$text): self
    method addText (line 112) | public function addText(RichText $text): self
    method toggllify (line 120) | public function toggllify(): self
    method untogglify (line 125) | public function untogglify(): self
    method changeColor (line 134) | public function changeColor(Color $color): self
    method addChild (line 145) | public function addChild(BlockInterface $child): self
    method changeChildren (line 161) | public function changeChildren(BlockInterface ...$children): self
    method delete (line 170) | public function delete(): BlockInterface
    method archive (line 185) | public function archive(): BlockInterface

FILE: src/Blocks/Heading3.php
  class Heading3 (line 25) | class Heading3 implements BlockInterface
    method __construct (line 31) | private function __construct(
    method fromText (line 41) | public static function fromText(RichText ...$text): self
    method fromString (line 48) | public static function fromString(string $content): self
    method fromArray (line 56) | public static function fromArray(array $array): self
    method toArray (line 78) | public function toArray(): array
    method toString (line 92) | public function toString(): string
    method metadata (line 102) | public function metadata(): BlockMetadata
    method changeText (line 107) | public function changeText(RichText ...$text): self
    method addText (line 112) | public function addText(RichText $text): self
    method toggllify (line 120) | public function toggllify(): self
    method untogglify (line 125) | public function untogglify(): self
    method changeColor (line 134) | public function changeColor(Color $color): self
    method addChild (line 145) | public function addChild(BlockInterface $child): self
    method changeChildren (line 161) | public function changeChildren(BlockInterface ...$children): self
    method delete (line 170) | public function delete(): BlockInterface
    method archive (line 185) | public function archive(): BlockInterface

FILE: src/Blocks/Image.php
  class Image (line 17) | class Image implements BlockInterface
    method __construct (line 19) | private function __construct(
    method fromFile (line 26) | public static function fromFile(File $file): self
    method fromArray (line 33) | public static function fromArray(array $array): self
    method toArray (line 44) | public function toArray(): array
    method metadata (line 53) | public function metadata(): BlockMetadata
    method changeFile (line 58) | public function changeFile(File $file): self
    method changeCaption (line 63) | public function changeCaption(RichText ...$caption): self
    method addChild (line 68) | public function addChild(BlockInterface $child): never
    method changeChildren (line 73) | public function changeChildren(BlockInterface ...$children): never
    method delete (line 78) | public function delete(): BlockInterface
    method archive (line 90) | public function archive(): BlockInterface

FILE: src/Blocks/LinkPreview.php
  class LinkPreview (line 20) | class LinkPreview implements BlockInterface
    method __construct (line 22) | private function __construct(
    method fromArray (line 29) | public static function fromArray(array $array): self
    method toArray (line 40) | public function toArray(): array
    method metadata (line 49) | public function metadata(): BlockMetadata
    method addChild (line 54) | public function addChild(BlockInterface $child): never
    method changeChildren (line 59) | public function changeChildren(BlockInterface ...$children): never
    method delete (line 64) | public function delete(): BlockInterface
    method archive (line 76) | public function archive(): BlockInterface

FILE: src/Blocks/NumberedListItem.php
  class NumberedListItem (line 22) | class NumberedListItem implements BlockInterface
    method __construct (line 28) | private function __construct(
    method create (line 37) | public static function create(): self
    method fromString (line 44) | public static function fromString(string $content): self
    method fromArray (line 52) | public static function fromArray(array $array): self
    method toArray (line 69) | public function toArray(): array
    method toString (line 82) | public function toString(): string
    method metadata (line 87) | public function metadata(): BlockMetadata
    method changeText (line 92) | public function changeText(RichText ...$text): self
    method addText (line 97) | public function addText(RichText $text): self
    method addChild (line 105) | public function addChild(BlockInterface $child): self
    method changeChildren (line 118) | public function changeChildren(BlockInterface ...$children): self
    method changeColor (line 130) | public function changeColor(Color $color): self
    method delete (line 140) | public function delete(): BlockInterface
    method archive (line 154) | public function archive(): BlockInterface

FILE: src/Blocks/Paragraph.php
  class Paragraph (line 22) | class Paragraph implements BlockInterface
    method __construct (line 28) | private function __construct(
    method create (line 37) | public static function create(): self
    method fromString (line 44) | public static function fromString(string $content): self
    method fromArray (line 52) | public static function fromArray(array $array): self
    method toArray (line 69) | public function toArray(): array
    method toString (line 82) | public function toString(): string
    method metadata (line 92) | public function metadata(): BlockMetadata
    method changeText (line 98) | public function changeText(array $text): self
    method addText (line 103) | public function addText(RichText $text): self
    method changeChildren (line 111) | public function changeChildren(BlockInterface ...$children): self
    method addChild (line 123) | public function addChild(BlockInterface $child): self
    method changeColor (line 136) | public function changeColor(Color $color): self
    method delete (line 146) | public function delete(): BlockInterface
    method archive (line 160) | public function archive(): BlockInterface

FILE: src/Blocks/Pdf.php
  class Pdf (line 16) | class Pdf implements BlockInterface
    method __construct (line 18) | private function __construct(
    method fromFile (line 25) | public static function fromFile(File $file): self
    method fromArray (line 32) | public static function fromArray(array $array): self
    method toArray (line 43) | public function toArray(): array
    method metadata (line 52) | public function metadata(): BlockMetadata
    method changeFile (line 57) | public function changeFile(File $file): self
    method addChild (line 62) | public function addChild(BlockInterface $child): never
    method changeChildren (line 67) | public function changeChildren(BlockInterface ...$children): never
    method delete (line 72) | public function delete(): BlockInterface
    method archive (line 84) | public function archive(): BlockInterface

FILE: src/Blocks/Quote.php
  class Quote (line 23) | class Quote implements BlockInterface
    method __construct (line 29) | private function __construct(
    method create (line 38) | public static function create(): self
    method fromString (line 45) | public static function fromString(string $content): self
    method fromArray (line 53) | public static function fromArray(array $array): self
    method toArray (line 70) | public function toArray(): array
    method toString (line 83) | public function toString(): string
    method metadata (line 93) | public function metadata(): BlockMetadata
    method changeText (line 99) | public function changeText(array $text): self
    method addText (line 104) | public function addText(RichText $text): self
    method changeChildren (line 112) | public function changeChildren(BlockInterface ...$children): self
    method addChild (line 124) | public function addChild(BlockInterface $child): self
    method changeColor (line 137) | public function changeColor(Color $color): self
    method delete (line 147) | public function delete(): BlockInterface
    method archive (line 161) | public function archive(): BlockInterface

FILE: src/Blocks/Renderer/BlockRendererInterface.php
  type BlockRendererInterface (line 7) | interface BlockRendererInterface
    method render (line 9) | public static function render(BlockInterface $block, int $depth = 0): ...

FILE: src/Blocks/Renderer/Markdown/BookmarkRenderer.php
  class BookmarkRenderer (line 10) | final class BookmarkRenderer implements BlockRendererInterface
    method render (line 12) | public static function render(BlockInterface $block, int $depth = 0): ...

FILE: src/Blocks/Renderer/Markdown/BreadcrumbRenderer.php
  class BreadcrumbRenderer (line 10) | final class BreadcrumbRenderer implements BlockRendererInterface
    method render (line 12) | public static function render(BlockInterface $block, int $depth = 0): ...

FILE: src/Blocks/Renderer/Markdown/BulletedListItemRenderer.php
  class BulletedListItemRenderer (line 10) | final class BulletedListItemRenderer implements BlockRendererInterface
    method render (line 12) | public static function render(BlockInterface $block, int $depth = 0): ...

FILE: src/Blocks/Renderer/Markdown/CalloutRenderer.php
  class CalloutRenderer (line 10) | final class CalloutRenderer implements BlockRendererInterface
    method render (line 12) | public static function render(BlockInterface $block, int $depth = 0): ...

FILE: src/Blocks/Renderer/Markdown/ChildDatabaseRenderer.php
  class ChildDatabaseRenderer (line 10) | final class ChildDatabaseRenderer implements BlockRendererInterface
    method render (line 12) | public static function render(BlockInterface $block, int $depth = 0): ...

FILE: src/Blocks/Renderer/Markdown/ChildPageRenderer.php
  class ChildPageRenderer (line 10) | final class ChildPageRenderer implements BlockRendererInterface
    method render (line 12) | public static function render(BlockInterface $block, int $depth = 0): ...

FILE: src/Blocks/Renderer/Markdown/CodeRenderer.php
  class CodeRenderer (line 10) | final class CodeRenderer implements BlockRendererInterface
    method render (line 12) | public static function render(BlockInterface $block, int $depth = 0): ...

FILE: src/Blocks/Renderer/Markdown/ColumnListRenderer.php
  class ColumnListRenderer (line 10) | final class ColumnListRenderer implements BlockRendererInterface
    method render (line 12) | public static function render(BlockInterface $block, int $depth = 0): ...

FILE: src/Blocks/Renderer/Markdown/ColumnRenderer.php
  class ColumnRenderer (line 10) | final class ColumnRenderer implements BlockRendererInterface
    method render (line 12) | public static function render(BlockInterface $block, int $depth = 0): ...

FILE: src/Blocks/Renderer/Markdown/DividerRenderer.php
  class DividerRenderer (line 10) | final class DividerRenderer implements BlockRendererInterface
    method render (line 12) | public static function render(BlockInterface $block, int $depth = 0): ...

FILE: src/Blocks/Renderer/Markdown/EmbedRenderer.php
  class EmbedRenderer (line 10) | final class EmbedRenderer implements BlockRendererInterface
    method render (line 12) | public static function render(BlockInterface $block, int $depth = 0): ...

FILE: src/Blocks/Renderer/Markdown/EquationRenderer.php
  class EquationRenderer (line 10) | final class EquationRenderer implements BlockRendererInterface
    method render (line 12) | public static function render(BlockInterface $block, int $depth = 0): ...

FILE: src/Blocks/Renderer/Markdown/FileRenderer.php
  class FileRenderer (line 10) | final class FileRenderer implements BlockRendererInterface
    method render (line 12) | public static function render(BlockInterface $block, int $depth = 0): ...

FILE: src/Blocks/Renderer/Markdown/Heading1Renderer.php
  class Heading1Renderer (line 10) | final class Heading1Renderer implements BlockRendererInterface
    method render (line 12) | public static function render(BlockInterface $block, int $depth = 0): ...

FILE: src/Blocks/Renderer/Markdown/Heading2Renderer.php
  class Heading2Renderer (line 10) | final class Heading2Renderer implements BlockRendererInterface
    method render (line 12) | public static function render(BlockInterface $block, int $depth = 0): ...

FILE: src/Blocks/Renderer/Markdown/Heading3Renderer.php
  class Heading3Renderer (line 10) | final class Heading3Renderer implements BlockRendererInterface
    method render (line 12) | public static function render(BlockInterface $block, int $depth = 0): ...

FILE: src/Blocks/Renderer/Markdown/ImageRenderer.php
  class ImageRenderer (line 10) | final class ImageRenderer implements BlockRendererInterface
    method render (line 12) | public static function render(BlockInterface $block, int $depth = 0): ...

FILE: src/Blocks/Renderer/Markdown/LinkPreviewRenderer.php
  class LinkPreviewRenderer (line 10) | final class LinkPreviewRenderer implements BlockRendererInterface
    method render (line 12) | public static function render(BlockInterface $block, int $depth = 0): ...

FILE: src/Blocks/Renderer/Markdown/NumberedListItemRenderer.php
  class NumberedListItemRenderer (line 10) | final class NumberedListItemRenderer implements BlockRendererInterface
    method render (line 12) | public static function render(BlockInterface $block, int $depth = 0): ...

FILE: src/Blocks/Renderer/Markdown/ParagraphRenderer.php
  class ParagraphRenderer (line 10) | final class ParagraphRenderer implements BlockRendererInterface
    method render (line 12) | public static function render(BlockInterface $block, int $depth = 0): ...

FILE: src/Blocks/Renderer/Markdown/PdfRenderer.php
  class PdfRenderer (line 10) | final class PdfRenderer implements BlockRendererInterface
    method render (line 12) | public static function render(BlockInterface $block, int $depth = 0): ...

FILE: src/Blocks/Renderer/Markdown/QuoteRenderer.php
  class QuoteRenderer (line 10) | final class QuoteRenderer implements BlockRendererInterface
    method render (line 12) | public static function render(BlockInterface $block, int $depth = 0): ...

FILE: src/Blocks/Renderer/Markdown/RichTextRenderer.php
  class RichTextRenderer (line 7) | final class RichTextRenderer
    method render (line 9) | public static function render(RichText ...$text): string
    method around (line 44) | private static function around(string $text, string $around): string

FILE: src/Blocks/Renderer/Markdown/TableOfContentsRenderer.php
  class TableOfContentsRenderer (line 10) | final class TableOfContentsRenderer implements BlockRendererInterface
    method render (line 12) | public static function render(BlockInterface $block, int $depth = 0): ...

FILE: src/Blocks/Renderer/Markdown/ToDoRenderer.php
  class ToDoRenderer (line 10) | final class ToDoRenderer implements BlockRendererInterface
    method render (line 12) | public static function render(BlockInterface $block, int $depth = 0): ...

FILE: src/Blocks/Renderer/Markdown/ToggleRenderer.php
  class ToggleRenderer (line 11) | final class ToggleRenderer implements BlockRendererInterface
    method render (line 13) | public static function render(BlockInterface $block, int $depth = 0): ...

FILE: src/Blocks/Renderer/Markdown/VideoRenderer.php
  class VideoRenderer (line 10) | final class VideoRenderer implements BlockRendererInterface
    method render (line 12) | public static function render(BlockInterface $block, int $depth = 0): ...

FILE: src/Blocks/Renderer/MarkdownRenderer.php
  class MarkdownRenderer (line 9) | class MarkdownRenderer implements RendererInterface
    method render (line 11) | public static function render(BlockInterface ...$blocks): string
    method renderWithOverrides (line 29) | public static function renderWithOverrides(
    method renderBlock (line 50) | public static function renderBlock(
    method ident (line 91) | public static function ident(string $text, int $depth): string

FILE: src/Blocks/Renderer/RendererInterface.php
  type RendererInterface (line 7) | interface RendererInterface
    method render (line 9) | public static function render(BlockInterface ...$blocks): string;
    method renderBlock (line 11) | public static function renderBlock(BlockInterface $block, int $depth =...

FILE: src/Blocks/Table.php
  class Table (line 22) | class Table implements BlockInterface
    method __construct (line 25) | private function __construct(
    method create (line 35) | public static function create(): self
    method fromArray (line 42) | public static function fromArray(array $array): self
    method toArray (line 58) | public function toArray(): array
    method metadata (line 72) | public function metadata(): BlockMetadata
    method changeWidth (line 77) | public function changeWidth(int $tableWidth): self
    method enableColumnHeader (line 88) | public function enableColumnHeader(): self
    method disableColumnHeader (line 99) | public function disableColumnHeader(): self
    method enableRowHeader (line 110) | public function enableRowHeader(): self
    method disableRowHeader (line 121) | public function disableRowHeader(): self
    method changeRows (line 132) | public function changeRows(TableRow ...$rows): self
    method addRow (line 145) | public function addRow(TableRow $row): self
    method changeChildren (line 159) | public function changeChildren(BlockInterface ...$children): self
    method addChild (line 171) | public function addChild(BlockInterface $child): self
    method delete (line 181) | public function delete(): BlockInterface
    method archive (line 196) | public function archive(): BlockInterface

FILE: src/Blocks/TableOfContents.php
  class TableOfContents (line 19) | class TableOfContents implements BlockInterface
    method __construct (line 21) | private function __construct(
    method create (line 28) | public static function create(): self
    method fromArray (line 35) | public static function fromArray(array $array): self
    method toArray (line 48) | public function toArray(): array
    method metadata (line 57) | public function metadata(): BlockMetadata
    method addChild (line 62) | public function addChild(BlockInterface $child): never
    method changeChildren (line 67) | public function changeChildren(BlockInterface ...$children): never
    method changeColor (line 72) | public function changeColor(Color $color): self
    method delete (line 80) | public function delete(): BlockInterface
    method archive (line 92) | public function archive(): BlockInterface

FILE: src/Blocks/TableRow.php
  class TableRow (line 20) | class TableRow implements BlockInterface
    method __construct (line 23) | private function __construct(
    method create (line 30) | public static function create(): self
    method fromArray (line 37) | public static function fromArray(array $array): self
    method toArray (line 51) | public function toArray(): array
    method addCell (line 65) | public function addCell(RichText ...$cell): self
    method metadata (line 73) | public function metadata(): BlockMetadata
    method changeChildren (line 78) | public function changeChildren(BlockInterface ...$children): self
    method addChild (line 83) | public function addChild(BlockInterface $child): self
    method delete (line 88) | public function delete(): BlockInterface
    method archive (line 100) | public function archive(): BlockInterface

FILE: src/Blocks/ToDo.php
  class ToDo (line 24) | class ToDo implements BlockInterface
    method __construct (line 30) | private function __construct(
    method create (line 40) | public static function create(): self
    method fromString (line 47) | public static function fromString(string $content): self
    method fromArray (line 55) | public static function fromArray(array $array): self
    method toArray (line 74) | public function toArray(): array
    method toString (line 88) | public function toString(): string
    method metadata (line 98) | public function metadata(): BlockMetadata
    method changeText (line 103) | public function changeText(RichText ...$text): self
    method addText (line 108) | public function addText(RichText $text): self
    method check (line 116) | public function check(): self
    method uncheck (line 121) | public function uncheck(): self
    method changeChildren (line 126) | public function changeChildren(BlockInterface ...$children): self
    method addChild (line 139) | public function addChild(BlockInterface $child): self
    method changeColor (line 153) | public function changeColor(Color $color): self
    method delete (line 164) | public function delete(): BlockInterface
    method archive (line 179) | public function archive(): BlockInterface

FILE: src/Blocks/Toggle.php
  class Toggle (line 22) | class Toggle implements BlockInterface
    method __construct (line 28) | private function __construct(
    method createEmpty (line 37) | public static function createEmpty(): self
    method fromString (line 44) | public static function fromString(string $content): self
    method fromArray (line 52) | public static function fromArray(array $array): self
    method toArray (line 69) | public function toArray(): array
    method toString (line 82) | public function toString(): string
    method metadata (line 92) | public function metadata(): BlockMetadata
    method changeText (line 97) | public function changeText(RichText ...$text): self
    method addText (line 102) | public function addText(RichText $text): self
    method changeChildren (line 110) | public function changeChildren(BlockInterface ...$children): self
    method addChild (line 122) | public function addChild(BlockInterface $child): self
    method changeColor (line 135) | public function changeColor(Color $color): self
    method delete (line 145) | public function delete(): BlockInterface
    method archive (line 159) | public function archive(): BlockInterface

FILE: src/Blocks/Unknown.php
  class Unknown (line 12) | class Unknown implements BlockInterface
    method __construct (line 14) | private function __construct(
    method metadata (line 20) | public function metadata(): BlockMetadata
    method addChild (line 25) | public function addChild(BlockInterface $child): self
    method changeChildren (line 40) | public function changeChildren(BlockInterface ...$children): self
    method delete (line 53) | public function delete(): self
    method fromArray (line 62) | public static function fromArray(array $array): self
    method toArray (line 70) | public function toArray(): array
    method archive (line 79) | public function archive(): BlockInterface

FILE: src/Blocks/Video.php
  class Video (line 16) | class Video implements BlockInterface
    method __construct (line 18) | private function __construct(
    method fromFile (line 25) | public static function fromFile(File $file): self
    method fromArray (line 32) | public static function fromArray(array $array): self
    method toArray (line 43) | public function toArray(): array
    method metadata (line 52) | public function metadata(): BlockMetadata
    method changeFile (line 57) | public function changeFile(File $file): self
    method addChild (line 62) | public function addChild(BlockInterface $child): never
    method changeChildren (line 67) | public function changeChildren(BlockInterface ...$children): never
    method delete (line 72) | public function delete(): BlockInterface
    method archive (line 84) | public function archive(): BlockInterface

FILE: src/Comments/Client.php
  class Client (line 11) | class Client
    method __construct (line 16) | public function __construct(
    method list (line 28) | public function list(string $id): array
    method create (line 39) | public function create(Comment $comment): Comment

FILE: src/Comments/Comment.php
  class Comment (line 27) | class Comment
    method __construct (line 30) | private function __construct(
    method create (line 41) | public static function create(string $pageId, RichText ...$text): self
    method createReply (line 52) | public static function createReply(string $discussionId, RichText ...$...
    method fromArray (line 63) | public static function fromArray(array $array): self
    method toArray (line 76) | public function toArray(): array

FILE: src/Common/Annotations.php
  class Annotations (line 16) | class Annotations
    method __construct (line 18) | private function __construct(
    method create (line 29) | public static function create(): self
    method fromArray (line 39) | public static function fromArray(array $array): self
    method toArray (line 51) | public function toArray(): array
    method bold (line 63) | public function bold(bool $bold = true): self
    method italic (line 75) | public function italic(bool $italic = true): self
    method strikeThrough (line 87) | public function strikeThrough(bool $strikeThrough = true): self
    method underline (line 99) | public function underline(bool $underline = true): self
    method code (line 111) | public function code(bool $code = true): self
    method changeColor (line 123) | public function changeColor(Color $color): self

FILE: src/Common/Date.php
  class Date (line 12) | class Date
    method __construct (line 16) | private function __construct(
    method create (line 22) | public static function create(DateTimeImmutable $date): self
    method createRange (line 27) | public static function createRange(
    method now (line 34) | public static function now(): self
    method fromArray (line 44) | public static function fromArray(array $array): self
    method toArray (line 52) | public function toArray(): array
    method isRange (line 60) | public function isRange(): bool
    method changeStart (line 65) | public function changeStart(DateTimeImmutable $start): self
    method changeEnd (line 70) | public function changeEnd(DateTimeImmutable $end): self
    method removeEnd (line 75) | public function removeEnd(): self

FILE: src/Common/Emoji.php
  class Emoji (line 10) | class Emoji
    method __construct (line 12) | private function __construct(
    method fromString (line 17) | public static function fromString(string $emoji): self
    method fromArray (line 23) | public static function fromArray(array $array): self
    method toArray (line 28) | public function toArray(): array
    method toString (line 36) | public function toString(): string

FILE: src/Common/Equation.php
  class Equation (line 10) | class Equation
    method __construct (line 12) | private function __construct(
    method fromString (line 17) | public static function fromString(string $expression): self
    method fromArray (line 27) | public static function fromArray(array $array): self
    method toArray (line 32) | public function toArray(): array

FILE: src/Common/File.php
  class File (line 21) | class File
    method __construct (line 24) | private function __construct(
    method createExternal (line 34) | public static function createExternal(string $url): self
    method createInternal (line 39) | public static function createInternal(
    method createFileUpload (line 46) | public static function createFileUpload(string $fileId): self
    method fromArray (line 56) | public static function fromArray(array $array): self
    method toArray (line 72) | public function toArray(): array
    method isExternal (line 112) | public function isExternal(): bool
    method isInternal (line 117) | public function isInternal(): bool
    method isFileUpload (line 122) | public function isFileUpload(): bool
    method changeUrl (line 127) | public function changeUrl(string $url): self
    method changeFileUploadId (line 132) | public function changeFileUploadId(string $fileId): self
    method changeName (line 137) | public function changeName(string $name): self
    method changeCaption (line 142) | public function changeCaption(RichText ...$caption): self

FILE: src/Common/Icon.php
  class Icon (line 7) | class Icon
    method __construct (line 9) | private function __construct(
    method fromEmoji (line 23) | public static function fromEmoji(Emoji $emoji): self
    method fromFile (line 29) | public static function fromFile(File $file): self
    method toArray (line 35) | public function toArray(): array
    method isEmoji (line 51) | public function isEmoji(): bool
    method isFile (line 59) | public function isFile(): bool

FILE: src/Common/Mention.php
  class Mention (line 21) | class Mention
    method __construct (line 23) | private function __construct(
    method page (line 32) | public static function page(string $pageId): self
    method database (line 37) | public static function database(string $databaseId): self
    method user (line 42) | public static function user(User $user): self
    method date (line 47) | public static function date(Date $date): self
    method fromArray (line 57) | public static function fromArray(array $array): self
    method toArray (line 69) | public function toArray(): array
    method isPage (line 92) | public function isPage(): bool
    method isDatabase (line 100) | public function isDatabase(): bool
    method isUser (line 108) | public function isUser(): bool
    method isDate (line 116) | public function isDate(): bool

FILE: src/Common/ParentBlock.php
  class ParentBlock (line 14) | class ParentBlock
    method __construct (line 16) | private function __construct(
    method database (line 22) | public static function database(string $databaseId): self
    method page (line 27) | public static function page(string $pageId): self
    method block (line 32) | public static function block(string $blockId): self
    method workspace (line 37) | public static function workspace(): self
    method fromArray (line 43) | public static function fromArray(array $array): self
    method toArray (line 57) | public function toArray(): array

FILE: src/Common/RichText.php
  class RichText (line 23) | class RichText
    method __construct (line 25) | private function __construct(
    method fromString (line 37) | public static function fromString(string $content): self
    method createLink (line 44) | public static function createLink(string $content, string $url): self
    method fromText (line 52) | public static function fromText(Text $text): self
    method fromEquation (line 67) | public static function fromEquation(Equation $equation): self
    method fromMention (line 82) | public static function fromMention(Mention $mention): self
    method newLine (line 97) | public static function newLine(): self
    method fromArray (line 107) | public static function fromArray(array $array): self
    method toString (line 120) | public function toString(): string
    method toArray (line 125) | public function toArray(): array
    method isText (line 152) | public function isText(): bool
    method isMention (line 160) | public function isMention(): bool
    method isEquation (line 168) | public function isEquation(): bool
    method changeHref (line 173) | public function changeHref(string $href): self
    method changeAnnotations (line 186) | public function changeAnnotations(Annotations $annotations): self
    method bold (line 199) | public function bold(bool $bold = true): self
    method italic (line 206) | public function italic(bool $italic = true): self
    method strikeThrough (line 213) | public function strikeThrough(bool $strikeThrough = true): self
    method underline (line 220) | public function underline(bool $underline = true): self
    method code (line 227) | public function code(bool $code = true): self
    method color (line 234) | public function color(Color $color): self
    method multipleToString (line 242) | public static function multipleToString(self ...$richText): string

FILE: src/Common/Text.php
  class Text (line 10) | class Text
    method __construct (line 12) | private function __construct(
    method fromString (line 19) | public static function fromString(string $content): self
    method fromArray (line 29) | public static function fromArray(array $array): self
    method toArray (line 36) | public function toArray(): array
    method changeContent (line 46) | public function changeContent(string $content): self
    method changeUrl (line 51) | public function changeUrl(string $url): self
    method removeUrl (line 56) | public function removeUrl(): self

FILE: src/Configuration.php
  class Configuration (line 25) | class Configuration
    method __construct (line 27) | private function __construct(
    method create (line 37) | public static function create(string $token): self
    method createFromPsrImplementations (line 49) | public static function createFromPsrImplementations(
    method enableRetryOnConflict (line 69) | public function enableRetryOnConflict(int $attempts = 1): self
    method disableRetryOnConflict (line 78) | public function disableRetryOnConflict(): self
    method properties (line 88) | private function properties(): array

FILE: src/Databases/Client.php
  class Client (line 15) | class Client
    method __construct (line 20) | public function __construct(
    method find (line 25) | public function find(string $databaseId): Database
    method create (line 36) | public function create(Database $database): Database
    method update (line 53) | public function update(Database $database): Database
    method delete (line 74) | public function delete(Database $database): void
    method query (line 84) | public function query(Database $database, Query $query): Result
    method queryAllPages (line 107) | public function queryAllPages(Database $database, array $sorts = []): ...

FILE: src/Databases/Database.php
  class Database (line 42) | class Database
    method __construct (line 49) | private function __construct(
    method create (line 71) | public static function create(DatabaseParent $parent): self
    method fromArray (line 95) | public static function fromArray(array $array): self
    method toArray (line 152) | public function toArray(): array
    method hasIcon (line 173) | public function hasIcon(): bool
    method changeTitle (line 178) | public function changeTitle(string $title): self
    method changeAdvancedTitle (line 195) | public function changeAdvancedTitle(RichText ...$title): self
    method changeIcon (line 212) | public function changeIcon(Emoji|File|Icon $icon): self
    method removeIcon (line 237) | public function removeIcon(): self
    method changeCover (line 254) | public function changeCover(File $cover): self
    method removeCover (line 271) | public function removeCover(): self
    method properties (line 288) | public function properties(): PropertyCollection
    method addProperty (line 293) | public function addProperty(PropertyInterface $property): self
    method removePropertyByName (line 310) | public function removePropertyByName(string $propertyName): self
    method changeProperty (line 327) | public function changeProperty(PropertyInterface $property): self
    method changeProperties (line 345) | public function changeProperties(array $properties): self
    method changeParent (line 362) | public function changeParent(DatabaseParent $parent): self
    method enableInline (line 379) | public function enableInline(): self
    method disableInline (line 396) | public function disableInline(): self
    method hasTitleProperty (line 414) | private function hasTitleProperty(array $properties): bool
    method propertiesToArray (line 425) | private function propertiesToArray(): array

FILE: src/Databases/DatabaseParent.php
  class DatabaseParent (line 15) | class DatabaseParent
    method __construct (line 17) | private function __construct(
    method page (line 23) | public static function page(string $pageId): self
    method workspace (line 28) | public static function workspace(): self
    method block (line 33) | public static function block(string $blockId): self
    method fromArray (line 43) | public static function fromArray(array $array): self
    method toArray (line 52) | public function toArray(): array
    method isPage (line 69) | public function isPage(): bool
    method isWorkspace (line 74) | public function isWorkspace(): bool
    method isBlock (line 79) | public function isBlock(): bool

FILE: src/Databases/Properties/Checkbox.php
  class Checkbox (line 16) | class Checkbox implements PropertyInterface
    method __construct (line 18) | private function __construct(
    method create (line 23) | public static function create(string $propertyName = "Checkbox"): self
    method metadata (line 30) | public function metadata(): PropertyMetadata
    method fromArray (line 35) | public static function fromArray(array $array): self
    method toArray (line 43) | public function toArray(): array

FILE: src/Databases/Properties/CreatedBy.php
  class CreatedBy (line 16) | class CreatedBy implements PropertyInterface
    method __construct (line 18) | private function __construct(
    method create (line 23) | public static function create(string $propertyName = "CreatedBy"): self
    method metadata (line 30) | public function metadata(): PropertyMetadata
    method fromArray (line 35) | public static function fromArray(array $array): self
    method toArray (line 43) | public function toArray(): array

FILE: src/Databases/Properties/CreatedTime.php
  class CreatedTime (line 16) | class CreatedTime implements PropertyInterface
    method __construct (line 18) | private function __construct(
    method create (line 23) | public static function create(string $propertyName = "CreatedTime"): self
    method metadata (line 30) | public function metadata(): PropertyMetadata
    method fromArray (line 35) | public static function fromArray(array $array): self
    method toArray (line 43) | public function toArray(): array

FILE: src/Databases/Properties/Date.php
  class Date (line 16) | class Date implements PropertyInterface
    method __construct (line 18) | private function __construct(
    method create (line 23) | public static function create(string $propertyName = "Date"): self
    method metadata (line 30) | public function metadata(): PropertyMetadata
    method fromArray (line 35) | public static function fromArray(array $array): self
    method toArray (line 43) | public function toArray(): array

FILE: src/Databases/Properties/Email.php
  class Email (line 16) | class Email implements PropertyInterface
    method __construct (line 18) | private function __construct(
    method create (line 23) | public static function create(string $propertyName = "Email"): self
    method metadata (line 30) | public function metadata(): PropertyMetadata
    method fromArray (line 35) | public static function fromArray(array $array): self
    method toArray (line 43) | public function toArray(): array

FILE: src/Databases/Properties/Files.php
  class Files (line 16) | class Files implements PropertyInterface
    method __construct (line 18) | private function __construct(
    method create (line 23) | public static function create(string $propertyName = "Files"): self
    method metadata (line 30) | public function metadata(): PropertyMetadata
    method fromArray (line 35) | public static function fromArray(array $array): self
    method toArray (line 43) | public function toArray(): array

FILE: src/Databases/Properties/Formula.php
  class Formula (line 16) | class Formula implements PropertyInterface
    method __construct (line 18) | private function __construct(
    method create (line 24) | public static function create(string $propertyName = "Formula", string...
    method metadata (line 31) | public function metadata(): PropertyMetadata
    method changeExpression (line 36) | public function changeExpression(string $expression): self
    method fromArray (line 41) | public static function fromArray(array $array): self
    method toArray (line 50) | public function toArray(): array

FILE: src/Databases/Properties/LastEditedBy.php
  class LastEditedBy (line 16) | class LastEditedBy implements PropertyInterface
    method __construct (line 18) | private function __construct(
    method create (line 23) | public static function create(string $propertyName = "LastEditedBy"): ...
    method metadata (line 30) | public function metadata(): PropertyMetadata
    method fromArray (line 35) | public static function fromArray(array $array): self
    method toArray (line 43) | public function toArray(): array

FILE: src/Databases/Properties/LastEditedTime.php
  class LastEditedTime (line 16) | class LastEditedTime implements PropertyInterface
    method __construct (line 18) | private function __construct(
    method create (line 23) | public static function create(string $propertyName = "LastEditedTime")...
    method metadata (line 30) | public function metadata(): PropertyMetadata
    method fromArray (line 35) | public static function fromArray(array $array): self
    method toArray (line 43) | public function toArray(): array

FILE: src/Databases/Properties/MultiSelect.php
  class MultiSelect (line 20) | class MultiSelect implements PropertyInterface
    method __construct (line 23) | private function __construct(
    method create (line 30) | public static function create(string $propertyName = "Multi Select", a...
    method metadata (line 37) | public function metadata(): PropertyMetadata
    method changeOptions (line 42) | public function changeOptions(SelectOption ...$options): self
    method addOption (line 47) | public function addOption(SelectOption $option): self
    method fromArray (line 55) | public static function fromArray(array $array): self
    method toArray (line 67) | public function toArray(): array

FILE: src/Databases/Properties/Number.php
  class Number (line 16) | class Number implements PropertyInterface
    method __construct (line 18) | private function __construct(
    method create (line 24) | public static function create(
    method metadata (line 33) | public function metadata(): PropertyMetadata
    method changeFormat (line 38) | public function changeFormat(NumberFormat $format): self
    method fromArray (line 43) | public static function fromArray(array $array): self
    method toArray (line 52) | public function toArray(): array

FILE: src/Databases/Properties/People.php
  class People (line 16) | class People implements PropertyInterface
    method __construct (line 18) | private function __construct(
    method create (line 23) | public static function create(string $propertyName = "People"): self
    method metadata (line 30) | public function metadata(): PropertyMetadata
    method fromArray (line 35) | public static function fromArray(array $array): self
    method toArray (line 43) | public function toArray(): array

FILE: src/Databases/Properties/PhoneNumber.php
  class PhoneNumber (line 16) | class PhoneNumber implements PropertyInterface
    method __construct (line 18) | private function __construct(
    method create (line 23) | public static function create(string $propertyName = "PhoneNumber"): self
    method metadata (line 30) | public function metadata(): PropertyMetadata
    method fromArray (line 35) | public static function fromArray(array $array): self
    method toArray (line 43) | public function toArray(): array

FILE: src/Databases/Properties/PropertyCollection.php
  class PropertyCollection (line 6) | final class PropertyCollection
    method __construct (line 9) | private function __construct(
    method create (line 17) | public static function create(PropertyInterface ...$properties): self
    method add (line 27) | public function add(PropertyInterface $property): self
    method change (line 35) | public function change(PropertyInterface $property): self
    method remove (line 40) | public function remove(string $propertyName): self
    method get (line 48) | public function get(string $propertyName): PropertyInterface
    method getById (line 57) | public function getById(string $propertyId): PropertyInterface
    method getAll (line 69) | public function getAll(): array
    method getCheckbox (line 74) | public function getCheckbox(string $propertyName): Checkbox
    method getCheckboxById (line 79) | public function getCheckboxById(string $propertyId): Checkbox
    method getCreatedBy (line 84) | public function getCreatedBy(string $propertyName): CreatedBy
    method getCreatedByById (line 89) | public function getCreatedByById(string $propertyId): CreatedBy
    method getCreatedTime (line 94) | public function getCreatedTime(string $propertyName): CreatedTime
    method getCreatedTimeById (line 99) | public function getCreatedTimeById(string $propertyId): CreatedTime
    method getDate (line 104) | public function getDate(string $propertyName): Date
    method getDateById (line 109) | public function getDateById(string $propertyId): Date
    method getEmail (line 114) | public function getEmail(string $propertyName): Email
    method getEmailById (line 119) | public function getEmailById(string $propertyId): Email
    method getFiles (line 124) | public function getFiles(string $propertyName): Files
    method getFilesById (line 129) | public function getFilesById(string $propertyId): Files
    method getFormula (line 134) | public function getFormula(string $propertyName): Formula
    method getFormulaById (line 139) | public function getFormulaById(string $propertyId): Formula
    method getLastEditedBy (line 144) | public function getLastEditedBy(string $propertyName): LastEditedBy
    method getLastEditedByById (line 149) | public function getLastEditedByById(string $propertyId): LastEditedBy
    method getLastEditedTime (line 154) | public function getLastEditedTime(string $propertyName): LastEditedTime
    method getLastEditedTimeById (line 159) | public function getLastEditedTimeById(string $propertyId): LastEditedTime
    method getMultiSelect (line 164) | public function getMultiSelect(string $propertyName): MultiSelect
    method getMultiSelectById (line 169) | public function getMultiSelectById(string $propertyId): MultiSelect
    method getNumber (line 174) | public function getNumber(string $propertyName): Number
    method getNumberById (line 179) | public function getNumberById(string $propertyId): Number
    method getPeople (line 184) | public function getPeople(string $propertyName): People
    method getPeopleById (line 189) | public function getPeopleById(string $propertyId): People
    method getPhoneNumber (line 194) | public function getPhoneNumber(string $propertyName): PhoneNumber
    method getPhoneNumberById (line 199) | public function getPhoneNumberById(string $propertyId): PhoneNumber
    method getRelation (line 204) | public function getRelation(string $propertyName): Relation
    method getRelationById (line 209) | public function getRelationById(string $propertyId): Relation
    method getRichText (line 214) | public function getRichText(string $propertyName): RichTextProperty
    method getRichTextById (line 219) | public function getRichTextById(string $propertyId): RichTextProperty
    method getSelect (line 224) | public function getSelect(string $propertyName): Select
    method getSelectById (line 229) | public function getSelectById(string $propertyId): Select
    method getStatus (line 234) | public function getStatus(string $propertyName): Status
    method getStatusById (line 239) | public function getStatusById(string $propertyId): Status
    method getTitle (line 244) | public function getTitle(string $propertyName): Title
    method getTitleById (line 249) | public function getTitleById(string $propertyId): Title
    method getUniqueId (line 254) | public function getUniqueId(string $propertyName): UniqueId
    method getUniqueIdById (line 259) | public function getUniqueIdById(string $propertyName): UniqueId
    method getUrl (line 264) | public function getUrl(string $propertyName): Url
    method getUrlById (line 269) | public function getUrlById(string $propertyName): Url
    method getTyped (line 280) | private function getTyped(string $propertyName, string $propertyType):...
    method getTypedById (line 298) | private function getTypedById(string $propertyId, string $propertyType...

FILE: src/Databases/Properties/PropertyFactory.php
  class PropertyFactory (line 5) | class PropertyFactory
    method fromArray (line 10) | public static function fromArray(array $array): PropertyInterface

FILE: src/Databases/Properties/PropertyInterface.php
  type PropertyInterface (line 6) | interface PropertyInterface
    method fromArray (line 9) | public static function fromArray(array $array): self;
    method toArray (line 11) | public function toArray(): array;
    method metadata (line 13) | public function metadata(): PropertyMetadata;

FILE: src/Databases/Properties/PropertyMetadata.php
  class PropertyMetadata (line 10) | class PropertyMetadata
    method __construct (line 12) | private function __construct(
    method create (line 21) | public static function create(string $id, string $name, PropertyType $...
    method fromArray (line 31) | public static function fromArray(array $array): self
    method toArray (line 44) | public function toArray(): array

FILE: src/Databases/Properties/Relation.php
  class Relation (line 26) | class Relation implements PropertyInterface
    method __construct (line 28) | private function __construct(
    method createUnidirectional (line 44) | public static function createUnidirectional(string $propertyName, stri...
    method createBidirectional (line 52) | public static function createBidirectional(
    method changeToUnidirectional (line 64) | public function changeToUnidirectional(): self
    method changeToBidirectional (line 71) | public function changeToBidirectional(string $syncedPropertyName, stri...
    method metadata (line 84) | public function metadata(): PropertyMetadata
    method fromArray (line 89) | public static function fromArray(array $array): self
    method toArray (line 107) | public function toArray(): array
    method isUniderectional (line 131) | public function isUniderectional(): bool
    method isBiderectional (line 136) | public function isBiderectional(): bool

FILE: src/Databases/Properties/RichTextProperty.php
  class RichTextProperty (line 16) | class RichTextProperty implements PropertyInterface
    method __construct (line 18) | private function __construct(
    method create (line 23) | public static function create(string $propertyName = "Text"): self
    method metadata (line 30) | public function metadata(): PropertyMetadata
    method fromArray (line 35) | public static function fromArray(array $array): self
    method toArray (line 43) | public function toArray(): array

FILE: src/Databases/Properties/Select.php
  class Select (line 20) | class Select implements PropertyInterface
    method __construct (line 23) | private function __construct(
    method create (line 30) | public static function create(string $propertyName = "Select", array $...
    method metadata (line 37) | public function metadata(): PropertyMetadata
    method changeOptions (line 42) | public function changeOptions(SelectOption ...$options): self
    method addOption (line 47) | public function addOption(SelectOption $option): self
    method fromArray (line 55) | public static function fromArray(array $array): self
    method toArray (line 69) | public function toArray(): array

FILE: src/Databases/Properties/SelectOption.php
  class SelectOption (line 17) | class SelectOption
    method __construct (line 19) | private function __construct(
    method fromId (line 26) | public static function fromId(string $id): self
    method fromName (line 31) | public static function fromName(string $name): self
    method fromArray (line 36) | public static function fromArray(array $array): self
    method toArray (line 47) | public function toArray(): array
    method changeName (line 64) | public function changeName(string $name): self
    method changeColor (line 69) | public function changeColor(Color $color): self

FILE: src/Databases/Properties/Status.php
  class Status (line 22) | class Status implements PropertyInterface
    method __construct (line 28) | private function __construct(
    method metadata (line 35) | public function metadata(): PropertyMetadata
    method fromArray (line 40) | public static function fromArray(array $array): self
    method toArray (line 60) | public function toArray(): array

FILE: src/Databases/Properties/StatusGroup.php
  class StatusGroup (line 18) | class StatusGroup
    method __construct (line 21) | private function __construct(
    method fromArray (line 29) | public static function fromArray(array $array): self
    method toArray (line 40) | public function toArray(): array

FILE: src/Databases/Properties/StatusOption.php
  class StatusOption (line 17) | class StatusOption
    method __construct (line 19) | private function __construct(
    method fromId (line 26) | public static function fromId(string $id): self
    method fromName (line 31) | public static function fromName(string $name): self
    method fromArray (line 36) | public static function fromArray(array $array): self
    method changeColor (line 47) | public function changeColor(Color $color): self
    method toArray (line 52) | public function toArray(): array
    method changeName (line 69) | public function changeName(string $name): self

FILE: src/Databases/Properties/Title.php
  class Title (line 16) | class Title implements PropertyInterface
    method __construct (line 18) | private function __construct(
    method create (line 23) | public static function create(string $propertyName = "Title"): self
    method metadata (line 30) | public function metadata(): PropertyMetadata
    method fromArray (line 35) | public static function fromArray(array $array): self
    method toArray (line 43) | public function toArray(): array

FILE: src/Databases/Properties/UniqueId.php
  class UniqueId (line 16) | class UniqueId implements PropertyInterface
    method __construct (line 18) | private function __construct(
    method metadata (line 23) | public function metadata(): PropertyMetadata
    method fromArray (line 28) | public static function fromArray(array $array): self
    method toArray (line 36) | public function toArray(): array

FILE: src/Databases/Properties/Unknown.php
  class Unknown (line 15) | class Unknown implements PropertyInterface
    method __construct (line 17) | private function __construct(
    method metadata (line 23) | public function metadata(): PropertyMetadata
    method fromArray (line 28) | public static function fromArray(array $array): self
    method toArray (line 36) | public function toArray(): array

FILE: src/Databases/Properties/Url.php
  class Url (line 16) | class Url implements PropertyInterface
    method __construct (line 18) | private function __construct(
    method create (line 23) | public static function create(string $propertyName = "Url"): self
    method metadata (line 30) | public function metadata(): PropertyMetadata
    method fromArray (line 35) | public static function fromArray(array $array): self
    method toArray (line 43) | public function toArray(): array

FILE: src/Databases/Query.php
  class Query (line 10) | class Query
    method __construct (line 15) | private function __construct(
    method create (line 23) | public static function create(): self
    method changeFilter (line 28) | public function changeFilter(Filter $filter): self
    method addSort (line 34) | public function addSort(Sort $sort): self
    method changeAddedSort (line 46) | public function changeAddedSort(Sort $sort): self
    method changeSorts (line 52) | public function changeSorts(Sort ...$sorts): self
    method changeStartCursor (line 57) | public function changeStartCursor(string $startCursor): self
    method changePageSize (line 62) | public function changePageSize(int $pageSize): self
    method toArray (line 71) | public function toArray(): array

FILE: src/Databases/Query/CheckboxFilter.php
  class CheckboxFilter (line 6) | class CheckboxFilter implements Filter, Condition
    method __construct (line 13) | private function __construct(
    method property (line 23) | public static function property(string $propertyName): self
    method propertyType (line 28) | public function propertyType(): string
    method propertyName (line 33) | public function propertyName(): string
    method operator (line 38) | public function operator(): Operator
    method value (line 43) | public function value(): bool
    method toArray (line 48) | public function toArray(): array
    method equals (line 58) | public function equals(bool $value): self
    method doesNotEqual (line 63) | public function doesNotEqual(bool $value): self

FILE: src/Databases/Query/CompoundFilter.php
  class CompoundFilter (line 6) | class CompoundFilter implements Filter
    method __construct (line 17) | private function __construct(string $type, Filter ...$filters)
    method and (line 23) | public static function and(Filter ...$filters): self
    method or (line 28) | public static function or(Filter ...$filters): self
    method toArray (line 33) | public function toArray(): array

FILE: src/Databases/Query/Condition.php
  type Condition (line 5) | interface Condition
    method propertyType (line 7) | public function propertyType(): string;
    method propertyName (line 8) | public function propertyName(): string;
    method operator (line 9) | public function operator(): Operator;
    method value (line 10) | public function value(): mixed;

FILE: src/Databases/Query/DateFilter.php
  class DateFilter (line 8) | class DateFilter implements Filter, Condition
    method __construct (line 33) | private function __construct(
    method property (line 44) | public static function property(string $propertyName): self
    method createdTime (line 54) | public static function createdTime(): self
    method lastEditedTime (line 64) | public static function lastEditedTime(): self
    method propertyType (line 74) | public function propertyType(): string
    method propertyName (line 79) | public function propertyName(): string
    method operator (line 84) | public function operator(): Operator
    method value (line 89) | public function value(): string|bool|array|stdClass
    method toArray (line 94) | public function toArray(): array
    method equals (line 106) | public function equals(string $value): self
    method before (line 111) | public function before(string $value): self
    method after (line 116) | public function after(string $value): self
    method onOrBefore (line 121) | public function onOrBefore(string $value): self
    method isEmpty (line 126) | public function isEmpty(): self
    method isNotEmpty (line 131) | public function isNotEmpty(): self
    method onOrAfter (line 136) | public function onOrAfter(string $value): self
    method pastWeek (line 141) | public function pastWeek(): self
    method pastMonth (line 146) | public function pastMonth(): self
    method pastYear (line 151) | public function pastYear(): self
    method nextWeek (line 156) | public function nextWeek(): self
    method nextMonth (line 161) | public function nextMonth(): self
    method nextYear (line 166) | public function nextYear(): self
    method thisWeek (line 171) | public function thisWeek(): self

FILE: src/Databases/Query/Filter.php
  type Filter (line 6) | interface Filter
    method toArray (line 8) | public function toArray(): array;

FILE: src/Databases/Query/MultiSelectFilter.php
  class MultiSelectFilter (line 6) | class MultiSelectFilter implements Filter, Condition
    method __construct (line 15) | private function __construct(
    method property (line 25) | public static function property(string $propertyName): self
    method propertyType (line 34) | public function propertyType(): string
    method propertyName (line 39) | public function propertyName(): string
    method operator (line 44) | public function operator(): Operator
    method value (line 49) | public function value(): string|bool
    method toArray (line 54) | public function toArray(): array
    method contains (line 64) | public function contains(string $value): self
    method doesNotContain (line 69) | public function doesNotContain(string $value): self
    method isEmpty (line 74) | public function isEmpty(): self
    method isNotEmpty (line 79) | public function isNotEmpty(): self

FILE: src/Databases/Query/NumberFilter.php
  class NumberFilter (line 6) | class NumberFilter implements Filter, Condition
    method __construct (line 20) | private function __construct(
    method property (line 30) | public static function property(string $propertyName): self
    method propertyType (line 39) | public function propertyType(): string
    method propertyName (line 44) | public function propertyName(): string
    method operator (line 49) | public function operator(): Operator
    method value (line 54) | public function value(): int|float|bool
    method toArray (line 59) | public function toArray(): array
    method equals (line 69) | public function equals(int|float $value): self
    method doesNotEqual (line 74) | public function doesNotEqual(int|float $value): self
    method greaterThan (line 79) | public function greaterThan(int|float $value): self
    method lessThan (line 84) | public function lessThan(int|float $value): self
    method greaterThanOrEqualTo (line 89) | public function greaterThanOrEqualTo(int|float $value): self
    method lessThanOrEqualTo (line 94) | public function lessThanOrEqualTo(int|float $value): self
    method isEmpty (line 99) | public function isEmpty(): self
    method isNotEmpty (line 104) | public function isNotEmpty(): self

FILE: src/Databases/Query/PeopleFilter.php
  class PeopleFilter (line 6) | class PeopleFilter implements Filter, Condition
    method __construct (line 15) | private function __construct(
    method property (line 25) | public static function property(string $propertyName): self
    method createdBy (line 34) | public static function createdBy(): self
    method lastEditedBy (line 43) | public static function lastEditedBy(): self
    method propertyType (line 52) | public function propertyType(): string
    method propertyName (line 57) | public function propertyName(): string
    method operator (line 62) | public function operator(): Operator
    method value (line 67) | public function value(): string|bool
    method toArray (line 72) | public function toArray(): array
    method contains (line 82) | public function contains(string $userId): self
    method doesNotContain (line 87) | public function doesNotContain(string $userId): self
    method isEmpty (line 92) | public function isEmpty(): self
    method isNotEmpty (line 97) | public function isNotEmpty(): self

FILE: src/Databases/Query/RelationFilter.php
  class RelationFilter (line 6) | class RelationFilter implements Filter, Condition
    method __construct (line 16) | private function __construct(
    method property (line 26) | public static function property(string $propertyName): self
    method propertyType (line 36) | public function propertyType(): string
    method propertyName (line 41) | public function propertyName(): string
    method operator (line 46) | public function operator(): Operator
    method value (line 51) | public function value(): string|bool
    method toArray (line 56) | public function toArray(): array
    method contains (line 66) | public function contains(string $value): self
    method doesNotContain (line 71) | public function doesNotContain(string $value): self
    method isEmpty (line 76) | public function isEmpty(): self
    method isNotEmpty (line 81) | public function isNotEmpty(): self

FILE: src/Databases/Query/Result.php
  class Result (line 19) | class Result
    method __construct (line 22) | private function __construct(
    method fromArray (line 30) | public static function fromArray(array $array): self

FILE: src/Databases/Query/SelectFilter.php
  class SelectFilter (line 6) | class SelectFilter implements Filter, Condition
    method __construct (line 15) | private function __construct(
    method property (line 25) | public static function property(string $propertyName): self
    method propertyType (line 35) | public function propertyType(): string
    method propertyName (line 40) | public function propertyName(): string
    method operator (line 45) | public function operator(): Operator
    method value (line 50) | public function value(): string|bool
    method toArray (line 55) | public function toArray(): array
    method equals (line 65) | public function equals(string $value): self
    method doesNotEqual (line 70) | public function doesNotEqual(string $value): self
    method isEmpty (line 75) | public function isEmpty(): self
    method isNotEmpty (line 80) | public function isNotEmpty(): self

FILE: src/Databases/Query/Sort.php
  class Sort (line 8) | class Sort
    method __construct (line 20) | private function __construct(
    method property (line 27) | public static function property(string $propertyName): self
    method createdTime (line 32) | public static function createdTime(): self
    method lastEditedTime (line 37) | public static function lastEditedTime(): self
    method ascending (line 42) | public function ascending(): self
    method descending (line 47) | public function descending(): self
    method toArray (line 52) | public function toArray(): array

FILE: src/Databases/Query/StatusFilter.php
  class StatusFilter (line 6) | class StatusFilter implements Filter, Condition
    method __construct (line 15) | private function __construct(
    method property (line 25) | public static function property(string $propertyName): self
    method propertyType (line 35) | public function propertyType(): string
    method propertyName (line 40) | public function propertyName(): string
    method operator (line 45) | public function operator(): Operator
    method value (line 50) | public function value(): string|bool
    method toArray (line 55) | public function toArray(): array
    method equals (line 65) | public function equals(string $value): self
    method doesNotEqual (line 70) | public function doesNotEqual(string $value): self
    method isEmpty (line 75) | public function isEmpty(): self
    method isNotEmpty (line 80) | public function isNotEmpty(): self

FILE: src/Databases/Query/TextFilter.php
  class TextFilter (line 6) | class TextFilter implements Filter, Condition
    method __construct (line 19) | private function __construct(
    method property (line 29) | public static function property(string $propertyName): self
    method propertyType (line 38) | public function propertyType(): string
    method propertyName (line 43) | public function propertyName(): string
    method operator (line 48) | public function operator(): Operator
    method value (line 53) | public function value(): string|bool
    method toArray (line 58) | public function toArray(): array
    method equals (line 68) | public function equals(string $value): self
    method doesNotEqual (line 73) | public function doesNotEqual(string $value): self
    method contains (line 78) | public function contains(string $value): self
    method doesNotContain (line 83) | public function doesNotContain(string $value): self
    method startsWith (line 88) | public function startsWith(string $value): self
    method endsWith (line 93) | public function endsWith(string $value): self
    method isEmpty (line 98) | public function isEmpty(): self
    method isNotEmpty (line 103) | public function isNotEmpty(): self

FILE: src/Exceptions/ApiException.php
  class ApiException (line 10) | class ApiException extends NotionException
    method __construct (line 15) | final public function __construct(
    method fromResponse (line 26) | final public static function fromResponse(ResponseInterface $response)...
    method getNotionCode (line 44) | final public function getNotionCode(): string

FILE: src/Exceptions/BlockException.php
  class BlockException (line 8) | class BlockException extends NotionException
    method wrongType (line 10) | public static function wrongType(BlockType $expectedType): self
    method noChindrenSupport (line 15) | public static function noChindrenSupport(): self

FILE: src/Exceptions/ColumnException.php
  class ColumnException (line 5) | class ColumnException extends BlockException
    method columnInsideColumn (line 7) | public static function columnInsideColumn(): self

FILE: src/Exceptions/ColumnListException.php
  class ColumnListException (line 5) | class ColumnListException extends BlockException
    method childNotColumn (line 7) | public static function childNotColumn(): self

FILE: src/Exceptions/ConflictException.php
  class ConflictException (line 5) | class ConflictException extends ApiException

FILE: src/Exceptions/DatabaseException.php
  class DatabaseException (line 5) | class DatabaseException extends NotionException
    method internalCover (line 7) | public static function internalCover(): self
    method noTitleProperty (line 12) | public static function noTitleProperty(): self

FILE: src/Exceptions/FileUploadException.php
  class FileUploadException (line 5) | class FileUploadException extends NotionException
    method fileDoesNotExist (line 7) | public static function fileDoesNotExist(string $filePath): self
    method fileIsNotReadable (line 12) | public static function fileIsNotReadable(string $filePath): self
    method fileSizeCouldNotBeDetermined (line 17) | public static function fileSizeCouldNotBeDetermined(string $filePath):...
    method couldNotGetFileContent (line 22) | public static function couldNotGetFileContent(string $filePath): self
    method couldNotOpenFileForReading (line 27) | public static function couldNotOpenFileForReading(string $filePath): self
    method couldNotReadChunkFromFile (line 32) | public static function couldNotReadChunkFromFile(string $filePath, int...

FILE: src/Exceptions/HeadingException.php
  class HeadingException (line 5) | class HeadingException extends BlockException
    method untogglifyWithChildren (line 7) | public static function untogglifyWithChildren(): self

FILE: src/Exceptions/IconException.php
  class IconException (line 5) | class IconException extends NotionException
    method bothNull (line 7) | public static function bothNull(): self
    method bothSet (line 12) | public static function bothSet(): self

FILE: src/Exceptions/NotionException.php
  class NotionException (line 10) | class NotionException extends \Exception

FILE: src/Exceptions/RelationException.php
  class RelationException (line 5) | class RelationException extends NotionException
    method emptySyncedPropertyName (line 7) | public static function emptySyncedPropertyName(): self
    method emptySyncedPropertyId (line 12) | public static function emptySyncedPropertyId(): self

FILE: src/FileUploads/Client.php
  class Client (line 14) | class Client
    method __construct (line 23) | public function __construct(
    method find (line 28) | public function find(string $fileUploadId): FileUpload
    method list (line 47) | public function list(FileUploadStatus|null $status = null, string|null...
    method findAll (line 81) | public function findAll(FileUploadStatus|null $status = null): array
    method upload (line 98) | public function upload(string $filePath, string|null $filenameOnNotion...
    method createSinglePart (line 139) | public function createSinglePart(string|null $filename = null): FileUp...
    method createMultiPart (line 151) | public function createMultiPart(string $filename, string $contentType,...
    method createExternalUrl (line 163) | public function createExternalUrl(string $filename, string $externalUr...
    method sendSinglePart (line 174) | public function sendSinglePart(string $fileUploadId, string $filename,...
    method sendMultiPart (line 179) | public function sendMultiPart(string $fileUploadId, string $content, s...
    method complete (line 184) | public function complete(string $fileUploadId): FileUpload
    method create (line 196) | private function create(array $requestBody): FileUpload
    method send (line 212) | private function send(
    method chunksGenerator (line 245) | private function chunksGenerator(string $filePath): \Generator

FILE: src/FileUploads/FileUpload.php
  class FileUpload (line 23) | class FileUpload
    method __construct (line 25) | private function __construct(
    method fromArray (line 45) | public static function fromArray(array $array): self
    method isAttached (line 62) | public function isAttached(): bool

FILE: src/Infrastructure/Http.php
  class Http (line 11) | class Http
    method parseBody (line 13) | public static function parseBody(ResponseInterface $response): array
    method createRequest (line 25) | public static function createRequest(string $uri, Configuration $confi...
    method sendRequest (line 33) | public static function sendRequest(

FILE: src/Notion.php
  class Notion (line 15) | class Notion
    method __construct (line 19) | private function __construct(
    method create (line 24) | public static function create(string $token): self
    method createFromConfig (line 31) | public static function createFromConfig(Configuration $config): self
    method createWithPsrImplementations (line 36) | public static function createWithPsrImplementations(
    method users (line 50) | public function users(): UsersClient
    method pages (line 55) | public function pages(): PagesClient
    method databases (line 60) | public function databases(): DatabasesClient
    method blocks (line 65) | public function blocks(): BlocksClient
    method comments (line 70) | public function comments(): CommentsClient
    method search (line 75) | public function search(): SearchClient
    method fileUploads (line 80) | public function fileUploads(): FileUploadsClient

FILE: src/Pages/Client.php
  class Client (line 20) | class Client
    method __construct (line 25) | public function __construct(
    method find (line 30) | public function find(string $pageId): Page
    method create (line 42) | public function create(Page $page, array $content = []): Page
    method update (line 65) | public function update(Page $page): Page
    method delete (line 104) | public function delete(Page $page): Page

FILE: src/Pages/Page.php
  class Page (line 36) | class Page
    method __construct (line 41) | private function __construct(
    method create (line 62) | public static function create(PageParent $parent): self
    method fromArray (line 75) | public static function fromArray(array $array): self
    method toArray (line 117) | public function toArray(): array
    method hasIcon (line 136) | public function hasIcon(): bool
    method delete (line 141) | public function delete(): self
    method archive (line 160) | public function archive(): self
    method restore (line 165) | public function restore(): self
    method unarchive (line 184) | public function unarchive(): self
    method changeIcon (line 189) | public function changeIcon(Emoji|File|Icon $icon): self
    method removeIcon (line 212) | public function removeIcon(): self
    method changeCover (line 227) | public function changeCover(File $cover): self
    method removeCover (line 242) | public function removeCover(): self
    method properties (line 257) | public function properties(): PropertyCollection
    method getProperty (line 262) | public function getProperty(string $propertyName): PropertyInterface
    method getProprety (line 268) | public function getProprety(string $propertyName): PropertyInterface
    method addProperty (line 273) | public function addProperty(string $name, PropertyInterface $property)...
    method changeProperties (line 289) | public function changeProperties(array $properties): self
    method changeTitle (line 304) | public function changeTitle(string $title): self
    method title (line 312) | public function title(): Title|null
    method changeParent (line 317) | public function changeParent(PageParent $parent): self

FILE: src/Pages/PageParent.php
  class PageParent (line 16) | class PageParent
    method __construct (line 18) | private function __construct(
    method database (line 24) | public static function database(string $databaseId): self
    method page (line 29) | public static function page(string $pageId): self
    method workspace (line 34) | public static function workspace(): self
    method block (line 39) | public static function block(string $blockId): self
    method fromArray (line 49) | public static function fromArray(array $array): self
    method toArray (line 58) | public function toArray(): array
    method isDatabase (line 78) | public function isDatabase(): bool
    method isPage (line 83) | public function isPage(): bool
    method isWorkspace (line 88) | public function isWorkspace(): bool
    method isBlock (line 93) | public function isBlock(): bool

FILE: src/Pages/Properties/Checkbox.php
  class Checkbox (line 14) | class Checkbox implements PropertyInterface
    method __construct (line 16) | private function __construct(
    method createChecked (line 22) | public static function createChecked(): self
    method createUnchecked (line 29) | public static function createUnchecked(): self
    method fromArray (line 36) | public static function fromArray(array $array): self
    method toArray (line 47) | public function toArray(): array
    method metadata (line 56) | public function metadata(): PropertyMetadata
    method check (line 61) | public function check(): self
    method uncheck (line 66) | public function uncheck(): self

FILE: src/Pages/Properties/CreatedBy.php
  class CreatedBy (line 18) | class CreatedBy implements PropertyInterface
    method __construct (line 20) | private function __construct(
    method metadata (line 26) | public function metadata(): PropertyMetadata
    method fromArray (line 31) | public static function fromArray(array $array): self
    method toArray (line 40) | public function toArray(): array

FILE: src/Pages/Properties/CreatedTime.php
  class CreatedTime (line 17) | class CreatedTime implements PropertyInterface
    method __construct (line 19) | private function __construct(
    method create (line 25) | public static function create(DateTimeImmutable $time): self
    method fromArray (line 32) | public static function fromArray(array $array): self
    method toArray (line 43) | public function toArray(): array
    method metadata (line 52) | public function metadata(): PropertyMetadata
    method changeTime (line 57) | public function changeTime(DateTimeImmutable $time): self

FILE: src/Pages/Properties/Date.php
  class Date (line 20) | class Date implements PropertyInterface
    method __construct (line 22) | private function __construct(
    method create (line 28) | public static function create(DateTimeImmutable $date): self
    method createRange (line 35) | public static function createRange(DateTimeImmutable $start, DateTimeI...
    method createEmpty (line 42) | public static function createEmpty(): self
    method fromArray (line 49) | public static function fromArray(array $array): self
    method toArray (line 60) | public function toArray(): array
    method metadata (line 69) | public function metadata(): PropertyMetadata
    method changeDate (line 74) | public function changeDate(CommonDate $date): self
    method changeStart (line 79) | public function changeStart(DateTimeImmutable $start): self
    method changeEnd (line 84) | public function changeEnd(DateTimeImmutable $end): self
    method removeEnd (line 89) | public function removeEnd(): self
    method clear (line 94) | public function clear(): self
    method start (line 99) | public function start(): DateTimeImmutable|null
    method end (line 104) | public function end(): DateTimeImmutable|null
    method isRange (line 109) | public function isRange(): bool
    method isEmpty (line 118) | public function isEmpty(): bool

FILE: src/Pages/Properties/Email.php
  class Email (line 14) | class Email implements PropertyInterface
    method __construct (line 16) | private function __construct(
    method create (line 22) | public static function create(string $email): self
    method createEmpty (line 29) | public static function createEmpty(): self
    method fromArray (line 36) | public static function fromArray(array $array): self
    method toArray (line 47) | public function toArray(): array
    method metadata (line 56) | public function metadata(): PropertyMetadata
    method changeEmail (line 61) | public function changeEmail(string $email): self
    method clear (line 66) | public function clear(): self
    method isEmpty (line 71) | public function isEmpty(): bool

FILE: src/Pages/Properties/Files.php
  class Files (line 18) | class Files implements PropertyInterface
    method __construct (line 21) | private function __construct(
    method create (line 27) | public static function create(File ...$files): self
    method fromArray (line 42) | public static function fromArray(array $array): self
    method toArray (line 52) | public function toArray(): array
    method metadata (line 61) | public function metadata(): PropertyMetadata
    method changeFiles (line 66) | public function changeFiles(File ...$files): self
    method addFile (line 71) | public function addFile(File $file): self

FILE: src/Pages/Properties/Formula.php
  class Formula (line 26) | class Formula implements PropertyInterface
    method __construct (line 28) | private function __construct(
    method fromArray (line 38) | public static function fromArray(array $array): self
    method toArray (line 58) | public function toArray(): array
    method metadata (line 82) | public function metadata(): PropertyMetadata

FILE: src/Pages/Properties/LastEditedBy.php
  class LastEditedBy (line 18) | class LastEditedBy implements PropertyInterface
    method __construct (line 20) | private function __construct(
    method metadata (line 26) | public function metadata(): PropertyMetadata
    method fromArray (line 31) | public static function fromArray(array $array): self
    method toArray (line 41) | public function toArray(): array

FILE: src/Pages/Properties/LastEditedTime.php
  class LastEditedTime (line 17) | class LastEditedTime implements PropertyInterface
    method __construct (line 19) | private function __construct(
    method fromArray (line 25) | public static function fromArray(array $array): self
    method toArray (line 36) | public function toArray(): array
    method metadata (line 45) | public function metadata(): PropertyMetadata

FILE: src/Pages/Properties/MultiSelect.php
  class MultiSelect (line 18) | class MultiSelect implements PropertyInterface
    method __construct (line 21) | private function __construct(
    method fromIds (line 27) | public static function fromIds(string ...$ids): self
    method fromNames (line 35) | public static function fromNames(string ...$names): self
    method fromOptions (line 43) | public static function fromOptions(SelectOption ...$options): self
    method fromArray (line 50) | public static function fromArray(array $array): self
    method toArray (line 60) | public function toArray(): array
    method metadata (line 68) | public function metadata(): PropertyMetadata
    method addOption (line 73) | public function addOption(SelectOption $option): self
    method removeOption (line 81) | public function removeOption(string $optionId): self
    method changeOptions (line 89) | public function changeOptions(SelectOption ...$options): self

FILE: src/Pages/Properties/Number.php
  class Number (line 14) | class Number implements PropertyInterface
    method __construct (line 16) | private function __construct(
    method create (line 22) | public static function create(int|float $number): self
    method createEmpty (line 29) | public static function createEmpty(): self
    method fromArray (line 36) | public static function fromArray(array $array): self
    method toArray (line 47) | public function toArray(): array
    method metadata (line 56) | public function metadata(): PropertyMetadata
    method changeNumber (line 61) | public function changeNumber(int|float $number): self
    method clear (line 66) | public function clear(): self
    method isEmpty (line 71) | public function isEmpty(): bool

FILE: src/Pages/Properties/People.php
  class People (line 18) | class People implements PropertyInterface
    method __construct (line 21) | private function __construct(
    method create (line 27) | public static function create(User ...$users): self
    method fromArray (line 34) | public static function fromArray(array $array): self
    method toArray (line 50) | public function toArray(): array
    method metadata (line 64) | public function metadata(): PropertyMetadata
    method changePeople (line 69) | public function changePeople(User ...$users): self
    method addPerson (line 74) | public function addPerson(User $user): self
    method removePerson (line 82) | public function removePerson(string $userId): self

FILE: src/Pages/Properties/PhoneNumber.php
  class PhoneNumber (line 14) | class PhoneNumber implements PropertyInterface
    method __construct (line 16) | private function __construct(
    method create (line 22) | public static function create(string $phone): self
    method createEmpty (line 29) | public static function createEmpty(): self
    method fromArray (line 36) | public static function fromArray(array $array): self
    method toArray (line 47) | public function toArray(): array
    method metadata (line 56) | public function metadata(): PropertyMetadata
    method changePhone (line 61) | public function changePhone(string $phone): self
    method clear (line 66) | public function clear(): self
    method isEmpty (line 71) | public function isEmpty(): bool

FILE: src/Pages/Properties/PropertyCollection.php
  class PropertyCollection (line 6) | final class PropertyCollection
    method __construct (line 11) | private function __construct(
    method create (line 21) | public static function create(array $properties): self
    method add (line 26) | public function add(string $propertyName, PropertyInterface $property)...
    method change (line 34) | public function change(string $propertyName, PropertyInterface $proper...
    method get (line 39) | public function get(string $propertyName): PropertyInterface
    method getById (line 48) | public function getById(string $propertyId): PropertyInterface
    method getAll (line 60) | public function getAll(): array
    method title (line 65) | public function title(): Title|null
    method titleKey (line 76) | public function titleKey(): string
    method getCheckbox (line 87) | public function getCheckbox(string $propertyName): Checkbox
    method getCheckboxById (line 92) | public function getCheckboxById(string $propertyId): Checkbox
    method getCreatedBy (line 97) | public function getCreatedBy(string $propertyName): CreatedBy
    method getCreatedByById (line 102) | public function getCreatedByById(string $propertyId): CreatedBy
    method getCreatedTime (line 107) | public function getCreatedTime(string $propertyName): CreatedTime
    method getCreatedTimeById (line 112) | public function getCreatedTimeById(string $propertyId): CreatedTime
    method getDate (line 117) | public function getDate(string $propertyName): Date
    method getDateById (line 122) | public function getDateById(string $propertyId): Date
    method getEmail (line 127) | public function getEmail(string $propertyName): Email
    method getEmailById (line 132) | public function getEmailById(string $propertyId): Email
    method getFiles (line 137) | public function getFiles(string $propertyName): Files
    method getFilesById (line 142) | public function getFilesById(string $propertyId): Files
    method getFormula (line 147) | public function getFormula(string $propertyName): Formula
    method getFormulaById (line 152) | public function getFormulaById(string $propertyId): Formula
    method getLastEditedBy (line 157) | public function getLastEditedBy(string $propertyName): LastEditedBy
    method getLastEditedByById (line 162) | public function getLastEditedByById(string $propertyId): LastEditedBy
    method getLastEditedTime (line 167) | public function getLastEditedTime(string $propertyName): LastEditedTime
    method getLastEditedTimeById (line 172) | public function getLastEditedTimeById(string $propertyId): LastEditedTime
    method getMultiSelect (line 177) | public function getMultiSelect(string $propertyName): MultiSelect
    method getMultiSelectById (line 182) | public function getMultiSelectById(string $propertyId): MultiSelect
    method getNumber (line 187) | public function getNumber(string $propertyName): Number
    method getNumberById (line 192) | public function getNumberById(string $propertyId): Number
    method getPeople (line 197) | public function getPeople(string $propertyName): People
    method getPeopleById (line 202) | public function getPeopleById(string $propertyId): People
    method getPhoneNumber (line 207) | public function getPhoneNumber(string $propertyName): PhoneNumber
    method getPhoneNumberById (line 212) | public function getPhoneNumberById(string $propertyId): PhoneNumber
    method getRelation (line 217) | public function getRelation(string $propertyName): Relation
    method getRelationById (line 222) | public function getRelationById(string $propertyId): Relation
    method getRichText (line 227) | public function getRichText(string $propertyName): RichTextProperty
    method getRichTextById (line 232) | public function getRichTextById(string $propertyId): RichTextProperty
    method getSelect (line 237) | public function getSelect(string $propertyName): Select
    method getSelectById (line 242) | public function getSelectById(string $propertyId): Select
    method getStatus (line 247) | public function getStatus(string $propertyName): Status
    method getStatusById (line 252) | public function getStatusById(string $propertyId): Status
    method getUniqueId (line 257) | public function getUniqueId(string $propertyName): UniqueId
    method getUniqueIdById (line 262) | public function getUniqueIdById(string $propertyId): UniqueId
    method getUrl (line 267) | public function getUrl(string $propertyName): Url
    method getUrlById (line 272) | public function getUrlById(string $propertyId): Url
    method getTyped (line 283) | private function getTyped(string $propertyName, string $propertyType):...
    method getTypedById (line 301) | private function getTypedById(string $propertyId, string $propertyType...

FILE: src/Pages/Properties/PropertyFactory.php
  class PropertyFactory (line 5) | class PropertyFactory
    method fromArray (line 10) | public static function fromArray(array $array): PropertyInterface

FILE: src/Pages/Properties/PropertyInterface.php
  type PropertyInterface (line 6) | interface PropertyInterface
    method fromArray (line 9) | public static function fromArray(array $array): self;
    method toArray (line 11) | public function toArray(): array;
    method metadata (line 13) | public function metadata(): PropertyMetadata;

FILE: src/Pages/Properties/PropertyMetadata.php
  class PropertyMetadata (line 10) | class PropertyMetadata
    method __construct (line 12) | private function __construct(
    method create (line 20) | public static function create(string $id, PropertyType $type): self
    method fromArray (line 30) | public static function fromArray(array $array): self
    method toArray (line 41) | public function toArray(): array

FILE: src/Pages/Properties/Relation.php
  class Relation (line 14) | class Relation implements PropertyInterface
    method __construct (line 17) | private function __construct(
    method create (line 23) | public static function create(string ...$pageIds): self
    method fromArray (line 30) | public static function fromArray(array $array): self
    method toArray (line 46) | public function toArray(): array
    method metadata (line 60) | public function metadata(): PropertyMetadata
    method changeRelations (line 66) | public function changeRelations(string ...$pageIds): self
    method addRelation (line 71) | public function addRelation(string $pageId): self
    method removeRelation (line 79) | public function removeRelation(string $pageId): self

FILE: src/Pages/Properties/RichTextProperty.php
  class RichTextProperty (line 18) | class RichTextProperty implements PropertyInterface
    method __construct (line 21) | private function __construct(
    method fromText (line 27) | public static function fromText(RichText ...$texts): self
    method fromString (line 34) | public static function fromString(string $text): self
    method createEmpty (line 42) | public static function createEmpty(): self
    method fromArray (line 49) | public static function fromArray(array $array): self
    method toArray (line 65) | public function toArray(): array
    method metadata (line 74) | public function metadata(): PropertyMetadata
    method changeText (line 79) | public function changeText(RichText ...$texts): self
    method clear (line 84) | public function clear(): self
    method isEmpty (line 89) | public function isEmpty(): bool
    method toString (line 94) | public function toString(): string

FILE: src/Pages/Properties/Select.php
  class Select (line 16) | class Select implements PropertyInterface
    method __construct (line 18) | private function __construct(
    method fromId (line 24) | public static function fromId(string $id): self
    method fromName (line 32) | public static function fromName(string $name): self
    method fromOption (line 40) | public static function fromOption(SelectOption $option): self
    method createEmpty (line 47) | public static function createEmpty(): self
    method fromArray (line 54) | public static function fromArray(array $array): self
    method toArray (line 64) | public function toArray(): array
    method metadata (line 72) | public function metadata(): PropertyMetadata
    method changeOption (line 77) | public function changeOption(SelectOption $option): self
    method clear (line 82) | public function clear(): self
    method isEmpty (line 87) | public function isEmpty(): bool

FILE: src/Pages/Properties/Status.php
  class Status (line 17) | class Status implements PropertyInterface
    method __construct (line 19) | private function __construct(
    method fromId (line 25) | public static function fromId(string $id): self
    method fromName (line 33) | public static function fromName(string $name): self
    method changeColor (line 41) | public function changeColor(Color $color): self
    method fromOption (line 47) | public static function fromOption(StatusOption $option): self
    method fromArray (line 54) | public static function fromArray(array $array): self
    method toArray (line 64) | public function toArray(): array
    method metadata (line 73) | public function metadata(): PropertyMetadata
    method changeOption (line 78) | public function changeOption(StatusOption $option): self

FILE: src/Pages/Properties/Title.php
  class Title (line 20) | class Title implements PropertyInterface
    method __construct (line 23) | private function __construct(
    method fromText (line 30) | public static function fromText(RichText ...$title): self
    method fromString (line 38) | public static function fromString(string $title): self
    method fromArray (line 45) | public static function fromArray(array $array): self
    method toArray (line 61) | public function toArray(): array
    method metadata (line 70) | public function metadata(): PropertyMetadata
    method change (line 75) | public function change(RichText ...$title): self
    method isEmpty (line 80) | public function isEmpty(): bool
    method toString (line 87) | public function toString(): string

FILE: src/Pages/Properties/UniqueId.php
  class UniqueId (line 17) | class UniqueId implements PropertyInterface
    method __construct (line 19) | private function __construct(
    method fromArray (line 26) | public static function fromArray(array $array): self
    method toArray (line 37) | public function toArray(): array
    method metadata (line 49) | public function metadata(): PropertyMetadata

FILE: src/Pages/Properties/Unknown.php
  class Unknown (line 13) | class Unknown implements PropertyInterface
    method __construct (line 15) | private function __construct(
    method fromArray (line 21) | public static function fromArray(array $array): self
    method toArray (line 29) | public function toArray(): array
    method metadata (line 34) | public function metadata(): PropertyMetadata

FILE: src/Pages/Properties/Url.php
  class Url (line 14) | class Url implements PropertyInterface
    method __construct (line 16) | private function __construct(
    method create (line 22) | public static function create(string $url): self
    method createEmpty (line 29) | public static function createEmpty(): self
    method fromArray (line 36) | public static function fromArray(array $array): self
    method toArray (line 47) | public function toArray(): array
    method metadata (line 56) | public function metadata(): PropertyMetadata
    method changeUrl (line 61) | public function changeUrl(string $url): self
    method clear (line 66) | public function clear(): self
    method isEmpty (line 71) | public function isEmpty(): bool

FILE: src/Search/Client.php
  class Client (line 10) | class Client
    method __construct (line 15) | public function __construct(
    method search (line 20) | public function search(Query $query): Result

FILE: src/Search/Filter.php
  class Filter (line 6) | class Filter
    method __construct (line 8) | private function __construct(
    method byPages (line 15) | public static function byPages(): self
    method byDatabases (line 21) | public static function byDatabases(): self
    method toArray (line 31) | public function toArray(): array

FILE: src/Search/Query.php
  class Query (line 6) | class Query
    method __construct (line 8) | private function __construct(
    method all (line 17) | public static function all(): self
    method title (line 22) | public static function title(string $query): self
    method filterByPages (line 27) | public function filterByPages(): self
    method filterByDatabases (line 38) | public function filterByDatabases(): self
    method sortByLastEditedTime (line 49) | public function sortByLastEditedTime(SortDirection $direction): self
    method changeStartCursor (line 62) | public function changeStartCursor(string $startCursor): self
    method changePageSize (line 73) | public function changePageSize(int $pageSize): self
    method toArray (line 95) | public function toArray(): array

FILE: src/Search/Result.php
  class Result (line 21) | class Result
    method __construct (line 24) | private function __construct(
    method fromArray (line 34) | public static function fromArray(array $array): self

FILE: src/Search/Sort.php
  class Sort (line 6) | class Sort
    method __construct (line 8) | private function __construct(
    method create (line 15) | public static function create(): self
    method byLastEditedTime (line 20) | public function byLastEditedTime(): self
    method ascending (line 25) | public function ascending(): self
    method descending (line 30) | public function descending(): self
    method toArray (line 40) | public function toArray(): array

FILE: src/Users/Bot.php
  class Bot (line 15) | class Bot
    method __construct (line 17) | private function __construct(
    method fromArray (line 27) | public static function fromArray(array $array): self
    method toArray (line 35) | public function toArray(): array

FILE: src/Users/Client.php
  class Client (line 9) | class Client
    method __construct (line 14) | public function __construct(
    method find (line 19) | public function find(string $userId): User
    method findAll (line 33) | public function findAll(): array
    method me (line 49) | public function me(): User

FILE: src/Users/Person.php
  class Person (line 10) | class Person
    method __construct (line 12) | private function __construct(
    method fromArray (line 18) | public static function fromArray(array $array): self
    method toArray (line 24) | public function toArray(): array

FILE: src/Users/User.php
  class User (line 21) | class User
    method __construct (line 23) | private function __construct(
    method create (line 33) | public static function create(string $id): self
    method fromArray (line 46) | public static function fromArray(array $array): self
    method toArray (line 66) | public function toArray(): array
    method isPerson (line 98) | public function isPerson(): bool
    method isBot (line 106) | public function isBot(): bool

FILE: src/Users/WorkspaceLimits.php
  class WorkspaceLimits (line 12) | class WorkspaceLimits
    method __construct (line 14) | private function __construct(
    method fromArray (line 22) | public static function fromArray(array $array): self
    method toArray (line 30) | public function toArray(): array

FILE: tests/Integration/BlocksTest.php
  class BlocksTest (line 28) | class BlocksTest extends TestCase
    method test_create_page_change_all_blocks (line 30) | public function test_create_page_change_all_blocks(): void
    method test_find_block (line 77) | public function test_find_block(): void
    method test_find_inexistent_block (line 97) | public function test_find_inexistent_block(): void
    method test_find_children_of_inexistent_block (line 105) | public function test_find_children_of_inexistent_block(): void
    method test_delete_block (line 113) | public function test_delete_block(): void
    method test_delete_inexistent (line 138) | public function test_delete_inexistent(): void
    method test_add_block (line 146) | public function test_add_block(): void
    method test_add_to_inexistent_block (line 161) | public function test_add_to_inexistent_block(): void
    method test_update_block (line 171) | public function test_update_block(): void
    method test_update_newly_created_block (line 213) | public function test_update_newly_created_block(): void

FILE: tests/Integration/CommentsTest.php
  class CommentsTest (line 12) | class CommentsTest extends TestCase
    method test_create_and_read_page_comment (line 14) | public function test_create_and_read_page_comment(): void

FILE: tests/Integration/DatabasesTest.php
  class DatabasesTest (line 31) | class DatabasesTest extends TestCase
    method test_create_empty_database (line 35) | public function test_create_empty_database(): void
    method test_create_inline_database (line 55) | public function test_create_inline_database(): void
    method test_update_database (line 73) | public function test_update_database(): void
    method test_find_inexistent_database (line 92) | public function test_find_inexistent_database(): void
    method test_create_change_inexistent_parent (line 101) | public function test_create_change_inexistent_parent(): void
    method test_update_deleted_database (line 112) | public function test_update_deleted_database(): void
    method test_delete_inexistent (line 127) | public function test_delete_inexistent(): void
    method test_query_all_pages_from_database (line 137) | public function test_query_all_pages_from_database(): void
    method test_query_big_database (line 150) | public function test_query_big_database(): void
    method test_query_database (line 170) | public function test_query_database(): void
    method test_query_inexistent_database (line 199) | public function test_query_inexistent_database(): void
    method test_rename_database_with_people_property (line 210) | public function test_rename_database_with_people_property(): void
    method test_rename_database_page_with_people_property (line 223) | public function test_rename_database_page_with_people_property(): void
    method moviesDatabase (line 243) | private static function moviesDatabase(): Database
    method moviePage (line 283) | private static function moviePage(
    method bigDatabase (line 298) | private static function bigDatabase(): Database

FILE: tests/Integration/Helper.php
  class Helper (line 11) | final class Helper
    method client (line 13) | public static function client(): Notion
    method testPageId (line 26) | public static function testPageId(): string
    method newPage (line 36) | public static function newPage(): Page

FILE: tests/Integration/PagesTest.php
  class PagesTest (line 11) | class PagesTest extends TestCase
    method test_create_empty_page (line 13) | public function test_create_empty_page(): void
    method test_find_page (line 34) | public function test_find_page(): void
    method test_find_inexistent_page (line 43) | public function test_find_inexistent_page(): void
    method test_create_change_inexistent_parent (line 52) | public function test_create_change_inexistent_parent(): void
    method test_update_deleted_page (line 63) | public function test_update_deleted_page(): void

FILE: tests/Integration/SearchTest.php
  class SearchTest (line 8) | class SearchTest extends TestCase
    method test_search (line 10) | public function test_search(): void
    method test_search_all (line 23) | public function test_search_all(): void

FILE: tests/Integration/UsersTest.php
  class UsersTest (line 8) | class UsersTest extends TestCase
    method test_find_current_user (line 10) | public function test_find_current_user(): void
    method test_find_all_users (line 21) | public function test_find_all_users(): void
    method test_find_inexistent_user (line 30) | public function test_find_inexistent_user(): void

FILE: tests/Unit/Blocks/BlockMetadataTest.php
  class BlockMetadataTest (line 10) | class BlockMetadataTest extends TestCase
    method test_restore (line 12) | public function test_restore(): void
    method test_check_type (line 22) | public function test_check_type(): void

FILE: tests/Unit/Blocks/BookmarkTest.php
  class BookmarkTest (line 13) | class BookmarkTest extends TestCase
    method test_create_bookmark (line 15) | public function test_create_bookmark(): void
    method test_create_from_array (line 22) | public function test_create_from_array(): void
    method test_error_on_wrong_type (line 42) | public function test_error_on_wrong_type(): void
    method test_transform_in_array (line 59) | public function test_transform_in_array(): void
    method test_replace_url (line 76) | public function test_replace_url(): void
    method test_replace_caption (line 85) | public function test_replace_caption(): void
    method test_no_children_support (line 93) | public function test_no_children_support(): void
    method test_no_children_support_2 (line 102) | public function test_no_children_support_2(): void

FILE: tests/Unit/Blocks/BreadcrumbTest.php
  class BreadcrumbTest (line 12) | class BreadcrumbTest extends TestCase
    method test_create_breadcrumb (line 14) | public function test_create_breadcrumb(): void
    method test_create_from_array (line 21) | public function test_create_from_array(): void
    method test_error_on_wrong_type (line 39) | public function test_error_on_wrong_type(): void
    method test_transform_in_array (line 56) | public function test_transform_in_array(): void
    method test_no_children_support (line 73) | public function test_no_children_support(): void
    method test_no_children_support_2 (line 82) | public function test_no_children_support_2(): void
    method test_delete (line 91) | public function test_delete(): void

FILE: tests/Unit/Blocks/BulletedListItemTest.php
  class BulletedListItemTest (line 13) | class BulletedListItemTest extends TestCase
    method test_create_empty_item (line 15) | public function test_create_empty_item(): void
    method test_create_from_string (line 23) | public function test_create_from_string(): void
    method test_create_from_array (line 30) | public function test_create_from_array(): void
    method test_error_on_wrong_type (line 89) | public function test_error_on_wrong_type(): void
    method test_transform_in_array (line 109) | public function test_transform_in_array(): void
    method test_replace_text (line 145) | public function test_replace_text(): void
    method test_add_text (line 158) | public function test_add_text(): void
    method test_replace_children (line 170) | public function test_replace_children(): void
    method test_add_child (line 181) | public function test_add_child(): void
    method test_change_color (line 191) | public function test_change_color(): void

FILE: tests/Unit/Blocks/CalloutTest.php
  class CalloutTest (line 15) | class CalloutTest extends TestCase
    method test_create_empty_callout (line 17) | public function test_create_empty_callout(): void
    method test_create_from_string (line 25) | public function test_create_from_string(): void
    method test_create_from_array_change_emoji_icon (line 32) | public function test_create_from_array_change_emoji_icon(): void
    method test_create_from_array_change_icon_file (line 98) | public function test_create_from_array_change_icon_file(): void
    method test_error_on_wrong_type (line 162) | public function test_error_on_wrong_type(): void
    method test_error_on_wrong_icon_type (line 186) | public function test_error_on_wrong_icon_type(): void
    method test_transform_in_array (line 207) | public function test_transform_in_array(): void
    method test_replace_text (line 247) | public function test_replace_text(): void
    method test_add_text (line 260) | public function test_add_text(): void
    method test_replace_children (line 272) | public function test_replace_children(): void
    method test_add_child (line 283) | public function test_add_child(): void
    method test_replace_icon (line 293) | public function test_replace_icon(): void
    method test_replace_icon_file (line 303) | public function test_replace_icon_file(): void
    method test_change_color (line 313) | public function test_change_color(): void

FILE: tests/Unit/Blocks/ChildDatabaseTest.php
  class ChildDatabaseTest (line 11) | class ChildDatabaseTest extends TestCase
    method test_array_conversion (line 13) | public function test_array_conversion(): void
    method test_error_on_wrong_type (line 35) | public function test_error_on_wrong_type(): void
    method test_not_allow_to_change_children (line 52) | public function test_not_allow_to_change_children(): void
    method test_not_allow_to_add_child (line 63) | public function test_not_allow_to_add_child(): void
    method test_delete (line 74) | public function test_delete(): void
    method mockArray (line 83) | private function mockArray(): array

FILE: tests/Unit/Blocks/ChildPageTest.php
  class ChildPageTest (line 11) | class ChildPageTest extends TestCase
    method test_create_from_array (line 13) | public function test_create_from_array(): void
    method test_error_on_wrong_type (line 35) | public function test_error_on_wrong_type(): void
    method test_not_allow_to_change_children (line 52) | public function test_not_allow_to_change_children(): void
    method test_not_allow_to_add_child (line 63) | public function test_not_allow_to_add_child(): void
    method test_delete (line 74) | public function test_delete(): void
    method mockArray (line 83) | private function mockArray(): array

FILE: tests/Unit/Blocks/CodeTest.php
  class CodeTest (line 14) | class CodeTest extends TestCase
    method test_create_empty_code_block (line 16) | public function test_create_empty_code_block(): void
    method test_create_from_array (line 24) | public function test_create_from_array(): void
    method test_error_on_wrong_type (line 82) | public function test_error_on_wrong_type(): void
    method test_transform_in_array (line 104) | public function test_transform_in_array(): void
    method test_replace_text (line 143) | public function test_replace_text(): void
    method test_add_text (line 156) | public function test_add_text(): void
    method test_change_language (line 168) | public function test_change_language(): void
    method test_no_children_support (line 176) | public function test_no_children_support(): void
    method test_no_children_support_add (line 185) | public function test_no_children_support_add(): void
    method test_change_caption (line 194) | public function test_change_caption(): void

FILE: tests/Unit/Blocks/ColumnListTest.php
  class ColumnListTest (line 13) | class ColumnListTest extends TestCase
    method test_create (line 15) | public function test_create(): void
    method test_array_conversion (line 25) | public function test_array_conversion(): void
    method test_change_children (line 92) | public function test_change_children(): void
    method test_change_children_to_not_columns (line 101) | public function test_change_children_to_not_columns(): void
    method test_add_child (line 112) | public function test_add_child(): void
    method test_add_child_that_is_not_column (line 120) | public function test_add_child_that_is_not_column(): void
    method test_delete (line 129) | public function test_delete(): void

FILE: tests/Unit/Blocks/ColumnTest.php
  class ColumnTest (line 10) | class ColumnTest extends TestCase
    method test_create_column (line 12) | public function test_create_column(): void
    method test_create_change_child_column (line 20) | public function test_create_change_child_column(): void
    method test_add_child (line 28) | public function test_add_child(): void
    method test_change_child (line 38) | public function test_change_child(): void
    method test_array_conversion (line 48) | public function test_array_conversion(): void
    method test_delete (line 77) | public function test_delete(): void

FILE: tests/Unit/Blocks/DividerTest.php
  class DividerTest (line 12) | class DividerTest extends TestCase
    method test_create_divider (line 14) | public function test_create_divider(): void
    method test_create_from_array (line 21) | public function test_create_from_array(): void
    method test_error_on_wrong_type (line 39) | public function test_error_on_wrong_type(): void
    method test_transform_in_array (line 56) | public function test_transform_in_array(): void
    method test_no_children_support (line 73) | public function test_no_children_support(): void
    method test_no_children_support_2 (line 82) | public function test_no_children_support_2(): void

FILE: tests/Unit/Blocks/EmbedTest.php
  class EmbedTest (line 12) | class EmbedTest extends TestCase
    method test_create_embed (line 14) | public function test_create_embed(): void
    method test_create_from_array (line 21) | public function test_create_from_array(): void
    method test_error_on_wrong_type (line 41) | public function test_error_on_wrong_type(): void
    method test_transform_in_array (line 58) | public function test_transform_in_array(): void
    method test_replace_url (line 75) | public function test_replace_url(): void
    method test_no_children_support (line 84) | public function test_no_children_support(): void
    method test_no_children_support_2 (line 93) | public function test_no_children_support_2(): void
    method test_delete (line 102) | public function test_delete(): void

FILE: tests/Unit/Blocks/EquationBlockTest.php
  class EquationBlockTest (line 13) | class EquationBlockTest extends TestCase
    method test_create_equation (line 15) | public function test_create_equation(): void
    method test_create_from_array (line 22) | public function test_create_from_array(): void
    method test_error_on_wrong_type (line 42) | public function test_error_on_wrong_type(): void
    method test_transform_in_array (line 59) | public function test_transform_in_array(): void
    method test_replace_equation (line 76) | public function test_replace_equation(): void
    method test_no_children_support (line 84) | public function test_no_children_support(): void
    method test_no_children_support_2 (line 93) | public function test_no_children_support_2(): void

FILE: tests/Unit/Blocks/FileBlockTest.php
  class FileBlockTest (line 13) | class FileBlockTest extends TestCase
    method test_create_file (line 15) | public function test_create_file(): void
    method test_create_from_array (line 23) | public function test_create_from_array(): void
    method test_error_on_wrong_type (line 48) | public function test_error_on_wrong_type(): void
    method test_transform_in_array (line 70) | public function test_transform_in_array(): void
    method test_replace_file (line 93) | public function test_replace_file(): void
    method test_no_children_support (line 105) | public function test_no_children_support(): void
    method test_no_children_support_2 (line 115) | public function test_no_children_support_2(): void
    method test_delete (line 125) | public function test_delete(): void

FILE: tests/Unit/Blocks/Heading1Test.php
  class Heading1Test (line 15) | class Heading1Test extends TestCase
    method test_create_empty_heading (line 17) | public function test_create_empty_heading(): void
    method test_create_from_string (line 24) | public function test_create_from_string(): void
    method test_create_from_array (line 31) | public function test_create_from_array(): void
    method test_error_on_wrong_type (line 92) | public function test_error_on_wrong_type(): void
    method test_transform_in_array (line 112) | public function test_transform_in_array(): void
    method test_replace_text (line 149) | public function test_replace_text(): void
    method test_add_text (line 162) | public function test_add_text(): void
    method test_no_children_support (line 174) | public function test_no_children_support(): void
    method test_togglify (line 183) | public function test_togglify(): void
    method test_untogglify (line 191) | public function test_untogglify(): void
    method test_untogglify_with_children (line 198) | public function test_untogglify_with_children(): void
    method test_change_children_from_toggleable_heading (line 208) | public function test_change_children_from_toggleable_heading(): void
    method test_add_child_to_untoggleable_heading (line 220) | public function test_add_child_to_untoggleable_heading(): void
    method test_toggleable_array_conversion (line 227) | public function test_toggleable_array_conversion(): void
    method test_change_color (line 294) | public function test_change_color(): void

FILE: tests/Unit/Blocks/Heading2Test.php
  class Heading2Test (line 15) | class Heading2Test extends TestCase
    method test_create_empty_heading (line 17) | public function test_create_empty_heading(): void
    method test_create_from_string (line 24) | public function test_create_from_string(): void
    method test_create_from_array (line 31) | public function test_create_from_array(): void
    method test_error_on_wrong_type (line 92) | public function test_error_on_wrong_type(): void
    method test_transform_in_array (line 112) | public function test_transform_in_array(): void
    method test_replace_text (line 149) | public function test_replace_text(): void
    method test_add_text (line 162) | public function test_add_text(): void
    method test_no_children_support (line 174) | public function test_no_children_support(): void
    method test_togglify (line 183) | public function test_togglify(): void
    method test_untogglify (line 191) | public function test_untogglify(): void
    method test_untogglify_with_children (line 198) | public function test_untogglify_with_children(): void
    method test_change_children_from_toggleable_heading (line 208) | public function test_change_children_from_toggleable_heading(): void
    method test_add_child_to_untoggleable_heading (line 220) | public function test_add_child_to_untoggleable_heading(): void
    method test_toggleable_array_conversion (line 227) | public function test_toggleable_array_conversion(): void
    method test_change_color (line 294) | public function test_change_color(): void

FILE: tests/Unit/Blocks/Heading3Test.php
  class Heading3Test (line 15) | class Heading3Test extends TestCase
    method test_create_empty_heading (line 17) | public function test_create_empty_heading(): void
    method test_create_from_string (line 24) | public function test_create_from_string(): void
    method test_create_from_array (line 31) | public function test_create_from_array(): void
    method test_error_on_wrong_type (line 92) | public function test_error_on_wrong_type(): void
    method test_transform_in_array (line 112) | public function test_transform_in_array(): void
    method test_replace_text (line 149) | public function test_replace_text(): void
    method test_add_text (line 162) | public function test_add_text(): void
    method test_no_children_support (line 174) | public function test_no_children_support(): void
    method test_togglify (line 183) | public function test_togglify(): void
    method test_untogglify (line 191) | public function test_untogglify(): void
    method test_untogglify_with_children (line 198) | public function test_untogglify_with_children(): void
    method test_change_children_from_toggleable_heading (line 208) | public function test_change_children_from_toggleable_heading(): void
    method test_add_child_to_untoggleable_heading (line 220) | public function test_add_child_to_untoggleable_heading(): void
    method test_toggleable_array_conversion (line 227) | public function test_toggleable_array_conversion(): void
    method test_change_color (line 294) | public function test_change_color(): void

FILE: tests/Unit/Blocks/ImageTest.php
  class ImageTest (line 14) | class ImageTest extends TestCase
    method test_create_image (line 16) | public function test_create_image(): void
    method test_create_from_array (line 24) | public function test_create_from_array(): void
    method test_error_on_wrong_type (line 49) | public function test_error_on_wrong_type(): void
    method test_transform_in_array (line 71) | public function test_transform_in_array(): void
    method test_replace_file (line 94) | public function test_replace_file(): void
    method test_no_children_support (line 106) | public function test_no_children_support(): void
    method test_no_children_support_2 (line 116) | public function test_no_children_support_2(): void
    method test_delete (line 126) | public function test_delete(): void
    method test_change_caption (line 136) | public function test_change_caption(): void

FILE: tests/Unit/Blocks/LinkPreviewTest.php
  class LinkPreviewTest (line 11) | class LinkPreviewTest extends TestCase
    method test_array_conversion (line 13) | public function test_array_conversion(): void
    method test_from_invalid_type (line 37) | public function test_from_invalid_type(): void
    method test_create_change_factory (line 56) | public function test_create_change_factory(): void
    method test_no_children_support (line 76) | public function test_no_children_support(): void
    method test_no_children_support_2 (line 98) | public function test_no_children_support_2(): void
    method test_delete (line 120) | public function test_delete(): void

FILE: tests/Unit/Blocks/NumberedListItemTest.php
  class NumberedListItemTest (line 13) | class NumberedListItemTest extends TestCase
    method test_create_empty_item (line 15) | public function test_create_empty_item(): void
    method test_create_from_string (line 23) | public function test_create_from_string(): void
    method test_create_from_array (line 30) | public function test_create_from_array(): void
    method test_error_on_wrong_type (line 89) | public function test_error_on_wrong_type(): void
    method test_transform_in_array (line 109) | public function test_transform_in_array(): void
    method test_replace_text (line 145) | public function test_replace_text(): void
    method test_add_text (line 158) | public function test_add_text(): void
    method test_replace_children (line 170) | public function test_replace_children(): void
    method test_add_child (line 181) | public function test_add_child(): void
    method test_change_color (line 191) | public function test_change_color(): void

FILE: tests/Unit/Blocks/ParagraphTest.php
  class ParagraphTest (line 13) | class ParagraphTest extends TestCase
    method test_create_empty_paragraph (line 15) | public function test_create_empty_paragraph(): void
    method test_create_from_string (line 23) | public function test_create_from_string(): void
    method test_create_from_array (line 30) | public function test_create_from_array(): void
    method test_error_on_wrong_type (line 90) | public function test_error_on_wrong_type(): void
    method test_transform_in_array (line 109) | public function test_transform_in_array(): void
    method test_replace_text (line 145) | public function test_replace_text(): void
    method test_add_text (line 158) | public function test_add_text(): void
    method test_replace_children (line 170) | public function test_replace_children(): void
    method test_add_child (line 181) | public function test_add_child(): void
    method test_change_color (line 191) | public function test_change_color(): void

FILE: tests/Unit/Blocks/PdfTest.php
  class PdfTest (line 13) | class PdfTest extends TestCase
    method test_create_pdf (line 15) | public function test_create_pdf(): void
    method test_create_from_array (line 23) | public function test_create_from_array(): void
    method test_error_on_wrong_type (line 48) | public function test_error_on_wrong_type(): void
    method test_transform_in_array (line 70) | public function test_transform_in_array(): void
    method test_replace_file (line 93) | public function test_replace_file(): void
    method test_no_children_support (line 105) | public function test_no_children_support(): void
    method test_no_children_support_2 (line 115) | public function test_no_children_support_2(): void
    method test_delete (line 125) | public function test_delete(): void

FILE: tests/Unit/Blocks/QuoteTest.php
  class QuoteTest (line 13) | class QuoteTest extends TestCase
    method test_create_empty_quote (line 15) | public function test_create_empty_quote(): void
    method test_create_from_string (line 23) | public function test_create_from_string(): void
    method test_create_from_array (line 30) | public function test_create_from_array(): void
    method test_error_on_wrong_type (line 89) | public function test_error_on_wrong_type(): void
    method test_transform_in_array (line 109) | public function test_transform_in_array(): void
    method test_replace_text (line 145) | public function test_replace_text(): void
    method test_add_text (line 158) | public function test_add_text(): void
    method test_replace_children (line 170) | public function test_replace_children(): void
    method test_add_child (line 181) | public function test_add_child(): void
    method test_delete (line 191) | public function test_delete(): void
    method test_change_color (line 199) | public function test_change_color(): void

FILE: tests/Unit/Blocks/Renderer/Markdown/BookmarkRendererTest.php
  class BookmarkRendererTest (line 11) | class BookmarkRendererTest extends TestCase
    method test_render (line 13) | public function test_render(): void
    method test_invalid_block (line 24) | public function test_invalid_block(): void

FILE: tests/Unit/Blocks/Renderer/Markdown/BreadcrumbRendererTest.php
  class BreadcrumbRendererTest (line 10) | class BreadcrumbRendererTest extends TestCase
    method test_render (line 12) | public function test_render(): void
    method test_invalid_block (line 24) | public function test_invalid_block(): void

FILE: tests/Unit/Blocks/Renderer/Markdown/BulletedListItemRendererTest.php
  class BulletedListItemRendererTest (line 10) | class BulletedListItemRendererTest extends TestCase
    method test_render (line 12) | public function test_render(): void
    method test_invalid_block (line 32) | public function test_invalid_block(): void

FILE: tests/Unit/Blocks/Renderer/Markdown/CalloutRendererTest.php
  class CalloutRendererTest (line 11) | class CalloutRendererTest extends TestCase
    method test_render (line 13) | public function test_render(): void
    method test_invalid_block (line 30) | public function test_invalid_block(): void

FILE: tests/Unit/Blocks/Renderer/Markdown/ChildDatabaseRendererTest.php
  class ChildDatabaseRendererTest (line 10) | class ChildDatabaseRendererTest extends TestCase
    method test_render (line 12) | public function test_render(): void
    method test_invalid_block (line 34) | public function test_invalid_block(): void

FILE: tests/Unit/Blocks/Renderer/Markdown/ChildPageRendererTest.php
  class ChildPageRendererTest (line 10) | class ChildPageRendererTest extends TestCase
    method test_render (line 12) | public function test_render(): void
    method test_invalid_block (line 34) | public function test_invalid_block(): void

FILE: tests/Unit/Blocks/Renderer/Markdown/CodeRendererTest.php
  class CodeRendererTest (line 11) | class CodeRendererTest extends TestCase
    method test_render (line 13) | public function test_render(): void
    method test_invalid_block (line 31) | public function test_invalid_block(): void

FILE: tests/Unit/Blocks/Renderer/Markdown/ColumnRendererTest.php
  class ColumnRendererTest (line 13) | class ColumnRendererTest extends TestCase
    method test_render (line 15) | public function test_render(): void
    method test_invalid_block (line 44) | public function test_invalid_block(): void
    method test_invalid_block_column_list (line 51) | public function test_invalid_block_column_list(): void

FILE: tests/Unit/Blocks/Renderer/Markdown/DividerRendererTest.php
  class DividerRendererTest (line 10) | class DividerRendererTest extends TestCase
    method test_render (line 12) | public function test_render(): void
    method test_invalid_block (line 23) | public function test_invalid_block(): void

FILE: tests/Unit/Blocks/Renderer/Markdown/EmbedRendererTest.php
  class EmbedRendererTest (line 10) | class EmbedRendererTest extends TestCase
    method test_render (line 12) | public function test_render(): void
    method test_invalid_block (line 23) | public function test_invalid_block(): void

FILE: tests/Unit/Blocks/Renderer/Markdown/EquationRendererTest.php
  class EquationRendererTest (line 10) | class EquationRendererTest extends TestCase
    method test_render (line 12) | public function test_render(): void
    method test_invalid_block (line 23) | public function test_invalid_block(): void

FILE: tests/Unit/Blocks/Renderer/Markdown/FileRendererTest.php
  class FileRendererTest (line 11) | class FileRendererTest extends TestCase
    method test_render (line 13) | public function test_render(): void
    method test_invalid_block (line 24) | public function test_invalid_block(): void

FILE: tests/Unit/Blocks/Renderer/Markdown/Heading1RendererTest.php
  class Heading1RendererTest (line 10) | class Heading1RendererTest extends TestCase
    method test_render (line 12) | public function test_render(): void
    method test_invalid_block (line 25) | public function test_invalid_block(): void

FILE: tests/Unit/Blocks/Renderer/Markdown/Heading2RendererTest.php
  class Heading2RendererTest (line 10) | class Heading2RendererTest extends TestCase
    method test_render (line 12) | public function test_render(): void
    method test_invalid_block (line 25) | public function test_invalid_block(): void

FILE: tests/Unit/Blocks/Renderer/Markdown/Heading3RendererTest.php
  class Heading3RendererTest (line 10) | class Heading3RendererTest extends TestCase
    method test_render (line 12) | public function test_render(): void
    method test_invalid_block (line 25) | public function test_invalid_block(): void

FILE: tests/Unit/Blocks/Renderer/Markdown/ImageRendererTest.php
  class ImageRendererTest (line 11) | class ImageRendererTest extends TestCase
    method test_render (line 13) | public function test_render(): void
    method test_invalid_block (line 24) | public function test_invalid_block(): void

FILE: tests/Unit/Blocks/Renderer/Markdown/LinkPreviewRendererTest.php
  class LinkPreviewRendererTest (line 10) | class LinkPreviewRendererTest extends TestCase
    method test_render (line 12) | public function test_render(): void
    method test_invalid_block (line 33) | public function test_invalid_block(): void

FILE: tests/Unit/Blocks/Renderer/Markdown/NumberedListItemRendererTest.php
  class NumberedListItemRendererTest (line 10) | class NumberedListItemRendererTest extends TestCase
    method test_render (line 12) | public function test_render(): void
    method test_invalid_block (line 32) | public function test_invalid_block(): void

FILE: tests/Unit/Blocks/Renderer/Markdown/ParagraphRendererTest.php
  class ParagraphRendererTest (line 12) | class ParagraphRendererTest extends TestCase
    method test_render (line 14) | public function test_render(): void
    method test_invalid_block (line 39) | public function test_invalid_block(): void

FILE: tests/Unit/Blocks/Renderer/Markdown/PdfRendererTest.php
  class PdfRendererTest (line 11) | class PdfRendererTest extends TestCase
    method test_render (line 13) | public function test_render(): void
    method test_invalid_block (line 24) | public function test_invalid_block(): void

FILE: tests/Unit/Blocks/Renderer/Markdown/QuoteRendererTest.php
  class QuoteRendererTest (line 11) | class QuoteRendererTest extends TestCase
    method test_render (line 13) | public function test_render(): void
    method test_invalid_block (line 30) | public function test_invalid_block(): void

FILE: tests/Unit/Blocks/Renderer/Markdown/TableOfContentsRendererTest.php
  class TableOfContentsRendererTest (line 10) | class TableOfContentsRendererTest extends TestCase
    method test_render (line 12) | public function test_render(): void
    method test_invalid_block (line 23) | public function test_invalid_block(): void

FILE: tests/Unit/Blocks/Renderer/Markdown/ToDoRendererTest.php
  class ToDoRendererTest (line 10) | class ToDoRendererTest extends TestCase
    method test_render (line 12) | public function test_render(): void
    method test_invalid_block (line 31) | public function test_invalid_block(): void

FILE: tests/Unit/Blocks/Renderer/Markdown/ToggleRendererTest.php
  class ToggleRendererTest (line 11) | class ToggleRendererTest extends TestCase
    method test_render (line 13) | public function test_render(): void
    method test_invalid_block (line 31) | public function test_invalid_block(): void

FILE: tests/Unit/Blocks/Renderer/Markdown/VideoRendererTest.php
  class VideoRendererTest (line 11) | class VideoRendererTest extends TestCase
    method test_render (line 13) | public function test_render(): void
    method test_invalid_block (line 24) | public function test_invalid_block(): void

FILE: tests/Unit/Blocks/Renderer/MarkdownRendererTest.php
  class MarkdownRendererTest (line 14) | class MarkdownRendererTest extends TestCase
    method test_render (line 16) | public function test_render(): void
    method test_render_with_overrides (line 47) | public function test_render_with_overrides(): void

FILE: tests/Unit/Blocks/TableOfContentsTest.php
  class TableOfContentsTest (line 13) | class TableOfContentsTest extends TestCase
    method test_create_table_of_contents (line 15) | public function test_create_table_of_contents(): void
    method test_create_from_array (line 22) | public function test_create_from_array(): void
    method test_error_on_wrong_type (line 42) | public function test_error_on_wrong_type(): void
    method test_transform_in_array (line 59) | public function test_transform_in_array(): void
    method test_no_children_support (line 76) | public function test_no_children_support(): void
    method test_no_children_support_2 (line 85) | public function test_no_children_support_2(): void
    method test_change_color (line 94) | public function test_change_color(): void

FILE: tests/Unit/Blocks/TableTest.php
  class TableTest (line 11) | class TableTest extends TestCase
    method test_crate_empty_table (line 13) | public function test_crate_empty_table(): void
    method test_change_width (line 24) | public function test_change_width(): void
    method test_enable_column_header (line 31) | public function test_enable_column_header(): void
    method test_disable_column_header (line 38) | public function test_disable_column_header(): void
    method test_enable_row_header (line 45) | public function test_enable_row_header(): void
    method test_disable_row_header (line 52) | public function test_disable_row_header(): void
    method test_change_rows (line 59) | public function test_change_rows(): void
    method test_add_row (line 74) | public function test_add_row(): void
    method test_remove_all_rows (line 85) | public function test_remove_all_rows(): void
    method test_delete (line 97) | public function test_delete(): void
    method test_delete_row (line 106) | public function test_delete_row(): void
    method createRow (line 120) | private function createRow(string $col1, string $col2): TableRow

FILE: tests/Unit/Blocks/ToDoTest.php
  class ToDoTest (line 13) | class ToDoTest extends TestCase
    method test_create_empty_to_do (line 15) | public function test_create_empty_to_do(): void
    method test_create_from_string (line 24) | public function test_create_from_string(): void
    method test_create_from_array (line 31) | public function test_create_from_array(): void
    method test_error_on_wrong_type (line 92) | public function test_error_on_wrong_type(): void
    method test_transform_in_array (line 113) | public function test_transform_in_array(): void
    method test_replace_text (line 150) | public function test_replace_text(): void
    method test_add_text (line 163) | public function test_add_text(): void
    method test_replace_children (line 175) | public function test_replace_children(): void
    method test_add_child (line 186) | public function test_add_child(): void
    method test_check_item (line 196) | public function test_check_item(): void
    method test_uncheck_item (line 204) | public function test_uncheck_item(): void
    method test_change_color (line 211) | public function test_change_color(): void

FILE: tests/Unit/Blocks/ToggleTest.php
  class ToggleTest (line 13) | class ToggleTest extends TestCase
    method test_create_empty_toggle (line 15) | public function test_create_empty_toggle(): void
    method test_create_from_string (line 23) | public function test_create_from_string(): void
    method test_create_from_array (line 30) | public function test_create_from_array(): void
    method test_error_on_wrong_type (line 89) | public function test_error_on_wrong_type(): void
    method test_transform_in_array (line 108) | public function test_transform_in_array(): void
    method test_replace_text (line 144) | public function test_replace_text(): void
    method test_add_text (line 157) | public function test_add_text(): void
    method test_replace_children (line 169) | public function test_replace_children(): void
    method test_add_child (line 180) | public function test_add_child(): void
    method test_change_color (line 190) | public function test_change_color(): void

FILE: tests/Unit/Blocks/UnknownTest.php
  class UnknownTest (line 11) | class UnknownTest extends TestCase
    method test_deserilaize (line 25) | public function test_deserilaize(): void
    method test_delete (line 34) | public function test_delete(): void
    method test_add_child (line 41) | public function test_add_child(): void
    method test_change_children (line 52) | public function test_change_children(): void

FILE: tests/Unit/Blocks/VideoTest.php
  class VideoTest (line 13) | class VideoTest extends TestCase
    method test_create_video (line 15) | public function test_create_video(): void
    method test_create_from_array (line 23) | public function test_create_from_array(): void
    method test_error_on_wrong_type (line 48) | public function test_error_on_wrong_type(): void
    method test_transform_in_array (line 70) | public function test_transform_in_array(): void
    method test_replace_file (line 93) | public function test_replace_file(): void
    method test_no_children_support (line 105) | public function test_no_children_support(): void
    method test_no_children_support_2 (line 115) | public function test_no_children_support_2(): void
    method test_delete (line 125) | public function test_delete(): void

FILE: tests/Unit/Comments/CommentTest.php
  class CommentTest (line 10) | class CommentTest extends TestCase
    method test_create_page_comment (line 12) | public function test_create_page_comment(): void
    method test_create_disscussion_comment (line 23) | public function test_create_disscussion_comment(): void
    method test_array_conversion_parent (line 33) | public function test_array_conversion_parent(): void
    method test_array_conversion_discussion (line 71) | public function test_array_conversion_discussion(): void

FILE: tests/Unit/Common/AnnotationsTest.php
  class AnnotationsTest (line 9) | class AnnotationsTest extends TestCase
    method test_without_annotations (line 11) | public function test_without_annotations(): void
    method test_bold (line 23) | public function test_bold(): void
    method test_italic (line 30) | public function test_italic(): void
    method test_strike_through (line 37) | public function test_strike_through(): void
    method test_underline (line 44) | public function test_underline(): void
    method test_code (line 51) | public function test_code(): void
    method test_change_color (line 58) | public function test_change_color(): void

FILE: tests/Unit/Common/DateTest.php
  class DateTest (line 9) | class DateTest extends TestCase
    method test_array_conversion (line 11) | public function test_array_conversion(): void
    method test_create_date (line 22) | public function test_create_date(): void
    method test_create_range (line 32) | public function test_create_range(): void
    method test_change_start (line 43) | public function test_change_start(): void
    method test_change_end (line 53) | public function test_change_end(): void
    method test_remove_end (line 63) | public function test_remove_end(): void
    method test_now (line 73) | public function test_now(): void

FILE: tests/Unit/Common/EquationTest.php
  class EquationTest (line 8) | class EquationTest extends TestCase
    method test_array_conversion (line 10) | public function test_array_conversion(): void
    method test_create_from_expression (line 21) | public function test_create_from_expression(): void

FILE: tests/Unit/Common/FileTest.php
  class FileTest (line 11) | class FileTest extends TestCase
    method test_create_internal (line 13) | public function test_create_internal(): void
    method test_create_external (line 24) | public function test_create_external(): void
    method test_intenral_array_conversion (line 34) | public function test_intenral_array_conversion(): void
    method test_external_array_conversion (line 49) | public function test_external_array_conversion(): void
    method test_change_url (line 75) | public function test_change_url(): void
    method test_change_name (line 82) | public function test_change_name(): void
    method test_change_caption (line 89) | public function test_change_caption(): void

FILE: tests/Unit/Common/IconTest.php
  class IconTest (line 9) | class IconTest extends TestCase
    method test_icon_from_file_array_conversion (line 11) | public function test_icon_from_file_array_conversion(): void

FILE: tests/Unit/Common/MentionTest.php
  class MentionTest (line 12) | class MentionTest extends TestCase
    method test_mention_page (line 14) | public function test_mention_page(): void
    method test_mention_database (line 23) | public function test_mention_database(): void
    method test_mention_user (line 31) | public function test_mention_user(): void
    method test_mention_date (line 48) | public function test_mention_date(): void
    method test_page_array_conversion (line 57) | public function test_page_array_conversion(): void
    method test_database_array_conversion (line 68) | public function test_database_array_conversion(): void
    method test_user_array_conversion (line 79) | public function test_user_array_conversion(): void
    method test_date_array_conversion (line 97) | public function test_date_array_conversion(): void

FILE: tests/Unit/Common/ParentBlockTest.php
  class ParentBlockTest (line 9) | class ParentBlockTest extends TestCase
    method test_page (line 11) | public function test_page(): void
    method test_database (line 20) | public function test_database(): void
    method test_block (line 29) | public function test_block(): void
    method test_workspace (line 38) | public function test_workspace(): void
    method test_array_conversion_page (line 46) | public function test_array_conversion_page(): void
    method test_array_conversion_database (line 57) | public function test_array_conversion_database(): void
    method test_array_conversion_block (line 68) | public function test_array_conversion_block(): void
    method test_array_conversion_workspace (line 79) | public function test_array_conversion_workspace(): void

FILE: tests/Unit/Common/RichTextTest.php
  class RichTextTest (line 14) | class RichTextTest extends TestCase
    method test_create_text (line 16) | public function test_create_text(): void
    method test_create_link (line 24) | public function test_create_link(): void
    method test_create_from_text (line 35) | public function test_create_from_text(): void
    method test_create_from_equation (line 46) | public function test_create_from_equation(): void
    method test_create_from_mention (line 55) | public function test_create_from_mention(): void
    method test_change_to_bold (line 64) | public function test_change_to_bold(): void
    method test_change_to_italic (line 71) | public function test_change_to_italic(): void
    method test_change_to_strike_through (line 78) | public function test_change_to_strike_through(): void
    method test_change_to_underline (line 85) | public function test_change_to_underline(): void
    method test_change_to_code (line 92) | public function test_change_to_code(): void
    method test_change_color (line 99) | public function test_change_color(): void
    method test_change_href (line 106) | public function test_change_href(): void
    method test_mention_array_conversion (line 113) | public function test_mention_array_conversion(): void
    method test_equation_array_conversion (line 138) | public function test_equation_array_conversion(): void

FILE: tests/Unit/Common/TextTest.php
  class TextTest (line 8) | class TextTest extends TestCase
    method test_create_text (line 10) | public function test_create_text(): void
    method test_change_text (line 17) | public function test_change_text(): void
    method test_change_url (line 24) | public function test_change_url(): void
    method test_remove_url (line 31) | public function test_remove_url(): void
    method test_convert_test_with_url_to_array (line 40) | public function test_convert_test_with_url_to_array(): void

FILE: tests/Unit/ConfigurationTest.php
  class ConfigurationTest (line 11) | final class ConfigurationTest extends TestCase
    method test_create_default_configuration (line 13) | public function test_create_default_configuration(): void
    method test_create_from_psr_implementations (line 24) | public function test_create_from_psr_implementations(): void
    method test_enable_retry_on_conflict (line 36) | public function test_enable_retry_on_conflict(): void
    method test_disable_retry_on_conflict (line 44) | public function test_disable_retry_on_conflict(): void

FILE: tests/Unit/Databases/DatabaseParentTest.php
  class DatabaseParentTest (line 8) | class DatabaseParentTest extends TestCase
    method test_create_parent_page (line 10) | public function test_create_parent_page(): void
    method test_create_parent_workspace (line 18) | public function test_create_parent_workspace(): void
    method test_create_parent_block (line 26) | public function test_create_parent_block(): void
    method test_page_array_conversion (line 34) | public function test_page_array_conversion(): void
    method test_workspace_array_conversion (line 45) | public function test_workspace_array_conversion(): void
    method test_block_array_conversion (line 56) | public function test_block_array_conversion(): void
    method test_invalid_type_array (line 67) | public function test_invalid_type_array(): void

FILE: tests/Unit/Databases/DatabaseTest.php
  class DatabaseTest (line 18) | class DatabaseTest extends TestCase
    method test_create_database (line 20) | public function test_create_database(): void
    method test_add_title (line 29) | public function test_add_title(): void
    method test_add_advanced_title (line 37) | public function test_add_advanced_title(): void
    method test_add_icon (line 47) | public function test_add_icon(): void
    method test_add_file_icon (line 60) | public function test_add_file_icon(): void
    method test_remove_icon (line 70) | public function test_remove_icon(): void
    method test_add_cover (line 81) | public function test_add_cover(): void
    method test_remove_cover (line 90) | public function test_remove_cover(): void
    method test_move_page (line 99) | public function test_move_page(): void
    method test_error_change_internal_cover_image (line 108) | public function test_error_change_internal_cover_image(): void
    method test_replace_properties (line 118) | public function test_replace_properties(): void
    method test_add_property (line 129) | public function test_add_property(): void
    method test_change_property (line 140) | public function test_change_property(): void
    method test_remove_property (line 155) | public function test_remove_property(): void
    method test_array_conversion (line 167) | public function test_array_conversion(): void
    method test_from_array_change_emoji_icon (line 238) | public function test_from_array_change_emoji_icon(): void
    method test_from_array_change_file_icon (line 287) | public function test_from_array_change_file_icon(): void
    method test_inline (line 336) | public function test_inline(): void

FILE: tests/Unit/Databases/Properties/CheckboxTest.php
  class CheckboxTest (line 10) | class CheckboxTest extends TestCase
    method test_create (line 12) | public function test_create(): void
    method test_array_conversion (line 20) | public function test_array_conversion(): void

FILE: tests/Unit/Databases/Properties/CreatedByTest.php
  class CreatedByTest (line 10) | class CreatedByTest extends TestCase
    method test_create (line 12) | public function test_create(): void
    method test_array_conversion (line 20) | public function test_array_conversion(): void

FILE: tests/Unit/Databases/Properties/CreatedTimeTest.php
  class CreatedTimeTest (line 10) | class CreatedTimeTest extends TestCase
    method test_create (line 12) | public function test_create(): void
    method test_array_conversion (line 20) | public function test_array_conversion(): void

FILE: tests/Unit/Databases/Properties/DateTest.php
  class DateTest (line 10) | class DateTest extends TestCase
    method test_create (line 12) | public function test_create(): void
    method test_array_conversion (line 20) | public function test_array_conversion(): void

FILE: tests/Unit/Databases/Properties/EmailTest.php
  class EmailTest (line 10) | class EmailTest extends TestCase
    method test_create (line 12) | public function test_create(): void
    method test_array_conversion (line 20) | public function test_array_conversion(): void

FILE: tests/Unit/Databases/Properties/FilesTest.php
  class FilesTest (line 10) | class FilesTest extends TestCase
    method test_create (line 12) | public function test_create(): void
    method test_array_conversion (line 20) | public function test_array_conversion(): void

FILE: tests/Unit/Databases/Properties/FormulaTest.php
  class FormulaTest (line 10) | class FormulaTest extends TestCase
    method test_create (line 12) | public function test_create(): void
    method test_change_expression (line 22) | public function test_change_expression(): void
    method test_array_conversion (line 30) | public function test_array_conversion(): void

FILE: tests/Unit/Databases/Properties/LastEditedByTest.php
  class LastEditedByTest (line 10) | class LastEditedByTest extends TestCase
    method test_create (line 12) | public function test_create(): void
    method test_array_conversion (line 20) | public function test_array_conversion(): void

FILE: tests/Unit/Databases/Properties/LastEditedTimeTest.php
  class LastEditedTimeTest (line 10) | class LastEditedTimeTest extends TestCase
    method test_create (line 12) | public function test_create(): void
    method test_array_conversion (line 20) | public function test_array_conversion(): void

FILE: tests/Unit/Databases/Properties/MultiSelectTest.php
  class MultiSelectTest (line 11) | class MultiSelectTest extends TestCase
    method test_create (line 13) | public function test_create(): void
    method test_replace_options (line 22) | public function test_replace_options(): void
    method test_add_option (line 32) | public function test_add_option(): void
    method test_array_conversion (line 40) | public function test_array_conversion(): void

FILE: tests/Unit/Databases/Properties/NumberTest.php
  class NumberTest (line 11) | class NumberTest extends TestCase
    method test_create (line 13) | public function test_create(): void
    method test_array_conversion (line 22) | public function test_array_conversion(): void
    method test_change_format (line 39) | public function test_change_format(): void

FILE: tests/Unit/Databases/Properties/PeopleTest.php
  class PeopleTest (line 10) | class PeopleTest extends TestCase
    method test_create (line 12) | public function test_create(): void
    method test_array_conversion (line 20) | public function test_array_conversion(): void

FILE: tests/Unit/Databases/Properties/PhoneNumberTest.php
  class PhoneNumberTest (line 10) | class PhoneNumberTest extends TestCase
    method test_create (line 12) | public function test_create(): void
    method test_array_conversion (line 20) | public function test_array_conversion(): void

FILE: tests/Unit/Databases/Properties/PropertyCollectionTest.php
  class PropertyCollectionTest (line 12) | class PropertyCollectionTest extends TestCase
    method test_create (line 14) | public function test_create(): void
    method test_add (line 24) | public function test_add(): void
    method test_change (line 34) | public function test_change(): void
    method test_remove (line 44) | public function test_remove(): void
    method test_get (line 54) | public function test_get(): void
    method test_get_not_found (line 63) | public function test_get_not_found(): void
    method test_get_by_id (line 72) | public function test_get_by_id(): void
    method test_get_by_id_not_found (line 88) | public function test_get_by_id_not_found(): void
    method test_get_checkbox (line 97) | public function test_get_checkbox(): void
    method test_get_created_by (line 106) | public function test_get_created_by(): void
    method test_get_created_time (line 115) | public function test_get_created_time(): void
    method test_get_date (line 124) | public function test_get_date(): void
    method test_get_email (line 133) | public function test_get_email(): void
    method test_get_files (line 142) | public function test_get_files(): void
    method test_get_formula (line 151) | public function test_get_formula(): void
    method test_get_last_edited_by (line 160) | public function test_get_last_edited_by(): void
    method test_get_last_edited_time (line 169) | public function test_get_last_edited_time(): void
    method test_get_multi_select (line 178) | public function test_get_multi_select(): void
    method test_get_number (line 187) | public function test_get_number(): void
    method test_get_people (line 196) | public function test_get_people(): void
    method test_get_phone_number (line 205) | public function test_get_phone_number(): void
    method test_get_relation (line 214) | public function test_get_relation(): void
    method test_get_rich_text (line 223) | public function test_get_rich_text(): void
    method test_get_select (line 232) | public function test_get_select(): void
    method test_get_status (line 241) | public function test_get_status(): void
    method test_get_title (line 266) | public function test_get_title(): void
    method test_get_url (line 275) | public function test_get_url(): void
    method test_get_checkbox_by_id (line 286) | public function test_get_checkbox_by_id(): void
    method test_get_created_by_by_id (line 300) | public function test_get_created_by_by_id(): void
    method test_get_created_time_by_id (line 314) | public function test_get_created_time_by_id(): void
    method test_get_date_by_id (line 328) | public function test_get_date_by_id(): void
    method test_get_email_by_id (line 342) | public function test_get_email_by_id(): void
    method test_get_files_by_id (line 356) | public function test_get_files_by_id(): void
    method test_get_formula_by_id (line 370) | public function test_get_formula_by_id(): void
    method test_get_last_edited_by_by_id (line 386) | public function test_get_last_edited_by_by_id(): void
    method test_get_last_edited_time_by_id (line 400) | public function test_get_last_edited_time_by_id(): void
    method test_get_multi_select_by_id (line 414) | public function test_get_multi_select_by_id(): void
    method test_get_number_by_id (line 433) | public function test_get_number_by_id(): void
    method test_get_people_by_id (line 449) | public function test_get_people_by_id(): void
    method test_get_phone_number_by_id (line 463) | public function test_get_phone_number_by_id(): void
    method test_get_relation_by_id (line 477) | public function test_get_relation_by_id(): void
    method test_get_rich_text_by_id (line 495) | public function test_get_rich_text_by_id(): void
    method test_get_select_by_id (line 509) | public function test_get_select_by_id(): void
    method test_get_status_by_id (line 528) | public function test_get_status_by_id(): void
    method test_get_title_by_id (line 553) | public function test_get_title_by_id(): void
    method test_get_url_by_id (line 567) | public function test_get_url_by_id(): void
    method test_get_unique_id (line 581) | public function test_get_unique_id(): void
    method test_get_unique_id_by_id (line 595) | public function test_get_unique_id_by_id(): void

FILE: tests/Unit/Databases/Properties/PropertyMetadataTest.php
  class PropertyMetadataTest (line 9) | class PropertyMetadataTest extends TestCase
    method test_create (line 11) | public function test_create(): void
    method test_from_array (line 21) | public function test_from_array(): void
    method test_from_array_without_description (line 42) | public function test_from_array_without_description(): void

FILE: tests/Unit/Databases/Properties/RelationTest.php
  class RelationTest (line 9) | class RelationTest extends TestCase
    method test_create_unidirectional (line 11) | public function test_create_unidirectional(): void
    method test_create_bidirectional (line 21) | public function test_create_bidirectional(): void
    method test_change_to_unidirectional (line 41) | public function test_change_to_unidirectional(): void
    method test_change_to_bidirectional (line 61) | public function test_change_to_bidirectional(): void
    method test_array_conversion (line 77) | public function test_array_conversion(): void

FILE: tests/Unit/Databases/Properties/RichTextTest.php
  class RichTextTest (line 11) | class RichTextTest extends TestCase
    method test_create (line 13) | public function test_create(): void
    method test_array_conversion (line 21) | public function test_array_conversion(): void
    method test_new_line (line 36) | public function test_new_line(): void
    method test_mutiple_to_string (line 43) | public function test_mutiple_to_string(): void

FILE: tests/Unit/Databases/Properties/SelectOptionTest.php
  class SelectOptionTest (line 9) | class SelectOptionTest extends TestCase
    method test_change_color (line 11) | public function test_change_color(): void
    method test_change_name (line 19) | public function test_change_name(): void

FILE: tests/Unit/Databases/Properties/SelectTest.php
  class SelectTest (line 11) | class SelectTest extends TestCase
    method test_create (line 13) | public function test_create(): void
    method test_replace_options (line 22) | public function test_replace_options(): void
    method test_add_option (line 32) | public function test_add_option(): void
    method test_array_conversion (line 40) | public function test_array_conversion(): void

FILE: tests/Unit/Databases/Properties/StatusTest.php
  class StatusTest (line 10) | class StatusTest extends TestCase
    method test_array_conversion (line 12) | public function test_array_conversion(): void

FILE: tests/Unit/Databases/Properties/TitleTest.php
  class TitleTest (line 10) | class TitleTest extends TestCase
    method test_create (line 12) | public function test_create(): void
    method test_array_conversion (line 21) | public function test_array_conversion(): void

FILE: tests/Unit/Databases/Properties/UniqueIdTest.php
  class UniqueIdTest (line 10) | class UniqueIdTest extends TestCase
    method test_array_conversion (line 12) | public function test_array_conversion(): void

FILE: tests/Unit/Databases/Properties/UnknownTest.php
  class UnknownTest (line 10) | class UnknownTest extends TestCase
    method test_serialization (line 12) | public function test_serialization(): void

FILE: tests/Unit/Databases/Properties/UrlTest.php
  class UrlTest (line 10) | class UrlTest extends TestCase
    method test_create (line 12) | public function test_create(): void
    method test_array_conversion (line 20) | public function test_array_conversion(): void

FILE: tests/Unit/Databases/Query/CheckboxFilterTest.php
  class CheckboxFilterTest (line 9) | class CheckboxFilterTest extends TestCase
    method test_empty_filter (line 11) | public function test_empty_filter(): void
    method test_equals (line 21) | public function test_equals(): void
    method test_does_not_equal (line 32) | public function test_does_not_equal(): void

FILE: tests/Unit/Databases/Query/CompoundFilterTest.php
  class CompoundFilterTest (line 12) | class CompoundFilterTest extends TestCase
    method test_and (line 14) | public function test_and(): void
    method test_or (line 36) | public function test_or(): void
    method test_nested (line 58) | public function test_nested(): void

FILE: tests/Unit/Databases/Query/DateFilterTest.php
  class DateFilterTest (line 10) | class DateFilterTest extends TestCase
    method test_property (line 12) | public function test_property(): void
    method test_created_time (line 22) | public function test_created_time(): void
    method test_last_edited_Time (line 32) | public function test_last_edited_Time(): void
    method test_equals (line 42) | public function test_equals(): void
    method test_before (line 54) | public function test_before(): void
    method test_after (line 66) | public function test_after(): void
    method test_on_or_before (line 78) | public function test_on_or_before(): void
    method test_is_empty (line 90) | public function test_is_empty(): void
    method test_is_not_empty (line 102) | public function test_is_not_empty(): void
    method test_on_or_after (line 114) | public function test_on_or_after(): void
    method test_past_week (line 126) | public function test_past_week(): void
    method test_past_month (line 138) | public function test_past_month(): void
    method test_past_year (line 150) | public function test_past_year(): void
    method test_next_week (line 162) | public function test_next_week(): void
    method test_next_month (line 174) | public function test_next_month(): void
    method test_next_year (line 186) | public function test_next_year(): void
    method test_this_week (line 198) | public function test_this_week(): void

FILE: tests/Unit/Databases/Query/MultiSelectFilterTest.php
  class MultiSelectFilterTest (line 9) | class MultiSelectFilterTest extends TestCase
    method test_empty_filter (line 11) | public function test_empty_filter(): void
    method test_contains (line 20) | public function test_contains(): void
    method test_does_not_contain (line 36) | public function test_does_not_contain(): void
    method test_is_empty (line 48) | public function test_is_empty(): void
    method test_is_not_empty (line 59) | public function test_is_not_empty(): void

FILE: tests/Unit/Databases/Query/NumberFilterTest.php
  class NumberFilterTest (line 9) | class NumberFilterTest extends TestCase
    method test_empty_filter (line 11) | public function test_empty_filter(): void
    method test_equals (line 20) | public function test_equals(): void
    method test_does_not_equal (line 31) | public function test_does_not_equal(): void
    method test_greater_than (line 42) | public function test_greater_than(): void
    method test_less_than (line 53) | public function test_less_than(): void
    method test_greater_than_or_equal_to (line 64) | public function test_greater_than_or_equal_to(): void
    method test_less_than_or_equal_to (line 75) | public function test_less_than_or_equal_to(): void
    method test_is_empty (line 86) | public function test_is_empty(): void
    method test_is_not_empty (line 97) | public function test_is_not_empty(): void

FILE: tests/Unit/Databases/Query/PeopleFilterTest.php
  class PeopleFilterTest (line 9) | class PeopleFilterTest extends TestCase
    method test_empty_filter (line 11) | public function test_empty_filter(): void
    method test_created_by (line 20) | public function test_created_by(): void
    method test_last_edited_by (line 27) | public function test_last_edited_by(): void
    method test_contains (line 34) | public function test_contains(): void
    method test_does_not_contain (line 50) | public function test_does_not_contain(): void
    method test_is_empty (line 62) | public function test_is_empty(): void
    method test_is_not_empty (line 73) | public function test_is_not_empty(): void

FILE: tests/Unit/Databases/Query/RelationFilterTest.php
  class RelationFilterTest (line 9) | class RelationFilterTest extends TestCase
    method test_empty_filter (line 11) | public function test_empty_filter(): void
    method test_contains (line 20) | public function test_contains(): void
    method test_does_not_contain (line 31) | public function test_does_not_contain(): void
    method test_is_empty (line 42) | public function test_is_empty(): void
    method test_is_not_empty (line 53) | public function test_is_not_empty(): void

FILE: tests/Unit/Databases/Query/ResultTest.php
  class ResultTest (line 8) | class ResultTest extends TestCase
    method test_from_array (line 10) | public function test_from_array(): void

FILE: tests/Unit/Databases/Query/SelectFilterTest.php
  class SelectFilterTest (line 9) | class SelectFilterTest extends TestCase
    method test_empty_filter (line 11) | public function test_empty_filter(): void
    method test_equals (line 20) | public function test_equals(): void
    method test_does_not_equal (line 31) | public function test_does_not_equal(): void
    method test_is_empty (line 42) | public function test_is_empty(): void
    method test_is_not_empty (line 53) | public function test_is_not_empty(): void

FILE: tests/Unit/Databases/Query/SortTest.php
  class SortTest (line 8) | class SortTest extends TestCase
    method test_sort_by_property (line 10) | public function test_sort_by_property(): void
    method test_sort_by_created_time (line 22) | public function test_sort_by_created_time(): void
    method test_sort_by_last_edited_time (line 34) | public function test_sort_by_last_edited_time(): void
    method test_sort_ascending (line 46) | public function test_sort_ascending(): void
    method test_sort_descending (line 53) | public function test_sort_descending(): void

FILE: tests/Unit/Databases/Query/StatusFilterTest.php
  class StatusFilterTest (line 9) | class StatusFilterTest extends TestCase
    method test_empty_filter (line 11) | public function test_empty_filter(): void
    method test_equals (line 20) | public function test_equals(): void
    method test_does_not_equal (line 31) | public function test_does_not_equal(): void
    method test_is_empty (line 42) | public function test_is_empty(): void
    method test_is_not_empty (line 53) | public function test_is_not_empty(): void

FILE: tests/Unit/Databases/Query/TextFilterTest.php
  class TextFilterTest (line 9) | class TextFilterTest extends TestCase
    method test_empty_filter (line 11) | public function test_empty_filter(): void
    method test_equals (line 20) | public function test_equals(): void
    method test_does_not_equal (line 35) | public function test_does_not_equal(): void
    method test_contains (line 46) | public function test_contains(): void
    method test_does_not_contain (line 57) | public function test_does_not_contain(): void
    method test_starts_with (line 68) | public function test_starts_with(): void
    method test_ends_with (line 79) | public function test_ends_with(): void
    method test_is_empty (line 90) | public function test_is_empty(): void
    method test_is_not_empty (line 101) | public function test_is_not_empty(): void

FILE: tests/Unit/Databases/QueryTest.php
  class QueryTest (line 11) | class QueryTest extends TestCase
    method test_empty_query (line 13) | public function test_empty_query(): void
    method test_query_change_filter (line 23) | public function test_query_change_filter(): void
    method test_add_sort (line 31) | public function test_add_sort(): void
    method test_replace_sorts (line 40) | public function test_replace_sorts(): void
    method test_deprecated_change_added_sort (line 51) | public function test_deprecated_change_added_sort(): void
    method test_query_change_start_cursor (line 60) | public function test_query_change_start_cursor(): void
    method test_query_change_custom_page_size (line 68) | public function test_query_change_custom_page_size(): void
    method test_page_size_more_than_limit (line 76) | public function test_page_size_more_than_limit(): void
    method test_empty_query_to_array (line 84) | public function test_empty_query_to_array(): void
    method test_complete_query_to_array (line 96) | public function test_complete_query_to_array(): void

FILE: tests/Unit/Exceptions/ApiExceptionTest.php
  class ApiExceptionTest (line 10) | class ApiExceptionTest extends TestCase
    method test_from_response_body (line 12) | public function test_from_response_body(): void

FILE: tests/Unit/Infrastructure/HttpTest.php
  class HttpTest (line 17) | final class HttpTest extends TestCase
    method test_retry_sending_request_after_conflict_errors (line 19) | public function test_retry_sending_request_after_conflict_errors(): void
    method test_retry_sending_request_after_many_conflict_errors (line 40) | public function test_retry_sending_request_after_many_conflict_errors(...
    method conflictErrorJson (line 60) | private function conflictErrorJson(): string
    method createdPageJson (line 70) | private function createdPageJson(): string

FILE: tests/Unit/NotionTest.php
  class NotionTest (line 10) | class NotionTest extends TestCase
    method test_custom_psr_implementation (line 12) | public function test_custom_psr_implementation(): void

FILE: tests/Unit/Pages/PageParentTest.php
  class PageParentTest (line 9) | class PageParentTest extends TestCase
    method test_create_parent_database (line 11) | public function test_create_parent_database(): void
    method test_create_parent_page (line 19) | public function test_create_parent_page(): void
    method test_create_parent_block (line 27) | public function test_create_parent_block(): void
    method test_create_parent_workspace (line 35) | public function test_create_parent_workspace(): void
    method test_page_array_conversion (line 43) | public function test_page_array_conversion(): void
    method test_database_array_conversion (line 54) | public function test_database_array_conversion(): void
    method test_workspace_array_conversion (line 65) | public function test_workspace_array_conversion(): void
    method test_block_array_conversion (line 76) | public function test_block_array_conversion(): void
    method test_invalid_type_array (line 87) | public function test_invalid_type_array(): void

FILE: tests/Unit/Pages/PageTest.php
  class PageTest (line 16) | class PageTest extends TestCase
    method test_create_page (line 18) | public function test_create_page(): void
    method test_add_title (line 27) | public function test_add_title(): void
    method test_add_icon (line 35) | public function test_add_icon(): void
    method test_add_file_icon (line 47) | public function test_add_file_icon(): void
    method test_remove_icon (line 58) | public function test_remove_icon(): void
    method test_add_cover (line 69) | public function test_add_cover(): void
    method test_remove_cover (line 78) | public function test_remove_cover(): void
    method test_delete (line 87) | public function test_delete(): void
    method test_restore (line 95) | public function test_restore(): void
    method test_move_page (line 103) | public function test_move_page(): void
    method test_add_property (line 112) | public function test_add_property(): void
    method test_get_property_deprecated (line 121) | public function test_get_property_deprecated(): void
    method test_replace_properties (line 131) | public function test_replace_properties(): void
    method test_array_conversion (line 142) | public function test_array_conversion(): void
    method test_from_array_change_emoji_icon (line 196) | public function test_from_array_change_emoji_icon(): void
    method test_from_array_change_file_icon (line 224) | public function test_from_array_change_file_icon(): void

FILE: tests/Unit/Pages/Properties/CheckboxTest.php
  class CheckboxTest (line 10) | class CheckboxTest extends TestCase
    method test_create_checked (line 12) | public function test_create_checked(): void
    method test_create_unchecked (line 20) | public function test_create_unchecked(): void
    method test_check (line 28) | public function test_check(): void
    method test_uncheck (line 35) | public function test_uncheck(): void
    method test_array_conversion (line 42) | public function test_array_conversion(): void

FILE: tests/Unit/Pages/Properties/CreatedByTest.php
  class CreatedByTest (line 10) | class CreatedByTest extends TestCase
    method test_array_conversion (line 12) | public function test_array_conversion(): void

FILE: tests/Unit/Pages/Properties/CreatedTimeTest.php
  class CreatedTimeTest (line 11) | class CreatedTimeTest extends TestCase
    method test_create (line 13) | public function test_create(): void
    method test_change_time (line 22) | public function test_change_time(): void
    method test_array_conversion (line 32) | public function test_array_conversion(): void

FILE: tests/Unit/Pages/Properties/DateTest.php
  class DateTest (line 11) | class DateTest extends TestCase
    method test_create_date (line 13) | public function test_create_date(): void
    method test_create_range (line 25) | public function test_create_range(): void
    method test_create_empty (line 37) | public function test_create_empty(): void
    method test_change_start (line 44) | public function test_change_start(): void
    method test_change_end (line 54) | public function test_change_end(): void
    method test_remove_end (line 64) | public function test_remove_end(): void
    method test_clear (line 75) | public function test_clear(): void
    method test_array_conversion (line 84) | public function test_array_conversion(): void
    method test_is_empty (line 101) | public function test_is_empty(): void

FILE: tests/Unit/Pages/Properties/EmailTest.php
  class EmailTest (line 10) | class EmailTest extends TestCase
    method test_create (line 12) | public function test_create(): void
    method test_create_empty (line 20) | public function test_create_empty(): void
    method test_change_email (line 27) | public function test_change_email(): void
    method test_clear (line 34) | public function test_clear(): void
    method test_array_conversion (line 41) | public function test_array_conversion(): void
    method test_is_empty (line 56) | public function test_is_empty(): void

FILE: tests/Unit/Pages/Properties/FilesTest.php
  class FilesTest (line 11) | class FilesTest extends TestCase
    method test_create (line 13) | public function test_create(): void
    method test_add_file (line 22) | public function test_add_file(): void
    method test_change_files (line 32) | public function test_change_files(): void
    method test_array_conversion (line 43) | public function test_array_conversion(): void

FILE: tests/Unit/Pages/Properties/FormulaTest.php
  class FormulaTest (line 12) | class FormulaTest extends TestCase
    method test_string_from_array (line 14) | public function test_string_from_array(): void
    method test_number_from_array (line 34) | public function test_number_from_array(): void
    method test_boolean_from_array (line 53) | public function test_boolean_from_array(): void
    method test_date_from_array (line 72) | public function test_date_from_array(): void

FILE: tests/Unit/Pages/Properties/LastEditedByTest.php
  class LastEditedByTest (line 10) | class LastEditedByTest extends TestCase
    method test_array_conversion (line 12) | public function test_array_conversion(): void

FILE: tests/Unit/Pages/Properties/LastEditedTimeTest.php
  class LastEditedTimeTest (line 10) | class LastEditedTimeTest extends TestCase
    method test_array_conversion (line 12) | public function test_array_conversion(): void

FILE: tests/Unit/Pages/Properties/MultiSelectTest.php
  class MultiSelectTest (line 11) | class MultiSelectTest extends TestCase
    method test_create_from_ids (line 13) | public function test_create_from_ids(): void
    method test_create_from_names (line 26) | public function test_create_from_names(): void
    method test_create_from_options (line 37) | public function test_create_from_options(): void
    method test_array_conversion (line 47) | public function test_array_conversion(): void
    method test_add_option (line 65) | public function test_add_option(): void
    method test_remove_options (line 73) | public function test_remove_options(): void

FILE: tests/Unit/Pages/Properties/NumberTest.php
  class NumberTest (line 11) | class NumberTest extends TestCase
    method test_create (line 13) | public function test_create(): void
    method test_create_empty (line 22) | public function test_create_empty(): void
    method test_array_conversion (line 29) | public function test_array_conversion(): void
    method test_change_value (line 44) | public function test_change_value(): void
    method test_clear (line 50) | public function test_clear(): void
    method test_is_empty (line 57) | public function test_is_empty(): void

FILE: tests/Unit/Pages/Properties/PeopleTest.php
  class PeopleTest (line 11) | class PeopleTest extends TestCase
    method test_create (line 13) | public function test_create(): void
    method test_replace_users (line 24) | public function test_replace_users(): void
    method test_add_user (line 34) | public function test_add_user(): void
    method test_remove_user (line 44) | public function test_remove_user(): void
    method test_array_conversion (line 54) | public function test_array_conversion(): void
    method user1 (line 72) | private function user1(): User
    method user2 (line 83) | private function user2(): User

FILE: tests/Unit/Pages/Properties/PhoneNumberTest.php
  class PhoneNumberTest (line 10) | class PhoneNumberTest extends TestCase
    method test_create (line 12) | public function test_create(): void
    method test_create_empty (line 20) | public function test_create_empty(): void
    method test_change_phone (line 27) | public function test_change_phone(): void
    method test_clear (line 34) | public function test_clear(): void
    method test_array_conversion (line 41) | public function test_array_conversion(): void
    method test_is_empty (line 56) | public function test_is_empty(): void

FILE: tests/Unit/Pages/Properties/PropertyCollectionTest.php
  class PropertyCollectionTest (line 12) | class PropertyCollectionTest extends TestCase
    method test_create (line 14) | public function test_create(): void
    method test_add (line 26) | public function test_add(): void
    method test_change (line 39) | public function test_change(): void
    method test_get (line 49) | public function test_get(): void
    method test_get_not_found (line 62) | public function test_get_not_found(): void
    method test_get_by_id (line 71) | public function test_get_by_id(): void
    method test_get_by_id_not_found (line 84) | public function test_get_by_id_not_found(): void
    method test_title (line 93) | public function test_title(): void
    method test_null_title (line 102) | public function test_null_title(): void
    method test_get_typed_wrong_type (line 109) | public function test_get_typed_wrong_type(): void
    method test_get_typed_by_id_wrong_type (line 120) | public function test_get_typed_by_id_wrong_type(): void
    method test_get_checkbox_by_id (line 135) | public function test_get_checkbox_by_id(): void
    method test_get_checkbox (line 148) | public function test_get_checkbox(): void
    method test_get_created_by_by_id (line 157) | public function test_get_created_by_by_id(): void
    method test_get_created_by (line 176) | public function test_get_created_by(): void
    method test_get_created_time_by_id (line 195) | public function test_get_created_time_by_id(): void
    method test_get_created_time (line 208) | public function test_get_created_time(): void
    method test_get_date_by_id (line 217) | public function test_get_date_by_id(): void
    method test_get_date (line 233) | public function test_get_date(): void
    method test_get_email_by_id (line 242) | public function test_get_email_by_
Condensed preview — 401 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (890K chars).
[
  {
    "path": ".gitattributes",
    "chars": 329,
    "preview": "*.php text eol=lf\n/.github/ export-ignore\n/docs/ export-ignore\n/test/ export-ignore\n/.gitattributes export-ignore\n/.giti"
  },
  {
    "path": ".github/FUNDING.yml",
    "chars": 21,
    "preview": "github: [mariosimao]\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "chars": 654,
    "preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: \"[BUG] \"\nlabels: bug\nassignees: ''\n\n---\n\n**Describ"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "chars": 614,
    "preview": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: \"[FEATURE] \"\nlabels: enhancement\nassignees: ''\n"
  },
  {
    "path": ".github/dependabot.yml",
    "chars": 507,
    "preview": "# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where "
  },
  {
    "path": ".github/workflows/coding-standards.yml",
    "chars": 666,
    "preview": "name: \"Check Coding Standards\"\n\non:\n  pull_request:\n  push:\n    branches:\n      - main\n\njobs:\n  coding-standards:\n    na"
  },
  {
    "path": ".github/workflows/deploy.yml",
    "chars": 490,
    "preview": "name: Deploy\n\non:\n  push:\n    branches:\n      - main\n\njobs:\n  deploy:\n    runs-on: ubuntu-latest\n    steps:\n      - uses"
  },
  {
    "path": ".github/workflows/psalm.yml",
    "chars": 647,
    "preview": "name: \"Static Analysis (Psalm)\"\n\non:\n  pull_request:\n  push:\n    branches:\n      - main\n\njobs:\n  psalm:\n    name: Psalm\n"
  },
  {
    "path": ".github/workflows/sponsors.yml",
    "chars": 502,
    "preview": "name: Generate Sponsors section on README\non:\n  workflow_dispatch:\n  schedule:\n    - cron: 30 15 * * 0-6\njobs:\n  deploy:"
  },
  {
    "path": ".github/workflows/tests.yml",
    "chars": 3344,
    "preview": "on:\n  pull_request:\n  push:\n    branches:\n      - main\n\nname: Tests\n\njobs:\n  unit-tests:\n    name: Unit tests (PHPUnit)\n"
  },
  {
    "path": ".gitignore",
    "chars": 76,
    "preview": ".infection\n.phpunit.cache\ncoverage\ndist\ntest.php\nvendor\nnode_modules\n.idea/\n"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 14634,
    "preview": "# Changelog\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changel"
  },
  {
    "path": "LICENSE",
    "chars": 1068,
    "preview": "MIT License\n\nCopyright (c) 2022 Mario Simão\n\nPermission is hereby granted, free of charge, to any person obtaining a cop"
  },
  {
    "path": "README.md",
    "chars": 3323,
    "preview": "<h1 align=\"center\">notion-sdk-php</h1>\n<p align=\"center\">A complete Notion SDK for PHP developers.</p>\n\n<p align=\"center"
  },
  {
    "path": "SECURITY.md",
    "chars": 400,
    "preview": "# Security Policy\n\n## Supported Versions\n\nVersions that are currently being supported with security updates.\n\n| Version "
  },
  {
    "path": "composer.json",
    "chars": 2300,
    "preview": "{\n    \"name\": \"mariosimao/notion-sdk-php\",\n    \"description\": \"A complete Notion SDK for PHP developers.\",\n    \"type\": \""
  },
  {
    "path": "docs/.vitepress/config.ts",
    "chars": 4425,
    "preview": "import fs from 'fs';\nimport { defineConfig } from 'vitepress';\n\nconst removeExtension = (filename: string) => filename.s"
  },
  {
    "path": "docs/.vitepress/theme/custom.css",
    "chars": 340,
    "preview": ":root {\n    --vp-c-brand: #787CB5;\n    --vp-c-brand-light: #B0B3D6;\n    --vp-c-brand-lighter: var(--vp-c-indigo-lighter)"
  },
  {
    "path": "docs/.vitepress/theme/index.js",
    "chars": 95,
    "preview": "import DefaultTheme from 'vitepress/theme'\nimport './custom.css'\n\nexport default DefaultTheme;\n"
  },
  {
    "path": "docs/advanced/configuration.md",
    "chars": 1101,
    "preview": "# SDK Configuration\n\nThe SDK can be configured with custom options.\n\n```php\n$config = Configuration::create();\n\n$notion "
  },
  {
    "path": "docs/blocks/Bookmark.md",
    "chars": 978,
    "preview": "# Bookmark block\n\n## Create\n\nCreating a bookmark from a URL string:\n```php\n<?php\n\n$bookmark = Bookmark::fromUrl(\"https:/"
  },
  {
    "path": "docs/blocks/Breadcrumb.md",
    "chars": 133,
    "preview": "# Breadcrumb\n\n## Create\n\nCreating a breadcrumb:\n```php\n<?php\n\n$breadcrumb = Breadcrumb::create();\n```\n\n![](../images/bre"
  },
  {
    "path": "docs/blocks/BulletedListItem.md",
    "chars": 1388,
    "preview": "# Bulleted list item\n\n## Create empty item\n\n```php\n$item = BulletedListItem::create();\n```\n\n## Create from string\n\nBulle"
  },
  {
    "path": "docs/blocks/Callout.md",
    "chars": 2323,
    "preview": "# Callout\n\n## Create\n\nCreating an empty callout:\n\n```php\n$block = Callout::create();\n```\n\n![](../images/callout.png)\n\n##"
  },
  {
    "path": "docs/blocks/ChildDatabase.md",
    "chars": 329,
    "preview": "# Child database\n\nChild databases can only be added to a page by creating a new database.\n\nHowever, a child database can"
  },
  {
    "path": "docs/blocks/ChildPage.md",
    "chars": 301,
    "preview": "# Child page\n\nChild pages can only be added to a page by creating a new page.\n\nHowever, a child page can be retreived fr"
  },
  {
    "path": "docs/blocks/Code.md",
    "chars": 1040,
    "preview": "# Code\n\n## Create empty\n\nCreating an empty code block:\n\n```php\n$block = Code::create();\n```\n\n## Create from string\n\n```p"
  },
  {
    "path": "docs/blocks/Column.md",
    "chars": 820,
    "preview": "# Column\n\nColumns should be used inside a [ColumnList](./ColumnList) block.\n\nThe block's children will define the conten"
  },
  {
    "path": "docs/blocks/ColumnList.md",
    "chars": 658,
    "preview": "# Column list\n\nColumn lists are blocks that contains [Columns](./Column) as children.\n\n## Create\n\n```php\n$text = Paragra"
  },
  {
    "path": "docs/blocks/Divider.md",
    "chars": 88,
    "preview": "# Divider\n\n## Create\n\n```php\n$block = Divider::create();\n```\n\n![](../images/divider.png)"
  },
  {
    "path": "docs/blocks/Embed.md",
    "chars": 200,
    "preview": "# Embed\n\nEmbed anything: PDFs, Google Docs, Google Maps, Spotify...\n\n## Create\n\n```php\n$url = \"https://goo.gl/maps/t7y33"
  },
  {
    "path": "docs/blocks/EquationBlock.md",
    "chars": 411,
    "preview": "# Embed\n\nDisplay a standalone math equation.\n\n## Create\n\n```php\n$block = EquationBlock::create(\"\n    |x| = \\\\begin{cases"
  },
  {
    "path": "docs/blocks/FileBlock.md",
    "chars": 243,
    "preview": "# File\n\nUpload or embed with a link.\n\n## Create\n\n```php\n$file = File::createExternal(\n    \"https://shakespeare.folger.ed"
  },
  {
    "path": "docs/blocks/Heading.md",
    "chars": 1272,
    "preview": "# Heading\n\nSmall, medium and big section heading.\n\n## Create from string\n\n```php\n$blocks = [\n    Heading1::fromString(\"H"
  },
  {
    "path": "docs/blocks/Image.md",
    "chars": 636,
    "preview": "# Image\n\nUpload or embed image with a link.\n\n## Upload\n\nThe Notion API [currently does not support uploading new files]("
  },
  {
    "path": "docs/blocks/LinkPreview.md",
    "chars": 183,
    "preview": "# Link Preview\n\nThis block cannot be created, only retrieved from the API.\n\n```php\n/** @var LinkPreview $block */\n$block"
  },
  {
    "path": "docs/blocks/NumberedListItem.md",
    "chars": 290,
    "preview": "# Numbered list item\n\nList with numbering.\n\n## Create from string\n\n```php\n$blocks = [\n    NumberedListItem::fromString(\""
  },
  {
    "path": "docs/blocks/Paragraph.md",
    "chars": 1083,
    "preview": "# Paragraph block\n\n## Working with strings\n\nCreating a paragraph from a simple string:\n```php\n<?php\n\n$paragraph = Paragr"
  },
  {
    "path": "docs/blocks/Pdf.md",
    "chars": 463,
    "preview": "# PDF\n\nEmbed a PDF file.\n\n## Create from a link\n\n```php\n$file = File::createExternal(\n    \"https://shakespeare.folger.ed"
  },
  {
    "path": "docs/blocks/Quote.md",
    "chars": 195,
    "preview": "# Quote\n\nCapture a quote.\n\n## Create from string\n\n```php\n$block = Quote::fromString(\n    \"The way to get started is to q"
  },
  {
    "path": "docs/blocks/index.md",
    "chars": 2878,
    "preview": "# Blocks\n\n## Introduction\n\nBlocks are one of the main objects from the Notion. They are used to compose the\ncontents of "
  },
  {
    "path": "docs/comments/index.md",
    "chars": 1077,
    "preview": "# Comments\n\nIt is possible to comment on pages and blocks.\n\nComment objects have the following fields:\n\n```php\n$comment-"
  },
  {
    "path": "docs/getting-started.md",
    "chars": 1275,
    "preview": "# Getting started\n\nThis section will help you setup a basic Notion application using\n`notion-sdk-php` from ground up. If"
  },
  {
    "path": "docs/how-to/add-content-to-page.md",
    "chars": 390,
    "preview": "# Add content to page\n\n```php\n<?php\n\nuse Notion\\Blocks\\Paragraph;\nuse Notion\\Notion;\n\n$token = $_ENV[\"NOTION_SECRET\"];\n$"
  },
  {
    "path": "docs/how-to/add-row-to-database.md",
    "chars": 766,
    "preview": "# Add row to database\n\nDatabase rows on Notion are essentially pages where the parent is the database.\n\n```php\n<?php\n\nus"
  },
  {
    "path": "docs/how-to/create-a-page.md",
    "chars": 1201,
    "preview": "# Create a page\n\n## Empty page\n\n```php\n<?php\n\nuse Notion\\Notion;\nuse Notion\\Common\\Emoji;\nuse Notion\\Pages\\Page;\nuse Not"
  },
  {
    "path": "docs/how-to/delete-a-page.md",
    "chars": 356,
    "preview": "# Delete a page\n\nDeleted pages are moved to trash. It is possible to recover pages in trash.\n\n```php\n<?php\n\nuse Notion\\N"
  },
  {
    "path": "docs/how-to/find-a-page.md",
    "chars": 938,
    "preview": "# Find a page\n\nIt is possible to retrieve a page by knowing its ID.\n\n```php\n<?php\n\nuse Notion\\Notion;\n\n$token = $_ENV[\"N"
  },
  {
    "path": "docs/how-to/list-database-pages.md",
    "chars": 310,
    "preview": "# List database pages\n\n```php\n<?php\n\nuse Notion\\Notion;\n\n$token = $_ENV[\"NOTION_SECRET\"];\n$notion = Notion::create($toke"
  },
  {
    "path": "docs/how-to/query-database.md",
    "chars": 870,
    "preview": "# Query database\n\n```php\n<?php\n\nuse Notion\\Notion;\nuse Notion\\Databases\\Query;\nuse Notion\\Databases\\Query\\CompoundFilter"
  },
  {
    "path": "docs/how-to/update-a-page.md",
    "chars": 789,
    "preview": "# Update a page\n\n## Update title\n\n```php\n<?php\n\nuse Notion\\Notion;\nuse Notion\\Common\\Emoji;\n\n$token = $_ENV[\"NOTION_SECR"
  },
  {
    "path": "docs/index.md",
    "chars": 794,
    "preview": "---\nlayout: home\n\ntitleTemplate: false\nlastUpdated: false\n\nhero:\n  name: Notion SDK PHP\n  text: \"🐘 + 🇳 = 💜\"\n  tagline: A"
  },
  {
    "path": "docs/package.json",
    "chars": 405,
    "preview": "{\n  \"name\": \"notion-sdk-php-docs\",\n  \"description\": \"Notion SDK PHP documentation\",\n  \"main\": \"index.js\",\n  \"scripts\": {"
  },
  {
    "path": "docs/page-properties/People.md",
    "chars": 1636,
    "preview": "# People\n\nA list of users.\n\n## Get value\n\n```php\n// Find page\n$page = $notion->pages()->find($pageId);\n\n// Get value fro"
  },
  {
    "path": "docs/page-properties/index.md",
    "chars": 2154,
    "preview": "# Page properties\n\n## Introduction\n\nA page is made up of page properties that contain data about the page. You can\nuse t"
  },
  {
    "path": "docs/public/favicons/site.webmanifest",
    "chars": 258,
    "preview": "{\"name\":\"Notion SDK PHP\",\"short_name\":\"Notion PHP\",\"icons\":[{\"src\":\"/android-chrome-192x192.png\",\"sizes\":\"192x192\",\"type"
  },
  {
    "path": "docs/search/index.md",
    "chars": 1436,
    "preview": "# Search\n\n## Introduction\n\nSearches all parent or child pages and databases that have been shared with an\nintegration.\n\n"
  },
  {
    "path": "infection.json",
    "chars": 448,
    "preview": "{\n    \"$schema\": \"vendor/infection/infection/resources/schema.json\",\n    \"source\": {\n        \"directories\": [\n          "
  },
  {
    "path": "phpcs.xml",
    "chars": 346,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ruleset name=\"notion-sdk-php\">\n    <description>Coding standard for the notion-s"
  },
  {
    "path": "phpunit.xml",
    "chars": 717,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<phpunit\n  xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n  xsi:noNamespac"
  },
  {
    "path": "psalm.xml",
    "chars": 677,
    "preview": "<psalm\n    errorLevel=\"1\"\n    resolveFromConfigFile=\"true\"\n    memoizeMethodCallResults=\"true\"\n    findUnusedPsalmSuppre"
  },
  {
    "path": "src/Blocks/BlockFactory.php",
    "chars": 2418,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nclass BlockFactory\n{\n    /**\n     * @param array{ type: string, ... } $array\n     */\n  "
  },
  {
    "path": "src/Blocks/BlockInterface.php",
    "chars": 568,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\n/** @psalm-immutable */\ninterface BlockInterface\n{\n    public function metadata(): Bloc"
  },
  {
    "path": "src/Blocks/BlockMetadata.php",
    "chars": 3774,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse DateTimeImmutable;\nuse Notion\\Exceptions\\BlockException;\nuse Notion\\Common\\Date;\n\n/"
  },
  {
    "path": "src/Blocks/BlockType.php",
    "chars": 999,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nenum BlockType: string\n{\n    case Paragraph = \"paragraph\";\n    case Heading1 = \"heading"
  },
  {
    "path": "src/Blocks/Bookmark.php",
    "chars": 2700,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Exceptions\\BlockException;\nuse Notion\\Common\\RichText;\n\n/**\n * Bookmark bloc"
  },
  {
    "path": "src/Blocks/Breadcrumb.php",
    "chars": 1627,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Exceptions\\BlockException;\n\n/**\n * @psalm-import-type BlockMetadataJson from"
  },
  {
    "path": "src/Blocks/BulletedListItem.php",
    "chars": 4326,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Common\\Color;\nuse Notion\\Common\\RichText;\n\n/**\n * Bulleted list item\n *\n * @"
  },
  {
    "path": "src/Blocks/Callout.php",
    "chars": 5353,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Common\\Color;\nuse Notion\\Common\\Emoji;\nuse Notion\\Common\\File;\nuse Notion\\Co"
  },
  {
    "path": "src/Blocks/ChildDatabase.php",
    "chars": 1718,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Exceptions\\BlockException;\n\n/**\n * @psalm-import-type BlockMetadataJson from"
  },
  {
    "path": "src/Blocks/ChildPage.php",
    "chars": 1683,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Exceptions\\BlockException;\n\n/**\n * @psalm-import-type BlockMetadataJson from"
  },
  {
    "path": "src/Blocks/Client.php",
    "chars": 3950,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Configuration;\nuse Notion\\Infrastructure\\H"
  },
  {
    "path": "src/Blocks/Code.php",
    "chars": 3965,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Exceptions\\BlockException;\nuse Notion\\Common\\RichText;\n\n/**\n * @psalm-import"
  },
  {
    "path": "src/Blocks/CodeLanguage.php",
    "chars": 1989,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nenum CodeLanguage: string\n{\n    case Abap = \"abap\";\n    case Arduino = \"arduino\";\n    c"
  },
  {
    "path": "src/Blocks/Column.php",
    "chars": 2252,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Exceptions\\ColumnException;\n\n/**\n * @psalm-import-type BlockMetadataJson fro"
  },
  {
    "path": "src/Blocks/ColumnList.php",
    "chars": 2582,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Exceptions\\ColumnListException;\n\n/**\n * @psalm-import-type BlockMetadataJson"
  },
  {
    "path": "src/Blocks/Divider.php",
    "chars": 1630,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Exceptions\\BlockException;\n\n/**\n * @psalm-import-type BlockMetadataJson from"
  },
  {
    "path": "src/Blocks/Embed.php",
    "chars": 1914,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Exceptions\\BlockException;\n\n/**\n * @psalm-import-type BlockMetadataJson from"
  },
  {
    "path": "src/Blocks/EquationBlock.php",
    "chars": 2166,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Exceptions\\BlockException;\nuse Notion\\Common\\Equation;\n\n/**\n * @psalm-import"
  },
  {
    "path": "src/Blocks/FileBlock.php",
    "chars": 2076,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Exceptions\\BlockException;\nuse Notion\\Common\\File;\n\n/**\n * @psalm-import-typ"
  },
  {
    "path": "src/Blocks/Heading1.php",
    "chars": 5053,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Common\\Color;\nuse Notion\\Exceptions\\BlockException;\nuse Notion\\Common\\RichTe"
  },
  {
    "path": "src/Blocks/Heading2.php",
    "chars": 5053,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Common\\Color;\nuse Notion\\Exceptions\\BlockException;\nuse Notion\\Common\\RichTe"
  },
  {
    "path": "src/Blocks/Heading3.php",
    "chars": 5053,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Common\\Color;\nuse Notion\\Exceptions\\BlockException;\nuse Notion\\Common\\RichTe"
  },
  {
    "path": "src/Blocks/Image.php",
    "chars": 2152,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Exceptions\\BlockException;\nuse Notion\\Common\\File;\nuse Notion\\Common\\RichTex"
  },
  {
    "path": "src/Blocks/LinkPreview.php",
    "chars": 1755,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Exceptions\\BlockException;\n\n/**\n * Link Preview block.\n *\n * This block cann"
  },
  {
    "path": "src/Blocks/NumberedListItem.php",
    "chars": 4101,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Common\\Color;\nuse Notion\\Common\\RichText;\n\n/**\n * @psalm-import-type BlockMe"
  },
  {
    "path": "src/Blocks/Paragraph.php",
    "chars": 4143,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Common\\Color;\nuse Notion\\Common\\RichText;\n\n/**\n * @psalm-import-type BlockMe"
  },
  {
    "path": "src/Blocks/Pdf.php",
    "chars": 1949,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Exceptions\\BlockException;\nuse Notion\\Common\\File;\n\n/**\n * @psalm-import-typ"
  },
  {
    "path": "src/Blocks/Quote.php",
    "chars": 4130,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Common\\Color;\nuse Notion\\Exceptions\\BlockException;\nuse Notion\\Common\\RichTe"
  },
  {
    "path": "src/Blocks/Renderer/BlockRendererInterface.php",
    "chars": 196,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer;\n\nuse Notion\\Blocks\\BlockInterface;\n\ninterface BlockRendererInterface\n{\n    publ"
  },
  {
    "path": "src/Blocks/Renderer/Markdown/BookmarkRenderer.php",
    "chars": 535,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer\\Markdown;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Blocks\\Bookmark;\nuse Not"
  },
  {
    "path": "src/Blocks/Renderer/Markdown/BreadcrumbRenderer.php",
    "chars": 517,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer\\Markdown;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Blocks\\Breadcrumb;\nuse N"
  },
  {
    "path": "src/Blocks/Renderer/Markdown/BulletedListItemRenderer.php",
    "chars": 764,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer\\Markdown;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Blocks\\BulletedListItem;"
  },
  {
    "path": "src/Blocks/Renderer/Markdown/CalloutRenderer.php",
    "chars": 834,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer\\Markdown;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Blocks\\Callout;\nuse Noti"
  },
  {
    "path": "src/Blocks/Renderer/Markdown/ChildDatabaseRenderer.php",
    "chars": 525,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer\\Markdown;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Blocks\\ChildDatabase;\nus"
  },
  {
    "path": "src/Blocks/Renderer/Markdown/ChildPageRenderer.php",
    "chars": 513,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer\\Markdown;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Blocks\\ChildPage;\nuse No"
  },
  {
    "path": "src/Blocks/Renderer/Markdown/CodeRenderer.php",
    "chars": 651,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer\\Markdown;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Blocks\\Code;\nuse Notion\\"
  },
  {
    "path": "src/Blocks/Renderer/Markdown/ColumnListRenderer.php",
    "chars": 745,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer\\Markdown;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Blocks\\ColumnList;\nuse N"
  },
  {
    "path": "src/Blocks/Renderer/Markdown/ColumnRenderer.php",
    "chars": 734,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer\\Markdown;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Blocks\\Column;\nuse Notio"
  },
  {
    "path": "src/Blocks/Renderer/Markdown/DividerRenderer.php",
    "chars": 499,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer\\Markdown;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Blocks\\Divider;\nuse Noti"
  },
  {
    "path": "src/Blocks/Renderer/Markdown/EmbedRenderer.php",
    "chars": 499,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer\\Markdown;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Blocks\\Embed;\nuse Notion"
  },
  {
    "path": "src/Blocks/Renderer/Markdown/EquationRenderer.php",
    "chars": 576,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer\\Markdown;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Blocks\\EquationBlock;\nus"
  },
  {
    "path": "src/Blocks/Renderer/Markdown/FileRenderer.php",
    "chars": 592,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer\\Markdown;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Blocks\\FileBlock;\nuse No"
  },
  {
    "path": "src/Blocks/Renderer/Markdown/Heading1Renderer.php",
    "chars": 567,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer\\Markdown;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Blocks\\Heading1;\nuse Not"
  },
  {
    "path": "src/Blocks/Renderer/Markdown/Heading2Renderer.php",
    "chars": 568,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer\\Markdown;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Blocks\\Heading2;\nuse Not"
  },
  {
    "path": "src/Blocks/Renderer/Markdown/Heading3Renderer.php",
    "chars": 569,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer\\Markdown;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Blocks\\Heading3;\nuse Not"
  },
  {
    "path": "src/Blocks/Renderer/Markdown/ImageRenderer.php",
    "chars": 535,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer\\Markdown;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Blocks\\Image;\nuse Notion"
  },
  {
    "path": "src/Blocks/Renderer/Markdown/LinkPreviewRenderer.php",
    "chars": 517,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer\\Markdown;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Blocks\\LinkPreview;\nuse "
  },
  {
    "path": "src/Blocks/Renderer/Markdown/NumberedListItemRenderer.php",
    "chars": 765,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer\\Markdown;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Blocks\\NumberedListItem;"
  },
  {
    "path": "src/Blocks/Renderer/Markdown/ParagraphRenderer.php",
    "chars": 746,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer\\Markdown;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Blocks\\Paragraph;\nuse No"
  },
  {
    "path": "src/Blocks/Renderer/Markdown/PdfRenderer.php",
    "chars": 575,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer\\Markdown;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Blocks\\Pdf;\nuse Notion\\B"
  },
  {
    "path": "src/Blocks/Renderer/Markdown/QuoteRenderer.php",
    "chars": 733,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer\\Markdown;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Blocks\\Quote;\nuse Notion"
  },
  {
    "path": "src/Blocks/Renderer/Markdown/RichTextRenderer.php",
    "chars": 1433,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer\\Markdown;\n\nuse Notion\\Common\\RichText;\n\nfinal class RichTextRenderer\n{\n    publi"
  },
  {
    "path": "src/Blocks/Renderer/Markdown/TableOfContentsRenderer.php",
    "chars": 537,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer\\Markdown;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Blocks\\TableOfContents;\n"
  },
  {
    "path": "src/Blocks/Renderer/Markdown/ToDoRenderer.php",
    "chars": 785,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer\\Markdown;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Blocks\\ToDo;\nuse Notion\\"
  },
  {
    "path": "src/Blocks/Renderer/Markdown/ToggleRenderer.php",
    "chars": 918,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer\\Markdown;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Blocks\\Toggle;\nuse Notio"
  },
  {
    "path": "src/Blocks/Renderer/Markdown/VideoRenderer.php",
    "chars": 535,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer\\Markdown;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Blocks\\Video;\nuse Notion"
  },
  {
    "path": "src/Blocks/Renderer/MarkdownRenderer.php",
    "chars": 4569,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer;\n\nuse Notion\\Blocks\\BlockInterface;\nuse Notion\\Blocks\\BlockType;\nuse Notion\\Bloc"
  },
  {
    "path": "src/Blocks/Renderer/RendererInterface.php",
    "chars": 267,
    "preview": "<?php\n\nnamespace Notion\\Blocks\\Renderer;\n\nuse Notion\\Blocks\\BlockInterface;\n\ninterface RendererInterface\n{\n    public st"
  },
  {
    "path": "src/Blocks/Table.php",
    "chars": 5079,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Exceptions\\BlockException;\n\n/**\n * @psalm-import-type BlockMetadataJson from"
  },
  {
    "path": "src/Blocks/TableOfContents.php",
    "chars": 2141,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Common\\Color;\nuse Notion\\Exceptions\\BlockException;\n\n/**\n * @psalm-import-ty"
  },
  {
    "path": "src/Blocks/TableRow.php",
    "chars": 2434,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Common\\RichText;\nuse Notion\\Exceptions\\BlockException;\n\n/**\n * @psalm-import"
  },
  {
    "path": "src/Blocks/ToDo.php",
    "chars": 4686,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Common\\Color;\nuse Notion\\Exceptions\\BlockException;\nuse Notion\\Common\\RichTe"
  },
  {
    "path": "src/Blocks/Toggle.php",
    "chars": 4080,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Common\\Color;\nuse Notion\\Common\\RichText;\n\n/**\n * @psalm-import-type BlockMe"
  },
  {
    "path": "src/Blocks/Unknown.php",
    "chars": 1894,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\n/**\n * An unknown block not implemented yet by the SDK.\n *\n * @psalm-import-type BlockM"
  },
  {
    "path": "src/Blocks/Video.php",
    "chars": 1966,
    "preview": "<?php\n\nnamespace Notion\\Blocks;\n\nuse Notion\\Exceptions\\BlockException;\nuse Notion\\Common\\File;\n\n/**\n * @psalm-import-typ"
  },
  {
    "path": "src/Comments/Client.php",
    "chars": 2772,
    "preview": "<?php\n\nnamespace Notion\\Comments;\n\nuse Notion\\Configuration;\nuse Notion\\Infrastructure\\Http;\n\n/**\n * @psalm-import-type "
  },
  {
    "path": "src/Comments/Comment.php",
    "chars": 3095,
    "preview": "<?php\n\nnamespace Notion\\Comments;\n\nuse DateTimeImmutable;\nuse Notion\\Common\\Date;\nuse Notion\\Common\\ParentBlock;\nuse Not"
  },
  {
    "path": "src/Common/Annotations.php",
    "chars": 3122,
    "preview": "<?php\n\nnamespace Notion\\Common;\n\n/** @psalm-type AnnotationsJson = array{\n *      bold: bool,\n *      italic: bool,\n *  "
  },
  {
    "path": "src/Common/Color.php",
    "chars": 735,
    "preview": "<?php\n\nnamespace Notion\\Common;\n\nenum Color: string\n{\n    case Default = \"default\";\n    case Gray = \"gray\";\n    case Bro"
  },
  {
    "path": "src/Common/Date.php",
    "chars": 1697,
    "preview": "<?php\n\nnamespace Notion\\Common;\n\nuse DateTimeImmutable;\n\n/**\n * @psalm-type DateJson = array{ start: string, end?: strin"
  },
  {
    "path": "src/Common/Emoji.php",
    "chars": 712,
    "preview": "<?php\n\nnamespace Notion\\Common;\n\n/**\n * @psalm-type EmojiJson = array{ type: \"emoji\", emoji: string }\n *\n * @psalm-immut"
  },
  {
    "path": "src/Common/Equation.php",
    "chars": 663,
    "preview": "<?php\n\nnamespace Notion\\Common;\n\n/**\n * @psalm-type EquationJson = array{ expression: string }\n *\n * @psalm-immutable\n *"
  },
  {
    "path": "src/Common/File.php",
    "chars": 3942,
    "preview": "<?php\n\nnamespace Notion\\Common;\n\nuse DateTimeImmutable;\n\n/**\n * @psalm-import-type RichTextJson from \\Notion\\Common\\Rich"
  },
  {
    "path": "src/Common/FileType.php",
    "chars": 156,
    "preview": "<?php\n\nnamespace Notion\\Common;\n\nenum FileType: string\n{\n    case Internal = \"file\";\n    case External = \"external\";\n   "
  },
  {
    "path": "src/Common/Icon.php",
    "chars": 1285,
    "preview": "<?php\n\nnamespace Notion\\Common;\n\nuse Notion\\Exceptions\\IconException;\n\nclass Icon\n{\n    private function __construct(\n  "
  },
  {
    "path": "src/Common/Mention.php",
    "chars": 3050,
    "preview": "<?php\n\nnamespace Notion\\Common;\n\nuse Notion\\Users\\User;\n\n/**\n * @psalm-import-type UserJson from \\Notion\\Users\\User\n * @"
  },
  {
    "path": "src/Common/MentionType.php",
    "chars": 166,
    "preview": "<?php\n\nnamespace Notion\\Common;\n\nenum MentionType: string\n{\n    case Page = \"page\";\n    case Database = \"database\";\n    "
  },
  {
    "path": "src/Common/ParentBlock.php",
    "chars": 1884,
    "preview": "<?php\n\nnamespace Notion\\Common;\n\n/**\n * @psalm-type ParentJson = array{\n *      type: string,\n *      database_id?: stri"
  },
  {
    "path": "src/Common/ParentType.php",
    "chars": 186,
    "preview": "<?php\n\nnamespace Notion\\Common;\n\nenum ParentType: string\n{\n    case Database = \"database_id\";\n    case Page = \"page_id\";"
  },
  {
    "path": "src/Common/RichText.php",
    "chars": 6261,
    "preview": "<?php\n\nnamespace Notion\\Common;\n\n/**\n * @psalm-import-type AnnotationsJson from Annotations\n * @psalm-import-type TextJs"
  },
  {
    "path": "src/Common/RichTextType.php",
    "chars": 149,
    "preview": "<?php\n\nnamespace Notion\\Common;\n\nenum RichTextType: string\n{\n    case Equation = \"equation\";\n    case Mention = \"mention"
  },
  {
    "path": "src/Common/Text.php",
    "chars": 1244,
    "preview": "<?php\n\nnamespace Notion\\Common;\n\n/**\n * @psalm-type TextJson = array{ content: string, link?: array{ url: string } }\n *\n"
  },
  {
    "path": "src/Configuration.php",
    "chars": 2504,
    "preview": "<?php\n\nnamespace Notion;\n\nuse Http\\Discovery\\Psr17FactoryDiscovery;\nuse Http\\Discovery\\Psr18ClientDiscovery;\nuse Psr\\Htt"
  },
  {
    "path": "src/Databases/Client.php",
    "chars": 3743,
    "preview": "<?php\n\nnamespace Notion\\Databases;\n\nuse Notion\\Configuration;\nuse Notion\\Databases\\Query\\Result;\nuse Notion\\Databases\\Qu"
  },
  {
    "path": "src/Databases/Database.php",
    "chars": 11981,
    "preview": "<?php\n\nnamespace Notion\\Databases;\n\nuse DateTimeImmutable;\nuse Notion\\Common\\Date;\nuse Notion\\Common\\Emoji;\nuse Notion\\C"
  },
  {
    "path": "src/Databases/DatabaseParent.php",
    "chars": 1773,
    "preview": "<?php\n\nnamespace Notion\\Databases;\n\n/**\n * @psalm-type DatabaseParentJson = array{\n *      type: \"page_id\"|\"workspace\"|\""
  },
  {
    "path": "src/Databases/DatabaseParentType.php",
    "chars": 162,
    "preview": "<?php\n\nnamespace Notion\\Databases;\n\nenum DatabaseParentType: string\n{\n    case Page = \"page_id\";\n    case Workspace = \"w"
  },
  {
    "path": "src/Databases/Properties/Checkbox.php",
    "chars": 1089,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\n/**\n * @psalm-type CheckboxJson = array{\n *      id: string,\n *      name"
  },
  {
    "path": "src/Databases/Properties/CreatedBy.php",
    "chars": 1100,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\n/**\n * @psalm-type CreatedByJson = array{\n *      id: string,\n *      nam"
  },
  {
    "path": "src/Databases/Properties/CreatedTime.php",
    "chars": 1116,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\n/**\n * @psalm-type CreatedTimeJson = array{\n *      id: string,\n *      n"
  },
  {
    "path": "src/Databases/Properties/Date.php",
    "chars": 1057,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\n/**\n * @psalm-type DateJson = array{\n *      id: string,\n *      name: st"
  },
  {
    "path": "src/Databases/Properties/Email.php",
    "chars": 1065,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\n/**\n * @psalm-type EmailJson = array{\n *      id: string,\n *      name: s"
  },
  {
    "path": "src/Databases/Properties/Files.php",
    "chars": 1064,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\n/**\n * @psalm-type FilesJson = array{\n *      id: string,\n *      name: s"
  },
  {
    "path": "src/Databases/Properties/Formula.php",
    "chars": 1412,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\n/**\n * @psalm-type FormulaJson = array{\n *      id: string,\n *      name:"
  },
  {
    "path": "src/Databases/Properties/LastEditedBy.php",
    "chars": 1127,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\n/**\n * @psalm-type LastEditedByJson = array{\n *      id: string,\n *      "
  },
  {
    "path": "src/Databases/Properties/LastEditedTime.php",
    "chars": 1143,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\n/**\n * @psalm-type LastEditedTimeJson = array{\n *      id: string,\n *    "
  },
  {
    "path": "src/Databases/Properties/MultiSelect.php",
    "chars": 1938,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\n/**\n * @psalm-import-type SelectOptionJson from SelectOption\n *\n * @psalm"
  },
  {
    "path": "src/Databases/Properties/Number.php",
    "chars": 1417,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\n/**\n * @psalm-type NumberJson = array{\n *      id: string,\n *      name: "
  },
  {
    "path": "src/Databases/Properties/NumberFormat.php",
    "chars": 1268,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\nenum NumberFormat: string\n{\n    case Number = \"number\";\n    case NumberCh"
  },
  {
    "path": "src/Databases/Properties/People.php",
    "chars": 1073,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\n/**\n * @psalm-type PeopleJson = array{\n *      id: string,\n *      name: "
  },
  {
    "path": "src/Databases/Properties/PhoneNumber.php",
    "chars": 1116,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\n/**\n * @psalm-type PhoneNumberJson = array{\n *      id: string,\n *      n"
  },
  {
    "path": "src/Databases/Properties/PropertyCollection.php",
    "chars": 8563,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\n/** @psalm-immutable */\nfinal class PropertyCollection\n{\n    /** @param a"
  },
  {
    "path": "src/Databases/Properties/PropertyFactory.php",
    "chars": 1850,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\nclass PropertyFactory\n{\n    /**\n     * @param array{ type: string, ... } "
  },
  {
    "path": "src/Databases/Properties/PropertyInterface.php",
    "chars": 292,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\n/** @psalm-immutable */\ninterface PropertyInterface\n{\n    /** @internal *"
  },
  {
    "path": "src/Databases/Properties/PropertyMetadata.php",
    "chars": 1547,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\n/**\n * @psalm-type PropertyMetadataJson = array{ id: string, name: string"
  },
  {
    "path": "src/Databases/Properties/PropertyType.php",
    "chars": 771,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\nenum PropertyType: string\n{\n    case Checkbox = \"checkbox\";\n    case Crea"
  },
  {
    "path": "src/Databases/Properties/Relation.php",
    "chars": 4187,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\nuse Notion\\Exceptions\\RelationException;\n\n/**\n * @psalm-type RelationJson"
  },
  {
    "path": "src/Databases/Properties/RelationType.php",
    "chars": 163,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\nenum RelationType: string\n{\n    case SingleProperty = \"single_property\";\n"
  },
  {
    "path": "src/Databases/Properties/RichTextProperty.php",
    "chars": 1096,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\n/**\n * @psalm-type RichTextJson = array{\n *      id: string,\n *      name"
  },
  {
    "path": "src/Databases/Properties/Select.php",
    "chars": 1951,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\n/**\n * @psalm-import-type SelectOptionJson from SelectOption\n *\n * @psalm"
  },
  {
    "path": "src/Databases/Properties/SelectOption.php",
    "chars": 1571,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\nuse Notion\\Common\\Color;\n\n/**\n * @psalm-type SelectOptionJson = array{\n *"
  },
  {
    "path": "src/Databases/Properties/Status.php",
    "chars": 1822,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\n/**\n * @psalm-import-type StatusGroupJson from StatusGroup\n * @psalm-impo"
  },
  {
    "path": "src/Databases/Properties/StatusGroup.php",
    "chars": 1136,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\nuse Notion\\Common\\Color;\n\n/**\n * @psalm-type StatusGroupJson = array{\n * "
  },
  {
    "path": "src/Databases/Properties/StatusOption.php",
    "chars": 1571,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\nuse Notion\\Common\\Color;\n\n/**\n * @psalm-type StatusOptionJson = array{\n *"
  },
  {
    "path": "src/Databases/Properties/Title.php",
    "chars": 1066,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\n/**\n * @psalm-type TitleJson = array{\n *      id: \"title\",\n *      name: "
  },
  {
    "path": "src/Databases/Properties/UniqueId.php",
    "chars": 867,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\n/**\n * @psalm-type UniqueIdJson = array{\n *      id: string,\n *      name"
  },
  {
    "path": "src/Databases/Properties/Unknown.php",
    "chars": 788,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\n/**\n * @psalm-type PropertyJson = array{\n *      id: string,\n *      name"
  },
  {
    "path": "src/Databases/Properties/Url.php",
    "chars": 1049,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Properties;\n\n/**\n * @psalm-type UrlJson = array{\n *      id: string,\n *      name: str"
  },
  {
    "path": "src/Databases/Query/CheckboxFilter.php",
    "chars": 1518,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Query;\n\n/** @psalm-immutable */\nclass CheckboxFilter implements Filter, Condition\n{\n  "
  },
  {
    "path": "src/Databases/Query/CompoundFilter.php",
    "chars": 880,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Query;\n\n/** @psalm-immutable */\nclass CompoundFilter implements Filter\n{\n    private c"
  },
  {
    "path": "src/Databases/Query/Condition.php",
    "chars": 232,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Query;\n\ninterface Condition\n{\n    public function propertyType(): string;\n    public f"
  },
  {
    "path": "src/Databases/Query/DateFilter.php",
    "chars": 4587,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Query;\n\nuse stdClass;\n\n/** @psalm-immutable */\nclass DateFilter implements Filter, Con"
  },
  {
    "path": "src/Databases/Query/Filter.php",
    "chars": 125,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Query;\n\n/** @psalm-immutable */\ninterface Filter\n{\n    public function toArray(): arra"
  },
  {
    "path": "src/Databases/Query/MultiSelectFilter.php",
    "chars": 1908,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Query;\n\n/** @psalm-immutable */\nclass MultiSelectFilter implements Filter, Condition\n{"
  },
  {
    "path": "src/Databases/Query/NumberFilter.php",
    "chars": 2644,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Query;\n\n/** @psalm-immutable */\nclass NumberFilter implements Filter, Condition\n{\n    "
  },
  {
    "path": "src/Databases/Query/Operator.php",
    "chars": 904,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Query;\n\nenum Operator: string\n{\n    case After = \"after\";\n    case Before = \"before\";\n"
  },
  {
    "path": "src/Databases/Query/PeopleFilter.php",
    "chars": 2250,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Query;\n\n/** @psalm-immutable */\nclass PeopleFilter implements Filter, Condition\n{\n    "
  },
  {
    "path": "src/Databases/Query/RelationFilter.php",
    "chars": 1932,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Query;\n\n/** @psalm-immutable */\nclass RelationFilter implements Filter, Condition\n{\n  "
  },
  {
    "path": "src/Databases/Query/Result.php",
    "chars": 906,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Query;\n\nuse Notion\\Pages\\Page;\n\n/**\n * Database query result\n *\n * @psalm-type QueryRe"
  },
  {
    "path": "src/Databases/Query/SelectFilter.php",
    "chars": 1917,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Query;\n\n/** @psalm-immutable */\nclass SelectFilter implements Filter, Condition\n{\n    "
  },
  {
    "path": "src/Databases/Query/Sort.php",
    "chars": 1458,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Query;\n\n/**\n * @psalm-immutable\n */\nclass Sort\n{\n    private const TYPE_PROPERTY = \"pr"
  },
  {
    "path": "src/Databases/Query/StatusFilter.php",
    "chars": 1917,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Query;\n\n/** @psalm-immutable */\nclass StatusFilter implements Filter, Condition\n{\n    "
  },
  {
    "path": "src/Databases/Query/TextFilter.php",
    "chars": 2566,
    "preview": "<?php\n\nnamespace Notion\\Databases\\Query;\n\n/** @psalm-immutable */\nclass TextFilter implements Filter, Condition\n{\n    pr"
  },
  {
    "path": "src/Databases/Query.php",
    "chars": 2331,
    "preview": "<?php\n\nnamespace Notion\\Databases;\n\nuse Exception;\nuse Notion\\Databases\\Query\\Filter;\nuse Notion\\Databases\\Query\\Sort;\n\n"
  },
  {
    "path": "src/Exceptions/ApiException.php",
    "chars": 1311,
    "preview": "<?php\n\nnamespace Notion\\Exceptions;\n\nuse Psr\\Http\\Message\\ResponseInterface;\n\n/**\n * Exception from Notion API\n */\nclass"
  },
  {
    "path": "src/Exceptions/BlockException.php",
    "chars": 442,
    "preview": "<?php\n\nnamespace Notion\\Exceptions;\n\nuse Notion\\Blocks\\BlockType;\nuse Notion\\Exceptions\\NotionException;\n\nclass BlockExc"
  },
  {
    "path": "src/Exceptions/ColumnException.php",
    "chars": 222,
    "preview": "<?php\n\nnamespace Notion\\Exceptions;\n\nclass ColumnException extends BlockException\n{\n    public static function columnIns"
  },
  {
    "path": "src/Exceptions/ColumnListException.php",
    "chars": 226,
    "preview": "<?php\n\nnamespace Notion\\Exceptions;\n\nclass ColumnListException extends BlockException\n{\n    public static function child"
  },
  {
    "path": "src/Exceptions/ConflictException.php",
    "chars": 86,
    "preview": "<?php\n\nnamespace Notion\\Exceptions;\n\nclass ConflictException extends ApiException\n{\n}\n"
  }
]

// ... and 201 more files (download for full content)

About this extraction

This page contains the full source code of the mariosimao/notion-sdk-php GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 401 files (796.9 KB), approximately 211.2k tokens, and a symbol index with 2375 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!