/** * Public types for the sources read surface. * * Mirrors the sources-pipeline write path so a meeting source written by * hq-pro is readable through this layer without translation. */ import type { SourceChannel } from "../schemas/source-channels.js"; import type { PresignTransportClient } from "../object-io.js"; /** * Lightweight summary returned by listSources(). `frontmatter` is only * populated when the caller passes `includeFrontmatter: true`. */ export interface SourceSummary { /** Stable ID derived from the object key (filename minus `.md`/`.raw.json`). */ sourceId: string; channel: SourceChannel; /** Full S3 object key (e.g. "sources/meeting/abc.md"). */ key: string; lastModified: Date; size: number; /** Parsed YAML frontmatter — only present when listSources(includeFrontmatter:true). */ frontmatter?: Record; } /** * Full source document returned by getSource(). `frontmatter` is `null` if * the document was malformed (no `---` delimiters) — body still contains the * raw payload in that case so callers can fall back. */ export interface SourceDocument { key: string; /** Parsed YAML frontmatter, or `null` if the document had no frontmatter block. */ frontmatter: Record | null; /** Markdown body (everything after the closing `---`). */ body: string; /** Sibling `.raw.json` payload, only present when getSource(includeRaw:true). */ raw?: unknown; } /** * Listing options for listSources(). */ export interface ListSourcesOptions { entity: import("../types.js").EntityContext; channel: SourceChannel; /** * Max keys per page. Under direct S3 this maps to `MaxKeys`; under the * presigned transport ({@link vault} + a company vault) it is advisory — the * vault `list` endpoint controls page size server-side. Defaults to the S3 * default (1000) on the direct path. */ limit?: number; /** Opaque continuation token returned by a prior page. */ continuationToken?: string; /** When true, fetches+parses each entry's frontmatter (extra GETs). */ includeFrontmatter?: boolean; /** * Presign-capable vault client. When supplied and {@link entity} is a company * vault (cmp_*), reads use the presigned-URL transport (ACL-filtered, no * direct S3). Personal vaults and the absent-client path stay on direct S3. */ vault?: PresignTransportClient; } export interface ListSourcesResult { entries: SourceSummary[]; /** Present when the result was truncated; pass back as continuationToken. */ nextToken?: string; } export interface GetSourceOptions { entity: import("../types.js").EntityContext; channel: SourceChannel; sourceId: string; /** When true, also fetches the `.raw.json` sibling. */ includeRaw?: boolean; /** * Presign-capable vault client. When supplied and {@link entity} is a company * vault (cmp_*), reads use the presigned-URL transport (no direct S3). */ vault?: PresignTransportClient; } //# sourceMappingURL=types.d.ts.map