import { Readable } from "node:stream"; import { Agent, AgentOptions } from "node:http"; import { Agent as Agent$1, AgentOptions as AgentOptions$1 } from "node:https"; import { SpanExporter, SpanProcessor } from "@opentelemetry/sdk-trace-base"; import { Readable as Readable$1 } from "stream"; import { createClient } from "@hey-api/client-fetch"; import * as playwright from "playwright"; import * as puppeteer from "puppeteer"; import { AttributeValue, SpanContext } from "@opentelemetry/api"; //#endregion //#region ../types/dist/index.d.cts //#region src/browser.d.ts /** * Options for masking different types of input fields during browser session recording. */ interface MaskInputOptions { textarea?: boolean; text?: boolean; number?: boolean; select?: boolean; email?: boolean; tel?: boolean; } /** * Options for browser session recording configuration. */ interface SessionRecordingOptions { maskInputOptions?: MaskInputOptions; } //#endregion //#region src/debug.d.ts /** * A single cached LLM response served by a debug-replay cache HIT. The provider * wrappers consume `output` (a JSON string) and `attributes` to reconstruct the * call result; `name`/`input` are unused by replay. */ interface CachedSpan { name: string; input: string; output: string; attributes: Record; } //#endregion //#region src/debug-session.d.ts /** * Shared `.lmnr/debug-session.json` contract. * * Single source of truth for the persisted debug-session record's SHAPE and * location, imported by both `@lmnr-ai/lmnr` (the SDK — reads at init, writes at * shutdown) and `lmnr-cli` (resets it via `debug session new`). `@lmnr-ai/types` * stays type-only (no `node:fs`), so the fs read/write helpers live in each * consumer; they all import this interface + the filename consts, which is what * keeps the on-disk shape from drifting between writers. */ /** * Persisted debug-session record at `${CWD}/.lmnr/debug-session.json`. * * Replaces the old `.lmnr/last-run.json` pointer; it is the default persistence * for a debug run (no opt-in env var). `session_id` is the PRIMARY field read at * startup to decide "join existing session vs. mint a new one". */ //#endregion //#region src/utils.d.ts type StringUUID$1 = `${string}-${string}-${string}-${string}-${string}`; //#endregion //#region src/evaluation.d.ts type InitEvaluationResponse = { id: StringUUID$1; createdAt: Date; groupId: string; name: string; projectId: StringUUID$1; }; type Dataset = { id: StringUUID$1; name: string; createdAt: string; }; type PushDatapointsResponse = { datasetId: StringUUID$1; }; type EvaluationDatapointDatasetLink = { datasetId: StringUUID$1; datapointId: StringUUID$1; createdAt: string; }; type EvaluationDatapoint = { id: StringUUID$1; data: D; target?: T; metadata?: Record; executorOutput?: O; scores?: Record; traceId: string; index: number; executorSpanId?: string; datasetLink?: EvaluationDatapointDatasetLink; }; interface Datapoint$1 { data: D; target?: T; metadata?: Record; } type GetDatapointsResponse = { items: Datapoint$1[]; totalCount: number; anyInProject: boolean; }; //#endregion //#region src/llm-profiles.d.ts /** * Workspace LLM profile wire shapes (`/v1/cli/llm-profiles`, mirrored from * app-server's `LlmProfileResponse`). Self-hosted only; on Laminar Cloud every * route 404s with `{error: "LLM profiles are not available on this deployment"}`. */ type LlmProfileProvider = "openai_completions" | "openai_responses" | "gemini" | "bedrock" | "azure_chat_completions" | "azure_responses" | "azure_anthropic" | "custom"; /** * How the profile authenticates. `api_key` for every provider except Bedrock, * which takes AWS keys (secret arrives separately in `secrets`) or a bearer * token. */ type LlmProfileAuth = { type: "api_key"; } | { type: "aws_keys"; accessKeyId: string; } | { type: "bearer_token"; }; /** * Non-secret provider options. The server normalizes per provider: absent * fields are omitted on the wire, never `null`. */ interface LlmProfileConfig { auth: LlmProfileAuth; /** Bedrock. */ region?: string; /** Azure: exactly one of `resourceId` / `baseUrl`. */ resourceId?: string; /** Azure (alternative to `resourceId`) or `custom` (required). */ baseUrl?: string; /** Azure. */ apiVersion?: string; /** `custom`: header names whose values live in `secrets.headers`. */ headerNames?: string[]; } /** * What reads return instead of secrets: a `first3***last3` mask per stored * value (fully starred when short) and custom header names only. Absent slots * arrive as explicit `null` (the server does not omit them). */ interface LlmProfileSecretMasks { apiKey?: string | null; secretAccessKey?: string | null; token?: string | null; headers: string[]; } interface LlmProfile { id: string; workspaceId: string; name: string; provider: LlmProfileProvider; config: LlmProfileConfig; models: string[]; secrets: LlmProfileSecretMasks; createdAt: string; updatedAt: string; } //#endregion //#region src/session-block.d.ts /** * Shared contract for debugger-session blocks — an ordered list of blocks (see * app-server `debugger_session_blocks`), each with a `type` and type-specific * `content`: * * - `trace` — a trace under the session; written at ingest. * - `evaluation` — an eval under the session; written at eval creation. * - `text` — a free-text note via `debug session add-note`. * - `command` — a CLI command (`sql query`, `ask`) recorded into the session. * * `type` is a plain string on the wire so new types need no client bump. */ /** Block type the CLI knows how to render. `type` is a plain string on the wire. */ type SessionBlockType = "trace" | "evaluation" | "text" | "command"; /** `content` of a `trace` block. */ interface TraceBlockContent { traceId: string; /** Legacy note folded onto the trace block at ingest, if any. */ note?: string | null; } /** `content` of an `evaluation` block. */ interface EvaluationBlockContent { evaluationId: string; /** Legacy note folded onto the evaluation block at ingest, if any. */ note?: string | null; } /** `content` of a `text` block — a standalone agent note. */ interface TextBlockContent { text: string; } /** `content` of a `command` block — a CLI command recorded into the session. */ interface CommandBlockContent { /** The command path, e.g. `"sql query"` or `"ask"`. */ command: string; /** The command's positional arguments (raw — may contain the query text). */ args: string[]; /** The process exit code observed at post-action time (0 on the success path). */ exitCode: number; /** Captured stdout, truncated to a bounded prefix. Null when empty. */ output?: string | null; /** Captured stderr, truncated to a bounded prefix. Null when empty. */ stderr?: string | null; /** Agent reasoning for this step, via `--reasoning`. Null when not provided. */ reasoning?: string | null; } /** Union of the known block content shapes. */ type SessionBlockContent = TraceBlockContent | EvaluationBlockContent | TextBlockContent | CommandBlockContent; /** * One block in a debugger session (from `GET /v1/cli/rollouts/{sessionId}/blocks`). * `content` is loose (`Record`) since `type` is open-ended; * narrow it with the `*BlockContent` interfaces above once `type` is known. */ interface SessionBlock { /** Block id (deterministic UUIDv5 for trace/eval blocks; random for text). */ id: string; /** ISO-8601 creation timestamp — the sort key for rendering oldest-first. */ createdAt: string; /** Block type; one of {@link SessionBlockType} for known blocks. */ type: string; /** Type-specific payload; narrow via the `*BlockContent` interfaces. */ content: Record; } //#endregion //#region src/signals.d.ts /** * A signal's payload schema — the structured output the LLM must return. Every * field is required; enums are a string field with an `enum` array. */ interface SignalStructuredOutput { type: "object"; properties: Record; required: string[]; } /** * WHEN a signal is evaluated, decided from a single span batch. A closed set, * not a column list: these are the only two shapes the backend evaluates, so * anything else would be stored and then silently never fire. */ type SignalTrigger = { type: "rootSpanFinished"; } | { type: "spanName"; spanNames: string[]; }; /** * WHETHER a fired signal runs — a property of the whole trace. Columns: * `total_token_count`, `status`, `span_names`. An empty list runs on every * firing trace. Extra keys are preserved so the shape can grow server-side * without an SDK release. */ interface SignalFilter { column: string; operator: string; value: unknown; [key: string]: unknown; } type SignalMode = "batch" | "realtime"; interface Signal { id: string; projectId: string; name: string; prompt: string; structuredOutput: SignalStructuredOutput; sampleRate: number | null; disabled: boolean; createdAt: string; trigger: SignalTrigger; filters: SignalFilter[]; mode: SignalMode; /** Workspace LLM profile id; `null` = runs on the server's env LLM. */ llmProfileId: string | null; /** Display name of `llmProfileId`; `null` alongside it. */ llmProfileName: string | null; /** Model pinned within the profile; `null` alongside `llmProfileId`. */ model: string | null; } /** * Stored version blob on `GET /signals/{id}/versions`. Schema key is * `structuredOutputSchema`, not `structuredOutput` (that name is only on * `GET /signals/{id}`). `trigger`/`filters` are stored Filter[] JSON * (`signal_triggers.value` / `filters`), not the CLI tagged {@link SignalTrigger}. */ interface SignalDefinition { name: string; prompt: string; structuredOutputSchema: SignalStructuredOutput; trigger: SignalFilter[]; filters: SignalFilter[]; mode: SignalMode; sampleRate: number | null; disabled: boolean; /** Both `null` = env-var routing. Cloud signals stay `null`. */ llmProfileId: string | null; llmModel: string | null; } /** * One historical judge definition. `GET /signals/{id}`'s `version` field is * only the current pointer; this is the version log. */ interface SignalVersion { version: number; definition: SignalDefinition; createdAt: string; } //#endregion //#region src/sql-schema.d.ts /** * Shared contract for `GET /v1/sql/schema` (and its `/v1/cli` twin) — the * logical tables, columns, and enums the SQL engine exposes. * * The server serializes this straight from app-server's * `query_engine::schema` consts, which also render the MCP `query_laminar_sql` * tool description and the Platform Agent prompt. That is the point: the CLI * used to carry a hand-maintained copy, and it drifted badly enough to * advertise columns that did not exist. Do NOT reintroduce a local copy — * `lmnr-cli sql schema` renders whatever the server returns. */ /** One column of a queryable table. `type` is the ClickHouse type as a string. */ interface SqlSchemaColumn { name: string; /** ClickHouse type, e.g. `UUID`, `DateTime64(9,'UTC')`, `String (enum status)`. */ type: string; description: string; } /** * One logical table. The caller writes this name; the engine rewrites it to a * project-scoped view. */ interface SqlSchemaTable { name: string; description: string; columns: SqlSchemaColumn[]; } /** A constrained column and the literals it accepts. */ interface SqlSchemaEnum { name: string; values: string[]; } /** Full response body of the schema endpoint. */ interface SqlSchema { tables: SqlSchemaTable[]; enums: SqlSchemaEnum[]; } //#endregion //#region src/tracing.d.ts /** * Span types to categorize spans. * * LLM spans are auto-instrumented LLM spans. * Pipeline spans are top-level spans created by the pipeline runner. * Executor and evaluator spans are top-level spans added automatically when doing evaluations. */ type SpanType = "DEFAULT" | "LLM" | "EXECUTOR" | "EVALUATOR" | "HUMAN_EVALUATOR" | "EVALUATION" | "TOOL" | "CACHED"; /** * Trace types to categorize traces. * They are used as association properties passed to all spans in a trace. */ type TraceType = "DEFAULT" | "EVALUATION"; /** * Tracing levels to conditionally disable tracing. * * OFF - No tracing is sent. * META_ONLY - Only metadata is sent (e.g. tokens, costs, etc.). * ALL - All data is sent. */ declare enum TracingLevel { OFF = "off", META_ONLY = "meta_only", ALL = "all" } /** * Debugger context propagated as ONE nested block of a LaminarSpanContext. * * Carries the debug-replay v2 coordinates a downstream run needs to consult the * same server-side cache window as the run that produced this context. Laminar * is the only producer; a hand-forged or `enabled: false` block is treated as * absent by the consumer (behaviour is explicitly undefined). * * enabled - armed flag — only `true` blocks are ever constructed by us. * sessionId - the run's session id, a hyphenated UUID (undefined when absent). * replayTraceId - the source trace to replay, a hyphenated UUID (undefined when * absent). * cacheUntil - the cache-window span-id needle, kept VERBATIM (hyphenated or * not, full UUID or short suffix) — the server resolves it. */ type DebugContext = { enabled: boolean; sessionId?: string; replayTraceId?: string; cacheUntil?: string; }; /** * Laminar representation of an OpenTelemetry span context. * * spanId - The ID of the span. * traceId - The ID of the trace. * isRemote - Whether the span is remote. * spanPath - The span path (span names) leading to this span. * spanIdsPath - The span IDs path leading to this span. * debug - Propagated debugger context, if any (debug-replay v2). */ type LaminarSpanContext = { spanId: StringUUID$1; traceId: StringUUID$1; isRemote: boolean; spanPath?: string[]; spanIdsPath?: StringUUID$1[]; userId?: string; sessionId?: string; metadata?: Record; traceType?: TraceType; tracingLevel?: TracingLevel; debug?: DebugContext; }; type Event = { id: StringUUID$1; templateName: string; timestamp: Date; spanId: StringUUID$1; value: number | string | null; }; //#endregion //#endregion //#region ../client/dist/index.d.cts //#region src/resources/index.d.ts /** * Unified auth for every resource. A discriminated union so a single object * drives both the URL prefix and the request headers: * * - `apiKey` → project API key (SDK / app surfaces). Routes to `/v1/*`, * Bearer is the project key, no `x-lmnr-project-id` header. * - `userToken` → BetterAuth user access JWT (the CLI user-token surface). * Routes to `/v1/cli/*`, Bearer is the JWT, carries the target project in * the `x-lmnr-project-id` header. */ type LaminarAuth = { type: "apiKey"; key: string; } | { type: "userToken"; token: string; projectId: string; }; declare class BaseResource { protected readonly baseHttpUrl: string; protected readonly auth: LaminarAuth; /** The bearer credential, regardless of auth type (project key or user JWT). */ protected readonly credential: string; constructor(baseHttpUrl: string, auth: LaminarAuth); /** API path prefix: `/v1/cli` for CLI user-token auth, `/v1` otherwise. */ protected get apiPrefix(): string; protected headers(): { "x-lmnr-project-id"?: string | undefined; Authorization: string; "Content-Type": string; Accept: string; }; protected handleError(response: Response): Promise; } //#endregion //#region src/resources/browser-events.d.ts declare class BrowserEventsResource extends BaseResource { constructor(baseHttpUrl: string, auth: LaminarAuth); send({ sessionId, traceId, events }: { sessionId: string; traceId: string; events: Record[]; }): Promise; } //#endregion //#region src/resources/cli.d.ts interface CliProject { id: string; name: string; workspaceId: string; workspaceName: string; } /** * Outcome of resolving which project a project API key belongs to via the * user-token CLI endpoint. The states are deliberately distinct so the caller * doesn't conflate "key is bad" with "couldn't reach the server": * - `ok` → key verified AND the user is a member; `projectId` is its owner. * - `invalid` → 401: key revoked/invalid. Safe to mint a fresh one. * - `unverifiable` → 403 (key belongs to a project the user can't access) / * network error / other non-2xx / malformed body. The key may be perfectly * valid — caller MUST NOT mint (minting would clobber it on a blip). */ type ProjectKeyProbe = { status: "ok"; projectId: string; } | { status: "invalid"; } | { status: "unverifiable"; }; /** * User-scoped CLI endpoints that don't target a specific project. Authed by the * BetterAuth user JWT (the `credential`); deliberately does NOT send an * `x-lmnr-project-id` header (these routes are project discovery, pre-selection). * * Discovery exception: this resource always hits `/v1/cli/projects` with the * bare bearer and overrides `BaseResource.headers()`/`apiPrefix`, so it works * even when constructed with a `userToken` auth that has no real project id yet. */ declare class CliResource extends BaseResource { constructor(baseHttpUrl: string, auth: LaminarAuth); /** Workspaces + projects the authenticated user can access. */ listProjects(): Promise; /** * Resolve which project a project API key belongs to. Authed by the user JWT * (the bearer); the project key travels in the body, NOT in `Authorization`. * The server verifies the key and that the authenticated user is a member of * the resolved project. Returns a tri-state probe so callers can distinguish a * revoked key (401 → `invalid`) from a server/access problem (`unverifiable`). */ resolveProjectByApiKey(apiKey: string): Promise; } //#endregion //#region src/resources/datasets.d.ts declare class DatasetsResource extends BaseResource { constructor(baseHttpUrl: string, auth: LaminarAuth); /** * List all datasets. * * @returns {Promise} Array of datasets */ listDatasets(): Promise; /** Create an empty dataset. */ create(name: string): Promise; /** Get a dataset by its canonical UUID. */ getById(datasetId: StringUUID$1): Promise; /** Rename a dataset. */ update(datasetId: StringUUID$1, name: string): Promise; /** Delete a dataset and its datapoints. */ delete(datasetId: StringUUID$1): Promise; /** * Get a dataset by name. * * @param {string} name - Name of the dataset * @returns {Promise} Array of datasets with matching name */ getDatasetByName(name: string): Promise; /** * Push datapoints to a dataset. * * @param {Object} options - Push options * @param {Datapoint[]} options.points - Datapoints to push * @param {string} [options.name] - Name of the dataset (either name or id must be provided) * @param {StringUUID} [options.id] - ID of the dataset (either name or id must be provided) * @param {number} [options.batchSize] - Batch size for pushing (default: 100) * @param {boolean} [options.createDataset] - Whether to create the dataset if it doesn't exist * @returns {Promise} */ push({ points, name, id, batchSize, createDataset }: { points: Datapoint$1[]; name?: string; id?: StringUUID$1; batchSize?: number; createDataset?: boolean; }): Promise; /** * Pull datapoints from a dataset. * * @param {Object} options - Pull options * @param {string} [options.name] - Name of the dataset (either name or id must be provided) * @param {StringUUID} [options.id] - ID of the dataset (either name or id must be provided) * @param {number} [options.limit] - Maximum number of datapoints to return (default: 100) * @param {number} [options.offset] - Offset for pagination (default: 0) * @returns {Promise>} */ pull({ name, id, limit, offset }: { name?: string; id?: StringUUID$1; limit?: number; offset?: number; }): Promise>; } //#endregion //#region src/resources/evals.d.ts declare class EvalsResource extends BaseResource { constructor(baseHttpUrl: string, auth: LaminarAuth); /** * Initialize an evaluation. * * @param {string} name - Name of the evaluation * @param {string} groupName - Group name of the evaluation * @param {Record} metadata - Optional metadata * @returns {Promise} Response from the evaluation initialization */ init(name?: string, groupName?: string, metadata?: Record): Promise; /** * Create a new evaluation and return its ID. * * @param {string} [name] - Optional name of the evaluation * @param {string} [groupName] - An identifier to group evaluations * @param {Record} [metadata] - Optional metadata * @returns {Promise} The evaluation ID */ create(args?: { name?: string; groupName?: string; metadata?: Record; }): Promise; /** * Update an evaluation's name and/or metadata. The group ID is immutable. * Fields left undefined are kept unchanged. * * @param {Object} options - Update evaluation options * @param {string} options.evalId - The evaluation ID * @param {string} [options.name] - New name of the evaluation * @param {Record} [options.metadata] - New metadata for the evaluation * @returns {Promise} The updated evaluation */ update({ evalId, name, metadata }: { evalId: string; name?: string; metadata?: Record; }): Promise; /** * Create a new evaluation and return its ID. * @deprecated use `create` instead. */ createEvaluation(name?: string, groupName?: string, metadata?: Record): Promise; /** * Create a datapoint for an evaluation. * * @param {Object} options - Create datapoint options * @param {string} options.evalId - The evaluation ID * @param {D} options.data - The input data for the executor * @param {T} [options.target] - The target/expected output for evaluators * @param {Record} [options.metadata] - Optional metadata * @param {number} [options.index] - Optional index of the datapoint * @param {string} [options.traceId] - Optional trace ID * @returns {Promise} The datapoint ID */ createDatapoint({ evalId, data, target, metadata, index, traceId }: { evalId: string; data: D; target?: T; metadata?: Record; index?: number; traceId?: string; }): Promise; /** * Update a datapoint with evaluation results. * * @param {Object} options - Update datapoint options * @param {string} options.evalId - The evaluation ID * @param {string} options.datapointId - The datapoint ID * @param {Record} options.scores - The scores * @param {O} [options.executorOutput] - The executor output * @returns {Promise} */ updateDatapoint({ evalId, datapointId, scores, executorOutput }: { evalId: string; datapointId: string; scores: Record; executorOutput?: O; }): Promise; /** * Save evaluation datapoints. * * @param {Object} options - Save datapoints options * @param {string} options.evalId - ID of the evaluation * @param {EvaluationDatapoint[]} options.datapoints - Datapoint to add * @param {string} [options.groupName] - Group name of the evaluation * @returns {Promise} Response from the datapoint addition */ saveDatapoints({ evalId, datapoints, groupName }: { evalId: string; datapoints: EvaluationDatapoint[]; groupName?: string; }): Promise; /** * Get evaluation datapoints. * * @deprecated Use `client.datasets.pull()` instead. * @param {Object} options - Get datapoints options * @param {string} options.datasetName - Name of the dataset * @param {number} options.offset - Offset at which to start the query * @param {number} options.limit - Maximum number of datapoints to return * @returns {Promise} Response from the datapoint retrieval */ getDatapoints({ datasetName, offset, limit }: { datasetName: string; offset: number; limit: number; }): Promise>; private retrySaveDatapoints; } //#endregion //#region src/resources/evaluators.d.ts type ScoreOptions = { name: string; metadata?: Record; score: number; traceId: string; } | { name: string; metadata?: Record; score: number; spanId: string; }; /** * Resource for creating evaluator scores */ declare class EvaluatorsResource extends BaseResource { constructor(baseHttpUrl: string, auth: LaminarAuth); /** * Create a score for a span or trace * * @param {ScoreOptions} options - Score creation options * @param {string} options.name - Name of the score * @param {string} [options.traceId] - The trace ID to score (will be attached to top-level span) * @param {string} [options.spanId] - The span ID to score * @param {Record} [options.metadata] - Additional metadata * @param {number} options.score - The score value (float) * @returns {Promise} * * @example * // Score by trace ID (will attach to root span) * await evaluators.score({ * name: "quality", * traceId: "trace-id-here", * score: 0.95, * metadata: { model: "gpt-4" } * }); * * @example * // Score by span ID * await evaluators.score({ * name: "relevance", * spanId: "span-id-here", * score: 0.87 * }); */ score(options: ScoreOptions): Promise; } //#endregion //#region src/resources/llm-profiles.d.ts /** * Plaintext secrets for create/update. On update this is an OVERLAY: an * omitted key keeps the stored secret, so credentials never need re-sending. */ interface LlmProfileSecretsInput { apiKey?: string; secretAccessKey?: string; token?: string; /** Values for the `custom` provider's `config.headerNames`. */ headers?: Record; } interface CreateLlmProfileOptions { name: string; provider: LlmProfileProvider; /** Omitted `auth` defaults to `{type: "api_key"}`. */ config?: Partial; secrets?: LlmProfileSecretsInput; models: string[]; } /** * A partial patch: omitted fields keep their stored value. `models` replaces * the whole list when present; `config` is required when `provider` changes. */ interface UpdateLlmProfileOptions { name?: string; provider?: LlmProfileProvider; config?: Partial; secrets?: LlmProfileSecretsInput; models?: string[]; } /** * Workspace LLM profile CRUD over the CLI user-token surface * (`/v1/cli/llm-profiles`). Validation is entirely server-side; error messages * come back user-ready. Self-hosted only: on Laminar Cloud every route 404s * with `{error: "LLM profiles are not available on this deployment"}`. */ declare class LlmProfilesResource extends BaseResource { constructor(baseHttpUrl: string, auth: LaminarAuth); /** * Errors come back as `{error: string}` (matches the signals surface) with * user-facing text, so unwrap the envelope before raising rather than * showing the raw JSON body. */ private raiseLlmProfileError; private request; /** * Every workspace LLM profile visible to the caller, ordered * case-insensitively by name. Empty array on a workspace with no profiles. */ list(): Promise; get(profileId: string): Promise; create(options: CreateLlmProfileOptions): Promise; update(profileId: string, options: UpdateLlmProfileOptions): Promise; /** * Deletes the profile and returns it. The server refuses (409) when any * signal still routes through the profile. */ delete(profileId: string): Promise; } //#endregion //#region src/resources/rollout-sessions.d.ts /** * Result of a debug-replay cache lookup (debug-replay v2). * * - `hit` — the server served a cached response for this input hash; replay it * and mark the span CACHED. * - `miss` — no cache entry; the caller latches process-wide live mode and runs * every subsequent call live. * - `live` — run THIS call live without latching (server COLD warmup-timeout * degrade, or any non-OK / transport error here). */ type CacheOutcome = { kind: "hit"; cached: CachedSpan; } | { kind: "miss"; } | { kind: "live"; }; declare class RolloutSessionsResource extends BaseResource { constructor(baseHttpUrl: string, auth: LaminarAuth); /** * Idempotently register (upsert) a debug session on the backend, keyed on the * SDK-supplied session id. The backend stores the row so the session is * visible in the UI; a null/omitted name never clobbers a name set elsewhere. * * Returns the backend-resolved `projectId` (derived from the API key) so the * caller can build the debugger URL; null if the body can't be parsed. */ register({ sessionId, name }: { sessionId: string; name?: string; }): Promise; /** * Rename an existing debug session. Update-only: the backend returns 404 (and * this throws) when the session id is unknown for the project, so a mistyped * id surfaces as an error rather than silently creating a session. Creation * stays the SDK's job via {@link register}. */ setName({ sessionId, name }: { sessionId: string; name: string; }): Promise; /** * Append a block to a debug session (debugger session blocks). * * A debug session renders as an ordered list of blocks; this writes one to the * backend keyed by session id. The CLI uses it for `text` blocks — standalone * agent notes attached post-factum via `lmnr-cli debug session add-note` — so * a note is tied to the SESSION, not to a specific trace / evaluation (those * blocks are written at ingest from `rollout.session_id` metadata). * * A 404 (the session is unknown for the project) is logged and swallowed * unless `failOnNotFound` is set — CLI callers pass it so an exit 0 means the * block actually landed. Any other non-OK status throws. * * Returns the created block id, or null when the response body can't be parsed. */ addBlock({ sessionId, type, content, failOnNotFound, signal }: { sessionId: string; type: SessionBlockType; content: SessionBlockContent; failOnNotFound?: boolean; signal?: AbortSignal; }): Promise; /** * List a debug session's blocks in creation order. * * Returns every `trace` / `evaluation` / `text` block on the session — the * same data the debugger UI renders. Used by `lmnr-cli debug session summary` * to print a chronological digest of the session. Returns an empty array when * the session has no blocks or the body can't be parsed. */ listBlocks({ sessionId }: { sessionId: string; }): Promise; /** * Look up the debug-replay cache for a single LLM call (debug-replay v2). * * The server is keyed by `inputHash` (hex blake3 of the canonicalized, * system-stripped input messages). It returns one of three outcomes: * - `{ outcome: "hit", response }` — a cached response to replay. * - `{ outcome: "miss" }` — no entry; caller latches live mode. * - `{ outcome: "live" }` — run this call live (COLD degrade). * * Error posture: a non-OK response or a transport error degrades to * `{ kind: "live" }` for THIS call only — it never throws and never latches * the process-wide live flag (only a real MISS does that). This keeps a flaky * cache backend from turning a replay into a crash. */ cache({ sessionId, replayTraceId, cacheUntil, inputHash }: { sessionId: string; replayTraceId: string; cacheUntil: string; inputHash: string; }): Promise; delete({ sessionId }: { sessionId: string; }): Promise; } //#endregion //#region src/resources/signals.d.ts interface CreateSignalOptions { name: string; prompt: string; structuredOutput: SignalStructuredOutput; /** Omit for no sampling. */ sampleRate?: number; disabled?: boolean; /** Omit for the default (root span finished). */ trigger?: SignalTrigger; /** Omit for the default (>1000 tokens); `[]` runs on every firing trace. */ filters?: SignalFilter[]; /** Defaults to `"realtime"`. */ mode?: SignalMode; /** * Workspace LLM profile id (discover via `llmProfiles.list()`). Required * together with `model` on self-hosted deployments; rejected on Laminar * Cloud (the server has env-configured LLMs). */ llmProfileId?: string; /** One of the profile's models. Required together with `llmProfileId`. */ model?: string; } /** * A partial patch. Every field is optional and an ABSENT field leaves the stored * value alone. `sampleRate: null` clears sampling, `filters: []` clears filters. * `llmProfileId` + `model` must be sent together to re-route; the wire has no * shape for clearing the route back to the server's env LLM. */ interface UpdateSignalOptions { prompt?: string; structuredOutput?: SignalStructuredOutput; sampleRate?: number | null; disabled?: boolean; trigger?: SignalTrigger; filters?: SignalFilter[]; mode?: SignalMode; llmProfileId?: string; model?: string; } /** Signals CRUD over the CLI user-token surface (`/v1/cli/signals`). */ declare class SignalsResource extends BaseResource { constructor(baseHttpUrl: string, auth: LaminarAuth); /** * Every signal route answers errors as `{ error: "" }`, and those * messages are written to be shown to the user verbatim (e.g. "A signal named * X already exists in this project"). The shared `handleError` would surface * the raw JSON body, so unwrap the envelope here and fall back to it when the * body isn't the expected shape. */ private raiseSignalError; list(name?: string): Promise; get(signalId: string): Promise; /** * Historical judge definitions for `signalId`, oldest first. Distinct from * `GET /signals/{id}`'s `version` field, which is only the current pointer. * 404 if that id isn't in this project; an empty list only if the signal * exists with no version rows. */ listVersions(signalId: string): Promise; create(options: CreateSignalOptions): Promise; /** * PATCH, not PUT: only the keys present in `options` are sent, so the server * leaves everything else as stored. An explicit `null` on `sampleRate` must * survive serialization (it means "clear"), so nulls are NOT stripped here. */ update(signalId: string, options: UpdateSignalOptions): Promise; /** Deletes the signal, its triggers, its alerts, and its ClickHouse events. */ delete(signalId: string): Promise; } //#endregion //#region src/resources/sql.d.ts declare class SqlResource extends BaseResource { constructor(baseHttpUrl: string, auth: LaminarAuth); query(sql: string, parameters?: Record): Promise>>; /** * Fetch the queryable tables, columns, and enums. Server-rendered from * app-server's `query_engine::schema`, so it is the same source that backs * the MCP `query_laminar_sql` tool description — never a client-side copy. */ schema(): Promise; } //#endregion //#region src/resources/tags.d.ts declare class TagsResource extends BaseResource { /** Resource for tagging traces. */ constructor(baseHttpUrl: string, auth: LaminarAuth); /** * Tag a trace with a list of tags. Note that the trace must be ended before * tagging it. You may want to call `await Laminar.flush()` after the trace * that you want to tag. * * @param {string | StringUUID} trace_id - The trace id to tag. * @param {string[] | string} tags - The tag or list of tags to add to the trace. * @returns {Promise} The response from the server. * @example * ```javascript * import { Laminar, observe, LaminarClient } from "@lmnr-ai/lmnr"; * Laminar.initialize(); * const client = new LaminarClient(); * let traceId: StringUUID | null = null; * // Make sure this is called outside of traced context. * await observe( * { * name: "my-trace", * }, * async () => { * traceId = await Laminar.getTraceId(); * await foo(); * }, * ); * * // or make sure the trace is ended by this point. * await Laminar.flush(); * if (traceId) { * await client.tags.tag(traceId, ["tag1", "tag2"]); * } * ``` */ tag(trace_id: string, tags: string[] | string): Promise; } //#endregion //#region src/resources/traces.d.ts declare class TracesResource extends BaseResource { /** Resource for post-factum operations on existing traces. */ constructor(baseHttpUrl: string, auth: LaminarAuth); /** * Push a metadata patch to an existing trace. * * The patch is shallow-merged server-side into the trace's existing metadata * (`existing || patch`, last-write-wins per top-level key). Useful for * attaching post-factum signals — quality scores, human edits, triage labels — * to a trace that has already finished. The patch does NOT extend `endTime` * or change tokens / cost / top span / tags / span names. `numSpans` is * incremented by 1 (paid by the virtual span that carried the patch through * the ingestion queue) so the new ClickHouse row beats the prior version on * `ReplacingMergeTree(numSpans)`. No row is added to the `spans` table. * * Compared to `Laminar.setTraceMetadata` (which sets metadata on the * currently in-flight trace via OpenTelemetry attributes), this method * operates on a finished trace by trace id, so it must be called after the * trace has been flushed. * * A 404 response (the trace was not found in the project — typically because * it has not been flushed yet) is logged as a warning and the call returns * without throwing, since the 404 may be expected when pushing too soon * after the trace run. Pass `failOnNotFound: true` to throw instead (e.g. * CLI callers that must report the failure). Any other non-OK status throws. * * @param traceId - The trace id to push metadata to. Accepts a UUID string * or a 32-char OTel hex trace id. * @param metadata - The metadata patch. Top-level keys are merged into the * trace's existing metadata. Must be non-empty (the server rejects empty * patches with 400). * @param options - `failOnNotFound`: throw on 404 instead of warn-and-return. * @example * ```typescript * import { Laminar, observe, LaminarClient } from "@lmnr-ai/lmnr"; * Laminar.initialize(); * const client = new LaminarClient(); * * let traceId: string | null = null; * await observe({ name: "generate" }, async () => { * traceId = await Laminar.getTraceId(); * }); * await Laminar.flush(); * * if (traceId) { * await client.traces.pushMetadata(traceId, { * score: 0.85, * reviewer: "alice", * needsReview: false, * }); * } * ``` */ pushMetadata(traceId: string, metadata: Record, options?: { failOnNotFound?: boolean; }): Promise; } //#endregion //#region src/index.d.ts declare class LaminarClient { private baseUrl; private auth; private configuredUrl?; private _browserEvents; private _cli; private _datasets; private _evals; private _evaluators; private _llmProfiles; private _rolloutSessions; private _signals; private _sql; private _tags; private _traces; constructor({ baseUrl, port, auth, projectApiKey, cliUserProjectId }?: { baseUrl?: string; port?: number; /** * Unified auth. A discriminated union that drives both the URL prefix and * the request headers: * - `{ type: "apiKey", key }` → project key, `/v1/*`. * - `{ type: "userToken", token, projectId }` → user JWT, `/v1/cli/*` with * `x-lmnr-project-id`. * When omitted, the legacy `projectApiKey` / `cliUserProjectId` fields (or * `LMNR_PROJECT_API_KEY`) are normalized into this union. */ auth?: LaminarAuth; /** * @deprecated Pass `auth: { type: "apiKey", key }` instead. Kept for * backward compatibility — normalized into the unified `auth` union. */ projectApiKey?: string; /** * @deprecated Pass `auth: { type: "userToken", token, projectId }` instead. * Kept for backward compatibility: when set, the legacy `projectApiKey` is * treated as a user JWT and routes to `/v1/cli/*` with this project id. */ cliUserProjectId?: string; }); /** * The fully-resolved API origin every resource fetches from, e.g. * `http://localhost:8000`. Already normalized: trailing slash removed, any * port embedded in `baseUrl` stripped, and the effective port appended. * * Exposed so callers can name the real address in diagnostics instead of * rebuilding it from `baseUrl` + `port` — that reconstruction drifts from * this normalization and prints things like `http://host:8000:9000`. */ get apiBaseUrl(): string; /** * Normalize the constructor's auth inputs into a {@link LaminarAuth} union. * Precedence: an explicit `auth` wins; otherwise the legacy * `projectApiKey` (+ optional `cliUserProjectId`) is mapped — a present * `cliUserProjectId` selects the user-token surface, otherwise the project * key surface. Falls back to `LMNR_PROJECT_API_KEY` as a project key. */ private static normalizeAuth; /** * The base URL this client was configured with (constructor arg or * `LMNR_BASE_URL`), before port normalization; `undefined` when the client * fell back to the default Laminar Cloud URL. Lets integrations that accept * a pre-constructed client derive companion transports (e.g. a span * exporter) from the same connection settings. */ get configuredBaseUrl(): string | undefined; /** * The project API key this client authenticates with, or `undefined` when * it uses user-token auth. */ get apiKey(): string | undefined; get browserEvents(): BrowserEventsResource; get cli(): CliResource; get datasets(): DatasetsResource; get evals(): EvalsResource; get evaluators(): EvaluatorsResource; get llmProfiles(): LlmProfilesResource; get signals(): SignalsResource; get rolloutSessions(): RolloutSessionsResource; get sql(): SqlResource; get tags(): TagsResource; get traces(): TracesResource; } //#endregion //#endregion //#region src/datasets.d.ts declare abstract class EvaluationDataset { slice(start: number, end: number): Promise[]>; abstract size(): Promise | number; abstract get(index: number): Promise> | Datapoint; sourceDataset(): LaminarDataset | undefined; take(n: number): EvaluationDataset; select(indices: number[]): EvaluationDataset; shuffle({ seed }?: { seed?: number; }): EvaluationDataset; } declare class LaminarDataset extends EvaluationDataset { private pages; private len; private fetchSize; private client; name: string | undefined; id?: StringUUID$1; constructor(name?: string, options?: { id?: StringUUID$1; fetchSize?: number; }); setClient(client: LaminarClient): void; sourceDataset(): LaminarDataset | undefined; private fetchPage; private doFetchPage; size(): Promise; get(index: number): Promise>; /** * Push data from files to this dataset. * * @param {string | string[]} paths - Path(s) to files or directories containing data * @param {boolean} recursive - Whether to recursively read files in directories */ push(paths: string | string[], recursive?: boolean): Promise; } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/abort-handler.d.ts /** * @public */ interface AbortHandler { (this: AbortSignal | AbortSignal$1, ev: any): any; } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/abort.d.ts /** * Holders of an AbortSignal object may query if the associated operation has * been aborted and register an onabort handler. * * @public * @deprecated use platform (global) type for AbortSignal. * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal */ interface AbortSignal$1 { /** * Whether the action represented by this signal has been cancelled. */ readonly aborted: boolean; /** * A function to be invoked when the action represented by this signal has * been cancelled. */ onabort: AbortHandler | Function | null; } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/auth/auth.d.ts /** * Authentication schemes represent a way that the service will authenticate the customer’s identity. * * @internal */ interface AuthScheme { /** * @example "sigv4a" or "sigv4" */ name: "sigv4" | "sigv4a" | string; /** * @example "s3" */ signingName: string; /** * @example "us-east-1" */ signingRegion: string; /** * @example ["*"] * @example ["us-west-2", "us-east-1"] */ signingRegionSet?: string[]; /** * @deprecated this field was renamed to signingRegion. */ signingScope?: never; properties: Record; } /** * @deprecated * * @internal */ interface HttpAuthDefinition { /** * Defines the location of where the Auth is serialized. */ in: HttpAuthLocation; /** * Defines the name of the HTTP header or query string parameter * that contains the Auth. */ name: string; /** * Defines the security scheme to use on the `Authorization` header value. * This can only be set if the "in" property is set to {@link HttpAuthLocation.HEADER}. */ scheme?: string; } /** * @deprecated * * @internal */ declare enum HttpAuthLocation { HEADER = "header", QUERY = "query" } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/identity/identity.d.ts /** * @public */ interface Identity { /** * A `Date` when the identity or credential will no longer be accepted. */ readonly expiration?: Date; } /** * @public */ interface IdentityProvider { (identityProperties?: Record): Promise; } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/response.d.ts /** * @public */ interface ResponseMetadata { /** * The status code of the last HTTP response received for this operation. */ httpStatusCode?: number; /** * A unique identifier for the last request sent for this operation. Often * requested by AWS service teams to aid in debugging. */ requestId?: string; /** * A secondary identifier for the last request sent. Used for debugging. */ extendedRequestId?: string; /** * A tertiary identifier for the last request sent. Used for debugging. */ cfId?: string; /** * The number of times this operation was attempted. */ attempts?: number; /** * The total amount of time (in milliseconds) that was spent waiting between * retry attempts. */ totalRetryDelay?: number; } /** * @public */ interface MetadataBearer { /** * Metadata pertaining to this request. */ $metadata: ResponseMetadata; } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/command.d.ts /** * @public */ interface Command$1 extends CommandIO { readonly input: InputType; readonly middlewareStack: MiddlewareStack; /** * This should be OperationSchema from @smithy/types, but would * create problems with the client transform type adaptors. */ readonly schema?: any; resolveMiddleware(stack: MiddlewareStack, configuration: ResolvedConfiguration, options: any): Handler; } /** * This is a subset of the Command type used only to detect the i/o types. * * @internal */ interface CommandIO { readonly input: InputType; resolveMiddleware(stack: any, configuration: any, options: any): Handler; } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/endpoint.d.ts /** * @public */ type EndpointObjectProperty = string | boolean | { [key: string]: EndpointObjectProperty; } | EndpointObjectProperty[]; /** * @public */ interface EndpointV2 { url: URL; properties?: { authSchemes?: AuthScheme[]; } & Record; headers?: Record; } /** * @public */ type EndpointParameters$1 = { [name: string]: undefined | boolean | string | string[]; }; //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/feature-ids.d.ts /** * @internal */ type SmithyFeatures = Partial<{ RESOURCE_MODEL: "A"; WAITER: "B"; PAGINATOR: "C"; RETRY_MODE_LEGACY: "D"; RETRY_MODE_STANDARD: "E"; RETRY_MODE_ADAPTIVE: "F"; GZIP_REQUEST_COMPRESSION: "L"; PROTOCOL_RPC_V2_CBOR: "M"; ENDPOINT_OVERRIDE: "N"; SIGV4A_SIGNING: "S"; CREDENTIALS_CODE: "e"; }>; //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/logger.d.ts /** * Represents a logger object that is available in HandlerExecutionContext * throughout the middleware stack. * * @public */ interface Logger { trace?: (...content: any[]) => void; debug: (...content: any[]) => void; info: (...content: any[]) => void; warn: (...content: any[]) => void; error: (...content: any[]) => void; } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/uri.d.ts /** * Represents the components parts of a Uniform Resource Identifier used to * construct the target location of a Request. * * @internal */ type URI = { protocol: string; hostname: string; port?: number; path: string; query?: QueryParameterBag; username?: string; password?: string; fragment?: string; }; //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/http.d.ts /** * @public * * @deprecated use {@link EndpointV2} from `@smithy/types`. */ interface Endpoint { protocol: string; hostname: string; port?: number; path: string; query?: QueryParameterBag; headers?: HeaderBag; } /** * Interface an HTTP request class. Contains * addressing information in addition to standard message properties. * * @public */ interface HttpRequest$1 extends HttpMessage, URI { method: string; } /** * Represents an HTTP message as received in reply to a request. Contains a * numeric status code in addition to standard message properties. * * @public */ interface HttpResponse$1 extends HttpMessage { statusCode: number; reason?: string; } /** * Represents an HTTP message with headers and an optional static or streaming * body. body: ArrayBuffer | ArrayBufferView | string | Uint8Array | Readable | ReadableStream; * * @public */ interface HttpMessage { headers: HeaderBag; body?: any; } /** * A mapping of query parameter names to strings or arrays of strings, with the * second being used when a parameter contains a list of values. Value can be set * to null when query is not in key-value pairs shape * * @public */ type QueryParameterBag = Record | null>; /** * A mapping of header names to string values. Multiple values for the same * header should be represented as a single string with values separated by * `, `. * Keys should be considered case insensitive, even if this is not enforced by a * particular implementation. For example, given the following HeaderBag, where * keys differ only in case: * ```json * { * 'x-request-date': '2000-01-01T00:00:00Z', * 'X-Request-Date': '2001-01-01T00:00:00Z' * } * ``` * The SDK may at any point during processing remove one of the object * properties in favor of the other. The headers may or may not be combined, and * the SDK will not deterministically select which header candidate to use. * * @public */ type HeaderBag = Record; /** * Represents an HTTP message with headers and an optional static or streaming * body. bode: ArrayBuffer | ArrayBufferView | string | Uint8Array | Readable | ReadableStream; * * @public */ interface HttpMessage { headers: HeaderBag; body?: any; } /** * Represents the options that may be passed to an Http Handler. * * @public */ interface HttpHandlerOptions { abortSignal?: AbortSignal | AbortSignal$1; /** * The maximum time in milliseconds that the connection phase of a request * may take before the connection attempt is abandoned. */ requestTimeout?: number; } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/util.d.ts /** * A generic which checks if Type1 is exactly same as Type2. * * @public */ type Exact$1 = [Type1] extends [Type2] ? ([Type2] extends [Type1] ? true : false) : false; /** * A function that, given a Uint8Array of bytes, can produce a string * representation thereof. The function may optionally attempt to * convert other input types to Uint8Array before encoding. * * @example An encoder function that converts bytes to hexadecimal * representation would return `'hello'` when given * `new Uint8Array([104, 101, 108, 108, 111])`. * * @public */ interface Encoder { /** * Caution: the `any` type on the input is for backwards compatibility. * Runtime support is limited to Uint8Array and string by default. * * You may choose to support more encoder input types if overriding the default * implementations. */ (input: Uint8Array | string | any): string; } /** * A function that, given a string, can derive the bytes represented by that * string. * * @example A decoder function that converts bytes to hexadecimal * representation would return `new Uint8Array([104, 101, 108, 108, 111])` when * given the string `'hello'`. * * @public */ interface Decoder { (input: string): Uint8Array; } /** * A function that, when invoked, returns a promise that will be fulfilled with * a value of type T. * * @example A function that reads credentials from shared SDK configuration * files, assuming roles and collecting MFA tokens as necessary. * * @public */ interface Provider { (): Promise; } /** * A tuple that represents an API name and optional version * of a library built using the AWS SDK. * * @public */ type UserAgentPair = [name: string, version?: string]; /** * User agent data that to be put into the request's user * agent. * * @public */ type UserAgent = UserAgentPair[]; /** * Parses a URL in string form into an Endpoint object. * * @public */ interface UrlParser { (url: string | URL): Endpoint; } /** * A function that, when invoked, returns a promise that will be fulfilled with * a value of type T. It memoizes the result from the previous invocation * instead of calling the underlying resources every time. * * You can force the provider to refresh the memoized value by invoke the * function with optional parameter hash with `forceRefresh` boolean key and * value `true`. * * @example A function that reads credentials from IMDS service that could * return expired credentials. The SDK will keep using the expired credentials * until an unretryable service error requiring a force refresh of the * credentials. * * @public */ interface MemoizedProvider { (options?: { forceRefresh?: boolean; }): Promise; } /** * A function that, given a request body, determines the * length of the body. This is used to determine the Content-Length * that should be sent with a request. * * @example A function that reads a file stream and calculates * the size of the file. * * @public */ interface BodyLengthCalculator { (body: any): number | undefined; } /** * Interface that specifies the retry behavior * * @public */ interface RetryStrategy { /** * The retry mode describing how the retry strategy control the traffic flow. */ mode?: string; /** * the retry behavior the will invoke the next handler and handle the retry accordingly. * This function should also update the $metadata from the response accordingly. * @see {@link ResponseMetadata} */ retry: (next: FinalizeHandler, args: FinalizeHandlerArguments) => Promise>; } /** * Indicates the parameter may be omitted if the parameter object T * is equivalent to a Partial, i.e. all properties optional. * * @public */ type OptionalParameter = Exact$1, T> extends true ? [] | [T] : [T]; //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/middleware.d.ts /** * @public */ interface InitializeHandlerArguments { /** * User input to a command. Reflects the userland representation of the * union of data types the command can effectively handle. */ input: Input; } /** * @public */ interface InitializeHandlerOutput extends DeserializeHandlerOutput { output: Output; } /** * @public */ interface SerializeHandlerArguments extends InitializeHandlerArguments { /** * The user input serialized as a request object. The request object is unknown, * so you cannot modify it directly. When work with request, you need to guard its * type to e.g. HttpRequest with 'instanceof' operand * * During the build phase of the execution of a middleware stack, a built * request may or may not be available. */ request?: unknown; } /** * @public */ interface SerializeHandlerOutput extends InitializeHandlerOutput {} /** * @public */ interface BuildHandlerArguments extends FinalizeHandlerArguments {} /** * @public */ interface BuildHandlerOutput extends InitializeHandlerOutput {} /** * @public */ interface FinalizeHandlerArguments extends SerializeHandlerArguments { /** * The user input serialized as a request. */ request: unknown; } /** * @public */ interface FinalizeHandlerOutput extends InitializeHandlerOutput {} /** * @public */ interface DeserializeHandlerArguments extends FinalizeHandlerArguments {} /** * @public */ interface DeserializeHandlerOutput { /** * The raw response object from runtime is deserialized to structured output object. * The response object is unknown so you cannot modify it directly. When work with * response, you need to guard its type to e.g. HttpResponse with 'instanceof' operand. * * During the deserialize phase of the execution of a middleware stack, a deserialized * response may or may not be available */ response: unknown; output?: Output; } /** * @public */ interface InitializeHandler { /** * Asynchronously converts an input object into an output object. * * @param args - An object containing a input to the command as well as any * associated or previously generated execution artifacts. */ (args: InitializeHandlerArguments): Promise>; } /** * @public */ type Handler = InitializeHandler; /** * @public */ interface SerializeHandler { /** * Asynchronously converts an input object into an output object. * * @param args - An object containing a input to the command as well as any * associated or previously generated execution artifacts. */ (args: SerializeHandlerArguments): Promise>; } /** * @public */ interface FinalizeHandler { /** * Asynchronously converts an input object into an output object. * * @param args - An object containing a input to the command as well as any * associated or previously generated execution artifacts. */ (args: FinalizeHandlerArguments): Promise>; } /** * @public */ interface BuildHandler { (args: BuildHandlerArguments): Promise>; } /** * @public */ interface DeserializeHandler { (args: DeserializeHandlerArguments): Promise>; } /** * A factory function that creates functions implementing the `Handler` * interface. * * @public */ interface InitializeMiddleware { /** * @param next - The handler to invoke after this middleware has operated on * the user input and before this middleware operates on the output. * * @param context - Invariant data and functions for use by the handler. */ (next: InitializeHandler, context: HandlerExecutionContext): InitializeHandler; } /** * A factory function that creates functions implementing the `BuildHandler` * interface. * * @public */ interface SerializeMiddleware { /** * @param next - The handler to invoke after this middleware has operated on * the user input and before this middleware operates on the output. * * @param context - Invariant data and functions for use by the handler. */ (next: SerializeHandler, context: HandlerExecutionContext): SerializeHandler; } /** * A factory function that creates functions implementing the `FinalizeHandler` * interface. * * @public */ interface FinalizeRequestMiddleware { /** * @param next - The handler to invoke after this middleware has operated on * the user input and before this middleware operates on the output. * * @param context - Invariant data and functions for use by the handler. */ (next: FinalizeHandler, context: HandlerExecutionContext): FinalizeHandler; } /** * @public */ interface BuildMiddleware { (next: BuildHandler, context: HandlerExecutionContext): BuildHandler; } /** * @public */ interface DeserializeMiddleware { (next: DeserializeHandler, context: HandlerExecutionContext): DeserializeHandler; } /** * @public */ type MiddlewareType = InitializeMiddleware | SerializeMiddleware | BuildMiddleware | FinalizeRequestMiddleware | DeserializeMiddleware; /** * @public */ type Step = "initialize" | "serialize" | "build" | "finalizeRequest" | "deserialize"; /** * @public */ type Priority = "high" | "normal" | "low"; /** * @public */ interface HandlerOptions { /** * Handlers are ordered using a "step" that describes the stage of command * execution at which the handler will be executed. The available steps are: * * - initialize: The input is being prepared. Examples of typical * initialization tasks include injecting default options computing * derived parameters. * - serialize: The input is complete and ready to be serialized. Examples * of typical serialization tasks include input validation and building * an HTTP request from user input. * - build: The input has been serialized into an HTTP request, but that * request may require further modification. Any request alterations * will be applied to all retries. Examples of typical build tasks * include injecting HTTP headers that describe a stable aspect of the * request, such as `Content-Length` or a body checksum. * - finalizeRequest: The request is being prepared to be sent over the wire. The * request in this stage should already be semantically complete and * should therefore only be altered as match the recipient's * expectations. Examples of typical finalization tasks include request * signing and injecting hop-by-hop headers. * - deserialize: The response has arrived, the middleware here will deserialize * the raw response object to structured response * * Unlike initialization and build handlers, which are executed once * per operation execution, finalization and deserialize handlers will be * executed foreach HTTP request sent. * * @defaultValue 'initialize' */ step?: Step; /** * A list of strings to any that identify the general purpose or important * characteristics of a given handler. */ tags?: Array; /** * A unique name to refer to a middleware */ name?: string; /** * Aliases allows for middleware to be found by multiple names besides {@link HandlerOptions.name}. * This allows for references to replaced middleware to continue working, e.g. replacing * multiple auth-specific middleware with a single generic auth middleware. * * @internal */ aliases?: Array; /** * A flag to override the existing middleware with the same name. Without * setting it, adding middleware with duplicated name will throw an exception. * @internal */ override?: boolean; } /** * @public */ interface AbsoluteLocation { /** * By default middleware will be added to individual step in un-guaranteed order. * In the case that * * @defaultValue 'normal' */ priority?: Priority; } /** * @public */ type Relation = "before" | "after"; /** * @public */ interface RelativeLocation { /** * Specify the relation to be before or after a know middleware. */ relation: Relation; /** * A known middleware name to indicate inserting middleware's location. */ toMiddleware: string; } /** * @public */ type RelativeMiddlewareOptions = RelativeLocation & Omit; /** * @public */ interface InitializeHandlerOptions extends HandlerOptions { step?: "initialize"; } /** * @public */ interface SerializeHandlerOptions extends HandlerOptions { step: "serialize"; } /** * @public */ interface BuildHandlerOptions extends HandlerOptions { step: "build"; } /** * @public */ interface FinalizeRequestHandlerOptions extends HandlerOptions { step: "finalizeRequest"; } /** * @public */ interface DeserializeHandlerOptions extends HandlerOptions { step: "deserialize"; } /** * A stack storing middleware. It can be resolved into a handler. It supports 2 * approaches for adding middleware: * 1. Adding middleware to specific step with `add()`. The order of middleware * added into same step is determined by order of adding them. If one middleware * needs to be executed at the front of the step or at the end of step, set * `priority` options to `high` or `low`. * 2. Adding middleware to location relative to known middleware with `addRelativeTo()`. * This is useful when given middleware must be executed before or after specific * middleware(`toMiddleware`). You can add a middleware relatively to another * middleware which also added relatively. But eventually, this relative middleware * chain **must** be 'anchored' by a middleware that added using `add()` API * with absolute `step` and `priority`. This mothod will throw if specified * `toMiddleware` is not found. * * @public */ interface MiddlewareStack extends Pluggable { /** * Add middleware to the stack to be executed during the "initialize" step, * optionally specifying a priority, tags and name */ add(middleware: InitializeMiddleware, options?: InitializeHandlerOptions & AbsoluteLocation): void; /** * Add middleware to the stack to be executed during the "serialize" step, * optionally specifying a priority, tags and name */ add(middleware: SerializeMiddleware, options: SerializeHandlerOptions & AbsoluteLocation): void; /** * Add middleware to the stack to be executed during the "build" step, * optionally specifying a priority, tags and name */ add(middleware: BuildMiddleware, options: BuildHandlerOptions & AbsoluteLocation): void; /** * Add middleware to the stack to be executed during the "finalizeRequest" step, * optionally specifying a priority, tags and name */ add(middleware: FinalizeRequestMiddleware, options: FinalizeRequestHandlerOptions & AbsoluteLocation): void; /** * Add middleware to the stack to be executed during the "deserialize" step, * optionally specifying a priority, tags and name */ add(middleware: DeserializeMiddleware, options: DeserializeHandlerOptions & AbsoluteLocation): void; /** * Add middleware to a stack position before or after a known middleware,optionally * specifying name and tags. */ addRelativeTo(middleware: MiddlewareType, options: RelativeMiddlewareOptions): void; /** * Apply a customization function to mutate the middleware stack, often * used for customizations that requires mutating multiple middleware. */ use(pluggable: Pluggable): void; /** * Create a shallow clone of this stack. Step bindings and handler priorities * and tags are preserved in the copy. */ clone(): MiddlewareStack; /** * Removes middleware from the stack. * * If a string is provided, it will be treated as middleware name. If a middleware * is inserted with the given name, it will be removed. * * If a middleware class is provided, all usages thereof will be removed. */ remove(toRemove: MiddlewareType | string): boolean; /** * Removes middleware that contains given tag * * Multiple middleware will potentially be removed */ removeByTag(toRemove: string): boolean; /** * Create a stack containing the middlewares in this stack as well as the * middlewares in the `from` stack. Neither source is modified, and step * bindings and handler priorities and tags are preserved in the copy. */ concat(from: MiddlewareStack): MiddlewareStack; /** * Returns a list of the current order of middleware in the stack. * This does not execute the middleware functions, nor does it * provide a reference to the stack itself. */ identify(): string[]; /** * When an operation is called using this stack, * it will log its list of middleware to the console using * the identify function. * If no argument given, returns the current value. * * @internal * @param toggle - set whether to log on resolve. */ identifyOnResolve(toggle?: boolean): boolean; /** * Builds a single handler function from zero or more middleware classes and * a core handler. The core handler is meant to send command objects to AWS * services and return promises that will resolve with the operation result * or be rejected with an error. * * When a composed handler is invoked, the arguments will pass through all * middleware in a defined order, and the return from the innermost handler * will pass through all middleware in the reverse of that order. */ resolve(handler: DeserializeHandler, context: HandlerExecutionContext): InitializeHandler; } /** * @internal */ declare const SMITHY_CONTEXT_KEY = "__smithy_context"; /** * Data and helper objects that are not expected to change from one execution of * a composed handler to another. * * @public */ interface HandlerExecutionContext { /** * A logger that may be invoked by any handler during execution of an * operation. */ logger?: Logger; /** * Name of the service the operation is being sent to. */ clientName?: string; /** * Name of the operation being executed. */ commandName?: string; /** * Additional user agent that inferred by middleware. It can be used to save * the internal user agent sections without overriding the `customUserAgent` * config in clients. */ userAgent?: UserAgent; /** * Resolved by the endpointMiddleware function of `@smithy/middleware-endpoint` * in the serialization stage. */ endpointV2?: EndpointV2; /** * Set at the same time as endpointV2. */ authSchemes?: AuthScheme[]; /** * The current auth configuration that has been set by any auth middleware and * that will prevent from being set more than once. */ currentAuthConfig?: HttpAuthDefinition; /** * @deprecated do not extend this field, it is a carryover from AWS SDKs. * Used by DynamoDbDocumentClient. */ dynamoDbDocumentClientOptions?: Partial<{ overrideInputFilterSensitiveLog(...args: any[]): string | void; overrideOutputFilterSensitiveLog(...args: any[]): string | void; }>; /** * Context for Smithy properties. * * @internal */ [SMITHY_CONTEXT_KEY]?: { service?: string; operation?: string; commandInstance?: Command$1; selectedHttpAuthScheme?: SelectedHttpAuthScheme; features?: SmithyFeatures; /** * @deprecated * Do not assign arbitrary members to the Smithy Context, * fields should be explicitly declared here to avoid collisions. */ [key: string]: unknown; }; /** * Set by some operations which instructs the retry behavior to backoff * after a failed request even when no further retry (of the same request) is expected. * @internal */ __retryLongPoll?: boolean; /** * @deprecated * Do not assign arbitrary members to the context, since * they can interfere with existing functionality. * * Additional members should instead be declared on the SMITHY_CONTEXT_KEY * or other reserved keys. */ [key: string]: any; } /** * @public */ interface Pluggable { /** * A function that mutate the passed in middleware stack. Functions implementing * this interface can add, remove, modify existing middleware stack from clients * or commands */ applyToStack: (stack: MiddlewareStack) => void; } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/auth/HttpSigner.d.ts /** * @internal */ interface ErrorHandler { (signingProperties: Record): (error: E) => never; } /** * @internal */ interface SuccessHandler { (httpResponse: HttpResponse$1 | unknown, signingProperties: Record): void; } /** * Interface to sign identity and signing properties. * @internal */ interface HttpSigner { /** * Signs an HttpRequest with an identity and signing properties. * @param httpRequest request to sign * @param identity identity to sing the request with * @param signingProperties property bag for signing * @returns signed request in a promise */ sign(httpRequest: HttpRequest$1, identity: Identity, signingProperties: Record): Promise; /** * Handler that executes after the {@link HttpSigner.sign} invocation and corresponding * middleware throws an error. * The error handler is expected to throw the error it receives, so the return type of the error handler is `never`. * @internal */ errorHandler?: ErrorHandler; /** * Handler that executes after the {@link HttpSigner.sign} invocation and corresponding * middleware succeeds. * @internal */ successHandler?: SuccessHandler; } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/auth/IdentityProviderConfig.d.ts /** * Interface to get an IdentityProvider for a specified HttpAuthScheme * @internal */ interface IdentityProviderConfig { /** * Get the IdentityProvider for a specified HttpAuthScheme. * @param schemeId schemeId of the HttpAuthScheme * @returns IdentityProvider or undefined if HttpAuthScheme is not found */ getIdentityProvider(schemeId: HttpAuthSchemeId): IdentityProvider | undefined; } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/auth/HttpAuthScheme.d.ts /** * ID for {@link HttpAuthScheme} * @internal */ type HttpAuthSchemeId = string; /** * Interface that defines an HttpAuthScheme * @internal */ interface HttpAuthScheme { /** * ID for an HttpAuthScheme, typically the absolute shape ID of a Smithy auth trait. */ schemeId: HttpAuthSchemeId; /** * Gets the IdentityProvider corresponding to an HttpAuthScheme. */ identityProvider(config: IdentityProviderConfig): IdentityProvider | undefined; /** * HttpSigner corresponding to an HttpAuthScheme. */ signer: HttpSigner; } /** * Interface that defines the identity and signing properties when selecting * an HttpAuthScheme. * @internal */ interface HttpAuthOption { schemeId: HttpAuthSchemeId; identityProperties?: Record; signingProperties?: Record; propertiesExtractor?: (config: TConfig, context: TContext) => { identityProperties?: Record; signingProperties?: Record; }; } /** * @internal */ interface SelectedHttpAuthScheme { httpAuthOption: HttpAuthOption; identity: Identity; signer: HttpSigner; } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/auth/HttpAuthSchemeProvider.d.ts /** * @internal */ interface HttpAuthSchemeParameters { operation?: string; } /** * @internal */ interface HttpAuthSchemeProvider { (authParameters: TParameters): HttpAuthOption[]; } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/transform/exact.d.ts /** * Checks that A and B extend each other. * * @internal */ type Exact = [A] extends [B] ? ([B] extends [A] ? true : false) : false; //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/externals-check/browser-externals-check.d.ts /** * A checked type that resolves to Blob if it is defined as more than a stub, otherwise * resolves to 'never' so as not to widen the type of unions containing Blob * excessively. * * @public */ type BlobOptionalType = BlobDefined extends true ? Blob : Unavailable; /** * A checked type that resolves to ReadableStream if it is defined as more than a stub, otherwise * resolves to 'never' so as not to widen the type of unions containing ReadableStream * excessively. * * @public */ type ReadableStreamOptionalType = ReadableStreamDefined extends true ? ReadableStream : Unavailable; /** * Indicates a type is unavailable if it resolves to this. * * @public */ type Unavailable = never; /** * Whether the global types define more than a stub for ReadableStream. * * @internal */ type ReadableStreamDefined = Exact extends true ? false : true; /** * Whether the global types define more than a stub for Blob. * * @internal */ type BlobDefined = Exact extends true ? false : true; //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/blob/blob-payload-input-types.d.ts /** * A union of types that can be used as inputs for the service model * "blob" type when it represents the request's entire payload or body. * For example, in Lambda::invoke, the payload is modeled as a blob type * and this union applies to it. * In contrast, in Lambda::createFunction the Zip file option is a blob type, * but is not the (entire) payload and this union does not apply. * Note: not all types are signable by the standard SignatureV4 signer when * used as the request body. For example, in Node.js a Readable stream * is not signable by the default signer. * They are included in the union because it may work in some cases, * but the expected types are primarily string and Uint8Array. * Additional details may be found in the internal * function "getPayloadHash" in the SignatureV4 module. * * @public */ type BlobPayloadInputTypes = string | ArrayBuffer | ArrayBufferView | Uint8Array | NodeJsRuntimeBlobTypes | BrowserRuntimeBlobTypes; /** * Additional blob types for the Node.js environment. * * @public */ type NodeJsRuntimeBlobTypes = Readable | Buffer; /** * Additional blob types for the browser environment. * * @public */ type BrowserRuntimeBlobTypes = BlobOptionalType | ReadableStreamOptionalType; //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/crypto.d.ts /** * @public */ type SourceData = string | ArrayBuffer | ArrayBufferView; /** * An object that provides a hash of data provided in chunks to `update`. The * hash may be performed incrementally as chunks are received or all at once * when the hash is finalized, depending on the underlying implementation. * * @public * @deprecated use {@link Checksum} */ interface Hash { /** * Adds a chunk of data to the hash. If a buffer is provided, the `encoding` * argument will be ignored. If a string is provided without a specified * encoding, implementations must assume UTF-8 encoding. * * Not all encodings are supported on all platforms, though all must support * UTF-8. */ update(toHash: SourceData, encoding?: "utf8" | "ascii" | "latin1"): void; /** * Finalizes the hash and provides a promise that will be fulfilled with the * raw bytes of the calculated hash. */ digest(): Promise; } /** * A constructor for a hash that may be used to calculate an HMAC. Implementing * classes should not directly hold the provided key in memory beyond the * lexical scope of the constructor. * * @public * @deprecated use {@link ChecksumConstructor} */ interface HashConstructor { new (secret?: SourceData): Hash; } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/checksum.d.ts /** * An object that provides a checksum of data provided in chunks to `update`. * The checksum may be performed incrementally as chunks are received or all * at once when the checksum is finalized, depending on the underlying * implementation. * It's recommended to compute checksum incrementally to avoid reading the * entire payload in memory. * A class that implements this interface may accept an optional secret key in its * constructor while computing checksum value, when using HMAC. If provided, * this secret key would be used when computing checksum. * * @public */ interface Checksum { /** * Constant length of the digest created by the algorithm in bytes. */ digestLength?: number; /** * Creates a new checksum object that contains a deep copy of the internal * state of the current `Checksum` object. */ copy?(): Checksum; /** * Returns the digest of all of the data passed. */ digest(): Promise; /** * Allows marking a checksum for checksums that support the ability * to mark and reset. * * @param readLimit - The maximum limit of bytes that can be read * before the mark position becomes invalid. */ mark?(readLimit: number): void; /** * Resets the checksum to its initial value. */ reset(): void; /** * Adds a chunk of data for which checksum needs to be computed. * This can be called many times with new data as it is streamed. * * Implementations may override this method which passes second param * which makes Checksum object stateless. * * @param chunk - The buffer to update checksum with. */ update(chunk: Uint8Array): void; } /** * A constructor for a Checksum that may be used to calculate an HMAC. Implementing * classes should not directly hold the provided key in memory beyond the * lexical scope of the constructor. * * @public */ interface ChecksumConstructor { new (secret?: SourceData): Checksum; } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/client.d.ts /** * A type which checks if the client configuration is optional. * If all entries of the client configuration are optional, it allows client creation without passing any config. * * @public */ type CheckOptionalClientConfig = OptionalParameter; /** * function definition for different overrides of client's 'send' function. * * @public */ interface InvokeFunction { (command: Command$1, options?: any): Promise; (command: Command$1, cb: (err: any, data?: OutputType) => void): void; (command: Command$1, options: any, cb: (err: any, data?: OutputType) => void): void; (command: Command$1, options?: any, cb?: (err: any, data?: OutputType) => void): Promise | void; } /** * A general interface for service clients, idempotent to browser or node clients * This type corresponds to SmithyClient(https://github.com/aws/aws-sdk-js-v3/blob/main/packages/smithy-client/src/client.ts). * It's provided for using without importing the SmithyClient class. * @internal */ interface Client$1 { readonly config: ResolvedClientConfiguration; middlewareStack: MiddlewareStack; send: InvokeFunction; destroy: () => void; } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/transfer.d.ts /** * @public */ type RequestHandlerOutput = { response: ResponseType; }; /** * @public */ interface RequestHandler { /** * metadata contains information of a handler. For example * 'h2' refers this handler is for handling HTTP/2 requests, * whereas 'h1' refers handling HTTP1 requests */ metadata?: RequestHandlerMetadata; destroy?: () => void; handle: (request: RequestType, handlerOptions?: HandlerOptions) => Promise>; } /** * @public */ interface RequestHandlerMetadata { handlerProtocol: RequestHandlerProtocol | string; } /** * Values from ALPN Protocol IDs. * * @public * @see https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids */ declare enum RequestHandlerProtocol { HTTP_0_9 = "http/0.9", HTTP_1_0 = "http/1.0", TDS_8_0 = "tds/8.0" } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/eventStream.d.ts /** * An event stream message. The headers and body properties will always be * defined, with empty headers represented as an object with no keys and an * empty body represented as a zero-length Uint8Array. * * @public */ interface Message$1 { headers: MessageHeaders; body: Uint8Array; } /** * @public */ type MessageHeaders = Record; /** * @public */ type HeaderValue = { type: K; value: V; }; /** * @public */ type BooleanHeaderValue = HeaderValue<"boolean", boolean>; /** * @public */ type ByteHeaderValue = HeaderValue<"byte", number>; /** * @public */ type ShortHeaderValue = HeaderValue<"short", number>; /** * @public */ type IntegerHeaderValue = HeaderValue<"integer", number>; /** * @public */ type LongHeaderValue = HeaderValue<"long", Int64>; /** * @public */ type BinaryHeaderValue = HeaderValue<"binary", Uint8Array>; /** * @public */ type StringHeaderValue = HeaderValue<"string", string>; /** * @public */ type TimestampHeaderValue = HeaderValue<"timestamp", Date>; /** * @public */ type UuidHeaderValue = HeaderValue<"uuid", string>; /** * @public */ type MessageHeaderValue = BooleanHeaderValue | ByteHeaderValue | ShortHeaderValue | IntegerHeaderValue | LongHeaderValue | BinaryHeaderValue | StringHeaderValue | TimestampHeaderValue | UuidHeaderValue; /** * @public */ interface Int64 { readonly bytes: Uint8Array; valueOf: () => number; toString: () => string; } /** * A function which deserializes binary event stream message into modeled shape. * * @public */ interface EventStreamMarshallerDeserFn { (body: StreamType, deserializer: (input: Record) => Promise): AsyncIterable; } /** * A function that serializes modeled shape into binary stream message. * * @public */ interface EventStreamMarshallerSerFn { (input: AsyncIterable, serializer: (event: T) => Message$1): StreamType; } /** * An interface which provides functions for serializing and deserializing binary event stream * to/from corresponsing modeled shape. * * @public */ interface EventStreamMarshaller { deserialize: EventStreamMarshallerDeserFn; serialize: EventStreamMarshallerSerFn; } /** * @public */ interface EventStreamPayloadHandler { handle: (next: FinalizeHandler, args: FinalizeHandlerArguments, context?: HandlerExecutionContext) => Promise>; } /** * @public */ interface EventStreamPayloadHandlerProvider { (options: any): EventStreamPayloadHandler; } /** * @public */ interface EventStreamSerdeProvider { (options: any): EventStreamMarshaller; } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/endpoints/EndpointParameterInstructions.d.ts /** * @internal */ interface EndpointParameterInstructions { [name: string]: BuiltInParamInstruction | ClientContextParamInstruction | StaticContextParamInstruction | ContextParamInstruction | OperationContextParamInstruction; } /** * @internal */ interface BuiltInParamInstruction { type: "builtInParams"; name: string; } /** * @internal */ interface ClientContextParamInstruction { type: "clientContextParams"; name: string; } /** * @internal */ interface StaticContextParamInstruction { type: "staticContextParams"; value: string | boolean; } /** * @internal */ interface ContextParamInstruction { type: "contextParams"; name: string; } /** * @internal */ interface OperationContextParamInstruction { type: "operationContextParams"; get(input: any): any; } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/extensions/checksum.d.ts /** * @internal */ declare enum AlgorithmId { MD5 = "md5", CRC32 = "crc32", CRC32C = "crc32c", SHA1 = "sha1", SHA256 = "sha256" } /** * @internal */ interface ChecksumAlgorithm { algorithmId(): AlgorithmId | string; checksumConstructor(): ChecksumConstructor | HashConstructor; } /** * @deprecated unused. * @internal */ type ChecksumConfigurationLegacy = { [other in string | number]: any }; /** * @internal */ interface ChecksumConfiguration extends ChecksumConfigurationLegacy { addChecksumAlgorithm(algo: ChecksumAlgorithm): void; checksumAlgorithms(): ChecksumAlgorithm[]; } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/shapes.d.ts /** * A document type represents an untyped JSON-like value. * Not all protocols support document types, and the serialization format of a * document type is protocol specific. All JSON protocols SHOULD support * document types and they SHOULD serialize document types inline as normal * JSON values. * * @public */ type DocumentType = null | boolean | number | string | DocumentType[] | { [prop: string]: DocumentType; }; /** * A structure shape with the error trait. * https://smithy.io/2.0/spec/behavior-traits.html#smithy-api-retryable-trait * * @public */ interface RetryableTrait { /** * Indicates that the error is a retryable throttling error. */ readonly throttling?: boolean; } /** * Type that is implemented by all Smithy shapes marked with the * error trait. * * @public * @deprecated */ interface SmithyException { /** * The shape ID name of the exception. */ readonly name: string; /** * Whether the client or server are at fault. */ readonly $fault: "client" | "server"; /** * The service that encountered the exception. */ readonly $service?: string; /** * Indicates that an error MAY be retried by the client. */ readonly $retryable?: RetryableTrait; /** * Reference to low-level HTTP response object. */ readonly $response?: HttpResponse$1; } /** * This type should not be used in your application. * Users of the AWS SDK for JavaScript v3 service clients should prefer to * use the specific Exception classes corresponding to each operation. * These can be found as code in the deserializer for the operation's Command class, * or as declarations in the service model file in codegen/sdk-codegen/aws-models. * If no exceptions are enumerated by a particular Command operation, * the base exception for the service should be used. Each client exports * a base ServiceException prefixed with the service name. * * @public * @deprecated See {@link https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/} */ type SdkError = Error & Partial & Partial & { $metadata?: Partial["$metadata"] & { /** * If present, will have value of true and indicates that the error resulted in a * correction of the clock skew, a.k.a. config.systemClockOffset. * This is specific to AWS SDK and sigv4. */ readonly clockSkewCorrected?: true; }; cause?: Error; }; //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/retry.d.ts /** * @public */ type RetryErrorType = /** * This is a connection level error such as a socket timeout, socket connect * error, tls negotiation timeout etc... * Typically these should never be applied for non-idempotent request types * since in this scenario, it's impossible to know whether the operation had * a side effect on the server. */ "TRANSIENT" /** * This is an error where the server explicitly told the client to back off, * such as a 429 or 503 Http error. */ | "THROTTLING" /** * This is a server error that isn't explicitly throttling but is considered * by the client to be something that should be retried. */ | "SERVER_ERROR" /** * Doesn't count against any budgets. This could be something like a 401 * challenge in Http. */ | "CLIENT_ERROR"; /** * @public */ interface RetryErrorInfo { /** * The error thrown during the initial request, if available. */ error?: SdkError; errorType: RetryErrorType; /** * Protocol hint. This could come from Http's 'retry-after' header or * something from MQTT or any other protocol that has the ability to convey * retry info from a peer. * * The Date after which a retry should be attempted. */ retryAfterHint?: Date; } /** * @public */ interface RetryToken { /** * Starts at 0 for the initial request, which is not a "retry" by definition. * 1 indicates the first retry. * * @returns the current count of retry. */ getRetryCount(): number; /** * RetryStrategies implemented by `@smithy/core` will return tokens with a * delay of zero. * * This is because the RetryStrategy token acquisition methods took over the * task of idling for the delay period. If a user-implemented retry token * contains a delay, the default Smithy retry middleware will still honor it. * * That is to say, you may either sleep within the RetryStrategy methods for acquiring * the token, OR return a token with a retry delay that will cause the retry middleware * to sleep. * * @returns the number of milliseconds to wait before retrying an action. */ getRetryDelay(): number; /** * @returns whether the operation which generated this token is long polling. */ isLongPoll?(): boolean; /** * Delays that have already been executed by the time the token * is accessible. This is needed for the token handler to understand what has happened. * @internal */ $retryLog?: { acquisitionDelay?: number; }; } /** * @public */ interface RetryStrategyV2 { /** * Called before any retries (for the first call to the operation). It either * returns a retry token or an error upon the failure to acquire a token prior. * * tokenScope is arbitrary and out of scope for this component. However, * adding it here offers us a lot of future flexibility for outage detection. * For example, it could be "us-east-1" on a shared retry strategy, or * "us-west-2-c:dynamodb". */ acquireInitialRetryToken(retryTokenScope: string): Promise; /** * After a failed operation call, this function is invoked to refresh the * retryToken returned by acquireInitialRetryToken(). This function can * either choose to allow another retry and send a new or updated token, * or reject the retry attempt and report the error either in an exception * or returning an error. * * This method should either delay internally and return a token with 0 delay, OR * do not sleep and return a token with the desired delay duration. */ refreshRetryTokenForRetry(tokenToRenew: RetryToken, errorInfo: RetryErrorInfo): Promise; /** * Upon successful completion of the operation, this function is called * to record that the operation was successful. */ recordSuccess(token: RetryToken): void; } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/extensions/retry.d.ts /** * A configuration interface with methods called by runtime extension * @internal */ interface RetryStrategyConfiguration { /** * Set retry strategy used for all http requests * @param retryStrategy */ setRetryStrategy(retryStrategy: Provider): void; /** * Get retry strategy used for all http requests * @param retryStrategy */ retryStrategy(): Provider; } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/extensions/defaultExtensionConfiguration.d.ts /** * Default extension configuration consisting various configurations for modifying a service client * * @internal */ interface DefaultExtensionConfiguration extends ChecksumConfiguration, RetryStrategyConfiguration {} //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.ts /** * Represents the http options that can be passed to a node http client. * @public */ interface NodeHttpHandlerOptions { /** * The maximum time in milliseconds that the connection phase of a request * may take before the connection attempt is abandoned. * Defaults to 0, which disables the timeout. */ connectionTimeout?: number; /** * The maximum number of milliseconds request & response should take. * Defaults to 0, which disables the timeout. * * If exceeded, a warning will be emitted unless throwOnRequestTimeout=true, * in which case a TimeoutError will be thrown. */ requestTimeout?: number; /** * Because requestTimeout was for a long time incorrectly being set as a socket idle timeout, * users must also opt-in for request timeout thrown errors. * Without this setting, a breach of the request timeout will be logged as a warning. */ throwOnRequestTimeout?: boolean; /** * The maximum time in milliseconds that a socket may remain idle before it * is closed. Defaults to 0, which means no maximum. * * This does not affect the server, which may still close the connection due to an idle socket. */ socketTimeout?: number; /** * Delay before the NodeHttpHandler checks for socket exhaustion, * and emits a warning if the active sockets and enqueued request count is greater than * 2x the maxSockets count. * * Defaults to connectionTimeout + requestTimeout or 3000ms if those are not set. */ socketAcquisitionWarningTimeout?: number; /** * You can pass http.Agent or its constructor options. */ httpAgent?: Agent | AgentOptions; /** * You can pass https.Agent or its constructor options. */ httpsAgent?: Agent$1 | AgentOptions$1; /** * Optional logger. */ logger?: Logger; } /** * Represents the http options that can be passed to a browser http client. * @public */ interface FetchHttpHandlerOptions { /** * The number of milliseconds a request can take before being automatically * terminated. */ requestTimeout?: number; /** * Whether to allow the request to outlive the page. Default value is false. * * There may be limitations to the payload size, number of concurrent requests, * request duration etc. when using keepalive in browsers. * * These may change over time, so look for up to date information about * these limitations before enabling keepalive. */ keepAlive?: boolean; /** * A string indicating whether credentials will be sent with the request always, never, or * only when sent to a same-origin URL. * @see https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials */ credentials?: "include" | "omit" | "same-origin" | undefined | string; /** * Cache settings for fetch. * @see https://developer.mozilla.org/en-US/docs/Web/API/Request/cache */ cache?: "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload"; /** * An optional function that produces additional RequestInit * parameters for each httpRequest. * * This is applied last via merging with Object.assign() and overwrites other values * set from other sources. * * @example * ```js * new Client({ * requestHandler: { * requestInit(httpRequest) { * return { cache: "no-store" }; * } * } * }); * ``` */ requestInit?: (httpRequest: HttpRequest$1) => RequestInit; } declare global { /** * interface merging stub. */ interface RequestInit {} } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/identity/awsCredentialIdentity.d.ts /** * @public */ interface AwsCredentialIdentity extends Identity { /** * AWS access key ID */ readonly accessKeyId: string; /** * AWS secret access key */ readonly secretAccessKey: string; /** * A security or session token to use with these credentials. Usually * present for temporary credentials. */ readonly sessionToken?: string; /** * AWS credential scope for this set of credentials. */ readonly credentialScope?: string; /** * AWS accountId. */ readonly accountId?: string; } /** * @public */ type AwsCredentialIdentityProvider = IdentityProvider; //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/identity/tokenIdentity.d.ts /** * @internal */ interface TokenIdentity extends Identity { /** * The literal token string */ readonly token: string; } /** * @internal */ type TokenIdentityProvider = IdentityProvider; //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/pagination.d.ts /** * Expected type definition of a paginator. * * @public */ type Paginator = AsyncGenerator; /** * Expected paginator configuration passed to an operation. Services will extend * this interface definition and may type client further. * * @public */ interface PaginationConfiguration { client: Client$1; pageSize?: number; startingToken?: any; /** * For some APIs, such as CloudWatchLogs events, the next page token will always * be present. * * When true, this config field will have the paginator stop when the token doesn't change * instead of when it is not present. */ stopOnSameToken?: boolean; /** * @param command - reference to the instantiated command. This callback is executed * prior to sending the command with the paginator's client. * @returns the original command or a replacement, defaulting to the original command object. */ withCommand?: (command: Command$1) => typeof command | undefined; } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/serde.d.ts /** * Interface for object requires an Endpoint set. * * @public */ interface EndpointBearer { endpoint: Provider; } /** * @public */ interface StreamCollector { /** * A function that converts a stream into an array of bytes. * * @param stream - The low-level native stream from browser or Nodejs runtime */ (stream: any): Promise; } /** * Request and Response serde util functions and settings for AWS services * * @public */ interface SerdeContext extends SerdeFunctions, EndpointBearer { requestHandler: RequestHandler; disableHostPrefix: boolean; protocol?: $ClientProtocol; } /** * Serde functions from the client config. * * @public */ interface SerdeFunctions { base64Encoder: Encoder; base64Decoder: Decoder; utf8Encoder: Encoder; utf8Decoder: Decoder; streamCollector: StreamCollector; } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/schema/sentinels.d.ts /** * The blob Smithy type, in JS as Uint8Array and other representations * such as Buffer, string, or Readable(Stream) depending on circumstances. * @public */ type BlobSchema = 0b0001_0101; /** * @public */ type StreamingBlobSchema = 0b0010_1010; /** * @public */ type BooleanSchema = 0b0000_0010; /** * Includes string and enum Smithy types. * @public */ type StringSchema = 0b0000_0000; /** * Includes all numeric Smithy types except bigInteger and bigDecimal. * byte, short, integer, long, float, double, intEnum. * * @public */ type NumericSchema = 0b0000_0001; /** * @public */ type BigIntegerSchema = 0b0001_0001; /** * @public */ type BigDecimalSchema = 0b0001_0011; /** * @public */ type DocumentSchema = 0b0000_1111; /** * Smithy type timestamp, in JS as native Date object. * @public */ type TimestampDefaultSchema = 0b0000_0100; /** * @public */ type TimestampDateTimeSchema = 0b0000_0101; /** * @public */ type TimestampHttpDateSchema = 0b0000_0110; /** * @public */ type TimestampEpochSecondsSchema = 0b0000_0111; //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/schema/static-schemas.d.ts /** * @public */ type StaticSchemaIdSimple = 0; /** * @public */ type StaticSchemaIdList = 1; /** * @public */ type StaticSchemaIdMap = 2; /** * @public */ type StaticSchemaIdStruct = 3; /** * @public */ type StaticSchemaIdUnion = 4; /** * @public */ type StaticSchemaIdError = -3; /** * @public */ type StaticSchemaIdOperation = 9; /** * @public */ type StaticSchema = StaticSimpleSchema | StaticListSchema | StaticMapSchema | StaticStructureSchema | StaticUnionSchema | StaticErrorSchema | StaticOperationSchema; /** * @public */ type ShapeName = string; /** * @public */ type ShapeNamespace = string; /** * @public */ type StaticSimpleSchema = [StaticSchemaIdSimple, ShapeNamespace, ShapeName, SchemaTraits, $SchemaRef]; /** * @public */ type StaticListSchema = [StaticSchemaIdList, ShapeNamespace, ShapeName, SchemaTraits, $SchemaRef]; /** * @public */ type StaticMapSchema = [StaticSchemaIdMap, ShapeNamespace, ShapeName, SchemaTraits, $SchemaRef, $SchemaRef]; /** * @public */ type StaticStructureSchema = [StaticSchemaIdStruct, ShapeNamespace, ShapeName, SchemaTraits, string[], $SchemaRef[], number?]; /** * @public */ type StaticUnionSchema = [StaticSchemaIdUnion, ShapeNamespace, ShapeName, SchemaTraits, string[], $SchemaRef[]]; /** * @public */ type StaticErrorSchema = [StaticSchemaIdError, ShapeNamespace, ShapeName, SchemaTraits, string[], $SchemaRef[], number?]; /** * @public */ type StaticOperationSchema = [StaticSchemaIdOperation, ShapeNamespace, ShapeName, SchemaTraits, $SchemaRef, $SchemaRef]; //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/schema/traits.d.ts /** * A bitvector representing a traits object. * * Vector index to trait: * 0 - httpLabel * 1 - idempotent * 2 - idempotencyToken * 3 - sensitive * 4 - httpPayload * 5 - httpResponseCode * 6 - httpQueryParams * * The singular trait values are enumerated for quick identification, but * combination values are left to the `number` union type. * * @public */ type TraitBitVector = HttpLabelBitMask | IdempotentBitMask | IdempotencyTokenBitMask | SensitiveBitMask | HttpPayloadBitMask | HttpResponseCodeBitMask | HttpQueryParamsBitMask | number; /** * @public */ type HttpLabelBitMask = 1; /** * @public */ type IdempotentBitMask = 2; /** * @public */ type IdempotencyTokenBitMask = 4; /** * @public */ type SensitiveBitMask = 8; /** * @public */ type HttpPayloadBitMask = 16; /** * @public */ type HttpResponseCodeBitMask = 32; /** * @public */ type HttpQueryParamsBitMask = 64; //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/schema/schema.d.ts /** * A schema is an object or value that describes how to serialize/deserialize data. * @public */ type $Schema = UnitSchema | SimpleSchema | $MemberSchema | StaticSchema | NormalizedSchema; /** * Traits attached to schema objects. * * When this is a number, it refers to a pre-allocated * trait combination that is equivalent to one of the * object type's variations. * * @public */ type SchemaTraits = TraitBitVector | SchemaTraitsObject; /** * Simple schemas are those corresponding to simple Smithy types. * @see https://smithy.io/2.0/spec/simple-types.html * @public */ type SimpleSchema = BlobSchemas | StringSchema | BooleanSchema | NumericSchema | BigIntegerSchema | BigDecimalSchema | DocumentSchema | TimestampSchemas | number; /** * Sentinel value for Timestamp schema. * "Default" means unspecified and to use the protocol serializer's default format. * * @public */ type TimestampSchemas = TimestampDefaultSchema | TimestampDateTimeSchema | TimestampHttpDateSchema | TimestampEpochSecondsSchema; /** * Sentinel values for Blob schema. * @public */ type BlobSchemas = BlobSchema | StreamingBlobSchema; /** * Signal value for the Smithy void value. Typically used for * operation input and outputs. * * @public */ type UnitSchema = "unit"; /** * See https://smithy.io/2.0/trait-index.html for individual definitions. * * @public */ type SchemaTraitsObject = { idempotent?: 1; idempotencyToken?: 1; sensitive?: 1; sparse?: 1; /** * timestampFormat is expressed by the schema sentinel values of 4, 5, 6, and 7, * and not contained in trait objects. * @deprecated use schema value. */ timestampFormat?: never; httpLabel?: 1; httpHeader?: string; httpQuery?: string; httpPrefixHeaders?: string; httpQueryParams?: 1; httpPayload?: 1; /** * [method, path, statusCode] */ http?: [string, string, number]; httpResponseCode?: 1; /** * [hostPrefix] */ endpoint?: [string]; xmlAttribute?: 1; xmlName?: string; /** * [prefix, uri] */ xmlNamespace?: [string, string]; xmlFlattened?: 1; jsonName?: string; mediaType?: string; error?: "client" | "server"; streaming?: 1; eventHeader?: 1; eventPayload?: 1; [traitName: string]: unknown; }; /** * Indicates the schema is a member of a parent Structure schema. * It may also have a set of member traits distinct from its target shape's traits. * @public */ type $MemberSchema = [$SchemaRef, SchemaTraits]; /** * Schema for an operation. * @public */ interface $OperationSchema { namespace: string; name: string; traits: SchemaTraits; input: $SchemaRef; output: $SchemaRef; } /** * Normalization wrapper for various schema data objects. * @public */ interface NormalizedSchema { getSchema(): $Schema; getName(): string | undefined; isMemberSchema(): boolean; isListSchema(): boolean; isMapSchema(): boolean; isStructSchema(): boolean; isBlobSchema(): boolean; isTimestampSchema(): boolean; isStringSchema(): boolean; isBooleanSchema(): boolean; isNumericSchema(): boolean; isBigIntegerSchema(): boolean; isBigDecimalSchema(): boolean; isStreaming(): boolean; getMergedTraits(): SchemaTraitsObject; getMemberTraits(): SchemaTraitsObject; getOwnTraits(): SchemaTraitsObject; /** * For list/set/map. */ getValueSchema(): NormalizedSchema; /** * For struct/union. */ getMemberSchema(member: string): NormalizedSchema | undefined; structIterator(): Generator<[string, NormalizedSchema], undefined, undefined>; } /** * A schema "reference" is either a schema or a function that * provides a schema. This is useful for lazy loading, and to allow * code generation to define schema out of dependency order. * @public */ type $SchemaRef = $Schema | (() => $Schema); /** * A codec creates serializers and deserializers for some format such as JSON, XML, or CBOR. * * @public */ interface $Codec extends ConfigurableSerdeContext { createSerializer(): $ShapeSerializer; createDeserializer(): $ShapeDeserializer; } /** * Turns a serialization into a data object. * @public */ interface $ShapeDeserializer extends ConfigurableSerdeContext { /** * Optionally async. */ read(schema: $Schema, data: SerializationType): any | Promise; } /** * Turns a data object into a serialization. * @public */ interface $ShapeSerializer extends ConfigurableSerdeContext { write(schema: $Schema, value: unknown): void; flush(): SerializationType; } /** * A client protocol defines how to convert a message (e.g. HTTP request/response) to and from a data object. * @public */ interface $ClientProtocol extends ConfigurableSerdeContext { /** * @returns the Smithy qualified shape id. */ getShapeId(): string; getRequestType(): { new (...args: any[]): Request; }; getResponseType(): { new (...args: any[]): Response; }; /** * @returns the payload codec if the requests/responses have a symmetric format. * It otherwise may return null. */ getPayloadCodec(): $Codec; serializeRequest(operationSchema: $OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise; updateServiceEndpoint(request: Request, endpoint: EndpointV2): Request; deserializeResponse(operationSchema: $OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: Response): Promise; } /** * @public */ interface $ClientProtocolCtor { new (args: any): $ClientProtocol; } /** * Allows a protocol, codec, or serde utility to accept the serdeContext * from a client configuration or request/response handlerExecutionContext. * * @public */ interface ConfigurableSerdeContext { setSerdeContext(serdeContext: SerdeFunctions): void; } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/schema/schema-deprecated.d.ts /** * A schema is an object or value that describes how to serialize/deserialize data. * @internal * @deprecated use $Schema */ type Schema$3 = UnitSchema | TraitsSchema | SimpleSchema | ListSchema | MapSchema | StructureSchema$1 | MemberSchema | OperationSchema | StaticSchema | NormalizedSchema; /** * A schema "reference" is either a schema or a function that * provides a schema. This is useful for lazy loading, and to allow * code generation to define schema out of dependency order. * @internal * @deprecated use $SchemaRef */ type SchemaRef = Schema$3 | (() => Schema$3); /** * A schema that has traits. * * @internal * @deprecated use static schema. */ interface TraitsSchema { namespace: string; name: string; traits: SchemaTraits; } /** * Indicates the schema is a member of a parent Structure schema. * It may also have a set of member traits distinct from its target shape's traits. * @internal * @deprecated use $MemberSchema */ type MemberSchema = [SchemaRef, SchemaTraits]; /** * Schema for the structure aggregate type. * @internal * @deprecated use static schema. */ interface StructureSchema$1 extends TraitsSchema { memberNames: string[]; memberList: SchemaRef[]; /** * @deprecated structure member iteration will be linear on the memberNames and memberList arrays. * It can be collected into a hashmap form on an ad-hoc basis, but will not initialize as such. */ members?: Record | undefined; } /** * Schema for the list aggregate type. * @internal * @deprecated use static schema. */ interface ListSchema extends TraitsSchema { valueSchema: SchemaRef; } /** * Schema for the map aggregate type. * @internal * @deprecated use static schema. */ interface MapSchema extends TraitsSchema { keySchema: SchemaRef; valueSchema: SchemaRef; } /** * Schema for an operation. * @internal * @deprecated use StaticOperationSchema or $OperationSchema */ interface OperationSchema { namespace: string; name: string; traits: SchemaTraits; input: SchemaRef; output: SchemaRef; } /** * Turns a serialization into a data object. * @internal * @deprecated use $ShapeDeserializer */ interface ShapeDeserializer extends ConfigurableSerdeContext { /** * Optionally async. */ read(schema: Schema$3, data: SerializationType): any | Promise; } /** * Turns a data object into a serialization. * @internal * @deprecated use $ShapeSerializer */ interface ShapeSerializer extends ConfigurableSerdeContext { write(schema: Schema$3, value: unknown): void; flush(): SerializationType; } /** * A codec creates serializers and deserializers for some format such as JSON, XML, or CBOR. * * @internal * @deprecated use $Codec */ interface Codec extends ConfigurableSerdeContext { createSerializer(): ShapeSerializer; createDeserializer(): ShapeDeserializer; } /** * A client protocol defines how to convert a message (e.g. HTTP request/response) to and from a data object. * @internal * @deprecated use $ClientProtocol */ interface ClientProtocol extends ConfigurableSerdeContext { /** * @returns the Smithy qualified shape id. */ getShapeId(): string; getRequestType(): { new (...args: any[]): Request; }; getResponseType(): { new (...args: any[]): Response; }; /** * @returns the payload codec if the requests/responses have a symmetric format. * It otherwise may return null. */ getPayloadCodec(): Codec; serializeRequest(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise; updateServiceEndpoint(request: Request, endpoint: EndpointV2): Request; deserializeResponse(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: Response): Promise; } /** * @public * @deprecated use $ClientProtocolCtor. */ interface ClientProtocolCtor { new (args: any): ClientProtocol; } //#endregion //#region ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-types/signature.d.ts /** * A `Date` object, a unix (epoch) timestamp in seconds, or a string that can be * understood by the JavaScript `Date` constructor. * * @public */ type DateInput = number | string | Date; /** * @public */ interface SigningArguments { /** * The date and time to be used as signature metadata. This value should be * a Date object, a unix (epoch) timestamp, or a string that can be * understood by the JavaScript `Date` constructor.If not supplied, the * value returned by `new Date()` will be used. */ signingDate?: DateInput; /** * The service signing name. It will override the service name of the signer * in current invocation */ signingService?: string; /** * The region name to sign the request. It will override the signing region of the * signer in current invocation */ signingRegion?: string; } /** * @public */ interface RequestSigningArguments extends SigningArguments { /** * A set of strings whose members represents headers that cannot be signed. * All headers in the provided request will have their names converted to * lower case and then checked for existence in the unsignableHeaders set. */ unsignableHeaders?: Set; /** * A set of strings whose members represents headers that should be signed. * Any values passed here will override those provided via unsignableHeaders, * allowing them to be signed. * * All headers in the provided request will have their names converted to * lower case before signing. */ signableHeaders?: Set; } /** * @public */ interface EventSigningArguments extends SigningArguments, EventStreamRequestScopedCredentials { priorSignature: string; } /** * @internal */ interface EventStreamRequestScopedCredentials { /** * Optional, static credentials used for the duration of the event-stream request. * If not provided, the signer's internal credential provider would be used, if * the signer is SignatureV4. */ eventStreamCredentials?: AwsCredentialIdentity; } /** * An object that signs request objects with AWS credentials using one of the * AWS authentication protocols. * * @public */ interface RequestSigner { /** * Sign the provided request for immediate dispatch. */ sign(requestToSign: HttpRequest$1, options?: RequestSigningArguments): Promise; } /** * @public */ interface FormattedEvent { headers: Uint8Array; payload: Uint8Array; } /** * @public */ interface EventSigner { /** * Sign the individual event of the event stream. */ sign(event: FormattedEvent, options: EventSigningArguments): Promise; } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+types@3.974.4/node_modules/@aws-sdk/types/dist-types/extensions/index.d.ts /** * @internal */ interface AwsRegionExtensionConfiguration { setRegion(region: Provider): void; region(): Provider; } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+types@3.974.4/node_modules/@aws-sdk/types/dist-types/function.d.ts /** * Resolves a function that accepts both the object argument fields of F1 and F2. * The function returns an intersection of what F1 and F2 return. * * @public */ type MergeFunctions = F1 extends ((arg: infer A1) => infer R1) ? F2 extends ((arg: infer A2) => infer R2) ? R1 extends Promise ? (arg?: A1 & A2) => Promise & Awaited> : (arg?: A1 & A2) => R1 & R2 : never : never; //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+types@3.974.4/node_modules/@aws-sdk/types/dist-types/serde.d.ts /** * @public * * Declare DOM interfaces in case dom.d.ts is not added to the tsconfig lib, causing * interfaces to not be defined. For developers with dom.d.ts added, the interfaces will * be merged correctly. * * This is also required for any clients with streaming interfaces where the corresponding * types are also referred. The type is only declared here once since this `@aws-sdk/types` * is depended by all `@aws-sdk` packages. */ declare global { /** * @public */ export interface ReadableStream {} /** * @public */ export interface Blob {} } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+core@3.977.8/node_modules/@aws-sdk/core/dist-types/submodules/client/middleware-host-header/hostHeaderMiddleware.d.ts /** * @public */ interface HostHeaderInputConfig {} /** * @internal */ interface HostHeaderResolvedConfig { /** * The HTTP handler to use. Fetch in browser and Https in Nodejs. */ requestHandler: RequestHandler; } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+core@3.977.8/node_modules/@aws-sdk/core/dist-types/submodules/client/middleware-user-agent/configurations.d.ts /** * @public */ interface UserAgentInputConfig { /** * The custom user agent header that would be appended to default one */ customUserAgent?: string | UserAgent; /** * The application ID used to identify the application. */ userAgentAppId?: string | undefined | Provider; } interface UserAgentResolvedConfig { /** * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header. * @internal */ defaultUserAgentProvider: Provider; /** * The custom user agent header that would be appended to default one */ customUserAgent?: UserAgent; /** * The runtime environment */ runtime: string; /** * Resolved value for input config {config.userAgentAppId} */ userAgentAppId: Provider; } //#endregion //#region ../../node_modules/.pnpm/@smithy+core@3.33.2/node_modules/@smithy/core/dist-types/submodules/config/config-resolver/regionConfig/resolveRegionConfig.d.ts /** * @public */ interface RegionInputConfig { /** * The AWS region to which this client will send requests */ region?: string | Provider; /** * Enables FIPS compatible endpoints. */ useFipsEndpoint?: boolean | Provider; } /** * @internal */ interface RegionResolvedConfig { /** * Resolved value for input config {@link RegionInputConfig.region} */ region: Provider; /** * Resolved value for input {@link RegionInputConfig.useFipsEndpoint} */ useFipsEndpoint: Provider; } //#endregion //#region ../../node_modules/.pnpm/@smithy+core@3.33.2/node_modules/@smithy/core/dist-types/submodules/transport/httpRequest.d.ts type HttpRequestOptions = Partial & Partial & { method?: string; }; /** * Use the distinct IHttpRequest interface from \@smithy/types instead. * This should not be used due to * overlapping with the concrete class' name. * * This is not marked deprecated since that would mark the concrete class * deprecated as well. * * @internal */ interface HttpRequest extends HttpRequest$1 {} /** * @public */ declare class HttpRequest implements HttpMessage, URI { method: string; protocol: string; hostname: string; port?: number; path: string; query: QueryParameterBag; headers: HeaderBag; username?: string; password?: string; fragment?: string; body?: any; constructor(options: HttpRequestOptions); /** * Note: this does not deep-clone the body. */ static clone(request: HttpRequest$1): HttpRequest; /** * This method only actually asserts that request is the interface {@link IHttpRequest}, * and not necessarily this concrete class. Left in place for API stability. * * Do not call instance methods on the input of this function, and * do not assume it has the HttpRequest prototype. */ static isInstance(request: unknown): request is HttpRequest; /** * @deprecated use static HttpRequest.clone(request) instead. It's not safe to call * this method because {@link HttpRequest.isInstance} incorrectly * asserts that IHttpRequest (interface) objects are of type HttpRequest (class). */ clone(): HttpRequest; } //#endregion //#region ../../node_modules/.pnpm/@smithy+core@3.33.2/node_modules/@smithy/core/dist-types/submodules/transport/httpResponse.d.ts type HttpResponseOptions = Partial & { statusCode: number; reason?: string; }; /** * Use the distinct IHttpResponse interface from \@smithy/types instead. * This should not be used due to * overlapping with the concrete class' name. * * This is not marked deprecated since that would mark the concrete class * deprecated as well. * * @internal */ interface HttpResponse extends HttpResponse$1 {} /** * @public */ declare class HttpResponse { statusCode: number; reason?: string; headers: HeaderBag; body?: any; constructor(options: HttpResponseOptions); static isInstance(response: unknown): response is HttpResponse; } //#endregion //#region ../../node_modules/.pnpm/@smithy+core@3.33.2/node_modules/@smithy/core/dist-types/submodules/client/smithy-client/client.d.ts /** * @public */ interface SmithyConfiguration { /** * @public */ requestHandler: RequestHandler | NodeHttpHandlerOptions | FetchHttpHandlerOptions | Record; /** * Default false. * When true, the client will only resolve the middleware stack once per * Command class. This means modifying the middlewareStack of the * command or client after requests have been made will not be * recognized. * Calling client.destroy() also clears this cache. * Enable this only if needing the additional time saved (0-1ms per request) * and not needing middleware modifications between requests. * * @public */ cacheMiddleware?: boolean; /** * A client request/response protocol or constructor of one. * A protocol in this context is not e.g. https. * It is the combined implementation of how to (de)serialize and create * the messages (e.g. http requests/responses) that are being exchanged. * * @public */ protocol?: ClientProtocol | $ClientProtocol | ClientProtocolCtor | $ClientProtocolCtor; /** * These are automatically generated and will be passed to the * config.protocol if given as a constructor. * @internal */ protocolSettings?: { defaultNamespace?: string; [setting: string]: unknown; }; /** * The API version set internally by the SDK, and is * not planned to be used by customer code. * @internal */ readonly apiVersion: string; } /** * @internal */ type SmithyResolvedConfiguration = { requestHandler: RequestHandler; cacheMiddleware?: boolean; protocol?: ClientProtocol | $ClientProtocol; protocolSettings?: { defaultNamespace?: string; [setting: string]: unknown; }; readonly apiVersion: string; }; /** * @public */ declare class Client> implements Client$1 { readonly config: ResolvedClientConfiguration; middlewareStack: MiddlewareStack; /** * Holds an object reference to the initial configuration object. * Used to check that the config resolver stack does not create * dangling instances of an intermediate form of the configuration object. * * @internal */ initConfig?: object; /** * May be used to cache the resolved handler function for a Command class. */ private handlers?; constructor(config: ResolvedClientConfiguration); send(command: Command$1>, options?: HandlerOptions): Promise; send(command: Command$1>, cb: (err: any, data?: OutputType) => void): void; send(command: Command$1>, options: HandlerOptions, cb: (err: any, data?: OutputType) => void): void; destroy(): void; } //#endregion //#region ../../node_modules/.pnpm/@smithy+core@3.33.2/node_modules/@smithy/core/dist-types/submodules/client/smithy-client/command.d.ts /** * @public */ declare abstract class Command implements Command$1 { abstract input: Input; readonly middlewareStack: MiddlewareStack; readonly schema?: OperationSchema | StaticOperationSchema; /** * Factory for Command ClassBuilder. * @internal */ static classBuilder; }, SI extends object = any, SO extends MetadataBearer = any>(): ClassBuilder; abstract resolveMiddleware(stack: MiddlewareStack, configuration: ResolvedClientConfiguration, options: any): Handler; /** * @internal */ resolveMiddlewareWithContext(clientStack: MiddlewareStack, configuration: { logger?: Logger; requestHandler: RequestHandler; }, options: any, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor }: ResolveMiddlewareContextArgs): InitializeHandler; } /** * @internal */ type ResolveMiddlewareContextArgs = { middlewareFn: (CommandCtor: any, clientStack: any, config: any, options: any) => Pluggable[]; clientName: string; commandName: string; smithyContext: Record; additionalContext: HandlerExecutionContext; inputFilterSensitiveLog: (_: any) => any; outputFilterSensitiveLog: (_: any) => any; CommandCtor: any; }; /** * @internal */ declare class ClassBuilder; }, SI extends object = any, SO extends MetadataBearer = any> { private _init; private _ep; private _middlewareFn; private _commandName; private _clientName; private _additionalContext; private _smithyContext; private _inputFilterSensitiveLog; private _outputFilterSensitiveLog; private _serializer; private _deserializer; private _operationSchema?; /** * Optional init callback. */ init(cb: (_: Command) => void): void; /** * Set the endpoint parameter instructions. */ ep(endpointParameterInstructions: EndpointParameterInstructions): ClassBuilder; /** * Add any number of middleware. */ m(middlewareSupplier: (CommandCtor: any, clientStack: any, config: any, options: any) => Pluggable[]): ClassBuilder; /** * Set the initial handler execution context Smithy field. */ s(service: string, operation: string, smithyContext?: Record): ClassBuilder; /** * Set the initial handler execution context. */ c(additionalContext?: HandlerExecutionContext): ClassBuilder; /** * Set constant string identifiers for the operation. */ n(clientName: string, commandName: string): ClassBuilder; /** * Set the input and output sensistive log filters. */ f(inputFilter?: (_: any) => any, outputFilter?: (_: any) => any): ClassBuilder; /** * Sets the serializer. */ ser(serializer: (input: I, context?: SerdeContext | any) => Promise): ClassBuilder; /** * Sets the deserializer. */ de(deserializer: (output: HttpResponse$1, context?: SerdeContext | any) => Promise): ClassBuilder; /** * Sets input/output schema for the operation. */ sc(operation: OperationSchema | StaticOperationSchema): ClassBuilder; /** * @returns a Command class with the classBuilder properties. */ build(): { new (input: I): CommandImpl; new (...[input]: OptionalParameter): CommandImpl; getEndpointParameterInstructions(): EndpointParameterInstructions; }; } /** * A concrete implementation of ICommand with no abstract members. * @public */ interface CommandImpl; }, SI extends object = any, SO extends MetadataBearer = any> extends Command { readonly input: I; resolveMiddleware(stack: MiddlewareStack, configuration: C, options: any): Handler; } //#endregion //#region ../../node_modules/.pnpm/@smithy+core@3.33.2/node_modules/@smithy/core/dist-types/submodules/client/smithy-client/defaults-mode.d.ts /** * Option determining how certain default configuration options are resolved in the SDK. It can be one of the value listed below: * * `"standard"`:

The STANDARD mode provides the latest recommended default values that should be safe to run in most scenarios

Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK

* * `"in-region"`:

The IN_REGION mode builds on the standard mode and includes optimization tailored for applications which call AWS services from within the same AWS region

Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK

* * `"cross-region"`:

The CROSS_REGION mode builds on the standard mode and includes optimization tailored for applications which call AWS services in a different region

Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK

* * `"mobile"`:

The MOBILE mode builds on the standard mode and includes optimization tailored for mobile applications

Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK

* * `"auto"`:

The AUTO mode is an experimental mode that builds on the standard mode. The SDK will attempt to discover the execution environment to determine the appropriate settings automatically.

Note that the auto detection is heuristics-based and does not guarantee 100% accuracy. STANDARD mode will be used if the execution environment cannot be determined. The auto detection might query EC2 Instance Metadata service, which might introduce latency. Therefore we recommend choosing an explicit defaults_mode instead if startup latency is critical to your application

* * `"legacy"`:

The LEGACY mode provides default settings that vary per SDK and were used prior to establishment of defaults_mode

* * @defaultValue "legacy" */ type DefaultsMode = "standard" | "in-region" | "cross-region" | "mobile" | "auto" | "legacy"; //#endregion //#region ../../node_modules/.pnpm/@smithy+core@3.33.2/node_modules/@smithy/core/dist-types/submodules/client/smithy-client/exceptions.d.ts /** * The type of the exception class constructor parameter. The returned type contains the properties * in the `ExceptionType` but not in the `BaseExceptionType`. If the `BaseExceptionType` contains * `$metadata` and `message` properties, it's also included in the returned type. * @internal */ type ExceptionOptionType = Omit>; /** * @public */ interface ServiceExceptionOptions extends SmithyException, MetadataBearer { message?: string; } /** * Base exception class for the exceptions from the server-side. * * @public */ declare class ServiceException extends Error implements SmithyException, MetadataBearer { readonly $fault: "client" | "server"; $response?: HttpResponse$1; $retryable?: RetryableTrait; $metadata: ResponseMetadata; constructor(options: ServiceExceptionOptions); /** * Checks if a value is an instance of ServiceException (duck typed) */ static isInstance(value: unknown): value is ServiceException; /** * Custom instanceof check to support the operator for ServiceException base class */ static [Symbol.hasInstance](instance: unknown): boolean; } //#endregion //#region ../../node_modules/.pnpm/@smithy+core@3.33.2/node_modules/@smithy/core/dist-types/submodules/endpoints/middleware-endpoint/resolveEndpointConfig.d.ts /** * Endpoint config interfaces and resolver for Endpoint v2. They live in separate package to allow per-service onboarding. * When all services onboard Endpoint v2, the resolver in config-resolver package can be removed. * This interface includes all the endpoint parameters with built-in bindings of "AWS::*" and "SDK::*" * * @public */ interface EndpointInputConfig { /** * The fully qualified endpoint of the webservice. This is only for using * a custom endpoint (for example, when using a local version of S3). * * Endpoint transformations such as S3 applying a bucket to the hostname are * still applicable to this custom endpoint. */ endpoint?: string | Endpoint | Provider | EndpointV2 | Provider; /** * Providing a custom endpointProvider will override * built-in transformations of the endpoint such as S3 adding the bucket * name to the hostname, since they are part of the default endpointProvider. */ endpointProvider?: (params: T, context?: { logger?: Logger; }) => EndpointV2; /** * Whether TLS is enabled for requests. * @deprecated */ tls?: boolean; /** * Enables IPv6/IPv4 dualstack endpoint. */ useDualstackEndpoint?: boolean | Provider; /** * Enables FIPS compatible endpoints. */ useFipsEndpoint?: boolean | Provider; /** * When true, endpoint URLs from environment variables and the shared * configuration file are not used. Does not affect endpoints set * via code (e.g. client constructor endpoint option). * * Default false. */ ignoreConfiguredEndpointUrls?: boolean; /** * This field is used internally so you should not fill any value to this field. * * @internal */ serviceConfiguredEndpoint?: never; } /** * This supersedes the similarly named EndpointsResolvedConfig (no parametric types) * from resolveEndpointsConfig.ts in \@smithy/config-resolver. * * @internal */ interface EndpointResolvedConfig { /** * Custom endpoint provided by the user. * This is normalized to a single interface from the various acceptable types. * This field will be undefined if a custom endpoint is not provided. */ endpoint?: Provider; endpointProvider: (params: T, context?: { logger?: Logger; }) => EndpointV2; /** * Whether TLS is enabled for requests. * @deprecated */ tls: boolean; /** * Whether the endpoint is specified by caller. * This should be used over checking the existence of `endpoint`, since * that may have been set by other means, such as the default regional * endpoint provider function. * * @internal */ isCustomEndpoint?: boolean; /** * Resolved value for input {@link EndpointsInputConfig.useDualstackEndpoint} */ useDualstackEndpoint: Provider; /** * Resolved value for input {@link EndpointsInputConfig.useFipsEndpoint} */ useFipsEndpoint: Provider; /** * Unique service identifier. * @internal */ serviceId?: string; /** * Whether configured endpoint URLs should be ignored. */ ignoreConfiguredEndpointUrls: boolean; /** * A configured endpoint global or specific to the service from ENV or AWS SDK configuration files. * @internal */ serviceConfiguredEndpoint?: Provider; } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+middleware-eventstream@3.972.28/node_modules/@aws-sdk/middleware-eventstream/dist-types/eventStreamConfiguration.d.ts /** * @public */ interface EventStreamInputConfig {} type EventStreamResolvedConfig = { /** * A signer that signs the event of a event stream * @internal */ eventSigner: EventSigner; /** * A handler that control the eventstream payload flow and sign the payload after payload stream starting to flow. * @internal */ eventStreamPayloadHandler: EventStreamPayloadHandler; }; //#endregion //#region ../../node_modules/.pnpm/@smithy+core@3.33.2/node_modules/@smithy/core/dist-types/submodules/serde/util-stream/blob/Uint8ArrayBlobAdapter.d.ts /** * Adapter for conversions of the native Uint8Array type. * @public */ interface IUint8ArrayBlobAdapter extends Uint8Array { /** * @param encoding - default 'utf-8'. * @returns the blob as string. */ transformToString(encoding?: string): string; } interface Uint8ArrayBlobAdapterConstructor { new (...args: any): IUint8ArrayBlobAdapter; fromString(source: string, encoding?: string): IUint8ArrayBlobAdapter; mutate(source: Uint8Array): IUint8ArrayBlobAdapter; } //#endregion //#region ../../node_modules/.pnpm/@smithy+core@3.33.2/node_modules/@smithy/core/dist-types/submodules/serde/index.d.ts declare const Uint8ArrayBlobAdapter_base: Uint8ArrayBlobAdapterConstructor; declare class Uint8ArrayBlobAdapter extends Uint8ArrayBlobAdapter_base {} //#endregion //#region ../../node_modules/.pnpm/@smithy+core@3.33.2/node_modules/@smithy/core/dist-types/submodules/schema/schemas/Schema.d.ts /** * Abstract base for class-based Schema except NormalizedSchema. * * @internal * @deprecated use StaticSchema */ declare abstract class Schema$2 implements TraitsSchema { name: string; namespace: string; traits: SchemaTraits; protected abstract readonly symbol: symbol; static assign(instance: T, values: Omit): T; static [Symbol.hasInstance](lhs: unknown): boolean; getName(): string; } //#endregion //#region ../../node_modules/.pnpm/@smithy+core@3.33.2/node_modules/@smithy/core/dist-types/submodules/schema/schemas/StructureSchema.d.ts /** * A structure schema has a known list of members. This is also used for unions. * * @internal * @deprecated use StaticSchema */ declare class StructureSchema extends Schema$2 implements StructureSchema$1 { static symbol: symbol; name: string; traits: SchemaTraits; memberNames: string[]; memberList: SchemaRef[]; protected readonly symbol: symbol; } //#endregion //#region ../../node_modules/.pnpm/@smithy+core@3.33.2/node_modules/@smithy/core/dist-types/submodules/schema/schemas/ErrorSchema.d.ts /** * A schema for a structure shape having the error trait. These represent enumerated operation errors. * Because Smithy-TS SDKs use classes for exceptions, whereas plain objects are used for all other data, * and have an existing notion of a XYZServiceBaseException, the ErrorSchema differs from a StructureSchema * by additionally holding the class reference for the corresponding ServiceException class. * * @internal * @deprecated use StaticSchema */ declare class ErrorSchema extends StructureSchema { static readonly symbol: unique symbol; /** * @deprecated - field unused. */ ctor: any; protected readonly symbol: symbol; } //#endregion //#region ../../node_modules/.pnpm/@smithy+core@3.33.2/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts /** * A way to look up schema by their ShapeId values. * * @public */ declare class TypeRegistry { readonly namespace: string; private schemas; private exceptions; static readonly registries: Map; private constructor(); /** * @param namespace - specifier. * @returns the schema for that namespace, creating it if necessary. */ static for(namespace: string): TypeRegistry; /** * Copies entries from another instance without changing the namespace of self. * The composition is additive but non-destructive and will not overwrite existing entries. * * @param other - another TypeRegistry. */ copyFrom(other: TypeRegistry): void; /** * Adds the given schema to a type registry with the same namespace, and this registry. * * @param shapeId - to be registered. * @param schema - to be registered. */ register(shapeId: string, schema: Schema$3): void; /** * @param shapeId - query. * @returns the schema. */ getSchema(shapeId: string): Schema$3; /** * Associates an error schema with its constructor. */ registerError(es: ErrorSchema | StaticErrorSchema, ctor: any): void; /** * @param es - query. * @returns Error constructor that extends the service's base exception. */ getErrorCtor(es: ErrorSchema | StaticErrorSchema): any; /** * The smithy-typescript code generator generates a synthetic (i.e. unmodeled) base exception, * because generated SDKs before the introduction of schemas have the notion of a ServiceBaseException, which * is unique per service/model. * * This is generated under a unique prefix that is combined with the service namespace, and this * method is used to retrieve it. * * The base exception synthetic schema is used when an error is returned by a service, but we cannot * determine what existing schema to use to deserialize it. * * @returns the synthetic base exception of the service namespace associated with this registry instance. */ getBaseException(): StaticErrorSchema | undefined; /** * @param predicate - criterion. * @returns a schema in this registry matching the predicate. */ find(predicate: (schema: Schema$3) => boolean): number | "unit" | MemberSchema | NormalizedSchema | StaticErrorSchema | StaticListSchema | StaticMapSchema | StaticOperationSchema | StaticSimpleSchema | StaticStructureSchema | StaticUnionSchema | TraitsSchema | undefined; /** * Unloads the current TypeRegistry. */ clear(): void; private normalizeShapeId; } //#endregion //#region ../../node_modules/.pnpm/@smithy+core@3.33.2/node_modules/@smithy/core/dist-types/submodules/event-streams/eventstream-serde-config-resolver/EventStreamSerdeConfig.d.ts /** * @public */ interface EventStreamSerdeInputConfig {} /** * @internal */ interface EventStreamSerdeResolvedConfig { eventStreamMarshaller: EventStreamMarshaller; } //#endregion //#region ../../node_modules/.pnpm/@smithy+core@3.33.2/node_modules/@smithy/core/dist-types/submodules/protocols/protocol-http/httpHandler.d.ts /** * @internal */ type HttpHandler = RequestHandler & { /** * @internal */ updateHttpClientConfig(key: keyof HttpHandlerConfig, value: HttpHandlerConfig[typeof key]): void; /** * @internal */ httpHandlerConfigs(): HttpHandlerConfig; }; /** * A type representing the accepted user inputs for the `requestHandler` field * of a client's constructor object. * You may provide an instance of an HttpHandler, or alternatively * provide the constructor arguments as an object which will be passed * to the constructor of the default request handler. * The default class constructor to which your arguments will be passed * varies. The Node.js default is the NodeHttpHandler and the browser/react-native * default is the FetchHttpHandler. In rarer cases specific clients may be * configured to use other default implementations such as Websocket or HTTP2. * The fallback type Record is part of the union to allow * passing constructor params to an unknown requestHandler type. * * @public */ type HttpHandlerUserInput = HttpHandler | NodeHttpHandlerOptions | FetchHttpHandlerOptions | Record; //#endregion //#region ../../node_modules/.pnpm/@smithy+core@3.33.2/node_modules/@smithy/core/dist-types/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.d.ts /** * @internal */ interface HttpHandlerExtensionConfiguration { setHttpHandler(handler: HttpHandler): void; httpHandler(): HttpHandler; updateHttpClientConfig(key: keyof HandlerConfig, value: HandlerConfig[typeof key]): void; httpHandlerConfigs(): HandlerConfig; } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+middleware-websocket@3.972.51/node_modules/@aws-sdk/middleware-websocket/dist-types/resolveWebSocketConfig.d.ts /** * @public */ interface WebSocketInputConfig {} interface WebSocketResolvedConfig { /** * Resolved value of input config {@link AwsAuthInputConfig.signer} */ signer: (authScheme: AuthScheme) => Promise; /** * The HTTP handler to use. Fetch in browser and Https in Nodejs. */ requestHandler: RequestHandler; } //#endregion //#region ../../node_modules/.pnpm/@smithy+core@3.33.2/node_modules/@smithy/core/dist-types/submodules/retry/middleware-retry/configurations.d.ts /** * @public */ interface RetryInputConfig { /** * The maximum number of times requests that encounter retryable failures should be attempted. */ maxAttempts?: number | Provider; /** * The strategy to retry the request. Using built-in exponential backoff strategy by default. */ retryStrategy?: RetryStrategy | RetryStrategyV2; } /** * @internal */ interface RetryResolvedConfig { /** * Resolved value for input config {@link RetryInputConfig.maxAttempts} */ maxAttempts: Provider; /** * Resolved value for input config {@link RetryInputConfig.retryStrategy} */ retryStrategy: Provider; logger?: Logger; } //#endregion //#region ../../node_modules/.pnpm/@smithy+signature-v4@5.7.2/node_modules/@smithy/signature-v4/dist-types/SignatureV4Base.d.ts /** * @public */ interface SignatureV4Init { /** * The service signing name. */ service: string; /** * The region name or a function that returns a promise that will be * resolved with the region name. */ region: string | Provider; /** * The credentials with which the request should be signed or a function * that returns a promise that will be resolved with credentials. */ credentials: AwsCredentialIdentity | Provider; /** * A constructor function for a hash object that will calculate SHA-256 HMAC * checksums. */ sha256?: ChecksumConstructor | HashConstructor; /** * Whether to uri-escape the request URI path as part of computing the * canonical request string. This is required for every AWS service, except * Amazon S3, as of late 2017. * * @default [true] */ uriEscapePath?: boolean; /** * Whether to calculate a checksum of the request body and include it as * either a request header (when signing) or as a query string parameter * (when presigning). This is required for AWS Glacier and Amazon S3 and optional for * every other AWS service as of late 2017. * * @default [true] */ applyChecksum?: boolean; } /** * @public */ interface SignatureV4CryptoInit { sha256: ChecksumConstructor | HashConstructor; } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+core@3.977.8/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.d.ts /** * @public */ interface AwsSdkSigV4AuthInputConfig { /** * The credentials used to sign requests. */ credentials?: AwsCredentialIdentity | AwsCredentialIdentityProvider; /** * The signer to use when signing requests. */ signer?: RequestSigner | ((authScheme?: AuthScheme) => Promise); /** * Whether to escape request path when signing the request. */ signingEscapePath?: boolean; /** * An offset value in milliseconds to apply to all signing times. */ systemClockOffset?: number; /** * The region where you want to sign your request against. This * can be different to the region in the endpoint. */ signingRegion?: string; /** * The injectable SigV4-compatible signer class constructor. If not supplied, * regular SignatureV4 constructor will be used. * * @internal */ signerConstructor?: new (options: SignatureV4Init & SignatureV4CryptoInit) => RequestSigner; /** * Whether to disable clock skew correction. When true, the SDK will not adjust * the signing timestamp, will not update the client clock offset from response * headers, and will not retry clock skew errors. * * Defaults to false (correction enabled). */ disableClockSkewCorrection?: boolean | Provider; } /** * Used to indicate whether a credential provider function was memoized by this resolver. * @public */ type AwsSdkSigV4Memoized = { /** * The credential provider has been memoized by the AWS SDK SigV4 config resolver. */ memoized?: boolean; /** * The credential provider has the caller client config object bound to its arguments. */ configBound?: boolean; /** * Function is wrapped with attribution transform. */ attributed?: boolean; }; /** * @internal */ interface AwsSdkSigV4AuthResolvedConfig { /** * Resolved value for input config {@link AwsSdkSigV4AuthInputConfig.credentials} * This provider MAY memoize the loaded credentials for certain period. */ credentials: MergeFunctions> & AwsSdkSigV4Memoized; /** * Resolved value for input config {@link AwsSdkSigV4AuthInputConfig.signer} */ signer: (authScheme?: AuthScheme) => Promise; /** * Resolved value for input config {@link AwsSdkSigV4AuthInputConfig.signingEscapePath} */ signingEscapePath: boolean; /** * Resolved value for input config {@link AwsSdkSigV4AuthInputConfig.systemClockOffset} */ systemClockOffset: number; /** * Resolved value for input config {@link AwsSdkSigV4AuthInputConfig.disableClockSkewCorrection} */ disableClockSkewCorrection: Provider; } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+client-bedrock-runtime@3.1111.0/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/auth/httpAuthSchemeProvider.d.ts /** * @internal */ interface BedrockRuntimeHttpAuthSchemeParameters extends HttpAuthSchemeParameters { region?: string; } /** * @internal */ interface BedrockRuntimeHttpAuthSchemeProvider extends HttpAuthSchemeProvider {} /** * @public */ interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig { /** * A comma-separated list of case-sensitive auth scheme names. * An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed. * For example, the auth scheme with ID aws.auth#sigv4 is named sigv4. * @public */ authSchemePreference?: string[] | Provider; /** * Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme. * @internal */ httpAuthSchemes?: HttpAuthScheme[]; /** * Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use. * @internal */ httpAuthSchemeProvider?: BedrockRuntimeHttpAuthSchemeProvider; /** * The token used to authenticate requests. */ token?: TokenIdentity | TokenIdentityProvider; } /** * @internal */ interface HttpAuthSchemeResolvedConfig extends AwsSdkSigV4AuthResolvedConfig { /** * A comma-separated list of case-sensitive auth scheme names. * An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed. * For example, the auth scheme with ID aws.auth#sigv4 is named sigv4. * @public */ readonly authSchemePreference: Provider; /** * Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme. * @internal */ readonly httpAuthSchemes: HttpAuthScheme[]; /** * Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use. * @internal */ readonly httpAuthSchemeProvider: BedrockRuntimeHttpAuthSchemeProvider; /** * The token used to authenticate requests. */ readonly token?: TokenIdentityProvider; } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+client-bedrock-runtime@3.1111.0/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/models/enums.d.ts /** * @public * @enum */ declare const AsyncInvokeStatus: { readonly COMPLETED: "Completed"; readonly FAILED: "Failed"; readonly IN_PROGRESS: "InProgress"; }; /** * @public */ type AsyncInvokeStatus = (typeof AsyncInvokeStatus)[keyof typeof AsyncInvokeStatus]; /** * @public * @enum */ declare const SortAsyncInvocationBy: { readonly SUBMISSION_TIME: "SubmissionTime"; }; /** * @public */ type SortAsyncInvocationBy = (typeof SortAsyncInvocationBy)[keyof typeof SortAsyncInvocationBy]; /** * @public * @enum */ declare const SortOrder: { readonly ASCENDING: "Ascending"; readonly DESCENDING: "Descending"; }; /** * @public */ type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]; /** * @public * @enum */ declare const GuardrailImageFormat: { readonly JPEG: "jpeg"; readonly PNG: "png"; }; /** * @public */ type GuardrailImageFormat = (typeof GuardrailImageFormat)[keyof typeof GuardrailImageFormat]; /** * @public * @enum */ declare const GuardrailContentQualifier: { readonly GROUNDING_SOURCE: "grounding_source"; readonly GUARD_CONTENT: "guard_content"; readonly QUERY: "query"; }; /** * @public */ type GuardrailContentQualifier = (typeof GuardrailContentQualifier)[keyof typeof GuardrailContentQualifier]; /** * @public * @enum */ declare const GuardrailOutputScope: { readonly FULL: "FULL"; readonly INTERVENTIONS: "INTERVENTIONS"; }; /** * @public */ type GuardrailOutputScope = (typeof GuardrailOutputScope)[keyof typeof GuardrailOutputScope]; /** * @public * @enum */ declare const GuardrailContentSource: { readonly INPUT: "INPUT"; readonly OUTPUT: "OUTPUT"; }; /** * @public */ type GuardrailContentSource = (typeof GuardrailContentSource)[keyof typeof GuardrailContentSource]; /** * @public * @enum */ declare const GuardrailAction: { readonly GUARDRAIL_INTERVENED: "GUARDRAIL_INTERVENED"; readonly NONE: "NONE"; }; /** * @public */ type GuardrailAction = (typeof GuardrailAction)[keyof typeof GuardrailAction]; /** * @public * @enum */ declare const GuardrailOrigin: { readonly ACCOUNT_ENFORCED: "ACCOUNT_ENFORCED"; readonly ORGANIZATION_ENFORCED: "ORGANIZATION_ENFORCED"; readonly REQUEST: "REQUEST"; }; /** * @public */ type GuardrailOrigin = (typeof GuardrailOrigin)[keyof typeof GuardrailOrigin]; /** * @public * @enum */ declare const GuardrailOwnership: { readonly CROSS_ACCOUNT: "CROSS_ACCOUNT"; readonly SELF: "SELF"; }; /** * @public */ type GuardrailOwnership = (typeof GuardrailOwnership)[keyof typeof GuardrailOwnership]; /** * @public * @enum */ declare const GuardrailAutomatedReasoningLogicWarningType: { readonly ALWAYS_FALSE: "ALWAYS_FALSE"; readonly ALWAYS_TRUE: "ALWAYS_TRUE"; }; /** * @public */ type GuardrailAutomatedReasoningLogicWarningType = (typeof GuardrailAutomatedReasoningLogicWarningType)[keyof typeof GuardrailAutomatedReasoningLogicWarningType]; /** * @public * @enum */ declare const GuardrailContentPolicyAction: { readonly BLOCKED: "BLOCKED"; readonly NONE: "NONE"; }; /** * @public */ type GuardrailContentPolicyAction = (typeof GuardrailContentPolicyAction)[keyof typeof GuardrailContentPolicyAction]; /** * @public * @enum */ declare const GuardrailContentFilterConfidence: { readonly HIGH: "HIGH"; readonly LOW: "LOW"; readonly MEDIUM: "MEDIUM"; readonly NONE: "NONE"; }; /** * @public */ type GuardrailContentFilterConfidence = (typeof GuardrailContentFilterConfidence)[keyof typeof GuardrailContentFilterConfidence]; /** * @public * @enum */ declare const GuardrailContentFilterStrength: { readonly HIGH: "HIGH"; readonly LOW: "LOW"; readonly MEDIUM: "MEDIUM"; readonly NONE: "NONE"; }; /** * @public */ type GuardrailContentFilterStrength = (typeof GuardrailContentFilterStrength)[keyof typeof GuardrailContentFilterStrength]; /** * @public * @enum */ declare const GuardrailContentFilterType: { readonly HATE: "HATE"; readonly INSULTS: "INSULTS"; readonly MISCONDUCT: "MISCONDUCT"; readonly PROMPT_ATTACK: "PROMPT_ATTACK"; readonly SEXUAL: "SEXUAL"; readonly VIOLENCE: "VIOLENCE"; }; /** * @public */ type GuardrailContentFilterType = (typeof GuardrailContentFilterType)[keyof typeof GuardrailContentFilterType]; /** * @public * @enum */ declare const GuardrailContextualGroundingPolicyAction: { readonly BLOCKED: "BLOCKED"; readonly NONE: "NONE"; }; /** * @public */ type GuardrailContextualGroundingPolicyAction = (typeof GuardrailContextualGroundingPolicyAction)[keyof typeof GuardrailContextualGroundingPolicyAction]; /** * @public * @enum */ declare const GuardrailContextualGroundingFilterType: { readonly GROUNDING: "GROUNDING"; readonly RELEVANCE: "RELEVANCE"; }; /** * @public */ type GuardrailContextualGroundingFilterType = (typeof GuardrailContextualGroundingFilterType)[keyof typeof GuardrailContextualGroundingFilterType]; /** * @public * @enum */ declare const GuardrailSensitiveInformationPolicyAction: { readonly ANONYMIZED: "ANONYMIZED"; readonly BLOCKED: "BLOCKED"; readonly NONE: "NONE"; }; /** * @public */ type GuardrailSensitiveInformationPolicyAction = (typeof GuardrailSensitiveInformationPolicyAction)[keyof typeof GuardrailSensitiveInformationPolicyAction]; /** * @public * @enum */ declare const GuardrailPiiEntityType: { readonly ADDRESS: "ADDRESS"; readonly AGE: "AGE"; readonly AWS_ACCESS_KEY: "AWS_ACCESS_KEY"; readonly AWS_SECRET_KEY: "AWS_SECRET_KEY"; readonly CA_HEALTH_NUMBER: "CA_HEALTH_NUMBER"; readonly CA_SOCIAL_INSURANCE_NUMBER: "CA_SOCIAL_INSURANCE_NUMBER"; readonly CREDIT_DEBIT_CARD_CVV: "CREDIT_DEBIT_CARD_CVV"; readonly CREDIT_DEBIT_CARD_EXPIRY: "CREDIT_DEBIT_CARD_EXPIRY"; readonly CREDIT_DEBIT_CARD_NUMBER: "CREDIT_DEBIT_CARD_NUMBER"; readonly DRIVER_ID: "DRIVER_ID"; readonly EMAIL: "EMAIL"; readonly INTERNATIONAL_BANK_ACCOUNT_NUMBER: "INTERNATIONAL_BANK_ACCOUNT_NUMBER"; readonly IP_ADDRESS: "IP_ADDRESS"; readonly LICENSE_PLATE: "LICENSE_PLATE"; readonly MAC_ADDRESS: "MAC_ADDRESS"; readonly NAME: "NAME"; readonly PASSWORD: "PASSWORD"; readonly PHONE: "PHONE"; readonly PIN: "PIN"; readonly SWIFT_CODE: "SWIFT_CODE"; readonly UK_NATIONAL_HEALTH_SERVICE_NUMBER: "UK_NATIONAL_HEALTH_SERVICE_NUMBER"; readonly UK_NATIONAL_INSURANCE_NUMBER: "UK_NATIONAL_INSURANCE_NUMBER"; readonly UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER: "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER"; readonly URL: "URL"; readonly USERNAME: "USERNAME"; readonly US_BANK_ACCOUNT_NUMBER: "US_BANK_ACCOUNT_NUMBER"; readonly US_BANK_ROUTING_NUMBER: "US_BANK_ROUTING_NUMBER"; readonly US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER: "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER"; readonly US_PASSPORT_NUMBER: "US_PASSPORT_NUMBER"; readonly US_SOCIAL_SECURITY_NUMBER: "US_SOCIAL_SECURITY_NUMBER"; readonly VEHICLE_IDENTIFICATION_NUMBER: "VEHICLE_IDENTIFICATION_NUMBER"; }; /** * @public */ type GuardrailPiiEntityType = (typeof GuardrailPiiEntityType)[keyof typeof GuardrailPiiEntityType]; /** * @public * @enum */ declare const GuardrailTopicPolicyAction: { readonly BLOCKED: "BLOCKED"; readonly NONE: "NONE"; }; /** * @public */ type GuardrailTopicPolicyAction = (typeof GuardrailTopicPolicyAction)[keyof typeof GuardrailTopicPolicyAction]; /** * @public * @enum */ declare const GuardrailTopicType: { readonly DENY: "DENY"; }; /** * @public */ type GuardrailTopicType = (typeof GuardrailTopicType)[keyof typeof GuardrailTopicType]; /** * @public * @enum */ declare const GuardrailWordPolicyAction: { readonly BLOCKED: "BLOCKED"; readonly NONE: "NONE"; }; /** * @public */ type GuardrailWordPolicyAction = (typeof GuardrailWordPolicyAction)[keyof typeof GuardrailWordPolicyAction]; /** * @public * @enum */ declare const GuardrailManagedWordType: { readonly PROFANITY: "PROFANITY"; }; /** * @public */ type GuardrailManagedWordType = (typeof GuardrailManagedWordType)[keyof typeof GuardrailManagedWordType]; /** * @public * @enum */ declare const GuardrailChecksContentFilterCategory: { readonly HATE: "HATE"; readonly INSULTS: "INSULTS"; readonly MISCONDUCT: "MISCONDUCT"; readonly SEXUAL: "SEXUAL"; readonly VIOLENCE: "VIOLENCE"; }; /** * @public */ type GuardrailChecksContentFilterCategory = (typeof GuardrailChecksContentFilterCategory)[keyof typeof GuardrailChecksContentFilterCategory]; /** * @public * @enum */ declare const GuardrailChecksPromptAttackCategory: { readonly JAILBREAK: "JAILBREAK"; readonly PROMPT_INJECTION: "PROMPT_INJECTION"; readonly PROMPT_LEAKAGE: "PROMPT_LEAKAGE"; }; /** * @public */ type GuardrailChecksPromptAttackCategory = (typeof GuardrailChecksPromptAttackCategory)[keyof typeof GuardrailChecksPromptAttackCategory]; /** * @public * @enum */ declare const GuardrailChecksSensitiveInformationEntityType: { readonly ADDRESS: "ADDRESS"; readonly AGE: "AGE"; readonly AWS_ACCESS_KEY: "AWS_ACCESS_KEY"; readonly AWS_SECRET_KEY: "AWS_SECRET_KEY"; readonly CA_HEALTH_NUMBER: "CA_HEALTH_NUMBER"; readonly CA_SOCIAL_INSURANCE_NUMBER: "CA_SOCIAL_INSURANCE_NUMBER"; readonly CREDIT_DEBIT_CARD_CVV: "CREDIT_DEBIT_CARD_CVV"; readonly CREDIT_DEBIT_CARD_EXPIRY: "CREDIT_DEBIT_CARD_EXPIRY"; readonly CREDIT_DEBIT_CARD_NUMBER: "CREDIT_DEBIT_CARD_NUMBER"; readonly DRIVER_ID: "DRIVER_ID"; readonly EMAIL: "EMAIL"; readonly INTERNATIONAL_BANK_ACCOUNT_NUMBER: "INTERNATIONAL_BANK_ACCOUNT_NUMBER"; readonly IP_ADDRESS: "IP_ADDRESS"; readonly LICENSE_PLATE: "LICENSE_PLATE"; readonly MAC_ADDRESS: "MAC_ADDRESS"; readonly NAME: "NAME"; readonly PASSWORD: "PASSWORD"; readonly PHONE: "PHONE"; readonly PIN: "PIN"; readonly SWIFT_CODE: "SWIFT_CODE"; readonly UK_NATIONAL_HEALTH_SERVICE_NUMBER: "UK_NATIONAL_HEALTH_SERVICE_NUMBER"; readonly UK_NATIONAL_INSURANCE_NUMBER: "UK_NATIONAL_INSURANCE_NUMBER"; readonly UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER: "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER"; readonly URL: "URL"; readonly USERNAME: "USERNAME"; readonly US_BANK_ACCOUNT_NUMBER: "US_BANK_ACCOUNT_NUMBER"; readonly US_BANK_ROUTING_NUMBER: "US_BANK_ROUTING_NUMBER"; readonly US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER: "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER"; readonly US_PASSPORT_NUMBER: "US_PASSPORT_NUMBER"; readonly US_SOCIAL_SECURITY_NUMBER: "US_SOCIAL_SECURITY_NUMBER"; readonly VEHICLE_IDENTIFICATION_NUMBER: "VEHICLE_IDENTIFICATION_NUMBER"; }; /** * @public */ type GuardrailChecksSensitiveInformationEntityType = (typeof GuardrailChecksSensitiveInformationEntityType)[keyof typeof GuardrailChecksSensitiveInformationEntityType]; /** * @public * @enum */ declare const GuardrailChecksRole: { readonly ASSISTANT: "assistant"; readonly SYSTEM: "system"; readonly USER: "user"; }; /** * @public */ type GuardrailChecksRole = (typeof GuardrailChecksRole)[keyof typeof GuardrailChecksRole]; /** * @public * @enum */ declare const GuardrailTrace: { readonly DISABLED: "disabled"; readonly ENABLED: "enabled"; readonly ENABLED_FULL: "enabled_full"; }; /** * @public */ type GuardrailTrace = (typeof GuardrailTrace)[keyof typeof GuardrailTrace]; /** * @public * @enum */ declare const AudioFormat: { readonly AAC: "aac"; readonly FLAC: "flac"; readonly M4A: "m4a"; readonly MKA: "mka"; readonly MKV: "mkv"; readonly MP3: "mp3"; readonly MP4: "mp4"; readonly MPEG: "mpeg"; readonly MPGA: "mpga"; readonly OGG: "ogg"; readonly OPUS: "opus"; readonly PCM: "pcm"; readonly WAV: "wav"; readonly WEBM: "webm"; readonly X_AAC: "x-aac"; }; /** * @public */ type AudioFormat = (typeof AudioFormat)[keyof typeof AudioFormat]; /** * @public * @enum */ declare const CacheTTL: { readonly FIVE_MINUTES: "5m"; readonly ONE_HOUR: "1h"; }; /** * @public */ type CacheTTL = (typeof CacheTTL)[keyof typeof CacheTTL]; /** * @public * @enum */ declare const CachePointType: { readonly DEFAULT: "default"; }; /** * @public */ type CachePointType = (typeof CachePointType)[keyof typeof CachePointType]; /** * @public * @enum */ declare const DocumentFormat: { readonly CSV: "csv"; readonly DOC: "doc"; readonly DOCX: "docx"; readonly HTML: "html"; readonly MD: "md"; readonly PDF: "pdf"; readonly TXT: "txt"; readonly XLS: "xls"; readonly XLSX: "xlsx"; }; /** * @public */ type DocumentFormat = (typeof DocumentFormat)[keyof typeof DocumentFormat]; /** * @public * @enum */ declare const GuardrailConverseImageFormat: { readonly JPEG: "jpeg"; readonly PNG: "png"; }; /** * @public */ type GuardrailConverseImageFormat = (typeof GuardrailConverseImageFormat)[keyof typeof GuardrailConverseImageFormat]; /** * @public * @enum */ declare const GuardrailConverseContentQualifier: { readonly GROUNDING_SOURCE: "grounding_source"; readonly GUARD_CONTENT: "guard_content"; readonly QUERY: "query"; }; /** * @public */ type GuardrailConverseContentQualifier = (typeof GuardrailConverseContentQualifier)[keyof typeof GuardrailConverseContentQualifier]; /** * @public * @enum */ declare const ImageFormat: { readonly GIF: "gif"; readonly JPEG: "jpeg"; readonly PNG: "png"; readonly WEBP: "webp"; }; /** * @public */ type ImageFormat = (typeof ImageFormat)[keyof typeof ImageFormat]; /** * @public * @enum */ declare const VideoFormat: { readonly FLV: "flv"; readonly MKV: "mkv"; readonly MOV: "mov"; readonly MP4: "mp4"; readonly MPEG: "mpeg"; readonly MPG: "mpg"; readonly THREE_GP: "three_gp"; readonly WEBM: "webm"; readonly WMV: "wmv"; }; /** * @public */ type VideoFormat = (typeof VideoFormat)[keyof typeof VideoFormat]; /** * @public * @enum */ declare const ToolResultStatus: { readonly ERROR: "error"; readonly SUCCESS: "success"; }; /** * @public */ type ToolResultStatus = (typeof ToolResultStatus)[keyof typeof ToolResultStatus]; /** * @public * @enum */ declare const ToolUseType: { readonly SERVER_TOOL_USE: "server_tool_use"; }; /** * @public */ type ToolUseType = (typeof ToolUseType)[keyof typeof ToolUseType]; /** * @public * @enum */ declare const ConversationRole: { readonly ASSISTANT: "assistant"; readonly SYSTEM: "system"; readonly USER: "user"; }; /** * @public */ type ConversationRole = (typeof ConversationRole)[keyof typeof ConversationRole]; /** * @public * @enum */ declare const OutputFormatType: { readonly JSON_SCHEMA: "json_schema"; }; /** * @public */ type OutputFormatType = (typeof OutputFormatType)[keyof typeof OutputFormatType]; /** * @public * @enum */ declare const PerformanceConfigLatency: { readonly OPTIMIZED: "optimized"; readonly STANDARD: "standard"; }; /** * @public */ type PerformanceConfigLatency = (typeof PerformanceConfigLatency)[keyof typeof PerformanceConfigLatency]; /** * @public * @enum */ declare const ServiceTierType: { readonly DEFAULT: "default"; readonly FLEX: "flex"; readonly PRIORITY: "priority"; readonly RESERVED: "reserved"; }; /** * @public */ type ServiceTierType = (typeof ServiceTierType)[keyof typeof ServiceTierType]; /** * @public * @enum */ declare const StopReason: { readonly CONTENT_FILTERED: "content_filtered"; readonly END_TURN: "end_turn"; readonly GUARDRAIL_INTERVENED: "guardrail_intervened"; readonly MALFORMED_MODEL_OUTPUT: "malformed_model_output"; readonly MALFORMED_TOOL_USE: "malformed_tool_use"; readonly MAX_TOKENS: "max_tokens"; readonly MODEL_CONTEXT_WINDOW_EXCEEDED: "model_context_window_exceeded"; readonly STOP_SEQUENCE: "stop_sequence"; readonly TOOL_USE: "tool_use"; }; /** * @public */ type StopReason = (typeof StopReason)[keyof typeof StopReason]; /** * @public * @enum */ declare const GuardrailStreamProcessingMode: { readonly ASYNC: "async"; readonly SYNC: "sync"; }; /** * @public */ type GuardrailStreamProcessingMode = (typeof GuardrailStreamProcessingMode)[keyof typeof GuardrailStreamProcessingMode]; /** * @public * @enum */ declare const Trace: { readonly DISABLED: "DISABLED"; readonly ENABLED: "ENABLED"; readonly ENABLED_FULL: "ENABLED_FULL"; }; /** * @public */ type Trace = (typeof Trace)[keyof typeof Trace]; //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+client-bedrock-runtime@3.1111.0/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/models/BedrockRuntimeServiceException.d.ts /** * @public * * Base exception class for all service exceptions from BedrockRuntime service. */ declare class BedrockRuntimeServiceException extends ServiceException { /** * @internal */ constructor(options: ServiceExceptionOptions); } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+client-bedrock-runtime@3.1111.0/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/models/errors.d.ts /** *

The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see AccessDeniedException in the Amazon Bedrock User Guide

* @public */ declare class AccessDeniedException extends BedrockRuntimeServiceException { readonly name: "AccessDeniedException"; readonly $fault: "client"; /** * @internal */ constructor(opts: ExceptionOptionType); } /** *

An internal server error occurred. For troubleshooting this error, see InternalFailure in the Amazon Bedrock User Guide

* @public */ declare class InternalServerException extends BedrockRuntimeServiceException { readonly name: "InternalServerException"; readonly $fault: "server"; /** * @internal */ constructor(opts: ExceptionOptionType); } /** *

Your request was denied due to exceeding the account quotas for Amazon Bedrock. For troubleshooting this error, see ThrottlingException in the Amazon Bedrock User Guide

* @public */ declare class ThrottlingException extends BedrockRuntimeServiceException { readonly name: "ThrottlingException"; readonly $fault: "client"; /** * @internal */ constructor(opts: ExceptionOptionType); } /** *

The input fails to satisfy the constraints specified by Amazon Bedrock. For troubleshooting this error, see ValidationError in the Amazon Bedrock User Guide

* @public */ declare class ValidationException extends BedrockRuntimeServiceException { readonly name: "ValidationException"; readonly $fault: "client"; /** * @internal */ constructor(opts: ExceptionOptionType); } /** *

Error occurred because of a conflict while performing an operation.

* @public */ declare class ConflictException extends BedrockRuntimeServiceException { readonly name: "ConflictException"; readonly $fault: "client"; /** * @internal */ constructor(opts: ExceptionOptionType); } /** *

The specified resource ARN was not found. For troubleshooting this error, see ResourceNotFound in the Amazon Bedrock User Guide

* @public */ declare class ResourceNotFoundException extends BedrockRuntimeServiceException { readonly name: "ResourceNotFoundException"; readonly $fault: "client"; /** * @internal */ constructor(opts: ExceptionOptionType); } /** *

Your request exceeds the service quota for your account. You can view your quotas at Viewing service quotas. You can resubmit your request later.

* @public */ declare class ServiceQuotaExceededException extends BedrockRuntimeServiceException { readonly name: "ServiceQuotaExceededException"; readonly $fault: "client"; /** * @internal */ constructor(opts: ExceptionOptionType); } /** *

The service isn't currently available. For troubleshooting this error, see ServiceUnavailable in the Amazon Bedrock User Guide

* @public */ declare class ServiceUnavailableException extends BedrockRuntimeServiceException { readonly name: "ServiceUnavailableException"; readonly $fault: "server"; /** * @internal */ constructor(opts: ExceptionOptionType); } /** *

The request failed due to an error while processing the model.

* @public */ declare class ModelErrorException extends BedrockRuntimeServiceException { readonly name: "ModelErrorException"; readonly $fault: "client"; /** *

The original status code.

* @public */ originalStatusCode?: number | undefined; /** *

The resource name.

* @public */ resourceName?: string | undefined; /** * @internal */ constructor(opts: ExceptionOptionType); } /** *

The model specified in the request is not ready to serve inference requests. The AWS SDK will automatically retry the operation up to 5 times. For information about configuring automatic retries, see Retry behavior in the AWS SDKs and Tools reference guide.

* @public */ declare class ModelNotReadyException extends BedrockRuntimeServiceException { readonly name: "ModelNotReadyException"; readonly $fault: "client"; $retryable: {}; /** * @internal */ constructor(opts: ExceptionOptionType); } /** *

The request took too long to process. Processing time exceeded the model timeout length.

* @public */ declare class ModelTimeoutException extends BedrockRuntimeServiceException { readonly name: "ModelTimeoutException"; readonly $fault: "client"; /** * @internal */ constructor(opts: ExceptionOptionType); } /** *

An error occurred while streaming the response. Retry your request.

* @public */ declare class ModelStreamErrorException extends BedrockRuntimeServiceException { readonly name: "ModelStreamErrorException"; readonly $fault: "client"; /** *

The original status code.

* @public */ originalStatusCode?: number | undefined; /** *

The original message.

* @public */ originalMessage?: string | undefined; /** * @internal */ constructor(opts: ExceptionOptionType); } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+client-bedrock-runtime@3.1111.0/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/models/models_0.d.ts /** * @public */ interface GetAsyncInvokeRequest { /** *

The invocation's ARN.

* @public */ invocationArn: string | undefined; } /** *

Asynchronous invocation output data settings.

* @public */ interface AsyncInvokeS3OutputDataConfig { /** *

An object URI starting with s3://.

* @public */ s3Uri: string | undefined; /** *

A KMS encryption key ID.

* @public */ kmsKeyId?: string | undefined; /** *

If the bucket belongs to another AWS account, specify that account's ID.

* @public */ bucketOwner?: string | undefined; } /** *

Asynchronous invocation output data settings.

* @public */ type AsyncInvokeOutputDataConfig = AsyncInvokeOutputDataConfig.S3OutputDataConfigMember | AsyncInvokeOutputDataConfig.$UnknownMember; /** * @public */ declare namespace AsyncInvokeOutputDataConfig { /** *

A storage location for the output data in an S3 bucket

* @public */ interface S3OutputDataConfigMember { s3OutputDataConfig: AsyncInvokeS3OutputDataConfig; $unknown?: never; } /** * @public */ interface $UnknownMember { s3OutputDataConfig?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { s3OutputDataConfig: (value: AsyncInvokeS3OutputDataConfig) => T; _: (name: string, value: any) => T; } } /** * @public */ interface GetAsyncInvokeResponse { /** *

The invocation's ARN.

* @public */ invocationArn: string | undefined; /** *

The invocation's model ARN.

* @public */ modelArn: string | undefined; /** *

The invocation's idempotency token.

* @public */ clientRequestToken?: string | undefined; /** *

The invocation's status.

* @public */ status: AsyncInvokeStatus | undefined; /** *

An error message.

* @public */ failureMessage?: string | undefined; /** *

When the invocation request was submitted.

* @public */ submitTime: Date | undefined; /** *

The invocation's last modified time.

* @public */ lastModifiedTime?: Date | undefined; /** *

When the invocation ended.

* @public */ endTime?: Date | undefined; /** *

Output data settings.

* @public */ outputDataConfig: AsyncInvokeOutputDataConfig | undefined; } /** * @public */ interface ListAsyncInvokesRequest { /** *

Include invocations submitted after this time.

* @public */ submitTimeAfter?: Date | undefined; /** *

Include invocations submitted before this time.

* @public */ submitTimeBefore?: Date | undefined; /** *

Filter invocations by status.

* @public */ statusEquals?: AsyncInvokeStatus | undefined; /** *

The maximum number of invocations to return in one page of results.

* @public */ maxResults?: number | undefined; /** *

Specify the pagination token from a previous request to retrieve the next page of results.

* @public */ nextToken?: string | undefined; /** *

How to sort the response.

* @public */ sortBy?: SortAsyncInvocationBy | undefined; /** *

The sorting order for the response.

* @public */ sortOrder?: SortOrder | undefined; } /** *

A summary of an asynchronous invocation.

* @public */ interface AsyncInvokeSummary { /** *

The invocation's ARN.

* @public */ invocationArn: string | undefined; /** *

The invoked model's ARN.

* @public */ modelArn: string | undefined; /** *

The invocation's idempotency token.

* @public */ clientRequestToken?: string | undefined; /** *

The invocation's status.

* @public */ status?: AsyncInvokeStatus | undefined; /** *

An error message.

* @public */ failureMessage?: string | undefined; /** *

When the invocation was submitted.

* @public */ submitTime: Date | undefined; /** *

When the invocation was last modified.

* @public */ lastModifiedTime?: Date | undefined; /** *

When the invocation ended.

* @public */ endTime?: Date | undefined; /** *

The invocation's output data settings.

* @public */ outputDataConfig: AsyncInvokeOutputDataConfig | undefined; } /** * @public */ interface ListAsyncInvokesResponse { /** *

Specify the pagination token from a previous request to retrieve the next page of results.

* @public */ nextToken?: string | undefined; /** *

A list of invocation summaries.

* @public */ asyncInvokeSummaries?: AsyncInvokeSummary[] | undefined; } /** *

A tag.

* @public */ interface Tag { /** *

The tag's key.

* @public */ key: string | undefined; /** *

The tag's value.

* @public */ value: string | undefined; } /** * @public */ interface StartAsyncInvokeRequest { /** *

Specify idempotency token to ensure that requests are not duplicated.

* @public */ clientRequestToken?: string | undefined; /** *

The model to invoke.

* @public */ modelId: string | undefined; /** *

Input to send to the model.

* @public */ modelInput: DocumentType | undefined; /** *

Where to store the output.

* @public */ outputDataConfig: AsyncInvokeOutputDataConfig | undefined; /** *

Tags to apply to the invocation.

* @public */ tags?: Tag[] | undefined; } /** * @public */ interface StartAsyncInvokeResponse { /** *

The ARN of the invocation.

* @public */ invocationArn: string | undefined; } /** *

The image source (image bytes) of the guardrail image source. Object used in independent api.

* @public */ type GuardrailImageSource = GuardrailImageSource.BytesMember | GuardrailImageSource.$UnknownMember; /** * @public */ declare namespace GuardrailImageSource { /** *

The bytes details of the guardrail image source. Object used in independent api.

* @public */ interface BytesMember { bytes: Uint8Array; $unknown?: never; } /** * @public */ interface $UnknownMember { bytes?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { bytes: (value: Uint8Array) => T; _: (name: string, value: any) => T; } } /** *

Contain an image which user wants guarded. This block is accepted by the guardrails independent API.

* @public */ interface GuardrailImageBlock { /** *

The format details for the file type of the image blocked by the guardrail.

* @public */ format: GuardrailImageFormat | undefined; /** *

The image source (image bytes) details of the image blocked by the guardrail.

* @public */ source: GuardrailImageSource | undefined; } /** *

The text block to be evaluated by the guardrail.

* @public */ interface GuardrailTextBlock { /** *

The input text details to be evaluated by the guardrail.

* @public */ text: string | undefined; /** *

The qualifiers describing the text block.

* @public */ qualifiers?: GuardrailContentQualifier[] | undefined; } /** *

The content block to be evaluated by the guardrail.

* @public */ type GuardrailContentBlock = GuardrailContentBlock.ImageMember | GuardrailContentBlock.TextMember | GuardrailContentBlock.$UnknownMember; /** * @public */ declare namespace GuardrailContentBlock { /** *

Text within content block to be evaluated by the guardrail.

* @public */ interface TextMember { text: GuardrailTextBlock; image?: never; $unknown?: never; } /** *

Image within guardrail content block to be evaluated by the guardrail.

* @public */ interface ImageMember { text?: never; image: GuardrailImageBlock; $unknown?: never; } /** * @public */ interface $UnknownMember { text?: never; image?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { text: (value: GuardrailTextBlock) => T; image: (value: GuardrailImageBlock) => T; _: (name: string, value: any) => T; } } /** * @public */ interface ApplyGuardrailRequest { /** *

The guardrail identifier used in the request to apply the guardrail.

* @public */ guardrailIdentifier: string | undefined; /** *

The guardrail version used in the request to apply the guardrail.

* @public */ guardrailVersion: string | undefined; /** *

The source of data used in the request to apply the guardrail.

* @public */ source: GuardrailContentSource | undefined; /** *

The content details used in the request to apply the guardrail.

* @public */ content: GuardrailContentBlock[] | undefined; /** *

Specifies the scope of the output that you get in the response. Set to FULL to return the entire output, including any detected and non-detected entries in the response for enhanced debugging.

Note that the full output scope doesn't apply to word filters or regex in sensitive information filters. It does apply to all other filtering policies, including sensitive information with filters that can detect personally identifiable information (PII).

* @public */ outputScope?: GuardrailOutputScope | undefined; } /** *

Details about the specific guardrail that was applied during this assessment, including its identifier, version, ARN, origin, and ownership information.

* @public */ interface AppliedGuardrailDetails { /** *

The unique ID of the guardrail that was applied.

* @public */ guardrailId?: string | undefined; /** *

The version of the guardrail that was applied.

* @public */ guardrailVersion?: string | undefined; /** *

The ARN of the guardrail that was applied.

* @public */ guardrailArn?: string | undefined; /** *

The origin of how the guardrail was applied. This can be either requested at the API level or enforced at the account or organization level as a default guardrail.

* @public */ guardrailOrigin?: GuardrailOrigin[] | undefined; /** *

The ownership type of the guardrail, indicating whether it is owned by the requesting account or is a cross-account guardrail shared from another AWS account.

* @public */ guardrailOwnership?: GuardrailOwnership | undefined; } /** *

References a specific automated reasoning policy rule that was applied during evaluation.

* @public */ interface GuardrailAutomatedReasoningRule { /** *

The unique identifier of the automated reasoning rule.

* @public */ identifier?: string | undefined; /** *

The ARN of the automated reasoning policy version that contains this rule.

* @public */ policyVersionArn?: string | undefined; } /** *

A logical statement that includes both formal logic representation and natural language explanation.

* @public */ interface GuardrailAutomatedReasoningStatement { /** *

The formal logical representation of the statement.

* @public */ logic?: string | undefined; /** *

The natural language explanation of the logical statement.

* @public */ naturalLanguage?: string | undefined; } /** *

Identifies logical issues in the translated statements that exist independent of any policy rules, such as statements that are always true or always false.

* @public */ interface GuardrailAutomatedReasoningLogicWarning { /** *

The category of the detected logical issue, such as statements that are always true or always false.

* @public */ type?: GuardrailAutomatedReasoningLogicWarningType | undefined; /** *

The logical statements that serve as premises under which the claims are validated.

* @public */ premises?: GuardrailAutomatedReasoningStatement[] | undefined; /** *

The logical statements that are validated while assuming the policy and premises.

* @public */ claims?: GuardrailAutomatedReasoningStatement[] | undefined; } /** *

References a portion of the original input text that corresponds to logical elements.

* @public */ interface GuardrailAutomatedReasoningInputTextReference { /** *

The specific text from the original input that this reference points to.

* @public */ text?: string | undefined; } /** *

Contains the logical translation of natural language input into formal logical statements, including premises, claims, and confidence scores.

* @public */ interface GuardrailAutomatedReasoningTranslation { /** *

The logical statements that serve as the foundation or assumptions for the claims.

* @public */ premises?: GuardrailAutomatedReasoningStatement[] | undefined; /** *

The logical statements that are being validated against the premises and policy rules.

* @public */ claims?: GuardrailAutomatedReasoningStatement[] | undefined; /** *

References to portions of the original input text that correspond to the premises but could not be fully translated.

* @public */ untranslatedPremises?: GuardrailAutomatedReasoningInputTextReference[] | undefined; /** *

References to portions of the original input text that correspond to the claims but could not be fully translated.

* @public */ untranslatedClaims?: GuardrailAutomatedReasoningInputTextReference[] | undefined; /** *

A confidence score between 0 and 1 indicating how certain the system is about the logical translation.

* @public */ confidence?: number | undefined; } /** *

Indicates that no valid claims can be made due to logical contradictions in the premises or rules.

* @public */ interface GuardrailAutomatedReasoningImpossibleFinding { /** *

The logical translation of the input that this finding evaluates.

* @public */ translation?: GuardrailAutomatedReasoningTranslation | undefined; /** *

The automated reasoning policy rules that contradict the claims and/or premises in the input.

* @public */ contradictingRules?: GuardrailAutomatedReasoningRule[] | undefined; /** *

Indication of a logic issue with the translation without needing to consider the automated reasoning policy rules.

* @public */ logicWarning?: GuardrailAutomatedReasoningLogicWarning | undefined; } /** *

Indicates that the claims are logically false and contradictory to the established rules or premises.

* @public */ interface GuardrailAutomatedReasoningInvalidFinding { /** *

The logical translation of the input that this finding invalidates.

* @public */ translation?: GuardrailAutomatedReasoningTranslation | undefined; /** *

The automated reasoning policy rules that contradict the claims in the input.

* @public */ contradictingRules?: GuardrailAutomatedReasoningRule[] | undefined; /** *

Indication of a logic issue with the translation without needing to consider the automated reasoning policy rules.

* @public */ logicWarning?: GuardrailAutomatedReasoningLogicWarning | undefined; } /** *

Indicates that no relevant logical information could be extracted from the input for validation.

* @public */ interface GuardrailAutomatedReasoningNoTranslationsFinding {} /** *

Represents a logical scenario where claims can be evaluated as true or false, containing specific logical assignments.

* @public */ interface GuardrailAutomatedReasoningScenario { /** *

List of logical assignments and statements that define this scenario.

* @public */ statements?: GuardrailAutomatedReasoningStatement[] | undefined; } /** *

Indicates that the claims could be either true or false depending on additional assumptions not provided in the input.

* @public */ interface GuardrailAutomatedReasoningSatisfiableFinding { /** *

The logical translation of the input that this finding evaluates.

* @public */ translation?: GuardrailAutomatedReasoningTranslation | undefined; /** *

An example scenario demonstrating how the claims could be logically true.

* @public */ claimsTrueScenario?: GuardrailAutomatedReasoningScenario | undefined; /** *

An example scenario demonstrating how the claims could be logically false.

* @public */ claimsFalseScenario?: GuardrailAutomatedReasoningScenario | undefined; /** *

Indication of a logic issue with the translation without needing to consider the automated reasoning policy rules.

* @public */ logicWarning?: GuardrailAutomatedReasoningLogicWarning | undefined; } /** *

Indicates that the input exceeds the processing capacity due to the volume or complexity of the logical information.

* @public */ interface GuardrailAutomatedReasoningTooComplexFinding {} /** *

Represents one possible logical interpretation of ambiguous input content.

* @public */ interface GuardrailAutomatedReasoningTranslationOption { /** *

Example translations that provide this possible interpretation of the input.

* @public */ translations?: GuardrailAutomatedReasoningTranslation[] | undefined; } /** *

Indicates that the input has multiple valid logical interpretations, requiring additional context or clarification.

* @public */ interface GuardrailAutomatedReasoningTranslationAmbiguousFinding { /** *

Different logical interpretations that were detected during translation of the input.

* @public */ options?: GuardrailAutomatedReasoningTranslationOption[] | undefined; /** *

Scenarios showing how the different translation options differ in meaning.

* @public */ differenceScenarios?: GuardrailAutomatedReasoningScenario[] | undefined; } /** *

Indicates that the claims are definitively true and logically implied by the premises, with no possible alternative interpretations.

* @public */ interface GuardrailAutomatedReasoningValidFinding { /** *

The logical translation of the input that this finding validates.

* @public */ translation?: GuardrailAutomatedReasoningTranslation | undefined; /** *

An example scenario demonstrating how the claims are logically true.

* @public */ claimsTrueScenario?: GuardrailAutomatedReasoningScenario | undefined; /** *

The automated reasoning policy rules that support why this result is considered valid.

* @public */ supportingRules?: GuardrailAutomatedReasoningRule[] | undefined; /** *

Indication of a logic issue with the translation without needing to consider the automated reasoning policy rules.

* @public */ logicWarning?: GuardrailAutomatedReasoningLogicWarning | undefined; } /** *

Represents a logical validation result from automated reasoning policy evaluation. The finding indicates whether claims in the input are logically valid, invalid, satisfiable, impossible, or have other logical issues.

* @public */ type GuardrailAutomatedReasoningFinding = GuardrailAutomatedReasoningFinding.ImpossibleMember | GuardrailAutomatedReasoningFinding.InvalidMember | GuardrailAutomatedReasoningFinding.NoTranslationsMember | GuardrailAutomatedReasoningFinding.SatisfiableMember | GuardrailAutomatedReasoningFinding.TooComplexMember | GuardrailAutomatedReasoningFinding.TranslationAmbiguousMember | GuardrailAutomatedReasoningFinding.ValidMember | GuardrailAutomatedReasoningFinding.$UnknownMember; /** * @public */ declare namespace GuardrailAutomatedReasoningFinding { /** *

Contains the result when the automated reasoning evaluation determines that the claims in the input are logically valid and definitively true based on the provided premises and policy rules.

* @public */ interface ValidMember { valid: GuardrailAutomatedReasoningValidFinding; invalid?: never; satisfiable?: never; impossible?: never; translationAmbiguous?: never; tooComplex?: never; noTranslations?: never; $unknown?: never; } /** *

Contains the result when the automated reasoning evaluation determines that the claims in the input are logically invalid and contradict the established premises or policy rules.

* @public */ interface InvalidMember { valid?: never; invalid: GuardrailAutomatedReasoningInvalidFinding; satisfiable?: never; impossible?: never; translationAmbiguous?: never; tooComplex?: never; noTranslations?: never; $unknown?: never; } /** *

Contains the result when the automated reasoning evaluation determines that the claims in the input could be either true or false depending on additional assumptions not provided in the input context.

* @public */ interface SatisfiableMember { valid?: never; invalid?: never; satisfiable: GuardrailAutomatedReasoningSatisfiableFinding; impossible?: never; translationAmbiguous?: never; tooComplex?: never; noTranslations?: never; $unknown?: never; } /** *

Contains the result when the automated reasoning evaluation determines that no valid logical conclusions can be drawn due to contradictions in the premises or policy rules themselves.

* @public */ interface ImpossibleMember { valid?: never; invalid?: never; satisfiable?: never; impossible: GuardrailAutomatedReasoningImpossibleFinding; translationAmbiguous?: never; tooComplex?: never; noTranslations?: never; $unknown?: never; } /** *

Contains the result when the automated reasoning evaluation detects that the input has multiple valid logical interpretations, requiring additional context or clarification to proceed with validation.

* @public */ interface TranslationAmbiguousMember { valid?: never; invalid?: never; satisfiable?: never; impossible?: never; translationAmbiguous: GuardrailAutomatedReasoningTranslationAmbiguousFinding; tooComplex?: never; noTranslations?: never; $unknown?: never; } /** *

Contains the result when the automated reasoning evaluation cannot process the input due to its complexity or volume exceeding the system's processing capacity for logical analysis.

* @public */ interface TooComplexMember { valid?: never; invalid?: never; satisfiable?: never; impossible?: never; translationAmbiguous?: never; tooComplex: GuardrailAutomatedReasoningTooComplexFinding; noTranslations?: never; $unknown?: never; } /** *

Contains the result when the automated reasoning evaluation cannot extract any relevant logical information from the input that can be validated against the policy rules.

* @public */ interface NoTranslationsMember { valid?: never; invalid?: never; satisfiable?: never; impossible?: never; translationAmbiguous?: never; tooComplex?: never; noTranslations: GuardrailAutomatedReasoningNoTranslationsFinding; $unknown?: never; } /** * @public */ interface $UnknownMember { valid?: never; invalid?: never; satisfiable?: never; impossible?: never; translationAmbiguous?: never; tooComplex?: never; noTranslations?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { valid: (value: GuardrailAutomatedReasoningValidFinding) => T; invalid: (value: GuardrailAutomatedReasoningInvalidFinding) => T; satisfiable: (value: GuardrailAutomatedReasoningSatisfiableFinding) => T; impossible: (value: GuardrailAutomatedReasoningImpossibleFinding) => T; translationAmbiguous: (value: GuardrailAutomatedReasoningTranslationAmbiguousFinding) => T; tooComplex: (value: GuardrailAutomatedReasoningTooComplexFinding) => T; noTranslations: (value: GuardrailAutomatedReasoningNoTranslationsFinding) => T; _: (name: string, value: any) => T; } } /** *

Contains the results of automated reasoning policy evaluation, including logical findings about the validity of claims made in the input content.

* @public */ interface GuardrailAutomatedReasoningPolicyAssessment { /** *

List of logical validation results produced by evaluating the input content against automated reasoning policies.

* @public */ findings?: GuardrailAutomatedReasoningFinding[] | undefined; } /** *

The content filter for a guardrail.

* @public */ interface GuardrailContentFilter { /** *

The guardrail type.

* @public */ type: GuardrailContentFilterType | undefined; /** *

The guardrail confidence.

* @public */ confidence: GuardrailContentFilterConfidence | undefined; /** *

The filter strength setting for the guardrail content filter.

* @public */ filterStrength?: GuardrailContentFilterStrength | undefined; /** *

The guardrail action.

* @public */ action: GuardrailContentPolicyAction | undefined; /** *

Indicates whether content that breaches the guardrail configuration is detected.

* @public */ detected?: boolean | undefined; } /** *

An assessment of a content policy for a guardrail.

* @public */ interface GuardrailContentPolicyAssessment { /** *

The content policy filters.

* @public */ filters: GuardrailContentFilter[] | undefined; } /** *

The details for the guardrails contextual grounding filter.

* @public */ interface GuardrailContextualGroundingFilter { /** *

The contextual grounding filter type.

* @public */ type: GuardrailContextualGroundingFilterType | undefined; /** *

The threshold used by contextual grounding filter to determine whether the content is grounded or not.

* @public */ threshold: number | undefined; /** *

The score generated by contextual grounding filter.

* @public */ score: number | undefined; /** *

The action performed by the guardrails contextual grounding filter.

* @public */ action: GuardrailContextualGroundingPolicyAction | undefined; /** *

Indicates whether content that fails the contextual grounding evaluation (grounding or relevance score less than the corresponding threshold) was detected.

* @public */ detected?: boolean | undefined; } /** *

The policy assessment details for the guardrails contextual grounding filter.

* @public */ interface GuardrailContextualGroundingPolicyAssessment { /** *

The filter details for the guardrails contextual grounding filter.

* @public */ filters?: GuardrailContextualGroundingFilter[] | undefined; } /** *

The details of the guardrail image coverage.

* @public */ interface GuardrailImageCoverage { /** *

The count (integer) of images guardrails guarded.

* @public */ guarded?: number | undefined; /** *

Represents the total number of images (integer) that were in the request (guarded and unguarded).

* @public */ total?: number | undefined; } /** *

The guardrail coverage for the text characters.

* @public */ interface GuardrailTextCharactersCoverage { /** *

The text characters that were guarded by the guardrail coverage.

* @public */ guarded?: number | undefined; /** *

The total text characters by the guardrail coverage.

* @public */ total?: number | undefined; } /** *

The action of the guardrail coverage details.

* @public */ interface GuardrailCoverage { /** *

The text characters of the guardrail coverage details.

* @public */ textCharacters?: GuardrailTextCharactersCoverage | undefined; /** *

The guardrail coverage for images (the number of images that guardrails guarded).

* @public */ images?: GuardrailImageCoverage | undefined; } /** *

The details on the use of the guardrail.

* @public */ interface GuardrailUsage { /** *

The topic policy units processed by the guardrail.

* @public */ topicPolicyUnits: number | undefined; /** *

The content policy units processed by the guardrail.

* @public */ contentPolicyUnits: number | undefined; /** *

The word policy units processed by the guardrail.

* @public */ wordPolicyUnits: number | undefined; /** *

The sensitive information policy units processed by the guardrail.

* @public */ sensitiveInformationPolicyUnits: number | undefined; /** *

The sensitive information policy free units processed by the guardrail.

* @public */ sensitiveInformationPolicyFreeUnits: number | undefined; /** *

The contextual grounding policy units processed by the guardrail.

* @public */ contextualGroundingPolicyUnits: number | undefined; /** *

The content policy image units processed by the guardrail.

* @public */ contentPolicyImageUnits?: number | undefined; /** *

The number of text units processed by the automated reasoning policy.

* @public */ automatedReasoningPolicyUnits?: number | undefined; /** *

The number of automated reasoning policies that were processed during the guardrail evaluation.

* @public */ automatedReasoningPolicies?: number | undefined; } /** *

The invocation metrics for the guardrail.

* @public */ interface GuardrailInvocationMetrics { /** *

The processing latency details for the guardrail invocation metrics.

* @public */ guardrailProcessingLatency?: number | undefined; /** *

The usage details for the guardrail invocation metrics.

* @public */ usage?: GuardrailUsage | undefined; /** *

The coverage details for the guardrail invocation metrics.

* @public */ guardrailCoverage?: GuardrailCoverage | undefined; } /** *

A Personally Identifiable Information (PII) entity configured in a guardrail.

* @public */ interface GuardrailPiiEntityFilter { /** *

The PII entity filter match.

* @public */ match: string | undefined; /** *

The PII entity filter type.

* @public */ type: GuardrailPiiEntityType | undefined; /** *

The PII entity filter action.

* @public */ action: GuardrailSensitiveInformationPolicyAction | undefined; /** *

Indicates whether personally identifiable information (PII) that breaches the guardrail configuration is detected.

* @public */ detected?: boolean | undefined; } /** *

A Regex filter configured in a guardrail.

* @public */ interface GuardrailRegexFilter { /** *

The regex filter name.

* @public */ name?: string | undefined; /** *

The regesx filter match.

* @public */ match?: string | undefined; /** *

The regex query.

* @public */ regex?: string | undefined; /** *

The region filter action.

* @public */ action: GuardrailSensitiveInformationPolicyAction | undefined; /** *

Indicates whether custom regex entities that breach the guardrail configuration are detected.

* @public */ detected?: boolean | undefined; } /** *

The assessment for a Personally Identifiable Information (PII) policy.

* @public */ interface GuardrailSensitiveInformationPolicyAssessment { /** *

The PII entities in the assessment.

* @public */ piiEntities: GuardrailPiiEntityFilter[] | undefined; /** *

The regex queries in the assessment.

* @public */ regexes: GuardrailRegexFilter[] | undefined; } /** *

Information about a topic guardrail.

* @public */ interface GuardrailTopic { /** *

The name for the guardrail.

* @public */ name: string | undefined; /** *

The type behavior that the guardrail should perform when the model detects the topic.

* @public */ type: GuardrailTopicType | undefined; /** *

The action the guardrail should take when it intervenes on a topic.

* @public */ action: GuardrailTopicPolicyAction | undefined; /** *

Indicates whether topic content that breaches the guardrail configuration is detected.

* @public */ detected?: boolean | undefined; } /** *

A behavior assessment of a topic policy.

* @public */ interface GuardrailTopicPolicyAssessment { /** *

The topics in the assessment.

* @public */ topics: GuardrailTopic[] | undefined; } /** *

A custom word configured in a guardrail.

* @public */ interface GuardrailCustomWord { /** *

The match for the custom word.

* @public */ match: string | undefined; /** *

The action for the custom word.

* @public */ action: GuardrailWordPolicyAction | undefined; /** *

Indicates whether custom word content that breaches the guardrail configuration is detected.

* @public */ detected?: boolean | undefined; } /** *

A managed word configured in a guardrail.

* @public */ interface GuardrailManagedWord { /** *

The match for the managed word.

* @public */ match: string | undefined; /** *

The type for the managed word.

* @public */ type: GuardrailManagedWordType | undefined; /** *

The action for the managed word.

* @public */ action: GuardrailWordPolicyAction | undefined; /** *

Indicates whether managed word content that breaches the guardrail configuration is detected.

* @public */ detected?: boolean | undefined; } /** *

The word policy assessment.

* @public */ interface GuardrailWordPolicyAssessment { /** *

Custom words in the assessment.

* @public */ customWords: GuardrailCustomWord[] | undefined; /** *

Managed word lists in the assessment.

* @public */ managedWordLists: GuardrailManagedWord[] | undefined; } /** *

A behavior assessment of the guardrail policies used in a call to the Converse API.

* @public */ interface GuardrailAssessment { /** *

The topic policy.

* @public */ topicPolicy?: GuardrailTopicPolicyAssessment | undefined; /** *

The content policy.

* @public */ contentPolicy?: GuardrailContentPolicyAssessment | undefined; /** *

The word policy.

* @public */ wordPolicy?: GuardrailWordPolicyAssessment | undefined; /** *

The sensitive information policy.

* @public */ sensitiveInformationPolicy?: GuardrailSensitiveInformationPolicyAssessment | undefined; /** *

The contextual grounding policy used for the guardrail assessment.

* @public */ contextualGroundingPolicy?: GuardrailContextualGroundingPolicyAssessment | undefined; /** *

The automated reasoning policy assessment results, including logical validation findings for the input content.

* @public */ automatedReasoningPolicy?: GuardrailAutomatedReasoningPolicyAssessment | undefined; /** *

The invocation metrics for the guardrail assessment.

* @public */ invocationMetrics?: GuardrailInvocationMetrics | undefined; /** *

Details about the specific guardrail that was applied during this assessment, including its identifier, version, ARN, origin, and ownership information.

* @public */ appliedGuardrailDetails?: AppliedGuardrailDetails | undefined; } /** *

The output content produced by the guardrail.

* @public */ interface GuardrailOutputContent { /** *

The specific text for the output content produced by the guardrail.

* @public */ text?: string | undefined; } /** * @public */ interface ApplyGuardrailResponse { /** *

The usage details in the response from the guardrail.

* @public */ usage: GuardrailUsage | undefined; /** *

The action taken in the response from the guardrail.

* @public */ action: GuardrailAction | undefined; /** *

The reason for the action taken when harmful content is detected.

* @public */ actionReason?: string | undefined; /** *

The output details in the response from the guardrail.

* @public */ outputs: GuardrailOutputContent[] | undefined; /** *

The assessment details in the response from the guardrail.

* @public */ assessments: GuardrailAssessment[] | undefined; /** *

The guardrail coverage details in the apply guardrail response.

* @public */ guardrailCoverage?: GuardrailCoverage | undefined; } /** *

The configuration for a single content filter category to evaluate.

* @public */ interface GuardrailChecksContentFilterCategoryConfig { /** *

The content filter category to evaluate.

* @public */ category: GuardrailChecksContentFilterCategory | undefined; } /** *

The configuration for the content filter check, specifying which categories to evaluate.

* @public */ interface GuardrailChecksContentFilterConfig { /** *

The content filter categories to evaluate.

* @public */ categories: GuardrailChecksContentFilterCategoryConfig[] | undefined; } /** *

The configuration for a single prompt attack category to evaluate.

* @public */ interface GuardrailChecksPromptAttackCategoryConfig { /** *

The prompt attack category to evaluate.

* @public */ category: GuardrailChecksPromptAttackCategory | undefined; } /** *

The configuration for the prompt attack check, specifying which categories to evaluate.

* @public */ interface GuardrailChecksPromptAttackConfig { /** *

The prompt attack categories to evaluate.

* @public */ categories: GuardrailChecksPromptAttackCategoryConfig[] | undefined; } /** *

The configuration for a single sensitive information entity type to detect.

* @public */ interface GuardrailChecksSensitiveInformationEntityConfig { /** *

The PII entity type to detect.

* @public */ type: GuardrailChecksSensitiveInformationEntityType | undefined; } /** *

The configuration for the sensitive information check, specifying which entity types to detect.

* @public */ interface GuardrailChecksSensitiveInformationConfig { /** *

The sensitive information entity types to detect.

* @public */ entities: GuardrailChecksSensitiveInformationEntityConfig[] | undefined; } /** *

The configuration for inline guardrail checks. Specify one or more check types to run against the messages.

* @public */ interface GuardrailChecksConfig { /** *

The content filter check configuration.

* @public */ contentFilter?: GuardrailChecksContentFilterConfig | undefined; /** *

The prompt attack check configuration.

* @public */ promptAttack?: GuardrailChecksPromptAttackConfig | undefined; /** *

The sensitive information check configuration.

* @public */ sensitiveInformation?: GuardrailChecksSensitiveInformationConfig | undefined; } /** *

A content block within a message to evaluate.

* @public */ type GuardrailChecksContentBlock = GuardrailChecksContentBlock.TextMember | GuardrailChecksContentBlock.$UnknownMember; /** * @public */ declare namespace GuardrailChecksContentBlock { /** *

The text content to evaluate.

* @public */ interface TextMember { text: string; $unknown?: never; } /** * @public */ interface $UnknownMember { text?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { text: (value: string) => T; _: (name: string, value: any) => T; } } /** *

A message to evaluate against guardrail checks, containing a role and content blocks.

* @public */ interface GuardrailChecksMessage { /** *

The role of the message sender.

* @public */ role: GuardrailChecksRole | undefined; /** *

The content blocks for the message.

* @public */ content: GuardrailChecksContentBlock[] | undefined; } /** * @public */ interface InvokeGuardrailChecksRequest { /** *

The messages to evaluate against the specified guardrail checks. Each message includes a role and one or more content blocks.

* @public */ messages: GuardrailChecksMessage[] | undefined; /** *

The inline check configurations that specify which guardrail checks to run against the messages.

* @public */ checks: GuardrailChecksConfig | undefined; } /** *

The evaluation result for a single content filter category.

* @public */ interface GuardrailChecksContentFilterResultEntry { /** *

The content filter category that was evaluated.

* @public */ category: GuardrailChecksContentFilterCategory | undefined; /** *

The severity score for the category, ranging from 0.0 to 1.0. Higher values indicate greater severity.

* @public */ severityScore: number | undefined; } /** *

The content filter check results.

* @public */ interface GuardrailChecksContentFilterResult { /** *

The per-category content filter results.

* @public */ results: GuardrailChecksContentFilterResultEntry[] | undefined; } /** *

The evaluation result for a single prompt attack category.

* @public */ interface GuardrailChecksPromptAttackResultEntry { /** *

The prompt attack category that was evaluated.

* @public */ category: GuardrailChecksPromptAttackCategory | undefined; /** *

The severity score for the category, ranging from 0.0 to 1.0. Higher values indicate greater severity.

* @public */ severityScore: number | undefined; } /** *

The prompt attack check results.

* @public */ interface GuardrailChecksPromptAttackResult { /** *

The per-category prompt attack results.

* @public */ results: GuardrailChecksPromptAttackResultEntry[] | undefined; } /** *

The detection result for a single sensitive information entity found in the evaluated messages.

* @public */ interface GuardrailChecksSensitiveInformationResultEntry { /** *

The PII entity type that was detected.

* @public */ type: GuardrailChecksSensitiveInformationEntityType | undefined; /** *

The confidence score for the detection, ranging from 0.0 to 1.0. Higher values indicate greater confidence.

* @public */ confidenceScore: number | undefined; /** *

The start character offset of the detected entity within the content block.

* @public */ beginOffset: number | undefined; /** *

The end character offset of the detected entity within the content block.

* @public */ endOffset: number | undefined; /** *

The zero-based index of the message in the input messages array where the entity was detected.

* @public */ messageIndex: number | undefined; /** *

The zero-based index of the content block within the message where the entity was detected.

* @public */ contentIndex: number | undefined; } /** *

The sensitive information check results.

* @public */ interface GuardrailChecksSensitiveInformationResult { /** *

The detected sensitive information entities.

* @public */ results: GuardrailChecksSensitiveInformationResultEntry[] | undefined; /** *

Specifies whether the results were truncated because the number of detected entities exceeded the maximum limit.

* @public */ truncated?: boolean | undefined; } /** *

The results from the guardrail checks evaluation, organized by check type.

* @public */ interface GuardrailChecksResults { /** *

The content filter check results.

* @public */ contentFilter?: GuardrailChecksContentFilterResult | undefined; /** *

The prompt attack check results.

* @public */ promptAttack?: GuardrailChecksPromptAttackResult | undefined; /** *

The sensitive information check results.

* @public */ sensitiveInformation?: GuardrailChecksSensitiveInformationResult | undefined; } /** *

The text unit usage for the content filter check.

* @public */ interface GuardrailChecksContentFilterUsage { /** *

The number of text units consumed by the content filter check.

* @public */ textUnits: number | undefined; } /** *

The text unit usage for the prompt attack check.

* @public */ interface GuardrailChecksPromptAttackUsage { /** *

The number of text units consumed by the prompt attack check.

* @public */ textUnits: number | undefined; } /** *

The text unit usage for the sensitive information check.

* @public */ interface GuardrailChecksSensitiveInformationUsage { /** *

The number of text units consumed by the sensitive information check.

* @public */ textUnits: number | undefined; } /** *

The text unit usage for the guardrail checks evaluation, organized by check type.

* @public */ interface GuardrailChecksUsageResults { /** *

The text unit usage for the content filter check.

* @public */ contentFilter?: GuardrailChecksContentFilterUsage | undefined; /** *

The text unit usage for the prompt attack check.

* @public */ promptAttack?: GuardrailChecksPromptAttackUsage | undefined; /** *

The text unit usage for the sensitive information check.

* @public */ sensitiveInformation?: GuardrailChecksSensitiveInformationUsage | undefined; } /** * @public */ interface InvokeGuardrailChecksResponse { /** *

The per-check results containing findings from the guardrail evaluation.

* @public */ results: GuardrailChecksResults | undefined; /** *

The per-check text unit consumption for the guardrail evaluation.

* @public */ usage: GuardrailChecksUsageResults | undefined; } /** *

Configuration information for a guardrail that you use with the Converse operation.

* @public */ interface GuardrailConfiguration { /** *

The identifier for the guardrail.

* @public */ guardrailIdentifier?: string | undefined; /** *

The version of the guardrail.

* @public */ guardrailVersion?: string | undefined; /** *

The trace behavior for the guardrail.

* @public */ trace?: GuardrailTrace | undefined; } /** *

Base inference parameters to pass to a model in a call to Converse or ConverseStream. For more information, see Inference parameters for foundation models.

If you need to pass additional parameters that the model supports, use the additionalModelRequestFields request field in the call to Converse or ConverseStream. For more information, see Model parameters.

* @public */ interface InferenceConfiguration { /** *

The maximum number of tokens to allow in the generated response. The default value is the maximum allowed value for the model that you are using. For more information, see Inference parameters for foundation models.

* @public */ maxTokens?: number | undefined; /** *

The likelihood of the model selecting higher-probability options while generating a response. A lower value makes the model more likely to choose higher-probability options, while a higher value makes the model more likely to choose lower-probability options.

The default value is the default value for the model that you are using. For more information, see Inference parameters for foundation models.

* @public */ temperature?: number | undefined; /** *

The percentage of most-likely candidates that the model considers for the next token. For example, if you choose a value of 0.8 for topP, the model selects from the top 80% of the probability distribution of tokens that could be next in the sequence.

The default value is the default value for the model that you are using. For more information, see Inference parameters for foundation models.

* @public */ topP?: number | undefined; /** *

A list of stop sequences. A stop sequence is a sequence of characters that causes the model to stop generating the response.

* @public */ stopSequences?: string[] | undefined; } /** *

A block containing error information when content processing fails.

* @public */ interface ErrorBlock { /** *

A human-readable error message describing what went wrong during content processing.

* @public */ message?: string | undefined; } /** *

A storage location in an Amazon S3 bucket.

* @public */ interface S3Location { /** *

An object URI starting with s3://.

* @public */ uri: string | undefined; /** *

If the bucket belongs to another AWS account, specify that account's ID.

* @public */ bucketOwner?: string | undefined; } /** *

The source of audio data, which can be provided either as raw bytes or a reference to an S3 location.

* @public */ type AudioSource = AudioSource.BytesMember | AudioSource.S3LocationMember | AudioSource.$UnknownMember; /** * @public */ declare namespace AudioSource { /** *

Audio data encoded in base64.

* @public */ interface BytesMember { bytes: Uint8Array; s3Location?: never; $unknown?: never; } /** *

A reference to audio data stored in an Amazon S3 bucket. To see which models support S3 uploads, see Supported models and features for Converse.

* @public */ interface S3LocationMember { bytes?: never; s3Location: S3Location; $unknown?: never; } /** * @public */ interface $UnknownMember { bytes?: never; s3Location?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { bytes: (value: Uint8Array) => T; s3Location: (value: S3Location) => T; _: (name: string, value: any) => T; } } /** *

An audio content block that contains audio data in various supported formats.

* @public */ interface AudioBlock { /** *

The format of the audio data, such as MP3, WAV, FLAC, or other supported audio formats.

* @public */ format: AudioFormat | undefined; /** *

The source of the audio data, which can be provided as raw bytes or an S3 location.

* @public */ source: AudioSource | undefined; /** *

Error information if the audio block could not be processed or contains invalid data.

* @public */ error?: ErrorBlock | undefined; } /** *

Defines a section of content to be cached for reuse in subsequent API calls.

* @public */ interface CachePointBlock { /** *

Specifies the type of cache point within the CachePointBlock.

* @public */ type: CachePointType | undefined; /** *

Optional TTL duration for cache entries. When specified, enables extended TTL caching with the specified duration. When omitted, uses type value for caching behavior.

* @public */ ttl?: CacheTTL | undefined; } /** *

Specifies a character-level location within a document, providing precise positioning information for cited content using start and end character indices.

* @public */ interface DocumentCharLocation { /** *

The index of the document within the array of documents provided in the request.

* @public */ documentIndex?: number | undefined; /** *

The starting character position of the cited content within the document.

* @public */ start?: number | undefined; /** *

The ending character position of the cited content within the document.

* @public */ end?: number | undefined; } /** *

Specifies a chunk-level location within a document, providing positioning information for cited content using logical document segments or chunks.

* @public */ interface DocumentChunkLocation { /** *

The index of the document within the array of documents provided in the request.

* @public */ documentIndex?: number | undefined; /** *

The starting chunk identifier or index of the cited content within the document.

* @public */ start?: number | undefined; /** *

The ending chunk identifier or index of the cited content within the document.

* @public */ end?: number | undefined; } /** *

Specifies a page-level location within a document, providing positioning information for cited content using page numbers.

* @public */ interface DocumentPageLocation { /** *

The index of the document within the array of documents provided in the request.

* @public */ documentIndex?: number | undefined; /** *

The starting page number of the cited content within the document.

* @public */ start?: number | undefined; /** *

The ending page number of the cited content within the document.

* @public */ end?: number | undefined; } /** *

Specifies a search result location within the content array, providing positioning information for cited content using search result index and block positions.

* @public */ interface SearchResultLocation { /** *

The index of the search result content block where the cited content is found.

* @public */ searchResultIndex?: number | undefined; /** *

The starting position in the content array where the cited content begins.

* @public */ start?: number | undefined; /** *

The ending position in the content array where the cited content ends.

* @public */ end?: number | undefined; } /** *

Provides the URL and domain information for the website that was cited when performing a web search.

* @public */ interface WebLocation { /** *

The URL that was cited when performing a web search.

* @public */ url?: string | undefined; /** *

The domain that was cited when performing a web search.

* @public */ domain?: string | undefined; } /** *

Specifies the precise location within a source document where cited content can be found. This can include character-level positions, page numbers, or document chunks depending on the document type and indexing method.

* @public */ type CitationLocation = CitationLocation.DocumentCharMember | CitationLocation.DocumentChunkMember | CitationLocation.DocumentPageMember | CitationLocation.SearchResultLocationMember | CitationLocation.WebMember | CitationLocation.$UnknownMember; /** * @public */ declare namespace CitationLocation { /** *

The web URL that was cited for this reference.

* @public */ interface WebMember { web: WebLocation; documentChar?: never; documentPage?: never; documentChunk?: never; searchResultLocation?: never; $unknown?: never; } /** *

The character-level location within the document where the cited content is found.

* @public */ interface DocumentCharMember { web?: never; documentChar: DocumentCharLocation; documentPage?: never; documentChunk?: never; searchResultLocation?: never; $unknown?: never; } /** *

The page-level location within the document where the cited content is found.

* @public */ interface DocumentPageMember { web?: never; documentChar?: never; documentPage: DocumentPageLocation; documentChunk?: never; searchResultLocation?: never; $unknown?: never; } /** *

The chunk-level location within the document where the cited content is found, typically used for documents that have been segmented into logical chunks.

* @public */ interface DocumentChunkMember { web?: never; documentChar?: never; documentPage?: never; documentChunk: DocumentChunkLocation; searchResultLocation?: never; $unknown?: never; } /** *

The search result location where the cited content is found, including the search result index and block positions within the content array.

* @public */ interface SearchResultLocationMember { web?: never; documentChar?: never; documentPage?: never; documentChunk?: never; searchResultLocation: SearchResultLocation; $unknown?: never; } /** * @public */ interface $UnknownMember { web?: never; documentChar?: never; documentPage?: never; documentChunk?: never; searchResultLocation?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { web: (value: WebLocation) => T; documentChar: (value: DocumentCharLocation) => T; documentPage: (value: DocumentPageLocation) => T; documentChunk: (value: DocumentChunkLocation) => T; searchResultLocation: (value: SearchResultLocation) => T; _: (name: string, value: any) => T; } } /** *

Contains the actual text content from a source document that is being cited or referenced in the model's response.

* @public */ type CitationSourceContent = CitationSourceContent.TextMember | CitationSourceContent.$UnknownMember; /** * @public */ declare namespace CitationSourceContent { /** *

The text content from the source document that is being cited.

* @public */ interface TextMember { text: string; $unknown?: never; } /** * @public */ interface $UnknownMember { text?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { text: (value: string) => T; _: (name: string, value: any) => T; } } /** *

Contains information about a citation that references a specific source document. Citations provide traceability between the model's generated response and the source documents that informed that response.

* @public */ interface Citation { /** *

The title or identifier of the source document being cited.

* @public */ title?: string | undefined; /** *

The source from the original search result that provided the cited content.

* @public */ source?: string | undefined; /** *

The specific content from the source document that was referenced or cited in the generated response.

* @public */ sourceContent?: CitationSourceContent[] | undefined; /** *

The precise location within the source document where the cited content can be found, including character positions, page numbers, or chunk identifiers.

* @public */ location?: CitationLocation | undefined; } /** *

Contains the generated text content that corresponds to or is supported by a citation from a source document.

* @public */ type CitationGeneratedContent = CitationGeneratedContent.TextMember | CitationGeneratedContent.$UnknownMember; /** * @public */ declare namespace CitationGeneratedContent { /** *

The text content that was generated by the model and is supported by the associated citation.

* @public */ interface TextMember { text: string; $unknown?: never; } /** * @public */ interface $UnknownMember { text?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { text: (value: string) => T; _: (name: string, value: any) => T; } } /** *

A content block that contains both generated text and associated citation information. This block type is returned when document citations are enabled, providing traceability between the generated content and the source documents that informed the response.

* @public */ interface CitationsContentBlock { /** *

The generated content that is supported by the associated citations.

* @public */ content?: CitationGeneratedContent[] | undefined; /** *

An array of citations that reference the source documents used to generate the associated content.

* @public */ citations?: Citation[] | undefined; } /** *

Configuration settings for enabling and controlling document citations in Converse API responses. When enabled, the model can include citation information that links generated content back to specific source documents.

* @public */ interface CitationsConfig { /** *

Specifies whether citations from the selected document should be used in the model's response. When set to true, the model can generate citations that reference the source documents used to inform the response.

* @public */ enabled: boolean | undefined; } /** *

Contains the actual content of a document that can be processed by the model and potentially cited in the response.

* @public */ type DocumentContentBlock = DocumentContentBlock.TextMember | DocumentContentBlock.$UnknownMember; /** * @public */ declare namespace DocumentContentBlock { /** *

The text content of the document.

* @public */ interface TextMember { text: string; $unknown?: never; } /** * @public */ interface $UnknownMember { text?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { text: (value: string) => T; _: (name: string, value: any) => T; } } /** *

Contains the content of a document.

* @public */ type DocumentSource = DocumentSource.BytesMember | DocumentSource.ContentMember | DocumentSource.S3LocationMember | DocumentSource.TextMember | DocumentSource.$UnknownMember; /** * @public */ declare namespace DocumentSource { /** *

The raw bytes for the document. If you use an Amazon Web Services SDK, you don't need to encode the bytes in base64.

* @public */ interface BytesMember { bytes: Uint8Array; s3Location?: never; text?: never; content?: never; $unknown?: never; } /** *

The location of a document object in an Amazon S3 bucket. To see which models support S3 uploads, see Supported models and features for Converse.

* @public */ interface S3LocationMember { bytes?: never; s3Location: S3Location; text?: never; content?: never; $unknown?: never; } /** *

The text content of the document source.

* @public */ interface TextMember { bytes?: never; s3Location?: never; text: string; content?: never; $unknown?: never; } /** *

The structured content of the document source, which may include various content blocks such as text, images, or other document elements.

* @public */ interface ContentMember { bytes?: never; s3Location?: never; text?: never; content: DocumentContentBlock[]; $unknown?: never; } /** * @public */ interface $UnknownMember { bytes?: never; s3Location?: never; text?: never; content?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { bytes: (value: Uint8Array) => T; s3Location: (value: S3Location) => T; text: (value: string) => T; content: (value: DocumentContentBlock[]) => T; _: (name: string, value: any) => T; } } /** *

A document to include in a message.

* @public */ interface DocumentBlock { /** *

The format of a document, or its extension.

* @public */ format?: DocumentFormat | undefined; /** *

A name for the document. The name can only contain the following characters:

  • Alphanumeric characters

  • Whitespace characters (no more than one in a row)

  • Hyphens

  • Parentheses

  • Square brackets

This field is vulnerable to prompt injections, because the model might inadvertently interpret it as instructions. Therefore, we recommend that you specify a neutral name.

* @public */ name: string | undefined; /** *

Contains the content of the document.

* @public */ source: DocumentSource | undefined; /** *

Contextual information about how the document should be processed or interpreted by the model when generating citations.

* @public */ context?: string | undefined; /** *

Configuration settings that control how citations should be generated for this specific document.

* @public */ citations?: CitationsConfig | undefined; } /** *

The image source (image bytes) of the guardrail converse image source.

* @public */ type GuardrailConverseImageSource = GuardrailConverseImageSource.BytesMember | GuardrailConverseImageSource.$UnknownMember; /** * @public */ declare namespace GuardrailConverseImageSource { /** *

The raw image bytes for the image.

* @public */ interface BytesMember { bytes: Uint8Array; $unknown?: never; } /** * @public */ interface $UnknownMember { bytes?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { bytes: (value: Uint8Array) => T; _: (name: string, value: any) => T; } } /** *

An image block that contains images that you want to assess with a guardrail.

* @public */ interface GuardrailConverseImageBlock { /** *

The format details for the image type of the guardrail converse image block.

* @public */ format: GuardrailConverseImageFormat | undefined; /** *

The image source (image bytes) of the guardrail converse image block.

* @public */ source: GuardrailConverseImageSource | undefined; } /** *

A text block that contains text that you want to assess with a guardrail. For more information, see GuardrailConverseContentBlock.

* @public */ interface GuardrailConverseTextBlock { /** *

The text that you want to guard.

* @public */ text: string | undefined; /** *

The qualifier details for the guardrails contextual grounding filter.

* @public */ qualifiers?: GuardrailConverseContentQualifier[] | undefined; } /** *

A content block for selective guarding with the Converse or ConverseStream API operations.

* @public */ type GuardrailConverseContentBlock = GuardrailConverseContentBlock.ImageMember | GuardrailConverseContentBlock.TextMember | GuardrailConverseContentBlock.$UnknownMember; /** * @public */ declare namespace GuardrailConverseContentBlock { /** *

The text to guard.

* @public */ interface TextMember { text: GuardrailConverseTextBlock; image?: never; $unknown?: never; } /** *

Image within converse content block to be evaluated by the guardrail.

* @public */ interface ImageMember { text?: never; image: GuardrailConverseImageBlock; $unknown?: never; } /** * @public */ interface $UnknownMember { text?: never; image?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { text: (value: GuardrailConverseTextBlock) => T; image: (value: GuardrailConverseImageBlock) => T; _: (name: string, value: any) => T; } } /** *

The source for an image.

* @public */ type ImageSource = ImageSource.BytesMember | ImageSource.S3LocationMember | ImageSource.$UnknownMember; /** * @public */ declare namespace ImageSource { /** *

The raw image bytes for the image. If you use an AWS SDK, you don't need to encode the image bytes in base64.

* @public */ interface BytesMember { bytes: Uint8Array; s3Location?: never; $unknown?: never; } /** *

The location of an image object in an Amazon S3 bucket. To see which models support S3 uploads, see Supported models and features for Converse.

* @public */ interface S3LocationMember { bytes?: never; s3Location: S3Location; $unknown?: never; } /** * @public */ interface $UnknownMember { bytes?: never; s3Location?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { bytes: (value: Uint8Array) => T; s3Location: (value: S3Location) => T; _: (name: string, value: any) => T; } } /** *

Image content for a message.

* @public */ interface ImageBlock { /** *

The format of the image.

* @public */ format: ImageFormat | undefined; /** *

The source for the image.

* @public */ source: ImageSource | undefined; /** *

Error information if the image block could not be processed or contains invalid data.

* @public */ error?: ErrorBlock | undefined; } /** *

Contains the reasoning that the model used to return the output.

* @public */ interface ReasoningTextBlock { /** *

The reasoning that the model used to return the output.

* @public */ text: string | undefined; /** *

A token that verifies that the reasoning text was generated by the model. If you pass a reasoning block back to the API in a multi-turn conversation, include the text and its signature unmodified.

* @public */ signature?: string | undefined; } /** *

Contains content regarding the reasoning that is carried out by the model with respect to the content in the content block. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.

* @public */ type ReasoningContentBlock = ReasoningContentBlock.ReasoningTextMember | ReasoningContentBlock.RedactedContentMember | ReasoningContentBlock.$UnknownMember; /** * @public */ declare namespace ReasoningContentBlock { /** *

The reasoning that the model used to return the output.

* @public */ interface ReasoningTextMember { reasoningText: ReasoningTextBlock; redactedContent?: never; $unknown?: never; } /** *

The content in the reasoning that was encrypted by the model provider for safety reasons. The encryption doesn't affect the quality of responses.

* @public */ interface RedactedContentMember { reasoningText?: never; redactedContent: Uint8Array; $unknown?: never; } /** * @public */ interface $UnknownMember { reasoningText?: never; redactedContent?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { reasoningText: (value: ReasoningTextBlock) => T; redactedContent: (value: Uint8Array) => T; _: (name: string, value: any) => T; } } /** *

A block within a search result that contains the content.

* @public */ interface SearchResultContentBlock { /** *

The actual text content

* @public */ text: string | undefined; } /** *

A search result block that enables natural citations with proper source attribution for retrieved content.

This field is only supported by Anthropic Claude Opus 4.1, Opus 4, Sonnet 4.5, Sonnet 4, Sonnet 3.7, and 3.5 Haiku models.

* @public */ interface SearchResultBlock { /** *

The source URL or identifier for the content.

* @public */ source: string | undefined; /** *

A descriptive title for the search result.

* @public */ title: string | undefined; /** *

An array of search result content block.

* @public */ content: SearchResultContentBlock[] | undefined; /** *

Configuration setting for citations

* @public */ citations?: CitationsConfig | undefined; } /** *

A reference to a tool in the tool configuration. Used with ToolAdditionBlock and ToolRemovalBlock to identify which tool to add or remove mid-conversation.

* @public */ interface ToolReference { /** *

The type of tool reference.

* @public */ type?: string | undefined; /** *

The name of the tool. Must match the name of a tool declared in the top-level tool configuration.

* @public */ name?: string | undefined; /** *

The name of the MCP server that provides the tool. Required when referencing an MCP tool.

* @public */ serverName?: string | undefined; } /** *

A content block for adding a tool to the available tool set mid-conversation. Each block references a single tool via its tool field. Use within a system role message to make a tool available without re-sending the full tool configuration.

* @public */ interface ToolAdditionBlock { /** *

A reference to the tool to add to the available tool set.

* @public */ tool: ToolReference | undefined; } /** *

A content block for removing a tool from the available tool set mid-conversation. Each block references a single tool via its tool field. Use within a system role message to remove a tool without re-sending the full tool configuration.

* @public */ interface ToolRemovalBlock { /** *

A reference to the tool to remove from the available tool set.

* @public */ tool: ToolReference | undefined; } /** *

A video source. You can upload a smaller video as a base64-encoded string as long as the encoded file is less than 25MB. You can also transfer videos up to 1GB in size from an S3 bucket.

* @public */ type VideoSource = VideoSource.BytesMember | VideoSource.S3LocationMember | VideoSource.$UnknownMember; /** * @public */ declare namespace VideoSource { /** *

Video content encoded in base64.

* @public */ interface BytesMember { bytes: Uint8Array; s3Location?: never; $unknown?: never; } /** *

The location of a video object in an Amazon S3 bucket. To see which models support S3 uploads, see Supported models and features for Converse.

* @public */ interface S3LocationMember { bytes?: never; s3Location: S3Location; $unknown?: never; } /** * @public */ interface $UnknownMember { bytes?: never; s3Location?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { bytes: (value: Uint8Array) => T; s3Location: (value: S3Location) => T; _: (name: string, value: any) => T; } } /** *

A video block.

* @public */ interface VideoBlock { /** *

The block's format.

* @public */ format: VideoFormat | undefined; /** *

The block's source.

* @public */ source: VideoSource | undefined; } /** *

The tool result content block. For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.

* @public */ type ToolResultContentBlock = ToolResultContentBlock.DocumentMember | ToolResultContentBlock.ImageMember | ToolResultContentBlock.JsonMember | ToolResultContentBlock.SearchResultMember | ToolResultContentBlock.TextMember | ToolResultContentBlock.VideoMember | ToolResultContentBlock.$UnknownMember; /** * @public */ declare namespace ToolResultContentBlock { /** *

A tool result that is JSON format data.

* @public */ interface JsonMember { json: DocumentType; text?: never; image?: never; document?: never; video?: never; searchResult?: never; $unknown?: never; } /** *

A tool result that is text.

* @public */ interface TextMember { json?: never; text: string; image?: never; document?: never; video?: never; searchResult?: never; $unknown?: never; } /** *

A tool result that is an image.

This field is only supported by Amazon Nova and Anthropic Claude 3 and 4 models.

* @public */ interface ImageMember { json?: never; text?: never; image: ImageBlock; document?: never; video?: never; searchResult?: never; $unknown?: never; } /** *

A tool result that is a document.

* @public */ interface DocumentMember { json?: never; text?: never; image?: never; document: DocumentBlock; video?: never; searchResult?: never; $unknown?: never; } /** *

A tool result that is video.

* @public */ interface VideoMember { json?: never; text?: never; image?: never; document?: never; video: VideoBlock; searchResult?: never; $unknown?: never; } /** *

A tool result that is a search result.

* @public */ interface SearchResultMember { json?: never; text?: never; image?: never; document?: never; video?: never; searchResult: SearchResultBlock; $unknown?: never; } /** * @public */ interface $UnknownMember { json?: never; text?: never; image?: never; document?: never; video?: never; searchResult?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { json: (value: DocumentType) => T; text: (value: string) => T; image: (value: ImageBlock) => T; document: (value: DocumentBlock) => T; video: (value: VideoBlock) => T; searchResult: (value: SearchResultBlock) => T; _: (name: string, value: any) => T; } } /** *

A tool result block that contains the results for a tool request that the model previously made. For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.

* @public */ interface ToolResultBlock { /** *

The ID of the tool request that this is the result for.

* @public */ toolUseId: string | undefined; /** *

The content for tool result content block.

* @public */ content: ToolResultContentBlock[] | undefined; /** *

The status for the tool result content block.

This field is only supported by Amazon Nova and Anthropic Claude 3 and 4 models.

* @public */ status?: ToolResultStatus | undefined; /** *

The type for the tool result content block.

* @public */ type?: string | undefined; } /** *

A tool use content block. Contains information about a tool that the model is requesting be run., The model uses the result from the tool to generate a response. For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.

* @public */ interface ToolUseBlock { /** *

The ID for the tool request.

* @public */ toolUseId: string | undefined; /** *

The name of the tool that the model wants to use.

* @public */ name: string | undefined; /** *

The input to pass to the tool.

* @public */ input: DocumentType | undefined; /** *

The type for the tool request.

* @public */ type?: ToolUseType | undefined; } /** *

A block of content for a message that you pass to, or receive from, a model with the Converse or ConverseStream API operations.

* @public */ type ContentBlock = ContentBlock.AudioMember | ContentBlock.CachePointMember | ContentBlock.CitationsContentMember | ContentBlock.DocumentMember | ContentBlock.GuardContentMember | ContentBlock.ImageMember | ContentBlock.ReasoningContentMember | ContentBlock.SearchResultMember | ContentBlock.TextMember | ContentBlock.ToolAdditionMember | ContentBlock.ToolRemovalMember | ContentBlock.ToolResultMember | ContentBlock.ToolUseMember | ContentBlock.VideoMember | ContentBlock.$UnknownMember; /** * @public */ declare namespace ContentBlock { /** *

Text to include in the message.

* @public */ interface TextMember { text: string; image?: never; document?: never; video?: never; audio?: never; toolUse?: never; toolResult?: never; guardContent?: never; cachePoint?: never; reasoningContent?: never; citationsContent?: never; searchResult?: never; toolAddition?: never; toolRemoval?: never; $unknown?: never; } /** *

Image to include in the message.

This field is only supported by Anthropic Claude 3 models.

* @public */ interface ImageMember { text?: never; image: ImageBlock; document?: never; video?: never; audio?: never; toolUse?: never; toolResult?: never; guardContent?: never; cachePoint?: never; reasoningContent?: never; citationsContent?: never; searchResult?: never; toolAddition?: never; toolRemoval?: never; $unknown?: never; } /** *

A document to include in the message.

* @public */ interface DocumentMember { text?: never; image?: never; document: DocumentBlock; video?: never; audio?: never; toolUse?: never; toolResult?: never; guardContent?: never; cachePoint?: never; reasoningContent?: never; citationsContent?: never; searchResult?: never; toolAddition?: never; toolRemoval?: never; $unknown?: never; } /** *

Video to include in the message.

* @public */ interface VideoMember { text?: never; image?: never; document?: never; video: VideoBlock; audio?: never; toolUse?: never; toolResult?: never; guardContent?: never; cachePoint?: never; reasoningContent?: never; citationsContent?: never; searchResult?: never; toolAddition?: never; toolRemoval?: never; $unknown?: never; } /** *

An audio content block containing audio data in the conversation.

* @public */ interface AudioMember { text?: never; image?: never; document?: never; video?: never; audio: AudioBlock; toolUse?: never; toolResult?: never; guardContent?: never; cachePoint?: never; reasoningContent?: never; citationsContent?: never; searchResult?: never; toolAddition?: never; toolRemoval?: never; $unknown?: never; } /** *

Information about a tool use request from a model.

* @public */ interface ToolUseMember { text?: never; image?: never; document?: never; video?: never; audio?: never; toolUse: ToolUseBlock; toolResult?: never; guardContent?: never; cachePoint?: never; reasoningContent?: never; citationsContent?: never; searchResult?: never; toolAddition?: never; toolRemoval?: never; $unknown?: never; } /** *

The result for a tool request that a model makes.

* @public */ interface ToolResultMember { text?: never; image?: never; document?: never; video?: never; audio?: never; toolUse?: never; toolResult: ToolResultBlock; guardContent?: never; cachePoint?: never; reasoningContent?: never; citationsContent?: never; searchResult?: never; toolAddition?: never; toolRemoval?: never; $unknown?: never; } /** *

Contains the content to assess with the guardrail. If you don't specify guardContent in a call to the Converse API, the guardrail (if passed in the Converse API) assesses the entire message.

For more information, see Use a guardrail with the Converse API in the Amazon Bedrock User Guide.

* @public */ interface GuardContentMember { text?: never; image?: never; document?: never; video?: never; audio?: never; toolUse?: never; toolResult?: never; guardContent: GuardrailConverseContentBlock; cachePoint?: never; reasoningContent?: never; citationsContent?: never; searchResult?: never; toolAddition?: never; toolRemoval?: never; $unknown?: never; } /** *

CachePoint to include in the message.

* @public */ interface CachePointMember { text?: never; image?: never; document?: never; video?: never; audio?: never; toolUse?: never; toolResult?: never; guardContent?: never; cachePoint: CachePointBlock; reasoningContent?: never; citationsContent?: never; searchResult?: never; toolAddition?: never; toolRemoval?: never; $unknown?: never; } /** *

Contains content regarding the reasoning that is carried out by the model. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.

* @public */ interface ReasoningContentMember { text?: never; image?: never; document?: never; video?: never; audio?: never; toolUse?: never; toolResult?: never; guardContent?: never; cachePoint?: never; reasoningContent: ReasoningContentBlock; citationsContent?: never; searchResult?: never; toolAddition?: never; toolRemoval?: never; $unknown?: never; } /** *

A content block that contains both generated text and associated citation information, providing traceability between the response and source documents.

* @public */ interface CitationsContentMember { text?: never; image?: never; document?: never; video?: never; audio?: never; toolUse?: never; toolResult?: never; guardContent?: never; cachePoint?: never; reasoningContent?: never; citationsContent: CitationsContentBlock; searchResult?: never; toolAddition?: never; toolRemoval?: never; $unknown?: never; } /** *

Search result to include in the message.

* @public */ interface SearchResultMember { text?: never; image?: never; document?: never; video?: never; audio?: never; toolUse?: never; toolResult?: never; guardContent?: never; cachePoint?: never; reasoningContent?: never; citationsContent?: never; searchResult: SearchResultBlock; toolAddition?: never; toolRemoval?: never; $unknown?: never; } /** *

A content block for adding a tool to the available tool set mid-conversation. Each block references a single tool via its tool field. Use within a system role message to make a tool available without re-sending the full tool configuration.

* @public */ interface ToolAdditionMember { text?: never; image?: never; document?: never; video?: never; audio?: never; toolUse?: never; toolResult?: never; guardContent?: never; cachePoint?: never; reasoningContent?: never; citationsContent?: never; searchResult?: never; toolAddition: ToolAdditionBlock; toolRemoval?: never; $unknown?: never; } /** *

A content block for removing a tool from the available tool set mid-conversation. Each block references a single tool via its tool field. Use within a system role message to remove a tool without re-sending the full tool configuration.

* @public */ interface ToolRemovalMember { text?: never; image?: never; document?: never; video?: never; audio?: never; toolUse?: never; toolResult?: never; guardContent?: never; cachePoint?: never; reasoningContent?: never; citationsContent?: never; searchResult?: never; toolAddition?: never; toolRemoval: ToolRemovalBlock; $unknown?: never; } /** * @public */ interface $UnknownMember { text?: never; image?: never; document?: never; video?: never; audio?: never; toolUse?: never; toolResult?: never; guardContent?: never; cachePoint?: never; reasoningContent?: never; citationsContent?: never; searchResult?: never; toolAddition?: never; toolRemoval?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { text: (value: string) => T; image: (value: ImageBlock) => T; document: (value: DocumentBlock) => T; video: (value: VideoBlock) => T; audio: (value: AudioBlock) => T; toolUse: (value: ToolUseBlock) => T; toolResult: (value: ToolResultBlock) => T; guardContent: (value: GuardrailConverseContentBlock) => T; cachePoint: (value: CachePointBlock) => T; reasoningContent: (value: ReasoningContentBlock) => T; citationsContent: (value: CitationsContentBlock) => T; searchResult: (value: SearchResultBlock) => T; toolAddition: (value: ToolAdditionBlock) => T; toolRemoval: (value: ToolRemovalBlock) => T; _: (name: string, value: any) => T; } } /** *

A message input, or returned from, a call to Converse or ConverseStream.

* @public */ interface Message { /** *

The role that the message plays in the message.

* @public */ role: ConversationRole | undefined; /** *

The message content. Note the following restrictions:

  • You can include up to 20 images. Each image's size, height, and width must be no more than 3.75 MB, 8000 px, and 8000 px, respectively.

  • You can include up to five documents. Each document's size must be no more than 4.5 MB.

  • If you include a ContentBlock with a document field in the array, you must also include a ContentBlock with a text field.

  • You can only include images and documents if the role is user.

* @public */ content: ContentBlock[] | undefined; } /** *

JSON schema structured output format options.

* @public */ interface JsonSchemaDefinition { /** *

The JSON schema to constrain the model's output. For more information, see JSON Schema Reference.

* @public */ schema: string | undefined; /** *

The name of the JSON schema.

* @public */ name?: string | undefined; /** *

A description of the JSON schema.

* @public */ description?: string | undefined; } /** *

The structure that the model's output must adhere to.

* @public */ type OutputFormatStructure = OutputFormatStructure.JsonSchemaMember | OutputFormatStructure.$UnknownMember; /** * @public */ declare namespace OutputFormatStructure { /** *

A JSON schema structure that the model's output must adhere to.

* @public */ interface JsonSchemaMember { jsonSchema: JsonSchemaDefinition; $unknown?: never; } /** * @public */ interface $UnknownMember { jsonSchema?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { jsonSchema: (value: JsonSchemaDefinition) => T; _: (name: string, value: any) => T; } } /** *

Structured output parameters to control the model's response.

* @public */ interface OutputFormat { /** *

The type of structured output format.

* @public */ type: OutputFormatType | undefined; /** *

The structure that the model's output must adhere to.

* @public */ structure: OutputFormatStructure | undefined; } /** *

Output configuration for a model response in a call to Converse or ConverseStream.

* @public */ interface OutputConfig { /** *

Structured output parameters to control the model's text response.

* @public */ textFormat?: OutputFormat | undefined; /** *

The effort level for the model to use when generating a response. Higher effort levels allow the model to spend more time reasoning before responding. Supported values are low, medium, high, xhigh, and max.

When extended thinking is disabled, the effort level is capped at high. Use effort high or below, or enable thinking to use higher effort levels.

* @public */ effort?: string | undefined; } /** *

Performance settings for a model.

* @public */ interface PerformanceConfiguration { /** *

To use a latency-optimized version of the model, set to optimized.

* @public */ latency?: PerformanceConfigLatency | undefined; } /** *

Contains a map of variables in a prompt from Prompt management to an object containing the values to fill in for them when running model invocation. For more information, see How Prompt management works.

* @public */ type PromptVariableValues = PromptVariableValues.TextMember | PromptVariableValues.$UnknownMember; /** * @public */ declare namespace PromptVariableValues { /** *

The text value that the variable maps to.

* @public */ interface TextMember { text: string; $unknown?: never; } /** * @public */ interface $UnknownMember { text?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { text: (value: string) => T; _: (name: string, value: any) => T; } } /** *

Specifies the processing tier configuration used for serving the request.

* @public */ interface ServiceTier { /** *

Specifies the processing tier type used for serving the request.

* @public */ type: ServiceTierType | undefined; } /** *

Contains configurations for instructions to provide the model for how to handle input. To learn more, see Using the Converse API.

* @public */ type SystemContentBlock = SystemContentBlock.CachePointMember | SystemContentBlock.GuardContentMember | SystemContentBlock.TextMember | SystemContentBlock.$UnknownMember; /** * @public */ declare namespace SystemContentBlock { /** *

A system prompt for the model.

* @public */ interface TextMember { text: string; guardContent?: never; cachePoint?: never; $unknown?: never; } /** *

A content block to assess with the guardrail. Use with the Converse or ConverseStream API operations.

For more information, see Use a guardrail with the Converse API in the Amazon Bedrock User Guide.

* @public */ interface GuardContentMember { text?: never; guardContent: GuardrailConverseContentBlock; cachePoint?: never; $unknown?: never; } /** *

CachePoint to include in the system prompt.

* @public */ interface CachePointMember { text?: never; guardContent?: never; cachePoint: CachePointBlock; $unknown?: never; } /** * @public */ interface $UnknownMember { text?: never; guardContent?: never; cachePoint?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { text: (value: string) => T; guardContent: (value: GuardrailConverseContentBlock) => T; cachePoint: (value: CachePointBlock) => T; _: (name: string, value: any) => T; } } /** *

The model must request at least one tool (no text is generated). For example, \{"any" : \{\}\}. For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.

* @public */ interface AnyToolChoice {} /** *

The Model automatically decides if a tool should be called or whether to generate text instead. For example, \{"auto" : \{\}\}. For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide

* @public */ interface AutoToolChoice {} /** *

The model must request a specific tool. For example, \{"tool" : \{"name" : "Your tool name"\}\}. For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide

This field is only supported by Anthropic Claude 3 models.

* @public */ interface SpecificToolChoice { /** *

The name of the tool that the model must request.

* @public */ name: string | undefined; } /** *

Determines which tools the model should request in a call to Converse or ConverseStream. For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.

* @public */ type ToolChoice = ToolChoice.AnyMember | ToolChoice.AutoMember | ToolChoice.ToolMember | ToolChoice.$UnknownMember; /** * @public */ declare namespace ToolChoice { /** *

(Default). The Model automatically decides if a tool should be called or whether to generate text instead.

* @public */ interface AutoMember { auto: AutoToolChoice; any?: never; tool?: never; $unknown?: never; } /** *

The model must request at least one tool (no text is generated).

* @public */ interface AnyMember { auto?: never; any: AnyToolChoice; tool?: never; $unknown?: never; } /** *

The Model must request the specified tool. Only supported by Anthropic Claude 3 and Amazon Nova models.

* @public */ interface ToolMember { auto?: never; any?: never; tool: SpecificToolChoice; $unknown?: never; } /** * @public */ interface $UnknownMember { auto?: never; any?: never; tool?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { auto: (value: AutoToolChoice) => T; any: (value: AnyToolChoice) => T; tool: (value: SpecificToolChoice) => T; _: (name: string, value: any) => T; } } /** *

Specifies a system-defined tool for the model to use. System-defined tools are tools that are created and provided by the model provider.

* @public */ interface SystemTool { /** *

The name of the system-defined tool that you want to call.

* @public */ name: string | undefined; } /** *

The schema for the tool. The top level schema type must be object. For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.

* @public */ type ToolInputSchema = ToolInputSchema.JsonMember | ToolInputSchema.$UnknownMember; /** * @public */ declare namespace ToolInputSchema { /** *

The JSON schema for the tool. For more information, see JSON Schema Reference.

* @public */ interface JsonMember { json: DocumentType; $unknown?: never; } /** * @public */ interface $UnknownMember { json?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { json: (value: DocumentType) => T; _: (name: string, value: any) => T; } } /** *

The specification for the tool. For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.

* @public */ interface ToolSpecification { /** *

The name for the tool.

* @public */ name: string | undefined; /** *

The description for the tool.

* @public */ description?: string | undefined; /** *

The input schema for the tool in JSON format.

* @public */ inputSchema: ToolInputSchema | undefined; /** *

Flag to enable structured output enforcement on a tool usage response.

* @public */ strict?: boolean | undefined; } /** *

Information about a tool that you can use with the Converse API. For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.

* @public */ type Tool = Tool.CachePointMember | Tool.SystemToolMember | Tool.ToolSpecMember | Tool.$UnknownMember; /** * @public */ declare namespace Tool { /** *

The specfication for the tool.

* @public */ interface ToolSpecMember { toolSpec: ToolSpecification; systemTool?: never; cachePoint?: never; $unknown?: never; } /** *

Specifies the system-defined tool that you want use.

* @public */ interface SystemToolMember { toolSpec?: never; systemTool: SystemTool; cachePoint?: never; $unknown?: never; } /** *

CachePoint to include in the tool configuration.

* @public */ interface CachePointMember { toolSpec?: never; systemTool?: never; cachePoint: CachePointBlock; $unknown?: never; } /** * @public */ interface $UnknownMember { toolSpec?: never; systemTool?: never; cachePoint?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { toolSpec: (value: ToolSpecification) => T; systemTool: (value: SystemTool) => T; cachePoint: (value: CachePointBlock) => T; _: (name: string, value: any) => T; } } /** *

Configuration information for the tools that you pass to a model. For more information, see Tool use (function calling) in the Amazon Bedrock User Guide.

* @public */ interface ToolConfiguration { /** *

An array of tools that you want to pass to a model.

* @public */ tools: Tool[] | undefined; /** *

If supported by model, forces the model to request a tool.

* @public */ toolChoice?: ToolChoice | undefined; } /** * @public */ interface ConverseRequest { /** *

Specifies the model or throughput with which to run inference, or the prompt resource to use in inference. The value depends on the resource that you use:

The Converse API doesn't support imported models.

* @public */ modelId: string | undefined; /** *

The messages that you want to send to the model.

* @public */ messages?: Message[] | undefined; /** *

A prompt that provides instructions or context to the model about the task it should perform, or the persona it should adopt during the conversation.

* @public */ system?: SystemContentBlock[] | undefined; /** *

Inference parameters to pass to the model. Converse and ConverseStream support a base set of inference parameters. If you need to pass additional parameters that the model supports, use the additionalModelRequestFields request field.

* @public */ inferenceConfig?: InferenceConfiguration | undefined; /** *

Configuration information for the tools that the model can use when generating a response.

For information about models that support tool use, see Supported models and model features.

* @public */ toolConfig?: ToolConfiguration | undefined; /** *

Configuration information for a guardrail that you want to use in the request. If you include guardContent blocks in the content field in the messages field, the guardrail operates only on those messages. If you include no guardContent blocks, the guardrail operates on all messages in the request body and in any included prompt resource.

* @public */ guardrailConfig?: GuardrailConfiguration | undefined; /** *

Additional inference parameters that the model supports, beyond the base set of inference parameters that Converse and ConverseStream support in the inferenceConfig field. For more information, see Model parameters.

* @public */ additionalModelRequestFields?: DocumentType | undefined; /** *

Contains a map of variables in a prompt from Prompt management to objects containing the values to fill in for them when running model invocation. This field is ignored if you don't specify a prompt resource in the modelId field.

* @public */ promptVariables?: Record | undefined; /** *

Additional model parameters field paths to return in the response. Converse and ConverseStream return the requested fields as a JSON Pointer object in the additionalModelResponseFields field. The following is example JSON for additionalModelResponseFieldPaths.

[ "/stop_sequence" ]

For information about the JSON Pointer syntax, see the Internet Engineering Task Force (IETF) documentation.

Converse and ConverseStream reject an empty JSON Pointer or incorrectly structured JSON Pointer with a 400 error code. if the JSON Pointer is valid, but the requested field is not in the model response, it is ignored by Converse.

* @public */ additionalModelResponseFieldPaths?: string[] | undefined; /** *

Key-value pairs that you can use to filter invocation logs.

* @public */ requestMetadata?: Record | undefined; /** *

Model performance settings for the request.

* @public */ performanceConfig?: PerformanceConfiguration | undefined; /** *

Specifies the processing tier configuration used for serving the request.

* @public */ serviceTier?: ServiceTier | undefined; /** *

Output configuration for a model response.

* @public */ outputConfig?: OutputConfig | undefined; } /** *

Metrics for a call to Converse.

* @public */ interface ConverseMetrics { /** *

The latency of the call to Converse, in milliseconds.

* @public */ latencyMs: number | undefined; } /** *

The output from a call to Converse.

* @public */ type ConverseOutput = ConverseOutput.MessageMember | ConverseOutput.$UnknownMember; /** * @public */ declare namespace ConverseOutput { /** *

The message that the model generates.

* @public */ interface MessageMember { message: Message; $unknown?: never; } /** * @public */ interface $UnknownMember { message?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { message: (value: Message) => T; _: (name: string, value: any) => T; } } /** *

A Top level guardrail trace object. For more information, see ConverseTrace.

* @public */ interface GuardrailTraceAssessment { /** *

The output from the model.

* @public */ modelOutput?: string[] | undefined; /** *

The input assessment.

* @public */ inputAssessment?: Record | undefined; /** *

the output assessments.

* @public */ outputAssessments?: Record | undefined; /** *

Provides the reason for the action taken when harmful content is detected.

* @public */ actionReason?: string | undefined; } /** *

A prompt router trace.

* @public */ interface PromptRouterTrace { /** *

The ID of the invoked model.

* @public */ invokedModelId?: string | undefined; } /** *

The trace object in a response from Converse.

* @public */ interface ConverseTrace { /** *

The guardrail trace object.

* @public */ guardrail?: GuardrailTraceAssessment | undefined; /** *

The request's prompt router.

* @public */ promptRouter?: PromptRouterTrace | undefined; } /** *

Cache creation metrics for a specific TTL duration

* @public */ interface CacheDetail { /** *

TTL duration for these cached tokens

* @public */ ttl: CacheTTL | undefined; /** *

Number of tokens written to cache with this TTL (cache creation tokens)

* @public */ inputTokens: number | undefined; } /** *

The tokens used in a message API inference call.

* @public */ interface TokenUsage { /** *

The number of tokens sent in the request to the model.

* @public */ inputTokens: number | undefined; /** *

The number of tokens that the model generated for the request.

* @public */ outputTokens: number | undefined; /** *

The total of input tokens and tokens generated by the model.

* @public */ totalTokens: number | undefined; /** *

The number of input tokens read from the cache for the request.

* @public */ cacheReadInputTokens?: number | undefined; /** *

The number of input tokens written to the cache for the request.

* @public */ cacheWriteInputTokens?: number | undefined; /** *

Detailed breakdown of cache writes by TTL. Empty if no cache creation occurred. Sorted by TTL duration (1h before 5m).

* @public */ cacheDetails?: CacheDetail[] | undefined; } /** * @public */ interface ConverseResponse { /** *

The result from the call to Converse.

* @public */ output: ConverseOutput | undefined; /** *

The reason why the model stopped generating output.

* @public */ stopReason: StopReason | undefined; /** *

The total number of tokens used in the call to Converse. The total includes the tokens input to the model and the tokens generated by the model.

* @public */ usage: TokenUsage | undefined; /** *

Metrics for the call to Converse.

* @public */ metrics: ConverseMetrics | undefined; /** *

Additional fields in the response that are unique to the model.

* @public */ additionalModelResponseFields?: DocumentType | undefined; /** *

A trace object that contains information about the Guardrail behavior.

* @public */ trace?: ConverseTrace | undefined; /** *

Model performance settings for the request.

* @public */ performanceConfig?: PerformanceConfiguration | undefined; /** *

Specifies the processing tier configuration used for serving the request.

* @public */ serviceTier?: ServiceTier | undefined; } /** *

Configuration information for a guardrail that you use with the ConverseStream action.

* @public */ interface GuardrailStreamConfiguration { /** *

The identifier for the guardrail.

* @public */ guardrailIdentifier?: string | undefined; /** *

The version of the guardrail.

* @public */ guardrailVersion?: string | undefined; /** *

The trace behavior for the guardrail.

* @public */ trace?: GuardrailTrace | undefined; /** *

The processing mode.

The processing mode. For more information, see Configure streaming response behavior in the Amazon Bedrock User Guide.

* @public */ streamProcessingMode?: GuardrailStreamProcessingMode | undefined; } /** * @public */ interface ConverseStreamRequest { /** *

Specifies the model or throughput with which to run inference, or the prompt resource to use in inference. The value depends on the resource that you use:

The Converse API doesn't support imported models.

* @public */ modelId: string | undefined; /** *

The messages that you want to send to the model.

* @public */ messages?: Message[] | undefined; /** *

A prompt that provides instructions or context to the model about the task it should perform, or the persona it should adopt during the conversation.

* @public */ system?: SystemContentBlock[] | undefined; /** *

Inference parameters to pass to the model. Converse and ConverseStream support a base set of inference parameters. If you need to pass additional parameters that the model supports, use the additionalModelRequestFields request field.

* @public */ inferenceConfig?: InferenceConfiguration | undefined; /** *

Configuration information for the tools that the model can use when generating a response.

For information about models that support streaming tool use, see Supported models and model features.

* @public */ toolConfig?: ToolConfiguration | undefined; /** *

Configuration information for a guardrail that you want to use in the request. If you include guardContent blocks in the content field in the messages field, the guardrail operates only on those messages. If you include no guardContent blocks, the guardrail operates on all messages in the request body and in any included prompt resource.

* @public */ guardrailConfig?: GuardrailStreamConfiguration | undefined; /** *

Additional inference parameters that the model supports, beyond the base set of inference parameters that Converse and ConverseStream support in the inferenceConfig field. For more information, see Model parameters.

* @public */ additionalModelRequestFields?: DocumentType | undefined; /** *

Contains a map of variables in a prompt from Prompt management to objects containing the values to fill in for them when running model invocation. This field is ignored if you don't specify a prompt resource in the modelId field.

* @public */ promptVariables?: Record | undefined; /** *

Additional model parameters field paths to return in the response. Converse and ConverseStream return the requested fields as a JSON Pointer object in the additionalModelResponseFields field. The following is example JSON for additionalModelResponseFieldPaths.

[ "/stop_sequence" ]

For information about the JSON Pointer syntax, see the Internet Engineering Task Force (IETF) documentation.

Converse and ConverseStream reject an empty JSON Pointer or incorrectly structured JSON Pointer with a 400 error code. if the JSON Pointer is valid, but the requested field is not in the model response, it is ignored by Converse.

* @public */ additionalModelResponseFieldPaths?: string[] | undefined; /** *

Key-value pairs that you can use to filter invocation logs.

* @public */ requestMetadata?: Record | undefined; /** *

Model performance settings for the request.

* @public */ performanceConfig?: PerformanceConfiguration | undefined; /** *

Specifies the processing tier configuration used for serving the request.

* @public */ serviceTier?: ServiceTier | undefined; /** *

Output configuration for a model response.

* @public */ outputConfig?: OutputConfig | undefined; } /** *

Contains incremental updates to the source content text during streaming responses, allowing clients to build up the cited content progressively.

* @public */ interface CitationSourceContentDelta { /** *

An incremental update to the text content from the source document that is being cited.

* @public */ text?: string | undefined; } /** *

Contains incremental updates to citation information during streaming responses. This allows clients to build up citation data progressively as the response is generated.

* @public */ interface CitationsDelta { /** *

The title or identifier of the source document being cited.

* @public */ title?: string | undefined; /** *

The source from the original search result that provided the cited content.

* @public */ source?: string | undefined; /** *

The specific content from the source document that was referenced or cited in the generated response.

* @public */ sourceContent?: CitationSourceContentDelta[] | undefined; /** *

Specifies the precise location within a source document where cited content can be found. This can include character-level positions, page numbers, or document chunks depending on the document type and indexing method.

* @public */ location?: CitationLocation | undefined; } /** *

A streaming delta event that contains incremental image data during streaming responses.

* @public */ interface ImageBlockDelta { /** *

The incremental image source data for this delta event.

* @public */ source?: ImageSource | undefined; /** *

Error information if this image delta could not be processed.

* @public */ error?: ErrorBlock | undefined; } /** *

Contains content regarding the reasoning that is carried out by the model with respect to the content in the content block. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.

* @public */ type ReasoningContentBlockDelta = ReasoningContentBlockDelta.RedactedContentMember | ReasoningContentBlockDelta.SignatureMember | ReasoningContentBlockDelta.TextMember | ReasoningContentBlockDelta.$UnknownMember; /** * @public */ declare namespace ReasoningContentBlockDelta { /** *

The reasoning that the model used to return the output.

* @public */ interface TextMember { text: string; redactedContent?: never; signature?: never; $unknown?: never; } /** *

The content in the reasoning that was encrypted by the model provider for safety reasons. The encryption doesn't affect the quality of responses.

* @public */ interface RedactedContentMember { text?: never; redactedContent: Uint8Array; signature?: never; $unknown?: never; } /** *

A token that verifies that the reasoning text was generated by the model. If you pass a reasoning block back to the API in a multi-turn conversation, include the text and its signature unmodified.

* @public */ interface SignatureMember { text?: never; redactedContent?: never; signature: string; $unknown?: never; } /** * @public */ interface $UnknownMember { text?: never; redactedContent?: never; signature?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { text: (value: string) => T; redactedContent: (value: Uint8Array) => T; signature: (value: string) => T; _: (name: string, value: any) => T; } } /** *

Contains incremental updates to tool results information during streaming responses. This allows clients to build up tool results data progressively as the response is generated.

* @public */ type ToolResultBlockDelta = ToolResultBlockDelta.JsonMember | ToolResultBlockDelta.TextMember | ToolResultBlockDelta.$UnknownMember; /** * @public */ declare namespace ToolResultBlockDelta { /** *

The reasoning the model used to return the output.

* @public */ interface TextMember { text: string; json?: never; $unknown?: never; } /** *

The JSON schema for the tool result content block. see JSON Schema Reference.

* @public */ interface JsonMember { text?: never; json: DocumentType; $unknown?: never; } /** * @public */ interface $UnknownMember { text?: never; json?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { text: (value: string) => T; json: (value: DocumentType) => T; _: (name: string, value: any) => T; } } /** *

The delta for a tool use block.

* @public */ interface ToolUseBlockDelta { /** *

The input for a requested tool.

* @public */ input: string | undefined; } /** *

A block of content in a streaming response.

* @public */ type ContentBlockDelta = ContentBlockDelta.CitationMember | ContentBlockDelta.ImageMember | ContentBlockDelta.ReasoningContentMember | ContentBlockDelta.TextMember | ContentBlockDelta.ToolResultMember | ContentBlockDelta.ToolUseMember | ContentBlockDelta.$UnknownMember; /** * @public */ declare namespace ContentBlockDelta { /** *

The content text.

* @public */ interface TextMember { text: string; toolUse?: never; toolResult?: never; reasoningContent?: never; citation?: never; image?: never; $unknown?: never; } /** *

Information about a tool that the model is requesting to use.

* @public */ interface ToolUseMember { text?: never; toolUse: ToolUseBlockDelta; toolResult?: never; reasoningContent?: never; citation?: never; image?: never; $unknown?: never; } /** *

An incremental update that contains the results from a tool call.

* @public */ interface ToolResultMember { text?: never; toolUse?: never; toolResult: ToolResultBlockDelta[]; reasoningContent?: never; citation?: never; image?: never; $unknown?: never; } /** *

Contains content regarding the reasoning that is carried out by the model. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.

* @public */ interface ReasoningContentMember { text?: never; toolUse?: never; toolResult?: never; reasoningContent: ReasoningContentBlockDelta; citation?: never; image?: never; $unknown?: never; } /** *

Incremental citation information that is streamed as part of the response generation process.

* @public */ interface CitationMember { text?: never; toolUse?: never; toolResult?: never; reasoningContent?: never; citation: CitationsDelta; image?: never; $unknown?: never; } /** *

A streaming delta event containing incremental image data.

* @public */ interface ImageMember { text?: never; toolUse?: never; toolResult?: never; reasoningContent?: never; citation?: never; image: ImageBlockDelta; $unknown?: never; } /** * @public */ interface $UnknownMember { text?: never; toolUse?: never; toolResult?: never; reasoningContent?: never; citation?: never; image?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { text: (value: string) => T; toolUse: (value: ToolUseBlockDelta) => T; toolResult: (value: ToolResultBlockDelta[]) => T; reasoningContent: (value: ReasoningContentBlockDelta) => T; citation: (value: CitationsDelta) => T; image: (value: ImageBlockDelta) => T; _: (name: string, value: any) => T; } } /** *

The content block delta event.

* @public */ interface ContentBlockDeltaEvent { /** *

The delta for a content block delta event.

* @public */ delta: ContentBlockDelta | undefined; /** *

The block index for a content block delta event.

* @public */ contentBlockIndex: number | undefined; } /** *

The initial event in a streaming image block that indicates the start of image content.

* @public */ interface ImageBlockStart { /** *

The format of the image data that will be streamed in subsequent delta events.

* @public */ format: ImageFormat | undefined; } /** *

The start of a tool result block. For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.

* @public */ interface ToolResultBlockStart { /** *

The ID of the tool that was used to generate this tool result block.

* @public */ toolUseId: string | undefined; /** *

The type for the tool that was used to generate this tool result block.

* @public */ type?: string | undefined; /** *

The status of the tool result block.

* @public */ status?: ToolResultStatus | undefined; } /** *

The start of a tool use block. For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.

* @public */ interface ToolUseBlockStart { /** *

The ID for the tool request.

* @public */ toolUseId: string | undefined; /** *

The name of the tool that the model is requesting to use.

* @public */ name: string | undefined; /** *

The type for the tool request.

* @public */ type?: ToolUseType | undefined; } /** *

Content block start information.

* @public */ type ContentBlockStart = ContentBlockStart.ImageMember | ContentBlockStart.ToolResultMember | ContentBlockStart.ToolUseMember | ContentBlockStart.$UnknownMember; /** * @public */ declare namespace ContentBlockStart { /** *

Information about a tool that the model is requesting to use.

* @public */ interface ToolUseMember { toolUse: ToolUseBlockStart; toolResult?: never; image?: never; $unknown?: never; } /** *

The

* @public */ interface ToolResultMember { toolUse?: never; toolResult: ToolResultBlockStart; image?: never; $unknown?: never; } /** *

The initial event indicating the start of a streaming image block.

* @public */ interface ImageMember { toolUse?: never; toolResult?: never; image: ImageBlockStart; $unknown?: never; } /** * @public */ interface $UnknownMember { toolUse?: never; toolResult?: never; image?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { toolUse: (value: ToolUseBlockStart) => T; toolResult: (value: ToolResultBlockStart) => T; image: (value: ImageBlockStart) => T; _: (name: string, value: any) => T; } } /** *

Content block start event.

* @public */ interface ContentBlockStartEvent { /** *

Start information about a content block start event.

* @public */ start: ContentBlockStart | undefined; /** *

The index for a content block start event.

* @public */ contentBlockIndex: number | undefined; } /** *

A content block stop event.

* @public */ interface ContentBlockStopEvent { /** *

The index for a content block.

* @public */ contentBlockIndex: number | undefined; } /** *

The start of a message.

* @public */ interface MessageStartEvent { /** *

The role for the message.

* @public */ role: ConversationRole | undefined; } /** *

The stop event for a message.

* @public */ interface MessageStopEvent { /** *

The reason why the model stopped generating output.

* @public */ stopReason: StopReason | undefined; /** *

The additional model response fields.

* @public */ additionalModelResponseFields?: DocumentType | undefined; } /** *

Metrics for the stream.

* @public */ interface ConverseStreamMetrics { /** *

The latency for the streaming request, in milliseconds.

* @public */ latencyMs: number | undefined; } /** *

The trace object in a response from ConverseStream.

* @public */ interface ConverseStreamTrace { /** *

The guardrail trace object.

* @public */ guardrail?: GuardrailTraceAssessment | undefined; /** *

The request's prompt router.

* @public */ promptRouter?: PromptRouterTrace | undefined; } /** *

A conversation stream metadata event.

* @public */ interface ConverseStreamMetadataEvent { /** *

Usage information for the conversation stream event.

* @public */ usage: TokenUsage | undefined; /** *

The metrics for the conversation stream metadata event.

* @public */ metrics: ConverseStreamMetrics | undefined; /** *

The trace object in the response from ConverseStream that contains information about the guardrail behavior.

* @public */ trace?: ConverseStreamTrace | undefined; /** *

Model performance configuration metadata for the conversation stream event.

* @public */ performanceConfig?: PerformanceConfiguration | undefined; /** *

Specifies the processing tier configuration used for serving the request.

* @public */ serviceTier?: ServiceTier | undefined; } /** *

The messages output stream

* @public */ type ConverseStreamOutput = ConverseStreamOutput.ContentBlockDeltaMember | ConverseStreamOutput.ContentBlockStartMember | ConverseStreamOutput.ContentBlockStopMember | ConverseStreamOutput.InternalServerExceptionMember | ConverseStreamOutput.MessageStartMember | ConverseStreamOutput.MessageStopMember | ConverseStreamOutput.MetadataMember | ConverseStreamOutput.ModelStreamErrorExceptionMember | ConverseStreamOutput.ServiceUnavailableExceptionMember | ConverseStreamOutput.ThrottlingExceptionMember | ConverseStreamOutput.ValidationExceptionMember | ConverseStreamOutput.$UnknownMember; /** * @public */ declare namespace ConverseStreamOutput { /** *

Message start information.

* @public */ interface MessageStartMember { messageStart: MessageStartEvent; contentBlockStart?: never; contentBlockDelta?: never; contentBlockStop?: never; messageStop?: never; metadata?: never; internalServerException?: never; modelStreamErrorException?: never; validationException?: never; throttlingException?: never; serviceUnavailableException?: never; $unknown?: never; } /** *

Start information for a content block.

* @public */ interface ContentBlockStartMember { messageStart?: never; contentBlockStart: ContentBlockStartEvent; contentBlockDelta?: never; contentBlockStop?: never; messageStop?: never; metadata?: never; internalServerException?: never; modelStreamErrorException?: never; validationException?: never; throttlingException?: never; serviceUnavailableException?: never; $unknown?: never; } /** *

The messages output content block delta.

* @public */ interface ContentBlockDeltaMember { messageStart?: never; contentBlockStart?: never; contentBlockDelta: ContentBlockDeltaEvent; contentBlockStop?: never; messageStop?: never; metadata?: never; internalServerException?: never; modelStreamErrorException?: never; validationException?: never; throttlingException?: never; serviceUnavailableException?: never; $unknown?: never; } /** *

Stop information for a content block.

* @public */ interface ContentBlockStopMember { messageStart?: never; contentBlockStart?: never; contentBlockDelta?: never; contentBlockStop: ContentBlockStopEvent; messageStop?: never; metadata?: never; internalServerException?: never; modelStreamErrorException?: never; validationException?: never; throttlingException?: never; serviceUnavailableException?: never; $unknown?: never; } /** *

Message stop information.

* @public */ interface MessageStopMember { messageStart?: never; contentBlockStart?: never; contentBlockDelta?: never; contentBlockStop?: never; messageStop: MessageStopEvent; metadata?: never; internalServerException?: never; modelStreamErrorException?: never; validationException?: never; throttlingException?: never; serviceUnavailableException?: never; $unknown?: never; } /** *

Metadata for the converse output stream.

* @public */ interface MetadataMember { messageStart?: never; contentBlockStart?: never; contentBlockDelta?: never; contentBlockStop?: never; messageStop?: never; metadata: ConverseStreamMetadataEvent; internalServerException?: never; modelStreamErrorException?: never; validationException?: never; throttlingException?: never; serviceUnavailableException?: never; $unknown?: never; } /** *

An internal server error occurred. Retry your request.

* @public */ interface InternalServerExceptionMember { messageStart?: never; contentBlockStart?: never; contentBlockDelta?: never; contentBlockStop?: never; messageStop?: never; metadata?: never; internalServerException: InternalServerException; modelStreamErrorException?: never; validationException?: never; throttlingException?: never; serviceUnavailableException?: never; $unknown?: never; } /** *

A streaming error occurred. Retry your request.

* @public */ interface ModelStreamErrorExceptionMember { messageStart?: never; contentBlockStart?: never; contentBlockDelta?: never; contentBlockStop?: never; messageStop?: never; metadata?: never; internalServerException?: never; modelStreamErrorException: ModelStreamErrorException; validationException?: never; throttlingException?: never; serviceUnavailableException?: never; $unknown?: never; } /** *

The input fails to satisfy the constraints specified by Amazon Bedrock. For troubleshooting this error, see ValidationError in the Amazon Bedrock User Guide.

* @public */ interface ValidationExceptionMember { messageStart?: never; contentBlockStart?: never; contentBlockDelta?: never; contentBlockStop?: never; messageStop?: never; metadata?: never; internalServerException?: never; modelStreamErrorException?: never; validationException: ValidationException; throttlingException?: never; serviceUnavailableException?: never; $unknown?: never; } /** *

Your request was denied due to exceeding the account quotas for Amazon Bedrock. For troubleshooting this error, see ThrottlingException in the Amazon Bedrock User Guide.

* @public */ interface ThrottlingExceptionMember { messageStart?: never; contentBlockStart?: never; contentBlockDelta?: never; contentBlockStop?: never; messageStop?: never; metadata?: never; internalServerException?: never; modelStreamErrorException?: never; validationException?: never; throttlingException: ThrottlingException; serviceUnavailableException?: never; $unknown?: never; } /** *

The service isn't currently available. For troubleshooting this error, see ServiceUnavailable in the Amazon Bedrock User Guide

* @public */ interface ServiceUnavailableExceptionMember { messageStart?: never; contentBlockStart?: never; contentBlockDelta?: never; contentBlockStop?: never; messageStop?: never; metadata?: never; internalServerException?: never; modelStreamErrorException?: never; validationException?: never; throttlingException?: never; serviceUnavailableException: ServiceUnavailableException; $unknown?: never; } /** * @public */ interface $UnknownMember { messageStart?: never; contentBlockStart?: never; contentBlockDelta?: never; contentBlockStop?: never; messageStop?: never; metadata?: never; internalServerException?: never; modelStreamErrorException?: never; validationException?: never; throttlingException?: never; serviceUnavailableException?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { messageStart: (value: MessageStartEvent) => T; contentBlockStart: (value: ContentBlockStartEvent) => T; contentBlockDelta: (value: ContentBlockDeltaEvent) => T; contentBlockStop: (value: ContentBlockStopEvent) => T; messageStop: (value: MessageStopEvent) => T; metadata: (value: ConverseStreamMetadataEvent) => T; internalServerException: (value: InternalServerException) => T; modelStreamErrorException: (value: ModelStreamErrorException) => T; validationException: (value: ValidationException) => T; throttlingException: (value: ThrottlingException) => T; serviceUnavailableException: (value: ServiceUnavailableException) => T; _: (name: string, value: any) => T; } } /** * @public */ interface ConverseStreamResponse { /** *

The output stream that the model generated.

* @public */ stream?: AsyncIterable | undefined; } /** * @public */ interface InvokeModelRequest { /** *

The prompt and inference parameters in the format specified in the contentType in the header. You must provide the body in JSON format. To see the format and content of the request and response bodies for different models, refer to Inference parameters. For more information, see Run inference in the Bedrock User Guide.

* @public */ body?: Uint8Array | undefined; /** *

The MIME type of the input data in the request. You must specify application/json.

* @public */ contentType?: string | undefined; /** *

The desired MIME type of the inference body in the response. The default value is application/json.

* @public */ accept?: string | undefined; /** *

The unique identifier of the model to invoke to run inference.

The modelId to provide depends on the type of model or throughput that you use:

* @public */ modelId: string | undefined; /** *

Specifies whether to enable or disable the Bedrock trace. If enabled, you can see the full Bedrock trace.

* @public */ trace?: Trace | undefined; /** *

The unique identifier of the guardrail that you want to use. If you don't provide a value, no guardrail is applied to the invocation.

An error will be thrown in the following situations.

  • You don't provide a guardrail identifier but you specify the amazon-bedrock-guardrailConfig field in the request body.

  • You enable the guardrail but the contentType isn't application/json.

  • You provide a guardrail identifier, but guardrailVersion isn't specified.

* @public */ guardrailIdentifier?: string | undefined; /** *

The version number for the guardrail. The value can also be DRAFT.

* @public */ guardrailVersion?: string | undefined; /** *

Model performance settings for the request.

* @public */ performanceConfigLatency?: PerformanceConfigLatency | undefined; /** *

Specifies the processing tier type used for serving the request.

* @public */ serviceTier?: ServiceTierType | undefined; /** *

Key-value pairs that you can use to filter invocation logs.

* @public */ requestMetadata?: string | undefined; } /** * @public */ interface InvokeModelResponse { /** *

Inference response from the model in the format specified in the contentType header. To see the format and content of the request and response bodies for different models, refer to Inference parameters.

* @public */ body: Uint8Array | undefined; /** *

The MIME type of the inference result.

* @public */ contentType: string | undefined; /** *

Model performance settings for the request.

* @public */ performanceConfigLatency?: PerformanceConfigLatency | undefined; /** *

Specifies the processing tier type used for serving the request.

* @public */ serviceTier?: ServiceTierType | undefined; } /** *

Payload content for the bidirectional input. The input is an audio stream.

* @public */ interface BidirectionalInputPayloadPart { /** *

The audio content for the bidirectional input.

* @public */ bytes?: Uint8Array | undefined; } /** *

Payload content, the speech chunk, for the bidirectional input of the invocation step.

* @public */ type InvokeModelWithBidirectionalStreamInput = InvokeModelWithBidirectionalStreamInput.ChunkMember | InvokeModelWithBidirectionalStreamInput.$UnknownMember; /** * @public */ declare namespace InvokeModelWithBidirectionalStreamInput { /** *

The audio chunk that is used as input for the invocation step.

* @public */ interface ChunkMember { chunk: BidirectionalInputPayloadPart; $unknown?: never; } /** * @public */ interface $UnknownMember { chunk?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { chunk: (value: BidirectionalInputPayloadPart) => T; _: (name: string, value: any) => T; } } /** * @public */ interface InvokeModelWithBidirectionalStreamRequest { /** *

The model ID or ARN of the model ID to use. Currently, only amazon.nova-sonic-v1:0 is supported.

* @public */ modelId: string | undefined; /** *

The prompt and inference parameters in the format specified in the BidirectionalInputPayloadPart in the header. You must provide the body in JSON format. To see the format and content of the request and response bodies for different models, refer to Inference parameters. For more information, see Run inference in the Bedrock User Guide.

* @public */ body: AsyncIterable | undefined; } /** *

Output from the bidirectional stream. The output is speech and a text transcription.

* @public */ interface BidirectionalOutputPayloadPart { /** *

The speech output of the bidirectional stream.

* @public */ bytes?: Uint8Array | undefined; } /** *

Output from the bidirectional stream that was used for model invocation.

* @public */ type InvokeModelWithBidirectionalStreamOutput = InvokeModelWithBidirectionalStreamOutput.ChunkMember | InvokeModelWithBidirectionalStreamOutput.InternalServerExceptionMember | InvokeModelWithBidirectionalStreamOutput.ModelStreamErrorExceptionMember | InvokeModelWithBidirectionalStreamOutput.ModelTimeoutExceptionMember | InvokeModelWithBidirectionalStreamOutput.ServiceUnavailableExceptionMember | InvokeModelWithBidirectionalStreamOutput.ThrottlingExceptionMember | InvokeModelWithBidirectionalStreamOutput.ValidationExceptionMember | InvokeModelWithBidirectionalStreamOutput.$UnknownMember; /** * @public */ declare namespace InvokeModelWithBidirectionalStreamOutput { /** *

The speech chunk that was provided as output from the invocation step.

* @public */ interface ChunkMember { chunk: BidirectionalOutputPayloadPart; internalServerException?: never; modelStreamErrorException?: never; validationException?: never; throttlingException?: never; modelTimeoutException?: never; serviceUnavailableException?: never; $unknown?: never; } /** *

The request encountered an unknown internal error.

* @public */ interface InternalServerExceptionMember { chunk?: never; internalServerException: InternalServerException; modelStreamErrorException?: never; validationException?: never; throttlingException?: never; modelTimeoutException?: never; serviceUnavailableException?: never; $unknown?: never; } /** *

The request encountered an error with the model stream.

* @public */ interface ModelStreamErrorExceptionMember { chunk?: never; internalServerException?: never; modelStreamErrorException: ModelStreamErrorException; validationException?: never; throttlingException?: never; modelTimeoutException?: never; serviceUnavailableException?: never; $unknown?: never; } /** *

The input fails to satisfy the constraints specified by an Amazon Web Services service.

* @public */ interface ValidationExceptionMember { chunk?: never; internalServerException?: never; modelStreamErrorException?: never; validationException: ValidationException; throttlingException?: never; modelTimeoutException?: never; serviceUnavailableException?: never; $unknown?: never; } /** *

The request was denied due to request throttling.

* @public */ interface ThrottlingExceptionMember { chunk?: never; internalServerException?: never; modelStreamErrorException?: never; validationException?: never; throttlingException: ThrottlingException; modelTimeoutException?: never; serviceUnavailableException?: never; $unknown?: never; } /** *

The connection was closed because a request was not received within the timeout period.

* @public */ interface ModelTimeoutExceptionMember { chunk?: never; internalServerException?: never; modelStreamErrorException?: never; validationException?: never; throttlingException?: never; modelTimeoutException: ModelTimeoutException; serviceUnavailableException?: never; $unknown?: never; } /** *

The request has failed due to a temporary failure of the server.

* @public */ interface ServiceUnavailableExceptionMember { chunk?: never; internalServerException?: never; modelStreamErrorException?: never; validationException?: never; throttlingException?: never; modelTimeoutException?: never; serviceUnavailableException: ServiceUnavailableException; $unknown?: never; } /** * @public */ interface $UnknownMember { chunk?: never; internalServerException?: never; modelStreamErrorException?: never; validationException?: never; throttlingException?: never; modelTimeoutException?: never; serviceUnavailableException?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { chunk: (value: BidirectionalOutputPayloadPart) => T; internalServerException: (value: InternalServerException) => T; modelStreamErrorException: (value: ModelStreamErrorException) => T; validationException: (value: ValidationException) => T; throttlingException: (value: ThrottlingException) => T; modelTimeoutException: (value: ModelTimeoutException) => T; serviceUnavailableException: (value: ServiceUnavailableException) => T; _: (name: string, value: any) => T; } } /** * @public */ interface InvokeModelWithBidirectionalStreamResponse { /** *

Streaming response from the model in the format specified by the BidirectionalOutputPayloadPart header.

* @public */ body: AsyncIterable | undefined; } /** * @public */ interface InvokeModelWithResponseStreamRequest { /** *

The prompt and inference parameters in the format specified in the contentType in the header. You must provide the body in JSON format. To see the format and content of the request and response bodies for different models, refer to Inference parameters. For more information, see Run inference in the Bedrock User Guide.

* @public */ body?: Uint8Array | undefined; /** *

The MIME type of the input data in the request. You must specify application/json.

* @public */ contentType?: string | undefined; /** *

The desired MIME type of the inference body in the response. The default value is application/json.

* @public */ accept?: string | undefined; /** *

The unique identifier of the model to invoke to run inference.

The modelId to provide depends on the type of model or throughput that you use:

* @public */ modelId: string | undefined; /** *

Specifies whether to enable or disable the Bedrock trace. If enabled, you can see the full Bedrock trace.

* @public */ trace?: Trace | undefined; /** *

The unique identifier of the guardrail that you want to use. If you don't provide a value, no guardrail is applied to the invocation.

An error is thrown in the following situations.

  • You don't provide a guardrail identifier but you specify the amazon-bedrock-guardrailConfig field in the request body.

  • You enable the guardrail but the contentType isn't application/json.

  • You provide a guardrail identifier, but guardrailVersion isn't specified.

* @public */ guardrailIdentifier?: string | undefined; /** *

The version number for the guardrail. The value can also be DRAFT.

* @public */ guardrailVersion?: string | undefined; /** *

Model performance settings for the request.

* @public */ performanceConfigLatency?: PerformanceConfigLatency | undefined; /** *

Specifies the processing tier type used for serving the request.

* @public */ serviceTier?: ServiceTierType | undefined; /** *

Key-value pairs that you can use to filter invocation logs.

* @public */ requestMetadata?: string | undefined; } /** *

Payload content included in the response.

* @public */ interface PayloadPart { /** *

Base64-encoded bytes of payload data.

* @public */ bytes?: Uint8Array | undefined; } /** *

Definition of content in the response stream.

* @public */ type ResponseStream = ResponseStream.ChunkMember | ResponseStream.InternalServerExceptionMember | ResponseStream.ModelStreamErrorExceptionMember | ResponseStream.ModelTimeoutExceptionMember | ResponseStream.ServiceUnavailableExceptionMember | ResponseStream.ThrottlingExceptionMember | ResponseStream.ValidationExceptionMember | ResponseStream.$UnknownMember; /** * @public */ declare namespace ResponseStream { /** *

Content included in the response.

* @public */ interface ChunkMember { chunk: PayloadPart; internalServerException?: never; modelStreamErrorException?: never; validationException?: never; throttlingException?: never; modelTimeoutException?: never; serviceUnavailableException?: never; $unknown?: never; } /** *

An internal server error occurred. Retry your request.

* @public */ interface InternalServerExceptionMember { chunk?: never; internalServerException: InternalServerException; modelStreamErrorException?: never; validationException?: never; throttlingException?: never; modelTimeoutException?: never; serviceUnavailableException?: never; $unknown?: never; } /** *

An error occurred while streaming the response. Retry your request.

* @public */ interface ModelStreamErrorExceptionMember { chunk?: never; internalServerException?: never; modelStreamErrorException: ModelStreamErrorException; validationException?: never; throttlingException?: never; modelTimeoutException?: never; serviceUnavailableException?: never; $unknown?: never; } /** *

Input validation failed. Check your request parameters and retry the request.

* @public */ interface ValidationExceptionMember { chunk?: never; internalServerException?: never; modelStreamErrorException?: never; validationException: ValidationException; throttlingException?: never; modelTimeoutException?: never; serviceUnavailableException?: never; $unknown?: never; } /** *

Your request was throttled because of service-wide limitations. Resubmit your request later or in a different region. You can also purchase Provisioned Throughput to increase the rate or number of tokens you can process.

* @public */ interface ThrottlingExceptionMember { chunk?: never; internalServerException?: never; modelStreamErrorException?: never; validationException?: never; throttlingException: ThrottlingException; modelTimeoutException?: never; serviceUnavailableException?: never; $unknown?: never; } /** *

The request took too long to process. Processing time exceeded the model timeout length.

* @public */ interface ModelTimeoutExceptionMember { chunk?: never; internalServerException?: never; modelStreamErrorException?: never; validationException?: never; throttlingException?: never; modelTimeoutException: ModelTimeoutException; serviceUnavailableException?: never; $unknown?: never; } /** *

The service isn't available. Try again later.

* @public */ interface ServiceUnavailableExceptionMember { chunk?: never; internalServerException?: never; modelStreamErrorException?: never; validationException?: never; throttlingException?: never; modelTimeoutException?: never; serviceUnavailableException: ServiceUnavailableException; $unknown?: never; } /** * @public */ interface $UnknownMember { chunk?: never; internalServerException?: never; modelStreamErrorException?: never; validationException?: never; throttlingException?: never; modelTimeoutException?: never; serviceUnavailableException?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { chunk: (value: PayloadPart) => T; internalServerException: (value: InternalServerException) => T; modelStreamErrorException: (value: ModelStreamErrorException) => T; validationException: (value: ValidationException) => T; throttlingException: (value: ThrottlingException) => T; modelTimeoutException: (value: ModelTimeoutException) => T; serviceUnavailableException: (value: ServiceUnavailableException) => T; _: (name: string, value: any) => T; } } /** * @public */ interface InvokeModelWithResponseStreamResponse { /** *

Inference response from the model in the format specified by the contentType header. To see the format and content of this field for different models, refer to Inference parameters.

* @public */ body: AsyncIterable | undefined; /** *

The MIME type of the inference result.

* @public */ contentType: string | undefined; /** *

Model performance settings for the request.

* @public */ performanceConfigLatency?: PerformanceConfigLatency | undefined; /** *

Specifies the processing tier type used for serving the request.

* @public */ serviceTier?: ServiceTierType | undefined; } /** *

The inputs from a Converse API request for token counting.

This structure mirrors the input format for the Converse operation, allowing you to count tokens for conversation-based inference requests.

* @public */ interface ConverseTokensRequest { /** *

An array of messages to count tokens for.

* @public */ messages?: Message[] | undefined; /** *

The system content blocks to count tokens for. System content provides instructions or context to the model about how it should behave or respond. The token count will include any system content provided.

* @public */ system?: SystemContentBlock[] | undefined; /** *

The toolConfig of Converse input request to count tokens for. Configuration information for the tools that the model can use when generating a response.

* @public */ toolConfig?: ToolConfiguration | undefined; /** *

The additionalModelRequestFields of Converse input request to count tokens for. Use this field when you want to pass additional parameters that the model supports.

* @public */ additionalModelRequestFields?: DocumentType | undefined; } /** *

The body of an InvokeModel API request for token counting. This structure mirrors the input format for the InvokeModel operation, allowing you to count tokens for raw text inference requests.

* @public */ interface InvokeModelTokensRequest { /** *

The request body to count tokens for, formatted according to the model's expected input format. To learn about the input format for different models, see Model inference parameters and responses.

* @public */ body: Uint8Array | undefined; } /** *

The input value for token counting. The value should be either an InvokeModel or Converse request body.

* @public */ type CountTokensInput = CountTokensInput.ConverseMember | CountTokensInput.InvokeModelMember | CountTokensInput.$UnknownMember; /** * @public */ declare namespace CountTokensInput { /** *

An InvokeModel request for which to count tokens. Use this field when you want to count tokens for a raw text input that would be sent to the InvokeModel operation.

* @public */ interface InvokeModelMember { invokeModel: InvokeModelTokensRequest; converse?: never; $unknown?: never; } /** *

A Converse request for which to count tokens. Use this field when you want to count tokens for a conversation-based input that would be sent to the Converse operation.

* @public */ interface ConverseMember { invokeModel?: never; converse: ConverseTokensRequest; $unknown?: never; } /** * @public */ interface $UnknownMember { invokeModel?: never; converse?: never; $unknown: [string, any]; } /** * @deprecated unused in schema-serde mode. * */ interface Visitor { invokeModel: (value: InvokeModelTokensRequest) => T; converse: (value: ConverseTokensRequest) => T; _: (name: string, value: any) => T; } } /** * @public */ interface CountTokensRequest { /** *

The unique identifier or ARN of the foundation model to use for token counting. Each model processes tokens differently, so the token count is specific to the model you specify.

* @public */ modelId: string | undefined; /** *

The input for which to count tokens. The structure of this parameter depends on whether you're counting tokens for an InvokeModel or Converse request:

  • For InvokeModel requests, provide the request body in the invokeModel field

  • For Converse requests, provide the messages and system content in the converse field

The input format must be compatible with the model specified in the modelId parameter.

* @public */ input: CountTokensInput | undefined; } /** * @public */ interface CountTokensResponse { /** *

The number of tokens in the provided input according to the specified model's tokenization rules. This count represents the number of input tokens that would be processed if the same input were sent to the model in an inference request. Use this value to estimate costs and ensure your inputs stay within model token limits.

* @public */ inputTokens: number | undefined; } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+client-bedrock-runtime@3.1111.0/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/commands/ApplyGuardrailCommand.d.ts /** * @public * * The input for {@link ApplyGuardrailCommand}. */ interface ApplyGuardrailCommandInput extends ApplyGuardrailRequest {} /** * @public * * The output of {@link ApplyGuardrailCommand}. */ interface ApplyGuardrailCommandOutput extends ApplyGuardrailResponse, MetadataBearer {} declare const ApplyGuardrailCommand_base: { new (input: ApplyGuardrailCommandInput): CommandImpl; new (input: ApplyGuardrailCommandInput): CommandImpl; getEndpointParameterInstructions(): EndpointParameterInstructions; }; /** *

The action to apply a guardrail.

For troubleshooting some of the common errors you might encounter when using the ApplyGuardrail API, see Troubleshooting Amazon Bedrock API Error Codes in the Amazon Bedrock User Guide

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { BedrockRuntimeClient, ApplyGuardrailCommand } from "@aws-sdk/client-bedrock-runtime"; // ES Modules import * // const { BedrockRuntimeClient, ApplyGuardrailCommand } = require("@aws-sdk/client-bedrock-runtime"); // CommonJS import * // import type { BedrockRuntimeClientConfig } from "@aws-sdk/client-bedrock-runtime"; * const config = {}; // type is BedrockRuntimeClientConfig * const client = new BedrockRuntimeClient(config); * const input = { // ApplyGuardrailRequest * guardrailIdentifier: "STRING_VALUE", // required * guardrailVersion: "STRING_VALUE", // required * source: "INPUT" || "OUTPUT", // required * content: [ // GuardrailContentBlockList // required * { // GuardrailContentBlock Union: only one key present * text: { // GuardrailTextBlock * text: "STRING_VALUE", // required * qualifiers: [ // GuardrailContentQualifierList * "grounding_source" || "query" || "guard_content", * ], * }, * image: { // GuardrailImageBlock * format: "png" || "jpeg", // required * source: { // GuardrailImageSource Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * }, * }, * }, * ], * outputScope: "INTERVENTIONS" || "FULL", * }; * const command = new ApplyGuardrailCommand(input); * const response = await client.send(command); * // { // ApplyGuardrailResponse * // usage: { // GuardrailUsage * // topicPolicyUnits: Number("int"), // required * // contentPolicyUnits: Number("int"), // required * // wordPolicyUnits: Number("int"), // required * // sensitiveInformationPolicyUnits: Number("int"), // required * // sensitiveInformationPolicyFreeUnits: Number("int"), // required * // contextualGroundingPolicyUnits: Number("int"), // required * // contentPolicyImageUnits: Number("int"), * // automatedReasoningPolicyUnits: Number("int"), * // automatedReasoningPolicies: Number("int"), * // }, * // action: "NONE" || "GUARDRAIL_INTERVENED", // required * // actionReason: "STRING_VALUE", * // outputs: [ // GuardrailOutputContentList // required * // { // GuardrailOutputContent * // text: "STRING_VALUE", * // }, * // ], * // assessments: [ // GuardrailAssessmentList // required * // { // GuardrailAssessment * // topicPolicy: { // GuardrailTopicPolicyAssessment * // topics: [ // GuardrailTopicList // required * // { // GuardrailTopic * // name: "STRING_VALUE", // required * // type: "DENY", // required * // action: "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // }, * // contentPolicy: { // GuardrailContentPolicyAssessment * // filters: [ // GuardrailContentFilterList // required * // { // GuardrailContentFilter * // type: "INSULTS" || "HATE" || "SEXUAL" || "VIOLENCE" || "MISCONDUCT" || "PROMPT_ATTACK", // required * // confidence: "NONE" || "LOW" || "MEDIUM" || "HIGH", // required * // filterStrength: "NONE" || "LOW" || "MEDIUM" || "HIGH", * // action: "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // }, * // wordPolicy: { // GuardrailWordPolicyAssessment * // customWords: [ // GuardrailCustomWordList // required * // { // GuardrailCustomWord * // match: "STRING_VALUE", // required * // action: "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // managedWordLists: [ // GuardrailManagedWordList // required * // { // GuardrailManagedWord * // match: "STRING_VALUE", // required * // type: "PROFANITY", // required * // action: "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // }, * // sensitiveInformationPolicy: { // GuardrailSensitiveInformationPolicyAssessment * // piiEntities: [ // GuardrailPiiEntityFilterList // required * // { // GuardrailPiiEntityFilter * // match: "STRING_VALUE", // required * // type: "ADDRESS" || "AGE" || "AWS_ACCESS_KEY" || "AWS_SECRET_KEY" || "CA_HEALTH_NUMBER" || "CA_SOCIAL_INSURANCE_NUMBER" || "CREDIT_DEBIT_CARD_CVV" || "CREDIT_DEBIT_CARD_EXPIRY" || "CREDIT_DEBIT_CARD_NUMBER" || "DRIVER_ID" || "EMAIL" || "INTERNATIONAL_BANK_ACCOUNT_NUMBER" || "IP_ADDRESS" || "LICENSE_PLATE" || "MAC_ADDRESS" || "NAME" || "PASSWORD" || "PHONE" || "PIN" || "SWIFT_CODE" || "UK_NATIONAL_HEALTH_SERVICE_NUMBER" || "UK_NATIONAL_INSURANCE_NUMBER" || "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER" || "URL" || "USERNAME" || "US_BANK_ACCOUNT_NUMBER" || "US_BANK_ROUTING_NUMBER" || "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER" || "US_PASSPORT_NUMBER" || "US_SOCIAL_SECURITY_NUMBER" || "VEHICLE_IDENTIFICATION_NUMBER", // required * // action: "ANONYMIZED" || "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // regexes: [ // GuardrailRegexFilterList // required * // { // GuardrailRegexFilter * // name: "STRING_VALUE", * // match: "STRING_VALUE", * // regex: "STRING_VALUE", * // action: "ANONYMIZED" || "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // }, * // contextualGroundingPolicy: { // GuardrailContextualGroundingPolicyAssessment * // filters: [ // GuardrailContextualGroundingFilters * // { // GuardrailContextualGroundingFilter * // type: "GROUNDING" || "RELEVANCE", // required * // threshold: Number("double"), // required * // score: Number("double"), // required * // action: "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // }, * // automatedReasoningPolicy: { // GuardrailAutomatedReasoningPolicyAssessment * // findings: [ // GuardrailAutomatedReasoningFindingList * // { // GuardrailAutomatedReasoningFinding Union: only one key present * // valid: { // GuardrailAutomatedReasoningValidFinding * // translation: { // GuardrailAutomatedReasoningTranslation * // premises: [ // GuardrailAutomatedReasoningStatementList * // { // GuardrailAutomatedReasoningStatement * // logic: "STRING_VALUE", * // naturalLanguage: "STRING_VALUE", * // }, * // ], * // claims: [ * // { * // logic: "STRING_VALUE", * // naturalLanguage: "STRING_VALUE", * // }, * // ], * // untranslatedPremises: [ // GuardrailAutomatedReasoningInputTextReferenceList * // { // GuardrailAutomatedReasoningInputTextReference * // text: "STRING_VALUE", * // }, * // ], * // untranslatedClaims: [ * // { * // text: "STRING_VALUE", * // }, * // ], * // confidence: Number("double"), * // }, * // claimsTrueScenario: { // GuardrailAutomatedReasoningScenario * // statements: [ * // { * // logic: "STRING_VALUE", * // naturalLanguage: "STRING_VALUE", * // }, * // ], * // }, * // supportingRules: [ // GuardrailAutomatedReasoningRuleList * // { // GuardrailAutomatedReasoningRule * // identifier: "STRING_VALUE", * // policyVersionArn: "STRING_VALUE", * // }, * // ], * // logicWarning: { // GuardrailAutomatedReasoningLogicWarning * // type: "ALWAYS_FALSE" || "ALWAYS_TRUE", * // premises: [ * // { * // logic: "STRING_VALUE", * // naturalLanguage: "STRING_VALUE", * // }, * // ], * // claims: [ * // { * // logic: "STRING_VALUE", * // naturalLanguage: "STRING_VALUE", * // }, * // ], * // }, * // }, * // invalid: { // GuardrailAutomatedReasoningInvalidFinding * // translation: { * // premises: "", * // claims: "", * // untranslatedPremises: [ * // { * // text: "STRING_VALUE", * // }, * // ], * // untranslatedClaims: [ * // { * // text: "STRING_VALUE", * // }, * // ], * // confidence: Number("double"), * // }, * // contradictingRules: [ * // { * // identifier: "STRING_VALUE", * // policyVersionArn: "STRING_VALUE", * // }, * // ], * // logicWarning: { * // type: "ALWAYS_FALSE" || "ALWAYS_TRUE", * // premises: "", * // claims: "", * // }, * // }, * // satisfiable: { // GuardrailAutomatedReasoningSatisfiableFinding * // translation: { * // premises: "", * // claims: "", * // untranslatedPremises: [ * // { * // text: "STRING_VALUE", * // }, * // ], * // untranslatedClaims: "", * // confidence: Number("double"), * // }, * // claimsTrueScenario: { * // statements: "", * // }, * // claimsFalseScenario: { * // statements: "", * // }, * // logicWarning: { * // type: "ALWAYS_FALSE" || "ALWAYS_TRUE", * // premises: "", * // claims: "", * // }, * // }, * // impossible: { // GuardrailAutomatedReasoningImpossibleFinding * // translation: { * // premises: "", * // claims: "", * // untranslatedPremises: "", * // untranslatedClaims: "", * // confidence: Number("double"), * // }, * // contradictingRules: [ * // { * // identifier: "STRING_VALUE", * // policyVersionArn: "STRING_VALUE", * // }, * // ], * // logicWarning: { * // type: "ALWAYS_FALSE" || "ALWAYS_TRUE", * // premises: "", * // claims: "", * // }, * // }, * // translationAmbiguous: { // GuardrailAutomatedReasoningTranslationAmbiguousFinding * // options: [ // GuardrailAutomatedReasoningTranslationOptionList * // { // GuardrailAutomatedReasoningTranslationOption * // translations: [ // GuardrailAutomatedReasoningTranslationList * // { * // premises: "", * // claims: "", * // untranslatedPremises: "", * // untranslatedClaims: "", * // confidence: Number("double"), * // }, * // ], * // }, * // ], * // differenceScenarios: [ // GuardrailAutomatedReasoningDifferenceScenarioList * // { * // statements: "", * // }, * // ], * // }, * // tooComplex: {}, * // noTranslations: {}, * // }, * // ], * // }, * // invocationMetrics: { // GuardrailInvocationMetrics * // guardrailProcessingLatency: Number("long"), * // usage: { * // topicPolicyUnits: Number("int"), // required * // contentPolicyUnits: Number("int"), // required * // wordPolicyUnits: Number("int"), // required * // sensitiveInformationPolicyUnits: Number("int"), // required * // sensitiveInformationPolicyFreeUnits: Number("int"), // required * // contextualGroundingPolicyUnits: Number("int"), // required * // contentPolicyImageUnits: Number("int"), * // automatedReasoningPolicyUnits: Number("int"), * // automatedReasoningPolicies: Number("int"), * // }, * // guardrailCoverage: { // GuardrailCoverage * // textCharacters: { // GuardrailTextCharactersCoverage * // guarded: Number("int"), * // total: Number("int"), * // }, * // images: { // GuardrailImageCoverage * // guarded: Number("int"), * // total: Number("int"), * // }, * // }, * // }, * // appliedGuardrailDetails: { // AppliedGuardrailDetails * // guardrailId: "STRING_VALUE", * // guardrailVersion: "STRING_VALUE", * // guardrailArn: "STRING_VALUE", * // guardrailOrigin: [ // GuardrailOriginList * // "REQUEST" || "ACCOUNT_ENFORCED" || "ORGANIZATION_ENFORCED", * // ], * // guardrailOwnership: "SELF" || "CROSS_ACCOUNT", * // }, * // }, * // ], * // guardrailCoverage: { * // textCharacters: { * // guarded: Number("int"), * // total: Number("int"), * // }, * // images: { * // guarded: Number("int"), * // total: Number("int"), * // }, * // }, * // }; * * ``` * * @param ApplyGuardrailCommandInput - {@link ApplyGuardrailCommandInput} * @returns {@link ApplyGuardrailCommandOutput} * @see {@link ApplyGuardrailCommandInput} for command's `input` shape. * @see {@link ApplyGuardrailCommandOutput} for command's `response` shape. * @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape. * * @throws {@link AccessDeniedException} (client fault) *

The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see AccessDeniedException in the Amazon Bedrock User Guide

* * @throws {@link InternalServerException} (server fault) *

An internal server error occurred. For troubleshooting this error, see InternalFailure in the Amazon Bedrock User Guide

* * @throws {@link ResourceNotFoundException} (client fault) *

The specified resource ARN was not found. For troubleshooting this error, see ResourceNotFound in the Amazon Bedrock User Guide

* * @throws {@link ServiceQuotaExceededException} (client fault) *

Your request exceeds the service quota for your account. You can view your quotas at Viewing service quotas. You can resubmit your request later.

* * @throws {@link ServiceUnavailableException} (server fault) *

The service isn't currently available. For troubleshooting this error, see ServiceUnavailable in the Amazon Bedrock User Guide

* * @throws {@link ThrottlingException} (client fault) *

Your request was denied due to exceeding the account quotas for Amazon Bedrock. For troubleshooting this error, see ThrottlingException in the Amazon Bedrock User Guide

* * @throws {@link ValidationException} (client fault) *

The input fails to satisfy the constraints specified by Amazon Bedrock. For troubleshooting this error, see ValidationError in the Amazon Bedrock User Guide

* * @throws {@link BedrockRuntimeServiceException} *

Base exception class for all service exceptions from BedrockRuntime service.

* * * @public */ declare class ApplyGuardrailCommand extends ApplyGuardrailCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: ApplyGuardrailRequest; output: ApplyGuardrailResponse; }; sdk: { input: ApplyGuardrailCommandInput; output: ApplyGuardrailCommandOutput; }; }; } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+client-bedrock-runtime@3.1111.0/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/commands/ConverseCommand.d.ts /** * @public * * The input for {@link ConverseCommand}. */ interface ConverseCommandInput extends ConverseRequest {} /** * @public * * The output of {@link ConverseCommand}. */ interface ConverseCommandOutput extends ConverseResponse, MetadataBearer {} declare const ConverseCommand_base: { new (input: ConverseCommandInput): CommandImpl; new (input: ConverseCommandInput): CommandImpl; getEndpointParameterInstructions(): EndpointParameterInstructions; }; /** *

Sends messages to the specified Amazon Bedrock model. Converse provides a consistent interface that works with all models that support messages. This allows you to write code once and use it with different models. If a model has unique inference parameters, you can also pass those unique parameters to the model.

Amazon Bedrock doesn't store any text, images, or documents that you provide as content. The data is only used to generate the response.

You can submit a prompt by including it in the messages field, specifying the modelId of a foundation model or inference profile to run inference on it, and including any other fields that are relevant to your use case.

You can also submit a prompt from Prompt management by specifying the ARN of the prompt version and including a map of variables to values in the promptVariables field. You can append more messages to the prompt by using the messages field. If you use a prompt from Prompt management, you can't include the following fields in the request: additionalModelRequestFields, inferenceConfig, system, or toolConfig. Instead, these fields must be defined through Prompt management. For more information, see Use a prompt from Prompt management.

For information about the Converse API, see Use the Converse API in the Amazon Bedrock User Guide. To use a guardrail, see Use a guardrail with the Converse API in the Amazon Bedrock User Guide. To use a tool with a model, see Tool use (Function calling) in the Amazon Bedrock User Guide

For example code, see Converse API examples in the Amazon Bedrock User Guide.

This operation requires permission for the bedrock:InvokeModel action.

To deny all inference access to resources that you specify in the modelId field, you need to deny access to the bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream actions. Doing this also denies access to the resource through the base inference actions (InvokeModel and InvokeModelWithResponseStream). For more information see Deny access for inference on specific models.

For troubleshooting some of the common errors you might encounter when using the Converse API, see Troubleshooting Amazon Bedrock API Error Codes in the Amazon Bedrock User Guide

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { BedrockRuntimeClient, ConverseCommand } from "@aws-sdk/client-bedrock-runtime"; // ES Modules import * // const { BedrockRuntimeClient, ConverseCommand } = require("@aws-sdk/client-bedrock-runtime"); // CommonJS import * // import type { BedrockRuntimeClientConfig } from "@aws-sdk/client-bedrock-runtime"; * const config = {}; // type is BedrockRuntimeClientConfig * const client = new BedrockRuntimeClient(config); * const input = { // ConverseRequest * modelId: "STRING_VALUE", // required * messages: [ // Messages * { // Message * role: "user" || "assistant" || "system", // required * content: [ // ContentBlocks // required * { // ContentBlock Union: only one key present * text: "STRING_VALUE", * image: { // ImageBlock * format: "png" || "jpeg" || "gif" || "webp", // required * source: { // ImageSource Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * s3Location: { // S3Location * uri: "STRING_VALUE", // required * bucketOwner: "STRING_VALUE", * }, * }, * error: { // ErrorBlock * message: "STRING_VALUE", * }, * }, * document: { // DocumentBlock * format: "pdf" || "csv" || "doc" || "docx" || "xls" || "xlsx" || "html" || "txt" || "md", * name: "STRING_VALUE", // required * source: { // DocumentSource Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * s3Location: { * uri: "STRING_VALUE", // required * bucketOwner: "STRING_VALUE", * }, * text: "STRING_VALUE", * content: [ // DocumentContentBlocks * { // DocumentContentBlock Union: only one key present * text: "STRING_VALUE", * }, * ], * }, * context: "STRING_VALUE", * citations: { // CitationsConfig * enabled: true || false, // required * }, * }, * video: { // VideoBlock * format: "mkv" || "mov" || "mp4" || "webm" || "flv" || "mpeg" || "mpg" || "wmv" || "three_gp", // required * source: { // VideoSource Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * s3Location: { * uri: "STRING_VALUE", // required * bucketOwner: "STRING_VALUE", * }, * }, * }, * audio: { // AudioBlock * format: "mp3" || "opus" || "wav" || "aac" || "flac" || "mp4" || "ogg" || "mkv" || "mka" || "x-aac" || "m4a" || "mpeg" || "mpga" || "pcm" || "webm", // required * source: { // AudioSource Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * s3Location: { * uri: "STRING_VALUE", // required * bucketOwner: "STRING_VALUE", * }, * }, * error: { * message: "STRING_VALUE", * }, * }, * toolUse: { // ToolUseBlock * toolUseId: "STRING_VALUE", // required * name: "STRING_VALUE", // required * input: "DOCUMENT_VALUE", // required * type: "server_tool_use", * }, * toolResult: { // ToolResultBlock * toolUseId: "STRING_VALUE", // required * content: [ // ToolResultContentBlocks // required * { // ToolResultContentBlock Union: only one key present * json: "DOCUMENT_VALUE", * text: "STRING_VALUE", * image: { * format: "png" || "jpeg" || "gif" || "webp", // required * source: {// Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * s3Location: { * uri: "STRING_VALUE", // required * bucketOwner: "STRING_VALUE", * }, * }, * error: { * message: "STRING_VALUE", * }, * }, * document: { * format: "pdf" || "csv" || "doc" || "docx" || "xls" || "xlsx" || "html" || "txt" || "md", * name: "STRING_VALUE", // required * source: {// Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * s3Location: "", * text: "STRING_VALUE", * content: [ * {// Union: only one key present * text: "STRING_VALUE", * }, * ], * }, * context: "STRING_VALUE", * citations: { * enabled: true || false, // required * }, * }, * video: { * format: "mkv" || "mov" || "mp4" || "webm" || "flv" || "mpeg" || "mpg" || "wmv" || "three_gp", // required * source: {// Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * s3Location: "", * }, * }, * searchResult: { // SearchResultBlock * source: "STRING_VALUE", // required * title: "STRING_VALUE", // required * content: [ // SearchResultContentBlocks // required * { // SearchResultContentBlock * text: "STRING_VALUE", // required * }, * ], * citations: { * enabled: true || false, // required * }, * }, * }, * ], * status: "success" || "error", * type: "STRING_VALUE", * }, * guardContent: { // GuardrailConverseContentBlock Union: only one key present * text: { // GuardrailConverseTextBlock * text: "STRING_VALUE", // required * qualifiers: [ // GuardrailConverseContentQualifierList * "grounding_source" || "query" || "guard_content", * ], * }, * image: { // GuardrailConverseImageBlock * format: "png" || "jpeg", // required * source: { // GuardrailConverseImageSource Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * }, * }, * }, * cachePoint: { // CachePointBlock * type: "default", // required * ttl: "5m" || "1h", * }, * reasoningContent: { // ReasoningContentBlock Union: only one key present * reasoningText: { // ReasoningTextBlock * text: "STRING_VALUE", // required * signature: "STRING_VALUE", * }, * redactedContent: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * }, * citationsContent: { // CitationsContentBlock * content: [ // CitationGeneratedContentList * { // CitationGeneratedContent Union: only one key present * text: "STRING_VALUE", * }, * ], * citations: [ // Citations * { // Citation * title: "STRING_VALUE", * source: "STRING_VALUE", * sourceContent: [ // CitationSourceContentList * { // CitationSourceContent Union: only one key present * text: "STRING_VALUE", * }, * ], * location: { // CitationLocation Union: only one key present * web: { // WebLocation * url: "STRING_VALUE", * domain: "STRING_VALUE", * }, * documentChar: { // DocumentCharLocation * documentIndex: Number("int"), * start: Number("int"), * end: Number("int"), * }, * documentPage: { // DocumentPageLocation * documentIndex: Number("int"), * start: Number("int"), * end: Number("int"), * }, * documentChunk: { // DocumentChunkLocation * documentIndex: Number("int"), * start: Number("int"), * end: Number("int"), * }, * searchResultLocation: { // SearchResultLocation * searchResultIndex: Number("int"), * start: Number("int"), * end: Number("int"), * }, * }, * }, * ], * }, * searchResult: { * source: "STRING_VALUE", // required * title: "STRING_VALUE", // required * content: [ // required * { * text: "STRING_VALUE", // required * }, * ], * citations: { * enabled: true || false, // required * }, * }, * toolAddition: { // ToolAdditionBlock * tool: { // ToolReference * type: "STRING_VALUE", * name: "STRING_VALUE", * serverName: "STRING_VALUE", * }, * }, * toolRemoval: { // ToolRemovalBlock * tool: { * type: "STRING_VALUE", * name: "STRING_VALUE", * serverName: "STRING_VALUE", * }, * }, * }, * ], * }, * ], * system: [ // SystemContentBlocks * { // SystemContentBlock Union: only one key present * text: "STRING_VALUE", * guardContent: {// Union: only one key present * text: { * text: "STRING_VALUE", // required * qualifiers: [ * "grounding_source" || "query" || "guard_content", * ], * }, * image: { * format: "png" || "jpeg", // required * source: {// Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * }, * }, * }, * cachePoint: { * type: "default", // required * ttl: "5m" || "1h", * }, * }, * ], * inferenceConfig: { // InferenceConfiguration * maxTokens: Number("int"), * temperature: Number("float"), * topP: Number("float"), * stopSequences: [ // NonEmptyStringList * "STRING_VALUE", * ], * }, * toolConfig: { // ToolConfiguration * tools: [ // Tools // required * { // Tool Union: only one key present * toolSpec: { // ToolSpecification * name: "STRING_VALUE", // required * description: "STRING_VALUE", * inputSchema: { // ToolInputSchema Union: only one key present * json: "DOCUMENT_VALUE", * }, * strict: true || false, * }, * systemTool: { // SystemTool * name: "STRING_VALUE", // required * }, * cachePoint: "", * }, * ], * toolChoice: { // ToolChoice Union: only one key present * auto: {}, * any: {}, * tool: { // SpecificToolChoice * name: "STRING_VALUE", // required * }, * }, * }, * guardrailConfig: { // GuardrailConfiguration * guardrailIdentifier: "STRING_VALUE", * guardrailVersion: "STRING_VALUE", * trace: "enabled" || "disabled" || "enabled_full", * }, * additionalModelRequestFields: "DOCUMENT_VALUE", * promptVariables: { // PromptVariableMap * "": { // PromptVariableValues Union: only one key present * text: "STRING_VALUE", * }, * }, * additionalModelResponseFieldPaths: [ // AdditionalModelResponseFieldPaths * "STRING_VALUE", * ], * requestMetadata: { // RequestMetadata * "": "STRING_VALUE", * }, * performanceConfig: { // PerformanceConfiguration * latency: "standard" || "optimized", * }, * serviceTier: { // ServiceTier * type: "priority" || "default" || "flex" || "reserved", // required * }, * outputConfig: { // OutputConfig * textFormat: { // OutputFormat * type: "json_schema", // required * structure: { // OutputFormatStructure Union: only one key present * jsonSchema: { // JsonSchemaDefinition * schema: "STRING_VALUE", // required * name: "STRING_VALUE", * description: "STRING_VALUE", * }, * }, * }, * effort: "STRING_VALUE", * }, * }; * const command = new ConverseCommand(input); * const response = await client.send(command); * // { // ConverseResponse * // output: { // ConverseOutput Union: only one key present * // message: { // Message * // role: "user" || "assistant" || "system", // required * // content: [ // ContentBlocks // required * // { // ContentBlock Union: only one key present * // text: "STRING_VALUE", * // image: { // ImageBlock * // format: "png" || "jpeg" || "gif" || "webp", // required * // source: { // ImageSource Union: only one key present * // bytes: new Uint8Array(), * // s3Location: { // S3Location * // uri: "STRING_VALUE", // required * // bucketOwner: "STRING_VALUE", * // }, * // }, * // error: { // ErrorBlock * // message: "STRING_VALUE", * // }, * // }, * // document: { // DocumentBlock * // format: "pdf" || "csv" || "doc" || "docx" || "xls" || "xlsx" || "html" || "txt" || "md", * // name: "STRING_VALUE", // required * // source: { // DocumentSource Union: only one key present * // bytes: new Uint8Array(), * // s3Location: { * // uri: "STRING_VALUE", // required * // bucketOwner: "STRING_VALUE", * // }, * // text: "STRING_VALUE", * // content: [ // DocumentContentBlocks * // { // DocumentContentBlock Union: only one key present * // text: "STRING_VALUE", * // }, * // ], * // }, * // context: "STRING_VALUE", * // citations: { // CitationsConfig * // enabled: true || false, // required * // }, * // }, * // video: { // VideoBlock * // format: "mkv" || "mov" || "mp4" || "webm" || "flv" || "mpeg" || "mpg" || "wmv" || "three_gp", // required * // source: { // VideoSource Union: only one key present * // bytes: new Uint8Array(), * // s3Location: { * // uri: "STRING_VALUE", // required * // bucketOwner: "STRING_VALUE", * // }, * // }, * // }, * // audio: { // AudioBlock * // format: "mp3" || "opus" || "wav" || "aac" || "flac" || "mp4" || "ogg" || "mkv" || "mka" || "x-aac" || "m4a" || "mpeg" || "mpga" || "pcm" || "webm", // required * // source: { // AudioSource Union: only one key present * // bytes: new Uint8Array(), * // s3Location: { * // uri: "STRING_VALUE", // required * // bucketOwner: "STRING_VALUE", * // }, * // }, * // error: { * // message: "STRING_VALUE", * // }, * // }, * // toolUse: { // ToolUseBlock * // toolUseId: "STRING_VALUE", // required * // name: "STRING_VALUE", // required * // input: "DOCUMENT_VALUE", // required * // type: "server_tool_use", * // }, * // toolResult: { // ToolResultBlock * // toolUseId: "STRING_VALUE", // required * // content: [ // ToolResultContentBlocks // required * // { // ToolResultContentBlock Union: only one key present * // json: "DOCUMENT_VALUE", * // text: "STRING_VALUE", * // image: { * // format: "png" || "jpeg" || "gif" || "webp", // required * // source: {// Union: only one key present * // bytes: new Uint8Array(), * // s3Location: { * // uri: "STRING_VALUE", // required * // bucketOwner: "STRING_VALUE", * // }, * // }, * // error: { * // message: "STRING_VALUE", * // }, * // }, * // document: { * // format: "pdf" || "csv" || "doc" || "docx" || "xls" || "xlsx" || "html" || "txt" || "md", * // name: "STRING_VALUE", // required * // source: {// Union: only one key present * // bytes: new Uint8Array(), * // s3Location: "", * // text: "STRING_VALUE", * // content: [ * // {// Union: only one key present * // text: "STRING_VALUE", * // }, * // ], * // }, * // context: "STRING_VALUE", * // citations: { * // enabled: true || false, // required * // }, * // }, * // video: { * // format: "mkv" || "mov" || "mp4" || "webm" || "flv" || "mpeg" || "mpg" || "wmv" || "three_gp", // required * // source: {// Union: only one key present * // bytes: new Uint8Array(), * // s3Location: "", * // }, * // }, * // searchResult: { // SearchResultBlock * // source: "STRING_VALUE", // required * // title: "STRING_VALUE", // required * // content: [ // SearchResultContentBlocks // required * // { // SearchResultContentBlock * // text: "STRING_VALUE", // required * // }, * // ], * // citations: { * // enabled: true || false, // required * // }, * // }, * // }, * // ], * // status: "success" || "error", * // type: "STRING_VALUE", * // }, * // guardContent: { // GuardrailConverseContentBlock Union: only one key present * // text: { // GuardrailConverseTextBlock * // text: "STRING_VALUE", // required * // qualifiers: [ // GuardrailConverseContentQualifierList * // "grounding_source" || "query" || "guard_content", * // ], * // }, * // image: { // GuardrailConverseImageBlock * // format: "png" || "jpeg", // required * // source: { // GuardrailConverseImageSource Union: only one key present * // bytes: new Uint8Array(), * // }, * // }, * // }, * // cachePoint: { // CachePointBlock * // type: "default", // required * // ttl: "5m" || "1h", * // }, * // reasoningContent: { // ReasoningContentBlock Union: only one key present * // reasoningText: { // ReasoningTextBlock * // text: "STRING_VALUE", // required * // signature: "STRING_VALUE", * // }, * // redactedContent: new Uint8Array(), * // }, * // citationsContent: { // CitationsContentBlock * // content: [ // CitationGeneratedContentList * // { // CitationGeneratedContent Union: only one key present * // text: "STRING_VALUE", * // }, * // ], * // citations: [ // Citations * // { // Citation * // title: "STRING_VALUE", * // source: "STRING_VALUE", * // sourceContent: [ // CitationSourceContentList * // { // CitationSourceContent Union: only one key present * // text: "STRING_VALUE", * // }, * // ], * // location: { // CitationLocation Union: only one key present * // web: { // WebLocation * // url: "STRING_VALUE", * // domain: "STRING_VALUE", * // }, * // documentChar: { // DocumentCharLocation * // documentIndex: Number("int"), * // start: Number("int"), * // end: Number("int"), * // }, * // documentPage: { // DocumentPageLocation * // documentIndex: Number("int"), * // start: Number("int"), * // end: Number("int"), * // }, * // documentChunk: { // DocumentChunkLocation * // documentIndex: Number("int"), * // start: Number("int"), * // end: Number("int"), * // }, * // searchResultLocation: { // SearchResultLocation * // searchResultIndex: Number("int"), * // start: Number("int"), * // end: Number("int"), * // }, * // }, * // }, * // ], * // }, * // searchResult: { * // source: "STRING_VALUE", // required * // title: "STRING_VALUE", // required * // content: [ // required * // { * // text: "STRING_VALUE", // required * // }, * // ], * // citations: { * // enabled: true || false, // required * // }, * // }, * // toolAddition: { // ToolAdditionBlock * // tool: { // ToolReference * // type: "STRING_VALUE", * // name: "STRING_VALUE", * // serverName: "STRING_VALUE", * // }, * // }, * // toolRemoval: { // ToolRemovalBlock * // tool: { * // type: "STRING_VALUE", * // name: "STRING_VALUE", * // serverName: "STRING_VALUE", * // }, * // }, * // }, * // ], * // }, * // }, * // stopReason: "end_turn" || "tool_use" || "max_tokens" || "stop_sequence" || "guardrail_intervened" || "content_filtered" || "malformed_model_output" || "malformed_tool_use" || "model_context_window_exceeded", // required * // usage: { // TokenUsage * // inputTokens: Number("int"), // required * // outputTokens: Number("int"), // required * // totalTokens: Number("int"), // required * // cacheReadInputTokens: Number("int"), * // cacheWriteInputTokens: Number("int"), * // cacheDetails: [ // CacheDetailsList * // { // CacheDetail * // ttl: "5m" || "1h", // required * // inputTokens: Number("int"), // required * // }, * // ], * // }, * // metrics: { // ConverseMetrics * // latencyMs: Number("long"), // required * // }, * // additionalModelResponseFields: "DOCUMENT_VALUE", * // trace: { // ConverseTrace * // guardrail: { // GuardrailTraceAssessment * // modelOutput: [ // ModelOutputs * // "STRING_VALUE", * // ], * // inputAssessment: { // GuardrailAssessmentMap * // "": { // GuardrailAssessment * // topicPolicy: { // GuardrailTopicPolicyAssessment * // topics: [ // GuardrailTopicList // required * // { // GuardrailTopic * // name: "STRING_VALUE", // required * // type: "DENY", // required * // action: "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // }, * // contentPolicy: { // GuardrailContentPolicyAssessment * // filters: [ // GuardrailContentFilterList // required * // { // GuardrailContentFilter * // type: "INSULTS" || "HATE" || "SEXUAL" || "VIOLENCE" || "MISCONDUCT" || "PROMPT_ATTACK", // required * // confidence: "NONE" || "LOW" || "MEDIUM" || "HIGH", // required * // filterStrength: "NONE" || "LOW" || "MEDIUM" || "HIGH", * // action: "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // }, * // wordPolicy: { // GuardrailWordPolicyAssessment * // customWords: [ // GuardrailCustomWordList // required * // { // GuardrailCustomWord * // match: "STRING_VALUE", // required * // action: "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // managedWordLists: [ // GuardrailManagedWordList // required * // { // GuardrailManagedWord * // match: "STRING_VALUE", // required * // type: "PROFANITY", // required * // action: "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // }, * // sensitiveInformationPolicy: { // GuardrailSensitiveInformationPolicyAssessment * // piiEntities: [ // GuardrailPiiEntityFilterList // required * // { // GuardrailPiiEntityFilter * // match: "STRING_VALUE", // required * // type: "ADDRESS" || "AGE" || "AWS_ACCESS_KEY" || "AWS_SECRET_KEY" || "CA_HEALTH_NUMBER" || "CA_SOCIAL_INSURANCE_NUMBER" || "CREDIT_DEBIT_CARD_CVV" || "CREDIT_DEBIT_CARD_EXPIRY" || "CREDIT_DEBIT_CARD_NUMBER" || "DRIVER_ID" || "EMAIL" || "INTERNATIONAL_BANK_ACCOUNT_NUMBER" || "IP_ADDRESS" || "LICENSE_PLATE" || "MAC_ADDRESS" || "NAME" || "PASSWORD" || "PHONE" || "PIN" || "SWIFT_CODE" || "UK_NATIONAL_HEALTH_SERVICE_NUMBER" || "UK_NATIONAL_INSURANCE_NUMBER" || "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER" || "URL" || "USERNAME" || "US_BANK_ACCOUNT_NUMBER" || "US_BANK_ROUTING_NUMBER" || "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER" || "US_PASSPORT_NUMBER" || "US_SOCIAL_SECURITY_NUMBER" || "VEHICLE_IDENTIFICATION_NUMBER", // required * // action: "ANONYMIZED" || "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // regexes: [ // GuardrailRegexFilterList // required * // { // GuardrailRegexFilter * // name: "STRING_VALUE", * // match: "STRING_VALUE", * // regex: "STRING_VALUE", * // action: "ANONYMIZED" || "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // }, * // contextualGroundingPolicy: { // GuardrailContextualGroundingPolicyAssessment * // filters: [ // GuardrailContextualGroundingFilters * // { // GuardrailContextualGroundingFilter * // type: "GROUNDING" || "RELEVANCE", // required * // threshold: Number("double"), // required * // score: Number("double"), // required * // action: "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // }, * // automatedReasoningPolicy: { // GuardrailAutomatedReasoningPolicyAssessment * // findings: [ // GuardrailAutomatedReasoningFindingList * // { // GuardrailAutomatedReasoningFinding Union: only one key present * // valid: { // GuardrailAutomatedReasoningValidFinding * // translation: { // GuardrailAutomatedReasoningTranslation * // premises: [ // GuardrailAutomatedReasoningStatementList * // { // GuardrailAutomatedReasoningStatement * // logic: "STRING_VALUE", * // naturalLanguage: "STRING_VALUE", * // }, * // ], * // claims: [ * // { * // logic: "STRING_VALUE", * // naturalLanguage: "STRING_VALUE", * // }, * // ], * // untranslatedPremises: [ // GuardrailAutomatedReasoningInputTextReferenceList * // { // GuardrailAutomatedReasoningInputTextReference * // text: "STRING_VALUE", * // }, * // ], * // untranslatedClaims: [ * // { * // text: "STRING_VALUE", * // }, * // ], * // confidence: Number("double"), * // }, * // claimsTrueScenario: { // GuardrailAutomatedReasoningScenario * // statements: [ * // { * // logic: "STRING_VALUE", * // naturalLanguage: "STRING_VALUE", * // }, * // ], * // }, * // supportingRules: [ // GuardrailAutomatedReasoningRuleList * // { // GuardrailAutomatedReasoningRule * // identifier: "STRING_VALUE", * // policyVersionArn: "STRING_VALUE", * // }, * // ], * // logicWarning: { // GuardrailAutomatedReasoningLogicWarning * // type: "ALWAYS_FALSE" || "ALWAYS_TRUE", * // premises: [ * // { * // logic: "STRING_VALUE", * // naturalLanguage: "STRING_VALUE", * // }, * // ], * // claims: [ * // { * // logic: "STRING_VALUE", * // naturalLanguage: "STRING_VALUE", * // }, * // ], * // }, * // }, * // invalid: { // GuardrailAutomatedReasoningInvalidFinding * // translation: { * // premises: "", * // claims: "", * // untranslatedPremises: [ * // { * // text: "STRING_VALUE", * // }, * // ], * // untranslatedClaims: [ * // { * // text: "STRING_VALUE", * // }, * // ], * // confidence: Number("double"), * // }, * // contradictingRules: [ * // { * // identifier: "STRING_VALUE", * // policyVersionArn: "STRING_VALUE", * // }, * // ], * // logicWarning: { * // type: "ALWAYS_FALSE" || "ALWAYS_TRUE", * // premises: "", * // claims: "", * // }, * // }, * // satisfiable: { // GuardrailAutomatedReasoningSatisfiableFinding * // translation: { * // premises: "", * // claims: "", * // untranslatedPremises: [ * // { * // text: "STRING_VALUE", * // }, * // ], * // untranslatedClaims: "", * // confidence: Number("double"), * // }, * // claimsTrueScenario: { * // statements: "", * // }, * // claimsFalseScenario: { * // statements: "", * // }, * // logicWarning: { * // type: "ALWAYS_FALSE" || "ALWAYS_TRUE", * // premises: "", * // claims: "", * // }, * // }, * // impossible: { // GuardrailAutomatedReasoningImpossibleFinding * // translation: { * // premises: "", * // claims: "", * // untranslatedPremises: "", * // untranslatedClaims: "", * // confidence: Number("double"), * // }, * // contradictingRules: [ * // { * // identifier: "STRING_VALUE", * // policyVersionArn: "STRING_VALUE", * // }, * // ], * // logicWarning: { * // type: "ALWAYS_FALSE" || "ALWAYS_TRUE", * // premises: "", * // claims: "", * // }, * // }, * // translationAmbiguous: { // GuardrailAutomatedReasoningTranslationAmbiguousFinding * // options: [ // GuardrailAutomatedReasoningTranslationOptionList * // { // GuardrailAutomatedReasoningTranslationOption * // translations: [ // GuardrailAutomatedReasoningTranslationList * // { * // premises: "", * // claims: "", * // untranslatedPremises: "", * // untranslatedClaims: "", * // confidence: Number("double"), * // }, * // ], * // }, * // ], * // differenceScenarios: [ // GuardrailAutomatedReasoningDifferenceScenarioList * // { * // statements: "", * // }, * // ], * // }, * // tooComplex: {}, * // noTranslations: {}, * // }, * // ], * // }, * // invocationMetrics: { // GuardrailInvocationMetrics * // guardrailProcessingLatency: Number("long"), * // usage: { // GuardrailUsage * // topicPolicyUnits: Number("int"), // required * // contentPolicyUnits: Number("int"), // required * // wordPolicyUnits: Number("int"), // required * // sensitiveInformationPolicyUnits: Number("int"), // required * // sensitiveInformationPolicyFreeUnits: Number("int"), // required * // contextualGroundingPolicyUnits: Number("int"), // required * // contentPolicyImageUnits: Number("int"), * // automatedReasoningPolicyUnits: Number("int"), * // automatedReasoningPolicies: Number("int"), * // }, * // guardrailCoverage: { // GuardrailCoverage * // textCharacters: { // GuardrailTextCharactersCoverage * // guarded: Number("int"), * // total: Number("int"), * // }, * // images: { // GuardrailImageCoverage * // guarded: Number("int"), * // total: Number("int"), * // }, * // }, * // }, * // appliedGuardrailDetails: { // AppliedGuardrailDetails * // guardrailId: "STRING_VALUE", * // guardrailVersion: "STRING_VALUE", * // guardrailArn: "STRING_VALUE", * // guardrailOrigin: [ // GuardrailOriginList * // "REQUEST" || "ACCOUNT_ENFORCED" || "ORGANIZATION_ENFORCED", * // ], * // guardrailOwnership: "SELF" || "CROSS_ACCOUNT", * // }, * // }, * // }, * // outputAssessments: { // GuardrailAssessmentListMap * // "": [ // GuardrailAssessmentList * // { * // topicPolicy: { * // topics: [ // required * // { * // name: "STRING_VALUE", // required * // type: "DENY", // required * // action: "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // }, * // contentPolicy: { * // filters: [ // required * // { * // type: "INSULTS" || "HATE" || "SEXUAL" || "VIOLENCE" || "MISCONDUCT" || "PROMPT_ATTACK", // required * // confidence: "NONE" || "LOW" || "MEDIUM" || "HIGH", // required * // filterStrength: "NONE" || "LOW" || "MEDIUM" || "HIGH", * // action: "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // }, * // wordPolicy: { * // customWords: [ // required * // { * // match: "STRING_VALUE", // required * // action: "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // managedWordLists: [ // required * // { * // match: "STRING_VALUE", // required * // type: "PROFANITY", // required * // action: "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // }, * // sensitiveInformationPolicy: { * // piiEntities: [ // required * // { * // match: "STRING_VALUE", // required * // type: "ADDRESS" || "AGE" || "AWS_ACCESS_KEY" || "AWS_SECRET_KEY" || "CA_HEALTH_NUMBER" || "CA_SOCIAL_INSURANCE_NUMBER" || "CREDIT_DEBIT_CARD_CVV" || "CREDIT_DEBIT_CARD_EXPIRY" || "CREDIT_DEBIT_CARD_NUMBER" || "DRIVER_ID" || "EMAIL" || "INTERNATIONAL_BANK_ACCOUNT_NUMBER" || "IP_ADDRESS" || "LICENSE_PLATE" || "MAC_ADDRESS" || "NAME" || "PASSWORD" || "PHONE" || "PIN" || "SWIFT_CODE" || "UK_NATIONAL_HEALTH_SERVICE_NUMBER" || "UK_NATIONAL_INSURANCE_NUMBER" || "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER" || "URL" || "USERNAME" || "US_BANK_ACCOUNT_NUMBER" || "US_BANK_ROUTING_NUMBER" || "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER" || "US_PASSPORT_NUMBER" || "US_SOCIAL_SECURITY_NUMBER" || "VEHICLE_IDENTIFICATION_NUMBER", // required * // action: "ANONYMIZED" || "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // regexes: [ // required * // { * // name: "STRING_VALUE", * // match: "STRING_VALUE", * // regex: "STRING_VALUE", * // action: "ANONYMIZED" || "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // }, * // contextualGroundingPolicy: { * // filters: [ * // { * // type: "GROUNDING" || "RELEVANCE", // required * // threshold: Number("double"), // required * // score: Number("double"), // required * // action: "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // }, * // automatedReasoningPolicy: { * // findings: [ * // {// Union: only one key present * // valid: { * // translation: "", * // claimsTrueScenario: { * // statements: "", * // }, * // supportingRules: [ * // { * // identifier: "STRING_VALUE", * // policyVersionArn: "STRING_VALUE", * // }, * // ], * // logicWarning: { * // type: "ALWAYS_FALSE" || "ALWAYS_TRUE", * // premises: "", * // claims: "", * // }, * // }, * // invalid: { * // translation: "", * // contradictingRules: [ * // { * // identifier: "STRING_VALUE", * // policyVersionArn: "STRING_VALUE", * // }, * // ], * // logicWarning: "", * // }, * // satisfiable: { * // translation: "", * // claimsTrueScenario: "", * // claimsFalseScenario: "", * // logicWarning: "", * // }, * // impossible: { * // translation: "", * // contradictingRules: "", * // logicWarning: "", * // }, * // translationAmbiguous: { * // options: [ * // { * // translations: [ * // "", * // ], * // }, * // ], * // differenceScenarios: [ * // "", * // ], * // }, * // tooComplex: {}, * // noTranslations: {}, * // }, * // ], * // }, * // invocationMetrics: { * // guardrailProcessingLatency: Number("long"), * // usage: { * // topicPolicyUnits: Number("int"), // required * // contentPolicyUnits: Number("int"), // required * // wordPolicyUnits: Number("int"), // required * // sensitiveInformationPolicyUnits: Number("int"), // required * // sensitiveInformationPolicyFreeUnits: Number("int"), // required * // contextualGroundingPolicyUnits: Number("int"), // required * // contentPolicyImageUnits: Number("int"), * // automatedReasoningPolicyUnits: Number("int"), * // automatedReasoningPolicies: Number("int"), * // }, * // guardrailCoverage: { * // textCharacters: { * // guarded: Number("int"), * // total: Number("int"), * // }, * // images: { * // guarded: Number("int"), * // total: Number("int"), * // }, * // }, * // }, * // appliedGuardrailDetails: { * // guardrailId: "STRING_VALUE", * // guardrailVersion: "STRING_VALUE", * // guardrailArn: "STRING_VALUE", * // guardrailOrigin: [ * // "REQUEST" || "ACCOUNT_ENFORCED" || "ORGANIZATION_ENFORCED", * // ], * // guardrailOwnership: "SELF" || "CROSS_ACCOUNT", * // }, * // }, * // ], * // }, * // actionReason: "STRING_VALUE", * // }, * // promptRouter: { // PromptRouterTrace * // invokedModelId: "STRING_VALUE", * // }, * // }, * // performanceConfig: { // PerformanceConfiguration * // latency: "standard" || "optimized", * // }, * // serviceTier: { // ServiceTier * // type: "priority" || "default" || "flex" || "reserved", // required * // }, * // }; * * ``` * * @param ConverseCommandInput - {@link ConverseCommandInput} * @returns {@link ConverseCommandOutput} * @see {@link ConverseCommandInput} for command's `input` shape. * @see {@link ConverseCommandOutput} for command's `response` shape. * @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape. * * @throws {@link AccessDeniedException} (client fault) *

The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see AccessDeniedException in the Amazon Bedrock User Guide

* * @throws {@link InternalServerException} (server fault) *

An internal server error occurred. For troubleshooting this error, see InternalFailure in the Amazon Bedrock User Guide

* * @throws {@link ModelErrorException} (client fault) *

The request failed due to an error while processing the model.

* * @throws {@link ModelNotReadyException} (client fault) *

The model specified in the request is not ready to serve inference requests. The AWS SDK will automatically retry the operation up to 5 times. For information about configuring automatic retries, see Retry behavior in the AWS SDKs and Tools reference guide.

* * @throws {@link ModelTimeoutException} (client fault) *

The request took too long to process. Processing time exceeded the model timeout length.

* * @throws {@link ResourceNotFoundException} (client fault) *

The specified resource ARN was not found. For troubleshooting this error, see ResourceNotFound in the Amazon Bedrock User Guide

* * @throws {@link ServiceUnavailableException} (server fault) *

The service isn't currently available. For troubleshooting this error, see ServiceUnavailable in the Amazon Bedrock User Guide

* * @throws {@link ThrottlingException} (client fault) *

Your request was denied due to exceeding the account quotas for Amazon Bedrock. For troubleshooting this error, see ThrottlingException in the Amazon Bedrock User Guide

* * @throws {@link ValidationException} (client fault) *

The input fails to satisfy the constraints specified by Amazon Bedrock. For troubleshooting this error, see ValidationError in the Amazon Bedrock User Guide

* * @throws {@link BedrockRuntimeServiceException} *

Base exception class for all service exceptions from BedrockRuntime service.

* * * @public */ declare class ConverseCommand extends ConverseCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: ConverseRequest; output: ConverseResponse; }; sdk: { input: ConverseCommandInput; output: ConverseCommandOutput; }; }; } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+client-bedrock-runtime@3.1111.0/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/commands/ConverseStreamCommand.d.ts /** * @public * * The input for {@link ConverseStreamCommand}. */ interface ConverseStreamCommandInput extends ConverseStreamRequest {} /** * @public * * The output of {@link ConverseStreamCommand}. */ interface ConverseStreamCommandOutput extends ConverseStreamResponse, MetadataBearer {} declare const ConverseStreamCommand_base: { new (input: ConverseStreamCommandInput): CommandImpl; new (input: ConverseStreamCommandInput): CommandImpl; getEndpointParameterInstructions(): EndpointParameterInstructions; }; /** *

Sends messages to the specified Amazon Bedrock model and returns the response in a stream. ConverseStream provides a consistent API that works with all Amazon Bedrock models that support messages. This allows you to write code once and use it with different models. Should a model have unique inference parameters, you can also pass those unique parameters to the model.

To find out if a model supports streaming, call GetFoundationModel and check the responseStreamingSupported field in the response.

The CLI doesn't support streaming operations in Amazon Bedrock, including ConverseStream.

Amazon Bedrock doesn't store any text, images, or documents that you provide as content. The data is only used to generate the response.

You can submit a prompt by including it in the messages field, specifying the modelId of a foundation model or inference profile to run inference on it, and including any other fields that are relevant to your use case.

You can also submit a prompt from Prompt management by specifying the ARN of the prompt version and including a map of variables to values in the promptVariables field. You can append more messages to the prompt by using the messages field. If you use a prompt from Prompt management, you can't include the following fields in the request: additionalModelRequestFields, inferenceConfig, system, or toolConfig. Instead, these fields must be defined through Prompt management. For more information, see Use a prompt from Prompt management.

For information about the Converse API, see Use the Converse API in the Amazon Bedrock User Guide. To use a guardrail, see Use a guardrail with the Converse API in the Amazon Bedrock User Guide. To use a tool with a model, see Tool use (Function calling) in the Amazon Bedrock User Guide

For example code, see Conversation streaming example in the Amazon Bedrock User Guide.

This operation requires permission for the bedrock:InvokeModelWithResponseStream action.

To deny all inference access to resources that you specify in the modelId field, you need to deny access to the bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream actions. Doing this also denies access to the resource through the base inference actions (InvokeModel and InvokeModelWithResponseStream). For more information see Deny access for inference on specific models.

For troubleshooting some of the common errors you might encounter when using the ConverseStream API, see Troubleshooting Amazon Bedrock API Error Codes in the Amazon Bedrock User Guide

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { BedrockRuntimeClient, ConverseStreamCommand } from "@aws-sdk/client-bedrock-runtime"; // ES Modules import * // const { BedrockRuntimeClient, ConverseStreamCommand } = require("@aws-sdk/client-bedrock-runtime"); // CommonJS import * // import type { BedrockRuntimeClientConfig } from "@aws-sdk/client-bedrock-runtime"; * const config = {}; // type is BedrockRuntimeClientConfig * const client = new BedrockRuntimeClient(config); * const input = { // ConverseStreamRequest * modelId: "STRING_VALUE", // required * messages: [ // Messages * { // Message * role: "user" || "assistant" || "system", // required * content: [ // ContentBlocks // required * { // ContentBlock Union: only one key present * text: "STRING_VALUE", * image: { // ImageBlock * format: "png" || "jpeg" || "gif" || "webp", // required * source: { // ImageSource Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * s3Location: { // S3Location * uri: "STRING_VALUE", // required * bucketOwner: "STRING_VALUE", * }, * }, * error: { // ErrorBlock * message: "STRING_VALUE", * }, * }, * document: { // DocumentBlock * format: "pdf" || "csv" || "doc" || "docx" || "xls" || "xlsx" || "html" || "txt" || "md", * name: "STRING_VALUE", // required * source: { // DocumentSource Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * s3Location: { * uri: "STRING_VALUE", // required * bucketOwner: "STRING_VALUE", * }, * text: "STRING_VALUE", * content: [ // DocumentContentBlocks * { // DocumentContentBlock Union: only one key present * text: "STRING_VALUE", * }, * ], * }, * context: "STRING_VALUE", * citations: { // CitationsConfig * enabled: true || false, // required * }, * }, * video: { // VideoBlock * format: "mkv" || "mov" || "mp4" || "webm" || "flv" || "mpeg" || "mpg" || "wmv" || "three_gp", // required * source: { // VideoSource Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * s3Location: { * uri: "STRING_VALUE", // required * bucketOwner: "STRING_VALUE", * }, * }, * }, * audio: { // AudioBlock * format: "mp3" || "opus" || "wav" || "aac" || "flac" || "mp4" || "ogg" || "mkv" || "mka" || "x-aac" || "m4a" || "mpeg" || "mpga" || "pcm" || "webm", // required * source: { // AudioSource Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * s3Location: { * uri: "STRING_VALUE", // required * bucketOwner: "STRING_VALUE", * }, * }, * error: { * message: "STRING_VALUE", * }, * }, * toolUse: { // ToolUseBlock * toolUseId: "STRING_VALUE", // required * name: "STRING_VALUE", // required * input: "DOCUMENT_VALUE", // required * type: "server_tool_use", * }, * toolResult: { // ToolResultBlock * toolUseId: "STRING_VALUE", // required * content: [ // ToolResultContentBlocks // required * { // ToolResultContentBlock Union: only one key present * json: "DOCUMENT_VALUE", * text: "STRING_VALUE", * image: { * format: "png" || "jpeg" || "gif" || "webp", // required * source: {// Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * s3Location: { * uri: "STRING_VALUE", // required * bucketOwner: "STRING_VALUE", * }, * }, * error: { * message: "STRING_VALUE", * }, * }, * document: { * format: "pdf" || "csv" || "doc" || "docx" || "xls" || "xlsx" || "html" || "txt" || "md", * name: "STRING_VALUE", // required * source: {// Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * s3Location: "", * text: "STRING_VALUE", * content: [ * {// Union: only one key present * text: "STRING_VALUE", * }, * ], * }, * context: "STRING_VALUE", * citations: { * enabled: true || false, // required * }, * }, * video: { * format: "mkv" || "mov" || "mp4" || "webm" || "flv" || "mpeg" || "mpg" || "wmv" || "three_gp", // required * source: {// Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * s3Location: "", * }, * }, * searchResult: { // SearchResultBlock * source: "STRING_VALUE", // required * title: "STRING_VALUE", // required * content: [ // SearchResultContentBlocks // required * { // SearchResultContentBlock * text: "STRING_VALUE", // required * }, * ], * citations: { * enabled: true || false, // required * }, * }, * }, * ], * status: "success" || "error", * type: "STRING_VALUE", * }, * guardContent: { // GuardrailConverseContentBlock Union: only one key present * text: { // GuardrailConverseTextBlock * text: "STRING_VALUE", // required * qualifiers: [ // GuardrailConverseContentQualifierList * "grounding_source" || "query" || "guard_content", * ], * }, * image: { // GuardrailConverseImageBlock * format: "png" || "jpeg", // required * source: { // GuardrailConverseImageSource Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * }, * }, * }, * cachePoint: { // CachePointBlock * type: "default", // required * ttl: "5m" || "1h", * }, * reasoningContent: { // ReasoningContentBlock Union: only one key present * reasoningText: { // ReasoningTextBlock * text: "STRING_VALUE", // required * signature: "STRING_VALUE", * }, * redactedContent: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * }, * citationsContent: { // CitationsContentBlock * content: [ // CitationGeneratedContentList * { // CitationGeneratedContent Union: only one key present * text: "STRING_VALUE", * }, * ], * citations: [ // Citations * { // Citation * title: "STRING_VALUE", * source: "STRING_VALUE", * sourceContent: [ // CitationSourceContentList * { // CitationSourceContent Union: only one key present * text: "STRING_VALUE", * }, * ], * location: { // CitationLocation Union: only one key present * web: { // WebLocation * url: "STRING_VALUE", * domain: "STRING_VALUE", * }, * documentChar: { // DocumentCharLocation * documentIndex: Number("int"), * start: Number("int"), * end: Number("int"), * }, * documentPage: { // DocumentPageLocation * documentIndex: Number("int"), * start: Number("int"), * end: Number("int"), * }, * documentChunk: { // DocumentChunkLocation * documentIndex: Number("int"), * start: Number("int"), * end: Number("int"), * }, * searchResultLocation: { // SearchResultLocation * searchResultIndex: Number("int"), * start: Number("int"), * end: Number("int"), * }, * }, * }, * ], * }, * searchResult: { * source: "STRING_VALUE", // required * title: "STRING_VALUE", // required * content: [ // required * { * text: "STRING_VALUE", // required * }, * ], * citations: { * enabled: true || false, // required * }, * }, * toolAddition: { // ToolAdditionBlock * tool: { // ToolReference * type: "STRING_VALUE", * name: "STRING_VALUE", * serverName: "STRING_VALUE", * }, * }, * toolRemoval: { // ToolRemovalBlock * tool: { * type: "STRING_VALUE", * name: "STRING_VALUE", * serverName: "STRING_VALUE", * }, * }, * }, * ], * }, * ], * system: [ // SystemContentBlocks * { // SystemContentBlock Union: only one key present * text: "STRING_VALUE", * guardContent: {// Union: only one key present * text: { * text: "STRING_VALUE", // required * qualifiers: [ * "grounding_source" || "query" || "guard_content", * ], * }, * image: { * format: "png" || "jpeg", // required * source: {// Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * }, * }, * }, * cachePoint: { * type: "default", // required * ttl: "5m" || "1h", * }, * }, * ], * inferenceConfig: { // InferenceConfiguration * maxTokens: Number("int"), * temperature: Number("float"), * topP: Number("float"), * stopSequences: [ // NonEmptyStringList * "STRING_VALUE", * ], * }, * toolConfig: { // ToolConfiguration * tools: [ // Tools // required * { // Tool Union: only one key present * toolSpec: { // ToolSpecification * name: "STRING_VALUE", // required * description: "STRING_VALUE", * inputSchema: { // ToolInputSchema Union: only one key present * json: "DOCUMENT_VALUE", * }, * strict: true || false, * }, * systemTool: { // SystemTool * name: "STRING_VALUE", // required * }, * cachePoint: "", * }, * ], * toolChoice: { // ToolChoice Union: only one key present * auto: {}, * any: {}, * tool: { // SpecificToolChoice * name: "STRING_VALUE", // required * }, * }, * }, * guardrailConfig: { // GuardrailStreamConfiguration * guardrailIdentifier: "STRING_VALUE", * guardrailVersion: "STRING_VALUE", * trace: "enabled" || "disabled" || "enabled_full", * streamProcessingMode: "sync" || "async", * }, * additionalModelRequestFields: "DOCUMENT_VALUE", * promptVariables: { // PromptVariableMap * "": { // PromptVariableValues Union: only one key present * text: "STRING_VALUE", * }, * }, * additionalModelResponseFieldPaths: [ // AdditionalModelResponseFieldPaths * "STRING_VALUE", * ], * requestMetadata: { // RequestMetadata * "": "STRING_VALUE", * }, * performanceConfig: { // PerformanceConfiguration * latency: "standard" || "optimized", * }, * serviceTier: { // ServiceTier * type: "priority" || "default" || "flex" || "reserved", // required * }, * outputConfig: { // OutputConfig * textFormat: { // OutputFormat * type: "json_schema", // required * structure: { // OutputFormatStructure Union: only one key present * jsonSchema: { // JsonSchemaDefinition * schema: "STRING_VALUE", // required * name: "STRING_VALUE", * description: "STRING_VALUE", * }, * }, * }, * effort: "STRING_VALUE", * }, * }; * const command = new ConverseStreamCommand(input); * const response = await client.send(command); * // { // ConverseStreamResponse * // stream: { // ConverseStreamOutput Union: only one key present * // messageStart: { // MessageStartEvent * // role: "user" || "assistant" || "system", // required * // }, * // contentBlockStart: { // ContentBlockStartEvent * // start: { // ContentBlockStart Union: only one key present * // toolUse: { // ToolUseBlockStart * // toolUseId: "STRING_VALUE", // required * // name: "STRING_VALUE", // required * // type: "server_tool_use", * // }, * // toolResult: { // ToolResultBlockStart * // toolUseId: "STRING_VALUE", // required * // type: "STRING_VALUE", * // status: "success" || "error", * // }, * // image: { // ImageBlockStart * // format: "png" || "jpeg" || "gif" || "webp", // required * // }, * // }, * // contentBlockIndex: Number("int"), // required * // }, * // contentBlockDelta: { // ContentBlockDeltaEvent * // delta: { // ContentBlockDelta Union: only one key present * // text: "STRING_VALUE", * // toolUse: { // ToolUseBlockDelta * // input: "STRING_VALUE", // required * // }, * // toolResult: [ // ToolResultBlocksDelta * // { // ToolResultBlockDelta Union: only one key present * // text: "STRING_VALUE", * // json: "DOCUMENT_VALUE", * // }, * // ], * // reasoningContent: { // ReasoningContentBlockDelta Union: only one key present * // text: "STRING_VALUE", * // redactedContent: new Uint8Array(), * // signature: "STRING_VALUE", * // }, * // citation: { // CitationsDelta * // title: "STRING_VALUE", * // source: "STRING_VALUE", * // sourceContent: [ // CitationSourceContentListDelta * // { // CitationSourceContentDelta * // text: "STRING_VALUE", * // }, * // ], * // location: { // CitationLocation Union: only one key present * // web: { // WebLocation * // url: "STRING_VALUE", * // domain: "STRING_VALUE", * // }, * // documentChar: { // DocumentCharLocation * // documentIndex: Number("int"), * // start: Number("int"), * // end: Number("int"), * // }, * // documentPage: { // DocumentPageLocation * // documentIndex: Number("int"), * // start: Number("int"), * // end: Number("int"), * // }, * // documentChunk: { // DocumentChunkLocation * // documentIndex: Number("int"), * // start: Number("int"), * // end: Number("int"), * // }, * // searchResultLocation: { // SearchResultLocation * // searchResultIndex: Number("int"), * // start: Number("int"), * // end: Number("int"), * // }, * // }, * // }, * // image: { // ImageBlockDelta * // source: { // ImageSource Union: only one key present * // bytes: new Uint8Array(), * // s3Location: { // S3Location * // uri: "STRING_VALUE", // required * // bucketOwner: "STRING_VALUE", * // }, * // }, * // error: { // ErrorBlock * // message: "STRING_VALUE", * // }, * // }, * // }, * // contentBlockIndex: Number("int"), // required * // }, * // contentBlockStop: { // ContentBlockStopEvent * // contentBlockIndex: Number("int"), // required * // }, * // messageStop: { // MessageStopEvent * // stopReason: "end_turn" || "tool_use" || "max_tokens" || "stop_sequence" || "guardrail_intervened" || "content_filtered" || "malformed_model_output" || "malformed_tool_use" || "model_context_window_exceeded", // required * // additionalModelResponseFields: "DOCUMENT_VALUE", * // }, * // metadata: { // ConverseStreamMetadataEvent * // usage: { // TokenUsage * // inputTokens: Number("int"), // required * // outputTokens: Number("int"), // required * // totalTokens: Number("int"), // required * // cacheReadInputTokens: Number("int"), * // cacheWriteInputTokens: Number("int"), * // cacheDetails: [ // CacheDetailsList * // { // CacheDetail * // ttl: "5m" || "1h", // required * // inputTokens: Number("int"), // required * // }, * // ], * // }, * // metrics: { // ConverseStreamMetrics * // latencyMs: Number("long"), // required * // }, * // trace: { // ConverseStreamTrace * // guardrail: { // GuardrailTraceAssessment * // modelOutput: [ // ModelOutputs * // "STRING_VALUE", * // ], * // inputAssessment: { // GuardrailAssessmentMap * // "": { // GuardrailAssessment * // topicPolicy: { // GuardrailTopicPolicyAssessment * // topics: [ // GuardrailTopicList // required * // { // GuardrailTopic * // name: "STRING_VALUE", // required * // type: "DENY", // required * // action: "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // }, * // contentPolicy: { // GuardrailContentPolicyAssessment * // filters: [ // GuardrailContentFilterList // required * // { // GuardrailContentFilter * // type: "INSULTS" || "HATE" || "SEXUAL" || "VIOLENCE" || "MISCONDUCT" || "PROMPT_ATTACK", // required * // confidence: "NONE" || "LOW" || "MEDIUM" || "HIGH", // required * // filterStrength: "NONE" || "LOW" || "MEDIUM" || "HIGH", * // action: "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // }, * // wordPolicy: { // GuardrailWordPolicyAssessment * // customWords: [ // GuardrailCustomWordList // required * // { // GuardrailCustomWord * // match: "STRING_VALUE", // required * // action: "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // managedWordLists: [ // GuardrailManagedWordList // required * // { // GuardrailManagedWord * // match: "STRING_VALUE", // required * // type: "PROFANITY", // required * // action: "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // }, * // sensitiveInformationPolicy: { // GuardrailSensitiveInformationPolicyAssessment * // piiEntities: [ // GuardrailPiiEntityFilterList // required * // { // GuardrailPiiEntityFilter * // match: "STRING_VALUE", // required * // type: "ADDRESS" || "AGE" || "AWS_ACCESS_KEY" || "AWS_SECRET_KEY" || "CA_HEALTH_NUMBER" || "CA_SOCIAL_INSURANCE_NUMBER" || "CREDIT_DEBIT_CARD_CVV" || "CREDIT_DEBIT_CARD_EXPIRY" || "CREDIT_DEBIT_CARD_NUMBER" || "DRIVER_ID" || "EMAIL" || "INTERNATIONAL_BANK_ACCOUNT_NUMBER" || "IP_ADDRESS" || "LICENSE_PLATE" || "MAC_ADDRESS" || "NAME" || "PASSWORD" || "PHONE" || "PIN" || "SWIFT_CODE" || "UK_NATIONAL_HEALTH_SERVICE_NUMBER" || "UK_NATIONAL_INSURANCE_NUMBER" || "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER" || "URL" || "USERNAME" || "US_BANK_ACCOUNT_NUMBER" || "US_BANK_ROUTING_NUMBER" || "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER" || "US_PASSPORT_NUMBER" || "US_SOCIAL_SECURITY_NUMBER" || "VEHICLE_IDENTIFICATION_NUMBER", // required * // action: "ANONYMIZED" || "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // regexes: [ // GuardrailRegexFilterList // required * // { // GuardrailRegexFilter * // name: "STRING_VALUE", * // match: "STRING_VALUE", * // regex: "STRING_VALUE", * // action: "ANONYMIZED" || "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // }, * // contextualGroundingPolicy: { // GuardrailContextualGroundingPolicyAssessment * // filters: [ // GuardrailContextualGroundingFilters * // { // GuardrailContextualGroundingFilter * // type: "GROUNDING" || "RELEVANCE", // required * // threshold: Number("double"), // required * // score: Number("double"), // required * // action: "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // }, * // automatedReasoningPolicy: { // GuardrailAutomatedReasoningPolicyAssessment * // findings: [ // GuardrailAutomatedReasoningFindingList * // { // GuardrailAutomatedReasoningFinding Union: only one key present * // valid: { // GuardrailAutomatedReasoningValidFinding * // translation: { // GuardrailAutomatedReasoningTranslation * // premises: [ // GuardrailAutomatedReasoningStatementList * // { // GuardrailAutomatedReasoningStatement * // logic: "STRING_VALUE", * // naturalLanguage: "STRING_VALUE", * // }, * // ], * // claims: [ * // { * // logic: "STRING_VALUE", * // naturalLanguage: "STRING_VALUE", * // }, * // ], * // untranslatedPremises: [ // GuardrailAutomatedReasoningInputTextReferenceList * // { // GuardrailAutomatedReasoningInputTextReference * // text: "STRING_VALUE", * // }, * // ], * // untranslatedClaims: [ * // { * // text: "STRING_VALUE", * // }, * // ], * // confidence: Number("double"), * // }, * // claimsTrueScenario: { // GuardrailAutomatedReasoningScenario * // statements: [ * // { * // logic: "STRING_VALUE", * // naturalLanguage: "STRING_VALUE", * // }, * // ], * // }, * // supportingRules: [ // GuardrailAutomatedReasoningRuleList * // { // GuardrailAutomatedReasoningRule * // identifier: "STRING_VALUE", * // policyVersionArn: "STRING_VALUE", * // }, * // ], * // logicWarning: { // GuardrailAutomatedReasoningLogicWarning * // type: "ALWAYS_FALSE" || "ALWAYS_TRUE", * // premises: [ * // { * // logic: "STRING_VALUE", * // naturalLanguage: "STRING_VALUE", * // }, * // ], * // claims: [ * // { * // logic: "STRING_VALUE", * // naturalLanguage: "STRING_VALUE", * // }, * // ], * // }, * // }, * // invalid: { // GuardrailAutomatedReasoningInvalidFinding * // translation: { * // premises: "", * // claims: "", * // untranslatedPremises: [ * // { * // text: "STRING_VALUE", * // }, * // ], * // untranslatedClaims: [ * // { * // text: "STRING_VALUE", * // }, * // ], * // confidence: Number("double"), * // }, * // contradictingRules: [ * // { * // identifier: "STRING_VALUE", * // policyVersionArn: "STRING_VALUE", * // }, * // ], * // logicWarning: { * // type: "ALWAYS_FALSE" || "ALWAYS_TRUE", * // premises: "", * // claims: "", * // }, * // }, * // satisfiable: { // GuardrailAutomatedReasoningSatisfiableFinding * // translation: { * // premises: "", * // claims: "", * // untranslatedPremises: [ * // { * // text: "STRING_VALUE", * // }, * // ], * // untranslatedClaims: "", * // confidence: Number("double"), * // }, * // claimsTrueScenario: { * // statements: "", * // }, * // claimsFalseScenario: { * // statements: "", * // }, * // logicWarning: { * // type: "ALWAYS_FALSE" || "ALWAYS_TRUE", * // premises: "", * // claims: "", * // }, * // }, * // impossible: { // GuardrailAutomatedReasoningImpossibleFinding * // translation: { * // premises: "", * // claims: "", * // untranslatedPremises: "", * // untranslatedClaims: "", * // confidence: Number("double"), * // }, * // contradictingRules: [ * // { * // identifier: "STRING_VALUE", * // policyVersionArn: "STRING_VALUE", * // }, * // ], * // logicWarning: { * // type: "ALWAYS_FALSE" || "ALWAYS_TRUE", * // premises: "", * // claims: "", * // }, * // }, * // translationAmbiguous: { // GuardrailAutomatedReasoningTranslationAmbiguousFinding * // options: [ // GuardrailAutomatedReasoningTranslationOptionList * // { // GuardrailAutomatedReasoningTranslationOption * // translations: [ // GuardrailAutomatedReasoningTranslationList * // { * // premises: "", * // claims: "", * // untranslatedPremises: "", * // untranslatedClaims: "", * // confidence: Number("double"), * // }, * // ], * // }, * // ], * // differenceScenarios: [ // GuardrailAutomatedReasoningDifferenceScenarioList * // { * // statements: "", * // }, * // ], * // }, * // tooComplex: {}, * // noTranslations: {}, * // }, * // ], * // }, * // invocationMetrics: { // GuardrailInvocationMetrics * // guardrailProcessingLatency: Number("long"), * // usage: { // GuardrailUsage * // topicPolicyUnits: Number("int"), // required * // contentPolicyUnits: Number("int"), // required * // wordPolicyUnits: Number("int"), // required * // sensitiveInformationPolicyUnits: Number("int"), // required * // sensitiveInformationPolicyFreeUnits: Number("int"), // required * // contextualGroundingPolicyUnits: Number("int"), // required * // contentPolicyImageUnits: Number("int"), * // automatedReasoningPolicyUnits: Number("int"), * // automatedReasoningPolicies: Number("int"), * // }, * // guardrailCoverage: { // GuardrailCoverage * // textCharacters: { // GuardrailTextCharactersCoverage * // guarded: Number("int"), * // total: Number("int"), * // }, * // images: { // GuardrailImageCoverage * // guarded: Number("int"), * // total: Number("int"), * // }, * // }, * // }, * // appliedGuardrailDetails: { // AppliedGuardrailDetails * // guardrailId: "STRING_VALUE", * // guardrailVersion: "STRING_VALUE", * // guardrailArn: "STRING_VALUE", * // guardrailOrigin: [ // GuardrailOriginList * // "REQUEST" || "ACCOUNT_ENFORCED" || "ORGANIZATION_ENFORCED", * // ], * // guardrailOwnership: "SELF" || "CROSS_ACCOUNT", * // }, * // }, * // }, * // outputAssessments: { // GuardrailAssessmentListMap * // "": [ // GuardrailAssessmentList * // { * // topicPolicy: { * // topics: [ // required * // { * // name: "STRING_VALUE", // required * // type: "DENY", // required * // action: "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // }, * // contentPolicy: { * // filters: [ // required * // { * // type: "INSULTS" || "HATE" || "SEXUAL" || "VIOLENCE" || "MISCONDUCT" || "PROMPT_ATTACK", // required * // confidence: "NONE" || "LOW" || "MEDIUM" || "HIGH", // required * // filterStrength: "NONE" || "LOW" || "MEDIUM" || "HIGH", * // action: "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // }, * // wordPolicy: { * // customWords: [ // required * // { * // match: "STRING_VALUE", // required * // action: "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // managedWordLists: [ // required * // { * // match: "STRING_VALUE", // required * // type: "PROFANITY", // required * // action: "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // }, * // sensitiveInformationPolicy: { * // piiEntities: [ // required * // { * // match: "STRING_VALUE", // required * // type: "ADDRESS" || "AGE" || "AWS_ACCESS_KEY" || "AWS_SECRET_KEY" || "CA_HEALTH_NUMBER" || "CA_SOCIAL_INSURANCE_NUMBER" || "CREDIT_DEBIT_CARD_CVV" || "CREDIT_DEBIT_CARD_EXPIRY" || "CREDIT_DEBIT_CARD_NUMBER" || "DRIVER_ID" || "EMAIL" || "INTERNATIONAL_BANK_ACCOUNT_NUMBER" || "IP_ADDRESS" || "LICENSE_PLATE" || "MAC_ADDRESS" || "NAME" || "PASSWORD" || "PHONE" || "PIN" || "SWIFT_CODE" || "UK_NATIONAL_HEALTH_SERVICE_NUMBER" || "UK_NATIONAL_INSURANCE_NUMBER" || "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER" || "URL" || "USERNAME" || "US_BANK_ACCOUNT_NUMBER" || "US_BANK_ROUTING_NUMBER" || "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER" || "US_PASSPORT_NUMBER" || "US_SOCIAL_SECURITY_NUMBER" || "VEHICLE_IDENTIFICATION_NUMBER", // required * // action: "ANONYMIZED" || "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // regexes: [ // required * // { * // name: "STRING_VALUE", * // match: "STRING_VALUE", * // regex: "STRING_VALUE", * // action: "ANONYMIZED" || "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // }, * // contextualGroundingPolicy: { * // filters: [ * // { * // type: "GROUNDING" || "RELEVANCE", // required * // threshold: Number("double"), // required * // score: Number("double"), // required * // action: "BLOCKED" || "NONE", // required * // detected: true || false, * // }, * // ], * // }, * // automatedReasoningPolicy: { * // findings: [ * // {// Union: only one key present * // valid: { * // translation: "", * // claimsTrueScenario: { * // statements: "", * // }, * // supportingRules: [ * // { * // identifier: "STRING_VALUE", * // policyVersionArn: "STRING_VALUE", * // }, * // ], * // logicWarning: { * // type: "ALWAYS_FALSE" || "ALWAYS_TRUE", * // premises: "", * // claims: "", * // }, * // }, * // invalid: { * // translation: "", * // contradictingRules: [ * // { * // identifier: "STRING_VALUE", * // policyVersionArn: "STRING_VALUE", * // }, * // ], * // logicWarning: "", * // }, * // satisfiable: { * // translation: "", * // claimsTrueScenario: "", * // claimsFalseScenario: "", * // logicWarning: "", * // }, * // impossible: { * // translation: "", * // contradictingRules: "", * // logicWarning: "", * // }, * // translationAmbiguous: { * // options: [ * // { * // translations: [ * // "", * // ], * // }, * // ], * // differenceScenarios: [ * // "", * // ], * // }, * // tooComplex: {}, * // noTranslations: {}, * // }, * // ], * // }, * // invocationMetrics: { * // guardrailProcessingLatency: Number("long"), * // usage: { * // topicPolicyUnits: Number("int"), // required * // contentPolicyUnits: Number("int"), // required * // wordPolicyUnits: Number("int"), // required * // sensitiveInformationPolicyUnits: Number("int"), // required * // sensitiveInformationPolicyFreeUnits: Number("int"), // required * // contextualGroundingPolicyUnits: Number("int"), // required * // contentPolicyImageUnits: Number("int"), * // automatedReasoningPolicyUnits: Number("int"), * // automatedReasoningPolicies: Number("int"), * // }, * // guardrailCoverage: { * // textCharacters: { * // guarded: Number("int"), * // total: Number("int"), * // }, * // images: { * // guarded: Number("int"), * // total: Number("int"), * // }, * // }, * // }, * // appliedGuardrailDetails: { * // guardrailId: "STRING_VALUE", * // guardrailVersion: "STRING_VALUE", * // guardrailArn: "STRING_VALUE", * // guardrailOrigin: [ * // "REQUEST" || "ACCOUNT_ENFORCED" || "ORGANIZATION_ENFORCED", * // ], * // guardrailOwnership: "SELF" || "CROSS_ACCOUNT", * // }, * // }, * // ], * // }, * // actionReason: "STRING_VALUE", * // }, * // promptRouter: { // PromptRouterTrace * // invokedModelId: "STRING_VALUE", * // }, * // }, * // performanceConfig: { // PerformanceConfiguration * // latency: "standard" || "optimized", * // }, * // serviceTier: { // ServiceTier * // type: "priority" || "default" || "flex" || "reserved", // required * // }, * // }, * // internalServerException: { // InternalServerException * // message: "STRING_VALUE", * // }, * // modelStreamErrorException: { // ModelStreamErrorException * // message: "STRING_VALUE", * // originalStatusCode: Number("int"), * // originalMessage: "STRING_VALUE", * // }, * // validationException: { // ValidationException * // message: "STRING_VALUE", * // }, * // throttlingException: { // ThrottlingException * // message: "STRING_VALUE", * // }, * // serviceUnavailableException: { // ServiceUnavailableException * // message: "STRING_VALUE", * // }, * // }, * // }; * * ``` * * @param ConverseStreamCommandInput - {@link ConverseStreamCommandInput} * @returns {@link ConverseStreamCommandOutput} * @see {@link ConverseStreamCommandInput} for command's `input` shape. * @see {@link ConverseStreamCommandOutput} for command's `response` shape. * @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape. * * @throws {@link AccessDeniedException} (client fault) *

The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see AccessDeniedException in the Amazon Bedrock User Guide

* * @throws {@link InternalServerException} (server fault) *

An internal server error occurred. For troubleshooting this error, see InternalFailure in the Amazon Bedrock User Guide

* * @throws {@link ModelErrorException} (client fault) *

The request failed due to an error while processing the model.

* * @throws {@link ModelNotReadyException} (client fault) *

The model specified in the request is not ready to serve inference requests. The AWS SDK will automatically retry the operation up to 5 times. For information about configuring automatic retries, see Retry behavior in the AWS SDKs and Tools reference guide.

* * @throws {@link ModelTimeoutException} (client fault) *

The request took too long to process. Processing time exceeded the model timeout length.

* * @throws {@link ResourceNotFoundException} (client fault) *

The specified resource ARN was not found. For troubleshooting this error, see ResourceNotFound in the Amazon Bedrock User Guide

* * @throws {@link ServiceUnavailableException} (server fault) *

The service isn't currently available. For troubleshooting this error, see ServiceUnavailable in the Amazon Bedrock User Guide

* * @throws {@link ThrottlingException} (client fault) *

Your request was denied due to exceeding the account quotas for Amazon Bedrock. For troubleshooting this error, see ThrottlingException in the Amazon Bedrock User Guide

* * @throws {@link ValidationException} (client fault) *

The input fails to satisfy the constraints specified by Amazon Bedrock. For troubleshooting this error, see ValidationError in the Amazon Bedrock User Guide

* * @throws {@link BedrockRuntimeServiceException} *

Base exception class for all service exceptions from BedrockRuntime service.

* * * @public */ declare class ConverseStreamCommand extends ConverseStreamCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: ConverseStreamRequest; output: ConverseStreamResponse; }; sdk: { input: ConverseStreamCommandInput; output: ConverseStreamCommandOutput; }; }; } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+client-bedrock-runtime@3.1111.0/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/commands/CountTokensCommand.d.ts /** * @public * * The input for {@link CountTokensCommand}. */ interface CountTokensCommandInput extends CountTokensRequest {} /** * @public * * The output of {@link CountTokensCommand}. */ interface CountTokensCommandOutput extends CountTokensResponse, MetadataBearer {} declare const CountTokensCommand_base: { new (input: CountTokensCommandInput): CommandImpl; new (input: CountTokensCommandInput): CommandImpl; getEndpointParameterInstructions(): EndpointParameterInstructions; }; /** *

Returns the token count for a given inference request. This operation helps you estimate token usage before sending requests to foundation models by returning the token count that would be used if the same input were sent to the model in an inference request.

Token counting is model-specific because different models use different tokenization strategies. The token count returned by this operation will match the token count that would be charged if the same input were sent to the model in an InvokeModel or Converse request.

You can use this operation to:

  • Estimate costs before sending inference requests.

  • Optimize prompts to fit within token limits.

  • Plan for token usage in your applications.

This operation accepts the same input formats as InvokeModel and Converse, allowing you to count tokens for both raw text inputs and structured conversation formats.

The following operations are related to CountTokens:

  • InvokeModel - Sends inference requests to foundation models

  • Converse - Sends conversation-based inference requests to foundation models

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { BedrockRuntimeClient, CountTokensCommand } from "@aws-sdk/client-bedrock-runtime"; // ES Modules import * // const { BedrockRuntimeClient, CountTokensCommand } = require("@aws-sdk/client-bedrock-runtime"); // CommonJS import * // import type { BedrockRuntimeClientConfig } from "@aws-sdk/client-bedrock-runtime"; * const config = {}; // type is BedrockRuntimeClientConfig * const client = new BedrockRuntimeClient(config); * const input = { // CountTokensRequest * modelId: "STRING_VALUE", // required * input: { // CountTokensInput Union: only one key present * invokeModel: { // InvokeModelTokensRequest * body: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") // required * }, * converse: { // ConverseTokensRequest * messages: [ // Messages * { // Message * role: "user" || "assistant" || "system", // required * content: [ // ContentBlocks // required * { // ContentBlock Union: only one key present * text: "STRING_VALUE", * image: { // ImageBlock * format: "png" || "jpeg" || "gif" || "webp", // required * source: { // ImageSource Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * s3Location: { // S3Location * uri: "STRING_VALUE", // required * bucketOwner: "STRING_VALUE", * }, * }, * error: { // ErrorBlock * message: "STRING_VALUE", * }, * }, * document: { // DocumentBlock * format: "pdf" || "csv" || "doc" || "docx" || "xls" || "xlsx" || "html" || "txt" || "md", * name: "STRING_VALUE", // required * source: { // DocumentSource Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * s3Location: { * uri: "STRING_VALUE", // required * bucketOwner: "STRING_VALUE", * }, * text: "STRING_VALUE", * content: [ // DocumentContentBlocks * { // DocumentContentBlock Union: only one key present * text: "STRING_VALUE", * }, * ], * }, * context: "STRING_VALUE", * citations: { // CitationsConfig * enabled: true || false, // required * }, * }, * video: { // VideoBlock * format: "mkv" || "mov" || "mp4" || "webm" || "flv" || "mpeg" || "mpg" || "wmv" || "three_gp", // required * source: { // VideoSource Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * s3Location: { * uri: "STRING_VALUE", // required * bucketOwner: "STRING_VALUE", * }, * }, * }, * audio: { // AudioBlock * format: "mp3" || "opus" || "wav" || "aac" || "flac" || "mp4" || "ogg" || "mkv" || "mka" || "x-aac" || "m4a" || "mpeg" || "mpga" || "pcm" || "webm", // required * source: { // AudioSource Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * s3Location: { * uri: "STRING_VALUE", // required * bucketOwner: "STRING_VALUE", * }, * }, * error: { * message: "STRING_VALUE", * }, * }, * toolUse: { // ToolUseBlock * toolUseId: "STRING_VALUE", // required * name: "STRING_VALUE", // required * input: "DOCUMENT_VALUE", // required * type: "server_tool_use", * }, * toolResult: { // ToolResultBlock * toolUseId: "STRING_VALUE", // required * content: [ // ToolResultContentBlocks // required * { // ToolResultContentBlock Union: only one key present * json: "DOCUMENT_VALUE", * text: "STRING_VALUE", * image: { * format: "png" || "jpeg" || "gif" || "webp", // required * source: {// Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * s3Location: { * uri: "STRING_VALUE", // required * bucketOwner: "STRING_VALUE", * }, * }, * error: { * message: "STRING_VALUE", * }, * }, * document: { * format: "pdf" || "csv" || "doc" || "docx" || "xls" || "xlsx" || "html" || "txt" || "md", * name: "STRING_VALUE", // required * source: {// Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * s3Location: "", * text: "STRING_VALUE", * content: [ * {// Union: only one key present * text: "STRING_VALUE", * }, * ], * }, * context: "STRING_VALUE", * citations: { * enabled: true || false, // required * }, * }, * video: { * format: "mkv" || "mov" || "mp4" || "webm" || "flv" || "mpeg" || "mpg" || "wmv" || "three_gp", // required * source: {// Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * s3Location: "", * }, * }, * searchResult: { // SearchResultBlock * source: "STRING_VALUE", // required * title: "STRING_VALUE", // required * content: [ // SearchResultContentBlocks // required * { // SearchResultContentBlock * text: "STRING_VALUE", // required * }, * ], * citations: { * enabled: true || false, // required * }, * }, * }, * ], * status: "success" || "error", * type: "STRING_VALUE", * }, * guardContent: { // GuardrailConverseContentBlock Union: only one key present * text: { // GuardrailConverseTextBlock * text: "STRING_VALUE", // required * qualifiers: [ // GuardrailConverseContentQualifierList * "grounding_source" || "query" || "guard_content", * ], * }, * image: { // GuardrailConverseImageBlock * format: "png" || "jpeg", // required * source: { // GuardrailConverseImageSource Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * }, * }, * }, * cachePoint: { // CachePointBlock * type: "default", // required * ttl: "5m" || "1h", * }, * reasoningContent: { // ReasoningContentBlock Union: only one key present * reasoningText: { // ReasoningTextBlock * text: "STRING_VALUE", // required * signature: "STRING_VALUE", * }, * redactedContent: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * }, * citationsContent: { // CitationsContentBlock * content: [ // CitationGeneratedContentList * { // CitationGeneratedContent Union: only one key present * text: "STRING_VALUE", * }, * ], * citations: [ // Citations * { // Citation * title: "STRING_VALUE", * source: "STRING_VALUE", * sourceContent: [ // CitationSourceContentList * { // CitationSourceContent Union: only one key present * text: "STRING_VALUE", * }, * ], * location: { // CitationLocation Union: only one key present * web: { // WebLocation * url: "STRING_VALUE", * domain: "STRING_VALUE", * }, * documentChar: { // DocumentCharLocation * documentIndex: Number("int"), * start: Number("int"), * end: Number("int"), * }, * documentPage: { // DocumentPageLocation * documentIndex: Number("int"), * start: Number("int"), * end: Number("int"), * }, * documentChunk: { // DocumentChunkLocation * documentIndex: Number("int"), * start: Number("int"), * end: Number("int"), * }, * searchResultLocation: { // SearchResultLocation * searchResultIndex: Number("int"), * start: Number("int"), * end: Number("int"), * }, * }, * }, * ], * }, * searchResult: { * source: "STRING_VALUE", // required * title: "STRING_VALUE", // required * content: [ // required * { * text: "STRING_VALUE", // required * }, * ], * citations: { * enabled: true || false, // required * }, * }, * toolAddition: { // ToolAdditionBlock * tool: { // ToolReference * type: "STRING_VALUE", * name: "STRING_VALUE", * serverName: "STRING_VALUE", * }, * }, * toolRemoval: { // ToolRemovalBlock * tool: { * type: "STRING_VALUE", * name: "STRING_VALUE", * serverName: "STRING_VALUE", * }, * }, * }, * ], * }, * ], * system: [ // SystemContentBlocks * { // SystemContentBlock Union: only one key present * text: "STRING_VALUE", * guardContent: {// Union: only one key present * text: { * text: "STRING_VALUE", // required * qualifiers: [ * "grounding_source" || "query" || "guard_content", * ], * }, * image: { * format: "png" || "jpeg", // required * source: {// Union: only one key present * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * }, * }, * }, * cachePoint: { * type: "default", // required * ttl: "5m" || "1h", * }, * }, * ], * toolConfig: { // ToolConfiguration * tools: [ // Tools // required * { // Tool Union: only one key present * toolSpec: { // ToolSpecification * name: "STRING_VALUE", // required * description: "STRING_VALUE", * inputSchema: { // ToolInputSchema Union: only one key present * json: "DOCUMENT_VALUE", * }, * strict: true || false, * }, * systemTool: { // SystemTool * name: "STRING_VALUE", // required * }, * cachePoint: "", * }, * ], * toolChoice: { // ToolChoice Union: only one key present * auto: {}, * any: {}, * tool: { // SpecificToolChoice * name: "STRING_VALUE", // required * }, * }, * }, * additionalModelRequestFields: "DOCUMENT_VALUE", * }, * }, * }; * const command = new CountTokensCommand(input); * const response = await client.send(command); * // { // CountTokensResponse * // inputTokens: Number("int"), // required * // }; * * ``` * * @param CountTokensCommandInput - {@link CountTokensCommandInput} * @returns {@link CountTokensCommandOutput} * @see {@link CountTokensCommandInput} for command's `input` shape. * @see {@link CountTokensCommandOutput} for command's `response` shape. * @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape. * * @throws {@link AccessDeniedException} (client fault) *

The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see AccessDeniedException in the Amazon Bedrock User Guide

* * @throws {@link InternalServerException} (server fault) *

An internal server error occurred. For troubleshooting this error, see InternalFailure in the Amazon Bedrock User Guide

* * @throws {@link ResourceNotFoundException} (client fault) *

The specified resource ARN was not found. For troubleshooting this error, see ResourceNotFound in the Amazon Bedrock User Guide

* * @throws {@link ServiceUnavailableException} (server fault) *

The service isn't currently available. For troubleshooting this error, see ServiceUnavailable in the Amazon Bedrock User Guide

* * @throws {@link ThrottlingException} (client fault) *

Your request was denied due to exceeding the account quotas for Amazon Bedrock. For troubleshooting this error, see ThrottlingException in the Amazon Bedrock User Guide

* * @throws {@link ValidationException} (client fault) *

The input fails to satisfy the constraints specified by Amazon Bedrock. For troubleshooting this error, see ValidationError in the Amazon Bedrock User Guide

* * @throws {@link BedrockRuntimeServiceException} *

Base exception class for all service exceptions from BedrockRuntime service.

* * * @public */ declare class CountTokensCommand extends CountTokensCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: CountTokensRequest; output: CountTokensResponse; }; sdk: { input: CountTokensCommandInput; output: CountTokensCommandOutput; }; }; } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+client-bedrock-runtime@3.1111.0/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/commands/GetAsyncInvokeCommand.d.ts /** * @public * * The input for {@link GetAsyncInvokeCommand}. */ interface GetAsyncInvokeCommandInput extends GetAsyncInvokeRequest {} /** * @public * * The output of {@link GetAsyncInvokeCommand}. */ interface GetAsyncInvokeCommandOutput extends GetAsyncInvokeResponse, MetadataBearer {} declare const GetAsyncInvokeCommand_base: { new (input: GetAsyncInvokeCommandInput): CommandImpl; new (input: GetAsyncInvokeCommandInput): CommandImpl; getEndpointParameterInstructions(): EndpointParameterInstructions; }; /** *

Retrieve information about an asynchronous invocation.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { BedrockRuntimeClient, GetAsyncInvokeCommand } from "@aws-sdk/client-bedrock-runtime"; // ES Modules import * // const { BedrockRuntimeClient, GetAsyncInvokeCommand } = require("@aws-sdk/client-bedrock-runtime"); // CommonJS import * // import type { BedrockRuntimeClientConfig } from "@aws-sdk/client-bedrock-runtime"; * const config = {}; // type is BedrockRuntimeClientConfig * const client = new BedrockRuntimeClient(config); * const input = { // GetAsyncInvokeRequest * invocationArn: "STRING_VALUE", // required * }; * const command = new GetAsyncInvokeCommand(input); * const response = await client.send(command); * // { // GetAsyncInvokeResponse * // invocationArn: "STRING_VALUE", // required * // modelArn: "STRING_VALUE", // required * // clientRequestToken: "STRING_VALUE", * // status: "InProgress" || "Completed" || "Failed", // required * // failureMessage: "STRING_VALUE", * // submitTime: new Date("TIMESTAMP"), // required * // lastModifiedTime: new Date("TIMESTAMP"), * // endTime: new Date("TIMESTAMP"), * // outputDataConfig: { // AsyncInvokeOutputDataConfig Union: only one key present * // s3OutputDataConfig: { // AsyncInvokeS3OutputDataConfig * // s3Uri: "STRING_VALUE", // required * // kmsKeyId: "STRING_VALUE", * // bucketOwner: "STRING_VALUE", * // }, * // }, * // }; * * ``` * * @param GetAsyncInvokeCommandInput - {@link GetAsyncInvokeCommandInput} * @returns {@link GetAsyncInvokeCommandOutput} * @see {@link GetAsyncInvokeCommandInput} for command's `input` shape. * @see {@link GetAsyncInvokeCommandOutput} for command's `response` shape. * @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape. * * @throws {@link AccessDeniedException} (client fault) *

The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see AccessDeniedException in the Amazon Bedrock User Guide

* * @throws {@link InternalServerException} (server fault) *

An internal server error occurred. For troubleshooting this error, see InternalFailure in the Amazon Bedrock User Guide

* * @throws {@link ThrottlingException} (client fault) *

Your request was denied due to exceeding the account quotas for Amazon Bedrock. For troubleshooting this error, see ThrottlingException in the Amazon Bedrock User Guide

* * @throws {@link ValidationException} (client fault) *

The input fails to satisfy the constraints specified by Amazon Bedrock. For troubleshooting this error, see ValidationError in the Amazon Bedrock User Guide

* * @throws {@link BedrockRuntimeServiceException} *

Base exception class for all service exceptions from BedrockRuntime service.

* * * @public */ declare class GetAsyncInvokeCommand extends GetAsyncInvokeCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: GetAsyncInvokeRequest; output: GetAsyncInvokeResponse; }; sdk: { input: GetAsyncInvokeCommandInput; output: GetAsyncInvokeCommandOutput; }; }; } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+client-bedrock-runtime@3.1111.0/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/commands/InvokeGuardrailChecksCommand.d.ts /** * @public * * The input for {@link InvokeGuardrailChecksCommand}. */ interface InvokeGuardrailChecksCommandInput extends InvokeGuardrailChecksRequest {} /** * @public * * The output of {@link InvokeGuardrailChecksCommand}. */ interface InvokeGuardrailChecksCommandOutput extends InvokeGuardrailChecksResponse, MetadataBearer {} declare const InvokeGuardrailChecksCommand_base: { new (input: InvokeGuardrailChecksCommandInput): CommandImpl; new (input: InvokeGuardrailChecksCommandInput): CommandImpl; getEndpointParameterInstructions(): EndpointParameterInstructions; }; /** *

Evaluates messages against inline guardrail checks. You specify the check configurations directly in the request, and Amazon Bedrock returns per-check results with severity or confidence scores.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { BedrockRuntimeClient, InvokeGuardrailChecksCommand } from "@aws-sdk/client-bedrock-runtime"; // ES Modules import * // const { BedrockRuntimeClient, InvokeGuardrailChecksCommand } = require("@aws-sdk/client-bedrock-runtime"); // CommonJS import * // import type { BedrockRuntimeClientConfig } from "@aws-sdk/client-bedrock-runtime"; * const config = {}; // type is BedrockRuntimeClientConfig * const client = new BedrockRuntimeClient(config); * const input = { // InvokeGuardrailChecksRequest * messages: [ // GuardrailChecksMessageList // required * { // GuardrailChecksMessage * role: "user" || "assistant" || "system", // required * content: [ // GuardrailChecksContentBlockList // required * { // GuardrailChecksContentBlock Union: only one key present * text: "STRING_VALUE", * }, * ], * }, * ], * checks: { // GuardrailChecksConfig * contentFilter: { // GuardrailChecksContentFilterConfig * categories: [ // GuardrailChecksContentFilterCategoryConfigList // required * { // GuardrailChecksContentFilterCategoryConfig * category: "VIOLENCE" || "HATE" || "SEXUAL" || "MISCONDUCT" || "INSULTS", // required * }, * ], * }, * promptAttack: { // GuardrailChecksPromptAttackConfig * categories: [ // GuardrailChecksPromptAttackCategoryConfigList // required * { // GuardrailChecksPromptAttackCategoryConfig * category: "JAILBREAK" || "PROMPT_INJECTION" || "PROMPT_LEAKAGE", // required * }, * ], * }, * sensitiveInformation: { // GuardrailChecksSensitiveInformationConfig * entities: [ // GuardrailChecksSensitiveInformationEntityConfigList // required * { // GuardrailChecksSensitiveInformationEntityConfig * type: "ADDRESS" || "AGE" || "AWS_ACCESS_KEY" || "AWS_SECRET_KEY" || "CA_HEALTH_NUMBER" || "CA_SOCIAL_INSURANCE_NUMBER" || "CREDIT_DEBIT_CARD_CVV" || "CREDIT_DEBIT_CARD_EXPIRY" || "CREDIT_DEBIT_CARD_NUMBER" || "DRIVER_ID" || "EMAIL" || "INTERNATIONAL_BANK_ACCOUNT_NUMBER" || "IP_ADDRESS" || "LICENSE_PLATE" || "MAC_ADDRESS" || "NAME" || "PASSWORD" || "PHONE" || "PIN" || "SWIFT_CODE" || "UK_NATIONAL_HEALTH_SERVICE_NUMBER" || "UK_NATIONAL_INSURANCE_NUMBER" || "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER" || "URL" || "USERNAME" || "US_BANK_ACCOUNT_NUMBER" || "US_BANK_ROUTING_NUMBER" || "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER" || "US_PASSPORT_NUMBER" || "US_SOCIAL_SECURITY_NUMBER" || "VEHICLE_IDENTIFICATION_NUMBER", // required * }, * ], * }, * }, * }; * const command = new InvokeGuardrailChecksCommand(input); * const response = await client.send(command); * // { // InvokeGuardrailChecksResponse * // results: { // GuardrailChecksResults * // contentFilter: { // GuardrailChecksContentFilterResult * // results: [ // GuardrailChecksContentFilterResultList // required * // { // GuardrailChecksContentFilterResultEntry * // category: "VIOLENCE" || "HATE" || "SEXUAL" || "MISCONDUCT" || "INSULTS", // required * // severityScore: Number("double"), // required * // }, * // ], * // }, * // promptAttack: { // GuardrailChecksPromptAttackResult * // results: [ // GuardrailChecksPromptAttackResultList // required * // { // GuardrailChecksPromptAttackResultEntry * // category: "JAILBREAK" || "PROMPT_INJECTION" || "PROMPT_LEAKAGE", // required * // severityScore: Number("double"), // required * // }, * // ], * // }, * // sensitiveInformation: { // GuardrailChecksSensitiveInformationResult * // results: [ // GuardrailChecksSensitiveInformationResultList // required * // { // GuardrailChecksSensitiveInformationResultEntry * // type: "ADDRESS" || "AGE" || "AWS_ACCESS_KEY" || "AWS_SECRET_KEY" || "CA_HEALTH_NUMBER" || "CA_SOCIAL_INSURANCE_NUMBER" || "CREDIT_DEBIT_CARD_CVV" || "CREDIT_DEBIT_CARD_EXPIRY" || "CREDIT_DEBIT_CARD_NUMBER" || "DRIVER_ID" || "EMAIL" || "INTERNATIONAL_BANK_ACCOUNT_NUMBER" || "IP_ADDRESS" || "LICENSE_PLATE" || "MAC_ADDRESS" || "NAME" || "PASSWORD" || "PHONE" || "PIN" || "SWIFT_CODE" || "UK_NATIONAL_HEALTH_SERVICE_NUMBER" || "UK_NATIONAL_INSURANCE_NUMBER" || "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER" || "URL" || "USERNAME" || "US_BANK_ACCOUNT_NUMBER" || "US_BANK_ROUTING_NUMBER" || "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER" || "US_PASSPORT_NUMBER" || "US_SOCIAL_SECURITY_NUMBER" || "VEHICLE_IDENTIFICATION_NUMBER", // required * // confidenceScore: Number("double"), // required * // beginOffset: Number("int"), // required * // endOffset: Number("int"), // required * // messageIndex: Number("int"), // required * // contentIndex: Number("int"), // required * // }, * // ], * // truncated: true || false, * // }, * // }, * // usage: { // GuardrailChecksUsageResults * // contentFilter: { // GuardrailChecksContentFilterUsage * // textUnits: Number("int"), // required * // }, * // promptAttack: { // GuardrailChecksPromptAttackUsage * // textUnits: Number("int"), // required * // }, * // sensitiveInformation: { // GuardrailChecksSensitiveInformationUsage * // textUnits: Number("int"), // required * // }, * // }, * // }; * * ``` * * @param InvokeGuardrailChecksCommandInput - {@link InvokeGuardrailChecksCommandInput} * @returns {@link InvokeGuardrailChecksCommandOutput} * @see {@link InvokeGuardrailChecksCommandInput} for command's `input` shape. * @see {@link InvokeGuardrailChecksCommandOutput} for command's `response` shape. * @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape. * * @throws {@link AccessDeniedException} (client fault) *

The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see AccessDeniedException in the Amazon Bedrock User Guide

* * @throws {@link InternalServerException} (server fault) *

An internal server error occurred. For troubleshooting this error, see InternalFailure in the Amazon Bedrock User Guide

* * @throws {@link ServiceUnavailableException} (server fault) *

The service isn't currently available. For troubleshooting this error, see ServiceUnavailable in the Amazon Bedrock User Guide

* * @throws {@link ThrottlingException} (client fault) *

Your request was denied due to exceeding the account quotas for Amazon Bedrock. For troubleshooting this error, see ThrottlingException in the Amazon Bedrock User Guide

* * @throws {@link ValidationException} (client fault) *

The input fails to satisfy the constraints specified by Amazon Bedrock. For troubleshooting this error, see ValidationError in the Amazon Bedrock User Guide

* * @throws {@link BedrockRuntimeServiceException} *

Base exception class for all service exceptions from BedrockRuntime service.

* * * @public */ declare class InvokeGuardrailChecksCommand extends InvokeGuardrailChecksCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: InvokeGuardrailChecksRequest; output: InvokeGuardrailChecksResponse; }; sdk: { input: InvokeGuardrailChecksCommandInput; output: InvokeGuardrailChecksCommandOutput; }; }; } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+client-bedrock-runtime@3.1111.0/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/commands/InvokeModelCommand.d.ts /** * @public */ type InvokeModelCommandInputType = Omit & { body?: BlobPayloadInputTypes; }; /** * @public * * The input for {@link InvokeModelCommand}. */ interface InvokeModelCommandInput extends InvokeModelCommandInputType {} /** * @public */ type InvokeModelCommandOutputType = Omit & { body: Uint8ArrayBlobAdapter; }; /** * @public * * The output of {@link InvokeModelCommand}. */ interface InvokeModelCommandOutput extends InvokeModelCommandOutputType, MetadataBearer {} declare const InvokeModelCommand_base: { new (input: InvokeModelCommandInput): CommandImpl; new (input: InvokeModelCommandInput): CommandImpl; getEndpointParameterInstructions(): EndpointParameterInstructions; }; /** *

Invokes the specified Amazon Bedrock model to run inference using the prompt and inference parameters provided in the request body. You use model inference to generate text, images, and embeddings.

For example code, see Invoke model code examples in the Amazon Bedrock User Guide.

This operation requires permission for the bedrock:InvokeModel action.

To deny all inference access to resources that you specify in the modelId field, you need to deny access to the bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream actions. Doing this also denies access to the resource through the Converse API actions (Converse and ConverseStream). For more information see Deny access for inference on specific models.

For troubleshooting some of the common errors you might encounter when using the InvokeModel API, see Troubleshooting Amazon Bedrock API Error Codes in the Amazon Bedrock User Guide

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { BedrockRuntimeClient, InvokeModelCommand } from "@aws-sdk/client-bedrock-runtime"; // ES Modules import * // const { BedrockRuntimeClient, InvokeModelCommand } = require("@aws-sdk/client-bedrock-runtime"); // CommonJS import * // import type { BedrockRuntimeClientConfig } from "@aws-sdk/client-bedrock-runtime"; * const config = {}; // type is BedrockRuntimeClientConfig * const client = new BedrockRuntimeClient(config); * const input = { // InvokeModelRequest * body: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * contentType: "STRING_VALUE", * accept: "STRING_VALUE", * modelId: "STRING_VALUE", // required * trace: "ENABLED" || "DISABLED" || "ENABLED_FULL", * guardrailIdentifier: "STRING_VALUE", * guardrailVersion: "STRING_VALUE", * performanceConfigLatency: "standard" || "optimized", * serviceTier: "priority" || "default" || "flex" || "reserved", * requestMetadata: "STRING_VALUE", * }; * const command = new InvokeModelCommand(input); * const response = await client.send(command); * // { // InvokeModelResponse * // body: new Uint8Array(), // required * // contentType: "STRING_VALUE", // required * // performanceConfigLatency: "standard" || "optimized", * // serviceTier: "priority" || "default" || "flex" || "reserved", * // }; * * ``` * * @param InvokeModelCommandInput - {@link InvokeModelCommandInput} * @returns {@link InvokeModelCommandOutput} * @see {@link InvokeModelCommandInput} for command's `input` shape. * @see {@link InvokeModelCommandOutput} for command's `response` shape. * @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape. * * @throws {@link AccessDeniedException} (client fault) *

The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see AccessDeniedException in the Amazon Bedrock User Guide

* * @throws {@link InternalServerException} (server fault) *

An internal server error occurred. For troubleshooting this error, see InternalFailure in the Amazon Bedrock User Guide

* * @throws {@link ModelErrorException} (client fault) *

The request failed due to an error while processing the model.

* * @throws {@link ModelNotReadyException} (client fault) *

The model specified in the request is not ready to serve inference requests. The AWS SDK will automatically retry the operation up to 5 times. For information about configuring automatic retries, see Retry behavior in the AWS SDKs and Tools reference guide.

* * @throws {@link ModelTimeoutException} (client fault) *

The request took too long to process. Processing time exceeded the model timeout length.

* * @throws {@link ResourceNotFoundException} (client fault) *

The specified resource ARN was not found. For troubleshooting this error, see ResourceNotFound in the Amazon Bedrock User Guide

* * @throws {@link ServiceQuotaExceededException} (client fault) *

Your request exceeds the service quota for your account. You can view your quotas at Viewing service quotas. You can resubmit your request later.

* * @throws {@link ServiceUnavailableException} (server fault) *

The service isn't currently available. For troubleshooting this error, see ServiceUnavailable in the Amazon Bedrock User Guide

* * @throws {@link ThrottlingException} (client fault) *

Your request was denied due to exceeding the account quotas for Amazon Bedrock. For troubleshooting this error, see ThrottlingException in the Amazon Bedrock User Guide

* * @throws {@link ValidationException} (client fault) *

The input fails to satisfy the constraints specified by Amazon Bedrock. For troubleshooting this error, see ValidationError in the Amazon Bedrock User Guide

* * @throws {@link BedrockRuntimeServiceException} *

Base exception class for all service exceptions from BedrockRuntime service.

* * * @public */ declare class InvokeModelCommand extends InvokeModelCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: InvokeModelRequest; output: InvokeModelResponse; }; sdk: { input: InvokeModelCommandInput; output: InvokeModelCommandOutput; }; }; } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+client-bedrock-runtime@3.1111.0/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/commands/InvokeModelWithBidirectionalStreamCommand.d.ts /** * @public * * The input for {@link InvokeModelWithBidirectionalStreamCommand}. */ interface InvokeModelWithBidirectionalStreamCommandInput extends InvokeModelWithBidirectionalStreamRequest {} /** * @public * * The output of {@link InvokeModelWithBidirectionalStreamCommand}. */ interface InvokeModelWithBidirectionalStreamCommandOutput extends InvokeModelWithBidirectionalStreamResponse, MetadataBearer {} declare const InvokeModelWithBidirectionalStreamCommand_base: { new (input: InvokeModelWithBidirectionalStreamCommandInput): CommandImpl; new (input: InvokeModelWithBidirectionalStreamCommandInput): CommandImpl; getEndpointParameterInstructions(): EndpointParameterInstructions; }; /** *

Invoke the specified Amazon Bedrock model to run inference using the bidirectional stream. The response is returned in a stream that remains open for 8 minutes. A single session can contain multiple prompts and responses from the model. The prompts to the model are provided as audio files and the model's responses are spoken back to the user and transcribed.

It is possible for users to interrupt the model's response with a new prompt, which will halt the response speech. The model will retain contextual awareness of the conversation while pivoting to respond to the new prompt.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { BedrockRuntimeClient, InvokeModelWithBidirectionalStreamCommand } from "@aws-sdk/client-bedrock-runtime"; // ES Modules import * // const { BedrockRuntimeClient, InvokeModelWithBidirectionalStreamCommand } = require("@aws-sdk/client-bedrock-runtime"); // CommonJS import * // import type { BedrockRuntimeClientConfig } from "@aws-sdk/client-bedrock-runtime"; * const config = {}; // type is BedrockRuntimeClientConfig * const client = new BedrockRuntimeClient(config); * const input = { // InvokeModelWithBidirectionalStreamRequest * modelId: "STRING_VALUE", // required * body: { // InvokeModelWithBidirectionalStreamInput Union: only one key present * chunk: { // BidirectionalInputPayloadPart * bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * }, * }, * }; * const command = new InvokeModelWithBidirectionalStreamCommand(input); * const response = await client.send(command); * // { // InvokeModelWithBidirectionalStreamResponse * // body: { // InvokeModelWithBidirectionalStreamOutput Union: only one key present * // chunk: { // BidirectionalOutputPayloadPart * // bytes: new Uint8Array(), * // }, * // internalServerException: { // InternalServerException * // message: "STRING_VALUE", * // }, * // modelStreamErrorException: { // ModelStreamErrorException * // message: "STRING_VALUE", * // originalStatusCode: Number("int"), * // originalMessage: "STRING_VALUE", * // }, * // validationException: { // ValidationException * // message: "STRING_VALUE", * // }, * // throttlingException: { // ThrottlingException * // message: "STRING_VALUE", * // }, * // modelTimeoutException: { // ModelTimeoutException * // message: "STRING_VALUE", * // }, * // serviceUnavailableException: { // ServiceUnavailableException * // message: "STRING_VALUE", * // }, * // }, * // }; * * ``` * * @param InvokeModelWithBidirectionalStreamCommandInput - {@link InvokeModelWithBidirectionalStreamCommandInput} * @returns {@link InvokeModelWithBidirectionalStreamCommandOutput} * @see {@link InvokeModelWithBidirectionalStreamCommandInput} for command's `input` shape. * @see {@link InvokeModelWithBidirectionalStreamCommandOutput} for command's `response` shape. * @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape. * * @throws {@link AccessDeniedException} (client fault) *

The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see AccessDeniedException in the Amazon Bedrock User Guide

* * @throws {@link InternalServerException} (server fault) *

An internal server error occurred. For troubleshooting this error, see InternalFailure in the Amazon Bedrock User Guide

* * @throws {@link ModelErrorException} (client fault) *

The request failed due to an error while processing the model.

* * @throws {@link ModelNotReadyException} (client fault) *

The model specified in the request is not ready to serve inference requests. The AWS SDK will automatically retry the operation up to 5 times. For information about configuring automatic retries, see Retry behavior in the AWS SDKs and Tools reference guide.

* * @throws {@link ModelStreamErrorException} (client fault) *

An error occurred while streaming the response. Retry your request.

* * @throws {@link ModelTimeoutException} (client fault) *

The request took too long to process. Processing time exceeded the model timeout length.

* * @throws {@link ResourceNotFoundException} (client fault) *

The specified resource ARN was not found. For troubleshooting this error, see ResourceNotFound in the Amazon Bedrock User Guide

* * @throws {@link ServiceQuotaExceededException} (client fault) *

Your request exceeds the service quota for your account. You can view your quotas at Viewing service quotas. You can resubmit your request later.

* * @throws {@link ServiceUnavailableException} (server fault) *

The service isn't currently available. For troubleshooting this error, see ServiceUnavailable in the Amazon Bedrock User Guide

* * @throws {@link ThrottlingException} (client fault) *

Your request was denied due to exceeding the account quotas for Amazon Bedrock. For troubleshooting this error, see ThrottlingException in the Amazon Bedrock User Guide

* * @throws {@link ValidationException} (client fault) *

The input fails to satisfy the constraints specified by Amazon Bedrock. For troubleshooting this error, see ValidationError in the Amazon Bedrock User Guide

* * @throws {@link BedrockRuntimeServiceException} *

Base exception class for all service exceptions from BedrockRuntime service.

* * * @public */ declare class InvokeModelWithBidirectionalStreamCommand extends InvokeModelWithBidirectionalStreamCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: InvokeModelWithBidirectionalStreamRequest; output: InvokeModelWithBidirectionalStreamResponse; }; sdk: { input: InvokeModelWithBidirectionalStreamCommandInput; output: InvokeModelWithBidirectionalStreamCommandOutput; }; }; } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+client-bedrock-runtime@3.1111.0/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/commands/InvokeModelWithResponseStreamCommand.d.ts /** * @public */ type InvokeModelWithResponseStreamCommandInputType = Omit & { body?: BlobPayloadInputTypes; }; /** * @public * * The input for {@link InvokeModelWithResponseStreamCommand}. */ interface InvokeModelWithResponseStreamCommandInput extends InvokeModelWithResponseStreamCommandInputType {} /** * @public * * The output of {@link InvokeModelWithResponseStreamCommand}. */ interface InvokeModelWithResponseStreamCommandOutput extends InvokeModelWithResponseStreamResponse, MetadataBearer {} declare const InvokeModelWithResponseStreamCommand_base: { new (input: InvokeModelWithResponseStreamCommandInput): CommandImpl; new (input: InvokeModelWithResponseStreamCommandInput): CommandImpl; getEndpointParameterInstructions(): EndpointParameterInstructions; }; /** *

Invoke the specified Amazon Bedrock model to run inference using the prompt and inference parameters provided in the request body. The response is returned in a stream.

To see if a model supports streaming, call GetFoundationModel and check the responseStreamingSupported field in the response.

The CLI doesn't support streaming operations in Amazon Bedrock, including InvokeModelWithResponseStream.

For example code, see Invoke model with streaming code example in the Amazon Bedrock User Guide.

This operation requires permissions to perform the bedrock:InvokeModelWithResponseStream action.

To deny all inference access to resources that you specify in the modelId field, you need to deny access to the bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream actions. Doing this also denies access to the resource through the Converse API actions (Converse and ConverseStream). For more information see Deny access for inference on specific models.

For troubleshooting some of the common errors you might encounter when using the InvokeModelWithResponseStream API, see Troubleshooting Amazon Bedrock API Error Codes in the Amazon Bedrock User Guide

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { BedrockRuntimeClient, InvokeModelWithResponseStreamCommand } from "@aws-sdk/client-bedrock-runtime"; // ES Modules import * // const { BedrockRuntimeClient, InvokeModelWithResponseStreamCommand } = require("@aws-sdk/client-bedrock-runtime"); // CommonJS import * // import type { BedrockRuntimeClientConfig } from "@aws-sdk/client-bedrock-runtime"; * const config = {}; // type is BedrockRuntimeClientConfig * const client = new BedrockRuntimeClient(config); * const input = { // InvokeModelWithResponseStreamRequest * body: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * contentType: "STRING_VALUE", * accept: "STRING_VALUE", * modelId: "STRING_VALUE", // required * trace: "ENABLED" || "DISABLED" || "ENABLED_FULL", * guardrailIdentifier: "STRING_VALUE", * guardrailVersion: "STRING_VALUE", * performanceConfigLatency: "standard" || "optimized", * serviceTier: "priority" || "default" || "flex" || "reserved", * requestMetadata: "STRING_VALUE", * }; * const command = new InvokeModelWithResponseStreamCommand(input); * const response = await client.send(command); * // { // InvokeModelWithResponseStreamResponse * // body: { // ResponseStream Union: only one key present * // chunk: { // PayloadPart * // bytes: new Uint8Array(), * // }, * // internalServerException: { // InternalServerException * // message: "STRING_VALUE", * // }, * // modelStreamErrorException: { // ModelStreamErrorException * // message: "STRING_VALUE", * // originalStatusCode: Number("int"), * // originalMessage: "STRING_VALUE", * // }, * // validationException: { // ValidationException * // message: "STRING_VALUE", * // }, * // throttlingException: { // ThrottlingException * // message: "STRING_VALUE", * // }, * // modelTimeoutException: { // ModelTimeoutException * // message: "STRING_VALUE", * // }, * // serviceUnavailableException: { // ServiceUnavailableException * // message: "STRING_VALUE", * // }, * // }, * // contentType: "STRING_VALUE", // required * // performanceConfigLatency: "standard" || "optimized", * // serviceTier: "priority" || "default" || "flex" || "reserved", * // }; * * ``` * * @param InvokeModelWithResponseStreamCommandInput - {@link InvokeModelWithResponseStreamCommandInput} * @returns {@link InvokeModelWithResponseStreamCommandOutput} * @see {@link InvokeModelWithResponseStreamCommandInput} for command's `input` shape. * @see {@link InvokeModelWithResponseStreamCommandOutput} for command's `response` shape. * @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape. * * @throws {@link AccessDeniedException} (client fault) *

The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see AccessDeniedException in the Amazon Bedrock User Guide

* * @throws {@link InternalServerException} (server fault) *

An internal server error occurred. For troubleshooting this error, see InternalFailure in the Amazon Bedrock User Guide

* * @throws {@link ModelErrorException} (client fault) *

The request failed due to an error while processing the model.

* * @throws {@link ModelNotReadyException} (client fault) *

The model specified in the request is not ready to serve inference requests. The AWS SDK will automatically retry the operation up to 5 times. For information about configuring automatic retries, see Retry behavior in the AWS SDKs and Tools reference guide.

* * @throws {@link ModelStreamErrorException} (client fault) *

An error occurred while streaming the response. Retry your request.

* * @throws {@link ModelTimeoutException} (client fault) *

The request took too long to process. Processing time exceeded the model timeout length.

* * @throws {@link ResourceNotFoundException} (client fault) *

The specified resource ARN was not found. For troubleshooting this error, see ResourceNotFound in the Amazon Bedrock User Guide

* * @throws {@link ServiceQuotaExceededException} (client fault) *

Your request exceeds the service quota for your account. You can view your quotas at Viewing service quotas. You can resubmit your request later.

* * @throws {@link ServiceUnavailableException} (server fault) *

The service isn't currently available. For troubleshooting this error, see ServiceUnavailable in the Amazon Bedrock User Guide

* * @throws {@link ThrottlingException} (client fault) *

Your request was denied due to exceeding the account quotas for Amazon Bedrock. For troubleshooting this error, see ThrottlingException in the Amazon Bedrock User Guide

* * @throws {@link ValidationException} (client fault) *

The input fails to satisfy the constraints specified by Amazon Bedrock. For troubleshooting this error, see ValidationError in the Amazon Bedrock User Guide

* * @throws {@link BedrockRuntimeServiceException} *

Base exception class for all service exceptions from BedrockRuntime service.

* * * @public */ declare class InvokeModelWithResponseStreamCommand extends InvokeModelWithResponseStreamCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: InvokeModelWithResponseStreamRequest; output: InvokeModelWithResponseStreamResponse; }; sdk: { input: InvokeModelWithResponseStreamCommandInput; output: InvokeModelWithResponseStreamCommandOutput; }; }; } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+client-bedrock-runtime@3.1111.0/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/commands/ListAsyncInvokesCommand.d.ts /** * @public * * The input for {@link ListAsyncInvokesCommand}. */ interface ListAsyncInvokesCommandInput extends ListAsyncInvokesRequest {} /** * @public * * The output of {@link ListAsyncInvokesCommand}. */ interface ListAsyncInvokesCommandOutput extends ListAsyncInvokesResponse, MetadataBearer {} declare const ListAsyncInvokesCommand_base: { new (input: ListAsyncInvokesCommandInput): CommandImpl; new (...[input]: [] | [ListAsyncInvokesCommandInput]): CommandImpl; getEndpointParameterInstructions(): EndpointParameterInstructions; }; /** *

Lists asynchronous invocations.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { BedrockRuntimeClient, ListAsyncInvokesCommand } from "@aws-sdk/client-bedrock-runtime"; // ES Modules import * // const { BedrockRuntimeClient, ListAsyncInvokesCommand } = require("@aws-sdk/client-bedrock-runtime"); // CommonJS import * // import type { BedrockRuntimeClientConfig } from "@aws-sdk/client-bedrock-runtime"; * const config = {}; // type is BedrockRuntimeClientConfig * const client = new BedrockRuntimeClient(config); * const input = { // ListAsyncInvokesRequest * submitTimeAfter: new Date("TIMESTAMP"), * submitTimeBefore: new Date("TIMESTAMP"), * statusEquals: "InProgress" || "Completed" || "Failed", * maxResults: Number("int"), * nextToken: "STRING_VALUE", * sortBy: "SubmissionTime", * sortOrder: "Ascending" || "Descending", * }; * const command = new ListAsyncInvokesCommand(input); * const response = await client.send(command); * // { // ListAsyncInvokesResponse * // nextToken: "STRING_VALUE", * // asyncInvokeSummaries: [ // AsyncInvokeSummaries * // { // AsyncInvokeSummary * // invocationArn: "STRING_VALUE", // required * // modelArn: "STRING_VALUE", // required * // clientRequestToken: "STRING_VALUE", * // status: "InProgress" || "Completed" || "Failed", * // failureMessage: "STRING_VALUE", * // submitTime: new Date("TIMESTAMP"), // required * // lastModifiedTime: new Date("TIMESTAMP"), * // endTime: new Date("TIMESTAMP"), * // outputDataConfig: { // AsyncInvokeOutputDataConfig Union: only one key present * // s3OutputDataConfig: { // AsyncInvokeS3OutputDataConfig * // s3Uri: "STRING_VALUE", // required * // kmsKeyId: "STRING_VALUE", * // bucketOwner: "STRING_VALUE", * // }, * // }, * // }, * // ], * // }; * * ``` * * @param ListAsyncInvokesCommandInput - {@link ListAsyncInvokesCommandInput} * @returns {@link ListAsyncInvokesCommandOutput} * @see {@link ListAsyncInvokesCommandInput} for command's `input` shape. * @see {@link ListAsyncInvokesCommandOutput} for command's `response` shape. * @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape. * * @throws {@link AccessDeniedException} (client fault) *

The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see AccessDeniedException in the Amazon Bedrock User Guide

* * @throws {@link InternalServerException} (server fault) *

An internal server error occurred. For troubleshooting this error, see InternalFailure in the Amazon Bedrock User Guide

* * @throws {@link ThrottlingException} (client fault) *

Your request was denied due to exceeding the account quotas for Amazon Bedrock. For troubleshooting this error, see ThrottlingException in the Amazon Bedrock User Guide

* * @throws {@link ValidationException} (client fault) *

The input fails to satisfy the constraints specified by Amazon Bedrock. For troubleshooting this error, see ValidationError in the Amazon Bedrock User Guide

* * @throws {@link BedrockRuntimeServiceException} *

Base exception class for all service exceptions from BedrockRuntime service.

* * * @public */ declare class ListAsyncInvokesCommand extends ListAsyncInvokesCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: ListAsyncInvokesRequest; output: ListAsyncInvokesResponse; }; sdk: { input: ListAsyncInvokesCommandInput; output: ListAsyncInvokesCommandOutput; }; }; } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+client-bedrock-runtime@3.1111.0/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/commands/StartAsyncInvokeCommand.d.ts /** * @public * * The input for {@link StartAsyncInvokeCommand}. */ interface StartAsyncInvokeCommandInput extends StartAsyncInvokeRequest {} /** * @public * * The output of {@link StartAsyncInvokeCommand}. */ interface StartAsyncInvokeCommandOutput extends StartAsyncInvokeResponse, MetadataBearer {} declare const StartAsyncInvokeCommand_base: { new (input: StartAsyncInvokeCommandInput): CommandImpl; new (input: StartAsyncInvokeCommandInput): CommandImpl; getEndpointParameterInstructions(): EndpointParameterInstructions; }; /** *

Starts an asynchronous invocation.

This operation requires permission for the bedrock:InvokeModel action.

To deny all inference access to resources that you specify in the modelId field, you need to deny access to the bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream actions. Doing this also denies access to the resource through the Converse API actions (Converse and ConverseStream). For more information see Deny access for inference on specific models.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { BedrockRuntimeClient, StartAsyncInvokeCommand } from "@aws-sdk/client-bedrock-runtime"; // ES Modules import * // const { BedrockRuntimeClient, StartAsyncInvokeCommand } = require("@aws-sdk/client-bedrock-runtime"); // CommonJS import * // import type { BedrockRuntimeClientConfig } from "@aws-sdk/client-bedrock-runtime"; * const config = {}; // type is BedrockRuntimeClientConfig * const client = new BedrockRuntimeClient(config); * const input = { // StartAsyncInvokeRequest * clientRequestToken: "STRING_VALUE", * modelId: "STRING_VALUE", // required * modelInput: "DOCUMENT_VALUE", // required * outputDataConfig: { // AsyncInvokeOutputDataConfig Union: only one key present * s3OutputDataConfig: { // AsyncInvokeS3OutputDataConfig * s3Uri: "STRING_VALUE", // required * kmsKeyId: "STRING_VALUE", * bucketOwner: "STRING_VALUE", * }, * }, * tags: [ // TagList * { // Tag * key: "STRING_VALUE", // required * value: "STRING_VALUE", // required * }, * ], * }; * const command = new StartAsyncInvokeCommand(input); * const response = await client.send(command); * // { // StartAsyncInvokeResponse * // invocationArn: "STRING_VALUE", // required * // }; * * ``` * * @param StartAsyncInvokeCommandInput - {@link StartAsyncInvokeCommandInput} * @returns {@link StartAsyncInvokeCommandOutput} * @see {@link StartAsyncInvokeCommandInput} for command's `input` shape. * @see {@link StartAsyncInvokeCommandOutput} for command's `response` shape. * @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape. * * @throws {@link AccessDeniedException} (client fault) *

The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see AccessDeniedException in the Amazon Bedrock User Guide

* * @throws {@link ConflictException} (client fault) *

Error occurred because of a conflict while performing an operation.

* * @throws {@link InternalServerException} (server fault) *

An internal server error occurred. For troubleshooting this error, see InternalFailure in the Amazon Bedrock User Guide

* * @throws {@link ResourceNotFoundException} (client fault) *

The specified resource ARN was not found. For troubleshooting this error, see ResourceNotFound in the Amazon Bedrock User Guide

* * @throws {@link ServiceQuotaExceededException} (client fault) *

Your request exceeds the service quota for your account. You can view your quotas at Viewing service quotas. You can resubmit your request later.

* * @throws {@link ServiceUnavailableException} (server fault) *

The service isn't currently available. For troubleshooting this error, see ServiceUnavailable in the Amazon Bedrock User Guide

* * @throws {@link ThrottlingException} (client fault) *

Your request was denied due to exceeding the account quotas for Amazon Bedrock. For troubleshooting this error, see ThrottlingException in the Amazon Bedrock User Guide

* * @throws {@link ValidationException} (client fault) *

The input fails to satisfy the constraints specified by Amazon Bedrock. For troubleshooting this error, see ValidationError in the Amazon Bedrock User Guide

* * @throws {@link BedrockRuntimeServiceException} *

Base exception class for all service exceptions from BedrockRuntime service.

* * * @public */ declare class StartAsyncInvokeCommand extends StartAsyncInvokeCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: StartAsyncInvokeRequest; output: StartAsyncInvokeResponse; }; sdk: { input: StartAsyncInvokeCommandInput; output: StartAsyncInvokeCommandOutput; }; }; } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+client-bedrock-runtime@3.1111.0/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/endpoint/EndpointParameters.d.ts /** * @public */ interface ClientInputEndpointParameters { region?: string | undefined | Provider; useDualstackEndpoint?: boolean | undefined | Provider; useFipsEndpoint?: boolean | undefined | Provider; endpoint?: string | Provider | Endpoint | Provider | EndpointV2 | Provider; } /** * @public */ type ClientResolvedEndpointParameters = Omit & { defaultSigningName: string; }; /** * @internal */ interface EndpointParameters extends EndpointParameters$1 { Region?: string | undefined; UseDualStack?: boolean | undefined; UseFIPS?: boolean | undefined; Endpoint?: string | undefined; } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+client-bedrock-runtime@3.1111.0/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/auth/httpAuthExtensionConfiguration.d.ts /** * @internal */ interface HttpAuthExtensionConfiguration { setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void; httpAuthSchemes(): HttpAuthScheme[]; setHttpAuthSchemeProvider(httpAuthSchemeProvider: BedrockRuntimeHttpAuthSchemeProvider): void; httpAuthSchemeProvider(): BedrockRuntimeHttpAuthSchemeProvider; setCredentials(credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider): void; credentials(): AwsCredentialIdentity | AwsCredentialIdentityProvider | undefined; setToken(token: TokenIdentity | TokenIdentityProvider): void; token(): TokenIdentity | TokenIdentityProvider | undefined; } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+client-bedrock-runtime@3.1111.0/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/extensionConfiguration.d.ts /** * @internal */ interface BedrockRuntimeExtensionConfiguration extends HttpHandlerExtensionConfiguration, DefaultExtensionConfiguration, AwsRegionExtensionConfiguration, HttpAuthExtensionConfiguration {} //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+client-bedrock-runtime@3.1111.0/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/runtimeExtensions.d.ts /** * @public */ interface RuntimeExtension { configure(extensionConfiguration: BedrockRuntimeExtensionConfiguration): void; } /** * @public */ interface RuntimeExtensionsConfig { extensions: RuntimeExtension[]; } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+client-bedrock-runtime@3.1111.0/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/BedrockRuntimeClient.d.ts /** * @public */ type ServiceInputTypes = ApplyGuardrailCommandInput | ConverseCommandInput | ConverseStreamCommandInput | CountTokensCommandInput | GetAsyncInvokeCommandInput | InvokeGuardrailChecksCommandInput | InvokeModelCommandInput | InvokeModelWithBidirectionalStreamCommandInput | InvokeModelWithResponseStreamCommandInput | ListAsyncInvokesCommandInput | StartAsyncInvokeCommandInput; /** * @public */ type ServiceOutputTypes = ApplyGuardrailCommandOutput | ConverseCommandOutput | ConverseStreamCommandOutput | CountTokensCommandOutput | GetAsyncInvokeCommandOutput | InvokeGuardrailChecksCommandOutput | InvokeModelCommandOutput | InvokeModelWithBidirectionalStreamCommandOutput | InvokeModelWithResponseStreamCommandOutput | ListAsyncInvokesCommandOutput | StartAsyncInvokeCommandOutput; /** * @public */ interface ClientDefaults extends Partial> { /** * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. */ requestHandler?: HttpHandlerUserInput; /** * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface * that computes the SHA-256 HMAC or checksum of a string or binary buffer. * @internal */ sha256?: ChecksumConstructor | HashConstructor; /** * The function that will be used to convert strings into HTTP endpoints. * @internal */ urlParser?: UrlParser; /** * A function that can calculate the length of a request body. * @internal */ bodyLengthChecker?: BodyLengthCalculator; /** * A function that converts a stream into an array of bytes. * @internal */ streamCollector?: StreamCollector; /** * The function that will be used to convert a base64-encoded string to a byte array. * @internal */ base64Decoder?: Decoder; /** * The function that will be used to convert binary data to a base64-encoded string. * @internal */ base64Encoder?: Encoder; /** * The function that will be used to convert a UTF8-encoded string to a byte array. * @internal */ utf8Decoder?: Decoder; /** * The function that will be used to convert binary data to a UTF-8 encoded string. * @internal */ utf8Encoder?: Encoder; /** * The runtime environment. * @internal */ runtime?: string; /** * Disable dynamically changing the endpoint of the client based on the hostPrefix * trait of an operation. */ disableHostPrefix?: boolean; /** * Unique service identifier. * @internal */ serviceId?: string; /** * Enables IPv6/IPv4 dualstack endpoint. */ useDualstackEndpoint?: boolean | Provider; /** * Enables FIPS compatible endpoints. */ useFipsEndpoint?: boolean | Provider; /** * The AWS region to which this client will send requests */ region?: string | Provider; /** * Setting a client profile is similar to setting a value for the * AWS_PROFILE environment variable. Setting a profile on a client * in code only affects the single client instance, unlike AWS_PROFILE. * * When set, and only for environments where an AWS configuration * file exists, fields configurable by this file will be retrieved * from the specified profile within that file. * Conflicting code configuration and environment variables will * still have higher priority. * * For client credential resolution that involves checking the AWS * configuration file, the client's profile (this value) will be * used unless a different profile is set in the credential * provider options. * */ profile?: string; /** * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header * @internal */ defaultUserAgentProvider?: Provider; /** * Default credentials provider; Not available in browser runtime. * @deprecated * @internal */ credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider; /** * Value for how many times a request will be made at most in case of retry. */ maxAttempts?: number | Provider; /** * Specifies which retry algorithm to use. * @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/ * */ retryMode?: string | Provider; /** * Optional logger for logging debug/info/warn/error. */ logger?: Logger; /** * Optional extensions */ extensions?: RuntimeExtension[]; /** * The function that provides necessary utilities for generating and parsing event stream */ eventStreamSerdeProvider?: EventStreamSerdeProvider; /** * The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK. */ defaultsMode?: DefaultsMode | Provider; /** * The function that provides necessary utilities for handling request event stream. * @internal */ eventStreamPayloadHandlerProvider?: EventStreamPayloadHandlerProvider; } /** * @public */ type BedrockRuntimeClientConfigType = Partial> & ClientDefaults & UserAgentInputConfig & RetryInputConfig & RegionInputConfig & HostHeaderInputConfig & EndpointInputConfig & EventStreamSerdeInputConfig & HttpAuthSchemeInputConfig & EventStreamInputConfig & WebSocketInputConfig & ClientInputEndpointParameters; /** * @public * * The configuration interface of BedrockRuntimeClient class constructor that set the region, credentials and other options. */ interface BedrockRuntimeClientConfig extends BedrockRuntimeClientConfigType {} /** * @public */ type BedrockRuntimeClientResolvedConfigType = SmithyResolvedConfiguration & Required & RuntimeExtensionsConfig & UserAgentResolvedConfig & RetryResolvedConfig & RegionResolvedConfig & HostHeaderResolvedConfig & EndpointResolvedConfig & EventStreamSerdeResolvedConfig & HttpAuthSchemeResolvedConfig & EventStreamResolvedConfig & WebSocketResolvedConfig & ClientResolvedEndpointParameters; /** * @public * * The resolved configuration interface of BedrockRuntimeClient class. This is resolved and normalized from the {@link BedrockRuntimeClientConfig | constructor configuration interface}. */ interface BedrockRuntimeClientResolvedConfig extends BedrockRuntimeClientResolvedConfigType {} /** *

Describes the API operations for running inference using Amazon Bedrock models.

* @public */ declare class BedrockRuntimeClient extends Client { /** * The resolved configuration of BedrockRuntimeClient class. This is resolved and normalized from the {@link BedrockRuntimeClientConfig | constructor configuration interface}. */ readonly config: BedrockRuntimeClientResolvedConfig; constructor(...[configuration]: CheckOptionalClientConfig); /** * Destroy underlying resources, like sockets. It's usually not necessary to do this. * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. * Otherwise, sockets might stay open for quite a long time before the server terminates them. */ destroy(): void; } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+client-bedrock-runtime@3.1111.0/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/BedrockRuntime.d.ts interface BedrockRuntime { /** * @see {@link ApplyGuardrailCommand} */ applyGuardrail(args: ApplyGuardrailCommandInput, options?: HttpHandlerOptions): Promise; applyGuardrail(args: ApplyGuardrailCommandInput, cb: (err: any, data?: ApplyGuardrailCommandOutput) => void): void; applyGuardrail(args: ApplyGuardrailCommandInput, options: HttpHandlerOptions, cb: (err: any, data?: ApplyGuardrailCommandOutput) => void): void; /** * @see {@link ConverseCommand} */ converse(args: ConverseCommandInput, options?: HttpHandlerOptions): Promise; converse(args: ConverseCommandInput, cb: (err: any, data?: ConverseCommandOutput) => void): void; converse(args: ConverseCommandInput, options: HttpHandlerOptions, cb: (err: any, data?: ConverseCommandOutput) => void): void; /** * @see {@link ConverseStreamCommand} */ converseStream(args: ConverseStreamCommandInput, options?: HttpHandlerOptions): Promise; converseStream(args: ConverseStreamCommandInput, cb: (err: any, data?: ConverseStreamCommandOutput) => void): void; converseStream(args: ConverseStreamCommandInput, options: HttpHandlerOptions, cb: (err: any, data?: ConverseStreamCommandOutput) => void): void; /** * @see {@link CountTokensCommand} */ countTokens(args: CountTokensCommandInput, options?: HttpHandlerOptions): Promise; countTokens(args: CountTokensCommandInput, cb: (err: any, data?: CountTokensCommandOutput) => void): void; countTokens(args: CountTokensCommandInput, options: HttpHandlerOptions, cb: (err: any, data?: CountTokensCommandOutput) => void): void; /** * @see {@link GetAsyncInvokeCommand} */ getAsyncInvoke(args: GetAsyncInvokeCommandInput, options?: HttpHandlerOptions): Promise; getAsyncInvoke(args: GetAsyncInvokeCommandInput, cb: (err: any, data?: GetAsyncInvokeCommandOutput) => void): void; getAsyncInvoke(args: GetAsyncInvokeCommandInput, options: HttpHandlerOptions, cb: (err: any, data?: GetAsyncInvokeCommandOutput) => void): void; /** * @see {@link InvokeGuardrailChecksCommand} */ invokeGuardrailChecks(args: InvokeGuardrailChecksCommandInput, options?: HttpHandlerOptions): Promise; invokeGuardrailChecks(args: InvokeGuardrailChecksCommandInput, cb: (err: any, data?: InvokeGuardrailChecksCommandOutput) => void): void; invokeGuardrailChecks(args: InvokeGuardrailChecksCommandInput, options: HttpHandlerOptions, cb: (err: any, data?: InvokeGuardrailChecksCommandOutput) => void): void; /** * @see {@link InvokeModelCommand} */ invokeModel(args: InvokeModelCommandInput, options?: HttpHandlerOptions): Promise; invokeModel(args: InvokeModelCommandInput, cb: (err: any, data?: InvokeModelCommandOutput) => void): void; invokeModel(args: InvokeModelCommandInput, options: HttpHandlerOptions, cb: (err: any, data?: InvokeModelCommandOutput) => void): void; /** * @see {@link InvokeModelWithBidirectionalStreamCommand} */ invokeModelWithBidirectionalStream(args: InvokeModelWithBidirectionalStreamCommandInput, options?: HttpHandlerOptions): Promise; invokeModelWithBidirectionalStream(args: InvokeModelWithBidirectionalStreamCommandInput, cb: (err: any, data?: InvokeModelWithBidirectionalStreamCommandOutput) => void): void; invokeModelWithBidirectionalStream(args: InvokeModelWithBidirectionalStreamCommandInput, options: HttpHandlerOptions, cb: (err: any, data?: InvokeModelWithBidirectionalStreamCommandOutput) => void): void; /** * @see {@link InvokeModelWithResponseStreamCommand} */ invokeModelWithResponseStream(args: InvokeModelWithResponseStreamCommandInput, options?: HttpHandlerOptions): Promise; invokeModelWithResponseStream(args: InvokeModelWithResponseStreamCommandInput, cb: (err: any, data?: InvokeModelWithResponseStreamCommandOutput) => void): void; invokeModelWithResponseStream(args: InvokeModelWithResponseStreamCommandInput, options: HttpHandlerOptions, cb: (err: any, data?: InvokeModelWithResponseStreamCommandOutput) => void): void; /** * @see {@link ListAsyncInvokesCommand} */ listAsyncInvokes(): Promise; listAsyncInvokes(args: ListAsyncInvokesCommandInput, options?: HttpHandlerOptions): Promise; listAsyncInvokes(args: ListAsyncInvokesCommandInput, cb: (err: any, data?: ListAsyncInvokesCommandOutput) => void): void; listAsyncInvokes(args: ListAsyncInvokesCommandInput, options: HttpHandlerOptions, cb: (err: any, data?: ListAsyncInvokesCommandOutput) => void): void; /** * @see {@link StartAsyncInvokeCommand} */ startAsyncInvoke(args: StartAsyncInvokeCommandInput, options?: HttpHandlerOptions): Promise; startAsyncInvoke(args: StartAsyncInvokeCommandInput, cb: (err: any, data?: StartAsyncInvokeCommandOutput) => void): void; startAsyncInvoke(args: StartAsyncInvokeCommandInput, options: HttpHandlerOptions, cb: (err: any, data?: StartAsyncInvokeCommandOutput) => void): void; /** * @see {@link ListAsyncInvokesCommand} * @param args - command input. * @param paginationConfig - optional pagination config. * @returns AsyncIterable of {@link ListAsyncInvokesCommandOutput}. */ paginateListAsyncInvokes(args?: ListAsyncInvokesCommandInput, paginationConfig?: Omit): Paginator; } /** *

Describes the API operations for running inference using Amazon Bedrock models.

* @public */ declare class BedrockRuntime extends BedrockRuntimeClient implements BedrockRuntime {} //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+client-bedrock-runtime@3.1111.0/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/pagination/Interfaces.d.ts /** * @public */ interface BedrockRuntimePaginationConfiguration extends PaginationConfiguration { client: BedrockRuntimeClient; } //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+client-bedrock-runtime@3.1111.0/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/pagination/ListAsyncInvokesPaginator.d.ts /** * @public */ declare const paginateListAsyncInvokes: (config: BedrockRuntimePaginationConfiguration, input: ListAsyncInvokesCommandInput, ...rest: any[]) => Paginator; //#endregion //#region ../../node_modules/.pnpm/@aws-sdk+client-bedrock-runtime@3.1111.0/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/schemas/schemas_0.d.ts declare var BedrockRuntimeServiceException$: StaticErrorSchema; declare var AccessDeniedException$: StaticErrorSchema; declare var ConflictException$: StaticErrorSchema; declare var InternalServerException$: StaticErrorSchema; declare var ModelErrorException$: StaticErrorSchema; declare var ModelNotReadyException$: StaticErrorSchema; declare var ModelStreamErrorException$: StaticErrorSchema; declare var ModelTimeoutException$: StaticErrorSchema; declare var ResourceNotFoundException$: StaticErrorSchema; declare var ServiceQuotaExceededException$: StaticErrorSchema; declare var ServiceUnavailableException$: StaticErrorSchema; declare var ThrottlingException$: StaticErrorSchema; declare var ValidationException$: StaticErrorSchema; /** * TypeRegistry instances containing modeled errors. * @internal * */ declare const errorTypeRegistries: TypeRegistry[]; declare var AnyToolChoice$: StaticStructureSchema; declare var AppliedGuardrailDetails$: StaticStructureSchema; declare var ApplyGuardrailRequest$: StaticStructureSchema; declare var ApplyGuardrailResponse$: StaticStructureSchema; declare var AsyncInvokeS3OutputDataConfig$: StaticStructureSchema; declare var AsyncInvokeSummary$: StaticStructureSchema; declare var AudioBlock$: StaticStructureSchema; declare var AutoToolChoice$: StaticStructureSchema; declare var BidirectionalInputPayloadPart$: StaticStructureSchema; declare var BidirectionalOutputPayloadPart$: StaticStructureSchema; declare var CacheDetail$: StaticStructureSchema; declare var CachePointBlock$: StaticStructureSchema; declare var Citation$: StaticStructureSchema; declare var CitationsConfig$: StaticStructureSchema; declare var CitationsContentBlock$: StaticStructureSchema; declare var CitationsDelta$: StaticStructureSchema; declare var CitationSourceContentDelta$: StaticStructureSchema; declare var ContentBlockDeltaEvent$: StaticStructureSchema; declare var ContentBlockStartEvent$: StaticStructureSchema; declare var ContentBlockStopEvent$: StaticStructureSchema; declare var ConverseMetrics$: StaticStructureSchema; declare var ConverseRequest$: StaticStructureSchema; declare var ConverseResponse$: StaticStructureSchema; declare var ConverseStreamMetadataEvent$: StaticStructureSchema; declare var ConverseStreamMetrics$: StaticStructureSchema; declare var ConverseStreamRequest$: StaticStructureSchema; declare var ConverseStreamResponse$: StaticStructureSchema; declare var ConverseStreamTrace$: StaticStructureSchema; declare var ConverseTokensRequest$: StaticStructureSchema; declare var ConverseTrace$: StaticStructureSchema; declare var CountTokensRequest$: StaticStructureSchema; declare var CountTokensResponse$: StaticStructureSchema; declare var DocumentBlock$: StaticStructureSchema; declare var DocumentCharLocation$: StaticStructureSchema; declare var DocumentChunkLocation$: StaticStructureSchema; declare var DocumentPageLocation$: StaticStructureSchema; declare var ErrorBlock$: StaticStructureSchema; declare var GetAsyncInvokeRequest$: StaticStructureSchema; declare var GetAsyncInvokeResponse$: StaticStructureSchema; declare var GuardrailAssessment$: StaticStructureSchema; declare var GuardrailAutomatedReasoningImpossibleFinding$: StaticStructureSchema; declare var GuardrailAutomatedReasoningInputTextReference$: StaticStructureSchema; declare var GuardrailAutomatedReasoningInvalidFinding$: StaticStructureSchema; declare var GuardrailAutomatedReasoningLogicWarning$: StaticStructureSchema; declare var GuardrailAutomatedReasoningNoTranslationsFinding$: StaticStructureSchema; declare var GuardrailAutomatedReasoningPolicyAssessment$: StaticStructureSchema; declare var GuardrailAutomatedReasoningRule$: StaticStructureSchema; declare var GuardrailAutomatedReasoningSatisfiableFinding$: StaticStructureSchema; declare var GuardrailAutomatedReasoningScenario$: StaticStructureSchema; declare var GuardrailAutomatedReasoningStatement$: StaticStructureSchema; declare var GuardrailAutomatedReasoningTooComplexFinding$: StaticStructureSchema; declare var GuardrailAutomatedReasoningTranslation$: StaticStructureSchema; declare var GuardrailAutomatedReasoningTranslationAmbiguousFinding$: StaticStructureSchema; declare var GuardrailAutomatedReasoningTranslationOption$: StaticStructureSchema; declare var GuardrailAutomatedReasoningValidFinding$: StaticStructureSchema; declare var GuardrailChecksConfig$: StaticStructureSchema; declare var GuardrailChecksContentFilterCategoryConfig$: StaticStructureSchema; declare var GuardrailChecksContentFilterConfig$: StaticStructureSchema; declare var GuardrailChecksContentFilterResult$: StaticStructureSchema; declare var GuardrailChecksContentFilterResultEntry$: StaticStructureSchema; declare var GuardrailChecksContentFilterUsage$: StaticStructureSchema; declare var GuardrailChecksMessage$: StaticStructureSchema; declare var GuardrailChecksPromptAttackCategoryConfig$: StaticStructureSchema; declare var GuardrailChecksPromptAttackConfig$: StaticStructureSchema; declare var GuardrailChecksPromptAttackResult$: StaticStructureSchema; declare var GuardrailChecksPromptAttackResultEntry$: StaticStructureSchema; declare var GuardrailChecksPromptAttackUsage$: StaticStructureSchema; declare var GuardrailChecksResults$: StaticStructureSchema; declare var GuardrailChecksSensitiveInformationConfig$: StaticStructureSchema; declare var GuardrailChecksSensitiveInformationEntityConfig$: StaticStructureSchema; declare var GuardrailChecksSensitiveInformationResult$: StaticStructureSchema; declare var GuardrailChecksSensitiveInformationResultEntry$: StaticStructureSchema; declare var GuardrailChecksSensitiveInformationUsage$: StaticStructureSchema; declare var GuardrailChecksUsageResults$: StaticStructureSchema; declare var GuardrailConfiguration$: StaticStructureSchema; declare var GuardrailContentFilter$: StaticStructureSchema; declare var GuardrailContentPolicyAssessment$: StaticStructureSchema; declare var GuardrailContextualGroundingFilter$: StaticStructureSchema; declare var GuardrailContextualGroundingPolicyAssessment$: StaticStructureSchema; declare var GuardrailConverseImageBlock$: StaticStructureSchema; declare var GuardrailConverseTextBlock$: StaticStructureSchema; declare var GuardrailCoverage$: StaticStructureSchema; declare var GuardrailCustomWord$: StaticStructureSchema; declare var GuardrailImageBlock$: StaticStructureSchema; declare var GuardrailImageCoverage$: StaticStructureSchema; declare var GuardrailInvocationMetrics$: StaticStructureSchema; declare var GuardrailManagedWord$: StaticStructureSchema; declare var GuardrailOutputContent$: StaticStructureSchema; declare var GuardrailPiiEntityFilter$: StaticStructureSchema; declare var GuardrailRegexFilter$: StaticStructureSchema; declare var GuardrailSensitiveInformationPolicyAssessment$: StaticStructureSchema; declare var GuardrailStreamConfiguration$: StaticStructureSchema; declare var GuardrailTextBlock$: StaticStructureSchema; declare var GuardrailTextCharactersCoverage$: StaticStructureSchema; declare var GuardrailTopic$: StaticStructureSchema; declare var GuardrailTopicPolicyAssessment$: StaticStructureSchema; declare var GuardrailTraceAssessment$: StaticStructureSchema; declare var GuardrailUsage$: StaticStructureSchema; declare var GuardrailWordPolicyAssessment$: StaticStructureSchema; declare var ImageBlock$: StaticStructureSchema; declare var ImageBlockDelta$: StaticStructureSchema; declare var ImageBlockStart$: StaticStructureSchema; declare var InferenceConfiguration$: StaticStructureSchema; declare var InvokeGuardrailChecksRequest$: StaticStructureSchema; declare var InvokeGuardrailChecksResponse$: StaticStructureSchema; declare var InvokeModelRequest$: StaticStructureSchema; declare var InvokeModelResponse$: StaticStructureSchema; declare var InvokeModelTokensRequest$: StaticStructureSchema; declare var InvokeModelWithBidirectionalStreamRequest$: StaticStructureSchema; declare var InvokeModelWithBidirectionalStreamResponse$: StaticStructureSchema; declare var InvokeModelWithResponseStreamRequest$: StaticStructureSchema; declare var InvokeModelWithResponseStreamResponse$: StaticStructureSchema; declare var JsonSchemaDefinition$: StaticStructureSchema; declare var ListAsyncInvokesRequest$: StaticStructureSchema; declare var ListAsyncInvokesResponse$: StaticStructureSchema; declare var Message$: StaticStructureSchema; declare var MessageStartEvent$: StaticStructureSchema; declare var MessageStopEvent$: StaticStructureSchema; declare var OutputConfig$: StaticStructureSchema; declare var OutputFormat$: StaticStructureSchema; declare var PayloadPart$: StaticStructureSchema; declare var PerformanceConfiguration$: StaticStructureSchema; declare var PromptRouterTrace$: StaticStructureSchema; declare var ReasoningTextBlock$: StaticStructureSchema; declare var S3Location$: StaticStructureSchema; declare var SearchResultBlock$: StaticStructureSchema; declare var SearchResultContentBlock$: StaticStructureSchema; declare var SearchResultLocation$: StaticStructureSchema; declare var ServiceTier$: StaticStructureSchema; declare var SpecificToolChoice$: StaticStructureSchema; declare var StartAsyncInvokeRequest$: StaticStructureSchema; declare var StartAsyncInvokeResponse$: StaticStructureSchema; declare var SystemTool$: StaticStructureSchema; declare var Tag$: StaticStructureSchema; declare var TokenUsage$: StaticStructureSchema; declare var ToolAdditionBlock$: StaticStructureSchema; declare var ToolConfiguration$: StaticStructureSchema; declare var ToolReference$: StaticStructureSchema; declare var ToolRemovalBlock$: StaticStructureSchema; declare var ToolResultBlock$: StaticStructureSchema; declare var ToolResultBlockStart$: StaticStructureSchema; declare var ToolSpecification$: StaticStructureSchema; declare var ToolUseBlock$: StaticStructureSchema; declare var ToolUseBlockDelta$: StaticStructureSchema; declare var ToolUseBlockStart$: StaticStructureSchema; declare var VideoBlock$: StaticStructureSchema; declare var WebLocation$: StaticStructureSchema; declare var AsyncInvokeOutputDataConfig$: StaticUnionSchema; declare var AudioSource$: StaticUnionSchema; declare var CitationGeneratedContent$: StaticUnionSchema; declare var CitationLocation$: StaticUnionSchema; declare var CitationSourceContent$: StaticUnionSchema; declare var ContentBlock$: StaticUnionSchema; declare var ContentBlockDelta$: StaticUnionSchema; declare var ContentBlockStart$: StaticUnionSchema; declare var ConverseOutput$: StaticUnionSchema; declare var ConverseStreamOutput$: StaticUnionSchema; declare var CountTokensInput$: StaticUnionSchema; declare var DocumentContentBlock$: StaticUnionSchema; declare var DocumentSource$: StaticUnionSchema; declare var GuardrailAutomatedReasoningFinding$: StaticUnionSchema; declare var GuardrailChecksContentBlock$: StaticUnionSchema; declare var GuardrailContentBlock$: StaticUnionSchema; declare var GuardrailConverseContentBlock$: StaticUnionSchema; declare var GuardrailConverseImageSource$: StaticUnionSchema; declare var GuardrailImageSource$: StaticUnionSchema; declare var ImageSource$: StaticUnionSchema; declare var InvokeModelWithBidirectionalStreamInput$: StaticUnionSchema; declare var InvokeModelWithBidirectionalStreamOutput$: StaticUnionSchema; declare var OutputFormatStructure$: StaticUnionSchema; declare var PromptVariableValues$: StaticUnionSchema; declare var ReasoningContentBlock$: StaticUnionSchema; declare var ReasoningContentBlockDelta$: StaticUnionSchema; declare var ResponseStream$: StaticUnionSchema; declare var SystemContentBlock$: StaticUnionSchema; declare var Tool$: StaticUnionSchema; declare var ToolChoice$: StaticUnionSchema; declare var ToolInputSchema$: StaticUnionSchema; declare var ToolResultBlockDelta$: StaticUnionSchema; declare var ToolResultContentBlock$: StaticUnionSchema; declare var VideoSource$: StaticUnionSchema; declare var ApplyGuardrail$: StaticOperationSchema; declare var Converse$: StaticOperationSchema; declare var ConverseStream$: StaticOperationSchema; declare var CountTokens$: StaticOperationSchema; declare var GetAsyncInvoke$: StaticOperationSchema; declare var InvokeGuardrailChecks$: StaticOperationSchema; declare var InvokeModel$: StaticOperationSchema; declare var InvokeModelWithBidirectionalStream$: StaticOperationSchema; declare var InvokeModelWithResponseStream$: StaticOperationSchema; declare var ListAsyncInvokes$: StaticOperationSchema; declare var StartAsyncInvoke$: StaticOperationSchema; declare namespace index_d_exports$3 { export { Command as $Command, AccessDeniedException, AccessDeniedException$, AnyToolChoice, AnyToolChoice$, AppliedGuardrailDetails, AppliedGuardrailDetails$, ApplyGuardrail$, ApplyGuardrailCommand, ApplyGuardrailCommandInput, ApplyGuardrailCommandOutput, ApplyGuardrailRequest, ApplyGuardrailRequest$, ApplyGuardrailResponse, ApplyGuardrailResponse$, AsyncInvokeOutputDataConfig, AsyncInvokeOutputDataConfig$, AsyncInvokeS3OutputDataConfig, AsyncInvokeS3OutputDataConfig$, AsyncInvokeStatus, AsyncInvokeSummary, AsyncInvokeSummary$, AudioBlock, AudioBlock$, AudioFormat, AudioSource, AudioSource$, AutoToolChoice, AutoToolChoice$, BedrockRuntime, BedrockRuntimeClient, BedrockRuntimeClientConfig, BedrockRuntimeClientConfigType, BedrockRuntimeClientResolvedConfig, BedrockRuntimeClientResolvedConfigType, BedrockRuntimeExtensionConfiguration, BedrockRuntimePaginationConfiguration, BedrockRuntimeServiceException, BedrockRuntimeServiceException$, BidirectionalInputPayloadPart, BidirectionalInputPayloadPart$, BidirectionalOutputPayloadPart, BidirectionalOutputPayloadPart$, CacheDetail, CacheDetail$, CachePointBlock, CachePointBlock$, CachePointType, CacheTTL, Citation, Citation$, CitationGeneratedContent, CitationGeneratedContent$, CitationLocation, CitationLocation$, CitationSourceContent, CitationSourceContent$, CitationSourceContentDelta, CitationSourceContentDelta$, CitationsConfig, CitationsConfig$, CitationsContentBlock, CitationsContentBlock$, CitationsDelta, CitationsDelta$, ClientDefaults, ClientInputEndpointParameters, ConflictException, ConflictException$, ContentBlock, ContentBlock$, ContentBlockDelta, ContentBlockDelta$, ContentBlockDeltaEvent, ContentBlockDeltaEvent$, ContentBlockStart, ContentBlockStart$, ContentBlockStartEvent, ContentBlockStartEvent$, ContentBlockStopEvent, ContentBlockStopEvent$, ConversationRole, Converse$, ConverseCommand, ConverseCommandInput, ConverseCommandOutput, ConverseMetrics, ConverseMetrics$, ConverseOutput, ConverseOutput$, ConverseRequest, ConverseRequest$, ConverseResponse, ConverseResponse$, ConverseStream$, ConverseStreamCommand, ConverseStreamCommandInput, ConverseStreamCommandOutput, ConverseStreamMetadataEvent, ConverseStreamMetadataEvent$, ConverseStreamMetrics, ConverseStreamMetrics$, ConverseStreamOutput, ConverseStreamOutput$, ConverseStreamRequest, ConverseStreamRequest$, ConverseStreamResponse, ConverseStreamResponse$, ConverseStreamTrace, ConverseStreamTrace$, ConverseTokensRequest, ConverseTokensRequest$, ConverseTrace, ConverseTrace$, CountTokens$, CountTokensCommand, CountTokensCommandInput, CountTokensCommandOutput, CountTokensInput, CountTokensInput$, CountTokensRequest, CountTokensRequest$, CountTokensResponse, CountTokensResponse$, DocumentBlock, DocumentBlock$, DocumentCharLocation, DocumentCharLocation$, DocumentChunkLocation, DocumentChunkLocation$, DocumentContentBlock, DocumentContentBlock$, DocumentFormat, DocumentPageLocation, DocumentPageLocation$, DocumentSource, DocumentSource$, ErrorBlock, ErrorBlock$, GetAsyncInvoke$, GetAsyncInvokeCommand, GetAsyncInvokeCommandInput, GetAsyncInvokeCommandOutput, GetAsyncInvokeRequest, GetAsyncInvokeRequest$, GetAsyncInvokeResponse, GetAsyncInvokeResponse$, GuardrailAction, GuardrailAssessment, GuardrailAssessment$, GuardrailAutomatedReasoningFinding, GuardrailAutomatedReasoningFinding$, GuardrailAutomatedReasoningImpossibleFinding, GuardrailAutomatedReasoningImpossibleFinding$, GuardrailAutomatedReasoningInputTextReference, GuardrailAutomatedReasoningInputTextReference$, GuardrailAutomatedReasoningInvalidFinding, GuardrailAutomatedReasoningInvalidFinding$, GuardrailAutomatedReasoningLogicWarning, GuardrailAutomatedReasoningLogicWarning$, GuardrailAutomatedReasoningLogicWarningType, GuardrailAutomatedReasoningNoTranslationsFinding, GuardrailAutomatedReasoningNoTranslationsFinding$, GuardrailAutomatedReasoningPolicyAssessment, GuardrailAutomatedReasoningPolicyAssessment$, GuardrailAutomatedReasoningRule, GuardrailAutomatedReasoningRule$, GuardrailAutomatedReasoningSatisfiableFinding, GuardrailAutomatedReasoningSatisfiableFinding$, GuardrailAutomatedReasoningScenario, GuardrailAutomatedReasoningScenario$, GuardrailAutomatedReasoningStatement, GuardrailAutomatedReasoningStatement$, GuardrailAutomatedReasoningTooComplexFinding, GuardrailAutomatedReasoningTooComplexFinding$, GuardrailAutomatedReasoningTranslation, GuardrailAutomatedReasoningTranslation$, GuardrailAutomatedReasoningTranslationAmbiguousFinding, GuardrailAutomatedReasoningTranslationAmbiguousFinding$, GuardrailAutomatedReasoningTranslationOption, GuardrailAutomatedReasoningTranslationOption$, GuardrailAutomatedReasoningValidFinding, GuardrailAutomatedReasoningValidFinding$, GuardrailChecksConfig, GuardrailChecksConfig$, GuardrailChecksContentBlock, GuardrailChecksContentBlock$, GuardrailChecksContentFilterCategory, GuardrailChecksContentFilterCategoryConfig, GuardrailChecksContentFilterCategoryConfig$, GuardrailChecksContentFilterConfig, GuardrailChecksContentFilterConfig$, GuardrailChecksContentFilterResult, GuardrailChecksContentFilterResult$, GuardrailChecksContentFilterResultEntry, GuardrailChecksContentFilterResultEntry$, GuardrailChecksContentFilterUsage, GuardrailChecksContentFilterUsage$, GuardrailChecksMessage, GuardrailChecksMessage$, GuardrailChecksPromptAttackCategory, GuardrailChecksPromptAttackCategoryConfig, GuardrailChecksPromptAttackCategoryConfig$, GuardrailChecksPromptAttackConfig, GuardrailChecksPromptAttackConfig$, GuardrailChecksPromptAttackResult, GuardrailChecksPromptAttackResult$, GuardrailChecksPromptAttackResultEntry, GuardrailChecksPromptAttackResultEntry$, GuardrailChecksPromptAttackUsage, GuardrailChecksPromptAttackUsage$, GuardrailChecksResults, GuardrailChecksResults$, GuardrailChecksRole, GuardrailChecksSensitiveInformationConfig, GuardrailChecksSensitiveInformationConfig$, GuardrailChecksSensitiveInformationEntityConfig, GuardrailChecksSensitiveInformationEntityConfig$, GuardrailChecksSensitiveInformationEntityType, GuardrailChecksSensitiveInformationResult, GuardrailChecksSensitiveInformationResult$, GuardrailChecksSensitiveInformationResultEntry, GuardrailChecksSensitiveInformationResultEntry$, GuardrailChecksSensitiveInformationUsage, GuardrailChecksSensitiveInformationUsage$, GuardrailChecksUsageResults, GuardrailChecksUsageResults$, GuardrailConfiguration, GuardrailConfiguration$, GuardrailContentBlock, GuardrailContentBlock$, GuardrailContentFilter, GuardrailContentFilter$, GuardrailContentFilterConfidence, GuardrailContentFilterStrength, GuardrailContentFilterType, GuardrailContentPolicyAction, GuardrailContentPolicyAssessment, GuardrailContentPolicyAssessment$, GuardrailContentQualifier, GuardrailContentSource, GuardrailContextualGroundingFilter, GuardrailContextualGroundingFilter$, GuardrailContextualGroundingFilterType, GuardrailContextualGroundingPolicyAction, GuardrailContextualGroundingPolicyAssessment, GuardrailContextualGroundingPolicyAssessment$, GuardrailConverseContentBlock, GuardrailConverseContentBlock$, GuardrailConverseContentQualifier, GuardrailConverseImageBlock, GuardrailConverseImageBlock$, GuardrailConverseImageFormat, GuardrailConverseImageSource, GuardrailConverseImageSource$, GuardrailConverseTextBlock, GuardrailConverseTextBlock$, GuardrailCoverage, GuardrailCoverage$, GuardrailCustomWord, GuardrailCustomWord$, GuardrailImageBlock, GuardrailImageBlock$, GuardrailImageCoverage, GuardrailImageCoverage$, GuardrailImageFormat, GuardrailImageSource, GuardrailImageSource$, GuardrailInvocationMetrics, GuardrailInvocationMetrics$, GuardrailManagedWord, GuardrailManagedWord$, GuardrailManagedWordType, GuardrailOrigin, GuardrailOutputContent, GuardrailOutputContent$, GuardrailOutputScope, GuardrailOwnership, GuardrailPiiEntityFilter, GuardrailPiiEntityFilter$, GuardrailPiiEntityType, GuardrailRegexFilter, GuardrailRegexFilter$, GuardrailSensitiveInformationPolicyAction, GuardrailSensitiveInformationPolicyAssessment, GuardrailSensitiveInformationPolicyAssessment$, GuardrailStreamConfiguration, GuardrailStreamConfiguration$, GuardrailStreamProcessingMode, GuardrailTextBlock, GuardrailTextBlock$, GuardrailTextCharactersCoverage, GuardrailTextCharactersCoverage$, GuardrailTopic, GuardrailTopic$, GuardrailTopicPolicyAction, GuardrailTopicPolicyAssessment, GuardrailTopicPolicyAssessment$, GuardrailTopicType, GuardrailTrace, GuardrailTraceAssessment, GuardrailTraceAssessment$, GuardrailUsage, GuardrailUsage$, GuardrailWordPolicyAction, GuardrailWordPolicyAssessment, GuardrailWordPolicyAssessment$, ImageBlock, ImageBlock$, ImageBlockDelta, ImageBlockDelta$, ImageBlockStart, ImageBlockStart$, ImageFormat, ImageSource, ImageSource$, InferenceConfiguration, InferenceConfiguration$, InternalServerException, InternalServerException$, InvokeGuardrailChecks$, InvokeGuardrailChecksCommand, InvokeGuardrailChecksCommandInput, InvokeGuardrailChecksCommandOutput, InvokeGuardrailChecksRequest, InvokeGuardrailChecksRequest$, InvokeGuardrailChecksResponse, InvokeGuardrailChecksResponse$, InvokeModel$, InvokeModelCommand, InvokeModelCommandInput, InvokeModelCommandInputType, InvokeModelCommandOutput, InvokeModelCommandOutputType, InvokeModelRequest, InvokeModelRequest$, InvokeModelResponse, InvokeModelResponse$, InvokeModelTokensRequest, InvokeModelTokensRequest$, InvokeModelWithBidirectionalStream$, InvokeModelWithBidirectionalStreamCommand, InvokeModelWithBidirectionalStreamCommandInput, InvokeModelWithBidirectionalStreamCommandOutput, InvokeModelWithBidirectionalStreamInput, InvokeModelWithBidirectionalStreamInput$, InvokeModelWithBidirectionalStreamOutput, InvokeModelWithBidirectionalStreamOutput$, InvokeModelWithBidirectionalStreamRequest, InvokeModelWithBidirectionalStreamRequest$, InvokeModelWithBidirectionalStreamResponse, InvokeModelWithBidirectionalStreamResponse$, InvokeModelWithResponseStream$, InvokeModelWithResponseStreamCommand, InvokeModelWithResponseStreamCommandInput, InvokeModelWithResponseStreamCommandInputType, InvokeModelWithResponseStreamCommandOutput, InvokeModelWithResponseStreamRequest, InvokeModelWithResponseStreamRequest$, InvokeModelWithResponseStreamResponse, InvokeModelWithResponseStreamResponse$, JsonSchemaDefinition, JsonSchemaDefinition$, ListAsyncInvokes$, ListAsyncInvokesCommand, ListAsyncInvokesCommandInput, ListAsyncInvokesCommandOutput, ListAsyncInvokesRequest, ListAsyncInvokesRequest$, ListAsyncInvokesResponse, ListAsyncInvokesResponse$, Message, Message$, MessageStartEvent, MessageStartEvent$, MessageStopEvent, MessageStopEvent$, ModelErrorException, ModelErrorException$, ModelNotReadyException, ModelNotReadyException$, ModelStreamErrorException, ModelStreamErrorException$, ModelTimeoutException, ModelTimeoutException$, OutputConfig, OutputConfig$, OutputFormat, OutputFormat$, OutputFormatStructure, OutputFormatStructure$, OutputFormatType, PayloadPart, PayloadPart$, PerformanceConfigLatency, PerformanceConfiguration, PerformanceConfiguration$, PromptRouterTrace, PromptRouterTrace$, PromptVariableValues, PromptVariableValues$, ReasoningContentBlock, ReasoningContentBlock$, ReasoningContentBlockDelta, ReasoningContentBlockDelta$, ReasoningTextBlock, ReasoningTextBlock$, ResourceNotFoundException, ResourceNotFoundException$, ResponseStream, ResponseStream$, RuntimeExtension, S3Location, S3Location$, SearchResultBlock, SearchResultBlock$, SearchResultContentBlock, SearchResultContentBlock$, SearchResultLocation, SearchResultLocation$, ServiceInputTypes, ServiceOutputTypes, ServiceQuotaExceededException, ServiceQuotaExceededException$, ServiceTier, ServiceTier$, ServiceTierType, ServiceUnavailableException, ServiceUnavailableException$, SortAsyncInvocationBy, SortOrder, SpecificToolChoice, SpecificToolChoice$, StartAsyncInvoke$, StartAsyncInvokeCommand, StartAsyncInvokeCommandInput, StartAsyncInvokeCommandOutput, StartAsyncInvokeRequest, StartAsyncInvokeRequest$, StartAsyncInvokeResponse, StartAsyncInvokeResponse$, StopReason, SystemContentBlock, SystemContentBlock$, SystemTool, SystemTool$, Tag, Tag$, ThrottlingException, ThrottlingException$, TokenUsage, TokenUsage$, Tool, Tool$, ToolAdditionBlock, ToolAdditionBlock$, ToolChoice, ToolChoice$, ToolConfiguration, ToolConfiguration$, ToolInputSchema, ToolInputSchema$, ToolReference, ToolReference$, ToolRemovalBlock, ToolRemovalBlock$, ToolResultBlock, ToolResultBlock$, ToolResultBlockDelta, ToolResultBlockDelta$, ToolResultBlockStart, ToolResultBlockStart$, ToolResultContentBlock, ToolResultContentBlock$, ToolResultStatus, ToolSpecification, ToolSpecification$, ToolUseBlock, ToolUseBlock$, ToolUseBlockDelta, ToolUseBlockDelta$, ToolUseBlockStart, ToolUseBlockStart$, ToolUseType, Trace, ValidationException, ValidationException$, VideoBlock, VideoBlock$, VideoFormat, VideoSource, VideoSource$, WebLocation, WebLocation$, Client as __Client, MetadataBearer as __MetadataBearer, errorTypeRegistries, paginateListAsyncInvokes }; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/runtime.d.ts declare class ResponseError extends Error { response: Response; name: "ResponseError"; constructor(response: Response, msg?: string); } type FetchAPI$4 = WindowOrWorkerGlobalScope['fetch']; interface ErrorContext$4 { fetch: FetchAPI$4; url: string; init: RequestInit; error: unknown; response?: Response; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/ScalingConfigManual.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The config to use for manual read capacity scaling. * @export * @interface ScalingConfigManual */ interface ScalingConfigManual$1 { /** * The number of replicas to use. Replicas duplicate the compute resources and data of an index, allowing higher query throughput and availability. Setting replicas to 0 disables the index but can be used to reduce costs while usage is paused. * @type {number} * @memberof ScalingConfigManual */ replicas?: number; /** * The number of shards to use. Shards determine the storage capacity of an index, with each shard providing 250 GB of storage. * @type {number} * @memberof ScalingConfigManual */ shards?: number; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/ReadCapacityDedicatedConfig.d.ts /** * Configuration for dedicated read capacity. See [this guide](https://docs.pinecone.io/guides/index-data/dedicated-read-nodes) for more details on how to configure dedicated read capacity. * @export * @interface ReadCapacityDedicatedConfig */ interface ReadCapacityDedicatedConfig$1 { /** * The type of machines to use. Available options: `b1` and `t1`. `t1` includes increased processing power and memory. * @type {string} * @memberof ReadCapacityDedicatedConfig */ nodeType?: string; /** * The type of scaling strategy to use. * @type {string} * @memberof ReadCapacityDedicatedConfig */ scaling?: string; /** * * @type {ScalingConfigManual} * @memberof ReadCapacityDedicatedConfig */ manual?: ScalingConfigManual$1; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/ReadCapacityDedicatedSpec.d.ts /** * * @export * @interface ReadCapacityDedicatedSpec */ interface ReadCapacityDedicatedSpec$1 { [key: string]: any | any; /** * The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified. * @type {string} * @memberof ReadCapacityDedicatedSpec */ mode: string; /** * * @type {ReadCapacityDedicatedConfig} * @memberof ReadCapacityDedicatedSpec */ dedicated: ReadCapacityDedicatedConfig$1; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/ReadCapacityOnDemandSpec.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface ReadCapacityOnDemandSpec */ interface ReadCapacityOnDemandSpec$1 { /** * The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified. * @type {string} * @memberof ReadCapacityOnDemandSpec */ mode: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/ReadCapacity.d.ts /** * @type ReadCapacity * By default the index will be created with read capacity mode `OnDemand`. If you prefer to allocate dedicated read nodes for your workload, you must specify mode `Dedicated` and additional configurations for `node_type` and `scaling`. * @export */ type ReadCapacity$1 = { mode: 'Dedicated'; } & ReadCapacityDedicatedSpec$1 | { mode: 'OnDemand'; } & ReadCapacityOnDemandSpec$1; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/BYOCByoc.d.ts /** * Updated configuration for a BYOC index * @export * @interface BYOCByoc */ interface BYOCByoc { /** * * @type {ReadCapacity} * @memberof BYOCByoc */ readCapacity?: ReadCapacity$1; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/BYOC.d.ts /** * * @export * @interface BYOC */ interface BYOC { /** * * @type {BYOCByoc} * @memberof BYOC */ byoc: BYOCByoc; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/MetadataSchemaFieldsValue.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface MetadataSchemaFieldsValue */ interface MetadataSchemaFieldsValue { /** * Whether the field is filterable. If true, the field is indexed and can be used in filters. Only true values are allowed. * @type {boolean} * @memberof MetadataSchemaFieldsValue */ filterable?: boolean; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/MetadataSchema.d.ts /** * Schema for the behavior of Pinecone's internal metadata index. By default, all metadata is indexed; when `schema` is present, only fields which are present in the `fields` object with a `filterable: true` are indexed. Note that `filterable: false` is not currently supported. * @export * @interface MetadataSchema */ interface MetadataSchema { /** * A map of metadata field names to their configuration. The field name must be a valid metadata field name. The field name must be unique. * @type {{ [key: string]: MetadataSchemaFieldsValue; }} * @memberof MetadataSchema */ fields: { [key: string]: MetadataSchemaFieldsValue; }; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/ReadCapacityStatus.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The current status of factors affecting the read capacity of a serverless index * @export * @interface ReadCapacityStatus */ interface ReadCapacityStatus$1 { /** * The `state` describes the overall status of factors relating to the read capacity of an index. * * Available values: * - `Ready` is the state most of the time * - `Scaling` if the number of replicas or shards has been recently updated by calling the [configure index endpoint](https://docs.pinecone.io/reference/api/2026-04/control-plane/configure_index) * - `Migrating` if the index is being migrated to a new `node_type` * - `Error` if there is an error with the read capacity configuration. In that case, see `error_message` for more details. * @type {string} * @memberof ReadCapacityStatus */ state: string; /** * The number of replicas. Each replica has dedicated compute resources and data storage. Increasing this number will increase the total throughput of the index. * @type {number} * @memberof ReadCapacityStatus */ currentReplicas?: number; /** * The number of shards. Each shard has dedicated storage. Increasing shards alleiviates index fullness. * @type {number} * @memberof ReadCapacityStatus */ currentShards?: number; /** * An optional error message indicating any issues with your read capacity configuration * @type {string} * @memberof ReadCapacityStatus */ errorMessage?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/ReadCapacityDedicatedSpecResponse.d.ts /** * * @export * @interface ReadCapacityDedicatedSpecResponse */ interface ReadCapacityDedicatedSpecResponse$1 { /** * The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified. * @type {string} * @memberof ReadCapacityDedicatedSpecResponse */ mode: string; /** * * @type {ReadCapacityDedicatedConfig} * @memberof ReadCapacityDedicatedSpecResponse */ dedicated: ReadCapacityDedicatedConfig$1; /** * * @type {ReadCapacityStatus} * @memberof ReadCapacityDedicatedSpecResponse */ status: ReadCapacityStatus$1; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/ReadCapacityOnDemandSpecResponse.d.ts /** * * @export * @interface ReadCapacityOnDemandSpecResponse */ interface ReadCapacityOnDemandSpecResponse$1 { /** * The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified. * @type {string} * @memberof ReadCapacityOnDemandSpecResponse */ mode: string; /** * * @type {ReadCapacityStatus} * @memberof ReadCapacityOnDemandSpecResponse */ status: ReadCapacityStatus$1; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/ReadCapacityResponse.d.ts /** * @type ReadCapacityResponse * Response containing read capacity configuration * @export */ type ReadCapacityResponse$1 = { mode: 'Dedicated'; } & ReadCapacityDedicatedSpecResponse$1 | { mode: 'OnDemand'; } & ReadCapacityOnDemandSpecResponse$1; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/ByocSpecResponse.d.ts /** * Configuration of a BYOC index. * @export * @interface ByocSpecResponse */ interface ByocSpecResponse { /** * The environment where the index is hosted. * @type {string} * @memberof ByocSpecResponse */ environment: string; /** * * @type {ReadCapacityResponse} * @memberof ByocSpecResponse */ readCapacity: ReadCapacityResponse$1; /** * * @type {MetadataSchema} * @memberof ByocSpecResponse */ schema?: MetadataSchema; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/BYOC1.d.ts /** * * @export * @interface BYOC1 */ interface BYOC1 { /** * * @type {ByocSpecResponse} * @memberof BYOC1 */ byoc: ByocSpecResponse; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/ByocSpec.d.ts /** * Configuration needed to deploy an index in a BYOC environment. * @export * @interface ByocSpec */ interface ByocSpec { /** * The environment where the index is hosted. * @type {string} * @memberof ByocSpec */ environment: string; /** * * @type {ReadCapacity} * @memberof ByocSpec */ readCapacity?: ReadCapacity$1; /** * * @type {MetadataSchema} * @memberof ByocSpec */ schema?: MetadataSchema; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/BYOC2.d.ts /** * * @export * @interface BYOC2 */ interface BYOC2 { /** * * @type {ByocSpec} * @memberof BYOC2 */ byoc: ByocSpec; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/BackupModel.d.ts /** * The BackupModel describes the configuration and status of a Pinecone backup. * @export * @interface BackupModel */ interface BackupModel$1 { /** * Unique identifier for the backup. * @type {string} * @memberof BackupModel */ backupId: string; /** * Name of the index from which the backup was taken. * @type {string} * @memberof BackupModel */ sourceIndexName: string; /** * ID of the index. * @type {string} * @memberof BackupModel */ sourceIndexId: string; /** * The deletion timestamp when the source index has been deleted. Not present for backups associated with an active index. * @type {Date} * @memberof BackupModel */ sourceIndexDeletedAt?: Date; /** * Optional user-defined name for the backup. * @type {string} * @memberof BackupModel */ name?: string; /** * Optional description providing context for the backup. * @type {string} * @memberof BackupModel */ description?: string; /** * Current status of the backup (e.g., Initializing, Ready, Failed). * @type {string} * @memberof BackupModel */ status: string; /** * Cloud provider where the backup is stored. * @type {string} * @memberof BackupModel */ cloud: string; /** * Cloud region where the backup is stored. * @type {string} * @memberof BackupModel */ region: string; /** * The dimensions of the vectors to be inserted in the index. * @type {number} * @memberof BackupModel */ dimension?: number; /** * The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If the 'vector_type' is 'sparse', the metric must be 'dotproduct'. If the `vector_type` is `dense`, the metric defaults to 'cosine'. * Possible values: `cosine`, `euclidean`, or `dotproduct`. * @type {string} * @memberof BackupModel */ metric?: string; /** * * @type {MetadataSchema} * @memberof BackupModel */ schema?: MetadataSchema; /** * Total number of records in the backup. * @type {number} * @memberof BackupModel */ recordCount?: number; /** * Number of namespaces in the backup. * @type {number} * @memberof BackupModel */ namespaceCount?: number; /** * Size of the backup in bytes. * @type {number} * @memberof BackupModel */ sizeBytes?: number; /** * Custom user tags added to an index. Keys must be 80 characters or less. Values must be 120 characters or less. Keys must be alphanumeric, '_', or '-'. Values must be alphanumeric, ';', '@', '_', '-', '.', '+', or ' '. To unset a key, set the value to be an empty string. * @type {{ [key: string]: string; }} * @memberof BackupModel */ tags?: { [key: string]: string; }; /** * Timestamp when the backup was created. * @type {string} * @memberof BackupModel */ createdAt?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/PaginationResponse.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The pagination object that is returned with paginated responses. * @export * @interface PaginationResponse */ interface PaginationResponse$2 { /** * The token to use to retrieve the next page of results. * @type {string} * @memberof PaginationResponse */ next: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/BackupList.d.ts /** * The list of backups that exist in the project. * @export * @interface BackupList */ interface BackupList$1 { /** * List of backup objects * @type {Array} * @memberof BackupList */ data?: Array; /** * * @type {PaginationResponse} * @memberof BackupList */ pagination?: PaginationResponse$2; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/CollectionModel.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The CollectionModel describes the configuration and status of a Pinecone collection. * @export * @interface CollectionModel */ interface CollectionModel$1 { /** * The name of the collection. * @type {string} * @memberof CollectionModel */ name: string; /** * The size of the collection in bytes. * @type {number} * @memberof CollectionModel */ size?: number; /** * The status of the collection. * Possible values: `Initializing`, `Ready`, or `Terminating`. * @type {string} * @memberof CollectionModel */ status: string; /** * The dimension of the vectors stored in each record held in the collection. * @type {number} * @memberof CollectionModel */ dimension?: number; /** * The number of records stored in the collection. * @type {number} * @memberof CollectionModel */ vectorCount?: number; /** * The environment where the collection is hosted. * @type {string} * @memberof CollectionModel */ environment: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/CollectionList.d.ts /** * The list of collections that exist in the project. * @export * @interface CollectionList */ interface CollectionList$1 { /** * List of collections in the project * @type {Array} * @memberof CollectionList */ collections?: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/ConfigureIndexRequestEmbed.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Configure the integrated inference embedding settings for this index. * * You can convert an existing index to an integrated index by specifying the embedding model and field_map. The index vector type and dimension must match the model vector type and dimension, and the index similarity metric must be supported by the model. Refer to the [model guide](https://docs.pinecone.io/guides/index-data/create-an-index#embedding-models) for available models and model details. * * You can later change the embedding configuration to update the field map, read parameters, or write parameters. Once set, the model cannot be changed. * @export * @interface ConfigureIndexRequestEmbed */ interface ConfigureIndexRequestEmbed { /** * The name of the embedding model to use with the index. The index dimension and model dimension must match, and the index similarity metric must be supported by the model. The index embedding model cannot be changed once set. * @type {string} * @memberof ConfigureIndexRequestEmbed */ model?: string; /** * Identifies the name of the text field from your document model that will be embedded. * @type {object} * @memberof ConfigureIndexRequestEmbed */ fieldMap?: object; /** * The read parameters for the embedding model. * @type {object} * @memberof ConfigureIndexRequestEmbed */ readParameters?: object; /** * The write parameters for the embedding model. * @type {object} * @memberof ConfigureIndexRequestEmbed */ writeParameters?: object; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/PodBasedPod.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Updated configuration for pod-based indexes * @export * @interface PodBasedPod */ interface PodBasedPod { /** * The number of replicas. Replicas duplicate your index. They provide higher availability and throughput. Replicas can be scaled up or down as your needs change. * @type {number} * @memberof PodBasedPod */ replicas?: number; /** * The type of pod to use. One of `s1`, `p1`, or `p2` appended with `.` and one of `x1`, `x2`, `x4`, or `x8`. * @type {string} * @memberof PodBasedPod */ podType?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/PodBased.d.ts /** * * @export * @interface PodBased */ interface PodBased { /** * * @type {PodBasedPod} * @memberof PodBased */ pod: PodBasedPod; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/ServerlessServerless.d.ts /** * Updated configuration for serverless indexes * @export * @interface ServerlessServerless */ interface ServerlessServerless { /** * * @type {ReadCapacity} * @memberof ServerlessServerless */ readCapacity?: ReadCapacity$1; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/Serverless.d.ts /** * * @export * @interface Serverless */ interface Serverless { /** * * @type {ServerlessServerless} * @memberof Serverless */ serverless: ServerlessServerless; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/ConfigureIndexRequestSpec.d.ts /** * @type ConfigureIndexRequestSpec * The spec object defines how the index should be deployed. Only some attributes of an index's spec may be updated. In general, you can modify settings related to scaling and configuration but you cannot change the cloud or region where the index is hosted. * @export */ type ConfigureIndexRequestSpec = BYOC | PodBased | Serverless; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/CreateCollectionRequest.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The configuration needed to create a Pinecone collection. * @export * @interface CreateCollectionRequest */ interface CreateCollectionRequest { /** * The name of the collection to be created. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. * @type {string} * @memberof CreateCollectionRequest */ name: string; /** * The name of the index to be used as the source for the collection. * @type {string} * @memberof CreateCollectionRequest */ source: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/CreateIndexForModelRequestEmbed.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Specify the integrated inference embedding configuration for the index. * * Once set the model cannot be changed, but you can later update the embedding configuration for an integrated inference index including field map, read parameters, or write parameters. * * Refer to the [model guide](https://docs.pinecone.io/guides/index-data/create-an-index#embedding-models) for available models and model details. * @export * @interface CreateIndexForModelRequestEmbed */ interface CreateIndexForModelRequestEmbed { /** * The name of the embedding model to use for the index. * @type {string} * @memberof CreateIndexForModelRequestEmbed */ model: string; /** * The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If not specified, the metric will be defaulted according to the model. Cannot be updated once set. * Possible values: `cosine`, `euclidean`, or `dotproduct`. * @type {string} * @memberof CreateIndexForModelRequestEmbed */ metric?: string; /** * Identifies the name of the text field from your document model that will be embedded. * @type {object} * @memberof CreateIndexForModelRequestEmbed */ fieldMap: object; /** * The dimension of embedding vectors produced for the index. * @type {number} * @memberof CreateIndexForModelRequestEmbed */ dimension?: number; /** * The read parameters for the embedding model. * @type {object} * @memberof CreateIndexForModelRequestEmbed */ readParameters?: object; /** * The write parameters for the embedding model. * @type {object} * @memberof CreateIndexForModelRequestEmbed */ writeParameters?: object; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/CreateIndexForModelRequest.d.ts /** * The desired configuration for the index and associated embedding model. * @export * @interface CreateIndexForModelRequest */ interface CreateIndexForModelRequest { /** * The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. * @type {string} * @memberof CreateIndexForModelRequest */ name: string; /** * The public cloud where you would like your index hosted. * Possible values: `gcp`, `aws`, or `azure`. * @type {string} * @memberof CreateIndexForModelRequest */ cloud: string; /** * The region where you would like your index to be created. * @type {string} * @memberof CreateIndexForModelRequest */ region: string; /** * Whether [deletion protection](http://docs.pinecone.io/guides/manage-data/manage-indexes#configure-deletion-protection) is enabled/disabled for the index. * Possible values: `disabled` or `enabled`. * @type {string} * @memberof CreateIndexForModelRequest */ deletionProtection?: string; /** * Custom user tags added to an index. Keys must be 80 characters or less. Values must be 120 characters or less. Keys must be alphanumeric, '_', or '-'. Values must be alphanumeric, ';', '@', '_', '-', '.', '+', or ' '. To unset a key, set the value to be an empty string. * @type {{ [key: string]: string; }} * @memberof CreateIndexForModelRequest */ tags?: { [key: string]: string; }; /** * * @type {MetadataSchema} * @memberof CreateIndexForModelRequest */ schema?: MetadataSchema; /** * * @type {ReadCapacity} * @memberof CreateIndexForModelRequest */ readCapacity?: ReadCapacity$1; /** * * @type {CreateIndexForModelRequestEmbed} * @memberof CreateIndexForModelRequest */ embed: CreateIndexForModelRequestEmbed; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/CreateIndexFromBackupResponse.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The response for creating an index from a backup. * @export * @interface CreateIndexFromBackupResponse */ interface CreateIndexFromBackupResponse$1 { /** * The ID of the restore job that was created. * @type {string} * @memberof CreateIndexFromBackupResponse */ restoreJobId: string; /** * The ID of the index that was created from the backup. * @type {string} * @memberof CreateIndexFromBackupResponse */ indexId: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/PodSpecMetadataConfig.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Configuration for the behavior of Pinecone's internal metadata index. By default, all metadata is indexed; when `metadata_config` is present, only specified metadata fields are indexed. These configurations are only valid for use with pod-based indexes. * @export * @interface PodSpecMetadataConfig */ interface PodSpecMetadataConfig { /** * By default, all metadata is indexed; to change this behavior, use this property to specify an array of metadata fields that should be indexed. * @type {Array} * @memberof PodSpecMetadataConfig */ indexed?: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/PodSpec.d.ts /** * Configuration needed to deploy a pod-based index. * @export * @interface PodSpec */ interface PodSpec { /** * The environment where the index is hosted. * @type {string} * @memberof PodSpec */ environment: string; /** * The number of replicas. Replicas duplicate your index. They provide higher availability and throughput. Replicas can be scaled up or down as your needs change. * @type {number} * @memberof PodSpec */ replicas?: number; /** * The number of shards. Shards split your data across multiple pods so you can fit more data into an index. * @type {number} * @memberof PodSpec */ shards?: number; /** * The type of pod to use. One of `s1`, `p1`, or `p2` appended with `.` and one of `x1`, `x2`, `x4`, or `x8`. * @type {string} * @memberof PodSpec */ podType: string; /** * The number of pods to be used in the index. This should be equal to `shards` x `replicas`.' * @type {number} * @memberof PodSpec */ pods?: number; /** * * @type {PodSpecMetadataConfig} * @memberof PodSpec */ metadataConfig?: PodSpecMetadataConfig; /** * The name of the collection to be used as the source for the index. * @type {string} * @memberof PodSpec */ sourceCollection?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/PodBased1.d.ts /** * * @export * @interface PodBased1 */ interface PodBased1 { /** * * @type {PodSpec} * @memberof PodBased1 */ pod: PodSpec; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/ServerlessSpec.d.ts /** * Configuration needed to deploy a serverless index. * @export * @interface ServerlessSpec */ interface ServerlessSpec { /** * The public cloud where you would like your index hosted. * Possible values: `gcp`, `aws`, or `azure`. * @type {string} * @memberof ServerlessSpec */ cloud: string; /** * The region where you would like your index to be created. * @type {string} * @memberof ServerlessSpec */ region: string; /** * * @type {ReadCapacity} * @memberof ServerlessSpec */ readCapacity?: ReadCapacity$1; /** * The name of the collection to be used as the source for the index. * @type {string} * @memberof ServerlessSpec */ sourceCollection?: string; /** * * @type {MetadataSchema} * @memberof ServerlessSpec */ schema?: MetadataSchema; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/Serverless2.d.ts /** * * @export * @interface Serverless2 */ interface Serverless2 { /** * * @type {ServerlessSpec} * @memberof Serverless2 */ serverless: ServerlessSpec; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/IndexSpec.d.ts /** * @type IndexSpec * The spec object defines how the index should be deployed. * * For serverless indexes, you define only the [cloud and region](http://docs.pinecone.io/guides/index-data/create-an-index#cloud-regions) where the index should be hosted. For pod-based indexes, you define the [environment](http://docs.pinecone.io/guides/indexes/pods/understanding-pod-based-indexes#pod-environments) where the index should be hosted, the [pod type and size](http://docs.pinecone.io/guides/indexes/pods/understanding-pod-based-indexes#pod-types) to use, and other index characteristics. * @export */ type IndexSpec = BYOC2 | PodBased1 | Serverless2; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/CreateIndexRequest.d.ts /** * The configuration needed to create a Pinecone index. * @export * @interface CreateIndexRequest */ interface CreateIndexRequest$1 { /** * The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. * @type {string} * @memberof CreateIndexRequest */ name: string; /** * The dimensions of the vectors to be inserted in the index. * @type {number} * @memberof CreateIndexRequest */ dimension?: number; /** * The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If the 'vector_type' is 'sparse', the metric must be 'dotproduct'. If the `vector_type` is `dense`, the metric defaults to 'cosine'. * Possible values: `cosine`, `euclidean`, or `dotproduct`. * @type {string} * @memberof CreateIndexRequest */ metric?: string; /** * Whether [deletion protection](http://docs.pinecone.io/guides/manage-data/manage-indexes#configure-deletion-protection) is enabled/disabled for the index. * Possible values: `disabled` or `enabled`. * @type {string} * @memberof CreateIndexRequest */ deletionProtection?: string; /** * Custom user tags added to an index. Keys must be 80 characters or less. Values must be 120 characters or less. Keys must be alphanumeric, '_', or '-'. Values must be alphanumeric, ';', '@', '_', '-', '.', '+', or ' '. To unset a key, set the value to be an empty string. * @type {{ [key: string]: string; }} * @memberof CreateIndexRequest */ tags?: { [key: string]: string; }; /** * * @type {IndexSpec} * @memberof CreateIndexRequest */ spec: IndexSpec; /** * The index vector type. You can use 'dense' or 'sparse'. If 'dense', the vector dimension must be specified. If 'sparse', the vector dimension should not be specified. * @type {string} * @memberof CreateIndexRequest */ vectorType?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/ServerlessSpecResponse.d.ts /** * Configuration of a serverless index. * @export * @interface ServerlessSpecResponse */ interface ServerlessSpecResponse { /** * The public cloud where you would like your index hosted. * Possible values: `gcp`, `aws`, or `azure`. * @type {string} * @memberof ServerlessSpecResponse */ cloud: string; /** * The region where you would like your index to be created. * @type {string} * @memberof ServerlessSpecResponse */ region: string; /** * * @type {ReadCapacityResponse} * @memberof ServerlessSpecResponse */ readCapacity: ReadCapacityResponse$1; /** * The name of the collection to be used as the source for the index. * @type {string} * @memberof ServerlessSpecResponse */ sourceCollection?: string; /** * * @type {MetadataSchema} * @memberof ServerlessSpecResponse */ schema?: MetadataSchema; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/Serverless1.d.ts /** * * @export * @interface Serverless1 */ interface Serverless1 { /** * * @type {ServerlessSpecResponse} * @memberof Serverless1 */ serverless: ServerlessSpecResponse; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/IndexModelSpec.d.ts /** * @type IndexModelSpec * The spec object defines how the index should be deployed. * @export */ type IndexModelSpec = BYOC1 | PodBased1 | Serverless1; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/IndexModelStatus.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The current status of the index * @export * @interface IndexModelStatus */ interface IndexModelStatus$1 { /** * Whether the index is ready for use * @type {boolean} * @memberof IndexModelStatus */ ready: boolean; /** * The state of the index. * Possible values: `Initializing`, `InitializationFailed`, `ScalingUp`, `ScalingDown`, `ScalingUpPodSize`, `ScalingDownPodSize`, `Terminating`, `Ready`, or `Disabled`. * @type {string} * @memberof IndexModelStatus */ state: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/ModelIndexEmbed.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The embedding model and document fields mapped to embedding inputs. * @export * @interface ModelIndexEmbed */ interface ModelIndexEmbed { /** * The name of the embedding model used to create the index. * @type {string} * @memberof ModelIndexEmbed */ model: string; /** * The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If not specified, the metric will be defaulted according to the model. Cannot be updated once set. * Possible values: `cosine`, `euclidean`, or `dotproduct`. * @type {string} * @memberof ModelIndexEmbed */ metric?: string; /** * The dimensions of the vectors to be inserted in the index. * @type {number} * @memberof ModelIndexEmbed */ dimension?: number; /** * The index vector type. You can use 'dense' or 'sparse'. If 'dense', the vector dimension must be specified. If 'sparse', the vector dimension should not be specified. * @type {string} * @memberof ModelIndexEmbed */ vectorType?: string; /** * Identifies the name of the text field from your document model that is embedded. * @type {object} * @memberof ModelIndexEmbed */ fieldMap?: object; /** * The read parameters for the embedding model. * @type {object} * @memberof ModelIndexEmbed */ readParameters?: object; /** * The write parameters for the embedding model. * @type {object} * @memberof ModelIndexEmbed */ writeParameters?: object; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/IndexModel.d.ts /** * The IndexModel describes the configuration and status of a Pinecone index. * @export * @interface IndexModel */ interface IndexModel$1 { /** * The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. * @type {string} * @memberof IndexModel */ name: string; /** * The dimensions of the vectors to be inserted in the index. * @type {number} * @memberof IndexModel */ dimension?: number; /** * The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If the 'vector_type' is 'sparse', the metric must be 'dotproduct'. If the `vector_type` is `dense`, the metric defaults to 'cosine'. * Possible values: `cosine`, `euclidean`, or `dotproduct`. * @type {string} * @memberof IndexModel */ metric: string; /** * The URL address where the index is hosted. * @type {string} * @memberof IndexModel */ host: string; /** * The private endpoint URL of an index. * @type {string} * @memberof IndexModel */ privateHost?: string; /** * Whether [deletion protection](http://docs.pinecone.io/guides/manage-data/manage-indexes#configure-deletion-protection) is enabled/disabled for the index. * Possible values: `disabled` or `enabled`. * @type {string} * @memberof IndexModel */ deletionProtection?: string; /** * Custom user tags added to an index. Keys must be 80 characters or less. Values must be 120 characters or less. Keys must be alphanumeric, '_', or '-'. Values must be alphanumeric, ';', '@', '_', '-', '.', '+', or ' '. To unset a key, set the value to be an empty string. * @type {{ [key: string]: string; }} * @memberof IndexModel */ tags?: { [key: string]: string; }; /** * * @type {ModelIndexEmbed} * @memberof IndexModel */ embed?: ModelIndexEmbed; /** * * @type {IndexModelSpec} * @memberof IndexModel */ spec: IndexModelSpec; /** * * @type {IndexModelStatus} * @memberof IndexModel */ status: IndexModelStatus$1; /** * The index vector type. You can use 'dense' or 'sparse'. If 'dense', the vector dimension must be specified. If 'sparse', the vector dimension should not be specified. * @type {string} * @memberof IndexModel */ vectorType: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/IndexList.d.ts /** * The list of indexes that exist in the project. * @export * @interface IndexList */ interface IndexList$1 { /** * List of indexes in the project * @type {Array} * @memberof IndexList */ indexes?: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/RestoreJobModel.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The RestoreJobModel describes the status of a restore job. * @export * @interface RestoreJobModel */ interface RestoreJobModel$1 { /** * Unique identifier for the restore job * @type {string} * @memberof RestoreJobModel */ restoreJobId: string; /** * Backup used for the restore * @type {string} * @memberof RestoreJobModel */ backupId: string; /** * Name of the index into which data is being restored * @type {string} * @memberof RestoreJobModel */ targetIndexName: string; /** * ID of the index * @type {string} * @memberof RestoreJobModel */ targetIndexId: string; /** * Status of the restore job * @type {string} * @memberof RestoreJobModel */ status: string; /** * Timestamp when the restore job started * @type {Date} * @memberof RestoreJobModel */ createdAt: Date; /** * Timestamp when the restore job finished * @type {Date} * @memberof RestoreJobModel */ completedAt?: Date; /** * The progress made by the restore job out of 100 * @type {number} * @memberof RestoreJobModel */ percentComplete?: number; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/models/RestoreJobList.d.ts /** * The list of restore jobs that exist in the project. * @export * @interface RestoreJobList */ interface RestoreJobList$1 { /** * List of restore job objects * @type {Array} * @memberof RestoreJobList */ data: Array; /** * * @type {PaginationResponse} * @memberof RestoreJobList */ pagination?: PaginationResponse$2; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_control/apis/ManageIndexesApi.d.ts interface DescribeCollectionRequest { xPineconeApiVersion: string; collectionName: string; } interface DescribeIndexRequest { xPineconeApiVersion: string; indexName: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/runtime.d.ts interface ConfigurationParameters$3 { basePath?: string; fetchApi?: FetchAPI$3; middleware?: Middleware$3[]; queryParamsStringify?: (params: HTTPQuery$3) => string; username?: string; password?: string; apiKey?: string | ((name: string) => string); accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); headers?: HTTPHeaders$3; credentials?: RequestCredentials; } declare class Configuration$3 { private configuration; constructor(configuration?: ConfigurationParameters$3); set config(configuration: Configuration$3); get basePath(): string; get fetchApi(): FetchAPI$3 | undefined; get middleware(): Middleware$3[]; get queryParamsStringify(): (params: HTTPQuery$3) => string; get username(): string | undefined; get password(): string | undefined; get apiKey(): ((name: string) => string) | undefined; get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined; get headers(): HTTPHeaders$3 | undefined; get credentials(): RequestCredentials | undefined; } /** * This is the base class for all generated API classes. */ declare class BaseAPI$3 { protected configuration: Configuration$3; private static readonly jsonRegex; private middleware; constructor(configuration?: Configuration$3); withMiddleware(this: T, ...middlewares: Middleware$3[]): T; withPreMiddleware(this: T, ...preMiddlewares: Array): T; withPostMiddleware(this: T, ...postMiddlewares: Array): T; /** * Check if the given MIME is a JSON MIME. * JSON MIME examples: * application/json * application/json; charset=UTF8 * APPLICATION/JSON * application/vnd.company+json * @param mime - MIME (Multipurpose Internet Mail Extensions) * @return True if the given MIME is JSON, false otherwise. */ protected isJsonMime(mime: string | null | undefined): boolean; protected request(context: RequestOpts$3, initOverrides?: RequestInit | InitOverrideFunction$3): Promise; private createFetchParams; private fetchApi; /** * Create a shallow clone of `this` by constructing a new instance * and then shallow cloning data members. */ private clone; } type FetchAPI$3 = WindowOrWorkerGlobalScope['fetch']; type Json$3 = any; type HTTPMethod$3 = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; type HTTPHeaders$3 = { [key: string]: string; }; type HTTPQuery$3 = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery$3; }; type HTTPBody$3 = Json$3 | FormData | URLSearchParams; type HTTPRequestInit$3 = { headers?: HTTPHeaders$3; method: HTTPMethod$3; credentials?: RequestCredentials; body?: HTTPBody$3; }; type InitOverrideFunction$3 = (requestContext: { init: HTTPRequestInit$3; context: RequestOpts$3; }) => Promise; interface FetchParams$3 { url: string; init: RequestInit; } interface RequestOpts$3 { path: string; method: HTTPMethod$3; headers: HTTPHeaders$3; query?: HTTPQuery$3; body?: HTTPBody$3; } interface RequestContext$3 { fetch: FetchAPI$3; url: string; init: RequestInit; } interface ResponseContext$3 { fetch: FetchAPI$3; url: string; init: RequestInit; response: Response; } interface ErrorContext$3 { fetch: FetchAPI$3; url: string; init: RequestInit; error: unknown; response?: Response; } interface Middleware$3 { pre?(context: RequestContext$3): Promise; post?(context: ResponseContext$3): Promise; onError?(context: ErrorContext$3): Promise; } interface ApiResponse$4 { raw: Response; value(): Promise; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/AssistantFileModel.d.ts /** * Pinecone assistant data plane API * Pinecone Assistant Engine is a context engine to store and retrieve relevant knowledge from millions of documents at scale. This API supports interactions with assistants. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The response format for a successful file upload request. * @export * @interface AssistantFileModel */ interface AssistantFileModel { /** * The name of the uploaded file. * @type {string} * @memberof AssistantFileModel */ name: string; /** * The unique identifier for the uploaded file. This may be a user-provided identifier or a system-generated ID. * @type {string} * @memberof AssistantFileModel */ id: string; /** * The size of the uploaded file, in bytes. * @type {number} * @memberof AssistantFileModel */ size?: number; /** * Optional metadata associated with the file. This metadata can be used to filter files when listing them or to restrict search results when querying the assistant. * @type {object} * @memberof AssistantFileModel */ metadata?: object | null; /** * The timestamp when the file was uploaded, in ISO 8601 format (`YYYY-MM-DDTHH:MM:SSZ`). * @type {Date} * @memberof AssistantFileModel */ createdOn?: Date; /** * The timestamp of the most recent update to the file, in ISO 8601 format (`YYYY-MM-DDTHH:MM:SSZ`). * @type {Date} * @memberof AssistantFileModel */ updatedOn?: Date; /** * The current state of the uploaded file. Possible values: * - `Processing`: File is being processed (parsed, chunked, embedded) * - `Available`: Processing completed successfully; file is ready for use * - `Deleting`: Deletion has been initiated but not yet completed * - `ProcessingFailed`: Processing failed with an error * * Note: Once a file is deleted, the API returns 404 Not Found instead of a file object. * @type {string} * @memberof AssistantFileModel */ status?: string; /** * A [signed URL](https://cloud.google.com/storage/docs/access-control/signed-urls) that provides temporary, read-only access to the file. Anyone with the link can access the file, so treat it as sensitive data. Expires after a short time. * @type {string} * @memberof AssistantFileModel */ signedUrl?: string | null; /** * Indicates whether the file was processed as multimodal. * @type {boolean} * @memberof AssistantFileModel */ multimodal?: boolean; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/MessageModel.d.ts /** * Pinecone assistant data plane API * Pinecone Assistant Engine is a context engine to store and retrieve relevant knowledge from millions of documents at scale. This API supports interactions with assistants. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Describes the format of a message in a chat. * @export * @interface MessageModel */ interface MessageModel$1 { /** * The role of the message author, it can be `user`, `assistant`, or `system`. * @type {string} * @memberof MessageModel */ role?: string; /** * The textual content of this partial message. * @type {string} * @memberof MessageModel */ content?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/ChoiceModel.d.ts /** * Describes a single choice in a chat completion response. * @export * @interface ChoiceModel */ interface ChoiceModel$1 { /** * Indicates why the chat response generation stopped. This signals the end of the response. * - `stop`: The model finished generating the response. * - `length`: Generation was cut off because the maximum number of tokens allowed was reached. * - `content_filter`: Generation stopped because content was blocked by content filtering rules. * (for example, content that contains hate speech or violent material). * * - `tool_calls`: Generation stopped because a tool call was triggered. * @type {string} * @memberof ChoiceModel */ finishReason?: string; /** * The index of this choice in the list of returned choices. * @type {number} * @memberof ChoiceModel */ index?: number; /** * * @type {MessageModel} * @memberof ChoiceModel */ message?: MessageModel$1; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/UsageModel.d.ts /** * Pinecone assistant data plane API * Pinecone Assistant Engine is a context engine to store and retrieve relevant knowledge from millions of documents at scale. This API supports interactions with assistants. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Describes the token usage associated with interactions with an assistant. * @export * @interface UsageModel */ interface UsageModel { /** * For chat interactions, the number of tokens in the LLM request (message, context snippets, and system prompt). * For context retrieval, the number of tokens in the LLM request used to generate search queries from the messages, plus the tokens in the retrieved context snippets. * @type {number} * @memberof UsageModel */ promptTokens?: number; /** * For chat interactions, the number of tokens in the assistant's response. * For context retrieval, this is always 0. * @type {number} * @memberof UsageModel */ completionTokens?: number; /** * The total number of tokens used, equal to the sum of `prompt_tokens` and `completion_tokens`. * @type {number} * @memberof UsageModel */ totalTokens?: number; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/ChatCompletionModel.d.ts /** * Describes the response format of a chat request. * @export * @interface ChatCompletionModel */ interface ChatCompletionModel { /** * A unique identifier for this chat response. * @type {string} * @memberof ChatCompletionModel */ id?: string; /** * A list of chat completion choices. * @type {Array} * @memberof ChatCompletionModel */ choices?: Array; /** * The name or identifier of the model used to generate this chat response. * @type {string} * @memberof ChatCompletionModel */ model?: string; /** * * @type {UsageModel} * @memberof ChatCompletionModel */ usage?: UsageModel; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/HighlightModel.d.ts /** * Pinecone assistant data plane API * Pinecone Assistant Engine is a context engine to store and retrieve relevant knowledge from millions of documents at scale. This API supports interactions with assistants. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Represents a portion of a referenced document that directly supports or is relevant to the response. * @export * @interface HighlightModel */ interface HighlightModel { /** * The type of the highlight. Only `text` is supported. * @type {string} * @memberof HighlightModel */ type: string; /** * The text content of the highlighted portion from the referenced document. * @type {string} * @memberof HighlightModel */ content: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/ReferenceModel.d.ts /** * Describes a single reference in a citation. * @export * @interface ReferenceModel */ interface ReferenceModel { /** * * @type {AssistantFileModel} * @memberof ReferenceModel */ file?: AssistantFileModel; /** * A list of page numbers in the referenced document that contain the relevant content. * @type {Array} * @memberof ReferenceModel */ pages?: Array; /** * * @type {HighlightModel} * @memberof ReferenceModel */ highlight?: HighlightModel | null; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/CitationModel.d.ts /** * Describes a single citation included in a chat response, pointing to one or more referenced sources. * @export * @interface CitationModel */ interface CitationModel { /** * The index position of the citation in the complete text response. * @type {number} * @memberof CitationModel */ position?: number; /** * A list of file references that this citation points to. * @type {Array} * @memberof CitationModel */ references?: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/ContentFilterResults.d.ts /** * Pinecone assistant data plane API * Pinecone Assistant Engine is a context engine to store and retrieve relevant knowledge from millions of documents at scale. This API supports interactions with assistants. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Content filter results provided by the LLM, describing safety-related classifications applied to the content. The structure may vary depending on the model and the content being filtered. The `spec` field identifies the provider, and determines the structure of `results`. * @export * @interface ContentFilterResults */ interface ContentFilterResults { /** * Identifier of the model provider. * @type {string} * @memberof ContentFilterResults */ spec?: string; /** * Content filter results returned by the provider. The structure depend on the `spec` value. * @type {any} * @memberof ContentFilterResults */ results?: any | null; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/ChatModel.d.ts /** * Describes the response format of a chat request. * @export * @interface ChatModel */ interface ChatModel { /** * A unique identifier for this chat response. * @type {string} * @memberof ChatModel */ id?: string; /** * Indicates why the chat response generation stopped. This signals the end of the response. * - `stop`: The model finished generating the response. * - `length`: Generation was cut off because the maximum number of tokens allowed was reached. * - `content_filter`: Generation stopped because content was blocked by content filtering rules. * (for example, content that contains hate speech or violent material). * * - `tool_calls`: Generation stopped because a tool call was triggered. * @type {string} * @memberof ChatModel */ finishReason?: string; /** * * @type {MessageModel} * @memberof ChatModel */ message?: MessageModel$1; /** * The name or identifier of the model used to generate this chat response. * @type {string} * @memberof ChatModel */ model?: string; /** * Citations supporting the information in the response. * @type {Array} * @memberof ChatModel */ citations?: Array; /** * * @type {UsageModel} * @memberof ChatModel */ usage?: UsageModel; /** * The number of context snippets provided to the model to generate the response. This indicates how much retrieved information was available for the generation, allowing for logic to be applied if no context was found (count is 0). * @type {number} * @memberof ChatModel */ contextSnippetCount?: number; /** * * @type {ContentFilterResults} * @memberof ChatModel */ contentFilterResults?: ContentFilterResults; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/ContextOptionsModel.d.ts /** * Pinecone assistant data plane API * Pinecone Assistant Engine is a context engine to store and retrieve relevant knowledge from millions of documents at scale. This API supports interactions with assistants. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Controls the context snippets sent to the LLM. * @export * @interface ContextOptionsModel */ interface ContextOptionsModel { /** * The maximum number of context snippets to use. Default is 16. Maximum is 64. * @type {number} * @memberof ContextOptionsModel */ topK?: number; /** * The maximum context snippet size. Default is 2048 tokens. Minimum is 512 tokens. Maximum is 8192 tokens. * @type {number} * @memberof ContextOptionsModel */ snippetSize?: number; /** * Whether or not to send image-related context snippets to the LLM. If `false`, only text context snippets are sent. * @type {boolean} * @memberof ContextOptionsModel */ multimodal?: boolean; /** * If image-related context snippets are sent to the LLM, this field determines whether or not they should include base64 image data. If `false`, only the image caption is sent. Only available when `multimodal=true`. * @type {boolean} * @memberof ContextOptionsModel */ includeBinaryContent?: boolean; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/ChatRequest.d.ts /** * Represents a request to chat with an assistant. * @export * @interface ChatRequest */ interface ChatRequest { /** * The list of messages sent to the assistant, used for context retrieval and generating response with the LLM. * @type {Array} * @memberof ChatRequest */ messages: Array; /** * If `false`, the assistant returns a single JSON response. If `true`, the assistant returns a stream of responses. * @type {boolean} * @memberof ChatRequest */ stream?: boolean; /** * The large language model used to generate responses. * @type {string} * @memberof ChatRequest */ model?: string; /** * Controls the randomness of the model's output: lower values make responses more deterministic, while higher values increase creativity and variability. If the model does not support a temperature parameter, the parameter will be ignored. * @type {number} * @memberof ChatRequest */ temperature?: number; /** * Optional metadata-based filter to restrict which documents are retrieved for the assistant's response context. * @type {object} * @memberof ChatRequest */ filter?: object; /** * If `true`, instructs the assistant to return a JSON-formatted response. Cannot be used together with streaming mode. * @type {boolean} * @memberof ChatRequest */ jsonResponse?: boolean; /** * If `true`, instructs the assistant to include highlights from the referenced documents that support its response. * @type {boolean} * @memberof ChatRequest */ includeHighlights?: boolean; /** * * @type {ContextOptionsModel} * @memberof ChatRequest */ contextOptions?: ContextOptionsModel; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/ImageModel.d.ts /** * Pinecone assistant data plane API * Pinecone Assistant Engine is a context engine to store and retrieve relevant knowledge from millions of documents at scale. This API supports interactions with assistants. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Represents the data for an image. * @export * @interface ImageModel */ interface ImageModel { /** * The format of the image data. Only `base64` is supported. * @type {string} * @memberof ImageModel */ type: string; /** * The MIME type of the image (e.g., `image/jpeg`). * @type {string} * @memberof ImageModel */ mimeType: string; /** * The image data. When `type` is `base64`, this is a base64-encoded string. * @type {string} * @memberof ImageModel */ data: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/MultiModalContentImageBlockModel.d.ts /** * Represents an image block in a multimodal context snippet. * @export * @interface MultiModalContentImageBlockModel */ interface MultiModalContentImageBlockModel { /** * The type of multimodal content block. Always `image`. * @type {string} * @memberof MultiModalContentImageBlockModel */ type: string; /** * A caption describing the image. * @type {string} * @memberof MultiModalContentImageBlockModel */ caption: string; /** * * @type {ImageModel} * @memberof MultiModalContentImageBlockModel */ image?: ImageModel | null; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/MultiModalContentTextBlockModel.d.ts /** * Pinecone assistant data plane API * Pinecone Assistant Engine is a context engine to store and retrieve relevant knowledge from millions of documents at scale. This API supports interactions with assistants. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Represents a text block in a multimodal context snippet. * @export * @interface MultiModalContentTextBlockModel */ interface MultiModalContentTextBlockModel { /** * The type of multimodal content block. Always `text`. * @type {string} * @memberof MultiModalContentTextBlockModel */ type: string; /** * The text content of this multimodal block. * @type {string} * @memberof MultiModalContentTextBlockModel */ text: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/MultiModalContentBlocksModel.d.ts /** * @type MultiModalContentBlocksModel * Represents a block in the multimodal content of a context snippet. * @export */ type MultiModalContentBlocksModel = { type: 'image'; } & MultiModalContentImageBlockModel | { type: 'text'; } & MultiModalContentTextBlockModel; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/DocxReferenceModel.d.ts /** * Represents a reference to a part of a DOCX document. * @export * @interface DocxReferenceModel */ interface DocxReferenceModel { /** * The type of reference. Always `doc_x`. * @type {string} * @memberof DocxReferenceModel */ type: string; /** * * @type {AssistantFileModel} * @memberof DocxReferenceModel */ file: AssistantFileModel; /** * A list of page numbers in the DOCX document that are relevant to the query. * @type {Array} * @memberof DocxReferenceModel */ pages: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/JsonReferenceModel.d.ts /** * Represents a reference to a JSON document. * @export * @interface JsonReferenceModel */ interface JsonReferenceModel { /** * The type of reference. Always `json`. * @type {string} * @memberof JsonReferenceModel */ type: string; /** * * @type {AssistantFileModel} * @memberof JsonReferenceModel */ file: AssistantFileModel; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/MarkdownReferenceModel.d.ts /** * Represents a reference to a part of a markdown document. * @export * @interface MarkdownReferenceModel */ interface MarkdownReferenceModel { /** * The type of reference. Always `markdown`. * @type {string} * @memberof MarkdownReferenceModel */ type: string; /** * * @type {AssistantFileModel} * @memberof MarkdownReferenceModel */ file: AssistantFileModel; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/PdfReferenceModel.d.ts /** * Represents a reference to a part of a PDF document. * @export * @interface PdfReferenceModel */ interface PdfReferenceModel { /** * The type of reference. Always `pdf`. * @type {string} * @memberof PdfReferenceModel */ type: string; /** * * @type {AssistantFileModel} * @memberof PdfReferenceModel */ file: AssistantFileModel; /** * A list of page numbers in the PDF document that are relevant to the query. * @type {Array} * @memberof PdfReferenceModel */ pages: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/TextReferenceModel.d.ts /** * Represents a reference to a part of a text document. * @export * @interface TextReferenceModel */ interface TextReferenceModel { /** * The type of reference. Always `text`. * @type {string} * @memberof TextReferenceModel */ type: string; /** * * @type {AssistantFileModel} * @memberof TextReferenceModel */ file: AssistantFileModel; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/TypedReferenceModel.d.ts /** * @type TypedReferenceModel * Represents a reference for the information provided. * @export */ type TypedReferenceModel = { type: 'doc_x'; } & DocxReferenceModel | { type: 'json'; } & JsonReferenceModel | { type: 'markdown'; } & MarkdownReferenceModel | { type: 'pdf'; } & PdfReferenceModel | { type: 'text'; } & TextReferenceModel; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/MultiModalSnippetModel.d.ts /** * Represents a multimodal context snippet. * @export * @interface MultiModalSnippetModel */ interface MultiModalSnippetModel { /** * The type of context snippet. Always `multimodal`. * @type {string} * @memberof MultiModalSnippetModel */ type: string; /** * A list of multimodal content blocks (text, images, etc.) included in this snippet. * @type {Array} * @memberof MultiModalSnippetModel */ content: Array; /** * A numerical score indicating the relevance of this snippet to the user's query. * @type {number} * @memberof MultiModalSnippetModel */ score: number; /** * * @type {TypedReferenceModel} * @memberof MultiModalSnippetModel */ reference: TypedReferenceModel; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/TextSnippetModel.d.ts /** * Represents a text context snippet. * @export * @interface TextSnippetModel */ interface TextSnippetModel { /** * The type of context snippet. Always `text`. * @type {string} * @memberof TextSnippetModel */ type: string; /** * The textual content of the snippet. * @type {string} * @memberof TextSnippetModel */ content: string; /** * A numerical score indicating the relevance of this snippet to the query. * @type {number} * @memberof TextSnippetModel */ score: number; /** * * @type {TypedReferenceModel} * @memberof TextSnippetModel */ reference: TypedReferenceModel; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/SnippetModel.d.ts /** * @type SnippetModel * Represents a part of a document that is relevant to the user query. * @export */ type SnippetModel = { type: 'multimodal'; } & MultiModalSnippetModel | { type: 'text'; } & TextSnippetModel; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/ContextModel.d.ts /** * Describes the context returned by an assistant in response to a query. * @export * @interface ContextModel */ interface ContextModel { /** * A unique identifier for this context response. * @type {string} * @memberof ContextModel */ id?: string; /** * A list of context snippets relevant to the user's query. * @type {Array} * @memberof ContextModel */ snippets: Array; /** * * @type {UsageModel} * @memberof ContextModel */ usage: UsageModel; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/ContextRequest.d.ts /** * Parameters to retrieve context from an assistant. * @export * @interface ContextRequest */ interface ContextRequest { /** * The query that is used to generate the context. Exactly one of query or messages should be provided. * @type {string} * @memberof ContextRequest */ query?: string; /** * Optionally filter which documents can be retrieved using the following metadata fields. * @type {object} * @memberof ContextRequest */ filter?: object; /** * The list of messages to use for generating the context. Exactly one of query or messages should be provided. * @type {Array} * @memberof ContextRequest */ messages?: Array; /** * The maximum number of context snippets to return. Default is 16. Maximum is 64. * @type {number} * @memberof ContextRequest */ topK?: number; /** * The maximum context snippet size. Default is 2048 tokens. Minimum is 512 tokens. Maximum is 8192 tokens. * @type {number} * @memberof ContextRequest */ snippetSize?: number; /** * Whether or not to retrieve image-related context snippets. If `false`, only text snippets are returned. * @type {boolean} * @memberof ContextRequest */ multimodal?: boolean; /** * If image-related context snippets are returned, this field determines whether or not they should include base64 image data. If `false`, only the image captions are returned. Only available when `multimodal=true`. * @type {boolean} * @memberof ContextRequest */ includeBinaryContent?: boolean; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/PaginationResponse.d.ts /** * Pinecone assistant data plane API * Pinecone Assistant Engine is a context engine to store and retrieve relevant knowledge from millions of documents at scale. This API supports interactions with assistants. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Object that contains the next pagination token to continue a previous listing operation. * @export * @interface PaginationResponse */ interface PaginationResponse$1 { /** * The token to use to retrieve the next page of results. * @type {string} * @memberof PaginationResponse */ next: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/ListFilesResponse.d.ts /** * * @export * @interface ListFilesResponse */ interface ListFilesResponse { /** * The list of files that exist in the assistant. * @type {Array} * @memberof ListFilesResponse */ files?: Array; /** * * @type {PaginationResponse} * @memberof ListFilesResponse */ pagination?: PaginationResponse$1; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/OperationModel.d.ts /** * Pinecone assistant data plane API * Pinecone Assistant Engine is a context engine to store and retrieve relevant knowledge from millions of documents at scale. This API supports interactions with assistants. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The OperationModel describes the status of an ongoing or completed server operation. * @export * @interface OperationModel */ interface OperationModel { /** * The unique identifier for the operation. * @type {string} * @memberof OperationModel */ id: string; /** * The kind of action represented by this operation, such as uploading or deleting a file. * @type {string} * @memberof OperationModel */ operationType: string; /** * The identifier of the file being operated on. * @type {string} * @memberof OperationModel */ fileId?: string | null; /** * The status of the operation. * * - `Processing`: The operation is in progress. * - `Completed`: The operation finished successfully. * - `Failed`: The operation failed. See `error_message` for details. * @type {string} * @memberof OperationModel */ status: string; /** * The timestamp when the operation was created, in ISO 8601 format. * @type {Date} * @memberof OperationModel */ createdOn: Date; /** * The timestamp when the operation completed or failed, in ISO 8601 format. Present only when status is `Completed` or `Failed`. * @type {Date} * @memberof OperationModel */ completedOn?: Date | null; /** * The progress made by the operation, as a percentage (0-100). * @type {number} * @memberof OperationModel */ percentComplete?: number; /** * A message describing the error that caused the operation to fail. * Present only when status is `Failed`. * @type {string} * @memberof OperationModel */ errorMessage?: string | null; /** * The number of ingestion units consumed by this operation. * Present only when status is `Completed` for file ingestion operations. * @type {number} * @memberof OperationModel */ ingestionUnits?: number | null; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/OperationList.d.ts /** * A list of operations. * @export * @interface OperationList */ interface OperationList { /** * The list of operations for the assistant. * @type {Array} * @memberof OperationList */ operations?: Array; /** * * @type {PaginationResponse} * @memberof OperationList */ pagination?: PaginationResponse$1; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/models/SearchCompletions.d.ts /** * Represents a request to chat with an assistant. * @export * @interface SearchCompletions */ interface SearchCompletions { /** * The list of messages sent to the assistant, used for context retrieval and generating response with the LLM. * @type {Array} * @memberof SearchCompletions */ messages: Array; /** * If `false`, the assistant returns a single JSON response. If `true`, the assistant returns a stream of responses. * @type {boolean} * @memberof SearchCompletions */ stream?: boolean; /** * The large language model used to generate responses. * @type {string} * @memberof SearchCompletions */ model?: string; /** * Controls the randomness of the model's output: lower values make responses more deterministic, while higher values increase creativity and variability. If the model does not support a temperature parameter, the parameter will be ignored. * @type {number} * @memberof SearchCompletions */ temperature?: number; /** * Optional metadata-based filter to restrict which documents are retrieved for the assistant's response context. * @type {object} * @memberof SearchCompletions */ filter?: object; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_data/apis/ManageAssistantsApi.d.ts interface ChatAssistantRequest { xPineconeApiVersion: string; assistantName: string; chatRequest: ChatRequest; } interface ChatCompletionAssistantRequest { xPineconeApiVersion: string; assistantName: string; searchCompletions: SearchCompletions; } interface ContextAssistantRequest { xPineconeApiVersion: string; assistantName: string; contextRequest: ContextRequest; } interface DeleteFileRequest { xPineconeApiVersion: string; assistantName: string; assistantFileId: string; } interface DescribeFileRequest { xPineconeApiVersion: string; assistantName: string; assistantFileId: string; includeUrl?: string; } interface DescribeOperationRequest { xPineconeApiVersion: string; assistantName: string; operationId: string; } interface ListFilesRequest { xPineconeApiVersion: string; assistantName: string; filter?: string; limit?: number; paginationToken?: string; } interface ListOperationsRequest { xPineconeApiVersion: string; assistantName: string; operationType?: string; status?: string; limit?: number; paginationToken?: string; } interface UploadFileRequest { xPineconeApiVersion: string; assistantName: string; file: Blob; multimodal?: string; } interface UpsertFileRequest { xPineconeApiVersion: string; assistantName: string; assistantFileId: string; file: Blob; multimodal?: string; } /** * */ declare class ManageAssistantsApi extends BaseAPI$3 { /** * Chat with an assistant and get back citations in structured form. This is the recommended way to chat with an assistant, as it offers more functionality and control over the assistant\'s responses and references than the OpenAI-compatible chat interface. For guidance and examples, see [Chat with an assistant](https://docs.pinecone.io/guides/assistant/chat-with-assistant). * Chat with an assistant */ chatAssistantRaw(requestParameters: ChatAssistantRequest, initOverrides?: RequestInit | InitOverrideFunction$3): Promise>; /** * Chat with an assistant and get back citations in structured form. This is the recommended way to chat with an assistant, as it offers more functionality and control over the assistant\'s responses and references than the OpenAI-compatible chat interface. For guidance and examples, see [Chat with an assistant](https://docs.pinecone.io/guides/assistant/chat-with-assistant). * Chat with an assistant */ chatAssistant(requestParameters: ChatAssistantRequest, initOverrides?: RequestInit | InitOverrideFunction$3): Promise; /** * Chat with an assistant. This endpoint is based on the OpenAI Chat Completion API, a commonly used and adopted API. It is useful if you need inline citations or OpenAI-compatible responses, but has limited functionality compared to the standard chat interface. For guidance and examples, see [Chat with an assistant](https://docs.pinecone.io/guides/assistant/chat-with-assistant). * Chat through an OpenAI-compatible interface */ chatCompletionAssistantRaw(requestParameters: ChatCompletionAssistantRequest, initOverrides?: RequestInit | InitOverrideFunction$3): Promise>; /** * Chat with an assistant. This endpoint is based on the OpenAI Chat Completion API, a commonly used and adopted API. It is useful if you need inline citations or OpenAI-compatible responses, but has limited functionality compared to the standard chat interface. For guidance and examples, see [Chat with an assistant](https://docs.pinecone.io/guides/assistant/chat-with-assistant). * Chat through an OpenAI-compatible interface */ chatCompletionAssistant(requestParameters: ChatCompletionAssistantRequest, initOverrides?: RequestInit | InitOverrideFunction$3): Promise; /** * Retrieve context snippets from an assistant to use as part of RAG or any agentic flow. For guidance and examples, see [Retrieve context snippets](https://docs.pinecone.io/guides/assistant/retrieve-context-snippets). * Retrieve context from an assistant */ contextAssistantRaw(requestParameters: ContextAssistantRequest, initOverrides?: RequestInit | InitOverrideFunction$3): Promise>; /** * Retrieve context snippets from an assistant to use as part of RAG or any agentic flow. For guidance and examples, see [Retrieve context snippets](https://docs.pinecone.io/guides/assistant/retrieve-context-snippets). * Retrieve context from an assistant */ contextAssistant(requestParameters: ContextAssistantRequest, initOverrides?: RequestInit | InitOverrideFunction$3): Promise; /** * [Delete an uploaded file](https://docs.pinecone.io/guides/assistant/manage-files#delete-a-file) from an assistant. This operation is asynchronous. The response includes an operation ID that can be used to poll for completion via the describe operation endpoint. * Delete a file */ deleteFileRaw(requestParameters: DeleteFileRequest, initOverrides?: RequestInit | InitOverrideFunction$3): Promise>; /** * [Delete an uploaded file](https://docs.pinecone.io/guides/assistant/manage-files#delete-a-file) from an assistant. This operation is asynchronous. The response includes an operation ID that can be used to poll for completion via the describe operation endpoint. * Delete a file */ deleteFile(requestParameters: DeleteFileRequest, initOverrides?: RequestInit | InitOverrideFunction$3): Promise; /** * [Get the current status and metadata of a file](https://docs.pinecone.io/guides/assistant/manage-files#get-the-status-of-a-file) uploaded to an assistant. * Describe a file */ describeFileRaw(requestParameters: DescribeFileRequest, initOverrides?: RequestInit | InitOverrideFunction$3): Promise>; /** * [Get the current status and metadata of a file](https://docs.pinecone.io/guides/assistant/manage-files#get-the-status-of-a-file) uploaded to an assistant. * Describe a file */ describeFile(requestParameters: DescribeFileRequest, initOverrides?: RequestInit | InitOverrideFunction$3): Promise; /** * Get the status of an operation. * Describe an operation */ describeOperationRaw(requestParameters: DescribeOperationRequest, initOverrides?: RequestInit | InitOverrideFunction$3): Promise>; /** * Get the status of an operation. * Describe an operation */ describeOperation(requestParameters: DescribeOperationRequest, initOverrides?: RequestInit | InitOverrideFunction$3): Promise; /** * List all files in an assistant, with an option to filter files with metadata. For guidance and examples, see [Manage files](https://docs.pinecone.io/guides/assistant/manage-files#list-files-in-an-assistant). * List Files */ listFilesRaw(requestParameters: ListFilesRequest, initOverrides?: RequestInit | InitOverrideFunction$3): Promise>; /** * List all files in an assistant, with an option to filter files with metadata. For guidance and examples, see [Manage files](https://docs.pinecone.io/guides/assistant/manage-files#list-files-in-an-assistant). * List Files */ listFiles(requestParameters: ListFilesRequest, initOverrides?: RequestInit | InitOverrideFunction$3): Promise; /** * List all operations for an assistant. Returns operations that are in progress, as well as recently completed or failed operations. Both successful and failed operations are retained for 30 days after completion. Use the `operation_type` and `status` query parameters to filter results. * List operations */ listOperationsRaw(requestParameters: ListOperationsRequest, initOverrides?: RequestInit | InitOverrideFunction$3): Promise>; /** * List all operations for an assistant. Returns operations that are in progress, as well as recently completed or failed operations. Both successful and failed operations are retained for 30 days after completion. Use the `operation_type` and `status` query parameters to filter results. * List operations */ listOperations(requestParameters: ListOperationsRequest, initOverrides?: RequestInit | InitOverrideFunction$3): Promise; /** * Upload a file to the specified assistant. An identifier will be generated. To specify a file identifier or to replace file content, use the upsert endpoint (`PUT /files/{assistant_name}/{assistant_file_id}`). This operation is asynchronous. The response includes an operation ID that can be used to poll for completion via the describe operation endpoint. For guidance and examples, see [Manage files](https://docs.pinecone.io/guides/assistant/manage-files#upload-a-local-file). * Upload a file */ uploadFileRaw(requestParameters: UploadFileRequest, initOverrides?: RequestInit | InitOverrideFunction$3): Promise>; /** * Upload a file to the specified assistant. An identifier will be generated. To specify a file identifier or to replace file content, use the upsert endpoint (`PUT /files/{assistant_name}/{assistant_file_id}`). This operation is asynchronous. The response includes an operation ID that can be used to poll for completion via the describe operation endpoint. For guidance and examples, see [Manage files](https://docs.pinecone.io/guides/assistant/manage-files#upload-a-local-file). * Upload a file */ uploadFile(requestParameters: UploadFileRequest, initOverrides?: RequestInit | InitOverrideFunction$3): Promise; /** * Create or replace a file in the specified assistant. If a file with the given `assistant_file_id` already exists, it will be replaced with the new file. If it doesn\'t exist, a new file will be created with that identifier. This operation is asynchronous. The file processing will occur in the background. For guidance and examples, see [Manage files](https://docs.pinecone.io/guides/assistant/manage-files#upload-a-local-file). * Upsert a file */ upsertFileRaw(requestParameters: UpsertFileRequest, initOverrides?: RequestInit | InitOverrideFunction$3): Promise>; /** * Create or replace a file in the specified assistant. If a file with the given `assistant_file_id` already exists, it will be replaced with the new file. If it doesn\'t exist, a new file will be created with that identifier. This operation is asynchronous. The file processing will occur in the background. For guidance and examples, see [Manage files](https://docs.pinecone.io/guides/assistant/manage-files#upload-a-local-file). * Upsert a file */ upsertFile(requestParameters: UpsertFileRequest, initOverrides?: RequestInit | InitOverrideFunction$3): Promise; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/assistant/data/types.d.ts /** * Options for filtering files in the list operation. */ interface ListFilesOptions { /** * Optionally filter files by metadata. Uses Pinecone's metadata filter language: * fields are referenced at the top level (not wrapped in a `metadata` key), and * may be combined with operators like `$eq`, `$ne`, `$gt`, `$lt`, `$in`. * * @example Direct value match: * ```typescript * filter: { version: 'v1' } * ``` * * @example Operator filter: * ```typescript * filter: { version: { $eq: 'v1' } } * ``` * * @example Combined fields: * ```typescript * filter: { version: 'v1', tier: { $in: ['gold', 'silver'] } } * ``` * * @see {@link https://docs.pinecone.io/guides/data/filter-with-metadata Metadata filter language} * * Filters that don't match Pinecone's expected shape (e.g. wrapping fields * in a top-level `metadata` key like `{ metadata: { version: 'v1' } }`) are * silently ignored server-side and return the unfiltered file list. */ filter?: object; } /** * Response for listing files uploaded to an assistant. */ interface AssistantFilesList { /** * The list of files associated with the assistant. */ files?: Array; } /** * Options for listing the async operations (such as file uploads and deletes) * performed on an assistant. */ interface ListOperationsOptions { /** * Optionally filter operations by type, such as the kind of action the * operation represents (e.g. uploading or deleting a file). */ operationType?: string; /** * Optionally filter operations by status (e.g. `Processing`, `Completed`, or * `Failed`). */ status?: string; /** * The maximum number of operations to return. */ limit?: number; /** * The token to paginate through the list of operations. Use the * `paginationToken` returned in a previous response to fetch the next page. */ paginationToken?: string; } /** * An enum constant representing the models that can be used for chatting with an assistant. The default is 'gpt-4o'. * * This enum is provided for convenience but is not enforced. You can pass any string value * as the model parameter. New models may be added by without requiring an SDK update. * @see [Choose a model](https://docs.pinecone.io/guides/assistant/chat-with-assistant#choose-a-model) */ declare const ChatModelEnum: { Gpt4o: string; Gpt41: string; O4Mini: string; ClaudeSonnet45: string; Gemini25Pro: string; }; /** * This enum type is provided for convenience but is not enforced. You can pass any string value * as the model parameter. New models may be added by without requiring an SDK update. * @see [Choose a model](https://docs.pinecone.io/guides/assistant/chat-with-assistant#choose-a-model) */ type ChatModelEnum = (typeof ChatModelEnum)[keyof typeof ChatModelEnum]; /** * Describes the format of a message in an assistant chat. The `role` key can only be one of `user` or `assistant`. */ interface MessageModel { role: string; content: string; } /** * The messages to send to an assistant. Can be a list of strings or a list of {@link MessageModel} objects. * The `role` key can only be one of `user` or `assistant`. */ type MessagesModel = string[] | MessageModel[]; /** * Controls the context snippets sent to the LLM. */ interface ChatContextOptions { /** * The maximum number of context snippets to use. Default is 16. Maximum is 64. */ topK?: number; /** * The maximum context snippet size. Default is 2048 tokens. Minimum is 512 tokens. Maximum is 8192 tokens. */ snippetSize?: number; /** * Whether or not to send image-related context snippets to the LLM. If `false`, only text context snippets are sent. */ multimodal?: boolean; /** * If image-related context snippets are sent to the LLM, this field determines whether or not they should include base64 image data. If `false`, only the image caption is sent. Only available when `multimodal=true`. */ includeBinaryContent?: boolean; } /** * The list of queries / chats to chat an assistant */ interface ChatOptions { /** * The {@link MessagesModel} to send to the Assistant. Can be a list of strings or a list of objects. If sent as a list of * objects, must have exactly two keys: `role` and `content`. The `role` key can only be one of `user` or `assistant`. */ messages: MessagesModel; /** * The large language model to use for answer generation */ model?: string; /** * Controls the randomness of the model's output: lower values make responses more deterministic, while higher values increase creativity and variability. If the model does not support a temperature parameter, the parameter will be ignored. */ temperature?: number; /** * Optionally filter which documents can be retrieved using the following metadata fields. */ filter?: object; /** * If true, the assistant will be instructed to return a JSON response. Cannot be used with streaming. */ jsonResponse?: boolean; /** * If true, the assistant will be instructed to return highlights from the referenced documents that support its response. */ includeHighlights?: boolean; /** * Controls the context snippets sent to the LLM. */ contextOptions?: ChatContextOptions; } /** * Request format for sending a chat completion request to an assistant. */ interface ChatCompletionOptions { /** * The {@link MessagesModel} to send to the Assistant. Can be a list of strings or a list of objects. If sent as a list of * objects, must have exactly two keys: `role` and `content`. The `role` key can only be one of `user` or `assistant`. */ messages: MessagesModel; /** * The large language model to use for answer generation */ model?: string; /** * Controls the randomness of the model's output: lower values make responses more deterministic, while higher values increase creativity and variability. If the model does not support a temperature parameter, the parameter will be ignored. */ temperature?: number; /** * Optionally filter which documents can be retrieved using the following metadata fields. */ filter?: object; } /** * Parameters to retrieve context from an assistant. */ interface ContextOptions { /** * The query that is used to generate the context. Exactly one of query or messages should be provided. */ query?: string; /** * The list of messages to use for generating the context. Exactly one of query or messages should be provided. */ messages?: MessagesModel; /** * Optionally filter which documents can be retrieved using the following metadata fields. */ filter?: object; /** * The maximum number of context snippets to return. Default is 16. Maximum is 64. */ topK?: number; /** * The maximum context snippet size. Default is 2048 tokens. Minimum is 512 tokens. Maximum is 8192 tokens. */ snippetSize?: number; /** * Whether or not to retrieve image-related context snippets. If `false`, only text snippets are returned. */ multimodal?: boolean; /** * If image-related context snippets are returned, this field determines whether or not they should include base64 image data. If `false`, only the image captions are returned. Only available when `multimodal=true`. */ includeBinaryContent?: boolean; } /** * An uploadable file value. Can be a Node.js `Buffer`, a `Blob`, or a Node.js * `ReadableStream`. Pass a `ReadableStream` to avoid loading the file into * memory — for example, when forwarding an incoming HTTP upload directly to * the assistant without buffering on disk. * * Note: `ReadableStream` inputs are sent in a single attempt. Automatic * retries are not supported because the stream is consumed after the first * read and cannot be replayed. */ type Uploadable = Buffer | Blob | NodeJS.ReadableStream; /** * Options for uploading a file to an assistant. * * Provide either `path` (a local file path) or `file` + `fileName` (an * in-memory buffer, blob, or readable stream). The two forms are mutually * exclusive. */ type UploadFileOptions = { /** * Metadata to attach to the file. */ metadata?: Record; /** * Whether to process the file as multimodal (enabling image extraction). Defaults to false. */ multimodal?: boolean; } & ({ /** * The local path to the file to upload. The file is read asynchronously. */ path: string; file?: never; fileName?: never; } | { /** * The file data to upload. Accepts a `Buffer`, `Blob`, or Node.js * `ReadableStream`. When passing a stream, `fileName` is required so * the server receives a meaningful filename. */ file: Uploadable; /** * The filename to use in the multipart upload (e.g. `"report.pdf"`). * Required when using `file`. */ fileName: string; path?: never; }); /** * Options for creating or replacing a file on an assistant at a caller-supplied * file ID. * * Provide the `assistantFileId` to create or replace, along with either `path` * (a local file path) or `file` + `fileName` (an in-memory buffer, blob, or * readable stream). The two content forms are mutually exclusive. * * Unlike {@link UploadFileOptions} — which always creates a new file with a * server-generated ID — upsert is keyed on the ID you supply and does not * accept metadata. */ type UpsertFileOptions = { /** * The ID of the file to create or replace. If a file with this ID already * exists, its content is replaced; otherwise a new file is created with this * identifier. */ assistantFileId: string; /** * Whether to process the file as multimodal (enabling image extraction). Defaults to false. */ multimodal?: boolean; } & ({ /** * The local path to the file to upload. The file is read asynchronously. */ path: string; file?: never; fileName?: never; } | { /** * The file data to upload. Accepts a `Buffer`, `Blob`, or Node.js * `ReadableStream`. When passing a stream, `fileName` is required so * the server receives a meaningful filename. */ file: Uploadable; /** * The filename to use in the multipart upload (e.g. `"report.pdf"`). * Required when using `file`. */ fileName: string; path?: never; }); /** * Indicates why the chat response generation stopped. This signals the end of the response. * * - `stop`: The model finished generating the response. * * - `length`: Generation was cut off because the maximum number of tokens allowed was reached. * * - `content_filter`: Generation stopped because content was blocked by content filtering rules * (for example, content that contains hate speech or violent material). * * - `tool_calls`: Generation stopped because a tool call was triggered. * * - `function_call`: Generation stopped because a function call was triggered. * * This enum is provided for convenience but is not enforced. */ declare const FinishReasonEnum: { readonly Stop: "stop"; readonly Length: "length"; readonly ContentFilter: "content_filter"; readonly ToolCalls: "tool_calls"; readonly FunctionCall: "function_call"; }; /** * This type is provided for convenience but is not enforced. */ type FinishReasonEnum = (typeof FinishReasonEnum)[keyof typeof FinishReasonEnum]; /** * A discriminated union representing a chunked response in a streamed chat. * This can be one of several chunk types: {@link MessageStartChunk}, {@link ContentChunk}, {@link CitationChunk}, or {@link MessageEndChunk}. * These represent the objects that will be streamed as a part of the assistant't response. */ type StreamedChatResponse = MessageStartChunk | ContentChunk | CitationChunk | MessageEndChunk; /** * Describes the common properties of all the chunk types streamed in a chat response. * The different chunk types form a a discriminated union type {@link StreamedChatResponse}. */ interface BaseChunk { /** * The type of chunk. Either `message_start`, `content_chunk`, `citation`, or `message_end`. */ type: string; /** * The unique identifier for the streaming response. */ id: string; /** * The model used to generate the response. */ model: string; } /** * Describes the start of a streamed message in a chat response. */ interface MessageStartChunk extends BaseChunk { /** * The type of the chunk indicating the beginning of the stream. */ type: 'message_start'; /** * The role of the message sender. Either `user` or `assistant`. */ role: string; /** * The number of context snippets used to generate the response. */ contextSnippetCount?: number; /** * The results of any content filtering applied to the response. */ contentFilterResults?: ContentFilterResults; } /** * Describes a chunk containing a piece of message content. */ interface ContentChunk extends BaseChunk { /** * The type of the chunk indicating content. */ type: 'content_chunk'; /** * The content delta, representing a portion of the message content. */ delta: { content: string; }; /** * The results of any content filtering applied to the response. */ contentFilterResults?: ContentFilterResults; } /** * Describes a chunk containing citation information for a message. */ interface CitationChunk extends BaseChunk { /** * The type of the chunk indicating a citation. */ type: 'citation'; /** * The citation details, including the position and references. */ citation: { /** * The position of the citation within the message content. */ position: number; /** * An array of references associated with the citation. */ references: Array<{ /** * The {@link AssistantFileModel} associated with the citation. */ file?: AssistantFileModel; /** * The pages in the file that are referenced. */ pages?: number[]; /** * The highlighted excerpt within the referenced file, if available. */ highlight?: HighlightModel | null; }>; }; } /** * Describes the end of a streamed message in a chat response. */ interface MessageEndChunk extends BaseChunk { /** * The type of the chunk indicating the end of the stream. */ type: 'message_end'; /** * The reason why the message generation finished. */ finishReason: string; /** * The usage details associated with the streamed response. */ usage?: UsageModel; /** * The results of any content filtering applied to the response. */ contentFilterResults?: ContentFilterResults; } /** * Describes a streamed response for chat completion request. Each response chunk will have the * same shape. */ interface StreamedChatCompletionResponse { /** * The unique identifier for the streaming response. */ id: string; /** * An array of {@link ChoiceModel} representing different response types. */ choices: ChoiceModel[]; /** * The model used to generate the response. */ model: string; } /** * Describes a single choice in a streamed chat response. */ interface ChoiceModel { /** * The reason why the response generation finished, if applicable. */ finishReason?: string; /** * The index of the choice in the response. */ index: number; /** * The delta object containing role and content updates for the choice. */ delta: { /** * The role of the message sender. */ role?: string; /** * The content of the message. */ content?: string; }; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/assistant/chatStream.d.ts /** * Implements an async iterable that processes the readable stream of an assistant chat response. * * This class expects each chunk of data in the stream to begin with `data:` and be followed by a valid chunk of JSON. * If a chunk contains malformed JSON, it is skipped, and a debug message is logged. * * @template Item - The type of items yielded by the iterable. */ declare class ChatStream implements AsyncIterable { private stream; constructor(stream: Readable$1); [Symbol.asyncIterator](): AsyncIterator; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/runtime.d.ts interface ConfigurationParameters$2 { basePath?: string; fetchApi?: FetchAPI$2; middleware?: Middleware$2[]; queryParamsStringify?: (params: HTTPQuery$2) => string; username?: string; password?: string; apiKey?: string | ((name: string) => string); accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); headers?: HTTPHeaders$2; credentials?: RequestCredentials; } declare class Configuration$2 { private configuration; constructor(configuration?: ConfigurationParameters$2); set config(configuration: Configuration$2); get basePath(): string; get fetchApi(): FetchAPI$2 | undefined; get middleware(): Middleware$2[]; get queryParamsStringify(): (params: HTTPQuery$2) => string; get username(): string | undefined; get password(): string | undefined; get apiKey(): ((name: string) => string) | undefined; get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined; get headers(): HTTPHeaders$2 | undefined; get credentials(): RequestCredentials | undefined; } /** * This is the base class for all generated API classes. */ declare class BaseAPI$2 { protected configuration: Configuration$2; private static readonly jsonRegex; private middleware; constructor(configuration?: Configuration$2); withMiddleware(this: T, ...middlewares: Middleware$2[]): T; withPreMiddleware(this: T, ...preMiddlewares: Array): T; withPostMiddleware(this: T, ...postMiddlewares: Array): T; /** * Check if the given MIME is a JSON MIME. * JSON MIME examples: * application/json * application/json; charset=UTF8 * APPLICATION/JSON * application/vnd.company+json * @param mime - MIME (Multipurpose Internet Mail Extensions) * @return True if the given MIME is JSON, false otherwise. */ protected isJsonMime(mime: string | null | undefined): boolean; protected request(context: RequestOpts$2, initOverrides?: RequestInit | InitOverrideFunction$2): Promise; private createFetchParams; private fetchApi; /** * Create a shallow clone of `this` by constructing a new instance * and then shallow cloning data members. */ private clone; } type FetchAPI$2 = WindowOrWorkerGlobalScope['fetch']; type Json$2 = any; type HTTPMethod$2 = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; type HTTPHeaders$2 = { [key: string]: string; }; type HTTPQuery$2 = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery$2; }; type HTTPBody$2 = Json$2 | FormData | URLSearchParams; type HTTPRequestInit$2 = { headers?: HTTPHeaders$2; method: HTTPMethod$2; credentials?: RequestCredentials; body?: HTTPBody$2; }; type InitOverrideFunction$2 = (requestContext: { init: HTTPRequestInit$2; context: RequestOpts$2; }) => Promise; interface FetchParams$2 { url: string; init: RequestInit; } interface RequestOpts$2 { path: string; method: HTTPMethod$2; headers: HTTPHeaders$2; query?: HTTPQuery$2; body?: HTTPBody$2; } interface RequestContext$2 { fetch: FetchAPI$2; url: string; init: RequestInit; } interface ResponseContext$2 { fetch: FetchAPI$2; url: string; init: RequestInit; response: Response; } interface ErrorContext$2 { fetch: FetchAPI$2; url: string; init: RequestInit; error: unknown; response?: Response; } interface Middleware$2 { pre?(context: RequestContext$2): Promise; post?(context: ResponseContext$2): Promise; onError?(context: ErrorContext$2): Promise; } interface ApiResponse$3 { raw: Response; value(): Promise; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/CreateNamespaceRequestSchemaFieldsValue.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface CreateNamespaceRequestSchemaFieldsValue */ interface CreateNamespaceRequestSchemaFieldsValue { /** * Whether the field is filterable. If true, the field is indexed and can be used in filters. Only true values are allowed. * @type {boolean} * @memberof CreateNamespaceRequestSchemaFieldsValue */ filterable?: boolean; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/CreateNamespaceRequestSchema.d.ts /** * Schema for the behavior of Pinecone's internal metadata index. By default, all metadata is indexed; when `schema` is present, only fields which are present in the `fields` object with a `filterable: true` are indexed. Note that `filterable: false` is not currently supported. * @export * @interface CreateNamespaceRequestSchema */ interface CreateNamespaceRequestSchema { /** * A map of metadata field names to their configuration. The field name must be a valid metadata field name. The field name must be unique. * @type {{ [key: string]: CreateNamespaceRequestSchemaFieldsValue; }} * @memberof CreateNamespaceRequestSchema */ fields: { [key: string]: CreateNamespaceRequestSchemaFieldsValue; }; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/DeleteRequest.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The request for the `delete` operation. * @export * @interface DeleteRequest */ interface DeleteRequest { /** * Vectors to delete. * @type {Array} * @memberof DeleteRequest */ ids?: Array; /** * This indicates that all vectors in the index namespace should be deleted. * @type {boolean} * @memberof DeleteRequest */ deleteAll?: boolean; /** * The namespace to delete records from, if applicable. * @type {string} * @memberof DeleteRequest */ namespace?: string; /** * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive with specifying ids to delete in the ids param or using delete_all=True. See [Delete data](https://docs.pinecone.io/guides/manage-data/delete-data#delete-records-by-metadata). * @type {object} * @memberof DeleteRequest */ filter?: object; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/DescribeIndexStatsRequest.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The request for the `describe_index_stats` operation. * @export * @interface DescribeIndexStatsRequest */ interface DescribeIndexStatsRequest { /** * If this parameter is present, the operation only returns statistics for vectors that satisfy the filter. See [Understanding metadata](https://docs.pinecone.io/guides/index-data/indexing-overview#metadata). * * Serverless indexes do not support filtering `describe_index_stats` by metadata. * @type {object} * @memberof DescribeIndexStatsRequest */ filter?: object; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/FetchByMetadataRequest.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The request for the `fetch_by_metadata` operation. * @export * @interface FetchByMetadataRequest */ interface FetchByMetadataRequest { /** * The namespace to fetch records from. * @type {string} * @memberof FetchByMetadataRequest */ namespace?: string; /** * Metadata filter expression to select vectors. See [Understanding metadata](https://docs.pinecone.io/guides/index-data/indexing-overview#metadata). * @type {object} * @memberof FetchByMetadataRequest */ filter?: object; /** * Max number of vectors to return. * @type {number} * @memberof FetchByMetadataRequest */ limit?: number; /** * Pagination token to continue a previous listing operation. * @type {string} * @memberof FetchByMetadataRequest */ paginationToken?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/Pagination.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface Pagination */ interface Pagination$1 { /** * * @type {string} * @memberof Pagination */ next?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/Usage.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface Usage */ interface Usage { /** * The number of read units consumed by this operation. * @type {number} * @memberof Usage */ readUnits?: number; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/SparseValues.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Vector sparse data. Represented as a list of indices and a list of corresponded values, which must be with the same length. * @export * @interface SparseValues */ interface SparseValues$1 { /** * The indices of the sparse data. * @type {Array} * @memberof SparseValues */ indices: Array; /** * The corresponding values of the sparse data, which must be with the same length as the indices. * @type {Array} * @memberof SparseValues */ values: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/Vector.d.ts /** * * @export * @interface Vector */ interface Vector { /** * This is the vector's unique id. * @type {string} * @memberof Vector */ id: string; /** * This is the vector data included in the request. * @type {Array} * @memberof Vector */ values?: Array; /** * * @type {SparseValues} * @memberof Vector */ sparseValues?: SparseValues$1; /** * This is the metadata included in the request. * @type {object} * @memberof Vector */ metadata?: object; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/FetchByMetadataResponse.d.ts /** * The response for the `fetch_by_metadata` operation. * @export * @interface FetchByMetadataResponse */ interface FetchByMetadataResponse$1 { /** * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors * @type {{ [key: string]: Vector; }} * @memberof FetchByMetadataResponse */ vectors?: { [key: string]: Vector; }; /** * The namespace of the vectors. * @type {string} * @memberof FetchByMetadataResponse */ namespace?: string; /** * * @type {Usage} * @memberof FetchByMetadataResponse */ usage?: Usage; /** * * @type {Pagination} * @memberof FetchByMetadataResponse */ pagination?: Pagination$1; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/FetchResponse.d.ts /** * The response for the `fetch` operation. * @export * @interface FetchResponse */ interface FetchResponse$1 { /** * * @type {{ [key: string]: Vector; }} * @memberof FetchResponse */ vectors?: { [key: string]: Vector; }; /** * The namespace of the vectors. * @type {string} * @memberof FetchResponse */ namespace?: string; /** * * @type {Usage} * @memberof FetchResponse */ usage?: Usage; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/Hit.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * A record whose vector values are similar to the provided search query. * @export * @interface Hit */ interface Hit { /** * The record id of the search hit. * @type {string} * @memberof Hit */ _id: string; /** * The similarity score of the returned record. * @type {number} * @memberof Hit */ _score: number; /** * The selected record fields associated with the search hit. * @type {object} * @memberof Hit */ fields: object; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/ImportErrorMode.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Indicates how to respond to errors during the import process. * @export * @interface ImportErrorMode */ interface ImportErrorMode { /** * Indicates how to respond to errors during the import process. * Possible values: `abort` or `continue`. * @type {string} * @memberof ImportErrorMode */ onError?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/ImportModel.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The model for an import operation. * @export * @interface ImportModel */ interface ImportModel { /** * Unique identifier for the import operation. * @type {string} * @memberof ImportModel */ id?: string; /** * The URI from where the data is imported. * @type {string} * @memberof ImportModel */ uri?: string; /** * The status of the operation. * Possible values: `Pending`, `InProgress`, `Failed`, `Completed`, or `Cancelled`. * @type {string} * @memberof ImportModel */ status?: string; /** * The start time of the import operation. * @type {Date} * @memberof ImportModel */ createdAt?: Date; /** * The end time of the import operation. * @type {Date} * @memberof ImportModel */ finishedAt?: Date; /** * The progress made by the operation, as a percentage. * @type {number} * @memberof ImportModel */ percentComplete?: number; /** * The number of records successfully imported. * @type {number} * @memberof ImportModel */ recordsImported?: number; /** * The error message if the import process failed. * @type {string} * @memberof ImportModel */ error?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/NamespaceSummary.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * A summary of the contents of a namespace. * @export * @interface NamespaceSummary */ interface NamespaceSummary { /** * The number of vectors stored in this namespace. Note that updates to this field may lag behind updates to the underlying index and corresponding query results, etc. * @type {number} * @memberof NamespaceSummary */ vectorCount?: number; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/IndexDescription.d.ts /** * The response for the `describe_index_stats` operation. * @export * @interface IndexDescription */ interface IndexDescription { /** * A mapping for each namespace in the index from the namespace name to a summary of its contents. If a metadata filter expression is present, the summary will reflect only vectors matching that expression. * @type {{ [key: string]: NamespaceSummary; }} * @memberof IndexDescription */ namespaces?: { [key: string]: NamespaceSummary; }; /** * The dimension of the indexed vectors. Not specified if `sparse` index. * @type {number} * @memberof IndexDescription */ dimension?: number; /** * The fullness of the index, regardless of whether a metadata filter expression was passed. The granularity of this metric is 10%. * * Serverless indexes scale automatically as needed, so index fullness is relevant only for pod-based indexes. * * The index fullness result may be inaccurate during pod resizing; to get the status of a pod resizing process, use [`describe_index`](https://docs.pinecone.io/reference/api/2024-10/control-plane/describe_index). * @type {number} * @memberof IndexDescription */ indexFullness?: number; /** * The total number of vectors in the index, regardless of whether a metadata filter expression was passed * @type {number} * @memberof IndexDescription */ totalVectorCount?: number; /** * The metric used to measure similarity. * @type {string} * @memberof IndexDescription */ metric?: string; /** * The type of vectors stored in the index. * @type {string} * @memberof IndexDescription */ vectorType?: string; /** * The amount of memory used by a dedicated index * @type {number} * @memberof IndexDescription */ memoryFullness?: number; /** * The amount of storage used by a dedicated index * @type {number} * @memberof IndexDescription */ storageFullness?: number; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/ListImportsResponse.d.ts /** * The response for the `list_imports` operation. * @export * @interface ListImportsResponse */ interface ListImportsResponse { /** * * @type {Array} * @memberof ListImportsResponse */ data?: Array; /** * * @type {Pagination} * @memberof ListImportsResponse */ pagination?: Pagination$1; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/ListItem.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface ListItem */ interface ListItem { /** * * @type {string} * @memberof ListItem */ id?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/NamespaceDescriptionIndexedFields.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * A list of all indexed metatadata fields in the namespace * @export * @interface NamespaceDescriptionIndexedFields */ interface NamespaceDescriptionIndexedFields { /** * * @type {Array} * @memberof NamespaceDescriptionIndexedFields */ fields?: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/NamespaceDescription.d.ts /** * A description of a namespace, including the name and record count. * @export * @interface NamespaceDescription */ interface NamespaceDescription { /** * The name of the namespace. * @type {string} * @memberof NamespaceDescription */ name?: string; /** * The total amount of records within the namespace. * @type {number} * @memberof NamespaceDescription */ recordCount?: number; /** * * @type {CreateNamespaceRequestSchema} * @memberof NamespaceDescription */ schema?: CreateNamespaceRequestSchema; /** * * @type {NamespaceDescriptionIndexedFields} * @memberof NamespaceDescription */ indexedFields?: NamespaceDescriptionIndexedFields; /** * The total size of the namespace's data, in bytes. * @type {number} * @memberof NamespaceDescription */ sizeBytes?: number; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/ListNamespacesResponse.d.ts /** * * @export * @interface ListNamespacesResponse */ interface ListNamespacesResponse { /** * The list of namespaces belonging to this index. * @type {Array} * @memberof ListNamespacesResponse */ namespaces?: Array; /** * * @type {Pagination} * @memberof ListNamespacesResponse */ pagination?: Pagination$1; /** * The total number of namespaces in the index matching the prefix * @type {number} * @memberof ListNamespacesResponse */ totalCount?: number; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/ListResponse.d.ts /** * The response for the `list` operation. * @export * @interface ListResponse */ interface ListResponse { /** * * @type {Array} * @memberof ListResponse */ vectors?: Array; /** * * @type {Pagination} * @memberof ListResponse */ pagination?: Pagination$1; /** * The namespace of the vectors. * @type {string} * @memberof ListResponse */ namespace?: string; /** * * @type {Usage} * @memberof ListResponse */ usage?: Usage; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/QueryVector.d.ts /** * A single query vector within a `QueryRequest`. * @export * @interface QueryVector */ interface QueryVector { /** * The query vector values. This should be the same length as the dimension of the index being queried. * @type {Array} * @memberof QueryVector */ values: Array; /** * * @type {SparseValues} * @memberof QueryVector */ sparseValues?: SparseValues$1; /** * An override for the number of results to return for this query vector. * @type {number} * @memberof QueryVector */ topK?: number; /** * An override the namespace to search. * @type {string} * @memberof QueryVector */ namespace?: string; /** * An override for the metadata filter to apply. This replaces the request-level filter. * @type {object} * @memberof QueryVector */ filter?: object; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/QueryRequest.d.ts /** * The request for the `query` operation. * @export * @interface QueryRequest */ interface QueryRequest { /** * The namespace to query. * @type {string} * @memberof QueryRequest */ namespace?: string; /** * The number of results to return for each query. * @type {number} * @memberof QueryRequest */ topK: number; /** * The filter to apply. You can use vector metadata to limit your search. See [Understanding metadata](https://docs.pinecone.io/guides/index-data/indexing-overview#metadata). * @type {object} * @memberof QueryRequest */ filter?: object; /** * Indicates whether vector values are included in the response. For on-demand indexes, setting this to `true` may increase latency, especially with higher `topK` values, because vector values are retrieved from object storage. Unless you need vector values, set this to `false` for better performance. * @type {boolean} * @memberof QueryRequest */ includeValues?: boolean; /** * Indicates whether metadata is included in the response as well as the ids. * @type {boolean} * @memberof QueryRequest */ includeMetadata?: boolean; /** * DEPRECATED. Use `vector` or `id` instead. * @type {Array} * @memberof QueryRequest * @deprecated */ queries?: Array; /** * The query vector. This should be the same length as the dimension of the index being queried. Each `query` request can contain only one of the parameters `id` or `vector`. * @type {Array} * @memberof QueryRequest */ vector?: Array; /** * * @type {SparseValues} * @memberof QueryRequest */ sparseVector?: SparseValues$1; /** * The unique ID of the vector to be used as a query vector. Each request can contain either the `vector` or `id` parameter. * @type {string} * @memberof QueryRequest */ id?: string; /** * An optimization parameter for IVF dense indexes in dedicated read node indexes. It adjusts how much of the index is scanned to find vector candidates. Range: 0.5 – 4 (default). * Keep the default (4.0) for the best search results. If query latency is too high, try lowering this value incrementally (minimum 0.5) to speed up the search at the cost of slightly lower accuracy. This parameter is only supported for dedicated (DRN) dense indexes. * @type {number} * @memberof QueryRequest */ scanFactor?: number; /** * An optimization parameter that controls the maximum number of candidate dense vectors to rerank. Reranking computes exact distances to improve recall but increases query latency. Range: top_k – 100000. * Keep the default for a balance of recall and latency. Increase this value if recall is too low, or decrease it to reduce latency at the cost of accuracy. This parameter is only supported for dedicated (DRN) dense indexes. * @type {number} * @memberof QueryRequest */ maxCandidates?: number; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/ScoredVector.d.ts /** * * @export * @interface ScoredVector */ interface ScoredVector { /** * This is the vector's unique id. * @type {string} * @memberof ScoredVector */ id: string; /** * This is a measure of similarity between this vector and the query vector. The higher the score, the more they are similar. * @type {number} * @memberof ScoredVector */ score?: number; /** * This is the vector data, if it is requested. * @type {Array} * @memberof ScoredVector */ values?: Array; /** * * @type {SparseValues} * @memberof ScoredVector */ sparseValues?: SparseValues$1; /** * This is the metadata, if it is requested. * @type {object} * @memberof ScoredVector */ metadata?: object; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/SingleQueryResults.d.ts /** * * @export * @interface SingleQueryResults */ interface SingleQueryResults { /** * The matches for the vectors. * @type {Array} * @memberof SingleQueryResults */ matches?: Array; /** * The namespace for the vectors. * @type {string} * @memberof SingleQueryResults */ namespace?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/QueryResponse.d.ts /** * The response for the `query` operation. These are the matches found for a particular query vector. The matches are ordered from most similar to least similar. * @export * @interface QueryResponse */ interface QueryResponse$1 { /** * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. * @type {Array} * @memberof QueryResponse * @deprecated */ results?: Array; /** * The matches for the vectors. * @type {Array} * @memberof QueryResponse */ matches?: Array; /** * The namespace for the vectors. * @type {string} * @memberof QueryResponse */ namespace?: string; /** * * @type {Usage} * @memberof QueryResponse */ usage?: Usage; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/SearchMatchTerms.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Specifies which terms must be present in the text of each search hit based on the specified strategy. The match is performed * against the text field specified in the integrated index `field_map` configuration. * * Terms are normalized and tokenized into single tokens before matching, and order does not matter. * * Example: * * `"match_terms": {"terms": ["animal", "CHARACTER", "donald Duck"], "strategy": "all"}` will tokenize * to `["animal", "character", "donald", "duck"]`, and would match * `"Donald F. Duck is a funny animal character"` but would not match `"A duck is a funny animal"`. * * Match terms filtering is supported only for sparse indexes with [integrated embedding](https://docs.pinecone.io/guides/index-data/indexing-overview#vector-embedding) * configured to use the [pinecone-sparse-english-v0](https://docs.pinecone.io/models/pinecone-sparse-english-v0) model. * @export * @interface SearchMatchTerms */ interface SearchMatchTerms { /** * The strategy for matching terms in the text. Currently, only `all` is supported, which means all specified terms must be present. * @type {string} * @memberof SearchMatchTerms */ strategy?: string; /** * A list of terms that must be present in the text of each search hit based on the specified strategy. * @type {Array} * @memberof SearchMatchTerms */ terms?: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/SearchRecordsVector.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface SearchRecordsVector */ interface SearchRecordsVector$1 { /** * This is the vector data included in the request. * @type {Array} * @memberof SearchRecordsVector */ values?: Array; /** * The sparse embedding values. * @type {Array} * @memberof SearchRecordsVector */ sparseValues?: Array; /** * The sparse embedding indices. * @type {Array} * @memberof SearchRecordsVector */ sparseIndices?: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/SearchRecordsRequestQuery.d.ts /** * . * @export * @interface SearchRecordsRequestQuery */ interface SearchRecordsRequestQuery { /** * The number of similar records to return. * @type {number} * @memberof SearchRecordsRequestQuery */ topK: number; /** * The filter to apply. You can use vector metadata to limit your search. See [Understanding metadata](https://docs.pinecone.io/guides/index-data/indexing-overview#metadata). * @type {object} * @memberof SearchRecordsRequestQuery */ filter?: object; /** * * @type {object} * @memberof SearchRecordsRequestQuery */ inputs?: object; /** * * @type {SearchRecordsVector} * @memberof SearchRecordsRequestQuery */ vector?: SearchRecordsVector$1; /** * The unique ID of the vector to be used as a query vector. * @type {string} * @memberof SearchRecordsRequestQuery */ id?: string; /** * * @type {SearchMatchTerms} * @memberof SearchRecordsRequestQuery */ matchTerms?: SearchMatchTerms; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/SearchRecordsRequestRerank.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Parameters for reranking the initial search results. * @export * @interface SearchRecordsRequestRerank */ interface SearchRecordsRequestRerank { /** * The name of the [reranking model](https://docs.pinecone.io/guides/search/rerank-results#reranking-models) to use. * @type {string} * @memberof SearchRecordsRequestRerank */ model: string; /** * The field(s) to consider for reranking. If not provided, the default is `["text"]`. * * The number of fields supported is [model-specific](https://docs.pinecone.io/guides/search/rerank-results#reranking-models). * @type {Array} * @memberof SearchRecordsRequestRerank */ rankFields: Array; /** * The number of top results to return after reranking. Defaults to top_k. * @type {number} * @memberof SearchRecordsRequestRerank */ topN?: number; /** * Additional model-specific parameters. Refer to the [model guide](https://docs.pinecone.io/guides/search/rerank-results#reranking-models) for available model parameters. * @type {{ [key: string]: any; }} * @memberof SearchRecordsRequestRerank */ parameters?: { [key: string]: any; }; /** * The query to rerank documents against. If a specific rerank query is specified, it overwrites the query input that was provided at the top level. * @type {string} * @memberof SearchRecordsRequestRerank */ query?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/SearchRecordsRequest.d.ts /** * A search request for records in a specific namespace. * @export * @interface SearchRecordsRequest */ interface SearchRecordsRequest { /** * * @type {SearchRecordsRequestQuery} * @memberof SearchRecordsRequest */ query: SearchRecordsRequestQuery; /** * The fields to return in the search results. If not specified, the response will include all fields. * @type {Array} * @memberof SearchRecordsRequest */ fields?: Array; /** * * @type {SearchRecordsRequestRerank} * @memberof SearchRecordsRequest */ rerank?: SearchRecordsRequestRerank; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/SearchRecordsResponseResult.d.ts /** * * @export * @interface SearchRecordsResponseResult */ interface SearchRecordsResponseResult { /** * The hits for the search document request. * @type {Array} * @memberof SearchRecordsResponseResult */ hits: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/SearchUsage.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface SearchUsage */ interface SearchUsage { /** * The number of read units consumed by this operation. * @type {number} * @memberof SearchUsage */ readUnits: number; /** * The number of embedding tokens consumed by this operation. * @type {number} * @memberof SearchUsage */ embedTotalTokens?: number; /** * The number of rerank units consumed by this operation. * @type {number} * @memberof SearchUsage */ rerankUnits?: number; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/SearchRecordsResponse.d.ts /** * The records search response. * @export * @interface SearchRecordsResponse */ interface SearchRecordsResponse { /** * * @type {SearchRecordsResponseResult} * @memberof SearchRecordsResponse */ result: SearchRecordsResponseResult; /** * * @type {SearchUsage} * @memberof SearchRecordsResponse */ usage: SearchUsage; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/StartImportResponse.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The response for the `start_import` operation. * @export * @interface StartImportResponse */ interface StartImportResponse { /** * Unique identifier for the import operation. * @type {string} * @memberof StartImportResponse */ id?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/UpdateRequest.d.ts /** * The request for the `update` operation. * @export * @interface UpdateRequest */ interface UpdateRequest { /** * Vector's unique id. * @type {string} * @memberof UpdateRequest */ id?: string; /** * Vector data. * @type {Array} * @memberof UpdateRequest */ values?: Array; /** * * @type {SparseValues} * @memberof UpdateRequest */ sparseValues?: SparseValues$1; /** * Metadata to set for the record. * @type {object} * @memberof UpdateRequest */ setMetadata?: object; /** * The namespace containing the record to update. * @type {string} * @memberof UpdateRequest */ namespace?: string; /** * A metadata filter expression. When updating metadata across records in a namespace, the update is applied to all records that match the filter. See [Understanding metadata](https://docs.pinecone.io/guides/index-data/indexing-overview#metadata). * @type {object} * @memberof UpdateRequest */ filter?: object; /** * If `true`, return the number of records that match the `filter`, but do not execute the update. Default is `false`. * @type {boolean} * @memberof UpdateRequest */ dryRun?: boolean; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/UpdateResponse.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The response for the `update` operation. * @export * @interface UpdateResponse */ interface UpdateResponse { /** * The number of records that matched the filter (if a filter was provided). * @type {number} * @memberof UpdateResponse */ matchedRecords?: number; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/UpsertRecord.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The request for the `upsert` operation. * @export * @interface UpsertRecord */ interface UpsertRecord { /** * The unique ID of the record to upsert. Note that `id` can be used as an alias for `_id`. * @type {string} * @memberof UpsertRecord */ id: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/UpsertRequest.d.ts /** * The request for the `upsert` operation. * @export * @interface UpsertRequest */ interface UpsertRequest { /** * An array containing the vectors to upsert. Recommended batch limit is up to 1000 vectors. * @type {Array} * @memberof UpsertRequest */ vectors: Array; /** * The namespace where you upsert records. * @type {string} * @memberof UpsertRequest */ namespace?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/models/UpsertResponse.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The response for the `upsert` operation. * @export * @interface UpsertResponse */ interface UpsertResponse { /** * The number of vectors upserted. * @type {number} * @memberof UpsertResponse */ upsertedCount?: number; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/db_data/apis/VectorOperationsApi.d.ts interface DeleteVectorsRequest { xPineconeApiVersion: string; deleteRequest: DeleteRequest; } interface DescribeIndexStatsOperationRequest { xPineconeApiVersion: string; describeIndexStatsRequest: DescribeIndexStatsRequest; } interface FetchVectorsRequest { xPineconeApiVersion: string; ids: Array; namespace?: string; } interface FetchVectorsByMetadataRequest { xPineconeApiVersion: string; fetchByMetadataRequest: FetchByMetadataRequest; } interface ListVectorsRequest { xPineconeApiVersion: string; prefix?: string; limit?: number; paginationToken?: string; namespace?: string; } interface QueryVectorsRequest { xPineconeApiVersion: string; queryRequest: QueryRequest; } interface SearchRecordsNamespaceRequest { xPineconeApiVersion: string; namespace: string; searchRecordsRequest: SearchRecordsRequest; } interface UpdateVectorRequest { xPineconeApiVersion: string; updateRequest: UpdateRequest; } interface UpsertRecordsNamespaceRequest { xPineconeApiVersion: string; namespace: string; upsertRecord: Array; } interface UpsertVectorsRequest { xPineconeApiVersion: string; upsertRequest: UpsertRequest; } /** * */ declare class VectorOperationsApi extends BaseAPI$2 { /** * Delete records by id or by metadata from a single namespace. For guidance and examples, see [Delete data](https://docs.pinecone.io/guides/manage-data/delete-data). * Delete records */ deleteVectorsRaw(requestParameters: DeleteVectorsRequest, initOverrides?: RequestInit | InitOverrideFunction$2): Promise>; /** * Delete records by id or by metadata from a single namespace. For guidance and examples, see [Delete data](https://docs.pinecone.io/guides/manage-data/delete-data). * Delete records */ deleteVectors(requestParameters: DeleteVectorsRequest, initOverrides?: RequestInit | InitOverrideFunction$2): Promise; /** * Return statistics about the contents of an index, including the vector count per namespace, the number of dimensions, and the index fullness. Serverless indexes scale automatically as needed, so index fullness is relevant only for pod-based indexes. * Get index stats */ describeIndexStatsRaw(requestParameters: DescribeIndexStatsOperationRequest, initOverrides?: RequestInit | InitOverrideFunction$2): Promise>; /** * Return statistics about the contents of an index, including the vector count per namespace, the number of dimensions, and the index fullness. Serverless indexes scale automatically as needed, so index fullness is relevant only for pod-based indexes. * Get index stats */ describeIndexStats(requestParameters: DescribeIndexStatsOperationRequest, initOverrides?: RequestInit | InitOverrideFunction$2): Promise; /** * Look up and return records by ID from a single namespace. The returned records include the vector data and/or metadata. For on-demand indexes, since vector values are retrieved from object storage, fetch operations may have increased latency. If you only need metadata or IDs, consider using the query operation with `includeValues` set to `false` instead. For guidance and examples, see [Fetch data](https://docs.pinecone.io/guides/manage-data/fetch-data). * Fetch records */ fetchVectorsRaw(requestParameters: FetchVectorsRequest, initOverrides?: RequestInit | InitOverrideFunction$2): Promise>; /** * Look up and return records by ID from a single namespace. The returned records include the vector data and/or metadata. For on-demand indexes, since vector values are retrieved from object storage, fetch operations may have increased latency. If you only need metadata or IDs, consider using the query operation with `includeValues` set to `false` instead. For guidance and examples, see [Fetch data](https://docs.pinecone.io/guides/manage-data/fetch-data). * Fetch records */ fetchVectors(requestParameters: FetchVectorsRequest, initOverrides?: RequestInit | InitOverrideFunction$2): Promise; /** * Look up and return records by metadata from a single namespace. The returned records include the vector data and metadata. For guidance and examples, see [Fetch data](https://docs.pinecone.io/guides/manage-data/fetch-data). * Fetch records by metadata */ fetchVectorsByMetadataRaw(requestParameters: FetchVectorsByMetadataRequest, initOverrides?: RequestInit | InitOverrideFunction$2): Promise>; /** * Look up and return records by metadata from a single namespace. The returned records include the vector data and metadata. For guidance and examples, see [Fetch data](https://docs.pinecone.io/guides/manage-data/fetch-data). * Fetch records by metadata */ fetchVectorsByMetadata(requestParameters: FetchVectorsByMetadataRequest, initOverrides?: RequestInit | InitOverrideFunction$2): Promise; /** * List the IDs of records in a single namespace of a serverless index. An optional prefix can be passed to limit the results to IDs with a common prefix. Returns up to 100 IDs at a time by default in sorted order (bitwise \"C\" collation). If the `limit` parameter is set, `list` returns up to that number of IDs instead. Whenever there are additional IDs to return, the response also includes a `pagination_token` that you can use to get the next batch of IDs. When the response does not include a `pagination_token`, there are no more IDs to return. For guidance and examples, see [List record IDs](https://docs.pinecone.io/guides/manage-data/list-record-ids). **Note:** `list` is supported only for serverless indexes. * List record IDs */ listVectorsRaw(requestParameters: ListVectorsRequest, initOverrides?: RequestInit | InitOverrideFunction$2): Promise>; /** * List the IDs of records in a single namespace of a serverless index. An optional prefix can be passed to limit the results to IDs with a common prefix. Returns up to 100 IDs at a time by default in sorted order (bitwise \"C\" collation). If the `limit` parameter is set, `list` returns up to that number of IDs instead. Whenever there are additional IDs to return, the response also includes a `pagination_token` that you can use to get the next batch of IDs. When the response does not include a `pagination_token`, there are no more IDs to return. For guidance and examples, see [List record IDs](https://docs.pinecone.io/guides/manage-data/list-record-ids). **Note:** `list` is supported only for serverless indexes. * List record IDs */ listVectors(requestParameters: ListVectorsRequest, initOverrides?: RequestInit | InitOverrideFunction$2): Promise; /** * Search a namespace using a query vector. It retrieves the ids of the most similar items in a namespace, along with their similarity scores. For guidance, examples, and limits, see [Search](https://docs.pinecone.io/guides/search/search-overview). * Search with a vector */ queryVectorsRaw(requestParameters: QueryVectorsRequest, initOverrides?: RequestInit | InitOverrideFunction$2): Promise>; /** * Search a namespace using a query vector. It retrieves the ids of the most similar items in a namespace, along with their similarity scores. For guidance, examples, and limits, see [Search](https://docs.pinecone.io/guides/search/search-overview). * Search with a vector */ queryVectors(requestParameters: QueryVectorsRequest, initOverrides?: RequestInit | InitOverrideFunction$2): Promise; /** * Search a namespace with a query text, query vector, or record ID and return the most similar records, along with their similarity scores. Optionally, rerank the initial results based on their relevance to the query. Searching with text is supported only for indexes with [integrated embedding](https://docs.pinecone.io/guides/index-data/indexing-overview#vector-embedding). Searching with a query vector or record ID is supported for all indexes. For guidance and examples, see [Search](https://docs.pinecone.io/guides/search/search-overview). * Search with text */ searchRecordsNamespaceRaw(requestParameters: SearchRecordsNamespaceRequest, initOverrides?: RequestInit | InitOverrideFunction$2): Promise>; /** * Search a namespace with a query text, query vector, or record ID and return the most similar records, along with their similarity scores. Optionally, rerank the initial results based on their relevance to the query. Searching with text is supported only for indexes with [integrated embedding](https://docs.pinecone.io/guides/index-data/indexing-overview#vector-embedding). Searching with a query vector or record ID is supported for all indexes. For guidance and examples, see [Search](https://docs.pinecone.io/guides/search/search-overview). * Search with text */ searchRecordsNamespace(requestParameters: SearchRecordsNamespaceRequest, initOverrides?: RequestInit | InitOverrideFunction$2): Promise; /** * Update records by ID or by metadata in a namespace. Updating by ID changes the vector and/or metadata of a single record. Updating by metadata changes metadata across multiple records using a metadata filter. If a vector value is included, it will overwrite the previous value. If `set_metadata` is included, only the specified metadata fields are modified, and if a specified metadata field does not exist, it is added. For guidance and examples, see [Update data](https://docs.pinecone.io/guides/manage-data/update-data). * Update a record */ updateVectorRaw(requestParameters: UpdateVectorRequest, initOverrides?: RequestInit | InitOverrideFunction$2): Promise>; /** * Update records by ID or by metadata in a namespace. Updating by ID changes the vector and/or metadata of a single record. Updating by metadata changes metadata across multiple records using a metadata filter. If a vector value is included, it will overwrite the previous value. If `set_metadata` is included, only the specified metadata fields are modified, and if a specified metadata field does not exist, it is added. For guidance and examples, see [Update data](https://docs.pinecone.io/guides/manage-data/update-data). * Update a record */ updateVector(requestParameters: UpdateVectorRequest, initOverrides?: RequestInit | InitOverrideFunction$2): Promise; /** * Upsert text into a namespace. Pinecone converts the text to vectors automatically using the hosted embedding model associated with the index. Upserting text is supported only for [indexes with integrated embedding](https://docs.pinecone.io/guides/index-data/create-an-index#embedding-models). For guidance, examples, and limits, see [Upsert data](https://docs.pinecone.io/guides/index-data/upsert-data). * Upsert text */ upsertRecordsNamespaceRaw(requestParameters: UpsertRecordsNamespaceRequest, initOverrides?: RequestInit | InitOverrideFunction$2): Promise>; /** * Upsert text into a namespace. Pinecone converts the text to vectors automatically using the hosted embedding model associated with the index. Upserting text is supported only for [indexes with integrated embedding](https://docs.pinecone.io/guides/index-data/create-an-index#embedding-models). For guidance, examples, and limits, see [Upsert data](https://docs.pinecone.io/guides/index-data/upsert-data). * Upsert text */ upsertRecordsNamespace(requestParameters: UpsertRecordsNamespaceRequest, initOverrides?: RequestInit | InitOverrideFunction$2): Promise; /** * Upsert records into a namespace. If a new value is upserted for an existing record ID, it will overwrite the previous value. For guidance, examples, and limits, see [Upsert data](https://docs.pinecone.io/guides/index-data/upsert-data). * Upsert records */ upsertVectorsRaw(requestParameters: UpsertVectorsRequest, initOverrides?: RequestInit | InitOverrideFunction$2): Promise>; /** * Upsert records into a namespace. If a new value is upserted for an existing record ID, it will overwrite the previous value. For guidance, examples, and limits, see [Upsert data](https://docs.pinecone.io/guides/index-data/upsert-data). * Upsert records */ upsertVectors(requestParameters: UpsertVectorsRequest, initOverrides?: RequestInit | InitOverrideFunction$2): Promise; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/data/vectors/types.d.ts /** * @see [Understanding projects](https://docs.pinecone.io/docs/projects) */ type PineconeConfiguration = { /** * The API key for your Pinecone project. You can find this in the [Pinecone console](https://app.pinecone.io). */ apiKey: string; /** * Optional configuration field for specifying the controller host. If not specified, the client will use the default controller host: https://api.pinecone.io. */ controllerHostUrl?: string; /** * Optional configuration field for specifying the fetch implementation. If not specified, the client will look for fetch in the global scope. */ fetchApi?: FetchAPI$2; /** * Optional headers to be included in all requests. */ additionalHeaders?: HTTPHeaders$2; /** * Optional sourceTag that is applied to the User-Agent header with all requests. */ sourceTag?: string; /** * Optional caller information that is applied to the User-Agent header with all requests. * Used to identify agentic callers using the SDK (e.g., AI coding assistants). * * @example * ```typescript * const pc = new Pinecone({ * apiKey: 'your-api-key', * caller: { * provider: 'google', * model: 'gemini' * } * }); * // User-Agent: ...; caller=google:gemini * ``` */ caller?: { /** * Optional provider identifier (e.g., 'google', 'anthropic', 'openai'). */ provider?: string; /** * Required model name (e.g., 'gemini', 'claude-code', 'gpt-4'). */ model: string; }; /** * Optional configuration field for specifying the maximum number of retries after the initial request. Defaults to 3. * * - 0: Makes only the initial request (no retries) * - 1: Makes up to 2 attempts (1 initial + 1 retry) * - 3 (default): Makes up to 4 attempts (1 initial + 3 retries) */ maxRetries?: number; /** * Optional configuration field for specifying a region to use with the assistant APIs. If not specified, the default * region of "us" is used. */ assistantRegion?: string; }; /** The id of the record */ type RecordId = string; /** An array of values, usually an embedding vector. */ type RecordValues = Array; /** * A sparse representation of vector values * * @see [Understanding hybrid search](https://docs.pinecone.io/docs/hybrid-search) */ type RecordSparseValues = { /** A list of indices where non-zero values are present in a vector. */indices: Array; /** The values that correspond to the positions in the `indices` array. */ values: Array; }; /** * A flexible type describing valid values for metadata stored with * each record. * * @see [Filtering with metadata](https://docs.pinecone.io/docs/metadata-filtering#supported-metadata-types) */ type RecordMetadataValue = string | boolean | number | Array; /** * @see [Filtering with metadata](https://docs.pinecone.io/docs/metadata-filtering#supported-metadata-types) */ type RecordMetadata = Record; /** * @see [Pinecone records](https://docs.pinecone.io/docs/overview#pinecone-indexes-store-records-with-vector-data) */ type PineconeRecord = { /** * The id of the record. This string can be any value and is * useful when fetching or deleting by id. */ id: RecordId; /** * An array of numbers representing an embedding vector. */ values?: RecordValues; /** * Records can optionally include sparse and dense values when an index * is used for hybrid search. See [Sparse-dense vectors](https://docs.pinecone.io/docs/sparse-dense-vectors) */ sparseValues?: RecordSparseValues; /** * Any metadata associated with this record. */ metadata?: T; }; /** * Metadata detailing usage units for a specific operation. */ type OperationUsage = { /** * The number of read units consumed by this operation. */ readUnits?: number; }; /** * Integrated records require an `id` or `_id` field in addition to any relevant model fields, or metadata. */ type IntegratedRecord = { id?: string; _id?: string; } & T; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/data/vectors/vectorOperationsProvider.d.ts declare class VectorOperationsProvider { private config; private indexName?; private indexHostUrl?; private vectorOperations?; private additionalHeaders?; constructor(config: PineconeConfiguration, indexName?: string, indexHostUrl?: string, additionalHeaders?: HTTPHeaders$2); provide(): Promise; provideHostUrl(): Promise; buildDataOperationsConfig(): VectorOperationsApi; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/data/vectors/describeIndexStats.d.ts /** * A count of the number of records found inside a namespace */ type IndexStatsNamespaceSummary = { /** The number of records in the namespace. */recordCount: number; }; /** * An index description returned from { @link Index.describeIndexStats } */ type IndexStatsDescription = { /** * A map whose keys are the names of namespaces and whose values * are a namespace summary including the total record count in that * namespace. * * @see [Using namespaces](https://docs.pinecone.io/docs/namespaces) */ namespaces?: { [key: string]: IndexStatsNamespaceSummary; }; /** The dimension of the index. */ dimension?: number; /** * A number indicating the percentage of available storage consumed * by your index. This is relevant only for pod-based indexes; serverless * indexes scale automatically, so index fullness does not apply. * * @see [Manage indexes](https://docs.pinecone.io/docs/manage-indexes) * @see [Choosing index type and size](https://docs.pinecone.io/docs/choosing-index-type-and-size) */ indexFullness?: number; /** * The total number of records that have been upserted to your index. */ totalRecordCount?: number; }; /** * Optionally specify a filter expression to limit results from * {@link Index.describeIndexStats}. */ type DescribeIndexStatsOptions = { /** * If this parameter is present, the operation only returns statistics for vectors that satisfy the filter. * * @see [Understanding metadata](https://docs.pinecone.io/guides/index-data/indexing-overview#metadata) */ filter: object; }; declare const describeIndexStats: (apiProvider: VectorOperationsProvider) => (options?: DescribeIndexStatsOptions) => Promise; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/data/vectors/fetch.d.ts /** * Options for fetching records from the index. * @see {@link Index.fetch} */ type FetchOptions = { /** The list of record ids you would like to fetch */ids: Array; /** * The namespace to fetch from. If not specified, uses the namespace configured on the Index. */ namespace?: string; }; /** * The response from {@link Index.fetch } * @typeParam T - The metadata shape for each record: {@link RecordMetadata}. */ type FetchResponse = { /** A map of fetched records, keyed by record id. */records: { [key: string]: PineconeRecord; }; /** The namespace where records were fetched. */ namespace: string; /** The usage information for the fetch operation. */ usage?: OperationUsage; }; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/data/vectors/fetchByMetadata.d.ts /** * The options that may be passed to {@link Index.fetchByMetadata} * * @see [Fetch records by metadata](https://docs.pinecone.io/guides/manage-data/fetch-data#fetch-records-by-metadata) */ type FetchByMetadataOptions = { /** * The metadata filter to apply when fetching records. Only records matching this filter will be returned. * * @see [Metadata filtering](https://docs.pinecone.io/docs/metadata-filtering) */ filter: object; /** The maximum number of records to return. If unspecified, the server will use a default value. */ limit?: number; /** A token needed to fetch the next page of results. This token is returned in the response if additional results are available. */ paginationToken?: string; /** * The namespace to fetch from. If not specified, uses the namespace configured on the Index. */ namespace?: string; }; /** * The response from {@link Index.fetchByMetadata } * @typeParam T - The metadata shape for each record: {@link RecordMetadata}. */ type FetchByMetadataResponse = { records: { [key: string]: PineconeRecord; }; namespace: string; usage?: OperationUsage; pagination?: Pagination$1; }; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/data/vectors/query.d.ts /** * @see [Query data](https://docs.pinecone.io/docs/query-data) */ type QueryShared = { /** The number of query results you would like returned. */topK: number; /** * This boolean value specifies whether embedding values are returned with query results. * * By default, values are not returned to reduce the size of the request payload. */ includeValues?: boolean; /** * This boolean value specifies whether metadata values are returned with query results. * * By default, metadata values are not returned to reduce the size of the request payload. */ includeMetadata?: boolean; /** * This parameter allows you to modify your query with a metadata filter. * * @see [Metadata filtering](https://docs.pinecone.io/docs/metadata-filtering) */ filter?: object; /** * The namespace to query. If not specified, uses the namespace configured on the Index. */ namespace?: string; /** * An optimization parameter for IVF dense indexes in dedicated read node (DRN) indexes. It adjusts * how much of the index is scanned to find vector candidates. Range: `0.5` – `4` (default). * * Keep the default (`4.0`) for the best search results. If query latency is too high, try lowering * this value incrementally (minimum `0.5`) to speed up the search at the cost of slightly lower * accuracy. This parameter is only supported for dedicated (DRN) dense indexes. */ scanFactor?: number; /** * An optimization parameter that controls the maximum number of candidate dense vectors to rerank. * Reranking computes exact distances to improve recall but increases query latency. * Range: `topK` – `100000`. * * Keep the default for a balance of recall and latency. Increase this value if recall is too low, * or decrease it to reduce latency at the cost of accuracy. This parameter is only supported for * dedicated (DRN) dense indexes. */ maxCandidates?: number; }; /** * Include an `id` in your query configuration along with properties defined in * { @link QueryShared } if you want to use vector values from a record in the * index as your query. * * @see [Querying data](https://docs.pinecone.io/docs/query-data) */ type QueryByRecordId = QueryShared & { /** * Specifies the {@link RecordId} of a record whose `values` you'd * like to query with. */ id: string; }; /** * Include vector values in your query configuration along with properties defined * in { @link QueryShared }. * * @see [Querying data](https://docs.pinecone.io/docs/query-data) */ type QueryByVectorValues = QueryShared & { /** * Vector values output from an embedding model. */ vector: RecordValues; /** * The sparse values of the query vector, if applicable. */ sparseVector?: RecordSparseValues; }; /** * The options that may be passed to {@link Index.query } */ type QueryOptions = QueryByRecordId | QueryByVectorValues; /** * A {@link PineconeRecord} with a similarity score. */ interface ScoredPineconeRecord extends PineconeRecord { /** * The similarity score of the record. The interpretation of this score will be different * depending on the distance metric configured on the index. * * For indexes using the `euclidean` distance metric, a lower similarity score is more * similar, while for indexes using the `dotproduct` metric, higher scores are more similar. */ score?: number; } /** * Response from { @link Index.query } * * @see [Query data](https://docs.pinecone.io/docs/query-data) */ type QueryResponse = { /** The query results sorted by similarity */matches: Array>; /** The namespace where the query was executed. */ namespace: string; /** The usage information for the query operation. */ usage?: OperationUsage; }; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/data/vectors/upsert.d.ts /** * Options for upserting records to the index. * * @see {@link Index.upsert} */ type UpsertOptions = { /** The records to upsert */records: Array>; /** * The namespace to upsert into. If not specified, uses the namespace configured on the Index. */ namespace?: string; }; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/data/vectors/update.d.ts /** * This type is very similar to { @link PineconeRecord }, but differs because the * values field is optional here. This is to allow for situations where perhaps * the caller only wants to update metadata for a given record while leaving * stored vector values as they are. */ type UpdateOptions = { /** The id of the record you would like to update */id?: RecordId; /** The vector values you would like to store with this record */ values?: RecordValues; /** The sparse values you would like to store with this record. * * @see [Understanding hybrid search](https://docs.pinecone.io/docs/hybrid-search) */ sparseValues?: RecordSparseValues; /** * The metadata you would like to store with this record. */ metadata?: Partial; /** * A metadata filter expression. When provided, updates all vectors in the namespace that match * the filter criteria. Must not be provided when using id. Either `id` or `filter` must be provided. * * @see [Metadata filtering](https://docs.pinecone.io/guides/index-data/indexing-overview#metadata) */ filter?: object; /** * The namespace to update in. If not specified, uses the namespace configured on the Index. */ namespace?: string; }; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/data/vectors/deleteOne.d.ts /** * Options for deleting a single record from the index. * * @see {@link Index.deleteOne } */ type DeleteOneOptions = { /** The id of the record to delete from the index. */id: string; /** * The namespace to delete from. If not specified, uses the namespace configured on the Index. */ namespace?: string; }; declare const deleteOne: (apiProvider: VectorOperationsProvider, targetNamespace: string) => (options: DeleteOneOptions) => Promise; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/data/vectors/deleteMany.d.ts /** * Options for deleting multiple records from the index. * Either `ids` or `filter` must be provided, but not both. * * @see {@link Index.deleteMany} */ type DeleteManyOptions = { /** * A list of record ids to delete from the index. * Mutually exclusive with `filter`. */ ids?: Array; /** * A metadata filter expression to determine which records to delete. * Mutually exclusive with `ids`. * * @see [Deleting vectors by metadata filter](https://docs.pinecone.io/docs/metadata-filtering#deleting-vectors-by-metadata-filter) */ filter?: object; /** * The namespace to delete from. If not specified, uses the namespace configured on the Index. */ namespace?: string; }; declare const deleteMany: (apiProvider: VectorOperationsProvider, targetNamespace: string) => (options: DeleteManyOptions) => Promise; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/data/vectors/deleteAll.d.ts /** * Options for deleting all records from a namespace. * * @see {@link Index.deleteAll } */ type DeleteAllOptions = { /** * The namespace to delete all records from. If not specified, uses the namespace configured on the Index. */ namespace?: string; }; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/data/vectors/list.d.ts /** * See [List record IDs](https://docs.pinecone.io/guides/data/list-record-ids) */ type ListOptions = { /** The id prefix to match. If unspecified, an empty string prefix will be used with the effect of listing all ids in a namespace. */prefix?: string; /** The maximum number of ids to return. If unspecified, the server returns up to 100 ids at a time, in sorted order (bitwise "C" collation). */ limit?: number; /** A token needed to fetch the next page of results. This token is returned in the response if additional results are available. */ paginationToken?: string; /** The namespace to list from. If not specified, uses the namespace configured on the Index. */ namespace?: string; }; declare const listPaginated: (apiProvider: VectorOperationsProvider, targetNamespace: string) => (options?: ListOptions) => Promise; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/data/vectors/upsertRecords.d.ts /** * Options for upserting integrated records into a namespace. * * @see {@link Index.upsertRecords} */ type UpsertRecordsOptions = { /** The integrated records to upsert */records: Array>; /** * The namespace to upsert into. If not specified, uses the namespace configured on the Index. */ namespace?: string; }; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/data/vectors/searchRecords.d.ts /** * Options for searching records within a specific namespace. * @see [Upsert and search with integrated inference](https://docs.pinecone.io/guides/inference/integrated-inference). */ type SearchRecordsOptions = { /** * The query to use for searching. */ query: SearchRecordsQuery; /** * The fields to return in the search results. If not specified, the response will include all fields. */ fields?: Array; /** * Parameters to rerank the initial search results. */ rerank?: SearchRecordsRerank; /** * The namespace to search in. If not specified, uses the namespace configured on the Index. */ namespace?: string; }; /** * The query object used with a {@link SearchRecordsOptions } request. */ type SearchRecordsQuery = { /** * The number of similar records to return. */ topK: number; /** * The filter to apply. You can use vector metadata to limit your search. * @see [Understanding metadata](https://docs.pinecone.io/guides/data/understanding-metadata). */ filter?: object; /** * The query text to search with. Searching with text is supported only for indexes with [integrated embedding](https://docs.pinecone.io/guides/indexes/create-an-index#integrated-embedding). */ inputs?: object; /** * The {@link SearchRecordsVector} to search with, if provided. */ vector?: SearchRecordsVector; /** * The unique ID of the vector to be used as a query vector. */ id?: string; /** * Specifies which terms must be present in the text of each search hit based on the specified strategy. * The match is performed against the text field specified in the integrated index fieldMap configuration. * Terms are normalized and tokenized into single tokens before matching, and order does not matter. * Expected format: {strategy: "all", terms: ["term1", "term2", "term3"]} * Currently, only "all" strategy is supported, which means all specified terms must be present. * * **Limitations:** matchTerms is only supported for sparse indexes with integrated embedding configured to * use the pinecone-sparse-english-v0 model. */ matchTerms?: SearchMatchTerms; }; /** * A vector object used with a {@link SearchRecordsQuery } request. */ type SearchRecordsVector = { /** * The dense embedding values to search with. */ values?: Array; /** * The sparse embedding values to search with. */ sparseValues?: Array; /** * The sparse embedding indices to search with. */ sparseIndices?: Array; }; /** * Parameters used for reranking the initial search results. */ type SearchRecordsRerank = { /** * The name of the [reranking model](https://docs.pinecone.io/guides/inference/understanding-inference#reranking-models) to use. */ model: string; /** * The field(s) to consider for reranking. If not provided, the default is `["text"]`. * The number of fields supported is [model-specific](https://docs.pinecone.io/guides/inference/understanding-inference#reranking-models) */ rankFields: Array; /** * The number of top results to return after reranking. Defaults to the `topK` in {@link SearchRecordsQuery}. */ topN?: number; /** * Additional model-specific parameters. Refer to the [model guide](https://docs.pinecone.io/guides/inference/understanding-inference#reranking-models) * for available model parameters. */ parameters?: { [key: string]: any; }; /** * The query to rerank documents against. If a specific rerank query is specified, * it overwrites the query input that was provided at the top level. */ query?: string; }; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/data/bulk/startImport.d.ts /** * Options for starting a bulk import operation. */ interface StartImportOptions { /** * The URI of the bucket (or container) and import directory containing the namespaces and Parquet files you want to import. For example, `s3://BUCKET_NAME/IMPORT_DIR` for Amazon S3, `gs://BUCKET_NAME/IMPORT_DIR` for Google Cloud Storage, or `https://STORAGE_ACCOUNT.blob.core.windows.net/CONTAINER_NAME/IMPORT_DIR` for Azure Blob Storage. For more information, see [Import records](https://docs.pinecone.io/guides/index-data/import-data#prepare-your-data). */ uri: string; /** * Indicates how to respond to errors during the import process. * Possible values: `abort` or `continue`. */ errorMode?: 'continue' | 'abort'; /** * The id of the [storage integration](https://docs.pinecone.io/guides/operations/integrations/manage-storage-integrations) that should be used to access the data. */ integration?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/data/namespaces/createNamespace.d.ts /** Options for creating a namespace. */ interface CreateNamespaceOptions { /** The name of the namespace to create. */ name: string; /** Schema for the behavior of Pinecone's internal metadata index. By default, all metadata is indexed; when `schema` is present, only fields which are present in the `fields` object with a `filterable: true` are indexed. Note that `filterable: false` is not currently supported. */ schema?: MetadataSchema; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/data/namespaces/listNamespaces.d.ts /** Options for listing namespaces in an index. */ interface ListNamespacesOptions { /** (Optional) Max number of namespaces to return per page. */ limit?: number; /** (Optional) Pagination token to continue a previous listing operation. */ paginationToken?: string; /** (Optional) Prefix of the namespaces to list. Acts as a filter to return only namespaces that start with this prefix. */ prefix?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/types.d.ts /** * Options for targeting an index for data operations. * * You must provide either `name` or `host` (or both). If only `host` is provided, the SDK will * perform data operations directly against that host without calling `describeIndex()` to resolve it. */ interface IndexOptions { /** * The name of the index to target. Required unless `host` is provided. */ name?: string; /** * The namespace to target within the index. If not specified, operations will be performed * on the default namespace `''`. */ namespace?: string; /** * The host URL to use for data operations against this index. If not provided, * the host URL will be automatically resolved by calling `describeIndex()` using the `name`. * * You can find your index host in the Pinecone console or by using `describeIndex()`. */ host?: string; /** * Optional additional HTTP headers to include with each request to the index. */ additionalHeaders?: HTTPHeaders$2; } /** * Options for targeting an assistant for operations. */ interface AssistantOptions { /** * The name of the assistant to target. */ name: string; /** * An optional host URL to use for operations against this assistant. If not provided, * the host URL will be automatically resolved by calling `describeAssistant()`. */ host?: string; /** * Optional additional HTTP headers to include with each request to the assistant. */ additionalHeaders?: HTTPHeaders$2; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/data/index.d.ts /** * The `Index` class is used to perform data operations (upsert, query, etc) * against Pinecone indexes. Typically, it will be instantiated via a `Pinecone` * client instance that has already built the required configuration from a * combination of sources. * * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone() * * const indexModel = await pc.describeIndex('index-name'); * const index = pc.index({ host: indexModel.host }) * ``` * * ### Targeting an index, with user-defined Metadata types * * If you are storing metadata alongside your vector values inside your Pinecone records, you can pass a type parameter to `index()` in order to get proper TypeScript typechecking when upserting and querying data. * * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * type MovieMetadata = { * title: string, * runtime: numbers, * genre: 'comedy' | 'horror' | 'drama' | 'action' * } * * // Specify a custom metadata type while targeting the index * const index = pc.index({ name: 'test-index' }); * * // Now you get type errors if upserting malformed metadata * await index.upsert({ * records: [{ * id: '1234', * values: [ * .... // embedding values * ], * metadata: { * title: 'Gone with the Wind', * runtime: 238, * genre: 'drama', * * // @ts-expect-error because category property not in MovieMetadata * category: 'classic' * } * }] * }) * * const results = await index.query({ * vector: [ * ... // query embedding * ], * filter: { genre: { '$eq': 'drama' }} * }) * const movie = results.matches[0]; * * if (movie.metadata) { * // Since we passed the MovieMetadata type parameter above, * // we can interact with metadata fields without having to * // do any typecasting. * const { title, runtime, genre } = movie.metadata; * console.log(`The best match in drama was ${title}`) * } * ``` * * @typeParam T - The type of metadata associated with each record. */ declare class Index { /** @hidden */ _deleteMany: ReturnType; /** @hidden */ _deleteOne: ReturnType; /** @hidden */ _describeIndexStats: ReturnType; /** @hidden */ _listPaginated: ReturnType; /** @hidden */ private _deleteAll; /** @hidden */ private _fetchCommand; /** @hidden */ private _fetchByMetadataCommand; /** @hidden */ private _queryCommand; /** @hidden */ private _updateCommand; /** @hidden */ private _upsertCommand; /** @hidden */ private _upsertRecordsCommand; /** @hidden */ private _searchRecordsCommand; /** @hidden */ private _startImportCommand; /** @hidden */ private _listImportsCommand; /** @hidden */ private _describeImportCommand; /** @hidden */ private _cancelImportCommand; /** @hidden */ private _createNamespaceCommand; /** @hidden */ private _listNamespacesCommand; /** @hidden */ private _describeNamespaceCommand; /** @hidden */ private _deleteNamespaceCommand; /** @internal */ private config; /** @internal */ private target; /** * Instantiation of Index is handled by {@link Pinecone} * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * // Get host from describeIndex * const indexModel = await pc.describeIndex('my-index'); * const index = pc.index({ host: indexModel.host }); * * // Or get host from createIndex response * const indexModel = await pc.createIndex({ * name: 'my-index', * dimension: 1536, * spec: { serverless: { cloud: 'aws', region: 'us-east-1' } } * }); * const index = pc.index({ host: indexModel.host }); * ``` * * @constructor * @param options - The {@link IndexOptions} for targeting the index. * @param config - The configuration from the Pinecone client. */ constructor(options: IndexOptions, config: PineconeConfiguration); /** * Delete all records from the targeted namespace. To delete all records from across all namespaces, * delete the index using {@link Pinecone.deleteIndex} and create a new one using {@link Pinecone.createIndex}. * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const indexModel = await pc.describeIndex('my-index'); * const index = pc.index({ host: indexModel.host }); * * await index.describeIndexStats(); * // { * // namespaces: { * // '': { recordCount: 10 }, * // foo: { recordCount: 1 } * // }, * // dimension: 8, * // indexFullness: 0, * // totalRecordCount: 11 * // } * // Deletes all records from the default namespace '__default__'. Records in other namespaces are not modified. * await index.deleteAll(); * * // Deletes all records from the namespace 'foo'. Records in other namespaces are not modified. * await index.deleteAll({ namespace: 'foo' }); * * ``` * @param options - Optional {@link DeleteAllOptions} for the operation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves when the delete is completed. */ deleteAll(options?: DeleteAllOptions): Promise; /** * Delete records from the index by either an array of ids, or a filter object. * See [Filtering with metadata](https://docs.pinecone.io/docs/metadata-filtering#deleting-vectors-by-metadata-filter) * for more on deleting records with filters. * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const indexModel = await pc.describeIndex('my-index'); * const index = pc.index({ host: indexModel.host }); * * await index.deleteMany({ ids: ['record-1', 'record-2'] }); * * // or * await index.deleteMany({ filter: { genre: 'classical' } }); * ``` * @param options - The {@link DeleteManyOptions} for the operation. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves when the delete is completed. */ deleteMany(options: DeleteManyOptions): Promise; /** * Delete a record from the index by id. * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const indexModel = await pc.describeIndex('my-index'); * const index = pc.index({ host: indexModel.host }); * * await index.deleteOne({ id: 'record-1', namespace: 'foo' }); * ``` * @param options - The {@link DeleteOneOptions} for the operation. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves when the delete is completed. */ deleteOne(options: DeleteOneOptions): Promise; /** * Describes the index's statistics such as total number of records, records per namespace, and the index's dimension size. * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const indexModel = await pc.describeIndex('my-index'); * const index = pc.index({ host: indexModel.host }); * * await index.describeIndexStats(); * // { * // namespaces: { * // '': { recordCount: 10 } * // foo: { recordCount: 2000 }, * // bar: { recordCount: 2000 } * // }, * // dimension: 1536, * // indexFullness: 0, * // totalRecordCount: 4010 * // } * ``` * @param options - The {@link DescribeIndexStatsOptions} for the operation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves with the {@link IndexStatsDescription} value when the operation is completed. */ describeIndexStats(options?: DescribeIndexStatsOptions): Promise; /** * The `listPaginated` operation finds vectors based on an id prefix within a single namespace. * It returns matching ids in a paginated form, with a pagination token to fetch the next page of results. * This id list can then be passed to fetch or delete options to perform operations on the matching records. * See [Get record IDs](https://docs.pinecone.io/docs/get-record-ids) for guidance and examples. * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const indexModel = await pc.describeIndex('my-index'); * const index = pc.index({ host: indexModel.host, namespace: 'my-namespace' }); * * const results = await index.listPaginated({ prefix: 'doc1#' }); * console.log(results); * // { * // vectors: [ * // { id: 'doc1#01' }, { id: 'doc1#02' }, { id: 'doc1#03' }, * // { id: 'doc1#04' }, { id: 'doc1#05' }, { id: 'doc1#06' }, * // { id: 'doc1#07' }, { id: 'doc1#08' }, { id: 'doc1#09' }, * // ... * // ], * // pagination: { * // next: 'eyJza2lwX3Bhc3QiOiJwcmVUZXN0LS04MCIsInByZWZpeCI6InByZVRlc3QifQ==' * // }, * // namespace: 'my-namespace', * // usage: { readUnits: 1 } * // } * * // Fetch the next page of results * await index.listPaginated({ prefix: 'doc1#', paginationToken: results.pagination.next}); * ``` * * > ⚠️ **Note:** * > * > `listPaginated` is supported only for serverless indexes. * * @param options - The {@link ListOptions} for the operation. * @returns - A promise that resolves with the {@link ListResponse} when the operation is completed. * @throws {@link Errors.PineconeConnectionError} when invalid environment, project id, or index name is configured. * @throws {@link Errors.PineconeArgumentError} when invalid arguments are passed. */ listPaginated(options?: ListOptions): Promise; /** * Upsert records to the index. If a new value is upserted for an existing * record ID, it overwrites the previous value. * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const indexModel = await pc.describeIndex('my-index'); * const index = pc.index({ host: indexModel.host }); * * // Upsert to default namespace * await index.upsert({ * records: [{ * id: 'record-1', * values: [0.176, 0.345, 0.263], * },{ * id: 'record-2', * values: [0.176, 0.345, 0.263], * }] * }) * * // Upsert to a different namespace * await index.upsert({ * records: [{ * id: 'record-3', * values: [0.176, 0.345, 0.263], * }], * namespace: 'my-namespace' * }) * ``` * * @param options - The {@link UpsertOptions} for the operation. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves when the upsert is completed. */ upsert(options: UpsertOptions): Promise; /** * Fetch records from the index. * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const indexModel = await pc.describeIndex('my-index'); * const index = pc.index({ host: indexModel.host }); * * // Fetch from default namespace * await index.fetch({ ids: ['record-1', 'record-2'] }); * * // Override namespace for this operation * await index.fetch({ ids: ['record-1', 'record-2'], namespace: 'my-namespace' }); * ``` * @param options - The {@link FetchOptions} for the operation. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves with the {@link FetchResponse} when the fetch is completed. */ fetch(options: FetchOptions): Promise>; /** * Fetch records from the index by metadata filter. * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const indexModel = await pc.describeIndex('my-index'); * const index = pc.index({ host: indexModel.host }); * * await index.fetchByMetadata({ filter: { genre: 'classical' } }); * ``` * * @param options - The {@link FetchByMetadataOptions} for the operation. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves with the {@link FetchByMetadataResponse} when the fetch is completed. */ fetchByMetadata(options: FetchByMetadataOptions): Promise>; /** * Query records from the index. Query is used to find the `topK` records in the index whose vector values are most * similar to the vector values of the query according to the distance metric you have configured for your index. * See [Query data](https://docs.pinecone.io/docs/query-data) for more on querying. * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const indexModel = await pc.describeIndex('my-index'); * const index = pc.index({ host: indexModel.host }); * * // Query by id * await index.query({ topK: 3, id: 'record-1'}); * * // Query by vector * await index.query({ topK: 3, vector: [0.176, 0.345, 0.263] }); * * // Query a different namespace * await index.query({ topK: 3, id: 'record-1', namespace: 'custom-namespace' }); * ``` * * @param options - The {@link QueryOptions} for the operation. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves with the {@link QueryResponse} when the query is completed. */ query(options: QueryOptions): Promise>; /** * Update records in the index by id or by metadata filter. Updating by id * changes the vector and/or metadata of a single record; updating by metadata * filter changes metadata across all matching records. If a vector value is * provided it overwrites the previous value, and `metadata` is merged into the * existing metadata (only the specified fields are modified or added). * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const indexModel = await pc.describeIndex('imdb-movies'); * const index = pc.index({ host: indexModel.host }); * * await index.update({ * id: '18593', * metadata: { genre: 'romance' }, * }); * ``` * * @param options - The {@link UpdateOptions} for the operation. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves when the update is completed. */ update(options: UpdateOptions): Promise; /** * Upsert integrated records into a specific namespace within an index. * Pinecone converts the record text to vectors automatically using the hosted * embedding model associated with the index, so this is supported only for * indexes with integrated embedding. * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const indexModel = await pc.describeIndex('integrated-index'); * const namespace = pc.index({ host: indexModel.host, namespace: 'my-namespace' }); * * await namespace.upsertRecords({ * records: [ * { * id: 'rec1', * chunk_text: * "Apple's first product, the Apple I, was released in 1976 and was hand-built by co-founder Steve Wozniak.", * category: 'product', * }, * { * id: 'rec2', * chunk_text: * 'Apples are a great source of dietary fiber, which supports digestion and helps maintain a healthy gut.', * category: 'nutrition', * }, * { * id: 'rec3', * chunk_text: * 'Apples originated in Central Asia and have been cultivated for thousands of years, with over 7,500 varieties available today.', * category: 'cultivation', * }, * { * id: 'rec4', * chunk_text: * 'In 2001, Apple released the iPod, which transformed the music industry by making portable music widely accessible.', * category: 'product', * }, * { * id: 'rec5', * chunk_text: * 'Apple went public in 1980, making history with one of the largest IPOs at that time.', * category: 'milestone', * }, * { * id: 'rec6', * chunk_text: * 'Rich in vitamin C and other antioxidants, apples contribute to immune health and may reduce the risk of chronic diseases.', * category: 'nutrition', * }, * { * id: 'rec7', * chunk_text: * "Known for its design-forward products, Apple's branding and market strategy have greatly influenced the technology sector and popularized minimalist design worldwide.", * category: 'influence', * }, * { * id: 'rec8', * chunk_text: * 'The high fiber content in apples can also help regulate blood sugar levels, making them a favorable snack for people with diabetes.', * category: 'nutrition', * }, * ] * }); * ``` * * @param options - The {@link UpsertRecordsOptions} for the operation. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns a promise that resolves when the operation is complete. */ upsertRecords(options: UpsertRecordsOptions): Promise; /** * Search a specific namespace for records within an index, using a query * text, query vector, or record ID. Searching with a query vector or record * ID is supported for all indexes; searching with text is supported only for * indexes with integrated embedding. * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const indexModel = await pc.describeIndex('integrated-index'); * const namespace = pc.index({ host: indexModel.host, namespace: 'my-namespace' }); * * const response = await namespace.searchRecords({ * query: { * inputs: { text: 'disease prevention' }, topK: 4 }, * rerank: { * model: 'bge-reranker-v2-m3', * topN: 2, * rankFields: ['chunk_text'], * }, * fields: ['category', 'chunk_text'], * }); * console.log(response); * // { * // "result": { * // "hits": [ * // { * // "id": "rec6", * // "score": 0.1318424493074417, * // "fields": { * // "category": "nutrition", * // "chunk_text": "Rich in vitamin C and other antioxidants, apples contribute to immune health and may reduce the risk of chronic diseases." * // } * // }, * // { * // "id": "rec2", * // "score": 0.004867417272180319, * // "fields": { * // "category": "nutrition", * // "chunk_text": "Apples are a great source of dietary fiber, which supports digestion and helps maintain a healthy gut." * // } * // } * // ] * // }, * // "usage": { * // "readUnits": 1, * // "embedTotalTokens": 8, * // "rerankUnits": 1 * // } * // } * ``` * * @param options - The {@link SearchRecordsOptions} for the operation. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns a promise that resolves to {@link SearchRecordsResponse} when the operation is complete. */ searchRecords(options: SearchRecordsOptions): Promise; /** * Start an asynchronous import of vectors from object storage into a Pinecone Serverless index. * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const indexModel = await pc.describeIndex('my-serverless-index'); * const index = pc.index({ host: indexModel.host }); * console.log(await index.startImport({ uri: 's3://my-bucket/my-data' })); * * // {"id":"1"} * ``` * * @param options - The {@link StartImportOptions} for the import operation. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves to {@link StartImportResponse} when the import operation is started. */ startImport(options: StartImportOptions): Promise; /** * List all recent and ongoing import operations. * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const indexModel = await pc.describeIndex('my-serverless-index'); * const index = pc.index({ host: indexModel.host }); * console.log(await index.listImports(10)); * * // { * // data: [ * // { * // id: '1', * // uri: 's3://dev-bulk-import-datasets-pub/10-records-dim-10', * // status: 'Completed', * // createdAt: 2024-09-17T16:59:57.973Z, * // finishedAt: 2024-09-17T17:00:12.809Z, * // percentComplete: 100, * // recordsImported: 20, * // error: undefined * // } * // ], * // pagination: undefined // Example is only 1 item, so no pag. token given. * // } * ``` * * @param limit - (Optional) Max number of import operations to return per page. * @param paginationToken - (Optional) Pagination token to continue a previous listing operation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves to a {@link ListImportsResponse} when the operation is complete. */ listImports(limit?: number, paginationToken?: string): Promise; /** * Return details of a specific import operation. * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const indexModel = await pc.describeIndex('my-serverless-index'); * const index = pc.index({ host: indexModel.host }); * console.log(await index.describeImport('import-id')); * * // { * // id: '1', * // uri: 's3://dev-bulk-import-datasets-pub/10-records-dim-10', * // status: 'Completed', * // createdAt: 2024-09-17T16:59:57.973Z, * // finishedAt: 2024-09-17T17:00:12.809Z, * // percentComplete: 100, * // recordsImported: 20, * // error: undefined * // } * ``` * * @param id - The id of the import operation to describe. */ describeImport(id: string): Promise; /** * Cancel a specific import operation. * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const indexModel = await pc.describeIndex('my-serverless-index'); * const index = pc.index({ host: indexModel.host }); * console.log(await index.cancelImport('import-id')); * * // {} * ``` * * @param id - The id of the import operation to cancel. */ cancelImport(id: string): Promise; /** * Creates a new namespace within the index with an optional metadata schema. * Note: this operation is not supported for pod-based indexes. * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const indexModel = await pc.describeIndex('my-serverless-index'); * const index = pc.index({ host: indexModel.host }); * await index.createNamespace({ * name: 'my-namespace', * schema: { * fields: { * genre: { filterable: true }, * year: { filterable: true } * } * } * }); * ``` * * @param options - Configuration options for creating the namespace. * @param options.name - (Required) The name of the namespace to create. * @param options.schema - (Optional) The metadata schema for the namespace. By default, all metadata is indexed; * when a schema is present, only fields which are present in the `fields` object with `filterable: true` are indexed. */ createNamespace(options: CreateNamespaceOptions): Promise; /** * Returns a list of namespaces within the index. * Note: this operation is not supported for pod-based indexes. * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const indexModel = await pc.describeIndex('my-serverless-index'); * const index = pc.index({ host: indexModel.host }); * console.log(await index.listNamespaces({ limit: 10 })); * * // { * // namespaces: [ * // { name: 'ns-1', recordCount: '1' }, * // { name: 'ns-2', recordCount: '1' } * // ], * // pagination: undefined * // } * ``` * * @param options - The {@link ListNamespacesOptions} for the operation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves to a {@link ListNamespacesResponse} when the operation is complete. */ listNamespaces(options?: ListNamespacesOptions): Promise; /** * Returns the details of a specific namespace. * Note: this operation is not supported for pod-based indexes. * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const indexModel = await pc.describeIndex('my-serverless-index'); * const index = pc.index({ host: indexModel.host }); * console.log(await index.describeNamespace('ns-1')); * * // { name: 'ns-1', recordCount: '1' } * ``` * * @param namespace - The namespace to describe. */ describeNamespace(namespace: string): Promise; /** * Deletes a specific namespace from the index, including all records within it. * Deleting a namespace is irreversible; all data in the namespace is permanently * deleted. Note: this operation is not supported for pod-based indexes. * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const indexModel = await pc.describeIndex('my-serverless-index'); * const index = pc.index({ host: indexModel.host }); * await index.deleteNamespace('ns-1'); * ``` * * @param namespace - The namespace to delete. */ deleteNamespace(namespace: string): Promise; /** * Returns an {@link Index} targeting the specified namespace. * By default if no namespace is provided, all operations take place inside the default namespace `'__default__'`. * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * // Create an Index client instance scoped to operate on a * // single namespace * const ns = pc.index('my-index').namespace('my-namespace'); * * // Now operations against this intance only affect records in * // the targeted namespace * ns.upsert([ * // ... records to upsert in namespace 'my-namespace' * ]) * * ns.query({ * // ... query records in namespace 'my-namespace' * }) * ``` * This `namespace()` method will inherit custom metadata types if you are chaining the call off an {@link Index} client instance that is typed with a user-specified metadata type. See {@link Pinecone.index} for more info. * * @param namespace - The namespace to target within the index. All operations performed with the returned client instance will be scoped only to the targeted namespace. * @returns An {@link Index} object that can be used to perform data operations scoped to the specified namespace. */ namespace(namespace: string): Index; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/assistant/data/asstDataOperationsProvider.d.ts declare class AsstDataOperationsProvider { private readonly config; private readonly asstName; private asstHostUrl?; private asstDataOperations?; private additionalHeaders?; constructor(config: PineconeConfiguration, asstName: string, asstHostUrl?: string, additionalHeaders?: HTTPHeaders$3); provideData(): Promise; provideHostUrl(): Promise; buildAsstDataOperationsConfig(): ManageAssistantsApi; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/assistant/data/chat.d.ts declare const chat: (assistantName: string, apiProvider: AsstDataOperationsProvider) => (options: ChatOptions) => Promise; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/assistant/data/chatCompletion.d.ts declare const chatCompletion: (assistantName: string, apiProvider: AsstDataOperationsProvider) => (options: ChatCompletionOptions) => Promise; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/assistant/data/chatStream.d.ts declare const chatStream: (assistantName: string, apiProvider: AsstDataOperationsProvider, config: PineconeConfiguration) => (options: ChatOptions) => Promise>; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/assistant/data/chatCompletionStream.d.ts declare const chatCompletionStream: (assistantName: string, apiProvider: AsstDataOperationsProvider, config: PineconeConfiguration) => (options: ChatCompletionOptions) => Promise>; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/assistant/data/listFiles.d.ts /** * Lists files (with optional filter) uploaded to an Assistant. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const assistantName = 'test1'; * const assistant = pc.assistant({ name: assistantName }); * // Metadata fields are referenced at the top level — not wrapped in a `metadata` key. * // See https://docs.pinecone.io/guides/data/filter-with-metadata for operators ($eq, $ne, $gt, $lt, $in). * const files = await assistant.listFiles({ filter: { version: { $eq: 'v1' } } }); * console.log(files); * // { * // files: [ * // { * // name: 'test-file.txt', * // id: '1a56ddd0-c6d8-4295-80c0-9bfd6f5cb87b', * // metadata: [Object], * // createdOn: 2025-01-06T19:14:21.969Z, * // updatedOn: 2025-01-06T19:14:36.925Z, * // status: 'Available', * // percentDone: 1, * // signedUrl: undefined, * // errorMessage: undefined * // } * // ] * // } * ``` * @param assistantName - The name of the Assistant that the files are uploaded to. * @param api - The API object to use to send the request. * @returns A promise that resolves to a {@link AssistantFilesList} object containing the list of files. */ declare const listFiles: (assistantName: string, apiProvider: AsstDataOperationsProvider) => (options: ListFilesOptions) => Promise; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/assistant/data/describeFile.d.ts /** * Describes a file uploaded to an Assistant. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const assistantName = 'test1'; * const assistant = pc.assistant({ name: assistantName }); * const files = await assistant.listFiles(); * let fileId: string; * if (files.files) { * fileId = files.files[0].id; * } else { * fileId = ''; * } * const resp = await assistant.describeFile({fileId: fileId}) * console.log(resp); * // { * // name: 'test-file.txt', * // id: '1a56ddd0-c6d8-4295-80c0-9bfd6f5cb87b', * // metadata: undefined, * // createdOn: 2025-01-06T19:14:21.969Z, * // updatedOn: 2025-01-06T19:14:36.925Z, * // status: 'Available', * // percentDone: 1, * // signedUrl: undefined, * // errorMessage: undefined * // } * ``` * * @param assistantName - The name of the Assistant that the file is uploaded to. * @param api - The API object to use to send the request. * @returns A promise that resolves to a {@link AssistantFileModel} object containing the file details. */ declare const describeFile: (assistantName: string, apiProvider: AsstDataOperationsProvider) => (fileId: string, includeUrl: boolean) => Promise; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/assistant/data/deleteFile.d.ts /** * Deletes a file uploaded to an Assistant by ID. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const assistantName = 'test1'; * const assistant = pc.assistant({ name: assistantName }); * const files = await assistant.listFiles(); * if (files.files) { * const fileId = files.files[0].id; * await assistant.deleteFile(fileId); * } * ``` * * This is an asynchronous operation; the returned {@link OperationModel} can be * polled for completion via the assistant's `describeOperation` method. * * @param assistantName - The name of the Assistant to delete the file from. * @param api - The Pinecone API object. */ declare const deleteFile: (assistantName: string, apiProvider: AsstDataOperationsProvider) => (fileId: string) => Promise; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/assistant/data/uploadFile.d.ts declare const uploadFile: (assistantName: string, apiProvider: AsstDataOperationsProvider, config: PineconeConfiguration) => (options: UploadFileOptions) => Promise; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/assistant/data/upsertFile.d.ts /** * Creates or replaces a file on an Assistant at a caller-supplied file ID. * * If a file with the given `assistantFileId` already exists, its content is * replaced; if it does not exist, a new file is created with that identifier. * This makes upsert idempotent by ID — useful when you own the ID space (for * example, mirroring your own document IDs into the assistant or re-syncing a * changed source document to the same ID). * * Contrast with {@link uploadFile}, which always creates a new file with a * server-generated ID. Unlike `uploadFile`, upsert does *not* accept metadata. * * Accepts the same file inputs as {@link uploadFile} — a local file path or an * in-memory `Buffer`, `Blob`, or Node.js `ReadableStream`. Like upload, this * is an asynchronous operation: the returned {@link OperationModel} can be * polled for completion via `describeOperation`. * * @param assistantName - The name of the Assistant that owns the file. * @param apiProvider - The data plane operations provider. * @param config - The Pinecone configuration object. */ declare const upsertFile: (assistantName: string, apiProvider: AsstDataOperationsProvider, config: PineconeConfiguration) => (options: UpsertFileOptions) => Promise; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/assistant/data/describeOperation.d.ts /** * Describes an async operation (such as a file upload or delete) performed on * an Assistant. Use this to poll the status of an {@link OperationModel} * returned by {@link uploadFile}, {@link upsertFile}, or {@link deleteFile}. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const assistant = pc.assistant({ name: 'test1' }); * const op = await assistant.uploadFile({ path: 'report.pdf' }); * const status = await assistant.describeOperation(op.id); * console.log(status.status); // 'Processing' | 'Completed' | 'Failed' * ``` * * @param assistantName - The name of the Assistant that owns the operation. * @param apiProvider - The data plane operations provider. */ declare const describeOperation: (assistantName: string, apiProvider: AsstDataOperationsProvider) => (operationId: string) => Promise; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/assistant/data/listOperations.d.ts /** * Lists the async operations (such as file uploads and deletes) performed on an * Assistant, with optional filters. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const assistant = pc.assistant({ name: 'test1' }); * const { operations } = await assistant.listOperations({ status: 'Processing' }); * console.log(operations); * ``` * * @param assistantName - The name of the Assistant whose operations to list. * @param apiProvider - The data plane operations provider. * @returns A promise that resolves to an {@link OperationList} object. */ declare const listOperations: (assistantName: string, apiProvider: AsstDataOperationsProvider) => (options: ListOperationsOptions) => Promise; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/assistant/data/context.d.ts /** * Retrieves [the context snippets](https://docs.pinecone.io/guides/assistant/understanding-context-snippets) used * by an Assistant during the retrieval process. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const assistantName = 'test1'; * const assistant = pc.assistant({ name: assistantName }); * const response = await assistant.context({query: "What is the capital of France?"}); * console.log(response); * // { * // snippets: [ * // { * // type: 'text', * // content: 'The capital of France is Paris.', * // score: 0.9978925, * // reference: [Object] * // }, * // ], * // usage: { promptTokens: 527, completionTokens: 0, totalTokens: 527 } * // } * ``` * * @param assistantName - The name of the Assistant to retrieve the context snippets from. * @param api - The Pinecone API object. * @throws An error if neither `query` nor `messages` is provided. * @returns A promise that resolves to a {@link ContextModel} object containing the context snippets. */ declare const context: (assistantName: string, apiProvider: AsstDataOperationsProvider) => (options: ContextOptions) => Promise; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_control/models/Assistant.d.ts /** * Pinecone assistant control plane API * Pinecone Assistant Engine is a context engine to store and retrieve relevant knowledge from millions of documents at scale. This API supports creating and managing assistants. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Describes the configuration and status of a Pinecone Assistant. * @export * @interface Assistant */ interface Assistant$1 { /** * The name of the assistant. Resource name must be 1-63 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or `-`. * @type {string} * @memberof Assistant */ name: string; /** * Guidance applied to all responses generated by the assistant. * @type {string} * @memberof Assistant */ instructions?: string | null; /** * Optional metadata associated with the assistant. Metadata is a JSON object that can store custom organizational data, tags, and attributes. * @type {object} * @memberof Assistant */ metadata?: object | null; /** * The current operational status of the assistant. * @type {string} * @memberof Assistant */ status: string; /** * The host where the assistant is deployed. * @type {string} * @memberof Assistant */ host?: string; /** * The region where the assistant is deployed. * @type {string} * @memberof Assistant */ region?: string; /** * The timestamp when the assistant was created, in ISO 8601 format (`YYYY-MM-DDTHH:MM:SSZ`). * @type {Date} * @memberof Assistant */ createdAt?: Date; /** * The timestamp of the most recent update to the assistant, in ISO 8601 format (`YYYY-MM-DDTHH:MM:SSZ`). * @type {Date} * @memberof Assistant */ updatedAt?: Date; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/assistant/control/types.d.ts /** * The configuration needed to create an assistant. */ interface CreateAssistantOptions { /** * The name of the assistant. Resource name must be 1-63 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. */ name: string; /** * Description or directive for the assistant to apply to all responses. */ instructions?: string; /** * Metadata associated with the assistant. */ metadata?: Record; /** * The region to deploy the assistant in. Our current options are either us or eu. Defaults to us. */ region?: string; } /** * The configuration updates for the assistant. */ interface UpdateAssistantOptions { /** * The name of the assistant to update. */ name: string; /** * Description or directive for the assistant to apply to all responses. */ instructions?: string; /** * Metadata associated with the assistant. */ metadata?: Record; } /** * Response from updating an assistant. */ interface UpdateAssistantResponse { /** * The name of the assistant that was updated. */ assistantName?: string; /** * Description or directive for the assistant to apply to all responses. */ instructions?: string; /** * Metadata associated with the assistant. */ metadata?: object; } /** * Response from listing assistants. */ interface AssistantList { /** * The list of assistants associated with a specific project. */ assistants?: Array; } /** * The request for the alignment evaluation. */ interface EvaluateOptions { /** * The question for which the answer was generated. */ question: string; /** * The generated answer. */ answer: string; /** * The ground truth answer to the question. */ groundTruth: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/assistant/index.d.ts /** * The `Assistant` class holds the data plane methods for interacting with * [Assistants](https://docs.pinecone.io/guides/assistant/understanding-assistant). * * This class can be instantiated through a {@link Pinecone} object, and is used to interact with a specific assistant. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const assistant = pc.assistant({ name: 'assistant-name' }); * ``` */ declare class Assistant { private config; readonly _chat: ReturnType; readonly _chatStream: ReturnType; readonly _chatCompletion: ReturnType; readonly _chatCompletionStream: ReturnType; readonly _listFiles: ReturnType; readonly _describeFile: ReturnType; readonly _uploadFile: ReturnType; readonly _upsertFile: ReturnType; readonly _deleteFile: ReturnType; readonly _describeOperation: ReturnType; readonly _listOperations: ReturnType; readonly _context: ReturnType; assistantName: string; /** * Creates an instance of the `Assistant` class. * * @param options - The {@link AssistantOptions} for targeting the assistant. * @param config - The Pinecone configuration object containing an API key and other configuration parameters * needed for API calls. * * @throws An error if no assistant name is provided. */ constructor(options: AssistantOptions, config: PineconeConfiguration); /** * Sends a message to the assistant and receives a response. Retries the request if the server fails. * * This is the recommended way to chat with an assistant: it offers more * functionality and control over the assistant's responses and references * (e.g. structured citations) than the OpenAI-compatible * {@link chatCompletion} interface. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const assistantName = 'test1'; * const assistant = pc.assistant({ name: assistantName }); * const chatResp = await assistant.chat({messages: [{role: 'user', content: "What is the capital of France?"}]}); * // { * // id: '000000000000000023e7fb015be9d0ad', * // finishReason: 'stop', * // message: { * // role: 'assistant', * // content: 'The capital of France is Paris.' * // }, * // model: 'gpt-4o-2024-05-13', * // citations: [ { position: 209, references: [Array] } ], * // usage: { promptTokens: 493, completionTokens: 38, totalTokens: 531 } * // } * ``` * * @example * Chat with multimodal context enabled: * ```typescript * const chatResp = await assistant.chat({ * messages: [{role: 'user', content: "What do the charts show?"}], * contextOptions: { * multimodal: true, * includeBinaryContent: true * } * }); * ``` * * @param options - A {@link ChatOptions} object containing the message and optional parameters to send to the * assistant, including contextOptions for controlling multimodal content. * @returns A promise that resolves to a {@link ChatModel} object containing the response from the assistant. */ chat(options: ChatOptions): Promise; /** * Sends a message to the assistant and receives a streamed response as {@link ChatStream}. Retries the request if the server fails. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const assistantName = 'test1'; * const assistant = pc.assistant({ name: assistantName }); * const chatStream = await assistant.chatStream({ messages: [{ role: 'user', content: 'What is the capital of France?'}]}); * * // stream the response and log each chunk * for await (const chunk of newStream) { * console.log(chunk); * } * // each chunk will have a variable shape depending on the type: * // { type:"message_start", id:"response_id", model:"gpt-4o-2024-05-13", role:"assistant"} * // { type:"content_chunk", id:"response_id", model:"gpt-4o-2024-05-13", delta:{ content:"The"}} * // { type:"content_chunk", id:"response_id", model:"gpt-4o-2024-05-13", delta:{ content:" test"}} * // { type:"message_end", id:"response_id", model:"gpt-4o-2024-05-13", finishReason:"stop",usage:{ promptTokens:371,completionTokens:48,totalTokens:419}} * ``` * * @param options - A {@link ChatOptions} object containing the message and optional parameters to send to the * assistant. * @returns A promise that resolves to a {@link ChatStream}. */ chatStream(options: ChatOptions): Promise>; /** * Sends a message to the assistant and receives a response that is compatible with * [OpenAI's Chat Completion API](https://platform.openai.com/docs/guides/text-generation. Retries the request if the server fails. * * This interface is useful when you need inline citations or OpenAI-compatible * responses, but has limited functionality compared to {@link chat}, which is * the recommended interface for chatting with an assistant. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const assistantName = 'test1'; * const assistant = pc.assistant({ name: assistantName }); * const chatCompletion = await assistant.chatCompletion({ messages: [{ role: 'user', content: 'What is the capital of France?' }]}); * console.log(chatCompletion); * // { * // id: "response_id", * // choices: [ * // { * // finishReason: "stop", * // index: 0, * // message: { * // role: "assistant", * // content: "The data mentioned is described as \"some temporary data\" [1].\n\nReferences:\n1. [test-chat.txt](https://storage.googleapis.com/knowledge-prod-files/your_file_resource) \n" * // } * // } * // ], * // model: "gpt-4o-2024-05-13", * // usage: { * // promptTokens: 371, * // completionTokens: 19, * // totalTokens: 390 * // } * // } * ``` * * @param options - A {@link ChatCompletionOptions} object containing the message and optional parameters to send * to an assistant. * @returns A promise that resolves to a {@link ChatCompletionModel} object containing the response from the assistant. */ chatCompletion(options: ChatCompletionOptions): Promise; /** * Sends a message to the assistant and receives a streamed response as {@link ChatStream}. Response is compatible with * [OpenAI's Chat Completion API](https://platform.openai.com/docs/guides/text-generation. Retries the request if the server fails. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const assistantName = 'test1'; * const assistant = pc.assistant({ name: assistantName }); * const chatStream = await assistant.chatCompletionStream({messages: [{role: 'user', content: "What is the capital of France?"}]}); * * // stream the response and log each chunk * for await (const chunk of newStream) { * if (chunk.choices.length > 0 && chunk.choices[0].delta.content) { * process.stdout.write(chunk.choices[0].delta.content); * } * } * // { id: 'response_id', choices: [{ index: 0, delta: { role: 'assistant' }, finishReason: null }], model: 'gpt-4o-2024-05-13', usage: null } * // { id: 'response_id', choices: [{ index: 0, delta: { content: 'The' }}, finishReason: null }], model: 'gpt-4o-2024-05-13', usage: null } * // { id: 'response_id', choices: [{ index: 0, delta: { content: ' test' }}, finishReason: null }], model: 'gpt-4o-2024-05-13', usage: null } * // { id: 'response_id', choices: [], model: 'gpt-4o-2024-05-13', usage: { promptTokens: 371, completionTokens: 48, totalTokens: 419 }} * ``` * * @param options - A {@link ChatCompletionOptions} object containing the message and optional parameters to send * to an assistant. * @returns A promise that resolves to a {@link ChatStream}. */ chatCompletionStream(options: ChatCompletionOptions): Promise>; /** * Lists files (with optional filter) uploaded to an assistant. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const assistantName = 'test1'; * const assistant = pc.assistant({ name: assistantName }); * // Metadata fields are referenced at the top level — not wrapped in a `metadata` key. * // See https://docs.pinecone.io/guides/data/filter-with-metadata for operators ($eq, $ne, $gt, $lt, $in). * const files = await assistant.listFiles({ filter: { version: { $eq: 'v1' } } }); * console.log(files); * // { * // files: [ * // { * // name: 'temp-file.txt', * // id: '1a56ddd0-c6d8-4295-80c0-9bfd6f5cb87b', * // metadata: undefined, * // createdOn: 2025-01-06T19:14:21.969Z, * // updatedOn: 2025-01-06T19:14:36.925Z, * // status: 'Available', * // percentDone: 1, * // signedUrl: undefined, * // errorMessage: undefined * // } * // ] * // } * ``` * * @param options - A {@link ListFilesOptions} object containing optional parameters to filter the list of files. * @returns A promise that resolves to a {@link AssistantFilesList} object containing a list of files. */ listFiles(options?: ListFilesOptions): Promise; /** * Describes a file uploaded to an assistant. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const assistantName = 'test1'; * const assistant = pc.assistant({ name: assistantName }); * const files = await assistant.listFiles(); * let fileId: string; * if (files.files) { * fileId = files.files[0].id; * } else { * fileId = ''; * } * const resp = await assistant.describeFile({fileId: fileId}) * console.log(resp); * // { * // name: 'test-file.txt', * // id: '1a56ddd0-c6d8-4295-80c0-9bfd6f5cb87b', * // metadata: undefined, * // createdOn: 2025-01-06T19:14:21.969Z, * // updatedOn: 2025-01-06T19:14:36.925Z, * // status: 'Available', * // percentDone: 1, * // signedUrl: undefined, * // errorMessage: undefined * // } * ``` * * @param fileId - The ID of the file to describe. * @param includeUrl - Whether to include the signed URL in the response. Defaults to true. * @returns A promise that resolves to a {@link AssistantFileModel} object containing the file details. */ describeFile(fileId: string, includeUrl?: boolean): Promise; /** * Uploads a file to an assistant. * * Accepts either a local file path or an in-memory `Buffer`, `Blob`, or * Node.js `ReadableStream`. Use the `file` + `fileName` form to forward an * incoming HTTP upload stream directly to the assistant without writing it * to disk or buffering the entire file in memory. * * @example * Upload from a local path: * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const assistant = pc.Assistant({ name: 'my-assistant' }); * await assistant.uploadFile({ path: 'report.pdf', metadata: { category: 'reports' } }); * ``` * * @example * Upload from a Buffer (e.g. from multer memory storage): * ```typescript * // req.file.buffer is a Buffer provided by multer * await assistant.uploadFile({ * file: req.file.buffer, * fileName: req.file.originalname, * }); * ``` * * @example * Upload from a ReadableStream (zero server-side buffering): * ```typescript * // Forward an incoming upload stream directly — no disk write, no memory spike. * // Note: automatic retries are disabled for stream inputs because the stream * // is consumed after the first read and cannot be replayed. * await assistant.uploadFile({ * file: req.file.stream, // e.g. from busboy / @fastify/multipart * fileName: req.file.filename, * }); * ``` * * @example * Upload a file with multimodal processing enabled: * ```typescript * await assistant.uploadFile({ * path: 'document-with-images.pdf', * metadata: { category: 'reports' }, * multimodal: true, * }); * ``` * * @param options - A {@link UploadFileOptions} object. Provide either * `path` (local file path) or `file` ({@link Uploadable}) + `fileName`, * along with optional `metadata` and `multimodal` flags. * @returns A promise that resolves to an {@link OperationModel} describing the async upload operation. Use `operation.fileId` to track the file once processing begins. */ uploadFile(options: UploadFileOptions): Promise; /** * Creates or replaces a file on an assistant at a caller-supplied file ID. * * If a file with the given `assistantFileId` already exists, its content is * replaced; otherwise a new file is created with that identifier. This makes * upsert idempotent by ID — useful when you own the ID space, e.g. mirroring * your own document IDs into the assistant or re-syncing a changed source * document to the same ID. * * Contrast with {@link uploadFile}, which always creates a new file with a * server-generated ID and additionally supports `metadata`. `upsertFile` * does *not* accept metadata. * * Accepts the same file inputs as {@link uploadFile} — a local file path or * an in-memory `Buffer`, `Blob`, or Node.js `ReadableStream`. Like upload, * this is asynchronous: poll the returned operation with * {@link describeOperation} to track completion. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const assistant = pc.assistant({ name: 'my-assistant' }); * // Create-or-replace the file at this ID with new content. * const operation = await assistant.upsertFile({ * assistantFileId: '1a56ddd0-c6d8-4295-80c0-9bfd6f5cb87b', * path: 'report.pdf', * }); * const status = await assistant.describeOperation(operation.id); * ``` * * @param options - An {@link UpsertFileOptions} object. Provide the * `assistantFileId` to create or replace, along with either `path` * (local file path) or `file` ({@link Uploadable}) + `fileName`, and an * optional `multimodal` flag. * @returns A promise that resolves to an {@link OperationModel} describing the async upsert operation. */ upsertFile(options: UpsertFileOptions): Promise; /** * Deletes a file uploaded to an assistant by ID. * * This is an asynchronous operation: the returned {@link OperationModel} can * be polled for completion via {@link describeOperation}. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const assistantName = 'test1'; * const assistant = pc.assistant({ name: assistantName }); * const files = await assistant.listFiles(); * if (files.files) { * const fileId = files.files[0].id; * await assistant.deleteFile(fileId); * } * ``` * * @param fileId - The ID of the file to delete. * @returns A promise that resolves to an {@link OperationModel} describing the async delete operation. */ deleteFile(fileId: string): Promise; /** * Describes an async operation (such as a file upload or delete) performed on * the assistant. Use this to poll the status of an {@link OperationModel} * returned by {@link uploadFile}, {@link upsertFile}, or {@link deleteFile}. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const assistant = pc.assistant({ name: 'test1' }); * const operation = await assistant.uploadFile({ path: 'report.pdf' }); * const status = await assistant.describeOperation(operation.id); * console.log(status.status); // 'Processing' | 'Completed' | 'Failed' * ``` * * @param operationId - The ID of the operation to describe. * @returns A promise that resolves to an {@link OperationModel} describing the operation. */ describeOperation(operationId: string): Promise; /** * Lists the async operations (such as file uploads and deletes) performed on * the assistant, with optional filters. Returns operations that are in * progress, as well as recently completed or failed operations. Both * successful and failed operations are retained for 30 days after completion. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const assistant = pc.assistant({ name: 'test1' }); * const { operations } = await assistant.listOperations({ status: 'Processing' }); * console.log(operations); * ``` * * @param options - An optional {@link ListOperationsOptions} object to filter and paginate the operations. * @returns A promise that resolves to an {@link OperationList} object containing the list of operations. */ listOperations(options?: ListOperationsOptions): Promise; /** * Retrieves [the context snippets](https://docs.pinecone.io/guides/assistant/understanding-context-snippets) used * by an assistant during the retrieval process. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const assistantName = 'test1'; * const assistant = pc.assistant({ name: assistantName }); * const response = await assistant.context({query: "What is the capital of France?"}); * console.log(response); * // { * // snippets: [ * // { * // type: 'text', * // content: 'The capital of France is Paris.', * // score: 0.9978925, * // reference: [Object] * // }, * // ], * // usage: { promptTokens: 527, completionTokens: 0, totalTokens: 527 } * // } * ``` * * @example * Retrieve multimodal context snippets with image data: * ```typescript * const response = await assistant.context({ * query: "Show me charts about revenue", * multimodal: true, * includeBinaryContent: true * }); * ``` * * @param options - A {@link ContextOptions} object containing the query or messages, optional filter, and optional multimodal parameters. * @returns A promise that resolves to a {@link ContextModel} object containing the context snippets. */ context(options: ContextOptions): Promise; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/control/types.d.ts /** * Index names are strings composed of: * - alphanumeric characters * - hyphens * * Index names must be unique within a project and may not start or end with a hyphen. * * @see [Understanding indexes](https://docs.pinecone.io/docs/indexes) */ type IndexName = string; /** * Collection names are strings composed of: * - alphanumeric characters * - hyphens * * Collection names must be unique within a project and may not start or end with a hyphen. * * @see [Understanding collections](https://docs.pinecone.io/docs/collections) */ type CollectionName = string; /** * The unique identifier representing a backup. * * @see [Backups overview](https://docs.pinecone.io/guides/manage-data/backups-overview) */ type BackupId = string; /** The unique identifier representing a restore job. */ type RestoreJobId = string; /** * @see [Understanding indexes](https://docs.pinecone.io/docs/indexes) */ type PodType = 's1.x1' | 's1.x2' | 's1.x4' | 's1.x8' | 'p1.x1' | 'p1.x2' | 'p1.x4' | 'p1.x8' | 'p2.x1' | 'p2.x2' | 'p2.x4' | 'p2.x8'; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/control/createIndex.d.ts /** * @see [Understanding indexes](https://docs.pinecone.io/docs/indexes) */ interface CreateIndexOptions extends Omit { /** This option specifies how the index should be deployed. */ spec: CreateIndexSpec; /** This option tells the client not to resolve the returned promise until the index is ready to receive data. */ waitUntilReady?: boolean; /** * Maximum time in milliseconds to wait for the index to become ready when * `waitUntilReady` is `true`. Omit to poll indefinitely. * Throws {@link Errors.PineconeTimeoutError} if the deadline is exceeded. */ timeout?: number; /** This option tells the client not to throw if you attempt to create an index that already exists. */ suppressConflicts?: boolean; } /** * The spec object defines how the index should be deployed. * * For serverless indexes, you define only the [cloud and region](http://docs.pinecone.io/guides/indexes/understanding-indexes#cloud-regions) where the index should be hosted. * For pod-based indexes, you define the [environment](http://docs.pinecone.io/guides/indexes/understanding-indexes#pod-environments) where the index should be hosted, * the [pod type and size](http://docs.pinecone.io/guides/indexes/understanding-indexes#pod-types) to use, and other index characteristics. */ interface CreateIndexSpec { /** The serverless object allows you to configure a serverless index. */ serverless?: CreateIndexServerlessSpec; /** The pod object allows you to configure a pods-based index. */ pod?: CreateIndexPodSpec; /** The byoc object allows you to configure a BYOC index. */ byoc?: CreateIndexByocSpec; } /** * Configuration needed to deploy a serverless index. * * @see [Understanding Serverless indexes](https://docs.pinecone.io/guides/indexes/understanding-indexes#serverless-indexes) */ interface CreateIndexServerlessSpec { /** The public cloud where you would like your index hosted. */ cloud: string; /** The region where you would like your index to be created. */ region: string; /** The read capacity configuration for the index. Defaults to OnDemand if not provided. */ readCapacity?: CreateIndexReadCapacity; /** The name of the collection to be used as the source for the index. NOTE: Collections can only be created from pods-based indexes. */ sourceCollection?: string; /** Schema for the behavior of Pinecone's internal metadata index. By default, all metadata is indexed; when `schema` is present, only fields which are present in the `fields` object with a `filterable: true` are indexed. Note that `filterable: false` is not currently supported. */ schema?: MetadataSchema; } /** * Configuration needed to deploy a serverless index. * * @see [Understanding Pod-based indexes](https://docs.pinecone.io/guides/indexes/understanding-indexes#pod-based-indexes) */ interface CreateIndexPodSpec { /** The environment where the index is hosted. */ environment: string; /** The number of replicas. Replicas duplicate your index. They provide higher availability and throughput. Replicas can be scaled up or down as your needs change. */ replicas?: number; /** The number of shards. Shards split your data across multiple pods so you can fit more data into an index. */ shards?: number; /** The type of pod to use. One of `s1`, `p1`, or `p2` appended with `.` and one of `x1`, `x2`, `x4`, or `x8`. */ podType: string; /** The number of pods to be used in the index. This should be equal to `shards` x `replicas`.' */ pods?: number; /** * Configuration for the behavior of Pinecone's internal metadata index. By default, all metadata is indexed; * when `metadataConfig` is present, only specified metadata fields are indexed. These configurations are only valid * for use with pod-based indexes. */ metadataConfig?: PodSpecMetadataConfig; /** The name of the collection to be used as the source for the index. */ sourceCollection?: string; } /** * Configuration needed to deploy a BYOC index. * * @see [Bring Your Own Cloud](https://docs.pinecone.io/guides/production/bring-your-own-cloud) */ interface CreateIndexByocSpec { /** The environment identifier for the BYOC index. */ environment: string; /** The metadata schema for the index. */ schema?: MetadataSchema; /** The read capacity configuration for the index. Defaults to OnDemand if not provided. */ readCapacity?: CreateIndexReadCapacity; } /** * The allowed node types for dedicated read capacity determining the type of machines to use: `b1` or `t1`. * `t1` includes increased processing power and memory. */ type DedicatedNodeType = 'b1' | 't1'; /** * On-demand read capacity configuration. * If CreateIndexReadCapacity or mode is omitted, the index will be created with on-demand read capacity. */ type ReadCapacityOnDemandParams = { /** The mode of the index. */mode?: 'OnDemand'; }; /** * Dedicated read capacity configuration. * * @see [Dedicated Read Nodes](https://docs.pinecone.io/guides/index-data/dedicated-read-nodes) */ type ReadCapacityDedicatedParams = { /** The mode of the index. */mode?: 'Dedicated'; /** The type of machines to use. Available options: `b1`, `t1`. */ nodeType: DedicatedNodeType; /** The configuration for manual scaling. */ manual: { /** The number of replicas to use. Replicas duplicate the compute resources and data of an index, allowing higher query throughput and availability. * Setting replicas to 0 disables the index but can be used to reduce costs while usage is paused. */ replicas: number; /** The number of shards to use. Shards determine the storage capacity of an index, with each shard providing 250 GB of storage. */ shards: number; }; }; /** The read capacity configuration for the index. Default is on-demand. */ type CreateIndexReadCapacity = ReadCapacityOnDemandParams | ReadCapacityDedicatedParams; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/control/configureIndex.d.ts /** * Options for configuring an index. * @see [Manage Indexes](https://docs.pinecone.io/guides/manage-data/manage-indexes) */ type ConfigureIndexOptions = { /** * The name of the index to configure. */ name: IndexName; /** * Whether [deletion protection](http://docs.pinecone.io/guides/manage-data/manage-indexes#configure-deletion-protection) is enabled/disabled for the index. * Possible values: `disabled` or `enabled`. */ deletionProtection?: string; /** * Custom user tags added to an index. Keys must be 80 characters or less. Values must be 120 characters or less. Keys must be alphanumeric, '_', or '-'. * Values must be alphanumeric, ';', '@', '_', '-', '.', '+', or ' '. To unset a key, set the value to be an empty string. */ tags?: { [key: string]: string; }; /** * The integrated inference embedding settings for this index. */ embed?: ConfigureIndexRequestEmbed; /** * The number of replicas. Replicas duplicate your index. They provide higher availability and throughput. Replicas can be scaled up or down as your needs change. */ podReplicas?: number; /** * The type of pod to use. One of `s1`, `p1`, or `p2` appended with `.` and one of `x1`, `x2`, `x4`, or `x8`. */ podType?: string; /** * The read capacity configuration for serverless and BYOC indexes. * Configures whether the index uses on-demand or dedicated read capacity. * * @see [Dedicated Read Nodes](https://docs.pinecone.io/guides/index-data/dedicated-read-nodes) */ readCapacity?: CreateIndexReadCapacity; }; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/control/createIndexForModel.d.ts /** * Options for creating an index for a specific model. * @see [Create or configure an index](https://docs.pinecone.io/guides/inference/integrated-inference#2-create-or-configure-an-index) */ type CreateIndexForModelOptions = { /** * The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. */ name: string; /** * The public cloud where you would like your index hosted. */ cloud: string; /** * The region where you would like your index to be created. */ region: string; /** * The {@link CreateIndexForModelEmbed} object used to configure the integrated inference embedding model. */ embed: CreateIndexForModelEmbed; /** * Allows configuring an index to be protected from deletion. Defaults to `disabled`. */ deletionProtection?: string; /** * The read capacity configuration for the index. Defaults to OnDemand if not provided. */ readCapacity?: CreateIndexReadCapacity; /** * Schema for the behavior of Pinecone's internal metadata index. By default, all metadata is indexed; when `schema` is present, only fields which are present in the `fields` object with a `filterable: true` are indexed. Note that `filterable: false` is not currently supported. */ schema?: MetadataSchema; /** * Custom user tags added to an index. Keys must be 80 characters or less. Values must be 120 characters or less. Keys must be alphanumeric, '_', or '-'. Values must be alphanumeric, ';', '@', '_', '-', '.', '+', or ' '. To unset a key, set the value to be an empty string. */ tags?: { [key: string]: string; }; /** * This option tells the client not to resolve the returned promise until the index is ready to receive data. */ waitUntilReady?: boolean; /** * Maximum time in milliseconds to wait for the index to become ready when * `waitUntilReady` is `true`. Omit to poll indefinitely. * Throws {@link Errors.PineconeTimeoutError} if the deadline is exceeded. */ timeout?: number; /** * This option tells the client not to throw if you attempt to create an index that already exists. */ suppressConflicts?: boolean; }; /** * Specifies the integrated inference embedding configuration for the index. * Once set the model cannot be changed, but you can later update the embedding configuration for an integrated inference index including field map, read parameters, or write parameters. * Refer to the [model guide](https://docs.pinecone.io/guides/inference/understanding-inference#embedding-models) * for available models and model details. */ type CreateIndexForModelEmbed = { /** * The name of the embedding model to use for the index. */ model: string; /** * The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If not specified, the metric * will be defaulted according to the model. Cannot be updated once set. */ metric?: string; /** * Identifies the name of the text field from your document model that will be embedded. */ fieldMap: object; /** * The dimension of embeddings produced by the model. Only applicable to models that * support multiple output dimensions; defaulted by the model when omitted. */ dimension?: number; /** * The read parameters for the embedding model. */ readParameters?: object; /** * The write parameters for the embedding model. */ writeParameters?: object; }; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/control/deleteIndex.d.ts /** The name of index to delete */ type DeleteIndexOptions = IndexName; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/control/describeIndex.d.ts /** The name of the index to describe */ type DescribeIndexOptions = IndexName; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/control/deleteCollection.d.ts /** * The name of collection to delete. */ type DeleteCollectionOptions = CollectionName; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/control/describeCollection.d.ts /** * The name of collection to describe. */ type DescribeCollectionOptions = CollectionName; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/control/createBackup.d.ts /** * The options for creating an index backup. */ interface CreateBackupOptions { /** * The name of the index to back up. */ indexName: string; /** * An optional name for the backup. If not provided, one will be auto-generated. */ name?: string; /** * A human-readable description of the backup's purpose or contents. */ description?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/control/createIndexFromBackup.d.ts /** * The options for creating a new index from an existing backup. */ interface CreateIndexFromBackupOptions { /** * The ID of the backup to restore from. */ backupId: string; /** * The name of the new index to create from the backup. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. */ name: string; /** * Optional custom user tags to attach to the restored index. Keys must be 80 characters or less. Values must be 120 characters or less. * Keys must be alphanumeric, '_', or '-'. Values must be alphanumeric, ';', '@', '_', '-', '.', '+', or ' '. * To unset a key, set the value to be an empty string. */ tags?: { [key: string]: string; }; /** * Allows configuring deletion protection for the new index: 'enabled' or 'disabled'. Defaults to 'disabled'. */ deletionProtection?: string; /** * Optional read capacity configuration for the restored index. For serverless backups, set this to create the * restored index with dedicated read nodes (DRN) instead of defaulting to on-demand capacity. */ readCapacity?: CreateIndexReadCapacity; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/control/describeBackup.d.ts /** * The string ID of the backup to describe. */ type DescribeBackupOptions = BackupId; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/control/describeRestoreJob.d.ts /** * The string ID of the restore job to describe. */ type DescribeRestoreJobOptions = RestoreJobId; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/control/listBackups.d.ts /** * The options for listing backups. */ interface ListBackupsOptions { /** * The index name to list backups for. If not provided, all project backups will be listed. */ indexName?: string; /** * Maximum number of backups to return. */ limit?: number; /** * Token used for pagination to retrieve the next page of results. */ paginationToken?: string; /** * Only applies when `indexName` is provided. When `true`, returns backups from every index in the project that * has ever used this name, including deleted indexes. When `false` or omitted, `indexName` must resolve to an * active index or the API returns a 404. Ignored when listing all project backups. */ includeDeleted?: boolean; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/control/listRestoreJobs.d.ts /** * The options for listing restore jobs. */ interface ListRestoreJobsOptions { /** * Maximum number of restore jobs to return. */ limit?: number; /** * Token used for pagination to retrieve the next page of results. */ paginationToken?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/control/deleteBackup.d.ts /** * The string ID of the backup to delete. */ type DeleteBackupOptions = BackupId; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_evaluation/models/Metrics.d.ts /** * Evaluation API * Provides endpoints for evaluating RAG systems using various metrics. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The metrics returned for the alignment evaluation. * @export * @interface Metrics */ interface Metrics { /** * The precision of the generated answer. * @type {number} * @memberof Metrics */ correctness: number; /** * The recall of the generated answer. * @type {number} * @memberof Metrics */ completeness: number; /** * The harmonic mean of correctness and completeness. * @type {number} * @memberof Metrics */ alignment: number; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_evaluation/models/Fact.d.ts /** * Evaluation API * Provides endpoints for evaluating RAG systems using various metrics. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * A fact * @export * @interface Fact */ interface Fact { /** * The content of the fact. * @type {string} * @memberof Fact */ content: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_evaluation/models/EvaluatedFact.d.ts /** * A fact that was evaluated. * @export * @interface EvaluatedFact */ interface EvaluatedFact { /** * * @type {Fact} * @memberof EvaluatedFact */ fact: Fact; /** * The entailment of a fact. * @type {string} * @memberof EvaluatedFact */ entailment: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_evaluation/models/Reasoning.d.ts /** * The reasoning behind the alignment evaluation. * @export * @interface Reasoning */ interface Reasoning { /** * The facts that were evaluated. * @type {Array} * @memberof Reasoning */ evaluatedFacts: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_evaluation/models/TokenCounts.d.ts /** * Evaluation API * Provides endpoints for evaluating RAG systems using various metrics. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Contains the token usage details for LLM interactions, including tokens used in requests (`prompt_tokens`), tokens used in responses (`completion_tokens`), and the total number of tokens (`total_tokens`). * @export * @interface TokenCounts */ interface TokenCounts { /** * The number of tokens used in two requests to the LLM. The first request includes the question, generated answer, and ground truth answer. The second request includes these details plus the generated facts from the first response. * @type {number} * @memberof TokenCounts */ promptTokens: number; /** * The number of tokens used in two responses from the LLM. The first response contains the generated facts, and the second response contains the evaluation metrics. * @type {number} * @memberof TokenCounts */ completionTokens: number; /** * The total number of tokens used across both requests and responses. This value equals the sum of `prompt_tokens` and `completion_tokens`. * @type {number} * @memberof TokenCounts */ totalTokens: number; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/assistant_evaluation/models/AlignmentResponse.d.ts /** * The response for the alignment evaluation. * @export * @interface AlignmentResponse */ interface AlignmentResponse { /** * * @type {Metrics} * @memberof AlignmentResponse */ metrics: Metrics; /** * * @type {Reasoning} * @memberof AlignmentResponse */ reasoning: Reasoning; /** * * @type {TokenCounts} * @memberof AlignmentResponse */ usage: TokenCounts; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/inference/runtime.d.ts interface ConfigurationParameters$1 { basePath?: string; fetchApi?: FetchAPI$1; middleware?: Middleware$1[]; queryParamsStringify?: (params: HTTPQuery$1) => string; username?: string; password?: string; apiKey?: string | ((name: string) => string); accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); headers?: HTTPHeaders$1; credentials?: RequestCredentials; } declare class Configuration$1 { private configuration; constructor(configuration?: ConfigurationParameters$1); set config(configuration: Configuration$1); get basePath(): string; get fetchApi(): FetchAPI$1 | undefined; get middleware(): Middleware$1[]; get queryParamsStringify(): (params: HTTPQuery$1) => string; get username(): string | undefined; get password(): string | undefined; get apiKey(): ((name: string) => string) | undefined; get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined; get headers(): HTTPHeaders$1 | undefined; get credentials(): RequestCredentials | undefined; } /** * This is the base class for all generated API classes. */ declare class BaseAPI$1 { protected configuration: Configuration$1; private static readonly jsonRegex; private middleware; constructor(configuration?: Configuration$1); withMiddleware(this: T, ...middlewares: Middleware$1[]): T; withPreMiddleware(this: T, ...preMiddlewares: Array): T; withPostMiddleware(this: T, ...postMiddlewares: Array): T; /** * Check if the given MIME is a JSON MIME. * JSON MIME examples: * application/json * application/json; charset=UTF8 * APPLICATION/JSON * application/vnd.company+json * @param mime - MIME (Multipurpose Internet Mail Extensions) * @return True if the given MIME is JSON, false otherwise. */ protected isJsonMime(mime: string | null | undefined): boolean; protected request(context: RequestOpts$1, initOverrides?: RequestInit | InitOverrideFunction$1): Promise; private createFetchParams; private fetchApi; /** * Create a shallow clone of `this` by constructing a new instance * and then shallow cloning data members. */ private clone; } type FetchAPI$1 = WindowOrWorkerGlobalScope['fetch']; type Json$1 = any; type HTTPMethod$1 = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; type HTTPHeaders$1 = { [key: string]: string; }; type HTTPQuery$1 = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery$1; }; type HTTPBody$1 = Json$1 | FormData | URLSearchParams; type HTTPRequestInit$1 = { headers?: HTTPHeaders$1; method: HTTPMethod$1; credentials?: RequestCredentials; body?: HTTPBody$1; }; type InitOverrideFunction$1 = (requestContext: { init: HTTPRequestInit$1; context: RequestOpts$1; }) => Promise; interface FetchParams$1 { url: string; init: RequestInit; } interface RequestOpts$1 { path: string; method: HTTPMethod$1; headers: HTTPHeaders$1; query?: HTTPQuery$1; body?: HTTPBody$1; } interface RequestContext$1 { fetch: FetchAPI$1; url: string; init: RequestInit; } interface ResponseContext$1 { fetch: FetchAPI$1; url: string; init: RequestInit; response: Response; } interface ErrorContext$1 { fetch: FetchAPI$1; url: string; init: RequestInit; error: unknown; response?: Response; } interface Middleware$1 { pre?(context: RequestContext$1): Promise; post?(context: ResponseContext$1): Promise; onError?(context: ErrorContext$1): Promise; } interface ApiResponse$2 { raw: Response; value(): Promise; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/inference/models/DenseEmbedding.d.ts /** * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * A dense embedding of a single input * @export * @interface DenseEmbedding */ interface DenseEmbedding { /** * The dense embedding values. * @type {Array} * @memberof DenseEmbedding */ values: Array; /** * Indicates whether this is a 'dense' or 'sparse' embedding. * @type {string} * @memberof DenseEmbedding */ vectorType: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/inference/models/EmbedRequestInputsInner.d.ts /** * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface EmbedRequestInputsInner */ interface EmbedRequestInputsInner { /** * The text input to generate embeddings for. * @type {string} * @memberof EmbedRequestInputsInner */ text?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/inference/models/EmbedRequest.d.ts /** * * @export * @interface EmbedRequest */ interface EmbedRequest { /** * The [model](https://docs.pinecone.io/guides/index-data/create-an-index#embedding-models) to use for embedding generation. * @type {string} * @memberof EmbedRequest */ model: string; /** * Additional model-specific parameters. Refer to the [model guide](https://docs.pinecone.io/guides/index-data/create-an-index#embedding-models) for available model parameters. * @type {{ [key: string]: any; }} * @memberof EmbedRequest */ parameters?: { [key: string]: any; }; /** * List of inputs to generate embeddings for. * @type {Array} * @memberof EmbedRequest */ inputs: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/inference/models/SparseEmbedding.d.ts /** * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * A sparse embedding of a single input * @export * @interface SparseEmbedding */ interface SparseEmbedding { /** * The sparse embedding values. * @type {Array} * @memberof SparseEmbedding */ sparseValues: Array; /** * The sparse embedding indices. * @type {Array} * @memberof SparseEmbedding */ sparseIndices: Array; /** * The normalized tokens used to create the sparse embedding. * @type {Array} * @memberof SparseEmbedding */ sparseTokens?: Array; /** * Indicates whether this is a 'dense' or 'sparse' embedding. * @type {string} * @memberof SparseEmbedding */ vectorType: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/inference/models/Embedding.d.ts /** * @type Embedding * Embedding of a single input * @export */ type Embedding = { vectorType: 'dense'; } & DenseEmbedding | { vectorType: 'sparse'; } & SparseEmbedding; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/inference/models/EmbeddingsListUsage.d.ts /** * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Usage statistics for the model inference. * @export * @interface EmbeddingsListUsage */ interface EmbeddingsListUsage { /** * Total number of tokens consumed across all inputs. * @type {number} * @memberof EmbeddingsListUsage */ totalTokens?: number; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/inference/models/EmbeddingsList.d.ts /** * Embeddings generated for the input. * @export * @interface EmbeddingsList */ interface EmbeddingsList { /** * The model used to generate the embeddings * @type {string} * @memberof EmbeddingsList */ model: string; /** * Indicates whether the response data contains 'dense' or 'sparse' embeddings. * @type {string} * @memberof EmbeddingsList */ vectorType: string; /** * The embeddings generated for the inputs. * @type {Array} * @memberof EmbeddingsList */ data: Array; /** * * @type {EmbeddingsListUsage} * @memberof EmbeddingsList */ usage: EmbeddingsListUsage; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/inference/models/ModelInfoSupportedParameterAllowedValuesInner.d.ts /** * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface ModelInfoSupportedParameterAllowedValuesInner */ interface ModelInfoSupportedParameterAllowedValuesInner {} //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/inference/models/ModelInfoSupportedParameterDefault.d.ts /** * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The default value for the parameter when a parameter is optional. * @export * @interface ModelInfoSupportedParameterDefault */ interface ModelInfoSupportedParameterDefault {} //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/inference/models/ModelInfoSupportedParameter.d.ts /** * Describes a parameter supported by the model, including parameter value constraints. * @export * @interface ModelInfoSupportedParameter */ interface ModelInfoSupportedParameter { /** * The name of the parameter. * @type {string} * @memberof ModelInfoSupportedParameter */ parameter: string; /** * The parameter type e.g. 'one_of', 'numeric_range', or 'any'. * * If the type is 'one_of', then 'allowed_values' will be set, and the value specified must be one of the allowed values. 'one_of' is only compatible with value_type 'string' or 'integer'. * * If 'numeric_range', then 'min' and 'max' will be set, then the value specified must adhere to the value_type and must fall within the `[min, max]` range (inclusive). * * If 'any' then any value is allowed, as long as it adheres to the value_type. * @type {string} * @memberof ModelInfoSupportedParameter */ type: string; /** * The type of value the parameter accepts, e.g. 'string', 'integer', 'float', or 'boolean'. * @type {string} * @memberof ModelInfoSupportedParameter */ valueType: string; /** * Whether the parameter is required (true) or optional (false). * @type {boolean} * @memberof ModelInfoSupportedParameter */ required: boolean; /** * The allowed parameter values when the type is 'one_of'. * @type {Array} * @memberof ModelInfoSupportedParameter */ allowedValues?: Array; /** * The minimum allowed value (inclusive) when the type is 'numeric_range'. * @type {number} * @memberof ModelInfoSupportedParameter */ min?: number; /** * The maximum allowed value (inclusive) when the type is 'numeric_range'. * @type {number} * @memberof ModelInfoSupportedParameter */ max?: number; /** * * @type {ModelInfoSupportedParameterDefault} * @memberof ModelInfoSupportedParameter */ _default?: ModelInfoSupportedParameterDefault; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/inference/models/ModelInfo.d.ts /** * Represents the model configuration including model type, supported parameters, and other model details. * @export * @interface ModelInfo */ interface ModelInfo { /** * The name of the model. * @type {string} * @memberof ModelInfo */ model: string; /** * A summary of the model. * @type {string} * @memberof ModelInfo */ shortDescription: string; /** * The type of model (e.g. 'embed' or 'rerank'). * @type {string} * @memberof ModelInfo */ type: string; /** * Whether the embedding model produces 'dense' or 'sparse' embeddings. * @type {string} * @memberof ModelInfo */ vectorType?: string; /** * The default embedding model dimension (applies to dense embedding models only). * @type {number} * @memberof ModelInfo */ defaultDimension?: number; /** * The modality of the model (e.g. 'text'). * @type {string} * @memberof ModelInfo */ modality?: string; /** * The maximum tokens per sequence supported by the model. * @type {number} * @memberof ModelInfo */ maxSequenceLength?: number; /** * The maximum batch size (number of sequences) supported by the model. * @type {number} * @memberof ModelInfo */ maxBatchSize?: number; /** * The name of the provider of the model. * @type {string} * @memberof ModelInfo */ providerName?: string; /** * The list of supported dimensions for the model (applies to dense embedding models only). * @type {Array} * @memberof ModelInfo */ supportedDimensions?: Array; /** * The distance metrics supported by the model for similarity search. * @type {Array} * @memberof ModelInfo */ supportedMetrics?: Array; /** * List of parameters supported by the model. * @type {Array} * @memberof ModelInfo */ supportedParameters: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/inference/models/ModelInfoList.d.ts /** * The list of available models. * @export * @interface ModelInfoList */ interface ModelInfoList { /** * List of available models. * @type {Array} * @memberof ModelInfoList */ models?: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/inference/models/RankedDocument.d.ts /** * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * A ranked document with a relevance score and an index position. * @export * @interface RankedDocument */ interface RankedDocument { /** * The index position of the document from the original request. * @type {number} * @memberof RankedDocument */ index: number; /** * The relevance of the document to the query, normalized between 0 and 1, with scores closer to 1 indicating higher relevance. * @type {number} * @memberof RankedDocument */ score: number; /** * Document for reranking * @type {{ [key: string]: any; }} * @memberof RankedDocument */ document?: { [key: string]: any; }; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/inference/models/RerankRequest.d.ts /** * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface RerankRequest */ interface RerankRequest { /** * The [model](https://docs.pinecone.io/guides/search/rerank-results#reranking-models) to use for reranking. * @type {string} * @memberof RerankRequest */ model: string; /** * The query to rerank documents against. * @type {string} * @memberof RerankRequest */ query: string; /** * The number of results to return sorted by relevance. Defaults to the number of inputs. * @type {number} * @memberof RerankRequest */ topN?: number; /** * Whether to return the documents in the response. * @type {boolean} * @memberof RerankRequest */ returnDocuments?: boolean; /** * The field(s) to consider for reranking. If not provided, the default is `["text"]`. * * The number of fields supported is [model-specific](https://docs.pinecone.io/guides/search/rerank-results#reranking-models). * @type {Array} * @memberof RerankRequest */ rankFields?: Array; /** * The documents to rerank. * @type {Array<{ [key: string]: any; }>} * @memberof RerankRequest */ documents: Array<{ [key: string]: any; }>; /** * Additional model-specific parameters. Refer to the [model guide](https://docs.pinecone.io/guides/search/rerank-results#reranking-models) for available model parameters. * @type {{ [key: string]: any; }} * @memberof RerankRequest */ parameters?: { [key: string]: any; }; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/inference/models/RerankResultUsage.d.ts /** * Pinecone Inference API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Usage statistics for the model inference. * @export * @interface RerankResultUsage */ interface RerankResultUsage { /** * The number of rerank units consumed by this operation. * @type {number} * @memberof RerankResultUsage */ rerankUnits?: number; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/inference/models/RerankResult.d.ts /** * The result of a reranking request. * @export * @interface RerankResult */ interface RerankResult { /** * The model used to rerank documents. * @type {string} * @memberof RerankResult */ model: string; /** * The reranked documents. * @type {Array} * @memberof RerankResult */ data: Array; /** * * @type {RerankResultUsage} * @memberof RerankResult */ usage: RerankResultUsage; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/inference/apis/InferenceApi.d.ts interface EmbedOperationRequest { xPineconeApiVersion: string; embedRequest?: EmbedRequest; } interface GetModelRequest { xPineconeApiVersion: string; modelName: string; } interface ListModelsRequest { xPineconeApiVersion: string; type?: string; vectorType?: string; } interface RerankOperationRequest { xPineconeApiVersion: string; rerankRequest?: RerankRequest; } /** * */ declare class InferenceApi extends BaseAPI$1 { /** * Generate vector embeddings for input data. This endpoint uses Pinecone\'s [hosted embedding models](https://docs.pinecone.io/guides/index-data/create-an-index#embedding-models). * Generate vectors */ embedRaw(requestParameters: EmbedOperationRequest, initOverrides?: RequestInit | InitOverrideFunction$1): Promise>; /** * Generate vector embeddings for input data. This endpoint uses Pinecone\'s [hosted embedding models](https://docs.pinecone.io/guides/index-data/create-an-index#embedding-models). * Generate vectors */ embed(requestParameters: EmbedOperationRequest, initOverrides?: RequestInit | InitOverrideFunction$1): Promise; /** * Get a description of a model hosted by Pinecone. You can use hosted models as an integrated part of Pinecone operations or for standalone embedding and reranking. For more details, see [Vector embedding](https://docs.pinecone.io/guides/index-data/indexing-overview#vector-embedding) and [Rerank results](https://docs.pinecone.io/guides/search/rerank-results). * Describe a model */ getModelRaw(requestParameters: GetModelRequest, initOverrides?: RequestInit | InitOverrideFunction$1): Promise>; /** * Get a description of a model hosted by Pinecone. You can use hosted models as an integrated part of Pinecone operations or for standalone embedding and reranking. For more details, see [Vector embedding](https://docs.pinecone.io/guides/index-data/indexing-overview#vector-embedding) and [Rerank results](https://docs.pinecone.io/guides/search/rerank-results). * Describe a model */ getModel(requestParameters: GetModelRequest, initOverrides?: RequestInit | InitOverrideFunction$1): Promise; /** * List the embedding and reranking models hosted by Pinecone. You can use hosted models as an integrated part of Pinecone operations or for standalone embedding and reranking. For more details, see [Vector embedding](https://docs.pinecone.io/guides/index-data/indexing-overview#vector-embedding) and [Rerank results](https://docs.pinecone.io/guides/search/rerank-results). * List available models */ listModelsRaw(requestParameters: ListModelsRequest, initOverrides?: RequestInit | InitOverrideFunction$1): Promise>; /** * List the embedding and reranking models hosted by Pinecone. You can use hosted models as an integrated part of Pinecone operations or for standalone embedding and reranking. For more details, see [Vector embedding](https://docs.pinecone.io/guides/index-data/indexing-overview#vector-embedding) and [Rerank results](https://docs.pinecone.io/guides/search/rerank-results). * List available models */ listModels(requestParameters: ListModelsRequest, initOverrides?: RequestInit | InitOverrideFunction$1): Promise; /** * Rerank results according to their relevance to a query. For guidance and examples, see [Rerank results](https://docs.pinecone.io/guides/search/rerank-results). * Rerank results */ rerankRaw(requestParameters: RerankOperationRequest, initOverrides?: RequestInit | InitOverrideFunction$1): Promise>; /** * Rerank results according to their relevance to a query. For guidance and examples, see [Rerank results](https://docs.pinecone.io/guides/search/rerank-results). * Rerank results */ rerank(requestParameters: RerankOperationRequest, initOverrides?: RequestInit | InitOverrideFunction$1): Promise; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/inference/embed.d.ts /** * Options for generating embeddings. */ interface EmbedOptions { /** * The [model](https://docs.pinecone.io/guides/index-data/create-an-index#embedding-models) to use for embedding generation. */ model: string; /** * List of inputs to generate embeddings for. */ inputs: Array; /** * Additional model-specific parameters. Refer to the [model guide](https://docs.pinecone.io/guides/index-data/create-an-index#embedding-models) for available model parameters. * * As a convenience, `inputType` is automatically converted to the API's * `input_type` parameter. All other parameters are passed through unchanged, * so they must use the model's documented (snake_case) parameter names. */ parameters?: Record; } declare const embed: (infApi: InferenceApi) => (options: EmbedOptions) => Promise; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/inference/rerank.d.ts /** * Options for reranking documents against a query. */ interface RerankOptions { /** * The [model](https://docs.pinecone.io/guides/search/rerank-results#reranking-models) to use for reranking. */ model: string; /** * The query to rerank documents against. */ query: string; /** * The documents to rerank. */ documents: Array<{ [key: string]: string; } | string>; /** * The number of results to return sorted by relevance. Defaults to the number of inputs. */ topN?: number; /** * Whether to return the documents in the response. */ returnDocuments?: boolean; /** * The field(s) to consider for reranking. If not provided, the default is `["text"]`. * * The number of fields supported is [model-specific](https://docs.pinecone.io/guides/search/rerank-results#reranking-models). */ rankFields?: Array; /** * Additional model-specific parameters. Refer to the [model guide](https://docs.pinecone.io/guides/search/rerank-results#reranking-models) for available model parameters. */ parameters?: { [key: string]: string; }; } declare const rerank: (infApi: InferenceApi) => (options: RerankOptions) => Promise; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/inference/getModel.d.ts declare const getModel: (infApi: InferenceApi) => (modelName: string) => Promise; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/inference/listModels.d.ts /** * The options for listing models. */ interface ListModelsOptions { /** * Filter to limit the models returned. ('embed' or 'rerank') */ type?: string; /** * Filter embedding models by vector type ('dense' or 'sparse'). Only relevant when type is 'embed'. */ vectorType?: string; } declare const listModels: (infApi: InferenceApi) => (options?: ListModelsOptions) => Promise; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/inference/inference.d.ts declare class Inference { /** @hidden */ _embed: ReturnType; /** @hidden */ _rerank: ReturnType; /** @hidden */ _listModels: ReturnType; /** @hidden */ _getModel: ReturnType; /** @internal */ config: PineconeConfiguration; constructor(config: PineconeConfiguration); /** * Generates embeddings for the provided inputs using the specified model and (optional) parameters. * * @example * ````typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const embeddings = await pc.inference.embed({ * model: 'multilingual-e5-large', * inputs: ['Who created the first computer?'], * parameters: { * inputType: 'passage', * truncate: 'END', * } * }); * console.log(embeddings); * // { * // model: 'multilingual-e5-large', * // vectorType: 'dense', * // data: [ { values: [Array], vectorType: 'dense' } ], * // usage: { totalTokens: 10 } * // } * ``` * * @param options - The {@link EmbedOptions} for generating embeddings. * @returns A promise that resolves to {@link EmbeddingsList}. * */ embed(options: EmbedOptions): Promise; /** * Rerank documents against a query with a reranking model. Each document is ranked in descending relevance order * against the query provided. * * @example * ````typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const myQuery = 'What are some good Turkey dishes for Thanksgiving?'; * * // Option 1: Documents as an array of strings * const myDocsStrings = [ * 'I love turkey sandwiches with pastrami', * 'A lemon brined Turkey with apple sausage stuffing is a classic Thanksgiving main', * 'My favorite Thanksgiving dish is pumpkin pie', * 'Turkey is a great source of protein', * ]; * * // Option 1 response * const response = await pc.inference.rerank({ * model: 'bge-reranker-v2-m3', * query: myQuery, * documents: myDocsStrings * }); * console.log(response); * // { * // model: 'bge-reranker-v2-m3', * // data: [ * // { index: 1, score: 0.5633179, document: [Object] }, * // { index: 2, score: 0.02013874, document: [Object] }, * // { index: 3, score: 0.00035419367, document: [Object] }, * // { index: 0, score: 0.00021485926, document: [Object] } * // ], * // usage: { rerankUnits: 1 } * // } * * // Option 2: Documents as an array of objects * const myDocsObjs = [ * { * title: 'Turkey Sandwiches', * body: 'I love turkey sandwiches with pastrami', * }, * { * title: 'Lemon Turkey', * body: 'A lemon brined Turkey with apple sausage stuffing is a classic Thanksgiving main', * }, * { * title: 'Thanksgiving', * body: 'My favorite Thanksgiving dish is pumpkin pie', * }, * { title: 'Protein Sources', body: 'Turkey is a great source of protein' }, * ]; * * // Option 2: Options object declaring which custom key to rerank on * // Note: If no custom key is passed via `rankFields`, each doc must contain a `text` key, and that will act as the default) * const response = await pc.inference.rerank({ * model: 'bge-reranker-v2-m3', * query: myQuery, * documents: myDocsObjs, * topN: 3, * returnDocuments: false, * rankFields: ['body'], * parameters: { * inputType: 'passage', * truncate: 'END', * }, * }); * console.log(response); * // { * // model: 'bge-reranker-v2-m3', * // data: [ * // { index: 1, score: 0.5633179, document: undefined }, * // { index: 2, score: 0.02013874, document: undefined }, * // { index: 3, score: 0.00035419367, document: undefined }, * // ], * // usage: { rerankUnits: 1 } * //} * ``` * * @param options - The {@link RerankOptions} for the reranking operation. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @returns A promise that resolves to {@link RerankResult}. * */ rerank(options: RerankOptions): Promise; /** * List available models hosted by Pinecone. * * @example * ````typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const models = await pc.inference.listModels(); * console.log(models); * // { * // models: [ * // { * // model: 'llama-text-embed-v2', * // shortDescription: 'A high performance dense embedding model optimized for multilingual and cross-lingual text question-answering retrieval with support for long documents (up to 2048 tokens) and dynamic embedding size (Matryoshka Embeddings).', * // type: 'embed', * // vectorType: 'dense', * // defaultDimension: 1024, * // modality: 'text', * // maxSequenceLength: 2048, * // maxBatchSize: 96, * // providerName: 'NVIDIA', * // supportedDimensions: [Array], * // supportedMetrics: [Array], * // supportedParameters: [Array] * // }, * // ... * // { * // model: 'pinecone-rerank-v0', * // shortDescription: 'A state of the art reranking model that out-performs competitors on widely accepted benchmarks. It can handle chunks up to 512 tokens (1-2 paragraphs)', * // type: 'rerank', * // vectorType: undefined, * // defaultDimension: undefined, * // modality: 'text', * // maxSequenceLength: 512, * // maxBatchSize: 100, * // providerName: 'Pinecone', * // supportedDimensions: undefined, * // supportedMetrics: undefined, * // supportedParameters: [Array] * // } * // ] * // } * ``` * * @param options - (Optional) A {@link ListModelsOptions} object to filter the models returned. * @returns A promise that resolves to {@link ModelInfoList}. * */ listModels(options?: ListModelsOptions): Promise; /** * Get the information for a model hosted by Pinecone. * * @example * ````typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const model = await pc.inference.getModel('pinecone-sparse-english-v0'); * console.log(model); * // { * // model: 'pinecone-sparse-english-v0', * // shortDescription: 'A sparse embedding model for converting text to sparse vectors for keyword or hybrid semantic/keyword search. Built on the innovations of the DeepImpact architecture.', * // type: 'embed', * // vectorType: 'sparse', * // defaultDimension: undefined, * // modality: 'text', * // maxSequenceLength: 512, * // maxBatchSize: 96, * // providerName: 'Pinecone', * // supportedDimensions: undefined, * // supportedMetrics: [ 'DotProduct' ], * // supportedParameters: [ * // { * // parameter: 'input_type', * // type: 'one_of', * // valueType: 'string', * // required: true, * // allowedValues: [Array], * // min: undefined, * // max: undefined, * // _default: undefined * // }, * // { * // parameter: 'truncate', * // type: 'one_of', * // valueType: 'string', * // required: false, * // allowedValues: [Array], * // min: undefined, * // max: undefined, * // _default: 'END' * // }, * // { * // parameter: 'return_tokens', * // type: 'any', * // valueType: 'boolean', * // required: false, * // allowedValues: undefined, * // min: undefined, * // max: undefined, * // _default: false * // } * // ] * // } * ``` * * @param modelName - The model name you would like to describe. * @returns A promise that resolves to {@link ModelInfo}. * */ getModel(modelName: string): Promise; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/LegacyMetadataField.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * A legacy metadata field from indexes created before typed schema fields were introduced. The original data type of the field (string, float, boolean, etc.) was not recorded. Only the `filterable` flag is available. This field type will not appear in new indexes; it may appear in responses for older indexes pending schema migration. * @export * @interface LegacyMetadataField */ interface LegacyMetadataField { /** * Whether this field is indexed for metadata filtering. * @type {boolean} * @memberof LegacyMetadataField */ filterable: boolean; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/BooleanField.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * A boolean field configuration. Boolean values are not declared in the index schema; include them as document metadata instead — they are indexed automatically at upsert time. * @export * @interface BooleanField */ interface BooleanField { /** * Identifies this as a boolean field. Must be `boolean`. * @type {string} * @memberof BooleanField */ type: BooleanFieldTypeEnum; /** * Optional description for this field. * @type {string} * @memberof BooleanField */ description?: string; /** * Whether this field is indexed for metadata filtering. * @type {boolean} * @memberof BooleanField */ filterable?: boolean; } /** * @export */ declare const BooleanFieldTypeEnum: { readonly Boolean: "boolean"; }; type BooleanFieldTypeEnum = typeof BooleanFieldTypeEnum[keyof typeof BooleanFieldTypeEnum]; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/DenseVectorField.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * A dense vector field configuration. Stores fixed-dimension floating-point vectors for approximate nearest-neighbor (ANN) search. * @export * @interface DenseVectorField */ interface DenseVectorField { /** * Identifies this as a dense vector field. Must be `dense_vector`. * @type {string} * @memberof DenseVectorField */ type: DenseVectorFieldTypeEnum; /** * The number of dimensions in the dense vectors stored in this field. * @type {number} * @memberof DenseVectorField */ dimension: number; /** * The distance metric used for similarity search. * Possible values: `cosine`, `dotproduct`, or `euclidean`. * @type {string} * @memberof DenseVectorField */ metric: string; } /** * @export */ declare const DenseVectorFieldTypeEnum: { readonly DenseVector: "dense_vector"; readonly SparseVector: "sparse_vector"; readonly SemanticText: "semantic_text"; readonly String: "string"; readonly StringList: "string_list"; readonly Float: "float"; readonly Boolean: "boolean"; }; type DenseVectorFieldTypeEnum = typeof DenseVectorFieldTypeEnum[keyof typeof DenseVectorFieldTypeEnum]; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/FloatField.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * A numeric (floating-point) field configuration. Numeric values are not declared in the index schema; include them as document metadata instead — they are indexed automatically at upsert time. * @export * @interface FloatField */ interface FloatField { /** * Identifies this as a float field. Must be `float`. * @type {string} * @memberof FloatField */ type: FloatFieldTypeEnum; /** * Optional description for this field. * @type {string} * @memberof FloatField */ description?: string; /** * Whether this field is indexed for metadata filtering. * @type {boolean} * @memberof FloatField */ filterable?: boolean; } /** * @export */ declare const FloatFieldTypeEnum: { readonly Float: "float"; }; type FloatFieldTypeEnum = typeof FloatFieldTypeEnum[keyof typeof FloatFieldTypeEnum]; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/IntegerField.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * A legacy integer field configuration. Integer fields were used in older index schemas before numeric values were normalized to `float` at upsert time. New indexes will not produce this field type; it may appear in responses for indexes created before that normalization was introduced. * @export * @interface IntegerField */ interface IntegerField { /** * Identifies this as an integer field. Must be `integer`. * @type {string} * @memberof IntegerField */ type: IntegerFieldTypeEnum; /** * Optional description for this field. * @type {string} * @memberof IntegerField */ description?: string; /** * Whether this field is indexed for metadata filtering. * @type {boolean} * @memberof IntegerField */ filterable?: boolean; } /** * @export */ declare const IntegerFieldTypeEnum: { readonly Integer: "integer"; }; type IntegerFieldTypeEnum = typeof IntegerFieldTypeEnum[keyof typeof IntegerFieldTypeEnum]; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/ResponseStringFieldFullTextSearchNgram.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Character n-gram tokenization configuration. Present only when the field is configured for n-gram substring matching. * @export * @interface ResponseStringFieldFullTextSearchNgram */ interface ResponseStringFieldFullTextSearchNgram { /** * Minimum n-gram length. * @type {number} * @memberof ResponseStringFieldFullTextSearchNgram */ minGram: number; /** * Maximum n-gram length. * @type {number} * @memberof ResponseStringFieldFullTextSearchNgram */ maxGram: number; /** * Whether only prefix n-grams anchored at the start of the token are generated. * @type {boolean} * @memberof ResponseStringFieldFullTextSearchNgram */ prefixOnly: boolean; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/ResponseStringFieldFullTextSearch.d.ts /** * Full-text search configuration. Present when the field is indexed for full-text search. * @export * @interface ResponseStringFieldFullTextSearch */ interface ResponseStringFieldFullTextSearch { /** * The language used for text analysis. Defaults to `en`. * @type {string} * @memberof ResponseStringFieldFullTextSearch */ language: string; /** * Whether stemming is applied during text analysis. * @type {boolean} * @memberof ResponseStringFieldFullTextSearch */ stemming: boolean; /** * Whether stop words are filtered during text analysis. Only `true` if `stemming: true`. * @type {boolean} * @memberof ResponseStringFieldFullTextSearch */ stopWords: boolean; /** * * @type {ResponseStringFieldFullTextSearchNgram} * @memberof ResponseStringFieldFullTextSearch */ ngram?: ResponseStringFieldFullTextSearchNgram; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/ResponseStringField.d.ts /** * A string field as returned in index schema responses. String fields configured for full-text search include a `full_text_search` object; string fields used for metadata filtering only include a `filterable` flag. * @export * @interface ResponseStringField */ interface ResponseStringField { /** * Identifies this as a string field. Must be `string`. * @type {string} * @memberof ResponseStringField */ type: ResponseStringFieldTypeEnum; /** * Optional description for this field. * @type {string} * @memberof ResponseStringField */ description?: string; /** * * @type {ResponseStringFieldFullTextSearch} * @memberof ResponseStringField */ fullTextSearch?: ResponseStringFieldFullTextSearch; /** * Whether this field is indexed for metadata filtering. * @type {boolean} * @memberof ResponseStringField */ filterable?: boolean; } /** * @export */ declare const ResponseStringFieldTypeEnum: { readonly String: "string"; }; type ResponseStringFieldTypeEnum = typeof ResponseStringFieldTypeEnum[keyof typeof ResponseStringFieldTypeEnum]; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/SemanticTextField.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * A semantic text field configuration. Backed by an integrated embedding model that embeds text at write and query time, enabling semantic similarity search without separate embedding calls. * @export * @interface SemanticTextField */ interface SemanticTextField { /** * Identifies this as a semantic text field. Must be `semantic_text`. * @type {string} * @memberof SemanticTextField */ type: SemanticTextFieldTypeEnum; /** * The name of the integrated embedding model to use for this field. * @type {string} * @memberof SemanticTextField */ model: string; /** * The distance metric used for similarity search. Defaults to the model's preferred metric if not specified. * Possible values: `cosine`, `dotproduct`, or `euclidean`. * @type {string} * @memberof SemanticTextField */ metric?: string; /** * Model-specific parameters applied at write time, such as `input_type`. * @type {object} * @memberof SemanticTextField */ writeParameters?: object; /** * Model-specific parameters applied at query time, such as `input_type`. * @type {object} * @memberof SemanticTextField */ readParameters?: object; } /** * @export */ declare const SemanticTextFieldTypeEnum: { readonly SemanticText: "semantic_text"; }; type SemanticTextFieldTypeEnum = typeof SemanticTextFieldTypeEnum[keyof typeof SemanticTextFieldTypeEnum]; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/SparseVectorField.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * A sparse vector field configuration. Stores sparse vectors for keyword or hybrid search. * @export * @interface SparseVectorField */ interface SparseVectorField { /** * Identifies this as a sparse vector field. Must be `sparse_vector`. * @type {string} * @memberof SparseVectorField */ type: SparseVectorFieldTypeEnum; } /** * @export */ declare const SparseVectorFieldTypeEnum: { readonly SparseVector: "sparse_vector"; }; type SparseVectorFieldTypeEnum = typeof SparseVectorFieldTypeEnum[keyof typeof SparseVectorFieldTypeEnum]; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/StringListField.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * A string array field configuration. String array values are not declared in the index schema; include them as document metadata instead — they are indexed automatically at upsert time. * @export * @interface StringListField */ interface StringListField { /** * Identifies this as a string array field. Must be `string_list`. * @type {string} * @memberof StringListField */ type: StringListFieldTypeEnum; /** * Optional description for this field. * @type {string} * @memberof StringListField */ description?: string; /** * Whether this field is indexed for metadata filtering. * @type {boolean} * @memberof StringListField */ filterable?: boolean; } /** * @export */ declare const StringListFieldTypeEnum: { readonly StringList: "string_list"; }; type StringListFieldTypeEnum = typeof StringListFieldTypeEnum[keyof typeof StringListFieldTypeEnum]; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/TypedIndexSchemaField.d.ts /** * @type TypedIndexSchemaField * A schema field that carries a `type` discriminator. This covers all field types in current use. See `IndexSchemaField` for the full union that also includes legacy untyped fields. * @export */ type TypedIndexSchemaField = { type: 'boolean'; } & BooleanField | { type: 'dense_vector'; } & DenseVectorField | { type: 'float'; } & FloatField | { type: 'integer'; } & IntegerField | { type: 'semantic_text'; } & SemanticTextField | { type: 'sparse_vector'; } & SparseVectorField | { type: 'string'; } & ResponseStringField | { type: 'string_list'; } & StringListField; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/IndexSchemaField.d.ts /** * @type IndexSchemaField * The configuration of a single field in the index schema. * Typed fields (all current field types) carry a `type` discriminator property. * Legacy fields from indexes created before typed schemas were introduced carry * no `type` property and are represented as {@link LegacyMetadataField}. * @export */ type IndexSchemaField = TypedIndexSchemaField | LegacyMetadataField; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/IndexSchema.d.ts /** * The schema of a Pinecone index. The schema defines the typed fields that documents in the index can contain, including vector fields, semantic text fields, and metadata fields. * @export * @interface IndexSchema */ interface IndexSchema { /** * A map of field names to their configurations. Field names must be unique, non-empty strings and must not use the reserved names `_id`, `_values`, or `_sparse_values`. * @type {{ [key: string]: IndexSchemaField; }} * @memberof IndexSchema */ fields: { [key: string]: IndexSchemaField; }; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/BackupModel.d.ts /** * The BackupModel describes the configuration and status of a Pinecone backup. * @export * @interface BackupModel */ interface BackupModel { /** * Unique identifier for the backup. * @type {string} * @memberof BackupModel */ backupId: string; /** * Name of the index from which the backup was taken. * @type {string} * @memberof BackupModel */ sourceIndexName: string; /** * ID of the index from which the backup was taken. * @type {string} * @memberof BackupModel */ sourceIndexId: string; /** * Optional user-defined name for the backup. * @type {string} * @memberof BackupModel */ name?: string; /** * Optional description providing context for the backup. * @type {string} * @memberof BackupModel */ description?: string; /** * Current status of the backup. * @type {string} * @memberof BackupModel */ status: string; /** * Cloud provider where the backup is stored. * @type {string} * @memberof BackupModel */ cloud: string; /** * Cloud region where the backup is stored. * @type {string} * @memberof BackupModel */ region: string; /** * * @type {IndexSchema} * @memberof BackupModel */ schema?: IndexSchema; /** * Total number of records in the backup. * @type {number} * @memberof BackupModel */ recordCount?: number; /** * Number of namespaces in the backup. * @type {number} * @memberof BackupModel */ namespaceCount?: number; /** * Size of the backup in bytes. * @type {number} * @memberof BackupModel */ sizeBytes?: number; /** * Custom user tags added to an index. Keys must be 80 characters or less. Values must be 120 characters or less. Keys must be alphanumeric, '_', or '-'. Values must be alphanumeric, ';', '@', '_', '-', '.', '+', or ' '. To unset a key, set the value to be an empty string. * @type {{ [key: string]: string; }} * @memberof BackupModel */ tags?: { [key: string]: string; }; /** * Timestamp when the backup was created. * @type {Date} * @memberof BackupModel */ createdAt?: Date; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/PaginationResponse.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The pagination object that is returned with paginated responses. * @export * @interface PaginationResponse */ interface PaginationResponse { /** * The token to use to retrieve the next page of results. * @type {string} * @memberof PaginationResponse */ next: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/BackupList.d.ts /** * The list of backups that exist in the project. * @export * @interface BackupList */ interface BackupList { /** * List of backup objects * @type {Array} * @memberof BackupList */ data?: Array; /** * * @type {PaginationResponse} * @memberof BackupList */ pagination?: PaginationResponse; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/ByocDeployment.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Deployment configuration for a bring-your-own-compute (BYOC) index. * @export * @interface ByocDeployment */ interface ByocDeployment { /** * Identifies this as a BYOC deployment. Must be `byoc`. * @type {string} * @memberof ByocDeployment */ deploymentType: ByocDeploymentDeploymentTypeEnum; /** * The BYOC environment where the index is hosted. * @type {string} * @memberof ByocDeployment */ environment: string; } /** * @export */ declare const ByocDeploymentDeploymentTypeEnum: { readonly Byoc: "byoc"; }; type ByocDeploymentDeploymentTypeEnum = typeof ByocDeploymentDeploymentTypeEnum[keyof typeof ByocDeploymentDeploymentTypeEnum]; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/CollectionModel.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The CollectionModel describes the configuration and status of a Pinecone collection. * @export * @interface CollectionModel */ interface CollectionModel { /** * The name of the collection. * @type {string} * @memberof CollectionModel */ name: string; /** * The size of the collection in bytes. * @type {number} * @memberof CollectionModel */ size?: number; /** * The status of the collection. * Possible values: `Initializing`, `Ready`, or `Terminating`. * @type {string} * @memberof CollectionModel */ status: string; /** * The dimension of the vectors stored in each record held in the collection. * @type {number} * @memberof CollectionModel */ dimension?: number; /** * The number of records stored in the collection. * @type {number} * @memberof CollectionModel */ vectorCount?: number; /** * The environment where the collection is hosted. * @type {string} * @memberof CollectionModel */ environment: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/CollectionList.d.ts /** * The list of collections that exist in the project. * @export * @interface CollectionList */ interface CollectionList { /** * List of collections in the project * @type {Array} * @memberof CollectionList */ collections?: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/PatchIndexDeploymentRequest.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Deployment update parameters for pod-based indexes. Specify `replicas`, `pod_type`, or both. Deployment type, cloud/region, and environment cannot be changed after creation. Do not include a `deployment_type` field; it is not accepted. * @export * @interface PatchIndexDeploymentRequest */ interface PatchIndexDeploymentRequest { /** * The number of replicas. Replicas duplicate your index. They provide higher availability and throughput. Replicas can be scaled up or down as your needs change. * @type {number} * @memberof PatchIndexDeploymentRequest */ replicas?: number; /** * The type of pod to use. One of `s1`, `p1`, or `p2` appended with `.` and one of `x1`, `x2`, `x4`, or `x8`. * @type {string} * @memberof PatchIndexDeploymentRequest */ podType?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/PatchSemanticTextField.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Updated parameters for a semantic text field. * @export * @interface PatchSemanticTextField */ interface PatchSemanticTextField { /** * The field type. Must be `semantic_text`. * @type {string} * @memberof PatchSemanticTextField */ type: PatchSemanticTextFieldTypeEnum; /** * The name of the embedding model. Cannot be changed once set; only specify to confirm the current model when also updating parameters. * @type {string} * @memberof PatchSemanticTextField */ model?: string; /** * Updated model-specific parameters applied at write time. * @type {object} * @memberof PatchSemanticTextField */ writeParameters?: object; /** * Updated model-specific parameters applied at query time. * @type {object} * @memberof PatchSemanticTextField */ readParameters?: object; } /** * @export */ declare const PatchSemanticTextFieldTypeEnum: { readonly SemanticText: "semantic_text"; }; type PatchSemanticTextFieldTypeEnum = typeof PatchSemanticTextFieldTypeEnum[keyof typeof PatchSemanticTextFieldTypeEnum]; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/PatchIndexSchema.d.ts /** * Schema updates to apply to an existing index. Only `semantic_text` field parameters can be updated after index creation. The model itself cannot be changed once set; only `write_parameters` and `read_parameters` may be updated if the model stays the same. * @export * @interface PatchIndexSchema */ interface PatchIndexSchema { /** * A map of semantic text field names to their updated parameters. Only fields of type `semantic_text` may be specified. * @type {{ [key: string]: PatchSemanticTextField; }} * @memberof PatchIndexSchema */ fields: { [key: string]: PatchSemanticTextField; }; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/ScalingConfigManual.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The config to use for manual read capacity scaling. * @export * @interface ScalingConfigManual */ interface ScalingConfigManual { /** * The number of replicas to use. Replicas duplicate the compute resources and data of an index, allowing higher query throughput and availability. Setting replicas to 0 disables the index but can be used to reduce costs while usage is paused. * @type {number} * @memberof ScalingConfigManual */ replicas?: number; /** * The number of shards to use. Shards determine the storage capacity of an index, with each shard providing 250 GB of storage. * @type {number} * @memberof ScalingConfigManual */ shards?: number; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/ReadCapacityDedicatedConfig.d.ts /** * Configuration for dedicated read capacity. See [this guide](https://docs.pinecone.io/guides/index-data/dedicated-read-nodes) for more details on how to configure dedicated read capacity. * @export * @interface ReadCapacityDedicatedConfig */ interface ReadCapacityDedicatedConfig { /** * The type of machines to use. Available options: `b1` and `t1`. `t1` includes increased processing power and memory. * @type {string} * @memberof ReadCapacityDedicatedConfig */ nodeType?: string; /** * The type of scaling strategy to use. * @type {string} * @memberof ReadCapacityDedicatedConfig */ scaling?: string; /** * * @type {ScalingConfigManual} * @memberof ReadCapacityDedicatedConfig */ manual?: ScalingConfigManual; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/ReadCapacityDedicatedSpec.d.ts /** * * @export * @interface ReadCapacityDedicatedSpec */ interface ReadCapacityDedicatedSpec { [key: string]: any | any; /** * The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified. * @type {string} * @memberof ReadCapacityDedicatedSpec */ mode: string; /** * * @type {ReadCapacityDedicatedConfig} * @memberof ReadCapacityDedicatedSpec */ dedicated: ReadCapacityDedicatedConfig; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/ReadCapacityOnDemandSpec.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface ReadCapacityOnDemandSpec */ interface ReadCapacityOnDemandSpec { /** * The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified. * @type {string} * @memberof ReadCapacityOnDemandSpec */ mode: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/ReadCapacity.d.ts /** * @type ReadCapacity * By default the index will be created with read capacity mode `OnDemand`. If you prefer to allocate dedicated read nodes for your workload, you must specify mode `Dedicated` and additional configurations for `node_type` and `scaling`. * @export */ type ReadCapacity = { mode: 'Dedicated'; } & ReadCapacityDedicatedSpec | { mode: 'OnDemand'; } & ReadCapacityOnDemandSpec; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/ConfigureIndexRequest.d.ts /** * Configuration updates to apply to an existing index. All fields are optional; only the fields you include are modified. * - `deployment`: Update pod-based scaling parameters (`replicas`, `pod_type`). * * Deployment type and cloud/region cannot be changed. * - `schema`: Update `semantic_text` field embedding parameters. Only * * `write_parameters` and `read_parameters` may be changed; the model cannot * be changed after creation. * - `read_capacity`: Update read capacity mode or dedicated node configuration * * for managed and BYOC indexes. Not applicable to pod-based indexes. * - `tags`: Update or delete index tags. Setting a tag value to `""` removes * * the tag. * - `deletion_protection`: Enable or disable deletion protection. * @export * @interface ConfigureIndexRequest */ interface ConfigureIndexRequest { /** * * @type {PatchIndexDeploymentRequest} * @memberof ConfigureIndexRequest */ deployment?: PatchIndexDeploymentRequest; /** * * @type {PatchIndexSchema} * @memberof ConfigureIndexRequest */ schema?: PatchIndexSchema; /** * * @type {ReadCapacity} * @memberof ConfigureIndexRequest */ readCapacity?: ReadCapacity; /** * Custom user tags added to an index. Keys must be 80 characters or less. Values must be 120 characters or less. Keys must be alphanumeric, '_', or '-'. Values must be alphanumeric, ';', '@', '_', '-', '.', '+', or ' '. To unset a key, set the value to be an empty string. * @type {{ [key: string]: string; }} * @memberof ConfigureIndexRequest */ tags?: { [key: string]: string; }; /** * Whether [deletion protection](http://docs.pinecone.io/guides/manage-data/manage-indexes#configure-deletion-protection) is enabled/disabled for the index. * Possible values: `disabled` or `enabled`. * @type {string} * @memberof ConfigureIndexRequest */ deletionProtection?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/ManagedDeployment.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Deployment configuration for a serverless (managed) index. Serverless indexes scale automatically and you are billed only for the resources you use. This deployment type also covers full-text search indexes, which are serverless under the hood. * @export * @interface ManagedDeployment */ interface ManagedDeployment { /** * Identifies this as a managed (serverless) deployment. Must be `managed`. * @type {string} * @memberof ManagedDeployment */ deploymentType: ManagedDeploymentDeploymentTypeEnum; /** * The public cloud where the index is hosted. * Possible values: `gcp`, `aws`, or `azure`. * @type {string} * @memberof ManagedDeployment */ cloud: string; /** * The region where the index is hosted. * @type {string} * @memberof ManagedDeployment */ region: string; } /** * @export */ declare const ManagedDeploymentDeploymentTypeEnum: { readonly Managed: "managed"; }; type ManagedDeploymentDeploymentTypeEnum = typeof ManagedDeploymentDeploymentTypeEnum[keyof typeof ManagedDeploymentDeploymentTypeEnum]; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/CreateIndexFromBackupResponse.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The response for creating an index from a backup. * @export * @interface CreateIndexFromBackupResponse */ interface CreateIndexFromBackupResponse { /** * The ID of the restore job that was created. * @type {string} * @memberof CreateIndexFromBackupResponse */ restoreJobId: string; /** * The ID of the index that was created from the backup. * @type {string} * @memberof CreateIndexFromBackupResponse */ indexId: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/StringFieldFullTextSearchNgram.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Character n-gram tokenization for substring matching. When present, the field is tokenized into character n-grams instead of words. Cannot be combined with `stemming` or `stop_words`. * @export * @interface StringFieldFullTextSearchNgram */ interface StringFieldFullTextSearchNgram { /** * Minimum n-gram length. Must be at least 1 and no greater than `max_gram`. * @type {number} * @memberof StringFieldFullTextSearchNgram */ minGram: number; /** * Maximum n-gram length. Must be no less than `min_gram` and at most 10. * @type {number} * @memberof StringFieldFullTextSearchNgram */ maxGram: number; /** * When `true`, only prefix n-grams anchored at the start of the token are generated (e.g. for autocomplete). Defaults to `false`. * @type {boolean} * @memberof StringFieldFullTextSearchNgram */ prefixOnly?: boolean; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/StringFieldFullTextSearch.d.ts /** * Full-text search configuration. When present, the field is indexed for full-text search. * `stop_words` requires `stemming: true`. `ngram` cannot be combined with `stemming` or `stop_words`. * @export * @interface StringFieldFullTextSearch */ interface StringFieldFullTextSearch { /** * The language for text analysis. Defaults to `en` if not specified. * @type {string} * @memberof StringFieldFullTextSearch */ language?: string; /** * Whether to apply stemming during text analysis. Defaults to `false`. * @type {boolean} * @memberof StringFieldFullTextSearch */ stemming?: boolean; /** * Whether to filter stop words during text analysis. Requires `stemming: true`. Defaults to `false`. * @type {boolean} * @memberof StringFieldFullTextSearch */ stopWords?: boolean; /** * * @type {StringFieldFullTextSearchNgram} * @memberof StringFieldFullTextSearch */ ngram?: StringFieldFullTextSearchNgram; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/StringField.d.ts /** * A string field configuration for full-text search. The `full_text_search` object is required; a string field without it will be rejected. * @export * @interface StringField */ interface StringField { /** * Identifies this as a string field. Must be `string`. * @type {string} * @memberof StringField */ type: StringFieldTypeEnum; /** * Optional description for this field. * @type {string} * @memberof StringField */ description?: string; /** * * @type {StringFieldFullTextSearch} * @memberof StringField */ fullTextSearch?: StringFieldFullTextSearch; } /** * @export */ declare const StringFieldTypeEnum: { readonly String: "string"; }; type StringFieldTypeEnum = typeof StringFieldTypeEnum[keyof typeof StringFieldTypeEnum]; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/CreateIndexSchemaField.d.ts /** * @type CreateIndexSchemaField * The configuration of a single field in the index schema at creation time. The `type` property determines how the field is stored and searched. * Supported field types: * - `dense_vector`: Fixed-dimension floating-point vectors for ANN search. - `sparse_vector`: Sparse vectors for keyword or hybrid search. - `semantic_text`: Text field backed by an integrated embedding model. - `string`: String field for full-text search (use `full_text_search` object) * * or metadata filtering. * - `string_list`: String array field for metadata filtering. - `float`: Numeric field for metadata filtering. Also accepts `"number"` as the type value. - `boolean`: Boolean field for metadata filtering. * Schema constraints enforced at creation time: * - At most one `dense_vector` field. - At most one `sparse_vector` field. - At most one `semantic_text` field; `semantic_text` cannot be combined with * * `dense_vector`, `sparse_vector`, or full-text search string fields. * - At least one primary field (`dense_vector`, `sparse_vector`, `semantic_text`, * * or a `string` field with `full_text_search`) must be present. * - Only `dense_vector`, `sparse_vector`, `semantic_text`, and `string` with * * `full_text_search` are accepted. The types `float`, `boolean`, * `string_list`, and `string` without `full_text_search` are not supported * and will be rejected. Include those values as document metadata instead — * they are indexed automatically at upsert time. * @export */ type CreateIndexSchemaField = { type: 'boolean'; } & BooleanField | { type: 'dense_vector'; } & DenseVectorField | { type: 'float'; } & FloatField | { type: 'semantic_text'; } & SemanticTextField | { type: 'sparse_vector'; } & SparseVectorField | { type: 'string'; } & StringField | { type: 'string_list'; } & StringListField; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/CreateIndexSchema.d.ts /** * The schema to use when creating a Pinecone index. Defines the typed fields that documents in the index can contain, including vector fields, semantic text fields, and metadata fields. * At least one primary field (`dense_vector`, `sparse_vector`, `semantic_text`, or a `string` field with `full_text_search`) must be present. * @export * @interface CreateIndexSchema */ interface CreateIndexSchema { /** * A map of field names to their configurations. Field names must be unique, non-empty strings and must not use the reserved names `_id`, `_values`, or `_sparse_values`. * @type {{ [key: string]: CreateIndexSchemaField; }} * @memberof CreateIndexSchema */ fields: { [key: string]: CreateIndexSchemaField; }; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/PodDeployment.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Deployment configuration for a pod-based index. * @export * @interface PodDeployment */ interface PodDeployment { /** * Identifies this as a pod-based deployment. Must be `pod`. * @type {string} * @memberof PodDeployment */ deploymentType: PodDeploymentDeploymentTypeEnum; /** * The environment where the index is hosted. * @type {string} * @memberof PodDeployment */ environment: string; /** * The number of replicas. Replicas duplicate your index. They provide higher availability and throughput. Replicas can be scaled up or down as your needs change. * @type {number} * @memberof PodDeployment */ replicas?: number; /** * The number of shards. Shards split your data across multiple pods so you can fit more data into an index. * @type {number} * @memberof PodDeployment */ shards?: number; /** * The type of pod to use. One of `s1`, `p1`, or `p2` appended with `.` and one of `x1`, `x2`, `x4`, or `x8`. * @type {string} * @memberof PodDeployment */ podType: string; } /** * @export */ declare const PodDeploymentDeploymentTypeEnum: { readonly Pod: "pod"; }; type PodDeploymentDeploymentTypeEnum = typeof PodDeploymentDeploymentTypeEnum[keyof typeof PodDeploymentDeploymentTypeEnum]; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/IndexDeploymentRequest.d.ts /** * @type IndexDeploymentRequest * The deployment configuration for index creation. The `deployment_type` field selects the infrastructure model. Defaults to `managed` (serverless) in `us-east-1` on `aws` if omitted. * - `pod`: Dedicated pod-based infrastructure. - `managed`: Serverless infrastructure managed by Pinecone, including * * full-text search indexes. * - `byoc`: Bring-your-own-compute. * @export */ type IndexDeploymentRequest = { deploymentType: 'byoc'; } & ByocDeployment | { deploymentType: 'managed'; } & ManagedDeployment | { deploymentType: 'pod'; } & PodDeployment; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/CreateIndexRequest.d.ts /** * The configuration needed to create a Pinecone index. * The `schema` field is required and defines the typed fields for the index. The `deployment` field selects infrastructure and defaults to managed (serverless) on AWS `us-east-1` if omitted. The `name` is auto-generated if not provided. * @export * @interface CreateIndexRequest */ interface CreateIndexRequest { /** * The name of the index. Must be unique within the project. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. If not provided, a name is generated automatically. Callers that require retry-safe behavior should provide an explicit name — a duplicate request with the same name returns 409, making success detectable on retry. * @type {string} * @memberof CreateIndexRequest */ name?: string; /** * * @type {IndexDeploymentRequest} * @memberof CreateIndexRequest */ deployment?: IndexDeploymentRequest; /** * * @type {CreateIndexSchema} * @memberof CreateIndexRequest */ schema: CreateIndexSchema; /** * The name of a collection from which to create the index. The collection must have been created from a pod-based index with a compatible schema. * @type {string} * @memberof CreateIndexRequest */ sourceCollection?: string; /** * The ID of a backup from which to restore the index. Mutually exclusive with `source_collection`. * @type {string} * @memberof CreateIndexRequest */ sourceBackupId?: string; /** * The ID of a customer-managed encryption key (CMEK) to use for this index. Requires CMEK to be enabled for your organization. * @type {string} * @memberof CreateIndexRequest */ cmekId?: string; /** * * @type {ReadCapacity} * @memberof CreateIndexRequest */ readCapacity?: ReadCapacity; /** * Custom user tags added to an index. Keys must be 80 characters or less. Values must be 120 characters or less. Keys must be alphanumeric, '_', or '-'. Values must be alphanumeric, ';', '@', '_', '-', '.', '+', or ' '. To unset a key, set the value to be an empty string. * @type {{ [key: string]: string; }} * @memberof CreateIndexRequest */ tags?: { [key: string]: string; }; /** * Whether [deletion protection](http://docs.pinecone.io/guides/manage-data/manage-indexes#configure-deletion-protection) is enabled/disabled for the index. * Possible values: `disabled` or `enabled`. * @type {string} * @memberof CreateIndexRequest */ deletionProtection?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/IndexDeployment.d.ts /** * @type IndexDeployment * The deployment configuration of a Pinecone index. The `deployment_type` field indicates which infrastructure model the index uses. * - `pod`: Dedicated pod-based infrastructure. Suitable for workloads that * * require predictable performance. * - `managed`: Serverless infrastructure managed by Pinecone, including * * full-text search indexes. Scales automatically; billed per usage. * - `byoc`: Bring-your-own-compute. Runs in customer-managed infrastructure. * @export */ type IndexDeployment = { deploymentType: 'byoc'; } & ByocDeployment | { deploymentType: 'managed'; } & ManagedDeployment | { deploymentType: 'pod'; } & PodDeployment; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/IndexModelStatus.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The current status of the index. * @export * @interface IndexModelStatus */ interface IndexModelStatus { /** * Whether the index is ready for use. * @type {boolean} * @memberof IndexModelStatus */ ready: boolean; /** * The current state of the index. * Possible values: `Initializing`, `InitializationFailed`, `ScalingUp`, `ScalingDown`, `ScalingUpPodSize`, `ScalingDownPodSize`, `Terminating`, `Ready`, or `Disabled`. * @type {string} * @memberof IndexModelStatus */ state: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/ReadCapacityStatus.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The current status of factors affecting the read capacity of a serverless index * @export * @interface ReadCapacityStatus */ interface ReadCapacityStatus { /** * The `state` describes the overall status of factors relating to the read capacity of an index. * * Available values: * - `Ready` is the state most of the time * - `Scaling` if the number of replicas or shards has been recently updated by calling the [configure index endpoint](https://docs.pinecone.io/reference/api/2026-04/control-plane/configure_index) * - `Migrating` if the index is being migrated to a new `node_type` * - `Error` if there is an error with the read capacity configuration. In that case, see `error_message` for more details. * @type {string} * @memberof ReadCapacityStatus */ state: string; /** * The number of replicas. Each replica has dedicated compute resources and data storage. Increasing this number will increase the total throughput of the index. * @type {number} * @memberof ReadCapacityStatus */ currentReplicas?: number; /** * The number of shards. Each shard has dedicated storage. Increasing shards alleiviates index fullness. * @type {number} * @memberof ReadCapacityStatus */ currentShards?: number; /** * An optional error message indicating any issues with your read capacity configuration * @type {string} * @memberof ReadCapacityStatus */ errorMessage?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/ReadCapacityDedicatedSpecResponse.d.ts /** * * @export * @interface ReadCapacityDedicatedSpecResponse */ interface ReadCapacityDedicatedSpecResponse { /** * The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified. * @type {string} * @memberof ReadCapacityDedicatedSpecResponse */ mode: string; /** * * @type {ReadCapacityDedicatedConfig} * @memberof ReadCapacityDedicatedSpecResponse */ dedicated: ReadCapacityDedicatedConfig; /** * * @type {ReadCapacityStatus} * @memberof ReadCapacityDedicatedSpecResponse */ status: ReadCapacityStatus; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/ReadCapacityOnDemandSpecResponse.d.ts /** * * @export * @interface ReadCapacityOnDemandSpecResponse */ interface ReadCapacityOnDemandSpecResponse { /** * The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified. * @type {string} * @memberof ReadCapacityOnDemandSpecResponse */ mode: string; /** * * @type {ReadCapacityStatus} * @memberof ReadCapacityOnDemandSpecResponse */ status: ReadCapacityStatus; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/ReadCapacityResponse.d.ts /** * @type ReadCapacityResponse * Response containing read capacity configuration * @export */ type ReadCapacityResponse = { mode: 'Dedicated'; } & ReadCapacityDedicatedSpecResponse | { mode: 'OnDemand'; } & ReadCapacityOnDemandSpecResponse; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/IndexModel.d.ts /** * The IndexModel describes the configuration and status of a Pinecone index. * @export * @interface IndexModel */ interface IndexModel { /** * The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. * @type {string} * @memberof IndexModel */ name: string; /** * The URL address where the index is hosted. * @type {string} * @memberof IndexModel */ host: string; /** * The private endpoint URL of an index. * @type {string} * @memberof IndexModel */ privateHost?: string; /** * * @type {IndexModelStatus} * @memberof IndexModel */ status: IndexModelStatus; /** * * @type {IndexDeployment} * @memberof IndexModel */ deployment: IndexDeployment; /** * * @type {ReadCapacityResponse} * @memberof IndexModel */ readCapacity?: ReadCapacityResponse; /** * The name of the collection this index was created from, if any. * @type {string} * @memberof IndexModel */ sourceCollection?: string; /** * The ID of the backup this index was restored from, if any. * @type {string} * @memberof IndexModel */ sourceBackupId?: string; /** * The ID of the customer-managed encryption key (CMEK) used to encrypt this index, if any. * @type {string} * @memberof IndexModel */ cmekId?: string; /** * * @type {IndexSchema} * @memberof IndexModel */ schema: IndexSchema; /** * Custom user tags added to an index. Keys must be 80 characters or less. Values must be 120 characters or less. Keys must be alphanumeric, '_', or '-'. Values must be alphanumeric, ';', '@', '_', '-', '.', '+', or ' '. To unset a key, set the value to be an empty string. * @type {{ [key: string]: string; }} * @memberof IndexModel */ tags?: { [key: string]: string; }; /** * Whether [deletion protection](http://docs.pinecone.io/guides/manage-data/manage-indexes#configure-deletion-protection) is enabled/disabled for the index. * Possible values: `disabled` or `enabled`. * @type {string} * @memberof IndexModel */ deletionProtection: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/IndexList.d.ts /** * The list of indexes that exist in the project. * @export * @interface IndexList */ interface IndexList { /** * List of indexes in the project * @type {Array} * @memberof IndexList */ indexes?: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/RestoreJobModel.d.ts /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The RestoreJobModel describes the status of a restore job. * @export * @interface RestoreJobModel */ interface RestoreJobModel { /** * Unique identifier for the restore job * @type {string} * @memberof RestoreJobModel */ restoreJobId: string; /** * Backup used for the restore * @type {string} * @memberof RestoreJobModel */ backupId: string; /** * Name of the index into which data is being restored * @type {string} * @memberof RestoreJobModel */ targetIndexName: string; /** * ID of the index * @type {string} * @memberof RestoreJobModel */ targetIndexId: string; /** * Status of the restore job * @type {string} * @memberof RestoreJobModel */ status: string; /** * Timestamp when the restore job started * @type {Date} * @memberof RestoreJobModel */ createdAt: Date; /** * Timestamp when the restore job finished * @type {Date} * @memberof RestoreJobModel */ completedAt?: Date; /** * The progress made by the restore job out of 100 * @type {number} * @memberof RestoreJobModel */ percentComplete?: number; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_control/models/RestoreJobList.d.ts /** * The list of restore jobs that exist in the project. * @export * @interface RestoreJobList */ interface RestoreJobList { /** * List of restore job objects * @type {Array} * @memberof RestoreJobList */ data: Array; /** * * @type {PaginationResponse} * @memberof RestoreJobList */ pagination?: PaginationResponse; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/preview/indexes/createIndex.d.ts /** * Options for creating a schema-based index using the 2026-01.alpha API. * * @alpha */ interface PreviewCreateIndexOptions extends Omit { /** The name of the index to create. Must be unique within the project. */ name: string; /** * When true, polls until the index is ready before returning. */ waitUntilReady?: boolean; /** * Maximum time in milliseconds to wait for the index to become ready when * `waitUntilReady` is `true`. Omit to poll indefinitely. * Throws {@link Errors.PineconeTimeoutError} if the deadline is exceeded. */ timeout?: number; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/preview/indexes/configureIndex.d.ts /** * Options for configuring an alpha index using the 2026-01.alpha API. * * All fields are optional — send only those you want to change. * * @alpha */ type PreviewConfigureIndexOptions = ConfigureIndexRequest; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/preview/indexes/createBackup.d.ts /** * Options for creating a backup of an index. * * @alpha */ interface PreviewCreateBackupOptions { /** Optional user-defined name for the backup. */ name?: string; /** Optional description providing context for the backup. */ description?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/preview/indexes/listIndexBackups.d.ts /** * Options for listing backups of an index. * * @alpha */ interface PreviewListIndexBackupsOptions { /** Maximum number of results to return per page (1–100, default: 10). */ limit?: number; /** Pagination token from a prior response to retrieve the next page. */ paginationToken?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/preview/indexes/listProjectBackups.d.ts /** * Options for listing all backups in a project. * * @alpha */ interface PreviewListProjectBackupsOptions { /** Maximum number of results to return per page (1–100, default: 10). */ limit?: number; /** Pagination token from a prior response to retrieve the next page. */ paginationToken?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/preview/indexes/createIndexFromBackup.d.ts /** * Options for creating an index from a backup. * * @see [Backups](https://docs.pinecone.io/guides/indexes/backups) * @alpha */ interface PreviewCreateIndexFromBackupOptions { /** The name of the index to create. 1–45 characters, alphanumeric and '-'. */ name: string; /** Optional tags to apply to the created index. Overrides backup tags if provided. */ tags?: Record; /** Whether to enable deletion protection on the created index. */ deletionProtection?: string; /** Optional read capacity configuration for the created index. */ readCapacity?: ReadCapacity; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/preview/indexes/listRestoreJobs.d.ts /** * Options for listing restore jobs. * * @see [Backups](https://docs.pinecone.io/guides/indexes/backups) * @alpha */ interface PreviewListRestoreJobsOptions { /** Maximum number of jobs to return (1–100, default 10). */ limit?: number; /** Pagination token from a previous response. */ paginationToken?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/preview/indexes/createCollection.d.ts /** * Options for creating a collection from a pod-based index. * * @see [Collections](https://docs.pinecone.io/guides/indexes/collections/understanding-collections) * @alpha */ interface PreviewCreateCollectionOptions { /** The name of the collection. Must be 1-45 chars, lowercase alphanumeric + '-', start/end alphanumeric. */ name: string; /** The name of the source pod-based index to snapshot. */ source: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/preview/indexes/previewIndexes.d.ts /** * Control-plane index operations for Pinecone's alpha API (`2026-01.alpha`). * Access via `pc.preview.indexes`. * * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const list = await pc.preview.indexes.list(); * ``` * * Preview surface is not covered by SemVer — signatures and behavior * may change in any minor SDK release. Pin your SDK version when * relying on preview features. * * @alpha */ declare class PreviewIndexes { private _api; private _config; constructor(config: PineconeConfiguration); /** * Lists all indexes in the project. The returned list includes `schema` * fields not present in the stable API's {@link IndexList}. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const indexList = await pc.preview.indexes.list(); * console.log(indexList); * // { * // indexes: [ * // { * // name: 'my-schema-index', * // metric: 'cosine', * // host: 'my-schema-index-abc123.svc.pinecone.io', * // schema: { * // fields: { chunk_text: { type: 'string', fullTextSearch: {} } } * // }, * // status: { ready: true, state: 'Ready' } * // } * // ] * // } * ``` * * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves to {@link PreviewIndexList}. * @alpha */ list(): Promise; /** * Creates a schema-based index using the `2026-01.alpha` API. * * The `schema` object defines the fields stored in each document. At least one * primary field (`dense_vector`, `sparse_vector`, `semantic_text`, or a `string` * field with `fullTextSearch`) must be present. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const indexModel = await pc.preview.indexes.create({ * name: 'my-schema-index', * schema: { * fields: { * chunk_text: { type: 'string', fullTextSearch: {} }, * }, * }, * waitUntilReady: true, * }); * console.log(indexModel.name); * // 'my-schema-index' * ``` * * @param options - The {@link PreviewCreateIndexOptions} for creating the index, including `name`, `schema`, and optional `waitUntilReady` and `timeout`. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeBadRequestError} when index creation fails due to invalid parameters or project quotas. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @throws {@link Errors.PineconeConflictError} when attempting to create an index using a name that already exists in the project. * @returns A promise that resolves to {@link PreviewIndexModel} when the creation request is accepted. Use `waitUntilReady: true` to block until the index is ready for data operations. * @alpha */ create(options: PreviewCreateIndexOptions): Promise; /** * Describes an index by name, returning its configuration, schema, and status. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const indexModel = await pc.preview.indexes.describe('my-schema-index'); * console.log(indexModel); * // { * // name: 'my-schema-index', * // metric: 'cosine', * // host: 'my-schema-index-abc123.svc.pinecone.io', * // schema: { * // fields: { chunk_text: { type: 'string', fullTextSearch: {} } } * // }, * // status: { ready: true, state: 'Ready' } * // } * ``` * * @param indexName - The name of the index to describe. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves to {@link PreviewIndexModel}. * @alpha */ describe(indexName: string): Promise; /** * Deletes an index by name. * * Deletion is asynchronous; the index may still be terminating after this call returns. * Deletion protection must be disabled before calling this method. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * await pc.preview.indexes.delete('my-schema-index'); * ``` * * @param name - The name of the index to delete. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves when the deletion request is accepted. * @alpha */ delete(name: string): Promise; /** * Configures an index by name. * * Only the fields present in `options` are updated; omit a field to leave it unchanged. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const indexModel = await pc.preview.indexes.configure('my-schema-index', { * deletion_protection: 'enabled', * tags: { team: 'ml-platform' }, * }); * console.log(indexModel.name); * // 'my-schema-index' * ``` * * @param name - The name of the index to configure. * @param options - The {@link PreviewConfigureIndexOptions} fields to update. Only provided fields are changed. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves to the updated {@link PreviewIndexModel}. * @alpha */ configure(name: string, options: PreviewConfigureIndexOptions): Promise; /** * Creates a backup of an index. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const backup = await pc.preview.indexes.createBackup('my-schema-index', { * name: 'my-schema-index-backup-1', * description: 'weekly backup', * }); * console.log(backup); * // { * // backupId: '11450b9f-96e5-47e5-9186-03f346b1f385', * // sourceIndexName: 'my-schema-index', * // name: 'my-schema-index-backup-1', * // description: 'weekly backup', * // status: 'Initializing', * // cloud: 'aws', * // region: 'us-east-1', * // } * ``` * * @param indexName - Name of the index to back up. * @param options - Optional {@link PreviewCreateBackupOptions} for the backup (name, description). * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves to a {@link PreviewBackupModel}. * @see [Backups](https://docs.pinecone.io/guides/indexes/backups) * @alpha */ createBackup(indexName: string, options?: PreviewCreateBackupOptions): Promise; /** * Lists all backups for a specific index. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const backupList = await pc.preview.indexes.listBackups('my-schema-index', { limit: 10 }); * console.log(backupList); * // { * // data: [ * // { * // backupId: '11450b9f-96e5-47e5-9186-03f346b1f385', * // sourceIndexName: 'my-schema-index', * // name: 'my-schema-index-backup-1', * // status: 'Ready', * // createdAt: '2025-05-07T03:11:11.722Z' * // } * // ], * // pagination: undefined * // } * ``` * * @param indexName - Name of the index whose backups to list. * @param options - Optional {@link PreviewListIndexBackupsOptions} pagination parameters (limit, paginationToken). * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves to a {@link PreviewBackupList}. * @see [Backups](https://docs.pinecone.io/guides/indexes/backups) * @alpha */ listBackups(indexName: string, options?: PreviewListIndexBackupsOptions): Promise; /** * Lists all backups across every index in the project. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const backupList = await pc.preview.indexes.listProjectBackups({ limit: 5 }); * console.log(backupList); * // { * // data: [ * // { * // backupId: '11450b9f-96e5-47e5-9186-03f346b1f385', * // sourceIndexName: 'my-schema-index', * // name: 'my-schema-index-backup-1', * // status: 'Ready', * // createdAt: '2025-05-07T03:11:11.722Z' * // } * // ], * // pagination: undefined * // } * ``` * * @param options - Optional {@link PreviewListProjectBackupsOptions} pagination parameters (limit, paginationToken). * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves to a {@link PreviewBackupList}. * @see [Backups](https://docs.pinecone.io/guides/indexes/backups) * @alpha */ listProjectBackups(options?: PreviewListProjectBackupsOptions): Promise; /** * Retrieves the configuration and status of a backup. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const backup = await pc.preview.indexes.describeBackup('11450b9f-96e5-47e5-9186-03f346b1f385'); * console.log(backup); * // { * // backupId: '11450b9f-96e5-47e5-9186-03f346b1f385', * // sourceIndexName: 'my-schema-index', * // name: 'my-schema-index-backup-1', * // description: 'weekly backup', * // status: 'Ready', * // cloud: 'aws', * // region: 'us-east-1', * // createdAt: '2025-05-07T03:11:11.722Z' * // } * ``` * * @param backupId - The ID of the backup to describe. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves to a {@link PreviewBackupModel}. * @see [Backups](https://docs.pinecone.io/guides/indexes/backups) * @alpha */ describeBackup(backupId: string): Promise; /** * Deletes a backup. The deletion is accepted asynchronously. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * await pc.preview.indexes.deleteBackup('11450b9f-96e5-47e5-9186-03f346b1f385'); * ``` * * @param backupId - The ID of the backup to delete. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves when the deletion request is accepted. * @see [Backups](https://docs.pinecone.io/guides/indexes/backups) * @alpha */ deleteBackup(backupId: string): Promise; /** * Creates an index from a backup. The creation is accepted asynchronously. * Use the returned `restoreJobId` with {@link describeRestoreJob} to poll for completion. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const response = await pc.preview.indexes.createFromBackup( * '11450b9f-96e5-47e5-9186-03f346b1f385', * { name: 'my-schema-index-restored' }, * ); * console.log(response); * // { * // restoreJobId: '4d4c8693-10fd-4204-a57b-1e3e626fca07', * // indexId: 'deb7688b-9f21-4c16-8eb7-f0027abd27fe' * // } * * // Poll until the restore completes * const job = await pc.preview.indexes.describeRestoreJob('4d4c8693-10fd-4204-a57b-1e3e626fca07'); * console.log(job.status); * // 'Completed' * ``` * * @param backupId - The ID of the backup to restore from. * @param options - The {@link PreviewCreateIndexFromBackupOptions} for the new index (name required; tags and deletionProtection optional). * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves to a {@link PreviewCreateIndexFromBackupResponse} containing the `restoreJobId` and `indexId`. * @see [Backups](https://docs.pinecone.io/guides/indexes/backups) * @alpha */ createFromBackup(backupId: string, options: PreviewCreateIndexFromBackupOptions): Promise; /** * Lists all restore jobs for the current project. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const restoreJobs = await pc.preview.indexes.listRestoreJobs({ limit: 3 }); * console.log(restoreJobs); * // { * // data: [ * // { * // restoreJobId: '4d4c8693-10fd-4204-a57b-1e3e626fca07', * // backupId: '11450b9f-96e5-47e5-9186-03f346b1f385', * // targetIndexName: 'my-schema-index-restored', * // status: 'Completed', * // percentComplete: 100 * // } * // ], * // pagination: undefined * // } * ``` * * @param options - Optional {@link PreviewListRestoreJobsOptions} pagination parameters (limit, paginationToken). * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves to a {@link PreviewRestoreJobList}. * @see [Backups](https://docs.pinecone.io/guides/indexes/backups) * @alpha */ listRestoreJobs(options?: PreviewListRestoreJobsOptions): Promise; /** * Describes a restore job by ID. * * Use this to poll the status of an index restore initiated by {@link createFromBackup}. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const job = await pc.preview.indexes.describeRestoreJob('4d4c8693-10fd-4204-a57b-1e3e626fca07'); * console.log(job); * // { * // restoreJobId: '4d4c8693-10fd-4204-a57b-1e3e626fca07', * // backupId: '11450b9f-96e5-47e5-9186-03f346b1f385', * // targetIndexName: 'my-schema-index-restored', * // targetIndexId: 'deb7688b-9f21-4c16-8eb7-f0027abd27fe', * // status: 'Completed', * // percentComplete: 100 * // } * ``` * * @param jobId - The restore job ID returned by {@link createFromBackup}. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves to a {@link PreviewRestoreJobModel}. * @see [Backups](https://docs.pinecone.io/guides/indexes/backups) * @alpha */ describeRestoreJob(jobId: string): Promise; /** * Lists all collections in the current project. * * Collections are only supported for pod-based indexes; serverless indexes * do not support collections. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const collectionList = await pc.preview.indexes.listCollections(); * console.log(collectionList); * // { * // collections: [ * // { * // name: 'my-collection', * // size: 10000000, * // status: 'Ready', * // dimension: 1536, * // recordCount: 120000, * // source: 'my-pod-index' * // } * // ] * // } * ``` * * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves to a {@link PreviewCollectionList}. * @see [Collections](https://docs.pinecone.io/guides/indexes/collections/understanding-collections) * @alpha */ listCollections(): Promise; /** * Creates a collection from a pod-based index. * * Collections snapshot the current state of a pod-based index and can be used * to create new indexes. Serverless indexes do not support collections. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const collection = await pc.preview.indexes.createCollection({ * name: 'my-collection', * source: 'my-pod-index', * }); * console.log(collection); * // { * // name: 'my-collection', * // status: 'Initializing', * // source: 'my-pod-index' * // } * ``` * * @param options - The {@link PreviewCreateCollectionOptions} for the collection, including `name` and `source` index name. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves to a {@link PreviewCollectionModel}. * @see [Collections](https://docs.pinecone.io/guides/indexes/collections/understanding-collections) * @alpha */ createCollection(options: PreviewCreateCollectionOptions): Promise; /** * Retrieves metadata for a single named collection. * * Collections are only supported for pod-based indexes; serverless indexes * do not support collections. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const collection = await pc.preview.indexes.describeCollection('my-collection'); * console.log(collection); * // { * // name: 'my-collection', * // size: 10000000, * // status: 'Ready', * // dimension: 1536, * // recordCount: 120000, * // source: 'my-pod-index' * // } * ``` * * @param collectionName - The name of the collection to describe. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves to a {@link PreviewCollectionModel}. * @see [Collections](https://docs.pinecone.io/guides/indexes/collections/understanding-collections) * @alpha */ describeCollection(collectionName: string): Promise; /** * Deletes an existing collection by name. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * await pc.preview.indexes.deleteCollection('my-collection'); * ``` * * @param collectionName - The name of the collection to delete. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves when the deletion request is completed. * @see [Collections](https://docs.pinecone.io/guides/indexes/collections/understanding-collections) * @alpha */ deleteCollection(collectionName: string): Promise; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_data/models/DeleteDocumentsRequest.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The request for the `delete_documents` operation. Exactly one of `ids` or `delete_all` must be specified. * @export * @interface DeleteDocumentsRequest */ interface DeleteDocumentsRequest { /** * A list of document IDs to delete. Mutually exclusive with `delete_all`. * @type {Array} * @memberof DeleteDocumentsRequest */ ids?: Array; /** * If `true`, delete all documents in the namespace. Mutually exclusive with `ids`. * @type {boolean} * @memberof DeleteDocumentsRequest */ deleteAll?: boolean; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_data/models/DocumentFetchUsage.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Usage information for the `fetch_documents` operation. * @export * @interface DocumentFetchUsage */ interface DocumentFetchUsage { /** * The number of read units consumed by this operation. * @type {number} * @memberof DocumentFetchUsage */ readUnits: number; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_data/models/DocumentListUsage.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Usage information for the `list_documents` operation. * @export * @interface DocumentListUsage */ interface DocumentListUsage { /** * The number of read units consumed by this operation. * @type {number} * @memberof DocumentListUsage */ readUnits: number; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_data/models/DocumentRecord.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * A document with a unique identifier and arbitrary field values. * @export * @interface DocumentRecord */ interface DocumentRecord { [key: string]: any | any; /** * The unique identifier for the document. * @type {string} * @memberof DocumentRecord */ _id: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_data/models/SparseValues.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Vector sparse data. Represented as a list of indices and a list of corresponded values, which must be with the same length. * @export * @interface SparseValues */ interface SparseValues { /** * The indices of the sparse data. * @type {Array} * @memberof SparseValues */ indices: Array; /** * The corresponding values of the sparse data, which must be with the same length as the indices. * @type {Array} * @memberof SparseValues */ values: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_data/models/DocumentScoringMethod.d.ts /** * A scoring method that defines how documents are scored against a query. * * The `type` field determines which other fields are used: * - `dense_vector`: Score by dense vector similarity. Requires `field` or `fields`, and a `values` array. * - `sparse_vector`: Score by sparse vector similarity. Requires `field` or `fields`, and `sparse_values`. * - `text`: Score by BM25 text similarity against a single field. Requires `field` or `fields`, and `query`. * - `query_string`: Score using a Lucene query string. Use field qualifiers (`field:(clause)`) to target a field, or omit field qualifiers to search against all text-searchable fields. Errors if `field` or `fields` is provided. * @export * @interface DocumentScoringMethod */ interface DocumentScoringMethod { /** * The scoring method type. * Possible values: `dense_vector`, `sparse_vector`, `text`, or `query_string`. * @type {string} * @memberof DocumentScoringMethod */ type: string; /** * The field to score against. * * Required for `dense_vector`, `sparse_vector`, and `text` scoring types. Must not be provided for `query_string`. * @type {string} * @memberof DocumentScoringMethod */ field?: string; /** * The text query to use for `text` and `query_string` scoring types. * @type {string} * @memberof DocumentScoringMethod */ query?: string; /** * The dense vector values to use for `dense_vector` scoring type. * @type {Array} * @memberof DocumentScoringMethod */ values?: Array; /** * * @type {SparseValues} * @memberof DocumentScoringMethod */ sparseValues?: SparseValues; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_data/models/DocumentSearchMatch.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * A document match returned from a search operation, including the document ID, similarity score, and selected fields. * @export * @interface DocumentSearchMatch */ interface DocumentSearchMatch { [key: string]: any | any; /** * The unique identifier of the matched document. * @type {string} * @memberof DocumentSearchMatch */ _id: string; /** * The similarity score of the matched document. * @type {number} * @memberof DocumentSearchMatch */ _score: number; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_data/models/DocumentSearchUsage.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Usage information for the `search_documents` operation. * @export * @interface DocumentSearchUsage */ interface DocumentSearchUsage { /** * The number of read units consumed by this operation. * @type {number} * @memberof DocumentSearchUsage */ readUnits: number; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_data/models/Pagination.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface Pagination */ interface Pagination { /** * * @type {string} * @memberof Pagination */ next?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_data/models/FetchDocumentsRequest.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The request for the `fetch_documents` operation. * @export * @interface FetchDocumentsRequest */ interface FetchDocumentsRequest { /** * A list of document IDs to fetch. * @type {Array} * @memberof FetchDocumentsRequest */ ids: Array; /** * The document fields to include in the response. If not specified, all fields are returned. * @type {Array} * @memberof FetchDocumentsRequest */ includeFields?: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_data/models/FetchedDocumentRecord.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * A fetched document containing its ID and field values. * @export * @interface FetchedDocumentRecord */ interface FetchedDocumentRecord { [key: string]: any | any; /** * The unique identifier of the document. * @type {string} * @memberof FetchedDocumentRecord */ _id: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_data/models/FetchDocumentsResponse.d.ts /** * The response for the `fetch_documents` operation. * @export * @interface FetchDocumentsResponse */ interface FetchDocumentsResponse { /** * A map of document IDs to their fetched documents. * @type {{ [key: string]: FetchedDocumentRecord; }} * @memberof FetchDocumentsResponse */ documents: { [key: string]: FetchedDocumentRecord; }; /** * The namespace the documents were fetched from. * @type {string} * @memberof FetchDocumentsResponse */ namespace: string; /** * * @type {DocumentFetchUsage} * @memberof FetchDocumentsResponse */ usage: DocumentFetchUsage; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_data/models/ListDocumentsRequest.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The request for the `list_documents` operation. * @export * @interface ListDocumentsRequest */ interface ListDocumentsRequest { /** * A prefix to filter document IDs. Only documents whose IDs begin with this prefix are returned. * @type {string} * @memberof ListDocumentsRequest */ prefix?: string; /** * The maximum number of documents to return per page. Defaults to 100. * @type {number} * @memberof ListDocumentsRequest */ limit?: number; /** * A pagination token from a previous list response, used to retrieve the next page of results. * @type {string} * @memberof ListDocumentsRequest */ paginationToken?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_data/models/ListedDocumentRecord.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * A listed document containing only its ID. * @export * @interface ListedDocumentRecord */ interface ListedDocumentRecord { /** * The unique identifier of the document. * @type {string} * @memberof ListedDocumentRecord */ _id: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_data/models/ListDocumentsResponse.d.ts /** * The response for the `list_documents` operation. * @export * @interface ListDocumentsResponse */ interface ListDocumentsResponse { /** * The listed documents, in sorted order by ID. * @type {Array} * @memberof ListDocumentsResponse */ documents: Array; /** * * @type {Pagination} * @memberof ListDocumentsResponse */ pagination?: Pagination; /** * The namespace the documents were listed from. * @type {string} * @memberof ListDocumentsResponse */ namespace: string; /** * * @type {DocumentListUsage} * @memberof ListDocumentsResponse */ usage: DocumentListUsage; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_data/models/SearchDocumentsRequest.d.ts /** * The request for the `search_documents` operation. * @export * @interface SearchDocumentsRequest */ interface SearchDocumentsRequest { /** * The list of scoring methods to use for ranking documents. * @type {Array} * @memberof SearchDocumentsRequest */ scoreBy: Array; /** * The number of top-ranked documents to return. * @type {number} * @memberof SearchDocumentsRequest */ topK: number; /** * The document fields to include in the search results. * @type {Array} * @memberof SearchDocumentsRequest */ includeFields?: Array; /** * A metadata filter expression to restrict the documents searched. * @type {object} * @memberof SearchDocumentsRequest */ filter?: object; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_data/models/SearchDocumentsResponse.d.ts /** * The response for the `search_documents` operation. * @export * @interface SearchDocumentsResponse */ interface SearchDocumentsResponse { /** * The matching documents, ordered from most to least similar. * @type {Array} * @memberof SearchDocumentsResponse */ matches: Array; /** * The namespace that was searched. * @type {string} * @memberof SearchDocumentsResponse */ namespace: string; /** * * @type {DocumentSearchUsage} * @memberof SearchDocumentsResponse */ usage: DocumentSearchUsage; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_data/models/UpdateDocumentRecord.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * A partial update to a document, identified by `_id`. Any other fields set new values for those fields. Fields named in `_remove_fields` are removed from the document. * @export * @interface UpdateDocumentRecord */ interface UpdateDocumentRecord { [key: string]: any | any; /** * The unique identifier of the document to update. * @type {string} * @memberof UpdateDocumentRecord */ _id: string; /** * A list of field names to delete from the document. * @type {Array} * @memberof UpdateDocumentRecord */ _remove_fields?: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_data/models/UpdateDocumentsRequest.d.ts /** * The request for the `update_documents` operation. * @export * @interface UpdateDocumentsRequest */ interface UpdateDocumentsRequest { /** * The list of partial document updates to apply. * @type {Array} * @memberof UpdateDocumentsRequest */ documents: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_data/models/UpsertDocumentsRequest.d.ts /** * The request for the `upsert_documents` operation. * @export * @interface UpsertDocumentsRequest */ interface UpsertDocumentsRequest { /** * The list of documents to upsert into the namespace. * @type {Array} * @memberof UpsertDocumentsRequest */ documents: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch-alpha/db_data/models/UpsertDocumentsResponse.d.ts /** * Pinecone Data Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2026-01.alpha * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The response for the `upsert_documents` operation. * @export * @interface UpsertDocumentsResponse */ interface UpsertDocumentsResponse { /** * The number of documents successfully upserted. * @type {number} * @memberof UpsertDocumentsResponse */ upsertedCount: number; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/preview/indexes/previewIndex.d.ts /** * Data-plane document operations for a schema-based index. * Access via `pc.preview.index('index-name')`. * * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const index = pc.preview.index('my-schema-index'); * await index.upsertDocuments('my-namespace', { * documents: [{ _id: 'doc-1', chunk_text: 'Hello world' }], * }); * ``` * * Uses Pinecone API version `2026-01.alpha`. * Preview surface is not covered by SemVer — signatures and behavior * may change in any minor SDK release. Pin your SDK version when * relying on preview features. * * @alpha */ declare class PreviewIndex { private _provider; constructor(config: PineconeConfiguration, options: IndexOptions); /** * Upserts documents into a namespace of this schema-based index. * * Each document must include an `_id` field (the unique identifier) and any * additional fields defined in the index schema. If a document with the same * `_id` already exists it is overwritten. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const index = pc.preview.index('my-schema-index'); * const result = await index.upsertDocuments('my-namespace', { * documents: [ * { _id: 'doc-1', chunk_text: 'Machine learning is fascinating' }, * { _id: 'doc-2', chunk_text: 'Vector databases enable semantic search' }, * ], * }); * console.log(result); * // { upsertedCount: 2 } * ``` * * @param namespace - The namespace to upsert documents into. * @param options - The {@link PreviewUpsertDocumentsOptions} containing the `documents` array (1–1000 entries). Each entry must be a {@link PreviewDocumentRecord} with a required `_id` field. * @throws {@link Errors.PineconeArgumentError} when `documents` is empty or not provided. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves to a {@link PreviewUpsertDocumentsResponse}. * @alpha */ upsertDocuments(namespace: string, options: UpsertDocumentsRequest): Promise; /** * Searches for documents in a namespace using one or more scoring methods. * * The `scoreBy` array specifies how documents are ranked. Supported scoring * method types are `text` (BM25), `dense_vector`, `sparse_vector`, and * `query_string`. Multiple scoring methods can be combined for hybrid search. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const index = pc.preview.index('my-schema-index'); * const results = await index.searchDocuments('my-namespace', { * scoreBy: [ * { type: 'text', field: 'chunk_text', query: 'machine learning' }, * ], * topK: 5, * includeFields: ['chunk_text'], * }); * console.log(results); * // { * // matches: [ * // { _id: 'doc-1', _score: 0.98, chunk_text: 'Machine learning is fascinating' }, * // { _id: 'doc-2', _score: 0.72, chunk_text: 'Vector databases enable semantic search' }, * // ], * // namespace: 'my-namespace', * // usage: { readUnits: 1 } * // } * ``` * * @param namespace - The namespace to search. * @param options - The {@link PreviewSearchDocumentsOptions} for the search, including `scoreBy` (required), `topK` (required), and optional `includeFields`. * @throws {@link Errors.PineconeArgumentError} when `scoreBy` is empty or `topK` is less than 1. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves to a {@link PreviewSearchDocumentsResponse} containing `matches`, `namespace`, and `usage`. * @alpha */ searchDocuments(namespace: string, options: SearchDocumentsRequest): Promise; /** * Fetches documents from a namespace by their IDs. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const index = pc.preview.index('my-schema-index'); * * // Fetch all fields * const result = await index.fetchDocuments('my-namespace', { * ids: ['doc-1', 'doc-2'], * }); * console.log(result); * // { * // documents: { * // 'doc-1': { _id: 'doc-1', chunk_text: 'Machine learning is fascinating' }, * // 'doc-2': { _id: 'doc-2', chunk_text: 'Vector databases enable semantic search' }, * // }, * // namespace: 'my-namespace', * // usage: { read_units: 1 } * // } * * // Fetch only specific fields * const partial = await index.fetchDocuments('my-namespace', { * ids: ['doc-1'], * includeFields: ['chunk_text'], * }); * ``` * * @param namespace - The namespace to fetch documents from. * @param options - The {@link PreviewFetchDocumentsOptions} containing `ids` (required) and an optional `includeFields` list to limit which fields are returned. * @throws {@link Errors.PineconeArgumentError} when `ids` is empty or not provided. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves to a {@link PreviewFetchDocumentsResponse} containing a `documents` map, `namespace`, and `usage`. * @alpha */ fetchDocuments(namespace: string, options: FetchDocumentsRequest): Promise; /** * Deletes documents from a namespace by their IDs, or deletes all documents in the namespace. * * Exactly one of `ids` or `deleteAll` must be set. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const index = pc.preview.index('my-schema-index'); * * // Delete specific documents by ID * await index.deleteDocuments('my-namespace', { ids: ['doc-1', 'doc-2'] }); * * // Delete all documents in the namespace * await index.deleteDocuments('my-namespace', { deleteAll: true }); * ``` * * @param namespace - The namespace to delete documents from. * @param options - The {@link PreviewDeleteDocumentsOptions}: either `ids` (a non-empty list of document IDs) or `deleteAll: true`. These options are mutually exclusive. * @throws {@link Errors.PineconeArgumentError} when neither `ids` nor `deleteAll` is set, both are set at the same time, or `ids` is an empty array. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves when the deletion is complete. * @alpha */ deleteDocuments(namespace: string, options: DeleteDocumentsRequest): Promise; /** * Lists documents in a namespace, returning their IDs in sorted order. * * Returns up to 100 documents per page by default. Use `prefix` to limit * results to documents whose IDs start with a given string, and `limit` to * control the page size. When more documents remain, the response includes a * `pagination.next` token you can pass back as `paginationToken` to retrieve * the next page. When no token is returned, there are no more documents. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const index = pc.preview.index('my-schema-index'); * * // List the first page of documents * const page = await index.listDocuments('my-namespace', { limit: 50 }); * console.log(page); * // { * // documents: [{ _id: 'doc-1' }, { _id: 'doc-2' }], * // pagination: { next: 'eyJ...' }, * // namespace: 'my-namespace', * // usage: { readUnits: 1 } * // } * * // Retrieve the next page * const next = await index.listDocuments('my-namespace', { * paginationToken: page.pagination?.next, * }); * * // Only list documents whose IDs start with a prefix * const prefixed = await index.listDocuments('my-namespace', { prefix: 'doc-' }); * ``` * * @param namespace - The namespace to list documents from. * @param options - The optional {@link PreviewListDocumentsOptions}: `prefix` to filter by ID prefix, `limit` to set the page size, and `paginationToken` to fetch a subsequent page. * @throws {@link Errors.PineconeArgumentError} when `limit` is provided but less than 1. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves to a {@link PreviewListDocumentsResponse} containing `documents`, an optional `pagination` token, `namespace`, and `usage`. * @alpha */ listDocuments(namespace: string, options?: ListDocumentsRequest): Promise; /** * Applies partial updates to documents in a namespace. * * Each update is identified by its `_id`. Any other fields set new values for * those fields, fields listed in `_remove_fields` are removed from the * document, and fields that are not mentioned are left unchanged. Updates to a * document that does not exist are accepted but have no effect. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const index = pc.preview.index('my-schema-index'); * await index.updateDocuments('my-namespace', { * documents: [ * // Set a new value for `chunk_text` on doc-1 * { _id: 'doc-1', chunk_text: 'Updated content' }, * // Remove the `category` field from doc-2 * { _id: 'doc-2', _remove_fields: ['category'] }, * ], * }); * ``` * * @param namespace - The namespace to update documents in. * @param options - The {@link PreviewUpdateDocumentsOptions} containing a non-empty `documents` array. Each entry is a {@link PreviewUpdateDocumentRecord} with a required `_id` field, optional replacement fields, and an optional `_remove_fields` list. * @throws {@link Errors.PineconeArgumentError} when `documents` is empty or not provided. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves when the update is complete. * @alpha */ updateDocuments(namespace: string, options: UpdateDocumentsRequest): Promise; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/preview/previewAccessor.d.ts /** * Entry point for Pinecone preview operations. Access via `pc.preview`. * * Uses Pinecone API version `2026-01.alpha`. * Preview surface is not covered by SemVer — signatures and behavior may change * in any minor SDK release. Pin your SDK version when relying on preview features. * * @alpha */ declare class Preview { /** * Control-plane index operations (list, create, configure, describe, delete, * backups, restore jobs, collections). * * @example * ```typescript * const list = await pc.preview.indexes.list(); * ``` * @alpha */ indexes: PreviewIndexes; private _config; constructor(config: PineconeConfiguration); /** * Returns a {@link PreviewIndex} for performing data-plane document operations * against a schema-based index. * * Provide either `name` (resolves the host via `describeIndex`) or `host` * (skips that round-trip). When both are provided, `host` is used directly * and `name` is only used for cache-key purposes. * * @example * ```typescript * // Resolve host automatically from the index name * const previewIndex = pc.preview.index({ name: 'my-schema-index' }); * * // Skip host resolution when you already know the host URL * const previewIndex = pc.preview.index({ host: 'https://my-host.pinecone.io' }); * * const result = await previewIndex.upsertDocuments('my-namespace', { * documents: [{ _id: 'doc-1', content: 'Hello world' }], * }); * ``` * * @param options - {@link IndexOptions} — must include at least `name` or `host`. * @alpha */ index(options: IndexOptions): PreviewIndex; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone.d.ts /** * The `Pinecone` class is the main entrypoint to this sdk. You will use * instances of it to create and manage indexes as well as perform data * operations on those indexes after they are created. * * ### Initializing the client * * There is one piece of configuration required to use the Pinecone client: an API key. This value can be passed using environment variables or in code through a configuration object. Find your API key in the console dashboard at [https://app.pinecone.io](https://app.pinecone.io) * * ### Using environment variables * * The environment variables used to configure the client are the following: * * ```bash * export PINECONE_API_KEY="your_api_key" * export PINECONE_CONTROLLER_HOST="your_controller_host" * ``` * * When these environment variables are set, the client constructor does not require any additional arguments. * * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * * const pc = new Pinecone(); * ``` * * ### Using a configuration object * * If you prefer to pass configuration in code, the constructor accepts a config object containing the `apiKey` and `environment` values. This * could be useful if your application needs to interact with multiple projects, each with a different configuration. * * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * * const pc = new Pinecone({ * apiKey: 'your_api_key', * }); * * ``` * * See {@link PineconeConfiguration} for a full description of available configuration options. */ declare class Pinecone { /** @hidden */ private _configureIndex; /** @hidden */ private _createCollection; /** @hidden */ private _createIndex; /** @hidden */ private _createIndexForModel; /** @hidden */ private _describeCollection; /** @hidden */ private _describeIndex; /** @hidden */ private _deleteCollection; /** @hidden */ private _deleteIndex; /** @hidden */ private _listCollections; /** @hidden */ private _listIndexes; /** @hidden */ private _createAssistant; /** @hidden */ private _deleteAssistant; /** @hidden */ private _updateAssistant; /** @hidden */ private _describeAssistant; /** @hidden */ private _listAssistants; /** @hidden */ private _evaluate; /** @hidden */ private _createBackup; /** @hidden */ private _createIndexFromBackup; /** @hidden */ private _describeBackup; /** @hidden */ private _describeRestoreJob; /** @hidden */ private _deleteBackup; /** @hidden */ private _listBackups; /** @hidden */ private _listRestoreJobs; inference: Inference; /** * Provides access to alpha preview operations using the 2026-01.alpha API. * * @example * ```typescript * const list = await pc.preview.indexes.list(); * const idx = pc.preview.index('my-schema-index'); * ``` * @alpha */ preview: Preview; /** * @example * ``` * import { Pinecone } from '@pinecone-database/pinecone'; * * const pc = new Pinecone({ * apiKey: 'my-api-key', * }); * ``` * * @constructor * @param options - The configuration options for the Pinecone client: {@link PineconeConfiguration}. */ constructor(options?: PineconeConfiguration); /** * @internal * This method is used by {@link Pinecone.constructor} to read configuration from environment variables. * * It looks for the following environment variables: * - `PINECONE_API_KEY` * - `PINECONE_CONTROLLER_HOST` * * @returns A {@link PineconeConfiguration} object populated with values found in environment variables. */ _readEnvironmentConfig(): PineconeConfiguration; /** @hidden */ private config; /** * Describe a Pinecone index * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const indexModel = await pc.describeIndex('my-index') * console.log(indexModel) * // { * // name: 'sample-index-1', * // dimension: 3, * // metric: 'cosine', * // host: 'sample-index-1-1390950.svc.apw5-4e34-81fa.pinecone.io', * // spec: { * // pod: undefined, * // serverless: { * // cloud: 'aws', * // region: 'us-west-2' * // } * // }, * // status: { * // ready: true, * // state: 'Ready' * // } * // } * ``` * * @param indexName - The name of the index to describe. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves to {@link IndexModel}. */ describeIndex(indexName: IndexName): Promise; /** * List all Pinecone indexes * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const indexList = await pc.listIndexes() * console.log(indexList) * // { * // indexes: [ * // { * // name: "sample-index-1", * // dimension: 3, * // metric: "cosine", * // host: "sample-index-1-1234567.svc.apw5-2e18-32fa.pinecone.io", * // spec: { * // serverless: { * // cloud: "aws", * // region: "us-west-2" * // } * // }, * // status: { * // ready: true, * // state: "Ready" * // } * // }, * // { * // name: "sample-index-2", * // dimension: 3, * // metric: "cosine", * // host: "sample-index-2-1234567.svc.apw2-5e76-83fa.pinecone.io", * // spec: { * // serverless: { * // cloud: "aws", * // region: "us-west-2" * // } * // }, * // status: { * // ready: true, * // state: "Ready" * // } * // } * // ] * // } * ``` * * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves to {@link IndexList}. */ listIndexes(): Promise; /** * Creates a new index. * * @example * The minimum required configuration to create an index is the index `name`, `dimension`, and `spec`. * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * * const pc = new Pinecone(); * * await pc.createIndex({ name: 'my-index', dimension: 128, spec: { serverless: { cloud: 'aws', region: 'us-west-2' }}}) * ``` * * @example * The `spec` object defines how the index should be deployed. For serverless indexes, you define only the cloud and region where the index should be hosted. * For pod-based indexes, you define the environment where the index should be hosted, the pod type and size to use, and other index characteristics. * In a different example, you can create a pod-based index by specifying the `pod` spec object with the `environment`, `pods`, `podType`, and `metric` properties. * For more information on creating indexes, see [Understanding indexes](https://docs.pinecone.io/guides/indexes/understanding-indexes). * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * await pc.createIndex({ * name: 'my-index', * dimension: 1536, * metric: 'cosine', * spec: { * pod: { * environment: 'us-west-2-gcp', * pods: 1, * podType: 'p1.x1' * } * }, * tags: { 'team': 'data-science' } * }) * ``` * * @example * If you would like to create the index only if it does not already exist, you can use the `suppressConflicts` boolean option. * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * await pc.createIndex({ * name: 'my-index', * dimension: 1536, * spec: { * serverless: { * cloud: 'aws', * region: 'us-west-2' * } * }, * suppressConflicts: true, * tags: { 'team': 'data-science' } * }) * ``` * * @example * If you plan to begin upserting immediately after index creation is complete, you should use the `waitUntilReady` option. Otherwise, the index may not be ready to receive data operations when you attempt to upsert. * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const indexModel = await pc.createIndex({ * name: 'my-index', * spec: { * serverless: { * cloud: 'aws', * region: 'us-west-2' * } * }, * waitUntilReady: true, * tags: { 'team': 'data-science' } * }); * * const records = [ * // PineconeRecord objects with your embedding values * ] * const index = pc.index({ host: indexModel.host }); * await index.upsert({ records }) * ``` * * @example * By default all metadata fields are indexed when records are upserted with metadata, but if you want to improve performance you can specify the specific fields you want to index. This example is showing a few hypothetical metadata fields, but the values you'd use depend on what metadata you plan to store with records in your Pinecone index. * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * await pc.createIndex({ * name: 'my-index', * dimension: 1536, * spec: { * serverless: { * cloud: 'aws', * region: 'us-west-2', * metadataConfig: { 'indexed' : ['productName', 'productDescription'] } * } * }, * tags: { 'team': 'data-science' } * }) * ``` * * @param options - The {@link CreateIndexOptions} for creating the index. * @see [Distance metrics](https://docs.pinecone.io/docs/indexes#distance-metrics) * @see [Pod types and sizes](https://docs.pinecone.io/docs/indexes#pods-pod-types-and-pod-sizes) * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeBadRequestError} when index creation fails due to invalid parameters being specified or other problem such as project quotas limiting the creation of any additional indexes. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @throws {@link Errors.PineconeConflictError} when attempting to create an index using a name that already exists in your project. * @returns A promise that resolves to {@link IndexModel} when the request to create the index is completed. Note that the index is not immediately ready to use. You can use the {@link describeIndex} function to check the status of the index. */ createIndex(options: CreateIndexOptions): Promise; /** * Creates a new integrated index which allows working with integrated inference capabilities. * @see [Upsert and search with integrated inference](https://docs.pinecone.io/guides/inference/integrated-inference) * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * await pc.createIndexForModel({ * name: 'integrated-index', * cloud: 'aws', * region: 'us-east-1', * embed: { * model: 'multilingual-e5-large', * fieldMap: { text: 'chunk_text' }, * }, * waitUntilReady: true, * }); * ``` * * @param options - The {@link CreateIndexForModelOptions} for creating the index. * @see [Distance metrics](https://docs.pinecone.io/docs/indexes#distance-metrics) * @see [Pod types and sizes](https://docs.pinecone.io/docs/indexes#pods-pod-types-and-pod-sizes) * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeBadRequestError} when index creation fails due to invalid parameters being specified or other problem such as project quotas limiting the creation of any additional indexes. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @throws {@link Errors.PineconeConflictError} when attempting to create an index using a name that already exists in your project. * @returns A promise that resolves to {@link IndexModel} when the request to create the index is completed. Note that the index is not immediately ready to use. You can use the {@link describeIndex} function to check the status of the index. */ createIndexForModel(options: CreateIndexForModelOptions): Promise; /** * Deletes an index * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * await pc.deleteIndex('my-index') * ``` * * @param indexName - The name of the index to delete. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @returns A promise that resolves when the request to delete the index is completed. */ deleteIndex(indexName: IndexName): Promise; /** * Configure an index * * Use this method to update configuration on an existing index. For both pod-based and serverless indexes you can update * the deletionProtection status of an index and/or change any index tags. For pod-based indexes you can also * configure the number of replicas and pod type. For serverless and BYOC indexes you can configure the read capacity, * and for indexes with integrated inference you can update the embedding configuration. * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * await pc.configureIndex({ * name: 'my-index', * deletionProtection: 'enabled', * podReplicas: 2, * podType: 'p1.x2' * }); * ``` * * @param options - The {@link ConfigureIndexOptions} for configuring the index. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves to {@link IndexModel} when the request to configure the index is completed. */ configureIndex(options: ConfigureIndexOptions): Promise; /** * Create a new collection from an existing index. * * Note: collections are only supported for pod-based indexes; serverless * indexes do not support collections. * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const indexList = await pc.listIndexes() * const indexName = indexList.indexes[0].name; * await pc.createCollection({ * name: 'my-collection', * source: indexName * }) * ``` * * @param options - The collection configuration. * @param options.name - The name of the collection. Must be unique within the project and contain alphanumeric and hyphen characters. The name must start and end with alphanumeric characters. * @param options.source - The name of the index to use as the source for the collection. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns a promise that resolves to {@link CollectionModel} when the request to create the collection is completed. */ createCollection(options: CreateCollectionRequest): Promise; /** * List all collections in a project * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * await pc.listCollections() * ``` * * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves to {@link CollectionList}. */ listCollections(): Promise; /** * Delete a collection by collection name * * @example * ``` * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * const collectionList = await pc.listCollections() * const collectionName = collectionList.collections[0].name; * await pc.deleteCollection(collectionName) * ``` * * @param collectionName - The name of the collection to delete. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves when the request to delete the collection is completed. */ deleteCollection(collectionName: CollectionName): Promise; /** * Describe a collection * * @example * ```js * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * * await pc.describeCollection('my-collection') * ``` * * @param collectionName - The name of the collection to describe. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A promise that resolves to a {@link CollectionModel}. */ describeCollection(collectionName: CollectionName): Promise; /** * Creates a new Assistant. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * await pc.createAssistant({name: 'test1'}); * // { * // name: 'test11', * // instructions: undefined, * // metadata: undefined, * // status: 'Initializing', * // host: 'https://prod-1-data.ke.pinecone.io', * // createdAt: 2025-01-08T22:52:49.652Z, * // updatedAt: 2025-01-08T22:52:49.652Z * // } * ``` * * @param options - A {@link CreateAssistantOptions} object containing the `name` of the Assistant to be created. * Optionally, users can also specify instructions, metadata, and host region. Region must be one of "us" or "eu" * and determines where the Assistant will be hosted. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A Promise that resolves to an {@link Assistant} model. */ createAssistant(options: CreateAssistantOptions): Promise; /** * Deletes an Assistant by name. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * await pc.deleteAssistant('test1'); * ``` * * @param assistantName - The name of the Assistant to be deleted. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. */ deleteAssistant(assistantName: string): Promise; /** * Retrieves information about an Assistant by name, including its current * status (e.g. whether it is still initializing or ready to use). * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const test = await pc.describeAssistant('test1'); * console.log(test); * // { * // name: 'test1', * // instructions: undefined, * // metadata: undefined, * // status: 'Ready', * // host: 'https://prod-1-data.ke.pinecone.io', * // createdAt: 2025-01-08T22:24:50.525Z, * // updatedAt: 2025-01-08T22:24:52.303Z * // } * ``` * * @param assistantName - The name of the Assistant to retrieve. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A Promise that resolves to an {@link Assistant} model. */ describeAssistant(assistantName: string): Promise; /** * Retrieves a list of all Assistants for a given Pinecone API key. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const assistants = await pc.listAssistants(); * console.log(assistants); * // { * // assistants: [ * // { * // name: 'test2', * // instructions: 'test-instructions', * // metadata: [Object], * // status: 'Ready', * // host: 'https://prod-1-data.ke.pinecone.io', * // createdAt: 2025-01-06T19:14:18.633Z, * // updatedAt: 2025-01-06T19:14:36.977Z * // }, * // ] * // } * ``` * * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A Promise that resolves to an object containing an array of {@link Assistant} models. */ listAssistants(): Promise; /** * Updates an Assistant by name. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * await pc.updateAssistant({ name: 'test1', instructions: 'some new instructions!'}); * // { * // assistantName: test1, * // instructions: 'some new instructions!', * // metadata: undefined * // } * ``` * * @param options - An {@link UpdateAssistantOptions} object containing the name of the assistant to be updated and * optional instructions and metadata. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A Promise that resolves to an {@link UpdateAssistantResponse} object. */ updateAssistant(options: UpdateAssistantOptions): Promise; /** * Evaluates the alignment of a generated answer against a ground truth answer. * Returns metrics for correctness (precision), completeness (recall), and alignment (harmonic mean). * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const result = await pc.evaluate({ * question: "What is the capital of France?", * answer: "The capital of France is Paris.", * groundTruth: "Paris is the capital and most populous city of France." * }); * console.log(result); * // { * // metrics: { * // correctness: 0.95, * // completeness: 0.90, * // alignment: 0.92 * // }, * // reasoning: { evaluatedFacts: [...] }, * // usage: { promptTokens: 100, completionTokens: 50, totalTokens: 150 } * // } * ``` * * @param options - An {@link EvaluateOptions} object containing the question, answer, and groundTruth. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A Promise that resolves to an {@link AlignmentResponse} object containing metrics and reasoning. */ evaluate(options: { question: string; answer: string; groundTruth: string; }): Promise; /** @internal */ _checkForBrowser(): void; /** * @returns The configuration object that was passed to the Pinecone constructor. */ getConfig(): PineconeConfiguration; /** * Creates a backup of an index. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const backup = await pc.createBackup({ indexName: 'my-index', name: 'my-index-backup-1', description: 'weekly backup' }); * console.log(backup); * // { * // backupId: '11450b9f-96e5-47e5-9186-03f346b1f385', * // sourceIndexName: 'my-index', * // sourceIndexId: 'b480770b-600d-4c4e-bf19-799c933ae2bf', * // name: 'my-index-backup-1', * // description: 'weekly backup', * // status: 'Initializing', * // cloud: 'aws', * // region: 'us-east-1', * // dimension: 1024, * // metric: 'cosine', * // recordCount: 500, * // namespaceCount: 4, * // sizeBytes: 78294, * // tags: {}, * // createdAt: '2025-05-07T03:11:11.722238160Z' * // } * ``` * * @param options - A {@link CreateBackupOptions} object containing the indexName to backup, and an optional name * and description for the backup. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A Promise that resolves to a {@link BackupModel} object. */ createBackup(options: CreateBackupOptions): Promise; /** * Creates an index from an existing backup. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const response = await pc.createIndexFromBackup({ backupId: '11450b9f-96e5-47e5-9186-03f346b1f385', name: 'my-index-restore-1' }); * console.log(response); * // { * // restoreJobId: '4d4c8693-10fd-4204-a57b-1e3e626fca07', * // indexId: 'deb7688b-9f21-4c16-8eb7-f0027abd27fe' * // } * ``` * * @param options - A {@link CreateIndexFromBackupOptions} object containing the backupId for the backup to restore * the index from, and the name of the new index. Optionally, you can provide new tags or deletionProtection values for the index. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A Promise that resolves to a {@link CreateIndexFromBackupResponse} object. */ createIndexFromBackup(options: CreateIndexFromBackupOptions): Promise; /** * Describes a backup. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const backup = await pc.describeBackup('11450b9f-96e5-47e5-9186-03f346b1f385'); * console.log(backup); * // { * // backupId: '11450b9f-96e5-47e5-9186-03f346b1f385', * // sourceIndexName: 'my-index', * // sourceIndexId: 'b480770b-600d-4c4e-bf19-799c933ae2bf', * // name: 'my-index-backup-1', * // description: 'weekly backup', * // status: 'Initializing', * // cloud: 'aws', * // region: 'us-east-1', * // dimension: 1024, * // metric: 'cosine', * // recordCount: 500, * // namespaceCount: 4, * // sizeBytes: 78294, * // tags: {}, * // createdAt: '2025-05-07T03:11:11.722238160Z' * // } * ``` * * @param options - The backupId of the backup to describe. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A Promise that resolves to a {@link BackupModel} object. */ describeBackup(backupName: DescribeBackupOptions): Promise; /** * Describes a restore job. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const restoreJob = await pc.describeRestoreJob('4d4c8693-10fd-4204-a57b-1e3e626fca07'); * console.log(restoreJob); * // { * // restoreJobId: '4d4c8693-10fd-4204-a57b-1e3e626fca07', * // backupId: '11450b9f-96e5-47e5-9186-03f346b1f385', * // targetIndexName: 'my-index-restore-1', * // targetIndexId: 'deb7688b-9f21-4c16-8eb7-f0027abd27fe', * // status: 'Completed', * // createdAt: 2025-05-07T03:38:37.107Z, * // completedAt: 2025-05-07T03:40:23.687Z, * // percentComplete: 100 * // } * ``` * * @param options - The restoreJobId of the restore job to describe. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A Promise that resolves to a {@link RestoreJobModel} object. */ describeRestoreJob(restoreJobId: DescribeRestoreJobOptions): Promise; /** * Deletes a backup. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * await pc.deleteBackup('11450b9f-96e5-47e5-9186-03f346b1f385'); * ``` * * @param options - The backupId of the backup to delete. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A Promise that resolves when the request to delete the backup is completed. */ deleteBackup(backupName: DeleteBackupOptions): Promise; /** * Lists backups within a project or a specific index. Pass an indexName to list backups for that index, * otherwise the operation will return all backups in the project. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const backupsList = await pc.listBackups({ indexName: 'my-index', limit: 2 }); * console.log(backupsList); * // { * // data: [ * // { * // backupId: '6a00902c-d118-4ad3-931c-49328c26d558', * // sourceIndexName: 'my-index', * // sourceIndexId: '0888b4d9-0b7b-447e-a403-ab057ceee4d4', * // name: 'my-index-backup-2', * // description: undefined, * // status: 'Ready', * // cloud: 'aws', * // region: 'us-east-1', * // dimension: 5, * // metric: 'cosine', * // recordCount: 200, * // namespaceCount: 2, * // sizeBytes: 67284, * // tags: {}, * // createdAt: '2025-05-07T18:34:13.626650Z' * // }, * // { * // backupId: '2b362ea3-b7cf-4950-866f-0dff37ab781e', * // sourceIndexName: 'my-index', * // sourceIndexId: '0888b4d9-0b7b-447e-a403-ab057ceee4d4', * // name: 'my-index-backup-1', * // description: undefined, * // status: 'Ready', * // cloud: 'aws', * // region: 'us-east-1', * // dimension: 1024, * // metric: 'cosine', * // recordCount: 500, * // namespaceCount: 4, * // sizeBytes: 78294, * // tags: {}, * // createdAt: '2025-05-07T18:33:59.888270Z' * // }, * // ], * // pagination: undefined * // } * ``` * * @param options - A {@link ListBackupsOptions} object containing the optional indexName, limit, and paginationToken values. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A Promise that resolves to a {@link BackupList} object. */ listBackups(options: ListBackupsOptions): Promise; /** * Lists restore jobs within a project. * * @example * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone(); * const restoreJobsList = await pc.listRestoreJobs({ limit: 3 }); * console.log(restoreJobsList); * // { * // data: [ * // { * // restoreJobId: '4d4c8693-10fd-4204-a57b-1e3e626fca07', * // backupId: '11450b9f-96e5-47e5-9186-03f346b1f385', * // targetIndexName: 'my-index-restore-1', * // targetIndexId: 'deb7688b-9f21-4c16-8eb7-f0027abd27fe', * // status: 'Completed', * // createdAt: 2025-05-07T03:38:37.107Z, * // completedAt: 2025-05-07T03:40:23.687Z, * // percentComplete: 100 * // }, * // { * // restoreJobId: 'c60a62e0-63b9-452a-88af-31d89c56c988', * // backupId: '11450b9f-96e5-47e5-9186-03f346b1f385', * // targetIndexName: 'my-index-restore-2', * // targetIndexId: 'f2c9a846-799f-4b19-81a4-f3096b3d6114', * // status: 'Completed', * // createdAt: 2025-05-07T21:42:38.971Z, * // completedAt: 2025-05-07T21:43:11.782Z, * // percentComplete: 100 * // }, * // { * // restoreJobId: '792837b7-8001-47bf-9c11-1859826b9c10', * // backupId: '11450b9f-96e5-47e5-9186-03f346b1f385', * // targetIndexName: 'my-index-restore-3', * // targetIndexId: '620dda62-c999-4dd1-b083-6beb087b31e7', * // status: 'Pending', * // createdAt: 2025-05-07T21:48:39.580Z, * // completedAt: 2025-05-07T21:49:12.084Z, * // percentComplete: 45 * // } * // ], * // pagination: undefined * // } * ``` * * @param options - A {@link ListRestoreJobsOptions} object containing the optional limit and paginationToken values. * @throws {@link Errors.PineconeArgumentError} when arguments passed to the method fail a runtime validation. * @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed. * @returns A Promise that resolves to a {@link RestoreJobList} object. */ listRestoreJobs(options: ListRestoreJobsOptions): Promise; /** * Targets a specific index for performing data operations. * * You can target an index by providing its `name`, its `host`, or both. If only `name` is provided, * the SDK will call {@link describeIndex} to resolve the host. If `host` is provided, the SDK will * perform data operations directly against that host. * * #### Targeting an index by host (recommended for production) * * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone() * * // Get the host from describeIndex * const indexModel = await pc.describeIndex('index-name'); * const index = pc.index({ host: indexModel.host }) * ``` * * #### Targeting an index by name * * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone() * * const index = pc.index({ name: 'index-name' }) * ``` * * #### Targeting an index by name (legacy string syntax - deprecated) * * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone() * * // Legacy syntax - will be removed in next major version * const index = pc.index('index-name') * ``` * * #### Targeting an index by host * * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * const pc = new Pinecone() * * const index = pc.index({ host: 'index-name-abc123.svc.pinecone.io' }) * ``` * * #### Targeting an index, with user-defined Metadata types * * If you are storing metadata alongside your vector values inside your Pinecone records, you can pass a type parameter to `index()` in order to get proper TypeScript typechecking when upserting and querying data. * * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * * const pc = new Pinecone(); * * type MovieMetadata = { * title: string, * runtime: numbers, * genre: 'comedy' | 'horror' | 'drama' | 'action' * } * * // Specify a custom metadata type while targeting the index * const indexModel = await pc.describeIndex('test-index'); * const index = pc.index({ host: indexModel.host }); * * // Now you get type errors if upserting malformed metadata * await index.upsert({ * records: [{ * id: '1234', * values: [ * .... // embedding values * ], * metadata: { * title: 'Gone with the Wind', * runtime: 238, * genre: 'drama', * * // @ts-expect-error because category property not in MovieMetadata * category: 'classic' * } * }] * }) * * const results = await index.query({ * vector: [ * ... // query embedding * ], * filter: { genre: { '$eq': 'drama' }} * }) * const movie = results.matches[0]; * * if (movie.metadata) { * // Since we passed the MovieMetadata type parameter above, * // we can interact with metadata fields without having to * // do any typecasting. * const { title, runtime, genre } = movie.metadata; * console.log(`The best match in drama was ${title}`) * } * ``` * * @typeParam T - The type of metadata associated with each record. * @param options - The {@link IndexOptions} for targeting the index. * @returns An {@link Index} object that can be used to perform data operations. */ index(options: IndexOptions): Index; /** * @deprecated Use the options object pattern instead: `pc.index({ name: 'index-name' })`. * This signature will be removed in the next major version. */ index(indexName: string, indexHostUrl?: string, additionalHeaders?: HTTPHeaders$2): Index; /** * {@inheritDoc index} */ Index(options: IndexOptions): Index; /** * @deprecated Use the options object pattern instead: `pc.Index({ name: 'index-name' })`. * This signature will be removed in the next major version. */ Index(indexName: string, indexHostUrl?: string, additionalHeaders?: HTTPHeaders$2): Index; /** * Targets a specific assistant for performing operations. * * Once an assistant is targeted, you can perform operations such as uploading files, * updating instructions, and chatting. * * #### Targeting an assistant (options object - recommended) * * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * * const pc = new Pinecone(); * const assistant = pc.assistant({ name: 'my-assistant' }); * * // Upload a file to the assistant * await assistant.uploadFile({ * path: 'test-file.txt', * metadata: { description: 'Sample test file' } * }); * ``` * * #### Targeting an assistant (legacy string syntax - deprecated) * * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * * const pc = new Pinecone(); * // Legacy syntax - will be removed in next major version * const assistant = pc.assistant('my-assistant'); * ``` * * #### Full example with chat * * ```typescript * const chatResp = await assistant.chat({ * messages: [{ role: 'user', content: 'What is the capital of France?' }], * }); * console.log(chatResp); * // { * // id: '000000000000000023e7fb015be9d0ad', * // finishReason: 'stop', * // message: { * // role: 'assistant', * // content: 'The capital of France is Paris.' * // }, * // model: 'gpt-4o-2024-05-13', * // citations: [ { position: 209, references: [Array] } ], * // usage: { promptTokens: 493, completionTokens: 38, totalTokens: 531 } * // } * ``` * * @param options - The {@link AssistantOptions} for targeting the assistant. * @returns An {@link Assistant} object that can be used to perform assistant-related operations. */ assistant(options: AssistantOptions): Assistant; /** * @deprecated Use the options object pattern instead: `pc.assistant({ name: 'assistant-name' })`. * This signature will be removed in the next major version. */ assistant(name: string, host?: string): Assistant; /** * {@inheritDoc assistant} */ Assistant(options: AssistantOptions): Assistant; /** * @deprecated Use the options object pattern instead: `pc.Assistant({ name: 'assistant-name' })`. * This signature will be removed in the next major version. */ Assistant(name: string, host?: string): Assistant; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/errors/base.d.ts declare class BasePineconeError extends Error { /** The underlying error, if any. */ cause?: Error; constructor(message?: string, cause?: Error); } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/errors/config.d.ts /** * This exception indicates there is a problem with the configuration values * you have provided to the client. The error message should contain additional * context about what you are missing. * * @see {@link Pinecone} for information about initializing the client. */ declare class PineconeConfigurationError extends BasePineconeError { constructor(message: string); } /** * This exception indicates an API call that returned a response that was * unable to be parsed or that did not include expected fields. It's not * expected to ever occur. * * If you encounter this error, please [file an issue](https://github.com/pinecone-io/pinecone-ts-client/issues) so we can investigate. */ declare class PineconeUnexpectedResponseError extends BasePineconeError { constructor(url: string, status: number, body: string, message?: string); } /** * This error occurs when the client tries to read environment variables in * an environment that does not have access to the Node.js global `process.env`. * * If you are seeing this error, you will need to configure the client by passing * configuration values to the `Pinecone` constructor. * * ```typescript * import { Pinecone } from '@pinecone-database/pinecone'; * * const pinecone = new Pinecone({ * apiKey: 'YOUR_API_KEY', * }) * ``` * * @see Instructions for configuring { @link Pinecone } */ declare class PineconeEnvironmentVarsNotSupportedError extends BasePineconeError { constructor(message: string); } /** * This error occurs when the client is unable to resolve the database host for a given * index. This is unexpected to occur unless there is a problem with the Pinecone service. * * If you encounter this error, please [file an issue](https://github.com/pinecone-io/pinecone-ts-client/issues) so we can investigate. */ declare class PineconeUnableToResolveHostError extends BasePineconeError { constructor(message: string); } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/errors/http.d.ts /** @internal */ type FailedRequestInfo = { status: number; url?: string; body?: string; message?: string; }; /** This error is thrown when API requests return with status 400. Typically this is due to some aspect of the request being incorrect or invalid. * * Some examples when this error could occur: * - While attempting to create an index with no available quota in your project. * - While upserting records that do not match the `dimension` of your index * - While attempting to create an index using an invalid name ("!@#$%") */ declare class PineconeBadRequestError extends BasePineconeError { constructor(failedRequest: FailedRequestInfo); } /** * This error occurs when API requests are attempted using invalid configurations such as a mispelled or revoked API key. * * Log in to https://app.pinecone.io to verify you have configured the { @link Pinecone } * client using the correct values. */ declare class PineconeAuthorizationError extends BasePineconeError { constructor(failedRequest: FailedRequestInfo, messageOverride?: string); } /** * This error is thrown when interacting with a resource such as an index or collection * that cannot be found. */ declare class PineconeNotFoundError extends BasePineconeError { constructor(failedRequest: FailedRequestInfo); } /** * This error is thrown when attempting to create a resource such as an index or * collection with a name that is already in use. * */ declare class PineconeConflictError extends BasePineconeError { constructor(failedRequest: FailedRequestInfo); } /** * This error is thrown when API requests return with status 422 * (Unprocessable Entity). The request was well-formed, but the server was * unable to process it because its contents are semantically invalid. * * A common cause is a request body that does not match the schema expected by * the endpoint, such as creating an index with a field configuration that is * not permitted. */ declare class PineconeUnprocessableEntityError extends BasePineconeError { constructor(failedRequest: FailedRequestInfo); } /** * This error indicates API responses are returning with status 500 and * something is wrong with Pinecone. Check the [status page](https://status.pinecone.io/) * for information about current or recent outages. * * @see [Pinecone's status page](https://status.pinecone.io/) */ declare class PineconeInternalServerError extends BasePineconeError { constructor(failedRequest: FailedRequestInfo); } declare class PineconeMaxRetriesExceededError extends BasePineconeError { constructor(retries: number); } /** * This error indicates API responses are returning with status 503 and * Pinecone itself is down. Check the [status page](https://status.pinecone.io/) * for information about current or recent outages. * * The difference between this error (503) and a PineconeInternalServerError (500) is that this error does NOT indicate * that the server is _unable_ to process the request, just that the server will not process the request. * * @see [Pinecone's status page](https://status.pinecone.io/) */ declare class PineconeUnavailableError extends BasePineconeError { constructor(failedRequest: FailedRequestInfo); } /** * This error is thrown when you are attempting to use a feature that is * not implemented or unavailable to you on your current plan. Free indexes * only support a subset of Pinecone's capabilities, and if you are seeing * these exceptions then you should consult the * [pricing page](https://www.pinecone.io/pricing/) to see whether upgrading * makes sense for your use case. */ declare class PineconeNotImplementedError extends BasePineconeError { constructor(requestInfo: FailedRequestInfo); } /** * This error is thrown when an API endpoint does not support the HTTP method * used in the request. This typically indicates the operation is not available * for the targeted resource. */ declare class PineconeMethodNotAllowedError extends BasePineconeError { constructor(failedRequest: FailedRequestInfo); } /** * Thrown when `waitUntilReady: true` is used and the index does not become * ready within the specified `timeout`. */ declare class PineconeTimeoutError extends BasePineconeError { constructor(indexName: string, timeoutMs: number); } /** * Thrown when an index enters the `InitializationFailed` state during * `waitUntilReady` polling. */ declare class PineconeIndexInitializationFailedError extends BasePineconeError { constructor(indexName: string); } /** * Thrown when an index enters a terminal non-ready state (`Terminating` or * `Disabled`) during `waitUntilReady` polling. */ declare class PineconeIndexTerminatedError extends BasePineconeError { constructor(indexName: string, state: string); } /** * This catch-all exception is thrown when a request error that is not * specifically mapped to another exception is thrown. */ declare class PineconeUnmappedHttpError extends BasePineconeError { constructor(failedRequest: FailedRequestInfo); } /** @internal */ declare const mapHttpStatusError: (failedRequestInfo: FailedRequestInfo) => PineconeBadRequestError | PineconeAuthorizationError | PineconeNotFoundError | PineconeConflictError | PineconeUnprocessableEntityError | PineconeInternalServerError | PineconeUnavailableError | PineconeNotImplementedError | PineconeMethodNotAllowedError; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/errors/request.d.ts /** * This error is thrown when the client attempts to make a * request and never receives any response. * * This could be due to: * - Network problems which prevent the request from being completed. * - An outage of Pinecone's APIs. See [Pinecone's status page](https://status.pinecone.io/) to find out whether there is an ongoing incident. * * The `cause` property will contain a reference to the underlying error. Inspect its value to find out more about the root cause of the error. * ``` * import { Pinecone } from '@pinecone-database/pinecone'; * * const p = new Pinecone({ apiKey: 'invalid-api-key-value' }) * * try { * await p.listIndexes(); * } catch (e) { * console.log(e.name); // PineconeConnectionError * console.log(e.cause); // Error [FetchError]: The request failed and the interceptors did not return an alternative response * console.log(e.cause.cause); // TypeError: fetch failed * console.log(e.cause.cause.cause); // Error: getaddrinfo ENOTFOUND controller.wrong-environment.pinecone.io * } * ``` * * @see [Pinecone's status page](https://status.pinecone.io/) * */ declare class PineconeConnectionError extends BasePineconeError { constructor(e: Error, url?: string); } /** * This error is thrown any time a request to the Pinecone API fails. * * The `cause` property will contain a reference to the underlying error. Inspect its value to find out more about the root cause. */ declare class PineconeRequestError extends BasePineconeError { constructor(context: ErrorContext$4); } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/errors/validation.d.ts /** * This error is thrown when arguments passed to a Pinecone * client method fail a runtime validation. */ declare class PineconeArgumentError extends BasePineconeError { constructor(message: string); } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/errors/utils.d.ts /** @internal */ declare const extractMessage: (error: ResponseError) => Promise; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/errors/handling.d.ts /** @internal */ declare const handleApiError: (e: unknown, customMessage?: (statusCode: number, rawMessageText: string) => Promise, url?: string) => Promise; declare namespace index_d_exports$2 { export { BasePineconeError, PineconeArgumentError, PineconeAuthorizationError, PineconeBadRequestError, PineconeConfigurationError, PineconeConflictError, PineconeConnectionError, PineconeEnvironmentVarsNotSupportedError, PineconeIndexInitializationFailedError, PineconeIndexTerminatedError, PineconeInternalServerError, PineconeMaxRetriesExceededError, PineconeMethodNotAllowedError, PineconeNotFoundError, PineconeNotImplementedError, PineconeRequestError, PineconeTimeoutError, PineconeUnableToResolveHostError, PineconeUnavailableError, PineconeUnexpectedResponseError, PineconeUnmappedHttpError, PineconeUnprocessableEntityError, extractMessage, handleApiError, mapHttpStatusError }; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/runtime.d.ts interface ConfigurationParameters { basePath?: string; fetchApi?: FetchAPI; middleware?: Middleware[]; queryParamsStringify?: (params: HTTPQuery) => string; username?: string; password?: string; apiKey?: string | ((name: string) => string); accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); headers?: HTTPHeaders; credentials?: RequestCredentials; } declare class Configuration { private configuration; constructor(configuration?: ConfigurationParameters); set config(configuration: Configuration); get basePath(): string; get fetchApi(): FetchAPI | undefined; get middleware(): Middleware[]; get queryParamsStringify(): (params: HTTPQuery) => string; get username(): string | undefined; get password(): string | undefined; get apiKey(): ((name: string) => string) | undefined; get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined; get headers(): HTTPHeaders | undefined; get credentials(): RequestCredentials | undefined; } /** * This is the base class for all generated API classes. */ declare class BaseAPI { protected configuration: Configuration; private static readonly jsonRegex; private middleware; constructor(configuration?: Configuration); withMiddleware(this: T, ...middlewares: Middleware[]): T; withPreMiddleware(this: T, ...preMiddlewares: Array): T; withPostMiddleware(this: T, ...postMiddlewares: Array): T; /** * Check if the given MIME is a JSON MIME. * JSON MIME examples: * application/json * application/json; charset=UTF8 * APPLICATION/JSON * application/vnd.company+json * @param mime - MIME (Multipurpose Internet Mail Extensions) * @return True if the given MIME is JSON, false otherwise. */ protected isJsonMime(mime: string | null | undefined): boolean; protected request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise; private createFetchParams; private fetchApi; /** * Create a shallow clone of `this` by constructing a new instance * and then shallow cloning data members. */ private clone; } type FetchAPI = WindowOrWorkerGlobalScope['fetch']; type Json = any; type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; type HTTPHeaders = { [key: string]: string; }; type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery; }; type HTTPBody = Json | FormData | URLSearchParams; type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody; }; type InitOverrideFunction = (requestContext: { init: HTTPRequestInit; context: RequestOpts; }) => Promise; interface FetchParams { url: string; init: RequestInit; } interface RequestOpts { path: string; method: HTTPMethod; headers: HTTPHeaders; query?: HTTPQuery; body?: HTTPBody; } interface RequestContext { fetch: FetchAPI; url: string; init: RequestInit; } interface ResponseContext { fetch: FetchAPI; url: string; init: RequestInit; response: Response; } interface ErrorContext { fetch: FetchAPI; url: string; init: RequestInit; error: unknown; response?: Response; } interface Middleware { pre?(context: RequestContext): Promise; post?(context: ResponseContext): Promise; onError?(context: ErrorContext): Promise; } interface ApiResponse$1 { raw: Response; value(): Promise; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/APIKey.d.ts /** * Pinecone Admin API * Provides an API for managing a Pinecone organization and its resources, including projects, API keys, organization users and invites, service accounts, and role bindings. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The details of an API key, without the secret. * @export * @interface APIKey */ interface APIKey { /** * The unique ID of the API key. * @type {string} * @memberof APIKey */ id: string; /** * The name of the API key. * @type {string} * @memberof APIKey */ name: string; /** * The ID of the project containing the API key. * @type {string} * @memberof APIKey */ projectId: string; /** * The roles assigned to the API key. * @type {Array} * @memberof APIKey */ roles: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/APIKeyWithSecret.d.ts /** * The details of an API key, including the secret. Only returned on API key creation. * @export * @interface APIKeyWithSecret */ interface APIKeyWithSecret { /** * * @type {APIKey} * @memberof APIKeyWithSecret */ key: APIKey; /** * The value to use as an API key. New keys will have the format `"pckey__"`. The entire string should be used when authenticating. * @type {string} * @memberof APIKeyWithSecret */ value: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/CreateAPIKeyRequest.d.ts /** * Pinecone Admin API * Provides an API for managing a Pinecone organization and its resources, including projects, API keys, organization users and invites, service accounts, and role bindings. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface CreateAPIKeyRequest */ interface CreateAPIKeyRequest { /** * The name of the API key. The name must be 1-80 characters long. * @type {string} * @memberof CreateAPIKeyRequest */ name: string; /** * The roles to create the API key with. Default is `["ProjectEditor"]`. * @type {Array} * @memberof CreateAPIKeyRequest */ roles?: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/RoleBindingInput.d.ts /** * Pinecone Admin API * Provides an API for managing a Pinecone organization and its resources, including projects, API keys, organization users and invites, service accounts, and role bindings. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * A role to grant to the principal being created. `resource_type` selects the binding scope and acts as the tag for the entry. * For `organization` scope, omit `resource_id`; the binding applies to the principal's organization (inferred from the request context). For `project` scope, `resource_id` is required and must be the project UUID. * @export * @interface RoleBindingInput */ interface RoleBindingInput { /** * The kind of resource scope a role binding applies to. * Possible values: `organization`, `project`. * @type {string} * @memberof RoleBindingInput */ resourceType: string; /** * Project UUID. Required when `resource_type` is `project`; omit for `organization` scope. * @type {string} * @memberof RoleBindingInput */ resourceId?: string; /** * A role assigned to a principal at a resource scope. * @type {string} * @memberof RoleBindingInput */ role: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/CreateInviteRequest.d.ts /** * * @export * @interface CreateInviteRequest */ interface CreateInviteRequest { /** * The email address to invite. * @type {string} * @memberof CreateInviteRequest */ email: string; /** * Role bindings for the invitee. Must include at least one `organization`-scoped binding that grants organization membership (`OrgOwner`, `OrgManager`, `OrgBillingAdmin`, or `OrgMember`); `project`-scoped bindings are optional. Not returned in the response. * @type {Array} * @memberof CreateInviteRequest */ roleBindings: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/CreateProjectRequest.d.ts /** * Pinecone Admin API * Provides an API for managing a Pinecone organization and its resources, including projects, API keys, organization users and invites, service accounts, and role bindings. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface CreateProjectRequest */ interface CreateProjectRequest { /** * The name of the new project. * @type {string} * @memberof CreateProjectRequest */ name: string; /** * The maximum number of Pods that can be created in the project. Default is `0` (serverless only). * @type {number} * @memberof CreateProjectRequest */ maxPods?: number; /** * Whether to force encryption with a customer-managed encryption key (CMEK). Default is `false`. * @type {boolean} * @memberof CreateProjectRequest */ forceEncryptionWithCmek?: boolean; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/CreateRoleBindingRequest.d.ts /** * Pinecone Admin API * Provides an API for managing a Pinecone organization and its resources, including projects, API keys, organization users and invites, service accounts, and role bindings. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface CreateRoleBindingRequest */ interface CreateRoleBindingRequest { /** * The kind of principal that receives permissions from a role binding. * Possible values: `user`, `service_account`, `api_key`, `invite`. * @type {string} * @memberof CreateRoleBindingRequest */ principalType: string; /** * Principal ID. Format depends on `principal_type`. * @type {string} * @memberof CreateRoleBindingRequest */ principalId: string; /** * The kind of resource scope a role binding applies to. * Possible values: `organization`, `project`. * @type {string} * @memberof CreateRoleBindingRequest */ resourceType: string; /** * Project UUID. Required when `resource_type` is `project`; omit for `organization` scope. * @type {string} * @memberof CreateRoleBindingRequest */ resourceId?: string; /** * A role assigned to a principal at a resource scope. * @type {string} * @memberof CreateRoleBindingRequest */ role: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/CreateServiceAccountRequest.d.ts /** * * @export * @interface CreateServiceAccountRequest */ interface CreateServiceAccountRequest { /** * The human-readable name of the service account. * @type {string} * @memberof CreateServiceAccountRequest */ name: string; /** * Optional initial role bindings. Omitting the field or passing an empty array creates the service account with no role bindings; roles can be added later via the role binding endpoints. A service account may be granted any organization- or project-scoped role. Not returned in the response. * @type {Array} * @memberof CreateServiceAccountRequest */ roleBindings?: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/ErrorResponseError.d.ts /** * Pinecone Admin API * Provides an API for managing a Pinecone organization and its resources, including projects, API keys, organization users and invites, service accounts, and role bindings. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Detailed information about the error that occurred. * @export * @interface ErrorResponseError */ interface ErrorResponseError { /** * The error code. * Possible values: `OK`, `UNKNOWN`, `INVALID_ARGUMENT`, `DEADLINE_EXCEEDED`, `QUOTA_EXCEEDED`, `NOT_FOUND`, `ALREADY_EXISTS`, `PERMISSION_DENIED`, `UNAUTHENTICATED`, `RESOURCE_EXHAUSTED`, `FAILED_PRECONDITION`, `ABORTED`, `OUT_OF_RANGE`, `UNIMPLEMENTED`, `INTERNAL`, `UNAVAILABLE`, `DATA_LOSS`, `FORBIDDEN`, or `UNPROCESSABLE_ENTITY`. * @type {string} * @memberof ErrorResponseError */ code: string; /** * * @type {string} * @memberof ErrorResponseError */ message: string; /** * Additional information about the error. This field is not guaranteed to be present. * @type {object} * @memberof ErrorResponseError */ details?: object; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/ErrorResponse.d.ts /** * The response shape used for all error responses. * @export * @interface ErrorResponse */ interface ErrorResponse { /** * The HTTP status code of the error. * @type {number} * @memberof ErrorResponse */ status: number; /** * * @type {ErrorResponseError} * @memberof ErrorResponse */ error: ErrorResponseError; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/Invite.d.ts /** * Pinecone Admin API * Provides an API for managing a Pinecone organization and its resources, including projects, API keys, organization users and invites, service accounts, and role bindings. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * An invitation to join the organization. * @export * @interface Invite */ interface Invite { /** * The unique ID of the invite. * @type {string} * @memberof Invite */ id: string; /** * The email address the invite was sent to. * @type {string} * @memberof Invite */ email: string; /** * The lifecycle status of an invite. * Possible values: `pending`, `expired`, `processed`. List endpoints return only `pending` and `expired` invites; `processed` is returned only when fetching a single invite by ID. * @type {string} * @memberof Invite */ status: string; /** * When the invite expires if not accepted. Default TTL is 7 days. Resending the invite extends this to now plus 7 days. `null` if the invite does not expire. * @type {Date} * @memberof Invite */ expiresAt?: Date | null; /** * The date and time the invite was accepted. `null` or omitted while the invite is still pending or expired. * @type {Date} * @memberof Invite */ processedAt?: Date | null; /** * The date and time the invite was created. * @type {Date} * @memberof Invite */ createdAt: Date; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/InviteListPagination.d.ts /** * Pinecone Admin API * Provides an API for managing a Pinecone organization and its resources, including projects, API keys, organization users and invites, service accounts, and role bindings. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Cursor envelope for the next page. `null` (or absent) on the final page of results. * @export * @interface InviteListPagination */ interface InviteListPagination { /** * Opaque cursor for the next page. Do not parse or construct. Invalid or expired tokens return `400`. * @type {string} * @memberof InviteListPagination */ next?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/InviteList.d.ts /** * A paginated list of invites in the organization. * @export * @interface InviteList */ interface InviteList { /** * The page of invites. * @type {Array} * @memberof InviteList */ data: Array; /** * * @type {InviteListPagination} * @memberof InviteList */ pagination?: InviteListPagination | null; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/ListApiKeysResponse.d.ts /** * * @export * @interface ListApiKeysResponse */ interface ListApiKeysResponse { /** * * @type {Array} * @memberof ListApiKeysResponse */ data: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/Organization.d.ts /** * Pinecone Admin API * Provides an API for managing a Pinecone organization and its resources, including projects, API keys, organization users and invites, service accounts, and role bindings. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The details of an organization. * @export * @interface Organization */ interface Organization { /** * The unique ID of the organization. * @type {string} * @memberof Organization */ id: string; /** * The name of the organization. * @type {string} * @memberof Organization */ name: string; /** * The current plan the organization is on. * @type {string} * @memberof Organization */ plan: string; /** * The current payment status of the organization. * @type {string} * @memberof Organization */ paymentStatus: string; /** * The date and time when the organization was created. * @type {Date} * @memberof Organization */ createdAt: Date; /** * The support tier of the organization. * @type {string} * @memberof Organization */ supportTier: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/OrganizationList.d.ts /** * * @export * @interface OrganizationList */ interface OrganizationList { /** * * @type {Array} * @memberof OrganizationList */ data: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/Project.d.ts /** * Pinecone Admin API * Provides an API for managing a Pinecone organization and its resources, including projects, API keys, organization users and invites, service accounts, and role bindings. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * The details of a project. * @export * @interface Project */ interface Project { /** * The unique ID of the project. * @type {string} * @memberof Project */ id: string; /** * The name of the project. * @type {string} * @memberof Project */ name: string; /** * The maximum number of Pods that can be created in the project. * @type {number} * @memberof Project */ maxPods: number; /** * Whether to force encryption with a customer-managed encryption key (CMEK). * @type {boolean} * @memberof Project */ forceEncryptionWithCmek: boolean; /** * The unique ID of the organization that the project belongs to. * @type {string} * @memberof Project */ organizationId: string; /** * The date and time when the project was created. * @type {Date} * @memberof Project */ createdAt?: Date; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/ProjectList.d.ts /** * * @export * @interface ProjectList */ interface ProjectList { /** * * @type {Array} * @memberof ProjectList */ data: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/RoleBinding.d.ts /** * Pinecone Admin API * Provides an API for managing a Pinecone organization and its resources, including projects, API keys, organization users and invites, service accounts, and role bindings. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * Grants a `role` to a `principal` at a `resource` scope. * @export * @interface RoleBinding */ interface RoleBinding { /** * The unique ID of the role binding. * @type {string} * @memberof RoleBinding */ id: string; /** * The kind of principal that receives permissions from a role binding. * Possible values: `user`, `service_account`, `api_key`, `invite`. * @type {string} * @memberof RoleBinding */ principalType: string; /** * The principal's ID. A UUID for all principal types (`user`, `service_account`, `api_key`, `invite`). * @type {string} * @memberof RoleBinding */ principalId: string; /** * The kind of resource scope a role binding applies to. * Possible values: `organization`, `project`. * @type {string} * @memberof RoleBinding */ resourceType: string; /** * The organization or project that the binding is scoped to. * @type {string} * @memberof RoleBinding */ resourceId: string; /** * A role assigned to a principal at a resource scope. * @type {string} * @memberof RoleBinding */ role: string; /** * When the role binding was created. * @type {Date} * @memberof RoleBinding */ createdAt: Date; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/RoleBindingList.d.ts /** * A paginated list of role bindings. * @export * @interface RoleBindingList */ interface RoleBindingList { /** * The page of role bindings. * @type {Array} * @memberof RoleBindingList */ data: Array; /** * * @type {InviteListPagination} * @memberof RoleBindingList */ pagination?: InviteListPagination | null; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/ServiceAccount.d.ts /** * Pinecone Admin API * Provides an API for managing a Pinecone organization and its resources, including projects, API keys, organization users and invites, service accounts, and role bindings. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * A service account. The OAuth `client_secret` is not included. * @export * @interface ServiceAccount */ interface ServiceAccount { /** * The unique identifier for the service account. Use this as the path parameter on `/admin/service-accounts/{service_account_id}` endpoints and as the `principal_id` when querying or creating role bindings. * @type {string} * @memberof ServiceAccount */ id: string; /** * A short human-readable label, set by the caller at creation time. * @type {string} * @memberof ServiceAccount */ name: string; /** * The OAuth client ID used by the service account to obtain access tokens. Used only for OAuth token exchange. * @type {string} * @memberof ServiceAccount */ clientId: string; /** * The date and time the service account was created. * @type {Date} * @memberof ServiceAccount */ createdAt: Date; /** * The date and time of the service account's most recent metadata update. * @type {Date} * @memberof ServiceAccount */ updatedAt: Date; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/ServiceAccountList.d.ts /** * A paginated list of service accounts in the organization. * @export * @interface ServiceAccountList */ interface ServiceAccountList { /** * The page of service accounts. * @type {Array} * @memberof ServiceAccountList */ data: Array; /** * * @type {InviteListPagination} * @memberof ServiceAccountList */ pagination?: InviteListPagination | null; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/ServiceAccountWithSecret.d.ts /** * A service account with a newly issued OAuth `client_secret`. The secret is returned only once and cannot be retrieved later. * @export * @interface ServiceAccountWithSecret */ interface ServiceAccountWithSecret { /** * * @type {ServiceAccount} * @memberof ServiceAccountWithSecret */ serviceAccount: ServiceAccount; /** * The OAuth client secret. Returned exactly once. Treat this value as a credential — store it securely and never log it. * @type {string} * @memberof ServiceAccountWithSecret */ clientSecret: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/UpdateAPIKeyRequest.d.ts /** * Pinecone Admin API * Provides an API for managing a Pinecone organization and its resources, including projects, API keys, organization users and invites, service accounts, and role bindings. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface UpdateAPIKeyRequest */ interface UpdateAPIKeyRequest { /** * A new name for the API key. The name must be 1-80 characters long. If omitted, the name will not be updated. * @type {string} * @memberof UpdateAPIKeyRequest */ name?: string; /** * A new set of roles for the API key. Existing roles will be removed if not included. * If this field is omitted, the roles will not be updated. * @type {Array} * @memberof UpdateAPIKeyRequest */ roles?: Array; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/UpdateOrganizationRequest.d.ts /** * Pinecone Admin API * Provides an API for managing a Pinecone organization and its resources, including projects, API keys, organization users and invites, service accounts, and role bindings. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface UpdateOrganizationRequest */ interface UpdateOrganizationRequest { /** * The new name for the organization. * @type {string} * @memberof UpdateOrganizationRequest */ name?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/UpdateProjectRequest.d.ts /** * Pinecone Admin API * Provides an API for managing a Pinecone organization and its resources, including projects, API keys, organization users and invites, service accounts, and role bindings. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface UpdateProjectRequest */ interface UpdateProjectRequest { /** * The name of the new project. * @type {string} * @memberof UpdateProjectRequest */ name?: string; /** * The maximum number of Pods that can be created in the project. * @type {number} * @memberof UpdateProjectRequest */ maxPods?: number; /** * Whether to force encryption with a customer-managed encryption key (CMEK). Once enabled, CMEK encryption cannot be disabled. * @type {boolean} * @memberof UpdateProjectRequest */ forceEncryptionWithCmek?: boolean; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/UpdateServiceAccountRequest.d.ts /** * Pinecone Admin API * Provides an API for managing a Pinecone organization and its resources, including projects, API keys, organization users and invites, service accounts, and role bindings. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface UpdateServiceAccountRequest */ interface UpdateServiceAccountRequest { /** * A new name for the service account. If omitted, the name is unchanged. * @type {string} * @memberof UpdateServiceAccountRequest */ name?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/User.d.ts /** * Pinecone Admin API * Provides an API for managing a Pinecone organization and its resources, including projects, API keys, organization users and invites, service accounts, and role bindings. * * The version of the OpenAPI document: 2026-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * A user who is a member of the organization. * @export * @interface User */ interface User { /** * The unique ID of the user. * @type {string} * @memberof User */ id: string; /** * The user's email address. * @type {string} * @memberof User */ email: string; /** * The user's display name. Omitted from the response if the user has not set one. * @type {string} * @memberof User */ name?: string; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/models/UserList.d.ts /** * A paginated list of users in the organization. * @export * @interface UserList */ interface UserList { /** * The page of users. * @type {Array} * @memberof UserList */ data: Array; /** * * @type {InviteListPagination} * @memberof UserList */ pagination?: InviteListPagination | null; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/apis/APIKeysApi.d.ts interface CreateApiKeyRequest { xPineconeApiVersion: string; projectId: string; createAPIKeyRequest: CreateAPIKeyRequest; } interface DeleteApiKeyRequest { xPineconeApiVersion: string; apiKeyId: string; } interface FetchApiKeyRequest { xPineconeApiVersion: string; apiKeyId: string; } interface ListProjectApiKeysRequest { xPineconeApiVersion: string; projectId: string; } interface UpdateApiKeyRequest { xPineconeApiVersion: string; apiKeyId: string; updateAPIKeyRequest: UpdateAPIKeyRequest; } /** * */ declare class APIKeysApi extends BaseAPI { /** * Create an API key for a project to authenticate Data Plane and Control Plane requests. * Create an API key */ createApiKeyRaw(requestParameters: CreateApiKeyRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Create an API key for a project to authenticate Data Plane and Control Plane requests. * Create an API key */ createApiKey(requestParameters: CreateApiKeyRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * Delete an API key from a project. * Delete an API key */ deleteApiKeyRaw(requestParameters: DeleteApiKeyRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Delete an API key from a project. * Delete an API key */ deleteApiKey(requestParameters: DeleteApiKeyRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * Get an API key\'s details, excluding its secret. * Get API key details */ fetchApiKeyRaw(requestParameters: FetchApiKeyRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Get an API key\'s details, excluding its secret. * Get API key details */ fetchApiKey(requestParameters: FetchApiKeyRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * List all API keys in a project. * List API keys */ listProjectApiKeysRaw(requestParameters: ListProjectApiKeysRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * List all API keys in a project. * List API keys */ listProjectApiKeys(requestParameters: ListProjectApiKeysRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * Update an API key\'s name and roles. * Update an API key */ updateApiKeyRaw(requestParameters: UpdateApiKeyRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Update an API key\'s name and roles. * Update an API key */ updateApiKey(requestParameters: UpdateApiKeyRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/apis/InvitesApi.d.ts interface CreateInviteOperationRequest { xPineconeApiVersion: string; createInviteRequest: CreateInviteRequest; } interface DeleteInviteRequest { xPineconeApiVersion: string; inviteId: string; } interface FetchInviteRequest { xPineconeApiVersion: string; inviteId: string; } interface ListInvitesRequest { xPineconeApiVersion: string; limit?: number; paginationToken?: string; } interface ResendInviteRequest { xPineconeApiVersion: string; inviteId: string; } /** * */ declare class InvitesApi extends BaseAPI { /** * Invite a user to the organization by email and grant their initial role bindings. * Invite a user to the organization */ createInviteRaw(requestParameters: CreateInviteOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Invite a user to the organization by email and grant their initial role bindings. * Invite a user to the organization */ createInvite(requestParameters: CreateInviteOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * Delete a pending or expired invite and its role bindings; to remove an accepted user, delete the user instead. * Delete an invite */ deleteInviteRaw(requestParameters: DeleteInviteRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Delete a pending or expired invite and its role bindings; to remove an accepted user, delete the user instead. * Delete an invite */ deleteInvite(requestParameters: DeleteInviteRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * Get an invite in the caller\'s organization by ID. * Get invite details */ fetchInviteRaw(requestParameters: FetchInviteRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Get an invite in the caller\'s organization by ID. * Get invite details */ fetchInvite(requestParameters: FetchInviteRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * List pending and expired invites in the caller\'s organization. * List invites */ listInvitesRaw(requestParameters: ListInvitesRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * List pending and expired invites in the caller\'s organization. * List invites */ listInvites(requestParameters: ListInvitesRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * Resend the invite email and extend its expiration to 7 days from now; limited to 100 emails per hour per organization. * Resend an invite email */ resendInviteRaw(requestParameters: ResendInviteRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Resend the invite email and extend its expiration to 7 days from now; limited to 100 emails per hour per organization. * Resend an invite email */ resendInvite(requestParameters: ResendInviteRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/apis/OrganizationsApi.d.ts interface DeleteOrganizationRequest { xPineconeApiVersion: string; organizationId: string; } interface FetchOrganizationRequest { xPineconeApiVersion: string; organizationId: string; } interface ListOrganizationsRequest { xPineconeApiVersion: string; } interface UpdateOrganizationOperationRequest { xPineconeApiVersion: string; organizationId: string; updateOrganizationRequest: UpdateOrganizationRequest; } /** * */ declare class OrganizationsApi extends BaseAPI { /** * Delete an organization and all its configuration; delete all its projects first. * Delete an organization */ deleteOrganizationRaw(requestParameters: DeleteOrganizationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Delete an organization and all its configuration; delete all its projects first. * Delete an organization */ deleteOrganization(requestParameters: DeleteOrganizationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * Get an organization\'s details. * Get organization details */ fetchOrganizationRaw(requestParameters: FetchOrganizationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Get an organization\'s details. * Get organization details */ fetchOrganization(requestParameters: FetchOrganizationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * List all organizations associated with an account. * List organizations */ listOrganizationsRaw(requestParameters: ListOrganizationsRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * List all organizations associated with an account. * List organizations */ listOrganizations(requestParameters: ListOrganizationsRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * Update an organization\'s name. * Update an organization */ updateOrganizationRaw(requestParameters: UpdateOrganizationOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Update an organization\'s name. * Update an organization */ updateOrganization(requestParameters: UpdateOrganizationOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/apis/ProjectsApi.d.ts interface CreateProjectOperationRequest { xPineconeApiVersion: string; createProjectRequest: CreateProjectRequest; } interface DeleteProjectRequest { xPineconeApiVersion: string; projectId: string; } interface FetchProjectRequest { xPineconeApiVersion: string; projectId: string; } interface ListProjectsRequest { xPineconeApiVersion: string; } interface UpdateProjectOperationRequest { xPineconeApiVersion: string; projectId: string; updateProjectRequest: UpdateProjectRequest; } /** * */ declare class ProjectsApi extends BaseAPI { /** * Create a new project. * Create a new project */ createProjectRaw(requestParameters: CreateProjectOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Create a new project. * Create a new project */ createProject(requestParameters: CreateProjectOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * Delete a project and all its configuration; delete its indexes, assistants, backups, and collections first. * Delete a project */ deleteProjectRaw(requestParameters: DeleteProjectRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Delete a project and all its configuration; delete its indexes, assistants, backups, and collections first. * Delete a project */ deleteProject(requestParameters: DeleteProjectRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * Get a project\'s details. * Get project details */ fetchProjectRaw(requestParameters: FetchProjectRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Get a project\'s details. * Get project details */ fetchProject(requestParameters: FetchProjectRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * List all projects in an organization. * List projects */ listProjectsRaw(requestParameters: ListProjectsRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * List all projects in an organization. * List projects */ listProjects(requestParameters: ListProjectsRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * Update a project\'s name, maximum number of Pods, or customer-managed encryption key (CMEK). * Update a project */ updateProjectRaw(requestParameters: UpdateProjectOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Update a project\'s name, maximum number of Pods, or customer-managed encryption key (CMEK). * Update a project */ updateProject(requestParameters: UpdateProjectOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/apis/RoleBindingsApi.d.ts interface CreateRoleBindingOperationRequest { xPineconeApiVersion: string; createRoleBindingRequest: CreateRoleBindingRequest; } interface DeleteRoleBindingRequest { xPineconeApiVersion: string; roleBindingId: string; } interface FetchRoleBindingRequest { xPineconeApiVersion: string; roleBindingId: string; } interface ListRoleBindingsRequest { xPineconeApiVersion: string; principalType?: string; principalId?: string; resourceType?: string; resourceId?: string; role?: string; limit?: number; paginationToken?: string; } /** * */ declare class RoleBindingsApi extends BaseAPI { /** * Grant a role to a principal at an organization or project scope. * Create a role binding */ createRoleBindingRaw(requestParameters: CreateRoleBindingOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Grant a role to a principal at an organization or project scope. * Create a role binding */ createRoleBinding(requestParameters: CreateRoleBindingOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * Delete a role binding; permissions are revoked when the deletion completes. * Delete a role binding */ deleteRoleBindingRaw(requestParameters: DeleteRoleBindingRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Delete a role binding; permissions are revoked when the deletion completes. * Delete a role binding */ deleteRoleBinding(requestParameters: DeleteRoleBindingRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * Get a role binding in the caller\'s organization by ID. * Get role binding details */ fetchRoleBindingRaw(requestParameters: FetchRoleBindingRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Get a role binding in the caller\'s organization by ID. * Get role binding details */ fetchRoleBinding(requestParameters: FetchRoleBindingRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * List role bindings in the caller\'s organization, optionally filtered by principal, resource, and role. * List role bindings */ listRoleBindingsRaw(requestParameters: ListRoleBindingsRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * List role bindings in the caller\'s organization, optionally filtered by principal, resource, and role. * List role bindings */ listRoleBindings(requestParameters: ListRoleBindingsRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/apis/ServiceAccountsApi.d.ts interface CreateServiceAccountOperationRequest { xPineconeApiVersion: string; createServiceAccountRequest: CreateServiceAccountRequest; } interface DeleteServiceAccountRequest { xPineconeApiVersion: string; serviceAccountId: string; } interface FetchServiceAccountRequest { xPineconeApiVersion: string; serviceAccountId: string; } interface ListServiceAccountsRequest { xPineconeApiVersion: string; limit?: number; paginationToken?: string; } interface RotateServiceAccountSecretRequest { xPineconeApiVersion: string; serviceAccountId: string; } interface UpdateServiceAccountOperationRequest { xPineconeApiVersion: string; serviceAccountId: string; updateServiceAccountRequest: UpdateServiceAccountRequest; } /** * */ declare class ServiceAccountsApi extends BaseAPI { /** * Create a service account with optional initial role bindings; the client secret is returned only once. * Create a service account */ createServiceAccountRaw(requestParameters: CreateServiceAccountOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Create a service account with optional initial role bindings; the client secret is returned only once. * Create a service account */ createServiceAccount(requestParameters: CreateServiceAccountOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * Delete a service account and its role bindings; tokens it minted are revoked within a few seconds. * Delete a service account */ deleteServiceAccountRaw(requestParameters: DeleteServiceAccountRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Delete a service account and its role bindings; tokens it minted are revoked within a few seconds. * Delete a service account */ deleteServiceAccount(requestParameters: DeleteServiceAccountRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * Get a service account by ID; the client secret is returned only from create and rotate-secret requests. * Get service account details */ fetchServiceAccountRaw(requestParameters: FetchServiceAccountRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Get a service account by ID; the client secret is returned only from create and rotate-secret requests. * Get service account details */ fetchServiceAccount(requestParameters: FetchServiceAccountRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * List service accounts in the caller\'s organization. * List service accounts */ listServiceAccountsRaw(requestParameters: ListServiceAccountsRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * List service accounts in the caller\'s organization. * List service accounts */ listServiceAccounts(requestParameters: ListServiceAccountsRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * Rotate a service account\'s OAuth client secret; the previous secret and its tokens are revoked within seconds and the new secret is returned only once. * Rotate a service account\'s OAuth client secret */ rotateServiceAccountSecretRaw(requestParameters: RotateServiceAccountSecretRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Rotate a service account\'s OAuth client secret; the previous secret and its tokens are revoked within seconds and the new secret is returned only once. * Rotate a service account\'s OAuth client secret */ rotateServiceAccountSecret(requestParameters: RotateServiceAccountSecretRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * Update a service account\'s name; role bindings are managed through the role-binding endpoints. * Update a service account */ updateServiceAccountRaw(requestParameters: UpdateServiceAccountOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Update a service account\'s name; role bindings are managed through the role-binding endpoints. * Update a service account */ updateServiceAccount(requestParameters: UpdateServiceAccountOperationRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/admin/apis/UsersApi.d.ts interface DeleteUserRequest { xPineconeApiVersion: string; userId: string; } interface FetchUserRequest { xPineconeApiVersion: string; userId: string; } interface ListUsersRequest { xPineconeApiVersion: string; email?: string; limit?: number; paginationToken?: string; } /** * */ declare class UsersApi extends BaseAPI { /** * Remove a user from the organization and revoke their role bindings; their Pinecone account is not deleted. * Remove a user from the organization */ deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Remove a user from the organization and revoke their role bindings; their Pinecone account is not deleted. * Remove a user from the organization */ deleteUser(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * Get a user in the caller\'s organization by ID. * Get user details */ fetchUserRaw(requestParameters: FetchUserRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Get a user in the caller\'s organization by ID. * Get user details */ fetchUser(requestParameters: FetchUserRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * List users in the caller\'s organization, optionally filtered by email address. * List users in the organization */ listUsersRaw(requestParameters: ListUsersRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * List users in the caller\'s organization, optionally filtered by email address. * List users in the organization */ listUsers(requestParameters: ListUsersRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/admin/adminClientConfiguration.d.ts /** * Configuration for the {@link AdminClient}. * * The Admin API authenticates with a Pinecone **service account** using the OAuth2 * client-credentials flow, which is distinct from the `apiKey` used by the {@link Pinecone} * client. You must supply a `clientId` and `clientSecret` (either directly or via the * `PINECONE_CLIENT_ID` / `PINECONE_CLIENT_SECRET` environment variables). Create a service * account and its credentials in the [Pinecone console](https://app.pinecone.io) under * Organization Settings → Service Accounts. */ type AdminClientConfiguration = { /** * The service account OAuth2 client ID. Falls back to the `PINECONE_CLIENT_ID` environment * variable when not provided. */ clientId?: string; /** * The service account OAuth2 client secret. Falls back to the `PINECONE_CLIENT_SECRET` * environment variable when not provided. */ clientSecret?: string; /** * Optional configuration field for specifying the controller host. If not specified, the client * will use the default controller host: https://api.pinecone.io. */ controllerHostUrl?: string; /** * Optional configuration field for specifying the fetch implementation. If not specified, the * client will look for fetch in the global scope. */ fetchApi?: FetchAPI; /** * Optional headers to be included in all requests. */ additionalHeaders?: HTTPHeaders; /** * Optional sourceTag that is applied to the User-Agent header with all requests. */ sourceTag?: string; /** * Optional caller information that is applied to the User-Agent header with all requests. * Used to identify agentic callers using the SDK (e.g., AI coding assistants). */ caller?: { /** * Optional provider identifier (e.g., 'google', 'anthropic', 'openai'). */ provider?: string; /** * Required model name (e.g., 'gemini', 'claude-code', 'gpt-4'). */ model: string; }; /** * Optional configuration field for specifying the maximum number of retries after the initial * request. Defaults to 3. */ maxRetries?: number; }; //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/admin/resources/projects.d.ts /** * Options for creating a new project (the body of `admin.projects.create`). */ type CreateProjectOptions = CreateProjectRequest; /** * Options for updating an existing project (the body of `admin.projects.update`). */ type UpdateProjectOptions = UpdateProjectRequest; /** * Operations for managing Pinecone projects within the organization associated with your service * account. Accessed via {@link AdminClient.projects}. */ declare class ProjectsResource { private readonly _api; constructor(api: ProjectsApi); /** Create a new project. */ create(options: CreateProjectOptions): Promise; /** Get a project's details by ID. */ describe(projectId: string): Promise; /** List all projects in the organization. */ list(): Promise; /** Update an existing project by ID. */ update(projectId: string, options: UpdateProjectOptions): Promise; /** * Delete a project by ID. Delete its indexes, assistants, backups, and collections first, or the * API will reject the request. */ delete(projectId: string): Promise; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/admin/resources/organizations.d.ts /** * Options for updating an existing organization (the body of `admin.organizations.update`). */ type UpdateOrganizationOptions = UpdateOrganizationRequest; /** * Operations for managing the organizations available to your service account. Accessed via * {@link AdminClient.organizations}. */ declare class OrganizationsResource { private readonly _api; constructor(api: OrganizationsApi); /** Get an organization's details by ID. */ describe(organizationId: string): Promise; /** List all organizations available to the authenticated service account. */ list(): Promise; /** Update an existing organization by ID. */ update(organizationId: string, options: UpdateOrganizationOptions): Promise; /** * Delete an organization by ID. All projects within the organization must be deleted first, or * the API will reject the request. */ delete(organizationId: string): Promise; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/admin/resources/apiKeys.d.ts /** * Options for creating a new API key (the body of `admin.apiKeys.create`). Valid `roles` values are * `ProjectEditor`, `ProjectViewer`, `ControlPlaneEditor`, `ControlPlaneViewer`, `DataPlaneEditor`, * and `DataPlaneViewer`; defaults to `['ProjectEditor']`. */ type CreateApiKeyOptions = CreateAPIKeyRequest; /** * Options for updating an existing API key (the body of `admin.apiKeys.update`). Any field omitted * is left unchanged; supplying `roles` replaces the existing set. */ type UpdateApiKeyOptions = UpdateAPIKeyRequest; /** * Operations for managing API keys within a project. Accessed via {@link AdminClient.apiKeys}. */ declare class ApiKeysResource { private readonly _api; constructor(api: APIKeysApi); /** * Create a new API key within a project. The returned {@link APIKeyWithSecret} contains the key's * secret value, which is returned only once and cannot be retrieved later. */ create(projectId: string, options: CreateApiKeyOptions): Promise; /** Get an API key's details by ID. */ describe(apiKeyId: string): Promise; /** List all API keys within a project. */ list(projectId: string): Promise; /** Update an existing API key by ID. */ update(apiKeyId: string, options: UpdateApiKeyOptions): Promise; /** Delete an API key by ID. */ delete(apiKeyId: string): Promise; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/admin/resources/serviceAccounts.d.ts /** * Options for creating a new service account (the body of `admin.serviceAccounts.create`). Aliased * from the generated {@link CreateServiceAccountRequest}. Omitting `roleBindings` creates the * service account with no role bindings; roles can be added later via {@link AdminClient.roleBindings}. */ type CreateServiceAccountOptions = CreateServiceAccountRequest; /** * Options for updating an existing service account (the body of `admin.serviceAccounts.update`). * Aliased from the generated {@link UpdateServiceAccountRequest}. */ type UpdateServiceAccountOptions = UpdateServiceAccountRequest; /** * Options for listing service accounts (the pagination query of `admin.serviceAccounts.list`). */ type ListServiceAccountsOptions = Omit; /** * Operations for managing service accounts within the organization. Accessed via * {@link AdminClient.serviceAccounts}. */ declare class ServiceAccountsResource { private readonly _api; constructor(api: ServiceAccountsApi); /** * Create a new service account. The returned {@link ServiceAccountWithSecret} contains the OAuth * client secret, which is returned only once and cannot be retrieved later. */ create(options: CreateServiceAccountOptions): Promise; /** Get a service account's details by ID. */ describe(serviceAccountId: string): Promise; /** List all service accounts within the organization. */ list(options?: ListServiceAccountsOptions): Promise; /** Update an existing service account by ID. */ update(serviceAccountId: string, options: UpdateServiceAccountOptions): Promise; /** * Rotate the OAuth client secret for a service account by ID. The returned * {@link ServiceAccountWithSecret} contains the new secret, which is returned only once; the * previous secret is invalidated. */ rotateSecret(serviceAccountId: string): Promise; /** Delete a service account by ID. */ delete(serviceAccountId: string): Promise; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/admin/resources/roleBindings.d.ts /** * Options for creating a new role binding (the body of `admin.roleBindings.create`). `principalType` * is one of `user`, `service_account`, `api_key`, or `invite`; `resourceType` is `organization` or `project` * (`resourceId` is required for `project` scope and omitted for `organization` scope). */ type CreateRoleBindingOptions = CreateRoleBindingRequest; /** * Options for listing role bindings (the filters and pagination query of `admin.roleBindings.list`). * All fields are optional filters; `principalType` is required alongside `principalId`, and * `resourceType` alongside `resourceId`. */ type ListRoleBindingsOptions = Omit; /** * Operations for managing role bindings, which grant roles to principals (users, service accounts, * API keys, and invites) at an organization or project scope. Accessed via * {@link AdminClient.roleBindings}. */ declare class RoleBindingsResource { private readonly _api; constructor(api: RoleBindingsApi); /** Create a new role binding. */ create(options: CreateRoleBindingOptions): Promise; /** Get a role binding's details by ID. */ describe(roleBindingId: string): Promise; /** List role bindings, optionally filtered by principal, resource, or role. */ list(options?: ListRoleBindingsOptions): Promise; /** Delete a role binding by ID. */ delete(roleBindingId: string): Promise; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/admin/resources/invites.d.ts /** * Options for creating and sending a new invite (the body of `admin.invites.create`). `roleBindings` * must include at least one organization-scoped binding that grants organization membership * (e.g. `OrgOwner`, `OrgManager`, `OrgBillingAdmin`, or `OrgMember`); project-scoped bindings are optional. */ type CreateInviteOptions = CreateInviteRequest; /** * Options for listing invites (the pagination query of `admin.invites.list`). */ type ListInvitesOptions = Omit; /** * Operations for managing invitations to join the organization. Accessed via * {@link AdminClient.invites}. */ declare class InvitesResource { private readonly _api; constructor(api: InvitesApi); /** Create and send a new invite to join the organization. */ create(options: CreateInviteOptions): Promise; /** Get an invite's details by ID. */ describe(inviteId: string): Promise; /** List invites in the organization. */ list(options?: ListInvitesOptions): Promise; /** Resend an existing invite by ID, extending its expiration. */ resend(inviteId: string): Promise; /** Delete an invite by ID. */ delete(inviteId: string): Promise; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/admin/resources/users.d.ts /** * Options for listing users (the filter and pagination query of `admin.users.list`). */ type ListUsersOptions = Omit; /** * Operations for managing users within the organization. Accessed via {@link AdminClient.users}. */ declare class UsersResource { private readonly _api; constructor(api: UsersApi); /** Get a user's details by ID. */ describe(userId: string): Promise; /** List users in the organization, optionally filtered by email. */ list(options?: ListUsersOptions): Promise; /** Delete a user by ID, removing them from the organization. */ delete(userId: string): Promise; } //#endregion //#region ../../node_modules/.pnpm/@pinecone-database+pinecone@8.2.0/node_modules/@pinecone-database/pinecone/dist/admin/adminClient.d.ts /** * The `AdminClient` class is the entrypoint for the Pinecone **Admin API**, which manages an * organization and its resources: projects, API keys, users and invites, service * accounts, and role bindings. * * ### Authentication * * Unlike the {@link Pinecone} client (which authenticates with a project **API key**), the Admin API * authenticates with a **service account** using the OAuth2 client-credentials flow. You must supply * a `clientId` and `clientSecret`, either directly or via the `PINECONE_CLIENT_ID` / * `PINECONE_CLIENT_SECRET` environment variables. Create a service account and its credentials in the * [Pinecone console](https://app.pinecone.io) under Organization Settings → Service Accounts. * * The bearer token is fetched lazily on the first admin request and cached for the lifetime of the * `AdminClient`, mirroring the Python and Go SDKs. It is not proactively refreshed, so a client kept * alive past the token's server-side expiry (~30 minutes) should be recreated; admin operations are * expected to run within a time-bounded session. * * ### Using environment variables * * ```bash * export PINECONE_CLIENT_ID="your_client_id" * export PINECONE_CLIENT_SECRET="your_client_secret" * ``` * * ```typescript * import { AdminClient } from '@pinecone-database/pinecone'; * * const admin = new AdminClient(); * const projects = await admin.projects.list(); * ``` * * ### Using a configuration object * * ```typescript * import { AdminClient } from '@pinecone-database/pinecone'; * * const admin = new AdminClient({ * clientId: 'your_client_id', * clientSecret: 'your_client_secret', * }); * ``` * * ### Bridging to the data plane * * A common workflow uses `AdminClient` to create a project and API key, then passes that key to the * {@link Pinecone} client for data operations: * * ```typescript * import { AdminClient, Pinecone } from '@pinecone-database/pinecone'; * * const admin = new AdminClient(); * const project = await admin.projects.create({ name: 'my-project' }); * const apiKey = await admin.apiKeys.create(project.id, { name: 'my-key' }); * const pc = new Pinecone({ apiKey: apiKey.value }); * ``` */ declare class AdminClient$1 { /** Operations for managing projects. */ readonly projects: ProjectsResource; /** Operations for managing organizations. */ readonly organizations: OrganizationsResource; /** Operations for managing API keys within a project. */ readonly apiKeys: ApiKeysResource; /** Operations for managing service accounts within the organization. */ readonly serviceAccounts: ServiceAccountsResource; /** Operations for managing role bindings. */ readonly roleBindings: RoleBindingsResource; /** Operations for managing invitations to join the organization. */ readonly invites: InvitesResource; /** Operations for managing users within the organization. */ readonly users: UsersResource; /** * @param config - Optional {@link AdminClientConfiguration}. When omitted, `clientId` and * `clientSecret` are read from the `PINECONE_CLIENT_ID` and `PINECONE_CLIENT_SECRET` environment * variables. * @throws {@link Errors.PineconeConfigurationError} when `clientId` or `clientSecret` cannot be resolved. */ constructor(config?: AdminClientConfiguration); } declare namespace index_d_exports$1 { export { APIKey, APIKeyWithSecret, AdminClient$1 as AdminClient, AdminClientConfiguration, ErrorResponse as AdminErrorResponse, ErrorResponseError as AdminErrorResponseError, AlignmentResponse, ApiKeysResource, Assistant, AssistantFileModel, AssistantFilesList, AssistantList, Assistant$1 as AssistantModel, AssistantOptions, BYOC1 as BYOC2, BackupId, BackupList$1 as BackupList, BackupModel$1 as BackupModel, PaginationResponse$2 as BackupPaginationResponse, BaseChunk, ByocSpec, ByocSpecResponse, ChoiceModel$1 as ChatCompletionChoiceModel, ChatCompletionModel, ChatCompletionOptions, ChatContextOptions, MessageModel$1 as ChatMessageModel, ChatModel, ChatModelEnum, ChatOptions, ChatStream, ChoiceModel, CitationChunk, CitationModel, CollectionList$1 as CollectionList, CollectionModel$1 as CollectionModel, CollectionName, ConfigureIndexOptions, ConfigureIndexRequestEmbed, ConfigureIndexRequestSpec, ContentChunk, ContentFilterResults, ContextModel, ContextOptions, CreateApiKeyOptions, CreateAssistantOptions, CreateBackupOptions, CreateCollectionRequest, CreateIndexByocSpec, CreateIndexForModelEmbed, CreateIndexForModelOptions, CreateIndexForModelRequest, CreateIndexFromBackupOptions, CreateIndexFromBackupResponse$1 as CreateIndexFromBackupResponse, CreateIndexOptions, CreateIndexPodSpec, CreateIndexReadCapacity, CreateIndexRequest$1 as CreateIndexRequest, CreateIndexServerlessSpec, CreateIndexSpec, CreateInviteOptions, CreateNamespaceOptions, CreateNamespaceRequestSchema, CreateNamespaceRequestSchemaFieldsValue, CreateProjectOptions, CreateRoleBindingOptions, CreateServiceAccountOptions, DedicatedNodeType, DeleteAllOptions, DeleteBackupOptions, DeleteCollectionOptions, DeleteIndexOptions, DeleteManyOptions, DeleteOneOptions, DenseEmbedding, DescribeBackupOptions, DescribeCollectionOptions, DescribeCollectionRequest, DescribeIndexOptions, DescribeIndexRequest, DescribeIndexStatsOptions, DescribeRestoreJobOptions, DocxReferenceModel, EmbedOptions, Embedding, EmbeddingsList, EmbeddingsListUsage, index_d_exports$2 as Errors, EvaluateOptions, EvaluatedFact, Fact, FetchAPI$4 as FetchAPI, FetchByMetadataOptions, FetchByMetadataResponse, FetchOptions, FetchResponse, FinishReasonEnum, HTTPHeaders$2 as HTTPHeaders, HighlightModel, Hit, ImageModel, ImportErrorMode, ImportModel, Index, IndexList$1 as IndexList, IndexModel$1 as IndexModel, IndexModelSpec, IndexModelStatus$1 as IndexModelStatus, IndexName, IndexOptions, IndexStatsDescription, IndexStatsNamespaceSummary, Inference, IntegratedRecord, Invite, InviteList, InviteListPagination, InvitesResource, JsonReferenceModel, ListApiKeysResponse, ListBackupsOptions, ListFilesOptions, ListImportsResponse, ListInvitesOptions, ListItem, ListModelsOptions, ListNamespacesOptions, ListNamespacesResponse, ListOperationsOptions, ListOptions, ListResponse, ListRestoreJobsOptions, ListRoleBindingsOptions, ListServiceAccountsOptions, ListUsersOptions, MarkdownReferenceModel, MessageEndChunk, MessageModel, MessageStartChunk, MessagesModel, MetadataSchema, MetadataSchemaFieldsValue, Metrics, ModelIndexEmbed, ModelInfo, ModelInfoList, ModelInfoSupportedParameter, ModelInfoSupportedParameterAllowedValuesInner, ModelInfoSupportedParameterDefault, MultiModalContentBlocksModel, MultiModalContentImageBlockModel, MultiModalContentTextBlockModel, MultiModalSnippetModel, NamespaceDescription, NamespaceDescriptionIndexedFields, OperationList, OperationModel, OperationUsage, Organization, OrganizationList, OrganizationsResource, Pagination$1 as Pagination, PaginationResponse$1 as PaginationResponse, PdfReferenceModel, Pinecone, PineconeConfiguration, PineconeRecord, PodBased1 as PodBased, PodSpec, PodSpecMetadataConfig, PodType, Preview, BackupList as PreviewBackupList, BackupModel as PreviewBackupModel, BooleanField as PreviewBooleanField, ByocDeployment as PreviewByocDeployment, CollectionList as PreviewCollectionList, CollectionModel as PreviewCollectionModel, PreviewConfigureIndexOptions, PreviewCreateBackupOptions, PreviewCreateCollectionOptions, PreviewCreateIndexFromBackupOptions, CreateIndexFromBackupResponse as PreviewCreateIndexFromBackupResponse, PreviewCreateIndexOptions, CreateIndexSchema as PreviewCreateIndexSchema, CreateIndexSchemaField as PreviewCreateIndexSchemaField, DeleteDocumentsRequest as PreviewDeleteDocumentsOptions, DenseVectorField as PreviewDenseVectorField, DocumentFetchUsage as PreviewDocumentFetchUsage, DocumentRecord as PreviewDocumentRecord, DocumentScoringMethod as PreviewDocumentScoringMethod, DocumentSearchMatch as PreviewDocumentSearchMatch, DocumentSearchUsage as PreviewDocumentSearchUsage, FetchDocumentsRequest as PreviewFetchDocumentsOptions, FetchDocumentsResponse as PreviewFetchDocumentsResponse, FetchedDocumentRecord as PreviewFetchedDocument, FloatField as PreviewFloatField, PreviewIndex, IndexDeployment as PreviewIndexDeployment, IndexDeploymentRequest as PreviewIndexDeploymentRequest, IndexList as PreviewIndexList, IndexModel as PreviewIndexModel, IndexModelStatus as PreviewIndexModelStatus, IndexSchema as PreviewIndexSchema, IndexSchemaField as PreviewIndexSchemaField, PreviewIndexes, IntegerField as PreviewIntegerField, LegacyMetadataField as PreviewLegacyMetadataField, PreviewListIndexBackupsOptions, PreviewListProjectBackupsOptions, PreviewListRestoreJobsOptions, ManagedDeployment as PreviewManagedDeployment, PaginationResponse as PreviewPaginationResponse, PatchIndexDeploymentRequest as PreviewPatchIndexDeploymentRequest, PatchIndexSchema as PreviewPatchIndexSchema, PatchSemanticTextField as PreviewPatchSemanticTextField, PodDeployment as PreviewPodDeployment, ReadCapacity as PreviewReadCapacity, ReadCapacityDedicatedConfig as PreviewReadCapacityDedicatedConfig, ReadCapacityDedicatedSpecResponse as PreviewReadCapacityDedicatedSpecResponse, ReadCapacityOnDemandSpecResponse as PreviewReadCapacityOnDemandSpecResponse, ReadCapacityResponse as PreviewReadCapacityResponse, ReadCapacityStatus as PreviewReadCapacityStatus, ResponseStringField as PreviewResponseStringField, ResponseStringFieldFullTextSearch as PreviewResponseStringFieldFullTextSearch, RestoreJobList as PreviewRestoreJobList, RestoreJobModel as PreviewRestoreJobModel, ScalingConfigManual as PreviewScalingConfigManual, SearchDocumentsRequest as PreviewSearchDocumentsOptions, SearchDocumentsResponse as PreviewSearchDocumentsResponse, SemanticTextField as PreviewSemanticTextField, SparseValues as PreviewSparseValues, SparseVectorField as PreviewSparseVectorField, StringField as PreviewStringField, StringFieldFullTextSearch as PreviewStringFieldFullTextSearch, StringListField as PreviewStringListField, TypedIndexSchemaField as PreviewTypedIndexSchemaField, UpsertDocumentsRequest as PreviewUpsertDocumentsOptions, UpsertDocumentsResponse as PreviewUpsertDocumentsResponse, Project, ProjectList, ProjectsResource, QueryByRecordId, QueryByVectorValues, QueryOptions, QueryResponse, QueryShared, RankedDocument, ReadCapacity$1 as ReadCapacity, ReadCapacityDedicatedConfig$1 as ReadCapacityDedicatedConfig, ReadCapacityDedicatedParams, ReadCapacityDedicatedSpec$1 as ReadCapacityDedicatedSpec, ReadCapacityDedicatedSpecResponse$1 as ReadCapacityDedicatedSpecResponse, ReadCapacityOnDemandParams, ReadCapacityOnDemandSpec$1 as ReadCapacityOnDemandSpec, ReadCapacityOnDemandSpecResponse$1 as ReadCapacityOnDemandSpecResponse, ReadCapacityResponse$1 as ReadCapacityResponse, ReadCapacityStatus$1 as ReadCapacityStatus, Reasoning, RecordId, RecordMetadata, RecordMetadataValue, RecordSparseValues, RecordValues, ReferenceModel, RerankOptions, RerankResult, RerankResultUsage, RestoreJobId, RestoreJobList$1 as RestoreJobList, RestoreJobModel$1 as RestoreJobModel, RoleBinding, RoleBindingInput, RoleBindingList, RoleBindingsResource, ScalingConfigManual$1 as ScalingConfigManual, ScoredPineconeRecord, SearchMatchTerms, SearchRecordsOptions, SearchRecordsQuery, SearchRecordsRerank, SearchRecordsResponse, SearchRecordsResponseResult, SearchRecordsVector, SearchUsage, Serverless1 as Serverless2, ServerlessSpec, ServerlessSpecResponse, ServiceAccount, ServiceAccountList, ServiceAccountWithSecret, ServiceAccountsResource, SnippetModel, SparseEmbedding, StartImportOptions, StartImportResponse, StreamedChatCompletionResponse, StreamedChatResponse, TextReferenceModel, TextSnippetModel, TokenCounts, TypedReferenceModel, UpdateApiKeyOptions, UpdateAssistantOptions, UpdateAssistantResponse, UpdateOptions, UpdateOrganizationOptions, UpdateProjectOptions, UpdateServiceAccountOptions, UploadFileOptions, Uploadable, UpsertFileOptions, UpsertOptions, UpsertRecordsOptions, Usage, UsageModel, User, UserList, UsersResource }; } //#endregion //#region ../../node_modules/.pnpm/@qdrant+js-client-rest@1.19.0_typescript@6.0.3/node_modules/@qdrant/js-client-rest/dist/types/openapi/generated_schema.d.ts /** * This file was auto-generated by openapi-typescript. * Do not make direct changes to the file. */ /** OneOf type helpers */ type Without = { [P in Exclude]?: never }; type XOR = (T | U) extends object ? (Without & U) | (Without & T) : T | U; type OneOf = T extends [infer Only] ? Only : T extends [infer A, infer B, ...infer Rest] ? OneOf<[XOR, ...Rest]> : never; interface components { schemas: { ErrorResponse: { /** * Format: float * @description Time spent to process this request */ time?: number; status?: { /** @description Description of the occurred error. */error?: string; }; result?: Record | null; }; /** * @example { * "collections": [ * { * "name": "arxiv-title" * }, * { * "name": "arxiv-abstract" * }, * { * "name": "medium-title" * }, * { * "name": "medium-text" * } * ] * } */ CollectionsResponse: { collections: (components["schemas"]["CollectionDescription"])[]; }; CollectionDescription: { name: string; }; /** @description Current statistics and configuration of the collection */ CollectionInfo: { status: components["schemas"]["CollectionStatus"]; optimizer_status: components["schemas"]["OptimizersStatus"]; /** @description Warnings related to the collection */ warnings?: (components["schemas"]["CollectionWarning"])[]; /** * Format: uint * @description Approximate number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in a specialized vector index. */ indexed_vectors_count?: number | null; /** * Format: uint * @description Approximate number of points (vectors + payloads) in collection. Each point could be accessed by unique id. */ points_count?: number | null; /** * Format: uint * @description Number of segments in collection. Each segment has independent vector as payload indexes */ segments_count: number; config: components["schemas"]["CollectionConfig"]; /** @description Types of stored payload */ payload_schema: { [key: string]: components["schemas"]["PayloadIndexInfo"] | undefined; }; /** @description Update queue info */ update_queue?: components["schemas"]["UpdateQueueInfo"] | (Record | null); }; /** * @description Current state of the collection. `Green` - all good. `Yellow` - optimization is running, 'Grey' - optimizations are possible but not triggered, `Red` - some operations failed and was not recovered * @enum {string} */ CollectionStatus: "green" | "yellow" | "grey" | "red"; /** @description Current state of the collection */ OptimizersStatus: OneOf<["ok", { error: string; }]>; CollectionWarning: { /** @description Warning message */message: string; }; /** @description Information about the collection configuration */ CollectionConfig: { params: components["schemas"]["CollectionParams"]; hnsw_config: components["schemas"]["HnswConfig"]; optimizer_config: components["schemas"]["OptimizersConfig"]; wal_config?: components["schemas"]["WalConfig"] | (Record | null); /** @default null */ quantization_config?: components["schemas"]["QuantizationConfig"] | (Record | null); strict_mode_config?: components["schemas"]["StrictModeConfigOutput"] | (Record | null); /** @description Arbitrary JSON metadata for the collection This can be used to store application-specific information such as creation time, migration data, inference model info, etc. */ metadata?: components["schemas"]["Payload"] | (Record | null); }; CollectionParams: { vectors?: components["schemas"]["VectorsConfig"]; /** * Format: uint32 * @description Number of shards the collection has * @default 1 */ shard_number?: number; /** @description Sharding method Default is Auto - points are distributed across all available shards Custom - points are distributed across shards according to shard key */ sharding_method?: components["schemas"]["ShardingMethod"] | (Record | null); /** * Format: uint32 * @description Number of replicas for each shard * @default 1 */ replication_factor?: number; /** * Format: uint32 * @description Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact. * @default 1 */ write_consistency_factor?: number; /** * Format: uint32 * @description Defines how many additional replicas should be processing read request at the same time. Default value is Auto, which means that fan-out will be determined automatically based on the busyness of the local replica. Having more than 0 might be useful to smooth latency spikes of individual nodes. */ read_fan_out_factor?: number | null; /** * Format: uint64 * @description Define number of milliseconds to wait before attempting to read from another replica. This setting can help to reduce latency spikes in case of occasional slow replicas. Default is 0, which means delayed fan out request is disabled. */ read_fan_out_delay_ms?: number | null; /** * @deprecated * @description Deprecated: use `payload.memory` instead. If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM. * * Default: true * @default true */ on_disk_payload?: boolean | null; /** @description Configuration of the payload storage */ payload?: components["schemas"]["PayloadStorageParams"] | (Record | null); /** @description Configuration of the sparse vector storage */ sparse_vectors?: ({ [key: string]: components["schemas"]["SparseVectorParams"] | undefined; }) | null; }; /** * @description Vector params separator for single and multiple vector modes Single mode: * * { "size": 128, "distance": "Cosine" } * * or multiple mode: * * { "default": { "size": 128, "distance": "Cosine" } } */ VectorsConfig: components["schemas"]["VectorParams"] | ({ [key: string]: components["schemas"]["VectorParams"] | undefined; }); /** @description Params of single vector data storage */ VectorParams: { /** * Format: uint64 * @description Size of a vectors used */ size: number; distance: components["schemas"]["Distance"]; /** @description Custom params for HNSW index. If none - values from collection configuration are used. */ hnsw_config?: components["schemas"]["HnswConfigDiff"] | (Record | null); /** @description Custom params for quantization. If none - values from collection configuration are used. */ quantization_config?: components["schemas"]["QuantizationConfig"] | (Record | null); /** * @deprecated * @description Deprecated: use `memory` instead. If true, vectors are served from disk, improving RAM usage at the cost of latency Default: false */ on_disk?: boolean | null; /** @description Memory placement of the original vector storage. Overrides the deprecated `on_disk` flag if both are set. `pinned` is not supported for dense vector storage. Default: `cached` (`cold` if `on_disk` is set to true). */ memory?: components["schemas"]["Memory"] | (Record | null); /** * @description Defines which datatype should be used to represent vectors in the storage. Choosing different datatypes allows to optimize memory usage and performance vs accuracy. * * - For `float32` datatype - vectors are stored as single-precision floating point numbers, 4 bytes. - For `float16` datatype - vectors are stored as half-precision floating point numbers, 2 bytes. - For `uint8` datatype - vectors are stored as unsigned 8-bit integers, 1 byte. It expects vector elements to be in range `[0, 255]`. - For `turbo4` datatype - vectors are quantized to 4 bits per element using the TurboQuant algorithm. */ datatype?: components["schemas"]["Datatype"] | (Record | null); multivector_config?: components["schemas"]["MultiVectorConfig"] | (Record | null); }; /** * @description Type of internal tags, build from payload Distance function types used to compare vectors * @enum {string} */ Distance: "Cosine" | "Euclid" | "Dot" | "Manhattan"; HnswConfigDiff: { /** * Format: uint * @description Number of edges per node in the index graph. Larger the value - more accurate the search, more space required. */ m?: number | null; /** * Format: uint * @description Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build the index. */ ef_construct?: number | null; /** * Format: uint * @description Minimal size threshold (in KiloBytes) below which full-scan is preferred over HNSW search. This measures the total size of vectors being queried against. When the maximum estimated amount of points that a condition satisfies is smaller than `full_scan_threshold_kb`, the query planner will use full-scan search instead of HNSW index traversal for better performance. Note: 1Kb = 1 vector of size 256 */ full_scan_threshold?: number | null; /** * Format: uint * @description Number of parallel threads used for background index building. If 0 - automatically select from 8 to 16. Best to keep between 8 and 16 to prevent likelihood of building broken/inefficient HNSW graphs. On small CPUs, less threads are used. */ max_indexing_threads?: number | null; /** * @deprecated * @description Deprecated: use `memory` instead. Store HNSW index on disk. If set to false, the index will be stored in RAM. Default: false */ on_disk?: boolean | null; /** @description Memory placement of the HNSW graph. Overrides the deprecated `on_disk` flag if both are set. Default: `cached` (`cold` if `on_disk` is set to true). */ memory?: components["schemas"]["Memory"] | (Record | null); /** * Format: uint * @description Custom M param for additional payload-aware HNSW links. If not set, default M will be used. */ payload_m?: number | null; /** @description Store copies of original and quantized vectors within the HNSW index file. Default: false. Enabling this option will trade the search speed for disk usage by reducing amount of random seeks during the search. Requires quantized vectors to be enabled. Multi-vectors are not supported. */ inline_storage?: boolean | null; }; /** * @description Memory placement of a component's data. * * Data is always persisted on disk regardless of this setting; it only controls how the data is held in RAM. * * Options: * * * `Cold` - Data is not pre-loaded from disk to RAM. Preferred for rarely queried components or components larger than RAM size. First request might be slow, but data is cached with usage. * * * `Cached` - Data is pre-loaded into disk-cache RAM on start. First request is fast, but data may be evicted if there is not enough memory and some other component's data is used more frequently. * * * `Pinned` - Data is loaded in RAM and never evicted. First request is fast, but the component must fit in RAM at all times. Recommended for frequently queried small components like quantized vectors or primary indexes. * @enum {string} */ Memory: "cold" | "cached" | "pinned"; QuantizationConfig: components["schemas"]["ScalarQuantization"] | components["schemas"]["ProductQuantization"] | components["schemas"]["BinaryQuantization"] | components["schemas"]["TurboQuantization"]; ScalarQuantization: { scalar: components["schemas"]["ScalarQuantizationConfig"]; }; ScalarQuantizationConfig: { type: components["schemas"]["ScalarType"]; /** * Format: float * @description Quantile for quantization. Expected value range in [0.5, 1.0]. If not set - use the whole range of values */ quantile?: number | null; /** * @deprecated * @description Deprecated: use `memory` instead. If true - quantized vectors always will be stored in RAM, ignoring the config of main storage */ always_ram?: boolean | null; /** @description Memory placement of quantized vectors. Overrides the deprecated `always_ram` flag if both are set. Default: follow the memory placement of the original vector storage. */ memory?: components["schemas"]["Memory"] | (Record | null); }; /** @enum {string} */ ScalarType: "int8"; ProductQuantization: { product: components["schemas"]["ProductQuantizationConfig"]; }; ProductQuantizationConfig: { compression: components["schemas"]["CompressionRatio"]; /** * @deprecated * @description Deprecated: use `memory` instead. */ always_ram?: boolean | null; /** @description Memory placement of quantized vectors. Overrides the deprecated `always_ram` flag if both are set. Default: follow the memory placement of the original vector storage. */ memory?: components["schemas"]["Memory"] | (Record | null); }; /** @enum {string} */ CompressionRatio: "x4" | "x8" | "x16" | "x32" | "x64"; BinaryQuantization: { binary: components["schemas"]["BinaryQuantizationConfig"]; }; BinaryQuantizationConfig: { /** * @deprecated * @description Deprecated: use `memory` instead. */ always_ram?: boolean | null; /** @description Memory placement of quantized vectors. Overrides the deprecated `always_ram` flag if both are set. Default: follow the memory placement of the original vector storage. */ memory?: components["schemas"]["Memory"] | (Record | null); encoding?: components["schemas"]["BinaryQuantizationEncoding"] | (Record | null); /** @description Asymmetric quantization configuration allows a query to have different quantization than stored vectors. It can increase the accuracy of search at the cost of performance. */ query_encoding?: components["schemas"]["BinaryQuantizationQueryEncoding"] | (Record | null); }; /** @enum {string} */ BinaryQuantizationEncoding: "one_bit" | "two_bits" | "one_and_half_bits"; /** @enum {string} */ BinaryQuantizationQueryEncoding: "default" | "binary" | "scalar4bits" | "scalar8bits"; TurboQuantization: { turbo: components["schemas"]["TurboQuantQuantizationConfig"]; }; TurboQuantQuantizationConfig: { /** * @deprecated * @description Deprecated: use `memory` instead. */ always_ram?: boolean | null; /** @description Memory placement of quantized vectors. Overrides the deprecated `always_ram` flag if both are set. Default: follow the memory placement of the original vector storage. */ memory?: components["schemas"]["Memory"] | (Record | null); bits?: components["schemas"]["TurboQuantBitSize"] | (Record | null); }; /** @enum {string} */ TurboQuantBitSize: "bits1" | "bits1_5" | "bits2" | "bits4"; /** @enum {string} */ Datatype: "float32" | "uint8" | "float16" | "turbo4"; MultiVectorConfig: { comparator: components["schemas"]["MultiVectorComparator"]; }; /** @enum {string} */ MultiVectorComparator: "max_sim"; /** @enum {string} */ ShardingMethod: "auto" | "custom"; /** @description Params of the payload storage */ PayloadStorageParams: { /** @description Memory placement of the payload storage. Overrides the deprecated `on_disk_payload` flag if both are set. `pinned` is not supported for payload storage. Default: `cold` (`cached` if `on_disk_payload` is set to false). */memory?: components["schemas"]["Memory"] | (Record | null); }; /** @description Params of single sparse vector data storage */ SparseVectorParams: { /** @description Custom params for index. If none - values from collection configuration are used. */index?: components["schemas"]["SparseIndexParams"] | (Record | null); /** @description Configures addition value modifications for sparse vectors. Default: none */ modifier?: components["schemas"]["Modifier"] | (Record | null); }; /** @description Configuration for sparse inverted index. */ SparseIndexParams: { /** * Format: uint * @description We prefer a full scan search upto (excluding) this number of vectors. * * Note: this is number of vectors, not KiloBytes. */ full_scan_threshold?: number | null; /** * @deprecated * @description Deprecated: use `memory` instead. Store index on disk. If set to false, the index will be stored in RAM. Default: false */ on_disk?: boolean | null; /** @description Memory placement of the index. Overrides the deprecated `on_disk` flag if both are set. Default: `pinned` (`cold` if `on_disk` is set to true). */ memory?: components["schemas"]["Memory"] | (Record | null); /** * @description Defines which datatype should be used for the index. Choosing different datatypes allows to optimize memory usage and performance vs accuracy. * * - For `float32` datatype - vectors are stored as single-precision floating point numbers, 4 bytes. - For `float16` datatype - vectors are stored as half-precision floating point numbers, 2 bytes. - For `uint8` datatype - vectors are quantized to unsigned 8-bit integers, 1 byte. Quantization to fit byte range `[0, 255]` happens during indexing automatically, so the actual vector data does not need to conform to this range. */ datatype?: components["schemas"]["Datatype"] | (Record | null); }; /** * @description If used, include weight modification, which will be applied to sparse vectors at query time: None - no modification (default) Idf - inverse document frequency, based on statistics of the collection * @enum {string} */ Modifier: "none" | "idf"; /** @description Config of HNSW index */ HnswConfig: { /** * Format: uint * @description Number of edges per node in the index graph. Larger the value - more accurate the search, more space required. */ m: number; /** * Format: uint * @description Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index. */ ef_construct: number; /** * Format: uint * @description Minimal size threshold (in KiloBytes) below which full-scan is preferred over HNSW search. This measures the total size of vectors being queried against. When the maximum estimated amount of points that a condition satisfies is smaller than `full_scan_threshold_kb`, the query planner will use full-scan search instead of HNSW index traversal for better performance. Note: 1Kb = 1 vector of size 256 */ full_scan_threshold: number; /** * Format: uint * @description Number of parallel threads used for background index building. If 0 - automatically select from 8 to 16. Best to keep between 8 and 16 to prevent likelihood of slow building or broken/inefficient HNSW graphs. On small CPUs, less threads are used. * @default 0 */ max_indexing_threads?: number; /** * @deprecated * @description Deprecated: use `memory` instead. Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false */ on_disk?: boolean | null; /** @description Memory placement of the HNSW graph. Overrides the deprecated `on_disk` flag if both are set. Default: `cached` (`cold` if `on_disk` is set to true). */ memory?: components["schemas"]["Memory"] | (Record | null); /** * Format: uint * @description Custom M param for hnsw graph built for payload index. If not set, default M will be used. */ payload_m?: number | null; /** @description Store copies of original and quantized vectors within the HNSW index file. Default: false. Enabling this option will trade the search speed for disk usage by reducing amount of random seeks during the search. Requires quantized vectors to be enabled. Multi-vectors are not supported. */ inline_storage?: boolean | null; }; OptimizersConfig: { /** * Format: double * @description The minimal fraction of deleted vectors in a segment, required to perform segment optimization * @default 0.2 */ deleted_threshold?: number; /** * Format: uint * @description The minimal number of vectors in a segment, required to perform segment optimization * @default 1000 */ vacuum_min_vector_number?: number; /** * Format: uint * @description Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS * * It is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads. If `default_segment_number = 0`, will be automatically selected by the number of available CPUs. */ default_segment_number: number; /** * Format: uint * @description Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments. * * If indexing speed is more important - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs. * @default null */ max_segment_size?: number | null; /** * Format: uint * @deprecated * @description Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmapped file. * * Memmap storage is disabled by default, to enable it, set this threshold to a reasonable value. * * To disable memmap storage, set this to `0`. Internally it will use the largest threshold possible. * * Note: 1Kb = 1 vector of size 256 * @default null */ memmap_threshold?: number | null; /** * Format: uint * @description Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing * * Default value is 10,000, based on experiments and observations. * * To disable vector indexing, set to `0`. * * Note: 1kB = 1 vector of size 256. * @default null */ indexing_threshold?: number | null; /** * Format: uint64 * @description Minimum interval between forced flushes. */ flush_interval_sec: number; /** * Format: uint * @description Max number of threads (jobs) for running optimizations per shard. Note: each optimization job will also use `max_indexing_threads` threads by itself for index building. If null - have no limit and choose dynamically to saturate CPU. If 0 - no optimization threads, optimizations will be disabled. * @default null */ max_optimization_threads?: number | null; /** * @description If enabled, the service will try to prevent the creation of large unoptimized segments. When enabled, new points written to segments larger than the indexing threshold are stored as "deferred points": they are persisted in the WAL and segments, but excluded from read/search results until the corresponding segments are optimized (e.g. indexed, quantized, or moved to mmap storage). Update requests with `wait=true` will only return after the deferred points become visible, which may significantly increase the perceived latency between submitting an update and its completion. Update requests with `wait=false` are not affected. Default is disabled. * @default null */ prevent_unoptimized?: boolean | null; }; WalConfig: { /** * Format: uint * @description Size of a single WAL segment in MB */ wal_capacity_mb: number; /** * Format: uint * @description Number of WAL segments to create ahead of actually used ones */ wal_segments_ahead: number; /** * Format: uint * @description Number of closed WAL segments to keep * @default 1 */ wal_retain_closed?: number; }; StrictModeConfigOutput: { /** @description Whether strict mode is enabled for a collection or not. */enabled?: boolean | null; /** * Format: uint * @description Max allowed `limit` parameter for all APIs that don't have their own max limit. */ max_query_limit?: number | null; /** * Format: uint * @description Max allowed `timeout` parameter. */ max_timeout?: number | null; /** @description Allow usage of unindexed fields in retrieval based (e.g. search) filters. */ unindexed_filtering_retrieve?: boolean | null; /** @description Allow usage of unindexed fields in filtered updates (e.g. delete by payload). */ unindexed_filtering_update?: boolean | null; /** * Format: uint * @description Max HNSW value allowed in search parameters. */ search_max_hnsw_ef?: number | null; /** @description Whether exact search is allowed or not. */ search_allow_exact?: boolean | null; /** * Format: double * @description Max oversampling value allowed in search. */ search_max_oversampling?: number | null; /** * Format: uint * @description Max batchsize when upserting */ upsert_max_batchsize?: number | null; /** * Format: uint * @description Max batchsize when searching */ search_max_batchsize?: number | null; /** * Format: uint * @description Max size of a collections vector storage in bytes, ignoring replicas. */ max_collection_vector_size_bytes?: number | null; /** * Format: uint * @description Max number of read operations per minute per replica */ read_rate_limit?: number | null; /** * Format: uint * @description Max number of write operations per minute per replica */ write_rate_limit?: number | null; /** * Format: uint * @description Max size of a collections payload storage in bytes */ max_collection_payload_size_bytes?: number | null; /** * Format: uint * @description Max number of points estimated in a collection */ max_points_count?: number | null; /** * Format: uint * @description Max conditions a filter can have. */ filter_max_conditions?: number | null; /** * Format: uint * @description Max size of a condition, eg. items in `MatchAny`. */ condition_max_size?: number | null; /** @description Multivector configuration */ multivector_config?: components["schemas"]["StrictModeMultivectorConfigOutput"] | (Record | null); /** @description Sparse vector configuration */ sparse_config?: components["schemas"]["StrictModeSparseConfigOutput"] | (Record | null); /** * Format: uint * @description Max number of payload indexes in a collection */ max_payload_index_count?: number | null; /** * Format: uint8 * @deprecated * @description Deprecated: use the node-wide quota config instead. Reject memory-consuming update operations when resident memory exceeds this percentage of total RAM (1-100) */ max_resident_memory_percent?: number | null; }; StrictModeMultivectorConfigOutput: { [key: string]: components["schemas"]["StrictModeMultivectorOutput"] | undefined; }; StrictModeMultivectorOutput: { /** * Format: uint * @description Max number of vectors in a multivector */ max_vectors?: number | null; }; StrictModeSparseConfigOutput: { [key: string]: components["schemas"]["StrictModeSparseOutput"] | undefined; }; StrictModeSparseOutput: { /** * Format: uint * @description Max length of sparse vector */ max_length?: number | null; }; /** * @example { * "city": "London", * "color": "green" * } */ Payload: { [key: string]: unknown; }; /** @description Display payload field type & index information */ PayloadIndexInfo: { data_type: components["schemas"]["PayloadSchemaType"]; params?: components["schemas"]["PayloadSchemaParams"] | (Record | null); /** * Format: uint * @description Number of points indexed with this index */ points: number; }; /** * @description All possible names of payload types * @enum {string} */ PayloadSchemaType: "keyword" | "integer" | "float" | "geo" | "text" | "bool" | "datetime" | "uuid"; /** @description Payload type with parameters */ PayloadSchemaParams: components["schemas"]["KeywordIndexParams"] | components["schemas"]["IntegerIndexParams"] | components["schemas"]["FloatIndexParams"] | components["schemas"]["GeoIndexParams"] | components["schemas"]["TextIndexParams"] | components["schemas"]["BoolIndexParams"] | components["schemas"]["DatetimeIndexParams"] | components["schemas"]["UuidIndexParams"]; KeywordIndexParams: { type: components["schemas"]["KeywordIndexType"]; /** @description If true - used for tenant optimization. Default: false. */ is_tenant?: boolean | null; /** * @deprecated * @description Deprecated: use `memory` instead. If true, store the index on disk. Default: false. */ on_disk?: boolean | null; /** @description Memory placement of the index. Overrides the deprecated `on_disk` flag if both are set. Default: `pinned` (`cold` if `on_disk` is set to true). */ memory?: components["schemas"]["Memory"] | (Record | null); /** @description Enable HNSW graph building for this payload field. If true, builds additional HNSW links (Need payload_m > 0). Default: true. */ enable_hnsw?: boolean | null; /** @description If true, enable prefix matching (`match: { "prefix": ... }`) on this field. Default: false. */ prefix?: boolean | null; }; /** @enum {string} */ KeywordIndexType: "keyword"; IntegerIndexParams: { type: components["schemas"]["IntegerIndexType"]; /** @description If true - support direct lookups. Default is true. */ lookup?: boolean | null; /** @description If true - support ranges filters. Default is true. */ range?: boolean | null; /** @description If true - use this key to organize storage of the collection data. This option assumes that this key will be used in majority of filtered requests. Default is false. */ is_principal?: boolean | null; /** * @deprecated * @description Deprecated: use `memory` instead. If true, store the index on disk. Default: false. */ on_disk?: boolean | null; /** @description Memory placement of the index. Overrides the deprecated `on_disk` flag if both are set. Default: `pinned` (`cold` if `on_disk` is set to true). */ memory?: components["schemas"]["Memory"] | (Record | null); /** @description Enable HNSW graph building for this payload field. If true, builds additional HNSW links (Need payload_m > 0). Default: true. */ enable_hnsw?: boolean | null; }; /** @enum {string} */ IntegerIndexType: "integer"; FloatIndexParams: { type: components["schemas"]["FloatIndexType"]; /** @description If true - use this key to organize storage of the collection data. This option assumes that this key will be used in majority of filtered requests. */ is_principal?: boolean | null; /** * @deprecated * @description Deprecated: use `memory` instead. If true, store the index on disk. Default: false. */ on_disk?: boolean | null; /** @description Memory placement of the index. Overrides the deprecated `on_disk` flag if both are set. Default: `pinned` (`cold` if `on_disk` is set to true). */ memory?: components["schemas"]["Memory"] | (Record | null); /** @description Enable HNSW graph building for this payload field. If true, builds additional HNSW links (Need payload_m > 0). Default: true. */ enable_hnsw?: boolean | null; }; /** @enum {string} */ FloatIndexType: "float"; GeoIndexParams: { type: components["schemas"]["GeoIndexType"]; /** * @deprecated * @description Deprecated: use `memory` instead. If true, store the index on disk. Default: false. */ on_disk?: boolean | null; /** @description Memory placement of the index. Overrides the deprecated `on_disk` flag if both are set. Default: `pinned` (`cold` if `on_disk` is set to true). */ memory?: components["schemas"]["Memory"] | (Record | null); /** @description Enable HNSW graph building for this payload field. If true, builds additional HNSW links (Need payload_m > 0). Default: true. */ enable_hnsw?: boolean | null; }; /** @enum {string} */ GeoIndexType: "geo"; TextIndexParams: { type: components["schemas"]["TextIndexType"]; tokenizer?: components["schemas"]["TokenizerType"]; /** * Format: uint * @description Minimum characters to be tokenized. */ min_token_len?: number | null; /** * Format: uint * @description Maximum characters to be tokenized. */ max_token_len?: number | null; /** @description If true, lowercase all tokens. Default: true. */ lowercase?: boolean | null; /** @description If true, normalize tokens by folding accented characters to ASCII (e.g., "ação" -> "acao"). Default: false. */ ascii_folding?: boolean | null; /** @description If true, support phrase matching. Default: false. */ phrase_matching?: boolean | null; /** @description Ignore this set of tokens. Can select from predefined languages and/or provide a custom set. */ stopwords?: components["schemas"]["StopwordsInterface"] | (Record | null); /** * @deprecated * @description Deprecated: use `memory` instead. If true, store the index on disk. Default: false. */ on_disk?: boolean | null; /** @description Memory placement of the index. Overrides the deprecated `on_disk` flag if both are set. Default: `pinned` (`cold` if `on_disk` is set to true). */ memory?: components["schemas"]["Memory"] | (Record | null); /** @description Algorithm for stemming. Default: disabled. */ stemmer?: components["schemas"]["StemmingAlgorithm"] | (Record | null); /** @description Enable HNSW graph building for this payload field. If true, builds additional HNSW links (Need payload_m > 0). Default: true. */ enable_hnsw?: boolean | null; }; /** @enum {string} */ TextIndexType: "text"; /** @enum {string} */ TokenizerType: "prefix" | "whitespace" | "word" | "multilingual"; StopwordsInterface: components["schemas"]["Language"] | components["schemas"]["StopwordsSet"]; /** @enum {string} */ Language: "arabic" | "azerbaijani" | "basque" | "bengali" | "catalan" | "chinese" | "danish" | "dutch" | "english" | "finnish" | "french" | "german" | "greek" | "hebrew" | "hinglish" | "hungarian" | "indonesian" | "italian" | "japanese" | "kazakh" | "nepali" | "norwegian" | "portuguese" | "romanian" | "russian" | "slovene" | "spanish" | "swedish" | "tajik" | "turkish"; StopwordsSet: { /** @description Set of languages to use for stopwords. Multiple pre-defined lists of stopwords can be combined. */languages?: (components["schemas"]["Language"])[] | null; /** @description Custom stopwords set. Will be merged with the languages set. */ custom?: (string)[] | null; }; /** @description Different stemming algorithms with their configs. */ StemmingAlgorithm: components["schemas"]["SnowballParams"] | components["schemas"]["DisabledStemmerParams"]; SnowballParams: { type: components["schemas"]["Snowball"]; language: components["schemas"]["SnowballLanguage"]; }; /** @enum {string} */ Snowball: "snowball"; /** * @description Languages supported by snowball stemmer. * @enum {string} */ SnowballLanguage: "arabic" | "armenian" | "danish" | "dutch" | "english" | "finnish" | "french" | "german" | "greek" | "hungarian" | "italian" | "norwegian" | "portuguese" | "romanian" | "russian" | "spanish" | "swedish" | "tamil" | "turkish"; DisabledStemmerParams: { type: components["schemas"]["NoStemmer"]; }; /** * @description Tag selecting the explicit "no stemming" algorithm. * @enum {string} */ NoStemmer: "none"; BoolIndexParams: { type: components["schemas"]["BoolIndexType"]; /** * @deprecated * @description Deprecated: use `memory` instead. If true, store the index on disk. Default: false. */ on_disk?: boolean | null; /** @description Memory placement of the index. Overrides the deprecated `on_disk` flag if both are set. Default: `pinned` (`cold` if `on_disk` is set to true). */ memory?: components["schemas"]["Memory"] | (Record | null); /** @description Enable HNSW graph building for this payload field. If true, builds additional HNSW links (Need payload_m > 0). Default: true. */ enable_hnsw?: boolean | null; }; /** @enum {string} */ BoolIndexType: "bool"; DatetimeIndexParams: { type: components["schemas"]["DatetimeIndexType"]; /** @description If true - use this key to organize storage of the collection data. This option assumes that this key will be used in majority of filtered requests. */ is_principal?: boolean | null; /** * @deprecated * @description Deprecated: use `memory` instead. If true, store the index on disk. Default: false. */ on_disk?: boolean | null; /** @description Memory placement of the index. Overrides the deprecated `on_disk` flag if both are set. Default: `pinned` (`cold` if `on_disk` is set to true). */ memory?: components["schemas"]["Memory"] | (Record | null); /** @description Enable HNSW graph building for this payload field. If true, builds additional HNSW links (Need payload_m > 0). Default: true. */ enable_hnsw?: boolean | null; }; /** @enum {string} */ DatetimeIndexType: "datetime"; UuidIndexParams: { type: components["schemas"]["UuidIndexType"]; /** @description If true - used for tenant optimization. */ is_tenant?: boolean | null; /** * @deprecated * @description Deprecated: use `memory` instead. If true, store the index on disk. Default: false. */ on_disk?: boolean | null; /** @description Memory placement of the index. Overrides the deprecated `on_disk` flag if both are set. Default: `pinned` (`cold` if `on_disk` is set to true). */ memory?: components["schemas"]["Memory"] | (Record | null); /** @description Enable HNSW graph building for this payload field. If true, builds additional HNSW links (Need payload_m > 0). Default: true. */ enable_hnsw?: boolean | null; }; /** @enum {string} */ UuidIndexType: "uuid"; UpdateQueueInfo: { /** * Format: uint * @description Number of elements in the queue */ length: number; /** * Format: uint * @description Number of points that are deferred (i.e hidden from search as they're not yet optimized). */ deferred_points?: number | null; }; PointRequest: { /** @description Specify in which shards to look for the points, if not specified - look in all shards */shard_key?: components["schemas"]["ShardKeySelector"] | (Record | null); /** @description Look for points with ids */ ids: (components["schemas"]["ExtendedPointId"])[]; /** @description Select which payload to return with the response. Default is true. */ with_payload?: components["schemas"]["WithPayloadInterface"] | (Record | null); with_vector?: components["schemas"]["WithVector"]; }; ShardKeySelector: components["schemas"]["ShardKey"] | (components["schemas"]["ShardKey"])[] | components["schemas"]["ShardKeyWithFallback"]; ShardKey: string | number; ShardKeyWithFallback: { target: components["schemas"]["ShardKey"]; fallback: components["schemas"]["ShardKey"]; }; /** @description Type, used for specifying point ID in user interface */ ExtendedPointId: number | string; /** @description Options for specifying which payload to include or not */ WithPayloadInterface: boolean | (string)[] | components["schemas"]["PayloadSelector"]; /** @description Specifies how to treat payload selector */ PayloadSelector: components["schemas"]["PayloadSelectorInclude"] | components["schemas"]["PayloadSelectorExclude"]; PayloadSelectorInclude: { /** @description Only include this payload keys */include: (string)[]; }; PayloadSelectorExclude: { /** @description Exclude this fields from returning payload */exclude: (string)[]; }; /** @description Options for specifying which vector to include */ WithVector: boolean | (string)[]; /** @description Point data */ Record: { id: components["schemas"]["ExtendedPointId"]; /** @description Payload - values assigned to the point */ payload?: components["schemas"]["Payload"] | (Record | null); /** @description Vector of the point */ vector?: components["schemas"]["VectorStructOutput"] | (Record | null); /** @description Shard Key */ shard_key?: components["schemas"]["ShardKey"] | (Record | null); order_value?: components["schemas"]["OrderValue"] | (Record | null); }; /** @description Vector data stored in Point */ VectorStructOutput: (number)[] | ((number)[])[] | ({ [key: string]: components["schemas"]["VectorOutput"] | undefined; }); /** @description Vector Data stored in Point */ VectorOutput: (number)[] | components["schemas"]["SparseVector"] | ((number)[])[]; /** @description Sparse vector structure */ SparseVector: { /** @description Indices must be unique */indices: (number)[]; /** @description Values and indices must be the same length */ values: (number)[]; }; OrderValue: number; /** @description Search result */ ScoredPoint: { id: components["schemas"]["ExtendedPointId"]; /** * Format: uint64 * @description Point version * @example 3 */ version: number; /** * Format: float * @description Points vector distance to the query vector * @example 0.75 */ score: number; /** @description Payload - values assigned to the point */ payload?: components["schemas"]["Payload"] | (Record | null); /** @description Vector of the point */ vector?: components["schemas"]["VectorStructOutput"] | (Record | null); /** @description Shard Key */ shard_key?: components["schemas"]["ShardKey"] | (Record | null); /** @description Order-by value */ order_value?: components["schemas"]["OrderValue"] | (Record | null); }; UpdateResult: { /** * Format: uint64 * @description Sequential number of the operation */ operation_id?: number | null; status: components["schemas"]["UpdateStatus"]; }; /** * @description `Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual. `WaitTimeout` - Request is waiting for timeout. * @enum {string} */ UpdateStatus: "acknowledged" | "completed" | "wait_timeout"; /** @description Scroll request - paginate over all points which matches given condition */ ScrollRequest: { /** @description Specify in which shards to look for the points, if not specified - look in all shards */shard_key?: components["schemas"]["ShardKeySelector"] | (Record | null); /** @description Start ID to read points from. */ offset?: components["schemas"]["ExtendedPointId"] | (Record | null); /** * Format: uint * @description Page size. Default: 10 */ limit?: number | null; /** @description Look only for points which satisfies this conditions. If not provided - all points. */ filter?: components["schemas"]["Filter"] | (Record | null); /** @description Select which payload to return with the response. Default is true. */ with_payload?: components["schemas"]["WithPayloadInterface"] | (Record | null); with_vector?: components["schemas"]["WithVector"]; /** @description Order the records by a payload field. */ order_by?: components["schemas"]["OrderByInterface"] | (Record | null); }; Filter: { /** @description At least one of those conditions should match */should?: components["schemas"]["Condition"] | (components["schemas"]["Condition"])[] | (Record | null); /** @description At least minimum amount of given conditions should match */ min_should?: components["schemas"]["MinShould"] | (Record | null); /** @description All conditions must match */ must?: components["schemas"]["Condition"] | (components["schemas"]["Condition"])[] | (Record | null); /** @description All conditions must NOT match */ must_not?: components["schemas"]["Condition"] | (components["schemas"]["Condition"])[] | (Record | null); }; Condition: components["schemas"]["FieldCondition"] | components["schemas"]["IsEmptyCondition"] | components["schemas"]["IsNullCondition"] | components["schemas"]["HasIdCondition"] | components["schemas"]["HasVectorCondition"] | components["schemas"]["SliceCondition"] | components["schemas"]["NestedCondition"] | components["schemas"]["Filter"]; /** @description All possible payload filtering conditions */ FieldCondition: { /** @description Payload key */key: string; /** @description Check if point has field with a given value */ match?: components["schemas"]["Match"] | (Record | null); /** @description Check if points value lies in a given range */ range?: components["schemas"]["RangeInterface"] | (Record | null); /** @description Check if points geolocation lies in a given area */ geo_bounding_box?: components["schemas"]["GeoBoundingBox"] | (Record | null); /** @description Check if geo point is within a given radius */ geo_radius?: components["schemas"]["GeoRadius"] | (Record | null); /** @description Check if geo point is within a given polygon */ geo_polygon?: components["schemas"]["GeoPolygon"] | (Record | null); /** @description Check number of values of the field */ values_count?: components["schemas"]["ValuesCount"] | (Record | null); /** @description Check that the field is empty, alternative syntax for `is_empty: "field_name"` */ is_empty?: boolean | null; /** @description Check that the field is null, alternative syntax for `is_null: "field_name"` */ is_null?: boolean | null; }; /** @description Match filter request */ Match: components["schemas"]["MatchValue"] | components["schemas"]["MatchText"] | components["schemas"]["MatchTextAny"] | components["schemas"]["MatchPhrase"] | components["schemas"]["MatchPrefix"] | components["schemas"]["MatchAny"] | components["schemas"]["MatchExcept"]; /** @description Exact match of the given value */ MatchValue: { value: components["schemas"]["ValueVariants"]; }; ValueVariants: string | number | boolean; /** @description Full-text match of the strings. */ MatchText: { text: string; }; /** @description Full-text match of at least one token of the string. */ MatchTextAny: { text_any: string; }; /** @description Full-text phrase match of the string. */ MatchPhrase: { phrase: string; }; /** * @description Match keyword values that start with the given string. * * Byte-wise (hence, for valid UTF-8, character-wise) and case-sensitive, consistent with exact keyword matching. Served efficiently by a keyword index created with the `prefix` option. */ MatchPrefix: { prefix: string; }; /** @description Exact match on any of the given values */ MatchAny: { any: components["schemas"]["AnyVariants"]; }; AnyVariants: (string)[] | (number)[]; /** @description Should have at least one value not matching the any given values */ MatchExcept: { except: components["schemas"]["AnyVariants"]; }; RangeInterface: components["schemas"]["Range"] | components["schemas"]["DatetimeRange"]; /** @description Range filter request */ Range: { /** * Format: double * @description point.key < range.lt */ lt?: number | null; /** * Format: double * @description point.key > range.gt */ gt?: number | null; /** * Format: double * @description point.key >= range.gte */ gte?: number | null; /** * Format: double * @description point.key <= range.lte */ lte?: number | null; }; /** @description Range filter request */ DatetimeRange: { /** * Format: date-time * @description point.key < range.lt */ lt?: string | null; /** * Format: date-time * @description point.key > range.gt */ gt?: string | null; /** * Format: date-time * @description point.key >= range.gte */ gte?: string | null; /** * Format: date-time * @description point.key <= range.lte */ lte?: string | null; }; /** * @description Geo filter request * * Matches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges */ GeoBoundingBox: { top_left: components["schemas"]["GeoPoint"]; bottom_right: components["schemas"]["GeoPoint"]; }; /** @description Geo point payload schema */ GeoPoint: { /** Format: double */lon: number; /** Format: double */ lat: number; }; /** * @description Geo filter request * * Matches coordinates inside the circle of `radius` and center with coordinates `center` */ GeoRadius: { center: components["schemas"]["GeoPoint"]; /** * Format: double * @description Radius of the area in meters */ radius: number; }; /** * @description Geo filter request * * Matches coordinates inside the polygon, defined by `exterior` and `interiors` */ GeoPolygon: { exterior: components["schemas"]["GeoLineString"]; /** @description Interior lines (if present) bound holes within the surface each GeoLineString must consist of a minimum of 4 points, and the first and last points must be the same. */ interiors?: (components["schemas"]["GeoLineString"])[] | null; }; /** @description Ordered sequence of GeoPoints representing the line */ GeoLineString: { points: (components["schemas"]["GeoPoint"])[]; }; /** @description Values count filter request */ ValuesCount: { /** * Format: uint * @description point.key.length() < values_count.lt */ lt?: number | null; /** * Format: uint * @description point.key.length() > values_count.gt */ gt?: number | null; /** * Format: uint * @description point.key.length() >= values_count.gte */ gte?: number | null; /** * Format: uint * @description point.key.length() <= values_count.lte */ lte?: number | null; }; /** @description Select points with empty payload for a specified field */ IsEmptyCondition: { is_empty: components["schemas"]["PayloadField"]; }; /** @description Payload field */ PayloadField: { /** @description Payload field name */key: string; }; /** @description Select points with null payload for a specified field */ IsNullCondition: { is_null: components["schemas"]["PayloadField"]; }; /** @description ID-based filtering condition */ HasIdCondition: { has_id: (components["schemas"]["ExtendedPointId"])[]; }; /** @description Filter points which have specific vector assigned */ HasVectorCondition: { has_vector: string; }; /** @description Select points that fall into one of `total` disjoint deterministic slices of the id space, for parallel scans and reproducible sampling. */ SliceCondition: { slice: components["schemas"]["Slice"]; }; /** * @description One of `total` disjoint deterministic slices of the id space. * * A point belongs to the slice iff `hash(id) % total == index`, where `hash` is SipHash-2-4 with a zero key over the canonical id bytes: 8 little-endian bytes for numeric ids, the 16 RFC 4122 bytes for UUIDs. For a fixed `total`, slices `0..total` are disjoint and together cover all points; membership is uniform regardless of the id scheme and stable across queries, segments, platforms and Qdrant versions. * * Slices with different `total` values are correlated (same hash, no salt): e.g. slice `0` of `total: 4` is a strict subset of slice `0` of `total: 2`. This keeps a smaller sample contained in a larger one. */ Slice: { /** * Format: uint32 * @description Total number of disjoint slices the id space is split into */ total: number; /** * Format: uint32 * @description Which slice to select, must be in `0..total` */ index: number; }; NestedCondition: { nested: components["schemas"]["Nested"]; }; /** @description Select points with payload for a specified nested field */ Nested: { key: string; filter: components["schemas"]["Filter"]; }; MinShould: { conditions: (components["schemas"]["Condition"])[]; /** Format: uint */ min_count: number; }; OrderByInterface: string | components["schemas"]["OrderBy"]; OrderBy: { /** @description Payload key to order by */key: string; /** @description Direction of ordering: `asc` or `desc`. Default is ascending. */ direction?: components["schemas"]["Direction"] | (Record | null); /** @description Which payload value to start scrolling from. Default is the lowest value for `asc` and the highest for `desc` */ start_from?: components["schemas"]["StartFrom"] | (Record | null); }; /** @enum {string} */ Direction: "asc" | "desc"; StartFrom: number | string; /** @description Result of the points read request */ ScrollResult: { /** * @description List of retrieved points * @example [ * { * "id": 40, * "payload": { * "city": "London", * "color": "green" * }, * "vector": [ * 0.875, * 0.140625, * 0.897599995136261 * ], * "shard_key": "region_1" * }, * { * "id": 41, * "payload": { * "city": "Paris", * "color": "red" * }, * "vector": [ * 0.75, * 0.640625, * 0.8945000171661377 * ], * "shard_key": "region_1" * } * ] */ points: (components["schemas"]["Record"])[]; /** @description Offset which should be used to retrieve a next page result */ next_page_offset?: components["schemas"]["ExtendedPointId"] | (Record | null); }; /** @description Operation for creating new collection and (optionally) specify index params */ CreateCollection: { vectors?: components["schemas"]["VectorsConfig"]; /** * Format: uint32 * @description For auto sharding: Number of shards in collection. - Default is 1 for standalone, otherwise equal to the number of nodes - Minimum is 1 * * For custom sharding: Number of shards in collection per shard group. - Default is 1, meaning that each shard key will be mapped to a single shard - Minimum is 1 * @default null */ shard_number?: number | null; /** * @description Sharding method Default is Auto - points are distributed across all available shards Custom - points are distributed across shards according to shard key * @default null */ sharding_method?: components["schemas"]["ShardingMethod"] | (Record | null); /** * Format: uint32 * @description Number of shards replicas. Default is 1 Minimum is 1 * @default null */ replication_factor?: number | null; /** * Format: uint32 * @description Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact. * @default null */ write_consistency_factor?: number | null; /** * @deprecated * @description Deprecated: use `payload.memory` instead. If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM. * * Default: true * @default null */ on_disk_payload?: boolean | null; /** * @description Configuration of the payload storage * @default null */ payload?: components["schemas"]["PayloadStorageParams"] | (Record | null); /** @description Custom params for HNSW index. If none - values from service configuration file are used. */ hnsw_config?: components["schemas"]["HnswConfigDiff"] | (Record | null); /** @description Custom params for WAL. If none - values from service configuration file are used. */ wal_config?: components["schemas"]["WalConfigDiff"] | (Record | null); /** @description Custom params for Optimizers. If none - values from service configuration file are used. */ optimizers_config?: components["schemas"]["OptimizersConfigDiff"] | (Record | null); /** * @description Quantization parameters. If none - quantization is disabled. * @default null */ quantization_config?: components["schemas"]["QuantizationConfig"] | (Record | null); /** @description Sparse vector data config. */ sparse_vectors?: ({ [key: string]: components["schemas"]["SparseVectorParams"] | undefined; }) | null; /** @description Strict-mode config. */ strict_mode_config?: components["schemas"]["StrictModeConfig"] | (Record | null); /** @description Arbitrary JSON metadata for the collection This can be used to store application-specific information such as creation time, migration data, inference model info, etc. */ metadata?: components["schemas"]["Payload"] | (Record | null); }; WalConfigDiff: { /** * Format: uint * @description Size of a single WAL segment in MB */ wal_capacity_mb?: number | null; /** * Format: uint * @description Number of WAL segments to create ahead of actually used ones */ wal_segments_ahead?: number | null; /** * Format: uint * @description Number of closed WAL segments to retain */ wal_retain_closed?: number | null; }; OptimizersConfigDiff: { /** * Format: double * @description The minimal fraction of deleted vectors in a segment, required to perform segment optimization */ deleted_threshold?: number | null; /** * Format: uint * @description The minimal number of vectors in a segment, required to perform segment optimization */ vacuum_min_vector_number?: number | null; /** * Format: uint * @description Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS * * It is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs */ default_segment_number?: number | null; /** * Format: uint * @description Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments. * * If indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 */ max_segment_size?: number | null; /** * Format: uint * @deprecated * @description Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmapped file. * * Memmap storage is disabled by default, to enable it, set this threshold to a reasonable value. * * To disable memmap storage, set this to `0`. * * Note: 1Kb = 1 vector of size 256 * * Deprecated since Qdrant 1.15.0 */ memmap_threshold?: number | null; /** * Format: uint * @description Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing * * Default value is 20,000, based on . * * To disable vector indexing, set to `0`. * * Note: 1kB = 1 vector of size 256. */ indexing_threshold?: number | null; /** * Format: uint64 * @description Minimum interval between forced flushes. */ flush_interval_sec?: number | null; /** @description Max number of threads (jobs) for running optimizations per shard. Note: each optimization job will also use `max_indexing_threads` threads by itself for index building. If "auto" - have no limit and choose dynamically to saturate CPU. If 0 - no optimization threads, optimizations will be disabled. */ max_optimization_threads?: components["schemas"]["MaxOptimizationThreads"] | (Record | null); /** * @description If enabled, the service will try to prevent the creation of large unoptimized segments. When enabled, new points written to segments larger than the indexing threshold are stored as "deferred points": they are persisted in the WAL and segments, but excluded from read/search results until the corresponding segments are optimized (e.g. indexed, quantized, or moved to mmap storage). Update requests with `wait=true` will only return after the deferred points become visible, which may significantly increase the perceived latency between submitting an update and its completion. Update requests with `wait=false` are not affected. Default is disabled. * @default null */ prevent_unoptimized?: boolean | null; }; MaxOptimizationThreads: components["schemas"]["MaxOptimizationThreadsSetting"] | number; /** @enum {string} */ MaxOptimizationThreadsSetting: "auto"; StrictModeConfig: { /** @description Whether strict mode is enabled for a collection or not. */enabled?: boolean | null; /** * Format: uint * @description Max allowed `limit` parameter for all APIs that don't have their own max limit. */ max_query_limit?: number | null; /** * Format: uint * @description Max allowed `timeout` parameter. */ max_timeout?: number | null; /** @description Allow usage of unindexed fields in retrieval based (e.g. search) filters. */ unindexed_filtering_retrieve?: boolean | null; /** @description Allow usage of unindexed fields in filtered updates (e.g. delete by payload). */ unindexed_filtering_update?: boolean | null; /** * Format: uint * @description Max HNSW ef value allowed in search parameters. */ search_max_hnsw_ef?: number | null; /** @description Whether exact search is allowed. */ search_allow_exact?: boolean | null; /** * Format: double * @description Max oversampling value allowed in search. */ search_max_oversampling?: number | null; /** * Format: uint * @description Max batchsize when upserting */ upsert_max_batchsize?: number | null; /** * Format: uint * @description Max batchsize when searching */ search_max_batchsize?: number | null; /** * Format: uint * @description Max size of a collections vector storage in bytes, ignoring replicas. */ max_collection_vector_size_bytes?: number | null; /** * Format: uint * @description Max number of read operations per minute per replica */ read_rate_limit?: number | null; /** * Format: uint * @description Max number of write operations per minute per replica */ write_rate_limit?: number | null; /** * Format: uint * @description Max size of a collections payload storage in bytes */ max_collection_payload_size_bytes?: number | null; /** * Format: uint * @description Max number of points estimated in a collection */ max_points_count?: number | null; /** * Format: uint * @description Max conditions a filter can have. */ filter_max_conditions?: number | null; /** * Format: uint * @description Max size of a condition, eg. items in `MatchAny`. */ condition_max_size?: number | null; /** @description Multivector strict mode configuration */ multivector_config?: components["schemas"]["StrictModeMultivectorConfig"] | (Record | null); /** @description Sparse vector strict mode configuration */ sparse_config?: components["schemas"]["StrictModeSparseConfig"] | (Record | null); /** * Format: uint * @description Max number of payload indexes in a collection */ max_payload_index_count?: number | null; /** * Format: uint8 * @deprecated * @description Deprecated: use the node-wide quota config (`PUT /quotas`) instead, which caps the same resource for every collection. Scheduled for removal in 1.21. * * Reject memory-consuming update operations (e.g. upsert, set payload) when the process resident memory exceeds this percentage of total system memory (or cgroup limit). Value in [1, 100]. Memory is a node-wide resource, so this only tightens the quota for one collection; it cannot lift it. Delete operations are not affected, so callers can still free memory. */ max_resident_memory_percent?: number | null; }; StrictModeMultivectorConfig: { [key: string]: components["schemas"]["StrictModeMultivector"] | undefined; }; StrictModeMultivector: { /** * Format: uint * @description Max number of vectors in a multivector */ max_vectors?: number | null; }; StrictModeSparseConfig: { [key: string]: components["schemas"]["StrictModeSparse"] | undefined; }; StrictModeSparse: { /** * Format: uint * @description Max length of sparse vector */ max_length?: number | null; }; /** @description Operation for updating parameters of the existing collection */ UpdateCollection: { /** @description Map of vector data parameters to update for each named vector. To update parameters in a collection having a single unnamed vector, use an empty string as name. */vectors?: components["schemas"]["VectorsConfigDiff"] | (Record | null); /** @description Custom params for Optimizers. If none - it is left unchanged. This operation is blocking, it will only proceed once all current optimizations are complete */ optimizers_config?: components["schemas"]["OptimizersConfigDiff"] | (Record | null); /** @description Collection base params. If none - it is left unchanged. */ params?: components["schemas"]["CollectionParamsDiff"] | (Record | null); /** @description HNSW parameters to update for the collection index. If none - it is left unchanged. */ hnsw_config?: components["schemas"]["HnswConfigDiff"] | (Record | null); /** * @description Quantization parameters to update. If none - it is left unchanged. * @default null */ quantization_config?: components["schemas"]["QuantizationConfigDiff"] | (Record | null); /** @description Map of sparse vector data parameters to update for each sparse vector. */ sparse_vectors?: components["schemas"]["SparseVectorsConfig"] | (Record | null); strict_mode_config?: components["schemas"]["StrictModeConfig"] | (Record | null); /** @description Metadata to update for the collection. If provided, this will merge with existing metadata. Individual keys can be removed by setting their value to `null`. */ metadata?: components["schemas"]["Payload"] | (Record | null); }; /** * @description Vector update params for multiple vectors * * { "vector_name": { "hnsw_config": { "m": 8 } } } */ VectorsConfigDiff: { [key: string]: components["schemas"]["VectorParamsDiff"] | undefined; }; VectorParamsDiff: { /** @description Update params for HNSW index. If empty object - it will be unset. */hnsw_config?: components["schemas"]["HnswConfigDiff"] | (Record | null); /** @description Update params for quantization. If none - it is left unchanged. */ quantization_config?: components["schemas"]["QuantizationConfigDiff"] | (Record | null); /** * @deprecated * @description Deprecated: use `memory` instead. If true, vectors are served from disk, improving RAM usage at the cost of latency */ on_disk?: boolean | null; /** @description Memory placement of the original vector storage. Overrides the deprecated `on_disk` flag if both are set. `pinned` is not supported for dense vector storage. */ memory?: components["schemas"]["Memory"] | (Record | null); }; QuantizationConfigDiff: components["schemas"]["ScalarQuantization"] | components["schemas"]["ProductQuantization"] | components["schemas"]["BinaryQuantization"] | components["schemas"]["TurboQuantization"] | components["schemas"]["Disabled"]; /** @enum {string} */ Disabled: "Disabled"; CollectionParamsDiff: { /** * Format: uint32 * @description Number of replicas for each shard */ replication_factor?: number | null; /** * Format: uint32 * @description Minimal number successful responses from replicas to consider operation successful */ write_consistency_factor?: number | null; /** * Format: uint32 * @description Fan-out every read request to these many additional remote nodes (and return first available response) */ read_fan_out_factor?: number | null; /** * Format: uint64 * @description Delay in milliseconds before sending read requests to remote nodes */ read_fan_out_delay_ms?: number | null; /** * @deprecated * @description Deprecated: use `payload.memory` instead. If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM. * @default null */ on_disk_payload?: boolean | null; /** @description Update params of the payload storage. If none - it is left unchanged. */ payload?: components["schemas"]["PayloadStorageParams"] | (Record | null); }; SparseVectorsConfig: { [key: string]: components["schemas"]["SparseVectorParams"] | undefined; }; /** @description Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations. */ ChangeAliasesOperation: { actions: (components["schemas"]["AliasOperations"])[]; }; /** @description Group of all the possible operations related to collection aliases */ AliasOperations: components["schemas"]["CreateAliasOperation"] | components["schemas"]["DeleteAliasOperation"] | components["schemas"]["RenameAliasOperation"]; CreateAliasOperation: { create_alias: components["schemas"]["CreateAlias"]; }; /** @description Create alternative name for a collection. Collection will be available under both names for search, retrieve, */ CreateAlias: { collection_name: string; alias_name: string; }; /** @description Delete alias if exists */ DeleteAliasOperation: { delete_alias: components["schemas"]["DeleteAlias"]; }; /** @description Delete alias if exists */ DeleteAlias: { alias_name: string; }; /** @description Change alias to a new one */ RenameAliasOperation: { rename_alias: components["schemas"]["RenameAlias"]; }; /** @description Change alias to a new one */ RenameAlias: { old_alias_name: string; new_alias_name: string; }; CreateFieldIndex: { field_name: string; field_schema?: components["schemas"]["PayloadFieldSchema"] | (Record | null); }; PayloadFieldSchema: components["schemas"]["PayloadSchemaType"] | components["schemas"]["PayloadSchemaParams"]; PointsSelector: components["schemas"]["PointIdsList"] | components["schemas"]["FilterSelector"]; PointIdsList: { points: (components["schemas"]["ExtendedPointId"])[]; shard_key?: components["schemas"]["ShardKeySelector"] | (Record | null); }; FilterSelector: { filter: components["schemas"]["Filter"]; shard_key?: components["schemas"]["ShardKeySelector"] | (Record | null); }; PointInsertOperations: components["schemas"]["PointsBatch"] | components["schemas"]["PointsList"]; PointsBatch: { batch: components["schemas"]["Batch"]; shard_key?: components["schemas"]["ShardKeySelector"] | (Record | null); /** @description Filter to apply when updating existing points. Only points matching this filter will be updated. Points that don't match will keep their current state. New points will be inserted regardless of the filter. */ update_filter?: components["schemas"]["Filter"] | (Record | null); /** @description Mode of the upsert operation: insert_only, upsert (default), update_only */ update_mode?: components["schemas"]["UpdateMode"] | (Record | null); }; Batch: { ids: (components["schemas"]["ExtendedPointId"])[]; vectors: components["schemas"]["BatchVectorStruct"]; payloads?: ((components["schemas"]["Payload"] | (Record | null))[]) | null; }; BatchVectorStruct: ((number)[])[] | (((number)[])[])[] | ({ [key: string]: (components["schemas"]["Vector"])[] | undefined; }) | (components["schemas"]["Document"])[] | (components["schemas"]["Image"])[] | (components["schemas"]["InferenceObject"])[]; /** @description Vector Data Vectors can be described directly with values Or specified with source "objects" for inference */ Vector: (number)[] | components["schemas"]["SparseVector"] | ((number)[])[] | components["schemas"]["Document"] | components["schemas"]["Image"] | components["schemas"]["InferenceObject"]; /** * @description WARN: Work-in-progress, unimplemented * * Text document for embedding. Requires inference infrastructure, unimplemented. */ Document: { /** * @description Text of the document. This field will be used as input for the embedding model. * @example This is a document text */ text: string; /** * @description Name of the model used to generate the vector. List of available models depends on a provider. * @example jinaai/jina-embeddings-v2-base-en */ model: string; /** @description Additional options for the model, will be passed to the inference service as-is. See model cards for available options. */ options?: components["schemas"]["DocumentOptions"] | (Record | null); }; /** @description Option variants for text documents. Ether general-purpose options or BM25-specific options. BM25-specific will only take effect if the `qdrant/bm25` is specified as a model. */ DocumentOptions: { [key: string]: unknown; } | components["schemas"]["Bm25Config"]; /** @description Configuration of the local bm25 models. */ Bm25Config: { /** * Format: double * @description Controls term frequency saturation. Higher values mean term frequency has more impact. Default is 1.2 * @default 1.2 */ k?: number; /** * Format: double * @description Controls document length normalization. Ranges from 0 (no normalization) to 1 (full normalization). Higher values mean longer documents have less impact. Default is 0.75. * @default 0.75 */ b?: number; /** * Format: double * @description Expected average document length in the collection. Default is 256. * @default 256 */ avg_len?: number; tokenizer?: components["schemas"]["TokenizerType"]; /** @description Defines which language to use for text preprocessing. This parameter is used to construct default stopwords filter and stemmer. To disable language-specific processing, set `stemmer` to `{"type": "none"}` and configure an empty stopword set. The legacy `"language": "none"` hack is deprecated and may be rejected in a future release. If not specified, English is assumed. */ language?: string | null; /** @description Lowercase the text before tokenization. Default is `true`. */ lowercase?: boolean | null; /** @description If true, normalize tokens by folding accented characters to ASCII (e.g., "ação" -> "acao"). Default is `false`. */ ascii_folding?: boolean | null; /** @description Configuration of the stopwords filter. Supports list of pre-defined languages and custom stopwords. Default: initialized for specified `language` or English if not specified. */ stopwords?: components["schemas"]["StopwordsInterface"] | (Record | null); /** @description Configuration of the stemmer. Processes tokens to their root form. Default: initialized Snowball stemmer for specified `language` or English if not specified. */ stemmer?: components["schemas"]["StemmingAlgorithm"] | (Record | null); /** * Format: uint * @description Minimum token length to keep. If token is shorter than this, it will be discarded. Default is `None`, which means no minimum length. */ min_token_len?: number | null; /** * Format: uint * @description Maximum token length to keep. If token is longer than this, it will be discarded. Default is `None`, which means no maximum length. */ max_token_len?: number | null; }; /** * @description WARN: Work-in-progress, unimplemented * * Image object for embedding. Requires inference infrastructure, unimplemented. */ Image: { /** * @description Image data: base64 encoded image or an URL * @example https://example.com/image.jpg */ image: unknown; /** * @description Name of the model used to generate the vector. List of available models depends on a provider. * @example Qdrant/clip-ViT-B-32-vision */ model: string; /** @description Parameters for the model Values of the parameters are model-specific */ options?: { [key: string]: unknown; } | null; }; /** * @description WARN: Work-in-progress, unimplemented * * Custom object for embedding. Requires inference infrastructure, unimplemented. */ InferenceObject: { /** @description Arbitrary data, used as input for the embedding model. Used if the model requires more than one input or a custom input. */object: unknown; /** * @description Name of the model used to generate the vector. List of available models depends on a provider. * @example jinaai/jina-embeddings-v2-base-en */ model: string; /** @description Parameters for the model Values of the parameters are model-specific */ options?: { [key: string]: unknown; } | null; }; /** * @description Defines the mode of the upsert operation * * * `upsert` - default mode, insert new points, update existing points * `insert_only` - only insert new points, do not update existing points * `update_only` - only update existing points, do not insert new points * @enum {string} */ UpdateMode: "upsert" | "insert_only" | "update_only"; PointsList: { points: (components["schemas"]["PointStruct"])[]; shard_key?: components["schemas"]["ShardKeySelector"] | (Record | null); /** @description Filter to apply when updating existing points. Only points matching this filter will be updated. Points that don't match will keep their current state. New points will be inserted regardless of the filter. */ update_filter?: components["schemas"]["Filter"] | (Record | null); /** @description Mode of the upsert operation: insert_only, upsert (default), update_only */ update_mode?: components["schemas"]["UpdateMode"] | (Record | null); }; PointStruct: { id: components["schemas"]["ExtendedPointId"]; vector: components["schemas"]["VectorStruct"]; /** @description Payload values (optional) */ payload?: components["schemas"]["Payload"] | (Record | null); }; /** @description Full vector data per point separator with single and multiple vector modes */ VectorStruct: (number)[] | ((number)[])[] | ({ [key: string]: components["schemas"]["Vector"] | undefined; }) | components["schemas"]["Document"] | components["schemas"]["Image"] | components["schemas"]["InferenceObject"]; /** @description This data structure is used in API interface and applied across multiple shards */ SetPayload: { payload: components["schemas"]["Payload"]; /** @description Assigns payload to each point in this list */ points?: (components["schemas"]["ExtendedPointId"])[] | null; /** @description Assigns payload to each point that satisfy this filter condition */ filter?: components["schemas"]["Filter"] | (Record | null); shard_key?: components["schemas"]["ShardKeySelector"] | (Record | null); /** @description Assigns payload to each point that satisfy this path of property */ key?: string | null; }; /** @description This data structure is used in API interface and applied across multiple shards */ DeletePayload: { /** @description List of payload keys to remove from payload */keys: (string)[]; /** @description Deletes values from each point in this list */ points?: (components["schemas"]["ExtendedPointId"])[] | null; /** @description Deletes values from points that satisfy this filter condition */ filter?: components["schemas"]["Filter"] | (Record | null); shard_key?: components["schemas"]["ShardKeySelector"] | (Record | null); }; /** @description Information about current cluster status and structure */ ClusterStatus: OneOf<[{ /** @enum {string} */status: "disabled"; }, { /** @enum {string} */status: "enabled"; /** * Format: uint64 * @description ID of this peer */ peer_id: number; /** @description Peers composition of the cluster with main information */ peers: { [key: string]: components["schemas"]["PeerInfo"] | undefined; }; raft_info: components["schemas"]["RaftInfo"]; consensus_thread_status: components["schemas"]["ConsensusThreadStatus"]; /** @description Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap. */ message_send_failures: { [key: string]: components["schemas"]["MessageSendErrors"] | undefined; }; }]>; /** @description Information of a peer in the cluster */ PeerInfo: { uri: string; }; /** @description Summary information about the current raft state */ RaftInfo: { /** * Format: uint64 * @description Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication. */ term: number; /** * Format: uint64 * @description The index of the latest committed (finalized) operation that this peer is aware of. */ commit: number; /** * Format: uint * @description Number of consensus operations pending to be applied on this peer */ pending_operations: number; /** * Format: uint64 * @description Leader of the current term */ leader?: number | null; /** @description Role of this peer in the current term */ role?: components["schemas"]["StateRole"] | (Record | null); /** @description Is this peer a voter or a learner */ is_voter: boolean; }; /** * @description Role of the peer in the consensus * @enum {string} */ StateRole: "Follower" | "Candidate" | "Leader" | "PreCandidate"; /** @description Information about current consensus thread status */ ConsensusThreadStatus: OneOf<[{ /** @enum {string} */consensus_thread_status: "working"; /** Format: date-time */ last_update: string; }, { /** @enum {string} */consensus_thread_status: "stopped"; }, { /** @enum {string} */consensus_thread_status: "stopped_with_err"; err: string; }]>; /** @description Message send failures for a particular peer */ MessageSendErrors: { /** Format: uint */count: number; latest_error?: string | null; /** * Format: date-time * @description Timestamp of the latest error */ latest_error_timestamp?: string | null; }; /** * @example { * "name": "my-collection-3766212330831337-2024-07-22-08-31-55.snapshot", * "creation_time": "2022-08-04T10:49:10", * "size": 1000000, * "checksum": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0" * } */ SnapshotDescription: { name: string; /** Format: partial-date-time */ creation_time?: string | null; /** Format: uint64 */ size: number; checksum?: string | null; }; /** @description Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned. */ CountRequest: { /** @description Specify in which shards to look for the points, if not specified - look in all shards */shard_key?: components["schemas"]["ShardKeySelector"] | (Record | null); /** @description Look only for points which satisfies this conditions */ filter?: components["schemas"]["Filter"] | (Record | null); /** * @description If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true * @default true */ exact?: boolean; }; CountResult: { /** * Format: uint * @description Number of points which satisfy the conditions */ count: number; }; /** @description Current clustering distribution for the collection */ CollectionClusterInfo: { /** * Format: uint64 * @description ID of this peer */ peer_id: number; /** * Format: uint * @description Total number of shards */ shard_count: number; /** @description Local shards */ local_shards: (components["schemas"]["LocalShardInfo"])[]; /** @description Remote shards */ remote_shards: (components["schemas"]["RemoteShardInfo"])[]; /** @description Shard transfers */ shard_transfers: (components["schemas"]["ShardTransferInfo"])[]; /** @description Resharding operations */ resharding_operations?: (components["schemas"]["ReshardingInfo"])[] | null; }; LocalShardInfo: { /** * Format: uint32 * @description Local shard id */ shard_id: number; /** @description User-defined sharding key */ shard_key?: components["schemas"]["ShardKey"] | (Record | null); /** * Format: uint * @description Number of points in the shard */ points_count: number; state: components["schemas"]["ReplicaState"]; }; /** * @description State of the single shard within a replica set. * @enum {string} */ ReplicaState: "Active" | "Dead" | "Partial" | "Initializing" | "Listener" | "PartialSnapshot" | "Recovery" | "Resharding" | "ReshardingScaleDown" | "ActiveRead" | "ManualRecovery"; RemoteShardInfo: { /** * Format: uint32 * @description Remote shard id */ shard_id: number; /** @description User-defined sharding key */ shard_key?: components["schemas"]["ShardKey"] | (Record | null); /** * Format: uint64 * @description Remote peer id */ peer_id: number; state: components["schemas"]["ReplicaState"]; }; ShardTransferInfo: { /** Format: uint32 */shard_id: number; /** * Format: uint32 * @description Target shard ID if different than source shard ID * * Used exclusively with `ReshardingStreamRecords` transfer method. */ to_shard_id?: number | null; /** * Format: uint64 * @description Source peer id */ from: number; /** * Format: uint64 * @description Destination peer id */ to: number; /** @description If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another */ sync: boolean; method?: components["schemas"]["ShardTransferMethod"] | (Record | null); /** @description A human-readable report of the transfer progress. Available only on the source peer. */ comment?: string | null; }; /** * @description Methods for transferring a shard from one node to another. * * - `stream_records` - Stream all shard records in batches until the whole shard is transferred. * * - `snapshot` - Snapshot the shard, transfer and restore it on the receiver. * * - `wal_delta` - Attempt to transfer shard difference by WAL delta. * * - `resharding_stream_records` - Shard transfer for resharding: stream all records in batches until all points are transferred. * @enum {string} */ ShardTransferMethod: "stream_records" | "snapshot" | "wal_delta" | "resharding_stream_records"; ReshardingInfo: { direction: components["schemas"]["ReshardingDirection"]; /** Format: uint32 */ shard_id: number; /** Format: uint64 */ peer_id: number; shard_key?: components["schemas"]["ShardKey"] | (Record | null); }; /** * @description Resharding direction, scale up or down in number of shards * * - `up` - Scale up, add a new shard * * - `down` - Scale down, remove a shard * @enum {string} */ ReshardingDirection: "up" | "down"; TelemetryData: { id: string; app?: components["schemas"]["AppBuildTelemetry"] | (Record | null); collections: components["schemas"]["CollectionsTelemetry"]; cluster?: components["schemas"]["ClusterTelemetry"] | (Record | null); requests?: components["schemas"]["RequestsTelemetry"] | (Record | null); memory?: components["schemas"]["MemoryTelemetry"] | (Record | null); hardware?: components["schemas"]["HardwareTelemetry"] | (Record | null); search_pool?: components["schemas"]["SearchThreadPoolTelemetry"] | (Record | null); /** @description Resource quota this node is enforcing, and whether it is currently over it. The config is whatever this node last persisted, so a peer that missed a consensus update reports what it is actually applying rather than what the cluster agreed on. Absent for a token without global access, which `GET /quotas` requires as well. */ quota?: components["schemas"]["QuotaTelemetry"] | (Record | null); }; AppBuildTelemetry: { name: string; version: string; features?: components["schemas"]["AppFeaturesTelemetry"] | (Record | null); runtime_features?: components["schemas"]["FeatureFlags"] | (Record | null); low_memory_mode?: components["schemas"]["LowMemoryMode"] | (Record | null); hnsw_global_config?: components["schemas"]["HnswGlobalConfig"] | (Record | null); system?: components["schemas"]["RunningEnvironmentTelemetry"] | (Record | null); jwt_rbac?: boolean | null; hide_jwt_dashboard?: boolean | null; audit?: components["schemas"]["AuditTelemetry"] | (Record | null); /** Format: date-time */ startup: string; }; AppFeaturesTelemetry: { debug: boolean; service_debug_feature: boolean; recovery_mode: boolean; gpu: boolean; rocksdb: boolean; staging: boolean; }; FeatureFlags: { /** * @description Magic feature flag that enables all features. * * Note that this will only be applied to all flags when passed into [`init_feature_flags`]. * @default false */ all?: boolean; /** * @description Use incremental HNSW building. * * Enabled by default in Qdrant 1.14.1. * @default true */ incremental_hnsw_building?: boolean; /** * @description Use appendable quantization in appendable plain segments. * * Enabled by default in Qdrant 1.16.0. * @default true */ appendable_quantization?: boolean; /** * @description Use single-file mmap in-ram vector storage (InRamMmap) * * Enabled by default in Qdrant 1.18.3+ * @default true */ single_file_mmap_vector_storage?: boolean; /** * @description Allow the io_uring-based payload storage implementation. When disabled, io_uring payload storage is *never* used. When enabled, payload storage backend is decided based on `storage.performance.io_uring` option and payload storage type. * @default true */ async_payload_storage?: boolean; /** * @description Write a segment manifest (`segments_manifest.json`, next to the `segments/` directory) listing the shard's segments and their state, so out-of-process readers can discover segments without scanning the filesystem. * @default false */ write_segment_manifest?: boolean; /** * @description Build new segments in append-only mode: in-place point mutations become clone-and-tombstone appends instead. Intended for testing the append-only storage path. * @default false */ append_only_mutations?: boolean; /** * @description Persist write-once bitmasks in the compact `StoredBitmask` format instead of raw dense bitslices. Only gates writing: both formats are always readable. * @default false */ compact_bitmask?: boolean; /** * @description Serverless-compatible deployment mode. Automatically enables [`Self::write_segment_manifest`], [`Self::append_only_mutations`] and [`Self::compact_bitmask`]. * * Note that this will only be applied when passed into [`init_feature_flags`]. * @default false */ serverless_compatible?: boolean; }; /** * @description Controls how segments are loaded on startup to reduce memory pressure. * * Configured via `storage.low_memory_mode` in the configuration file. * * This setting only affects *loading* — it never modifies the persisted configuration of any segment. The same data directory will behave differently depending on how this mode is set at startup, which makes it safe to toggle for recovery from out-of-memory crash loops. */ LowMemoryMode: "disabled" | "no_resident" | "no_populate"; HnswGlobalConfig: { /** * Format: double * @description Enable HNSW healing if the ratio of missing points is no more than this value. To disable healing completely, set this value to `0.0`. * @default 0.3 */ healing_threshold?: number; }; RunningEnvironmentTelemetry: { distribution?: string | null; distribution_version?: string | null; is_docker: boolean; /** Format: uint */ cores?: number | null; /** * Format: float * @description Average number of CPU cores used by this process over roughly the last two seconds. `None` on unsupported platforms, before two samples are collected, or on transient failures reading process CPU time. */ cpu_cores_used?: number | null; /** * Format: uint * @description Effective total memory for this process in KiB (cgroup limit or host RAM). */ ram_size?: number | null; /** * Format: uint * @description Size in KiB of the filesystem hosting Qdrant's /storage path (if not available, fallback to host disk size) */ disk_size?: number | null; cpu_flags: string; cpu_endian?: components["schemas"]["CpuEndian"] | (Record | null); gpu_devices?: (components["schemas"]["GpuDeviceTelemetry"])[] | null; }; /** @enum {string} */ CpuEndian: "little" | "big" | "other"; GpuDeviceTelemetry: { name: string; }; AuditTelemetry: { dir: string; rotation: string; /** Format: uint */ max_log_files: number; trust_forwarded_headers: boolean; log_api: boolean; /** Format: uint */ dir_size_bytes?: number | null; }; CollectionsTelemetry: { /** Format: uint */number_of_collections: number; /** Format: uint */ max_collections?: number | null; collections?: (components["schemas"]["CollectionTelemetryEnum"])[] | null; snapshots?: (components["schemas"]["CollectionSnapshotTelemetry"])[] | null; }; CollectionTelemetryEnum: components["schemas"]["CollectionTelemetry"] | components["schemas"]["CollectionsAggregatedTelemetry"]; CollectionTelemetry: { id: string; /** Format: uint64 */ init_time_ms?: number | null; config?: components["schemas"]["CollectionConfigTelemetry"] | (Record | null); shards?: (components["schemas"]["ReplicaSetTelemetry"])[] | null; transfers?: (components["schemas"]["ShardTransferInfo"])[] | null; resharding?: (components["schemas"]["ReshardingInfo"])[] | null; shard_clean_tasks?: ({ [key: string]: components["schemas"]["ShardCleanStatusTelemetry"] | undefined; }) | null; }; CollectionConfigTelemetry: { params: components["schemas"]["CollectionParams"]; hnsw_config: components["schemas"]["HnswConfig"]; optimizer_config: components["schemas"]["OptimizersConfig"]; wal_config: components["schemas"]["WalConfig"]; /** @default null */ quantization_config?: components["schemas"]["QuantizationConfig"] | (Record | null); strict_mode_config?: components["schemas"]["StrictModeConfigOutput"] | (Record | null); /** * Format: uuid * @default null */ uuid?: string | null; /** @description Arbitrary JSON metadata for the collection */ metadata?: components["schemas"]["Payload"] | (Record | null); }; ReplicaSetTelemetry: { /** Format: uint32 */id: number; key?: components["schemas"]["ShardKey"] | (Record | null); local?: components["schemas"]["LocalShardTelemetry"] | (Record | null); remote: (components["schemas"]["RemoteShardTelemetry"])[]; replicate_states: { [key: string]: components["schemas"]["ReplicaState"] | undefined; }; partial_snapshot?: components["schemas"]["PartialSnapshotTelemetry"] | (Record | null); }; LocalShardTelemetry: { variant_name?: string | null; status?: components["schemas"]["ShardStatus"] | (Record | null); /** * Format: uint * @description Total number of optimized points since the last start. */ total_optimized_points: number; /** * Format: uint * @description An ESTIMATION of effective amount of bytes used for vectors Do NOT rely on this number unless you know what you are doing */ vectors_size_bytes?: number | null; /** * Format: uint * @description An estimation of the effective amount of bytes used for payloads Do NOT rely on this number unless you know what you are doing */ payloads_size_bytes?: number | null; /** * Format: uint * @description Sum of segment points This is an approximate number Do NOT rely on this number unless you know what you are doing */ num_points?: number | null; /** * Format: uint * @description Sum of number of vectors in all segments This is an approximate number Do NOT rely on this number unless you know what you are doing */ num_vectors?: number | null; /** @description Sum of number of vectors across all segments, grouped by their name. This is an approximate number. Do NOT rely on this number unless you know what you are doing */ num_vectors_by_name?: ({ [key: string]: number | undefined; }) | null; segments?: (components["schemas"]["SegmentTelemetry"])[] | null; optimizations?: components["schemas"]["OptimizerTelemetry"] | (Record | null); async_scorer?: boolean | null; indexed_only_excluded_vectors?: ({ [key: string]: number | undefined; }) | null; /** @description Update queue status */ update_queue?: components["schemas"]["ShardUpdateQueueInfo"] | (Record | null); }; /** * @description Current state of the shard (supports same states as the collection) * * `Green` - all good. `Yellow` - optimization is running, 'Grey' - optimizations are possible but not triggered, `Red` - some operations failed and was not recovered * @enum {string} */ ShardStatus: "green" | "yellow" | "grey" | "red"; SegmentTelemetry: { info: components["schemas"]["SegmentInfo"]; config: components["schemas"]["SegmentConfig"]; vector_index_searches: (components["schemas"]["VectorIndexSearchesTelemetry"])[]; payload_field_indices: (components["schemas"]["PayloadIndexTelemetry"])[]; }; /** @description Aggregated information about segment */ SegmentInfo: { /** Format: uuid */uuid: string; segment_type: components["schemas"]["SegmentType"]; /** Format: uint */ num_vectors: number; /** Format: uint */ num_points: number; /** Format: uint */ num_deferred_points?: number | null; /** Format: uint */ num_deleted_deferred_points?: number | null; /** Format: uint */ num_indexed_vectors: number; /** Format: uint */ num_deleted_vectors: number; /** * Format: uint * @description An ESTIMATION of effective amount of bytes used for vectors Do NOT rely on this number unless you know what you are doing */ vectors_size_bytes: number; /** * Format: uint * @description An estimation of the effective amount of bytes used for payloads */ payloads_size_bytes: number; /** Format: uint */ ram_usage_bytes: number; /** Format: uint */ disk_usage_bytes: number; is_appendable: boolean; index_schema: { [key: string]: components["schemas"]["PayloadIndexInfo"] | undefined; }; vector_data: { [key: string]: components["schemas"]["VectorDataInfo"] | undefined; }; /** @description Universal I/O backend that payload storage reads files with. Absent if payload storage does not support configurable backends or only supports a single backend type. */ payload_storage_io_backend?: components["schemas"]["IoBackend"] | (Record | null); /** * Format: uint32 * @description Internal ID from which points are deferred (hidden from reads). Only set for appendable segments. */ deferred_internal_id?: number | null; }; /** * @description Type of segment * @enum {string} */ SegmentType: "plain" | "indexed" | "special"; VectorDataInfo: { /** Format: uint */num_vectors: number; /** Format: uint */ num_indexed_vectors: number; /** Format: uint */ num_deleted_vectors: number; /** @description Universal I/O backend that this vector storage reads files with. Absent if vector storage does not support configurable backends or only supports a single backend type. */ io_backend?: components["schemas"]["IoBackend"] | (Record | null); }; /** * @description Universal I/O backend that is used to read files. * * Decided when the component is opened based on `storage.performance.io_uring` option, component memory placement and kernel io_uring support. * * Options: * * * `Mmap` - Reads are served by the page cache through a memory mapping. * * * `IoUring` - Reads are submitted to the kernel with io_uring. * @enum {string} */ IoBackend: "mmap" | "io_uring"; SegmentConfig: { /** @default {} */vector_data?: { [key: string]: components["schemas"]["VectorDataConfig"] | undefined; }; sparse_vector_data?: { [key: string]: components["schemas"]["SparseVectorDataConfig"] | undefined; }; payload_storage_type: components["schemas"]["PayloadStorageType"]; }; /** @description Config of single vector data storage */ VectorDataConfig: { /** * Format: uint * @description Size/dimensionality of the vectors used */ size: number; distance: components["schemas"]["Distance"]; storage_type: components["schemas"]["VectorStorageType"]; index: components["schemas"]["Indexes"]; /** @description Vector specific quantization config that overrides collection config */ quantization_config?: components["schemas"]["QuantizationConfig"] | (Record | null); /** @description Vector specific configuration to enable multiple vectors per point */ multivector_config?: components["schemas"]["MultiVectorConfig"] | (Record | null); /** @description Vector specific configuration to set specific storage element type */ datatype?: components["schemas"]["VectorStorageDatatype"] | (Record | null); }; /** @description Storage types for vectors */ VectorStorageType: "Memory" | "Mmap" | "ChunkedMmap" | "InRamChunkedMmap" | "InRamMmap" | "Empty"; /** @description Vector index configuration */ Indexes: OneOf<[{ /** @enum {string} */type: "plain"; options: Record; }, { /** @enum {string} */type: "hnsw"; options: components["schemas"]["HnswConfig"]; }]>; /** * @description Storage types for vectors * @enum {string} */ VectorStorageDatatype: "float32" | "float16" | "uint8" | "turbo4"; /** @description Config of single sparse vector data storage */ SparseVectorDataConfig: { index: components["schemas"]["SparseIndexConfig"]; storage_type?: components["schemas"]["SparseVectorStorageType"]; /** @description Configures addition value modifications for sparse vectors. Default: none */ modifier?: components["schemas"]["Modifier"] | (Record | null); }; /** @description Configuration for sparse inverted index. */ SparseIndexConfig: { /** * Format: uint * @description We prefer a full scan search upto (excluding) this number of vectors. * * Note: this is number of vectors, not KiloBytes. */ full_scan_threshold?: number | null; index_type: components["schemas"]["SparseIndexType"]; /** @description Datatype used to store weights in the index. */ datatype?: components["schemas"]["VectorStorageDatatype"] | (Record | null); /** * @description Requested memory placement of the index. * * The structural decision is carried by `index_type`; this field additionally distinguishes `cold` from `cached` for the mmap index variant. */ memory?: components["schemas"]["Memory"] | (Record | null); }; /** @description Sparse index types */ SparseIndexType: "MutableRam" | "ImmutableRam" | "Mmap"; SparseVectorStorageType: "mmap" | "empty"; /** @description Type of payload storage */ PayloadStorageType: OneOf<[{ /** @enum {string} */type: "mmap"; }, { /** @enum {string} */type: "in_ram_mmap"; }]>; VectorIndexSearchesTelemetry: { index_name?: string | null; unfiltered_plain: components["schemas"]["OperationDurationStatistics"]; unfiltered_hnsw: components["schemas"]["OperationDurationStatistics"]; unfiltered_sparse: components["schemas"]["OperationDurationStatistics"]; filtered_plain: components["schemas"]["OperationDurationStatistics"]; filtered_small_cardinality: components["schemas"]["OperationDurationStatistics"]; filtered_large_cardinality: components["schemas"]["OperationDurationStatistics"]; filtered_exact: components["schemas"]["OperationDurationStatistics"]; filtered_sparse: components["schemas"]["OperationDurationStatistics"]; unfiltered_exact: components["schemas"]["OperationDurationStatistics"]; }; OperationDurationStatistics: { /** Format: uint */count: number; /** Format: uint */ fail_count?: number | null; /** * Format: float * @description The average time taken by 128 latest operations, calculated as a weighted mean. */ avg_duration_micros?: number | null; /** * Format: float * @description The minimum duration of the operations across all the measurements. */ min_duration_micros?: number | null; /** * Format: float * @description The maximum duration of the operations across all the measurements. */ max_duration_micros?: number | null; /** * Format: uint64 * @description The total duration of all operations in microseconds. */ total_duration_micros?: number | null; /** Format: date-time */ last_responded?: string | null; }; PayloadIndexTelemetry: { field_name?: string | null; index_type: string; /** * Format: uint * @description The amount of values indexed for all points. */ points_values_count: number; /** * Format: uint * @description The amount of points that have at least one value indexed. */ points_count: number; /** Format: uint */ histogram_bucket_size?: number | null; }; OptimizerTelemetry: { status: components["schemas"]["OptimizersStatus"]; optimizations: components["schemas"]["OperationDurationStatistics"]; log?: (components["schemas"]["TrackerTelemetry"])[] | null; }; /** @description Tracker object used in telemetry */ TrackerTelemetry: { /** @description Name of the optimizer */name: string; /** * Format: uuid * @description UUID of the upcoming segment being created by the optimizer */ uuid: string; /** @description Internal segment IDs being optimized. These are local and in-memory, meaning that they can refer to different segments after a service restart. */ segment_ids: (number)[]; /** @description Segment UUIDs being optimized. Refers to same segments as in `segment_ids`, but trackable across restarts, and reflect their directory name. */ segment_uuids: (string)[]; status: components["schemas"]["TrackerStatus"]; /** * Format: date-time * @description Start time of the optimizer */ start_at: string; /** * Format: date-time * @description End time of the optimizer */ end_at?: string | null; }; /** @description Represents the current state of the optimizer being tracked */ TrackerStatus: OneOf<["optimizing" | "done", { cancelled: string; }, { error: string; }]>; ShardUpdateQueueInfo: { /** * Format: uint * @description Number of elements in the queue */ length: number; /** * Format: uint * @description last operation number processed */ op_num?: number | null; /** * Format: uint * @description Number of points that are deferred (i.e hidden from search as they're not yet optimized). */ deferred_points?: number | null; }; RemoteShardTelemetry: { /** Format: uint32 */shard_id: number; /** Format: uint64 */ peer_id: number; searches?: components["schemas"]["OperationDurationStatistics"] | (Record | null); updates?: components["schemas"]["OperationDurationStatistics"] | (Record | null); }; PartialSnapshotTelemetry: { /** Format: uint */ongoing_create_snapshot_requests: number; is_recovering: boolean; /** Format: uint64 */ recovery_timestamp: number; }; ShardCleanStatusTelemetry: OneOf<["started" | "done" | "cancelled", { progress: components["schemas"]["ShardCleanStatusProgressTelemetry"]; }, { failed: components["schemas"]["ShardCleanStatusFailedTelemetry"]; }]>; ShardCleanStatusProgressTelemetry: { /** Format: uint */deleted_points: number; }; ShardCleanStatusFailedTelemetry: { reason: string; }; CollectionsAggregatedTelemetry: { /** Format: uint */vectors: number; optimizers_status: components["schemas"]["OptimizersStatus"]; params: components["schemas"]["CollectionParams"]; }; CollectionSnapshotTelemetry: { id: string; /** Format: uint */ running_snapshots?: number | null; /** Format: uint */ running_snapshot_recovery?: number | null; /** Format: uint */ total_snapshot_creations?: number | null; }; ClusterTelemetry: { enabled: boolean; status?: components["schemas"]["ClusterStatusTelemetry"] | (Record | null); config?: components["schemas"]["ClusterConfigTelemetry"] | (Record | null); peers?: ({ [key: string]: components["schemas"]["PeerInfo"] | undefined; }) | null; peer_metadata?: ({ [key: string]: components["schemas"]["PeerMetadata"] | undefined; }) | null; metadata?: { [key: string]: unknown; } | null; resharding_enabled?: boolean | null; }; ClusterStatusTelemetry: { /** Format: uint */number_of_peers: number; /** Format: uint64 */ term: number; /** Format: uint64 */ commit: number; /** Format: uint */ pending_operations: number; role?: components["schemas"]["StateRole"] | (Record | null); is_voter: boolean; /** Format: uint64 */ peer_id?: number | null; consensus_thread_status: components["schemas"]["ConsensusThreadStatus"]; }; ClusterConfigTelemetry: { /** Format: uint64 */grpc_timeout_ms: number; p2p: components["schemas"]["P2pConfigTelemetry"]; consensus: components["schemas"]["ConsensusConfigTelemetry"]; }; P2pConfigTelemetry: { /** Format: uint */connection_pool_size: number; }; ConsensusConfigTelemetry: { /** Format: uint */max_message_queue_size: number; /** Format: uint64 */ tick_period_ms: number; /** Format: uint64 */ bootstrap_timeout_sec: number; }; /** @description Metadata describing extra properties for each peer */ PeerMetadata: { /** @description Peer Qdrant version */version: string; }; RequestsTelemetry: { rest: components["schemas"]["WebApiTelemetry"]; grpc: components["schemas"]["GrpcTelemetry"]; }; WebApiTelemetry: { responses: { [key: string]: ({ [key: string]: components["schemas"]["OperationDurationStatistics"] | undefined; }) | undefined; }; per_collection_responses?: { [key: string]: ({ [key: string]: ({ [key: string]: components["schemas"]["OperationDurationStatistics"] | undefined; }) | undefined; }) | undefined; }; }; GrpcTelemetry: { responses: { [key: string]: ({ [key: string]: components["schemas"]["OperationDurationStatistics"] | undefined; }) | undefined; }; per_collection_responses?: { [key: string]: ({ [key: string]: ({ [key: string]: components["schemas"]["OperationDurationStatistics"] | undefined; }) | undefined; }) | undefined; }; }; MemoryTelemetry: { /** * Format: uint * @description Total number of bytes in active pages allocated by the application */ active_bytes: number; /** * Format: uint * @description Total number of bytes allocated by the application */ allocated_bytes: number; /** * Format: uint * @description Total number of bytes dedicated to metadata */ metadata_bytes: number; /** * Format: uint * @description Maximum number of bytes in physically resident data pages mapped */ resident_bytes: number; /** * Format: uint * @description Total number of bytes in virtual memory mappings */ retained_bytes: number; }; HardwareTelemetry: { collection_data: { [key: string]: components["schemas"]["HardwareUsage"] | undefined; }; }; /** @description Usage of the hardware resources, spent to process the request */ HardwareUsage: { /** Format: uint */cpu: number; /** Format: uint */ payload_io_read: number; /** Format: uint */ payload_io_write: number; /** Format: uint */ payload_index_io_read: number; /** Format: uint */ payload_index_io_write: number; /** Format: uint */ vector_io_read: number; /** Format: uint */ vector_io_write: number; }; /** * @description Live snapshot of the adaptive search routing. * * `mode` is the runtime currently selected by [`SearchMode`]; `high_cpu_threads` and `high_io_threads` are the blocking-thread budgets of the two underlying runtimes that the adaptive handle routes between. */ SearchThreadPoolTelemetry: { /** @description Currently active mode (`high_cpu` or `high_io`). */mode: string; /** * Format: uint * @description Blocking-thread count of the high-CPU runtime. */ high_cpu_threads: number; /** * Format: uint * @description Blocking-thread count of the high-IO runtime. */ high_io_threads: number; }; /** * @description What a node reports about the quota it is enforcing. * * Carries the verdict rather than the raw utilization, because the point of reporting it is to know whether this node is currently refusing writes — which depends on the limits as well as the readings. */ QuotaTelemetry: { config: components["schemas"]["QuotaConfig"]; exceeded: components["schemas"]["QuotaExceeded"]; }; /** * @description Cluster-wide limits on node resources. * * An unset limit means the corresponding resource is not capped. Limits are only enforced while `enabled` is true. */ QuotaConfig: { /** * @description Whether the limits below are enforced. * @default false */ enabled?: boolean; /** * Format: uint8 * @description Reject memory-consuming updates once process resident memory reaches this percentage of total system memory (or of the cgroup limit, if one applies). */ max_resident_memory_percent?: number | null; /** * Format: uint8 * @description Reject disk-consuming updates once the filesystem hosting the storage directory is filled to this percentage of its capacity. */ max_disk_usage_percent?: number | null; /** * Format: uint8 * @description How many percentage points below its limit a resource has to fall before this node starts accepting work again. * * Without a margin, a resource resting on its limit crosses it in both directions on the noise between two readings, putting the node in and out of service each time — and restarting a shard recovery with it. Raise it where usage is volatile; `0` disables the margin and releases as soon as usage is back under the limit. * * Unset leaves the built-in default in force, so a config written today does not pin a number that a later release may want to revise. */ release_margin_percent?: number | null; }; /** * @description Which of the enforced limits a node is currently refusing work over. * * Reported per resource because they are freed by different actions: disk by deleting or optimizing, memory by unloading. A single flag would not say which one to go and fix. * * `true` outlasts the reading that caused it: a resource that reaches its limit stays flagged until it has fallen a margin below, so that one resting near the limit does not flip the node in and out of service. Expect to see it set while the reported utilization is already back under the configured limit. * * A field is `null` when the node is not enforcing that resource — the quota is disabled, no limit is set for it, or it cannot be measured here. That is deliberately distinct from `false`: a resource that can never trip must not be reported as one that is within its limits, or it invites an alert that can never fire. */ QuotaExceeded: { resident_memory?: boolean | null; disk_usage?: boolean | null; }; ClusterOperations: components["schemas"]["MoveShardOperation"] | components["schemas"]["ReplicateShardOperation"] | components["schemas"]["AbortTransferOperation"] | components["schemas"]["DropReplicaOperation"] | components["schemas"]["CreateShardingKeyOperation"] | components["schemas"]["DropShardingKeyOperation"] | components["schemas"]["RestartTransferOperation"] | components["schemas"]["StartReshardingOperation"] | components["schemas"]["AbortReshardingOperation"] | components["schemas"]["ReplicatePointsOperation"]; MoveShardOperation: { move_shard: components["schemas"]["MoveShard"]; }; MoveShard: { /** Format: uint32 */shard_id: number; /** Format: uint64 */ to_peer_id: number; /** Format: uint64 */ from_peer_id: number; /** @description Method for transferring the shard from one node to another */ method?: components["schemas"]["ShardTransferMethod"] | (Record | null); }; ReplicateShardOperation: { replicate_shard: components["schemas"]["ReplicateShard"]; }; ReplicateShard: { /** Format: uint32 */shard_id: number; /** Format: uint64 */ to_peer_id: number; /** Format: uint64 */ from_peer_id: number; /** @description Method for transferring the shard from one node to another */ method?: components["schemas"]["ShardTransferMethod"] | (Record | null); }; AbortTransferOperation: { abort_transfer: components["schemas"]["AbortShardTransfer"]; }; AbortShardTransfer: { /** Format: uint32 */shard_id: number; /** Format: uint64 */ to_peer_id: number; /** Format: uint64 */ from_peer_id: number; }; DropReplicaOperation: { drop_replica: components["schemas"]["Replica"]; }; Replica: { /** Format: uint32 */shard_id: number; /** Format: uint64 */ peer_id: number; }; CreateShardingKeyOperation: { create_sharding_key: components["schemas"]["CreateShardingKey"]; }; CreateShardingKey: { shard_key: components["schemas"]["ShardKey"]; /** * Format: uint32 * @description How many shards to create for this key If not specified, will use the default value from config */ shards_number?: number | null; /** * Format: uint32 * @description How many replicas to create for each shard If not specified, will use the default value from config */ replication_factor?: number | null; /** @description Placement of shards for this key List of peer ids, that can be used to place shards for this key If not specified, will be randomly placed among all peers */ placement?: (number)[] | null; /** @description Initial state of the shards for this key If not specified, will be `Initializing` first and then `Active` Warning: do not change this unless you know what you are doing */ initial_state?: components["schemas"]["ReplicaState"] | (Record | null); }; DropShardingKeyOperation: { drop_sharding_key: components["schemas"]["DropShardingKey"]; }; DropShardingKey: { shard_key: components["schemas"]["ShardKey"]; }; RestartTransferOperation: { restart_transfer: components["schemas"]["RestartTransfer"]; }; RestartTransfer: { /** Format: uint32 */shard_id: number; /** Format: uint64 */ from_peer_id: number; /** Format: uint64 */ to_peer_id: number; method: components["schemas"]["ShardTransferMethod"]; }; StartReshardingOperation: { start_resharding: components["schemas"]["StartResharding"]; }; StartResharding: { direction: components["schemas"]["ReshardingDirection"]; /** * Format: uint64 * @description Peer to create the new shard on, or to migrate points away from when scaling down. If not specified, the least loaded peer is picked when scaling up, a peer holding the removed shard when scaling down. */ peer_id?: number | null; /** @description Custom shard key to reshard, must already exist. If not specified, shards without a shard key are resharded. */ shard_key?: components["schemas"]["ShardKey"] | (Record | null); }; AbortReshardingOperation: { abort_resharding: components["schemas"]["AbortResharding"]; }; AbortResharding: Record; ReplicatePointsOperation: { replicate_points: components["schemas"]["ReplicatePoints"]; }; ReplicatePoints: { filter?: components["schemas"]["Filter"] | (Record | null); from_shard_key: components["schemas"]["ShardKey"]; to_shard_key: components["schemas"]["ShardKey"]; }; SnapshotRecover: { /** * Format: uri * @description Examples: - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot` - Local path `file:///qdrant/snapshots/test_collection-2022-08-04-10-49-10.snapshot` */ location: string; /** * @description Defines which data should be used as a source of truth if there are other replicas in the cluster. If set to `Snapshot`, the snapshot will be used as a source of truth, and the current state will be overwritten. If set to `Replica`, the current state will be used as a source of truth, and after recovery if will be synchronized with the snapshot. * @default null */ priority?: components["schemas"]["SnapshotPriority"] | (Record | null); /** * @description Optional SHA256 checksum to verify snapshot integrity before recovery. * @default null */ checksum?: string | null; /** * @description Optional API key used when fetching the snapshot from a remote URL. * @default null */ api_key?: string | null; }; /** * @description Defines source of truth for snapshot recovery: * * `NoSync` means - restore snapshot without *any* additional synchronization. `Snapshot` means - prefer snapshot data over the current state. `Replica` means - prefer existing data over the snapshot. * @enum {string} */ SnapshotPriority: "no_sync" | "snapshot" | "replica"; CollectionsAliasesResponse: { aliases: (components["schemas"]["AliasDescription"])[]; }; /** * @example { * "alias_name": "blogs-title", * "collection_name": "arivx-title" * } */ AliasDescription: { alias_name: string; collection_name: string; }; /** * @description Defines write ordering guarantees for collection operations * * * `weak` - write operations may be reordered, works faster, default * * * `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change * * * `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down * @enum {string} */ WriteOrdering: "weak" | "medium" | "strong"; /** * @description Read consistency parameter * * Defines how many replicas should be queried to get the result * * * `N` - send N random request and return points, which present on all of them * * * `majority` - send N/2+1 random request and return points, which present on all of them * * * `quorum` - send requests to all nodes and return points which present on majority of them * * * `all` - send requests to all nodes and return points which present on all of them * * Default value is `Factor(1)` */ ReadConsistency: number | components["schemas"]["ReadConsistencyType"]; /** * @description * `majority` - send N/2+1 random request and return points, which present on all of them * * * `quorum` - send requests to all nodes and return points which present on majority of nodes * * * `all` - send requests to all nodes and return points which present on all nodes * @enum {string} */ ReadConsistencyType: "majority" | "quorum" | "all"; UpdateVectors: { /** @description Points with named vectors */points: (components["schemas"]["PointVectors"])[]; shard_key?: components["schemas"]["ShardKeySelector"] | (Record | null); update_filter?: components["schemas"]["Filter"] | (Record | null); }; PointVectors: { id: components["schemas"]["ExtendedPointId"]; vector: components["schemas"]["VectorStruct"]; }; DeleteVectors: { /** @description Deletes values from each point in this list */points?: (components["schemas"]["ExtendedPointId"])[] | null; /** @description Deletes values from points that satisfy this filter condition */ filter?: components["schemas"]["Filter"] | (Record | null); /** @description Vector names */ vector: (string)[]; shard_key?: components["schemas"]["ShardKeySelector"] | (Record | null); }; PointGroup: { /** @description Scored points that have the same value of the group_by key */hits: (components["schemas"]["ScoredPoint"])[]; id: components["schemas"]["GroupId"]; /** @description Record that has been looked up using the group id */ lookup?: components["schemas"]["Record"] | (Record | null); }; /** @description Value of the group_by key, shared across all the hits in the group */ GroupId: string | number; GroupsResult: { groups: (components["schemas"]["PointGroup"])[]; }; UpdateOperations: { operations: (components["schemas"]["UpdateOperation"])[]; }; UpdateOperation: components["schemas"]["UpsertOperation"] | components["schemas"]["DeleteOperation"] | components["schemas"]["SetPayloadOperation"] | components["schemas"]["OverwritePayloadOperation"] | components["schemas"]["DeletePayloadOperation"] | components["schemas"]["ClearPayloadOperation"] | components["schemas"]["UpdateVectorsOperation"] | components["schemas"]["DeleteVectorsOperation"]; UpsertOperation: { upsert: components["schemas"]["PointInsertOperations"]; }; DeleteOperation: { delete: components["schemas"]["PointsSelector"]; }; SetPayloadOperation: { set_payload: components["schemas"]["SetPayload"]; }; OverwritePayloadOperation: { overwrite_payload: components["schemas"]["SetPayload"]; }; DeletePayloadOperation: { delete_payload: components["schemas"]["DeletePayload"]; }; ClearPayloadOperation: { clear_payload: components["schemas"]["PointsSelector"]; }; UpdateVectorsOperation: { update_vectors: components["schemas"]["UpdateVectors"]; }; DeleteVectorsOperation: { delete_vectors: components["schemas"]["DeleteVectors"]; }; ShardSnapshotRecover: { location: components["schemas"]["ShardSnapshotLocation"]; /** @default null */ priority?: components["schemas"]["SnapshotPriority"] | (Record | null); /** * @description Optional SHA256 checksum to verify snapshot integrity before recovery. * @default null */ checksum?: string | null; /** * @description Optional API key used when fetching the snapshot from a remote URL. * @default null */ api_key?: string | null; }; ShardSnapshotLocation: string; VersionInfo: { title: string; version: string; commit?: string | null; }; /** @description State of existence of a collection, true = exists, false = does not exist */ CollectionExistence: { exists: boolean; }; QueryRequest: { shard_key?: components["schemas"]["ShardKeySelector"] | (Record | null); /** * @description Sub-requests to perform first. If present, the query will be performed on the results of the prefetch(es). * @default null */ prefetch?: components["schemas"]["Prefetch"] | (components["schemas"]["Prefetch"])[] | (Record | null); /** @description Query to perform. If missing without prefetches, returns points ordered by their IDs. */ query?: components["schemas"]["QueryInterface"] | (Record | null); /** @description Define which vector name to use for querying. If missing, the default vector is used. */ using?: string | null; /** @description Filter conditions - return only those points that satisfy the specified conditions. */ filter?: components["schemas"]["Filter"] | (Record | null); /** @description Search params for when there is no prefetch */ params?: components["schemas"]["SearchParams"] | (Record | null); /** * Format: float * @description Return points with scores better than this threshold. */ score_threshold?: number | null; /** * Format: uint * @description Max number of points to return. Default is 10. */ limit?: number | null; /** * Format: uint * @description Offset of the result. Skip this many points. Default is 0 */ offset?: number | null; /** @description Options for specifying which vectors to include into the response. Default is false. */ with_vector?: components["schemas"]["WithVector"] | (Record | null); /** @description Options for specifying which payload to include or not. Default is false. */ with_payload?: components["schemas"]["WithPayloadInterface"] | (Record | null); /** * @description The location to use for IDs lookup, if not specified - use the current collection and the 'using' vector Note: the other collection vectors should have the same vector size as the 'using' vector in the current collection * @default null */ lookup_from?: components["schemas"]["LookupLocation"] | (Record | null); }; Prefetch: { /** * @description Sub-requests to perform first. If present, the query will be performed on the results of the prefetches. * @default null */ prefetch?: components["schemas"]["Prefetch"] | (components["schemas"]["Prefetch"])[] | (Record | null); /** @description Query to perform. If missing without prefetches, returns points ordered by their IDs. */ query?: components["schemas"]["QueryInterface"] | (Record | null); /** @description Define which vector name to use for querying. If missing, the default vector is used. */ using?: string | null; /** @description Filter conditions - return only those points that satisfy the specified conditions. */ filter?: components["schemas"]["Filter"] | (Record | null); /** @description Search params for when there is no prefetch */ params?: components["schemas"]["SearchParams"] | (Record | null); /** * Format: float * @description Return points with scores better than this threshold. */ score_threshold?: number | null; /** * Format: uint * @description Max number of points to return. Default is 10. */ limit?: number | null; /** * @description The location to use for IDs lookup, if not specified - use the current collection and the 'using' vector Note: the other collection vectors should have the same vector size as the 'using' vector in the current collection * @default null */ lookup_from?: components["schemas"]["LookupLocation"] | (Record | null); }; QueryInterface: components["schemas"]["VectorInput"] | components["schemas"]["Query"]; VectorInput: (number)[] | components["schemas"]["SparseVector"] | ((number)[])[] | components["schemas"]["ExtendedPointId"] | components["schemas"]["Document"] | components["schemas"]["Image"] | components["schemas"]["InferenceObject"]; Query: components["schemas"]["NearestQuery"] | components["schemas"]["RecommendQuery"] | components["schemas"]["DiscoverQuery"] | components["schemas"]["ContextQuery"] | components["schemas"]["OrderByQuery"] | components["schemas"]["FusionQuery"] | components["schemas"]["RrfQuery"] | components["schemas"]["FormulaQuery"] | components["schemas"]["SampleQuery"] | components["schemas"]["RelevanceFeedbackQuery"]; NearestQuery: { nearest: components["schemas"]["VectorInput"]; /** @description Perform MMR (Maximal Marginal Relevance) reranking after search, using the same vector in this query to calculate relevance. */ mmr?: components["schemas"]["Mmr"] | (Record | null); }; /** @description Maximal Marginal Relevance (MMR) algorithm for re-ranking the points. */ Mmr: { /** * Format: float * @description Tunable parameter for the MMR algorithm. Determines the balance between diversity and relevance. * * A higher value favors diversity (dissimilarity to selected results), while a lower value favors relevance (similarity to the query vector). * * Must be in the range [0, 1]. Default value is 0.5. */ diversity?: number | null; /** * Format: uint * @description The maximum number of candidates to consider for re-ranking. * * If not specified, the `limit` value is used. */ candidates_limit?: number | null; }; RecommendQuery: { recommend: components["schemas"]["RecommendInput"]; }; RecommendInput: { /** @description Look for vectors closest to the vectors from these points */positive?: (components["schemas"]["VectorInput"])[] | null; /** @description Try to avoid vectors like the vector from these points */ negative?: (components["schemas"]["VectorInput"])[] | null; /** @description How to use the provided vectors to find the results */ strategy?: components["schemas"]["RecommendStrategy"] | (Record | null); }; /** * @description How to use positive and negative examples to find the results, default is `average_vector`: * * * `average_vector` - Average positive and negative vectors and create a single query with the formula `query = avg_pos + avg_pos - avg_neg`. Then performs normal search. * * * `best_score` - Uses custom search objective. Each candidate is compared against all examples, its score is then chosen from the `max(max_pos_score, max_neg_score)`. If the `max_neg_score` is chosen then it is squared and negated, otherwise it is just the `max_pos_score`. * * * `sum_scores` - Uses custom search objective. Compares against all inputs, sums all the scores. Scores against positive vectors are added, against negatives are subtracted. * @enum {string} */ RecommendStrategy: "average_vector" | "best_score" | "sum_scores"; DiscoverQuery: { discover: components["schemas"]["DiscoverInput"]; }; DiscoverInput: { target: components["schemas"]["VectorInput"]; /** @description Search space will be constrained by these pairs of vectors */ context: components["schemas"]["ContextPair"] | (components["schemas"]["ContextPair"])[] | (Record | null); }; ContextPair: { positive: components["schemas"]["VectorInput"]; negative: components["schemas"]["VectorInput"]; }; ContextQuery: { context: components["schemas"]["ContextInput"]; }; ContextInput: components["schemas"]["ContextPair"] | (components["schemas"]["ContextPair"])[] | (Record | null); OrderByQuery: { order_by: components["schemas"]["OrderByInterface"]; }; FusionQuery: { fusion: components["schemas"]["Fusion"]; }; /** * @description Fusion algorithm allows to combine results of multiple prefetches. * * Available fusion algorithms: * * * `rrf` - Reciprocal Rank Fusion (with default parameters) * `dbsf` - Distribution-Based Score Fusion * @enum {string} */ Fusion: "rrf" | "dbsf"; RrfQuery: { rrf: components["schemas"]["Rrf"]; }; /** @description Parameters for Reciprocal Rank Fusion */ Rrf: { /** * Format: uint * @description K parameter for reciprocal rank fusion * @default null */ k?: number | null; /** @description Weights for each prefetch source. Higher weight gives more influence on the final ranking. If not specified, all prefetches are weighted equally. The number of weights should match the number of prefetches. */ weights?: (number)[] | null; }; FormulaQuery: { formula: components["schemas"]["Expression"]; /** @default {} */ defaults?: { [key: string]: unknown; }; }; Expression: number | string | components["schemas"]["Condition"] | components["schemas"]["GeoDistance"] | components["schemas"]["DatetimeExpression"] | components["schemas"]["DatetimeKeyExpression"] | components["schemas"]["MultExpression"] | components["schemas"]["SumExpression"] | components["schemas"]["NegExpression"] | components["schemas"]["AbsExpression"] | components["schemas"]["DivExpression"] | components["schemas"]["SqrtExpression"] | components["schemas"]["PowExpression"] | components["schemas"]["ExpExpression"] | components["schemas"]["Log10Expression"] | components["schemas"]["LnExpression"] | components["schemas"]["LinDecayExpression"] | components["schemas"]["ExpDecayExpression"] | components["schemas"]["GaussDecayExpression"]; GeoDistance: { geo_distance: components["schemas"]["GeoDistanceParams"]; }; GeoDistanceParams: { origin: components["schemas"]["GeoPoint"]; /** @description Payload field with the destination geo point */ to: string; }; DatetimeExpression: { datetime: string; }; DatetimeKeyExpression: { datetime_key: string; }; MultExpression: { mult: (components["schemas"]["Expression"])[]; }; SumExpression: { sum: (components["schemas"]["Expression"])[]; }; NegExpression: { neg: components["schemas"]["Expression"]; }; AbsExpression: { abs: components["schemas"]["Expression"]; }; DivExpression: { div: components["schemas"]["DivParams"]; }; DivParams: { left: components["schemas"]["Expression"]; right: components["schemas"]["Expression"]; /** Format: float */ by_zero_default?: number | null; }; SqrtExpression: { sqrt: components["schemas"]["Expression"]; }; PowExpression: { pow: components["schemas"]["PowParams"]; }; PowParams: { base: components["schemas"]["Expression"]; exponent: components["schemas"]["Expression"]; }; ExpExpression: { exp: components["schemas"]["Expression"]; }; Log10Expression: { log10: components["schemas"]["Expression"]; }; LnExpression: { ln: components["schemas"]["Expression"]; }; LinDecayExpression: { lin_decay: components["schemas"]["DecayParamsExpression"]; }; DecayParamsExpression: { x: components["schemas"]["Expression"]; /** @description The target value to start decaying from. Defaults to 0. */ target?: components["schemas"]["Expression"] | (Record | null); /** * Format: float * @description The scale factor of the decay, in terms of `x`. Defaults to 1.0. Must be a non-zero positive number. */ scale?: number | null; /** * Format: float * @description The midpoint of the decay. Should be between 0 and 1.Defaults to 0.5. Output will be this value when `|x - target| == scale`. */ midpoint?: number | null; }; ExpDecayExpression: { exp_decay: components["schemas"]["DecayParamsExpression"]; }; GaussDecayExpression: { gauss_decay: components["schemas"]["DecayParamsExpression"]; }; SampleQuery: { sample: components["schemas"]["Sample"]; }; /** @enum {string} */ Sample: "random"; RelevanceFeedbackQuery: { relevance_feedback: components["schemas"]["RelevanceFeedbackInput"]; }; RelevanceFeedbackInput: { target: components["schemas"]["VectorInput"]; feedback: (components["schemas"]["FeedbackItem"])[]; strategy: components["schemas"]["FeedbackStrategy"]; }; FeedbackItem: { example: components["schemas"]["VectorInput"]; /** Format: float */ score: number; }; FeedbackStrategy: components["schemas"]["NaiveFeedbackStrategy"]; NaiveFeedbackStrategy: { naive: components["schemas"]["NaiveFeedbackStrategyParams"]; }; NaiveFeedbackStrategyParams: { /** Format: float */a: number; /** Format: float */ b: number; /** Format: float */ c: number; }; /** @description Additional parameters of the search */ SearchParams: { /** * Format: uint * @description Params relevant to HNSW index Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search. */ hnsw_ef?: number | null; /** * @description Search without approximation. If set to true, search may run long but with exact results. * @default false */ exact?: boolean; /** @description Quantization params */ quantization?: components["schemas"]["QuantizationSearchParams"] | (Record | null); /** * @description If enabled, the engine will only perform search among indexed or small segments. Using this option prevents slow searches in case of delayed index, but does not guarantee that all uploaded vectors will be included in search results * @default false */ indexed_only?: boolean; /** @description ACORN search params */ acorn?: components["schemas"]["AcornSearchParams"] | (Record | null); /** @description Which population sparse vector IDF statistics are computed over. By default (or with explicit `"global"`) statistics are collection-wide. Only applicable to sparse vectors with the IDF modifier enabled. */ idf?: components["schemas"]["IdfParams"] | (Record | null); }; /** @description Additional parameters of the search */ QuantizationSearchParams: { /** * @description If true, quantized vectors are ignored. Default is false. * @default false */ ignore?: boolean; /** @description If true, use original vectors to re-score top-k results. Might require more time in case if original vectors are stored on disk. If not set, qdrant decides automatically apply rescoring or not. */ rescore?: boolean | null; /** * Format: double * @description Oversampling factor for quantization. Default is 1.0. * * Defines how many extra vectors should be preselected using quantized index, and then re-scored using original vectors. * * For example, if `oversampling` is 2.4 and `limit` is 100, then 240 vectors will be preselected using quantized index, and then top-100 will be returned after re-scoring. */ oversampling?: number | null; }; /** @description ACORN-related search parameters */ AcornSearchParams: { /** * @description If true, then ACORN may be used for the HNSW search based on filters selectivity. Improves search recall for searches with multiple low-selectivity payload filters, at cost of performance. * @default false */ enable?: boolean; /** * Format: double * @description Maximum selectivity of filters to enable ACORN. * * If estimated filters selectivity is higher than this value, ACORN will not be used. Selectivity is estimated as: `estimated number of points satisfying the filters / total number of points`. * * 0.0 for never, 1.0 for always. Default is 0.4. */ max_selectivity?: number | null; }; /** * @description Population over which sparse vector IDF statistics are computed for scoring — the *IDF corpus*. * * - `"global"` — collection-wide statistics, same as omitting the parameter. - `{ "corpus": }` — document count and per-term document frequencies are computed over the points matching the corpus filter only. The corpus is independent of the retrieval filter and is usually broader than it. */ IdfParams: components["schemas"]["IdfScope"] | components["schemas"]["IdfCorpusParams"]; /** * @description Named IDF scope without a corpus filter. * @enum {string} */ IdfScope: "global"; /** @description IDF statistics computed over the points matching a corpus filter. */ IdfCorpusParams: { corpus: components["schemas"]["Filter"]; }; /** @description Defines a location to use for looking up the vector. Specifies collection and vector field name. */ LookupLocation: { /** @description Name of the collection used for lookup */collection: string; /** * @description Optional name of the vector field within the collection. If not provided, the default vector field will be used. * @default null */ vector?: string | null; /** @description Specify in which shards to look for the points, if not specified - look in all shards */ shard_key?: components["schemas"]["ShardKeySelector"] | (Record | null); }; QueryRequestBatch: { searches: (components["schemas"]["QueryRequest"])[]; }; QueryResponse: { points: (components["schemas"]["ScoredPoint"])[]; }; QueryGroupsRequest: { shard_key?: components["schemas"]["ShardKeySelector"] | (Record | null); /** * @description Sub-requests to perform first. If present, the query will be performed on the results of the prefetch(es). * @default null */ prefetch?: components["schemas"]["Prefetch"] | (components["schemas"]["Prefetch"])[] | (Record | null); /** @description Query to perform. If missing without prefetches, returns points ordered by their IDs. */ query?: components["schemas"]["QueryInterface"] | (Record | null); /** @description Define which vector name to use for querying. If missing, the default vector is used. */ using?: string | null; /** @description Filter conditions - return only those points that satisfy the specified conditions. */ filter?: components["schemas"]["Filter"] | (Record | null); /** @description Search params for when there is no prefetch */ params?: components["schemas"]["SearchParams"] | (Record | null); /** * Format: float * @description Return points with scores better than this threshold. */ score_threshold?: number | null; /** @description Options for specifying which vectors to include into the response. Default is false. */ with_vector?: components["schemas"]["WithVector"] | (Record | null); /** @description Options for specifying which payload to include or not. Default is false. */ with_payload?: components["schemas"]["WithPayloadInterface"] | (Record | null); /** * @description The location to use for IDs lookup, if not specified - use the current collection and the 'using' vector Note: the other collection vectors should have the same vector size as the 'using' vector in the current collection * @default null */ lookup_from?: components["schemas"]["LookupLocation"] | (Record | null); /** @description Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups. */ group_by: string; /** * Format: uint * @description Maximum amount of points to return per group. Default is 3. */ group_size?: number | null; /** * Format: uint * @description Maximum amount of groups to return. Default is 10. */ limit?: number | null; /** @description Look for points in another collection using the group ids */ with_lookup?: components["schemas"]["WithLookupInterface"] | (Record | null); }; WithLookupInterface: string | components["schemas"]["WithLookup"]; WithLookup: { /** @description Name of the collection to use for points lookup */collection: string; /** * @description Options for specifying which payload to include (or not) * @default true */ with_payload?: components["schemas"]["WithPayloadInterface"] | (Record | null); /** * @description Options for specifying which vectors to include (or not) * @default null */ with_vectors?: components["schemas"]["WithVector"] | (Record | null); }; SearchMatrixRequest: { /** @description Specify in which shards to look for the points, if not specified - look in all shards */shard_key?: components["schemas"]["ShardKeySelector"] | (Record | null); /** @description Look only for points which satisfies this conditions */ filter?: components["schemas"]["Filter"] | (Record | null); /** * Format: uint * @description How many points to select and search within. Default is 10. */ sample?: number | null; /** * Format: uint * @description How many neighbours per sample to find. Default is 3. */ limit?: number | null; /** @description Define which vector name to use for querying. If missing, the default vector is used. */ using?: string | null; }; SearchMatrixOffsetsResponse: { /** @description Row indices of the matrix */offsets_row: (number)[]; /** @description Column indices of the matrix */ offsets_col: (number)[]; /** @description Scores associated with matrix coordinates */ scores: (number)[]; /** @description Ids of the points in order */ ids: (components["schemas"]["ExtendedPointId"])[]; }; SearchMatrixPairsResponse: { /** @description List of pairs of points with scores */pairs: (components["schemas"]["SearchMatrixPair"])[]; }; /** @description Pair of points (a, b) with score */ SearchMatrixPair: { a: components["schemas"]["ExtendedPointId"]; b: components["schemas"]["ExtendedPointId"]; /** Format: float */ score: number; }; FacetRequest: { shard_key?: components["schemas"]["ShardKeySelector"] | (Record | null); /** @description Payload key to use for faceting. */ key: string; /** * Format: uint * @description Max number of hits to return. Default is 10. */ limit?: number | null; /** @description Filter conditions - only consider points that satisfy these conditions. */ filter?: components["schemas"]["Filter"] | (Record | null); /** @description Whether to do a more expensive exact count for each of the values in the facet. Default is false. */ exact?: boolean | null; }; FacetResponse: { hits: (components["schemas"]["FacetValueHit"])[]; }; FacetValueHit: { value: components["schemas"]["FacetValue"]; /** Format: uint */ count: number; }; FacetValue: string | number | boolean; /** @description Usage of the hardware resources, spent to process the request */ Usage: { hardware?: components["schemas"]["HardwareUsage"] | (Record | null); inference?: components["schemas"]["InferenceUsage"] | (Record | null); }; InferenceUsage: { models: { [key: string]: components["schemas"]["ModelUsage"] | undefined; }; }; ModelUsage: { /** Format: uint64 */tokens: number; }; ShardKeysResponse: { /** @description The existing shard keys. Only available when sharding method is `custom` */shard_keys?: (components["schemas"]["ShardKeyDescription"])[] | null; }; ShardKeyDescription: { key: components["schemas"]["ShardKey"]; }; /** @description Optimizations progress for the collection */ OptimizationsResponse: { summary: components["schemas"]["OptimizationsSummary"]; /** @description Currently running optimizations. */ running: (components["schemas"]["Optimization"])[]; /** @description An estimated queue of pending optimizations. Requires `?with=queued`. */ queued?: (components["schemas"]["PendingOptimization"])[] | null; /** @description Completed optimizations. Requires `?with=completed`. Limited by `?completed_limit=N`. */ completed?: (components["schemas"]["Optimization"])[] | null; /** @description Segments that don't require optimization. Requires `?with=idle_segments`. */ idle_segments?: (components["schemas"]["OptimizationSegmentInfo"])[] | null; }; OptimizationsSummary: { /** * Format: uint * @description Number of pending optimizations in the queue. Each optimization will take one or more unoptimized segments and produce one optimized segment. */ queued_optimizations: number; /** * Format: uint * @description Number of unoptimized segments in the queue. */ queued_segments: number; /** * Format: uint * @description Number of points in unoptimized segments in the queue. */ queued_points: number; /** * Format: uint * @description Number of segments that don't require optimization. */ idle_segments: number; }; Optimization: { /** * Format: uuid * @description Unique identifier of the optimization process. * * After the optimization is complete, a new segment will be created with this UUID. */ uuid: string; /** @description Name of the optimizer that performed this optimization. */ optimizer: string; status: components["schemas"]["TrackerStatus"]; /** * @description Segments being optimized. * * After the optimization is complete, these segments will be replaced by the new optimized segment. */ segments: (components["schemas"]["OptimizationSegmentInfo"])[]; progress: components["schemas"]["ProgressTree"]; }; OptimizationSegmentInfo: { /** * Format: uuid * @description Unique identifier of the segment. */ uuid: string; /** * Format: uint * @description Number of non-deleted points in the segment. */ points_count: number; }; ProgressTree: { /** @description Name of the operation. */name: string; /** * Format: date-time * @description When the operation started. */ started_at?: string | null; /** * Format: date-time * @description When the operation finished. */ finished_at?: string | null; /** * Format: double * @description For finished operations, how long they took, in seconds. */ duration_sec?: number | null; /** * Format: uint64 * @description Number of completed units of work, if applicable. */ done?: number | null; /** * Format: uint64 * @description Total number of units of work, if applicable and known. */ total?: number | null; /** @description Child operations. */ children?: (components["schemas"]["ProgressTree"])[]; }; PendingOptimization: { /** @description Name of the optimizer that scheduled this optimization. */optimizer: string; /** @description Segments that will be optimized. */ segments: (components["schemas"]["OptimizationSegmentInfo"])[]; }; DistributedTelemetryData: { collections: { [key: string]: components["schemas"]["DistributedCollectionTelemetry"] | undefined; }; cluster?: components["schemas"]["DistributedClusterTelemetry"] | (Record | null); }; DistributedCollectionTelemetry: { /** @description Collection name */id: string; /** @description Shards topology */ shards?: (components["schemas"]["DistributedShardTelemetry"])[] | null; /** @description Ongoing resharding operations */ reshardings?: (components["schemas"]["ReshardingInfo"])[] | null; /** @description Ongoing shard transfers */ shard_transfers?: (components["schemas"]["ShardTransferInfo"])[] | null; }; DistributedShardTelemetry: { /** * Format: uint32 * @description Shard ID */ id: number; /** @description Optional shard key */ key?: components["schemas"]["ShardKey"] | (Record | null); /** @description Replica information */ replicas: (components["schemas"]["DistributedReplicaTelemetry"])[]; }; DistributedReplicaTelemetry: { /** * Format: uint64 * @description Peer ID hosting this replica */ peer_id: number; state: components["schemas"]["ReplicaState"]; /** @description Shard status */ status?: components["schemas"]["ShardStatus"] | (Record | null); /** * Format: uint * @description Total optimized points */ total_optimized_points?: number | null; /** * Format: uint * @description Estimated vectors size in bytes */ vectors_size_bytes?: number | null; /** * Format: uint * @description Estimated payloads size in bytes */ payloads_size_bytes?: number | null; /** * Format: uint * @description Approximate number of points */ num_points?: number | null; /** * Format: uint * @description Approximate number of vectors */ num_vectors?: number | null; /** @description Approximate number of vectors by name */ num_vectors_by_name?: ({ [key: string]: number | undefined; }) | null; /** @description Shard cleaning task status. After a resharding, a cleanup task is performed to remove outdated points from this shard. */ shard_cleaning_status?: components["schemas"]["ShardCleanStatusTelemetry"] | (Record | null); /** @description Partial snapshot telemetry */ partial_snapshot?: components["schemas"]["PartialSnapshotTelemetry"] | (Record | null); }; DistributedClusterTelemetry: { enabled: boolean; /** Format: uint64 */ number_of_peers?: number | null; peers: { [key: string]: components["schemas"]["DistributedPeerInfo"] | undefined; }; }; DistributedPeerInfo: { /** @description URI of the peer */uri: string; /** @description Whether this peer responded for this request */ responsive: boolean; /** @description If responsive, these details should be available */ details?: components["schemas"]["DistributedPeerDetails"] | (Record | null); }; DistributedPeerDetails: { /** @description Qdrant version */version: string; /** @description Consensus role for the peer */ role?: components["schemas"]["StateRole"] | (Record | null); /** @description Whether it can participate in leader elections */ is_voter: boolean; /** * Format: uint64 * @description Election term */ term: number; /** * Format: uint64 * @description Latest accepted commit */ commit: number; /** * Format: uint64 * @description Number of operations pending for being applied */ num_pending_operations: number; consensus_thread_status: components["schemas"]["ConsensusThreadStatus"]; }; /** * @description Configuration for creating a new named vector. * * Contains only the immutable properties that define a vector space. Storage type, index, and quantization are determined automatically based on the segment type and can be configured separately later. * * Example JSON for a dense vector: ```json { "dense": { "size": 768, "distance": "Cosine" } } ``` * * Example JSON for a sparse vector: ```json { "sparse": { "modifier": "Idf" } } ``` */ VectorNameConfig: components["schemas"]["DenseVectorNameConfig"] | components["schemas"]["SparseVectorNameConfig"]; /** @description Wrapper for dense vector creation config. */ DenseVectorNameConfig: { dense: components["schemas"]["DenseVectorConfig"]; }; /** * @description Configuration for creating a new dense named vector. * * Only includes properties that define the vector space and cannot be changed after creation. Storage type, index type, and quantization are inferred. */ DenseVectorConfig: { /** * Format: uint * @description Dimensionality of the vectors */ size: number; distance: components["schemas"]["Distance"]; /** @description Configuration for multi-vector points (e.g., ColBERT) */ multivector_config?: components["schemas"]["MultiVectorConfig"] | (Record | null); /** @description Element storage type (Float32, Float16, Uint8, Turbo4) */ datatype?: components["schemas"]["VectorStorageDatatype"] | (Record | null); }; /** @description Wrapper for sparse vector creation config. */ SparseVectorNameConfig: { sparse: components["schemas"]["SparseVectorConfig"]; }; /** * @description Configuration for creating a new sparse named vector. * * Only includes properties that define the vector space and cannot be changed after creation. */ SparseVectorConfig: { /** @description Value modifier for sparse vectors (e.g., IDF) */modifier?: components["schemas"]["Modifier"] | (Record | null); /** @description Datatype used to store weights in the index */ datatype?: components["schemas"]["VectorStorageDatatype"] | (Record | null); }; /** * @description Quota configuration in effect, and how close each peer is to it. * * The configuration is cluster-wide; the utilization is not. `usage` is the node that served the request, and `peers` is what every peer that answered reports about itself — memory and disk are node-local, so one peer being under its limit says nothing about the others. */ QuotaStatus: { config: components["schemas"]["QuotaConfig"]; usage: components["schemas"]["QuotaUsage"]; /** * @description Utilization reported by each peer, keyed by peer ID, including the one that served the request. * * Only peers that answered are listed: a peer missing from the map could not be reached, which is itself worth seeing. Absent entirely outside distributed mode, where there are no peers to ask. */ peers?: ({ [key: string]: components["schemas"]["PeerQuotaUsage"] | undefined; }) | null; }; /** * @description Utilization of the quota-managed resources **on this node alone** — memory and disk are node-local, so a peer under its limit says nothing about the rest of the cluster. * * A field is `null` when the platform does not expose the underlying stat. */ QuotaUsage: { /** * Format: uint8 * @description Resident memory of this node's process, as a percentage of the memory available to it (cgroup limit if one applies, else total system memory). */ resident_memory_percent?: number | null; /** * Format: uint8 * @description Used space of this node's storage filesystem, as a percentage of its capacity. */ disk_usage_percent?: number | null; }; /** @description What one peer reports about the quota it is enforcing. */ PeerQuotaUsage: { /** @description Whether this peer is at or over one of the enforced limits, and so is currently refusing updates. Always false while the quota is disabled. */exceeded: boolean; /** * Format: uint8 * @description Resident memory of this node's process, as a percentage of the memory available to it (cgroup limit if one applies, else total system memory). */ resident_memory_percent?: number | null; /** * Format: uint8 * @description Used space of this node's storage filesystem, as a percentage of its capacity. */ disk_usage_percent?: number | null; }; }; responses: never; parameters: never; requestBodies: never; headers: never; pathItems: never; } //#endregion //#region ../../node_modules/.pnpm/@qdrant+js-client-rest@1.19.0_typescript@6.0.3/node_modules/@qdrant/js-client-rest/dist/types/types.d.ts type Schemas = components['schemas']; //#endregion //#region ../../node_modules/.pnpm/@qdrant+openapi-typescript-fetch@1.2.6/node_modules/@qdrant/openapi-typescript-fetch/dist/types.d.ts declare type JSONBody = { content: { 'application/json': T; }; } | { content: { [K in `application/json;${string}`]: T }; }; declare type OpArgType = OP extends { parameters?: { path?: infer P; query?: infer Q; body?: infer B; header?: unknown; cookie?: unknown; }; requestBody?: { content: { 'application/json': infer RB; } | { [K in `application/json;${string}`]: infer RB } | { 'multipart/form-data': infer FD; }; }; } ? FD extends Record ? FormData : P & Q & (B extends Record ? B[keyof B] : unknown) & RB : Record; declare type OpResponseTypes = OP extends { responses: infer R; } ? { [S in keyof R]: R[S] extends { schema?: infer S; } ? S : R[S] extends JSONBody ? C : S extends 'default' ? R[S] : unknown } : never; declare type _OpReturnType = 200 extends keyof T ? T[200] : 201 extends keyof T ? T[201] : 202 extends keyof T ? T[202] : 'default' extends keyof T ? T['default'] : unknown; declare type OpReturnType = _OpReturnType>; declare const never: unique symbol; declare type _OpErrorType = { [S in Exclude]: { status: S extends 'default' ? typeof never : S; data: T[S]; } }[Exclude]; declare type Coalesce = [T] extends [never] ? D : T; declare type OpErrorType = Coalesce<_OpErrorType>, { status: number; data: any; }>; declare type _TypedFetch = (arg: OpArgType, init?: RequestInit) => Promise>>; declare type TypedFetch = _TypedFetch & { Error: new (error: ApiError) => ApiError & { getActualType: () => OpErrorType; }; }; declare type ApiResponse = { readonly headers: Headers; readonly url: string; readonly ok: boolean; readonly status: number; readonly statusText: string; readonly data: R; }; declare class ApiError extends Error { readonly headers: Headers; readonly url: string; readonly status: number; readonly statusText: string; readonly data: any; constructor(response: Omit); } //#endregion //#region ../../node_modules/.pnpm/@qdrant+openapi-typescript-fetch@1.2.6/node_modules/@qdrant/openapi-typescript-fetch/dist/fetcher.d.ts declare global { interface JSON { rawJSON?(jsonStr: string): { rawJSON: string; }; } } //#endregion //#region ../../node_modules/.pnpm/@qdrant+js-client-rest@1.19.0_typescript@6.0.3/node_modules/@qdrant/js-client-rest/dist/types/openapi/generated_client_type.d.ts type ClientApi = { /** List shard keys */listShardKeys: TypedFetch<{ parameters: { path: { collection_name: string; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["ShardKeysResponse"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** Create shard key */ createShardKey: TypedFetch<{ parameters: { query?: { timeout?: number; }; path: { collection_name: string; }; }; requestBody?: { content: { "application/json": components["schemas"]["CreateShardingKey"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: boolean; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** Delete shard key */ deleteShardKey: TypedFetch<{ parameters: { query?: { timeout?: number; }; path: { collection_name: string; }; }; requestBody?: { content: { "application/json": components["schemas"]["DropShardingKey"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: boolean; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Returns information about the running Qdrant instance * @description Returns information about the running Qdrant instance like version and commit id */ root: TypedFetch<{ responses: { 200: { content: { "application/json": components["schemas"]["VersionInfo"]; }; }; "4XX": never; }; }>; /** * Collect telemetry data * @description Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics */ telemetry: TypedFetch<{ parameters: { query?: { anonymize?: boolean; details_level?: number; per_collection?: boolean; timeout?: number; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["TelemetryData"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Collect Prometheus metrics data * @description Collect metrics data including app info, collections info, cluster info and statistics */ metrics: TypedFetch<{ parameters: { query?: { anonymize?: boolean; per_collection?: boolean; timeout?: number; }; }; responses: { 200: { content: { "text/plain": string; }; }; "4XX": never; }; }>; /** * Kubernetes healthz endpoint * @description Liveness-style health check. Returns 200 as soon as the HTTP API is serving requests. It does not inspect collections, shards or consensus state, and is identical to `/livez`. Use it only to detect whether the process is up and responsive. */ healthz: TypedFetch<{ responses: { 200: { content: { "text/plain": string; }; }; "4XX": never; }; }>; /** * Kubernetes livez endpoint * @description Kubernetes liveness probe. Returns 200 as soon as the HTTP API is serving requests. It does not inspect collections, shards or consensus state, and is identical to `/healthz`. A failure indicates the process is unresponsive and should be restarted. */ livez: TypedFetch<{ responses: { 200: { content: { "text/plain": string; }; }; "4XX": never; }; }>; /** * Kubernetes readyz endpoint * @description Kubernetes readiness probe. Checks the instance and waits out pending data operations to see when it can start accepting traffic. In a distributed deployment it returns 200 only once the node has caught up with the cluster consensus commit and its local shards are healthy; otherwise it returns 503. In a single-node deployment it always returns 200 once the API is up. Use it to decide when to route traffic to the instance. */ readyz: TypedFetch<{ responses: { 200: { content: { "text/plain": string; }; }; 503: { content: { "text/plain": string; }; }; "4XX": never; }; }>; /** * Get issues * @description Get a report of performance issues and configuration suggestions */ getIssues: TypedFetch<{ responses: { 200: { content: { "application/json": Record; }; }; "4XX": never; }; }>; /** * Clear issues * @description Removes all issues reported so far */ clearIssues: TypedFetch<{ responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: boolean; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Get cluster status info * @description Get information about the current state and composition of the cluster */ clusterStatus: TypedFetch<{ responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["ClusterStatus"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Collect cluster telemetry data * @description Get telemetry data, from the point of view of the cluster. This includes peers info, collections info, shard transfers, and resharding status */ clusterTelemetry: TypedFetch<{ parameters: { query?: { details_level?: number; timeout?: number; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["DistributedTelemetryData"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** Tries to recover current peer Raft state. */ recoverCurrentPeer: TypedFetch<{ responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: boolean; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Remove peer from the cluster * @description Tries to remove peer from the cluster. Will return an error if peer has shards on it. */ removePeer: TypedFetch<{ parameters: { query?: { timeout?: number; force?: boolean; }; path: { peer_id: number; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: boolean; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Get global quotas * @description Get the cluster-wide resource quota configuration, together with the current utilization it is measured against. * The configuration is the same on every peer, but the reported utilization is for the node serving this request only - * memory and disk are node-local, so query each peer to see where the whole cluster stands. */ getQuotas: TypedFetch<{ responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["QuotaStatus"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Set global quotas * @description Replace the cluster-wide resource quota configuration. The new configuration is propagated to every peer through consensus and persisted, so it survives restarts */ updateQuotas: TypedFetch<{ parameters: { query?: { wait?: boolean; }; }; requestBody?: { content: { "application/json": components["schemas"]["QuotaConfig"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: boolean; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * List collections * @description Get list name of all existing collections */ getCollections: TypedFetch<{ responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["CollectionsResponse"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Collection info * @description Get detailed information about specified existing collection */ getCollection: TypedFetch<{ parameters: { path: { collection_name: string; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["CollectionInfo"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Create collection * @description Create new collection with given parameters */ createCollection: TypedFetch<{ parameters: { query?: { timeout?: number; }; path: { collection_name: string; }; }; requestBody?: { content: { "application/json": components["schemas"]["CreateCollection"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: boolean; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Delete collection * @description Drop collection and all associated data */ deleteCollection: TypedFetch<{ parameters: { query?: { timeout?: number; }; path: { collection_name: string; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: boolean; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Update collection parameters * @description Update parameters of the existing collection */ updateCollection: TypedFetch<{ parameters: { query?: { timeout?: number; }; path: { collection_name: string; }; }; requestBody?: { content: { "application/json": components["schemas"]["UpdateCollection"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: boolean; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** Update aliases of the collections */ updateAliases: TypedFetch<{ parameters: { query?: { timeout?: number; }; }; requestBody?: { content: { "application/json": components["schemas"]["ChangeAliasesOperation"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: boolean; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Create index for field in collection * @description Create index for field in collection */ createFieldIndex: TypedFetch<{ parameters: { query?: { wait?: boolean; ordering?: components["schemas"]["WriteOrdering"]; timeout?: number; }; path: { collection_name: string; }; }; requestBody?: { content: { "application/json": components["schemas"]["CreateFieldIndex"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["UpdateResult"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Check the existence of a collection * @description Returns "true" if the given collection name exists, and "false" otherwise */ collectionExists: TypedFetch<{ parameters: { path: { collection_name: string; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["CollectionExistence"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Delete index for field in collection * @description Delete field index for collection */ deleteFieldIndex: TypedFetch<{ parameters: { query?: { wait?: boolean; ordering?: components["schemas"]["WriteOrdering"]; timeout?: number; }; path: { collection_name: string; field_name: string; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["UpdateResult"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Create named vector * @description Create a new named vector on an existing collection */ createVectorName: TypedFetch<{ parameters: { query?: { wait?: boolean; ordering?: components["schemas"]["WriteOrdering"]; timeout?: number; }; path: { collection_name: string; vector_name: string; }; }; requestBody?: { content: { "application/json": components["schemas"]["VectorNameConfig"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["UpdateResult"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Delete named vector * @description Delete a named vector from a collection */ deleteVectorName: TypedFetch<{ parameters: { query?: { wait?: boolean; ordering?: components["schemas"]["WriteOrdering"]; timeout?: number; }; path: { collection_name: string; vector_name: string; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["UpdateResult"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Collection cluster info * @description Get cluster information for a collection */ collectionClusterInfo: TypedFetch<{ parameters: { path: { collection_name: string; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["CollectionClusterInfo"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** Update collection cluster setup */ updateCollectionCluster: TypedFetch<{ parameters: { query?: { timeout?: number; }; path: { collection_name: string; }; }; requestBody?: { content: { "application/json": components["schemas"]["ClusterOperations"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: boolean; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Get optimization progress * @description Get progress of ongoing and completed optimizations for a collection */ getOptimizations: TypedFetch<{ parameters: { query?: { with?: string; completed_limit?: number; }; path: { collection_name: string; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["OptimizationsResponse"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * List aliases for collection * @description Get list of all aliases for a collection */ getCollectionAliases: TypedFetch<{ parameters: { path: { collection_name: string; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["CollectionsAliasesResponse"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * List collections aliases * @description Get list of all existing collections aliases */ getCollectionsAliases: TypedFetch<{ responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["CollectionsAliasesResponse"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Recover from an uploaded snapshot * @description Recover local collection data from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created. */ recoverFromUploadedSnapshot: TypedFetch<{ parameters: { query?: { wait?: boolean; priority?: components["schemas"]["SnapshotPriority"]; checksum?: string; }; path: { collection_name: string; }; }; requestBody?: { content: { "multipart/form-data": { snapshot?: string; }; }; }; responses: { 200: { content: { "application/json": { time?: number; status?: string; result?: boolean; }; }; }; 202: { content: { "application/json": { time?: number; status?: string; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Recover from a snapshot * @description Recover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created. */ recoverFromSnapshot: TypedFetch<{ parameters: { query?: { wait?: boolean; }; path: { collection_name: string; }; }; requestBody?: { content: { "application/json": components["schemas"]["SnapshotRecover"]; }; }; responses: { 200: { content: { "application/json": { time?: number; status?: string; result?: boolean; }; }; }; 202: { content: { "application/json": { time?: number; status?: string; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * List collection snapshots * @description Get list of snapshots for a collection */ listSnapshots: TypedFetch<{ parameters: { path: { collection_name: string; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: (components["schemas"]["SnapshotDescription"])[]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Create collection snapshot * @description Create new snapshot for a collection */ createSnapshot: TypedFetch<{ parameters: { query?: { wait?: boolean; }; path: { collection_name: string; }; }; responses: { 200: { content: { "application/json": { time?: number; status?: string; result?: components["schemas"]["SnapshotDescription"]; }; }; }; 202: { content: { "application/json": { time?: number; status?: string; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Download collection snapshot * @description Download specified snapshot from a collection as a file */ getSnapshot: TypedFetch<{ parameters: { path: { collection_name: string; snapshot_name: string; }; }; responses: { 200: { content: { "application/octet-stream": string; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Delete collection snapshot * @description Delete snapshot for a collection */ deleteSnapshot: TypedFetch<{ parameters: { query?: { wait?: boolean; }; path: { collection_name: string; snapshot_name: string; }; }; responses: { 200: { content: { "application/json": { time?: number; status?: string; result?: boolean; }; }; }; 202: { content: { "application/json": { time?: number; status?: string; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * List of storage snapshots * @description Get list of snapshots of the whole storage */ listFullSnapshots: TypedFetch<{ responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: (components["schemas"]["SnapshotDescription"])[]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Create storage snapshot * @description Create new snapshot of the whole storage */ createFullSnapshot: TypedFetch<{ parameters: { query?: { wait?: boolean; }; }; responses: { 200: { content: { "application/json": { time?: number; status?: string; result?: components["schemas"]["SnapshotDescription"]; }; }; }; 202: { content: { "application/json": { time?: number; status?: string; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Download storage snapshot * @description Download specified snapshot of the whole storage as a file */ getFullSnapshot: TypedFetch<{ parameters: { path: { snapshot_name: string; }; }; responses: { 200: { content: { "application/octet-stream": string; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Delete storage snapshot * @description Delete snapshot of the whole storage */ deleteFullSnapshot: TypedFetch<{ parameters: { query?: { wait?: boolean; }; path: { snapshot_name: string; }; }; responses: { 200: { content: { "application/json": { time?: number; status?: string; result?: boolean; }; }; }; 202: { content: { "application/json": { time?: number; status?: string; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Download shard snapshot * @description Stream the current state of a shard as a snapshot file */ streamShardSnapshot: TypedFetch<{ parameters: { path: { collection_name: string; shard_id: number; }; }; responses: { 200: { content: { "application/octet-stream": string; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Recover shard from an uploaded snapshot * @description Recover shard of a local collection from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection shard. */ recoverShardFromUploadedSnapshot: TypedFetch<{ parameters: { query?: { wait?: boolean; priority?: components["schemas"]["SnapshotPriority"]; checksum?: string; }; path: { collection_name: string; shard_id: number; }; }; requestBody?: { content: { "multipart/form-data": { snapshot?: string; }; }; }; responses: { 200: { content: { "application/json": { time?: number; status?: string; result?: boolean; }; }; }; 202: { content: { "application/json": { time?: number; status?: string; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Recover from a snapshot * @description Recover shard of a local collection data from a snapshot. This will overwrite any data, stored in this shard, for the collection. */ recoverShardFromSnapshot: TypedFetch<{ parameters: { query?: { wait?: boolean; }; path: { collection_name: string; shard_id: number; }; }; requestBody?: { content: { "application/json": components["schemas"]["ShardSnapshotRecover"]; }; }; responses: { 200: { content: { "application/json": { time?: number; status?: string; result?: boolean; }; }; }; 202: { content: { "application/json": { time?: number; status?: string; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * List shards snapshots for a collection * @description Get list of snapshots for a shard of a collection */ listShardSnapshots: TypedFetch<{ parameters: { path: { collection_name: string; shard_id: number; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: (components["schemas"]["SnapshotDescription"])[]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Create shard snapshot * @description Create new snapshot of a shard for a collection */ createShardSnapshot: TypedFetch<{ parameters: { query?: { wait?: boolean; }; path: { collection_name: string; shard_id: number; }; }; responses: { 200: { content: { "application/json": { time?: number; status?: string; result?: components["schemas"]["SnapshotDescription"]; }; }; }; 202: { content: { "application/json": { time?: number; status?: string; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Download collection snapshot * @description Download specified snapshot of a shard from a collection as a file */ getShardSnapshot: TypedFetch<{ parameters: { path: { collection_name: string; shard_id: number; snapshot_name: string; }; }; responses: { 200: { content: { "application/octet-stream": string; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Delete shard snapshot * @description Delete snapshot of a shard for a collection */ deleteShardSnapshot: TypedFetch<{ parameters: { query?: { wait?: boolean; }; path: { collection_name: string; shard_id: number; snapshot_name: string; }; }; responses: { 200: { content: { "application/json": { time?: number; status?: string; result?: boolean; }; }; }; 202: { content: { "application/json": { time?: number; status?: string; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Get point * @description Retrieve full information of single point by id */ getPoint: TypedFetch<{ parameters: { query?: { consistency?: components["schemas"]["ReadConsistency"]; }; path: { collection_name: string; id: components["schemas"]["ExtendedPointId"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["Record"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Upsert points * @description Perform insert + updates on points. If point with given ID already exists - it will be overwritten. */ upsertPoints: TypedFetch<{ parameters: { query?: { wait?: boolean; ordering?: components["schemas"]["WriteOrdering"]; timeout?: number; }; path: { collection_name: string; }; }; requestBody?: { content: { "application/json": components["schemas"]["PointInsertOperations"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["UpdateResult"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Get points * @description Retrieve multiple points by specified IDs */ getPoints: TypedFetch<{ parameters: { query?: { consistency?: components["schemas"]["ReadConsistency"]; timeout?: number; }; path: { collection_name: string; }; }; requestBody?: { content: { "application/json": components["schemas"]["PointRequest"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: (components["schemas"]["Record"])[]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Delete points * @description Delete points */ deletePoints: TypedFetch<{ parameters: { query?: { wait?: boolean; ordering?: components["schemas"]["WriteOrdering"]; timeout?: number; }; path: { collection_name: string; }; }; requestBody?: { content: { "application/json": components["schemas"]["PointsSelector"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["UpdateResult"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Update vectors * @description Update specified named vectors on points, keep unspecified vectors intact. */ updateVectors: TypedFetch<{ parameters: { query?: { wait?: boolean; ordering?: components["schemas"]["WriteOrdering"]; timeout?: number; }; path: { collection_name: string; }; }; requestBody?: { content: { "application/json": components["schemas"]["UpdateVectors"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["UpdateResult"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Delete vectors * @description Delete named vectors from the given points. */ deleteVectors: TypedFetch<{ parameters: { query?: { wait?: boolean; ordering?: components["schemas"]["WriteOrdering"]; timeout?: number; }; path: { collection_name: string; }; }; requestBody?: { content: { "application/json": components["schemas"]["DeleteVectors"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["UpdateResult"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Overwrite payload * @description Replace full payload of points with new one */ overwritePayload: TypedFetch<{ parameters: { query?: { wait?: boolean; ordering?: components["schemas"]["WriteOrdering"]; timeout?: number; }; path: { collection_name: string; }; }; requestBody?: { content: { "application/json": components["schemas"]["SetPayload"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["UpdateResult"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Set payload * @description Set payload values for points */ setPayload: TypedFetch<{ parameters: { query?: { wait?: boolean; ordering?: components["schemas"]["WriteOrdering"]; timeout?: number; }; path: { collection_name: string; }; }; requestBody?: { content: { "application/json": components["schemas"]["SetPayload"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["UpdateResult"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Delete payload * @description Delete specified key payload for points */ deletePayload: TypedFetch<{ parameters: { query?: { wait?: boolean; ordering?: components["schemas"]["WriteOrdering"]; timeout?: number; }; path: { collection_name: string; }; }; requestBody?: { content: { "application/json": components["schemas"]["DeletePayload"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["UpdateResult"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Clear payload * @description Remove all payload for specified points */ clearPayload: TypedFetch<{ parameters: { query?: { wait?: boolean; ordering?: components["schemas"]["WriteOrdering"]; timeout?: number; }; path: { collection_name: string; }; }; requestBody?: { content: { "application/json": components["schemas"]["PointsSelector"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["UpdateResult"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Batch update points * @description Apply a series of update operations for points, vectors and payloads */ batchUpdate: TypedFetch<{ parameters: { query?: { wait?: boolean; ordering?: components["schemas"]["WriteOrdering"]; timeout?: number; }; path: { collection_name: string; }; }; requestBody?: { content: { "application/json": components["schemas"]["UpdateOperations"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: (components["schemas"]["UpdateResult"])[]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Scroll points * @description Scroll request - paginate over all points which matches given filtering condition */ scrollPoints: TypedFetch<{ parameters: { query?: { consistency?: components["schemas"]["ReadConsistency"]; timeout?: number; }; path: { collection_name: string; }; }; requestBody?: { content: { "application/json": components["schemas"]["ScrollRequest"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["ScrollResult"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Count points * @description Count points which matches given filtering condition */ countPoints: TypedFetch<{ parameters: { query?: { consistency?: components["schemas"]["ReadConsistency"]; timeout?: number; }; path: { collection_name: string; }; }; requestBody?: { content: { "application/json": components["schemas"]["CountRequest"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["CountResult"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Facet a payload key with a given filter. * @description Count points that satisfy the given filter for each unique value of a payload key. */ facet: TypedFetch<{ parameters: { query?: { consistency?: components["schemas"]["ReadConsistency"]; timeout?: number; }; path: { collection_name: string; }; }; requestBody?: { content: { "application/json": components["schemas"]["FacetRequest"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["FacetResponse"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Query points * @description Universally query points. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries. */ queryPoints: TypedFetch<{ parameters: { query?: { consistency?: components["schemas"]["ReadConsistency"]; timeout?: number; }; path: { collection_name: string; }; }; requestBody?: { content: { "application/json": components["schemas"]["QueryRequest"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["QueryResponse"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Query points in batch * @description Universally query points in batch. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries. */ queryBatchPoints: TypedFetch<{ parameters: { query?: { consistency?: components["schemas"]["ReadConsistency"]; timeout?: number; }; path: { collection_name: string; }; }; requestBody?: { content: { "application/json": components["schemas"]["QueryRequestBatch"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: (components["schemas"]["QueryResponse"])[]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Query points, grouped by a given payload field * @description Universally query points, grouped by a given payload field */ queryPointsGroups: TypedFetch<{ parameters: { query?: { consistency?: components["schemas"]["ReadConsistency"]; timeout?: number; }; path: { collection_name: string; }; }; requestBody?: { content: { "application/json": components["schemas"]["QueryGroupsRequest"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["GroupsResult"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Search points matrix distance pairs * @description Compute distance matrix for sampled points with a pair based output format */ searchMatrixPairs: TypedFetch<{ parameters: { query?: { consistency?: components["schemas"]["ReadConsistency"]; timeout?: number; }; path: { collection_name: string; }; }; requestBody?: { content: { "application/json": components["schemas"]["SearchMatrixRequest"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["SearchMatrixPairsResponse"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; /** * Search points matrix distance offsets * @description Compute distance matrix for sampled points with an offset based output format */ searchMatrixOffsets: TypedFetch<{ parameters: { query?: { consistency?: components["schemas"]["ReadConsistency"]; timeout?: number; }; path: { collection_name: string; }; }; requestBody?: { content: { "application/json": components["schemas"]["SearchMatrixRequest"]; }; }; responses: { 200: { content: { "application/json": { usage?: components["schemas"]["Usage"] | (Record | null); time?: number; status?: string; result?: components["schemas"]["SearchMatrixOffsetsResponse"]; }; }; }; default: { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; "4XX": { content: { "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }>; }; //#endregion //#region ../../node_modules/.pnpm/@qdrant+js-client-rest@1.19.0_typescript@6.0.3/node_modules/@qdrant/js-client-rest/dist/types/qdrant-client.d.ts type QdrantClientParams = { port?: number | null; apiKey?: string; https?: boolean; prefix?: string; url?: string; host?: string; /** * Local timeout for requests (uses fetch's AbortSignal) - Default 300 seconds */ timeout?: number; /** * Additional HTTP Headers to send. */ headers?: Record; /** * The Node.js fetch API (undici) uses HTTP/1.1 under the hood. * This indicates the maximum number of keep-alive connections * to open simultaneously while building a request pool in memory. */ maxConnections?: number; /** * Check compatibility with the server version. Default: `true` */ checkCompatibility?: boolean; }; declare class QdrantClient { private _https; private _scheme; private _port; private _prefix; private _host; private _restUri; private _openApiClient; constructor({ url, host, apiKey, https, prefix, port, timeout, checkCompatibility, ...args }?: QdrantClientParams); /** * API getter * * @returns An instance of an API, generated from OpenAPI schema. */ api(): ClientApi; /** * Scroll over all (matching) points in the collection. * @param collection_name Name of the collection * @param {object} args * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards * - filter: If provided - only returns points matching filtering conditions * - limit: How many points to return * - offset: If provided - skip points with ids less than given `offset` * - with_payload: * - Specify which stored payload should be attached to the result. * - If `True` - attach all payload * - If `False` - do not attach any payload * - If List of string - include only specified fields * - If `PayloadSelector` - use explicit rules * - Default: `true` * - with_vector: * - If `True` - Attach stored vector to the search result. * - If `False` - Do not attach vector. * - If List of string - include only specified fields * - Default: `false` * - consistency: * Read consistency of the search. Defines how many replicas should be queried before returning the result. * Values: * - int - number of replicas to query, values should present in all queried replicas * - 'majority' - query all replicas, but return values present in the majority of replicas * - 'quorum' - query the majority of replicas, return values present in all of them * - 'all' - query all replicas, and return values present in all replicas * - order_by: * Order the records by a payload field. * @returns * A pair of (List of points) and (optional offset for the next scroll request). * If next page offset is `None` - there is no more points in the collection to scroll. */ scroll(collection_name: string, { shard_key, filter, consistency, timeout, limit, offset, with_payload, with_vector, order_by }?: Schemas['ScrollRequest'] & { timeout?: number; } & { consistency?: Schemas['ReadConsistency']; }): Promise; /** * Count points in the collection. * Count points in the collection matching the given filter. * @param collection_name * @param {object} args * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards * - filter: filtering conditions * - exact: * If `True` - provide the exact count of points matching the filter. * If `False` - provide the approximate count of points matching the filter. Works faster. * Default: `true` * @returns Amount of points in the collection matching the filter. */ count(collection_name: string, { shard_key, filter, exact, timeout }?: Schemas['CountRequest'] & { timeout?: number; }): Promise; /** * Get cluster information for a collection. * @param collection_name * @returns Operation result */ collectionClusterInfo(collection_name: string): Promise; /** * Update collection cluster setup * @param collection_name Name of the collection * @param {object} args * - timeout: If set, overrides global timeout setting for this request. Unit is seconds. * - operation: Cluster operation to perform. Can be one of: * - move_shard: Move a shard from one peer to another * - replicate_shard: Replicate a shard to another peer * - abort_transfer: Abort an ongoing shard transfer * - drop_replica: Drop a replica from a peer * - create_sharding_key: Create a new sharding key * - drop_sharding_key: Drop an existing sharding key * - restart_transfer: Restart a failed shard transfer * - start_resharding: Start resharding operation * - abort_resharding: Abort an ongoing resharding operation * @returns Operation result */ updateCollectionCluster(collection_name: string, { timeout, ...operation }: { timeout?: number; } & Schemas['ClusterOperations']): Promise; /** * Update vectors * @param collection_name * @param {object} args * - wait: Await for the results to be processed. * - If `true`, result will be returned only when all changes are applied * - If `false`, result will be returned immediately after the confirmation of receiving. * - Default: `true` * - ordering: Define strategy for ordering of the points. Possible values: * - 'weak' - write operations may be reordered, works faster, default * - 'medium' - write operations go through dynamically selected leader, * may be inconsistent for a short period of time in case of leader change * - 'strong' - Write operations go through the permanent leader, * consistent, but may be unavailable if leader is down * - points: Points with named vectors * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards * @returns Operation result */ updateVectors(collection_name: string, { wait, ordering, timeout, points, shard_key }: { wait?: boolean; ordering?: Schemas['WriteOrdering']; timeout?: number; } & Schemas['UpdateVectors']): Promise; /** * Delete vectors * @param collection_name * @param {object} args * - wait: Await for the results to be processed. * - If `true`, result will be returned only when all changes are applied * - If `false`, result will be returned immediately after the confirmation of receiving. * - Default: `true` * - ordering: Define strategy for ordering of the points. Possible values: * - 'weak' - write operations may be reordered, works faster, default * - 'medium' - write operations go through dynamically selected leader, * may be inconsistent for a short period of time in case of leader change * - 'strong' - Write operations go through the permanent leader, * consistent, but may be unavailable if leader is down * - points: Deletes values from each point in this list * - filter: Deletes values from points that satisfy this filter condition * - vector: Vector names * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards * @returns Operation result */ deleteVectors(collection_name: string, { wait, ordering, timeout, points, filter, vector, shard_key }: { wait?: boolean; ordering?: Schemas['WriteOrdering']; timeout?: number; } & Schemas['DeleteVectors']): Promise; /** * Create a new named vector on an existing collection. * Only the immutable properties of the vector space are configurable here; * storage, index and quantization are inferred and may be tuned later via {@link updateCollection}. * @param collection_name * @param vector_name Name of the new vector * @param config Vector configuration - either dense or sparse * @param {object} args * - wait: Await for the results to be processed. * - ordering: Define strategy for ordering of the operation. * - timeout: If set, overrides global timeout setting for this request. Unit is seconds. * @returns Operation result */ createVectorName(collection_name: string, vector_name: string, config: Schemas['VectorNameConfig'], { wait, ordering, timeout }?: { wait?: boolean; ordering?: Schemas['WriteOrdering']; timeout?: number; }): Promise; /** * Delete a named vector from a collection. * @param collection_name * @param vector_name Name of the vector to delete * @param {object} args * - wait: Await for the results to be processed. * - ordering: Define strategy for ordering of the operation. * - timeout: If set, overrides global timeout setting for this request. Unit is seconds. * @returns Operation result */ deleteVectorName(collection_name: string, vector_name: string, { wait, ordering, timeout }?: { wait?: boolean; ordering?: Schemas['WriteOrdering']; timeout?: number; }): Promise; /** * Update or insert a new point into the collection. * @param collection_name * @param {object} args * - wait: Await for the results to be processed. * - If `true`, result will be returned only when all changes are applied * - If `false`, result will be returned immediately after the confirmation of receiving. * - Default: `true` * - ordering: Define strategy for ordering of the points. Possible values: * - 'weak' - write operations may be reordered, works faster, default * - 'medium' - write operations go through dynamically selected leader, * may be inconsistent for a short period of time in case of leader change * - 'strong' - Write operations go through the permanent leader, * consistent, but may be unavailable if leader is down * - points: Batch or list of points to insert * @returns Operation result */ upsert(collection_name: string, { wait, ordering, timeout, ...points_or_batch }: { wait?: boolean; ordering?: Schemas['WriteOrdering']; timeout?: number; } & Schemas['PointInsertOperations']): Promise; /** * Retrieve stored points by IDs * @param collection_name * @param {object} args - * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards * - ids: list of IDs to lookup * - with_payload: * - Specify which stored payload should be attached to the result. * - If `True` - attach all payload * - If `False` - do not attach any payload * - If List of string - include only specified fields * - If `PayloadSelector` - use explicit rules * - Default: `true` * - with_vector: * - If `True` - Attach stored vector to the search result. * - If `False` - Do not attach vector. * - If List of string - Attach only specified vectors. * - Default: `false` * - consistency: * Read consistency of the search. Defines how many replicas should be queried before returning the result. * Values: * - number - number of replicas to query, values should present in all queried replicas * - 'majority' - query all replicas, but return values present in the majority of replicas * - 'quorum' - query the majority of replicas, return values present in all of them * - 'all' - query all replicas, and return values present in all replicas * @returns List of points */ retrieve(collection_name: string, { shard_key, ids, with_payload, with_vector, consistency, timeout }: Schemas['PointRequest'] & { consistency?: Schemas['ReadConsistency']; } & { timeout?: number; }): Promise; /** * Deletes selected points from collection * @param collection_name Name of the collection * @param {object} args - * - wait: Await for the results to be processed. * - If `true`, result will be returned only when all changes are applied * - If `false`, result will be returned immediately after the confirmation of receiving. * - ordering: Define strategy for ordering of the points. Possible values: * - 'weak' - write operations may be reordered, works faster, default * - 'medium' - write operations go through dynamically selected leader, * may be inconsistent for a short period of time in case of leader change * - 'strong' - Write operations go through the permanent leader, * consistent, but may be unavailable if leader is down * - points_selector: List of affected points, filter or points selector. * Example: * - `points: [ * 1, 2, 3, "cd3b53f0-11a7-449f-bc50-d06310e7ed90" * ]` * - `filter: { * must: [ * { * key: 'rand_number', * range: { * gte: 0.7 * } * } * ] * }` * @returns Operation result */ delete(collection_name: string, { wait, ordering, timeout, ...points_selector }: { wait?: boolean; ordering?: Schemas['WriteOrdering']; timeout?: number; } & Schemas['PointsSelector']): Promise; /** * Sets payload values for specified points. * @param collection_name Name of the collection * @param {object} args - * - wait: Await for the results to be processed. * - If `true`, result will be returned only when all changes are applied * - If `false`, result will be returned immediately after the confirmation of receiving. * - ordering: Define strategy for ordering of the points. Possible values: * - 'weak' - write operations may be reordered, works faster, default * - 'medium' - write operations go through dynamically selected leader, * may be inconsistent for a short period of time in case of leader change * - 'strong' - Write operations go through the permanent leader, * consistent, but may be unavailable if leader is down * - payload: Key-value pairs of payload to assign * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards * - key: Assigns payload to each point that satisfy this path of property * - points|filter: List of affected points, filter or points selector. * Example: * - `points: [ * 1, 2, 3, "cd3b53f0-11a7-449f-bc50-d06310e7ed90" * ]` * - `filter: { * must: [ * { * key: 'rand_number', * range: { * gte: 0.7 * } * } * ] * }` * @returns Operation result */ setPayload(collection_name: string, { payload, points, filter, shard_key, key, ordering, timeout, wait }: { wait?: boolean; ordering?: Schemas['WriteOrdering']; timeout?: number; } & Schemas['SetPayload']): Promise; /** * Overwrites payload of the specified points * After this operation is applied, only the specified payload will be present in the point. * The existing payload, even if the key is not specified in the payload, will be deleted. * @param collection_name Name of the collection * @param {object} args * - wait: Await for the results to be processed. * - If `true`, result will be returned only when all changes are applied * - If `false`, result will be returned immediately after the confirmation of receiving. * - ordering: Define strategy for ordering of the points. Possible values: * - 'weak' - write operations may be reordered, works faster, default * - 'medium' - write operations go through dynamically selected leader, * may be inconsistent for a short period of time in case of leader change * - 'strong' - Write operations go through the permanent leader, * consistent, but may be unavailable if leader is down * - payload: Key-value pairs of payload to assign * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards * - key: Assigns payload to each point that satisfy this path of property * - points|filter: List of affected points, filter or points selector. * Example: * - `points: [ * 1, 2, 3, "cd3b53f0-11a7-449f-bc50-d06310e7ed90" * ]` * - `filter: { * must: [ * { * key: 'rand_number', * range: { * gte: 0.7 * } * } * ] * }` * @returns Operation result */ overwritePayload(collection_name: string, { ordering, timeout, payload, points, filter, shard_key, key, wait }: { wait?: boolean; ordering?: Schemas['WriteOrdering']; timeout?: number; } & Schemas['SetPayload']): Promise; /** * Remove values from point's payload * @param collection_name Name of the collection * @param {object} args * - wait: Await for the results to be processed. * - If `true`, result will be returned only when all changes are applied * - If `false`, result will be returned immediately after the confirmation of receiving. * - ordering: Define strategy for ordering of the points. Possible values: * - 'weak' - write operations may be reordered, works faster, default * - 'medium' - write operations go through dynamically selected leader, * may be inconsistent for a short period of time in case of leader change * - 'strong' - Write operations go through the permanent leader, * consistent, but may be unavailable if leader is down * - keys: List of payload keys to remove. * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards * - points|filter: List of affected points, filter or points selector. * Example: * - `points: [ * 1, 2, 3, "cd3b53f0-11a7-449f-bc50-d06310e7ed90" * ]` * - `filter: { * must: [ * { * key: 'rand_number', * range: { * gte: 0.7 * } * } * ] * }` * @returns Operation result */ deletePayload(collection_name: string, { ordering, timeout, keys, points, filter, shard_key, wait }: { wait?: boolean; ordering?: Schemas['WriteOrdering']; timeout?: number; } & Schemas['PointsSelector'] & Schemas['DeletePayload']): Promise; /** * Delete all payload for selected points * @param collection_name Name of the collection * @param {object} args * - wait: Await for the results to be processed. * - If `true`, result will be returned only when all changes are applied * - If `false`, result will be returned immediately after the confirmation of receiving. * - ordering: Define strategy for ordering of the points. Possible values: * - 'weak' - write operations may be reordered, works faster, default * - 'medium' - write operations go through dynamically selected leader, * may be inconsistent for a short period of time in case of leader change * - 'strong' - Write operations go through the permanent leader, * consistent, but may be unavailable if leader is down * - points_selector: List of affected points, filter or points selector. * Example: * - `points: [ * 1, 2, 3, "cd3b53f0-11a7-449f-bc50-d06310e7ed90" * ]` * - `filter: { * must: [ * { * key: 'rand_number', * range: { * gte: 0.7 * } * } * ] * }` * @returns Operation result */ clearPayload(collection_name: string, { ordering, timeout, wait, ...points_selector }: { wait?: boolean; ordering?: Schemas['WriteOrdering']; timeout?: number; } & Schemas['PointsSelector']): Promise; /** * Operation for performing changes of collection aliases. * Alias changes are atomic, meaning that no collection modifications can happen between alias operations. * @param {object} args * - actions: List of operations to perform * - timeout: Wait for operation commit timeout in seconds. If timeout is reached, request will return with service error. * @returns Operation result */ updateCollectionAliases({ actions, timeout }: { timeout?: number; } & Schemas['ChangeAliasesOperation']): Promise; /** * Get collection aliases * @param collection_name Name of the collection * @returns Collection aliases */ getCollectionAliases(collection_name: string): Promise; /** * Get all aliases * @returns All aliases of all collections */ getAliases(): Promise; /** * Get list name of all existing collections * @returns List of the collections */ getCollections(): Promise; /** * Get detailed information about specified existing collection * * @param collection_name Name of the collection * @returns Detailed information about the collection */ getCollection(collection_name: string): Promise; /** * Update parameters of the collection * * @param collection_name Name of the collection * @param {object} args * - optimizer_config: Override for optimizer configuration * - collection_params: Override for collection parameters * - timeout: Wait for operation commit timeout in seconds. If timeout is reached, request will return with service error. * @returns Operation result */ updateCollection(collection_name: string, args?: Schemas['UpdateCollection'] & { timeout?: number; }): Promise; /** * Removes collection and all it's data * @param collection_name Name of the collection to delete * @param {object} args * - timeout: * Wait for operation commit timeout in seconds. * If timeout is reached, request will return with service error. * @returns Operation result */ deleteCollection(collection_name: string, args?: { timeout?: number; }): Promise; /** * Create empty collection with given parameters * @returns Operation result * @param collectionName Name of the collection to recreate * @param {object} args * - vectors_config: * Configuration of the vector storage. Vector params contains size and distance for the vector storage. * If dict is passed, service will create a vector storage for each key in the dict. * If single VectorParams is passed, service will create a single anonymous vector storage. * - shard_number: Number of shards in collection. Default is 1, minimum is 1. * - sharding_method: Sharding method Default is Auto - points are distributed across all available shards Custom - points are distributed across shards according to shard key * - replication_factor: * Replication factor for collection. Default is 1, minimum is 1. * Defines how many copies of each shard will be created. * Have effect only in distributed mode. * - write_consistency_factor: * Write consistency factor for collection. Default is 1, minimum is 1. * Defines how many replicas should apply the operation for us to consider it successful. * Increasing this number will make the collection more resilient to inconsistencies, but will * also make it fail if not enough replicas are available. * Does not have any performance impact. * Have effect only in distributed mode. * - on_disk_payload: * If true - point`s payload will not be stored in memory. * It will be read from the disk every time it is requested. * This setting saves RAM by (slightly) increasing the response time. * Note: those payload values that are involved in filtering and are indexed - remain in RAM. * - hnsw_config: Params for HNSW index * - optimizers_config: Params for optimizer * - wal_config: Params for Write-Ahead-Log * - quantization_config: Params for quantization, if None - quantization will be disabled * - init_from: Use data stored in another collection to initialize this collection * - sparse_vectors: Sparse vector data config * - strict_mode_config: Strict mode configuration * - timeout: * Wait for operation commit timeout in seconds. * If timeout is reached, request will return with service error. */ createCollection(collection_name: string, { timeout, vectors, hnsw_config, on_disk_payload, optimizers_config, quantization_config, replication_factor, shard_number, sharding_method, wal_config, write_consistency_factor, sparse_vectors, strict_mode_config, payload, metadata }: { timeout?: number; } & Schemas['CreateCollection']): Promise; /** * Delete and create empty collection with given parameters * @returns Operation result * @param collectionName Name of the collection to recreate * @param {object} args * - vectorsConfig: * Configuration of the vector storage. Vector params contains size and distance for the vector storage. * If dict is passed, service will create a vector storage for each key in the dict. * If single VectorParams is passed, service will create a single anonymous vector storage. * - shardNumber: Number of shards in collection. Default is 1, minimum is 1. * - sharding_method: Sharding method Default is Auto - points are distributed across all available shards Custom - points are distributed across shards according to shard key * - replicationFactor: * Replication factor for collection. Default is 1, minimum is 1. * Defines how many copies of each shard will be created. * Have effect only in distributed mode. * - writeConsistencyFactor: * Write consistency factor for collection. Default is 1, minimum is 1. * Defines how many replicas should apply the operation for us to consider it successful. * Increasing this number will make the collection more resilient to inconsistencies, but will * also make it fail if not enough replicas are available. * Does not have any performance impact. * Have effect only in distributed mode. * - onDiskPayload: * If true - point`s payload will not be stored in memory. * It will be read from the disk every time it is requested. * This setting saves RAM by (slightly) increasing the response time. * Note: those payload values that are involved in filtering and are indexed - remain in RAM. * - hnswConfig: Params for HNSW index * - optimizersConfig: Params for optimizer * - walConfig: Params for Write-Ahead-Log * - quantizationConfig: Params for quantization, if None - quantization will be disabled * - initFrom: Use data stored in another collection to initialize this collection * - sparse_vectors: Sparse vector data config * - strict_mode_config: Strict mode configuration * - timeout: * Wait for operation commit timeout in seconds. * If timeout is reached, request will return with service error. */ recreateCollection(collection_name: string, { timeout, vectors, hnsw_config, on_disk_payload, optimizers_config, quantization_config, replication_factor, shard_number, sharding_method, wal_config, write_consistency_factor, sparse_vectors, strict_mode_config, payload, metadata }: { timeout?: number; } & Schemas['CreateCollection']): Promise; /** * Creates index for a given payload field. * Indexed fields allow to perform filtered search operations faster. * @param collectionName Name of the collection * @param {object} args * - fieldName: Name of the payload field. * - fieldSchema: Type of data to index. * - wait: Await for the results to be processed. * - If `true`, result will be returned only when all changes are applied * - If `false`, result will be returned immediately after the confirmation of receiving. * - ordering: * Define strategy for ordering of the points. Possible values: * - 'weak' - write operations may be reordered, works faster, default * - 'medium' - write operations go through dynamically selected leader, * may be inconsistent for a short period of time in case of leader change * - 'strong' - Write operations go through the permanent leader, * consistent, but may be unavailable if leader is down * @returns Operation Result */ createPayloadIndex(collection_name: string, { wait, ordering, timeout, field_name, field_schema }: { wait?: boolean; ordering?: Schemas['WriteOrdering']; timeout?: number; } & Schemas['CreateFieldIndex']): Promise; /** * Removes index for a given payload field. * @param collection_name Name of the collection * @param field_name Name of the payload field * @param {object} args * - wait: Await for the results to be processed. * - If `true`, result will be returned only when all changes are applied * - If `false`, result will be returned immediately after the confirmation of receiving. * - ordering: * Define strategy for ordering of the points. Possible values: * - 'weak' - write operations may be reordered, works faster, default * - 'medium' - write operations go through dynamically selected leader, * may be inconsistent for a short period of time in case of leader change * - 'strong' - Write operations go through the permanent leader, * consistent, but may be unavailable if leader is down * @returns Operation Result */ deletePayloadIndex(collection_name: string, field_name: string, { wait, ordering, timeout }?: { wait?: boolean; ordering?: Schemas['WriteOrdering']; timeout?: number; }): Promise; /** * List all snapshots for a given collection * @param collection_name Name of the collection * @returns List of snapshots */ listSnapshots(collection_name: string): Promise; /** * Create snapshot for a given collection * @param collection_name Name of the collection * @returns Snapshot description */ createSnapshot(collection_name: string, args?: { wait?: boolean; }): Promise; /** * Delete snapshot for a given collection * @param collection_name Name of the collection * @param snapshot_name Snapshot id * @returns True if snapshot was deleted */ deleteSnapshot(collection_name: string, snapshot_name: string, args?: { wait?: boolean; }): Promise; /** * List all snapshots for a whole storage * @returns List of snapshots */ listFullSnapshots(): Promise; /** * Create snapshot for a whole storage * @returns Snapshot description */ createFullSnapshot(args?: { wait?: boolean; }): Promise; /** * Delete snapshot for a whole storage * @param snapshot_name Snapshot name * @returns True if the snapshot was deleted */ deleteFullSnapshot(snapshot_name: string, args?: { wait?: boolean; }): Promise; /** * Recover collection from snapshot * @param collection_name Name of the collection * @param {object} args * - location: * URL of the snapshot. * Example: * - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot` * - Local path `file:///qdrant/snapshots/test_collection-2022-08-04-10-49-10.snapshot` * - priority: * Defines source of truth for snapshot recovery * - `snapshot` means - prefer snapshot data over the current state * - `replica` means - prefer existing data over the snapshot * Default: `replica` * - checksum: * SHA256 checksum to verify snapshot integrity before recovery * @returns True if the snapshot was recovered */ recoverSnapshot(collection_name: string, { location, priority, checksum, api_key }: Schemas['SnapshotRecover']): Promise; /** * Batch update points * Apply a series of update operations for points, vectors and payloads. * @param collection_name Name of the collection * @param {object} args * - wait: Await for the results to be processed. * - If `true`, result will be returned only when all changes are applied * - If `false`, result will be returned immediately after the confirmation of receiving. * - ordering: Define strategy for ordering of the points. Possible values: * - 'weak' - write operations may be reordered, works faster, default * - 'medium' - write operations go through dynamically selected leader, * may be inconsistent for a short period of time in case of leader change * - 'strong' - Write operations go through the permanent leader, * consistent, but may be unavailable if leader is down * - operations: List of operations to perform * @returns Operation result */ batchUpdate(collection_name: string, { wait, ordering, timeout, ...operations }: { wait?: boolean; ordering?: Schemas['WriteOrdering']; timeout?: number; } & Schemas['UpdateOperations']): Promise; /** * Recover from a snapshot * @param collection_name Name of the collection * @param shard_id Shard ID * @returns Operation result */ recoverShardFromSnapshot(collection_name: string, shard_id: number, { wait, ...shard_snapshot_recover }: { wait?: boolean; } & Schemas['ShardSnapshotRecover']): Promise; /** * Get list of snapshots for a shard of a collection * @param collection_name Name of the collection * @param shard_id Shard ID * @returns Operation result */ listShardSnapshots(collection_name: string, shard_id: number): Promise; /** * Create new snapshot of a shard for a collection * @param collection_name Name of the collection * @param shard_id Shard ID * @returns Operation result */ createShardSnapshot(collection_name: string, shard_id: number, { wait }: { wait?: boolean; }): Promise; /** * Delete snapshot of a shard for a collection * @param collection_name Name of the collection * @param shard_id Shard ID * @param snapshot_name Snapshot name * @returns Operation result */ deleteShardSnapshot(collection_name: string, shard_id: number, snapshot_name: string, { wait }: { wait?: boolean; }): Promise; /** * List shard keys * @param collection_name Name of the collection * @returns Shard keys response */ listShardKeys(collection_name: string): Promise; /** * Create shard key * @param collection_name Name of the collection * @param {object} args - * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards * - shards_number: How many shards to create for this key If not specified, will use the default value from config * - replication_factor: How many replicas to create for each shard If not specified, will use the default value from config * - placement: Placement of shards for this key List of peer ids, that can be used to place shards for this key If not specified, will be randomly placed among all peers * - initial_state: Initial state of the shards for this key If not specified, will be `Initializing` first and then `Active` Warning: do not change this unless you know what you are doing. * - timeout: If set, overrides global timeout setting for this request. Unit is seconds. * @returns Operation result */ createShardKey(collection_name: string, { shard_key, shards_number, replication_factor, placement, initial_state, timeout }: { timeout?: number; } & Schemas['CreateShardingKey']): Promise; /** * Delete shard key * @param collection_name Name of the collection * @param {object} args - * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards * - timeout: If set, overrides global timeout setting for this request. Unit is seconds. * @returns Operation result */ deleteShardKey(collection_name: string, { shard_key, timeout }: { timeout?: number; } & Schemas['DropShardingKey']): Promise; /** * Collect cluster telemetry data * @description Get telemetry data, from the point of view of the cluster. * This includes peers info, collections info, shard transfers, and resharding status. * @param {object} args * - details_level: The level of detail to include in the response * - per_collection: If true, include per-collection request statistics in the response * - timeout: Timeout for this request * @returns Cluster telemetry data */ clusterTelemetry(args?: { details_level?: number; per_collection?: boolean; timeout?: number; }): Promise; /** * Get optimization progress * @description Get progress of ongoing and completed optimizations for a collection * @param collection_name Name of the collection * @param {object} args * - with: Comma-separated list of optional fields to include in the response. * Possible values: queued, completed, idle_segments. * - completed_limit: Maximum number of completed optimizations to return. * @returns Optimizations progress */ getOptimizations(collection_name: string, args?: { with?: string; completed_limit?: number; }): Promise; /** * Get the cluster-wide quota configuration and how close each peer is to it * @description The configuration is cluster-wide, the utilization is not: memory and disk are node-local, * so one peer being under its limit says nothing about the others. `usage` describes the node that served * the request, `peers` is what every peer that answered reports about itself. * @returns Quota configuration in effect, and per-peer utilization */ getQuotas(): Promise; /** * Set the cluster-wide limits on node resources * @description An unset limit means the corresponding resource is not capped. Limits are only enforced * while `enabled` is true. * @param {object} args * - enabled: Whether the limits are enforced * - max_resident_memory_percent: Reject memory-consuming updates once process resident memory reaches * this percentage of the memory available to it * - max_disk_usage_percent: Reject disk-consuming updates once the storage filesystem is filled to * this percentage of its capacity * - release_margin_percent: How far below its limit a resource has to fall before updates resume * - wait: Await for the configuration to be applied cluster-wide * @returns Operation result */ updateQuotas({ wait, ...config }?: { wait?: boolean; } & Schemas['QuotaConfig']): Promise; /** * Returns information about the running Qdrant instance * @description Returns information about the running Qdrant instance like version and commit id * @returns Operation result */ versionInfo(): Promise; /** * Check the existence of a collection * @param collection_name Name of the collection * @description Returns "true" if the given collection name exists, and "false" otherwise * @returns Operation result */ collectionExists(collection_name: string): Promise; /** * Query points * @description Universally query points. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries. * @param collection_name Name of the collection * @param {object} args - * - consistency: Read consistency of the search. Defines how many replicas should be queried before returning the result. * Values: * number - number of replicas to query, values should present in all queried replicas * 'majority' - query all replicas, but return values present in the majority of replicas * 'quorum' - query the majority of replicas, return values present in all of them * 'all' - query all replicas, and return values present in all replicas * - timeout: If set, overrides global timeout setting for this request. Unit is seconds. * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards. * - prefetch: Sub-requests to perform first. If present, the query will be performed on the results of the prefetch(es). * - query: Query to perform. If missing without prefetches, returns points ordered by their IDs. * - using: Define which vector name to use for querying. If missing, the default vector is used. * - filter: Filter conditions - return only those points that satisfy the specified conditions. * - params: Search params for when there is no prefetch * - score_threshold: Return points with scores better than this threshold. * - limit: Max number of points to return. Default is 10. * - offset: Offset of the result. Skip this many points. Default is 0 * - with_vector: Options for specifying which vectors to include into the response. Default is false. * - with_payload: Options for specifying which payload to include or not. Default is false. * - lookup_from: The location to use for IDs lookup, if not specified - use the current collection and the 'using' vector Note: the other collection vectors should have the same vector size as the 'using' vector in the current collection. * @returns Operation result */ query(collection_name: string, { consistency, timeout, shard_key, prefetch, query, using, filter, params, score_threshold, limit, offset, with_vector, with_payload, lookup_from }: { consistency?: Schemas['ReadConsistency']; } & { timeout?: number; } & Schemas['QueryRequest']): Promise; /** * Query points in batch * @description Universally query points in batch. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries. * @param collection_name Name of the collection * @param {object} args - * - consistency: Read consistency of the search. Defines how many replicas should be queried before returning the result. * Values: * number - number of replicas to query, values should present in all queried replicas * 'majority' - query all replicas, but return values present in the majority of replicas * 'quorum' - query the majority of replicas, return values present in all of them * 'all' - query all replicas, and return values present in all replicas * - timeout: If set, overrides global timeout setting for this request. Unit is seconds. * - searches: List of queries * @returns Operation result */ queryBatch(collection_name: string, { consistency, timeout, searches }: { consistency?: Schemas['ReadConsistency']; } & { timeout?: number; } & Schemas['QueryRequestBatch']): Promise; /** * Query points, grouped by a given payload field * @description Universally query points, grouped by a given payload field * @param collection_name Name of the collection * @param {object} args - * - consistency: Read consistency of the search. Defines how many replicas should be queried before returning the result. * Values: * number - number of replicas to query, values should present in all queried replicas * 'majority' - query all replicas, but return values present in the majority of replicas * 'quorum' - query the majority of replicas, return values present in all of them * 'all' - query all replicas, and return values present in all replicas * - timeout: If set, overrides global timeout setting for this request. Unit is seconds. * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards. * - prefetch: Sub-requests to perform first. If present, the query will be performed on the results of the prefetch(es). * - query: Query to perform. If missing without prefetches, returns points ordered by their IDs. * - using: Define which vector name to use for querying. If missing, the default vector is used. * - filter: Filter conditions - return only those points that satisfy the specified conditions. * - params: Search params for when there is no prefetch * - score_threshold: Return points with scores better than this threshold. * - with_vector: Options for specifying which vectors to include into the response. Default is false. * - with_payload: Options for specifying which payload to include or not. Default is false. * - group_by: Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups. * - group_size: Maximum amount of points to return per group. Default is 3. * - limit: Maximum amount of groups to return. Default is 10. * - with_lookup: Look for points in another collection using the group ids. * @returns Operation result */ queryGroups(collection_name: string, { consistency, timeout, shard_key, prefetch, query, using, filter, params, score_threshold, with_vector, with_payload, group_by, group_size, limit, with_lookup }: { consistency?: Schemas['ReadConsistency']; } & { timeout?: number; } & Schemas['QueryGroupsRequest']): Promise; /** * Facet a payload key with a given filter. * @description Count points that satisfy the given filter for each unique value of a payload key. * @param collection_name Name of the collection * @param {object} args - * - consistency: Read consistency of the search. Defines how many replicas should be queried before returning the result. * Values: * number - number of replicas to query, values should present in all queried replicas * 'majority' - query all replicas, but return values present in the majority of replicas * 'quorum' - query the majority of replicas, return values present in all of them * 'all' - query all replicas, and return values present in all replicas * - timeout: If set, overrides global timeout setting for this request. Unit is seconds. * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards. * - key: Payload key to use for faceting. * - limit: Max number of hits to return. Default is 10. * - filter: Filter conditions - only consider points that satisfy these conditions. * - exact: Whether to do a more expensive exact count for each of the values in the facet. Default is false. * @returns Operation result */ facet(collection_name: string, { consistency, timeout, shard_key, key, limit, filter, exact }: { consistency?: Schemas['ReadConsistency']; } & { timeout?: number; } & Schemas['FacetRequest']): Promise; /** * Search points matrix distance pairs. * @description Compute distance matrix for sampled points with a pair based output format. * @param collection_name Name of the collection * @param {object} args - * - consistency: Read consistency of the search. Defines how many replicas should be queried before returning the result. * Values: * number - number of replicas to query, values should present in all queried replicas * 'majority' - query all replicas, but return values present in the majority of replicas * 'quorum' - query the majority of replicas, return values present in all of them * 'all' - query all replicas, and return values present in all replicas * - timeout: If set, overrides global timeout setting for this request. Unit is seconds. * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards. * - filter: Look only for points which satisfies this conditions. * - sample: How many points to select and search within. Default is 10. * - limit: How many neighbours per sample to find. Default is 3. * - using: Define which vector name to use for querying. If missing, the default vector is used. * @returns Operation result */ searchMatrixPairs(collection_name: string, { consistency, timeout, shard_key, filter, sample, limit, using }: { consistency?: Schemas['ReadConsistency']; } & { timeout?: number; } & Schemas['SearchMatrixRequest']): Promise; /** * Search points matrix distance offsets. * @description Compute distance matrix for sampled points with an offset based output format. * @param collection_name Name of the collection * @param {object} args - * - consistency: Read consistency of the search. Defines how many replicas should be queried before returning the result. * Values: * number - number of replicas to query, values should present in all queried replicas * 'majority' - query all replicas, but return values present in the majority of replicas * 'quorum' - query the majority of replicas, return values present in all of them * 'all' - query all replicas, and return values present in all replicas * - timeout: If set, overrides global timeout setting for this request. Unit is seconds. * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards. * - filter: Look only for points which satisfies this conditions. * - sample: How many points to select and search within. Default is 10. * - limit: How many neighbours per sample to find. Default is 3. * - using: Define which vector name to use for querying. If missing, the default vector is used. * @returns Operation result */ searchMatrixOffsets(collection_name: string, { consistency, timeout, shard_key, filter, sample, limit, using }: { consistency?: Schemas['ReadConsistency']; } & { timeout?: number; } & Schemas['SearchMatrixRequest']): Promise; } //#endregion //#region ../../node_modules/.pnpm/@qdrant+js-client-rest@1.19.0_typescript@6.0.3/node_modules/@qdrant/js-client-rest/dist/types/context-headers.d.ts declare function withHeaders(headers: Record, fn: () => T): T; //#endregion //#region ../../node_modules/.pnpm/@qdrant+js-client-rest@1.19.0_typescript@6.0.3/node_modules/@qdrant/js-client-rest/dist/types/errors.d.ts declare class CustomError extends Error { constructor(message: string); } declare class QdrantClientUnexpectedResponseError extends CustomError { static forResponse(response: ApiResponse): QdrantClientUnexpectedResponseError; } declare class QdrantClientConfigError extends CustomError {} declare class QdrantClientTimeoutError extends CustomError {} declare class QdrantClientResourceExhaustedError extends CustomError { retry_after: number; constructor(message: string, retryAfter: string); } declare namespace index_d_exports { export { QdrantClient, QdrantClientConfigError, QdrantClientParams, QdrantClientResourceExhaustedError, QdrantClientTimeoutError, QdrantClientUnexpectedResponseError, Schemas, withHeaders }; } declare namespace chromadb_d_exports { export { Abs, AdminClient, AdminClientArgs, AdminCloudClient, Aggregate, AggregateInput, AggregateJSON, AnyEmbeddingFunction, BaseRecordSet, BoolInvertedIndexConfig, BoolInvertedIndexType, BoolValueType, ChromaClient, ChromaClientArgs, ChromaClientError, ChromaConnectionError, ChromaError, ChromaForbiddenError, ChromaNotFoundError, ChromaQuotaExceededError, ChromaRateLimitError, ChromaServerError, ChromaUnauthorizedError, ChromaUniqueError, ChromaValueError, CloudClient, Cmek, CmekProvider, Collection, CollectionConfiguration, CollectionHandle, CollectionMetadata, CreateCollectionConfiguration, DOCUMENT_KEY, DeleteResult, Div, EMBEDDING_KEY, EmbeddingFunction, EmbeddingFunctionClass, EmbeddingFunctionSpace, Exp, FloatInvertedIndexConfig, FloatInvertedIndexType, FloatListValueType, FloatValueType, FtsIndexConfig, FtsIndexType, GetResult, GroupBy, GroupByInput, GroupByJSON, HNSWConfiguration, IncludeEnum, IndexConfig, IndexingStatus, IntInvertedIndexConfig, IntInvertedIndexType, IntValueType, InvalidArgumentError, InvalidCollectionError, K, Key, KeyFactory, Knn, KnnOptions, Limit, LimitInput, LimitOptions, ListDatabasesArgs, Log, Max, MaxK, Metadata, MetadataScalar, Min, MinK, Mul, PreparedInsertRecordSet, PreparedRecordSet, QueryRecordSet, QueryResult, QueryRowResult, RankExpression, RankInput, RankLiteral, ReadLevel, RecordSet, Rrf, RrfOptions, Schema, Search, SearchInit, SearchLike, SearchResult, SearchResultRow, Select, SelectInput, SelectKeyInput, SparseEmbeddingFunction, SparseEmbeddingFunctionClass, SparseVector, SparseVectorIndexConfig, SparseVectorIndexConfigOptions, SparseVectorIndexType, SparseVectorValueType, StringInvertedIndexConfig, StringInvertedIndexType, StringValueType, Sub, Sum, UpdateCollectionConfiguration, UpdateHNSWConfiguration, UpdateSPANNConfiguration, UserIdentity, Val, ValueTypes, VectorIndexConfig, VectorIndexConfigOptions, VectorIndexType, Where, WhereDocument, WhereExpression, WhereInput, WhereJSON, baseRecordSetFields, createErrorByType, getDefaultEFConfig, getEmbeddingFunction, getSparseEmbeddingFunction, knownEmbeddingFunctions, knownSparseEmbeddingFunctions, processCreateCollectionConfig, processUpdateCollectionConfig, recordSetFields, registerEmbeddingFunction, registerSparseEmbeddingFunction, serializeEmbeddingFunction, toSearch, withChroma }; } type BoolInvertedIndexConfig$1 = { [key: string]: never; }; type BoolInvertedIndexType$1 = { config: BoolInvertedIndexConfig$1; enabled: boolean; }; /** * Boolean value type index configurations */ type BoolValueType$1 = { bool_inverted_index?: null | BoolInvertedIndexType$1; }; type ChecklistResponse = { max_batch_size: number; supports_base64_encoding: boolean; }; type Database = { id: string; name: string; tenant: string; }; type DeleteCollectionRecordsResponse = { deleted?: number; }; type EmbeddingFunctionConfiguration = { type: 'legacy'; } | (EmbeddingFunctionNewConfiguration & { type: 'known'; }) | { type: 'unknown'; }; type EmbeddingFunctionNewConfiguration = { config: unknown; name: string; }; type FloatInvertedIndexConfig$1 = { [key: string]: never; }; type FloatInvertedIndexType$1 = { config: FloatInvertedIndexConfig$1; enabled: boolean; }; /** * Float list value type index configurations (for vectors) */ type FloatListValueType$1 = { vector_index?: null | VectorIndexType$1; }; /** * Float value type index configurations */ type FloatValueType$1 = { float_inverted_index?: null | FloatInvertedIndexType$1; }; /** * Full-text search index algorithm. * * Controls which index format and query pipeline are used for * document substring search within a collection. */ type FtsAlgorithm = 'trigram' | 'token_bitmap'; type FtsIndexConfig$1 = { /** * FTS index algorithm. * Omitted from JSON when set to the default (Trigram) so that old * servers/clients that do not know about this field can still * deserialize the schema. */ algorithm?: FtsAlgorithm; }; type FtsIndexType$1 = { config: FtsIndexConfig$1; enabled: boolean; }; type GetUserIdentityResponse = { databases: Array; tenant: string; user_id: string; }; type HashMap = { [key: string]: boolean | number | string | SparseVector | Array | Array | Array | null; }; type HnswConfiguration = { ef_construction?: number | null; ef_search?: number | null; max_neighbors?: number | null; resize_factor?: number | null; space?: null | Space; sync_threshold?: number | null; }; /** * Configuration for HNSW vector index algorithm parameters */ type HnswIndexConfig = { batch_size?: number | null; ef_construction?: number | null; ef_search?: number | null; max_neighbors?: number | null; num_threads?: number | null; resize_factor?: number | null; sync_threshold?: number | null; }; /** * Use this enum to specify which fields should be returned when retrieving records. */ type Include = 'distances' | 'documents' | 'embeddings' | 'metadatas' | 'uris'; type IndexStatusResponse = { num_indexed_ops: number; num_unindexed_ops: number; op_indexing_progress: number; total_ops: number; }; type IntInvertedIndexConfig$1 = { [key: string]: never; }; type IntInvertedIndexType$1 = { config: IntInvertedIndexConfig$1; enabled: boolean; }; /** * Integer value type index configurations */ type IntValueType$1 = { int_inverted_index?: null | IntInvertedIndexType$1; }; /** * Represents a field key in search queries. * * Used for both selecting fields to return and building filter expressions. * Predefined keys access special fields, while custom keys access metadata. * * # Predefined Keys * * - `Key::Document` - Document text content (`#document`) * - `Key::Embedding` - Vector embeddings (`#embedding`) * - `Key::Metadata` - All metadata fields (`#metadata`) * - `Key::Score` - Search scores (`#score`) * * # Custom Keys * * Use `Key::field()` or `Key::from()` to reference metadata fields: * * ``` * use chroma_types::operator::Key; * * let key = Key::field("author"); * let key = Key::from("title"); * ``` * * # Examples * * ## Building filters * * ``` * use chroma_types::operator::Key; * * // Equality * let filter = Key::field("status").eq("published"); * * // Comparisons * let filter = Key::field("year").gte(2020); * let filter = Key::field("score").lt(0.9); * * // Set operations * let filter = Key::field("category").is_in(vec!["tech", "science"]); * let filter = Key::field("status").not_in(vec!["deleted", "archived"]); * * // Document content * let filter = Key::Document.contains("machine learning"); * let filter = Key::Document.regex(r"\bAPI\b"); * * // Combining filters * let filter = Key::field("status").eq("published") * & Key::field("year").gte(2020); * ``` * * ## Selecting fields * * ``` * use chroma_types::plan::SearchPayload; * use chroma_types::operator::Key; * * let search = SearchPayload::default() * .select([ * Key::Document, * Key::Score, * Key::field("title"), * Key::field("author"), * ]); * ``` */ type Key$1 = 'Document' | 'Embedding' | 'Metadata' | 'Score' | { MetadataField: string; }; /** * Quantization implementation for SPANN vector index. */ type Quantization = 'none' | 'four_bit_rabit_q_with_u_search'; /** * Schema representation for collection index configurations * * This represents the server-side schema structure used for index management */ type Schema$1 = { /** * Customer-managed encryption key for collection data */ cmek?: { [key: string]: unknown; } | null; /** * Default index configurations for each value type */ defaults: ValueTypes$1; /** * Key-specific index overrides * TODO(Sanket): Needed for backwards compatibility. Should remove after deploy. */ keys: { [key: string]: ValueTypes$1; }; }; type SearchPayload = { filter?: { query_ids?: Array; where_clause?: { [key: string]: unknown; }; }; group_by?: { aggregate?: { [key: string]: unknown; }; keys?: Array; }; limit?: { limit?: number; offset?: number; }; rank?: { [key: string]: unknown; }; select?: { keys?: Array; }; }; type SearchResponse = { documents: Array | null>; embeddings: Array | null> | null>; ids: Array>; metadatas: Array | null>; scores: Array | null>; select: Array>; }; type Space = 'l2' | 'cosine' | 'ip'; type SpannConfiguration = { ef_construction?: number | null; ef_search?: number | null; max_neighbors?: number | null; merge_threshold?: number | null; reassign_neighbor_count?: number | null; search_nprobe?: number | null; space?: null | Space; split_threshold?: number | null; write_nprobe?: number | null; }; /** * Configuration for SPANN vector index algorithm parameters */ type SpannIndexConfig = { center_drift_threshold?: number | null; ef_construction?: number | null; ef_search?: number | null; initial_lambda?: number | null; max_neighbors?: number | null; merge_threshold?: number | null; nreplica_count?: number | null; num_centers_to_merge_to?: number | null; num_samples_kmeans?: number | null; /** * Quantization implementation for vector search (cloud-only feature) */ quantize?: Quantization; reassign_neighbor_count?: number | null; search_nprobe?: number | null; search_rng_epsilon?: number | null; search_rng_factor?: number | null; split_threshold?: number | null; write_nprobe?: number | null; write_rng_epsilon?: number | null; write_rng_factor?: number | null; }; /** * Sparse vector index algorithm. * * Controls which posting list format and query engine are used for * sparse vector search within a collection. */ type SparseIndexAlgorithm = 'wand' | 'max_score'; /** * Represents a sparse vector using parallel arrays for indices and values. * * On deserialization: accepts both old format `{"indices": [...], "values": [...]}` * and new format `{"#type": "sparse_vector", "indices": [...], "values": [...]}`. * * On serialization: always includes `#type` field with value `"sparse_vector"`. */ type SparseVector = { /** * Dimension indices */ indices: Array; /** * Tokens corresponding to each index */ tokens?: Array | null; /** * Values corresponding to each index */ values: Array; }; type SparseVectorIndexConfig$1 = { /** * Sparse index algorithm (cloud-only, tenant-gated). * Omitted from JSON when set to the default (Wand) so that old * servers/clients that do not know about this field can still * deserialize the schema. */ algorithm?: SparseIndexAlgorithm; /** * Whether this embedding is BM25 */ bm25?: boolean | null; embedding_function?: null | EmbeddingFunctionConfiguration; /** * Key to source the sparse vector from */ source_key?: string | null; }; type SparseVectorIndexType$1 = { config: SparseVectorIndexConfig$1; enabled: boolean; }; /** * Sparse vector value type index configurations */ type SparseVectorValueType$1 = { sparse_vector_index?: null | SparseVectorIndexType$1; }; type StringInvertedIndexConfig$1 = { [key: string]: never; }; type StringInvertedIndexType$1 = { config: StringInvertedIndexConfig$1; enabled: boolean; }; /** * String value type index configurations */ type StringValueType$1 = { fts_index?: null | FtsIndexType$1; string_inverted_index?: null | StringInvertedIndexType$1; }; type UpdateCollectionConfiguration$1 = { embedding_function?: null | EmbeddingFunctionConfiguration; hnsw?: null | UpdateHnswConfiguration; spann?: null | UpdateSpannConfiguration; }; type UpdateHnswConfiguration = { batch_size?: number | null; ef_search?: number | null; max_neighbors?: number | null; num_threads?: number | null; resize_factor?: number | null; sync_threshold?: number | null; }; type UpdateSpannConfiguration = { ef_search?: number | null; search_nprobe?: number | null; }; /** * Strongly-typed value type configurations * Contains optional configurations for each supported value type */ type ValueTypes$1 = { bool?: null | BoolValueType$1; float?: null | FloatValueType$1; float_list?: null | FloatListValueType$1; int?: null | IntValueType$1; sparse_vector?: null | SparseVectorValueType$1; string?: null | StringValueType$1; }; type VectorIndexConfig$1 = { embedding_function?: null | EmbeddingFunctionConfiguration; hnsw?: null | HnswIndexConfig; /** * Key to source the vector from */ source_key?: string | null; space?: null | Space; spann?: null | SpannIndexConfig; }; type VectorIndexType$1 = { config: VectorIndexConfig$1; enabled: boolean; }; /** * User identity information including tenant and database access. */ type UserIdentity = GetUserIdentityResponse; /** * Read level controls whether queries read from the write-ahead log (WAL). * * - INDEX_AND_WAL: Read from both the compacted index and the WAL. * All committed writes will be visible. This is the default. * - INDEX_ONLY: Read only from the compacted index, skipping the WAL. * Recent writes that haven't been compacted may not be visible, but queries are faster. * - INDEX_AND_BOUNDED_WAL: Read from the index and up to a server-configured number of * WAL entries for bounded query latency. */ declare const ReadLevel: { readonly INDEX_AND_WAL: "index_and_wal"; readonly INDEX_ONLY: "index_only"; readonly INDEX_AND_BOUNDED_WAL: "index_and_bounded_wal"; }; type ReadLevel = (typeof ReadLevel)[keyof typeof ReadLevel]; /** * Scalar metadata values that can be stored in arrays. */ type MetadataScalar = boolean | number | string; /** * Metadata that can be associated with a collection. * Values can be boolean, number, string, SparseVector, typed arrays, or null. */ type CollectionMetadata = Record; /** * Metadata that can be associated with individual records. * Values can be boolean, number, string, SparseVector, typed arrays, or null. */ type Metadata = Record; /** * Base interface for record sets containing optional fields. */ interface BaseRecordSet { /** Array of embedding vectors */ embeddings?: number[][]; /** Array of metadata objects */ metadatas?: Metadata[]; /** Array of document text content */ documents?: string[]; /** Array of URIs/URLs */ uris?: string[]; } declare const baseRecordSetFields: string[]; /** * Complete record set with required IDs for operations like add/update. */ interface RecordSet extends BaseRecordSet { /** Array of unique record identifiers */ ids: string[]; } interface PreparedRecordSet extends Omit { embeddings?: number[][] | string[]; } interface PreparedInsertRecordSet extends PreparedRecordSet { embeddings: number[][] | string[]; } declare const recordSetFields: string[]; /** * Record set for query operations with required embeddings. */ interface QueryRecordSet extends BaseRecordSet { /** Optional array of record IDs to filter by */ ids?: string[]; /** Array of query embedding vectors (required for queries) */ embeddings: number[][]; } type LiteralValue = string | number | boolean; type OperatorExpression = { $gt: LiteralValue; } | { $gte: LiteralValue; } | { $lt: LiteralValue; } | { $lte: LiteralValue; } | { $ne: LiteralValue; } | { $eq: LiteralValue; } | { $and: LiteralValue; } | { $or: LiteralValue; } | { $in: LiteralValue[]; } | { $nin: LiteralValue[]; } | { $contains: LiteralValue; } | { $not_contains: LiteralValue; }; /** * Where clause for filtering records based on metadata. * Supports field equality, comparison operators, and logical operators. */ type Where = { [key: string]: LiteralValue | OperatorExpression; } | { $and: Where[]; } | { $or: Where[]; }; /** * Where clause for filtering based on document content. * Supports text search operators and logical combinations. */ type WhereDocument = { $contains: string; } | { $not_contains: string; } | { $matches: string; } | { $not_matches: string; } | { $regex: string; } | { $not_regex: string; } | { $and: WhereDocument[]; } | { $or: WhereDocument[]; }; /** * Enum specifying which fields to include in query results. */ declare enum IncludeEnum { /** Include similarity distances in results */ distances = "distances", /** Include document text content in results */ documents = "documents", /** Include embedding vectors in results */ embeddings = "embeddings", /** Include metadata objects in results */ metadatas = "metadatas", /** Include URIs in results */ uris = "uris" } /** * Result class for get operations, containing retrieved records. * @template TMeta - The type of metadata associated with records */ declare class GetResult { readonly documents: (string | null)[]; readonly embeddings: number[][]; readonly ids: string[]; readonly include: Include[]; readonly metadatas: (TMeta | null)[]; readonly uris: (string | null)[]; /** * Creates a new GetResult instance. * @param data - The result data containing all fields */ constructor({ documents, embeddings, ids, include, metadatas, uris }: { documents: (string | null)[]; embeddings: number[][]; ids: string[]; include: Include[]; metadatas: (TMeta | null)[]; uris: (string | null)[]; }); /** * Converts the result to a row-based format for easier iteration. * @returns Object containing include fields and array of record objects */ rows(): { id: string; document: string | null | undefined; embedding: number[] | undefined; metadata: TMeta | null | undefined; uri: string | null | undefined; }[]; } /** * Interface for query results in row format. * @template TMeta - The type of metadata associated with records */ interface QueryRowResult { /** Similarity distance to the query (if included) */ distance?: number | null; /** Document text content (if included) */ document?: string | null; /** Embedding vector (if included) */ embedding?: number[] | null; /** Unique record identifier */ id: string; /** Record metadata (if included) */ metadata?: TMeta | null; /** Record URI (if included) */ uri?: string | null; } /** * Result class for query operations, containing search results. * @template TMeta - The type of metadata associated with records */ declare class QueryResult { readonly distances: (number | null)[][]; readonly documents: (string | null)[][]; readonly embeddings: (number[] | null)[][]; readonly ids: string[][]; readonly include: Include[]; readonly metadatas: (TMeta | null)[][]; readonly uris: (string | null)[][]; /** * Creates a new QueryResult instance. * @param data - The query result data containing all fields */ constructor({ distances, documents, embeddings, ids, include, metadatas, uris }: { distances: (number | null)[][]; documents: (string | null)[][]; embeddings: (number[] | null)[][]; ids: string[][]; include: Include[]; metadatas: (TMeta | null)[][]; uris: (string | null)[][]; }); /** * Converts the query result to a row-based format for easier iteration. * @returns Object containing include fields and structured query results */ rows(): QueryRowResult[][]; } /** * Result of a delete operation. */ type DeleteResult = DeleteCollectionRecordsResponse; /** * Re-export IndexStatusResponse type for external use */ type IndexingStatus = IndexStatusResponse; /** * Supported vector space types. */ type EmbeddingFunctionSpace = "cosine" | "l2" | "ip"; /** * Interface for embedding functions. * Embedding functions transform text documents into numerical representations * that can be used for similarity search and other vector operations. */ interface EmbeddingFunction { /** * Generates embeddings for the given texts. * @param texts - Array of text strings to embed * @returns Promise resolving to array of embedding vectors */ generate(texts: string[]): Promise; /** * Generates embeddings specifically for query texts. * The client will fall back to using the implementation of `generate` * if this function is not provided. * @param texts - Array of query text strings to embed * @returns Promise resolving to array of embedding vectors */ generateForQueries?(texts: string[]): Promise; /** Optional name identifier for the embedding function */ name?: string; /** Returns the default vector space for this embedding function */ defaultSpace?(): EmbeddingFunctionSpace; /** Returns all supported vector spaces for this embedding function */ supportedSpaces?(): EmbeddingFunctionSpace[]; /** Creates an instance from configuration object */ buildFromConfig?(config: Record, client?: ChromaClient): EmbeddingFunction; /** Returns the current configuration as an object */ getConfig?(): Record; /** * Validates that a configuration update is allowed. * @param newConfig - New configuration to validate */ validateConfigUpdate?(newConfig: Record): void; /** * Validates that a configuration object is valid. * @param config - Configuration to validate */ validateConfig?(config: Record): void; } /** * Interface for sparse embedding functions. * Sparse embedding functions transform text documents into sparse numerical representations * where only non-zero values are stored, making them efficient for high-dimensional spaces. */ interface SparseEmbeddingFunction { /** * Generates sparse embeddings for the given texts. * @param texts - Array of text strings to embed * @returns Promise resolving to array of sparse vectors */ generate(texts: string[]): Promise; /** * Generates sparse embeddings specifically for query texts. * The client will fall back to using the implementation of `generate` * if this function is not provided. * @param texts - Array of query text strings to embed * @returns Promise resolving to array of sparse vectors */ generateForQueries?(texts: string[]): Promise; /** Optional name identifier for the embedding function */ name?: string; /** Creates an instance from configuration object */ buildFromConfig?(config: Record, client?: ChromaClient): SparseEmbeddingFunction; /** Returns the current configuration as an object */ getConfig?(): Record; /** * Validates that a configuration update is allowed. * @param newConfig - New configuration to validate */ validateConfigUpdate?(newConfig: Record): void; /** * Validates that a configuration object is valid. * @param config - Configuration to validate */ validateConfig?(config: Record): void; } /** * Interface for embedding function constructor classes. * Used for registering and instantiating embedding functions. */ interface EmbeddingFunctionClass { /** Constructor for creating new instances */ new (...args: any[]): EmbeddingFunction; /** Name identifier for the embedding function */ name: string; /** Static method to build instance from configuration */ buildFromConfig(config: Record, client?: ChromaClient): EmbeddingFunction; } /** * Interface for sparse embedding function constructor classes. * Used for registering and instantiating sparse embedding functions. */ interface SparseEmbeddingFunctionClass { /** Constructor for creating new instances */ new (...args: any[]): SparseEmbeddingFunction; /** Name identifier for the embedding function */ name: string; /** Static method to build instance from configuration */ buildFromConfig(config: Record, client?: ChromaClient): SparseEmbeddingFunction; } /** * Registry of available embedding functions. * Maps function names to their constructor classes. */ declare const knownEmbeddingFunctions: Map; /** * Registry of available sparse embedding functions. * Maps function names to their constructor classes. */ declare const knownSparseEmbeddingFunctions: Map; /** * Union type covering both dense and sparse embedding functions. */ type AnyEmbeddingFunction = EmbeddingFunction | SparseEmbeddingFunction; /** * Registers an embedding function in the global registry. * @param name - Unique name for the embedding function * @param fn - Embedding function class to register * @throws ChromaValueError if name is already registered */ declare const registerEmbeddingFunction: (name: string, fn: EmbeddingFunctionClass) => void; /** * Registers a sparse embedding function in the global registry. * @param name - Unique name for the sparse embedding function * @param fn - Sparse embedding function class to register * @throws ChromaValueError if name is already registered */ declare const registerSparseEmbeddingFunction: (name: string, fn: SparseEmbeddingFunctionClass) => void; /** * Retrieves and instantiates an embedding function from configuration. * @returns EmbeddingFunction instance or undefined if it cannot be constructed */ declare const getEmbeddingFunction: (args: { client: ChromaClient; efConfig?: EmbeddingFunctionConfiguration; }) => Promise; /** * Retrieves and instantiates a sparse embedding function from configuration. * @returns SparseEmbeddingFunction instance or undefined if it cannot be constructed */ declare const getSparseEmbeddingFunction: (client: ChromaClient, efConfig?: EmbeddingFunctionConfiguration) => Promise; /** * Serializes an embedding function to configuration format. * @param embeddingFunction - User provided embedding function * @param configEmbeddingFunction - Collection config embedding function * @returns Configuration object that can recreate the function */ declare const serializeEmbeddingFunction: ({ embeddingFunction, configEmbeddingFunction }: { embeddingFunction?: EmbeddingFunction; configEmbeddingFunction?: EmbeddingFunction; }) => EmbeddingFunctionConfiguration | undefined; /** * Gets the configuration for the default embedding function. * Dynamically imports and registers the default embedding function if needed. * @returns Promise resolving to default embedding function configuration * @throws Error if default embedding function cannot be loaded */ declare const getDefaultEFConfig: () => Promise; type WhereJSON = Record; type WhereInput = WhereExpression | WhereJSON | null | undefined; declare abstract class WhereExpressionBase { abstract toJSON(): WhereJSON; and(other: WhereInput): WhereExpression; or(other: WhereInput): WhereExpression; } declare abstract class WhereExpression extends WhereExpressionBase { static from(input: WhereInput): WhereExpression | undefined; } type IterableInput = Iterable | ArrayLike; declare class Key { readonly name: string; static readonly ID: Key; static readonly DOCUMENT: Key; static readonly EMBEDDING: Key; static readonly METADATA: Key; static readonly SCORE: Key; constructor(name: string); eq(value: unknown): WhereExpression; ne(value: unknown): WhereExpression; gt(value: unknown): WhereExpression; gte(value: unknown): WhereExpression; lt(value: unknown): WhereExpression; lte(value: unknown): WhereExpression; isIn(values: IterableInput): WhereExpression; notIn(values: IterableInput): WhereExpression; /** * Contains filter. * * On `Key.DOCUMENT`: substring search (value must be a string). * On metadata fields: checks if the array field contains the scalar value. * * @example * K.DOCUMENT.contains("machine learning") // document substring * K("tags").contains("action") // metadata array contains * K("scores").contains(42) // metadata array contains */ contains(value: string | number | boolean): WhereExpression; /** * Not-contains filter. * * On `Key.DOCUMENT`: excludes documents containing the substring. * On metadata fields: checks that the array field does not contain the scalar value. * * @example * K.DOCUMENT.notContains("deprecated") // document substring exclusion * K("tags").notContains("draft") // metadata array not-contains */ notContains(value: string | number | boolean): WhereExpression; regex(pattern: string): WhereExpression; notRegex(pattern: string): WhereExpression; } interface KeyFactory { (name: string): Key; ID: Key; DOCUMENT: Key; EMBEDDING: Key; METADATA: Key; SCORE: Key; } declare const K: KeyFactory; interface LimitOptions { offset?: number; limit?: number | null | undefined; } type LimitInput = Limit | number | LimitOptions | null | undefined; declare class Limit { readonly offset: number; readonly limit?: number; constructor(options?: LimitOptions); static from(input: LimitInput, offsetOverride?: number): Limit; toJSON(): { offset: number; limit?: number; }; } type SelectKeyInput = string | Key; type SelectInput = Select | Iterable | { keys?: Iterable; } | null | undefined; declare class Select { private readonly keys; constructor(keys?: Iterable); static from(input: SelectInput): Select; static all(): Select; get values(): string[]; toJSON(): { keys: string[]; }; } type RankLiteral = Record; type RankInput = RankExpression | RankLiteral | number | null | undefined; declare abstract class RankExpressionBase { abstract toJSON(): Record; add(...others: RankInput[]): RankExpression; subtract(other: RankInput): RankExpression; multiply(...others: RankInput[]): RankExpression; divide(other: RankInput): RankExpression; negate(): RankExpression; abs(): RankExpression; exp(): RankExpression; log(): RankExpression; max(...others: RankInput[]): RankExpression; min(...others: RankInput[]): RankExpression; } declare abstract class RankExpression extends RankExpressionBase { static from(input: RankInput): RankExpression | undefined; } interface KnnOptions { query: IterableInput | SparseVector | string; key?: string | Key; limit?: number; default?: number | null; returnRank?: boolean; } declare const Val: (value: number) => RankExpression; declare const Knn: (options: KnnOptions) => RankExpression; interface RrfOptions { ranks: RankInput[]; k?: number; weights?: number[]; normalize?: boolean; } declare const Rrf: ({ ranks, k, weights, normalize }: RrfOptions) => RankExpression; declare const Sum: (...inputs: RankInput[]) => RankExpression; declare const Sub: (left: RankInput, right: RankInput) => RankExpression; declare const Mul: (...inputs: RankInput[]) => RankExpression; declare const Div: (left: RankInput, right: RankInput) => RankExpression; declare const Abs: (input: RankInput) => RankExpression; declare const Exp: (input: RankInput) => RankExpression; declare const Log: (input: RankInput) => RankExpression; declare const Max: (...inputs: RankInput[]) => RankExpression; declare const Min: (...inputs: RankInput[]) => RankExpression; interface MinKJSON { keys: string[]; k: number; } interface MaxKJSON { keys: string[]; k: number; } type AggregateJSON = { $min_k: MinKJSON; } | { $max_k: MaxKJSON; }; type AggregateInput = Aggregate | AggregateJSON; declare abstract class Aggregate { abstract toJSON(): AggregateJSON; static from(input: AggregateInput): Aggregate; static minK(keys: (Key | string)[], k: number): MinK; static maxK(keys: (Key | string)[], k: number): MaxK; } declare class MinK extends Aggregate { readonly keys: Key[]; readonly k: number; constructor(keys: Key[], k: number); toJSON(): AggregateJSON; } declare class MaxK extends Aggregate { readonly keys: Key[]; readonly k: number; constructor(keys: Key[], k: number); toJSON(): AggregateJSON; } interface GroupByJSON { keys: string[]; aggregate: AggregateJSON; } type GroupByInput = GroupBy | GroupByJSON; declare class GroupBy { readonly keys: Key[]; readonly aggregate: Aggregate; constructor(keys: Key[], aggregate: Aggregate); static from(input: GroupByInput | undefined): GroupBy | undefined; toJSON(): GroupByJSON; } interface SearchInit { where?: WhereInput; rank?: RankInput; groupBy?: GroupByInput; limit?: LimitInput; select?: SelectInput; } declare class Search { private _where?; private _rank?; private _groupBy?; private _limit; private _select; constructor(init?: SearchInit); private clone; where(where?: WhereInput): Search; rank(rank?: RankInput): Search; groupBy(groupBy?: GroupByInput): Search; limit(limit?: LimitInput, offset?: number): Search; select(keys?: SelectInput): Search; select(...keys: SelectKeyInput[]): Search; selectAll(): Search; get whereClause(): WhereExpression | undefined; get rankExpression(): RankExpression | undefined; get groupByConfig(): GroupBy | undefined; get limitConfig(): Limit; get selectConfig(): Select; toPayload(): SearchPayload; } type SearchLike = Search | SearchInit; declare const toSearch: (input: SearchLike) => Search; interface SearchResultRow { id: string; document?: string | null; embedding?: number[] | null; metadata?: Metadata | null; score?: number | null; } declare class SearchResult { readonly ids: string[][]; readonly documents: Array | null>; readonly embeddings: Array | null> | null>; readonly metadatas: Array | null>; readonly scores: Array | null>; readonly select: SearchResponse["select"]; constructor(response: SearchResponse); rows(): SearchResultRow[][]; } declare const DOCUMENT_KEY = "#document"; declare const EMBEDDING_KEY = "#embedding"; /** * Supported cloud providers for customer-managed encryption keys. * Currently only Google Cloud Platform (GCP) is supported. */ declare enum CmekProvider { GCP = "gcp" } /** * Customer-managed encryption key (CMEK) for collection data encryption. * * CMEK allows you to use your own encryption keys managed by cloud providers' * key management services (KMS) instead of default provider-managed keys. This * gives you greater control over key lifecycle, access policies, and audit logging. * * @example * ```typescript * // Create a CMEK for GCP * const cmek = Cmek.gcp( * "projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key" * ); * * // Validate the resource name format * if (cmek.validatePattern()) { * console.log("Valid CMEK format"); * } * * // Use in collection schema * const schema = new Schema(); * schema.setCmek(cmek); * ``` * * @note Pattern validation only checks format correctness. It does not verify * that the key exists or is accessible. Key permissions and access control * must be configured separately in your cloud provider's console. */ declare class Cmek { private static readonly GCP_PATTERN; readonly provider: CmekProvider; readonly resource: string; private constructor(); /** * Create a CMEK instance for Google Cloud Platform. * * @param resource - GCP Cloud KMS resource name in the format: * projects/{project-id}/locations/{location}/keyRings/{key-ring}/cryptoKeys/{key-name} * * @returns A new CMEK instance configured for GCP * * @example * ```typescript * const cmek = Cmek.gcp( * "projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key" * ); * ``` */ static gcp(resource: string): Cmek; /** * Validate the CMEK resource name format. * * Validates that the resource name matches the expected pattern for the * provider. This is a format check only and does not verify that the key * exists or that you have access to it. * * For GCP, the expected format is: * projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey} * * @returns true if the resource name format is valid, false otherwise * * @example * ```typescript * const cmek = Cmek.gcp("projects/p/locations/l/keyRings/r/cryptoKeys/k"); * cmek.validatePattern(); // Returns true * * const badCmek = Cmek.gcp("invalid-format"); * badCmek.validatePattern(); // Returns false * ``` */ validatePattern(): boolean; /** * Serialize CMEK to object format for API transport. * * Returns an object with the provider variant as the key and resource as the value. * * @returns Object containing the provider variant and resource identifier * * @example * ```typescript * const cmek = Cmek.gcp("projects/p/locations/l/keyRings/r/cryptoKeys/k"); * cmek.toJSON(); * // Returns: { gcp: 'projects/p/locations/l/keyRings/r/cryptoKeys/k' } * ``` */ toJSON(): Record; /** * Deserialize CMEK from object format. * * Expects the provider variant as the key and resource as the value. * * @param data - Object containing provider variant and resource * @returns Deserialized CMEK instance * @throws Error if the provider is unsupported or data is malformed * * @example * ```typescript * const data = { gcp: 'projects/p/locations/l/keyRings/r/cryptoKeys/k' }; * const cmek = Cmek.fromJSON(data); * ``` */ static fromJSON(data: Record): Cmek; } declare class FtsIndexConfig { readonly type = "FtsIndexConfig"; } declare class StringInvertedIndexConfig { readonly type = "StringInvertedIndexConfig"; } declare class IntInvertedIndexConfig { readonly type = "IntInvertedIndexConfig"; } declare class FloatInvertedIndexConfig { readonly type = "FloatInvertedIndexConfig"; } declare class BoolInvertedIndexConfig { readonly type = "BoolInvertedIndexConfig"; } interface VectorIndexConfigOptions { space?: Space | null; embeddingFunction?: EmbeddingFunction | null; sourceKey?: string | Key | null; hnsw?: HnswIndexConfig | null; spann?: SpannIndexConfig | null; } declare class VectorIndexConfig { readonly type = "VectorIndexConfig"; space: Space | null; embeddingFunction?: EmbeddingFunction | null; sourceKey: string | null; hnsw: HnswIndexConfig | null; spann: SpannIndexConfig | null; constructor(options?: VectorIndexConfigOptions); } interface SparseVectorIndexConfigOptions { embeddingFunction?: SparseEmbeddingFunction | null; sourceKey?: string | Key | null; bm25?: boolean | null; } declare class SparseVectorIndexConfig { readonly type = "SparseVectorIndexConfig"; embeddingFunction?: SparseEmbeddingFunction | null; sourceKey: string | null; bm25: boolean | null; constructor(options?: SparseVectorIndexConfigOptions); } declare class FtsIndexType { enabled: boolean; config: FtsIndexConfig; constructor(enabled: boolean, config: FtsIndexConfig); } declare class StringInvertedIndexType { enabled: boolean; config: StringInvertedIndexConfig; constructor(enabled: boolean, config: StringInvertedIndexConfig); } declare class VectorIndexType { enabled: boolean; config: VectorIndexConfig; constructor(enabled: boolean, config: VectorIndexConfig); } declare class SparseVectorIndexType { enabled: boolean; config: SparseVectorIndexConfig; constructor(enabled: boolean, config: SparseVectorIndexConfig); } declare class IntInvertedIndexType { enabled: boolean; config: IntInvertedIndexConfig; constructor(enabled: boolean, config: IntInvertedIndexConfig); } declare class FloatInvertedIndexType { enabled: boolean; config: FloatInvertedIndexConfig; constructor(enabled: boolean, config: FloatInvertedIndexConfig); } declare class BoolInvertedIndexType { enabled: boolean; config: BoolInvertedIndexConfig; constructor(enabled: boolean, config: BoolInvertedIndexConfig); } declare class StringValueType { ftsIndex: FtsIndexType | null; stringInvertedIndex: StringInvertedIndexType | null; constructor(ftsIndex?: FtsIndexType | null, stringInvertedIndex?: StringInvertedIndexType | null); } declare class FloatListValueType { vectorIndex: VectorIndexType | null; constructor(vectorIndex?: VectorIndexType | null); } declare class SparseVectorValueType { sparseVectorIndex: SparseVectorIndexType | null; constructor(sparseVectorIndex?: SparseVectorIndexType | null); } declare class IntValueType { intInvertedIndex: IntInvertedIndexType | null; constructor(intInvertedIndex?: IntInvertedIndexType | null); } declare class FloatValueType { floatInvertedIndex: FloatInvertedIndexType | null; constructor(floatInvertedIndex?: FloatInvertedIndexType | null); } declare class BoolValueType { boolInvertedIndex: BoolInvertedIndexType | null; constructor(boolInvertedIndex?: BoolInvertedIndexType | null); } declare class ValueTypes { string: StringValueType | null; floatList: FloatListValueType | null; sparseVector: SparseVectorValueType | null; intValue: IntValueType | null; floatValue: FloatValueType | null; boolean: BoolValueType | null; } type IndexConfig = FtsIndexConfig | VectorIndexConfig | SparseVectorIndexConfig | StringInvertedIndexConfig | IntInvertedIndexConfig | FloatInvertedIndexConfig | BoolInvertedIndexConfig; type JsonDict = Record; /** * Collection schema for configuring indexes and encryption. * * The schema controls how data is indexed and can optionally specify * customer-managed encryption keys (CMEK) for data at rest. * * @example * ```typescript * const schema = new Schema(); * // Optionally add CMEK * schema.setCmek(Cmek.gcp("projects/p/locations/l/keyRings/r/cryptoKeys/k")); * ``` */ declare class Schema { defaults: ValueTypes; keys: Record; cmek: Cmek | null; constructor(); /** * Set the customer-managed encryption key for this collection. * * CMEK allows you to use your own encryption keys managed by cloud providers' * key management services instead of default provider-managed keys. * * @param cmek - CMEK instance or null to remove encryption * @returns this for method chaining * * @example * ```typescript * const schema = new Schema(); * schema.setCmek(Cmek.gcp( * "projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key" * )); * ``` */ setCmek(cmek: Cmek | null): this; createIndex(config?: IndexConfig, key?: string): this; deleteIndex(config?: IndexConfig, key?: string): this; serializeToJSON(): Schema$1; static deserializeFromJSON(json: Schema$1 | JsonDict | null, client: ChromaClient): Promise; private setVectorIndexConfig; private setIndexInDefaults; private setIndexForKey; private enableAllIndexesForKey; private disableAllIndexesForKey; private validateSparseVectorConfig; private initializeDefaults; private initializeKeys; private serializeValueTypes; private serializeStringValueType; private serializeFloatListValueType; private serializeSparseVectorValueType; private serializeIntValueType; private serializeFloatValueType; private serializeBoolValueType; private serializeConfig; private serializeVectorConfig; private serializeSparseVectorConfig; private static deserializeValueTypes; private static deserializeStringValueType; private static deserializeFloatListValueType; private static deserializeSparseVectorValueType; private static deserializeIntValueType; private static deserializeFloatValueType; private static deserializeBoolValueType; private static deserializeVectorConfig; private static deserializeSparseVectorConfig; resolveEmbeddingFunction(): EmbeddingFunction | null | undefined; } interface CollectionConfiguration { embeddingFunction?: EmbeddingFunctionConfiguration | null; hnsw?: HNSWConfiguration | null; spann?: SpannConfiguration | null; } type HNSWConfiguration = HnswConfiguration & { batch_size?: number | null; num_threads?: number | null; }; type CreateCollectionConfiguration = Omit & { embeddingFunction?: EmbeddingFunction; }; interface UpdateCollectionConfiguration { embeddingFunction?: EmbeddingFunction; hnsw?: UpdateHNSWConfiguration; spann?: UpdateSPANNConfiguration; } interface UpdateHNSWConfiguration { batch_size?: number; ef_search?: number; num_threads?: number; resize_factor?: number; sync_threshold?: number; } interface UpdateSPANNConfiguration { search_nprobe?: number; ef_search?: number; } /** * Validate user provided collection configuration and embedding function. Returns a * CollectionConfiguration to be used in collection creation. */ declare const processCreateCollectionConfig: ({ configuration, embeddingFunction, metadata, schema }: { configuration?: CreateCollectionConfiguration; embeddingFunction?: EmbeddingFunction | null; metadata?: CollectionMetadata; schema?: Schema; }) => Promise; /** * */ declare const processUpdateCollectionConfig: ({ collectionName, currentConfiguration, currentEmbeddingFunction, newConfiguration, client }: { collectionName: string; currentConfiguration: CollectionConfiguration; currentEmbeddingFunction?: EmbeddingFunction; newConfiguration: UpdateCollectionConfiguration; client: ChromaClient; }) => Promise<{ updateConfiguration?: UpdateCollectionConfiguration$1; updateEmbeddingFunction?: EmbeddingFunction; }>; /** * Configuration options for the ChromaClient. */ interface ChromaClientArgs { /** The host address of the Chroma server. Defaults to 'localhost' */ host?: string; /** The port number of the Chroma server. Defaults to 8000 */ port?: number; /** Whether to use SSL/HTTPS for connections. Defaults to false */ ssl?: boolean; /** The tenant name in the Chroma server to connect to */ tenant?: string; /** The database name to connect to */ database?: string; /** Additional HTTP headers to send with requests */ headers?: Record; /** Additional fetch options for HTTP requests */ fetchOptions?: RequestInit; /** @deprecated Use host, port, and ssl instead */ path?: string; /** @deprecated */ auth?: Record; } /** * Main client class for interacting with ChromaDB. * Provides methods for managing collections and performing operations on them. */ declare class ChromaClient { private _tenant; private _database; private _preflightChecks; private _headers; private readonly apiClient; /** * Creates a new ChromaClient instance. * @param args - Configuration options for the client */ constructor(args?: Partial); /** * Gets the current tenant name. * @returns The tenant name or undefined if not set */ get tenant(): string | undefined; protected set tenant(tenant: string | undefined); /** * Gets the current database name. * @returns The database name or undefined if not set */ get database(): string | undefined; protected set database(database: string | undefined); /** * Gets the preflight checks * @returns The preflight checks or undefined if not set */ get preflightChecks(): ChecklistResponse | undefined; protected set preflightChecks(preflightChecks: ChecklistResponse | undefined); get headers(): Record | undefined; /** @ignore */ _path(): Promise<{ tenant: string; database: string; }>; /** * Gets the user identity information including tenant and accessible databases. * @returns Promise resolving to user identity data */ getUserIdentity(): Promise; /** * Sends a heartbeat request to check server connectivity. * @returns Promise resolving to the server's nanosecond heartbeat timestamp */ heartbeat(): Promise; /** * Lists all collections in the current database. * @param args - Optional pagination parameters * @param args.limit - Maximum number of collections to return (default: 100) * @param args.offset - Number of collections to skip (default: 0) * @returns Promise resolving to an array of Collection instances */ listCollections(args?: Partial<{ limit: number; offset: number; }>): Promise; /** * Gets the total number of collections in the current database. * @returns Promise resolving to the collection count */ countCollections(): Promise; /** * Creates a new collection with the specified configuration. * @param options - Collection creation options * @param options.name - The name of the collection * @param options.configuration - Optional collection configuration * @param options.metadata - Optional metadata for the collection * @param options.embeddingFunction - Optional embedding function to use. Defaults to `DefaultEmbeddingFunction` from @chroma-core/default-embed * @returns Promise resolving to the created Collection instance * @throws Error if a collection with the same name already exists */ createCollection({ name, configuration, metadata, embeddingFunction, schema }: { name: string; configuration?: CreateCollectionConfiguration; metadata?: CollectionMetadata; embeddingFunction?: EmbeddingFunction | null; schema?: Schema; }): Promise; /** * Retrieves an existing collection by name. * @param options - Collection retrieval options * @param options.name - The name of the collection to retrieve * @param options.embeddingFunction - Optional embedding function. Should match the one used to create the collection. * @returns Promise resolving to the Collection instance * @throws Error if the collection does not exist */ getCollection({ name, embeddingFunction }: { name: string; embeddingFunction?: EmbeddingFunction; }): Promise; /** * Retrieves an existing collection by its Chroma Resource Name (CRN). * @param crn - The Chroma Resource Name of the collection to retrieve * @returns Promise resolving to the Collection instance * @throws Error if the collection does not exist */ getCollectionByCrn(crn: string): Promise; /** * Retrieves an existing collection by its ID. * @param id - The UUID of the collection to retrieve * @returns Promise resolving to the Collection instance * @throws Error if the collection does not exist */ getCollectionById(id: string): Promise; /** * Retrieves multiple collections by name. * @param items - Array of collection names or objects with name and optional embedding function (should match the ones used to create the collections) * @returns Promise resolving to an array of Collection instances */ getCollections(items: string[] | { name: string; embeddingFunction?: EmbeddingFunction; }[]): Promise; /** * Gets an existing collection or creates it if it doesn't exist. * @param options - Collection options * @param options.name - The name of the collection * @param options.configuration - Optional collection configuration (used only if creating) * @param options.metadata - Optional metadata for the collection (used only if creating) * @param options.embeddingFunction - Optional embedding function to use * @returns Promise resolving to the Collection instance */ getOrCreateCollection({ name, configuration, metadata, embeddingFunction, schema }: { name: string; configuration?: CreateCollectionConfiguration; metadata?: CollectionMetadata; embeddingFunction?: EmbeddingFunction | null; schema?: Schema; }): Promise; /** * Returns a lightweight collection handle for the given collection ID. * The handle supports operations that don't require an embedding function * or schema (e.g., add with pre-computed embeddings, get, delete, count, search). * Operations that require an embedding function will throw a clear error * directing you to use {@link getCollection} instead. * @param id - The collection ID * @returns A Collection handle for the given ID * @throws ChromaValueError if tenant or database are not set on the client */ collection(id: string): Collection; /** * Deletes a collection and all its data. * @param options - Deletion options * @param options.name - The name of the collection to delete */ deleteCollection({ name }: { name: string; }): Promise; /** * Resets the entire database, deleting all collections and data. * @returns Promise that resolves when the reset is complete * @warning This operation is irreversible and will delete all data */ reset(): Promise; /** * Gets the version of the Chroma server. * @returns Promise resolving to the server version string */ version(): Promise; /** * Gets the preflight checks * @returns Promise resolving to the preflight checks */ getPreflightChecks(): Promise; /** * Gets the max batch size * @returns Promise resolving to the max batch size */ getMaxBatchSize(): Promise; /** * Gets whether base64_encoding is supported by the connected server * @returns Promise resolving to whether base64_encoding is supported */ supportsBase64Encoding(): Promise; } /** * Interface for collection operations using collection ID. * Provides methods for adding, querying, updating, and deleting records. */ interface Collection { /** Tenant name */ tenant: string; /** Database name */ database: string; /** Unique identifier for the collection */ id: string; /** Name of the collection */ name: string; /** Collection-level metadata */ metadata: CollectionMetadata | undefined; /** Collection configuration settings */ configuration: CollectionConfiguration; /** Optional embedding function. Must match the one used to create the collection. */ embeddingFunction?: EmbeddingFunction; /** Collection schema describing index configuration */ schema?: Schema; /** * Gets the total number of records in the collection. * @param options - Optional settings */ count(options?: { /** * Controls whether to read from the write-ahead log. * - ReadLevel.INDEX_AND_WAL: Read from both index and WAL (default) * - ReadLevel.INDEX_ONLY: Read only from index, faster but recent writes may not be visible * - ReadLevel.INDEX_AND_BOUNDED_WAL: Read up to a server-configured number of WAL entries */ readLevel?: ReadLevel; }): Promise; /** * Adds new records to the collection. * @param args - Record data to add */ add(args: { /** Unique identifiers for the records */ids: string[]; /** Optional pre-computed embeddings */ embeddings?: number[][]; /** Optional metadata for each record */ metadatas?: Metadata[]; /** Optional document text (will be embedded if embeddings not provided) */ documents?: string[]; /** Optional URIs for the records */ uris?: string[]; }): Promise; /** * Retrieves records from the collection based on filters. * @template TMeta - Type of metadata for type safety * @param args - Query parameters for filtering records * @returns Promise resolving to matching records */ get(args?: { /** Specific record IDs to retrieve */ids?: string[]; /** Metadata-based filtering conditions */ where?: Where; /** Maximum number of records to return */ limit?: number; /** Number of records to skip */ offset?: number; /** Document content-based filtering conditions */ whereDocument?: WhereDocument; /** Fields to include in the response */ include?: Include[]; }): Promise>; /** * Retrieves a preview of records from the collection. * @param args - Preview options * @returns Promise resolving to a sample of records */ peek(args: { limit?: number; }): Promise; /** * Performs similarity search on the collection. * @template TMeta - Type of metadata for type safety * @param args - Query parameters for similarity search * @returns Promise resolving to similar records ranked by distance */ query(args: { /** Pre-computed query embedding vectors */queryEmbeddings?: number[][]; /** Query text to be embedded and searched */ queryTexts?: string[]; /** Query URIs to be processed */ queryURIs?: string[]; /** Filter to specific record IDs */ ids?: string[]; /** Maximum number of results per query (default: 10) */ nResults?: number; /** Metadata-based filtering conditions */ where?: Where; /** Full-text search conditions */ whereDocument?: WhereDocument; /** Fields to include in the response */ include?: Include[]; }): Promise>; /** * Modifies collection properties like name, metadata, or configuration. * @param args - Properties to update */ modify(args: { /** New name for the collection */name?: string; /** New metadata for the collection */ metadata?: CollectionMetadata; /** New configuration settings */ configuration?: UpdateCollectionConfiguration; }): Promise; /** * Creates a copy of the collection with a new name. * @param args - Fork options * @returns Promise resolving to the new Collection instance */ fork({ name }: { name: string; }): Promise; /** * Gets the number of forks for this collection. * @returns Promise resolving to the number of forks */ forkCount(): Promise; /** * Updates existing records in the collection. * @param args - Record data to update */ update(args: { /** IDs of records to update */ids: string[]; /** New embedding vectors */ embeddings?: number[][]; /** New metadata */ metadatas?: Metadata[]; /** New document text */ documents?: string[]; /** New URIs */ uris?: string[]; }): Promise; /** * Inserts new records or updates existing ones (upsert operation). * @param args - Record data to upsert */ upsert(args: { /** IDs of records to upsert */ids: string[]; /** Embedding vectors */ embeddings?: number[][]; /** Metadata */ metadatas?: Metadata[]; /** Document text */ documents?: string[]; /** URIs */ uris?: string[]; }): Promise; /** * Deletes records from the collection based on filters. * @param args - Deletion criteria */ delete(args: { /** Specific record IDs to delete */ids?: string[]; /** Metadata-based filtering for deletion */ where?: Where; /** Document content-based filtering for deletion */ whereDocument?: WhereDocument; /** Maximum number of records to delete. Can only be used with where or whereDocument filters. */ limit?: number; }): Promise; /** * Performs hybrid search on the collection using expression builders. * @param searches - Single search payload or array of payloads * @param options * @returns Promise resolving to column-major search results */ search(searches: SearchLike | SearchLike[], options?: { /** * Controls whether to read from the write-ahead log. * - ReadLevel.INDEX_AND_WAL: Read from both index and WAL (default) * - ReadLevel.INDEX_ONLY: Read only from index, faster but recent writes may not be visible * - ReadLevel.INDEX_AND_BOUNDED_WAL: Read up to a server-configured number of WAL entries */ readLevel?: ReadLevel; }): Promise; /** * Gets the indexing status of the collection. * @returns Promise resolving to indexing status information */ getIndexingStatus(): Promise; } /** * Arguments for creating a Collection instance. */ interface CollectionArgs { /** ChromaDB client instance */ chromaClient: ChromaClient; /** HTTP API client */ apiClient: ReturnType; /** Collection name */ name: string; /** Collection ID */ id: string; /** Tenant name */ tenant: string; /** Database name */ database: string; /** Embedding function for the collection */ embeddingFunction?: EmbeddingFunction; /** Collection configuration */ configuration: CollectionConfiguration; /** Optional collection metadata */ metadata?: CollectionMetadata; /** Optional schema returned by the server */ schema?: Schema; } /** * Implementation of CollectionAPI for ID-based collection operations. * Provides core functionality for interacting with collections using their ID. */ declare class CollectionImpl implements Collection { protected readonly chromaClient: ChromaClient; protected readonly apiClient: ReturnType; readonly id: string; readonly tenant: string; readonly database: string; private _name; private _metadata; private _configuration; protected _embeddingFunction: EmbeddingFunction | undefined; protected _schema: Schema | undefined; /** * Creates a new CollectionAPIImpl instance. * @param options - Configuration for the collection API */ constructor({ chromaClient, apiClient, id, tenant, database, name, metadata, configuration, embeddingFunction, schema }: CollectionArgs); get name(): string; private set name(value); get configuration(): CollectionConfiguration; private set configuration(value); get metadata(): CollectionMetadata | undefined; private set metadata(value); get embeddingFunction(): EmbeddingFunction | undefined; protected set embeddingFunction(embeddingFunction: EmbeddingFunction | undefined); get schema(): Schema | undefined; protected set schema(schema: Schema | undefined); protected path(): Promise<{ tenant: string; database: string; collection_id: string; }>; private embed; private sparseEmbed; private getSparseEmbeddingTargets; private applySparseEmbeddingsToMetadatas; private embedKnnLiteral; private embedRankLiteral; private embedSearchPayload; private getSchemaEmbeddingFunction; private prepareRecords; private validateGet; private prepareQuery; private validateDelete; count(options?: { readLevel?: ReadLevel; }): Promise; add({ ids, embeddings, metadatas, documents, uris }: { ids: string[]; embeddings?: number[][]; metadatas?: Metadata[]; documents?: string[]; uris?: string[]; }): Promise; get(args?: Partial<{ ids?: string[]; where?: Where; limit?: number; offset?: number; whereDocument?: WhereDocument; include?: Include[]; }>): Promise>; peek({ limit }: { limit?: number; }): Promise; query({ queryEmbeddings, queryTexts, queryURIs, ids, nResults, where, whereDocument, include }: { queryEmbeddings?: number[][]; queryTexts?: string[]; queryURIs?: string[]; ids?: string[]; nResults?: number; where?: Where; whereDocument?: WhereDocument; include?: Include[]; }): Promise>; search(searches: SearchLike | SearchLike[], options?: { readLevel?: ReadLevel; }): Promise; modify({ name, metadata, configuration }: { name?: string; metadata?: CollectionMetadata; configuration?: UpdateCollectionConfiguration; }): Promise; fork({ name }: { name: string; }): Promise; forkCount(): Promise; update({ ids, embeddings, metadatas, documents, uris }: { ids: string[]; embeddings?: number[][]; metadatas?: Metadata[]; documents?: string[]; uris?: string[]; }): Promise; upsert({ ids, embeddings, metadatas, documents, uris }: { ids: string[]; embeddings?: number[][]; metadatas?: Metadata[]; documents?: string[]; uris?: string[]; }): Promise; delete({ ids, where, whereDocument, limit }: { ids?: string[]; where?: Where; whereDocument?: WhereDocument; limit?: number; }): Promise; getIndexingStatus(): Promise; } /** * Arguments for creating a CollectionHandle instance. */ interface CollectionHandleArgs { /** ChromaDB client instance */ chromaClient: ChromaClient; /** HTTP API client */ apiClient: ReturnType; /** Collection ID */ id: string; /** Tenant name */ tenant: string; /** Database name */ database: string; } /** * A lightweight collection handle that holds only the collection ID and * client context. Supports operations that don't require an embedding * function or schema. Obtained via {@link ChromaClient.collection}. */ declare class CollectionHandle extends CollectionImpl { constructor({ chromaClient, apiClient, id, tenant, database }: CollectionHandleArgs); add(args: { ids: string[]; embeddings?: number[][]; metadatas?: Metadata[]; documents?: string[]; uris?: string[]; }): Promise; update(args: { ids: string[]; embeddings?: number[][]; metadatas?: Metadata[]; documents?: string[]; uris?: string[]; }): Promise; upsert(args: { ids: string[]; embeddings?: number[][]; metadatas?: Metadata[]; documents?: string[]; uris?: string[]; }): Promise; query(args: { queryEmbeddings?: number[][]; queryTexts?: string[]; queryURIs?: string[]; ids?: string[]; nResults?: number; where?: Where; whereDocument?: WhereDocument; include?: Include[]; }): Promise>; search(searches: SearchLike | SearchLike[], options?: { readLevel?: ReadLevel; }): Promise; modify(_args: { name?: string; metadata?: CollectionMetadata; configuration?: UpdateCollectionConfiguration; }): Promise; fork(_args: { name: string; }): Promise; private hasStringKnnQuery; } declare function withChroma(userNextConfig?: any): any; /** * Configuration options for the AdminClient. */ interface AdminClientArgs { /** The host address of the Chroma server */ host: string; /** The port number of the Chroma server */ port: number; /** Whether to use SSL/HTTPS for connections */ ssl: boolean; /** Additional HTTP headers to send with requests */ headers?: Record; /** Additional fetch options for HTTP requests */ fetchOptions?: RequestInit; } /** * Arguments for listing databases within a tenant. */ interface ListDatabasesArgs { /** The tenant name to list databases for */ tenant: string; /** Maximum number of databases to return (default: 100) */ limit?: number; /** Number of databases to skip (default: 0) */ offset?: number; } /** * Administrative client for managing ChromaDB tenants and databases. * Provides methods for creating, deleting, and listing tenants and databases. */ declare class AdminClient { private readonly apiClient; /** * Creates a new AdminClient instance. * @param args - Optional configuration for the admin client */ constructor(args?: AdminClientArgs); /** * Creates a new database within a tenant. * @param options - Database creation options * @param options.name - Name of the database to create * @param options.tenant - Tenant that will own the database */ createDatabase({ name, tenant }: { name: string; tenant: string; }): Promise; /** * Retrieves information about a specific database. * @param options - Database retrieval options * @param options.name - Name of the database to retrieve * @param options.tenant - Tenant that owns the database * @returns Promise resolving to database information */ getDatabase({ name, tenant }: { name: string; tenant: string; }): Promise; /** * Deletes a database and all its data. * @param options - Database deletion options * @param options.name - Name of the database to delete * @param options.tenant - Tenant that owns the database * @warning This operation is irreversible and will delete all data */ deleteDatabase({ name, tenant }: { name: string; tenant: string; }): Promise; /** * Lists all databases within a tenant. * @param args - Listing parameters including tenant and pagination * @returns Promise resolving to an array of database information */ listDatabases(args: ListDatabasesArgs): Promise; /** * Creates a new tenant. * @param options - Tenant creation options * @param options.name - Name of the tenant to create */ createTenant({ name }: { name: string; }): Promise; /** * Retrieves information about a specific tenant. * @param options - Tenant retrieval options * @param options.name - Name of the tenant to retrieve * @returns Promise resolving to the tenant name */ getTenant({ name }: { name: string; }): Promise; } /** * ChromaDB cloud client for connecting to hosted Chroma instances. * Extends ChromaClient with cloud-specific authentication and configuration. */ declare class CloudClient extends ChromaClient { /** * Creates a new CloudClient instance for Chroma Cloud. * @param args - Cloud client configuration options */ constructor(args?: Partial<{ /** API key for authentication (or set CHROMA_API_KEY env var) */apiKey?: string; /** Host address of the Chroma cloud server. Defaults to 'api.trychroma.com' */ host?: string; /** Port number of the Chroma cloud server. Defaults to 443 */ port?: number; /** Tenant name for multi-tenant deployments */ tenant?: string; /** Database name to connect to */ database?: string; /** Additional fetch options for HTTP requests */ fetchOptions?: RequestInit; }>); } /** * Admin client for Chroma Cloud administrative operations. * Extends AdminClient with cloud-specific authentication. */ declare class AdminCloudClient extends AdminClient { /** * Creates a new AdminCloudClient instance for cloud admin operations. * @param args - Admin cloud client configuration options */ constructor(args?: Partial<{ /** API key for authentication (or set CHROMA_API_KEY env var) */apiKey?: string; /** Host address of the Chroma cloud server. Defaults to 'api.trychroma.com' */ host?: string; /** Port number of the Chroma cloud server. Defaults to 443 */ port?: number; /** Additional fetch options for HTTP requests */ fetchOptions?: RequestInit; }>); } /** * This is a generic Chroma error. */ declare class ChromaError extends Error { readonly cause?: unknown | undefined; constructor(name: string, message: string, cause?: unknown | undefined); } /** * Indicates that there was a problem with the connection to the Chroma server (e.g. the server is down or the client is not connected to the internet) */ declare class ChromaConnectionError extends Error { readonly cause?: unknown | undefined; name: string; constructor(message: string, cause?: unknown | undefined); } /** Indicates that the server encountered an error while handling the request. */ declare class ChromaServerError extends Error { readonly cause?: unknown | undefined; name: string; constructor(message: string, cause?: unknown | undefined); } /** Indicate that there was an issue with the request that the client made. */ declare class ChromaClientError extends Error { readonly cause?: unknown | undefined; name: string; constructor(message: string, cause?: unknown | undefined); } /** The request lacked valid authentication. */ declare class ChromaUnauthorizedError extends Error { readonly cause?: unknown | undefined; name: string; constructor(message: string, cause?: unknown | undefined); } /** The user does not have permission to access the requested resource. */ declare class ChromaForbiddenError extends Error { readonly cause?: unknown | undefined; name: string; constructor(message: string, cause?: unknown | undefined); } declare class ChromaNotFoundError extends Error { readonly cause?: unknown | undefined; name: string; constructor(message: string, cause?: unknown | undefined); } declare class ChromaValueError extends Error { readonly cause?: unknown | undefined; name: string; constructor(message: string, cause?: unknown | undefined); } declare class InvalidCollectionError extends Error { readonly cause?: unknown | undefined; name: string; constructor(message: string, cause?: unknown | undefined); } declare class InvalidArgumentError extends Error { readonly cause?: unknown | undefined; name: string; constructor(message: string, cause?: unknown | undefined); } declare class ChromaUniqueError extends Error { readonly cause?: unknown | undefined; name: string; constructor(message: string, cause?: unknown | undefined); } declare class ChromaQuotaExceededError extends Error { readonly cause?: unknown | undefined; name: string; constructor(message: string, cause?: unknown | undefined); } declare class ChromaRateLimitError extends Error { readonly cause?: unknown | undefined; name: string; constructor(message: string, cause?: unknown | undefined); } declare function createErrorByType(type: string, message: string): InvalidCollectionError | InvalidArgumentError | undefined; //#endregion //#region src/opentelemetry-lib/interfaces/initialize-options.interface.d.ts /** * Options for initializing the Traceloop SDK. */ interface InitializeOptions { /** * The API Key for sending traces data. Optional. */ apiKey?: string; /** * The Laminar API endpoint for sending traces data. Optional. * Defaults to https://api.lmnr.ai:8443 */ baseUrl?: string; /** * The Laminar API HTTP endpoint for sending traces data. Optional. * Defaults to baseUrl. Only use this if you want to proxy HTTP requests * through a different host. */ baseHttpUrl?: string; /** * Whether to disable batching. Optional. * Defaults to false. */ disableBatch?: boolean; /** * The OTLP gRPC port for sending traces data. Optional. * Defaults to 8443. */ port?: number; /** * The HTTP port for sending traces data. Optional. * Defaults to 443. */ httpPort?: number; /** * Whether to use HTTP for sending traces data. NOT RECOMMENDED. Optional. * Defaults to false. */ forceHttp?: boolean; /** * Defines default log level for SDK and all instrumentations. Optional. * Defaults to error. */ logLevel?: "debug" | "info" | "warn" | "error"; /** * Whether to log prompts, completions and embeddings on traces. Optional. * Defaults to true. */ traceContent?: boolean; /** * The modules to instrument. Optional. Suggested to use, if you don't see * the autoinstrumentation working. */ instrumentModules?: { /** * @deprecated Use `OpenAI` instead for consistent casing. */ openAI?: any; /** * @example * ```javascript * import { OpenAI } from "openai"; * import Laminar from "@lmnr-ai/lmnr"; * * Laminar.initialize({ * instrumentModules: { OpenAI: OpenAI }, * }); * ``` */ OpenAI?: any; /** * @example * ```javascript * import anthropic from "@anthropic-ai/sdk"; * import Laminar from "@lmnr-ai/lmnr"; * * Laminar.initialize({ * instrumentModules: { anthropic }, * }); * ``` */ anthropic?: any; /** * @deprecated Azure OpenAI instrumentation is no longer supported. * This is a no-op and will be removed. * @example * ```javascript * import azureOpenAI from "@azure/openai"; * import Laminar from "@lmnr-ai/lmnr"; * * Laminar.initialize({ * instrumentModules: { azureOpenAI }, * }); * ``` */ azureOpenAI?: any; /** * @example * ```javascript * import cohere from "cohere-ai"; * import Laminar from "@lmnr-ai/lmnr"; * * Laminar.initialize({ * instrumentModules: { cohere }, * }); * ``` */ cohere?: any; /** * @example * ```javascript * import bedrock from "@aws-sdk/client-bedrock-runtime"; * import Laminar from "@lmnr-ai/lmnr"; * * Laminar.initialize({ * instrumentModules: { bedrock }, * }); * ``` */ bedrock?: typeof index_d_exports$3; /** * @example * ```javascript * import pinecone from "@pinecone-database/pinecone"; * import Laminar from "@lmnr-ai/lmnr"; * * Laminar.initialize({ * instrumentModules: { pinecone }, * }); * ``` */ pinecone?: typeof index_d_exports$1; /** * @example * ```javascript * import ChainsModule from "langchain/chains"; * import Laminar from "@lmnr-ai/lmnr"; * * Laminar.initialize({ * instrumentModules: { * langchain: { * chainsModule: ChainsModule, * }, * }, * }); * ``` */ langchain?: { callbackManagerModule?: any; }; /** * @deprecated llamaIndex JS package is deprecated. This is a no-op and will be removed * @example * ```javascript * import llamaindex from "llamaindex"; * import Laminar from "@lmnr-ai/lmnr"; * * Laminar.initialize({ * instrumentModules: { llamaindex }, * }); * ``` */ llamaIndex?: any; /** * @example * ```javascript * import chromadb from "chromadb"; * import Laminar from "@lmnr-ai/lmnr"; * * Laminar.initialize({ * instrumentModules: { chromadb }, * }); * ``` */ chromadb?: typeof chromadb_d_exports; /** * @example * ```javascript * import qdrant from "@qdrant/js-client-rest"; * import Laminar from "@lmnr-ai/lmnr"; * * Laminar.initialize({ * instrumentModules: { qdrant }, * }); * ``` */ qdrant?: typeof index_d_exports; /** * @example * ```javascript * import { chromium } from "playwright"; * import Laminar from "@lmnr-ai/lmnr"; * * Laminar.initialize({ * instrumentModules: { * playwright: { * chromium, * }, * }, * }); * ``` */ playwright?: { chromium?: typeof playwright.chromium; firefox?: typeof playwright.firefox; webkit?: typeof playwright.webkit; }; /** * @example * ```javascript * import puppeteer from "puppeteer"; * import Laminar from "@lmnr-ai/lmnr"; * * Laminar.initialize({ * instrumentModules: { puppeteer }, * }); * ``` */ puppeteer?: typeof puppeteer; /** * @example * ```javascript * import together from "together-ai"; * import Laminar from "@lmnr-ai/lmnr"; * * Laminar.initialize({ * instrumentModules: { together }, * }); * ``` */ together?: any; /** * @example * ```javascript * import { GoogleGenAI } from "@google/genai"; * import Laminar from "@lmnr-ai/lmnr"; * * Laminar.initialize({ * instrumentModules: { google_genai: GoogleGenAI }, * }); * ``` * * // Also supported: * // import * as genai from "@google/genai"; * // instrumentModules: { google_genai: genai } */ google_genai?: any; /** * @example * ```javascript * import { OpenRouter } from "@openrouter/sdk"; * import Laminar from "@lmnr-ai/lmnr"; * * Laminar.initialize({ * instrumentModules: { openrouter: OpenRouter }, * }); * ``` */ openrouter?: any; /** * @example * ```javascript * import { TypeSafeClient } from "@typesafe-ai/sdk"; * import Laminar from "@lmnr-ai/lmnr"; * * Laminar.initialize({ * instrumentModules: { typesafe: TypeSafeClient }, * }); * ``` */ typesafe?: any; /** * @example * ```javascript * import kernel from "@onkernel/sdk"; * import Laminar from "@lmnr-ai/lmnr"; * * Laminar.initialize({ * instrumentModules: { kernel }, * }); * ``` */ kernel?: any; /** * Note: When you import query before Laminar.initialize(), * OR if you have "type": "module" in your package.json, * use Laminar.instrumentClaudeAgentQuery() * to get the instrumented version, as your import reference won't be automatically wrapped. * * @example * ```javascript * * Laminar.initialize({ * instrumentModules: { * claudeAgentSDK: { * query, * }, * }, * }); * ``` */ claudeAgentSDK?: { query?: any; }; /** * @example * ```javascript * import Stagehand from "@browserbasehq/stagehand"; * import { OpenAI } from "openai"; * import Laminar from "@lmnr-ai/lmnr"; * * Laminar.initialize({ * instrumentModules: { * stagehand: Stagehand, * OpenAI: OpenAI, * }, * }); * ``` */ stagehand?: any; /** * @example * ```javascript * import * as opencode from "@opencode-ai/sdk"; * import Laminar from "@lmnr-ai/lmnr"; * * Laminar.initialize({ * instrumentModules: { * opencode: opencode, * }, * }); * ``` */ opencode?: any; /** * @example * ```javascript * import * as agents from "@openai/agents"; * import Laminar from "@lmnr-ai/lmnr"; * * Laminar.initialize({ * instrumentModules: { * openAIAgents: agents, * }, * }); * ``` */ openAIAgents?: any; /** * Auto-patch Temporal Worker and Client so that every `Worker.create()` and * `new Client()` call automatically includes Laminar's interceptors for * distributed trace context propagation. * * Pass the `@temporalio/worker` module as `worker` and the `Client` class * from `@temporalio/client` as `Client`. Both are optional — omit one to * skip patching that side. * * @example * ```typescript * import * as temporalWorker from '@temporalio/worker'; * import * as temporalClient from '@temporalio/client'; * import { Laminar } from '@lmnr-ai/lmnr'; * * Laminar.initialize({ * instrumentModules: { * temporal: { worker: temporalWorker, client: temporalClient }, * }, * }); * * // Now every Worker.create() and new temporalClient.Client() include * // Laminar interceptors. * const worker = await temporalWorker.Worker.create({ ... }); * const client = new temporalClient.Client({ ... }); * ``` */ temporal?: { /** The `@temporalio/worker` module (import * as temporalWorker from '@temporalio/worker') */worker?: any; /** The `@temporalio/client` module (import * as temporalClient from '@temporalio/client') */ client?: any; /** * If true (default), wrap each activity execution in a Laminar span. * Set to false to only restore the parent context. */ createActivitySpan?: boolean; /** * If true (default), record activity arguments as the activity span * input. Set to false to omit them. Ignored when `createActivitySpan` * is false. */ recordActivityArgs?: boolean; /** * If true (default), record the activity return value as the activity * span output. Set to false to omit it. Ignored when * `createActivitySpan` is false. */ recordActivityOutput?: boolean; }; }; /** * Whether to silence the initialization message. Optional. * Defaults to false. */ silenceInitializationMessage?: boolean; /** * Whether to reset the configuration. Optional. * Defaults to false. */ _resetConfiguration?: boolean; /** * The maximum number of spans to export at a time. Optional. * Defaults to the default OTLP span processor batch size. * (512 at the time of writing) */ maxExportBatchSize?: number; /** * Approximate maximum size, in bytes, of the spans buffered in a single batch. * Only used when `flushBySize` is true. Optional. * Defaults to 32 MiB. */ maxExportBatchSizeBytes?: number; /** * Whether to also flush batches by approximate payload size, in addition to * span count and schedule delay. Useful when spans carry large prompts or * completions and exports get rejected for being too big. Optional. * Defaults to false. */ flushBySize?: boolean; /** * The timeout for sending traces data. Optional. * Defaults to 30 seconds. */ traceExportTimeoutMillis?: number; /** * The exporter to use. Warning: many other options will be ignored if this is provided. Optional. * Defaults to a new LaminarSpanExporter. */ exporter?: SpanExporter; /** * Options for browser session recording. Currently supports 'maskInputOptions' * to control whether input fields are masked during recording. * Defaults to undefined (uses default masking behavior). */ sessionRecordingOptions?: SessionRecordingOptions; /** * The span processor to use. Warning: many other options will be ignored if this is provided. * Optional. Defaults to a new LaminarSpanProcessor. */ spanProcessor?: SpanProcessor; } //#endregion //#region src/utils.d.ts type StringUUID = `${string}-${string}-${string}-${string}-${string}`; //#endregion //#region src/evaluations.d.ts declare global { var _evaluations: Evaluation[] | undefined; var _set_global_evaluation: boolean; } /** * Configuration for the Evaluator */ interface EvaluationConfig { /** * The number of data points to evaluate in parallel at a time. Defaults to 5. */ concurrencyLimit?: number; /** * The project API key to use for the evaluation. If not provided, * the API key from the environment variable `LMNR_PROJECT_API_KEY` will be used. */ projectApiKey?: string; /** * The base URL of the Laminar API. If not provided, the default is * `https://api.lmnr.ai`. Useful with self-hosted Laminar instances. * Do NOT include the port in the URL, use `httpPort` and `grpcPort` instead. */ baseUrl?: string; /** * The base HTTP URL of the Laminar API. If not provided, the default is * `baseUrl`. Only use this if you want to proxy HTTP requests through a different host. */ baseHttpUrl?: string; /** * The HTTP port of the Laminar API. If not provided, the default is 443. */ httpPort?: number; /** * The gRPC port of the Laminar API. If not provided, the default is 8443. */ grpcPort?: number; /** * Object with modules to instrument. If not provided, all * available modules are instrumented. * See {@link https://laminar.sh/docs/sdk/typescript/instrumentation#instrumentmodules} */ instrumentModules?: InitializeOptions["instrumentModules"]; /** * If true, then the spans will not be batched. */ traceDisableBatch?: boolean; /** * Timeout for trace export. Defaults to 30_000 (30 seconds), which is over * the default OTLP exporter timeout of 10_000 (10 seconds). */ traceExportTimeoutMillis?: number; /** * Defines default log level for SDK and all instrumentations. */ logLevel?: "debug" | "info" | "warn" | "error"; /** * Maximum number of spans to export at a time. Defaults to 64. */ traceExportBatchSize?: number; /** * The port for the Laminar , when running self-hosted. If not provided, the default is 5667. */ frontendPort?: number; } /** * Datapoint is a single data point in the evaluation. `D` is the type of the input data, * `T` is the type of the target data. */ type Datapoint = { /** * input to the executor function. Must be json serializable. Required. */ data: D; /** * input to the evaluator function (alongside the executor output). * Must be json serializable. */ target?: T; /** * metadata to the evaluator function. Must be json serializable. */ metadata?: Record; /** * Optional ID of the datapoint (from dataset) */ id?: StringUUID; /** * Optional creation timestamp (from dataset) */ createdAt?: string; }; /** * HumanEvaluator is a class to register a human evaluator. */ declare class HumanEvaluator { options?: { value: number; label: string; }[]; constructor(options?: { value: number; label: string; }[]); } type EvaluatorFunctionReturn = number | Record; /** * EvaluatorFunction is a function that takes the output of the executor, the * target, and the data, and returns a score. The score can be a single number or a record * of string keys and number values. The latter is useful for evaluating * multiple criteria in one go instead of running multiple evaluators. */ type EvaluatorFunction = (output: O, target?: T, data?: D, ...args: any[]) => EvaluatorFunctionReturn | Promise; interface EvaluationConstructorProps { /** * List of data points to evaluate. `data` is the input to the executor function, * `target` is the input to the evaluator function. */ data: Datapoint[] | EvaluationDataset; /** * The executor function. Takes the data point + any additional arguments * and returns the output to evaluate. */ executor: (data: D, ...args: any[]) => O | Promise; /** * Evaluator functions and names. Each evaluator function takes the output of * the executor, the target, and the data, and returns a score. The score can be a * single number or a dict of string keys and number values. If the score is a * single number, it will be named after the evaluator function. Evaluator * function names must contain only letters, digits, hyphens, underscores, * or spaces. */ evaluators: Record | HumanEvaluator>; /** * Name of the evaluation. If not provided, a random name will be assigned. */ name?: string; /** * Optional group id of the evaluation. Only evaluations within the same * group_id can be visually compared. Defaults to "default". */ groupName?: string; /** * Optional metadata to evaluation */ metadata?: Record; /** * Optional override configurations for the evaluator. */ config?: EvaluationConfig; } interface EvaluationRunResult { averageScores: Record; projectId: string; evaluationId: string; url: string; errorMessage?: string; } declare class Evaluation { private isFinished; private progressReporter; private data; private executor; private evaluators; private groupName?; private frontendPort?; private name?; private metadata?; private concurrencyLimit; private traceDisableBatch; private traceExportTimeoutMillis?; private traceExportBatchSize; private uploadPromises; private client; private datasetSource; constructor({ data, executor, evaluators, groupName, name, metadata, config }: EvaluationConstructorProps); run(): Promise; evaluateInBatches(evalId: StringUUID): Promise[]>; private evaluateDatapoint; private getLength; setFrontendPort(port: number): void; } /** * If added to the file which is called through lmnr eval command, then simply * registers the evaluation. Otherwise, returns a promise which resolves when * the evaluation is finished. If the evaluation has no async logic, then it * will be executed synchronously. * * @param props.data List of data points to evaluate. `data` is the input to the * executor function, `target` is the input to the evaluator function. * @param props.executor The executor function. Takes the data point + any * additional arguments and returns the output to evaluate. * @param props.evaluators Map from evaluator name to evaluator function. Each * evaluator function takes the output of the executor and the target data, and * returns. * @param props.name Optional name of the evaluation. Used to easily identify * the evaluation in the group. * @param props.metadata Optional metadata to evaluation * @param props.config Optional override configurations for the evaluator. */ declare function evaluate({ data, executor, evaluators, groupName, name, metadata, config }: EvaluationConstructorProps): Promise; //#endregion export { __exportAll as C, TracingLevel as S, MaskInputOptions as _, HumanEvaluator as a, SpanType as b, InitializeOptions as c, LaminarClient as d, Dataset as f, LaminarSpanContext as g, Event as h, EvaluatorFunctionReturn as i, EvaluationDataset as l, EvaluationDatapointDatasetLink as m, Evaluation as n, evaluate as o, EvaluationDatapoint as p, EvaluatorFunction as r, StringUUID as s, Datapoint as t, LaminarDataset as u, PushDatapointsResponse as v, TraceType as x, SessionRecordingOptions as y }; //# sourceMappingURL=evaluations-CbHnDCAY.d.cts.map