@league-of-foundry-developers/foundry-vtt-types 0.8.9-9 → 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 (178) hide show
  1. package/README.md +44 -27
  2. package/index.d.ts +2 -2
  3. package/package.json +34 -15
  4. package/src/foundry/common/abstract/document.mjs.d.ts +24 -10
  5. package/src/foundry/common/config.mjs/index.d.ts +1 -0
  6. package/src/foundry/common/config.mjs/releaseData.d.ts +98 -0
  7. package/src/foundry/common/constants.mjs.d.ts +402 -213
  8. package/src/foundry/common/data/data.mjs/activeEffectData.d.ts +36 -29
  9. package/src/foundry/common/data/data.mjs/actorData.d.ts +32 -21
  10. package/src/foundry/common/data/data.mjs/adventureData.d.ts +165 -0
  11. package/src/foundry/common/data/data.mjs/ambientLightData.d.ts +45 -124
  12. package/src/foundry/common/data/data.mjs/ambientSoundData.d.ts +49 -77
  13. package/src/foundry/common/data/data.mjs/animationData.d.ts +17 -9
  14. package/src/foundry/common/data/data.mjs/cardData.d.ts +265 -0
  15. package/src/foundry/common/data/data.mjs/cardFaceData.d.ts +66 -0
  16. package/src/foundry/common/data/data.mjs/cardsData.d.ts +238 -0
  17. package/src/foundry/common/data/data.mjs/chatMessageData.d.ts +51 -39
  18. package/src/foundry/common/data/data.mjs/chatSpeakerData.d.ts +18 -11
  19. package/src/foundry/common/data/data.mjs/combatData.d.ts +51 -25
  20. package/src/foundry/common/data/data.mjs/combatantData.d.ts +48 -30
  21. package/src/foundry/common/data/data.mjs/darknessActivation.d.ts +8 -7
  22. package/src/foundry/common/data/data.mjs/drawingData.d.ts +68 -67
  23. package/src/foundry/common/data/data.mjs/effectChangeData.d.ts +21 -25
  24. package/src/foundry/common/data/data.mjs/effectDurationData.d.ts +24 -23
  25. package/src/foundry/common/data/data.mjs/fogExplorationData.d.ts +23 -16
  26. package/src/foundry/common/data/data.mjs/folderData.d.ts +28 -25
  27. package/src/foundry/common/data/data.mjs/index.d.ts +5 -0
  28. package/src/foundry/common/data/data.mjs/itemData.d.ts +26 -18
  29. package/src/foundry/common/data/data.mjs/journalEntryData.d.ts +21 -20
  30. package/src/foundry/common/data/data.mjs/lightData.d.ts +228 -0
  31. package/src/foundry/common/data/data.mjs/macroData.d.ts +52 -35
  32. package/src/foundry/common/data/data.mjs/measuredTemplateData.d.ts +41 -38
  33. package/src/foundry/common/data/data.mjs/noteData.d.ts +47 -37
  34. package/src/foundry/common/data/data.mjs/playlistData.d.ts +55 -26
  35. package/src/foundry/common/data/data.mjs/playlistSoundData.d.ts +32 -16
  36. package/src/foundry/common/data/data.mjs/prototypeTokenData.d.ts +7 -11
  37. package/src/foundry/common/data/data.mjs/rollTableData.d.ts +30 -24
  38. package/src/foundry/common/data/data.mjs/sceneData.d.ts +132 -111
  39. package/src/foundry/common/data/data.mjs/settingData.d.ts +11 -8
  40. package/src/foundry/common/data/data.mjs/tableResultData.d.ts +30 -26
  41. package/src/foundry/common/data/data.mjs/tileData.d.ts +43 -36
  42. package/src/foundry/common/data/data.mjs/tileOcclusion.d.ts +10 -9
  43. package/src/foundry/common/data/data.mjs/tokenBarData.d.ts +6 -3
  44. package/src/foundry/common/data/data.mjs/tokenData.d.ts +105 -157
  45. package/src/foundry/common/data/data.mjs/userData.d.ts +111 -33
  46. package/src/foundry/common/data/data.mjs/videoData.d.ts +9 -8
  47. package/src/foundry/common/data/data.mjs/wallData.d.ts +67 -39
  48. package/src/foundry/common/data/fields.mjs.d.ts +180 -83
  49. package/src/foundry/common/documents.mjs/baseActiveEffect.d.ts +9 -3
  50. package/src/foundry/common/documents.mjs/baseActor.d.ts +17 -45
  51. package/src/foundry/common/documents.mjs/baseAdventure.d.ts +38 -0
  52. package/src/foundry/common/documents.mjs/baseAmbientLight.d.ts +3 -0
  53. package/src/foundry/common/documents.mjs/baseAmbientSound.d.ts +3 -1
  54. package/src/foundry/common/documents.mjs/baseCard.d.ts +62 -0
  55. package/src/foundry/common/documents.mjs/baseCards.d.ts +39 -0
  56. package/src/foundry/common/documents.mjs/baseChatMessage.d.ts +3 -0
  57. package/src/foundry/common/documents.mjs/baseCombat.d.ts +5 -2
  58. package/src/foundry/common/documents.mjs/baseCombatant.d.ts +10 -1
  59. package/src/foundry/common/documents.mjs/baseDrawing.d.ts +11 -1
  60. package/src/foundry/common/documents.mjs/baseFogExploration.d.ts +4 -3
  61. package/src/foundry/common/documents.mjs/baseFolder.d.ts +10 -1
  62. package/src/foundry/common/documents.mjs/baseItem.d.ts +11 -29
  63. package/src/foundry/common/documents.mjs/baseJournalEntry.d.ts +3 -0
  64. package/src/foundry/common/documents.mjs/baseMacro.d.ts +16 -14
  65. package/src/foundry/common/documents.mjs/baseMeasuredTemplate.d.ts +4 -1
  66. package/src/foundry/common/documents.mjs/baseNote.d.ts +2 -2
  67. package/src/foundry/common/documents.mjs/basePlaylist.d.ts +1 -0
  68. package/src/foundry/common/documents.mjs/basePlaylistSound.d.ts +2 -1
  69. package/src/foundry/common/documents.mjs/baseRollTable.d.ts +3 -0
  70. package/src/foundry/common/documents.mjs/baseScene.d.ts +1 -0
  71. package/src/foundry/common/documents.mjs/baseSetting.d.ts +1 -0
  72. package/src/foundry/common/documents.mjs/baseTableResult.d.ts +10 -3
  73. package/src/foundry/common/documents.mjs/baseTile.d.ts +1 -0
  74. package/src/foundry/common/documents.mjs/baseToken.d.ts +3 -0
  75. package/src/foundry/common/documents.mjs/baseUser.d.ts +7 -1
  76. package/src/foundry/common/documents.mjs/baseWall.d.ts +7 -10
  77. package/src/foundry/common/documents.mjs/index.d.ts +3 -0
  78. package/src/foundry/common/module.mjs.d.ts +3 -0
  79. package/src/foundry/common/packages.mjs/moduleData.d.ts +12 -9
  80. package/src/foundry/common/packages.mjs/packageAuthorData.d.ts +24 -24
  81. package/src/foundry/common/packages.mjs/packageCompendiumData.d.ts +27 -21
  82. package/src/foundry/common/packages.mjs/packageData.d.ts +108 -82
  83. package/src/foundry/common/packages.mjs/packageDependencyData.d.ts +18 -11
  84. package/src/foundry/common/packages.mjs/packageLanguageData.d.ts +16 -15
  85. package/src/foundry/common/packages.mjs/systemData.d.ts +21 -20
  86. package/src/foundry/common/packages.mjs/tagPackageAvailability.d.ts +3 -3
  87. package/src/foundry/common/packages.mjs/worldData.d.ts +29 -18
  88. package/src/foundry/common/types.mjs.d.ts +95 -0
  89. package/src/foundry/common/utils/helpers.mjs.d.ts +27 -2
  90. package/src/foundry/common/utils/primitives.mjs.d.ts +99 -16
  91. package/src/foundry/foundry.js/application.d.ts +2 -2
  92. package/src/foundry/foundry.js/applications/filePicker.d.ts +1 -1
  93. package/src/foundry/foundry.js/applications/formApplication.d.ts +1 -1
  94. package/src/foundry/foundry.js/applications/formApplications/documentSheet.d.ts +1 -1
  95. package/src/foundry/foundry.js/applications/formApplications/documentSheets/activeEffectConfig.d.ts +1 -1
  96. package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +1 -1
  97. package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientLightConfig.d.ts +104 -0
  98. package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientSoundConfig.d.ts +1 -1
  99. package/src/foundry/foundry.js/applications/formApplications/documentSheets/folderConfig.d.ts +1 -1
  100. package/src/foundry/foundry.js/applications/formApplications/documentSheets/index.d.ts +1 -0
  101. package/src/foundry/foundry.js/applications/formApplications/documentSheets/lightConfig.d.ts +5 -79
  102. package/src/foundry/foundry.js/applications/formApplications/documentSheets/measuredTemplateConfig.d.ts +1 -1
  103. package/src/foundry/foundry.js/applications/formApplications/documentSheets/noteConfig.d.ts +2 -2
  104. package/src/foundry/foundry.js/applications/formApplications/documentSheets/permissionControl.d.ts +5 -5
  105. package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistConfig.d.ts +1 -1
  106. package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +5 -8
  107. package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts +3 -3
  108. package/src/foundry/foundry.js/applications/formApplications/documentSheets/tileConfig.d.ts +1 -1
  109. package/src/foundry/foundry.js/applications/formApplications/drawingConfig.d.ts +1 -1
  110. package/src/foundry/foundry.js/applications/formApplications/gridConfig.d.ts +1 -1
  111. package/src/foundry/foundry.js/applications/formApplications/imagePopout.d.ts +1 -1
  112. package/src/foundry/foundry.js/applications/formApplications/index.d.ts +1 -0
  113. package/src/foundry/foundry.js/applications/formApplications/keybindingsConfig.d.ts +257 -0
  114. package/src/foundry/foundry.js/applications/formApplications/tokenConfig.d.ts +8 -9
  115. package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +6 -6
  116. package/src/foundry/foundry.js/applications/sidebarTab.d.ts +1 -1
  117. package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +7 -6
  118. package/src/foundry/foundry.js/applications/sidebarTabs/compendiumDirectory.d.ts +2 -2
  119. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/cardsDirectory.d.ts +7 -0
  120. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/index.d.ts +1 -0
  121. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/playlistDirectory.d.ts +2 -2
  122. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +2 -2
  123. package/src/foundry/foundry.js/avSettings.d.ts +7 -7
  124. package/src/foundry/foundry.js/canvas.d.ts +148 -46
  125. package/src/foundry/foundry.js/canvasAnimation.d.ts +1 -1
  126. package/src/foundry/foundry.js/canvasDocumentMixin.d.ts +7 -0
  127. package/src/foundry/foundry.js/clientDocumentMixin.d.ts +45 -91
  128. package/src/foundry/foundry.js/clientDocuments/activeEffect.d.ts +3 -2
  129. package/src/foundry/foundry.js/clientDocuments/actor.d.ts +3 -7
  130. package/src/foundry/foundry.js/clientDocuments/canvasDocuments/ambientSoundDocument.d.ts +1 -6
  131. package/src/foundry/foundry.js/clientDocuments/card.d.ts +133 -0
  132. package/src/foundry/foundry.js/clientDocuments/cards.d.ts +384 -0
  133. package/src/foundry/foundry.js/clientDocuments/chatMessage.d.ts +11 -10
  134. package/src/foundry/foundry.js/clientDocuments/combat.d.ts +4 -8
  135. package/src/foundry/foundry.js/clientDocuments/combatant.d.ts +1 -1
  136. package/src/foundry/foundry.js/clientDocuments/folder.d.ts +4 -6
  137. package/src/foundry/foundry.js/clientDocuments/index.d.ts +2 -0
  138. package/src/foundry/foundry.js/clientDocuments/item.d.ts +3 -4
  139. package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +4 -3
  140. package/src/foundry/foundry.js/clientDocuments/rollTable.d.ts +1 -1
  141. package/src/foundry/foundry.js/clientDocuments/scene.d.ts +30 -23
  142. package/src/foundry/foundry.js/clientKeybindings.d.ts +299 -0
  143. package/src/foundry/foundry.js/clientSettings.d.ts +11 -9
  144. package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +1 -1
  145. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/cardStacks.d.ts +9 -0
  146. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/index.d.ts +1 -0
  147. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/playlists.d.ts +3 -2
  148. package/src/foundry/foundry.js/config.d.ts +465 -887
  149. package/src/foundry/foundry.js/game.d.ts +86 -11
  150. package/src/foundry/foundry.js/gamepadManager.d.ts +41 -0
  151. package/src/foundry/foundry.js/handlebarsHelpers.d.ts +4 -4
  152. package/src/foundry/foundry.js/hooks.d.ts +57 -0
  153. package/src/foundry/foundry.js/keyboardManager.d.ts +165 -213
  154. package/src/foundry/foundry.js/mouseManager.d.ts +18 -0
  155. package/src/foundry/foundry.js/newUserExperience.d.ts +34 -0
  156. package/src/foundry/foundry.js/pixi/containers/cachedContainer.d.ts +8 -0
  157. package/src/foundry/foundry.js/pixi/containers/cachedContainers/index.d.ts +1 -0
  158. package/src/foundry/foundry.js/pixi/containers/cachedContainers/primaryCanvasGroup.d.ts +42 -0
  159. package/src/foundry/foundry.js/pixi/containers/canvasLayers/gridLayer.d.ts +2 -2
  160. package/src/foundry/foundry.js/pixi/containers/canvasLayers/index.d.ts +1 -1
  161. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/wallsLayer.d.ts +3 -3
  162. package/src/foundry/foundry.js/pixi/containers/canvasLayers/{effectsLayer.d.ts → weatherLayer.d.ts} +7 -7
  163. package/src/foundry/foundry.js/pixi/containers/effectsCanvasGroup.d.ts +29 -0
  164. package/src/foundry/foundry.js/pixi/containers/index.d.ts +3 -0
  165. package/src/foundry/foundry.js/pixi/containers/interfaceCanvasGroup.d.ts +27 -0
  166. package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +1 -1
  167. package/src/foundry/foundry.js/pointSource.d.ts +2 -2
  168. package/src/foundry/foundry.js/roll.d.ts +25 -36
  169. package/src/foundry/foundry.js/rollTerm.d.ts +7 -4
  170. package/src/foundry/foundry.js/rollTerms/diceTerm.d.ts +4 -22
  171. package/src/foundry/foundry.js/rollTerms/mathTerm.d.ts +3 -0
  172. package/src/foundry/foundry.js/rollTerms/parentheticalTerm.d.ts +3 -0
  173. package/src/foundry/foundry.js/rollTerms/poolTerm.d.ts +3 -5
  174. package/src/foundry/foundry.js/rollTerms/stringTerm.d.ts +4 -1
  175. package/src/foundry/foundry.js/searchFilter.d.ts +1 -1
  176. package/src/foundry/foundry.js/textEditor.d.ts +1 -1
  177. package/src/foundry/index.d.ts +4 -0
  178. package/src/types/utils.d.ts +11 -3
@@ -13,14 +13,17 @@ export declare class BaseUser extends Document<data.UserData, null> {
13
13
  */
14
14
  readonly role: ValueOf<typeof CONST.USER_ROLES>;
15
15
 
16
+ /** @override */
16
17
  static get schema(): typeof data.UserData;
17
18
 
19
+ /** @override */
18
20
  static get metadata(): Merge<
19
21
  DocumentMetadata,
20
22
  {
21
23
  name: 'User';
22
24
  collection: 'users';
23
25
  label: 'DOCUMENT.User';
26
+ labelPlural: 'DOCUMENT.Users';
24
27
  isPrimary: true;
25
28
  }
26
29
  >;
@@ -42,7 +45,10 @@ export declare class BaseUser extends Document<data.UserData, null> {
42
45
  action: ValueOf<typeof CONST.USER_ROLES> | keyof typeof CONST.USER_ROLES | keyof typeof CONST.USER_PERMISSIONS
43
46
  ): boolean;
44
47
 
45
- getUserLevel(user: BaseUser): typeof CONST.ENTITY_PERMISSIONS.OWNER | typeof CONST.ENTITY_PERMISSIONS.NONE;
48
+ /** @override */
49
+ getUserLevel(
50
+ user: BaseUser
51
+ ): typeof CONST.DOCUMENT_PERMISSION_LEVELS.OWNER | typeof CONST.DOCUMENT_PERMISSION_LEVELS.NONE;
46
52
 
47
53
  /**
48
54
  * Test whether the User has at least a specific permission
@@ -1,10 +1,10 @@
1
- import { Context } from '../abstract/document.mjs';
2
- import { ConfiguredDocumentClass, ConstructorDataType } from '../../../types/helperTypes';
3
- import { DocumentMetadata } from '../abstract/document.mjs';
1
+ import { ConfiguredDocumentClass } from '../../../types/helperTypes';
2
+ import { Context, DocumentMetadata } from '../abstract/document.mjs';
4
3
  import { Document } from '../abstract/module.mjs';
4
+ import * as data from '../data/data.mjs';
5
+ import type { WallDataConstructorData } from '../data/data.mjs/wallData.js';
5
6
  import { BaseScene } from './baseScene';
6
7
  import { BaseUser } from './baseUser';
7
- import * as data from '../data/data.mjs';
8
8
 
9
9
  /**
10
10
  * The base Wall model definition which defines common behavior of an Wall document between both client and server.
@@ -14,7 +14,7 @@ export declare class BaseWall extends Document<data.WallData, InstanceType<Confi
14
14
  * @remarks This is not overridden in foundry but reflects the real behavior.
15
15
  */
16
16
  constructor(
17
- data: ConstructorDataType<data.WallData>,
17
+ data: WallDataConstructorData,
18
18
  context?: Context<InstanceType<ConfiguredDocumentClass<typeof BaseScene>>>
19
19
  );
20
20
 
@@ -28,6 +28,7 @@ export declare class BaseWall extends Document<data.WallData, InstanceType<Confi
28
28
  name: 'Wall';
29
29
  collection: 'walls';
30
30
  label: 'DOCUMENT.Wall';
31
+ labelPlural: 'DOCUMENT.Walls';
31
32
  isEmbedded: true;
32
33
  permissions: {
33
34
  update: typeof BaseWall._canUpdate;
@@ -38,9 +39,5 @@ export declare class BaseWall extends Document<data.WallData, InstanceType<Confi
38
39
  /**
39
40
  * Is a user able to update an existing Wall?
40
41
  */
41
- protected static _canUpdate(
42
- user: BaseUser,
43
- doc: BaseWall,
44
- data?: Partial<ConstructorDataType<data.WallData>>
45
- ): boolean;
42
+ protected static _canUpdate(user: BaseUser, doc: BaseWall, data?: Partial<WallDataConstructorData>): boolean;
46
43
  }
@@ -1,7 +1,10 @@
1
1
  export { BaseActiveEffect } from './baseActiveEffect';
2
2
  export { BaseActor } from './baseActor';
3
+ export { BaseAdventure } from './baseAdventure';
3
4
  export { BaseAmbientLight } from './baseAmbientLight';
4
5
  export { BaseAmbientSound } from './baseAmbientSound';
6
+ export { BaseCard } from './baseCard';
7
+ export { BaseCards } from './baseCards';
5
8
  export { BaseCombat } from './baseCombat';
6
9
  export { BaseCombatant } from './baseCombatant';
7
10
  export { BaseChatMessage } from './baseChatMessage';
@@ -6,6 +6,7 @@ import * as _data from './data/module.mjs';
6
6
  import * as _documents from './documents.mjs';
7
7
  import * as _packages from './packages.mjs';
8
8
  import * as _utils from './utils/module.mjs';
9
+ import * as _config from './config.mjs';
9
10
 
10
11
  /**
11
12
  * Constant definitions used throughout the Foundry Virtual Tabletop framework.
@@ -68,6 +69,8 @@ declare global {
68
69
  * Package data definitions, validations, and schema
69
70
  */
70
71
  export import packages = _packages; // eslint-disable-line @typescript-eslint/no-unused-vars
72
+
73
+ export import config = _config; // eslint-disable-line @typescript-eslint/no-unused-vars
71
74
  }
72
75
 
73
76
  /**
@@ -2,19 +2,20 @@ import * as fields from '../data/fields.mjs';
2
2
  import { PackageData, PackageDataConstructorData, PackageDataProperties, PackageDataSchema } from './packageData';
3
3
 
4
4
  interface ModuleDataSchema extends PackageDataSchema {
5
- coreTranslation: typeof fields.BOOLEAN_FIELD;
6
- minimumSystemVersion: typeof fields.STRING_FIELD;
7
- library: typeof fields.BOOLEAN_FIELD;
5
+ coreTranslation: fields.BooleanField;
6
+ minimumSystemVersion: fields.StringField;
7
+ library: fields.BooleanField;
8
8
  }
9
9
 
10
10
  interface ModuleDataProperties extends PackageDataProperties {
11
11
  /**
12
12
  * Does this module provide a translation for the core software?
13
+ * @defaultValue `false`
13
14
  */
14
15
  coreTranslation: boolean;
15
16
 
16
17
  /** A minimum version number of the game system that this module requires */
17
- minimumSystemVersion?: string;
18
+ minimumSystemVersion: string | undefined;
18
19
 
19
20
  /**
20
21
  * A library module provides no user-facing functionality and is solely for
@@ -27,27 +28,29 @@ interface ModuleDataProperties extends PackageDataProperties {
27
28
  interface ModuleDataConstructorData extends PackageDataConstructorData {
28
29
  /**
29
30
  * Does this module provide a translation for the core software?
31
+ * @defaultValue `false`
30
32
  */
31
- coreTranslation?: boolean | null;
33
+ coreTranslation?: boolean | null | undefined;
32
34
 
33
35
  /** A minimum version number of the game system that this module requires */
34
- minimumSystemVersion?: string | null;
36
+ minimumSystemVersion?: string | null | undefined;
35
37
 
36
38
  /**
37
39
  * A library module provides no user-facing functionality and is solely for
38
40
  * use by other modules. Loaded before any system or module scripts.
39
41
  * @defaultValue `false`
40
42
  */
41
- library?: boolean | null;
43
+ library?: boolean | null | undefined;
42
44
  }
43
45
 
44
46
  /**
45
47
  * The data schema used to define Module manifest files.
46
48
  * Extends the basic PackageData schema with some additional module-specific fields.
47
49
  */
48
- export declare class ModuleData extends PackageData<ModuleDataSchema, ModuleDataProperties, ModuleDataConstructorData> {
50
+ export class ModuleData extends PackageData<ModuleDataSchema, ModuleDataProperties, ModuleDataConstructorData> {
51
+ /** @override */
49
52
  static defineSchema(): ModuleDataSchema;
50
53
  }
51
54
 
52
55
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
53
- export declare interface ModuleData extends ModuleDataProperties {}
56
+ export interface ModuleData extends ModuleDataProperties {}
@@ -3,53 +3,53 @@ import { DocumentData } from '../abstract/module.mjs';
3
3
  import * as fields from '../data/fields.mjs';
4
4
 
5
5
  interface PackageAuthorDataSchema extends DocumentSchema {
6
- name: typeof fields.REQUIRED_STRING;
7
- email: typeof fields.STRING_FIELD;
8
- url: typeof fields.STRING_FIELD;
9
- discord: typeof fields.STRING_FIELD;
6
+ name: fields.RequiredString;
7
+ email: fields.StringField;
8
+ url: fields.StringField;
9
+ discord: fields.StringField;
10
10
  }
11
11
 
12
12
  interface PackageAuthorDataProperties {
13
- /**
14
- * The author name
15
- */
13
+ /** The author name */
16
14
  name: string;
17
15
 
18
- /**
19
- * The author email address
20
- */
21
- email?: string;
16
+ /** The author email address */
17
+ email: string | undefined;
22
18
 
23
- /**
24
- * A website url for the author
25
- */
26
- url?: string;
19
+ /** A website url for the author */
20
+ url: string | undefined;
27
21
 
28
- /**
29
- * A Discord username for the author
30
- */
31
- discord?: string;
22
+ /** A Discord username for the author */
23
+ discord: string | undefined;
32
24
  }
33
25
 
34
26
  interface PackageAuthorDataConstructorData {
27
+ /** The author name */
35
28
  name: string;
36
- email?: string | null;
37
- url?: string | null;
38
- discord?: string | null;
29
+
30
+ /** The author email address */
31
+ email?: string | null | undefined;
32
+
33
+ /** A website url for the author */
34
+ url?: string | null | undefined;
35
+
36
+ /** A Discord username for the author */
37
+ discord?: string | null | undefined;
39
38
  }
40
39
 
41
40
  /**
42
41
  * An inner data object which represents a single package author in the authors array.
43
42
  */
44
- export declare class PackageAuthorData extends DocumentData<
43
+ export class PackageAuthorData extends DocumentData<
45
44
  PackageAuthorDataSchema,
46
45
  PackageAuthorDataProperties,
47
46
  PropertiesToSource<PackageAuthorDataProperties>,
48
47
  PackageAuthorDataConstructorData,
49
48
  null
50
49
  > {
51
- constructor(data?: DeepPartial<PropertiesToSource<PackageAuthorDataProperties>>, document?: null);
50
+ constructor(data?: PackageAuthorDataConstructorData, document?: null);
52
51
 
52
+ /** @override */
53
53
  static defineSchema(): PackageAuthorDataSchema;
54
54
  }
55
55
 
@@ -3,23 +3,19 @@ import { DocumentData } from '../abstract/module.mjs';
3
3
  import * as fields from '../data/fields.mjs';
4
4
 
5
5
  interface PackageCompendiumDataSchema extends DocumentSchema {
6
- name: typeof fields.REQUIRED_STRING;
7
- label: typeof fields.REQUIRED_STRING;
8
- path: typeof fields.REQUIRED_STRING;
9
- private: FieldReturnType<
10
- typeof fields.BOOLEAN_FIELD,
6
+ name: fields.RequiredString;
7
+ label: fields.RequiredString;
8
+ path: fields.RequiredString;
9
+ private: FieldReturnType<fields.BooleanField, { default: false }>;
10
+ entity: fields.StringField;
11
+ type: FieldReturnType<
12
+ fields.RequiredString,
11
13
  {
12
- default: false;
14
+ validate: (v: string) => v is foundry.CONST.COMPENDIUM_DOCUMENT_TYPES;
15
+ validationError: 'Invalid package compendium document type provided which must be a value in CONST.COMPENDIUM_DOCUMENT_TYPES';
13
16
  }
14
17
  >;
15
- entity: FieldReturnType<
16
- typeof fields.REQUIRED_STRING,
17
- {
18
- validate: (v: string) => v is foundry.CONST.CompendiumEntityType;
19
- validationError: 'Invalid package compendium entity type provided which must be a value in CONST.COMPENDIUM_ENTITY_TYPES';
20
- }
21
- >;
22
- system: typeof fields.STRING_FIELD;
18
+ system: fields.StringField;
23
19
  }
24
20
 
25
21
  interface PackageCompendiumDataProperties {
@@ -32,13 +28,16 @@ interface PackageCompendiumDataProperties {
32
28
  /** The local relative path to the compendium source .db file. The filename should match the name attribute. */
33
29
  path: string;
34
30
 
31
+ /** @defaultValue `false` */
35
32
  private: boolean;
36
33
 
34
+ entity: string | undefined;
35
+
37
36
  /** The specific document type that is contained within this compendium pack */
38
- entity: foundry.CONST.CompendiumEntityType;
37
+ type: foundry.CONST.COMPENDIUM_DOCUMENT_TYPES;
39
38
 
40
39
  /** Denote that this compendium pack requires a specific game system to function properly. */
41
- system?: string;
40
+ system: string | undefined;
42
41
  }
43
42
 
44
43
  interface PackageCompendiumDataConstructorData {
@@ -51,26 +50,33 @@ interface PackageCompendiumDataConstructorData {
51
50
  /** The local relative path to the compendium source .db file. The filename should match the name attribute. */
52
51
  path: string;
53
52
 
54
- private?: boolean | null;
53
+ /** @defaultValue `false` */
54
+ private?: boolean | null | undefined;
55
+
56
+ entity?: string | null | undefined;
55
57
 
56
58
  /** The specific document type that is contained within this compendium pack */
57
- entity: foundry.CONST.CompendiumEntityType;
59
+ type: foundry.CONST.COMPENDIUM_DOCUMENT_TYPES;
58
60
 
59
61
  /** Denote that this compendium pack requires a specific game system to function properly. */
60
- system?: string;
62
+ system?: string | null | undefined;
61
63
  }
62
64
 
63
65
  /**
64
66
  * An inner data object which represents a single compendium pack definition provided by a package in the packs array.
65
67
  */
66
- export declare class PackageCompendiumData extends DocumentData<
68
+ export class PackageCompendiumData extends DocumentData<
67
69
  PackageCompendiumDataSchema,
68
70
  PackageCompendiumDataProperties,
69
71
  PropertiesToSource<PackageCompendiumDataProperties>,
70
72
  PackageCompendiumDataConstructorData
71
73
  > {
74
+ /** @override */
72
75
  static defineSchema(): PackageCompendiumDataSchema;
76
+
77
+ /** @override */
78
+ _initializeSource(data: PackageCompendiumDataConstructorData): PropertiesToSource<PackageCompendiumDataProperties>;
73
79
  }
74
80
 
75
81
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
76
- export declare interface PackageCompendiumData extends PackageCompendiumDataProperties {}
82
+ export interface PackageCompendiumData extends PackageCompendiumDataProperties {}