import { APIResource } from "../../core/resource.js"; import { APIPromise } from "../../core/api-promise.js"; import { PageCursorURL, PagePromise } from "../../core/pagination.js"; import { RequestOptions } from "../../internal/request-options.js"; /** * Author, publish, and install Unity Packages V2 packages */ export declare class Versions extends APIResource { /** * List package versions belonging to a package. * * @example HTTP * Representative request and response shapes. * ``` * GET /packages/{package_key}/versions/?limit=50&cursor=cursor 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", * "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": [ * {} * ], * "post_install_function": "string" * } * ], * "next_link": "string" * } * ``` */ list(packageKey: string, query?: VersionListParams | null | undefined, options?: RequestOptions): PagePromise; /** * Create a new package version. Components and post_install_function are not * supported on create. Add components through package-version-component-updates, * then configure post_install_function through PATCH * /package-versions/{version_id}/. Providing either field on create returns * HTTP 400. * * @example HTTP * Representative request and response shapes. * ``` * POST /packages/{package_key}/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: VersionCreateParams, options?: RequestOptions): APIPromise; } export type VersionListResponsesPageCursorURL = PageCursorURL; export interface VersionListResponse { /** * 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 VersionListResponse { 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 VersionCreateResponse { /** * 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 VersionCreateResponse { 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 VersionListParams { cursor?: string; /** * The maximum number of results to return. Defaults to 50. Maximum is 100. */ limit?: number; } export interface VersionCreateParams { /** * The semantic version number for this package version */ version_number: string; /** * The description of the package version */ description?: string; } export declare namespace Versions { export { type VersionListResponse as VersionListResponse, type VersionCreateResponse as VersionCreateResponse, type VersionListResponsesPageCursorURL as VersionListResponsesPageCursorURL, type VersionListParams as VersionListParams, type VersionCreateParams as VersionCreateParams, }; } //# sourceMappingURL=versions.d.ts.map