SettingsStoreFieldConfig
SettingsStoreFieldConfig
Configuration for a settings store field, defining how it should be stored, scoped, validated, and accessed.
Signature
interface SettingsStoreFieldConfig {
name: string;
scope?: SettingsStoreScopeFunction;
readonly?: boolean;
requiresPermission?: Array<Permission | string> | Permission | string;
validate?: (
value: any,
injector: Injector,
ctx: RequestContext,
) => string | LocalizedString[] | void | Promise<string | LocalizedString[] | void>;
}
name
property
string
The name of the field. This will be combined with the namespace to create the full key (e.g., 'dashboard.theme').
scope
property
Function that determines how this field should be scoped. Defaults to global scoping (no isolation).
readonly
property
boolean
default:
false
Whether this field is readonly via the GraphQL API. Readonly fields can still be modified programmatically via a service.
requiresPermission
property
Array<Permission | string> | Permission | string
Permissions required to access this field. If not specified, basic authentication is required for admin API access.
validate
property
( value: any, injector: Injector, ctx: RequestContext, ) => string | LocalizedString[] | void | Promise<string | LocalizedString[] | void>
Custom validation function for field values.