optolith-database-schema 0.24.2 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/gen/types.d.ts +23 -1
  3. package/lib/test.d.ts +1 -1
  4. package/lib/test.js +10 -1
  5. package/lib/types/Advantage.js +7 -0
  6. package/lib/types/AnimalDisease.js +6 -0
  7. package/lib/types/AnimalType.js +6 -0
  8. package/lib/types/ArcaneBardTradition.js +6 -0
  9. package/lib/types/ArcaneDancerTradition.js +6 -0
  10. package/lib/types/Aspect.js +6 -0
  11. package/lib/types/Attribute.js +10 -0
  12. package/lib/types/Blessing.js +6 -0
  13. package/lib/types/Cantrip.js +6 -0
  14. package/lib/types/Ceremony.js +6 -0
  15. package/lib/types/CombatTechnique.js +12 -0
  16. package/lib/types/Condition.js +6 -0
  17. package/lib/types/Continent.js +6 -0
  18. package/lib/types/Culture.js +6 -0
  19. package/lib/types/DerivedCharacteristic.js +10 -0
  20. package/lib/types/Disadvantage.js +7 -0
  21. package/lib/types/Disease.js +6 -0
  22. package/lib/types/Element.js +6 -0
  23. package/lib/types/ExperienceLevel.js +6 -0
  24. package/lib/types/EyeColor.js +6 -0
  25. package/lib/types/FamiliarsTrick.js +6 -0
  26. package/lib/types/HairColor.js +6 -0
  27. package/lib/types/Lessons.js +12 -0
  28. package/lib/types/LiturgicalChant.js +6 -0
  29. package/lib/types/Locale.js +10 -0
  30. package/lib/types/MetaCondition.js +6 -0
  31. package/lib/types/PactCategory.js +36 -0
  32. package/lib/types/Patron.js +6 -0
  33. package/lib/types/PatronCategory.js +6 -0
  34. package/lib/types/PersonalityTrait.js +6 -0
  35. package/lib/types/Profession.d.ts +3 -3
  36. package/lib/types/Profession.js +1 -1
  37. package/lib/types/Property.js +6 -0
  38. package/lib/types/Race.js +17 -0
  39. package/lib/types/Region.js +6 -0
  40. package/lib/types/Ritual.js +6 -0
  41. package/lib/types/Service.js +6 -0
  42. package/lib/types/SexPractice.js +6 -0
  43. package/lib/types/Skill.js +15 -0
  44. package/lib/types/SkillGroup.js +6 -0
  45. package/lib/types/SkillModificationLevel.js +8 -0
  46. package/lib/types/SocialStatus.js +7 -0
  47. package/lib/types/Spell.js +6 -0
  48. package/lib/types/State.js +6 -0
  49. package/lib/types/Talisman.js +6 -0
  50. package/lib/types/TargetCategory.js +6 -0
  51. package/lib/types/_ActivatableSelectOptions.js +11 -0
  52. package/lib/types/_Enhancements.js +11 -0
  53. package/lib/types/_Influence.js +6 -0
  54. package/lib/types/equipment/EquipmentPackage.js +6 -0
  55. package/lib/types/equipment/item/Ammunition.js +6 -0
  56. package/lib/types/equipment/item/Animal.js +6 -0
  57. package/lib/types/equipment/item/AnimalCare.js +6 -0
  58. package/lib/types/equipment/item/Armor.js +6 -0
  59. package/lib/types/equipment/item/BandageOrRemedy.js +6 -0
  60. package/lib/types/equipment/item/Book.js +6 -0
  61. package/lib/types/equipment/item/CeremonialItem.js +6 -0
  62. package/lib/types/equipment/item/Clothes.js +6 -0
  63. package/lib/types/equipment/item/Container.js +6 -0
  64. package/lib/types/equipment/item/Elixir.d.ts +1 -0
  65. package/lib/types/equipment/item/Elixir.js +10 -0
  66. package/lib/types/equipment/item/EquipmentOfBlessedOnes.js +6 -0
  67. package/lib/types/equipment/item/GemOrPreciousStone.js +6 -0
  68. package/lib/types/equipment/item/IlluminationLightSource.js +6 -0
  69. package/lib/types/equipment/item/IlluminationRefillOrSupply.js +6 -0
  70. package/lib/types/equipment/item/Jewelry.js +6 -0
  71. package/lib/types/equipment/item/Laboratory.js +6 -0
  72. package/lib/types/equipment/item/Liebesspielzeug.js +6 -0
  73. package/lib/types/equipment/item/LuxuryGood.js +6 -0
  74. package/lib/types/equipment/item/MagicalArtifact.js +6 -0
  75. package/lib/types/equipment/item/MusicalInstrument.js +6 -0
  76. package/lib/types/equipment/item/Newspaper.js +6 -0
  77. package/lib/types/equipment/item/Poison.js +6 -0
  78. package/lib/types/equipment/item/ToolOfTheTrade.js +6 -0
  79. package/lib/types/equipment/item/TravelGearOrTool.js +6 -0
  80. package/lib/types/equipment/item/Vehicle.js +6 -0
  81. package/lib/types/equipment/item/Weapon.js +6 -0
  82. package/lib/types/equipment/item/WeaponAccessory.js +6 -0
  83. package/lib/types/equipment/item/_Item.js +6 -0
  84. package/lib/types/equipment/item/sub/ArmorType.js +6 -0
  85. package/lib/types/equipment/item/sub/Reach.js +6 -0
  86. package/lib/types/magicalActions/AnimistPower.js +6 -0
  87. package/lib/types/magicalActions/AnimistPower_Tribe.js +6 -0
  88. package/lib/types/magicalActions/Curse.js +6 -0
  89. package/lib/types/magicalActions/DominationRitual.js +6 -0
  90. package/lib/types/magicalActions/ElvenMagicalSong.js +6 -0
  91. package/lib/types/magicalActions/GeodeRitual.js +6 -0
  92. package/lib/types/magicalActions/JesterTrick.js +6 -0
  93. package/lib/types/magicalActions/MagicalDance.js +6 -0
  94. package/lib/types/magicalActions/MagicalMelody.js +6 -0
  95. package/lib/types/magicalActions/MagicalRune.js +6 -0
  96. package/lib/types/magicalActions/ZibiljaRitual.js +6 -0
  97. package/lib/types/rule/AlternativeRule.js +6 -0
  98. package/lib/types/rule/CoreRule.js +6 -0
  99. package/lib/types/rule/FocusRule.js +6 -0
  100. package/lib/types/rule/FocusRule_Subject.js +6 -0
  101. package/lib/types/rule/OptionalRule.js +6 -0
  102. package/lib/types/source/Publication.js +6 -0
  103. package/lib/types/specialAbility/AdvancedCombatSpecialAbility.js +7 -0
  104. package/lib/types/specialAbility/AdvancedKarmaSpecialAbility.js +7 -0
  105. package/lib/types/specialAbility/AdvancedMagicalSpecialAbility.js +7 -0
  106. package/lib/types/specialAbility/AdvancedSkillSpecialAbility.js +7 -0
  107. package/lib/types/specialAbility/AncestorGlyph.js +7 -0
  108. package/lib/types/specialAbility/BlessedTradition.js +7 -0
  109. package/lib/types/specialAbility/BrawlingSpecialAbility.js +7 -0
  110. package/lib/types/specialAbility/CeremonialItemSpecialAbility.js +12 -0
  111. package/lib/types/specialAbility/CombatSpecialAbility.js +7 -0
  112. package/lib/types/specialAbility/CombatStyleSpecialAbility.js +7 -0
  113. package/lib/types/specialAbility/CommandSpecialAbility.js +7 -0
  114. package/lib/types/specialAbility/FamiliarSpecialAbility.js +7 -0
  115. package/lib/types/specialAbility/FatePointSexSpecialAbility.js +7 -0
  116. package/lib/types/specialAbility/FatePointSpecialAbility.js +7 -0
  117. package/lib/types/specialAbility/GeneralSpecialAbility.js +7 -0
  118. package/lib/types/specialAbility/KarmaSpecialAbility.js +7 -0
  119. package/lib/types/specialAbility/LiturgicalStyleSpecialAbility.js +7 -0
  120. package/lib/types/specialAbility/LycantropicGift.js +7 -0
  121. package/lib/types/specialAbility/MagicStyleSpecialAbility.js +7 -0
  122. package/lib/types/specialAbility/MagicalSign.js +7 -0
  123. package/lib/types/specialAbility/MagicalSpecialAbility.js +7 -0
  124. package/lib/types/specialAbility/MagicalTradition.js +7 -0
  125. package/lib/types/specialAbility/PactGift.js +7 -0
  126. package/lib/types/specialAbility/ProtectiveWardingCircleSpecialAbility.js +7 -0
  127. package/lib/types/specialAbility/Sermon.js +7 -0
  128. package/lib/types/specialAbility/SexSpecialAbility.js +7 -0
  129. package/lib/types/specialAbility/SikaryanDrainSpecialAbility.js +7 -0
  130. package/lib/types/specialAbility/SkillStyleSpecialAbility.js +7 -0
  131. package/lib/types/specialAbility/VampiricGift.js +7 -0
  132. package/lib/types/specialAbility/Vision.js +7 -0
  133. package/lib/types/specialAbility/sub/Language.js +6 -0
  134. package/lib/types/specialAbility/sub/Script.js +6 -0
  135. package/lib/types/specialAbility/sub/TradeSecret.js +6 -0
  136. package/lib/types/traditionArtifacts/ArcaneOrbEnchantment.js +7 -0
  137. package/lib/types/traditionArtifacts/AttireEnchantment.js +7 -0
  138. package/lib/types/traditionArtifacts/Beutelzauber.js +7 -0
  139. package/lib/types/traditionArtifacts/BowlEnchantment.js +7 -0
  140. package/lib/types/traditionArtifacts/CauldronEnchantment.js +7 -0
  141. package/lib/types/traditionArtifacts/ChronicleEnchantment.js +7 -0
  142. package/lib/types/traditionArtifacts/DaggerRitual.js +7 -0
  143. package/lib/types/traditionArtifacts/FoolsHatEnchantment.js +7 -0
  144. package/lib/types/traditionArtifacts/Haubenzauber.js +7 -0
  145. package/lib/types/traditionArtifacts/InstrumentEnchantment.js +7 -0
  146. package/lib/types/traditionArtifacts/Krallenkettenzauber.js +7 -0
  147. package/lib/types/traditionArtifacts/Kristallkugelzauber.js +7 -0
  148. package/lib/types/traditionArtifacts/OrbEnchantment.js +7 -0
  149. package/lib/types/traditionArtifacts/RingEnchantment.js +7 -0
  150. package/lib/types/traditionArtifacts/SickleRitual.js +7 -0
  151. package/lib/types/traditionArtifacts/SpellSwordEnchantment.js +7 -0
  152. package/lib/types/traditionArtifacts/StaffEnchantment.js +7 -0
  153. package/lib/types/traditionArtifacts/ToyEnchantment.js +7 -0
  154. package/lib/types/traditionArtifacts/Trinkhornzauber.js +7 -0
  155. package/lib/types/traditionArtifacts/WandEnchantment.js +7 -0
  156. package/lib/types/traditionArtifacts/WeaponEnchantment.js +7 -0
  157. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -2,6 +2,30 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
4
4
 
5
+ ## [0.25.0](https://github.com/elyukai/optolith-database-schema/compare/v0.24.3...v0.25.0) (2025-12-14)
6
+
7
+
8
+ ### ⚠ BREAKING CHANGES
9
+
10
+ * add unique constraints
11
+
12
+ ### Features
13
+
14
+ * add unique constraints ([8bacb48](https://github.com/elyukai/optolith-database-schema/commit/8bacb489d804d280801b38111d96732fb9a317fc))
15
+ * adjust display names of pact domains and types ([6086a6d](https://github.com/elyukai/optolith-database-schema/commit/6086a6d89160f7f09f9f6474cc240acd4d518f43))
16
+
17
+ ## [0.24.3](https://github.com/elyukai/optolith-database-schema/compare/v0.24.2...v0.24.3) (2025-12-09)
18
+
19
+
20
+ ### Features
21
+
22
+ * add raw value option to elixirs ([f14ecf0](https://github.com/elyukai/optolith-database-schema/commit/f14ecf01b4eb6acbaee8b27abb95e9907a41aed4)), closes [#84](https://github.com/elyukai/optolith-database-schema/issues/84)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * profession variants could not be entered ([df21ff3](https://github.com/elyukai/optolith-database-schema/commit/df21ff3e992c9976a5111de1a46f644f26f8c122))
28
+
5
29
  ## [0.24.2](https://github.com/elyukai/optolith-database-schema/compare/v0.24.1...v0.24.2) (2025-12-09)
6
30
 
7
31
 
package/gen/types.d.ts CHANGED
@@ -176,6 +176,23 @@ export type EntityMap = {
176
176
  ZibiljaRitual: ZibiljaRitual
177
177
  }
178
178
 
179
+ export type ChildEntityMap = {
180
+ Enhancement: [Enhancement, "parent", Enhancement["parent"]]
181
+ GeneralSelectOption: [GeneralSelectOption, "parent", GeneralSelectOption["parent"]]
182
+ LanguageSpecialization: [LanguageSpecialization, "parent", LanguageSpecialization["parent"]]
183
+ LessonPackage: [LessonPackage, "curriculum", LessonPackage["curriculum"]]
184
+ MagicalRuneOption: [MagicalRuneOption, "parent", MagicalRuneOption["parent"]]
185
+ NewSkillApplication: [NewSkillApplication, "parent", NewSkillApplication["parent"]]
186
+ PactDomain: [PactDomain, "parent", PactDomain["parent"]]
187
+ PactType: [PactType, "parent", PactType["parent"]]
188
+ ProfessionPackage: [ProfessionPackage, "profession_version", ProfessionPackage["profession_version"]]
189
+ ProfessionVariant: [ProfessionVariant, "profession_package", ProfessionVariant["profession_package"]]
190
+ ProfessionVersion: [ProfessionVersion, "profession", ProfessionVersion["profession"]]
191
+ RaceVariant: [RaceVariant, "race", RaceVariant["race"]]
192
+ SkillApplication: [SkillApplication, "parent", SkillApplication["parent"]]
193
+ SkillUse: [SkillUse, "parent", SkillUse["parent"]]
194
+ }
195
+
179
196
  export type StringableTranslationParameter = {
180
197
  toString(): string
181
198
  }
@@ -7677,7 +7694,7 @@ export interface ProfessionPackage {
7677
7694
  /**
7678
7695
  * Provides examples of variants for the profession, which may include changes to AP values and additional or modified skill ratings, special abilities, or combat techniques, as compared to the basic profession. Usually picking a variant is optional, but there are some rare exceptions where picking a variant is required.
7679
7696
  */
7680
- variants?: ProfessionVariant_ID[]
7697
+ variants: ProfessionVariant_ID[]
7681
7698
  }
7682
7699
 
7683
7700
  /**
@@ -19895,6 +19912,11 @@ export interface Elixir {
19895
19912
  */
19896
19913
  effect_types?: EffectType[]
19897
19914
 
19915
+ /**
19916
+ * The raw (ingredients) value per level, in silverthalers.
19917
+ */
19918
+ value?: number
19919
+
19898
19920
  /**
19899
19921
  * The cost per ingredient level in silverthalers.
19900
19922
  */
package/lib/test.d.ts CHANGED
@@ -1 +1 @@
1
- import "./main.js";
1
+ export {};
package/lib/test.js CHANGED
@@ -1,2 +1,11 @@
1
+ import { stderr } from "node:process";
2
+ import { styleText } from "node:util";
1
3
  // importing the main file will run the schema checks
2
- import "./main.js";
4
+ import("./main.js")
5
+ .then(() => {
6
+ console.log(styleText("green", "Schema is valid"));
7
+ })
8
+ .catch((err) => {
9
+ console.error(styleText("red", err instanceof Error ? err.message : String(err), { stream: stderr }));
10
+ process.exitCode = 1;
11
+ });
@@ -46,4 +46,11 @@ export const Advantage = Entity(import.meta.url, {
46
46
  })),
47
47
  }),
48
48
  displayName: {},
49
+ uniqueConstraints: [
50
+ {
51
+ entityMapKeyPath: "translations",
52
+ keyPathInEntityMap: "name_in_library",
53
+ keyPathInEntityMapFallback: "name",
54
+ },
55
+ ],
49
56
  });
@@ -26,4 +26,10 @@ If no causes are given, the disease is not communicable to intelligent creatures
26
26
  translations: NestedTranslationMap(Required, "AnimalDisease", DiseaseTranslation),
27
27
  }),
28
28
  displayName: {},
29
+ uniqueConstraints: [
30
+ {
31
+ entityMapKeyPath: "translations",
32
+ keyPathInEntityMap: "name",
33
+ },
34
+ ],
29
35
  });
@@ -12,4 +12,10 @@ export const AnimalType = Entity(import.meta.url, {
12
12
  })),
13
13
  }),
14
14
  displayName: {},
15
+ uniqueConstraints: [
16
+ {
17
+ entityMapKeyPath: "translations",
18
+ keyPathInEntityMap: "name",
19
+ },
20
+ ],
15
21
  });
@@ -5,4 +5,10 @@ export const ArcaneBardTradition = Entity(import.meta.url, {
5
5
  namePlural: "ArcaneBardTraditions",
6
6
  type: ArcaneTraditionType("ArcaneBardTraditionTranslation"),
7
7
  displayName: {},
8
+ uniqueConstraints: [
9
+ {
10
+ entityMapKeyPath: "translations",
11
+ keyPathInEntityMap: "name",
12
+ },
13
+ ],
8
14
  });
@@ -5,4 +5,10 @@ export const ArcaneDancerTradition = Entity(import.meta.url, {
5
5
  namePlural: "ArcaneDancerTraditions",
6
6
  type: ArcaneTraditionType("ArcaneDancerTraditionTranslation"),
7
7
  displayName: {},
8
+ uniqueConstraints: [
9
+ {
10
+ entityMapKeyPath: "translations",
11
+ keyPathInEntityMap: "name",
12
+ },
13
+ ],
8
14
  });
@@ -18,4 +18,10 @@ export const Aspect = Entity(import.meta.url, {
18
18
  })),
19
19
  }),
20
20
  displayName: {},
21
+ uniqueConstraints: [
22
+ {
23
+ entityMapKeyPath: "translations",
24
+ keyPathInEntityMap: "name",
25
+ },
26
+ ],
21
27
  });
@@ -21,4 +21,14 @@ export const Attribute = Entity(import.meta.url, {
21
21
  })),
22
22
  }),
23
23
  displayName: {},
24
+ uniqueConstraints: [
25
+ {
26
+ entityMapKeyPath: "translations",
27
+ keyPathInEntityMap: "name",
28
+ },
29
+ {
30
+ entityMapKeyPath: "translations",
31
+ keyPathInEntityMap: "abbreviation",
32
+ },
33
+ ],
24
34
  });
@@ -45,6 +45,12 @@ export const Blessing = Entity(import.meta.url, {
45
45
  })),
46
46
  }),
47
47
  displayName: {},
48
+ uniqueConstraints: [
49
+ {
50
+ entityMapKeyPath: "translations",
51
+ keyPathInEntityMap: "name",
52
+ },
53
+ ],
48
54
  });
49
55
  const BlessingPerformanceParameters = TypeAlias(import.meta.url, {
50
56
  name: "BlessingPerformanceParameters",
@@ -56,6 +56,12 @@ export const Cantrip = Entity(import.meta.url, {
56
56
  })),
57
57
  }),
58
58
  displayName: {},
59
+ uniqueConstraints: [
60
+ {
61
+ entityMapKeyPath: "translations",
62
+ keyPathInEntityMap: "name",
63
+ },
64
+ ],
59
65
  });
60
66
  const CantripNote = Enum(import.meta.url, {
61
67
  name: "CantripNote",
@@ -85,4 +85,10 @@ export const Ceremony = Entity(import.meta.url, {
85
85
  }),
86
86
  }),
87
87
  displayName: {},
88
+ uniqueConstraints: [
89
+ {
90
+ entityMapKeyPath: "translations",
91
+ keyPathInEntityMap: "name",
92
+ },
93
+ ],
88
94
  });
@@ -40,6 +40,12 @@ export const CloseCombatTechnique = Entity(import.meta.url, {
40
40
  })),
41
41
  }),
42
42
  displayName: {},
43
+ uniqueConstraints: [
44
+ {
45
+ entityMapKeyPath: "translations",
46
+ keyPathInEntityMap: "name",
47
+ },
48
+ ],
43
49
  });
44
50
  const CloseCombatTechniqueSpecialRules = TypeAlias(import.meta.url, {
45
51
  name: "CloseCombatTechniqueSpecialRules",
@@ -91,6 +97,12 @@ export const RangedCombatTechnique = Entity(import.meta.url, {
91
97
  })),
92
98
  }),
93
99
  displayName: {},
100
+ uniqueConstraints: [
101
+ {
102
+ entityMapKeyPath: "translations",
103
+ keyPathInEntityMap: "name",
104
+ },
105
+ ],
94
106
  });
95
107
  const RangedCombatTechniqueSpecialRules = TypeAlias(import.meta.url, {
96
108
  name: "RangedCombatTechniqueSpecialRules",
@@ -29,4 +29,10 @@ export const Condition = Entity(import.meta.url, {
29
29
  })),
30
30
  }),
31
31
  displayName: {},
32
+ uniqueConstraints: [
33
+ {
34
+ entityMapKeyPath: "translations",
35
+ keyPathInEntityMap: "name",
36
+ },
37
+ ],
32
38
  });
@@ -13,4 +13,10 @@ export const Continent = Entity(import.meta.url, {
13
13
  })),
14
14
  }),
15
15
  displayName: {},
16
+ uniqueConstraints: [
17
+ {
18
+ entityMapKeyPath: "translations",
19
+ keyPathInEntityMap: "name",
20
+ },
21
+ ],
16
22
  });
@@ -94,6 +94,12 @@ export const Culture = Entity(import.meta.url, {
94
94
  })),
95
95
  }),
96
96
  displayName: {},
97
+ uniqueConstraints: [
98
+ {
99
+ entityMapKeyPath: "translations",
100
+ keyPathInEntityMap: "name",
101
+ },
102
+ ],
97
103
  });
98
104
  const AreaKnowledge = TypeAlias(import.meta.url, {
99
105
  name: "AreaKnowledge",
@@ -26,6 +26,16 @@ export const DerivedCharacteristic = Entity(import.meta.url, {
26
26
  })),
27
27
  }),
28
28
  displayName: {},
29
+ uniqueConstraints: [
30
+ {
31
+ entityMapKeyPath: "translations",
32
+ keyPathInEntityMap: "name",
33
+ },
34
+ {
35
+ entityMapKeyPath: "translations",
36
+ keyPathInEntityMap: "abbreviation",
37
+ },
38
+ ],
29
39
  });
30
40
  const CalculationTranslation = TypeAlias(import.meta.url, {
31
41
  name: "CalculationTranslation",
@@ -47,4 +47,11 @@ export const Disadvantage = Entity(import.meta.url, {
47
47
  })),
48
48
  }),
49
49
  displayName: {},
50
+ uniqueConstraints: [
51
+ {
52
+ entityMapKeyPath: "translations",
53
+ keyPathInEntityMap: "name_in_library",
54
+ keyPathInEntityMapFallback: "name",
55
+ },
56
+ ],
50
57
  });
@@ -18,4 +18,10 @@ export const Disease = Entity(import.meta.url, {
18
18
  translations: NestedTranslationMap(Required, "Disease", DiseaseTranslation),
19
19
  }),
20
20
  displayName: {},
21
+ uniqueConstraints: [
22
+ {
23
+ entityMapKeyPath: "translations",
24
+ keyPathInEntityMap: "name",
25
+ },
26
+ ],
21
27
  });
@@ -12,4 +12,10 @@ export const Element = Entity(import.meta.url, {
12
12
  })),
13
13
  }),
14
14
  displayName: {},
15
+ uniqueConstraints: [
16
+ {
17
+ entityMapKeyPath: "translations",
18
+ keyPathInEntityMap: "name",
19
+ },
20
+ ],
15
21
  });
@@ -41,4 +41,10 @@ export const ExperienceLevel = Entity(import.meta.url, {
41
41
  })),
42
42
  }),
43
43
  displayName: {},
44
+ uniqueConstraints: [
45
+ {
46
+ entityMapKeyPath: "translations",
47
+ keyPathInEntityMap: "name",
48
+ },
49
+ ],
44
50
  });
@@ -12,4 +12,10 @@ export const EyeColor = Entity(import.meta.url, {
12
12
  })),
13
13
  }),
14
14
  displayName: {},
15
+ uniqueConstraints: [
16
+ {
17
+ entityMapKeyPath: "translations",
18
+ keyPathInEntityMap: "name",
19
+ },
20
+ ],
15
21
  });
@@ -53,6 +53,12 @@ If no animal types are given, the animal disease applies to all animal types.`,
53
53
  })),
54
54
  }),
55
55
  displayName: {},
56
+ uniqueConstraints: [
57
+ {
58
+ entityMapKeyPath: "translations",
59
+ keyPathInEntityMap: "name",
60
+ },
61
+ ],
56
62
  });
57
63
  const FamiliarsTrickProperty = Enum(import.meta.url, {
58
64
  name: "FamiliarsTrickProperty",
@@ -12,4 +12,10 @@ export const HairColor = Entity(import.meta.url, {
12
12
  })),
13
13
  }),
14
14
  displayName: {},
15
+ uniqueConstraints: [
16
+ {
17
+ entityMapKeyPath: "translations",
18
+ keyPathInEntityMap: "name",
19
+ },
20
+ ],
15
21
  });
@@ -20,6 +20,12 @@ export const Guideline = Entity(import.meta.url, {
20
20
  })),
21
21
  }),
22
22
  displayName: {},
23
+ uniqueConstraints: [
24
+ {
25
+ entityMapKeyPath: "translations",
26
+ keyPathInEntityMap: "name",
27
+ },
28
+ ],
23
29
  });
24
30
  export const Curriculum = Entity(import.meta.url, {
25
31
  name: "Curriculum",
@@ -54,6 +60,12 @@ export const Curriculum = Entity(import.meta.url, {
54
60
  })),
55
61
  }),
56
62
  displayName: {},
63
+ uniqueConstraints: [
64
+ {
65
+ entityMapKeyPath: "translations",
66
+ keyPathInEntityMap: "name",
67
+ },
68
+ ],
57
69
  });
58
70
  const ElectiveSpellworks = Enum(import.meta.url, {
59
71
  name: "ElectiveSpellworks",
@@ -85,4 +85,10 @@ export const LiturgicalChant = Entity(import.meta.url, {
85
85
  }),
86
86
  }),
87
87
  displayName: {},
88
+ uniqueConstraints: [
89
+ {
90
+ entityMapKeyPath: "translations",
91
+ keyPathInEntityMap: "name",
92
+ },
93
+ ],
88
94
  });
@@ -1289,6 +1289,16 @@ export const Locale = Entity(import.meta.url, {
1289
1289
  }, { allKeysAreRequired: true }),
1290
1290
  }),
1291
1291
  }),
1292
+ uniqueConstraints: [
1293
+ [
1294
+ {
1295
+ keyPath: "name",
1296
+ },
1297
+ {
1298
+ keyPath: "region",
1299
+ },
1300
+ ],
1301
+ ],
1292
1302
  });
1293
1303
  export const NestedTranslationMap = (MemberDeclCreator, entityName, type) => MemberDeclCreator({
1294
1304
  comment: "All translations for the entry, identified by IETF language tag (BCP47).",
@@ -30,4 +30,10 @@ export const MetaCondition = Entity(import.meta.url, {
30
30
  })),
31
31
  }),
32
32
  displayName: {},
33
+ uniqueConstraints: [
34
+ {
35
+ entityMapKeyPath: "translations",
36
+ keyPathInEntityMap: "name",
37
+ },
38
+ ],
33
39
  });
@@ -27,6 +27,12 @@ export const PactCategory = Entity(import.meta.url, {
27
27
  })),
28
28
  }),
29
29
  displayName: {},
30
+ uniqueConstraints: [
31
+ {
32
+ entityMapKeyPath: "translations",
33
+ keyPathInEntityMap: "name",
34
+ },
35
+ ],
30
36
  });
31
37
  export const PactType = Entity(import.meta.url, {
32
38
  name: "PactType",
@@ -45,6 +51,21 @@ export const PactType = Entity(import.meta.url, {
45
51
  }),
46
52
  parentReferenceKey: "parent",
47
53
  displayName: {},
54
+ displayNameCustomizer: ({ instance, instanceDisplayName, instanceDisplayNameLocaleId, getDisplayNameForInstanceId, }) => ({
55
+ name: `${getDisplayNameForInstanceId(instance.parent)?.name ?? ""} — ${instanceDisplayName}`,
56
+ localeId: instanceDisplayNameLocaleId,
57
+ }),
58
+ uniqueConstraints: [
59
+ [
60
+ {
61
+ keyPath: "parent",
62
+ },
63
+ {
64
+ entityMapKeyPath: "translations",
65
+ keyPathInEntityMap: "name",
66
+ },
67
+ ],
68
+ ],
48
69
  });
49
70
  export const PactDomain = Entity(import.meta.url, {
50
71
  name: "PactDomain",
@@ -63,4 +84,19 @@ export const PactDomain = Entity(import.meta.url, {
63
84
  }),
64
85
  parentReferenceKey: "parent",
65
86
  displayName: {},
87
+ displayNameCustomizer: ({ instance, instanceDisplayName, instanceDisplayNameLocaleId, getDisplayNameForInstanceId, }) => ({
88
+ name: `${getDisplayNameForInstanceId(instance.parent)?.name ?? ""} — ${instanceDisplayName}`,
89
+ localeId: instanceDisplayNameLocaleId,
90
+ }),
91
+ uniqueConstraints: [
92
+ [
93
+ {
94
+ keyPath: "parent",
95
+ },
96
+ {
97
+ entityMapKeyPath: "translations",
98
+ keyPathInEntityMap: "name",
99
+ },
100
+ ],
101
+ ],
66
102
  });
@@ -59,6 +59,12 @@ export const Patron = Entity(import.meta.url, {
59
59
  })),
60
60
  }),
61
61
  displayName: {},
62
+ uniqueConstraints: [
63
+ {
64
+ entityMapKeyPath: "translations",
65
+ keyPathInEntityMap: "name",
66
+ },
67
+ ],
62
68
  });
63
69
  const PatronCulture = TypeAlias(import.meta.url, {
64
70
  name: "PatronCulture",
@@ -17,4 +17,10 @@ export const PatronCategory = Entity(import.meta.url, {
17
17
  })),
18
18
  }),
19
19
  displayName: {},
20
+ uniqueConstraints: [
21
+ {
22
+ entityMapKeyPath: "translations",
23
+ keyPathInEntityMap: "name",
24
+ },
25
+ ],
20
26
  });
@@ -36,6 +36,12 @@ export const PersonalityTrait = Entity(import.meta.url, {
36
36
  })),
37
37
  }),
38
38
  displayName: {},
39
+ uniqueConstraints: [
40
+ {
41
+ entityMapKeyPath: "translations",
42
+ keyPathInEntityMap: "name",
43
+ },
44
+ ],
39
45
  });
40
46
  const PersonalityTraitEffect = TypeAlias(import.meta.url, {
41
47
  name: "PersonalityTraitEffect",
@@ -546,7 +546,7 @@ export declare const Profession: Entity<"Profession", {
546
546
  full_text: import("tsondb/schema/def").MemberDecl<String, false>;
547
547
  concluding_text: import("tsondb/schema/def").MemberDecl<String, false>;
548
548
  }>, true>;
549
- }, "profession_package">>, false>;
549
+ }, "profession_package">>, true>;
550
550
  }, "profession_version">>, true>;
551
551
  suggested_advantages: import("tsondb/schema/def").MemberDecl<Array<IncludeIdentifier<import("tsondb/schema/def").TypeParameter<string, import("tsondb/schema/def").Type>[], TypeAlias<"CommonnessRatedAdvantageDisadvantage", ObjectType<{
552
552
  id: import("tsondb/schema/def").MemberDecl<TypeArgument<import("tsondb/schema/def").TypeParameter<"Identifier", import("tsondb/schema/def").Type>>, true>;
@@ -1162,7 +1162,7 @@ export declare const ProfessionVersion: Entity<"ProfessionVersion", {
1162
1162
  full_text: import("tsondb/schema/def").MemberDecl<String, false>;
1163
1163
  concluding_text: import("tsondb/schema/def").MemberDecl<String, false>;
1164
1164
  }>, true>;
1165
- }, "profession_package">>, false>;
1165
+ }, "profession_package">>, true>;
1166
1166
  }, "profession_version">>, true>;
1167
1167
  suggested_advantages: import("tsondb/schema/def").MemberDecl<Array<IncludeIdentifier<import("tsondb/schema/def").TypeParameter<string, import("tsondb/schema/def").Type>[], TypeAlias<"CommonnessRatedAdvantageDisadvantage", ObjectType<{
1168
1168
  id: import("tsondb/schema/def").MemberDecl<TypeArgument<import("tsondb/schema/def").TypeParameter<"Identifier", import("tsondb/schema/def").Type>>, true>;
@@ -1770,7 +1770,7 @@ export declare const ProfessionPackage: Entity<"ProfessionPackage", {
1770
1770
  full_text: import("tsondb/schema/def").MemberDecl<String, false>;
1771
1771
  concluding_text: import("tsondb/schema/def").MemberDecl<String, false>;
1772
1772
  }>, true>;
1773
- }, "profession_package">>, false>;
1773
+ }, "profession_package">>, true>;
1774
1774
  }, "profession_version">;
1775
1775
  export declare const ProfessionVariant: Entity<"ProfessionVariant", {
1776
1776
  profession_package: import("tsondb/schema/def").MemberDecl<import("tsondb/schema/def").ReferenceIdentifierType, true>;
@@ -193,7 +193,7 @@ export const ProfessionPackage = Entity(import.meta.url, {
193
193
  comment: "If the selection of a profession variant is required.",
194
194
  type: Boolean(),
195
195
  }),
196
- variants: Optional({
196
+ variants: Required({
197
197
  comment: "Provides examples of variants for the profession, which may include changes to AP values and additional or modified skill ratings, special abilities, or combat techniques, as compared to the basic profession. Usually picking a variant is optional, but there are some rare exceptions where picking a variant is required.",
198
198
  type: ChildEntities(ProfessionVariant),
199
199
  }),
@@ -17,4 +17,10 @@ export const Property = Entity(import.meta.url, {
17
17
  })),
18
18
  }),
19
19
  displayName: {},
20
+ uniqueConstraints: [
21
+ {
22
+ entityMapKeyPath: "translations",
23
+ keyPathInEntityMap: "name",
24
+ },
25
+ ],
20
26
  });
package/lib/types/Race.js CHANGED
@@ -89,6 +89,12 @@ export const Race = Entity(import.meta.url, {
89
89
  })),
90
90
  }),
91
91
  displayName: {},
92
+ uniqueConstraints: [
93
+ {
94
+ entityMapKeyPath: "translations",
95
+ keyPathInEntityMap: "name",
96
+ },
97
+ ],
92
98
  });
93
99
  const BaseValues = TypeAlias(import.meta.url, {
94
100
  name: "BaseValues",
@@ -273,6 +279,17 @@ export const RaceVariant = Entity(import.meta.url, {
273
279
  }),
274
280
  parentReferenceKey: "race",
275
281
  displayName: {},
282
+ uniqueConstraints: [
283
+ [
284
+ {
285
+ keyPath: "race",
286
+ },
287
+ {
288
+ entityMapKeyPath: "translations",
289
+ keyPathInEntityMap: "name",
290
+ },
291
+ ],
292
+ ],
276
293
  });
277
294
  const RandomHeightGeneration = TypeAlias(import.meta.url, {
278
295
  name: "RandomHeightGeneration",
@@ -12,4 +12,10 @@ export const Region = Entity(import.meta.url, {
12
12
  })),
13
13
  }),
14
14
  displayName: {},
15
+ uniqueConstraints: [
16
+ {
17
+ entityMapKeyPath: "translations",
18
+ keyPathInEntityMap: "name",
19
+ },
20
+ ],
15
21
  });
@@ -86,4 +86,10 @@ export const Ritual = Entity(import.meta.url, {
86
86
  }),
87
87
  }),
88
88
  displayName: {},
89
+ uniqueConstraints: [
90
+ {
91
+ entityMapKeyPath: "translations",
92
+ keyPathInEntityMap: "name",
93
+ },
94
+ ],
89
95
  });