import type { DynamicEntityDefinition, SaveEavValuesDto } from '../types/DynamicEntity.types'; import type { DynamicEntitiesFetcher } from './fetcher'; export interface DynamicEntitiesApiOptions { baseUrl: string; /** Transporte del anfitrión. Ausente → `fetch` global. */ fetcher?: DynamicEntitiesFetcher; } export interface DynamicEntitiesApiClient { getDefinition(featureCode: string, entityCode: string): Promise; saveValues(featureCode: string, entityCode: string, recordId: string, values: SaveEavValuesDto, idEntityMultiple?: string): Promise; getValues(featureCode: string, entityCode: string, recordId: string, idEntityMultiple?: string): Promise; deleteRecord(featureCode: string, recordId: string, idEntityMultiple?: string): Promise; getMultipleRecords(featureCode: string, entityCode: string, recordId: string): Promise; } /** * Construye el cliente EAV del módulo con un `baseUrl` y un transporte fijos. * * Preferir esta factory sobre el objeto `DynamicEntitiesApi`: aquí el transporte * viaja con el cliente, así que no hay forma de hacer una petición sin las * cabeceras del anfitrión. */ export declare function createDynamicEntitiesApi({ baseUrl, fetcher }: DynamicEntitiesApiOptions): DynamicEntitiesApiClient; /** * Fachada histórica que recibe el `baseUrl` en cada llamada. * * @deprecated Usar {@link createDynamicEntitiesApi} —o el hook * `useDynamicEntitiesApi`, que ya lo cablea con el contexto—. Se mantiene para no * romper a quien la importe: acepta el mismo `baseUrl` posicional y un `fetcher` * opcional al final de cada firma. */ export declare const DynamicEntitiesApi: { getDefinition: (baseUrl: string, featureCode: string, entityCode: string, fetcher?: DynamicEntitiesFetcher) => Promise; saveValues: (baseUrl: string, featureCode: string, entityCode: string, recordId: string, values: SaveEavValuesDto, idEntityMultiple?: string, fetcher?: DynamicEntitiesFetcher) => Promise; getValues: (baseUrl: string, featureCode: string, entityCode: string, recordId: string, idEntityMultiple?: string, fetcher?: DynamicEntitiesFetcher) => Promise; deleteRecord: (baseUrl: string, featureCode: string, recordId: string, idEntityMultiple?: string, fetcher?: DynamicEntitiesFetcher) => Promise; getMultipleRecords: (baseUrl: string, featureCode: string, entityCode: string, recordId: string, fetcher?: DynamicEntitiesFetcher) => Promise; }; //# sourceMappingURL=DynamicEntitiesApi.d.ts.map