import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"; import * as core from "../../../../core/index.js"; import * as HydraDB from "../../../index.js"; export declare namespace ContextClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class ContextClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: ContextClient.Options); /** * Delete one or more knowledge sources or memories by ID. * * By default this endpoint answers 200 for every outcome, including a delete * that removed nothing — check `data.deleted_count` and `data.results` rather * than the status code. * * Send `X-HydraDB-Delete-Status: strict` to opt in to honest status codes: a * delete that did not happen then answers 404/409/500 and never 200. This is * the recommended mode for new integrations. On those failures the response * `data` still carries the same `results` / `deleted_count` payload a 200 * carries, so per-id outcomes stay readable either way. * * The default is expected to become strict in a future release, at which * point `X-HydraDB-Delete-Status: legacy` keeps the unconditional 200 for a * caller that is not ready. * * @param {HydraDB.SourcesV2SourceDeleteRequest} request * @param {ContextClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.BadRequestError} * @throws {@link HydraDB.NotFoundError} * @throws {@link HydraDB.ConflictError} * @throws {@link HydraDB.InternalServerError} * * @example * await client.context.delete() */ delete(request?: HydraDB.SourcesV2SourceDeleteRequest, requestOptions?: ContextClient.RequestOptions): core.HttpResponsePromise; private __delete; /** * Return the indexed chunk text for a source, or for a specific set of chunk ids (the ids a graph relation cites as its evidence). Chunk rows are read from the document store first and from the vector store for anything it does not hold. Chunks whose source the request's principals may not see are omitted, and so are chunks whose source cannot be established. * * @param {HydraDB.ChunksContextRequest} request * @param {ContextClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.BadRequestError} * * @example * await client.context.chunks({ * database: "acme_corp", * collection: "team_docs", * tenantId: "tenant_1234", * subTenantId: "sub_tenant_4567", * id: "HydraDoc1234" * }) */ chunks(request: HydraDB.ChunksContextRequest, requestOptions?: ContextClient.RequestOptions): core.HttpResponsePromise; private __chunks; /** * Ingest content for a database: knowledge `documents` or `app_knowledge`, or `memories`, selected by `type`. * * @param {HydraDB.IngestContextRequest} request * @param {ContextClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.BadRequestError} * @throws {@link HydraDB.ContentTooLargeError} * @throws {@link HydraDB.UnsupportedMediaTypeError} * @throws {@link HydraDB.UnprocessableEntityError} * * @example * import { createReadStream } from "fs"; * await client.context.ingest({ * database: "database" * }) */ ingest(request: HydraDB.IngestContextRequest, requestOptions?: ContextClient.RequestOptions): core.HttpResponsePromise; private __ingest; /** * Fetch a previously ingested source's content, inferred content, and a downloadable URL. * * @param {HydraDB.InspectContextRequest} request * @param {ContextClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.BadRequestError} * @throws {@link HydraDB.NotFoundError} * * @example * await client.context.inspect({ * id: "HydraDoc1234", * database: "acme_corp", * collection: "team_docs", * tenantId: "tenant_1234", * subTenantId: "sub_tenant_4567", * mode: "thinking" * }) */ inspect(request: HydraDB.InspectContextRequest, requestOptions?: ContextClient.RequestOptions): core.HttpResponsePromise; private __inspect; /** * List items (id + metadata) for a database: knowledge sources (default) or memories, selected by `type`. * * @param {HydraDB.ListV2ListContentRequest} request * @param {ContextClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.BadRequestError} * * @example * await client.context.list() */ list(request?: HydraDB.ListV2ListContentRequest, requestOptions?: ContextClient.RequestOptions): core.HttpResponsePromise; private __list; /** * Return knowledge-graph relations for a tenant or a single source. * * @param {HydraDB.RelationsContextRequest} request * @param {ContextClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.BadRequestError} * * @example * await client.context.relations({ * database: "acme_corp", * collection: "team_docs", * tenantId: "tenant_1234", * subTenantId: "sub_tenant_4567", * id: "HydraDoc1234" * }) */ relations(request: HydraDB.RelationsContextRequest, requestOptions?: ContextClient.RequestOptions): core.HttpResponsePromise; private __relations; /** * Return the processing status for one or more source IDs. * * @param {HydraDB.StatusContextRequest} request * @param {ContextClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.BadRequestError} * * @example * await client.context.status({ * id: "HydraDoc1234", * database: "acme_corp", * collection: "team_docs", * tenantId: "tenant_1234", * subTenantId: "sub_tenant_4567" * }) */ status(request: HydraDB.StatusContextRequest, requestOptions?: ContextClient.RequestOptions): core.HttpResponsePromise; private __status; /** * Query-string form of GET /context/{id}/subgraph: the same parameters, the same response, and the same rules. It exists for an id that contains '/', which cannot be spelled as one path segment; generated SDKs call this form for every id. Return the connected subgraph of one ingested item: every item reachable from it through item-level relations (explicit `relates_to` links, a shared thread, parent/child hierarchy, traversed breadth-first up to `depth` hops), the relations among those members, and the structural graph around them (entities, comments, attachments, actors). Chunk-level entity relations are not included; use Inspecting Context Relations for those. An unknown id returns an empty subgraph, not an error. * * @param {HydraDB.SubgraphContextRequest} request * @param {ContextClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.BadRequestError} * * @example * await client.context.subgraph({ * id: "HydraDoc1234", * database: "acme_corp", * collection: "team_docs", * tenantId: "tenant_1234", * subTenantId: "sub_tenant_4567" * }) */ subgraph(request: HydraDB.SubgraphContextRequest, requestOptions?: ContextClient.RequestOptions): core.HttpResponsePromise; private __subgraph; /** * Merge/upsert database_metadata and additional_metadata for one source. collection is required. * * @param {HydraDB.HandlerContextMetadataUpdateRequest} request * @param {ContextClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link HydraDB.BadRequestError} * @throws {@link HydraDB.NotFoundError} * @throws {@link HydraDB.InternalServerError} * * @example * await client.context.updateSourceMetadata({ * id: "HydraDoc1234" * }) */ updateSourceMetadata(request: HydraDB.HandlerContextMetadataUpdateRequest, requestOptions?: ContextClient.RequestOptions): core.HttpResponsePromise; private __updateSourceMetadata; }