import type { QueryCommandInput, QueryCommandOutput } from '@aws-sdk/lib-dynamodb'; import type { EntityPaths } from '../../../entity/actions/parsePaths/index.js'; import type { Entity, FormattedItem } from '../../../entity/index.js'; import type { EntityAttrObjectOptions, EntityAttrOptionValue } from '../../../entity/utils/index.js'; import type { CountSelectOption } from '../../../options/select.js'; import { $sentArgs } from '../../../table/constants.js'; import { TableAction } from '../../../table/index.js'; import type { Table, TableSendableAction } from '../../../table/table.js'; import type { DocumentClientOptions } from '../../../types/documentClientOptions.js'; import type { Merge } from '../../../types/merge.js'; import { $options, $query } from './constants.js'; import type { QueryOptions } from './options.js'; import type { Query } from './types.js'; type ReturnedItems, ENTITIES extends Entity[], OPTIONS extends QueryOptions> = OPTIONS['select'] extends CountSelectOption ? undefined : (Entity[] extends ENTITIES ? FormattedItem : ENTITIES[number] extends infer ENTITY ? ENTITY extends Entity ? [ENTITY, OPTIONS] extends [ { entityAttribute: true | EntityAttrObjectOptions; }, { showEntityAttr: true; } ] ? Merge> : undefined; }>, { [KEY in EntityAttrOptionValue]: ENTITY['entityName']; }> : FormattedItem> : undefined; }> : never : never)[]; export type QueryResponse
, ENTITIES extends Entity[], OPTIONS extends QueryOptions> = Merge, { Items?: ReturnedItems; $metadata?: QueryCommandOutput['$metadata']; }>; export declare class IQueryCommand
= Query
, OPTIONS extends QueryOptions = QueryOptions> extends TableAction implements TableSendableAction
{ static actionName: "query"; [$query]?: QUERY; [$options]: OPTIONS; constructor(table: TABLE, entities?: ENTITIES, query?: QUERY, options?: OPTIONS); [$sentArgs](): [Entity[], Query
, QueryOptions>]; params: () => QueryCommandInput; send(documentClientOptions?: DocumentClientOptions): Promise>; } export declare class QueryCommand
= Query
, OPTIONS extends QueryOptions = QueryOptions> extends IQueryCommand { constructor(table: TABLE, entities?: ENTITIES, query?: QUERY, options?: OPTIONS); entities(...nextEntities: NEXT_ENTITIES): QueryCommand ? OPTIONS : QueryOptions>; query>(nextQuery: NEXT_QUERY): QueryCommand ? OPTIONS : QueryOptions>; options>(nextOptions: NEXT_OPTIONS | ((prevOptions: OPTIONS) => NEXT_OPTIONS)): QueryCommand; } export {};