longcelot-sheet-db
Version:
Google Sheets-backed staging database adapter for Node.js with schema-first design
22 lines • 984 B
TypeScript
import { LoadedSchema } from './schemaLoader';
export type TableResolution = {
ok: true;
table: LoadedSchema;
} | {
ok: false;
error: string;
};
/**
* Resolves a user-typed table reference against every loaded schema. Table names are only
* unique per actor (see skills/schema/SKILL.md), so a bare name that matches more than one
* actor is treated as ambiguous rather than guessing — the caller can disambiguate with
* 'actor/tableName'.
*/
export declare function resolveTableRef(all: LoadedSchema[], rawName: string): TableResolution;
/**
* Resolves a table from a CLI argument, exiting with a clear error on an invalid name — or,
* if no argument was given, prompts an interactive single-select list. Shared by drop-column
* and rename-column, which both operate on exactly one table.
*/
export declare function promptOrResolveTable(all: LoadedSchema[], tableName: string | undefined): Promise<LoadedSchema>;
//# sourceMappingURL=resolveTable.d.ts.map