ReadonlyidThe id property is a unique identifier for the file.
ReadonlynameThe name for the file
ReadonlyrevnThe revn will change for every document update
ReadonlypagesList all the pages for the current file
Retrieves the versions for the file.
Optionalcriteria: { createdBy: User }Saves the current version into the versions history.
Requires the content:write permission.
Runs the referential-integrity validation on the file and returns the list of errors found. An empty array means the file is valid. Useful to detect inconsistencies (dangling references, broken components/variants, …) that the backend would otherwise reject when the file is saved.
If we know the namespace of an external plugin, this is the way to get their data.
The namespace for the shared data.
The key for which to retrieve the data.
Returns the shared data associated with the key as a string.
Sets the shared plugin-specific data for the given namespace and key.
The namespace for the shared data.
The key for which to set the data.
The data to set for the key.
Retrieves all the keys for the shared plugin-specific data in the given namespace.
The namespace for the shared data.
Returns an array of strings representing all the keys in the namespace.
File represents a file in the Penpot application. It includes properties for the file's identifier, name, and revision number.