import { FilterType, ListFlags, SearchFlags } from "../models";
import { IDocumentModel, ISorting } from "./common.interface";
import { IFacet } from "./search.interface";
/**
 * This object mimics what is defined in ndCommon.Constants.RestApi.QueryArgument
 * on the server side as supported queryable items.
 * If you want to have additional queryable items, please extend this interface.
 */
export interface IQuerableRequest {
    /**
     * Specifies what is being selected.
     */
    select?: Array<any>;
    /**
     * users current layout, used on client to know which facets to request
     */
    layout?: Array<number>;
    /**
     * Query argument that contains sorting information.
     */
    orderBy?: Array<ISorting>;
    /**
     * Flags that specify what the list view wants to display.
     */
    ListFlags?: ListFlags;
    /**
     * File extensions (without leading period) that are being used to filter files.
     */
    filter?: Array<string>;
    /**
     * The type of filtering to be performed.
     */
    filterType?: FilterType;
    /**
     * The maximum # of results to return from each call.
     */
    top?: number;
    /**
     * Number of documents to skip if jumping to the middle of the results.
     */
    skip?: number;
    /**
     * Paging token. null for the initial call.To retrieve additional results after the first block, pass the skipToken returned from the previous call.
     */
    skipToken?: string;
    SearchFlags?: SearchFlags;
}
export interface IListViewRequest extends IQuerableRequest {
    /**
     * It is real case only when we inside container and we try to search within container.
     * UI specific only.
     */
    doSearch?: boolean;
    /**
     * Get snippets
     */
    snippets?: boolean;
    /**
     * documents, emails, all, etc..
     */
    appliedFilter?: ListFlags;
}
/**
 * Interface defines the functionality of a list view response.
 */
export interface IListViewResponse {
    /**
     * @property {Array<IDocumentModel>} Document results.
     */
    Results?: Array<IDocumentModel>;
    /**
     * Facets
     */
    Facets?: Array<IFacet>;
    /**
     * The total number of results Solr found.
     */
    TotalFound?: number;
    /**
     * Token used for the next page
     */
    SkipToken?: string;
}
