1 | import { _SPInstance, ISPQueryable } from "../spqueryable.js";
|
2 | import { ISearchQuery, ISearchResponse, ISearchResult, ISearchBuilder, SearchQueryInit } from "./types.js";
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | export declare function SearchQueryBuilder(queryText?: string, _query?: {}): ISearchBuilder;
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | export declare class _Search extends _SPInstance {
|
15 | |
16 |
|
17 |
|
18 | run(queryInit: SearchQueryInit): Promise<SearchResults>;
|
19 | |
20 |
|
21 |
|
22 |
|
23 |
|
24 | private fixArrProp;
|
25 | |
26 |
|
27 |
|
28 |
|
29 |
|
30 | private parseQuery;
|
31 | }
|
32 | export interface ISearch {
|
33 | (queryInit: SearchQueryInit): Promise<SearchResults>;
|
34 | }
|
35 | export declare const Search: (baseUrl: string | ISPQueryable) => ISearch;
|
36 | export declare class SearchResults {
|
37 | private _search;
|
38 | private _query;
|
39 | private _raw;
|
40 | private _primary;
|
41 | constructor(rawResponse: any, _search: _Search, _query: ISearchQuery, _raw?: ISearchResponse, _primary?: ISearchResult[]);
|
42 | get ElapsedTime(): number;
|
43 | get RowCount(): number;
|
44 | get TotalRows(): number;
|
45 | get TotalRowsIncludingDuplicates(): number;
|
46 | get RawSearchResults(): ISearchResponse;
|
47 | get PrimarySearchResults(): ISearchResult[];
|
48 | /**
|
49 | * Gets a page of results
|
50 | *
|
51 | * @param pageNumber Index of the page to return. Used to determine StartRow
|
52 | * @param pageSize Optional, items per page (default = 10)
|
53 | */
|
54 | getPage(pageNumber: number, pageSize?: number): Promise<SearchResults>;
|
55 | /**
|
56 | * Formats a search results array
|
57 | *
|
58 | * @param rawResults The array to process
|
59 | */
|
60 | protected formatSearchResults(rawResults: any): ISearchResult[];
|
61 | }
|
62 | //# sourceMappingURL=query.d.ts.map |
\ | No newline at end of file |