UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

28 lines • 1.15 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 BaseCredentials = /* @__PURE__ */ (() => { class BaseCredentials extends APIResource { /** * Store authentication credentials for a catalog. These credentials are used to * authenticate with R2 storage when performing catalog operations. * * @deprecated Use `POST /accounts/{account_id}/basin-catalog/{bucket_name}/credential` instead. */ create(bucketName, params, options) { const { account_id, ...body } = params; return this._client.post(path `/accounts/${account_id}/r2-catalog/${bucketName}/credential`, { body, ...options, })._thenUnwrap((obj) => obj.result); } } BaseCredentials._key = Object.freeze([ 'r2DataCatalog', 'credentials', ]); return BaseCredentials; })(); export class Credentials extends BaseCredentials { } //# sourceMappingURL=credentials.mjs.map