import { Comparator, Note } from '@aztec/circuit-types'; import { Fr } from '@aztec/foundation/fields'; /** * Configuration for selecting values. */ export interface Select { /** * Index of the field to select and match. */ index: number; /** * Required value of the field. */ value: Fr; /** * The comparator to use */ comparator: Comparator; } /** * The order to sort an array. */ export declare enum SortOrder { NADA = 0, DESC = 1, ASC = 2 } /** * Configuration for sorting values. */ export interface Sort { /** * Index of the field to sort. */ index: number; /** * Order to sort the field. */ order: SortOrder; } /** * Options for picking items from an array of BasicNoteData. */ interface GetOptions { /** * Configurations for selecting items. * Default: empty array. */ selects?: Select[]; /** * Configurations for sorting items. * Default: empty array. */ sorts?: Sort[]; /** * The number of items to retrieve per query. * Default: 0. No limit. */ limit?: number; /** * The starting index for pagination. * Default: 0. */ offset?: number; } /** * Data needed from to perform sort. */ interface ContainsNote { /** * The note. */ note: Note; } /** * Pick from a note array a number of notes that meet the criteria. */ export declare function pickNotes(noteDatas: T[], { selects, sorts, limit, offset }: GetOptions): T[]; export {}; //# sourceMappingURL=pick_notes.d.ts.map