@budibase/shared-core 2.28.5 → 2.28.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/filters.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Datasource, BBReferenceFieldSubType, FieldType, FormulaType, SearchFilter, SearchFilters, SearchFilterOperator, SortDirection, SortType, FieldConstraints } from "@budibase/types";
1
+ import { Datasource, BBReferenceFieldSubType, FieldType, FormulaType, SearchFilter, SearchFilters, SearchFilterOperator, SortType, FieldConstraints, SortOrder, RowSearchParams } from "@budibase/types";
2
2
  /**
3
3
  * Returns the valid operator options for a certain data type
4
4
  */
@@ -22,16 +22,17 @@ export declare const NoEmptyFilterStrings: (SearchFilterOperator | "fuzzyOr" | "
22
22
  */
23
23
  export declare const removeKeyNumbering: (key: string) => string;
24
24
  /**
25
- * Builds a lucene JSON query from the filter structure generated in the builder
25
+ * Builds a JSON query from the filter structure generated in the builder
26
26
  * @param filter the builder filter structure
27
27
  */
28
- export declare const buildLuceneQuery: (filter: SearchFilter[]) => SearchFilters;
28
+ export declare const buildQuery: (filter: SearchFilter[]) => SearchFilters;
29
+ export declare const search: (docs: Record<string, any>[], query: RowSearchParams) => Record<string, any>[];
29
30
  /**
30
- * Performs a client-side lucene search on an array of data
31
+ * Performs a client-side search on an array of data
31
32
  * @param docs the data
32
- * @param query the JSON lucene query
33
+ * @param query the JSON query
33
34
  */
34
- export declare const runLuceneQuery: (docs: any[], query?: SearchFilters) => any[];
35
+ export declare const runQuery: (docs: Record<string, any>[], query: SearchFilters) => Record<string, any>[];
35
36
  /**
36
37
  * Performs a client-side sort from the equivalent server-side lucene sort
37
38
  * parameters.
@@ -40,12 +41,12 @@ export declare const runLuceneQuery: (docs: any[], query?: SearchFilters) => any
40
41
  * @param sortOrder the sort order ("ascending" or "descending")
41
42
  * @param sortType the type of sort ("string" or "number")
42
43
  */
43
- export declare const luceneSort: (docs: any[], sort: string, sortOrder: SortDirection, sortType?: SortType) => any[];
44
+ export declare const sort: (docs: any[], sort: string, sortOrder: SortOrder, sortType?: SortType) => any[];
44
45
  /**
45
46
  * Limits the specified docs to the specified number of rows from the equivalent
46
47
  * server-side lucene limit parameters.
47
48
  * @param docs the data
48
49
  * @param limit the number of docs to limit to
49
50
  */
50
- export declare const luceneLimit: (docs: any[], limit: string) => any[];
51
+ export declare const limit: (docs: any[], limit: string) => any[];
51
52
  export declare const hasFilters: (query?: SearchFilters) => boolean;