@andrew_l/search-query-language 0.3.22 → 0.4.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/dist/index.d.mts CHANGED
@@ -1,28 +1,26 @@
1
- import { Arrayable } from '@andrew_l/toolkit';
2
- import mongoose from 'mongoose';
3
-
1
+ import { Arrayable } from "@andrew_l/toolkit";
2
+ import mongoose from "mongoose";
4
3
  interface TokenTypeOptions {
5
- keyword?: string;
4
+ keyword?: string;
6
5
  }
7
6
  /**
8
7
  * @group Utils
9
8
  */
10
9
  declare class TokenType {
11
- readonly label: string;
12
- readonly keyword: string | undefined;
13
- constructor(label: string, options?: TokenTypeOptions);
10
+ readonly label: string;
11
+ readonly keyword: string | undefined;
12
+ constructor(label: string, options?: TokenTypeOptions);
14
13
  }
15
-
16
14
  /**
17
15
  * Node types
18
16
  * @group Constants
19
17
  */
20
18
  declare const NODE: Readonly<{
21
- PROGRAM: "program";
22
- IDENTIFIER: "identifier";
23
- LITERAL: "literal";
24
- LOGICAL_EXPRESSION: "logical-expression";
25
- BINARY_EXPRESSION: "binary-expression";
19
+ PROGRAM: "program";
20
+ IDENTIFIER: "identifier";
21
+ LITERAL: "literal";
22
+ LOGICAL_EXPRESSION: "logical-expression";
23
+ BINARY_EXPRESSION: "binary-expression";
26
24
  }>;
27
25
  /**
28
26
  * Keyword tokens.
@@ -34,148 +32,145 @@ declare const KEYWORDS: Record<string, TokenType>;
34
32
  * @group Constants
35
33
  */
36
34
  declare const TOKEN: Readonly<{
37
- /**
38
- * Start of File token.
39
- */
40
- readonly SOF: TokenType;
41
- /**
42
- * End of File token.
43
- */
44
- readonly EOF: TokenType;
45
- /**
46
- * Number token.
47
- */
48
- readonly NUM: TokenType;
49
- /**
50
- * String token.
51
- */
52
- readonly STRING: TokenType;
53
- /**
54
- * Identifier token.
55
- */
56
- readonly NAME: TokenType;
57
- /**
58
- * Parenthesis token.
59
- */
60
- readonly PAREN_L: TokenType;
61
- /**
62
- * Parenthesis token.
63
- */
64
- readonly PAREN_R: TokenType;
65
- /**
66
- * Logical operator token.
67
- */
68
- readonly LOGICAL_OR: TokenType;
69
- /**
70
- * Logical operator token.
71
- */
72
- readonly LOGICAL_AND: TokenType;
73
- /**
74
- * Equality operator token.
75
- */
76
- readonly EQUALITY: TokenType;
77
- /**
78
- * Relational operator token.
79
- */
80
- readonly RELATIONAL: TokenType;
81
- /**
82
- * Minus operator token.
83
- */
84
- readonly MINUS: TokenType;
85
- /**
86
- * Null literal token.
87
- */
88
- readonly NULL: TokenType;
89
- /**
90
- * True literal tokens.
91
- */
92
- readonly TRUE: TokenType;
93
- /**
94
- * False literal tokens.
95
- */
96
- readonly FALSE: TokenType;
35
+ /**
36
+ * Start of File token.
37
+ */
38
+ readonly SOF: TokenType;
39
+ /**
40
+ * End of File token.
41
+ */
42
+ readonly EOF: TokenType;
43
+ /**
44
+ * Number token.
45
+ */
46
+ readonly NUM: TokenType;
47
+ /**
48
+ * String token.
49
+ */
50
+ readonly STRING: TokenType;
51
+ /**
52
+ * Identifier token.
53
+ */
54
+ readonly NAME: TokenType;
55
+ /**
56
+ * Parenthesis token.
57
+ */
58
+ readonly PAREN_L: TokenType;
59
+ /**
60
+ * Parenthesis token.
61
+ */
62
+ readonly PAREN_R: TokenType;
63
+ /**
64
+ * Logical operator token.
65
+ */
66
+ readonly LOGICAL_OR: TokenType;
67
+ /**
68
+ * Logical operator token.
69
+ */
70
+ readonly LOGICAL_AND: TokenType;
71
+ /**
72
+ * Equality operator token.
73
+ */
74
+ readonly EQUALITY: TokenType;
75
+ /**
76
+ * Relational operator token.
77
+ */
78
+ readonly RELATIONAL: TokenType;
79
+ /**
80
+ * Minus operator token.
81
+ */
82
+ readonly MINUS: TokenType;
83
+ /**
84
+ * Null literal token.
85
+ */
86
+ readonly NULL: TokenType;
87
+ /**
88
+ * True literal tokens.
89
+ */
90
+ readonly TRUE: TokenType;
91
+ /**
92
+ * False literal tokens.
93
+ */
94
+ readonly FALSE: TokenType;
97
95
  }>;
98
-
99
96
  interface TokenOptions {
100
- type: TokenType;
101
- value: unknown;
102
- start: number;
103
- end: number;
97
+ type: TokenType;
98
+ value: unknown;
99
+ start: number;
100
+ end: number;
104
101
  }
105
102
  /**
106
103
  * @group Utils
107
104
  */
108
105
  declare class Token {
109
- readonly type: TokenType;
110
- readonly value: unknown;
111
- readonly start: number;
112
- readonly end: number;
113
- constructor(p: TokenOptions);
106
+ readonly type: TokenType;
107
+ readonly value: unknown;
108
+ readonly start: number;
109
+ readonly end: number;
110
+ constructor(p: TokenOptions);
114
111
  }
115
-
116
112
  /**
117
113
  * @group Utils
118
114
  */
119
115
  declare class Tokenizer implements Iterable<Token> {
120
- protected input: string;
121
- protected pos: number;
122
- protected length: number;
123
- protected state: TokenOptions;
124
- protected prev: TokenOptions;
125
- constructor(input: string);
126
- [Symbol.iterator](): {
127
- next: () => {
128
- done: boolean;
129
- value: Token;
130
- };
116
+ protected input: string;
117
+ protected pos: number;
118
+ protected length: number;
119
+ protected state: TokenOptions;
120
+ protected prev: TokenOptions;
121
+ constructor(input: string);
122
+ [Symbol.iterator](): {
123
+ next: () => {
124
+ done: boolean;
125
+ value: Token;
131
126
  };
132
- /**
133
- * Get the next token.
134
- */
135
- getToken(): Token;
136
- protected nextToken(): void;
137
- protected skipSpace(): void;
138
- protected finishToken(type: TokenType, value?: unknown): void;
139
- protected finishOp(type: TokenType, size: number): void;
140
- protected readToken(code: number): void;
141
- protected getTokenFromCode(code: number): void;
142
- protected charCodeAtPos(): number;
143
- protected readEquality(code: number): void;
144
- protected readLtGt(): void;
145
- protected readInt(): number | null;
146
- protected raise(pos: number, message: string): never;
147
- protected readString(): void;
148
- protected readWord(): void;
149
- protected readEscapedChar(): string;
150
- protected readNumber(): void;
127
+ };
128
+ /**
129
+ * Get the next token.
130
+ */
131
+ getToken(): Token;
132
+ protected nextToken(): void;
133
+ protected skipSpace(): void;
134
+ protected finishToken(type: TokenType, value?: unknown): void;
135
+ protected finishOp(type: TokenType, size: number): void;
136
+ protected readToken(code: number): void;
137
+ protected getTokenFromCode(code: number): void;
138
+ protected charCodeAtPos(): number;
139
+ protected readEquality(code: number): void;
140
+ protected readLtGt(): void;
141
+ protected readInt(): number | null;
142
+ protected raise(pos: number, message: string): never;
143
+ protected readString(): void;
144
+ protected readWord(): void;
145
+ protected readEscapedChar(): string;
146
+ protected readNumber(): void;
151
147
  }
152
-
153
148
  /**
154
149
  * @group Types
155
150
  */
156
151
  interface Node {
157
- /**
158
- * Start positions of the node in the source code.
159
- */
160
- start: number;
161
- /**
162
- * End positions of the node in the source code.
163
- */
164
- end: number;
165
- /**
166
- * Type of the node.
167
- */
168
- type: string;
152
+ /**
153
+ * Start positions of the node in the source code.
154
+ */
155
+ start: number;
156
+ /**
157
+ * End positions of the node in the source code.
158
+ */
159
+ end: number;
160
+ /**
161
+ * Type of the node.
162
+ */
163
+ type: string;
169
164
  }
170
165
  /**
171
166
  * @group Types
172
167
  */
173
168
  type NodeMap = {
174
- [NODE.PROGRAM]: NodeProgram;
175
- [NODE.LITERAL]: NodeLiteral;
176
- [NODE.BINARY_EXPRESSION]: NodeBinaryExpression;
177
- [NODE.LOGICAL_EXPRESSION]: NodeLogicalExpression;
178
- [NODE.IDENTIFIER]: NodeIdentifier;
169
+ [NODE.PROGRAM]: NodeProgram;
170
+ [NODE.LITERAL]: NodeLiteral;
171
+ [NODE.BINARY_EXPRESSION]: NodeBinaryExpression;
172
+ [NODE.LOGICAL_EXPRESSION]: NodeLogicalExpression;
173
+ [NODE.IDENTIFIER]: NodeIdentifier;
179
174
  };
180
175
  /**
181
176
  * The node type.
@@ -192,53 +187,53 @@ type NodeExpression = NodeBinaryExpression | NodeLogicalExpression;
192
187
  * @group Types
193
188
  */
194
189
  interface NodeProgram extends Node {
195
- type: typeof NODE.PROGRAM;
196
- body: NodeExpression[];
190
+ type: typeof NODE.PROGRAM;
191
+ body: NodeExpression[];
197
192
  }
198
193
  /**
199
194
  * Literal node of the AST.
200
195
  * @group Types
201
196
  */
202
197
  interface NodeLiteral extends Node {
203
- type: typeof NODE.LITERAL;
204
- /**
205
- * Value of the literal.
206
- */
207
- value: string | boolean | null | number;
208
- /**
209
- * Raw value of the literal.
210
- */
211
- raw?: string;
198
+ type: typeof NODE.LITERAL;
199
+ /**
200
+ * Value of the literal.
201
+ */
202
+ value: string | boolean | null | number;
203
+ /**
204
+ * Raw value of the literal.
205
+ */
206
+ raw?: string;
212
207
  }
213
208
  /**
214
209
  * Identifier node of the AST.
215
210
  * @group Types
216
211
  */
217
212
  interface NodeIdentifier extends Node {
218
- type: typeof NODE.IDENTIFIER;
219
- /**
220
- * Name of the identifier.
221
- */
222
- name: string;
213
+ type: typeof NODE.IDENTIFIER;
214
+ /**
215
+ * Name of the identifier.
216
+ */
217
+ name: string;
223
218
  }
224
219
  /**
225
220
  * Binary expression node of the AST.
226
221
  * @group Types
227
222
  */
228
223
  interface NodeBinaryExpression extends Node {
229
- type: typeof NODE.BINARY_EXPRESSION;
230
- /**
231
- * Operator of the binary expression.
232
- */
233
- operator: BinaryOperator;
234
- /**
235
- * Left operand of the binary expression.
236
- */
237
- left: NodeIdentifier;
238
- /**
239
- * Right operand of the binary expression.
240
- */
241
- right: NodeLiteral;
224
+ type: typeof NODE.BINARY_EXPRESSION;
225
+ /**
226
+ * Operator of the binary expression.
227
+ */
228
+ operator: BinaryOperator;
229
+ /**
230
+ * Left operand of the binary expression.
231
+ */
232
+ left: NodeIdentifier;
233
+ /**
234
+ * Right operand of the binary expression.
235
+ */
236
+ right: NodeLiteral;
242
237
  }
243
238
  /**
244
239
  * Binary operator.
@@ -253,47 +248,45 @@ type BinaryOperator = '=' | '!=' | '<' | '<=' | '>' | '>=';
253
248
  * @group Types
254
249
  */
255
250
  interface NodeLogicalExpression extends Node {
256
- type: typeof NODE.LOGICAL_EXPRESSION;
257
- /**
258
- * Operator of the logical expression.
259
- */
260
- operator: LogicalOperator;
261
- /**
262
- * Left operand of the logical expression.
263
- */
264
- left: NodeExpression;
265
- /**
266
- * Right operand of the logical expression.
267
- */
268
- right: NodeExpression;
251
+ type: typeof NODE.LOGICAL_EXPRESSION;
252
+ /**
253
+ * Operator of the logical expression.
254
+ */
255
+ operator: LogicalOperator;
256
+ /**
257
+ * Left operand of the logical expression.
258
+ */
259
+ left: NodeExpression;
260
+ /**
261
+ * Right operand of the logical expression.
262
+ */
263
+ right: NodeExpression;
269
264
  }
270
265
  /**
271
266
  * Logical operator.
272
267
  * @group Types
273
268
  */
274
269
  type LogicalOperator = 'OR' | 'AND';
275
-
276
270
  /**
277
271
  * Parse an expression class.
278
272
  *
279
273
  * @group Utils
280
274
  */
281
275
  declare class Expression extends Tokenizer {
282
- constructor(input: string);
283
- /**
284
- * Parse input into a program AST.
285
- */
286
- parse(): NodeProgram;
287
- protected finishNode<T extends Node>(node: T): T;
288
- protected parseTopLevel(node: NodeProgram): NodeProgram;
289
- protected parseExpression(): NodeExpression;
290
- protected parseExprOp(left: NodeExpression | NodeIdentifier): NodeBinaryExpression | NodeLogicalExpression;
291
- protected maybeLiteral(): NodeLiteral | null;
292
- protected maybeIdentifier(): NodeIdentifier | null;
293
- protected parseExprAtom(): NodeIdentifier | NodeLiteral;
294
- protected startNode<T extends NodeType>(type: T): NodeMap[T];
276
+ constructor(input: string);
277
+ /**
278
+ * Parse input into a program AST.
279
+ */
280
+ parse(): NodeProgram;
281
+ protected finishNode<T extends Node>(node: T): T;
282
+ protected parseTopLevel(node: NodeProgram): NodeProgram;
283
+ protected parseExpression(): NodeExpression;
284
+ protected parseExprOp(left: NodeExpression | NodeIdentifier): NodeBinaryExpression | NodeLogicalExpression;
285
+ protected maybeLiteral(): NodeLiteral | null;
286
+ protected maybeIdentifier(): NodeIdentifier | null;
287
+ protected parseExprAtom(): NodeIdentifier | NodeLiteral;
288
+ protected startNode<T extends NodeType>(type: T): NodeMap[T];
295
289
  }
296
-
297
290
  /**
298
291
  * Parses a query string into a NodeProgram representation.
299
292
  *
@@ -318,42 +311,41 @@ declare class Expression extends Tokenizer {
318
311
  * @group Main
319
312
  */
320
313
  declare function parseQuery(value: string): NodeProgram;
321
-
322
314
  type ParseToMongoTransformFn = (value: unknown, key: string) => unknown;
323
315
  interface ParseToMongoOptions {
324
- /**
325
- * Determines whether empty search queries are allowed.
326
- * If `true`, an empty query will return an unfiltered result.
327
- * If `false`, an empty query will be rejected.
328
- *
329
- * @default false
330
- */
331
- allowEmpty?: boolean;
332
- /**
333
- * A list of allowed keys that can be used in the search query.
334
- * If provided, any query using keys outside this list will be rejected.
335
- */
336
- allowedKeys?: string[];
337
- /**
338
- * Max of query ops combination.
339
- * @default Infinity
340
- */
341
- maxOps?: number;
342
- /**
343
- * A transformation function or a mapping of transformation functions
344
- * to modify query values before they are converted into a MongoDB query.
345
- *
346
- * - If an array is provided, all functions in the array will be applied.
347
- * - If a record object is provided, transformations will be applied
348
- * based on the corresponding field key.
349
- *
350
- * @example
351
- * {
352
- 'age': MONGO_TRANSFORM.NUMBER
353
- 'customer._id': [MONGO_TRANSFORM.OBJECT_ID, MONGO_TRANSFORM.NOT_NULLABLE]
316
+ /**
317
+ * Determines whether empty search queries are allowed.
318
+ * If `true`, an empty query will return an unfiltered result.
319
+ * If `false`, an empty query will be rejected.
320
+ *
321
+ * @default false
322
+ */
323
+ allowEmpty?: boolean;
324
+ /**
325
+ * A list of allowed keys that can be used in the search query.
326
+ * If provided, any query using keys outside this list will be rejected.
327
+ */
328
+ allowedKeys?: string[];
329
+ /**
330
+ * Max of query ops combination.
331
+ * @default Infinity
332
+ */
333
+ maxOps?: number;
334
+ /**
335
+ * A transformation function or a mapping of transformation functions
336
+ * to modify query values before they are converted into a MongoDB query.
337
+ *
338
+ * - If an array is provided, all functions in the array will be applied.
339
+ * - If a record object is provided, transformations will be applied
340
+ * based on the corresponding field key.
341
+ *
342
+ * @example
343
+ * {
344
+ 'age': MONGO_TRANSFORM.NUMBER
345
+ 'customer._id': [MONGO_TRANSFORM.OBJECT_ID, MONGO_TRANSFORM.NOT_NULLABLE]
354
346
  }
355
- */
356
- transform?: Readonly<Arrayable<ParseToMongoTransformFn>> | Readonly<Record<string, Readonly<Arrayable<ParseToMongoTransformFn>>>>;
347
+ */
348
+ transform?: Readonly<Arrayable<ParseToMongoTransformFn>> | Readonly<Record<string, Readonly<Arrayable<ParseToMongoTransformFn>>>>;
357
349
  }
358
350
  /**
359
351
  * Parses a query string and converts it into a MongoDB-compatible query object.
@@ -383,55 +375,54 @@ interface ParseToMongoOptions {
383
375
  * @group Main
384
376
  */
385
377
  declare function parseToMongo(input: string, options?: ParseToMongoOptions): Record<string, any>;
386
-
387
378
  /**
388
379
  * Utility transform functions
389
380
  * @group Constants
390
381
  */
391
382
  declare const MONGO_TRANSFORM: Readonly<{
392
- /**
393
- * Ensures the value is not null.
394
- * Throws an error if the value is null.
395
- *
396
- * @throws {Error} If the value is null.
397
- */
398
- readonly NOT_NULLABLE: ParseToMongoTransformFn;
399
- /**
400
- * Validates that the value is a number.
401
- * If the value is `null`, it returns `null` without throwing an error.
402
- *
403
- * @throws {Error} If the value is not a valid number.
404
- */
405
- readonly NUMBER: ParseToMongoTransformFn;
406
- /**
407
- * Validates that the value is a string.
408
- * If the value is `null`, it returns `null` without throwing an error.
409
- *
410
- * @throws {Error} If the value is not a valid string.
411
- */
412
- readonly STRING: ParseToMongoTransformFn;
413
- /**
414
- * Validates that the value is a boolean.
415
- * If the value is `null`, it returns `null` without throwing an error.
416
- *
417
- * @throws {Error} If the value is not a valid boolean.
418
- */
419
- readonly BOOLEAN: ParseToMongoTransformFn;
420
- /**
421
- * Validates and converts the value to a MongoDB ObjectId.
422
- * If the value is `null`, it returns `null` without throwing an error.
423
- *
424
- * @throws {Error} If the value is not a valid ObjectId.
425
- */
426
- readonly OBJECT_ID: ParseToMongoTransformFn;
427
- /**
428
- * Validates and converts the value to a Date.
429
- * Supports string and number inputs for conversion.
430
- * If the value is `null`, it returns `null` without throwing an error.
431
- *
432
- * @throws {Error} If the value is not a valid date.
433
- */
434
- readonly DATE: ParseToMongoTransformFn;
383
+ /**
384
+ * Ensures the value is not null.
385
+ * Throws an error if the value is null.
386
+ *
387
+ * @throws {Error} If the value is null.
388
+ */
389
+ readonly NOT_NULLABLE: ParseToMongoTransformFn;
390
+ /**
391
+ * Validates that the value is a number.
392
+ * If the value is `null`, it returns `null` without throwing an error.
393
+ *
394
+ * @throws {Error} If the value is not a valid number.
395
+ */
396
+ readonly NUMBER: ParseToMongoTransformFn;
397
+ /**
398
+ * Validates that the value is a string.
399
+ * If the value is `null`, it returns `null` without throwing an error.
400
+ *
401
+ * @throws {Error} If the value is not a valid string.
402
+ */
403
+ readonly STRING: ParseToMongoTransformFn;
404
+ /**
405
+ * Validates that the value is a boolean.
406
+ * If the value is `null`, it returns `null` without throwing an error.
407
+ *
408
+ * @throws {Error} If the value is not a valid boolean.
409
+ */
410
+ readonly BOOLEAN: ParseToMongoTransformFn;
411
+ /**
412
+ * Validates and converts the value to a MongoDB ObjectId.
413
+ * If the value is `null`, it returns `null` without throwing an error.
414
+ *
415
+ * @throws {Error} If the value is not a valid ObjectId.
416
+ */
417
+ readonly OBJECT_ID: ParseToMongoTransformFn;
418
+ /**
419
+ * Validates and converts the value to a Date.
420
+ * Supports string and number inputs for conversion.
421
+ * If the value is `null`, it returns `null` without throwing an error.
422
+ *
423
+ * @throws {Error} If the value is not a valid date.
424
+ */
425
+ readonly DATE: ParseToMongoTransformFn;
435
426
  }>;
436
427
  type MongooseSchema = mongoose.Schema;
437
428
  type MongooseModel = mongoose.Model<any>;
@@ -474,5 +465,5 @@ type MongooseModel = mongoose.Model<any>;
474
465
  * @group Main
475
466
  */
476
467
  declare function parseToMongoose(reference: MongooseSchema | MongooseModel, input: string, options?: ParseToMongoOptions): Record<string, any>;
477
-
478
- export { type BinaryOperator, Expression, KEYWORDS, type LogicalOperator, MONGO_TRANSFORM, NODE, type Node, type NodeBinaryExpression, type NodeExpression, type NodeIdentifier, type NodeLiteral, type NodeLogicalExpression, type NodeMap, type NodeProgram, type NodeType, type ParseToMongoOptions, type ParseToMongoTransformFn, TOKEN, Tokenizer, parseQuery, parseToMongo, parseToMongoose };
468
+ export { BinaryOperator, Expression, KEYWORDS, LogicalOperator, MONGO_TRANSFORM, NODE, Node, NodeBinaryExpression, NodeExpression, NodeIdentifier, NodeLiteral, NodeLogicalExpression, NodeMap, NodeProgram, NodeType, type ParseToMongoOptions, type ParseToMongoTransformFn, TOKEN, Tokenizer, parseQuery, parseToMongo, parseToMongoose };
469
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":["keyword","label","constructor","TokenTypeOptions","options","Readonly","PROGRAM","IDENTIFIER","LITERAL","LOGICAL_EXPRESSION","BINARY_EXPRESSION","Record","TokenType","SOF","EOF","NUM","STRING","NAME","PAREN_L","PAREN_R","LOGICAL_OR","LOGICAL_AND","EQUALITY","RELATIONAL","MINUS","NULL","TRUE","FALSE","type","TokenType","value","start","end","constructor","TokenOptions","p","Iterable","Token","input","pos","length","state","TokenOptions","prev","constructor","Symbol","iterator","next","done","value","getToken","nextToken","skipSpace","finishToken","TokenType","type","finishOp","size","readToken","code","getTokenFromCode","charCodeAtPos","readEquality","readLtGt","readInt","raise","message","readString","readWord","readEscapedChar","readNumber","start","end","type","NODE","PROGRAM","NodeProgram","LITERAL","NodeLiteral","BINARY_EXPRESSION","NodeBinaryExpression","LOGICAL_EXPRESSION","NodeLogicalExpression","IDENTIFIER","NodeIdentifier","Node","body","NodeExpression","value","raw","name","operator","BinaryOperator","left","right","LogicalOperator","Tokenizer","constructor","input","parse","NodeProgram","finishNode","T","Node","node","parseTopLevel","parseExpression","NodeExpression","parseExprOp","NodeIdentifier","left","NodeBinaryExpression","NodeLogicalExpression","maybeLiteral","NodeLiteral","maybeIdentifier","parseExprAtom","startNode","NodeType","type","NodeMap","value","NodeProgram","value","key","allowEmpty","allowedKeys","maxOps","transform","Readonly","Arrayable","ParseToMongoTransformFn","Record","Set","input","ParseToMongoOptions","options","NodeExpression","node","ParseToMongoOptionsInternal","OpsResource","opsResource","max","uses","constructor","assert","Readonly","NOT_NULLABLE","ParseToMongoTransformFn","NUMBER","STRING","BOOLEAN","OBJECT_ID","DATE","mongoose","Schema","Model","MongooseSchema","MongooseModel","reference","input","ParseToMongoOptions","options","Record"],"sources":["../src/TokenType.d.ts","../src/constants.d.ts","../src/Token.d.ts","../src/Tokenizer.d.ts","../src/types.d.ts","../src/Expression.d.ts","../src/parseQuery.d.ts","../src/parseToMongo.d.ts","../src/parseToMongoose.d.ts"],"mappings":";;UAAiB,gBAAA;EACbA,OAAO;AAAA;AADX;;;AAAA,cAMqB,SAAA;EAAA,SACRC,KAAAA;EAAAA,SACAD,OAAAA;EACTE,WAAAA,CAAYD,KAAAA,UAAeG,OAAAA,GAAU,gBAAgB;AAAA;;;AATzD;;cCKqB,IAAA,EAAM,QAAQ;EAC/BE,OAAAA;EACAC,UAAAA;EACAC,OAAAA;EACAC,kBAAAA;EACAC,iBAAAA;AAAAA;;;;;cAMiB,QAAA,EAAU,MAAM,SAAS,SAAA;;;ADPW;;cCYpC,KAAA,EAAO,QAAA;EAV1B;;;EAAA,SAcWG,GAAAA,EAAK,SAAA;EAnBdP;;;EAAAA,SAuBSQ,GAAAA,EAAK,SAAA;EAnBdJ;;AAAiB;EAAjBA,SAuBSK,GAAAA,EAAK,SAAA;EAjBsC;;;EAAA,SAqB3CC,MAAAA,EAAQ,SAAA;EAhBA;;;EAAA,SAoBRC,IAAAA,EAAM,SAAA;EAZD;;;EAAA,SAgBLC,OAAAA,EAAS,SAAA;EAAA;;;EAAA,SAITC,OAAAA,EAAS,SAAA;EAYC;;;EAAA,SARVC,UAAAA,EAAY,SAAA;EAwBN;;;EAAA,SApBNC,WAAAA,EAAa,SAAA;EApCU;;;EAAA,SAwCvBC,QAAAA,EAAU,SAAA;EAhCVR;;;EAAAA,SAoCAS,UAAAA,EAAY,SAAA;EA5BZP;;;EAAAA,SAgCAQ,KAAAA,EAAO,SA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