"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.Knowledge = void 0;
const knowledgeCreate_js_1 = require("../funcs/knowledgeCreate.js");
const knowledgeCreateChunks_js_1 = require("../funcs/knowledgeCreateChunks.js");
const knowledgeCreateDatasource_js_1 = require("../funcs/knowledgeCreateDatasource.js");
const knowledgeDelete_js_1 = require("../funcs/knowledgeDelete.js");
const knowledgeDeleteChunk_js_1 = require("../funcs/knowledgeDeleteChunk.js");
const knowledgeDeleteChunks_js_1 = require("../funcs/knowledgeDeleteChunks.js");
const knowledgeDeleteDatasource_js_1 = require("../funcs/knowledgeDeleteDatasource.js");
const knowledgeGetChunksCount_js_1 = require("../funcs/knowledgeGetChunksCount.js");
const knowledgeList_js_1 = require("../funcs/knowledgeList.js");
const knowledgeListChunks_js_1 = require("../funcs/knowledgeListChunks.js");
const knowledgeListChunksPaginated_js_1 = require("../funcs/knowledgeListChunksPaginated.js");
const knowledgeListDatasources_js_1 = require("../funcs/knowledgeListDatasources.js");
const knowledgeRetrieve_js_1 = require("../funcs/knowledgeRetrieve.js");
const knowledgeRetrieveChunk_js_1 = require("../funcs/knowledgeRetrieveChunk.js");
const knowledgeRetrieveDatasource_js_1 = require("../funcs/knowledgeRetrieveDatasource.js");
const knowledgeSearch_js_1 = require("../funcs/knowledgeSearch.js");
const knowledgeUpdate_js_1 = require("../funcs/knowledgeUpdate.js");
const knowledgeUpdateChunk_js_1 = require("../funcs/knowledgeUpdateChunk.js");
const knowledgeUpdateDatasource_js_1 = require("../funcs/knowledgeUpdateDatasource.js");
const sdks_js_1 = require("../lib/sdks.js");
const fp_js_1 = require("../types/fp.js");
class Knowledge extends sdks_js_1.ClientSDK {
    /**
     * List all knowledge bases
     *
     * @remarks
     * Returns a list of your knowledge bases. The knowledge bases are returned sorted by creation date, with the most recent knowledge bases appearing first
     */
    async list(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, knowledgeList_js_1.knowledgeList)(this, request, options));
    }
    /**
     * Create a knowledge
     */
    async create(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, knowledgeCreate_js_1.knowledgeCreate)(this, request, options));
    }
    /**
     * Retrieves a knowledge base
     *
     * @remarks
     * Retrieve a knowledge base with the settings.
     */
    async retrieve(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, knowledgeRetrieve_js_1.knowledgeRetrieve)(this, request, options));
    }
    /**
     * Updates a knowledge
     */
    async update(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, knowledgeUpdate_js_1.knowledgeUpdate)(this, request, options));
    }
    /**
     * Deletes a knowledge
     *
     * @remarks
     * Deletes a knowledge base. Deleting a knowledge base will delete all the datasources and chunks associated with it.
     */
    async delete(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, knowledgeDelete_js_1.knowledgeDelete)(this, request, options));
    }
    /**
     * Search knowledge base
     *
     * @remarks
     * Search a Knowledge Base and return the most similar chunks, along with their search and rerank scores. Note that all configuration changes made in the API will override the settings in the UI.
     */
    async search(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, knowledgeSearch_js_1.knowledgeSearch)(this, request, options));
    }
    /**
     * List all datasources
     */
    async listDatasources(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, knowledgeListDatasources_js_1.knowledgeListDatasources)(this, request, options));
    }
    /**
     * Create a new datasource
     */
    async createDatasource(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, knowledgeCreateDatasource_js_1.knowledgeCreateDatasource)(this, request, options));
    }
    /**
     * Retrieve a datasource
     */
    async retrieveDatasource(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, knowledgeRetrieveDatasource_js_1.knowledgeRetrieveDatasource)(this, request, options));
    }
    /**
     * Deletes a datasource
     *
     * @remarks
     * Deletes a datasource from a knowledge base. Deleting a datasource will remove it from the knowledge base and all associated chunks. This action is irreversible and cannot be undone.
     */
    async deleteDatasource(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, knowledgeDeleteDatasource_js_1.knowledgeDeleteDatasource)(this, request, options));
    }
    /**
     * Update a datasource
     */
    async updateDatasource(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, knowledgeUpdateDatasource_js_1.knowledgeUpdateDatasource)(this, request, options));
    }
    /**
     * Create chunks for a datasource
     */
    async createChunks(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, knowledgeCreateChunks_js_1.knowledgeCreateChunks)(this, request, options));
    }
    /**
     * List all chunks for a datasource
     */
    async listChunks(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, knowledgeListChunks_js_1.knowledgeListChunks)(this, request, options));
    }
    /**
     * Delete multiple chunks
     */
    async deleteChunks(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, knowledgeDeleteChunks_js_1.knowledgeDeleteChunks)(this, request, options));
    }
    /**
     * List chunks with offset-based pagination
     */
    async listChunksPaginated(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, knowledgeListChunksPaginated_js_1.knowledgeListChunksPaginated)(this, request, options));
    }
    /**
     * Get chunks total count
     */
    async getChunksCount(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, knowledgeGetChunksCount_js_1.knowledgeGetChunksCount)(this, request, options));
    }
    /**
     * Update a chunk
     */
    async updateChunk(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, knowledgeUpdateChunk_js_1.knowledgeUpdateChunk)(this, request, options));
    }
    /**
     * Delete a chunk
     */
    async deleteChunk(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, knowledgeDeleteChunk_js_1.knowledgeDeleteChunk)(this, request, options));
    }
    /**
     * Retrieve a chunk
     */
    async retrieveChunk(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, knowledgeRetrieveChunk_js_1.knowledgeRetrieveChunk)(this, request, options));
    }
}
exports.Knowledge = Knowledge;
//# sourceMappingURL=knowledge.js.map