import type { Condition } from '../../../entity/actions/parseCondition/index.js'; import type { EntityPathsUnion } from '../../../entity/actions/parsePaths/index.js'; import type { Entity } from '../../../entity/index.js'; import type { CapacityOption } from '../../../options/capacity.js'; import type { NoEntityMatchBehavior } from '../../../options/noEntityMatchBehavior.js'; import type { AllProjectedAttributesSelectOption, SelectOption, SpecificAttributesSelectOption } from '../../../options/select.js'; import type { Table } from '../../../table/index.js'; import type { Query } from './types.js'; export type QueryOptions = Query
> = { capacity?: CapacityOption; exclusiveStartKey?: Record; limit?: number; maxPages?: number; reverse?: boolean; filter?: Entity[] extends ENTITIES ? Condition : never; filters?: Entity[] extends ENTITIES ? Record : { [ENTITY in ENTITIES[number] as ENTITY['entityName']]?: Condition; }; entityAttrFilter?: boolean; noEntityMatchBehavior?: NoEntityMatchBehavior; showEntityAttr?: boolean; tagEntities?: boolean; tableName?: string; } & (Table extends TABLE ? { consistent?: boolean; select?: SelectOption; } : QUERY['index'] extends keyof TABLE['indexes'] ? TABLE['indexes'][QUERY['index']]['type'] extends 'global' ? { consistent?: false; select?: SelectOption; } : { consistent?: boolean; select?: SelectOption; } : { consistent?: boolean; select?: Exclude; }) & ({ attributes?: undefined; select?: SelectOption; } | { attributes: Entity[] extends ENTITIES ? string[] : EntityPathsUnion[]; select?: SpecificAttributesSelectOption; });