coh-content-db 1.4.1 → 2.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/.editorconfig +25 -0
  2. package/.github/workflows/build.yml +38 -0
  3. package/.github/workflows/pull-request.yml +32 -0
  4. package/.github/workflows/release.yml +52 -0
  5. package/LICENSE +24 -674
  6. package/README.md +74 -17
  7. package/dist/coh-content-db.d.ts +584 -22
  8. package/dist/coh-content-db.js +587 -2
  9. package/dist/coh-content-db.js.map +1 -0
  10. package/dist/coh-content-db.mjs +568 -0
  11. package/dist/coh-content-db.mjs.map +1 -0
  12. package/eslint.config.mjs +30 -0
  13. package/jest.config.mjs +7 -0
  14. package/package.json +31 -23
  15. package/rollup.config.mjs +27 -0
  16. package/src/main/api/alignment.ts +3 -0
  17. package/src/main/api/alternate-data.ts +22 -0
  18. package/src/main/api/archetype-data.ts +5 -0
  19. package/src/main/api/badge-data.ts +109 -0
  20. package/src/main/api/badge-partial-data.ts +65 -0
  21. package/src/main/api/badge-partial-type.ts +8 -0
  22. package/src/main/api/badge-type.ts +19 -0
  23. package/src/main/api/change.ts +14 -0
  24. package/src/main/api/enhancement-category.ts +30 -0
  25. package/src/main/api/game-map-data.ts +26 -0
  26. package/src/main/api/link.ts +4 -0
  27. package/src/main/api/plaque-type.ts +6 -0
  28. package/src/main/api/server-group-data.ts +65 -0
  29. package/src/main/api/sex.ts +3 -0
  30. package/src/main/api/vidiot-map-data.ts +18 -0
  31. package/src/main/api/vidiot-map-point-of-interest-data.ts +30 -0
  32. package/src/main/changelog.ts +20 -0
  33. package/src/main/db/alternates.ts +81 -0
  34. package/src/main/db/archetype.ts +14 -0
  35. package/src/main/db/badge-partial.ts +35 -0
  36. package/src/main/db/badge.ts +141 -0
  37. package/src/main/db/coh-content-database.ts +29 -0
  38. package/src/main/db/game-map.ts +33 -0
  39. package/src/main/db/key.ts +18 -0
  40. package/src/main/db/server-group.ts +112 -0
  41. package/src/main/db/vidiot-map-point-of-interest.ts +40 -0
  42. package/src/main/db/vidiot-map.ts +25 -0
  43. package/src/main/index.ts +33 -0
  44. package/src/main/util.ts +17 -0
  45. package/src/test/api/alignment.test.ts +31 -0
  46. package/src/test/api/archetype-data.fixture.ts +8 -0
  47. package/src/test/api/badge-data.fixture.ts +22 -0
  48. package/src/test/api/badge-data.test.ts +15 -0
  49. package/src/test/api/badge-partial-data.fixture.ts +17 -0
  50. package/src/test/api/badge-partial-type.test.ts +31 -0
  51. package/src/test/api/badge-type.test.ts +35 -0
  52. package/src/test/api/enhancement-category.test.ts +35 -0
  53. package/src/test/api/game-map-data.fixture.ts +10 -0
  54. package/src/test/api/plaque-type.test.ts +31 -0
  55. package/src/test/api/server-group-data.fixture.ts +23 -0
  56. package/src/test/api/server-group-data.test.ts +15 -0
  57. package/src/test/api/sex.test.ts +31 -0
  58. package/src/test/api/vidiot-map-point-of-interest.fixture.ts +10 -0
  59. package/src/test/api/vidiot-map.fixture.ts +9 -0
  60. package/src/test/changelog.test.ts +36 -0
  61. package/src/test/db/alternates.test.ts +223 -0
  62. package/src/test/db/archetype.test.ts +38 -0
  63. package/src/test/db/badge.test.ts +41 -0
  64. package/src/test/db/coh-content-database.test.ts +42 -0
  65. package/src/test/db/key.test.ts +22 -0
  66. package/src/test/db/server-group.test.ts +124 -0
  67. package/src/test/index.test.ts +10 -0
  68. package/src/test/util.test.ts +39 -0
  69. package/tsconfig.json +117 -0
  70. package/dist/_changelog.d.ts +0 -3
  71. package/dist/coh-content-db.nomin.js +0 -635
  72. package/dist/content-refence-utils.d.ts +0 -4
  73. package/dist/index.d.ts +0 -8
  74. package/dist/internal/_common.d.ts +0 -4
  75. package/dist/internal/archetype.d.ts +0 -10
  76. package/dist/internal/badge.d.ts +0 -44
  77. package/dist/internal/game-map.d.ts +0 -33
  78. package/dist/internal/server-group.d.ts +0 -24
  79. package/dist/types/archetype.d.ts +0 -9
  80. package/dist/types/badge.d.ts +0 -192
  81. package/dist/types/enhancement.d.ts +0 -28
  82. package/dist/types/game-map.d.ts +0 -47
  83. package/dist/types/link.d.ts +0 -4
  84. package/dist/types/server-group.d.ts +0 -75
@@ -1,36 +1,598 @@
1
- import { IServerGroup, IServerGroupData } from "./types/server-group";
2
- interface ICohContentDb {
1
+ declare const ALIGNMENT: readonly ["H", "V", "P"];
2
+ type Alignment = typeof ALIGNMENT[number];
3
+
4
+ declare const SEX: readonly ["M", "F"];
5
+ type Sex = typeof SEX[number];
6
+
7
+ /**
8
+ * Some badge values differ based on the alignment or sex of the character.
9
+ */
10
+ interface AlternateData<V> {
3
11
  /**
4
- * Load server group data package into the database.
5
- * @param data The data to load.
12
+ * The character alignment this alternate applies to.
6
13
  */
7
- load(data: IServerGroupData): void;
14
+ readonly alignment?: Alignment | string;
8
15
  /**
9
- * Get all the server groups currently loaded in the database.
16
+ * The character sex this alternate applies to.
10
17
  */
11
- getServerGroups(): IServerGroup[];
18
+ readonly sex?: Sex | string;
12
19
  /**
13
- * get a server group by key.
14
- * @param serverGroupKey The key.
20
+ * The value for this combination.
21
+ */
22
+ readonly value: V;
23
+ }
24
+
25
+ interface ArchetypeData {
26
+ readonly key: string;
27
+ readonly name: string;
28
+ readonly description?: string;
29
+ }
30
+
31
+ declare const ENHANCEMENT_CATEGORY: readonly ["DEFENSE_DEBUFF", "TO_HIT_DEBUFF", "TAUNT", "CONFUSE", "HEALING", "DEFENSE_BUFF", "RESIST_DAMAGE", "INTANGIBILITY", "SLEEP", "SLOW", "HOLD", "STUN", "IMMOBILIZE", "FEAR", "ENDURANCE_MODIFICATION", "ENDURANCE_REDUCTION", "RECHARGE_REDUCTION", "INTERRUPT_DURATION", "ACCURACY", "TO_HIT_BUFF", "DAMAGE", "KNOCKBACK", "RUN_SPEED", "JUMP", "FLY_SPEED", "RANGE"];
32
+ type EnhancementCategory = typeof ENHANCEMENT_CATEGORY[number];
33
+
34
+ declare const BADGE_PARTIAL_TYPE: readonly ["PLAQUE", "BADGE", "INVENTION", "INVENTION_PLUS_ONE"];
35
+ type BadgePartialType = typeof BADGE_PARTIAL_TYPE[number];
36
+
37
+ declare const PLAQUE_TYPE: string[];
38
+ type PlaqueType = typeof PLAQUE_TYPE[number];
39
+
40
+ interface BadgePartialData {
41
+ /**
42
+ * Key.
43
+ */
44
+ readonly key: string;
45
+ /**
46
+ * Type of partial.
47
+ */
48
+ readonly type: BadgePartialType | string;
49
+ /**
50
+ * Map the partial is located on.
51
+ */
52
+ readonly mapKey?: string;
53
+ /**
54
+ * /loc coordinates.
55
+ */
56
+ readonly loc?: number[];
57
+ /**
58
+ * Is it a wall plaque or a physical monument?
59
+ */
60
+ readonly plaqueType?: PlaqueType | string;
61
+ /**
62
+ * Plaque inscription.
63
+ */
64
+ readonly inscription?: string;
65
+ /**
66
+ * The number or letter the partial appears as on Vidiot Maps.
67
+ */
68
+ readonly vidiotMapKey?: string;
69
+ /**
70
+ * The badge required for this partial.
71
+ */
72
+ readonly badgeKey?: string;
73
+ /**
74
+ * Level of the invention required.
75
+ */
76
+ readonly inventionLevel?: number;
77
+ /**
78
+ * The types of enhancements required to be crafted.
79
+ */
80
+ readonly inventionTypes?: (EnhancementCategory | string)[];
81
+ /**
82
+ * Number of invention crafts required.
83
+ */
84
+ readonly inventionCount?: number;
85
+ /**
86
+ * Any additional notes.
87
+ */
88
+ readonly notes?: string;
89
+ }
90
+
91
+ interface Link {
92
+ title: string;
93
+ href: string;
94
+ }
95
+
96
+ declare const BADGE_TYPE: readonly ["EXPLORATION", "HISTORY", "ACCOMPLISHMENT", "ACHIEVEMENT", "ACCOLADE", "GLADIATOR", "VETERAN", "PVP", "INVENTION", "DEFEAT", "EVENT", "OUROBOROS", "CONSIGNMENT", "DAY_JOB", "AE"];
97
+ type BadgeType = typeof BADGE_TYPE[number];
98
+
99
+ interface BadgeData {
100
+ /**
101
+ * Unique key used to reference this badge.
102
+ *
103
+ * Keys can only contain lowercase letters, numbers and hyphens (`-`).
104
+ */
105
+ readonly key: string;
106
+ /**
107
+ * The type of badge.
108
+ */
109
+ readonly type: BadgeType | string;
110
+ /**
111
+ * The name of this badge.
112
+ *
113
+ * If the value differs by sex or alignment, include an {@link AlternateData} for each variant.
114
+ */
115
+ readonly name: AlternateData<string>[];
116
+ /**
117
+ * The character alignments that this badge is available to.
118
+ */
119
+ readonly alignment: Alignment[];
120
+ /**
121
+ * The badge text as it appears in-game. May vary by character sex or alignment.
122
+ */
123
+ readonly badgeText?: AlternateData<string>[];
124
+ /**
125
+ * Description of how to acquire the badge.
126
+ *
127
+ * Supports {@link https://www.markdownguide.org/|Markdown} format.
128
+ */
129
+ readonly acquisition?: string;
130
+ /**
131
+ * List of absolute URLs for this badge's icons.
132
+ *
133
+ * If the value differs by sex or alignment, include an {@link AlternateData} for each variant.
134
+ */
135
+ readonly icon?: AlternateData<string>[];
136
+ /**
137
+ * Freeform notes or tips about the badge.
138
+ *
139
+ * Supports {@link https://www.markdownguide.org/|Markdown} format.
140
+ */
141
+ readonly notes?: string;
142
+ /**
143
+ * List of external links for this Badge. Wiki, forums, etc.
144
+ */
145
+ readonly links?: Link[];
146
+ /**
147
+ * For exploration badges, the key of the {@link GameMapData|GameMap} that this badge is found on.
148
+ */
149
+ readonly mapKey?: string;
150
+ /**
151
+ * For exploration badges, the `/loc` coordinates of the badge on the in-game map.
152
+ */
153
+ readonly loc?: [number, number, number];
154
+ /**
155
+ * For badges that appear on a Vidiot Map, the number or letter the badge appears as.
156
+ */
157
+ readonly vidiotMapKey?: string;
158
+ /**
159
+ * ID used with the in-game `/settitle` command to apply the badge.
160
+ */
161
+ readonly setTitle?: {
162
+ /**
163
+ * `/settitle` id.
164
+ */
165
+ id?: number;
166
+ /**
167
+ * `/settitle` id if different for praetorian characters.
168
+ */
169
+ praetorianId?: number;
170
+ };
171
+ /**
172
+ * A description of the effect the badge will have, such as a buff or granting a temporary power.
173
+ *
174
+ * Supports {@link https://www.markdownguide.org/|Markdown} format.
175
+ */
176
+ readonly effect?: string;
177
+ /**
178
+ * A list of requirements for badges that have partial fulfilment steps, such as visiting plaques for history badges, or collecting other badges for meta-badges like accolades.
179
+ */
180
+ readonly partials?: BadgePartialData[];
181
+ /**
182
+ * Some badges are not included in the badge total count... such as Flames of Prometheus, which can be removed by redeeming it for a Notice of the Well.
183
+ */
184
+ readonly ignoreInTotals?: boolean;
185
+ }
186
+
187
+ interface Change {
188
+ /**
189
+ * The version number in {@link http://semver.org|semver} format.
190
+ */
191
+ version: string;
192
+ /**
193
+ * Date of the change.
194
+ */
195
+ date: Date;
196
+ /**
197
+ * Description of the change in {@link https://www.markdownguide.org/|Markdown} format.
198
+ */
199
+ description: string;
200
+ }
201
+
202
+ interface VidiotMapPointOfInterestData {
203
+ /**
204
+ * The pixel-space position of the PoI on the map graphic.
205
+ *
206
+ * Screen-space, pixels from top-left `[0, 0]`.
207
+ */
208
+ readonly pos?: [number, number];
209
+ /**
210
+ * Freeform notes about the PoI.
211
+ *
212
+ * Supports {@link https://www.markdownguide.org/|Markdown} format.
213
+ */
214
+ readonly notes?: string;
215
+ /**
216
+ * If the POI is a zone transfer, the map it transfers to.
217
+ */
218
+ readonly mapKey?: string;
219
+ /**
220
+ * If the POI is a badge, the badge.
221
+ */
222
+ readonly badgeKey?: string;
223
+ /**
224
+ * If the POI is a partial for a badge, the partial key.
225
+ */
226
+ readonly badgePartialKey?: string;
227
+ }
228
+
229
+ interface VidiotMapData {
230
+ /**
231
+ * URL of the map image.
232
+ */
233
+ readonly imageUrl: string;
234
+ /**
235
+ * Name to display for the Vidiot map.
236
+ */
237
+ readonly name?: string;
238
+ /**
239
+ * List of Points of Interest labelled on the image.
240
+ */
241
+ readonly pointsOfInterest?: VidiotMapPointOfInterestData[];
242
+ }
243
+
244
+ interface GameMapData {
245
+ /**
246
+ * Unique key used to reference this badge.
247
+ *
248
+ * Keys can only contain lowercase letters, numbers and hyphens (`-`).
249
+ */
250
+ readonly key: string;
251
+ /**
252
+ * The name of the map as it appears in-game.
253
+ */
254
+ readonly name: string;
255
+ /**
256
+ * List of external links for this Map. Wiki, forums, etc.
257
+ */
258
+ readonly links?: Link[];
259
+ /**
260
+ * List of Vidiot Map assets for this map.
261
+ */
262
+ readonly vidiotMaps?: VidiotMapData[];
263
+ }
264
+
265
+ /**
266
+ * A server group is a group or company that hosts a set of game servers, such as Homecoming (https://forums.homecomingservers.com/).
267
+ */
268
+ interface ServerGroupData {
269
+ /**
270
+ * Unique key used to reference this server group.
271
+ *
272
+ * Keys can only contain lowercase letters, numbers and hyphens (`-`).
273
+ */
274
+ readonly key: string;
275
+ /**
276
+ * Name of the server group.
277
+ */
278
+ readonly name: string;
279
+ /**
280
+ * Description of the server group.
281
+ *
282
+ * Supports {@link https://www.markdownguide.org/|Markdown} format.
283
+ */
284
+ readonly description?: string;
285
+ /**
286
+ * Repository where the db content package is maintained.
287
+ */
288
+ readonly repository?: string;
289
+ /**
290
+ * List of external links for this Badge. Wiki, forums, etc.
291
+ */
292
+ readonly links?: Link[];
293
+ /**
294
+ * List of the game server names in this server group.
295
+ * Torchbearer, Excelsior, etc.
296
+ */
297
+ readonly servers?: string[];
298
+ /**
299
+ * List of archetypes available in this server group.
300
+ */
301
+ readonly archetypes?: ArchetypeData[];
302
+ /**
303
+ * List of game maps supported by this server group.
304
+ */
305
+ readonly maps?: GameMapData[];
306
+ /**
307
+ * List of badges available on this server group.
308
+ */
309
+ readonly badges?: BadgeData[];
310
+ /**
311
+ * Change log for this data package.
312
+ */
313
+ readonly changelog?: Change[];
314
+ }
315
+
316
+ declare class Archetype {
317
+ readonly key: string;
318
+ readonly name: string;
319
+ readonly description?: string;
320
+ constructor(data: ArchetypeData);
321
+ }
322
+
323
+ declare class BadgePartial {
324
+ readonly key: string;
325
+ readonly type: BadgePartialType | string;
326
+ readonly mapKey?: string;
327
+ readonly loc?: number[];
328
+ readonly plaqueType?: PlaqueType | string;
329
+ readonly inscription?: string;
330
+ readonly vidiotMapKey?: string;
331
+ readonly badgeKey?: string;
332
+ readonly inventionLevel?: number;
333
+ readonly inventionTypes?: (EnhancementCategory | string)[];
334
+ readonly inventionCount?: number;
335
+ readonly notes?: string;
336
+ constructor(data: BadgePartialData);
337
+ }
338
+
339
+ declare class Alternates<T> {
340
+ #private;
341
+ constructor(values: AlternateData<T>[]);
342
+ getValue(alignment?: Alignment | string, sex?: Sex | string): T | undefined;
343
+ /**
344
+ * Get the default value for this list of alternates, the value with the highest priority and lowest specificity.
345
+ */
346
+ get default(): T | undefined;
347
+ /**
348
+ * Get the list of alternates sorted in canonical order (alignment then sex, low to high specificity).
349
+ */
350
+ get canonical(): AlternateData<T>[];
351
+ }
352
+
353
+ declare class Badge {
354
+ #private;
355
+ /**
356
+ * The database key for this badge.
357
+ */
358
+ readonly key: string;
359
+ /**
360
+ * The type of badge.
361
+ */
362
+ readonly type: BadgeType | string;
363
+ /**
364
+ * The name of this badge.
365
+ *
366
+ * May vary by character sex or alignment.
367
+ */
368
+ readonly name: Alternates<string>;
369
+ /**
370
+ * The character alignments that this badge is available to.
371
+ */
372
+ readonly alignment: Alignment[];
373
+ /**
374
+ * The badge text as it appears in-game. May vary by character sex or alignment.
375
+ */
376
+ readonly badgeText: Alternates<string>;
377
+ /**
378
+ * Description of how to acquire the badge.
379
+ *
380
+ * Supports {@link https://www.markdownguide.org/|Markdown} format.
381
+ */
382
+ readonly acquisition?: string;
383
+ /**
384
+ * Absolute URL to this badge's icon.
385
+ *
386
+ * May vary by character sex or alignment.
387
+ */
388
+ readonly icon: Alternates<string>;
389
+ /**
390
+ * Freeform notes or tips about the badge.
391
+ *
392
+ * Supports {@link https://www.markdownguide.org/|Markdown} format.
393
+ */
394
+ readonly notes?: string;
395
+ /**
396
+ * List of external links for this Badge. Wiki, forums, etc.
397
+ */
398
+ readonly links?: Link[];
399
+ /**
400
+ * For exploration badges, the key of the {@link GameMap} that this badge is found on.
401
+ */
402
+ readonly mapKey?: string;
403
+ /**
404
+ * For exploration badges, the `/loc` coordinates of the badge on the in-game map.
405
+ */
406
+ readonly loc?: [number, number, number];
407
+ /**
408
+ * For badges that appear on a Vidiot Map, the number or letter the badge appears as.
409
+ */
410
+ readonly vidiotMapKey?: string;
411
+ /**
412
+ * ID used with the in-game `/settitle` command to apply the badge.
413
+ */
414
+ readonly setTitle?: {
415
+ /**
416
+ * `/settitle` id.
417
+ */
418
+ id?: number;
419
+ /**
420
+ * `/settitle` id if different for praetorian characters.
421
+ */
422
+ praetorianId?: number;
423
+ };
424
+ /**
425
+ * A description of the effect the badge will have, such as a buff or granting a temporary power.
426
+ *
427
+ * Supports {@link https://www.markdownguide.org/|Markdown} format.
428
+ */
429
+ readonly effect?: string;
430
+ /**
431
+ * A list of requirements for badges that have partial fulfilment steps, such as visiting plaques for history badges, or collecting other badges for meta-badges like accolades.
432
+ */
433
+ readonly partials?: BadgePartial[];
434
+ /**
435
+ * Some badges are not included in the badge total count... such as Flames of Prometheus, which can be removed by redeeming it for a Notice of the Well.
15
436
  */
16
- getServerGroup(serverGroupKey: string): IServerGroup | null;
437
+ readonly ignoreInTotals: boolean;
438
+ constructor(data: BadgeData);
439
+ getPartial(key: string): BadgePartial;
17
440
  }
18
- export declare class CohContentDb implements ICohContentDb {
19
- private readonly serverGroups;
441
+
442
+ declare class VidiotMapPointOfInterest {
20
443
  /**
21
- * @inheritDoc
22
- * @override
444
+ * The pixel-space position of the PoI on the map graphic.
445
+ *
446
+ * Screen-space, pixels from top-left `[0, 0]`.
23
447
  */
24
- load(data: IServerGroupData): void;
448
+ readonly pos?: [number, number];
25
449
  /**
26
- * @inheritDoc
27
- * @override
450
+ * Freeform notes about the PoI.
451
+ *
452
+ * Supports {@link https://www.markdownguide.org/|Markdown} format.
28
453
  */
29
- getServerGroups(): IServerGroup[];
454
+ readonly notes?: string;
30
455
  /**
31
- * @inheritDoc
32
- * @override
456
+ * If the POI is a zone transfer, the map it transfers to.
33
457
  */
34
- getServerGroup(serverGroupKey: string): IServerGroup | null;
458
+ readonly mapKey?: string;
459
+ /**
460
+ * If the POI is a badge, the badge.
461
+ */
462
+ readonly badgeKey?: string;
463
+ /**
464
+ * If the POI is a partial for a badge, the partial key.
465
+ */
466
+ readonly badgePartialKey?: string;
467
+ constructor(data: VidiotMapPointOfInterestData);
468
+ }
469
+
470
+ declare class VidiotMap {
471
+ /**
472
+ * URL of the map image.
473
+ */
474
+ readonly imageUrl: string;
475
+ /**
476
+ * Name to display for the Vidiot map.
477
+ */
478
+ readonly name?: string;
479
+ /**
480
+ * List of Points of Interest labelled on the image.
481
+ */
482
+ readonly pointsOfInterest?: VidiotMapPointOfInterest[];
483
+ constructor(data: VidiotMapData);
484
+ }
485
+
486
+ declare class GameMap {
487
+ /**
488
+ * The database key for this map.
489
+ */
490
+ readonly key: string;
491
+ /**
492
+ * The name of the map as it appears in-game.
493
+ */
494
+ readonly name: string;
495
+ /**
496
+ * List of external links for this Map. Wiki, forums, etc.
497
+ */
498
+ readonly links?: Link[];
499
+ /**
500
+ * List of Vidiot Map assets for this map.
501
+ */
502
+ readonly vidiotMaps?: VidiotMap[];
503
+ constructor(data: GameMapData);
504
+ }
505
+
506
+ declare class ServerGroup {
507
+ #private;
508
+ /**
509
+ * The database key for this server group.
510
+ */
511
+ readonly key: string;
512
+ /**
513
+ * Name of the server group.
514
+ */
515
+ readonly name: string;
516
+ /**
517
+ * Description of the server group.
518
+ *
519
+ * Supports {@link https://www.markdownguide.org/|Markdown} format.
520
+ */
521
+ readonly description?: string;
522
+ /**
523
+ * Repository where the db content package is maintained.
524
+ */
525
+ readonly repository?: string;
526
+ /**
527
+ * List of external links for this Server Group. Wiki, forums, etc.
528
+ */
529
+ readonly links?: Link[];
530
+ /**
531
+ * List of the game server names in this server group.
532
+ * Torchbearer, Excelsior, etc.
533
+ */
534
+ readonly servers: string[];
535
+ /**
536
+ * List of archetypes available in this server group.
537
+ */
538
+ readonly archetypes: Archetype[];
539
+ /**
540
+ * List of game maps supported by this server group.
541
+ */
542
+ readonly maps: GameMap[];
543
+ /**
544
+ * List of badges available on this server group.
545
+ */
546
+ readonly badges: Badge[];
547
+ /**
548
+ * Change log for this data package.
549
+ */
550
+ readonly changelog?: Change[];
551
+ constructor(data: ServerGroupData);
552
+ getArchetype(key: string): Archetype;
553
+ getMap(key: string): GameMap;
554
+ getBadge(key: string): Badge;
555
+ }
556
+
557
+ declare class CohContentDatabase {
558
+ #private;
559
+ /**
560
+ * Load a server group data package into the database.
561
+ * @param data The data to load.
562
+ */
563
+ loadServerGroupData(data: ServerGroupData): void;
564
+ /**
565
+ * Get all the server groups currently loaded in the database.
566
+ */
567
+ listServerGroups(): ServerGroup[];
568
+ /**
569
+ * get a server group by key.
570
+ * @param serverGroupKey The key.
571
+ */
572
+ getServerGroup(serverGroupKey: string): ServerGroup | null;
573
+ }
574
+
575
+ declare class Key {
576
+ #private;
577
+ constructor(value: string);
578
+ get value(): string;
35
579
  }
36
- export {};
580
+
581
+ declare const CHANGELOG: Change[];
582
+
583
+ /**
584
+ * Create a reference string that can be used in most text strings to display a link to the given badge.
585
+ * @param target The badge or badge key to target.
586
+ */
587
+ declare function createBadgeReference(target: string | {
588
+ key: string;
589
+ }): string;
590
+ /**
591
+ * Create a reference string that can be used in most text strings to display a link to the given map.
592
+ * @param target The {@link GameMap} or map key to target.
593
+ */
594
+ declare function createMapReference(target: string | {
595
+ key: string;
596
+ }): string;
597
+
598
+ export { ALIGNMENT, type Alignment, type AlternateData, Archetype, type ArchetypeData, BADGE_PARTIAL_TYPE, BADGE_TYPE, Badge, type BadgeData, BadgePartial, type BadgePartialData, type BadgePartialType, type BadgeType, CHANGELOG, type Change, CohContentDatabase, ENHANCEMENT_CATEGORY, type EnhancementCategory, GameMap, type GameMapData, Key, type Link, PLAQUE_TYPE, type PlaqueType, SEX, ServerGroup, type ServerGroupData, type Sex, VidiotMap, type VidiotMapData, VidiotMapPointOfInterest, type VidiotMapPointOfInterestData, createBadgeReference, createMapReference };