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
| Name | Type | Default | Description |
|---|---|---|---|
| [alias] | string | Store the response data under this alias name. The resolved records are then accessible via getAlias() and the request hash via getRequestAlias(). | |
| [autoResolve] | boolean | true | When 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] | boolean | When true, skip making the network request entirely. Useful for conditional fetching. | |
| [skipId] | string | A 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] | Object | Override specific parts of the request URL or headers for this single request only. | |
| [override.host] | string | Override the base host URL (e.g. 'https://other-api.com'). | |
| [override.namespace] | string | Override the API namespace (e.g. 'api/v2'). | |
| [override.path] | string | Override the full request path. | |
| [override.headers] | Object | Additional 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
| Name | Type | Description |
|---|---|---|
| id | string | number | The record’s identifier (numeric or string). |
| type | string | The resource type (matches the collection name). |
| attributes | Object | The record’s attribute payload from the API. |
| [relationships] | Object | Optional JSON:API relationships block. |
| hashId | string | Internal MD5-based unique key used by ARM. |
| collectionName | string | The collection this record belongs to. |
| isLoading | boolean | true while a save/reload/destroy request is in flight. |
| isError | boolean | true if the last request for this record errored. |
| isDirty | boolean | true if the record has unsaved local changes. |
| isPristine | boolean | true if the record matches its last-saved state. |
| originalRecord | Object | Snapshot of the record at the time it was last synced. |
| get | function | Read a property by dot-notation key. |
| set | function | Set a single property and update dirty state. |
| setProperties | function | Set multiple properties at once. |
| rollbackAttributes | function | Revert all changes back to originalRecord. |
| save | function | Persist changes to the server (PUT) or create (POST). |
| reload | function | Re-fetch this record from the server. |
| destroyRecord | function | Delete this record from the server and unload it locally. |
| getCollection | function | Retrieve related records from a local collection using this record’s relationship data. |
DefaultRequestArrayResponse
Default response object for array-based requests.
Kind: global typedef
Properties
| Name | Type | Description |
|---|---|---|
| isLoading | boolean | Indicates if the request is loading. |
| isError | boolean | Indicates if an error occurred during the request. |
| isNew | boolean | Indicates if the response is new. |
| data | Array | The main data array returned by the request. |
| included | Array | Additional included data related to the response. |
| meta | Object | Metadata about the response. |
| error | Object | Error information, if any (null if no error). |
DefaultRequestObjectResponse
Default response object for object-based requests.
Kind: global typedef
Properties
| Name | Type | Description |
|---|---|---|
| isLoading | boolean | Indicates if the request is loading. |
| isError | boolean | Indicates if an error occurred during the request. |
| isNew | boolean | Indicates if the response is new. |
| data | Object | The main data object returned by the request. |
| included | Array | Additional included data related to the response. |
| meta | Object | Metadata about the response. |
| error | Object | Error information, if any (null if no error). |
Last updated on