@league-of-foundry-developers/foundry-vtt-types 0.8.9-6 → 9.238.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 (211) 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 +72 -66
  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/sceneControls.d.ts +13 -3
  128. package/src/foundry/foundry.js/applications/sceneNavigation.d.ts +90 -71
  129. package/src/foundry/foundry.js/applications/sidebarTab.d.ts +1 -1
  130. package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +7 -6
  131. package/src/foundry/foundry.js/applications/sidebarTabs/compendiumDirectory.d.ts +2 -2
  132. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/actorDirectory.d.ts +13 -56
  133. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/cardsDirectory.d.ts +7 -0
  134. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/index.d.ts +1 -0
  135. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/itemDirectory.d.ts +7 -30
  136. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/journalDirectory.d.ts +14 -34
  137. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/macroDirectory.d.ts +6 -52
  138. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/playlistDirectory.d.ts +2 -2
  139. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/sceneDirectory.d.ts +6 -23
  140. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +4 -6
  141. package/src/foundry/foundry.js/avSettings.d.ts +7 -7
  142. package/src/foundry/foundry.js/cameraPopoutAppWrapper.d.ts +12 -7
  143. package/src/foundry/foundry.js/canvas.d.ts +150 -47
  144. package/src/foundry/foundry.js/canvasAnimation.d.ts +1 -1
  145. package/src/foundry/foundry.js/canvasDocumentMixin.d.ts +7 -0
  146. package/src/foundry/foundry.js/clientDatabaseBackend.d.ts +210 -0
  147. package/src/foundry/foundry.js/clientDocumentMixin.d.ts +45 -91
  148. package/src/foundry/foundry.js/clientDocuments/activeEffect.d.ts +3 -2
  149. package/src/foundry/foundry.js/clientDocuments/actor.d.ts +3 -7
  150. package/src/foundry/foundry.js/clientDocuments/canvasDocuments/ambientSoundDocument.d.ts +1 -6
  151. package/src/foundry/foundry.js/clientDocuments/canvasDocuments/tokenDocument.d.ts +1 -1
  152. package/src/foundry/foundry.js/clientDocuments/card.d.ts +133 -0
  153. package/src/foundry/foundry.js/clientDocuments/cards.d.ts +384 -0
  154. package/src/foundry/foundry.js/clientDocuments/chatMessage.d.ts +11 -10
  155. package/src/foundry/foundry.js/clientDocuments/combat.d.ts +4 -8
  156. package/src/foundry/foundry.js/clientDocuments/combatant.d.ts +1 -1
  157. package/src/foundry/foundry.js/clientDocuments/folder.d.ts +4 -6
  158. package/src/foundry/foundry.js/clientDocuments/index.d.ts +3 -0
  159. package/src/foundry/foundry.js/clientDocuments/item.d.ts +3 -4
  160. package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +4 -3
  161. package/src/foundry/foundry.js/clientDocuments/prototypeToken.d.ts +15 -0
  162. package/src/foundry/foundry.js/clientDocuments/rollTable.d.ts +1 -1
  163. package/src/foundry/foundry.js/clientDocuments/scene.d.ts +30 -23
  164. package/src/foundry/foundry.js/clientKeybindings.d.ts +299 -0
  165. package/src/foundry/foundry.js/clientSettings.d.ts +21 -6
  166. package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +45 -12
  167. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/cardStacks.d.ts +9 -0
  168. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/index.d.ts +1 -0
  169. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/playlists.d.ts +3 -2
  170. package/src/foundry/foundry.js/config.d.ts +494 -902
  171. package/src/foundry/foundry.js/dragDrop.d.ts +17 -14
  172. package/src/foundry/foundry.js/game.d.ts +86 -11
  173. package/src/foundry/foundry.js/gamepadManager.d.ts +41 -0
  174. package/src/foundry/foundry.js/globalVariables.d.ts +7 -4
  175. package/src/foundry/foundry.js/handlebarsHelpers.d.ts +4 -4
  176. package/src/foundry/foundry.js/hooks.d.ts +57 -0
  177. package/src/foundry/foundry.js/keyboardManager.d.ts +165 -213
  178. package/src/foundry/foundry.js/mouseInteractionManager.d.ts +78 -34
  179. package/src/foundry/foundry.js/mouseManager.d.ts +18 -0
  180. package/src/foundry/foundry.js/newUserExperience.d.ts +34 -0
  181. package/src/foundry/foundry.js/pixi/containers/cachedContainer.d.ts +8 -0
  182. package/src/foundry/foundry.js/pixi/containers/cachedContainers/index.d.ts +1 -0
  183. package/src/foundry/foundry.js/pixi/containers/cachedContainers/primaryCanvasGroup.d.ts +42 -0
  184. package/src/foundry/foundry.js/pixi/containers/canvasLayer.d.ts +2 -1
  185. package/src/foundry/foundry.js/pixi/containers/canvasLayers/gridLayer.d.ts +2 -2
  186. package/src/foundry/foundry.js/pixi/containers/canvasLayers/index.d.ts +1 -1
  187. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayer.d.ts +10 -19
  188. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayers/backgroundLayer.d.ts +6 -2
  189. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayers/foregroundLayer.d.ts +2 -2
  190. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/wallsLayer.d.ts +4 -4
  191. package/src/foundry/foundry.js/pixi/containers/canvasLayers/{effectsLayer.d.ts → weatherLayer.d.ts} +7 -7
  192. package/src/foundry/foundry.js/pixi/containers/effectsCanvasGroup.d.ts +29 -0
  193. package/src/foundry/foundry.js/pixi/containers/index.d.ts +3 -0
  194. package/src/foundry/foundry.js/pixi/containers/interfaceCanvasGroup.d.ts +27 -0
  195. package/src/foundry/foundry.js/pixi/containers/placeableObject.d.ts +4 -1
  196. package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +1 -1
  197. package/src/foundry/foundry.js/pixi/containers/placeableObjects/wall.d.ts +1 -1
  198. package/src/foundry/foundry.js/pointSource.d.ts +174 -86
  199. package/src/foundry/foundry.js/roll.d.ts +25 -36
  200. package/src/foundry/foundry.js/rollTerm.d.ts +7 -4
  201. package/src/foundry/foundry.js/rollTerms/diceTerm.d.ts +4 -22
  202. package/src/foundry/foundry.js/rollTerms/mathTerm.d.ts +3 -0
  203. package/src/foundry/foundry.js/rollTerms/parentheticalTerm.d.ts +3 -0
  204. package/src/foundry/foundry.js/rollTerms/poolTerm.d.ts +3 -5
  205. package/src/foundry/foundry.js/rollTerms/stringTerm.d.ts +4 -1
  206. package/src/foundry/foundry.js/searchFilter.d.ts +1 -1
  207. package/src/foundry/foundry.js/textEditor.d.ts +40 -9
  208. package/src/foundry/index.d.ts +5 -0
  209. package/src/types/utils.d.ts +11 -3
  210. package/src/foundry/foundry.js/applications/formApplications/measuredTemplateConfig.d.ts +0 -61
  211. package/src/foundry/foundry.js/applications/formApplications/noteConfig.d.ts +0 -77
@@ -1,12 +1,12 @@
1
+ import { ConfiguredDocumentClass, FieldReturnType, PropertiesToSource } from '../../../../types/helperTypes';
1
2
  import DocumentData from '../../abstract/data.mjs';
2
- import { ForeignDocumentField } from '../fields.mjs';
3
- import * as fields from '../fields.mjs';
4
3
  import * as documents from '../../documents.mjs';
5
- import { ConfiguredDocumentClass, FieldReturnType, PropertiesToSource } from '../../../../types/helperTypes';
4
+ import * as fields from '../fields.mjs';
5
+ import { ForeignDocumentField } from '../fields.mjs';
6
6
  import { isBase64Image } from '../validators.mjs';
7
7
 
8
8
  interface FogExplorationDataSchema extends DocumentSchema {
9
- _id: typeof fields.DOCUMENT_ID;
9
+ _id: fields.DocumentId;
10
10
  scene: ForeignDocumentField<{ type: typeof documents.BaseScene }>;
11
11
  user: ForeignDocumentField<{ type: typeof documents.BaseUser }>;
12
12
  explored: DocumentField<string> & {
@@ -17,8 +17,8 @@ interface FogExplorationDataSchema extends DocumentSchema {
17
17
  validate: typeof isBase64Image;
18
18
  validationError: 'The provided FogExploration explored image is not a valid base64 image string';
19
19
  };
20
- positions: typeof fields.OBJECT_FIELD;
21
- timestamp: FieldReturnType<typeof fields.TIMESTAMP_FIELD, { required: true }>;
20
+ positions: fields.ObjectField;
21
+ timestamp: FieldReturnType<fields.TimestampField, { required: true }>;
22
22
  }
23
23
 
24
24
  interface FogExplorationDataProperties {
@@ -52,7 +52,10 @@ interface FogExplorationDataProperties {
52
52
  */
53
53
  positions: Record<string, { radius: number; limit: boolean }>;
54
54
 
55
- /** The timestamp at which this fog exploration was last updated */
55
+ /**
56
+ * The timestamp at which this fog exploration was last updated
57
+ * @defaultValue `Date.now()`
58
+ */
56
59
  timestamp: number;
57
60
  }
58
61
 
@@ -61,47 +64,51 @@ interface FogExplorationDataConstructorData {
61
64
  * The _id which uniquely identifies this FogExploration document
62
65
  * @defaultValue `null`
63
66
  */
64
- _id?: string | null;
67
+ _id?: string | null | undefined;
65
68
 
66
69
  /**
67
70
  * The _id of the Scene document to which this fog applies
68
71
  * @defaultValue `null`
69
72
  */
70
- scene?: string | null | InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseScene>>;
73
+ scene?: InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseScene>> | string | null | undefined;
71
74
 
72
75
  /**
73
76
  * The _id of the User document to which this fog applies
74
77
  * @defaultValue `null`
75
78
  */
76
- user?: string | null;
79
+ user?: InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseUser>> | string | null | undefined;
77
80
 
78
81
  /**
79
82
  * The base64 png image of the explored fog polygon
80
83
  * @defaultValue `null`
81
84
  */
82
- explored?: string | null;
85
+ explored?: string | null | undefined;
83
86
 
84
87
  /**
85
88
  * The object of scene positions which have been explored at a certain vision radius
86
89
  * @defaultValue `{}`
87
90
  */
88
- positions?: Record<string, { radius: number; limit: boolean }> | null;
91
+ positions?: Record<string, { radius: number; limit: boolean }> | null | undefined;
89
92
 
90
- /** The timestamp at which this fog exploration was last updated */
91
- timestamp?: number | null;
93
+ /**
94
+ * The timestamp at which this fog exploration was last updated
95
+ * @defaultValue `Date.now()`
96
+ */
97
+ timestamp?: number | null | undefined;
92
98
  }
93
99
 
94
100
  /**
95
101
  * The data schema for a FogExploration document.
96
102
  */
97
- export declare class FogExplorationData extends DocumentData<
103
+ export class FogExplorationData extends DocumentData<
98
104
  FogExplorationDataSchema,
99
105
  FogExplorationDataProperties,
100
106
  PropertiesToSource<FogExplorationDataProperties>,
101
107
  FogExplorationDataConstructorData
102
108
  > {
109
+ /** @override */
103
110
  static defineSchema(): FogExplorationDataSchema;
104
111
  }
105
112
 
106
113
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
107
- export declare interface FogExplorationData extends FogExplorationDataProperties {}
114
+ export interface FogExplorationData extends FogExplorationDataProperties {}
@@ -1,18 +1,18 @@
1
+ import { ConfiguredDocumentClass, ConfiguredFlags, PropertiesToSource } from '../../../../types/helperTypes';
1
2
  import DocumentData from '../../abstract/data.mjs';
2
- import * as fields from '../fields.mjs';
3
3
  import * as documents from '../../documents.mjs';
4
- import { ConfiguredFlags, PropertiesToSource } from '../../../../types/helperTypes';
4
+ import * as fields from '../fields.mjs';
5
5
 
6
6
  interface FolderDataSchema extends DocumentSchema {
7
- _id: typeof fields.DOCUMENT_ID;
8
- name: typeof fields.REQUIRED_STRING;
9
- type: DocumentField<foundry.CONST.FolderEntityTypes> & {
7
+ _id: fields.DocumentId;
8
+ name: fields.RequiredString;
9
+ type: DocumentField<foundry.CONST.FOLDER_DOCUMENT_TYPES> & {
10
10
  type: String;
11
11
  required: true;
12
- validate: (t: unknown) => t is foundry.CONST.FolderEntityTypes;
12
+ validate: (t: unknown) => t is foundry.CONST.FOLDER_DOCUMENT_TYPES;
13
13
  validationError: 'Invalid Folder type provided';
14
14
  };
15
- description: typeof fields.STRING_FIELD;
15
+ description: fields.StringField;
16
16
  parent: fields.ForeignDocumentField<{ type: typeof documents.BaseFolder }>;
17
17
  sorting: DocumentField<SortingModes> & {
18
18
  type: String;
@@ -21,14 +21,15 @@ interface FolderDataSchema extends DocumentSchema {
21
21
  validate: (mode: unknown) => mode is SortingModes;
22
22
  validationError: 'Invalid Folder sorting mode';
23
23
  };
24
- sort: typeof fields.INTEGER_SORT_FIELD;
25
- color: typeof fields.COLOR_FIELD;
26
- flags: typeof fields.OBJECT_FIELD;
24
+ sort: fields.IntegerSortField;
25
+ color: fields.ColorField;
26
+ flags: fields.ObjectField;
27
27
  }
28
28
 
29
29
  interface FolderDataProperties {
30
30
  /**
31
31
  * The _id which uniquely identifies this Folder document
32
+ * @defaultValue `null`
32
33
  */
33
34
  _id: string | null;
34
35
 
@@ -38,14 +39,14 @@ interface FolderDataProperties {
38
39
  name: string;
39
40
 
40
41
  /**
41
- * The document type which this Folder contains, from CONST.FOLDER_ENTITY_TYPES
42
+ * The document type which this Folder contains, from CONST.FOLDER_DOCUMENT_TYPES
42
43
  */
43
- type: foundry.CONST.FolderEntityTypes;
44
+ type: foundry.CONST.FOLDER_DOCUMENT_TYPES;
44
45
 
45
46
  /**
46
47
  * An HTML description of the contents of this folder
47
48
  */
48
- description?: string;
49
+ description?: string | undefined;
49
50
 
50
51
  /**
51
52
  * The _id of a parent Folder which contains this Folder
@@ -68,7 +69,7 @@ interface FolderDataProperties {
68
69
  /**
69
70
  * A color string used for the background color of this Folder
70
71
  */
71
- color?: string | null;
72
+ color: string | null | undefined;
72
73
 
73
74
  /**
74
75
  * An object of optional key/value flags
@@ -80,8 +81,9 @@ interface FolderDataProperties {
80
81
  interface FolderDataConstructorData {
81
82
  /**
82
83
  * The _id which uniquely identifies this Folder document
84
+ * @defaultValue `null`
83
85
  */
84
- _id?: string | null;
86
+ _id?: string | null | undefined;
85
87
 
86
88
  /**
87
89
  * The name of this Folder
@@ -89,49 +91,49 @@ interface FolderDataConstructorData {
89
91
  name: string;
90
92
 
91
93
  /**
92
- * The document type which this Folder contains, from CONST.FOLDER_ENTITY_TYPES
94
+ * The document type which this Folder contains, from CONST.FOLDER_DOCUMENT_TYPES
93
95
  */
94
- type: foundry.CONST.FolderEntityTypes;
96
+ type: foundry.CONST.FOLDER_DOCUMENT_TYPES;
95
97
 
96
98
  /**
97
99
  * An HTML description of the contents of this folder
98
100
  */
99
- description?: string | null;
101
+ description?: string | null | undefined;
100
102
 
101
103
  /**
102
104
  * The _id of a parent Folder which contains this Folder
103
105
  * @defaultValue `null`
104
106
  */
105
- parent?: string | null;
107
+ parent?: InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseFolder>> | string | null | undefined;
106
108
 
107
109
  /**
108
110
  * The sorting mode used to organize documents within this Folder, in ["a", "m"]
109
111
  * @defaultValue `'a'`
110
112
  */
111
- sorting?: SortingModes | null;
113
+ sorting?: SortingModes | null | undefined;
112
114
 
113
115
  /**
114
116
  * The numeric sort value which orders this Folder relative to its siblings
115
117
  * @defaultValue `0`
116
118
  */
117
- sort?: number | null;
119
+ sort?: number | null | undefined;
118
120
 
119
121
  /**
120
122
  * A color string used for the background color of this Folder
121
123
  */
122
- color?: string | null;
124
+ color?: string | null | undefined;
123
125
 
124
126
  /**
125
127
  * An object of optional key/value flags
126
128
  * @defaultValue `{}`
127
129
  */
128
- flags?: ConfiguredFlags<'Folder'> | null;
130
+ flags?: ConfiguredFlags<'Folder'> | null | undefined;
129
131
  }
130
132
 
131
133
  /**
132
134
  * The data schema for a Folder document.
133
135
  */
134
- export declare class FolderData extends DocumentData<
136
+ export class FolderData extends DocumentData<
135
137
  FolderDataSchema,
136
138
  FolderDataProperties,
137
139
  PropertiesToSource<FolderDataProperties>,
@@ -140,6 +142,7 @@ export declare class FolderData extends DocumentData<
140
142
  > {
141
143
  constructor(data: FolderDataConstructorData, document?: documents.BaseFolder | null);
142
144
 
145
+ /** @override */
143
146
  static defineSchema(): FolderDataSchema;
144
147
 
145
148
  static SORTING_MODES: ['a', 'm'];
@@ -148,4 +151,4 @@ export declare class FolderData extends DocumentData<
148
151
  export type SortingModes = ValueOf<typeof FolderData.SORTING_MODES>;
149
152
 
150
153
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
151
- export declare interface FolderData extends FolderDataProperties {}
154
+ export interface FolderData extends FolderDataProperties {}
@@ -1,8 +1,12 @@
1
1
  export { ActiveEffectData } from './activeEffectData';
2
2
  export { ActorData } from './actorData';
3
+ export { AdventureData } from './adventureData';
3
4
  export { AmbientLightData } from './ambientLightData';
4
5
  export { AmbientSoundData } from './ambientSoundData';
5
6
  export { ChatMessageData } from './chatMessageData';
7
+ export { CardData } from './cardData';
8
+ export { CardFaceData } from './cardFaceData';
9
+ export { CardsData } from './cardsData';
6
10
  export { CombatantData } from './combatantData';
7
11
  export { CombatData } from './combatData';
8
12
  export { DrawingData } from './drawingData';
@@ -10,6 +14,7 @@ export { FogExplorationData } from './fogExplorationData';
10
14
  export { FolderData } from './folderData';
11
15
  export { ItemData } from './itemData';
12
16
  export { JournalEntryData } from './journalEntryData';
17
+ export { LightData } from './lightData';
13
18
  export { MacroData } from './macroData';
14
19
  export { MeasuredTemplateData } from './measuredTemplateData';
15
20
  export { NoteData } from './noteData';
@@ -1,4 +1,3 @@
1
- import EmbeddedCollection from '../../abstract/embedded-collection.mjs';
2
1
  import {
3
2
  ConfiguredData,
4
3
  ConfiguredDocumentClass,
@@ -7,31 +6,33 @@ import {
7
6
  FieldReturnType,
8
7
  PropertiesToSource
9
8
  } from '../../../../types/helperTypes';
9
+ import EmbeddedCollection from '../../abstract/embedded-collection.mjs';
10
10
  import { DocumentData } from '../../abstract/module.mjs';
11
11
  import * as documents from '../../documents.mjs';
12
12
  import * as fields from '../fields.mjs';
13
13
 
14
14
  interface ItemDataSchema extends DocumentSchema {
15
- _id: typeof fields.DOCUMENT_ID;
16
- name: typeof fields.REQUIRED_STRING;
15
+ _id: fields.DocumentId;
16
+ name: fields.RequiredString;
17
17
  type: DocumentField<string> & {
18
18
  type: typeof String;
19
19
  required: true;
20
20
  validate: (t: unknown) => boolean;
21
21
  validationError: 'The provided Item type must be in the array of types defined by the game system';
22
22
  };
23
- img: FieldReturnType<typeof fields.IMAGE_FIELD, { default: () => string }>;
24
- data: FieldReturnType<typeof fields.OBJECT_FIELD, { default: (data: { type: string }) => any }>; // TODO
23
+ img: FieldReturnType<fields.ImageField, { default: () => typeof ItemData.DEFAULT_ICON }>;
24
+ data: fields.SystemDataField;
25
25
  effects: fields.EmbeddedCollectionField<typeof documents.BaseActiveEffect>;
26
26
  folder: fields.ForeignDocumentField<{ type: typeof documents.BaseFolder }>;
27
- sort: typeof fields.INTEGER_SORT_FIELD;
28
- permission: typeof fields.DOCUMENT_PERMISSIONS;
29
- flags: typeof fields.OBJECT_FIELD;
27
+ sort: fields.IntegerSortField;
28
+ permission: fields.DocumentPermissions;
29
+ flags: fields.ObjectField;
30
30
  }
31
31
 
32
32
  interface ItemDataBaseProperties {
33
33
  /**
34
34
  * The _id which uniquely identifies this Item document
35
+ * @defaultValue `null`
35
36
  */
36
37
  _id: string | null;
37
38
 
@@ -53,11 +54,13 @@ interface ItemDataBaseProperties {
53
54
 
54
55
  /**
55
56
  * The system data object which is defined by the system template.json model
57
+ * @defaultValue template from template.json for type or `{}`
56
58
  */
57
59
  data: object;
58
60
 
59
61
  /**
60
62
  * A collection of ActiveEffect embedded Documents
63
+ * @defaultValue `new EmbeddedCollection(ActiveEffectData, [], BaseActiveEffect.implementation)`
61
64
  */
62
65
  effects: EmbeddedCollection<ConfiguredDocumentClass<typeof documents.BaseActiveEffect>, ItemData>;
63
66
 
@@ -77,7 +80,7 @@ interface ItemDataBaseProperties {
77
80
  * An object which configures user permissions to this Item
78
81
  * @defaultValue `{ default: CONST.ENTITY_PERMISSIONS.NONE }`
79
82
  */
80
- permission: Partial<Record<string, foundry.CONST.EntityPermission>>;
83
+ permission: Partial<Record<string, foundry.CONST.DOCUMENT_PERMISSION_LEVELS>>;
81
84
 
82
85
  /**
83
86
  * An object of optional key/value flags
@@ -89,8 +92,9 @@ interface ItemDataBaseProperties {
89
92
  interface ItemDataConstructorData {
90
93
  /**
91
94
  * The _id which uniquely identifies this Item document
95
+ * @defaultValue `null`
92
96
  */
93
- _id?: string | null;
97
+ _id?: string | null | undefined;
94
98
 
95
99
  /**
96
100
  * The name of this Item
@@ -106,41 +110,43 @@ interface ItemDataConstructorData {
106
110
  * An image file path which provides the artwork for this Item
107
111
  * @defaultValue `ItemData.DEFAULT_ICON`
108
112
  */
109
- img?: string | null;
113
+ img?: string | null | undefined;
110
114
 
111
115
  /**
112
116
  * The system data object which is defined by the system template.json model
117
+ * @defaultValue template from template.json for type or `{}`
113
118
  */
114
- data?: DeepPartial<ItemDataSource['data']> | null;
119
+ data?: DeepPartial<ItemDataSource['data']> | null | undefined;
115
120
 
116
121
  /**
117
122
  * A collection of ActiveEffect embedded Documents
123
+ * @defaultValue `new EmbeddedCollection(ActiveEffectData, [], BaseActiveEffect.implementation)`
118
124
  */
119
- effects?: ConstructorParameters<ConfiguredDocumentClass<typeof documents.BaseActiveEffect>>[0][] | null;
125
+ effects?: ConstructorParameters<ConfiguredDocumentClass<typeof documents.BaseActiveEffect>>[0][] | null | undefined;
120
126
 
121
127
  /**
122
128
  * The _id of a Folder which contains this Item
123
129
  * @defaultValue `null`
124
130
  */
125
- folder?: string | null;
131
+ folder?: InstanceType<ConfiguredDocumentClass<typeof documents.BaseFolder>> | string | null | undefined;
126
132
 
127
133
  /**
128
134
  * The numeric sort value which orders this Item relative to its siblings
129
135
  * @defaultValue `0`
130
136
  */
131
- sort?: number | null;
137
+ sort?: number | null | undefined;
132
138
 
133
139
  /**
134
140
  * An object which configures user permissions to this Item
135
141
  * @defaultValue `{ default: CONST.ENTITY_PERMISSIONS.NONE }`
136
142
  */
137
- permission?: Partial<Record<string, foundry.CONST.EntityPermission>> | null;
143
+ permission?: Partial<Record<string, foundry.CONST.DOCUMENT_PERMISSION_LEVELS>> | null | undefined;
138
144
 
139
145
  /**
140
146
  * An object of optional key/value flags
141
147
  * @defaultValue `{}`
142
148
  */
143
- flags?: ConfiguredFlags<'Item'> | null;
149
+ flags?: ConfiguredFlags<'Item'> | null | undefined;
144
150
  }
145
151
 
146
152
  type ItemDataBaseSource = PropertiesToSource<ItemDataBaseProperties>;
@@ -152,6 +158,7 @@ type DocumentDataConstructor = Pick<typeof DocumentData, keyof typeof DocumentDa
152
158
  interface ItemDataConstructor extends DocumentDataConstructor {
153
159
  new (data: ItemDataConstructorData, document?: documents.BaseItem | null): ItemData;
154
160
 
161
+ /** @override */
155
162
  defineSchema(): ItemDataSchema;
156
163
 
157
164
  /**
@@ -173,6 +180,7 @@ export type ItemData = DocumentData<
173
180
  documents.BaseItem
174
181
  > &
175
182
  ItemDataProperties & {
183
+ /** @override */
176
184
  _initializeSource(data: ItemDataConstructorData): ItemDataSource;
177
185
  };
178
- export declare const ItemData: ItemDataConstructor;
186
+ export const ItemData: ItemDataConstructor;
@@ -1,17 +1,17 @@
1
+ import { ConfiguredDocumentClass, ConfiguredFlags, PropertiesToSource } from '../../../../types/helperTypes';
1
2
  import { DocumentData } from '../../abstract/module.mjs';
2
- import * as fields from '../fields.mjs';
3
3
  import * as documents from '../../documents.mjs';
4
- import { ConfiguredFlags, PropertiesToSource } from '../../../../types/helperTypes';
4
+ import * as fields from '../fields.mjs';
5
5
 
6
6
  interface JournalEntryDataSchema extends DocumentSchema {
7
- _id: typeof fields.DOCUMENT_ID;
8
- name: typeof fields.REQUIRED_STRING;
9
- content: typeof fields.BLANK_STRING;
10
- img: typeof fields.IMAGE_FIELD;
7
+ _id: fields.DocumentId;
8
+ name: fields.RequiredString;
9
+ content: fields.BlankString;
10
+ img: fields.ImageField;
11
11
  folder: fields.ForeignDocumentField<{ type: typeof documents.BaseFolder }>;
12
- sort: typeof fields.INTEGER_SORT_FIELD;
13
- permission: typeof fields.DOCUMENT_PERMISSIONS;
14
- flags: typeof fields.OBJECT_FIELD;
12
+ sort: fields.IntegerSortField;
13
+ permission: fields.DocumentPermissions;
14
+ flags: fields.ObjectField;
15
15
  }
16
16
 
17
17
  interface JournalEntryDataProperties {
@@ -28,7 +28,7 @@ interface JournalEntryDataProperties {
28
28
 
29
29
  /**
30
30
  * The HTML content of the JournalEntry
31
- * @defaultValue `''`
31
+ * @defaultValue `""`
32
32
  */
33
33
  content: string;
34
34
 
@@ -53,7 +53,7 @@ interface JournalEntryDataProperties {
53
53
  * An object which configures user permissions to this JournalEntry
54
54
  * @defaultValue `{ default: CONST.ENTITY_PERMISSIONS.NONE }`
55
55
  */
56
- permission: Partial<Record<string, foundry.CONST.EntityPermission>>;
56
+ permission: Partial<Record<string, foundry.CONST.DOCUMENT_PERMISSION_LEVELS>>;
57
57
 
58
58
  /**
59
59
  * An object of optional key/value flags
@@ -67,7 +67,7 @@ interface JournalEntryConstructorData {
67
67
  * The _id which uniquely identifies this JournalEntry document
68
68
  * @defaultValue `null`
69
69
  */
70
- _id?: string | null;
70
+ _id?: string | null | undefined;
71
71
 
72
72
  /**
73
73
  * The name of this JournalEntry
@@ -76,45 +76,45 @@ interface JournalEntryConstructorData {
76
76
 
77
77
  /**
78
78
  * The HTML content of the JournalEntry
79
- * @defaultValue `''`
79
+ * @defaultValue `""`
80
80
  */
81
- content?: string | null;
81
+ content?: string | null | undefined;
82
82
 
83
83
  /**
84
84
  * An image file path which provides the artwork for this JournalEntry
85
85
  */
86
- img?: string | null;
86
+ img?: string | null | undefined;
87
87
 
88
88
  /**
89
89
  * The _id of a Folder which contains this JournalEntry
90
90
  * @defaultValue `null`
91
91
  */
92
- folder?: string | null;
92
+ folder?: InstanceType<ConfiguredDocumentClass<typeof documents.BaseFolder>> | string | null | undefined;
93
93
 
94
94
  /**
95
95
  * The numeric sort value which orders this JournalEntry relative to its siblings
96
96
  * @defaultValue `0`
97
97
  */
98
- sort?: number | null;
98
+ sort?: number | null | undefined;
99
99
 
100
100
  /**
101
101
  * An object which configures user permissions to this JournalEntry
102
102
  * @defaultValue `{ default: CONST.ENTITY_PERMISSIONS.NONE }`
103
103
  */
104
- permission?: Partial<Record<string, foundry.CONST.EntityPermission>> | null;
104
+ permission?: Partial<Record<string, foundry.CONST.DOCUMENT_PERMISSION_LEVELS>> | null | undefined;
105
105
 
106
106
  /**
107
107
  * An object of optional key/value flags
108
108
  * @defaultValue `{}`
109
109
  */
110
- flags?: ConfiguredFlags<'JournalEntry'> | null;
110
+ flags?: ConfiguredFlags<'JournalEntry'> | null | undefined;
111
111
  }
112
112
 
113
113
  /**
114
114
  * The data schema for a JournalEntry document.
115
115
  * @see BaseJournalEntry
116
116
  */
117
- export declare class JournalEntryData extends DocumentData<
117
+ export class JournalEntryData extends DocumentData<
118
118
  JournalEntryDataSchema,
119
119
  JournalEntryDataProperties,
120
120
  PropertiesToSource<JournalEntryDataProperties>,
@@ -123,6 +123,7 @@ export declare class JournalEntryData extends DocumentData<
123
123
  > {
124
124
  constructor(data: JournalEntryConstructorData, document?: documents.BaseJournalEntry | null);
125
125
 
126
+ /** @override */
126
127
  static defineSchema(): JournalEntryDataSchema;
127
128
  }
128
129