@goatlab/typesense
Version:
Modern TypeScript wrapper for Typesense search engine API
13 lines • 488 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.deleteCollection = deleteCollection;
async function deleteCollection(ctx, collectionName) {
const collection = collectionName || ctx.fqcn();
const result = await ctx.httpClient.request(`/collections/${collection}`, {
method: 'DELETE',
});
// Remove from cache
ctx.schemaManager.deleteCachedSchema(collection);
return result;
}
//# sourceMappingURL=deleteCollection.js.map