// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../core/resource'; import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; /** * Author, publish, and install Unity Packages V2 packages */ export class AvailableUpgrades extends APIResource { /** * List published package versions higher than the version installed for the given * install_key. * * @example HTTP * Representative request and response shapes. * ``` * GET /packages/{package_key}/available-upgrades/?install_key=install_key HTTP/1.1 * Host: rest.ripplingapis.com * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "results": [ * { * "id": "string", * "version_number": "string", * "description": "string" * } * ] * } * ``` */ retrieve( packageKey: string, query: AvailableUpgradeRetrieveParams, options?: RequestOptions, ): APIPromise { return this._client.get(path`/packages/${packageKey}/available-upgrades/`, { query, ...options }); } } export interface AvailableUpgradeRetrieveResponse { results?: Array; } export namespace AvailableUpgradeRetrieveResponse { export interface Result { id?: string; description?: string; version_number?: string; } } export interface AvailableUpgradeRetrieveParams { /** * The install key of the managed package install. */ install_key: string; } export declare namespace AvailableUpgrades { export { type AvailableUpgradeRetrieveResponse as AvailableUpgradeRetrieveResponse, type AvailableUpgradeRetrieveParams as AvailableUpgradeRetrieveParams, }; }