UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

36 lines • 1.44 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 BaseServices = /* @__PURE__ */ (() => { class BaseServices extends APIResource { /** * Bring-Your-Own IP (BYOIP) prefixes onboarded to Cloudflare must be bound to a * service running on the Cloudflare network to enable a Cloudflare product on the * IP addresses. This endpoint can be used as a reference of available services on * the Cloudflare network, and their service IDs. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const serviceListResponse of client.addressing.services.list( * { account_id: '258def64c72dae45f3e4c8516e2111f2' }, * )) { * // ... * } * ``` */ list(params, options) { const { account_id } = params; return this._client.getAPIList(path `/accounts/${account_id}/addressing/services`, (SinglePage), options); } } BaseServices._key = Object.freeze([ 'addressing', 'services', ]); return BaseServices; })(); export class Services extends BaseServices { } //# sourceMappingURL=services.mjs.map