import type { UmbManagementApiInFlightRequestCache } from '../inflight-request/cache.js';
import type { UmbManagementApiDetailDataCache } from './cache.js';
import { type UmbApiResponse, type UmbApiWithErrorResponse, type UmbDataApiResponse } from '../../core/resources/index.js';
import { UmbControllerBase } from '../../../libs/class-api/index.js';
import type { UmbControllerHost } from '../../../libs/controller-api/index.js';
export interface UmbManagementApiDetailDataRequestManagerArgs<DetailResponseModelType, CreateRequestModelType, UpdateRequestModelType> {
    create: (data: CreateRequestModelType) => Promise<UmbApiResponse<{
        data: unknown;
    }>>;
    read: (id: string) => Promise<UmbApiResponse<{
        data: DetailResponseModelType;
    }>>;
    update: (id: string, data: UpdateRequestModelType) => Promise<UmbApiResponse<{
        data: unknown;
    }>>;
    delete: (id: string) => Promise<UmbApiResponse<{
        data: unknown;
    }>>;
    readMany?: (ids: Array<string>) => Promise<UmbDataApiResponse<{
        data: {
            items: Array<DetailResponseModelType>;
        };
    }>>;
    dataCache: UmbManagementApiDetailDataCache<DetailResponseModelType>;
    inflightRequestCache: UmbManagementApiInFlightRequestCache<DetailResponseModelType>;
}
export declare class UmbManagementApiDetailDataRequestManager<DetailResponseModelType extends {
    id: string;
}, CreateRequestModelType, UpdateRequestModelType> extends UmbControllerBase {
    #private;
    constructor(host: UmbControllerHost, args: UmbManagementApiDetailDataRequestManagerArgs<DetailResponseModelType, CreateRequestModelType, UpdateRequestModelType>);
    /**
     * Creates a new item and returns the created item data.
     * @param {CreateRequestModelType} data - The data to create the item with.
     * @returns {Promise<UmbApiResponse<{ data?: DetailResponseModelType }>>} The API response containing the created item or an error.
     */
    create(data: CreateRequestModelType): Promise<UmbApiResponse<{
        data?: DetailResponseModelType;
    }>>;
    /**
     * Reads a single item by its ID.
     * Uses the cache if connected to server events and the item is cached, otherwise fetches from the server.
     * Deduplicates concurrent requests for the same ID using an in-flight request cache.
     * @param {string} id - The ID of the item to read.
     * @returns {Promise<UmbApiResponse<{ data?: DetailResponseModelType }>>} The API response containing the item or an error.
     */
    read(id: string): Promise<UmbApiResponse<{
        data?: DetailResponseModelType;
    }>>;
    /**
     * Reads multiple items by their IDs.
     * Only available if a readMany function was provided in the constructor args.
     * Deduplicates concurrent requests: if an ID is already being fetched by another
     * concurrent readMany call, it waits for that request instead of re-fetching.
     * @param {Array<string>} ids - The IDs of the items to read
     * @returns {Promise<UmbApiResponse<{ data?: { items: Array<DetailResponseModelType> } }>>} - The API response containing the items or an error
     */
    readMany(ids: Array<string>): Promise<UmbApiResponse<{
        data?: {
            items: Array<DetailResponseModelType>;
        };
    }>>;
    /**
     * Updates an existing item and returns the updated item data.
     * @param {string} id - The ID of the item to update.
     * @param {UpdateRequestModelType} data - The data to update the item with.
     * @returns {Promise<UmbApiResponse<{ data?: DetailResponseModelType }>>} The API response containing the updated item or an error.
     */
    update(id: string, data: UpdateRequestModelType): Promise<UmbApiResponse<{
        data?: DetailResponseModelType;
    }>>;
    /**
     * Deletes an item by its ID.
     * If connected to server events, the item is also removed from the cache.
     * @param {string} id - The ID of the item to delete.
     * @returns {Promise<UmbApiWithErrorResponse>} The API response containing an error if the deletion failed.
     */
    delete(id: string): Promise<UmbApiWithErrorResponse>;
}
