import { UmbRepositoryBase } from './repository-base.js'; import type { UmbApi } from '../../../libs/extension-api/index.js'; import type { UmbContextToken } from '../../../libs/context-api/index.js'; import type { UmbControllerHost } from '../../../libs/controller-api/index.js'; import type { UmbStoreObjectBase } from '../store/index.js'; import { type Observable } from '../../../external/rxjs/index.js'; /** * Base class for a repository exposing a single configuration object backed by an {@link UmbStoreObjectBase}. * The configuration is fetched once per store context on initialization; `all()` and `part()` defer internally * until it is ready, so consumers can subscribe immediately without awaiting. */ export declare abstract class UmbConfigRepositoryBase extends UmbRepositoryBase implements UmbApi { #private; /** * Promise that resolves when the repository has been initialized, i.e. when the configuration has been fetched from the server. * @deprecated Deprecated since v17. Awaiting this is no longer necessary — all() and part() defer internally * until the configuration is ready, so you can subscribe directly. Scheduled for removal in Umbraco 19. * @returns {Promise} A promise that resolves once the configuration has been fetched. */ get initialized(): Promise; constructor(host: UmbControllerHost, storeContext: UmbContextToken>, repositoryAlias?: string); /** * Fetches the configuration from the server. Implemented by the concrete repository using its own data source. * @returns {Promise} The configuration, or undefined if it could not be fetched. */ protected abstract _requestConfig(): Promise; /** * Subscribe to the entire configuration. * @returns {Observable} An observable of the configuration. */ all(): Observable; /** * Subscribe to a part of the configuration. * @template {keyof ConfigModel} Part * @param {Part} part The configuration key to subscribe to. * @returns {Observable} An observable of that part. */ part(part: Part): Observable; }