@mgamadeus/ddd-web 0.0.1 → 0.2.1
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/.claude/skills/ddd-web-specialist/SKILL.md +110 -0
- package/.claude/skills/ddd-web-specialist/references/consumer.md +271 -0
- package/.claude/skills/ddd-web-specialist/references/maintaining.md +108 -0
- package/CHANGELOG.md +89 -0
- package/README.md +68 -2
- package/dist/api/index.d.ts +246 -0
- package/dist/api/index.js +265 -0
- package/dist/api/index.js.map +1 -0
- package/dist/auth/index.d.ts +109 -0
- package/dist/auth/index.js +146 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/chunk-OL742YG5.js +1514 -0
- package/dist/chunk-OL742YG5.js.map +1 -0
- package/dist/chunk-QLCE3QTP.js +123 -0
- package/dist/chunk-QLCE3QTP.js.map +1 -0
- package/dist/codegen/cli.js +77 -0
- package/dist/codegen/cli.js.map +1 -0
- package/dist/codegen/index.d.ts +342 -0
- package/dist/codegen/index.js +25 -0
- package/dist/codegen/index.js.map +1 -0
- package/dist/contract/index.d.ts +109 -0
- package/dist/contract/index.js +126 -0
- package/dist/contract/index.js.map +1 -0
- package/dist/errors-B4KabvNa.d.ts +22 -0
- package/dist/extensions-DToc6G5E.d.ts +208 -0
- package/dist/query/index.d.ts +372 -0
- package/dist/query/index.js +860 -0
- package/dist/query/index.js.map +1 -0
- package/dist/types-BhDMN3ZS.d.ts +35 -0
- package/package.json +58 -3
|
@@ -0,0 +1,860 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DEFAULT_TOP,
|
|
3
|
+
NULL_OPERATORS,
|
|
4
|
+
formatDddDate,
|
|
5
|
+
formatDddDateTime,
|
|
6
|
+
isFilterOperator,
|
|
7
|
+
isFulltextOperator,
|
|
8
|
+
isListOperator,
|
|
9
|
+
isValidDddDate
|
|
10
|
+
} from "../chunk-QLCE3QTP.js";
|
|
11
|
+
|
|
12
|
+
// src/query/errors.ts
|
|
13
|
+
var QueryOptionsError = class extends Error {
|
|
14
|
+
constructor(message) {
|
|
15
|
+
super(message);
|
|
16
|
+
this.name = "QueryOptionsError";
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// src/query/literals.ts
|
|
21
|
+
function escapeFilterString(value) {
|
|
22
|
+
return value.replace(/\\/g, "\\\\").replace(/'/g, "\\'");
|
|
23
|
+
}
|
|
24
|
+
var escapeOData = escapeFilterString;
|
|
25
|
+
function filterScalarToString(value) {
|
|
26
|
+
if (typeof value === "boolean") {
|
|
27
|
+
return value ? "1" : "0";
|
|
28
|
+
}
|
|
29
|
+
if (value instanceof Date) {
|
|
30
|
+
return formatDddDateTime(value);
|
|
31
|
+
}
|
|
32
|
+
if (typeof value === "number") {
|
|
33
|
+
if (!Number.isFinite(value)) {
|
|
34
|
+
throw new QueryOptionsError(`Filter value ${String(value)} is not a finite number`);
|
|
35
|
+
}
|
|
36
|
+
const text = String(value);
|
|
37
|
+
if (/e/i.test(text)) {
|
|
38
|
+
throw new QueryOptionsError(`Filter value ${text} has no plain decimal form; pass it as a string`);
|
|
39
|
+
}
|
|
40
|
+
return text;
|
|
41
|
+
}
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
44
|
+
function formatFilterScalar(value) {
|
|
45
|
+
if (value === null) {
|
|
46
|
+
return "null";
|
|
47
|
+
}
|
|
48
|
+
return `'${escapeFilterString(filterScalarToString(value))}'`;
|
|
49
|
+
}
|
|
50
|
+
function formatFilterListItem(value) {
|
|
51
|
+
return value === null ? "null" : JSON.stringify(filterScalarToString(value));
|
|
52
|
+
}
|
|
53
|
+
function formatFilterLiteral(value) {
|
|
54
|
+
if (Array.isArray(value)) {
|
|
55
|
+
return `[${value.map(formatFilterListItem).join(",")}]`;
|
|
56
|
+
}
|
|
57
|
+
return formatFilterScalar(value);
|
|
58
|
+
}
|
|
59
|
+
var PROPERTY_PATH = /^[A-Za-z0-9_]+(\.[A-Za-z0-9_]+)*$/;
|
|
60
|
+
function assertPropertyPath(property, context = "property") {
|
|
61
|
+
if (!PROPERTY_PATH.test(property)) {
|
|
62
|
+
throw new QueryOptionsError(`Invalid ${context} '${property}': use letters, digits, '_' and '.' only`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// src/query/structure.ts
|
|
67
|
+
function topLevelJoinOperators(expression) {
|
|
68
|
+
const found = /* @__PURE__ */ new Set();
|
|
69
|
+
let depth = 0;
|
|
70
|
+
let quote = null;
|
|
71
|
+
for (let index = 0; index < expression.length; index++) {
|
|
72
|
+
const char = expression[index];
|
|
73
|
+
if (quote !== null) {
|
|
74
|
+
if (char === "\\") {
|
|
75
|
+
index++;
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
if (char === quote) {
|
|
79
|
+
quote = null;
|
|
80
|
+
}
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
if (char === "'" || char === '"') {
|
|
84
|
+
quote = char;
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
if (char === "(" || char === "[") {
|
|
88
|
+
depth++;
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
if (char === ")" || char === "]") {
|
|
92
|
+
depth = Math.max(0, depth - 1);
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
if (depth > 0) {
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
const previous = index === 0 ? " " : expression[index - 1];
|
|
99
|
+
if (!/[\s)\]'"0-9]/.test(previous) && !/null$/i.test(expression.slice(Math.max(0, index - 4), index))) {
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
for (const keyword of ["and", "or"]) {
|
|
103
|
+
const candidate = expression.slice(index, index + keyword.length).toLowerCase();
|
|
104
|
+
const next = expression[index + keyword.length];
|
|
105
|
+
if (candidate === keyword && (next === void 0 || /\s|\(|\)/.test(next))) {
|
|
106
|
+
found.add(keyword);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return found;
|
|
111
|
+
}
|
|
112
|
+
function groupFilter(clause) {
|
|
113
|
+
return `(${clause})`;
|
|
114
|
+
}
|
|
115
|
+
function joinFilters(joinOperator, clauses) {
|
|
116
|
+
const nonEmpty = clauses.map((clause) => clause.trim()).filter((clause) => clause.length > 0);
|
|
117
|
+
if (nonEmpty.length === 0) {
|
|
118
|
+
return void 0;
|
|
119
|
+
}
|
|
120
|
+
if (nonEmpty.length === 1) {
|
|
121
|
+
return nonEmpty[0];
|
|
122
|
+
}
|
|
123
|
+
return nonEmpty.map((clause) => {
|
|
124
|
+
const operators = topLevelJoinOperators(clause);
|
|
125
|
+
const mixesOtherOperator = [...operators].some((operator) => operator !== joinOperator);
|
|
126
|
+
return mixesOtherOperator ? groupFilter(clause) : clause;
|
|
127
|
+
}).join(` ${joinOperator} `);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// src/query/filters.ts
|
|
131
|
+
function isNullLike(value) {
|
|
132
|
+
return value === null || typeof value === "string" && value.toLowerCase() === "null";
|
|
133
|
+
}
|
|
134
|
+
function assertValueFitsOperator(operator, value) {
|
|
135
|
+
if (!isFilterOperator(operator)) {
|
|
136
|
+
throw new QueryOptionsError(`Unknown filter operator '${String(operator)}'`);
|
|
137
|
+
}
|
|
138
|
+
const isList = Array.isArray(value);
|
|
139
|
+
if (!isList && isNullLike(value) && !NULL_OPERATORS.includes(operator)) {
|
|
140
|
+
throw new QueryOptionsError(`A null value is only allowed with ${NULL_OPERATORS.join(", ")} (got '${operator}')`);
|
|
141
|
+
}
|
|
142
|
+
if (isList && !isListOperator(operator)) {
|
|
143
|
+
throw new QueryOptionsError(`A list value is only allowed with in, ni, bw (got '${operator}')`);
|
|
144
|
+
}
|
|
145
|
+
if (!isList && isListOperator(operator)) {
|
|
146
|
+
throw new QueryOptionsError(`Operator '${operator}' needs a list value`);
|
|
147
|
+
}
|
|
148
|
+
if (isList) {
|
|
149
|
+
const items = value;
|
|
150
|
+
if (operator === "bw" && items.length !== 2) {
|
|
151
|
+
throw new QueryOptionsError(`Operator 'bw' needs exactly 2 values (got ${items.length})`);
|
|
152
|
+
}
|
|
153
|
+
if (items.length === 0) {
|
|
154
|
+
throw new QueryOptionsError(`Operator '${operator}' needs at least one value`);
|
|
155
|
+
}
|
|
156
|
+
if (items.some((item) => Array.isArray(item))) {
|
|
157
|
+
throw new QueryOptionsError(`List items of '${operator}' must be scalars`);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
if (isFulltextOperator(operator) && (typeof value !== "string" || value.trim() === "")) {
|
|
161
|
+
throw new QueryOptionsError(`Fulltext operator '${operator}' needs a non-empty string value`);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
function buildFieldFilter(property, value, operator = "eq") {
|
|
165
|
+
assertPropertyPath(property, "filter property");
|
|
166
|
+
assertValueFitsOperator(operator, value);
|
|
167
|
+
return `${property} ${operator} ${formatFilterLiteral(value)}`;
|
|
168
|
+
}
|
|
169
|
+
function buildListFilter(property, operator, values) {
|
|
170
|
+
return buildFieldFilter(property, values, operator);
|
|
171
|
+
}
|
|
172
|
+
function buildInFilter(property, values) {
|
|
173
|
+
return buildFieldFilter(property, values, "in");
|
|
174
|
+
}
|
|
175
|
+
function buildNotInFilter(property, values) {
|
|
176
|
+
return buildFieldFilter(property, values, "ni");
|
|
177
|
+
}
|
|
178
|
+
function buildBetweenFilter(property, from, to) {
|
|
179
|
+
return buildFieldFilter(property, [from, to], "bw");
|
|
180
|
+
}
|
|
181
|
+
function buildNullFilter(property, negate = false) {
|
|
182
|
+
return buildFieldFilter(property, null, negate ? "ne" : "eq");
|
|
183
|
+
}
|
|
184
|
+
function buildContainsFilter(property, term, negate = false) {
|
|
185
|
+
const trimmed = term.trim();
|
|
186
|
+
if (!trimmed) {
|
|
187
|
+
return void 0;
|
|
188
|
+
}
|
|
189
|
+
return buildFieldFilter(property, `*${trimmed}*`, negate ? "ne" : "eq");
|
|
190
|
+
}
|
|
191
|
+
function toBooleanPrefix(value) {
|
|
192
|
+
return value.split(/\s+/).filter(Boolean).map((word) => word.endsWith("*") ? word : `${word}*`).join(" ");
|
|
193
|
+
}
|
|
194
|
+
function buildFulltextFilter(property, term, options = {}) {
|
|
195
|
+
const mode = options.mode ?? "ft";
|
|
196
|
+
const trimmed = term.trim();
|
|
197
|
+
if (!trimmed) {
|
|
198
|
+
return void 0;
|
|
199
|
+
}
|
|
200
|
+
const usePrefix = options.prefix ?? mode === "fb";
|
|
201
|
+
return buildFieldFilter(property, mode === "fb" && usePrefix ? toBooleanPrefix(trimmed) : trimmed, mode);
|
|
202
|
+
}
|
|
203
|
+
function buildIntEqFilter(rawValue, property, options = {}) {
|
|
204
|
+
const prefix = options.stripLeadingChar;
|
|
205
|
+
const term = prefix && rawValue.startsWith(prefix) ? rawValue.slice(prefix.length) : rawValue;
|
|
206
|
+
if (!/^\d+$/.test(term)) {
|
|
207
|
+
return void 0;
|
|
208
|
+
}
|
|
209
|
+
return buildFieldFilter(property, term, "eq");
|
|
210
|
+
}
|
|
211
|
+
function buildFullDayFilter(rawValue, property) {
|
|
212
|
+
const day = rawValue.trim();
|
|
213
|
+
if (!isValidDddDate(day)) {
|
|
214
|
+
return void 0;
|
|
215
|
+
}
|
|
216
|
+
return buildBetweenFilter(property, `${day} 00:00:00`, `${day} 23:59:59`);
|
|
217
|
+
}
|
|
218
|
+
function combineFilters(...parts) {
|
|
219
|
+
return joinFilters("and", parts.filter((part) => typeof part === "string"));
|
|
220
|
+
}
|
|
221
|
+
function anyOfFilters(...parts) {
|
|
222
|
+
return joinFilters("or", parts.filter((part) => typeof part === "string"));
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// src/query/order-by.ts
|
|
226
|
+
function toOrderByEntry(item) {
|
|
227
|
+
if (typeof item !== "string") {
|
|
228
|
+
assertPropertyPath(item.property, "orderBy property");
|
|
229
|
+
if (item.direction !== void 0 && item.direction !== "asc" && item.direction !== "desc") {
|
|
230
|
+
throw new QueryOptionsError(`Invalid orderBy direction '${String(item.direction)}'`);
|
|
231
|
+
}
|
|
232
|
+
return item.direction ? { property: item.property, direction: item.direction } : { property: item.property };
|
|
233
|
+
}
|
|
234
|
+
const parts = item.trim().split(/\s+/);
|
|
235
|
+
if (parts.length > 2 || !parts[0]) {
|
|
236
|
+
throw new QueryOptionsError(`Invalid orderBy item '${item}'`);
|
|
237
|
+
}
|
|
238
|
+
const property = parts[0];
|
|
239
|
+
assertPropertyPath(property, "orderBy property");
|
|
240
|
+
if (parts[1] === void 0) {
|
|
241
|
+
return { property };
|
|
242
|
+
}
|
|
243
|
+
const direction = parts[1].toLowerCase();
|
|
244
|
+
if (direction !== "asc" && direction !== "desc") {
|
|
245
|
+
throw new QueryOptionsError(`Invalid orderBy direction '${parts[1]}'`);
|
|
246
|
+
}
|
|
247
|
+
return { property, direction };
|
|
248
|
+
}
|
|
249
|
+
function toOrderByEntries(input) {
|
|
250
|
+
if (input === null || input === void 0) {
|
|
251
|
+
return [];
|
|
252
|
+
}
|
|
253
|
+
const items = Array.isArray(input) ? input : [input];
|
|
254
|
+
return items.map(toOrderByEntry);
|
|
255
|
+
}
|
|
256
|
+
function buildOrderBy(input) {
|
|
257
|
+
const entries = toOrderByEntries(input);
|
|
258
|
+
if (entries.length === 0) {
|
|
259
|
+
return void 0;
|
|
260
|
+
}
|
|
261
|
+
return entries.map((entry) => entry.direction ? `${entry.property} ${entry.direction}` : entry.property).join(",");
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// src/query/select.ts
|
|
265
|
+
function buildSelect(input) {
|
|
266
|
+
if (input === null || input === void 0) {
|
|
267
|
+
return void 0;
|
|
268
|
+
}
|
|
269
|
+
const fields = (typeof input === "string" ? input.split(",") : [...input]).map((field) => field.trim()).filter((field) => field.length > 0);
|
|
270
|
+
if (fields.length === 0) {
|
|
271
|
+
return void 0;
|
|
272
|
+
}
|
|
273
|
+
for (const field of fields) {
|
|
274
|
+
assertPropertyPath(field, "select property");
|
|
275
|
+
}
|
|
276
|
+
return [...new Set(fields)].join(",");
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// src/query/paging.ts
|
|
280
|
+
function assertInteger(name, value) {
|
|
281
|
+
if (!Number.isInteger(value)) {
|
|
282
|
+
throw new QueryOptionsError(`${name} must be an integer (got ${String(value)})`);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
function normalizeTop(top, options = {}) {
|
|
286
|
+
if (top === null || top === void 0) {
|
|
287
|
+
return void 0;
|
|
288
|
+
}
|
|
289
|
+
assertInteger("top", top);
|
|
290
|
+
if (top < 1) {
|
|
291
|
+
throw new QueryOptionsError(`top must be at least 1 (got ${top})`);
|
|
292
|
+
}
|
|
293
|
+
const maxTop = options.maxTop;
|
|
294
|
+
if (maxTop !== null && maxTop !== void 0 && top > maxTop) {
|
|
295
|
+
if (options.overflow === "clamp") {
|
|
296
|
+
return maxTop;
|
|
297
|
+
}
|
|
298
|
+
throw new QueryOptionsError(`top may be at most ${maxTop} here (got ${top})`);
|
|
299
|
+
}
|
|
300
|
+
return top;
|
|
301
|
+
}
|
|
302
|
+
function normalizeSkip(skip) {
|
|
303
|
+
if (skip === null || skip === void 0) {
|
|
304
|
+
return void 0;
|
|
305
|
+
}
|
|
306
|
+
assertInteger("skip", skip);
|
|
307
|
+
if (skip < 0) {
|
|
308
|
+
throw new QueryOptionsError(`skip must not be negative (got ${skip})`);
|
|
309
|
+
}
|
|
310
|
+
return skip;
|
|
311
|
+
}
|
|
312
|
+
function pageToSkip(pageIndex, pageSize) {
|
|
313
|
+
assertInteger("pageIndex", pageIndex);
|
|
314
|
+
assertInteger("pageSize", pageSize);
|
|
315
|
+
return Math.max(0, pageIndex) * Math.max(1, pageSize);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
// src/query/expand.ts
|
|
319
|
+
var EXPAND_PROPERTY = /^\w+$/;
|
|
320
|
+
function newNode() {
|
|
321
|
+
return { filters: [], children: /* @__PURE__ */ new Map() };
|
|
322
|
+
}
|
|
323
|
+
function isItemObject(value) {
|
|
324
|
+
return typeof value === "object" && value !== null && typeof value.property === "string";
|
|
325
|
+
}
|
|
326
|
+
function childNode(parent, property) {
|
|
327
|
+
if (!EXPAND_PROPERTY.test(property)) {
|
|
328
|
+
throw new QueryOptionsError(`Invalid expand property '${property}': use letters, digits and '_' only`);
|
|
329
|
+
}
|
|
330
|
+
let node = parent.get(property);
|
|
331
|
+
if (!node) {
|
|
332
|
+
node = newNode();
|
|
333
|
+
parent.set(property, node);
|
|
334
|
+
}
|
|
335
|
+
return node;
|
|
336
|
+
}
|
|
337
|
+
function nodeForPath(root, path) {
|
|
338
|
+
const segments = path.trim().split(".");
|
|
339
|
+
let level = root;
|
|
340
|
+
let node;
|
|
341
|
+
for (const segment of segments) {
|
|
342
|
+
node = childNode(level, segment);
|
|
343
|
+
level = node.children;
|
|
344
|
+
}
|
|
345
|
+
return node;
|
|
346
|
+
}
|
|
347
|
+
function applyClauses(node, clauses) {
|
|
348
|
+
if (clauses.filters !== void 0) {
|
|
349
|
+
const list = typeof clauses.filters === "string" ? [clauses.filters] : clauses.filters;
|
|
350
|
+
for (const filter of list) {
|
|
351
|
+
if (typeof filter === "string" && filter.trim()) {
|
|
352
|
+
node.filters.push(filter);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
if (clauses.orderBy !== void 0) node.orderBy = clauses.orderBy;
|
|
357
|
+
if (clauses.select !== void 0) node.select = clauses.select;
|
|
358
|
+
if (clauses.top !== void 0) node.top = clauses.top;
|
|
359
|
+
if (clauses.skip !== void 0) node.skip = clauses.skip;
|
|
360
|
+
if (clauses.expand !== void 0) addInput(node.children, clauses.expand);
|
|
361
|
+
}
|
|
362
|
+
function addInput(level, input) {
|
|
363
|
+
if (typeof input === "string") {
|
|
364
|
+
for (const part of input.split(",")) {
|
|
365
|
+
if (part.trim()) {
|
|
366
|
+
nodeForPath(level, part);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
if (Array.isArray(input)) {
|
|
372
|
+
for (const item of input) {
|
|
373
|
+
addInput(level, item);
|
|
374
|
+
}
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
if (isItemObject(input)) {
|
|
378
|
+
applyClauses(nodeForPath(level, input.property), input);
|
|
379
|
+
return;
|
|
380
|
+
}
|
|
381
|
+
for (const [path, clauses] of Object.entries(input)) {
|
|
382
|
+
const node = nodeForPath(level, path);
|
|
383
|
+
if (clauses !== true) {
|
|
384
|
+
applyClauses(node, clauses);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
function assertClauseValue(name, value) {
|
|
389
|
+
if (value.includes(";")) {
|
|
390
|
+
throw new QueryOptionsError(`Expand ${name} must not contain ';' (got "${value}")`);
|
|
391
|
+
}
|
|
392
|
+
if (/expand\s*=/i.test(value)) {
|
|
393
|
+
throw new QueryOptionsError(`Expand ${name} must not contain 'expand=' (got "${value}")`);
|
|
394
|
+
}
|
|
395
|
+
let depth = 0;
|
|
396
|
+
for (const char of value) {
|
|
397
|
+
if (char === "(") depth++;
|
|
398
|
+
if (char === ")") depth--;
|
|
399
|
+
if (depth < 0) break;
|
|
400
|
+
}
|
|
401
|
+
if (depth !== 0) {
|
|
402
|
+
throw new QueryOptionsError(`Expand ${name} must have balanced parentheses (got "${value}")`);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
function serializeLevel(level) {
|
|
406
|
+
return [...level.entries()].map(([property, node]) => serializeNode(property, node)).join(",");
|
|
407
|
+
}
|
|
408
|
+
function serializeNode(property, node) {
|
|
409
|
+
const clauses = [];
|
|
410
|
+
const filters = combineFilters(...node.filters);
|
|
411
|
+
if (filters) {
|
|
412
|
+
assertClauseValue("filters", filters);
|
|
413
|
+
clauses.push(`filters=${filters}`);
|
|
414
|
+
}
|
|
415
|
+
const orderBy = buildOrderBy(node.orderBy);
|
|
416
|
+
if (orderBy) clauses.push(`orderBy=${orderBy}`);
|
|
417
|
+
const select = buildSelect(node.select);
|
|
418
|
+
if (select) clauses.push(`select=${select}`);
|
|
419
|
+
const top = normalizeTop(node.top);
|
|
420
|
+
if (top !== void 0) clauses.push(`top=${top}`);
|
|
421
|
+
const skip = normalizeSkip(node.skip);
|
|
422
|
+
if (skip !== void 0) clauses.push(`skip=${skip}`);
|
|
423
|
+
if (node.children.size > 0) clauses.push(`expand=${serializeLevel(node.children)}`);
|
|
424
|
+
return clauses.length > 0 ? `${property}(${clauses.join(";")})` : property;
|
|
425
|
+
}
|
|
426
|
+
function buildExpand(input) {
|
|
427
|
+
if (input === null || input === void 0) {
|
|
428
|
+
return void 0;
|
|
429
|
+
}
|
|
430
|
+
const root = /* @__PURE__ */ new Map();
|
|
431
|
+
addInput(root, input);
|
|
432
|
+
return root.size > 0 ? serializeLevel(root) : void 0;
|
|
433
|
+
}
|
|
434
|
+
function toTreeNodes(level) {
|
|
435
|
+
return [...level.entries()].map(([property, node]) => {
|
|
436
|
+
const treeNode = { property, children: toTreeNodes(node.children) };
|
|
437
|
+
const filters = combineFilters(...node.filters);
|
|
438
|
+
if (filters) treeNode.filters = filters;
|
|
439
|
+
if (node.orderBy !== void 0) treeNode.orderBy = node.orderBy;
|
|
440
|
+
if (node.select !== void 0) treeNode.select = node.select;
|
|
441
|
+
if (node.top !== void 0) treeNode.top = node.top;
|
|
442
|
+
if (node.skip !== void 0) treeNode.skip = node.skip;
|
|
443
|
+
return treeNode;
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
function toExpandTree(input) {
|
|
447
|
+
if (input === null || input === void 0) {
|
|
448
|
+
return [];
|
|
449
|
+
}
|
|
450
|
+
const root = /* @__PURE__ */ new Map();
|
|
451
|
+
addInput(root, input);
|
|
452
|
+
return toTreeNodes(root);
|
|
453
|
+
}
|
|
454
|
+
function expandedProperties(input) {
|
|
455
|
+
return toExpandTree(input).map((node) => node.property);
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
// src/query/query-options.ts
|
|
459
|
+
function buildQueryOptions(input, options = {}) {
|
|
460
|
+
const params = {};
|
|
461
|
+
const filterList = typeof input.filters === "string" ? [input.filters] : input.filters ?? [];
|
|
462
|
+
const filters = combineFilters(...filterList);
|
|
463
|
+
if (filters) params.filters = filters;
|
|
464
|
+
const orderBy = buildOrderBy(input.orderBy);
|
|
465
|
+
if (orderBy) params.orderBy = orderBy;
|
|
466
|
+
const expand = buildExpand(input.expand);
|
|
467
|
+
if (expand) params.expand = expand;
|
|
468
|
+
const select = buildSelect(input.select);
|
|
469
|
+
if (select) params.select = select;
|
|
470
|
+
const top = normalizeTop(input.top, { maxTop: options.maxTop, overflow: options.topOverflow });
|
|
471
|
+
if (top !== void 0) params.top = top;
|
|
472
|
+
const skip = normalizeSkip(input.skip);
|
|
473
|
+
if (skip !== void 0) params.skip = skip;
|
|
474
|
+
return params;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
// src/query/keys.ts
|
|
478
|
+
function sanitizeSearchInput(value) {
|
|
479
|
+
return value.replace(/^\s+/, "");
|
|
480
|
+
}
|
|
481
|
+
function sanitizeColumnSearches(columnSearches) {
|
|
482
|
+
return Object.fromEntries(
|
|
483
|
+
Object.entries(columnSearches).map(([key, value]) => [key, sanitizeSearchInput(value)]).filter(([, value]) => value.length > 0)
|
|
484
|
+
);
|
|
485
|
+
}
|
|
486
|
+
function keyValue(value) {
|
|
487
|
+
if (value === void 0) {
|
|
488
|
+
return null;
|
|
489
|
+
}
|
|
490
|
+
try {
|
|
491
|
+
JSON.stringify(value);
|
|
492
|
+
return value;
|
|
493
|
+
} catch {
|
|
494
|
+
return String(value);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
var byKey = ([a], [b]) => a < b ? -1 : a > b ? 1 : 0;
|
|
498
|
+
function buildStaticArgsKey(staticArgs) {
|
|
499
|
+
if (!staticArgs) {
|
|
500
|
+
return "";
|
|
501
|
+
}
|
|
502
|
+
const entries = Object.entries(staticArgs).sort(byKey);
|
|
503
|
+
return entries.length === 0 ? "" : JSON.stringify(entries.map(([key, value]) => [key, keyValue(value)]));
|
|
504
|
+
}
|
|
505
|
+
function buildColumnSearchesKey(searches) {
|
|
506
|
+
const entries = Object.entries(searches).filter(([, value]) => value.length > 0).sort(byKey);
|
|
507
|
+
return entries.length === 0 ? "" : JSON.stringify(entries);
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
// src/query/values.ts
|
|
511
|
+
function daysInMonth(year, month) {
|
|
512
|
+
return new Date(Date.UTC(year, month, 0)).getUTCDate();
|
|
513
|
+
}
|
|
514
|
+
var FILTER_DATE_TIME = /^(\d{4})-(\d{1,2})-(\d{1,2})(?:(?: (\d{1,2}):(\d{2})(?::(\d{2})(Z|[+-]\d{2}:?\d{2})?)?)|(?:T(\d{1,2}):(\d{2}):(\d{2})(Z|[+-]\d{2}:?\d{2})?))?$/;
|
|
515
|
+
function isFilterDateTimeLiteral(value) {
|
|
516
|
+
const match = FILTER_DATE_TIME.exec(value);
|
|
517
|
+
if (!match) {
|
|
518
|
+
return false;
|
|
519
|
+
}
|
|
520
|
+
const year = Number(match[1]);
|
|
521
|
+
const month = Number(match[2]);
|
|
522
|
+
const day = Number(match[3]);
|
|
523
|
+
if (month < 1 || month > 12 || day < 1 || day > daysInMonth(year, month)) {
|
|
524
|
+
return false;
|
|
525
|
+
}
|
|
526
|
+
const hours = match[4] ?? match[8];
|
|
527
|
+
const minutes = match[5] ?? match[9];
|
|
528
|
+
const seconds = match[6] ?? match[10];
|
|
529
|
+
if (hours !== void 0 && Number(hours) > 23) return false;
|
|
530
|
+
if (minutes !== void 0 && Number(minutes) > 59) return false;
|
|
531
|
+
if (seconds !== void 0 && Number(seconds) > 59) return false;
|
|
532
|
+
return true;
|
|
533
|
+
}
|
|
534
|
+
function isFilterValueValidForColumnKind(value, columnKind) {
|
|
535
|
+
if (value === null) {
|
|
536
|
+
return true;
|
|
537
|
+
}
|
|
538
|
+
switch (columnKind) {
|
|
539
|
+
case "int":
|
|
540
|
+
case "float":
|
|
541
|
+
return /^-?\d+(\.\d+)?$/.test(value);
|
|
542
|
+
case "bool":
|
|
543
|
+
return /^(1|0|true|false)$/i.test(value);
|
|
544
|
+
case "datetime":
|
|
545
|
+
return isFilterDateTimeLiteral(value);
|
|
546
|
+
default:
|
|
547
|
+
return true;
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
// src/query/definition.ts
|
|
552
|
+
var QueryValidationError = class extends QueryOptionsError {
|
|
553
|
+
issues;
|
|
554
|
+
constructor(issues) {
|
|
555
|
+
super(issues.map((issue) => issue.message).join(" "));
|
|
556
|
+
this.name = "QueryValidationError";
|
|
557
|
+
this.issues = issues;
|
|
558
|
+
}
|
|
559
|
+
};
|
|
560
|
+
function resolveFilterDefinition(query, property) {
|
|
561
|
+
const direct = query.filters?.find((filter) => filter.name === property);
|
|
562
|
+
if (direct) {
|
|
563
|
+
return { definition: direct, expandPath: [] };
|
|
564
|
+
}
|
|
565
|
+
const dot = property.indexOf(".");
|
|
566
|
+
if (dot < 0) {
|
|
567
|
+
return void 0;
|
|
568
|
+
}
|
|
569
|
+
const first = property.slice(0, dot);
|
|
570
|
+
const expandDefinition = query.expand?.find((expand) => expand.name === first);
|
|
571
|
+
if (!expandDefinition) {
|
|
572
|
+
return void 0;
|
|
573
|
+
}
|
|
574
|
+
const nested = resolveFilterDefinition(expandDefinition, property.slice(dot + 1));
|
|
575
|
+
return nested ? { definition: nested.definition, expandPath: [first, ...nested.expandPath] } : void 0;
|
|
576
|
+
}
|
|
577
|
+
function findFilterDefinition(query, property) {
|
|
578
|
+
return resolveFilterDefinition(query, property)?.definition;
|
|
579
|
+
}
|
|
580
|
+
function scalarString(value) {
|
|
581
|
+
return value === null ? null : filterScalarToString(value);
|
|
582
|
+
}
|
|
583
|
+
function isNullComparison(operator, value) {
|
|
584
|
+
return NULL_OPERATORS.includes(operator) && (value === null || typeof value === "string" && value.toUpperCase() === "NULL");
|
|
585
|
+
}
|
|
586
|
+
function columnKindIssues(definition, condition) {
|
|
587
|
+
const { property, operator, value } = condition;
|
|
588
|
+
let kind = definition.columnKind ?? null;
|
|
589
|
+
if (kind === null || isFulltextOperator(operator) || isNullComparison(operator, value)) {
|
|
590
|
+
return [];
|
|
591
|
+
}
|
|
592
|
+
const usesWildcard = typeof value === "string" && value.includes("*");
|
|
593
|
+
if (kind === "json") {
|
|
594
|
+
return [{ code: "column-kind", message: `'${property}' is a JSON column: no comparison matches it.` }];
|
|
595
|
+
}
|
|
596
|
+
if (kind === "translatable") {
|
|
597
|
+
if (usesWildcard && (operator === "eq" || operator === "ne")) {
|
|
598
|
+
return [];
|
|
599
|
+
}
|
|
600
|
+
return [
|
|
601
|
+
{
|
|
602
|
+
code: "column-kind",
|
|
603
|
+
message: `'${property}' holds the translations of all languages: use eq / ne with a '*' wildcard.`
|
|
604
|
+
}
|
|
605
|
+
];
|
|
606
|
+
}
|
|
607
|
+
if (usesWildcard) {
|
|
608
|
+
return [];
|
|
609
|
+
}
|
|
610
|
+
if (kind === "translatable-searchable") {
|
|
611
|
+
kind = "string";
|
|
612
|
+
}
|
|
613
|
+
const elements = Array.isArray(value) ? value : [value];
|
|
614
|
+
for (const element of elements) {
|
|
615
|
+
if (!isFilterValueValidForColumnKind(scalarString(element), kind)) {
|
|
616
|
+
return [
|
|
617
|
+
{
|
|
618
|
+
code: "column-kind",
|
|
619
|
+
message: `Filter value '${String(scalarString(element))}' for '${property}' is not a valid ${kind}.`
|
|
620
|
+
}
|
|
621
|
+
];
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
return [];
|
|
625
|
+
}
|
|
626
|
+
function valueRuleIssues(definition, condition) {
|
|
627
|
+
const rule = definition.valueRules?.[condition.operator];
|
|
628
|
+
if (!rule || isNullComparison(condition.operator, condition.value)) {
|
|
629
|
+
return [];
|
|
630
|
+
}
|
|
631
|
+
if (rule === "wildcard-required" && !(typeof condition.value === "string" && condition.value.includes("*"))) {
|
|
632
|
+
return [
|
|
633
|
+
{ code: "value-rule", message: `'${condition.property} ${condition.operator}' needs a value with a '*' wildcard.` }
|
|
634
|
+
];
|
|
635
|
+
}
|
|
636
|
+
if (rule === "null-only") {
|
|
637
|
+
return [{ code: "value-rule", message: `'${condition.property} ${condition.operator}' only compares with null.` }];
|
|
638
|
+
}
|
|
639
|
+
return [];
|
|
640
|
+
}
|
|
641
|
+
function optionIssues(definition, condition) {
|
|
642
|
+
const options = definition.options;
|
|
643
|
+
if (!options || options.length === 0) {
|
|
644
|
+
return [];
|
|
645
|
+
}
|
|
646
|
+
const allowed = new Set(options.map(String));
|
|
647
|
+
const elements = Array.isArray(condition.value) ? condition.value : [condition.value];
|
|
648
|
+
const rejected = elements.filter((element) => {
|
|
649
|
+
const text = scalarString(element);
|
|
650
|
+
return text === null || !allowed.has(text);
|
|
651
|
+
});
|
|
652
|
+
if (rejected.length === 0) {
|
|
653
|
+
return [];
|
|
654
|
+
}
|
|
655
|
+
return [
|
|
656
|
+
{
|
|
657
|
+
code: "option-not-allowed",
|
|
658
|
+
message: `Value(s) [${rejected.map((element) => String(scalarString(element))).join(", ")}] for '${condition.property}' are not allowed. Allowed values are: [${options.join(", ")}].`
|
|
659
|
+
}
|
|
660
|
+
];
|
|
661
|
+
}
|
|
662
|
+
function validateFilter(query, condition, context = {}) {
|
|
663
|
+
const resolved = resolveFilterDefinition(query, condition.property);
|
|
664
|
+
if (!resolved) {
|
|
665
|
+
const allowed = (query.filters ?? []).map((filter) => filter.name).join(", ");
|
|
666
|
+
return [
|
|
667
|
+
{
|
|
668
|
+
code: "unknown-property",
|
|
669
|
+
message: `Property name used to filter '${condition.property}' is not allowed. Allowed property names are: [${allowed}].`
|
|
670
|
+
}
|
|
671
|
+
];
|
|
672
|
+
}
|
|
673
|
+
const { definition, expandPath } = resolved;
|
|
674
|
+
const issues = [];
|
|
675
|
+
if (definition.operators && !definition.operators.includes(condition.operator)) {
|
|
676
|
+
issues.push({
|
|
677
|
+
code: "operator-not-allowed",
|
|
678
|
+
message: `Operator '${condition.operator}' is not available for '${condition.property}' (allowed: ${definition.operators.join(", ")}).`
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
if (isFulltextOperator(condition.operator) && definition.supportsFulltext !== true) {
|
|
682
|
+
issues.push({
|
|
683
|
+
code: "fulltext-not-supported",
|
|
684
|
+
message: `The fulltext operator '${condition.operator}' is not available for '${condition.property}': no FULLTEXT index.`
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
try {
|
|
688
|
+
assertValueFitsOperator(condition.operator, condition.value);
|
|
689
|
+
} catch (error) {
|
|
690
|
+
issues.push({ code: "invalid-value-shape", message: error.message });
|
|
691
|
+
return issues;
|
|
692
|
+
}
|
|
693
|
+
issues.push(...columnKindIssues(definition, condition));
|
|
694
|
+
issues.push(...valueRuleIssues(definition, condition));
|
|
695
|
+
issues.push(...optionIssues(definition, condition));
|
|
696
|
+
const tree = toExpandTree(context.expand);
|
|
697
|
+
let level = tree;
|
|
698
|
+
for (const segment of expandPath) {
|
|
699
|
+
const node = level.find((candidate) => candidate.property === segment);
|
|
700
|
+
if (!node) {
|
|
701
|
+
issues.push({
|
|
702
|
+
code: "expand-required",
|
|
703
|
+
message: `Filter '${condition.property}' needs the expand '${expandPath.join(".")}'.`
|
|
704
|
+
});
|
|
705
|
+
break;
|
|
706
|
+
}
|
|
707
|
+
level = node.children;
|
|
708
|
+
}
|
|
709
|
+
if (definition.requiresExpand && !level.some((node) => node.property === definition.requiresExpand)) {
|
|
710
|
+
issues.push({
|
|
711
|
+
code: "expand-required",
|
|
712
|
+
message: `Filter '${condition.property}' needs the expand '${definition.requiresExpand}'.`
|
|
713
|
+
});
|
|
714
|
+
}
|
|
715
|
+
return issues;
|
|
716
|
+
}
|
|
717
|
+
function buildDefinedFilter(query, property, operator, value, context = {}) {
|
|
718
|
+
const definition = findFilterDefinition(query, property);
|
|
719
|
+
const toDay = (scalar) => scalar instanceof Date ? formatDddDate(scalar) : scalar;
|
|
720
|
+
const typedValue = definition?.temporalKind === "DAY" ? Array.isArray(value) ? value.map(toDay) : toDay(value) : value;
|
|
721
|
+
const issues = validateFilter(query, { property, operator, value: typedValue }, context);
|
|
722
|
+
if (issues.length > 0) {
|
|
723
|
+
throw new QueryValidationError(issues);
|
|
724
|
+
}
|
|
725
|
+
return buildFieldFilter(property, typedValue, operator);
|
|
726
|
+
}
|
|
727
|
+
function orderByAllowed(definition, property) {
|
|
728
|
+
if (definition.orderBy?.includes(property)) {
|
|
729
|
+
return true;
|
|
730
|
+
}
|
|
731
|
+
const score = /^(.+)Score$/.exec(property);
|
|
732
|
+
if (score && definition.filters?.some((filter) => filter.name === score[1] && filter.supportsFulltext === true)) {
|
|
733
|
+
return true;
|
|
734
|
+
}
|
|
735
|
+
const dot = property.indexOf(".");
|
|
736
|
+
if (dot < 0) {
|
|
737
|
+
return false;
|
|
738
|
+
}
|
|
739
|
+
const expandDefinition = definition.expand?.find((expand) => expand.name === property.slice(0, dot));
|
|
740
|
+
return expandDefinition ? orderByAllowed(expandDefinition, property.slice(dot + 1)) : false;
|
|
741
|
+
}
|
|
742
|
+
function validateOrderBy(query, input) {
|
|
743
|
+
if (!query.orderBy) {
|
|
744
|
+
return [];
|
|
745
|
+
}
|
|
746
|
+
return toOrderByEntries(input).filter((entry) => !orderByAllowed(query, entry.property)).map((entry) => ({
|
|
747
|
+
code: "unknown-order-by",
|
|
748
|
+
message: `Sorting by '${entry.property}' is not allowed. Allowed: [${(query.orderBy ?? []).join(", ")}].`
|
|
749
|
+
}));
|
|
750
|
+
}
|
|
751
|
+
function expandIssues(definitions, nodes, prefix) {
|
|
752
|
+
const issues = [];
|
|
753
|
+
for (const node of nodes) {
|
|
754
|
+
const path = prefix ? `${prefix}.${node.property}` : node.property;
|
|
755
|
+
const definition = definitions?.find((candidate) => candidate.name === node.property);
|
|
756
|
+
if (!definition) {
|
|
757
|
+
issues.push({ code: "unknown-expand", message: `'${path}' cannot be expanded.` });
|
|
758
|
+
continue;
|
|
759
|
+
}
|
|
760
|
+
const hasClauses = node.filters !== void 0 || node.orderBy !== void 0 || node.select !== void 0 || node.top !== void 0 || node.skip !== void 0 || node.children.length > 0;
|
|
761
|
+
if (definition.computed && hasClauses) {
|
|
762
|
+
issues.push({ code: "computed-expand-clauses", message: `'${path}' is a computed field and takes no clauses.` });
|
|
763
|
+
continue;
|
|
764
|
+
}
|
|
765
|
+
if (node.top !== void 0 && definition.maxTop !== void 0 && definition.maxTop !== null && node.top > definition.maxTop) {
|
|
766
|
+
issues.push({ code: "top-exceeds-max", message: `top in '${path}' may be at most ${definition.maxTop}.` });
|
|
767
|
+
}
|
|
768
|
+
if (node.orderBy !== void 0) {
|
|
769
|
+
issues.push(...validateOrderBy(definition, node.orderBy));
|
|
770
|
+
}
|
|
771
|
+
issues.push(...expandIssues(definition.expand, node.children, path));
|
|
772
|
+
}
|
|
773
|
+
return issues;
|
|
774
|
+
}
|
|
775
|
+
function validateExpand(query, input) {
|
|
776
|
+
return expandIssues(query.expand, toExpandTree(input), "");
|
|
777
|
+
}
|
|
778
|
+
function validateSelect(query, fields) {
|
|
779
|
+
const list = (typeof fields === "string" ? fields.split(",") : [...fields ?? []]).map((field) => field.trim()).filter(Boolean);
|
|
780
|
+
if (list.length === 0) {
|
|
781
|
+
return [];
|
|
782
|
+
}
|
|
783
|
+
if (!query.select) {
|
|
784
|
+
return [{ code: "select-not-supported", message: "This operation does not accept select." }];
|
|
785
|
+
}
|
|
786
|
+
if (query.select === true) {
|
|
787
|
+
return [];
|
|
788
|
+
}
|
|
789
|
+
const allowed = query.select;
|
|
790
|
+
return list.filter((field) => !allowed.includes(field)).map((field) => ({ code: "unknown-select", message: `'${field}' cannot be selected.` }));
|
|
791
|
+
}
|
|
792
|
+
function buildDefinedQueryOptions(query, input, options = {}) {
|
|
793
|
+
const issues = [
|
|
794
|
+
...validateOrderBy(query, input.orderBy),
|
|
795
|
+
...validateExpand(query, input.expand),
|
|
796
|
+
...validateSelect(query, typeof input.select === "string" || Array.isArray(input.select) ? input.select : null)
|
|
797
|
+
];
|
|
798
|
+
if (issues.length > 0) {
|
|
799
|
+
throw new QueryValidationError(issues);
|
|
800
|
+
}
|
|
801
|
+
return buildQueryOptions(input, { maxTop: query.maxTop, topOverflow: options.topOverflow });
|
|
802
|
+
}
|
|
803
|
+
export {
|
|
804
|
+
DEFAULT_TOP,
|
|
805
|
+
QueryOptionsError,
|
|
806
|
+
QueryValidationError,
|
|
807
|
+
anyOfFilters,
|
|
808
|
+
assertPropertyPath,
|
|
809
|
+
assertValueFitsOperator,
|
|
810
|
+
buildBetweenFilter,
|
|
811
|
+
buildColumnSearchesKey,
|
|
812
|
+
buildContainsFilter,
|
|
813
|
+
buildDefinedFilter,
|
|
814
|
+
buildDefinedQueryOptions,
|
|
815
|
+
buildExpand,
|
|
816
|
+
buildFieldFilter,
|
|
817
|
+
buildFullDayFilter,
|
|
818
|
+
buildFulltextFilter,
|
|
819
|
+
buildInFilter,
|
|
820
|
+
buildIntEqFilter,
|
|
821
|
+
buildListFilter,
|
|
822
|
+
buildNotInFilter,
|
|
823
|
+
buildNullFilter,
|
|
824
|
+
buildOrderBy,
|
|
825
|
+
buildQueryOptions,
|
|
826
|
+
buildSelect,
|
|
827
|
+
buildStaticArgsKey,
|
|
828
|
+
combineFilters,
|
|
829
|
+
escapeFilterString,
|
|
830
|
+
escapeOData,
|
|
831
|
+
expandedProperties,
|
|
832
|
+
filterScalarToString,
|
|
833
|
+
findFilterDefinition,
|
|
834
|
+
formatFilterListItem,
|
|
835
|
+
formatFilterLiteral,
|
|
836
|
+
formatFilterScalar,
|
|
837
|
+
groupFilter,
|
|
838
|
+
isFilterDateTimeLiteral,
|
|
839
|
+
isFilterOperator,
|
|
840
|
+
isFilterValueValidForColumnKind,
|
|
841
|
+
isFulltextOperator,
|
|
842
|
+
isListOperator,
|
|
843
|
+
joinFilters,
|
|
844
|
+
normalizeSkip,
|
|
845
|
+
normalizeTop,
|
|
846
|
+
pageToSkip,
|
|
847
|
+
resolveFilterDefinition,
|
|
848
|
+
sanitizeColumnSearches,
|
|
849
|
+
sanitizeSearchInput,
|
|
850
|
+
toBooleanPrefix,
|
|
851
|
+
toExpandTree,
|
|
852
|
+
toOrderByEntries,
|
|
853
|
+
toOrderByEntry,
|
|
854
|
+
topLevelJoinOperators,
|
|
855
|
+
validateExpand,
|
|
856
|
+
validateFilter,
|
|
857
|
+
validateOrderBy,
|
|
858
|
+
validateSelect
|
|
859
|
+
};
|
|
860
|
+
//# sourceMappingURL=index.js.map
|