SendGridTools.psd1

#
# Module manifest for module 'SendGridTools'
#
# Generated by: Philip Haglund
#
# Generated on: 2023-06-21
#

@{

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

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

# Supported PSEditions
# CompatiblePSEditions = @()

# ID used to uniquely identify this module
GUID = 'c30e3731-0195-4b7f-bc99-c05a17965d28'

# Author of this module
Author = 'Philip Haglund'

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

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

# Description of the functionality provided by this module
Description = 'Manage SendGrid using its API with PowerShell functions and wrappers.'

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

# 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 = @('SendGridTools.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 = @('Add-SGEmailAddressToSuppressionGroup','Add-SGGlobalSuppression','Confirm-SGAuthenticatedDomain','Confirm-SGBrandedDomainLink','Connect-SendGrid','Disable-SGSubuser','Disconnect-SendGrid','Enable-SGSubuser','Get-SGAddressWhitelistSetting','Get-SGAlert','Get-SGApiKey','Get-SGAuthenticatedDomain','Get-SGBlock','Get-SGBounce','Get-SGBounceByClassification','Get-SGBouncePurgeSetting','Get-SGBrandedDomainLink','Get-SGDesign','Get-SGEmailActivity','Get-SGEnforcedTls','Get-SGForwardBounceSetting','Get-SGForwardSpamSetting','Get-SGGlobalSuppression','Get-SGInvalidEmail','Get-SGIPAddress','Get-SGMailSetting','Get-SGPermissionScopes','Get-SGSpamReport','Get-SGSubuser','Get-SGSuppression','Get-SGSuppressionGroup','Get-SGTeammate','Invoke-SGCommand','New-SGAlert','New-SGApiKey','New-SGAuthenticatedDomain','New-SGBrandedDomainLink','New-SGCombinedDomain','New-SGSubuser','New-SGSuppressionGroup','Remove-SGAlert','Remove-SGApiKey','Remove-SGAuthenticatedDomain','Remove-SGBlock','Remove-SGBounce','Remove-SGBrandedDomainLink','Remove-SGGlobalSuppression','Remove-SGInvalidEmail','Remove-SGSpamReport','Remove-SGSubuser','Remove-SGSuppressionGroup','Send-SGMailMessage','Set-SGAddressWhitelistSetting','Set-SGAlert','Set-SGApiKey','Set-SGAuthenticatedDomain','Set-SGAuthenticatedDomainToSubUser','Set-SGBouncePurgeSetting','Set-SGBrandedDomainLink','Set-SGEnforcedTls','Set-SGForwardBounceSetting','Set-SGForwardSpamSetting','Set-SGSuppressionGroup')

# 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 = @('ConvertTo-NameTitle','Add-SGSuppression','Add-SGAddressToSuppression','Connect-SG','Disconnect-SG','Get-SGActivity','Send-SGMessage','Send-SGMail')

# 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 = @{

        Prerelease = ''
        # Tags applied to this module. These help with module discovery in online galleries.
            Tags   = @('SendGrid', 'Mail', 'PSEdition_Core', 'PSEdition_Desktop')

        # A URL to the license for this module.
            LicenseUri = 'https://github.com/PhilipHaglund/SendGridTools/blob/main/LICENSE'

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

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

        # ReleaseNotes of this module
        ReleaseNotes = '## [0.5.2] - 2026-11-19

### Fixed

- `New-SGBrandedDomainLink -Default:$false` no longer asks for a default link and does not set one; before, the switch counted when it was given at all, also with `$false`. The question now goes through the same helper as in `New-SGAuthenticatedDomain`. With the switch set, or without it, the request is as before.
- `New-SGAuthenticatedDomain` no longer calls SendGrid when PowerShell binds its parameters. `-IPAddress` is an ordinary parameter with the same name and type; Tab completes the addresses of the account, and SendGrid decides whether an address belongs to the account. Before, a value outside the account''s list failed at binding. `Get-Command -Syntax`, `Get-Help` and `New-SGCombinedDomain` no longer need a session for it. A third positional argument still binds to `-Username`.
- `Confirm-SGAuthenticatedDomain`, `Confirm-SGBrandedDomainLink`, `Remove-SGApiKey`, `Remove-SGAuthenticatedDomain`, `Remove-SGBrandedDomainLink`, `Set-SGApiKey`, `Set-SGAuthenticatedDomain` and `Set-SGBrandedDomainLink` accept an id as a 64-bit integer from the pipeline, as `Get-SGAuthenticatedDomain` gives it in PowerShell 7. Before, the command failed with "Failed to convert InputObject to Id.". Other ids work as before.
- `New-SGAuthenticatedDomain`, `New-SGBrandedDomainLink`, `Confirm-SGAuthenticatedDomain`, `Confirm-SGBrandedDomainLink`, `Remove-SGAuthenticatedDomain` and `Remove-SGBrandedDomainLink` write their own informational notes (which subdomain is used, that a domain is already validated, and the reminder to remove DNS records) only with `-Verbose` or when `$VerbosePreference` asks for it. Before, these notes were shown without it.
- A failed request is passed on inside the module as the error record it was raised with, instead of as a new error that held only the message text. The record keeps where the error was raised and, for an error raised while the answer is read (for example an error body that is not JSON), its type and inner exception. An HTTP error is still turned into a text by the session, as before, and the error message a command shows is the same.
- An answer with several entries in `errors` now raises one error whose text is their `message` texts in order, separated by `; `; an entry without a message is left out. Before, the texts were joined with a space. With one entry the text is as before.
- `Add-SGGlobalSuppression`, `Remove-SGBlock`, `Remove-SGBounce`, `Remove-SGInvalidEmail` and `Remove-SGSpamReport` show the reason in their error message when a request fails. Before, the message repeated the email address where the reason should be.
- `Get-SGEmailActivity -Verbose` no longer writes the filter values or the date values in its filter notes. They name the property, the operator and the logical operator of each condition. The two notes about the request itself ("Starting process" and "Successfully invoked") name the request path without its query, for every command, so they no longer hold the filter values either. The query that is sent is unchanged, and `-WhatIf` shows the request with its query as before.
- `Connect-SendGrid` writes "Connection to SendGrid established." and its two refresh notes, and a request with an empty answer writes "Successfully invoked", only with `-Verbose` or when `$VerbosePreference` asks for it. Before, these lines were shown without it. The texts are unchanged.
- A command called with `-Confirm`, or with `$ConfirmPreference` set to `Low` or `Medium`, is no longer asked again by the request it sends or for each property name of the answer. Before, the request asked a second time and every property name of the answer was a question of its own.
- `Set-SGApiKey -Verbose` names the key in "Updating key"; before, the name was empty.
- `Remove-SGGlobalSuppression` encodes the email address in the request path, so an address with `+`, `#`, `?` or `/` removes that address. Before, such a character could change what was requested. `-WhatIf` and the error message show the address as given.
- A request with an empty answer writes "Successfully invoked" once with `-Verbose`. Before, it was written once for every empty object in the answer and once more at the end.
- A time that SendGrid sends as Unix seconds is a `DateTime` in both PowerShell 7 and Windows PowerShell 5.1. It holds for a whole number in a property whose name contains `valid`, `created`, `updated` or `lastat`, and now also for a name that ends in `_at`, such as `assigned_at` (`AssignedAt` from `Get-SGIPAddress`). Before, Windows PowerShell 5.1 returned every such value as a number, and PowerShell 7 returned a value whose name only ends in `_at` as a number. A list of such numbers is a list of dates in the same order; before, PowerShell 7 returned only the first one, as a single date. A Boolean, a decimal number, a text and an empty value are as before.
- `Get-SGEmailActivity -Property TemplateId` and `-Property TemplateName` no longer fail when PowerShell binds their parameters. `-Value` is an ordinary list of texts for them, and SendGrid decides whether the value exists. Before, binding called a command that the module does not have. The filter for `TemplateName` still has no field name.
- `Get-SGEmailActivity -Filter` with `-Between` sends the same dates under every culture. Before, a culture that writes the day before the month, such as en-GB or tr-TR, swapped day and month or failed. Under en-US the query is unchanged.
- A `date` field in an answer is read the same under every culture, for every command. Before, a culture with another calendar, such as th-TH, gave another year. Under en-US the dates are unchanged.
- Property names in the output are the same under every culture, for every command. Before, the Turkish culture gave `id`, `ip` and `is_enabled` a dotted capital I and no value. Under en-US the names are unchanged.
- The build''s dependency resolution (`Resolve-Dependency.ps1`) stops with an error that names `Microsoft.PowerShell.PSResourceGet` and the cause when PSResourceGet cannot be downloaded, unpacked or imported. Before, a failed download wrote a warning and went on with the legacy PowerShellGet path, which could install the NuGet package provider for the current user and mark `PSGallery` as trusted for the run, and a failed unpack or import wrote errors and went on as if PSResourceGet were in place. When the PSResourceGet bootstrap succeeds the resolution is as before.
- `Confirm-SGAuthenticatedDomain`, `Confirm-SGBrandedDomainLink`, `Remove-SGApiKey`, `Remove-SGAuthenticatedDomain`, `Remove-SGBrandedDomainLink`, `Set-SGApiKey` and `Set-SGAuthenticatedDomainToSubUser` ask once with `-Confirm`, for the object they change. Before, the read of that object through `Get-SGApiKey`, `Get-SGAuthenticatedDomain` or `Get-SGBrandedDomainLink` asked as well. With `-WhatIf` they read the object and write one line for it; before, the read was skipped and wrote a line of its own, so the command''s line lacked the name, for example in `Remove-SGApiKey`. `Confirm-SGAuthenticatedDomain`, `Confirm-SGBrandedDomainLink`, `Remove-SGAuthenticatedDomain` and `Remove-SGBrandedDomainLink` also return the object they read under `-WhatIf`, as they do without it. The three `Get-SG*` commands are unchanged.
- `Remove-SGBlock`, `Remove-SGBounce`, `Remove-SGInvalidEmail` and `Remove-SGSpamReport` encode the email address in the request path, as `Remove-SGGlobalSuppression` does, so an address with `+`, `#`, `?` or `/` removes that address. Before, such a character could change what was requested. `-WhatIf` and the error message show the address as given. `Remove-SGBlock` says block in its `-WhatIf` and `-Confirm` text and in its error messages; before, it said bounce.
- A time value becomes a `DateTime` only when it is a whole number within the 32-bit range, and a list of them a list of dates only when every element is; any other value is returned as SendGrid sends it. Before, a whole number outside that range under a name that contains `valid`, `created`, `updated` or `lastat` made the command fail. `Get-SGIPAddress -IncludeRegion` returns `AddedAt` and `UpdatedAt` as dates by the same rule, as `Get-SGIPAddress` does without the switch; before, they were Unix seconds.

'


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

}