{
    "version": "1.5.4.9",
    "description": "Video calls and chat software",
    "homepage": "https://imo.im/",
    "license": {
        "identifier": "Freeware",
        "url": "https://imo.im/policies/terms_of_service.html"
    },
    "url": "https://static-web.imoim.net/as/indigo-static/winapp/1.5.4.9/ImoSetup_1.5.4.9_Release.exe",
    "hash": "a3dbe97ed77539f784b532e39717a6defb6a2ed7b83bbb9fae71ef9e5d72c960",
    "installer": {
        "script": [
            "Expand-DarkArchive -Path \"$dir\\$fname\" -DestinationPath \"$dir\\tmp\" -Removal",
            "Expand-MsiArchive -Path \"$dir\\tmp\\AttachedContainer\\ImoInstaller.msi\" -DestinationPath $dir -ExtractDir \"imo\\$version\"",
            "Remove-Item \"$dir\\tmp\" -Force -Recurse"
        ]
    },
    "shortcuts": [
        [
            "ImoDesktopApp.exe",
            "imo Messenger"
        ]
    ],
    "persist": [
        "data",
        "Logs"
    ],
    "checkver": {
        "script": [
            "$url = 'https://apiact.imoim.net/imoweb-infrastructure-client/apk/version-list'",
            "$body = @{type = '2'; sub_type = '1'; limit = 1000} | ConvertTo-Json",
            "$response = Invoke-RestMethod -Uri $url -Method Post -Body $body -ContentType 'application/json'",
            "$latestVersion = $response.data.list | Sort-Object -Property {[version]$_.name} -Descending | Select-Object -First 1",
            "Write-Output $latestVersion.name"
        ],
        "regex": "([\\d.]+)"
    },
    "autoupdate": {
        "url": "https://static-web.imoim.net/as/indigo-static/winapp/$version/ImoSetup_$version_Release.exe"
    }
}
