@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.
- package/README.md +44 -27
- package/index-lenient.d.ts +10 -0
- package/index.d.ts +2 -2
- package/package.json +43 -15
- package/src/foundry/common/abstract/backend.mjs.d.ts +14 -15
- package/src/foundry/common/abstract/document.mjs.d.ts +30 -12
- package/src/foundry/common/config.mjs/index.d.ts +1 -0
- package/src/foundry/common/config.mjs/releaseData.d.ts +98 -0
- package/src/foundry/common/constants.mjs.d.ts +402 -213
- package/src/foundry/common/data/data.mjs/activeEffectData.d.ts +36 -29
- package/src/foundry/common/data/data.mjs/actorData.d.ts +32 -21
- package/src/foundry/common/data/data.mjs/adventureData.d.ts +165 -0
- package/src/foundry/common/data/data.mjs/ambientLightData.d.ts +45 -124
- package/src/foundry/common/data/data.mjs/ambientSoundData.d.ts +49 -77
- package/src/foundry/common/data/data.mjs/animationData.d.ts +17 -9
- package/src/foundry/common/data/data.mjs/cardData.d.ts +265 -0
- package/src/foundry/common/data/data.mjs/cardFaceData.d.ts +66 -0
- package/src/foundry/common/data/data.mjs/cardsData.d.ts +238 -0
- package/src/foundry/common/data/data.mjs/chatMessageData.d.ts +51 -39
- package/src/foundry/common/data/data.mjs/chatSpeakerData.d.ts +18 -11
- package/src/foundry/common/data/data.mjs/combatData.d.ts +51 -25
- package/src/foundry/common/data/data.mjs/combatantData.d.ts +48 -30
- package/src/foundry/common/data/data.mjs/darknessActivation.d.ts +8 -7
- package/src/foundry/common/data/data.mjs/drawingData.d.ts +72 -66
- package/src/foundry/common/data/data.mjs/effectChangeData.d.ts +21 -25
- package/src/foundry/common/data/data.mjs/effectDurationData.d.ts +24 -23
- package/src/foundry/common/data/data.mjs/fogExplorationData.d.ts +23 -16
- package/src/foundry/common/data/data.mjs/folderData.d.ts +28 -25
- package/src/foundry/common/data/data.mjs/index.d.ts +5 -0
- package/src/foundry/common/data/data.mjs/itemData.d.ts +26 -18
- package/src/foundry/common/data/data.mjs/journalEntryData.d.ts +21 -20
- package/src/foundry/common/data/data.mjs/lightData.d.ts +228 -0
- package/src/foundry/common/data/data.mjs/macroData.d.ts +52 -35
- package/src/foundry/common/data/data.mjs/measuredTemplateData.d.ts +41 -38
- package/src/foundry/common/data/data.mjs/noteData.d.ts +47 -37
- package/src/foundry/common/data/data.mjs/playlistData.d.ts +55 -26
- package/src/foundry/common/data/data.mjs/playlistSoundData.d.ts +32 -16
- package/src/foundry/common/data/data.mjs/prototypeTokenData.d.ts +7 -11
- package/src/foundry/common/data/data.mjs/rollTableData.d.ts +30 -24
- package/src/foundry/common/data/data.mjs/sceneData.d.ts +132 -111
- package/src/foundry/common/data/data.mjs/settingData.d.ts +11 -8
- package/src/foundry/common/data/data.mjs/tableResultData.d.ts +30 -26
- package/src/foundry/common/data/data.mjs/tileData.d.ts +43 -36
- package/src/foundry/common/data/data.mjs/tileOcclusion.d.ts +10 -9
- package/src/foundry/common/data/data.mjs/tokenBarData.d.ts +6 -3
- package/src/foundry/common/data/data.mjs/tokenData.d.ts +105 -157
- package/src/foundry/common/data/data.mjs/userData.d.ts +111 -33
- package/src/foundry/common/data/data.mjs/videoData.d.ts +9 -8
- package/src/foundry/common/data/data.mjs/wallData.d.ts +67 -39
- package/src/foundry/common/data/fields.mjs.d.ts +180 -83
- package/src/foundry/common/documents.mjs/baseActiveEffect.d.ts +9 -3
- package/src/foundry/common/documents.mjs/baseActor.d.ts +17 -45
- package/src/foundry/common/documents.mjs/baseAdventure.d.ts +38 -0
- package/src/foundry/common/documents.mjs/baseAmbientLight.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseAmbientSound.d.ts +3 -1
- package/src/foundry/common/documents.mjs/baseCard.d.ts +62 -0
- package/src/foundry/common/documents.mjs/baseCards.d.ts +39 -0
- package/src/foundry/common/documents.mjs/baseChatMessage.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseCombat.d.ts +5 -2
- package/src/foundry/common/documents.mjs/baseCombatant.d.ts +10 -1
- package/src/foundry/common/documents.mjs/baseDrawing.d.ts +11 -1
- package/src/foundry/common/documents.mjs/baseFogExploration.d.ts +4 -3
- package/src/foundry/common/documents.mjs/baseFolder.d.ts +10 -1
- package/src/foundry/common/documents.mjs/baseItem.d.ts +11 -29
- package/src/foundry/common/documents.mjs/baseJournalEntry.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseMacro.d.ts +16 -14
- package/src/foundry/common/documents.mjs/baseMeasuredTemplate.d.ts +4 -1
- package/src/foundry/common/documents.mjs/baseNote.d.ts +2 -2
- package/src/foundry/common/documents.mjs/basePlaylist.d.ts +1 -0
- package/src/foundry/common/documents.mjs/basePlaylistSound.d.ts +2 -1
- package/src/foundry/common/documents.mjs/baseRollTable.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseScene.d.ts +1 -0
- package/src/foundry/common/documents.mjs/baseSetting.d.ts +1 -0
- package/src/foundry/common/documents.mjs/baseTableResult.d.ts +10 -3
- package/src/foundry/common/documents.mjs/baseTile.d.ts +1 -0
- package/src/foundry/common/documents.mjs/baseToken.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseUser.d.ts +7 -1
- package/src/foundry/common/documents.mjs/baseWall.d.ts +7 -10
- package/src/foundry/common/documents.mjs/index.d.ts +3 -0
- package/src/foundry/common/module.mjs.d.ts +3 -0
- package/src/foundry/common/packages.mjs/moduleData.d.ts +12 -9
- package/src/foundry/common/packages.mjs/packageAuthorData.d.ts +24 -24
- package/src/foundry/common/packages.mjs/packageCompendiumData.d.ts +27 -21
- package/src/foundry/common/packages.mjs/packageData.d.ts +108 -82
- package/src/foundry/common/packages.mjs/packageDependencyData.d.ts +18 -11
- package/src/foundry/common/packages.mjs/packageLanguageData.d.ts +16 -15
- package/src/foundry/common/packages.mjs/systemData.d.ts +21 -20
- package/src/foundry/common/packages.mjs/tagPackageAvailability.d.ts +3 -3
- package/src/foundry/common/packages.mjs/worldData.d.ts +29 -18
- package/src/foundry/common/types.mjs.d.ts +100 -0
- package/src/foundry/common/utils/helpers.mjs.d.ts +27 -2
- package/src/foundry/common/utils/primitives.mjs.d.ts +99 -16
- package/src/foundry/foundry.js/application.d.ts +4 -7
- package/src/foundry/foundry.js/applications/cameraViews.d.ts +36 -31
- package/src/foundry/foundry.js/applications/compendium.d.ts +5 -2
- package/src/foundry/foundry.js/applications/filePicker.d.ts +116 -116
- package/src/foundry/foundry.js/applications/formApplication.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/combatTrackerConfig.d.ts +20 -27
- package/src/foundry/foundry.js/applications/formApplications/defaultTokenConfig.d.ts +66 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheet.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/activeEffectConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +6 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientLightConfig.d.ts +104 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientSoundConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/{folderConfig.d.ts → documentSheets/folderConfig.d.ts} +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/index.d.ts +4 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/lightConfig.d.ts +5 -79
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/measuredTemplateConfig.d.ts +60 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/noteConfig.d.ts +72 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/permissionControl.d.ts +5 -5
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +187 -148
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts +133 -110
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/tileConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/drawingConfig.d.ts +93 -95
- package/src/foundry/foundry.js/applications/formApplications/entitySheetConfig.d.ts +163 -147
- package/src/foundry/foundry.js/applications/formApplications/gridConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/imagePopout.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/index.d.ts +2 -3
- package/src/foundry/foundry.js/applications/formApplications/keybindingsConfig.d.ts +257 -0
- package/src/foundry/foundry.js/applications/formApplications/moduleManagement.d.ts +41 -23
- package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +95 -86
- package/src/foundry/foundry.js/applications/formApplications/tokenConfig.d.ts +142 -155
- package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +60 -70
- package/src/foundry/foundry.js/applications/formApplications/worldConfig.d.ts +25 -17
- package/src/foundry/foundry.js/applications/hotbar.d.ts +5 -4
- package/src/foundry/foundry.js/applications/sceneControls.d.ts +13 -3
- package/src/foundry/foundry.js/applications/sceneNavigation.d.ts +90 -71
- package/src/foundry/foundry.js/applications/sidebarTab.d.ts +1 -1
- package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +7 -6
- package/src/foundry/foundry.js/applications/sidebarTabs/compendiumDirectory.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/actorDirectory.d.ts +13 -56
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/cardsDirectory.d.ts +7 -0
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/index.d.ts +1 -0
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/itemDirectory.d.ts +7 -30
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/journalDirectory.d.ts +14 -34
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/macroDirectory.d.ts +6 -52
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/playlistDirectory.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/sceneDirectory.d.ts +6 -23
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +4 -6
- package/src/foundry/foundry.js/avSettings.d.ts +7 -7
- package/src/foundry/foundry.js/cameraPopoutAppWrapper.d.ts +12 -7
- package/src/foundry/foundry.js/canvas.d.ts +150 -47
- package/src/foundry/foundry.js/canvasAnimation.d.ts +1 -1
- package/src/foundry/foundry.js/canvasDocumentMixin.d.ts +7 -0
- package/src/foundry/foundry.js/clientDatabaseBackend.d.ts +210 -0
- package/src/foundry/foundry.js/clientDocumentMixin.d.ts +45 -91
- package/src/foundry/foundry.js/clientDocuments/activeEffect.d.ts +3 -2
- package/src/foundry/foundry.js/clientDocuments/actor.d.ts +3 -7
- package/src/foundry/foundry.js/clientDocuments/canvasDocuments/ambientSoundDocument.d.ts +1 -6
- package/src/foundry/foundry.js/clientDocuments/canvasDocuments/tokenDocument.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/card.d.ts +133 -0
- package/src/foundry/foundry.js/clientDocuments/cards.d.ts +384 -0
- package/src/foundry/foundry.js/clientDocuments/chatMessage.d.ts +11 -10
- package/src/foundry/foundry.js/clientDocuments/combat.d.ts +4 -8
- package/src/foundry/foundry.js/clientDocuments/combatant.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/folder.d.ts +4 -6
- package/src/foundry/foundry.js/clientDocuments/index.d.ts +3 -0
- package/src/foundry/foundry.js/clientDocuments/item.d.ts +3 -4
- package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +4 -3
- package/src/foundry/foundry.js/clientDocuments/prototypeToken.d.ts +15 -0
- package/src/foundry/foundry.js/clientDocuments/rollTable.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/scene.d.ts +30 -23
- package/src/foundry/foundry.js/clientKeybindings.d.ts +299 -0
- package/src/foundry/foundry.js/clientSettings.d.ts +21 -6
- package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +45 -12
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/cardStacks.d.ts +9 -0
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/index.d.ts +1 -0
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/playlists.d.ts +3 -2
- package/src/foundry/foundry.js/config.d.ts +494 -902
- package/src/foundry/foundry.js/dragDrop.d.ts +17 -14
- package/src/foundry/foundry.js/game.d.ts +86 -11
- package/src/foundry/foundry.js/gamepadManager.d.ts +41 -0
- package/src/foundry/foundry.js/globalVariables.d.ts +7 -4
- package/src/foundry/foundry.js/handlebarsHelpers.d.ts +4 -4
- package/src/foundry/foundry.js/hooks.d.ts +57 -0
- package/src/foundry/foundry.js/keyboardManager.d.ts +165 -213
- package/src/foundry/foundry.js/mouseInteractionManager.d.ts +78 -34
- package/src/foundry/foundry.js/mouseManager.d.ts +18 -0
- package/src/foundry/foundry.js/newUserExperience.d.ts +34 -0
- package/src/foundry/foundry.js/pixi/containers/cachedContainer.d.ts +8 -0
- package/src/foundry/foundry.js/pixi/containers/cachedContainers/index.d.ts +1 -0
- package/src/foundry/foundry.js/pixi/containers/cachedContainers/primaryCanvasGroup.d.ts +42 -0
- package/src/foundry/foundry.js/pixi/containers/canvasLayer.d.ts +2 -1
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/gridLayer.d.ts +2 -2
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/index.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayer.d.ts +10 -19
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayers/backgroundLayer.d.ts +6 -2
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayers/foregroundLayer.d.ts +2 -2
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/wallsLayer.d.ts +4 -4
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/{effectsLayer.d.ts → weatherLayer.d.ts} +7 -7
- package/src/foundry/foundry.js/pixi/containers/effectsCanvasGroup.d.ts +29 -0
- package/src/foundry/foundry.js/pixi/containers/index.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/containers/interfaceCanvasGroup.d.ts +27 -0
- package/src/foundry/foundry.js/pixi/containers/placeableObject.d.ts +4 -1
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/wall.d.ts +1 -1
- package/src/foundry/foundry.js/pointSource.d.ts +174 -86
- package/src/foundry/foundry.js/roll.d.ts +25 -36
- package/src/foundry/foundry.js/rollTerm.d.ts +7 -4
- package/src/foundry/foundry.js/rollTerms/diceTerm.d.ts +4 -22
- package/src/foundry/foundry.js/rollTerms/mathTerm.d.ts +3 -0
- package/src/foundry/foundry.js/rollTerms/parentheticalTerm.d.ts +3 -0
- package/src/foundry/foundry.js/rollTerms/poolTerm.d.ts +3 -5
- package/src/foundry/foundry.js/rollTerms/stringTerm.d.ts +4 -1
- package/src/foundry/foundry.js/searchFilter.d.ts +1 -1
- package/src/foundry/foundry.js/textEditor.d.ts +40 -9
- package/src/foundry/index.d.ts +5 -0
- package/src/types/utils.d.ts +11 -3
- package/src/foundry/foundry.js/applications/formApplications/measuredTemplateConfig.d.ts +0 -61
- package/src/foundry/foundry.js/applications/formApplications/noteConfig.d.ts +0 -77
@@ -1,69 +1,146 @@
|
|
1
|
-
import {
|
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:
|
8
|
-
avatar:
|
12
|
+
_id: fields.DocumentId;
|
13
|
+
avatar: fields.ImageField;
|
9
14
|
character: fields.ForeignDocumentField<{ type: typeof documents.BaseActor; required: false }>;
|
10
|
-
color: FieldReturnType<
|
11
|
-
hotbar: DocumentField<Record<number |
|
15
|
+
color: FieldReturnType<fields.ColorField, { required: true }>;
|
16
|
+
hotbar: DocumentField<Record<number | `${number}`, string>> & {
|
12
17
|
required: true;
|
13
|
-
default: Record<
|
18
|
+
default: Record<number | `${number}`, never>;
|
14
19
|
validate: typeof _validateHotbar;
|
15
20
|
validationError: 'Invalid User hotbar data structure';
|
16
21
|
};
|
17
|
-
name:
|
18
|
-
password:
|
19
|
-
passwordSalt:
|
22
|
+
name: fields.RequiredString;
|
23
|
+
password: fields.BlankString;
|
24
|
+
passwordSalt: fields.StringField;
|
20
25
|
permissions: FieldReturnType<
|
21
|
-
|
26
|
+
fields.DocumentPermissions,
|
22
27
|
{
|
23
|
-
default: Record<
|
28
|
+
default: Record<string, never>;
|
24
29
|
validate: typeof _validatePermissions;
|
25
30
|
}
|
26
31
|
>;
|
27
|
-
role: DocumentField<
|
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:
|
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
|
-
|
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
|
-
|
40
|
-
|
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
|
-
|
44
|
-
|
45
|
-
|
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
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
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
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
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
|
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
|
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<
|
8
|
-
autoplay: FieldReturnType<
|
9
|
-
volume: FieldReturnType<
|
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
|
-
|
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
|
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:
|
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
|
-
|
23
|
+
fields.RequiredNumber,
|
16
24
|
{
|
17
|
-
default: typeof CONST.WALL_MOVEMENT_TYPES.NORMAL;
|
18
|
-
validate: (v: unknown) => v is foundry.CONST.
|
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
|
-
|
23
|
-
|
30
|
+
sight: FieldReturnType<
|
31
|
+
fields.RequiredNumber,
|
24
32
|
{
|
25
|
-
default: typeof CONST.WALL_SENSE_TYPES.NORMAL;
|
26
|
-
validate: (v: unknown) => v is foundry.CONST.
|
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
|
-
|
39
|
+
fields.RequiredNumber,
|
32
40
|
{
|
33
|
-
default: typeof CONST.WALL_SENSE_TYPES.NORMAL;
|
34
|
-
validate: (v: unknown) => v is foundry.CONST.
|
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
|
-
|
47
|
+
fields.RequiredNumber,
|
40
48
|
{
|
41
|
-
default: typeof CONST.WALL_DIRECTIONS.BOTH;
|
42
|
-
validate: (v: unknown) => v is foundry.CONST.
|
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
|
-
|
55
|
+
fields.RequiredNumber,
|
48
56
|
{
|
49
|
-
default: typeof CONST.WALL_DOOR_TYPES.NONE;
|
50
|
-
validate: (v: unknown) => v is foundry.CONST.
|
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
|
-
|
63
|
+
fields.RequiredNumber,
|
56
64
|
{
|
57
|
-
default: typeof CONST.WALL_DOOR_STATES.CLOSED;
|
58
|
-
validate: (v: unknown) => v is foundry.CONST.
|
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:
|
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.
|
95
|
+
move: foundry.CONST.WALL_MOVEMENT_TYPES;
|
81
96
|
|
82
97
|
/**
|
83
|
-
* The
|
98
|
+
* The visual restriction type of this wall
|
84
99
|
* @defaultValue `CONST.WALL_SENSE_TYPES.NORMAL`
|
85
100
|
*/
|
86
|
-
|
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.
|
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.
|
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.
|
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.
|
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.
|
156
|
+
move?: foundry.CONST.WALL_MOVEMENT_TYPES | null | undefined;
|
134
157
|
|
135
158
|
/**
|
136
|
-
* The
|
159
|
+
* The visual restriction type of this wall
|
137
160
|
* @defaultValue `CONST.WALL_SENSE_TYPES.NORMAL`
|
138
161
|
*/
|
139
|
-
|
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.
|
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.
|
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.
|
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.
|
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
|
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
|
222
|
+
export interface WallData extends WallDataProperties {}
|