Cityline.Graph.psm1

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

# MODULE FUNCTIONS INIT
$moduleRoot = Split-Path $script:MyInvocation.MyCommand.Path

# Private helpers — dot-sourced but not exported
Get-ChildItem -Path "$moduleRoot\private\*" -Recurse -File -Filter '*.ps1' -ErrorAction SilentlyContinue |
ForEach-Object { . $_.FullName }

# Public functions — dot-sourced and exported
$functions = @()
Get-ChildItem -Path "$moduleRoot\functions\*" -Recurse -File -Filter '*.ps1' |
Where-object -Filter { -not $_.Name.StartsWith("dev_") } |
Where-object -Filter { -not $_.Name.StartsWith("dep_") } |
ForEach-Object {
    . $_.FullName
    $functions += $_.BaseName
}

# MODULE INFO
$Script:version = (Test-ModuleManifest $PSScriptRoot\Cityline.Graph.psd1 -Verbose).Version
Export-ModuleMember -Function $functions

# MODULE VARIABLES
$script:Uri = '';
$script:LastRequest = @{
    Headers = @{"Content-Type" = "application/json" }
    Uri     = $null
    Method  = $null
    Body    = @{} 
}
$script:session = $null;
$script:isConnected = $false;