import { UmbRepositoryBase } from '../repository-base.js'; import type { UmbRepositoryErrorResponse, UmbRepositoryResponse, UmbRepositoryResponseWithAsObservable } from '../types.js'; import type { UmbDetailDataSource, UmbDetailDataSourceConstructor } from './detail-data-source.interface.js'; import type { UmbDetailRepository } from './detail-repository.interface.js'; import type { UmbControllerHost } from '../../../../libs/controller-api/index.js'; import type { UmbContextToken } from '../../../../libs/context-api/index.js'; import type { UmbApi } from '../../../../libs/extension-api/index.js'; import type { UmbEntityModel } from '../../entity/index.js'; import type { UmbDeepPartialObject } from '../../utils/index.js'; import type { Observable } from '../../../../external/rxjs/index.js'; export declare abstract class UmbDetailRepositoryBase = UmbDetailDataSource> extends UmbRepositoryBase implements UmbDetailRepository, UmbApi { #private; protected detailDataSource: UmbDetailDataSourceType; constructor(host: UmbControllerHost, detailSource: UmbDetailDataSourceConstructor, detailStoreContextAlias: string | UmbContextToken); /** * Creates a scaffold * @param {UmbDeepPartialObject} [preset] - Partial data to seed the scaffold with * @returns {Promise>} The scaffolded detail data * @memberof UmbDetailRepositoryBase */ createScaffold(preset?: UmbDeepPartialObject): Promise>; /** * Requests the detail for the given unique * @param {string} unique - The unique identifier of the detail * @returns {Promise>} The requested detail data * @memberof UmbDetailRepositoryBase */ requestByUnique(unique: string): Promise>; /** * Returns a promise with an observable of the detail for the given unique * @param {DetailModelType} model - The data to create * @param {string | null} [parentUnique] - The unique of the parent, if any * @returns {Promise>} The created detail data * @memberof UmbDetailRepositoryBase */ create(model: DetailModelType, parentUnique: string | null): Promise>; /** * Saves the given data * @param {DetailModelType} model - The data to save * @returns {Promise>} The saved detail data * @memberof UmbDetailRepositoryBase */ save(model: DetailModelType): Promise<{ data: DetailModelType | undefined; error: Error | import("../../resources/umb-error.js").UmbError | import("../../resources/umb-error.js").UmbCancelError | import("../../resources/umb-error.js").UmbApiError | undefined; }>; /** * Deletes the detail for the given unique * @param {string} unique - The unique identifier of the detail to delete * @returns {Promise} The result of the delete request * @memberof UmbDetailRepositoryBase */ delete(unique: string): Promise; /** * Returns a promise with an observable of the detail for the given unique * @param {string} unique - The unique identifier of the detail * @returns {Promise>} An observable of the detail data * @memberof UmbDetailRepositoryBase */ byUnique(unique: string): Promise>; destroy(): void; }