dyngoose
Version:
Elegant DynamoDB object modeling for Typescript
23 lines (22 loc) • 914 B
TypeScript
import { type IThroughput } from '../interfaces';
import type * as Metadata from '../metadata';
import { type ITable } from '../table';
interface GlobalSecondaryIndexOptionsBase {
name?: string;
projection?: Metadata.Index.GlobalSecondaryIndexProjection;
nonKeyAttributes?: string[];
throughput?: IThroughput | number;
}
interface GlobalSecondaryIndexOptionsLegacy extends GlobalSecondaryIndexOptionsBase {
hashKey: string;
rangeKey?: string;
}
interface GlobalSecondaryIndexOptionsModern extends GlobalSecondaryIndexOptionsBase {
primaryKey: string;
sortKey?: string;
hashKey?: undefined;
rangeKey?: undefined;
}
export type GlobalSecondaryIndexOptions = GlobalSecondaryIndexOptionsLegacy | GlobalSecondaryIndexOptionsModern;
export declare function GlobalSecondaryIndex(options: GlobalSecondaryIndexOptions): (table: ITable<any>, propertyName: string) => void;
export {};