@budibase/shared-core 3.42.0 → 3.43.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 +6 -8
- package/dist/ids.d.ts +2 -0
- package/dist/index.js +3 -3
- package/dist/index.js.map +2 -2
- package/package.json +2 -2
package/dist/filters.d.ts
CHANGED
|
@@ -14,17 +14,15 @@ export declare const getValidOperatorsForType: (fieldType: {
|
|
|
14
14
|
label: string;
|
|
15
15
|
}[];
|
|
16
16
|
/**
|
|
17
|
-
* Operators
|
|
17
|
+
* Operators whose empty-string values are treated as absent during cleanup.
|
|
18
18
|
*/
|
|
19
19
|
export declare const NoEmptyFilterStrings: (keyof SearchQueryFields)[];
|
|
20
|
-
export declare function recurseLogicalOperators(filters: SearchFilters, fn: (f: SearchFilters) => SearchFilters): SearchFilters;
|
|
21
20
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* don't do a pure falsy check, as 0 is included
|
|
26
|
-
* https://github.com/Budibase/budibase/issues/10118
|
|
21
|
+
* Operators whose empty-array values are always treated as absent during
|
|
22
|
+
* cleanup.
|
|
27
23
|
*/
|
|
24
|
+
export declare const NoEmptyFilterArrays: (keyof SearchQueryFields)[];
|
|
25
|
+
export declare function recurseLogicalOperators(filters: SearchFilters, fn: (f: SearchFilters) => SearchFilters): SearchFilters;
|
|
28
26
|
export declare const cleanupQuery: (query: SearchFilters) => SearchFilters;
|
|
29
27
|
/**
|
|
30
28
|
* Removes a numeric prefix on field names designed to give fields uniqueness
|
|
@@ -80,7 +78,7 @@ export declare function search<T extends Record<string, any>>(docs: T[], query:
|
|
|
80
78
|
* @param docs the data
|
|
81
79
|
* @param query the JSON query
|
|
82
80
|
*/
|
|
83
|
-
export declare function runQuery<T extends
|
|
81
|
+
export declare function runQuery<T extends object>(docs: T[], query: SearchFilters): T[];
|
|
84
82
|
/**
|
|
85
83
|
* Performs a client-side sort from the equivalent server-side lucene sort
|
|
86
84
|
* parameters.
|
package/dist/ids.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DocumentType, VirtualDocumentType } from "@budibase/types";
|
|
2
|
+
import type { CustomRestTemplateId } from "@budibase/types";
|
|
2
3
|
export declare function getDocumentType(id: string): DocumentType | undefined;
|
|
3
4
|
export declare function getVirtualDocumentType(id: string): VirtualDocumentType | undefined;
|
|
4
5
|
export declare const isExternalTableId: (id: string) => boolean;
|
|
@@ -15,4 +16,5 @@ export declare const isTableId: (id: string) => boolean;
|
|
|
15
16
|
export declare const isViewId: (id: string) => boolean;
|
|
16
17
|
export declare const isDatasourceOrDatasourcePlusId: (id: string) => boolean;
|
|
17
18
|
export declare const isQueryId: (id: string) => boolean;
|
|
19
|
+
export declare const isCustomRestTemplateId: (restTemplateId: string | undefined) => restTemplateId is CustomRestTemplateId;
|
|
18
20
|
export declare function getTableIdFromViewId(viewId: string): string;
|