@budibase/shared-core 3.5.2 → 3.6.0

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 { BBReferenceFieldSubType, Datasource, EmptyFilterOption, FieldConstraints, FieldType, FormulaType, LegacyFilter, RowSearchParams, SearchFilter, SearchFilters, SearchQueryFields, SearchResponse, SortOrder, SortType, Table, UISearchFilter } 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 {};
@@ -9,9 +9,7 @@ import { User } from "@budibase/types";
9
9
  * @param key the key
10
10
  * @return the value or null if a value was not found for this key
11
11
  */
12
- export declare const deepGet: (obj: {
13
- [x: string]: any;
14
- }, key: string) => any;
12
+ export declare const deepGet: (obj: Record<string, any> | undefined, key: string) => any;
15
13
  /**
16
14
  * Gets the initials to show in a user avatar.
17
15
  * @param user the user
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";