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.7.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-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.7.0] - 2025-06-19

### Added

- **.gitignore**
  - Added rules to exclude diff files (`*.diff`, `diff.*`) from version control.
- **source/Classes/Parent/00_parent.ps1**
  - Created Factory method `::new` to instantiate `notion_parent` objects from various input types.
- **source/Public/Parent/New-NotionParent.ps1**
  - New function to create `parent` objects (`page_id`, `database_id`, `block_id`, `wordspace`)
- **source/Private/Remove-NullValuesFromObject.ps1**
  - Added docs
- **source/Private/Test-NotionApiSettings.ps1**
  - New function to validate Notion API settings, ensuring `NotionApiKey`, `NotionApiUri` and `NotionApiVersion` are set.
- **source/Public/File/New-NotionFile.ps1**
  - New function to create `notion_file` objects, supporting various file types and rich text captions.
- **source/Public/Page/Get-NotionPage.ps1**
  - Added `-Raw` parameter to return raw JSON data from the Notion API, allowing for more flexible data handling.
  - Added check of API Parameters to ensure `NotionApiKey`, `NotionApiUri`, and `NotionApiVersion` are set before making API calls.
- **tests/Unit/Classes/00_General/00_icon.tests.ps1**
  - Added unit tests for `notion_icon` class, covering various input types and conversion methods.

### Changed

- **.vscode/profile.ps1**
  - Simplified directory change logic to always set location to the Notion module path.

- **.vscode/settings.json**
  - Removed custom terminal profile definition for Linux (`Notion pwsh`), likely to simplify or standardize terminal configurations.

- **build.ps1**
  - Simplified `gitversion` alias creation by unconditionally defining the alias to `dotnet-gitversion`, removing conditional logic.

- **source/Classes/03_File/01_notion_file.ps1**
  - Refactored `ConvertFromObject` logic to simplify type checking and error handling.
  - Removed unimplemented `file_upload` type handling.

- **source/Classes/03_File/03_external_file.ps1**
  - Removed redundant constructor that accepted only a URL, consolidating object creation pathways.

- **source/Public/Block/_RichText/New-NotionRichText.ps1**
  - Use handling in [richt_text] instead of maintaining separate logic in the cmdlet.

- **source/Public/Page/Get-NotionPageChildren.ps1**
  - Added connectivity check

### Fixed

- **source/Classes/00_General/00_icon.ps1**
  - Fixed `ConvertFromObject` to handle both string and object inputs correctly, ensuring robust icon handling.
  - Created factory method (::new) to instantiate `notion_icon` objects from various input types.
- **source/Classes/03_File/01_file.ps1**
  - Handle caption correctly in `ConvertFromObject`, ensuring its only processed if present.
- **source/Classes/03_File/02_hosted_file.ps1**
  - Added Constructor with two parameters: `url` and `expiry_time`, to support creation without caption and name.
  - Ensure the rich_text is converted correctly using `[rich_text]::ConvertFromObjects` for consistent rich text handling.
- **source/Classes/03_File/03_external_file.ps1**
  - Fixed `ConvertFromObject` to handle both string and object inputs correctly, ensuring robust external file handling.
  - Ensure rich_text is converted correctly using `[rich_text]::ConvertFromObjects` for consistent rich text handling.
- **source/Classes/Block/RichText/01_Rich_Text.ps1**
  - Fixed `ConvertFromObjects` to handle empty strings correctly (no conversion), and allow Object and
- **source/Public/Page/New-NotionPage.ps1**
  - Fixed `Icon` and `Cover` property handling
- **source/Private/Remove-NullValuesFromObject.ps1**
  - Fixed handling of empty strings and arrays only containing empty strings, ensuring they are removed from the object.

- **source/Public/Block/Paragraph/New-NotionParagraphBlock.ps1**
  - Fixed parameter handling, added example documentation

'


            # 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 = ''

}