The compendium metadata which defines the compendium content and location
A subsidiary collection which contains the more minimal index of the pack
A reference to the Application class which provides an interface to interact with this compendium content.
An Array of application references which will be automatically updated when the collection content changes
Record the set of document ids where the Document was not initialized because of invalid source data
The set of Compendium Folders
Track which document fields have been indexed for this compendium pack
The amount of time that Document instances within this CompendiumCollection are held in memory. Accessing the contents of the Compendium pack extends the duration of this lifetime.
The named game setting which contains Compendium configurations.
The base Document type which is contained within this DocumentCollection
The canonical Compendium name - comprised of the originating package and the pack name
The banner image for this Compendium pack, or the default image for the pack type if no image is set.
Get the Folder that this Compendium is displayed within
Get the sort order for this Compendium
Access the compendium configuration data for this pack
Track whether the Compendium Collection is locked for editing
The visibility configuration of this compendium pack. A value in CONST.USER_ROLES
Is this Compendium pack visible to the current game User?
A convenience reference to the label which should be used as the title for the Compendium pack.
The index fields which should be loaded for this compendium pack
Has this compendium pack been fully indexed?
A reference to the Document class definition which is contained within this DocumentCollection.
The Collection class name
Assign this CompendiumCollection to be organized within a specific Folder.
The desired Folder within the World or null to clear the folder
A promise which resolves once the transaction is complete
Get an element from the DocumentCollection by its ID.
The ID of the Document to retrieve.
Additional options to configure retrieval.
Load the Compendium index and cache it as the keys and values of the Collection.
Options which customize how the index is created
Get a single Document from this Compendium by ID. The document may already be locally cached, otherwise it is retrieved from the server.
The requested Document id
The retrieved Document instance
Load multiple documents from the Compendium pack using a provided query object.
A database query used to retrieve documents from the underlying database
The retrieved Document instances
Get the ownership level that a User has for this Compendium pack.
The user being tested
The ownership level in CONST.DOCUMENT_OWNERSHIP_LEVELS
Test whether a certain User has a requested permission level (or greater) over the Compendium pack
The User being tested
The permission level from DOCUMENT_OWNERSHIP_LEVELS to test
Additional options involved in the permission test
Does the user have this permission level over the Compendium pack?
Import a Document into this Compendium Collection.
The existing Document you wish to import
The imported Document instance
Import a Folder into this Compendium Collection.
The existing Folder you wish to import
Additional options which modify how the data is imported.
Import an array of Folders into this Compendium Collection.
The existing Folders you wish to import
Additional options which modify how the data is imported.
Fully import the contents of a Compendium pack into a World folder.
Options which modify the import operation. Additional options are forwarded to {@link WorldCollection#fromCompendium} and Document.createDocuments
The imported Documents, now existing within the World
Provide a dialog form that prompts the user to import the full contents of a Compendium pack into the World.
A promise which resolves in the following ways: an array of imported Documents if the "yes" button was pressed, false if the "no" button was pressed, or null if the dialog was closed without making a choice.
Add a Document to the index, capturing its relevant index attributes
The document to index
Prompt the gamemaster with a dialog to configure ownership of this Compendium pack.
The configured ownership for the pack
Generate a UUID for a given primary document ID within this Compendium pack
The document ID to generate a UUID for
The generated UUID, in the form of "Compendium.
Assign configuration metadata settings to the compendium pack
The object of compendium settings to define
A Promise which resolves once the setting is updated
Delete an existing world-level Compendium Collection. This action may only be performed for world-level packs by a Gamemaster User.
Duplicate a compendium pack to the current World.
A new Compendium label
Migrate a compendium pack. This operation re-saves all documents within the compendium pack to disk, applying the current data model. If the document type has system data, the latest system data template will also be applied to all documents.
Update all objects in this DocumentCollection with a provided transformation. Conditionally filter to only apply to Entities which match a certain condition.
An object of data or function to apply to all matched objects
A function which tests whether to target each object
An array of updated data once the operation is complete
Follow-up actions taken after a set of Documents in this Collection are created.
An Array of created Documents
An Array of created data objects
Options which modified the creation operation
The ID of the User who triggered the operation
Follow-up actions taken after a set of Documents in this Collection are updated.
An Array of updated Documents
An Array of incremental data objects
Options which modified the update operation
The ID of the User who triggered the operation
Follow-up actions taken after a set of Documents in this Collection are deleted.
An Array of deleted Documents
An Array of document IDs being deleted
Options which modified the deletion operation
The ID of the User who triggered the operation
Handle shifting documents in a deleted folder to a new parent folder.
The parent folder to which documents should be shifted
The ID of the folder being deleted
Whether to delete the contents of the folder
An array of document IDs to deleted
Instantiate a Document for inclusion in the Collection.
The Document data.
Obtain a temporary Document instance for a document id which currently has invalid source data.
A document ID with invalid source data.
Additional options to configure retrieval.
An in-memory instance for the invalid Document
Render any Applications associated with this DocumentCollection.
Find all Documents which match a given search term using a full-text search against their indexed HTML fields and their name. If filters are provided, results are filtered to only those that match the provided values.
An object configuring the search
Preliminary actions taken before a set of Documents in this Collection are created.
An Array of created data objects
Options which modified the creation operation
The ID of the User who triggered the operation
Preliminary actions taken before a set of Documents in this Collection are updated.
An Array of incremental data objects
Options which modified the update operation
The ID of the User who triggered the operation
Preliminary actions taken before a set of Documents in this Collection are deleted.
An Array of document IDs being deleted
Options which modified the deletion operation
The ID of the User who triggered the operation
Validate that the current user is able to modify content of this Compendium pack
Follow-up actions taken when Documents within this Compendium pack are modified
Create a new Compendium Collection using provided metadata.
The compendium metadata used to create the new pack
Additional options which modify the Compendium creation request
Get the searchable fields for a given document or index, based on its data model
The document type name
The dot-delimited property paths of searchable fields
A collection of Document objects contained within a specific compendium pack. Each Compendium pack has its own associated instance of the CompendiumCollection class which contains its contents.
{Game#packs}
The compendium metadata, an object provided by game.data