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 { create: (data: CreateRequestModelType) => Promise>; read: (id: string) => Promise>; update: (id: string, data: UpdateRequestModelType) => Promise>; delete: (id: string) => Promise>; readMany?: (ids: Array) => Promise; }; }>>; dataCache: UmbManagementApiDetailDataCache; inflightRequestCache: UmbManagementApiInFlightRequestCache; } export declare class UmbManagementApiDetailDataRequestManager extends UmbControllerBase { #private; constructor(host: UmbControllerHost, args: UmbManagementApiDetailDataRequestManagerArgs); /** * Creates a new item and returns the created item data. * @param {CreateRequestModelType} data - The data to create the item with. * @returns {Promise>} The API response containing the created item or an error. */ create(data: CreateRequestModelType): Promise>; /** * 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>} The API response containing the item or an error. */ read(id: string): Promise>; /** * 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} ids - The IDs of the items to read * @returns {Promise } }>>} - The API response containing the items or an error */ readMany(ids: Array): Promise; }; }>>; /** * 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>} The API response containing the updated item or an error. */ update(id: string, data: UpdateRequestModelType): Promise>; /** * 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} The API response containing an error if the deletion failed. */ delete(id: string): Promise; }