cloudflare
Version:
The official TypeScript library for the Cloudflare API
45 lines • 1.58 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../../../core/resource.mjs";
import * as ResourcesAPI from "./resources/resources.mjs";
import { BaseResources, Resources } from "./resources/resources.mjs";
import { path } from "../../../../internal/utils/path.mjs";
export var BaseManaged = /* @__PURE__ */ (() => {
class BaseManaged extends APIResource {
/**
* Returns a managed label and the web and API operations associated with it.
*
* @example
* ```ts
* const managed = await client.apiGateway.labels.managed.get(
* 'login',
* { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* );
* ```
*/
get(name, params, options) {
const { zone_id, ...query } = params;
return this._client.get(path `/zones/${zone_id}/api_gateway/labels/managed/${name}`, {
query,
...options,
})._thenUnwrap((obj) => obj.result);
}
}
BaseManaged._key = Object.freeze([
'apiGateway',
'labels',
'managed',
]);
return BaseManaged;
})();
export var Managed = /* @__PURE__ */ (() => {
class Managed extends BaseManaged {
constructor() {
super(...arguments);
this.resources = new ResourcesAPI.Resources(this._client);
}
}
Managed.Resources = Resources;
Managed.BaseResources = BaseResources;
return Managed;
})();
//# sourceMappingURL=managed.mjs.map