@flesh-and-blood/search 5.0.14 → 5.0.16

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.
@@ -0,0 +1,836 @@
1
+ import { Bond, Card, Class, Flow, Foiling, Fusion, Hero, Keyword, Meta, Printing, Rarity, Release, Shorthand, Subtype, Talent, Trait, Treatment, Type } from "@flesh-and-blood/types";
2
+ /**
3
+ * Which filter a key names, rather than how it was spelled: every alias of a
4
+ * filter answers with the one category, and a key naming no filter answers
5
+ * with nothing. The advanced search dialog offers a subset of these under the
6
+ * same strings, so a category is also what an app and the engine agree a query
7
+ * token means.
8
+ */
9
+ export declare const FilterCategory: {
10
+ readonly Arcane: "arcane";
11
+ readonly Artist: "artist";
12
+ readonly Banned: "banned";
13
+ readonly Bond: "bond";
14
+ readonly Chain: "chain";
15
+ readonly Class: "class";
16
+ readonly Cost: "cost";
17
+ readonly Defense: "defense";
18
+ readonly Flow: "flow";
19
+ readonly Foiling: "foiling";
20
+ readonly Fusion: "fusion";
21
+ readonly Intellect: "intellect";
22
+ readonly Is: "is";
23
+ readonly Keyword: "keyword";
24
+ readonly Legal: "legal";
25
+ readonly Life: "life";
26
+ readonly Name: "name";
27
+ readonly Pitch: "pitch";
28
+ readonly Power: "power";
29
+ readonly Print: "print";
30
+ readonly Rarity: "rarity";
31
+ readonly ReferencedBy: "referencedby";
32
+ readonly References: "references";
33
+ readonly Set: "set";
34
+ readonly Shorthand: "shorthand";
35
+ readonly Specialization: "specialization";
36
+ readonly Subtype: "subtype";
37
+ readonly Talent: "talent";
38
+ readonly Text: "text";
39
+ readonly Trait: "trait";
40
+ readonly Treatment: "treatment";
41
+ readonly Type: "type";
42
+ readonly TypeText: "typetext";
43
+ readonly Year: "year";
44
+ };
45
+ export type FilterCategory = (typeof FilterCategory)[keyof typeof FilterCategory];
46
+ /** How a filter reads the value written against it in a query. */
47
+ export declare const FilterKind: {
48
+ /** A number, which the query may put a comparison in front of. */
49
+ readonly Comparator: "comparator";
50
+ /** A whole value, so a fragment of one names nothing. */
51
+ readonly ExactMatch: "exactMatch";
52
+ /** A fragment, which stands for anything it sits inside. */
53
+ readonly PartialMatch: "partialMatch";
54
+ };
55
+ export type FilterKind = (typeof FilterKind)[keyof typeof FilterKind];
56
+ export type Modifier = ">=" | ">" | "<=" | "<";
57
+ export declare const availableModifiers: Modifier[];
58
+ /**
59
+ * A value written against a filter, carrying the comparison written in front of
60
+ * it. Each value takes its own, so one term can ask for a cost of 1 or a cost
61
+ * above 2.
62
+ */
63
+ export interface FilterValue {
64
+ modifier?: Modifier;
65
+ value: string;
66
+ }
67
+ export type Exclusion = "!" | "-";
68
+ export declare const availableExclusions: Exclusion[];
69
+ /** The card field a mapping reads. */
70
+ export type CardPropertyName = keyof Card;
71
+ /**
72
+ * The property of a mapping that reads no card field: a meta filter expands
73
+ * into other filters before any card is read, and a relation filter matches
74
+ * the identifiers the parse resolved.
75
+ */
76
+ export declare const NO_CARD_PROPERTY = "n/a";
77
+ /**
78
+ * The field holding the value a card prints where a number would be, which a
79
+ * numeric filter falls back to for a card carrying no number.
80
+ */
81
+ export type CardSpecialPropertyName = "specialArcane" | "specialCost" | "specialDefense" | "specialLife" | "specialPower";
82
+ /**
83
+ * How a card property is read and compared. The parse builds some of these
84
+ * for itself, expanding a meta filter or matching the cards a relation filter
85
+ * resolved, and those name no filter key, so they carry no grammar.
86
+ */
87
+ export interface CardPropertyMapping {
88
+ nestedProperty?: keyof Printing;
89
+ property: CardPropertyName | typeof NO_CARD_PROPERTY;
90
+ exclusion?: Exclusion;
91
+ isArray?: boolean;
92
+ isNestedPropertyArray?: boolean;
93
+ isNumber?: boolean;
94
+ isString?: boolean;
95
+ isBoolean?: boolean;
96
+ isDate?: boolean;
97
+ /**
98
+ * The card stores this property with markdown emphasis around its keywords,
99
+ * so the matcher strips that from both sides. A searched phrase then reads
100
+ * the text the way the card renders it rather than the way it is stored,
101
+ * and a phrase spanning a keyword boundary still matches.
102
+ */
103
+ hasMarkup?: boolean;
104
+ isMeta?: boolean;
105
+ /**
106
+ * The card stores this property the way a filter value is written, so the
107
+ * matcher compares it as stored instead of stripping punctuation and case
108
+ * from it first.
109
+ */
110
+ isNormalized?: boolean;
111
+ modifier?: Modifier;
112
+ partialMatch?: boolean;
113
+ specialProperty?: CardSpecialPropertyName;
114
+ }
115
+ /**
116
+ * A filter a query asked for: the mapping to match cards against, the values
117
+ * to match, and how they combine. The parse builds these; the matcher reads
118
+ * them.
119
+ */
120
+ export interface AppliedFilter {
121
+ filterToPropertyMapping: CardPropertyMapping;
122
+ values: string[];
123
+ /**
124
+ * The same values with the comparison each was written behind, for the
125
+ * filters whose values a query writes directly. Absent where the parse
126
+ * resolved a value into others (a format into its heroes, a rarity into the
127
+ * ones ranked above it), which no comparison reaches.
128
+ */
129
+ filterValues?: FilterValue[];
130
+ /**
131
+ * The same strings as `values`, for filters whose match is exact membership
132
+ * rather than a comparison, so a card costs one lookup instead of a scan.
133
+ * Consumers read `values`; this is the matcher's copy.
134
+ */
135
+ valuesSet?: Set<string>;
136
+ isAnd?: boolean;
137
+ isOr?: boolean;
138
+ modifier?: Modifier;
139
+ isExcluded?: boolean;
140
+ /**
141
+ * Set by a consumer building filters of its own, never by the parse. A
142
+ * filter carrying it narrows nothing.
143
+ */
144
+ isOptional?: boolean;
145
+ cardTypes?: string[];
146
+ }
147
+ /**
148
+ * A mapping a filter key names, and what the grammar says about it: which
149
+ * filter it is, the spelling it is named by, how its values are read, and the
150
+ * values a card can carry.
151
+ */
152
+ export interface FilterToPropertyMapping extends CardPropertyMapping {
153
+ category: FilterCategory;
154
+ /**
155
+ * The one spelling that names this filter where a query is composed rather
156
+ * than parsed: a hint, the syntax help, and the text the advanced search
157
+ * dialog writes. Every alias parses, so the choice decides only what gets
158
+ * written, and a reader's saved query carries it. A filter the dialog offers
159
+ * keeps the spelling that dialog already emits; any other filter takes the
160
+ * shortest spelling the syntax help teaches, and its own word where the help
161
+ * teaches none.
162
+ */
163
+ canonicalAlias: string;
164
+ kind: FilterKind;
165
+ /**
166
+ * The values a card carries for this filter, as the enum they come from:
167
+ * what a dialog offers as options and what a hint draws a suggestion from.
168
+ * It is not the set of spellings the parse accepts, which is wider, since
169
+ * the foiling, treatment, rarity, legality and meta resolvers each take
170
+ * abbreviations of their own. A filter reading free text (`artist`, `name`,
171
+ * `text`, `typetext`), a card name (`chain`, `references`, `referencedby`),
172
+ * a set identifier (`print`), a date (`year`) or a number carries none.
173
+ */
174
+ vocabulary?: readonly string[];
175
+ }
176
+ /** Every spelling a query can write, against the filter it names. */
177
+ export declare const filtersToCardPropertyMappings: {
178
+ arcane: {
179
+ category: "arcane";
180
+ canonicalAlias: string;
181
+ kind: "comparator";
182
+ property: "arcane";
183
+ specialProperty: "specialArcane";
184
+ isNumber: true;
185
+ partialMatch: true;
186
+ };
187
+ a: {
188
+ category: "artist";
189
+ canonicalAlias: string;
190
+ kind: "partialMatch";
191
+ property: "artists";
192
+ isArray: true;
193
+ partialMatch: true;
194
+ };
195
+ artist: {
196
+ category: "artist";
197
+ canonicalAlias: string;
198
+ kind: "partialMatch";
199
+ property: "artists";
200
+ isArray: true;
201
+ partialMatch: true;
202
+ };
203
+ art: {
204
+ category: "artist";
205
+ canonicalAlias: string;
206
+ kind: "partialMatch";
207
+ property: "artists";
208
+ isArray: true;
209
+ partialMatch: true;
210
+ };
211
+ attack: {
212
+ category: "power";
213
+ canonicalAlias: string;
214
+ kind: "comparator";
215
+ property: "power";
216
+ specialProperty: "specialPower";
217
+ isNumber: true;
218
+ };
219
+ b: {
220
+ category: "defense";
221
+ canonicalAlias: string;
222
+ kind: "comparator";
223
+ property: "defense";
224
+ specialProperty: "specialDefense";
225
+ isNumber: true;
226
+ };
227
+ block: {
228
+ category: "defense";
229
+ canonicalAlias: string;
230
+ kind: "comparator";
231
+ property: "defense";
232
+ specialProperty: "specialDefense";
233
+ isNumber: true;
234
+ };
235
+ banned: {
236
+ category: "banned";
237
+ canonicalAlias: string;
238
+ kind: "exactMatch";
239
+ vocabulary: readonly string[];
240
+ property: "n/a";
241
+ isMeta: true;
242
+ };
243
+ bond: {
244
+ category: "bond";
245
+ canonicalAlias: string;
246
+ kind: "exactMatch";
247
+ vocabulary: Bond.Earth[];
248
+ property: "bonds";
249
+ isArray: true;
250
+ };
251
+ bonds: {
252
+ category: "bond";
253
+ canonicalAlias: string;
254
+ kind: "exactMatch";
255
+ vocabulary: Bond.Earth[];
256
+ property: "bonds";
257
+ isArray: true;
258
+ };
259
+ c: {
260
+ category: "class";
261
+ canonicalAlias: string;
262
+ kind: "partialMatch";
263
+ vocabulary: Class[];
264
+ property: "classes";
265
+ isArray: true;
266
+ partialMatch: true;
267
+ };
268
+ class: {
269
+ category: "class";
270
+ canonicalAlias: string;
271
+ kind: "partialMatch";
272
+ vocabulary: Class[];
273
+ property: "classes";
274
+ isArray: true;
275
+ partialMatch: true;
276
+ };
277
+ chain: {
278
+ category: "chain";
279
+ canonicalAlias: string;
280
+ kind: "partialMatch";
281
+ property: "n/a";
282
+ };
283
+ co: {
284
+ category: "cost";
285
+ canonicalAlias: string;
286
+ kind: "comparator";
287
+ property: "cost";
288
+ specialProperty: "specialCost";
289
+ isNumber: true;
290
+ partialMatch: true;
291
+ };
292
+ cost: {
293
+ category: "cost";
294
+ canonicalAlias: string;
295
+ kind: "comparator";
296
+ property: "cost";
297
+ specialProperty: "specialCost";
298
+ isNumber: true;
299
+ partialMatch: true;
300
+ };
301
+ color: {
302
+ category: "pitch";
303
+ canonicalAlias: string;
304
+ kind: "comparator";
305
+ property: "pitch";
306
+ isNumber: true;
307
+ };
308
+ d: {
309
+ category: "defense";
310
+ canonicalAlias: string;
311
+ kind: "comparator";
312
+ property: "defense";
313
+ specialProperty: "specialDefense";
314
+ isNumber: true;
315
+ };
316
+ def: {
317
+ category: "defense";
318
+ canonicalAlias: string;
319
+ kind: "comparator";
320
+ property: "defense";
321
+ specialProperty: "specialDefense";
322
+ isNumber: true;
323
+ };
324
+ defense: {
325
+ category: "defense";
326
+ canonicalAlias: string;
327
+ kind: "comparator";
328
+ property: "defense";
329
+ specialProperty: "specialDefense";
330
+ isNumber: true;
331
+ };
332
+ flow: {
333
+ category: "flow";
334
+ canonicalAlias: string;
335
+ kind: "exactMatch";
336
+ vocabulary: Flow.Lightning[];
337
+ property: "flows";
338
+ isArray: true;
339
+ };
340
+ flows: {
341
+ category: "flow";
342
+ canonicalAlias: string;
343
+ kind: "exactMatch";
344
+ vocabulary: Flow.Lightning[];
345
+ property: "flows";
346
+ isArray: true;
347
+ };
348
+ f: {
349
+ category: "fusion";
350
+ canonicalAlias: string;
351
+ kind: "exactMatch";
352
+ vocabulary: Fusion[];
353
+ property: "fusions";
354
+ isArray: true;
355
+ };
356
+ fusion: {
357
+ category: "fusion";
358
+ canonicalAlias: string;
359
+ kind: "exactMatch";
360
+ vocabulary: Fusion[];
361
+ property: "fusions";
362
+ isArray: true;
363
+ };
364
+ foil: {
365
+ category: "foiling";
366
+ canonicalAlias: string;
367
+ kind: "exactMatch";
368
+ vocabulary: Foiling[];
369
+ nestedProperty: "foiling";
370
+ property: "printings";
371
+ isArray: true;
372
+ };
373
+ foiling: {
374
+ category: "foiling";
375
+ canonicalAlias: string;
376
+ kind: "exactMatch";
377
+ vocabulary: Foiling[];
378
+ nestedProperty: "foiling";
379
+ property: "printings";
380
+ isArray: true;
381
+ };
382
+ i: {
383
+ category: "intellect";
384
+ canonicalAlias: string;
385
+ kind: "comparator";
386
+ property: "intellect";
387
+ isNumber: true;
388
+ };
389
+ intellect: {
390
+ category: "intellect";
391
+ canonicalAlias: string;
392
+ kind: "comparator";
393
+ property: "intellect";
394
+ isNumber: true;
395
+ };
396
+ is: {
397
+ category: "is";
398
+ canonicalAlias: string;
399
+ kind: "exactMatch";
400
+ vocabulary: Meta[];
401
+ property: "meta";
402
+ isArray: true;
403
+ };
404
+ k: {
405
+ category: "keyword";
406
+ canonicalAlias: string;
407
+ kind: "exactMatch";
408
+ vocabulary: Keyword[];
409
+ property: "keywords";
410
+ isArray: true;
411
+ };
412
+ keyword: {
413
+ category: "keyword";
414
+ canonicalAlias: string;
415
+ kind: "exactMatch";
416
+ vocabulary: Keyword[];
417
+ property: "keywords";
418
+ isArray: true;
419
+ };
420
+ l: {
421
+ category: "legal";
422
+ canonicalAlias: string;
423
+ kind: "exactMatch";
424
+ vocabulary: readonly string[];
425
+ property: "n/a";
426
+ isMeta: true;
427
+ };
428
+ legal: {
429
+ category: "legal";
430
+ canonicalAlias: string;
431
+ kind: "exactMatch";
432
+ vocabulary: readonly string[];
433
+ property: "n/a";
434
+ isMeta: true;
435
+ };
436
+ hero: {
437
+ category: "legal";
438
+ canonicalAlias: string;
439
+ kind: "exactMatch";
440
+ vocabulary: readonly string[];
441
+ property: "n/a";
442
+ isMeta: true;
443
+ };
444
+ li: {
445
+ category: "life";
446
+ canonicalAlias: string;
447
+ kind: "comparator";
448
+ property: "life";
449
+ specialProperty: "specialLife";
450
+ isNumber: true;
451
+ };
452
+ life: {
453
+ category: "life";
454
+ canonicalAlias: string;
455
+ kind: "comparator";
456
+ property: "life";
457
+ specialProperty: "specialLife";
458
+ isNumber: true;
459
+ };
460
+ meta: {
461
+ category: "is";
462
+ canonicalAlias: string;
463
+ kind: "exactMatch";
464
+ vocabulary: Meta[];
465
+ property: "meta";
466
+ isArray: true;
467
+ };
468
+ n: {
469
+ category: "name";
470
+ canonicalAlias: string;
471
+ kind: "partialMatch";
472
+ property: "name";
473
+ isString: true;
474
+ partialMatch: true;
475
+ };
476
+ name: {
477
+ category: "name";
478
+ canonicalAlias: string;
479
+ kind: "partialMatch";
480
+ property: "name";
481
+ isString: true;
482
+ partialMatch: true;
483
+ };
484
+ p: {
485
+ category: "pitch";
486
+ canonicalAlias: string;
487
+ kind: "comparator";
488
+ property: "pitch";
489
+ isNumber: true;
490
+ };
491
+ pitch: {
492
+ category: "pitch";
493
+ canonicalAlias: string;
494
+ kind: "comparator";
495
+ property: "pitch";
496
+ isNumber: true;
497
+ };
498
+ pwr: {
499
+ category: "power";
500
+ canonicalAlias: string;
501
+ kind: "comparator";
502
+ property: "power";
503
+ specialProperty: "specialPower";
504
+ isNumber: true;
505
+ };
506
+ pow: {
507
+ category: "power";
508
+ canonicalAlias: string;
509
+ kind: "comparator";
510
+ property: "power";
511
+ specialProperty: "specialPower";
512
+ isNumber: true;
513
+ };
514
+ power: {
515
+ category: "power";
516
+ canonicalAlias: string;
517
+ kind: "comparator";
518
+ property: "power";
519
+ specialProperty: "specialPower";
520
+ isNumber: true;
521
+ };
522
+ print: {
523
+ category: "print";
524
+ canonicalAlias: string;
525
+ kind: "partialMatch";
526
+ property: "setIdentifiers";
527
+ isArray: true;
528
+ partialMatch: true;
529
+ };
530
+ printing: {
531
+ category: "print";
532
+ canonicalAlias: string;
533
+ kind: "partialMatch";
534
+ property: "setIdentifiers";
535
+ isArray: true;
536
+ partialMatch: true;
537
+ };
538
+ printings: {
539
+ category: "print";
540
+ canonicalAlias: string;
541
+ kind: "partialMatch";
542
+ property: "setIdentifiers";
543
+ isArray: true;
544
+ partialMatch: true;
545
+ };
546
+ prints: {
547
+ category: "print";
548
+ canonicalAlias: string;
549
+ kind: "partialMatch";
550
+ property: "setIdentifiers";
551
+ isArray: true;
552
+ partialMatch: true;
553
+ };
554
+ r: {
555
+ category: "rarity";
556
+ canonicalAlias: string;
557
+ kind: "exactMatch";
558
+ vocabulary: Rarity[];
559
+ property: "n/a";
560
+ isMeta: true;
561
+ };
562
+ rarity: {
563
+ category: "rarity";
564
+ canonicalAlias: string;
565
+ kind: "exactMatch";
566
+ vocabulary: Rarity[];
567
+ property: "n/a";
568
+ isMeta: true;
569
+ };
570
+ referencedby: {
571
+ category: "referencedby";
572
+ canonicalAlias: string;
573
+ kind: "partialMatch";
574
+ property: "n/a";
575
+ };
576
+ references: {
577
+ category: "references";
578
+ canonicalAlias: string;
579
+ kind: "partialMatch";
580
+ property: "n/a";
581
+ };
582
+ rf: {
583
+ category: "banned";
584
+ canonicalAlias: string;
585
+ kind: "exactMatch";
586
+ vocabulary: readonly string[];
587
+ property: "n/a";
588
+ isMeta: true;
589
+ };
590
+ s: {
591
+ category: "set";
592
+ canonicalAlias: string;
593
+ kind: "partialMatch";
594
+ vocabulary: Release[];
595
+ property: "sets";
596
+ isArray: true;
597
+ partialMatch: true;
598
+ };
599
+ set: {
600
+ category: "set";
601
+ canonicalAlias: string;
602
+ kind: "partialMatch";
603
+ vocabulary: Release[];
604
+ property: "sets";
605
+ isArray: true;
606
+ partialMatch: true;
607
+ };
608
+ short: {
609
+ category: "shorthand";
610
+ canonicalAlias: string;
611
+ kind: "partialMatch";
612
+ vocabulary: Shorthand[];
613
+ property: "shorthands";
614
+ isArray: true;
615
+ partialMatch: true;
616
+ };
617
+ shorthand: {
618
+ category: "shorthand";
619
+ canonicalAlias: string;
620
+ kind: "partialMatch";
621
+ vocabulary: Shorthand[];
622
+ property: "shorthands";
623
+ isArray: true;
624
+ partialMatch: true;
625
+ };
626
+ shorthands: {
627
+ category: "shorthand";
628
+ canonicalAlias: string;
629
+ kind: "partialMatch";
630
+ vocabulary: Shorthand[];
631
+ property: "shorthands";
632
+ isArray: true;
633
+ partialMatch: true;
634
+ };
635
+ sp: {
636
+ category: "specialization";
637
+ canonicalAlias: string;
638
+ kind: "partialMatch";
639
+ vocabulary: Hero[];
640
+ property: "specializations";
641
+ isArray: true;
642
+ partialMatch: true;
643
+ };
644
+ spec: {
645
+ category: "specialization";
646
+ canonicalAlias: string;
647
+ kind: "partialMatch";
648
+ vocabulary: Hero[];
649
+ property: "specializations";
650
+ isArray: true;
651
+ partialMatch: true;
652
+ };
653
+ specialization: {
654
+ category: "specialization";
655
+ canonicalAlias: string;
656
+ kind: "partialMatch";
657
+ vocabulary: Hero[];
658
+ property: "specializations";
659
+ isArray: true;
660
+ partialMatch: true;
661
+ };
662
+ specializations: {
663
+ category: "specialization";
664
+ canonicalAlias: string;
665
+ kind: "partialMatch";
666
+ vocabulary: Hero[];
667
+ property: "specializations";
668
+ isArray: true;
669
+ partialMatch: true;
670
+ };
671
+ st: {
672
+ category: "subtype";
673
+ canonicalAlias: string;
674
+ kind: "exactMatch";
675
+ vocabulary: Subtype[];
676
+ property: "subtypes";
677
+ isArray: true;
678
+ };
679
+ subtype: {
680
+ category: "subtype";
681
+ canonicalAlias: string;
682
+ kind: "exactMatch";
683
+ vocabulary: Subtype[];
684
+ property: "subtypes";
685
+ isArray: true;
686
+ };
687
+ t: {
688
+ category: "type";
689
+ canonicalAlias: string;
690
+ kind: "exactMatch";
691
+ vocabulary: Type[];
692
+ property: "types";
693
+ isArray: true;
694
+ };
695
+ type: {
696
+ category: "type";
697
+ canonicalAlias: string;
698
+ kind: "exactMatch";
699
+ vocabulary: Type[];
700
+ property: "types";
701
+ isArray: true;
702
+ };
703
+ tal: {
704
+ category: "talent";
705
+ canonicalAlias: string;
706
+ kind: "exactMatch";
707
+ vocabulary: Talent[];
708
+ property: "talents";
709
+ isArray: true;
710
+ };
711
+ talent: {
712
+ category: "talent";
713
+ canonicalAlias: string;
714
+ kind: "exactMatch";
715
+ vocabulary: Talent[];
716
+ property: "talents";
717
+ isArray: true;
718
+ };
719
+ talents: {
720
+ category: "talent";
721
+ canonicalAlias: string;
722
+ kind: "exactMatch";
723
+ vocabulary: Talent[];
724
+ property: "talents";
725
+ isArray: true;
726
+ };
727
+ text: {
728
+ category: "text";
729
+ canonicalAlias: string;
730
+ kind: "partialMatch";
731
+ property: "functionalText";
732
+ hasMarkup: true;
733
+ isString: true;
734
+ partialMatch: true;
735
+ };
736
+ trait: {
737
+ category: "trait";
738
+ canonicalAlias: string;
739
+ kind: "partialMatch";
740
+ vocabulary: Trait.AgentOfChaos[];
741
+ property: "traits";
742
+ isArray: true;
743
+ partialMatch: true;
744
+ };
745
+ treat: {
746
+ category: "treatment";
747
+ canonicalAlias: string;
748
+ kind: "exactMatch";
749
+ vocabulary: Treatment[];
750
+ nestedProperty: "treatments";
751
+ property: "printings";
752
+ isArray: true;
753
+ isNestedPropertyArray: true;
754
+ };
755
+ treatment: {
756
+ category: "treatment";
757
+ canonicalAlias: string;
758
+ kind: "exactMatch";
759
+ vocabulary: Treatment[];
760
+ nestedProperty: "treatments";
761
+ property: "printings";
762
+ isArray: true;
763
+ isNestedPropertyArray: true;
764
+ };
765
+ var: {
766
+ category: "treatment";
767
+ canonicalAlias: string;
768
+ kind: "exactMatch";
769
+ vocabulary: Treatment[];
770
+ nestedProperty: "treatments";
771
+ property: "printings";
772
+ isArray: true;
773
+ isNestedPropertyArray: true;
774
+ };
775
+ variation: {
776
+ category: "treatment";
777
+ canonicalAlias: string;
778
+ kind: "exactMatch";
779
+ vocabulary: Treatment[];
780
+ nestedProperty: "treatments";
781
+ property: "printings";
782
+ isArray: true;
783
+ isNestedPropertyArray: true;
784
+ };
785
+ x: {
786
+ category: "typetext";
787
+ canonicalAlias: string;
788
+ kind: "partialMatch";
789
+ property: "typeText";
790
+ isString: true;
791
+ partialMatch: true;
792
+ };
793
+ typetext: {
794
+ category: "typetext";
795
+ canonicalAlias: string;
796
+ kind: "partialMatch";
797
+ property: "typeText";
798
+ isString: true;
799
+ partialMatch: true;
800
+ };
801
+ year: {
802
+ category: "year";
803
+ canonicalAlias: string;
804
+ kind: "partialMatch";
805
+ property: "firstReleaseDate";
806
+ isString: true;
807
+ partialMatch: true;
808
+ };
809
+ };
810
+ /**
811
+ * The same mappings, read by a key a query wrote. Filter keys are typed by the
812
+ * searcher, so an unrecognised key is a miss to skip rather than a type error.
813
+ */
814
+ export declare const filtersToCardPropertyMappingsByKey: {
815
+ [key: string]: FilterToPropertyMapping | undefined;
816
+ };
817
+ /**
818
+ * The filter a key names, however it was capitalised, and nothing where the
819
+ * key names none.
820
+ */
821
+ export declare const getFilterMapping: (key: string) => FilterToPropertyMapping | undefined;
822
+ export declare const getFilterCategory: (key: string) => FilterCategory | undefined;
823
+ /** Every spelling a query can name each filter by. */
824
+ export declare const aliasesByFilterCategory: Record<FilterCategory, readonly string[]>;
825
+ /**
826
+ * Whether the values a filter declares hold the one written against it,
827
+ * however that one was cased and punctuated.
828
+ */
829
+ export declare const getIsValueInFilterVocabulary: (category: FilterCategory, value: string) => boolean;
830
+ /**
831
+ * The spelling that names the filter a value was meant for, where exactly one
832
+ * filter other than the one it was written against declares it. Several
833
+ * filters declaring it is a choice for the reader to make rather than one to
834
+ * make on their behalf.
835
+ */
836
+ export declare const getSuggestedFilterKey: (category: FilterCategory, values: string[]) => string | undefined;