@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.
- package/README.md +44 -27
- package/index.d.ts +2 -2
- package/package.json +34 -15
- package/src/foundry/common/abstract/document.mjs.d.ts +24 -10
- 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 +68 -67
- 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 +95 -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 +2 -2
- package/src/foundry/foundry.js/applications/filePicker.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplication.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheet.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/activeEffectConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +1 -1
- 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/documentSheets/folderConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/index.d.ts +1 -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 +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/noteConfig.d.ts +2 -2
- 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 +5 -8
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/tileConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/drawingConfig.d.ts +1 -1
- 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 +1 -0
- package/src/foundry/foundry.js/applications/formApplications/keybindingsConfig.d.ts +257 -0
- package/src/foundry/foundry.js/applications/formApplications/tokenConfig.d.ts +8 -9
- package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +6 -6
- 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/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/playlistDirectory.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +2 -2
- package/src/foundry/foundry.js/avSettings.d.ts +7 -7
- package/src/foundry/foundry.js/canvas.d.ts +148 -46
- 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/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/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 +2 -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/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 +11 -9
- package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +1 -1
- 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 +465 -887
- 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/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/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/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/placeablesLayers/wallsLayer.d.ts +3 -3
- 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/placeableObjects/token.d.ts +1 -1
- package/src/foundry/foundry.js/pointSource.d.ts +2 -2
- 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 +1 -1
- package/src/foundry/index.d.ts +4 -0
- 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
|
-
|
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 {
|
2
|
-
import {
|
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:
|
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:
|
6
|
-
minimumSystemVersion:
|
7
|
-
library:
|
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
|
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
|
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
|
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:
|
7
|
-
email:
|
8
|
-
url:
|
9
|
-
discord:
|
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
|
-
|
20
|
-
*/
|
21
|
-
email?: string;
|
16
|
+
/** The author email address */
|
17
|
+
email: string | undefined;
|
22
18
|
|
23
|
-
/**
|
24
|
-
|
25
|
-
*/
|
26
|
-
url?: string;
|
19
|
+
/** A website url for the author */
|
20
|
+
url: string | undefined;
|
27
21
|
|
28
|
-
/**
|
29
|
-
|
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
|
-
|
37
|
-
|
38
|
-
|
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
|
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?:
|
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:
|
7
|
-
label:
|
8
|
-
path:
|
9
|
-
private: FieldReturnType<
|
10
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
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
|
-
|
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
|
-
|
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
|
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
|
82
|
+
export interface PackageCompendiumData extends PackageCompendiumDataProperties {}
|