/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: ae10013194f4 */ import { packagesCancel } from "../funcs/packagesCancel.js"; import { packagesGet } from "../funcs/packagesGet.js"; import { packagesList } from "../funcs/packagesList.js"; import { packagesRebuild } from "../funcs/packagesRebuild.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Packages extends ClientSDK { /** * List packages with optional filters. Returns packages ordered by creation date (newest first). */ async list( request?: operations.ListPackagesRequest | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(packagesList( this, request, options, )); } /** * Get details of a specific package. */ async get( request: operations.GetPackageRequest, options?: RequestOptions, ): Promise { return unwrapAsync(packagesGet( this, request, options, )); } /** * Rebuild packages for a project. This will cancel any pending packages and create new ones with auto-incremented versions. */ async rebuild( request?: operations.RebuildPackagesRequest | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(packagesRebuild( this, request, options, )); } /** * Cancel a pending or building package. */ async cancel( request: operations.CancelPackageRequest, options?: RequestOptions, ): Promise { return unwrapAsync(packagesCancel( this, request, options, )); } }