import { APIResource } from "../../core/resource.mjs"; import * as PublishAPI from "./publish.mjs"; import { Publish, PublishCreateResponse } from "./publish.mjs"; import { APIPromise } from "../../core/api-promise.mjs"; import { RequestOptions } from "../../internal/request-options.mjs"; /** * Author, publish, and install Unity Packages V2 packages */ export declare class PackageVersions extends APIResource { publish: PublishAPI.Publish; /** * Get a package version by ID. * * @example HTTP * Representative request and response shapes. * ``` * GET /package-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 * * { * "id": "string", * "created_at": "string", * "updated_at": "string", * "package_id": "string", * "package_key": "string", * "package_display_name": "string", * "version_number": "string", * "description": "string", * "is_published": false, * "components": [ * { * "identifier": { * "type": "string", * "api_name": "string" * } * } * ], * "post_install_function": "string" * } * ``` */ retrieve(versionID: string, options?: RequestOptions): APIPromise; /** * Update the description or post-install function of an unpublished package * version. Provide at least one of description or post_install_function. Omitted * fields are preserved. The hook uses a portable component API name because * Function IDs differ between companies. Hook failures retain installed components * and data written by the function. For unmanaged installs, * PackageInstallationTracker.status becomes COMPLETE_WITH_WARNINGS. Read * error_message for warning details. For managed installs, * ManagedPackageInstallation.status becomes ACTIVE_WITH_WARNINGS. Read * warning_message for details. Invalid post-install functions return HTTP 400 with * code, field, and message. The code is POST_INSTALL_FUNCTION_INVALID or * POST_INSTALL_FUNCTION_NOT_IN_PACKAGE. Unsupported fields return HTTP 400 with * code UNSUPPORTED_UPDATE_FIELD, fields, and message. * * @example HTTP * Representative request and response shapes. * ``` * PATCH /package-versions/{version_id}/ HTTP/1.1 * Host: rest.ripplingapis.com * Content-Type: application/json * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * {} * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "id": "string", * "created_at": "string", * "updated_at": "string", * "package_id": "string", * "package_key": "string", * "package_display_name": "string", * "version_number": "string", * "description": "string", * "is_published": false, * "components": [ * { * "identifier": { * "type": "string", * "api_name": "string" * } * } * ], * "post_install_function": "string" * } * ``` */ update(versionID: string, body?: PackageVersionUpdateParams | null | undefined, options?: RequestOptions): APIPromise; } export interface PackageVersionRetrieveResponse { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * Record update date */ updated_at: string; /** * The semantic version number for this package version */ version_number: string; /** * Components included in this version. Function identifiers provide valid * post_install_function values. */ components?: Array; /** * The description of the package version */ description?: string; /** * Whether this package version has been published */ is_published?: boolean; /** * The display name of the parent package */ package_display_name?: string; /** * The ID of the parent package */ package_id?: string; /** * The package key of the parent package */ package_key?: string; /** * The portable API name of a Function component included in this version. Find * valid values in components entries with identifier.type equal to FUNCTION, using * identifier.api_name. Set through PATCH on an unpublished version after adding * the Function. Creation rejects this field. Null clears the hook and omission * preserves it. Removing the Function clears the setting when the version is * refreshed or copied. */ post_install_function?: string | null; } export declare namespace PackageVersionRetrieveResponse { interface Component { identifier: Component.Identifier; [k: string]: unknown; } namespace Component { interface Identifier { /** * The component kind. FUNCTION identifies a packaged Function. */ type: string; /** * The portable API name. Present on FUNCTION identifiers; other component kinds * may use different identity fields. */ api_name?: string; [k: string]: unknown; } } } export interface PackageVersionUpdateResponse { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * Record update date */ updated_at: string; /** * The semantic version number for this package version */ version_number: string; /** * Components included in this version. Function identifiers provide valid * post_install_function values. */ components?: Array; /** * The description of the package version */ description?: string; /** * Whether this package version has been published */ is_published?: boolean; /** * The display name of the parent package */ package_display_name?: string; /** * The ID of the parent package */ package_id?: string; /** * The package key of the parent package */ package_key?: string; /** * The portable API name of a Function component included in this version. Find * valid values in components entries with identifier.type equal to FUNCTION, using * identifier.api_name. Set through PATCH on an unpublished version after adding * the Function. Creation rejects this field. Null clears the hook and omission * preserves it. Removing the Function clears the setting when the version is * refreshed or copied. */ post_install_function?: string | null; } export declare namespace PackageVersionUpdateResponse { interface Component { identifier: Component.Identifier; [k: string]: unknown; } namespace Component { interface Identifier { /** * The component kind. FUNCTION identifies a packaged Function. */ type: string; /** * The portable API name. Present on FUNCTION identifiers; other component kinds * may use different identity fields. */ api_name?: string; [k: string]: unknown; } } } export interface PackageVersionUpdateParams { /** * The new description for the draft package version. */ description?: string; /** * The portable API name of a Function component included in this version. Find * valid values in components entries with identifier.type equal to FUNCTION, using * identifier.api_name. Set through PATCH on an unpublished version after adding * the Function. Creation rejects this field. Null clears the hook and omission * preserves it. Removing the Function clears the setting when the version is * refreshed or copied. */ post_install_function?: string | null; } export declare namespace PackageVersions { export { type PackageVersionRetrieveResponse as PackageVersionRetrieveResponse, type PackageVersionUpdateResponse as PackageVersionUpdateResponse, type PackageVersionUpdateParams as PackageVersionUpdateParams, }; export { Publish as Publish, type PublishCreateResponse as PublishCreateResponse }; } //# sourceMappingURL=package-versions.d.mts.map