UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

43 lines • 1.75 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../core/resource.mjs"; import { path } from "../../../internal/utils/path.mjs"; export var BaseAdvertisementStatus = /* @__PURE__ */ (() => { class BaseAdvertisementStatus extends APIResource { /** * Advertise or withdraw the BGP route for a prefix. * * **Deprecated:** Prefer the BGP Prefixes endpoints, which additionally allow for * advertising and withdrawing subnets of an IP prefix. * * @deprecated */ edit(prefixID, params, options) { const { account_id, ...body } = params; return this._client.patch(path `/accounts/${account_id}/addressing/prefixes/${prefixID}/bgp/status`, { body, ...options, })._thenUnwrap((obj) => obj.result); } /** * View the current advertisement state for a prefix. * * **Deprecated:** Prefer the BGP Prefixes endpoints, which additionally allow for * advertising and withdrawing subnets of an IP prefix. * * @deprecated */ get(prefixID, params, options) { const { account_id } = params; return this._client.get(path `/accounts/${account_id}/addressing/prefixes/${prefixID}/bgp/status`, options)._thenUnwrap((obj) => obj.result); } } BaseAdvertisementStatus._key = Object.freeze([ 'addressing', 'prefixes', 'advertisementStatus', ]); return BaseAdvertisementStatus; })(); export class AdvertisementStatus extends BaseAdvertisementStatus { } //# sourceMappingURL=advertisement-status.mjs.map