Skip to Content

Types

Object shapes referenced from more than one method’s parameters or return value.

RequestConfig

Configuration options accepted by all request methods: query(), queryRecord(), findAll(), and findRecord().

Kind: global typedef
Properties

NameTypeDefaultDescription
[alias]stringStore the response data under this alias name. The resolved records are then accessible via getAlias() and the request hash via getRequestAlias().
[autoResolve]booleantrueWhen true (default), the method returns the reactive request hash object immediately (useful for binding directly in UI components). When false, returns the raw Axios Promise so you can await the result and handle loading/error state yourself.
[skip]booleanWhen true, skip making the network request entirely. Useful for conditional fetching.
[skipId]stringA unique value (typically a UUID) that forces the request to bypass the internal cache and always re-fetch from the server. Each unique skipId value is treated as a new request.
[ignorePayload]Array.<string>An array of attribute keys to omit from the request payload when saving a record via record.save().
[override]ObjectOverride specific parts of the request URL or headers for this single request only.
[override.host]stringOverride the base host URL (e.g. 'https://other-api.com').
[override.namespace]stringOverride the API namespace (e.g. 'api/v2').
[override.path]stringOverride the full request path.
[override.headers]ObjectAdditional headers to merge into the request.

CollectionRecord

A record object returned from the collection after a fetch or local lookup. ARM injects these methods at runtime onto every record pushed into a collection.

Kind: global typedef
Properties

NameTypeDescription
idstring | numberThe record’s identifier (numeric or string).
typestringThe resource type (matches the collection name).
attributesObjectThe record’s attribute payload from the API.
[relationships]ObjectOptional JSON:API relationships block.
hashIdstringInternal MD5-based unique key used by ARM.
collectionNamestringThe collection this record belongs to.
isLoadingbooleantrue while a save/reload/destroy request is in flight.
isErrorbooleantrue if the last request for this record errored.
isDirtybooleantrue if the record has unsaved local changes.
isPristinebooleantrue if the record matches its last-saved state.
originalRecordObjectSnapshot of the record at the time it was last synced.
getfunctionRead a property by dot-notation key.
setfunctionSet a single property and update dirty state.
setPropertiesfunctionSet multiple properties at once.
rollbackAttributesfunctionRevert all changes back to originalRecord.
savefunctionPersist changes to the server (PUT) or create (POST).
reloadfunctionRe-fetch this record from the server.
destroyRecordfunctionDelete this record from the server and unload it locally.
getCollectionfunctionRetrieve related records from a local collection using this record’s relationship data.

DefaultRequestArrayResponse

Default response object for array-based requests.

Kind: global typedef
Properties

NameTypeDescription
isLoadingbooleanIndicates if the request is loading.
isErrorbooleanIndicates if an error occurred during the request.
isNewbooleanIndicates if the response is new.
dataArrayThe main data array returned by the request.
includedArrayAdditional included data related to the response.
metaObjectMetadata about the response.
errorObjectError information, if any (null if no error).

DefaultRequestObjectResponse

Default response object for object-based requests.

Kind: global typedef
Properties

NameTypeDescription
isLoadingbooleanIndicates if the request is loading.
isErrorbooleanIndicates if an error occurred during the request.
isNewbooleanIndicates if the response is new.
dataObjectThe main data object returned by the request.
includedArrayAdditional included data related to the response.
metaObjectMetadata about the response.
errorObjectError information, if any (null if no error).
Last updated on