@budibase/shared-core 3.5.2 → 3.5.3

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, LegacyFilter, SearchFilters, SearchQueryFields, SortType, FieldConstraints, SortOrder, EmptyFilterOption, SearchResponse, Table, UISearchFilter, SearchFilter, WithRequired, SearchParams } from "@budibase/types";
1
+ import { Datasource, BBReferenceFieldSubType, FieldType, FormulaType, LegacyFilter, SearchFilters, SearchQueryFields, SortType, FieldConstraints, SortOrder, RowSearchParams, EmptyFilterOption, SearchResponse, Table, UISearchFilter, SearchFilter } from "@budibase/types";
2
2
  /**
3
3
  * Returns the valid operator options for a certain data type
4
4
  */
@@ -74,9 +74,7 @@ export declare function splitFiltersArray(filters: LegacyFilter[]): LegacyFilter
74
74
  */
75
75
  export declare function buildQuery(filter?: UISearchFilter | LegacyFilter[]): SearchFilters;
76
76
  export declare function fixupFilterArrays(filters: SearchFilters): SearchFilters;
77
- type SearchQuery = WithRequired<Pick<SearchParams, "query" | "sort" | "sortOrder" | "sortType" | "limit" | "countRows">, "query">;
78
- export type InMemorySearchQuery = SearchQuery;
79
- export declare function search<T extends Record<string, any>>(docs: T[], query: SearchQuery): SearchResponse<T>;
77
+ export declare function search<T extends Record<string, any>>(docs: T[], query: Omit<RowSearchParams, "tableId">): SearchResponse<T>;
80
78
  /**
81
79
  * Performs a client-side search on an array of data
82
80
  * @param docs the data
@@ -100,4 +98,3 @@ export declare function sort<T extends Record<string, any>>(docs: T[], sort: key
100
98
  */
101
99
  export declare function limit<T>(docs: T[], limit: string | number): T[];
102
100
  export declare const hasFilters: (query?: SearchFilters) => boolean;
103
- export {};
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  export * from "./constants";
2
2
  export * as dataFilters from "./filters";
3
- export type * from "./filters";
4
3
  export * as helpers from "./helpers";
5
4
  export * as utils from "./utils";
6
5
  export * as sdk from "./sdk";