/** * Internal helpers shared between signals/list.ts and signals/get.ts. * * Two transports back the read surface (see sources/internals.ts for the full * rationale): the presigned-URL path (a vault client + a company vault, cmp_*) * and the direct-S3 path (no vault client, or a personal vault prs_*). The * direct-S3 path goes through `getS3Client`, whose factory hook is independent * from sources/internals.ts so signals tests can swap their stub without * disturbing sources tests. */ import { S3Client } from "@aws-sdk/client-s3"; import type { EntityContext } from "../types.js"; import { type PresignTransportClient } from "../object-io.js"; /** Test hook: replace the S3 client factory. */ export declare function _setSignalsS3Factory(f: (ctx: EntityContext) => S3Client): void; /** Test hook: restore the default S3 client factory. */ export declare function _resetSignalsS3Factory(): void; /** Common shape of every reader's options: an entity + an optional vault client. */ export interface ReaderTransportOpts { entity: EntityContext; /** * Presign-capable vault client. When supplied and the entity is a company * vault (cmp_*), reads use the presigned-URL transport instead of direct S3. */ vault?: PresignTransportClient; } /** Lightweight listed object (transport-agnostic). */ export interface ListedKey { key: string; size: number; lastModified: Date; } /** * Read an object's UTF-8 text. Throws a `NoSuchKey`-named error when the object * is absent (both transports), so callers' existing not-found checks work * unchanged. */ export declare function readObjectText(opts: ReaderTransportOpts, key: string): Promise; /** * List one page of objects under `prefix`. * * Under the presigned transport the vault `list` endpoint is ACL-filtered and * controls page size server-side, so `limit` is advisory — paginate via the * returned `nextToken` (the opaque vault cursor) until it is undefined. Under * direct S3, `limit` maps to `MaxKeys`. */ export declare function listObjects(opts: ReaderTransportOpts, prefix: string, page: { limit?: number; continuationToken?: string; }): Promise<{ contents: ListedKey[]; nextToken?: string; }>; //# sourceMappingURL=internals.d.ts.map