UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

37 lines • 1.43 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../core/resource.mjs"; import { SinglePage } from "../../../core/pagination.mjs"; import { path } from "../../../internal/utils/path.mjs"; export var BaseVersions = /* @__PURE__ */ (() => { class BaseVersions extends APIResource { /** * Returns all versions for a scheduler-backed application with * `scheduling_policy: "default"`. Versions and rollouts do not apply to * applications with `scheduling_policy: "durable_object"`. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const versionListResponse of client.containers.applications.versions.list( * 'application_id', * { account_id: 'account-123' }, * )) { * // ... * } * ``` */ list(applicationID, params, options) { const { account_id } = params; return this._client.getAPIList(path `/accounts/${account_id}/containers/applications/${applicationID}/versions`, (SinglePage), options); } } BaseVersions._key = Object.freeze([ 'containers', 'applications', 'versions', ]); return BaseVersions; })(); export class Versions extends BaseVersions { } //# sourceMappingURL=versions.mjs.map