import { APIResource } from "../../core/resource.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 NextVersions extends APIResource { /** * Create a new unpublished package version by re-extracting the components from * the package's latest published version. Returns the new PackageVersion. The * source is always package.latest_version. * * @example HTTP * Representative request and response shapes. * ``` * POST /packages/{package_key}/next-versions/ HTTP/1.1 * Host: rest.ripplingapis.com * Content-Type: application/json * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * { * "version_number": "version_number" * } * * HTTP/1.1 201 Created * 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" * } * ``` */ create(packageKey: string, body: NextVersionCreateParams, options?: RequestOptions): APIPromise; } export interface NextVersionCreateResponse { /** * 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 NextVersionCreateResponse { 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 NextVersionCreateParams { /** * The version number for the new unpublished draft. */ version_number: string; /** * Optional description for the new draft. */ description?: string; } export declare namespace NextVersions { export { type NextVersionCreateResponse as NextVersionCreateResponse, type NextVersionCreateParams as NextVersionCreateParams, }; } //# sourceMappingURL=next-versions.d.mts.map