UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

36 lines 1.49 kB
"use strict"; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. Object.defineProperty(exports, "__esModule", { value: true }); exports.MetadataIndex = void 0; const resource_1 = require("../../../resource.js"); class MetadataIndex extends resource_1.APIResource { /** * Enable metadata filtering based on metadata property. Limited to 10 properties. */ create(indexName, params, options) { const { account_id, ...body } = params; return this._client.post(`/accounts/${account_id}/vectorize/v2/indexes/${indexName}/metadata_index/create`, { body, ...options, })._thenUnwrap((obj) => obj.result); } /** * List Metadata Indexes for the specified Vectorize Index. */ list(indexName, params, options) { const { account_id } = params; return this._client.get(`/accounts/${account_id}/vectorize/v2/indexes/${indexName}/metadata_index/list`, options)._thenUnwrap((obj) => obj.result); } /** * Allow Vectorize to delete the specified metadata index. */ delete(indexName, params, options) { const { account_id, ...body } = params; return this._client.post(`/accounts/${account_id}/vectorize/v2/indexes/${indexName}/metadata_index/delete`, { body, ...options, })._thenUnwrap((obj) => obj.result); } } exports.MetadataIndex = MetadataIndex; //# sourceMappingURL=metadata-index.js.map