@league-of-foundry-developers/foundry-vtt-types 0.8.9-7 → 9.238.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.
Files changed (207) hide show
  1. package/README.md +44 -27
  2. package/index-lenient.d.ts +10 -0
  3. package/index.d.ts +2 -2
  4. package/package.json +43 -15
  5. package/src/foundry/common/abstract/backend.mjs.d.ts +14 -15
  6. package/src/foundry/common/abstract/document.mjs.d.ts +30 -12
  7. package/src/foundry/common/config.mjs/index.d.ts +1 -0
  8. package/src/foundry/common/config.mjs/releaseData.d.ts +98 -0
  9. package/src/foundry/common/constants.mjs.d.ts +402 -213
  10. package/src/foundry/common/data/data.mjs/activeEffectData.d.ts +36 -29
  11. package/src/foundry/common/data/data.mjs/actorData.d.ts +32 -21
  12. package/src/foundry/common/data/data.mjs/adventureData.d.ts +165 -0
  13. package/src/foundry/common/data/data.mjs/ambientLightData.d.ts +45 -124
  14. package/src/foundry/common/data/data.mjs/ambientSoundData.d.ts +49 -77
  15. package/src/foundry/common/data/data.mjs/animationData.d.ts +17 -9
  16. package/src/foundry/common/data/data.mjs/cardData.d.ts +265 -0
  17. package/src/foundry/common/data/data.mjs/cardFaceData.d.ts +66 -0
  18. package/src/foundry/common/data/data.mjs/cardsData.d.ts +238 -0
  19. package/src/foundry/common/data/data.mjs/chatMessageData.d.ts +51 -39
  20. package/src/foundry/common/data/data.mjs/chatSpeakerData.d.ts +18 -11
  21. package/src/foundry/common/data/data.mjs/combatData.d.ts +51 -25
  22. package/src/foundry/common/data/data.mjs/combatantData.d.ts +48 -30
  23. package/src/foundry/common/data/data.mjs/darknessActivation.d.ts +8 -7
  24. package/src/foundry/common/data/data.mjs/drawingData.d.ts +68 -67
  25. package/src/foundry/common/data/data.mjs/effectChangeData.d.ts +21 -25
  26. package/src/foundry/common/data/data.mjs/effectDurationData.d.ts +24 -23
  27. package/src/foundry/common/data/data.mjs/fogExplorationData.d.ts +23 -16
  28. package/src/foundry/common/data/data.mjs/folderData.d.ts +28 -25
  29. package/src/foundry/common/data/data.mjs/index.d.ts +5 -0
  30. package/src/foundry/common/data/data.mjs/itemData.d.ts +26 -18
  31. package/src/foundry/common/data/data.mjs/journalEntryData.d.ts +21 -20
  32. package/src/foundry/common/data/data.mjs/lightData.d.ts +228 -0
  33. package/src/foundry/common/data/data.mjs/macroData.d.ts +52 -35
  34. package/src/foundry/common/data/data.mjs/measuredTemplateData.d.ts +41 -38
  35. package/src/foundry/common/data/data.mjs/noteData.d.ts +47 -37
  36. package/src/foundry/common/data/data.mjs/playlistData.d.ts +55 -26
  37. package/src/foundry/common/data/data.mjs/playlistSoundData.d.ts +32 -16
  38. package/src/foundry/common/data/data.mjs/prototypeTokenData.d.ts +7 -11
  39. package/src/foundry/common/data/data.mjs/rollTableData.d.ts +30 -24
  40. package/src/foundry/common/data/data.mjs/sceneData.d.ts +132 -111
  41. package/src/foundry/common/data/data.mjs/settingData.d.ts +11 -8
  42. package/src/foundry/common/data/data.mjs/tableResultData.d.ts +30 -26
  43. package/src/foundry/common/data/data.mjs/tileData.d.ts +43 -36
  44. package/src/foundry/common/data/data.mjs/tileOcclusion.d.ts +10 -9
  45. package/src/foundry/common/data/data.mjs/tokenBarData.d.ts +6 -3
  46. package/src/foundry/common/data/data.mjs/tokenData.d.ts +105 -157
  47. package/src/foundry/common/data/data.mjs/userData.d.ts +111 -33
  48. package/src/foundry/common/data/data.mjs/videoData.d.ts +9 -8
  49. package/src/foundry/common/data/data.mjs/wallData.d.ts +67 -39
  50. package/src/foundry/common/data/fields.mjs.d.ts +180 -83
  51. package/src/foundry/common/documents.mjs/baseActiveEffect.d.ts +9 -3
  52. package/src/foundry/common/documents.mjs/baseActor.d.ts +17 -45
  53. package/src/foundry/common/documents.mjs/baseAdventure.d.ts +38 -0
  54. package/src/foundry/common/documents.mjs/baseAmbientLight.d.ts +3 -0
  55. package/src/foundry/common/documents.mjs/baseAmbientSound.d.ts +3 -1
  56. package/src/foundry/common/documents.mjs/baseCard.d.ts +62 -0
  57. package/src/foundry/common/documents.mjs/baseCards.d.ts +39 -0
  58. package/src/foundry/common/documents.mjs/baseChatMessage.d.ts +3 -0
  59. package/src/foundry/common/documents.mjs/baseCombat.d.ts +5 -2
  60. package/src/foundry/common/documents.mjs/baseCombatant.d.ts +10 -1
  61. package/src/foundry/common/documents.mjs/baseDrawing.d.ts +11 -1
  62. package/src/foundry/common/documents.mjs/baseFogExploration.d.ts +4 -3
  63. package/src/foundry/common/documents.mjs/baseFolder.d.ts +10 -1
  64. package/src/foundry/common/documents.mjs/baseItem.d.ts +11 -29
  65. package/src/foundry/common/documents.mjs/baseJournalEntry.d.ts +3 -0
  66. package/src/foundry/common/documents.mjs/baseMacro.d.ts +16 -14
  67. package/src/foundry/common/documents.mjs/baseMeasuredTemplate.d.ts +4 -1
  68. package/src/foundry/common/documents.mjs/baseNote.d.ts +2 -2
  69. package/src/foundry/common/documents.mjs/basePlaylist.d.ts +1 -0
  70. package/src/foundry/common/documents.mjs/basePlaylistSound.d.ts +2 -1
  71. package/src/foundry/common/documents.mjs/baseRollTable.d.ts +3 -0
  72. package/src/foundry/common/documents.mjs/baseScene.d.ts +1 -0
  73. package/src/foundry/common/documents.mjs/baseSetting.d.ts +1 -0
  74. package/src/foundry/common/documents.mjs/baseTableResult.d.ts +10 -3
  75. package/src/foundry/common/documents.mjs/baseTile.d.ts +1 -0
  76. package/src/foundry/common/documents.mjs/baseToken.d.ts +3 -0
  77. package/src/foundry/common/documents.mjs/baseUser.d.ts +7 -1
  78. package/src/foundry/common/documents.mjs/baseWall.d.ts +7 -10
  79. package/src/foundry/common/documents.mjs/index.d.ts +3 -0
  80. package/src/foundry/common/module.mjs.d.ts +3 -0
  81. package/src/foundry/common/packages.mjs/moduleData.d.ts +12 -9
  82. package/src/foundry/common/packages.mjs/packageAuthorData.d.ts +24 -24
  83. package/src/foundry/common/packages.mjs/packageCompendiumData.d.ts +27 -21
  84. package/src/foundry/common/packages.mjs/packageData.d.ts +108 -82
  85. package/src/foundry/common/packages.mjs/packageDependencyData.d.ts +18 -11
  86. package/src/foundry/common/packages.mjs/packageLanguageData.d.ts +16 -15
  87. package/src/foundry/common/packages.mjs/systemData.d.ts +21 -20
  88. package/src/foundry/common/packages.mjs/tagPackageAvailability.d.ts +3 -3
  89. package/src/foundry/common/packages.mjs/worldData.d.ts +29 -18
  90. package/src/foundry/common/types.mjs.d.ts +100 -0
  91. package/src/foundry/common/utils/helpers.mjs.d.ts +27 -2
  92. package/src/foundry/common/utils/primitives.mjs.d.ts +99 -16
  93. package/src/foundry/foundry.js/application.d.ts +4 -7
  94. package/src/foundry/foundry.js/applications/cameraViews.d.ts +36 -31
  95. package/src/foundry/foundry.js/applications/compendium.d.ts +5 -2
  96. package/src/foundry/foundry.js/applications/filePicker.d.ts +116 -116
  97. package/src/foundry/foundry.js/applications/formApplication.d.ts +2 -2
  98. package/src/foundry/foundry.js/applications/formApplications/combatTrackerConfig.d.ts +20 -27
  99. package/src/foundry/foundry.js/applications/formApplications/defaultTokenConfig.d.ts +66 -0
  100. package/src/foundry/foundry.js/applications/formApplications/documentSheet.d.ts +1 -1
  101. package/src/foundry/foundry.js/applications/formApplications/documentSheets/activeEffectConfig.d.ts +2 -2
  102. package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +6 -3
  103. package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientLightConfig.d.ts +104 -0
  104. package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientSoundConfig.d.ts +1 -1
  105. package/src/foundry/foundry.js/applications/formApplications/{folderConfig.d.ts → documentSheets/folderConfig.d.ts} +3 -3
  106. package/src/foundry/foundry.js/applications/formApplications/documentSheets/index.d.ts +4 -0
  107. package/src/foundry/foundry.js/applications/formApplications/documentSheets/lightConfig.d.ts +5 -79
  108. package/src/foundry/foundry.js/applications/formApplications/documentSheets/measuredTemplateConfig.d.ts +60 -0
  109. package/src/foundry/foundry.js/applications/formApplications/documentSheets/noteConfig.d.ts +72 -0
  110. package/src/foundry/foundry.js/applications/formApplications/documentSheets/permissionControl.d.ts +5 -5
  111. package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistConfig.d.ts +1 -1
  112. package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +187 -148
  113. package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts +133 -110
  114. package/src/foundry/foundry.js/applications/formApplications/documentSheets/tileConfig.d.ts +1 -1
  115. package/src/foundry/foundry.js/applications/formApplications/drawingConfig.d.ts +93 -95
  116. package/src/foundry/foundry.js/applications/formApplications/entitySheetConfig.d.ts +163 -147
  117. package/src/foundry/foundry.js/applications/formApplications/gridConfig.d.ts +1 -1
  118. package/src/foundry/foundry.js/applications/formApplications/imagePopout.d.ts +1 -1
  119. package/src/foundry/foundry.js/applications/formApplications/index.d.ts +2 -3
  120. package/src/foundry/foundry.js/applications/formApplications/keybindingsConfig.d.ts +257 -0
  121. package/src/foundry/foundry.js/applications/formApplications/moduleManagement.d.ts +41 -23
  122. package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +95 -86
  123. package/src/foundry/foundry.js/applications/formApplications/tokenConfig.d.ts +142 -155
  124. package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +60 -70
  125. package/src/foundry/foundry.js/applications/formApplications/worldConfig.d.ts +25 -17
  126. package/src/foundry/foundry.js/applications/hotbar.d.ts +5 -4
  127. package/src/foundry/foundry.js/applications/sceneNavigation.d.ts +90 -71
  128. package/src/foundry/foundry.js/applications/sidebarTab.d.ts +1 -1
  129. package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +7 -6
  130. package/src/foundry/foundry.js/applications/sidebarTabs/compendiumDirectory.d.ts +2 -2
  131. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/actorDirectory.d.ts +13 -56
  132. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/cardsDirectory.d.ts +7 -0
  133. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/index.d.ts +1 -0
  134. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/itemDirectory.d.ts +7 -30
  135. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/journalDirectory.d.ts +14 -34
  136. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/macroDirectory.d.ts +6 -52
  137. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/playlistDirectory.d.ts +2 -2
  138. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/sceneDirectory.d.ts +6 -23
  139. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +4 -6
  140. package/src/foundry/foundry.js/avSettings.d.ts +7 -7
  141. package/src/foundry/foundry.js/cameraPopoutAppWrapper.d.ts +12 -7
  142. package/src/foundry/foundry.js/canvas.d.ts +150 -47
  143. package/src/foundry/foundry.js/canvasAnimation.d.ts +1 -1
  144. package/src/foundry/foundry.js/canvasDocumentMixin.d.ts +7 -0
  145. package/src/foundry/foundry.js/clientDatabaseBackend.d.ts +210 -0
  146. package/src/foundry/foundry.js/clientDocumentMixin.d.ts +45 -91
  147. package/src/foundry/foundry.js/clientDocuments/activeEffect.d.ts +3 -2
  148. package/src/foundry/foundry.js/clientDocuments/actor.d.ts +3 -7
  149. package/src/foundry/foundry.js/clientDocuments/canvasDocuments/ambientSoundDocument.d.ts +1 -6
  150. package/src/foundry/foundry.js/clientDocuments/canvasDocuments/tokenDocument.d.ts +1 -1
  151. package/src/foundry/foundry.js/clientDocuments/card.d.ts +133 -0
  152. package/src/foundry/foundry.js/clientDocuments/cards.d.ts +384 -0
  153. package/src/foundry/foundry.js/clientDocuments/chatMessage.d.ts +11 -10
  154. package/src/foundry/foundry.js/clientDocuments/combat.d.ts +4 -8
  155. package/src/foundry/foundry.js/clientDocuments/combatant.d.ts +1 -1
  156. package/src/foundry/foundry.js/clientDocuments/folder.d.ts +4 -6
  157. package/src/foundry/foundry.js/clientDocuments/index.d.ts +3 -0
  158. package/src/foundry/foundry.js/clientDocuments/item.d.ts +3 -4
  159. package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +4 -3
  160. package/src/foundry/foundry.js/clientDocuments/prototypeToken.d.ts +15 -0
  161. package/src/foundry/foundry.js/clientDocuments/rollTable.d.ts +1 -1
  162. package/src/foundry/foundry.js/clientDocuments/scene.d.ts +30 -23
  163. package/src/foundry/foundry.js/clientKeybindings.d.ts +299 -0
  164. package/src/foundry/foundry.js/clientSettings.d.ts +21 -6
  165. package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +45 -12
  166. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/cardStacks.d.ts +9 -0
  167. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/index.d.ts +1 -0
  168. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/playlists.d.ts +3 -2
  169. package/src/foundry/foundry.js/config.d.ts +467 -881
  170. package/src/foundry/foundry.js/dragDrop.d.ts +17 -14
  171. package/src/foundry/foundry.js/game.d.ts +171 -50
  172. package/src/foundry/foundry.js/gamepadManager.d.ts +41 -0
  173. package/src/foundry/foundry.js/globalVariables.d.ts +7 -4
  174. package/src/foundry/foundry.js/handlebarsHelpers.d.ts +4 -4
  175. package/src/foundry/foundry.js/hooks.d.ts +57 -0
  176. package/src/foundry/foundry.js/keyboardManager.d.ts +165 -213
  177. package/src/foundry/foundry.js/mouseInteractionManager.d.ts +78 -34
  178. package/src/foundry/foundry.js/mouseManager.d.ts +18 -0
  179. package/src/foundry/foundry.js/newUserExperience.d.ts +34 -0
  180. package/src/foundry/foundry.js/pixi/containers/cachedContainer.d.ts +8 -0
  181. package/src/foundry/foundry.js/pixi/containers/cachedContainers/index.d.ts +1 -0
  182. package/src/foundry/foundry.js/pixi/containers/cachedContainers/primaryCanvasGroup.d.ts +42 -0
  183. package/src/foundry/foundry.js/pixi/containers/canvasLayers/gridLayer.d.ts +2 -2
  184. package/src/foundry/foundry.js/pixi/containers/canvasLayers/index.d.ts +1 -1
  185. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayer.d.ts +5 -17
  186. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/wallsLayer.d.ts +4 -4
  187. package/src/foundry/foundry.js/pixi/containers/canvasLayers/{effectsLayer.d.ts → weatherLayer.d.ts} +7 -7
  188. package/src/foundry/foundry.js/pixi/containers/effectsCanvasGroup.d.ts +29 -0
  189. package/src/foundry/foundry.js/pixi/containers/index.d.ts +3 -0
  190. package/src/foundry/foundry.js/pixi/containers/interfaceCanvasGroup.d.ts +27 -0
  191. package/src/foundry/foundry.js/pixi/containers/placeableObject.d.ts +4 -1
  192. package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +1 -1
  193. package/src/foundry/foundry.js/pixi/containers/placeableObjects/wall.d.ts +1 -1
  194. package/src/foundry/foundry.js/pointSource.d.ts +174 -86
  195. package/src/foundry/foundry.js/roll.d.ts +25 -36
  196. package/src/foundry/foundry.js/rollTerm.d.ts +7 -4
  197. package/src/foundry/foundry.js/rollTerms/diceTerm.d.ts +4 -22
  198. package/src/foundry/foundry.js/rollTerms/mathTerm.d.ts +3 -0
  199. package/src/foundry/foundry.js/rollTerms/parentheticalTerm.d.ts +3 -0
  200. package/src/foundry/foundry.js/rollTerms/poolTerm.d.ts +3 -5
  201. package/src/foundry/foundry.js/rollTerms/stringTerm.d.ts +4 -1
  202. package/src/foundry/foundry.js/searchFilter.d.ts +1 -1
  203. package/src/foundry/foundry.js/textEditor.d.ts +40 -9
  204. package/src/foundry/index.d.ts +5 -0
  205. package/src/types/utils.d.ts +11 -3
  206. package/src/foundry/foundry.js/applications/formApplications/measuredTemplateConfig.d.ts +0 -61
  207. package/src/foundry/foundry.js/applications/formApplications/noteConfig.d.ts +0 -77
@@ -1,69 +1,146 @@
1
- import { ConfiguredFlags, FieldReturnType, PropertiesToSource } from '../../../../types/helperTypes';
1
+ import {
2
+ ConfiguredDocumentClass,
3
+ ConfiguredFlags,
4
+ FieldReturnType,
5
+ PropertiesToSource
6
+ } from '../../../../types/helperTypes';
2
7
  import DocumentData from '../../abstract/data.mjs';
3
- import * as fields from '../fields.mjs';
4
8
  import * as documents from '../../documents.mjs';
9
+ import * as fields from '../fields.mjs';
5
10
 
6
11
  interface UserDataSchema extends DocumentSchema {
7
- _id: typeof fields.DOCUMENT_ID;
8
- avatar: typeof fields.IMAGE_FIELD;
12
+ _id: fields.DocumentId;
13
+ avatar: fields.ImageField;
9
14
  character: fields.ForeignDocumentField<{ type: typeof documents.BaseActor; required: false }>;
10
- color: FieldReturnType<typeof fields.COLOR_FIELD, { required: true }>;
11
- hotbar: DocumentField<Record<number | string, string>> & {
15
+ color: FieldReturnType<fields.ColorField, { required: true }>;
16
+ hotbar: DocumentField<Record<number | `${number}`, string>> & {
12
17
  required: true;
13
- default: Record<never, never>;
18
+ default: Record<number | `${number}`, never>;
14
19
  validate: typeof _validateHotbar;
15
20
  validationError: 'Invalid User hotbar data structure';
16
21
  };
17
- name: typeof fields.REQUIRED_STRING;
18
- password: typeof fields.BLANK_STRING;
19
- passwordSalt: typeof fields.STRING_FIELD;
22
+ name: fields.RequiredString;
23
+ password: fields.BlankString;
24
+ passwordSalt: fields.StringField;
20
25
  permissions: FieldReturnType<
21
- typeof fields.DOCUMENT_PERMISSIONS,
26
+ fields.DocumentPermissions,
22
27
  {
23
- default: Record<never, never>;
28
+ default: Record<string, never>;
24
29
  validate: typeof _validatePermissions;
25
30
  }
26
31
  >;
27
- role: DocumentField<number> & {
32
+ role: DocumentField<foundry.CONST.USER_ROLES> & {
28
33
  required: true;
29
34
  nullable: false;
30
- default: typeof CONST.USER_ROLES.PLAYER;
35
+ default: typeof foundry.CONST.USER_ROLES.PLAYER;
31
36
  };
32
- flags: typeof fields.OBJECT_FIELD;
37
+ flags: fields.ObjectField;
33
38
  }
34
39
 
35
40
  interface UserDataProperties {
41
+ /**
42
+ * The _id which uniquely identifies this User document.
43
+ * @defaultValue `null`
44
+ */
36
45
  _id: string | null;
37
- avatar?: string | null;
46
+
47
+ /** The user's avatar image. */
48
+ avatar: string | null | undefined;
49
+
50
+ /** A linked Actor document that is this user's impersonated character. */
38
51
  character: string | null;
39
- color: string | null;
40
- hotbar: Record<number | string, string>;
52
+
53
+ /** A color to represent this user. */
54
+ color: string | null | undefined;
55
+
56
+ /**
57
+ * A mapping of hotbar slot number to Macro id that represents this user's hotbar
58
+ * configuration.
59
+ * @defaultValue `{}`
60
+ */
61
+ hotbar: Record<number | `${number}`, string>;
62
+
63
+ /** The user's name. */
41
64
  name: string;
65
+
66
+ /** @defaultValue `""` */
42
67
  password: string;
43
- passwordSalt?: string;
44
- permissions: Partial<Record<keyof typeof CONST.USER_PERMISSIONS, boolean>>;
45
- role: foundry.CONST.UserRole;
68
+
69
+ passwordSalt: string | undefined;
70
+
71
+ /**
72
+ * The user's individual permission configuration, see CONST.USER_PERMISSIONS.
73
+ * @defaultValue `{}`
74
+ */
75
+ permissions: Partial<Record<keyof typeof foundry.CONST.USER_PERMISSIONS, boolean>>;
76
+
77
+ /**
78
+ * The user's role, see CONST.USER_ROLES.
79
+ * @defaultValue `foundry.CONST.USER_ROLES.PLAYER`
80
+ */
81
+ role: foundry.CONST.USER_ROLES;
82
+
83
+ /**
84
+ * An object of optional key/value flags.
85
+ * @defaultValue `{}`
86
+ */
46
87
  flags: ConfiguredFlags<'User'>;
47
88
  }
48
89
 
49
90
  interface UserDataConstructorData {
50
- _id?: string | null;
51
- avatar?: string | null;
52
- character?: string | null;
53
- color?: string | null;
54
- hotbar?: Record<number | string, string> | null;
91
+ /**
92
+ * The _id which uniquely identifies this User document.
93
+ * @defaultValue `null`
94
+ */
95
+ _id?: string | null | undefined;
96
+
97
+ /** The user's avatar image. */
98
+ avatar?: string | null | undefined;
99
+
100
+ /** A linked Actor document that is this user's impersonated character. */
101
+ character?: InstanceType<ConfiguredDocumentClass<typeof documents.BaseActor>> | string | null | undefined;
102
+
103
+ /** A color to represent this user. */
104
+ color?: string | null | undefined;
105
+
106
+ /**
107
+ * A mapping of hotbar slot number to Macro id that represents this user's hotbar
108
+ * configuration.
109
+ * @defaultValue `{}`
110
+ */
111
+ hotbar?: Record<number | `${number}`, string> | null | undefined;
112
+
113
+ /** The user's name. */
55
114
  name: string;
56
- password?: string | null;
57
- passwordSalt?: string | null;
58
- permissions?: Partial<Record<keyof typeof CONST.USER_PERMISSIONS, boolean>> | null;
59
- role?: foundry.CONST.UserRole | null;
60
- flags?: ConfiguredFlags<'User'> | null;
115
+
116
+ /** @defaultValue `""` */
117
+ password?: string | null | undefined;
118
+
119
+ passwordSalt?: string | null | undefined;
120
+
121
+ /**
122
+ * The user's individual permission configuration, see CONST.USER_PERMISSIONS.
123
+ * @defaultValue `{}`
124
+ */
125
+ permissions?: Partial<Record<keyof typeof foundry.CONST.USER_PERMISSIONS, boolean>> | null | undefined;
126
+
127
+ /**
128
+ * The user's role, see CONST.USER_ROLES.
129
+ * @defaultValue `foundry.CONST.USER_ROLES.PLAYER`
130
+ */
131
+ role?: foundry.CONST.USER_ROLES | null | undefined;
132
+
133
+ /**
134
+ * An object of optional key/value flags.
135
+ * @defaultValue `{}`
136
+ */
137
+ flags?: ConfiguredFlags<'User'> | null | undefined;
61
138
  }
62
139
 
63
140
  /**
64
141
  * The data schema for a User document
65
142
  */
66
- export declare class UserData extends DocumentData<
143
+ export class UserData extends DocumentData<
67
144
  UserDataSchema,
68
145
  UserDataProperties,
69
146
  PropertiesToSource<UserDataProperties>,
@@ -72,11 +149,12 @@ export declare class UserData extends DocumentData<
72
149
  > {
73
150
  constructor(data: UserDataConstructorData, document?: documents.BaseUser | null);
74
151
 
152
+ /** @override */
75
153
  static defineSchema(): UserDataSchema;
76
154
  }
77
155
 
78
156
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
79
- export declare interface UserData extends UserDataProperties {}
157
+ export interface UserData extends UserDataProperties {}
80
158
 
81
159
  /**
82
160
  * Validate the structure of the User hotbar object
@@ -4,9 +4,9 @@ import { documents } from '../../module.mjs';
4
4
  import * as fields from '../fields.mjs';
5
5
 
6
6
  interface VideoDataSchema extends DocumentSchema {
7
- loop: FieldReturnType<typeof fields.BOOLEAN_FIELD, { default: true }>;
8
- autoplay: FieldReturnType<typeof fields.BOOLEAN_FIELD, { default: true }>;
9
- volume: FieldReturnType<typeof fields.ALPHA_FIELD, { default: 0 }>;
7
+ loop: FieldReturnType<fields.BooleanField, { default: true }>;
8
+ autoplay: FieldReturnType<fields.BooleanField, { default: true }>;
9
+ volume: FieldReturnType<fields.AlphaField, { default: 0 }>;
10
10
  }
11
11
 
12
12
  interface VideoDataProperties {
@@ -29,36 +29,37 @@ interface VideoDataProperties {
29
29
  volume: number;
30
30
  }
31
31
 
32
- export interface VideoDataConstructorData {
32
+ interface VideoDataConstructorData {
33
33
  /**
34
34
  * Automatically loop the video?
35
35
  * @defaultValue `true`
36
36
  */
37
- loop?: boolean | null;
37
+ loop?: boolean | null | undefined;
38
38
 
39
39
  /**
40
40
  * Should the video play automatically?
41
41
  * @defaultValue `true`
42
42
  */
43
- autoplay?: boolean | null;
43
+ autoplay?: boolean | null | undefined;
44
44
 
45
45
  /**
46
46
  * The volume level of any audio that the video file contains
47
47
  * @defaultValue `0`
48
48
  */
49
- volume?: number | null;
49
+ volume?: number | null | undefined;
50
50
  }
51
51
 
52
52
  /**
53
53
  * An inner-object which defines the schema for how Tile video backgrounds are managed
54
54
  */
55
- export declare class VideoData extends DocumentData<
55
+ export class VideoData extends DocumentData<
56
56
  VideoDataSchema,
57
57
  VideoDataProperties,
58
58
  PropertiesToSource<VideoDataProperties>,
59
59
  VideoDataConstructorData,
60
60
  documents.BaseTile
61
61
  > {
62
+ /** @override */
62
63
  static defineSchema(): VideoDataSchema;
63
64
 
64
65
  /** @override */
@@ -4,67 +4,76 @@ import * as documents from '../../documents.mjs';
4
4
  import * as fields from '../fields.mjs';
5
5
 
6
6
  interface WallDataSchema extends DocumentSchema {
7
- _id: typeof fields.DOCUMENT_ID;
7
+ _id: fields.DocumentId;
8
8
  c: DocumentField<[x0: number, y0: number, x1: number, y1: number]> & {
9
9
  type: [typeof Number];
10
10
  required: true;
11
11
  validate: (c: unknown) => c is [x0: number, y0: number, x1: number, y1: number];
12
12
  validationError: 'Invalid {name} coordinates provided which must be a length-4 array of finite numbers';
13
13
  };
14
+ light: FieldReturnType<
15
+ fields.RequiredNumber,
16
+ {
17
+ default: typeof foundry.CONST.WALL_SENSE_TYPES.NORMAL;
18
+ validate: (v: unknown) => v is foundry.CONST.WALL_SENSE_TYPES;
19
+ validationError: 'Invalid {name} {field} which must be a value in CONST.WALL_SENSE_TYPES';
20
+ }
21
+ >;
14
22
  move: FieldReturnType<
15
- typeof fields.REQUIRED_NUMBER,
23
+ fields.RequiredNumber,
16
24
  {
17
- default: typeof CONST.WALL_MOVEMENT_TYPES.NORMAL;
18
- validate: (v: unknown) => v is foundry.CONST.WallMovementType;
25
+ default: typeof foundry.CONST.WALL_MOVEMENT_TYPES.NORMAL;
26
+ validate: (v: unknown) => v is foundry.CONST.WALL_MOVEMENT_TYPES;
19
27
  validationError: 'Invalid {name} {field} which must be a value in CONST.WALL_MOVEMENT_TYPES';
20
28
  }
21
29
  >;
22
- sense: FieldReturnType<
23
- typeof fields.REQUIRED_NUMBER,
30
+ sight: FieldReturnType<
31
+ fields.RequiredNumber,
24
32
  {
25
- default: typeof CONST.WALL_SENSE_TYPES.NORMAL;
26
- validate: (v: unknown) => v is foundry.CONST.WallSenseType;
33
+ default: typeof foundry.CONST.WALL_SENSE_TYPES.NORMAL;
34
+ validate: (v: unknown) => v is foundry.CONST.WALL_SENSE_TYPES;
27
35
  validationError: 'Invalid {name} {field} which must be a value in CONST.WALL_SENSE_TYPES';
28
36
  }
29
37
  >;
30
38
  sound: FieldReturnType<
31
- typeof fields.REQUIRED_NUMBER,
39
+ fields.RequiredNumber,
32
40
  {
33
- default: typeof CONST.WALL_SENSE_TYPES.NORMAL;
34
- validate: (v: unknown) => v is foundry.CONST.WallSenseType;
41
+ default: typeof foundry.CONST.WALL_SENSE_TYPES.NORMAL;
42
+ validate: (v: unknown) => v is foundry.CONST.WALL_SENSE_TYPES;
35
43
  validationError: 'Invalid {name} {field} which must be a value in CONST.WALL_SENSE_TYPES';
36
44
  }
37
45
  >;
38
46
  dir: FieldReturnType<
39
- typeof fields.REQUIRED_NUMBER,
47
+ fields.RequiredNumber,
40
48
  {
41
- default: typeof CONST.WALL_DIRECTIONS.BOTH;
42
- validate: (v: unknown) => v is foundry.CONST.WallDirection;
49
+ default: typeof foundry.CONST.WALL_DIRECTIONS.BOTH;
50
+ validate: (v: unknown) => v is foundry.CONST.WALL_DIRECTIONS;
43
51
  validationError: 'Invalid {name} {field} which must be a value in CONST.WALL_DIRECTIONS';
44
52
  }
45
53
  >;
46
54
  door: FieldReturnType<
47
- typeof fields.REQUIRED_NUMBER,
55
+ fields.RequiredNumber,
48
56
  {
49
- default: typeof CONST.WALL_DOOR_TYPES.NONE;
50
- validate: (v: unknown) => v is foundry.CONST.WallDoorType;
57
+ default: typeof foundry.CONST.WALL_DOOR_TYPES.NONE;
58
+ validate: (v: unknown) => v is foundry.CONST.WALL_DOOR_TYPES;
51
59
  validationError: 'Invalid {name} {field} which must be a value in CONST.WALL_DOOR_TYPES';
52
60
  }
53
61
  >;
54
62
  ds: FieldReturnType<
55
- typeof fields.REQUIRED_NUMBER,
63
+ fields.RequiredNumber,
56
64
  {
57
- default: typeof CONST.WALL_DOOR_STATES.CLOSED;
58
- validate: (v: unknown) => v is foundry.CONST.WallDoorState;
65
+ default: typeof foundry.CONST.WALL_DOOR_STATES.CLOSED;
66
+ validate: (v: unknown) => v is foundry.CONST.WALL_DOOR_STATES;
59
67
  validationError: 'Invalid {name} {field} which must be a value in CONST.WALL_DOOR_STATES';
60
68
  }
61
69
  >;
62
- flags: typeof fields.OBJECT_FIELD;
70
+ flags: fields.ObjectField;
63
71
  }
64
72
 
65
73
  interface WallDataProperties {
66
74
  /**
67
75
  * The _id which uniquely identifies the embedded Wall document
76
+ * @defaultValue `null`
68
77
  */
69
78
  _id: string | null;
70
79
 
@@ -73,40 +82,47 @@ interface WallDataProperties {
73
82
  */
74
83
  c: [x0: number, y0: number, x1: number, y1: number];
75
84
 
85
+ /**
86
+ * The illumination restriction type of this wall
87
+ * @defaultValue `CONST.WALL_SENSE_TYPES.NORMAL`
88
+ */
89
+ light: foundry.CONST.WALL_SENSE_TYPES;
90
+
76
91
  /**
77
92
  * The movement restriction type of this wall
78
93
  * @defaultValue `CONST.WALL_MOVEMENT_TYPES.NORMAL`
79
94
  */
80
- move: foundry.CONST.WallMovementType;
95
+ move: foundry.CONST.WALL_MOVEMENT_TYPES;
81
96
 
82
97
  /**
83
- * The sensory restriction type of this wall
98
+ * The visual restriction type of this wall
84
99
  * @defaultValue `CONST.WALL_SENSE_TYPES.NORMAL`
85
100
  */
86
- sense: foundry.CONST.WallSenseType;
101
+ sight: foundry.CONST.WALL_SENSE_TYPES;
87
102
 
88
103
  /**
104
+ * The auditory restriction type of this wall
89
105
  * @defaultValue `CONST.WALL_SENSE_TYPES.NORMAL`
90
106
  */
91
- sound: foundry.CONST.WallSenseType;
107
+ sound: foundry.CONST.WALL_SENSE_TYPES;
92
108
 
93
109
  /**
94
110
  * The direction of effect imposed by this wall
95
111
  * @defaultValue `CONST.WALL_DIRECTIONS.BOTH`
96
112
  */
97
- dir: foundry.CONST.WallDirection;
113
+ dir: foundry.CONST.WALL_DIRECTIONS;
98
114
 
99
115
  /**
100
116
  * The type of door which this wall contains, if any
101
117
  * @defaultValue `CONST.WALL_DOOR_TYPES.NONE`
102
118
  */
103
- door: foundry.CONST.WallDoorType;
119
+ door: foundry.CONST.WALL_DOOR_TYPES;
104
120
 
105
121
  /**
106
122
  * The state of the door this wall contains, if any
107
123
  * @defaultValue `CONST.WALL_DOOR_STATES.CLOSED`
108
124
  */
109
- ds: foundry.CONST.WallDoorState;
125
+ ds: foundry.CONST.WALL_DOOR_STATES;
110
126
 
111
127
  /**
112
128
  * An object of optional key/value flags
@@ -118,61 +134,69 @@ interface WallDataProperties {
118
134
  interface WallDataConstructorData {
119
135
  /**
120
136
  * The _id which uniquely identifies the embedded Wall document
137
+ * @defaultValue `null`
121
138
  */
122
- _id?: string | null;
139
+ _id?: string | null | undefined;
123
140
 
124
141
  /**
125
142
  * The wall coordinates, a length-4 array of finite numbers [x0,y0,x1,y1]
126
143
  */
127
144
  c: [x0: number, y0: number, x1: number, y1: number];
128
145
 
146
+ /**
147
+ * The illumination restriction type of this wall
148
+ * @defaultValue `CONST.WALL_SENSE_TYPES.NORMAL`
149
+ */
150
+ light?: foundry.CONST.WALL_SENSE_TYPES | null | undefined;
151
+
129
152
  /**
130
153
  * The movement restriction type of this wall
131
154
  * @defaultValue `CONST.WALL_MOVEMENT_TYPES.NORMAL`
132
155
  */
133
- move?: foundry.CONST.WallMovementType | null;
156
+ move?: foundry.CONST.WALL_MOVEMENT_TYPES | null | undefined;
134
157
 
135
158
  /**
136
- * The sensory restriction type of this wall
159
+ * The visual restriction type of this wall
137
160
  * @defaultValue `CONST.WALL_SENSE_TYPES.NORMAL`
138
161
  */
139
- sense?: foundry.CONST.WallSenseType | null;
162
+ sight?: foundry.CONST.WALL_SENSE_TYPES | null | undefined;
140
163
 
141
164
  /**
165
+ * The auditory restriction type of this wall
142
166
  * @defaultValue `CONST.WALL_SENSE_TYPES.NORMAL`
143
167
  */
144
- sound?: foundry.CONST.WallSenseType | null;
168
+ sound?: foundry.CONST.WALL_SENSE_TYPES | null | undefined;
145
169
 
146
170
  /**
147
171
  * The direction of effect imposed by this wall
148
172
  * @defaultValue `CONST.WALL_DIRECTIONS.BOTH`
149
173
  */
150
- dir?: foundry.CONST.WallDirection | null;
174
+ dir?: foundry.CONST.WALL_DIRECTIONS | null | undefined;
151
175
 
152
176
  /**
153
177
  * The type of door which this wall contains, if any
154
178
  * @defaultValue `CONST.WALL_DOOR_TYPES.NONE`
155
179
  */
156
- door?: foundry.CONST.WallDoorType | null;
180
+ door?: foundry.CONST.WALL_DOOR_TYPES | null | undefined;
157
181
 
158
182
  /**
159
183
  * The state of the door this wall contains, if any
160
184
  * @defaultValue `CONST.WALL_DOOR_STATES.CLOSED`
161
185
  */
162
- ds?: foundry.CONST.WallDoorState | null;
186
+ ds?: foundry.CONST.WALL_DOOR_STATES | null | undefined;
163
187
 
164
188
  /**
165
189
  * An object of optional key/value flags
166
190
  * @defaultValue `{}`
167
191
  */
168
- flags?: ConfiguredFlags<'Wall'> | null;
192
+ flags?: ConfiguredFlags<'Wall'> | null | undefined;
169
193
  }
170
194
 
171
195
  /**
172
196
  * The data schema for a Wall document.
173
197
  * @see BaseWall
174
198
  */
175
- export declare class WallData extends DocumentData<
199
+ export class WallData extends DocumentData<
176
200
  WallDataSchema,
177
201
  WallDataProperties,
178
202
  PropertiesToSource<WallDataProperties>,
@@ -181,6 +205,7 @@ export declare class WallData extends DocumentData<
181
205
  > {
182
206
  /**
183
207
  * The data schema for a WallData object
208
+ * @override
184
209
  */
185
210
  static defineSchema(): WallDataSchema;
186
211
 
@@ -188,7 +213,10 @@ export declare class WallData extends DocumentData<
188
213
  * @remarks This override does not exist in foundry but is added here to prepend runtime errors.
189
214
  */
190
215
  constructor(data: WallDataConstructorData, document?: documents.BaseWall | null);
216
+
217
+ /** @override */
218
+ _initializeSource(data?: WallDataConstructorData): PropertiesToSource<WallDataProperties>;
191
219
  }
192
220
 
193
221
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
194
- export declare interface WallData extends WallDataProperties {}
222
+ export interface WallData extends WallDataProperties {}