The resource object from the API.
Whether or not the resource exists on the server.
The time at which the model's data was last updated. Watching the value of this property is a fast way to retain/cache a subtree if data hasn't changed.
Protected
storeThe data store that this resource should be persisted to.
Static
ADMINISTRATOR_Static
GUEST_Static
MEMBER_Protected
apiProtected
copySend a request to delete the resource.
Data to send along with the DELETE request.
Merge new attributes into this model locally.
The attributes to merge.
Merge new data into this model locally.
A resource object to merge into this model
Protected
rawMerge new attributes into this model, both locally and with persistence.
The attributes to save. If a 'relationships' key exists, it will be extracted and relationships will also be saved.
Static
attributeGenerate a function which returns the value of the given attribute.
Generate a function which returns the value of the given attribute.
Static
Protected
getGet a resource identifier object for the given model.
Static
hasGenerate a function which returns the value of the given has-many relationship.
false if no information about the relationship exists; an array if it does, containing models if they have been loaded, and undefined for those that have not.
Generate a function which returns the value of the given has-many relationship.
false if no information about the relationship exists; an array if it does, containing models if they have been loaded, and undefined for those that have not.
Static
hasGenerate a function which returns the value of the given has-one relationship.
false if no information about the relationship exists; undefined if the relationship exists but the model has not been loaded; or the model if it has been loaded.
Generate a function which returns the value of the given has-one relationship.
false if no information about the relationship exists; undefined if the relationship exists but the model has not been loaded; or the model if it has been loaded.
Static
transformTransform the given value into a Date object.
Generated using TypeDoc v0.24.8
The
Model
class represents a local data resource. It provides methods to persist changes via the API.