/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 2f58c12547ae */ import { test } from "vitest"; import { Glean } from "../index.js"; import { createTestHTTPClient } from "./testclient.js"; test("Indexing Documents Post /Api/index/v1 /Indexdocument", async () => { const testHttpClient = createTestHTTPClient( "post_/api/index/v1/indexdocument", ); const glean = new Glean({ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", httpClient: testHttpClient, apiToken: process.env["GLEAN_API_TOKEN"] ?? "value", }); await glean.indexing.documents.addOrUpdate({ document: { datasource: "", }, }); }); test("Indexing Documents Post /Api/index/v1 /Indexdocuments", async () => { const testHttpClient = createTestHTTPClient( "post_/api/index/v1/indexdocuments", ); const glean = new Glean({ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", httpClient: testHttpClient, apiToken: process.env["GLEAN_API_TOKEN"] ?? "value", }); await glean.indexing.documents.index({ datasource: "", documents: [ { datasource: "", }, ], }); }); test("Indexing Documents Post /Api/index/v1 /Bulkindexdocuments", async () => { const testHttpClient = createTestHTTPClient( "post_/api/index/v1/bulkindexdocuments", ); const glean = new Glean({ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", httpClient: testHttpClient, apiToken: process.env["GLEAN_API_TOKEN"] ?? "value", }); await glean.indexing.documents.bulkIndex({ uploadId: "", datasource: "", documents: [ { datasource: "", }, ], }); }); test("Indexing Documents Post /Api/index/v1 /Processalldocuments", async () => { const testHttpClient = createTestHTTPClient( "post_/api/index/v1/processalldocuments", ); const glean = new Glean({ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", httpClient: testHttpClient, apiToken: process.env["GLEAN_API_TOKEN"] ?? "value", }); await glean.indexing.documents.processAll(); }); test("Indexing Documents Post /Api/index/v1 /Deletedocument", async () => { const testHttpClient = createTestHTTPClient( "post_/api/index/v1/deletedocument", ); const glean = new Glean({ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", httpClient: testHttpClient, apiToken: process.env["GLEAN_API_TOKEN"] ?? "value", }); await glean.indexing.documents.delete({ datasource: "", objectType: "", id: "", }); });