UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

39 lines • 1.55 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../core/resource.mjs"; import * as TablesAPI from "./tables/tables.mjs"; import { BaseTables, Tables } from "./tables/tables.mjs"; import { path } from "../../../internal/utils/path.mjs"; export var BaseNamespaces = /* @__PURE__ */ (() => { class BaseNamespaces extends APIResource { /** * Returns a list of namespaces in the specified R2 catalog. Supports hierarchical * filtering and pagination for efficient traversal of large namespace hierarchies. * * @deprecated Use `GET /accounts/{account_id}/basin-catalog/{bucket_name}/namespaces` instead. */ list(bucketName, params, options) { const { account_id, ...query } = params; return this._client.get(path `/accounts/${account_id}/r2-catalog/${bucketName}/namespaces`, { query, ...options, })._thenUnwrap((obj) => obj.result); } } BaseNamespaces._key = Object.freeze([ 'r2DataCatalog', 'namespaces', ]); return BaseNamespaces; })(); export var Namespaces = /* @__PURE__ */ (() => { class Namespaces extends BaseNamespaces { constructor() { super(...arguments); this.tables = new TablesAPI.Tables(this._client); } } Namespaces.Tables = Tables; Namespaces.BaseTables = BaseTables; return Namespaces; })(); //# sourceMappingURL=namespaces.mjs.map