import { Converter } from '../operators'; import { Label } from '../type-helpers'; export interface NamespacedPrimaryIndexOptions { /** * * The namespace for the index. This namespace is necessary * if you want to be able to conduct operations (e.g. less than, between, partial, etc). * */ namespace: string; /** * * The converter to use for the index. Will be used to convert all values to * query strings (key expressions). * */ converter?: Converter; } export interface AnonymousPrimaryIndexOptions { /** * * The converter to use for the index. Will be used to convert all values to * query strings (key expressions). * */ converter?: Converter; } export interface AnonymousSecondaryIndexOptions { /** * * The label for this index. Can be one of `label1`, `label2`, ..., `label5`. * * @note that an index with a label will be a secondary index, and each model * needs exactly one primary index. * * @note that the label must be unique for the model, i.e. each model can have at most one * secondary index with a given label. * */ label: Label; /** * * The converter to use for the index. Will be used to convert all values to * query strings (key expressions). * */ converter?: Converter; } export interface NamespacedSecondaryIndexOptions { /** * * The namespace for the index. This namespace is necessary * if you want to be able to conduct operations (e.g. less than, between, partial, etc). * */ namespace: string; /** * * The label for this index. Can be one of `label1`, `label2`, ..., `label5`. * * @note that an index with a label will be a secondary index, and each model * needs exactly one primary index. * * @note that the label must be unique for the model, i.e. each model can have at most one * secondary index with a given label. * */ label: Label; /** * * The converter to use for the index. Will be used to convert all values to * query strings (key expressions). * */ converter?: Converter; } export declare type PrimaryIndexOptions = NamespacedPrimaryIndexOptions | AnonymousPrimaryIndexOptions; export declare type SecondaryIndexOptions = NamespacedSecondaryIndexOptions | AnonymousSecondaryIndexOptions; export declare type IndexOptions = PrimaryIndexOptions | SecondaryIndexOptions; export declare function isSecondaryIndexOptions(options: IndexOptions): options is SecondaryIndexOptions; export declare function isNamespacedIndexOptions(options: IndexOptions): options is NamespacedPrimaryIndexOptions;