// 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 Versions extends APIResource { /** * Return the version's stored snapshot. Subsequent source UI edits do not change * this manifest. * * @example HTTP * Representative request and response shapes. * ``` * GET /package-manifests/versions/{version_id}/ 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 * * { * "metadata": { * "key": "string", * "name": "string", * "description": "string" * }, * "components": [ * {} * ], * "components_to_delete": [] * } * ``` */ retrieve(versionID: string, options?: RequestOptions): APIPromise { return this._client.get(path`/package-manifests/versions/${versionID}/`, options); } } export interface VersionRetrieveResponse { /** * Complete desired component snapshot compiled from the Metadata SDK's * defineManifest. Each entry requires its component type and full configuration * for that type. An empty array creates an empty draft version; it cannot be * published until components are added. */ components: Array; /** * Source metadata from the SDK's defineManifest, retained with the snapshot. Use * an empty object when no metadata is needed; package identity is supplied * separately. */ metadata: VersionRetrieveResponse.Metadata; /** * Must be omitted or an empty array. Versions are complete snapshots, so deletion * instructions are rejected. */ components_to_delete?: Array; } export namespace VersionRetrieveResponse { /** * Source metadata from the SDK's defineManifest, retained with the snapshot. Use * an empty object when no metadata is needed; package identity is supplied * separately. */ export interface Metadata { /** * Optional description of the source manifest, independent of the version * description. */ description?: string; /** * Optional source-manifest identifier, retained on download; not the package key. */ key?: string; /** * Optional source-manifest label, retained on download; does not rename the * package. */ name?: string; } } export declare namespace Versions { export { type VersionRetrieveResponse as VersionRetrieveResponse }; }