Notion.psd1

#
# Module manifest for module 'Notion'
#
# Generated by: Thomas Subotitsch
#
# Generated on: 24.06.2024
#

@{

    # Script module or binary module file associated with this manifest.
    RootModule           = 'Notion.psm1'

    # Version number of this module.
    ModuleVersion        = '0.8.0'

    # Supported PSEditions
    # CompatiblePSEditions = @()

    # ID used to uniquely identify this module
    GUID                 = '6e2df8e9-be56-4be0-8c9b-fbc0af08d698'

    # Author of this module
    Author               = 'Thomas Subotitsch, Fabian Franz Steiner'

    # Company or vendor of this module
    CompanyName          = ''

    # Copyright statement for this module
    Copyright            = '(c) Thomas Subotitsch, Fabian Franz Steiner. All rights reserved.'

    # Description of the functionality provided by this module
    Description          = 'Module for interaction with Notion based on classes'

    # Minimum version of the PowerShell engine required by this module
    PowerShellVersion    = '7.0'

    # Name of the PowerShell host required by this module
    # PowerShellHostName = ''

    # Minimum version of the PowerShell host required by this module
    # PowerShellHostVersion = ''

    # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
    # DotNetFrameworkVersion = ''

    # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
    # ClrVersion = ''

    # Processor architecture (None, X86, Amd64) required by this module
    # ProcessorArchitecture = ''

    # Modules that must be imported into the global environment prior to importing this module
    RequiredModules      = @()

    # Assemblies that must be loaded prior to importing this module
    # RequiredAssemblies = @()

    # Script files (.ps1) that are run in the caller's environment prior to importing this module.
    # ScriptsToProcess = @()

    # Type files (.ps1xml) to be loaded when importing this module
    # TypesToProcess = @()

    # Format files (.ps1xml) to be loaded when importing this module
    # FormatsToProcess = @()

    # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
    # NestedModules = @()

    # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
    FunctionsToExport    = @('New-NotionRichText','New-NotionRichTextAnnotation','New-NotionBookmarkBlock','New-NotionBreadcrumbBlock','New-NotionBulletedListItemBlock','New-NotionCalloutBlock','New-NotionChildPageBlock','New-NotionChildDatabaseBlock','New-NotionImageBlock','New-NotionPdfBlock','New-NotionVideoBlock','New-NotionCodeBlock','New-NotionColumnBlock','New-NotionColumnListBlock','New-NotionDividerBlock','New-NotionEmbedBlock','New-NotionEquationBlock','New-NotionFileBlock','Add-NotionHeaderToBlock','New-NotionHeadingBlock','New-NotionLinkPreviewBlock','New-NotionNumberedListItemBlock','New-NotionParagraphBlock','New-NotionQuoteBlock','New-NotionSyncedBlock','New-NotionTableBlock','New-NotionTableOfContentsBlock','New-NotionTableRowBlock','New-NotionToDoBlock','New-NotionToggleBlock','Add-NotionBlockToPage','Get-NotionBlock','Get-NotionBlockChildren','New-NotionBlock','Remove-NotionBlock','Update-NotionBlock','Add-NotionDatabaseProperty','New-NotionDatabaseProperty','Remove-NotionDatabaseProperty','Add-NotionPageToDatabase','Edit-NotionDatabase','Get-NotionDatabase','Move-NotionDatabaseToArchive','New-NotionDatabase','Remove-NotionDatabase','Restore-NotionDatabase','New-NotionEmoji','New-NotionFile','Get-NotionPageProperty','Update-NotionPageProperty','Get-NotionPage','Get-NotionPageChildren','Move-NotionPageToArchive','New-NotionPage','Remove-NotionPage','Restore-NotionPage','New-NotionParent','Get-NotionUser','Connect-Notion','ConvertTo-NotionObject','Disconnect-Notion','Invoke-NotionApiCall','zz1_Type_Accelerator','zz2_Type_Accelerator')

    # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
    CmdletsToExport      = @()

    # Variables to export from this module
    VariablesToExport    = @()

    # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
    AliasesToExport      = @('Add-NotionHeaderToPage','Add-NotionHeadingToBlock','Add-NotionHeadingToPage','New-NotionHeading','New-NotionTextBlock')

    # DSC resources to export from this module
    DscResourcesToExport = @()

    # List of all modules packaged with this module
    # ModuleList = @()

    # List of all files packaged with this module
    # FileList = @()

    # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
    PrivateData          = @{

        PSData = @{

            # Tags applied to this module. These help with module discovery in online galleries.
            Tags         = @('Notion', 'API', 'Classes')

            # A URL to the license for this module.
            # LicenseUri = ''

            # A URL to the main website for this project.
            ProjectUri   = 'https://github.com/fasteiner/Notion'

            # A URL to an icon representing this module.
            IconUri      = 'https://raw.githubusercontent.com/fasteiner/Notion/main/TSNotion.png'

            # ReleaseNotes of this module
            ReleaseNotes = '## [0.8.0] - 2025-06-23

### Added

- **source/Classes/Block/RichText/01_Rich_Text.ps1**
  - Added Factory method `::Create` to instantiate `notion_rich_text` objects from various input types.
  - Added prototype of `ConvertFromMarkdown` method to convert Markdown text to `notion_rich_text` objects.
- **source/Classes/Parent/00_parent.ps1**
  - Added Recommended Action for unknown parent types in the `ConvertFromObject` method.
- **source/Public/Block/Code/New-NotionCodeBlock.ps1**
  - Added Aliases for `text`: `code`, `content`, for better flexibility in block creation.
- **source/Public/Block/_RichText/New-NotionRichText.ps1**
  - Included Possibility to pass a Markdown via `-MarkdownText`
- **source/Public/Emoji/New-NotionEmoji.ps1**
  - Added new function to create `notion_emoji` objects from strings.
- **tests/Integration/Block/callout.tests.ps1**
  - Added integration tests for `New-NotionCalloutBlock` cmdlet, covering various scenarios and rich text handling.
- New Unit Tests for several classes:
  - `tests/Unit/Classes/Emoji/Custom_Emoji.Tests.ps1`
  - `tests/Unit/Classes/Emoji/Emoji.Tests.ps1`
  - `tests/Unit/Classes/Page/PageProperties/pp_checkbox.Tests.ps1`
  - `tests/Unit/Classes/Parent/parent.Tests.ps1`
  - `tests/Unit/Classes/User/user.Tests.ps1`
- New Unit Tests for several functions:
  - `tests/Unit/Public/Block/Callout/New-NotionCalloutBlock.Tests.ps1`
  - `tests/Unit/Public/Emoji/New-NotionEmoji.Tests.ps1`

### Changed

- renamed `icon_type` to `notion_icon_type`

### Fixed

- **source/Classes/Block/05_Bookmark.ps1**
  - Corrected constructors to (remove call to base class constructor)
- **source/Classes/Block/RichText/Type/01_Rich_text_text.ps1**
  - Fixed `ConvertFromObject` in main class and structure class to handle both string and object inputs correctly, ensuring robust rich text handling.
  - Also fix href handling in the constructor to ensure it is set correctly when provided.
- **source/Classes/Emoji/02_Custom_Emoji.ps1**
  - hardcoded the `type` property to `custom_emoji` in the constructor, as it is required by the Notion API.
- **source/Public/Block/Callout/New-NotionCalloutBlock.ps1**
  - Switched to object array for `rich_text` parameter to allow multiple rich text objects, improving flexibility in block creation.
- **source/Public/Block/_RichText/New-NotionRichText.ps1**
  - Fixed conversion of rich_text, by passing it as an object to `[rich_text]::ConvertFromObjects`, ensuring consistent handling of rich text objects.
- **source/Public/Parent/New-NotionParent.ps1**
  - Switched to factory method `::Create` to ensure the conversion logic is handled by the class itself, improving consistency and maintainability. Also initalize the id to an empty string if not provided, to ensure the object is always in a valid state and can be created without errors.

### Removed

- **source/Classes/Block/RichText/Type/03_Rich_text_equation.ps1**
  - Duplicate constructor with one parameter removed, PowerShell does not support this syntax.

### Deprecated

- **source/Public/Block/LinkPreview/New-NotionLinkPreviewBlock.ps1**
  - Deprecated `New-NotionLinkPreviewBlock` cmdlet, as the Notion API does not support creating link preview blocks directly.
  - Added a error message to inform users about the deprecation.

'


            # Prerelease string of this module
            Prerelease   = ''

            # Flag to indicate whether the module requires explicit user acceptance for install/update/save
            # RequireLicenseAcceptance = $false

            # External dependent modules of this module
            # ExternalModuleDependencies = @()

        } # End of PSData hashtable

    } # End of PrivateData hashtable

    # HelpInfo URI of this module
    # HelpInfoURI = ''

    # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
    # DefaultCommandPrefix = ''

}