Isystem.PowerShell.PowerPlatform.Dataverse.psd1

#
# Module manifest for module 'Isystem.PowerShell.PowerPlatform.Dataverse'
#
# Generated by: Ondrej Kracmar
#
# Generated on: 09/29/2026
#

@{

# Script module or binary module file associated with this manifest.
RootModule = 'Isystem.PowerShell.PowerPlatform.Dataverse.psm1'

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

# Supported PSEditions
CompatiblePSEditions = 'Core'

# ID used to uniquely identify this module
GUID = '4f78bc29-fd8d-444c-a449-a244eeb23a79'

# Author of this module
Author = 'Ondrej Kracmar'

# Company or vendor of this module
CompanyName = 'Isystem'

# Copyright statement for this module
Copyright = '(c) Isystem. All rights reserved.'

# Description of the functionality provided by this module
Description = 'Session-based cmdlets for Microsoft Dataverse (Power Platform, Dynamics 365): CRUD, upsert by alternate key, batches, transactions, FetchXML and paging. Authenticates with connection string, client secret, certificate, managed identity, Isystem.AzAuth modes, or a delegated user sign-in whose token cache the caller stores (Key Vault) for environments without application users.'

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

# 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 = 'Isystem.PowerShell.PowerPlatform.Dataverse.Format.ps1xml'

# 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 = @()

# 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 = 'Connect-PSDataverse', 'Disconnect-PSDataverse', 
               'Get-PSDataverseConnection', 'Get-PSDataverseRecord', 
               'Get-PSDataverseRecordCount', 'Get-PSDataverseTable', 
               'Get-PSDataverseColumn', 'Get-PSDataverseKey', 
               'ConvertTo-PSDataverseObject', 'Find-PSDataverseRecord', 
               'Test-PSDataverseRecord', 'New-PSDataverseRecord', 
               'Set-PSDataverseRecord', 'Remove-PSDataverseRecord', 
               'Invoke-PSDataverseBatch', 'Invoke-PSDataverseTransaction', 
               'Invoke-PSDataverseFetchXml', 'Get-PSDataverseTokenCache'

# 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 = @()

# 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 = 'Dataverse','PowerPlatform','Dynamics365','CRM','PowerApps','Upsert','PSEdition_Core','Windows','Linux','MacOS'

        # A URL to the license for this module.
        LicenseUri = 'https://github.com/ondrejkracmar/Isystem.PowerShell.PowerPlatform.Dataverse/blob/main/LICENSE'

        # A URL to the main website for this project.
        ProjectUri = 'https://github.com/ondrejkracmar/Isystem.PowerShell.PowerPlatform.Dataverse'

        # A URL to an icon representing this module.
        # IconUri = ''

        # ReleaseNotes of this module
        ReleaseNotes = '## [1.2.0] - 2026-09-29

### Fixed

- **A connection opened inside a function is no longer lost when that function returns.** The
  session was written to the CALLER''s scope and marked `Private`, so `Connect-PSDataverse` wrapped
  in a function - the normal way automation is written - left its connection behind the moment the
  function returned, and every later cmdlet got a fresh, disconnected session. Anything built on
  the module this way silently wrote nothing. The session now lives in the runspace''s global
  scope and is visible from every nested scope, and two regression tests call a cmdlet from
  inside a function so the suite would notice if it came back.

### Added

- **`ConvertTo-PSDataverseObject`** and **`-AsObject` / `-IncludeFormattedValues`** on
  `Get-PSDataverseRecord`, `Find-PSDataverseRecord` and `Invoke-PSDataverseFetchXml`. A Dataverse
  row is a sparse bag of typed SDK objects, which is faithful to the service and unusable with
  `Format-Table`, `Export-Csv` or `$row.column`; these flatten it - lookup to its id, choice to its
  number, money to its decimal, aliased value to the value inside it.
- **Write-side counterparts for the flattened types**, so a row can be read, edited and written
  back: `@{ OptionSet = 1 }`, `@{ OptionSet = @(1, 2) }` and `@{ Money = 12.50 }` alongside the
  existing lookup forms. Choice and currency columns previously could not be written at all - the
  reader unwrapped them and nothing wrapped them again.
- **Whole numbers are narrowed to what a Dataverse column takes.** `ConvertFrom-Json`, and a
  PowerShell integer literal, produce `Int64`; a whole-number column is `Int32`, and the SDK
  rejected the wider type on serialization. A value that genuinely does not fit now says so and
  names the column.
- **A nested object or a list is refused with the column named**, instead of failing later inside
  the SDK with a message that mentions neither.

### Changed

- **The three filters behave the same way.** `Find-PSDataverseRecord -Filter` converted its values
  one way, `-LikeFilter` another and `Get-PSDataverseRecordCount -Filter` a third; a condition now
  always compares against the stored scalar, which is the shape a flattened row hands back.
- The retained delegated token cache is zeroed on dispose. `Close` keeps it on purpose so a script
  can export it after `Disconnect-PSDataverse`; disposal is where that retention has to end,
  because the blob holds a refresh token in clear.
- Seven user-facing messages moved from string literals into `Strings.resx`, as `CONTRIBUTING.md`
  requires - including the two seen most often, "Not connected to Dataverse" and
  "Failed to connect to Dataverse".
- `DataverseLoginMode.Auto` documents itself as an alias for `Interactive` rather than repeating
  that mode''s description word for word.
- Both token providers state that the session is bound to the URL given at connect time, instead
  of silently ignoring the `instanceUri` the callback passes.

### Removed

- `build/vsts-syncRepository.ps1`: nothing called it, and it could not have run on the Linux
  agent (`System.Web.HttpUtility` without `Add-Type`, PSFramework without an import).
- `Strings.TransactionResultVerbose`: unused, and a duplicate of `TransactionCommittedVerbose`.
'


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

}