@league-of-foundry-developers/foundry-vtt-types 9.249.0 → 9.249.4
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/package.json +2 -2
- package/src/foundry/common/abstract/data.mjs.d.ts +2 -2
- package/src/foundry/common/abstract/document.mjs.d.ts +20 -9
- package/src/foundry/common/config.mjs/releaseData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/activeEffectData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/actorData.d.ts +1 -1
- package/src/foundry/common/data/data.mjs/adventureData.d.ts +14 -12
- package/src/foundry/common/data/data.mjs/ambientLightData.d.ts +5 -3
- package/src/foundry/common/data/data.mjs/ambientSoundData.d.ts +62 -16
- package/src/foundry/common/data/data.mjs/animationData.d.ts +13 -5
- package/src/foundry/common/data/data.mjs/cardData.d.ts +4 -4
- package/src/foundry/common/data/data.mjs/cardFaceData.d.ts +5 -3
- package/src/foundry/common/data/data.mjs/cardsData.d.ts +3 -3
- package/src/foundry/common/data/data.mjs/chatMessageData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/chatSpeakerData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/combatData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/combatantData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/darknessActivation.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/drawingData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/effectChangeData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/effectDurationData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/fogExplorationData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/folderData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/journalEntryData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/lightData.d.ts +7 -5
- package/src/foundry/common/data/data.mjs/macroData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/measuredTemplateData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/noteData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/playlistData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/playlistSoundData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/prototypeTokenData.d.ts +6 -4
- package/src/foundry/common/data/data.mjs/rollTableData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/sceneData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/settingData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/tableResultData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/tileData.d.ts +4 -2
- package/src/foundry/common/data/data.mjs/tileOcclusion.d.ts +4 -2
- package/src/foundry/common/data/data.mjs/tokenBarData.d.ts +4 -2
- package/src/foundry/common/data/data.mjs/tokenData.d.ts +5 -3
- package/src/foundry/common/data/data.mjs/userData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/videoData.d.ts +4 -2
- package/src/foundry/common/data/data.mjs/wallData.d.ts +4 -2
- package/src/foundry/common/documents.mjs/baseActiveEffect.d.ts +15 -12
- package/src/foundry/common/documents.mjs/baseActor.d.ts +24 -21
- package/src/foundry/common/documents.mjs/baseAdventure.d.ts +14 -12
- package/src/foundry/common/documents.mjs/baseAmbientLight.d.ts +14 -11
- package/src/foundry/common/documents.mjs/baseAmbientSound.d.ts +14 -11
- package/src/foundry/common/documents.mjs/baseCard.d.ts +27 -28
- package/src/foundry/common/documents.mjs/baseCards.d.ts +18 -16
- package/src/foundry/common/documents.mjs/baseChatMessage.d.ts +24 -17
- package/src/foundry/common/documents.mjs/baseCombat.d.ts +21 -20
- package/src/foundry/common/documents.mjs/baseCombatant.d.ts +25 -18
- package/src/foundry/common/documents.mjs/baseDrawing.d.ts +26 -23
- package/src/foundry/common/documents.mjs/baseFogExploration.d.ts +19 -17
- package/src/foundry/common/documents.mjs/baseFolder.d.ts +14 -12
- package/src/foundry/common/documents.mjs/baseItem.d.ts +25 -19
- package/src/foundry/common/documents.mjs/baseJournalEntry.d.ts +16 -14
- package/src/foundry/common/documents.mjs/baseMacro.d.ts +21 -18
- package/src/foundry/common/documents.mjs/baseMeasuredTemplate.d.ts +34 -18
- package/src/foundry/common/documents.mjs/baseNote.d.ts +20 -14
- package/src/foundry/common/documents.mjs/basePlaylist.d.ts +16 -14
- package/src/foundry/common/documents.mjs/basePlaylistSound.d.ts +14 -11
- package/src/foundry/common/documents.mjs/baseRollTable.d.ts +16 -14
- package/src/foundry/common/documents.mjs/baseScene.d.ts +23 -21
- package/src/foundry/common/documents.mjs/baseSetting.d.ts +18 -16
- package/src/foundry/common/documents.mjs/baseTableResult.d.ts +27 -19
- package/src/foundry/common/documents.mjs/baseTile.d.ts +17 -11
- package/src/foundry/common/documents.mjs/baseToken.d.ts +20 -16
- package/src/foundry/common/documents.mjs/baseUser.d.ts +45 -11
- package/src/foundry/common/documents.mjs/baseWall.d.ts +17 -15
- package/src/foundry/common/packages.mjs/packageAuthorData.d.ts +3 -1
- package/src/foundry/common/packages.mjs/packageCompendiumData.d.ts +4 -2
- package/src/foundry/common/packages.mjs/packageData.d.ts +3 -4
- package/src/foundry/common/packages.mjs/packageDependencyData.d.ts +3 -1
- package/src/foundry/common/packages.mjs/packageLanguageData.d.ts +3 -1
- package/src/foundry/common/utils/primitives.mjs.d.ts +1 -1
- package/src/foundry/foundry.js/application.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientLightConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/itemSheet.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/entitySheetConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/tokenConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +1 -1
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +1 -1
- package/src/foundry/foundry.js/avSettings.d.ts +11 -0
- package/src/foundry/foundry.js/clientDocumentMixin.d.ts +36 -34
- package/src/foundry/foundry.js/clientDocuments/activeEffect.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/actor.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/chatMessage.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/combat.d.ts +5 -5
- package/src/foundry/foundry.js/clientDocuments/item.d.ts +2 -2
- package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/scene.d.ts +39 -38
- package/src/foundry/foundry.js/clientDocuments/user.d.ts +27 -35
- package/src/foundry/foundry.js/clientSettings.d.ts +1 -1
- package/src/foundry/foundry.js/collections/documentCollection.d.ts +65 -11
- package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +78 -67
- package/src/foundry/foundry.js/collections/documentCollections/worldCollection.d.ts +73 -32
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/actors.d.ts +3 -37
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/combatEncounters.d.ts +5 -2
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/fogExplorations.d.ts +0 -2
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/folders.d.ts +1 -1
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/items.d.ts +1 -22
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/journal.d.ts +1 -1
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/macros.d.ts +3 -8
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/messages.d.ts +7 -2
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/playlists.d.ts +5 -5
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/rollTables.d.ts +1 -1
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/scenes.d.ts +3 -2
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/users.d.ts +7 -4
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/worldSettings.d.ts +2 -2
- package/src/foundry/foundry.js/hooks.d.ts +3 -3
- package/src/foundry/foundry.js/pixi/containers/ruler.d.ts +18 -7
- package/src/foundry/foundry.js/pixi/points/wallEndpoint.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygons/clockwiseSweepPolygon.d.ts +1 -1
- package/src/foundry/foundry.js/pointSources/lightSource.d.ts +1 -1
- package/src/foundry/foundry.js/pointSources/soundSource.d.ts +1 -1
- package/src/foundry/foundry.js/pointSources/visionSource.d.ts +1 -1
- package/src/foundry/foundry.js/polygonEdge.d.ts +1 -1
- package/src/foundry/foundry.js/ray.d.ts +1 -1
- package/src/types/helperTypes.d.ts +31 -13
@@ -4,43 +4,59 @@ import { DocumentMetadata } from '../abstract/document.mjs';
|
|
4
4
|
import { Document } from '../abstract/module.mjs';
|
5
5
|
import { BaseScene } from './baseScene';
|
6
6
|
import { BaseUser } from './baseUser';
|
7
|
+
import type { MeasuredTemplateDataConstructorData } from '../data/data.mjs/measuredTemplateData';
|
8
|
+
|
9
|
+
type MeasuredTemplateMetadata = Merge<
|
10
|
+
DocumentMetadata,
|
11
|
+
{
|
12
|
+
name: 'MeasuredTemplate';
|
13
|
+
collection: 'templates';
|
14
|
+
label: 'DOCUMENT.MeasuredTemplate';
|
15
|
+
labelPlural: 'DOCUMENT.MeasuredTemplates';
|
16
|
+
isEmbedded: true;
|
17
|
+
permissions: {
|
18
|
+
create: 'TEMPLATE_CREATE';
|
19
|
+
update: (
|
20
|
+
user: BaseUser,
|
21
|
+
doc: BaseMeasuredTemplate,
|
22
|
+
data: DeepPartial<MeasuredTemplateDataConstructorData> | {}
|
23
|
+
) => boolean;
|
24
|
+
delete: (
|
25
|
+
user: BaseUser,
|
26
|
+
doc: BaseMeasuredTemplate,
|
27
|
+
data: DeepPartial<MeasuredTemplateDataConstructorData> | {}
|
28
|
+
) => boolean;
|
29
|
+
};
|
30
|
+
}
|
31
|
+
>;
|
7
32
|
|
8
33
|
/**
|
9
34
|
* The base MeasuredTemplate model definition which defines common behavior of an MeasuredTemplate document between both client and server.
|
10
35
|
*/
|
11
36
|
export declare class BaseMeasuredTemplate extends Document<
|
12
37
|
data.MeasuredTemplateData,
|
13
|
-
InstanceType<ConfiguredDocumentClass<typeof BaseScene
|
38
|
+
InstanceType<ConfiguredDocumentClass<typeof BaseScene>>,
|
39
|
+
MeasuredTemplateMetadata
|
14
40
|
> {
|
15
41
|
/** @override */
|
16
42
|
static get schema(): typeof data.MeasuredTemplateData;
|
17
43
|
|
18
44
|
/** @override */
|
19
|
-
static get metadata():
|
20
|
-
DocumentMetadata,
|
21
|
-
{
|
22
|
-
name: 'MeasuredTemplate';
|
23
|
-
collection: 'templates';
|
24
|
-
label: 'DOCUMENT.MeasuredTemplate';
|
25
|
-
labelPlural: 'DOCUMENT.MeasuredTemplates';
|
26
|
-
isEmbedded: true;
|
27
|
-
permissions: {
|
28
|
-
create: 'TEMPLATE_CREATE';
|
29
|
-
update: typeof BaseMeasuredTemplate['_canModify'];
|
30
|
-
delete: typeof BaseMeasuredTemplate['_canModify'];
|
31
|
-
};
|
32
|
-
}
|
33
|
-
>;
|
45
|
+
static get metadata(): MeasuredTemplateMetadata;
|
34
46
|
|
35
47
|
/** @override */
|
36
48
|
testUserPermission(
|
37
49
|
user: BaseUser,
|
38
|
-
permission: keyof typeof foundry.CONST.
|
50
|
+
permission: keyof typeof foundry.CONST.DOCUMENT_PERMISSION_LEVELS | foundry.CONST.DOCUMENT_PERMISSION_LEVELS,
|
39
51
|
{ exact }?: { exact?: boolean }
|
40
52
|
): boolean;
|
41
53
|
|
42
54
|
/**
|
43
55
|
* Is a user able to modify an existing MeasuredTemplate?
|
44
56
|
*/
|
45
|
-
protected static _canModify(
|
57
|
+
protected static _canModify(
|
58
|
+
user: BaseUser,
|
59
|
+
doc: BaseMeasuredTemplate,
|
60
|
+
data: DeepPartial<MeasuredTemplateDataConstructorData> | {}
|
61
|
+
): boolean;
|
46
62
|
}
|
@@ -5,27 +5,33 @@ import * as data from '../data/data.mjs';
|
|
5
5
|
import { BaseScene } from './baseScene';
|
6
6
|
import { BaseUser } from './baseUser';
|
7
7
|
|
8
|
+
type NoteMetadata = Merge<
|
9
|
+
DocumentMetadata,
|
10
|
+
{
|
11
|
+
name: 'Note';
|
12
|
+
collection: 'notes';
|
13
|
+
label: 'DOCUMENT.Note';
|
14
|
+
labelPlural: 'DOCUMENT.Notes';
|
15
|
+
isEmbedded: true;
|
16
|
+
permissions: {
|
17
|
+
create: 'NOTE_CREATE';
|
18
|
+
};
|
19
|
+
}
|
20
|
+
>;
|
21
|
+
|
8
22
|
/**
|
9
23
|
* The base Note model definition which defines common behavior of an Note document between both client and server.
|
10
24
|
*/
|
11
|
-
export declare class BaseNote extends Document<
|
25
|
+
export declare class BaseNote extends Document<
|
26
|
+
data.NoteData,
|
27
|
+
InstanceType<ConfiguredDocumentClass<typeof BaseScene>>,
|
28
|
+
NoteMetadata
|
29
|
+
> {
|
12
30
|
/** @override */
|
13
31
|
static get schema(): typeof data.NoteData;
|
14
32
|
|
15
33
|
/** @override */
|
16
|
-
static get metadata():
|
17
|
-
DocumentMetadata,
|
18
|
-
{
|
19
|
-
name: 'Note';
|
20
|
-
collection: 'notes';
|
21
|
-
label: 'DOCUMENT.Note';
|
22
|
-
labelPlural: 'DOCUMENT.Notes';
|
23
|
-
isEmbedded: true;
|
24
|
-
permissions: {
|
25
|
-
create: 'NOTE_CREATE';
|
26
|
-
};
|
27
|
-
}
|
28
|
-
>;
|
34
|
+
static get metadata(): NoteMetadata;
|
29
35
|
|
30
36
|
/** @override */
|
31
37
|
testUserPermission(
|
@@ -3,27 +3,29 @@ import { Document } from '../abstract/module.mjs';
|
|
3
3
|
import * as data from '../data/data.mjs';
|
4
4
|
import { BasePlaylistSound } from './basePlaylistSound';
|
5
5
|
|
6
|
+
type PlaylistMetadata = Merge<
|
7
|
+
DocumentMetadata,
|
8
|
+
{
|
9
|
+
name: 'Playlist';
|
10
|
+
collection: 'playlists';
|
11
|
+
label: 'DOCUMENT.Playlist';
|
12
|
+
labelPlural: 'DOCUMENT.Playlists';
|
13
|
+
embedded: {
|
14
|
+
PlaylistSound: typeof BasePlaylistSound;
|
15
|
+
};
|
16
|
+
isPrimary: true;
|
17
|
+
}
|
18
|
+
>;
|
19
|
+
|
6
20
|
/**
|
7
21
|
* The base Playlist model definition which defines common behavior of an Playlist document between both client and server.
|
8
22
|
*/
|
9
|
-
export declare class BasePlaylist extends Document<data.PlaylistData> {
|
23
|
+
export declare class BasePlaylist extends Document<data.PlaylistData, null, PlaylistMetadata> {
|
10
24
|
/** @override */
|
11
25
|
static get schema(): typeof data.PlaylistData;
|
12
26
|
|
13
27
|
/** @override */
|
14
|
-
static get metadata():
|
15
|
-
DocumentMetadata,
|
16
|
-
{
|
17
|
-
name: 'Playlist';
|
18
|
-
collection: 'playlists';
|
19
|
-
label: 'DOCUMENT.Playlist';
|
20
|
-
labelPlural: 'DOCUMENT.Playlists';
|
21
|
-
embedded: {
|
22
|
-
PlaylistSound: typeof BasePlaylistSound;
|
23
|
-
};
|
24
|
-
isPrimary: true;
|
25
|
-
}
|
26
|
-
>;
|
28
|
+
static get metadata(): PlaylistMetadata;
|
27
29
|
|
28
30
|
/**
|
29
31
|
* A reference to the Collection of ActiveEffect instances in the Actor document, indexed by _id.
|
@@ -6,27 +6,30 @@ import type { BaseUser } from './baseUser';
|
|
6
6
|
import type { DocumentMetadata } from '../abstract/document.mjs';
|
7
7
|
import type { ConfiguredDocumentClass } from '../../../types/helperTypes';
|
8
8
|
|
9
|
+
type PlaylistSoundMetadata = Merge<
|
10
|
+
DocumentMetadata,
|
11
|
+
{
|
12
|
+
name: 'PlaylistSound';
|
13
|
+
collection: 'sounds';
|
14
|
+
label: 'DOCUMENT.PlaylistSound';
|
15
|
+
labelPlural: 'DOCUMENT.PlaylistSounds';
|
16
|
+
isEmbedded: true;
|
17
|
+
}
|
18
|
+
>;
|
19
|
+
|
9
20
|
/**
|
10
21
|
* The PlaylistSound model definition which defines common behaviour of a PlaylistSound document between both client and server.
|
11
22
|
*/
|
12
23
|
export declare class BasePlaylistSound extends Document<
|
13
24
|
data.PlaylistSoundData,
|
14
|
-
InstanceType<ConfiguredDocumentClass<typeof BasePlaylist
|
25
|
+
InstanceType<ConfiguredDocumentClass<typeof BasePlaylist>>,
|
26
|
+
PlaylistSoundMetadata
|
15
27
|
> {
|
16
28
|
/** @override */
|
17
29
|
static get schema(): typeof data.PlaylistSoundData;
|
18
30
|
|
19
31
|
/** @override */
|
20
|
-
static get metadata():
|
21
|
-
DocumentMetadata,
|
22
|
-
{
|
23
|
-
name: 'PlaylistSound';
|
24
|
-
collection: 'sounds';
|
25
|
-
label: 'DOCUMENT.PlaylistSound';
|
26
|
-
labelPlural: 'DOCUMENT.PlaylistSounds';
|
27
|
-
isEmbedded: true;
|
28
|
-
}
|
29
|
-
>;
|
32
|
+
static get metadata(): PlaylistSoundMetadata;
|
30
33
|
|
31
34
|
/** @override */
|
32
35
|
testUserPermission(
|
@@ -2,27 +2,29 @@ import { DocumentMetadata } from '../abstract/document.mjs';
|
|
2
2
|
import { Document } from '../abstract/module.mjs';
|
3
3
|
import { BaseTableResult } from './baseTableResult';
|
4
4
|
|
5
|
+
type RollTableMetadata = Merge<
|
6
|
+
DocumentMetadata,
|
7
|
+
{
|
8
|
+
name: 'RollTable';
|
9
|
+
collection: 'tables';
|
10
|
+
label: 'DOCUMENT.RollTable';
|
11
|
+
labelPlural: 'DOCUMENT.RollTables';
|
12
|
+
embedded: {
|
13
|
+
TableResult: typeof BaseTableResult;
|
14
|
+
};
|
15
|
+
isPrimary: true;
|
16
|
+
}
|
17
|
+
>;
|
18
|
+
|
5
19
|
/**
|
6
20
|
* The base RollTable model definition which defines common behavior of an RollTable document between both client and server.
|
7
21
|
*/
|
8
|
-
export declare class BaseRollTable extends Document<foundry.data.RollTableData> {
|
22
|
+
export declare class BaseRollTable extends Document<foundry.data.RollTableData, null, RollTableMetadata> {
|
9
23
|
/** @override */
|
10
24
|
static get schema(): typeof foundry.data.RollTableData;
|
11
25
|
|
12
26
|
/** @override */
|
13
|
-
static get metadata():
|
14
|
-
DocumentMetadata,
|
15
|
-
{
|
16
|
-
name: 'RollTable';
|
17
|
-
collection: 'tables';
|
18
|
-
label: 'DOCUMENT.RollTable';
|
19
|
-
labelPlural: 'DOCUMENT.RollTables';
|
20
|
-
embedded: {
|
21
|
-
TableResult: typeof BaseTableResult;
|
22
|
-
};
|
23
|
-
isPrimary: true;
|
24
|
-
}
|
25
|
-
>;
|
27
|
+
static get metadata(): RollTableMetadata;
|
26
28
|
|
27
29
|
/**
|
28
30
|
* A reference to the Collection of TableResult instances in this document, indexed by _id.
|
@@ -10,34 +10,36 @@ import { BaseTile } from './baseTile';
|
|
10
10
|
import { BaseToken } from './baseToken';
|
11
11
|
import { BaseWall } from './baseWall';
|
12
12
|
|
13
|
+
type SceneMetadata = Merge<
|
14
|
+
DocumentMetadata,
|
15
|
+
{
|
16
|
+
name: 'Scene';
|
17
|
+
collection: 'scenes';
|
18
|
+
label: 'DOCUMENT.Scene';
|
19
|
+
labelPlural: 'DOCUMENT.Scenes';
|
20
|
+
isPrimary: true;
|
21
|
+
embedded: {
|
22
|
+
AmbientLight: typeof BaseAmbientLight;
|
23
|
+
AmbientSound: typeof BaseAmbientSound;
|
24
|
+
Drawing: typeof BaseDrawing;
|
25
|
+
MeasuredTemplate: typeof BaseMeasuredTemplate;
|
26
|
+
Note: typeof BaseNote;
|
27
|
+
Tile: typeof BaseTile;
|
28
|
+
Token: typeof BaseToken;
|
29
|
+
Wall: typeof BaseWall;
|
30
|
+
};
|
31
|
+
}
|
32
|
+
>;
|
33
|
+
|
13
34
|
/**
|
14
35
|
* The base Scene model definition which defines common behavior of an Scene document between both client and server.
|
15
36
|
*/
|
16
|
-
export declare class BaseScene extends Document<data.SceneData> {
|
37
|
+
export declare class BaseScene extends Document<data.SceneData, null, SceneMetadata> {
|
17
38
|
/** @override */
|
18
39
|
static get schema(): typeof data.SceneData;
|
19
40
|
|
20
41
|
/** @override */
|
21
|
-
static get metadata():
|
22
|
-
DocumentMetadata,
|
23
|
-
{
|
24
|
-
name: 'Scene';
|
25
|
-
collection: 'scenes';
|
26
|
-
label: 'DOCUMENT.Scene';
|
27
|
-
labelPlural: 'DOCUMENT.Scenes';
|
28
|
-
isPrimary: true;
|
29
|
-
embedded: {
|
30
|
-
AmbientLight: typeof BaseAmbientLight;
|
31
|
-
AmbientSound: typeof BaseAmbientSound;
|
32
|
-
Drawing: typeof BaseDrawing;
|
33
|
-
MeasuredTemplate: typeof BaseMeasuredTemplate;
|
34
|
-
Note: typeof BaseNote;
|
35
|
-
Tile: typeof BaseTile;
|
36
|
-
Token: typeof BaseToken;
|
37
|
-
Wall: typeof BaseWall;
|
38
|
-
};
|
39
|
-
}
|
40
|
-
>;
|
42
|
+
static get metadata(): SceneMetadata;
|
41
43
|
|
42
44
|
/**
|
43
45
|
* A reference to the Collection of Drawing instances in the Scene document, indexed by _id.
|
@@ -2,29 +2,31 @@ import { DocumentMetadata } from '../abstract/document.mjs';
|
|
2
2
|
import { Document } from '../abstract/module.mjs';
|
3
3
|
import * as data from '../data/data.mjs';
|
4
4
|
|
5
|
+
type SettingMetadata = Merge<
|
6
|
+
DocumentMetadata,
|
7
|
+
{
|
8
|
+
name: 'Setting';
|
9
|
+
collection: 'settings';
|
10
|
+
label: 'DOCUMENT.Setting';
|
11
|
+
labelPlural: 'DOCUMENT.Settings';
|
12
|
+
isPrimary: true;
|
13
|
+
permissions: {
|
14
|
+
create: 'SETTINGS_MODIFY';
|
15
|
+
update: 'SETTINGS_MODIFY';
|
16
|
+
delete: 'SETTINGS_MODIFY';
|
17
|
+
};
|
18
|
+
}
|
19
|
+
>;
|
20
|
+
|
5
21
|
/**
|
6
22
|
* The base Setting model definition which defines common behavior of an Setting document between both client and server.
|
7
23
|
*/
|
8
|
-
export declare class BaseSetting extends Document<data.SettingData> {
|
24
|
+
export declare class BaseSetting extends Document<data.SettingData, null, SettingMetadata> {
|
9
25
|
/** @override */
|
10
26
|
static get schema(): typeof data.SettingData;
|
11
27
|
|
12
28
|
/** @override */
|
13
|
-
static get metadata():
|
14
|
-
DocumentMetadata,
|
15
|
-
{
|
16
|
-
name: 'Setting';
|
17
|
-
collection: 'settings';
|
18
|
-
label: 'DOCUMENT.Setting';
|
19
|
-
labelPlural: 'DOCUMENT.Settings';
|
20
|
-
isPrimary: true;
|
21
|
-
permissions: {
|
22
|
-
create: 'SETTINGS_MODIFY';
|
23
|
-
update: 'SETTINGS_MODIFY';
|
24
|
-
delete: 'SETTINGS_MODIFY';
|
25
|
-
};
|
26
|
-
}
|
27
|
-
>;
|
29
|
+
static get metadata(): SettingMetadata;
|
28
30
|
|
29
31
|
/**
|
30
32
|
* A convenience reference to the key which identifies this game setting.
|
@@ -1,42 +1,50 @@
|
|
1
1
|
import { ConfiguredDocumentClass } from '../../../types/helperTypes';
|
2
2
|
import { DocumentMetadata } from '../abstract/document.mjs';
|
3
3
|
import { Document } from '../abstract/module.mjs';
|
4
|
+
import type { TableResultDataConstructorData } from '../data/data.mjs/tableResultData';
|
4
5
|
import { BaseRollTable } from './baseRollTable';
|
5
6
|
import { BaseUser } from './baseUser';
|
6
7
|
|
8
|
+
type TableResultMetadata = Merge<
|
9
|
+
DocumentMetadata,
|
10
|
+
{
|
11
|
+
name: 'TableResult';
|
12
|
+
collection: 'results';
|
13
|
+
label: 'DOCUMENT.TableResult';
|
14
|
+
labelPlural: 'DOCUMENT.TableResults';
|
15
|
+
types: [
|
16
|
+
`${typeof CONST.TABLE_RESULT_TYPES.TEXT}`,
|
17
|
+
`${typeof CONST.TABLE_RESULT_TYPES.DOCUMENT}`,
|
18
|
+
`${typeof CONST.TABLE_RESULT_TYPES.COMPENDIUM}`
|
19
|
+
];
|
20
|
+
permissions: {
|
21
|
+
update: (user: BaseUser, doc: BaseTableResult, data: DeepPartial<TableResultDataConstructorData>) => boolean;
|
22
|
+
};
|
23
|
+
}
|
24
|
+
>;
|
25
|
+
|
7
26
|
/**
|
8
27
|
* The base TableResult model definition which defines common behavior of an TableResult document between both client and server.
|
9
28
|
*/
|
10
29
|
export declare class BaseTableResult extends Document<
|
11
30
|
foundry.data.TableResultData,
|
12
|
-
InstanceType<ConfiguredDocumentClass<typeof BaseRollTable
|
31
|
+
InstanceType<ConfiguredDocumentClass<typeof BaseRollTable>>,
|
32
|
+
TableResultMetadata
|
13
33
|
> {
|
14
34
|
/** @override */
|
15
35
|
static get schema(): typeof foundry.data.TableResultData;
|
16
36
|
|
17
37
|
/** @override */
|
18
|
-
static get metadata():
|
19
|
-
DocumentMetadata,
|
20
|
-
{
|
21
|
-
name: 'TableResult';
|
22
|
-
collection: 'results';
|
23
|
-
label: 'DOCUMENT.TableResult';
|
24
|
-
labelPlural: 'DOCUMENT.TableResults';
|
25
|
-
types: [
|
26
|
-
`${typeof CONST.TABLE_RESULT_TYPES.TEXT}`,
|
27
|
-
`${typeof CONST.TABLE_RESULT_TYPES.DOCUMENT}`,
|
28
|
-
`${typeof CONST.TABLE_RESULT_TYPES.COMPENDIUM}`
|
29
|
-
];
|
30
|
-
permissions: {
|
31
|
-
update: (user: BaseUser, doc: any, data?: object) => boolean;
|
32
|
-
};
|
33
|
-
}
|
34
|
-
>;
|
38
|
+
static get metadata(): TableResultMetadata;
|
35
39
|
|
36
40
|
/**
|
37
41
|
* Is a user able to update an existing TableResult?
|
38
42
|
*/
|
39
|
-
protected static _canUpdate(
|
43
|
+
protected static _canUpdate(
|
44
|
+
user: BaseUser,
|
45
|
+
doc: BaseTableResult,
|
46
|
+
data: DeepPartial<TableResultDataConstructorData>
|
47
|
+
): boolean;
|
40
48
|
|
41
49
|
/** @override */
|
42
50
|
testUserPermission(
|
@@ -4,22 +4,28 @@ import { Document } from '../abstract/module.mjs';
|
|
4
4
|
import * as data from '../data/data.mjs';
|
5
5
|
import { BaseScene } from './baseScene';
|
6
6
|
|
7
|
+
type TileMetadata = Merge<
|
8
|
+
DocumentMetadata,
|
9
|
+
{
|
10
|
+
name: 'Tile';
|
11
|
+
collection: 'tiles';
|
12
|
+
label: 'DOCUMENT.Tile';
|
13
|
+
labelPlural: 'DOCUMENT.Tiles';
|
14
|
+
isEmbedded: true;
|
15
|
+
}
|
16
|
+
>;
|
17
|
+
|
7
18
|
/**
|
8
19
|
* The base Tile model definition which defines common behavior of an Tile document between both client and server.
|
9
20
|
*/
|
10
|
-
export declare class BaseTile extends Document<
|
21
|
+
export declare class BaseTile extends Document<
|
22
|
+
data.TileData,
|
23
|
+
InstanceType<ConfiguredDocumentClass<typeof BaseScene>>,
|
24
|
+
TileMetadata
|
25
|
+
> {
|
11
26
|
/** @override */
|
12
27
|
static get schema(): typeof data.TileData;
|
13
28
|
|
14
29
|
/** @override */
|
15
|
-
static get metadata():
|
16
|
-
DocumentMetadata,
|
17
|
-
{
|
18
|
-
name: 'Tile';
|
19
|
-
collection: 'tiles';
|
20
|
-
label: 'DOCUMENT.Tile';
|
21
|
-
labelPlural: 'DOCUMENT.Tiles';
|
22
|
-
isEmbedded: true;
|
23
|
-
}
|
24
|
-
>;
|
30
|
+
static get metadata(): TileMetadata;
|
25
31
|
}
|
@@ -2,33 +2,37 @@ import { ConfiguredDocumentClass } from '../../../types/helperTypes';
|
|
2
2
|
import { DocumentMetadata } from '../abstract/document.mjs';
|
3
3
|
import { Document } from '../abstract/module.mjs';
|
4
4
|
import * as data from '../data/data.mjs';
|
5
|
+
import type { TokenDataConstructorData } from '../data/data.mjs/tokenData';
|
5
6
|
import { BaseUser } from './baseUser';
|
6
7
|
|
8
|
+
type TokenMetadata = Merge<
|
9
|
+
DocumentMetadata,
|
10
|
+
{
|
11
|
+
name: 'Token';
|
12
|
+
collection: 'tokens';
|
13
|
+
label: 'DOCUMENT.Token';
|
14
|
+
labelPlural: 'DOCUMENT.Tokens';
|
15
|
+
isEmbedded: true;
|
16
|
+
permissions: {
|
17
|
+
create: 'TOKEN_CREATE';
|
18
|
+
update: (user: BaseUser, doc: BaseToken, data: DeepPartial<TokenDataConstructorData>) => boolean;
|
19
|
+
};
|
20
|
+
}
|
21
|
+
>;
|
22
|
+
|
7
23
|
/**
|
8
24
|
* The base Token model definition which defines common behavior of an Token document between both client and server.
|
9
25
|
*/
|
10
26
|
export declare class BaseToken extends Document<
|
11
27
|
data.TokenData,
|
12
|
-
InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseScene
|
28
|
+
InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseScene>>,
|
29
|
+
TokenMetadata
|
13
30
|
> {
|
14
31
|
/** @override */
|
15
32
|
static get schema(): typeof data.TokenData;
|
16
33
|
|
17
34
|
/** @override */
|
18
|
-
static get metadata():
|
19
|
-
DocumentMetadata,
|
20
|
-
{
|
21
|
-
name: 'Token';
|
22
|
-
collection: 'tokens';
|
23
|
-
label: 'DOCUMENT.Token';
|
24
|
-
labelPlural: 'DOCUMENT.Tokens';
|
25
|
-
isEmbedded: true;
|
26
|
-
permissions: {
|
27
|
-
create: 'TOKEN_CREATE';
|
28
|
-
update: typeof BaseToken['_canUpdate'];
|
29
|
-
};
|
30
|
-
}
|
31
|
-
>;
|
35
|
+
static get metadata(): TokenMetadata;
|
32
36
|
|
33
37
|
/**
|
34
38
|
* A convenience reference to the name which should be displayed for the Token
|
@@ -38,5 +42,5 @@ export declare class BaseToken extends Document<
|
|
38
42
|
/**
|
39
43
|
* Is a user able to update an existing Token?
|
40
44
|
*/
|
41
|
-
protected static _canUpdate(user: BaseUser, doc: BaseToken, data:
|
45
|
+
protected static _canUpdate(user: BaseUser, doc: BaseToken, data: DeepPartial<TokenDataConstructorData>): boolean;
|
42
46
|
}
|
@@ -1,11 +1,28 @@
|
|
1
1
|
import { DocumentMetadata } from '../abstract/document.mjs';
|
2
2
|
import { Document } from '../abstract/module.mjs';
|
3
3
|
import * as data from '../data/data.mjs';
|
4
|
+
import type { UserDataConstructorData, UserDataSource } from '../data/data.mjs/userData';
|
5
|
+
|
6
|
+
type UserMetadata = Merge<
|
7
|
+
DocumentMetadata,
|
8
|
+
{
|
9
|
+
name: 'User';
|
10
|
+
collection: 'users';
|
11
|
+
label: 'DOCUMENT.User';
|
12
|
+
labelPlural: 'DOCUMENT.Users';
|
13
|
+
isPrimary: true;
|
14
|
+
permissions: {
|
15
|
+
create: (user: BaseUser, doc: BaseUser, data: UserDataSource) => boolean;
|
16
|
+
update: (user: BaseUser, doc: BaseUser, data: DeepPartial<UserDataConstructorData>) => boolean;
|
17
|
+
delete: (user: BaseUser, doc: BaseUser) => boolean;
|
18
|
+
};
|
19
|
+
}
|
20
|
+
>;
|
4
21
|
|
5
22
|
/**
|
6
23
|
* The base User model definition which defines common behavior of an User document between both client and server.
|
7
24
|
*/
|
8
|
-
export declare class BaseUser extends Document<data.UserData, null> {
|
25
|
+
export declare class BaseUser extends Document<data.UserData, null, UserMetadata> {
|
9
26
|
constructor(...args: ConstructorParameters<ConstructorOf<Document<data.UserData, null>>>);
|
10
27
|
|
11
28
|
/**
|
@@ -17,16 +34,33 @@ export declare class BaseUser extends Document<data.UserData, null> {
|
|
17
34
|
static get schema(): typeof data.UserData;
|
18
35
|
|
19
36
|
/** @override */
|
20
|
-
static get metadata():
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
37
|
+
static get metadata(): UserMetadata;
|
38
|
+
|
39
|
+
/**
|
40
|
+
* Is a user able to create an existing User?
|
41
|
+
* @param user - The user attempting the creation.
|
42
|
+
* @param doc - The User document being created.
|
43
|
+
* @param data - The supplied creation data.
|
44
|
+
* @internal
|
45
|
+
*/
|
46
|
+
protected static _canCreate(user: BaseUser, doc: BaseUser, data: UserDataSource): boolean;
|
47
|
+
|
48
|
+
/**
|
49
|
+
* Is a user able to update an existing User?
|
50
|
+
* @param user - The user attempting the update.
|
51
|
+
* @param doc - The User document being updated.
|
52
|
+
* @param data - The update delta.
|
53
|
+
* @internal
|
54
|
+
*/
|
55
|
+
protected static _canUpdate(user: BaseUser, doc: BaseUser, data: DeepPartial<UserDataConstructorData>): boolean;
|
56
|
+
|
57
|
+
/**
|
58
|
+
* Is a user able to delete an existing User?
|
59
|
+
* @param user - The user attempting the deletion.
|
60
|
+
* @param doc - The User document being deleted.
|
61
|
+
* @internal
|
62
|
+
*/
|
63
|
+
protected static _canDelete(user: BaseUser, doc: BaseUser): boolean;
|
30
64
|
|
31
65
|
/**
|
32
66
|
* Test whether the User has a GAMEMASTER or ASSISTANT role in this World?
|
@@ -2,10 +2,24 @@ import { ConfiguredDocumentClass } from '../../../types/helperTypes';
|
|
2
2
|
import { Context, DocumentMetadata } from '../abstract/document.mjs';
|
3
3
|
import { Document } from '../abstract/module.mjs';
|
4
4
|
import * as data from '../data/data.mjs';
|
5
|
-
import type { WallDataConstructorData } from '../data/data.mjs/wallData
|
5
|
+
import type { WallDataConstructorData } from '../data/data.mjs/wallData';
|
6
6
|
import { BaseScene } from './baseScene';
|
7
7
|
import { BaseUser } from './baseUser';
|
8
8
|
|
9
|
+
type WallMetadata = Merge<
|
10
|
+
DocumentMetadata,
|
11
|
+
{
|
12
|
+
name: 'Wall';
|
13
|
+
collection: 'walls';
|
14
|
+
label: 'DOCUMENT.Wall';
|
15
|
+
labelPlural: 'DOCUMENT.Walls';
|
16
|
+
isEmbedded: true;
|
17
|
+
permissions: {
|
18
|
+
update: (user: BaseUser, doc: BaseWall, data: DeepPartial<WallDataConstructorData>) => boolean;
|
19
|
+
};
|
20
|
+
}
|
21
|
+
>;
|
22
|
+
|
9
23
|
/**
|
10
24
|
* The base Wall model definition which defines common behavior of an Wall document between both client and server.
|
11
25
|
*/
|
@@ -22,22 +36,10 @@ export declare class BaseWall extends Document<data.WallData, InstanceType<Confi
|
|
22
36
|
static get schema(): typeof data.WallData;
|
23
37
|
|
24
38
|
/** @override */
|
25
|
-
static get metadata():
|
26
|
-
DocumentMetadata,
|
27
|
-
{
|
28
|
-
name: 'Wall';
|
29
|
-
collection: 'walls';
|
30
|
-
label: 'DOCUMENT.Wall';
|
31
|
-
labelPlural: 'DOCUMENT.Walls';
|
32
|
-
isEmbedded: true;
|
33
|
-
permissions: {
|
34
|
-
update: typeof BaseWall._canUpdate;
|
35
|
-
};
|
36
|
-
}
|
37
|
-
>;
|
39
|
+
static get metadata(): WallMetadata;
|
38
40
|
|
39
41
|
/**
|
40
42
|
* Is a user able to update an existing Wall?
|
41
43
|
*/
|
42
|
-
protected static _canUpdate(user: BaseUser, doc: BaseWall, data
|
44
|
+
protected static _canUpdate(user: BaseUser, doc: BaseWall, data: DeepPartial<WallDataConstructorData>): boolean;
|
43
45
|
}
|
@@ -37,13 +37,15 @@ interface PackageAuthorDataConstructorData {
|
|
37
37
|
discord?: string | null | undefined;
|
38
38
|
}
|
39
39
|
|
40
|
+
type PackageAuthorDataSource = PropertiesToSource<PackageAuthorDataProperties>;
|
41
|
+
|
40
42
|
/**
|
41
43
|
* An inner data object which represents a single package author in the authors array.
|
42
44
|
*/
|
43
45
|
export class PackageAuthorData extends DocumentData<
|
44
46
|
PackageAuthorDataSchema,
|
45
47
|
PackageAuthorDataProperties,
|
46
|
-
|
48
|
+
PackageAuthorDataSource,
|
47
49
|
PackageAuthorDataConstructorData,
|
48
50
|
null
|
49
51
|
> {
|