---
url: "https://vueda.dev/v3/reference/api/js/stores/storeModelConfig/functions/storeModelConfig.md"
title: "storeModelConfig"
---

# storeModelConfig

## Overview

A store for model configuration.

## Signature

`storeModelConfig(pinia, hot)`

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| <span id="param-pinia">pinia</span> | `Pinia` | no | Pinia instance to retrieve the store |
| <span id="param-hot">hot</span> | `StoreGeneric` | no | dev only hot module replacement |

### Returns

`Store`

## Properties

### $id {#id}

Id of the store. Used by map helpers.

Type: `"modelConfig"`

Source: `node_modules/.pnpm/pinia@3.0.4_typescript@5.9.3_vue@3.5.43_typescript@5.9.3_/node_modules/pinia/dist/pinia.d.ts:654`

### authScopeGeneration {#authScopeGeneration}

Incremented by `clearAuthScoped`. Builds capture it before awaiting and discard their
result if it changed while the build was in flight.

Type: `number`

Source: `client/lib/stores/storeModelConfig.js:619`

### builtConfigs {#builtConfigs}

Finished configs that `getConfig` built from model info and both kinds of overrides. The key
is the app, model, and view dot name, or the app and model dot name when no view was given.

Type: `object`

Source: `client/lib/stores/storeModelConfig.js:603`

### genericConfigs {#genericConfigs}

View-independent config overrides that `setConfig` stores, keyed by app and model dot name.

Type: `object`

Source: `client/lib/stores/storeModelConfig.js:589`

### initialized {#initialized}

The in-flight `getConfig` builds. The key is the app, model, and view dot name. When no view
was given, the key is the app and model dot name. A build that succeeds or is cancelled
removes its entry. A build that fails keeps its rejected promise here until `setConfig` for
the model or `clearAuthScoped` removes it. Each promise has a `cancel` method.

Type: `object`

Source: `client/lib/stores/storeModelConfig.js:612`

### specificConfigs {#specificConfigs}

View-specific config overrides that `setConfig` stores, keyed by app, model, and view dot name.
A `read` view is stored under `retrieve`.

Type: `object`

Source: `client/lib/stores/storeModelConfig.js:596`

## Methods

- [clearAuthScoped](/v3/reference/api/js/stores/storeModelConfig/methods/clearAuthScoped.md) - Drops the built configs, because they are derived from permission-filtered model info.
- [getConfig](/v3/reference/api/js/stores/storeModelConfig/methods/getConfig.md) - Builds the merged config for a model, or for one of its views, and caches it.
- [setConfig](/v3/reference/api/js/stores/storeModelConfig/methods/setConfig.md) - Stores generic and view-specific model config overrides.

## Source

`client/lib/stores/storeModelConfig.js:582`
