@taruvi/refine-providers 1.3.4-beta.0 → 1.3.4-beta.2
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/README.md +9 -12
- package/dist/index.cjs +135 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +42 -3
- package/dist/index.d.ts +42 -3
- package/dist/index.js +130 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -186,6 +186,8 @@ interface TaruviMeta extends MetaQuery {
|
|
|
186
186
|
idColumnName?: string;
|
|
187
187
|
/** Fields to select/return. */
|
|
188
188
|
select?: string | string[];
|
|
189
|
+
/** Full-text search (`?search=`) when the table has `search_vector`. */
|
|
190
|
+
search?: string;
|
|
189
191
|
/** Override the table name for API calls (when resource name differs from table name). */
|
|
190
192
|
tableName?: string;
|
|
191
193
|
/** Override the bucket name for storage API calls (when resource name differs from bucket name). */
|
|
@@ -242,6 +244,38 @@ type ConvertRefineFiltersOptions = {
|
|
|
242
244
|
*/
|
|
243
245
|
logicalEncoding?: "bracket" | "flatten";
|
|
244
246
|
};
|
|
247
|
+
/** One leaf filter ready for flat `field__op=value` query encoding. */
|
|
248
|
+
type FlatFilterLeaf = {
|
|
249
|
+
field: string;
|
|
250
|
+
operator: string;
|
|
251
|
+
value: unknown;
|
|
252
|
+
};
|
|
253
|
+
/** Root logical filter for JSON `filters` query param (not wrapped in an array). */
|
|
254
|
+
type LogicalCrudFilter = {
|
|
255
|
+
operator: "and" | "or";
|
|
256
|
+
value: CrudFilter[];
|
|
257
|
+
};
|
|
258
|
+
/**
|
|
259
|
+
* Taruvi list filter payload: leaf array → flat query params; logical object → JSON tree.
|
|
260
|
+
*/
|
|
261
|
+
type TaruviListFilters = FlatFilterLeaf[] | LogicalCrudFilter;
|
|
262
|
+
/** True when `filters` is a non-logical array of field leaves (may be empty). */
|
|
263
|
+
declare function isFlatFilterList(filters: unknown): filters is FlatFilterLeaf[];
|
|
264
|
+
/** True when `filters` is a single logical object (and / or), not an array. */
|
|
265
|
+
declare function isLogicalCrudFilter(filters: unknown): filters is LogicalCrudFilter;
|
|
266
|
+
/**
|
|
267
|
+
* Normalize Refine `CrudFilter[]` or Taruvi payloads for `applyFilters`.
|
|
268
|
+
* Legacy: all field leaves → flat array; single root logical → logical object.
|
|
269
|
+
*/
|
|
270
|
+
declare function normalizeTaruviListFilters(filters: unknown): TaruviListFilters | undefined;
|
|
271
|
+
/**
|
|
272
|
+
* Collect field filters that can be sent as top-level query params (implicit AND).
|
|
273
|
+
*
|
|
274
|
+
* Returns `null` when the list contains `or` or other shapes that require the JSON
|
|
275
|
+
* `filters` tree. FK-traversal fields (`department_id.name`, etc.) must use flat
|
|
276
|
+
* params on the current platform — nesting them under JSON `and` breaks traversal.
|
|
277
|
+
*/
|
|
278
|
+
declare function collectFlatLeaves(filters?: CrudFilter[]): FlatFilterLeaf[] | null;
|
|
245
279
|
/** Backend operator token for CrudFilters bracket payloads (suffix or `eq`). */
|
|
246
280
|
declare function refineOperatorToBackendKey(operator: string): string;
|
|
247
281
|
/** String value for a leaf filter (flat or bracket). */
|
|
@@ -253,10 +287,15 @@ declare function encodeCrudFilterBracket(filter: CrudFilter, path: string, out:
|
|
|
253
287
|
* (root array of `{ operator: "and"|"or", value: [...] }` nodes).
|
|
254
288
|
*
|
|
255
289
|
* Leaf `operator` values are **Taruvi / platform** tokens after `refineOperatorToBackendKey`.
|
|
256
|
-
*
|
|
257
|
-
* frontend does not depend on comparator-specific support in the backend SQLAlchemy build.
|
|
290
|
+
* Leaf `operator` values use Taruvi / platform tokens from `refineOperatorToBackendKey`.
|
|
258
291
|
*/
|
|
259
292
|
declare function convertRefineFiltersToBackendTree(filters?: CrudFilter[]): BackendFilterTreeRoot | null;
|
|
293
|
+
/**
|
|
294
|
+
* Converts one logical CrudFilter object into the backend JSON `filters` tree root.
|
|
295
|
+
*/
|
|
296
|
+
declare function convertLogicalFilterToBackendTree(filter: LogicalCrudFilter): BackendFilterTreeRoot | null;
|
|
297
|
+
/** Encode leaf filters as flat `field__op` query param keys. */
|
|
298
|
+
declare function encodeFlatFilterListToParams(leaves: FlatFilterLeaf[]): Record<string, string>;
|
|
260
299
|
/**
|
|
261
300
|
* Converts Refine CrudFilter[] to Taruvi query parameters.
|
|
262
301
|
* Logical `and` / `or` use CrudFilters bracket notation unless `logicalEncoding: 'flatten'`.
|
|
@@ -296,4 +335,4 @@ declare function buildQueryString(params?: Record<string, unknown>): string;
|
|
|
296
335
|
*/
|
|
297
336
|
declare function handleError(error: unknown): never;
|
|
298
337
|
|
|
299
|
-
export { type AllowedAction, type AnalyticsMeta, type AppCustomMeta, type ConvertRefineFiltersOptions, type FunctionMeta, type LoginParams, type LogoutParams, REFINE_OPERATOR_MAP, type RegisterParams, type StorageDownloadResponse, type StorageUploadVariables, type TaruviListResponse, type TaruviMeta, _cachedUser, accessControlProvider, analyticsDataProvider, appDataProvider, applyRefineQueryParamsToDatabase, authProvider, buildQueryString, buildRefineQueryParams, convertRefineFilters, convertRefineFiltersToBackendTree, convertRefinePagination, convertRefineSorters, dataProvider, encodeCrudFilterBracket, formatRefineLeafValue, functionsDataProvider, handleError, refineOperatorToBackendKey, storageDataProvider, userDataProvider };
|
|
338
|
+
export { type AllowedAction, type AnalyticsMeta, type AppCustomMeta, type ConvertRefineFiltersOptions, type FlatFilterLeaf, type FunctionMeta, type LogicalCrudFilter, type LoginParams, type LogoutParams, REFINE_OPERATOR_MAP, type RegisterParams, type StorageDownloadResponse, type StorageUploadVariables, type TaruviListFilters, type TaruviListResponse, type TaruviMeta, _cachedUser, accessControlProvider, analyticsDataProvider, appDataProvider, applyRefineQueryParamsToDatabase, authProvider, buildQueryString, buildRefineQueryParams, collectFlatLeaves, convertLogicalFilterToBackendTree, convertRefineFilters, convertRefineFiltersToBackendTree, convertRefinePagination, convertRefineSorters, dataProvider, encodeCrudFilterBracket, encodeFlatFilterListToParams, formatRefineLeafValue, functionsDataProvider, handleError, isFlatFilterList, isLogicalCrudFilter, normalizeTaruviListFilters, refineOperatorToBackendKey, storageDataProvider, userDataProvider };
|
package/dist/index.d.ts
CHANGED
|
@@ -186,6 +186,8 @@ interface TaruviMeta extends MetaQuery {
|
|
|
186
186
|
idColumnName?: string;
|
|
187
187
|
/** Fields to select/return. */
|
|
188
188
|
select?: string | string[];
|
|
189
|
+
/** Full-text search (`?search=`) when the table has `search_vector`. */
|
|
190
|
+
search?: string;
|
|
189
191
|
/** Override the table name for API calls (when resource name differs from table name). */
|
|
190
192
|
tableName?: string;
|
|
191
193
|
/** Override the bucket name for storage API calls (when resource name differs from bucket name). */
|
|
@@ -242,6 +244,38 @@ type ConvertRefineFiltersOptions = {
|
|
|
242
244
|
*/
|
|
243
245
|
logicalEncoding?: "bracket" | "flatten";
|
|
244
246
|
};
|
|
247
|
+
/** One leaf filter ready for flat `field__op=value` query encoding. */
|
|
248
|
+
type FlatFilterLeaf = {
|
|
249
|
+
field: string;
|
|
250
|
+
operator: string;
|
|
251
|
+
value: unknown;
|
|
252
|
+
};
|
|
253
|
+
/** Root logical filter for JSON `filters` query param (not wrapped in an array). */
|
|
254
|
+
type LogicalCrudFilter = {
|
|
255
|
+
operator: "and" | "or";
|
|
256
|
+
value: CrudFilter[];
|
|
257
|
+
};
|
|
258
|
+
/**
|
|
259
|
+
* Taruvi list filter payload: leaf array → flat query params; logical object → JSON tree.
|
|
260
|
+
*/
|
|
261
|
+
type TaruviListFilters = FlatFilterLeaf[] | LogicalCrudFilter;
|
|
262
|
+
/** True when `filters` is a non-logical array of field leaves (may be empty). */
|
|
263
|
+
declare function isFlatFilterList(filters: unknown): filters is FlatFilterLeaf[];
|
|
264
|
+
/** True when `filters` is a single logical object (and / or), not an array. */
|
|
265
|
+
declare function isLogicalCrudFilter(filters: unknown): filters is LogicalCrudFilter;
|
|
266
|
+
/**
|
|
267
|
+
* Normalize Refine `CrudFilter[]` or Taruvi payloads for `applyFilters`.
|
|
268
|
+
* Legacy: all field leaves → flat array; single root logical → logical object.
|
|
269
|
+
*/
|
|
270
|
+
declare function normalizeTaruviListFilters(filters: unknown): TaruviListFilters | undefined;
|
|
271
|
+
/**
|
|
272
|
+
* Collect field filters that can be sent as top-level query params (implicit AND).
|
|
273
|
+
*
|
|
274
|
+
* Returns `null` when the list contains `or` or other shapes that require the JSON
|
|
275
|
+
* `filters` tree. FK-traversal fields (`department_id.name`, etc.) must use flat
|
|
276
|
+
* params on the current platform — nesting them under JSON `and` breaks traversal.
|
|
277
|
+
*/
|
|
278
|
+
declare function collectFlatLeaves(filters?: CrudFilter[]): FlatFilterLeaf[] | null;
|
|
245
279
|
/** Backend operator token for CrudFilters bracket payloads (suffix or `eq`). */
|
|
246
280
|
declare function refineOperatorToBackendKey(operator: string): string;
|
|
247
281
|
/** String value for a leaf filter (flat or bracket). */
|
|
@@ -253,10 +287,15 @@ declare function encodeCrudFilterBracket(filter: CrudFilter, path: string, out:
|
|
|
253
287
|
* (root array of `{ operator: "and"|"or", value: [...] }` nodes).
|
|
254
288
|
*
|
|
255
289
|
* Leaf `operator` values are **Taruvi / platform** tokens after `refineOperatorToBackendKey`.
|
|
256
|
-
*
|
|
257
|
-
* frontend does not depend on comparator-specific support in the backend SQLAlchemy build.
|
|
290
|
+
* Leaf `operator` values use Taruvi / platform tokens from `refineOperatorToBackendKey`.
|
|
258
291
|
*/
|
|
259
292
|
declare function convertRefineFiltersToBackendTree(filters?: CrudFilter[]): BackendFilterTreeRoot | null;
|
|
293
|
+
/**
|
|
294
|
+
* Converts one logical CrudFilter object into the backend JSON `filters` tree root.
|
|
295
|
+
*/
|
|
296
|
+
declare function convertLogicalFilterToBackendTree(filter: LogicalCrudFilter): BackendFilterTreeRoot | null;
|
|
297
|
+
/** Encode leaf filters as flat `field__op` query param keys. */
|
|
298
|
+
declare function encodeFlatFilterListToParams(leaves: FlatFilterLeaf[]): Record<string, string>;
|
|
260
299
|
/**
|
|
261
300
|
* Converts Refine CrudFilter[] to Taruvi query parameters.
|
|
262
301
|
* Logical `and` / `or` use CrudFilters bracket notation unless `logicalEncoding: 'flatten'`.
|
|
@@ -296,4 +335,4 @@ declare function buildQueryString(params?: Record<string, unknown>): string;
|
|
|
296
335
|
*/
|
|
297
336
|
declare function handleError(error: unknown): never;
|
|
298
337
|
|
|
299
|
-
export { type AllowedAction, type AnalyticsMeta, type AppCustomMeta, type ConvertRefineFiltersOptions, type FunctionMeta, type LoginParams, type LogoutParams, REFINE_OPERATOR_MAP, type RegisterParams, type StorageDownloadResponse, type StorageUploadVariables, type TaruviListResponse, type TaruviMeta, _cachedUser, accessControlProvider, analyticsDataProvider, appDataProvider, applyRefineQueryParamsToDatabase, authProvider, buildQueryString, buildRefineQueryParams, convertRefineFilters, convertRefineFiltersToBackendTree, convertRefinePagination, convertRefineSorters, dataProvider, encodeCrudFilterBracket, formatRefineLeafValue, functionsDataProvider, handleError, refineOperatorToBackendKey, storageDataProvider, userDataProvider };
|
|
338
|
+
export { type AllowedAction, type AnalyticsMeta, type AppCustomMeta, type ConvertRefineFiltersOptions, type FlatFilterLeaf, type FunctionMeta, type LogicalCrudFilter, type LoginParams, type LogoutParams, REFINE_OPERATOR_MAP, type RegisterParams, type StorageDownloadResponse, type StorageUploadVariables, type TaruviListFilters, type TaruviListResponse, type TaruviMeta, _cachedUser, accessControlProvider, analyticsDataProvider, appDataProvider, applyRefineQueryParamsToDatabase, authProvider, buildQueryString, buildRefineQueryParams, collectFlatLeaves, convertLogicalFilterToBackendTree, convertRefineFilters, convertRefineFiltersToBackendTree, convertRefinePagination, convertRefineSorters, dataProvider, encodeCrudFilterBracket, encodeFlatFilterListToParams, formatRefineLeafValue, functionsDataProvider, handleError, isFlatFilterList, isLogicalCrudFilter, normalizeTaruviListFilters, refineOperatorToBackendKey, storageDataProvider, userDataProvider };
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import DataLoader from 'dataloader';
|
|
|
5
5
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
|
-
version: "1.3.4-beta.
|
|
8
|
+
version: "1.3.4-beta.2"};
|
|
9
9
|
|
|
10
10
|
// src/utils.ts
|
|
11
11
|
var REFINE_OPERATOR_MAP = {
|
|
@@ -18,23 +18,26 @@ var REFINE_OPERATOR_MAP = {
|
|
|
18
18
|
gt: "gt",
|
|
19
19
|
lte: "lte",
|
|
20
20
|
gte: "gte",
|
|
21
|
-
// String
|
|
22
|
-
contains: "
|
|
23
|
-
ncontains: "
|
|
21
|
+
// String matching — Taruvi wire suffix matches platform filter_translator.
|
|
22
|
+
contains: "contains",
|
|
23
|
+
ncontains: "ncontains",
|
|
24
24
|
containss: "containss",
|
|
25
25
|
ncontainss: "ncontainss",
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
nendswith: "nendswiths",
|
|
26
|
+
startswith: "startswith",
|
|
27
|
+
nstartswith: "nstartswith",
|
|
28
|
+
endswith: "endswith",
|
|
29
|
+
nendswith: "nendswith",
|
|
31
30
|
startswiths: "startswiths",
|
|
32
31
|
nstartswiths: "nstartswiths",
|
|
33
32
|
endswiths: "endswiths",
|
|
34
33
|
nendswiths: "nendswiths",
|
|
35
|
-
//
|
|
36
|
-
icontains: "
|
|
37
|
-
nicontains: "
|
|
34
|
+
// Refine aliases → platform insensitive tokens
|
|
35
|
+
icontains: "contains",
|
|
36
|
+
nicontains: "ncontains",
|
|
37
|
+
istartswith: "startswith",
|
|
38
|
+
nistartswith: "nstartswith",
|
|
39
|
+
iendswith: "endswith",
|
|
40
|
+
niendswith: "nendswith",
|
|
38
41
|
// Array / membership
|
|
39
42
|
in: "in",
|
|
40
43
|
nin: "nin",
|
|
@@ -95,6 +98,66 @@ function isLogicalFilter(filter) {
|
|
|
95
98
|
function isFieldFilter(filter) {
|
|
96
99
|
return typeof filter === "object" && filter !== null && "field" in filter && "operator" in filter && typeof filter.field === "string" && typeof filter.operator === "string";
|
|
97
100
|
}
|
|
101
|
+
function isFlatFilterList(filters) {
|
|
102
|
+
if (!Array.isArray(filters)) return false;
|
|
103
|
+
return filters.every((f) => {
|
|
104
|
+
if (!isFieldFilter(f)) return false;
|
|
105
|
+
const leaf = f;
|
|
106
|
+
if (leaf.value === void 0 || leaf.value === null && leaf.operator !== "null") {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
if (REFINE_OPERATOR_MAP[leaf.operator] === void 0) {
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
return true;
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
function isLogicalCrudFilter(filters) {
|
|
116
|
+
return typeof filters === "object" && filters !== null && !Array.isArray(filters) && isLogicalFilter(filters);
|
|
117
|
+
}
|
|
118
|
+
function normalizeTaruviListFilters(filters) {
|
|
119
|
+
if (filters === void 0 || filters === null) return void 0;
|
|
120
|
+
if (isLogicalCrudFilter(filters)) return filters;
|
|
121
|
+
if (isFlatFilterList(filters)) return filters;
|
|
122
|
+
if (!Array.isArray(filters) || filters.length === 0) return void 0;
|
|
123
|
+
if (filters.length === 1 && isLogicalFilter(filters[0])) {
|
|
124
|
+
return filters[0];
|
|
125
|
+
}
|
|
126
|
+
if (filters.every(isFieldFilter)) {
|
|
127
|
+
return filters;
|
|
128
|
+
}
|
|
129
|
+
return void 0;
|
|
130
|
+
}
|
|
131
|
+
function collectFlatLeaves(filters) {
|
|
132
|
+
if (!filters?.length) return [];
|
|
133
|
+
const leaves = [];
|
|
134
|
+
const walk = (group) => {
|
|
135
|
+
for (const filter of group) {
|
|
136
|
+
if (isLogicalFilter(filter)) {
|
|
137
|
+
if (filter.operator === "or") return false;
|
|
138
|
+
if (!walk(filter.value)) return false;
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
if (!isFieldFilter(filter)) return false;
|
|
142
|
+
const leaf = filter;
|
|
143
|
+
if (leaf.value === void 0 || leaf.value === null && leaf.operator !== "null") {
|
|
144
|
+
continue;
|
|
145
|
+
}
|
|
146
|
+
if (REFINE_OPERATOR_MAP[leaf.operator] === void 0) {
|
|
147
|
+
console.warn(`Unknown Refine operator: ${leaf.operator}`);
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
leaves.push({
|
|
151
|
+
field: leaf.field,
|
|
152
|
+
operator: leaf.operator,
|
|
153
|
+
value: leaf.value
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
return true;
|
|
157
|
+
};
|
|
158
|
+
if (!walk(filters)) return null;
|
|
159
|
+
return leaves;
|
|
160
|
+
}
|
|
98
161
|
function refineOperatorToBackendKey(operator) {
|
|
99
162
|
const suffix = REFINE_OPERATOR_MAP[operator];
|
|
100
163
|
if (suffix === void 0) return operator;
|
|
@@ -188,6 +251,18 @@ function convertRefineFiltersToBackendTree(filters) {
|
|
|
188
251
|
}
|
|
189
252
|
return [{ operator: "and", value: nodes }];
|
|
190
253
|
}
|
|
254
|
+
function convertLogicalFilterToBackendTree(filter) {
|
|
255
|
+
const node = crudFilterToBackendNodeOrNull(filter);
|
|
256
|
+
if (!node || !isLogicalBackendNode(node)) return null;
|
|
257
|
+
return [node];
|
|
258
|
+
}
|
|
259
|
+
function encodeFlatFilterListToParams(leaves) {
|
|
260
|
+
const params = {};
|
|
261
|
+
for (const leaf of leaves) {
|
|
262
|
+
encodeLeafFlat(leaf.field, leaf.operator, leaf.value, params);
|
|
263
|
+
}
|
|
264
|
+
return params;
|
|
265
|
+
}
|
|
191
266
|
function convertRefineFiltersFlattened(filters) {
|
|
192
267
|
if (!filters || filters.length === 0) return {};
|
|
193
268
|
const params = {};
|
|
@@ -330,11 +405,38 @@ function applyAggregations(query, meta) {
|
|
|
330
405
|
}
|
|
331
406
|
return result;
|
|
332
407
|
}
|
|
408
|
+
function applyFlatFilterList(query, leaves) {
|
|
409
|
+
let result = query;
|
|
410
|
+
for (const { field, operator, value } of leaves) {
|
|
411
|
+
const backendOp = refineOperatorToBackendKey(operator);
|
|
412
|
+
const formatted = formatRefineLeafValue(operator, value);
|
|
413
|
+
result = result.filters(
|
|
414
|
+
field,
|
|
415
|
+
backendOp,
|
|
416
|
+
formatted
|
|
417
|
+
);
|
|
418
|
+
}
|
|
419
|
+
return result;
|
|
420
|
+
}
|
|
333
421
|
function applyFilters(query, filters) {
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
422
|
+
const normalized = normalizeTaruviListFilters(filters);
|
|
423
|
+
if (normalized === void 0) {
|
|
424
|
+
if (Array.isArray(filters) && filters.length > 0) {
|
|
425
|
+
const tree = convertRefineFiltersToBackendTree(filters);
|
|
426
|
+
if (tree) return query.filters(tree);
|
|
427
|
+
}
|
|
428
|
+
return query;
|
|
429
|
+
}
|
|
430
|
+
if (isFlatFilterList(normalized)) {
|
|
431
|
+
if (normalized.length === 0) return query;
|
|
432
|
+
return applyFlatFilterList(query, normalized);
|
|
433
|
+
}
|
|
434
|
+
if (isLogicalCrudFilter(normalized)) {
|
|
435
|
+
const tree = convertLogicalFilterToBackendTree(normalized);
|
|
436
|
+
if (!tree) return query;
|
|
437
|
+
return query.filters(tree);
|
|
438
|
+
}
|
|
439
|
+
return query;
|
|
338
440
|
}
|
|
339
441
|
function applySorters(query, sorters) {
|
|
340
442
|
const ordering = convertRefineSorters(sorters);
|
|
@@ -356,6 +458,16 @@ function applyAllowedActions(query, meta) {
|
|
|
356
458
|
if (!meta?.allowedActions?.length) return query;
|
|
357
459
|
return query.allowedActions(meta.allowedActions);
|
|
358
460
|
}
|
|
461
|
+
function applySearchAndFields(query, meta) {
|
|
462
|
+
if (!meta) return query;
|
|
463
|
+
let result = query;
|
|
464
|
+
const search = meta.search?.trim();
|
|
465
|
+
if (search) result = result.search(search);
|
|
466
|
+
const select = meta.select;
|
|
467
|
+
const fields = typeof select === "string" ? select.trim() : Array.isArray(select) ? select.map(String).join(",") : "";
|
|
468
|
+
if (fields) result = result.fields(fields);
|
|
469
|
+
return result;
|
|
470
|
+
}
|
|
359
471
|
function isGraphQuery(meta) {
|
|
360
472
|
return !!(meta?.format || meta?.graph_types || meta?.include || meta?.depth);
|
|
361
473
|
}
|
|
@@ -393,6 +505,7 @@ function dataProvider(client) {
|
|
|
393
505
|
query = applyPagination(query, pagination);
|
|
394
506
|
query = applyPopulate(query, taruviMeta);
|
|
395
507
|
query = applyAggregations(query, taruviMeta);
|
|
508
|
+
query = applySearchAndFields(query, taruviMeta);
|
|
396
509
|
query = applyAllowedActions(query, taruviMeta);
|
|
397
510
|
const response = await query.execute();
|
|
398
511
|
return { data: response.data, total: response.total };
|
|
@@ -1235,6 +1348,6 @@ function accessControlProvider(client, options) {
|
|
|
1235
1348
|
};
|
|
1236
1349
|
}
|
|
1237
1350
|
|
|
1238
|
-
export { REFINE_OPERATOR_MAP, _cachedUser, accessControlProvider, analyticsDataProvider, appDataProvider, applyRefineQueryParamsToDatabase, authProvider, buildQueryString, buildRefineQueryParams, convertRefineFilters, convertRefineFiltersToBackendTree, convertRefinePagination, convertRefineSorters, dataProvider, encodeCrudFilterBracket, formatRefineLeafValue, functionsDataProvider, handleError, refineOperatorToBackendKey, storageDataProvider, userDataProvider };
|
|
1351
|
+
export { REFINE_OPERATOR_MAP, _cachedUser, accessControlProvider, analyticsDataProvider, appDataProvider, applyRefineQueryParamsToDatabase, authProvider, buildQueryString, buildRefineQueryParams, collectFlatLeaves, convertLogicalFilterToBackendTree, convertRefineFilters, convertRefineFiltersToBackendTree, convertRefinePagination, convertRefineSorters, dataProvider, encodeCrudFilterBracket, encodeFlatFilterListToParams, formatRefineLeafValue, functionsDataProvider, handleError, isFlatFilterList, isLogicalCrudFilter, normalizeTaruviListFilters, refineOperatorToBackendKey, storageDataProvider, userDataProvider };
|
|
1239
1352
|
//# sourceMappingURL=index.js.map
|
|
1240
1353
|
//# sourceMappingURL=index.js.map
|