nestjs-prisma-querybuilder-interface 1.0.4 → 1.1.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/README.md +135 -43
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/Querybuilder.js +7 -6
- package/dist/lib/Querybuilder.js.map +1 -1
- package/dist/lib/functions/FilterParse.d.ts +2 -1
- package/dist/lib/functions/FilterParse.js +70 -11
- package/dist/lib/functions/FilterParse.js.map +1 -1
- package/dist/lib/functions/FilterResolver.d.ts +1 -0
- package/dist/lib/functions/FilterResolver.js +19 -0
- package/dist/lib/functions/FilterResolver.js.map +1 -0
- package/dist/lib/functions/GetType.js +1 -1
- package/dist/lib/functions/GetType.js.map +1 -1
- package/dist/lib/functions/PopulateParse.d.ts +2 -0
- package/dist/lib/functions/PopulateParse.js +51 -0
- package/dist/lib/functions/PopulateParse.js.map +1 -0
- package/dist/lib/interfaces/Filter.d.ts +18 -2
- package/dist/lib/interfaces/Operator.d.ts +1 -1
- package/dist/lib/interfaces/Populate.d.ts +14 -4
- package/dist/lib/interfaces/Query.d.ts +4 -4
- package/dist/teste.js +15 -31
- package/dist/teste.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -2
- package/dist/lib/FilterParse.d.ts +0 -2
- package/dist/lib/FilterParse.js +0 -18
- package/dist/lib/FilterParse.js.map +0 -1
- package/dist/lib/FiltersFields.d.ts +0 -13
- package/dist/lib/FiltersFields.js +0 -3
- package/dist/lib/FiltersFields.js.map +0 -1
- package/dist/lib/Populate.d.ts +0 -6
- package/dist/lib/Populate.js +0 -3
- package/dist/lib/Populate.js.map +0 -1
- package/dist/lib/Query.d.ts +0 -13
- package/dist/lib/Query.js +0 -3
- package/dist/lib/Query.js.map +0 -1
- package/dist/lib/SortFields.d.ts +0 -4
- package/dist/lib/SortFields.js +0 -3
- package/dist/lib/SortFields.js.map +0 -1
- package/dist/lib/functions/FilterObjectParse.d.ts +0 -3
- package/dist/lib/functions/FilterObjectParse.js +0 -37
- package/dist/lib/functions/FilterObjectParse.js.map +0 -1
- package/dist/lib/functions/ObjectParse.d.ts +0 -3
- package/dist/lib/functions/ObjectParse.js +0 -34
- package/dist/lib/functions/ObjectParse.js.map +0 -1
- package/dist/lib/functions/QueryParse.d.ts +0 -1
- package/dist/lib/functions/QueryParse.js +0 -20
- package/dist/lib/functions/QueryParse.js.map +0 -1
- package/dist/lib/interfaces/And.d.ts +0 -4
- package/dist/lib/interfaces/And.js +0 -3
- package/dist/lib/interfaces/And.js.map +0 -1
- package/dist/lib/interfaces/FiltersFields.d.ts +0 -4
- package/dist/lib/interfaces/FiltersFields.js +0 -3
- package/dist/lib/interfaces/FiltersFields.js.map +0 -1
- package/dist/lib/interfaces/Or.d.ts +0 -4
- package/dist/lib/interfaces/Or.js +0 -3
- package/dist/lib/interfaces/Or.js.map +0 -1
- package/dist/lib/interfaces/ParsedFilter.d.ts +0 -7
- package/dist/lib/interfaces/ParsedFilter.js +0 -3
- package/dist/lib/interfaces/ParsedFilter.js.map +0 -1
package/README.md
CHANGED
|
@@ -10,7 +10,23 @@
|
|
|
10
10
|
|
|
11
11
|
<br/>
|
|
12
12
|
|
|
13
|
-
###
|
|
13
|
+
### What's new
|
|
14
|
+
|
|
15
|
+
- **Filter in Populate**
|
|
16
|
+
|
|
17
|
+
You can filter inside populate
|
|
18
|
+
|
|
19
|
+
- **Insensitive Case**
|
|
20
|
+
|
|
21
|
+
now in the filter you can search with insensitive case
|
|
22
|
+
|
|
23
|
+
- **Verbose**
|
|
24
|
+
|
|
25
|
+
You can filter and populate with verbose method or non verbose
|
|
26
|
+
|
|
27
|
+
<hr>
|
|
28
|
+
|
|
29
|
+
### Documentation
|
|
14
30
|
|
|
15
31
|
- **How to install it?**
|
|
16
32
|
|
|
@@ -83,58 +99,36 @@
|
|
|
83
99
|
|
|
84
100
|
- Usage
|
|
85
101
|
|
|
86
|
-
| Name | Type
|
|
87
|
-
| -------- |
|
|
88
|
-
| select | string
|
|
89
|
-
| page | number
|
|
90
|
-
| limit | number
|
|
91
|
-
| sort | SortFields
|
|
92
|
-
| populate | Populate
|
|
93
|
-
| filter |
|
|
102
|
+
| Name | Type | exemple |
|
|
103
|
+
| -------- | ---------- | ------------------------------------------------ |
|
|
104
|
+
| select | string | select: 'name email', |
|
|
105
|
+
| page | number | page: 2, |
|
|
106
|
+
| limit | number | limit: 20, |
|
|
107
|
+
| sort | SortFields | sort: {field: string, criteria: 'asc'}, |
|
|
108
|
+
| populate | Populate | populate: [{path: 'car', select: 'model plate'}] |
|
|
109
|
+
| filter | Filter | filter: [{name: 'jonas'}, {value: { gte: 4 }}] |
|
|
94
110
|
|
|
95
111
|
<br/>
|
|
96
112
|
|
|
97
113
|
- **Exported Interfaces**
|
|
98
114
|
|
|
115
|
+
```tsx
|
|
116
|
+
import {
|
|
117
|
+
Query,
|
|
118
|
+
Populate,
|
|
119
|
+
Filter
|
|
120
|
+
} from 'nestjs-prisma-querybuilder-interface';
|
|
121
|
+
```
|
|
122
|
+
|
|
99
123
|
- **Query**
|
|
100
124
|
|
|
101
|
-
|
|
125
|
+
all types
|
|
102
126
|
|
|
103
127
|
- **Populate**
|
|
128
|
+
- **Filter**
|
|
129
|
+
- **Operators**
|
|
104
130
|
|
|
105
|
-
|
|
106
|
-
| -------- | ------------ | ------------------------------------------- |
|
|
107
|
-
| path | string | path: 'picture' |
|
|
108
|
-
| select | string | select: 'url extension', |
|
|
109
|
-
| populate | Populate [ ] | populate: [{path: 'post', select: 'title'}] |
|
|
110
|
-
|
|
111
|
-
<br/>
|
|
112
|
-
|
|
113
|
-
- **FilterFields**
|
|
114
|
-
|
|
115
|
-
| Name | Type | exemple |
|
|
116
|
-
| ---- | ---------- | ------------------------------------------------------------------- |
|
|
117
|
-
| x | Filter | {name: { contains: 'Jonas' } } |
|
|
118
|
-
| and | Filter [ ] | {and: [{name: { contains: 'Jonas' }, {active: true }}]} |
|
|
119
|
-
| or | Filter [ ] | {or: [{post: { contains: 'hello' }, {post: { contains: 'world' }}]} |
|
|
120
|
-
|
|
121
|
-
- **Filter**
|
|
122
|
-
|
|
123
|
-
{ key: value } with Operator 'equals'
|
|
124
|
-
|
|
125
|
-
exemple: { postId: 147 }
|
|
126
|
-
|
|
127
|
-
or
|
|
128
|
-
|
|
129
|
-
{ key: { operator: value } }
|
|
130
|
-
|
|
131
|
-
exemple: { postId: { startsWith : 147 } }
|
|
132
|
-
|
|
133
|
-
<br/>
|
|
134
|
-
|
|
135
|
-
- **Operators**
|
|
136
|
-
|
|
137
|
-
contains, endsWith, startsWith, equals, gt, gte, in, lt, lte ,not, notIn
|
|
131
|
+
contains, endsWith, startsWith, equals, gt, gte, in, lt, lte ,not, notIn
|
|
138
132
|
|
|
139
133
|
<br/>
|
|
140
134
|
|
|
@@ -183,6 +177,104 @@
|
|
|
183
177
|
});
|
|
184
178
|
```
|
|
185
179
|
|
|
180
|
+
- **Populate**
|
|
181
|
+
|
|
182
|
+
```tsx
|
|
183
|
+
const populate: Populate = [
|
|
184
|
+
{
|
|
185
|
+
path: 'car',
|
|
186
|
+
select: 'model plate',
|
|
187
|
+
filter: [{path: 'name', value: 'ford', operator: 'contains'}],
|
|
188
|
+
populate: [
|
|
189
|
+
{
|
|
190
|
+
path: 'brand',
|
|
191
|
+
select: 'name',
|
|
192
|
+
}
|
|
193
|
+
],
|
|
194
|
+
primaryKey: 'yourTablePrimaryKey' // default 'id'
|
|
195
|
+
},
|
|
196
|
+
|
|
197
|
+
// Or
|
|
198
|
+
|
|
199
|
+
{
|
|
200
|
+
car: 'model plate',
|
|
201
|
+
filter: [{name: {contains: 'ford'}],
|
|
202
|
+
populate: [{brand: 'name'}],
|
|
203
|
+
primaryKey: 'yourTablePrimaryKey' // default 'id'
|
|
204
|
+
},
|
|
205
|
+
],
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
- **Filter**
|
|
209
|
+
|
|
210
|
+
```tsx
|
|
211
|
+
const filter: Filter = [
|
|
212
|
+
{
|
|
213
|
+
path: 'createdAt',
|
|
214
|
+
value: new Date(),
|
|
215
|
+
operator: 'lte'
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
or: [
|
|
219
|
+
{
|
|
220
|
+
path: 'role',
|
|
221
|
+
value: 'admin',
|
|
222
|
+
operator: 'equals'
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
path: 'role',
|
|
226
|
+
value: 'system',
|
|
227
|
+
operator: 'equals'
|
|
228
|
+
}
|
|
229
|
+
]
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
and: [
|
|
233
|
+
{
|
|
234
|
+
path: 'name',
|
|
235
|
+
value: 'Ricky',
|
|
236
|
+
operator: 'equals',
|
|
237
|
+
insensitive: true
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
path: 'lastName',
|
|
241
|
+
value: 'Morty',
|
|
242
|
+
operator: 'contains',
|
|
243
|
+
insensitive: true
|
|
244
|
+
}
|
|
245
|
+
]
|
|
246
|
+
}
|
|
247
|
+
];
|
|
248
|
+
|
|
249
|
+
// Or
|
|
250
|
+
|
|
251
|
+
const filter: Filter = [
|
|
252
|
+
{
|
|
253
|
+
createdAt: { lte: new Date() }
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
or: [
|
|
257
|
+
{
|
|
258
|
+
role: 'admin'
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
role: 'system'
|
|
262
|
+
}
|
|
263
|
+
]
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
and: [
|
|
267
|
+
{
|
|
268
|
+
name: { equals: 'Ricky', insensitive: true }
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
lastName: { contains: 'Morty', insensitive: true }
|
|
272
|
+
}
|
|
273
|
+
]
|
|
274
|
+
}
|
|
275
|
+
];
|
|
276
|
+
```
|
|
277
|
+
|
|
186
278
|
### END
|
|
187
279
|
|
|
188
280
|
- Nestjs/Prisma Querybuilder Interface is ISC licensed.
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./lib/interfaces/
|
|
17
|
+
__exportStar(require("./lib/interfaces/Filter"), exports);
|
|
18
18
|
__exportStar(require("./lib/interfaces/Query"), exports);
|
|
19
19
|
__exportStar(require("./lib/interfaces/Populate"), exports);
|
|
20
20
|
__exportStar(require("./lib/Querybuilder"), exports);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,yDAAuC;AACvC,4DAA0C;AAC1C,qDAAmC"}
|
package/dist/lib/Querybuilder.js
CHANGED
|
@@ -2,15 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.QueryString = void 0;
|
|
4
4
|
const qs_1 = require("qs");
|
|
5
|
-
const
|
|
5
|
+
const FilterResolver_1 = require("./functions/FilterResolver");
|
|
6
|
+
const PopulateParse_1 = require("./functions/PopulateParse");
|
|
6
7
|
function QueryString(query) {
|
|
7
|
-
if (query
|
|
8
|
-
query.filter = (0,
|
|
9
|
-
return (0, qs_1.stringify)(query);
|
|
8
|
+
if (query?.filter) {
|
|
9
|
+
query.filter = (0, FilterResolver_1.FilterResolver)(query.filter);
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
if (query?.populate) {
|
|
12
|
+
query.populate = (0, PopulateParse_1.PopulateParse)(query.populate);
|
|
13
13
|
}
|
|
14
|
+
return (0, qs_1.stringify)(query);
|
|
14
15
|
}
|
|
15
16
|
exports.QueryString = QueryString;
|
|
16
17
|
//# sourceMappingURL=Querybuilder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Querybuilder.js","sourceRoot":"","sources":["../../lib/Querybuilder.ts"],"names":[],"mappings":";;;AAAA,2BAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"Querybuilder.js","sourceRoot":"","sources":["../../lib/Querybuilder.ts"],"names":[],"mappings":";;;AAAA,2BAA+B;AAC/B,+DAA4D;AAC5D,6DAA0D;AAG1D,SAAgB,WAAW,CAAC,KAAY;IACtC,IAAI,KAAK,EAAE,MAAM,EAAE;QACjB,KAAK,CAAC,MAAM,GAAG,IAAA,+BAAc,EAAC,KAAK,CAAC,MAAM,CAAC,CAAC;KAC7C;IACD,IAAI,KAAK,EAAE,QAAQ,EAAE;QACnB,KAAK,CAAC,QAAQ,GAAG,IAAA,6BAAa,EAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;KAChD;IACD,OAAO,IAAA,cAAS,EAAC,KAAK,CAAC,CAAC;AAC1B,CAAC;AARD,kCAQC"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { Filter } from '../interfaces/Filter';
|
|
2
|
+
export declare const FilterParse: (filters: any, filterGroup?: string) => Filter;
|
|
@@ -1,20 +1,79 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FilterParse = void 0;
|
|
4
|
-
const
|
|
5
|
-
const FilterParse = (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
const GetType_1 = require("./GetType");
|
|
5
|
+
const FilterParse = (filters, filterGroup) => {
|
|
6
|
+
return filters.map(filter => {
|
|
7
|
+
let parsedFilter = {};
|
|
8
|
+
Object.keys(filter)?.forEach(key => {
|
|
9
|
+
if (key === 'path') {
|
|
10
|
+
parsedFilter = {
|
|
11
|
+
...parsedFilter,
|
|
12
|
+
path: filter?.path
|
|
13
|
+
};
|
|
10
14
|
}
|
|
11
|
-
if (
|
|
12
|
-
|
|
15
|
+
else if (key === 'value') {
|
|
16
|
+
parsedFilter = {
|
|
17
|
+
...parsedFilter,
|
|
18
|
+
value: filter?.value
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
else if (key === 'insensitive') {
|
|
22
|
+
parsedFilter = {
|
|
23
|
+
...parsedFilter,
|
|
24
|
+
insensitive: filter?.insensitive
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
else if (key === 'operator') {
|
|
28
|
+
parsedFilter = {
|
|
29
|
+
...parsedFilter,
|
|
30
|
+
operator: filter?.operator
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
if ((0, GetType_1.getType)(filter[key]) === 'object') {
|
|
35
|
+
if (filter[key]?.insensitive) {
|
|
36
|
+
parsedFilter = {
|
|
37
|
+
...parsedFilter,
|
|
38
|
+
insensitive: filter[key]?.insensitive
|
|
39
|
+
};
|
|
40
|
+
delete filter[key].insensitive;
|
|
41
|
+
}
|
|
42
|
+
parsedFilter = {
|
|
43
|
+
...parsedFilter,
|
|
44
|
+
operator: Object.keys(filter[key])[0],
|
|
45
|
+
value: Object.values(filter[key])[0],
|
|
46
|
+
path: key
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
parsedFilter = {
|
|
51
|
+
...parsedFilter,
|
|
52
|
+
operator: 'equals',
|
|
53
|
+
path: key,
|
|
54
|
+
value: filter[key]
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
parsedFilter = {
|
|
59
|
+
...parsedFilter,
|
|
60
|
+
type: (0, GetType_1.getType)(parsedFilter['value'])
|
|
61
|
+
};
|
|
62
|
+
if (parsedFilter['type'] === 'date') {
|
|
63
|
+
parsedFilter = {
|
|
64
|
+
...parsedFilter,
|
|
65
|
+
value: new Date(parsedFilter['value']).toISOString()
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
if (filterGroup) {
|
|
69
|
+
parsedFilter = {
|
|
70
|
+
...parsedFilter,
|
|
71
|
+
filterGroup
|
|
72
|
+
};
|
|
13
73
|
}
|
|
14
|
-
const parsedObject = (0, ObjectParse_1.ObjectParse)(filter)[0];
|
|
15
|
-
return Object.assign(Object.assign({}, parsedObject), { filterGroup });
|
|
16
74
|
});
|
|
17
|
-
|
|
75
|
+
return parsedFilter;
|
|
76
|
+
});
|
|
18
77
|
};
|
|
19
78
|
exports.FilterParse = FilterParse;
|
|
20
79
|
//# sourceMappingURL=FilterParse.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterParse.js","sourceRoot":"","sources":["../../../lib/functions/FilterParse.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"FilterParse.js","sourceRoot":"","sources":["../../../lib/functions/FilterParse.ts"],"names":[],"mappings":";;;AACA,uCAAoC;AAE7B,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,WAAoB,EAAU,EAAE;IACnE,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;QAC1B,IAAI,YAAY,GAAiB,EAAE,CAAC;QACpC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE;YACjC,IAAI,GAAG,KAAK,MAAM,EAAE;gBAClB,YAAY,GAAG;oBACb,GAAG,YAAY;oBACf,IAAI,EAAE,MAAM,EAAE,IAAI;iBACnB,CAAC;aACH;iBAAM,IAAI,GAAG,KAAK,OAAO,EAAE;gBAC1B,YAAY,GAAG;oBACb,GAAG,YAAY;oBACf,KAAK,EAAE,MAAM,EAAE,KAAK;iBACrB,CAAC;aACH;iBAAM,IAAI,GAAG,KAAK,aAAa,EAAE;gBAChC,YAAY,GAAG;oBACb,GAAG,YAAY;oBACf,WAAW,EAAE,MAAM,EAAE,WAAW;iBACjC,CAAC;aACH;iBAAM,IAAI,GAAG,KAAK,UAAU,EAAE;gBAC7B,YAAY,GAAG;oBACb,GAAG,YAAY;oBACf,QAAQ,EAAE,MAAM,EAAE,QAAQ;iBAC3B,CAAC;aACH;iBAAM;gBACL,IAAI,IAAA,iBAAO,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,QAAQ,EAAE;oBACrC,IAAI,MAAM,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE;wBAC5B,YAAY,GAAG;4BACb,GAAG,YAAY;4BACf,WAAW,EAAE,MAAM,CAAC,GAAG,CAAC,EAAE,WAAW;yBACtC,CAAC;wBACF,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,WAAW,CAAC;qBAChC;oBACD,YAAY,GAAG;wBACb,GAAG,YAAY;wBACf,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;wBACrC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;wBACpC,IAAI,EAAE,GAAG;qBACV,CAAC;iBACH;qBAAM;oBACL,YAAY,GAAG;wBACb,GAAG,YAAY;wBACf,QAAQ,EAAE,QAAQ;wBAClB,IAAI,EAAE,GAAG;wBACT,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC;qBACnB,CAAC;iBACH;aACF;YAED,YAAY,GAAG;gBACb,GAAG,YAAY;gBACf,IAAI,EAAE,IAAA,iBAAO,EAAC,YAAY,CAAC,OAAO,CAAC,CAAC;aACrC,CAAC;YAEF,IAAI,YAAY,CAAC,MAAM,CAAC,KAAK,MAAM,EAAE;gBACnC,YAAY,GAAG;oBACb,GAAG,YAAY;oBACf,KAAK,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,EAAE;iBACrD,CAAC;aACH;YAED,IAAI,WAAW,EAAE;gBACf,YAAY,GAAG;oBACb,GAAG,YAAY;oBACf,WAAW;iBACZ,CAAC;aACH;QACH,CAAC,CAAC,CAAC;QACH,OAAO,YAAY,CAAC;IACtB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAtEW,QAAA,WAAW,eAsEtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FilterResolver: (filters: any) => any[];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FilterResolver = void 0;
|
|
4
|
+
const FilterParse_1 = require("./FilterParse");
|
|
5
|
+
const FilterResolver = filters => {
|
|
6
|
+
const FilterResolved = [];
|
|
7
|
+
filters.forEach(filter => {
|
|
8
|
+
if (filter?.and) {
|
|
9
|
+
return FilterResolved.push(...(0, FilterParse_1.FilterParse)(filter.and, 'and'));
|
|
10
|
+
}
|
|
11
|
+
if (filter?.or) {
|
|
12
|
+
return FilterResolved.push(...(0, FilterParse_1.FilterParse)(filter.or, 'or'));
|
|
13
|
+
}
|
|
14
|
+
return FilterResolved.push(...(0, FilterParse_1.FilterParse)([filter]));
|
|
15
|
+
});
|
|
16
|
+
return FilterResolved;
|
|
17
|
+
};
|
|
18
|
+
exports.FilterResolver = FilterResolver;
|
|
19
|
+
//# sourceMappingURL=FilterResolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterResolver.js","sourceRoot":"","sources":["../../../lib/functions/FilterResolver.ts"],"names":[],"mappings":";;;AAAA,+CAA4C;AAErC,MAAM,cAAc,GAAG,OAAO,CAAC,EAAE;IACtC,MAAM,cAAc,GAAG,EAAE,CAAC;IAC1B,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QACvB,IAAI,MAAM,EAAE,GAAG,EAAE;YACf,OAAO,cAAc,CAAC,IAAI,CAAC,GAAG,IAAA,yBAAW,EAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;SAC/D;QACD,IAAI,MAAM,EAAE,EAAE,EAAE;YACd,OAAO,cAAc,CAAC,IAAI,CAAC,GAAG,IAAA,yBAAW,EAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;SAC7D;QAED,OAAO,cAAc,CAAC,IAAI,CAAC,GAAG,IAAA,yBAAW,EAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;IACH,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC;AAbW,QAAA,cAAc,kBAazB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GetType.js","sourceRoot":"","sources":["../../../lib/functions/GetType.ts"],"names":[],"mappings":";;;AAAO,MAAM,OAAO,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"GetType.js","sourceRoot":"","sources":["../../../lib/functions/GetType.ts"],"names":[],"mappings":";;;AAAO,MAAM,OAAO,GAAG,KAAK,CAAC,EAAE;IAC7B,QAAQ,OAAO,KAAK,EAAE;QACpB,KAAK,QAAQ;YACX,OAAO,QAAQ,CAAC;QAClB,KAAK,QAAQ;YACX,OAAO,QAAQ,CAAC;QAClB,KAAK,SAAS;YACZ,OAAO,SAAS,CAAC;QACnB,OAAO,CAAC,CAAC;YACP,IAAI,KAAK,YAAY,IAAI,EAAE;gBACzB,OAAO,MAAM,CAAC;aACf;YACD,OAAO,QAAQ,CAAC;SACjB;KACF;AACH,CAAC,CAAC;AAfW,QAAA,OAAO,WAelB"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PopulateParse = void 0;
|
|
4
|
+
const FilterResolver_1 = require("./FilterResolver");
|
|
5
|
+
const PopulateParse = (populates) => {
|
|
6
|
+
return populates.map(populate => {
|
|
7
|
+
let parsedPopulate = {};
|
|
8
|
+
Object.keys(populate)?.forEach(key => {
|
|
9
|
+
if (key === 'filter') {
|
|
10
|
+
parsedPopulate = {
|
|
11
|
+
...parsedPopulate,
|
|
12
|
+
filter: (0, FilterResolver_1.FilterResolver)(populate?.filter)
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
else if (key === 'populate') {
|
|
16
|
+
parsedPopulate = {
|
|
17
|
+
...parsedPopulate,
|
|
18
|
+
populate: (0, exports.PopulateParse)(populate?.populate)
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
else if (key === 'primaryKey') {
|
|
22
|
+
parsedPopulate = {
|
|
23
|
+
...parsedPopulate,
|
|
24
|
+
primaryKey: populate?.primaryKey
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
else if (key === 'path') {
|
|
28
|
+
parsedPopulate = {
|
|
29
|
+
...parsedPopulate,
|
|
30
|
+
path: populate?.path
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
else if (key === 'select') {
|
|
34
|
+
parsedPopulate = {
|
|
35
|
+
...parsedPopulate,
|
|
36
|
+
select: populate?.select
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
parsedPopulate = {
|
|
41
|
+
...parsedPopulate,
|
|
42
|
+
path: key,
|
|
43
|
+
select: populate[key]
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
return parsedPopulate;
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
exports.PopulateParse = PopulateParse;
|
|
51
|
+
//# sourceMappingURL=PopulateParse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PopulateParse.js","sourceRoot":"","sources":["../../../lib/functions/PopulateParse.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAE3C,MAAM,aAAa,GAAG,CAAC,SAAS,EAAY,EAAE;IACnD,OAAO,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;QAC9B,IAAI,cAAc,GAAG,EAAE,CAAC;QACxB,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE;YACnC,IAAI,GAAG,KAAK,QAAQ,EAAE;gBACpB,cAAc,GAAG;oBACf,GAAG,cAAc;oBACjB,MAAM,EAAE,IAAA,+BAAc,EAAC,QAAQ,EAAE,MAAM,CAAC;iBACzC,CAAC;aACH;iBAAM,IAAI,GAAG,KAAK,UAAU,EAAE;gBAC7B,cAAc,GAAG;oBACf,GAAG,cAAc;oBACjB,QAAQ,EAAE,IAAA,qBAAa,EAAC,QAAQ,EAAE,QAAQ,CAAC;iBAC5C,CAAC;aACH;iBAAM,IAAI,GAAG,KAAK,YAAY,EAAE;gBAC/B,cAAc,GAAG;oBACf,GAAG,cAAc;oBACjB,UAAU,EAAE,QAAQ,EAAE,UAAU;iBACjC,CAAC;aACH;iBAAM,IAAI,GAAG,KAAK,MAAM,EAAE;gBACzB,cAAc,GAAG;oBACf,GAAG,cAAc;oBACjB,IAAI,EAAE,QAAQ,EAAE,IAAI;iBACrB,CAAC;aACH;iBAAM,IAAI,GAAG,KAAK,QAAQ,EAAE;gBAC3B,cAAc,GAAG;oBACf,GAAG,cAAc;oBACjB,MAAM,EAAE,QAAQ,EAAE,MAAM;iBACzB,CAAC;aACH;iBAAM;gBACL,cAAc,GAAG;oBACf,GAAG,cAAc;oBACjB,IAAI,EAAE,GAAG;oBACT,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC;iBACtB,CAAC;aACH;QACH,CAAC,CAAC,CAAC;QACH,OAAO,cAAc,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAvCW,QAAA,aAAa,iBAuCxB"}
|
|
@@ -1,8 +1,24 @@
|
|
|
1
1
|
import { Operator } from './Operator';
|
|
2
2
|
declare type FilterObject = {
|
|
3
|
+
[x in string]: any;
|
|
4
|
+
};
|
|
5
|
+
declare type OperatorObject = {
|
|
3
6
|
[x in Operator]: string | Date | boolean | number;
|
|
4
7
|
};
|
|
5
|
-
export declare type
|
|
6
|
-
|
|
8
|
+
export declare type FiltersField = FilterObject | OperatorObject | {
|
|
9
|
+
path: string;
|
|
10
|
+
} | {
|
|
11
|
+
value: string;
|
|
12
|
+
} | {
|
|
13
|
+
insensitive: boolean;
|
|
14
|
+
} | {
|
|
15
|
+
operator: Operator;
|
|
7
16
|
};
|
|
17
|
+
export declare type Filter = Array<FiltersField | {
|
|
18
|
+
or: FiltersField[];
|
|
19
|
+
} | {
|
|
20
|
+
and: FiltersField[];
|
|
21
|
+
} | {
|
|
22
|
+
not: FiltersField[];
|
|
23
|
+
}>;
|
|
8
24
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare type Operator = 'contains' | 'endsWith' | 'startsWith' | 'equals' | 'gt' | 'gte' | 'in' | 'lt' | 'lte' | 'not' | 'notIn';
|
|
1
|
+
export declare type Operator = 'contains' | 'endsWith' | 'startsWith' | 'equals' | 'gt' | 'gte' | 'in' | 'lt' | 'lte' | 'not' | 'notIn' | 'hasEvery' | 'hasSome' | 'has' | 'isEmpty';
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
import { Filter } from './Filter';
|
|
2
|
+
declare type PopulateObject = {
|
|
3
|
+
[x: string]: string;
|
|
4
|
+
};
|
|
5
|
+
export declare type Populate = Array<PopulateObject | {
|
|
6
|
+
filter: Filter;
|
|
7
|
+
} | {
|
|
8
|
+
populate: Populate;
|
|
9
|
+
} | {
|
|
10
|
+
primaryKey: string;
|
|
11
|
+
} | {
|
|
2
12
|
path: string;
|
|
13
|
+
} | {
|
|
3
14
|
select: string;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
15
|
+
}>;
|
|
16
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Filter } from './Filter';
|
|
2
2
|
import { Populate } from './Populate';
|
|
3
3
|
import { SortFields } from './SortFields';
|
|
4
4
|
export interface Query {
|
|
5
|
-
select
|
|
5
|
+
select?: string;
|
|
6
6
|
page?: number;
|
|
7
7
|
limit?: number;
|
|
8
8
|
sort?: SortFields;
|
|
9
|
-
populate?: Populate
|
|
10
|
-
filter?:
|
|
9
|
+
populate?: Populate;
|
|
10
|
+
filter?: Filter;
|
|
11
11
|
}
|
package/dist/teste.js
CHANGED
|
@@ -1,41 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
console.log((0,
|
|
5
|
-
select: 'name
|
|
3
|
+
const QueryBuilder_1 = require("./lib/QueryBuilder");
|
|
4
|
+
console.log((0, QueryBuilder_1.QueryString)({
|
|
5
|
+
select: 'name email createdAt',
|
|
6
6
|
filter: [
|
|
7
|
-
{
|
|
8
|
-
|
|
9
|
-
},
|
|
7
|
+
{ path: 'name', value: 'wilian teste', operator: 'equals' },
|
|
8
|
+
{ createdAt: { lte: new Date() } },
|
|
10
9
|
{
|
|
11
10
|
or: [
|
|
12
|
-
{
|
|
13
|
-
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
risole: 2
|
|
17
|
-
}
|
|
18
|
-
]
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
and: [
|
|
22
|
-
{
|
|
23
|
-
kibe: 'frito'
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
risole: 2
|
|
27
|
-
}
|
|
11
|
+
{ email: { contains: 'casca' } },
|
|
12
|
+
{ email: { contains: 'WIL', insensitive: true } }
|
|
28
13
|
]
|
|
29
|
-
}
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
populate: [
|
|
30
17
|
{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
risole: 2
|
|
37
|
-
}
|
|
38
|
-
]
|
|
18
|
+
path: 'residence',
|
|
19
|
+
select: 'identification createdAt',
|
|
20
|
+
primaryKey: 'id',
|
|
21
|
+
filter: [{ createdAt: { lte: new Date() } }],
|
|
22
|
+
populate: [{ createdBy: 'name email' }]
|
|
39
23
|
}
|
|
40
24
|
]
|
|
41
25
|
}));
|
package/dist/teste.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teste.js","sourceRoot":"","sources":["../teste.ts"],"names":[],"mappings":";;AAAA,qDAAiD;
|
|
1
|
+
{"version":3,"file":"teste.js","sourceRoot":"","sources":["../teste.ts"],"names":[],"mappings":";;AAAA,qDAAiD;AAEjD,OAAO,CAAC,GAAG,CACT,IAAA,0BAAW,EAAC;IACV,MAAM,EAAE,sBAAsB;IAC9B,MAAM,EAAE;QACN,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE;QAC3D,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,IAAI,IAAI,EAAE,EAAE,EAAE;QAClC;YACE,EAAE,EAAE;gBACF,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE;gBAChC,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE;aAClD;SACF;KACF;IACD,QAAQ,EAAE;QACR;YACE,IAAI,EAAE,WAAW;YACjB,MAAM,EAAE,0BAA0B;YAClC,UAAU,EAAE,IAAI;YAChB,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,IAAI,IAAI,EAAE,EAAE,EAAE,CAAC;YAC5C,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;SACxC;KACF;CACF,CAAC,CACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../node_modules/typescript/lib/lib.scripthost.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.
|
|
1
|
+
{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.es2021.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../node_modules/typescript/lib/lib.scripthost.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2021.promise.d.ts","../node_modules/typescript/lib/lib.es2021.string.d.ts","../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../node_modules/typescript/lib/lib.es2021.intl.d.ts","../node_modules/typescript/lib/lib.es2021.full.d.ts","../lib/interfaces/operator.ts","../lib/interfaces/filter.ts","../lib/interfaces/populate.ts","../lib/interfaces/sortfields.ts","../lib/interfaces/query.ts","../node_modules/@types/qs/index.d.ts","../lib/functions/gettype.ts","../lib/functions/filterparse.ts","../lib/functions/filterresolver.ts","../lib/functions/populateparse.ts","../lib/querybuilder.ts","../index.ts","../teste.ts"],"fileInfos":[{"version":"3ac1b83264055b28c0165688fda6dfcc39001e9e7828f649299101c23ad0a0c3","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f",{"version":"72704b10d97777e15f1a581b73f88273037ef752d2e50b72287bd0a90af64fe6","affectsGlobalScope":true},{"version":"dbb73d4d99be496175cb432c74c2615f78c76f4272f1d83cba11ee0ed6dbddf0","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"5075b36ab861c8c0c45377cb8c96270d7c65f0eeaf105d53fac6850da61f1027","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"e8c9f4e445a489991ca1a4232667de3ac36b07ba75ea335971fbeacf2d26fe67","affectsGlobalScope":true},"0ce99fa68940b918945c445a958e2568a5b7593f7e3a0eeef9f0f79d45651b91","454b0392263f594d9cd33159411df01beb09dda6d46d7d09aee506997fed134b","6fca10a5cb88a76c2603f0fc0ea3e6836ca2ccb89af0958bdd4ce48504217138","327fdcfc2fd5413bc62218325bd01c42702432fded09e3fe80f562fe2062a097","1687d1bb2a596cfbe84ca0bedc14a4b099d7488fe7cf4e0cd84ec55dab5697d4","a366eb3f5532eade55402eec82def264725b6a7be39b8114f083e183bcf21c10","ba601641fac98c229ccd4a303f747de376d761babb33229bb7153bed9356c9cc","5413e2cb35d9569bdb7bc1de3818c08ba7b0e290918c87296309ec0463b26418",{"version":"527cdf5f97076fcdb38e14d2f2e5eaa76f2c76a28df584858bd699b91d9d3ad3","signature":"7b9504b451529d09d7db528263bd0f2ce06acea78eb1f80f07f90a222a063caf"},{"version":"453992185af1f216ca04012ee39d356e3168ac02ffa015d258350c62db49ec13","signature":"bee5d82699b0989b4d85e69152a9ccb0f7d10cdee7fb4eba691dc4d1cc7dd756"},{"version":"3934b0079af06f8deb2b5ffc42ae6d57d0dab632340fad199e67cd24ae5b5d8b","signature":"418a1c232e1387107647efbc7e82f43d1c7556b8dc23df2fe1fd98fc7fd5e709"},{"version":"43197211b4af5cb3e20d8abc1b287efd4a08712e5738b2469ab4a9a26409e993","signature":"f1b4d7e012d8c6651d25ee44cfe1e3b82ce63c8ce484574fad79a79f73c80f87"},"aff4f2a54ae4d18ecbfe95fc8d0c0d5ddfffa6a0c96c4212231bd3660f4949ab",{"version":"7af17f917e083ff5c21428e01266b5f53dacd15a849790b401b199c732d30c04","signature":"f761c91419d0a89422a0004ef1a92929dd4d2d5e5c16758654d8b0467d1998c6"}],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":8},"fileIdsList":[[49,50,52,58],[49,54],[55],[50,55,56],[48],[49],[49,50,51],[52,53,56,57],[58],[50],[52]],"referencedMap":[[59,1],[55,2],[56,3],[57,4],[49,5],[50,6],[52,7],[58,8],[60,9]],"exportedModulesMap":[[59,1],[55,6],[57,10],[49,5],[50,6],[52,7],[58,11]],"semanticDiagnosticsPerFile":[59,55,56,54,57,49,48,50,52,51,58,53,9,10,14,13,2,15,16,17,18,19,20,21,22,3,4,26,23,24,25,27,28,29,5,30,31,32,33,6,34,35,36,37,7,42,38,39,40,41,8,47,46,43,44,45,1,12,11,60]},"version":"4.6.4"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nestjs-prisma-querybuilder-interface",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Frontend interface to nestjs-prisma-querybuilder",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"scripts": {
|
|
23
23
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
24
24
|
"build": "tsc",
|
|
25
|
-
"prepare": "npm run build"
|
|
25
|
+
"prepare": "npm run build",
|
|
26
|
+
"teste": "npm run build && node ./dist/teste.js"
|
|
26
27
|
},
|
|
27
28
|
"repository": {
|
|
28
29
|
"type": "git",
|
package/dist/lib/FilterParse.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FilterParse = void 0;
|
|
4
|
-
const FilterParse = (filter, filterGroup) => {
|
|
5
|
-
if (filter?.length) {
|
|
6
|
-
return filter.map(filter => {
|
|
7
|
-
if (filter?.and) {
|
|
8
|
-
return (0, exports.FilterParse)(filter.and, 'and');
|
|
9
|
-
}
|
|
10
|
-
if (filter?.or) {
|
|
11
|
-
return (0, exports.FilterParse)(filter.or, 'or');
|
|
12
|
-
}
|
|
13
|
-
return { ...filter, filterGroup };
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
exports.FilterParse = FilterParse;
|
|
18
|
-
//# sourceMappingURL=FilterParse.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FilterParse.js","sourceRoot":"","sources":["../../lib/FilterParse.ts"],"names":[],"mappings":";;;AAEO,MAAM,WAAW,GAAG,CACzB,MAA2B,EAC3B,WAAyB,EACzB,EAAE;IACF,IAAI,MAAM,EAAE,MAAM,EAAE;QAClB,OAAO,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;YACzB,IAAI,MAAM,EAAE,GAAG,EAAE;gBACf,OAAO,IAAA,mBAAW,EAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;aACvC;YACD,IAAI,MAAM,EAAE,EAAE,EAAE;gBACd,OAAO,IAAA,mBAAW,EAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;aACrC;YACD,OAAO,EAAE,GAAG,MAAM,EAAE,WAAW,EAAE,CAAC;QACpC,CAAC,CAAC,CAAC;KACJ;AACH,CAAC,CAAC;AAfW,QAAA,WAAW,eAetB"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
declare type Filter = {
|
|
2
|
-
path: string;
|
|
3
|
-
value: string;
|
|
4
|
-
operator?: 'contains' | 'endsWith' | 'startsWith' | 'equals' | 'gt' | 'gte' | 'in' | 'lt' | 'lte' | 'not' | 'notIn';
|
|
5
|
-
};
|
|
6
|
-
declare type Or = {
|
|
7
|
-
or: Filter[];
|
|
8
|
-
};
|
|
9
|
-
declare type And = {
|
|
10
|
-
and: Filter[];
|
|
11
|
-
};
|
|
12
|
-
export declare type FiltersFields = Array<Filter | Or | And>;
|
|
13
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FiltersFields.js","sourceRoot":"","sources":["../../lib/FiltersFields.ts"],"names":[],"mappings":""}
|
package/dist/lib/Populate.d.ts
DELETED
package/dist/lib/Populate.js
DELETED
package/dist/lib/Populate.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Populate.js","sourceRoot":"","sources":["../../lib/Populate.ts"],"names":[],"mappings":""}
|
package/dist/lib/Query.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FiltersFields } from './FiltersFields';
|
|
2
|
-
import { Populate } from './Populate';
|
|
3
|
-
import { SortFields } from './SortFields';
|
|
4
|
-
export interface Query {
|
|
5
|
-
select: string;
|
|
6
|
-
page?: number;
|
|
7
|
-
limit?: number;
|
|
8
|
-
sort?: SortFields;
|
|
9
|
-
populate?: Populate[];
|
|
10
|
-
and?: FiltersFields;
|
|
11
|
-
or?: FiltersFields;
|
|
12
|
-
[x: string]: any;
|
|
13
|
-
}
|
package/dist/lib/Query.js
DELETED
package/dist/lib/Query.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Query.js","sourceRoot":"","sources":["../../lib/Query.ts"],"names":[],"mappings":""}
|
package/dist/lib/SortFields.d.ts
DELETED
package/dist/lib/SortFields.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SortFields.js","sourceRoot":"","sources":["../../lib/SortFields.ts"],"names":[],"mappings":""}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ObjectParse = void 0;
|
|
4
|
-
const GetType_1 = require("./GetType");
|
|
5
|
-
const objects = {
|
|
6
|
-
select: 'select',
|
|
7
|
-
page: 'page',
|
|
8
|
-
limit: 'limit',
|
|
9
|
-
sort: 'sort',
|
|
10
|
-
populate: 'populate',
|
|
11
|
-
and: 'and',
|
|
12
|
-
or: 'or'
|
|
13
|
-
};
|
|
14
|
-
const ObjectParse = (query) => {
|
|
15
|
-
const filters = [];
|
|
16
|
-
console.log(query);
|
|
17
|
-
Object.keys(query)?.map((key, index) => {
|
|
18
|
-
if (!objects[key]) {
|
|
19
|
-
const type = (0, GetType_1.getType)(Object.values(query)[index]);
|
|
20
|
-
filters.push({
|
|
21
|
-
path: key,
|
|
22
|
-
value: type === 'object'
|
|
23
|
-
? Object.values(Object.values(query)[index])[0]
|
|
24
|
-
: Object.values(query)[index],
|
|
25
|
-
operator: type === 'object'
|
|
26
|
-
? Object.keys(Object.values(query)[index])[0]
|
|
27
|
-
: 'equals',
|
|
28
|
-
type: type === 'object'
|
|
29
|
-
? (0, GetType_1.getType)(Object.values(Object.values(query)[index])[0])
|
|
30
|
-
: type
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
return filters;
|
|
35
|
-
};
|
|
36
|
-
exports.ObjectParse = ObjectParse;
|
|
37
|
-
//# sourceMappingURL=FilterObjectParse.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FilterObjectParse.js","sourceRoot":"","sources":["../../../lib/functions/FilterObjectParse.ts"],"names":[],"mappings":";;;AAGA,uCAAoC;AAEpC,MAAM,OAAO,GAAG;IACd,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,GAAG,EAAE,KAAK;IACV,EAAE,EAAE,IAAI;CACT,CAAC;AAEK,MAAM,WAAW,GAAG,CAAC,KAAa,EAAkB,EAAE;IAC3D,MAAM,OAAO,GAAmB,EAAE,CAAC;IACnC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACnB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;QACrC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YACjB,MAAM,IAAI,GAAG,IAAA,iBAAO,EAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;YAClD,OAAO,CAAC,IAAI,CAAC;gBACX,IAAI,EAAE,GAAG;gBACT,KAAK,EACH,IAAI,KAAK,QAAQ;oBACf,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC/C,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC;gBACjC,QAAQ,EACN,IAAI,KAAK,QAAQ;oBACf,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC7C,CAAC,CAAC,QAAQ;gBACd,IAAI,EACF,IAAI,KAAK,QAAQ;oBACf,CAAC,CAAC,IAAA,iBAAO,EAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;oBACxD,CAAC,CAAC,IAAI;aACX,CAAC,CAAC;SACJ;IACH,CAAC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAxBW,QAAA,WAAW,eAwBtB"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ObjectParse = void 0;
|
|
4
|
-
const FilterParse_1 = require("./FilterParse");
|
|
5
|
-
const GetType_1 = require("./GetType");
|
|
6
|
-
const objects = {
|
|
7
|
-
and: 'and',
|
|
8
|
-
or: 'or'
|
|
9
|
-
};
|
|
10
|
-
const ObjectParse = (filter) => {
|
|
11
|
-
var _a;
|
|
12
|
-
return (_a = Object.keys(filter)) === null || _a === void 0 ? void 0 : _a.map((key, index) => {
|
|
13
|
-
if (!objects[key]) {
|
|
14
|
-
const type = (0, GetType_1.getType)(Object.values(filter)[index]);
|
|
15
|
-
return {
|
|
16
|
-
path: key,
|
|
17
|
-
value: type === 'object'
|
|
18
|
-
? Object.values(Object.values(filter)[index])[0]
|
|
19
|
-
: Object.values(filter)[index],
|
|
20
|
-
operator: type === 'object'
|
|
21
|
-
? Object.keys(Object.values(filter)[index])[0]
|
|
22
|
-
: 'equals',
|
|
23
|
-
type: type === 'object'
|
|
24
|
-
? (0, GetType_1.getType)(Object.values(Object.values(filter)[index])[0])
|
|
25
|
-
: type
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
return (0, FilterParse_1.FilterParse)(filter, key);
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
exports.ObjectParse = ObjectParse;
|
|
34
|
-
//# sourceMappingURL=ObjectParse.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectParse.js","sourceRoot":"","sources":["../../../lib/functions/ObjectParse.ts"],"names":[],"mappings":";;;AAEA,+CAA4C;AAC5C,uCAAoC;AAEpC,MAAM,OAAO,GAAG;IACd,GAAG,EAAE,KAAK;IACV,EAAE,EAAE,IAAI;CACT,CAAC;AAEK,MAAM,WAAW,GAAG,CAAC,MAAqB,EAAkB,EAAE;;IACnE,OAAO,MAAA,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,0CAAE,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;QAC7C,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YACjB,MAAM,IAAI,GAAG,IAAA,iBAAO,EAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;YACnD,OAAO;gBACL,IAAI,EAAE,GAAG;gBACT,KAAK,EACH,IAAI,KAAK,QAAQ;oBACf,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;oBAChD,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC;gBAClC,QAAQ,EACN,IAAI,KAAK,QAAQ;oBACf,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC9C,CAAC,CAAC,QAAQ;gBACd,IAAI,EACF,IAAI,KAAK,QAAQ;oBACf,CAAC,CAAC,IAAA,iBAAO,EAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;oBACzD,CAAC,CAAC,IAAI;aACX,CAAC;SACH;aAAM;YACL,OAAO,IAAA,yBAAW,EAAC,MAAa,EAAE,GAAU,CAAC,CAAC;SAC/C;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAvBW,QAAA,WAAW,eAuBtB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const QueryParse: (filters: any) => any[];
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.QueryParse = void 0;
|
|
4
|
-
const FilterParse_1 = require("./FilterParse");
|
|
5
|
-
const ObjectParse_1 = require("./ObjectParse");
|
|
6
|
-
const QueryParse = (filters) => {
|
|
7
|
-
const parsedFilter = [];
|
|
8
|
-
filters.forEach(filter => {
|
|
9
|
-
if (filter === null || filter === void 0 ? void 0 : filter.and) {
|
|
10
|
-
return parsedFilter.push(...(0, FilterParse_1.FilterParse)(filter.and, 'and'));
|
|
11
|
-
}
|
|
12
|
-
if (filter === null || filter === void 0 ? void 0 : filter.or) {
|
|
13
|
-
return parsedFilter.push(...(0, FilterParse_1.FilterParse)(filter.or, 'or'));
|
|
14
|
-
}
|
|
15
|
-
return parsedFilter.push(...(0, ObjectParse_1.ObjectParse)(filter));
|
|
16
|
-
});
|
|
17
|
-
return parsedFilter;
|
|
18
|
-
};
|
|
19
|
-
exports.QueryParse = QueryParse;
|
|
20
|
-
//# sourceMappingURL=QueryParse.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryParse.js","sourceRoot":"","sources":["../../../lib/functions/QueryParse.ts"],"names":[],"mappings":";;;AAAA,+CAA4C;AAC5C,+CAA4C;AAErC,MAAM,UAAU,GAAG,CAAC,OAAY,EAAE,EAAE;IACzC,MAAM,YAAY,GAAG,EAAE,CAAC;IACxB,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QACvB,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,GAAG,EAAE;YACf,OAAO,YAAY,CAAC,IAAI,CAAC,GAAG,IAAA,yBAAW,EAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;SAC7D;QACD,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,EAAE,EAAE;YACd,OAAO,YAAY,CAAC,IAAI,CAAC,GAAG,IAAA,yBAAW,EAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;SAC3D;QACD,OAAO,YAAY,CAAC,IAAI,CAAC,GAAG,IAAA,yBAAW,EAAC,MAAM,CAAC,CAAC,CAAC;IACnD,CAAC,CAAC,CAAC;IACH,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC;AAZW,QAAA,UAAU,cAYrB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"And.js","sourceRoot":"","sources":["../../../lib/interfaces/And.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FiltersFields.js","sourceRoot":"","sources":["../../../lib/interfaces/FiltersFields.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Or.js","sourceRoot":"","sources":["../../../lib/interfaces/Or.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ParsedFilter.js","sourceRoot":"","sources":["../../../lib/interfaces/ParsedFilter.ts"],"names":[],"mappings":""}
|