export { I as IGroup, a as IGroupLocation } from './group.interface-BbQHuhIW.js'; export { I as IModule } from './module.interface-B2SHWtNv.js'; export { I as ICrop } from './crop.entities-Dd6QL8u1.js'; export { g as IBlock, I as ICustomer, b as ICustomerCrop, h as ICustomerGeolocation, d as ICustomerIndicator, f as ICustomerVariety, a as IFarmBlockStructure, c as IFarmType, e as ISizes } from './customer.entities-C2iGl9KF.js'; export { A as AffectedParts, C as ControlMethodType, D as DamageType, I as IAssociatedDisease, a as IControlMethod, b as IControlMethodOption, c as IIndicatorCategory, d as IIndicators, e as IOption, f as IReference, g as IRegionAffected, P as PestType, S as Severity } from './indicator.entities-C-qukE1L.js'; export { I as ILayer, L as LayerType } from './layer.entities-MszDgJAM.js'; export { I as IPermissions } from './permission.entities-Dxx9IAbQ.js'; export { I as IRole } from './role.entities-Bimwb-vf.js'; export { I as Bed, B as BulkCaptureStatus, C as CommitChangeAction, a as CommitChangeLevel, F as FarmSize, b as FarmStateConfig, c as FarmType, G as GeoUnitGranularity, d as GeoUnitType, e as IBulkCaptureInput, f as IBulkCaptureItem, g as IBulkCaptureResponse, h as ICommit, i as ICommitChange, j as ICommitListResponse, k as IDraftReadiness, l as IFarm, m as IFarmBed, n as IFarmBlock, o as IFarmCell, p as IFarmNaveAlignment, q as IFarmSquare, r as IFarmsResponse, s as IGeoLocation, t as IGeoUnit, u as IGeoUnitsResponse, v as ILineageAuditResponse, w as ILineageEntry, x as INote, y as IObservationTask, z as IPlantingBatchItem, A as IPlantingBatchItemResult, D as IPlantingBatchResponse, E as IPlantingValidationResponse, H as IRuntimeBoundaryReadiness, J as IRuntimeSurfaceSnapshot, K as IStructure, L as IStructureBlockPayload, M as IStructureLocationLevel, N as IStructureObservationPayload, O as IStructureUploadRequest, P as IStructureUploadResponse, Q as IVersionDetail, R as IVersionSummary, S as IdentityQuality, T as LineageClassification, U as LineageConfidence, V as Nave, W as ObservationStatus, X as PlantingBatchCode, Y as Square } from './version.entities-Cn8cc2qP.js'; export { I as IUserCreate } from './user-create.dto-BJuUsn3F.js'; export { a as IEmail, I as IProfile, b as IUser } from './user.entities-89r-QDXP.js'; export { F as FragranceLevel, I as IVariety, a as IVarietyUpsert, P as PropagationMethod } from './variety.entities-l3C00KaA.js'; /** * Adaptador de almacenamiento del token de sesión. * * Permite a cada app elegir dónde vive el JWT: `localStorage` (por defecto), * `sessionStorage`, memoria, o cookies gestionadas por el backend. * * > Nota de seguridad: `localStorage` es accesible desde cualquier script, por lo que * > un XSS puede robar el token. Para máxima seguridad, usa cookies `HttpOnly` * > gestionadas por el servidor (en ese caso `getToken()` devuelve `null` y el navegador * > adjunta la cookie automáticamente). */ interface TokenStorage { /** Devuelve el token actual, o `null` si no hay sesión. */ getToken(): string | null; /** Elimina el token (se llama al detectar 401 o expiración). */ removeToken(): void; } /** * Adaptador por defecto basado en `localStorage`, compatible con el comportamiento previo: * lee la clave `tokenKey` y le quita comillas envolventes (algunos backends guardan el JWT * como string JSON, p. ej. `"eyJ..."`). */ declare function createLocalStorageTokenStorage(tokenKey: string): TokenStorage; interface HttpConfig { /** Valor del header `auth` que identifica la app en el gateway. */ clientId: 'web_admin' | 'web_client' | 'mobile_config'; /** * URL base del API. Tiene prioridad sobre `import.meta.env.VITE_API_URL`. * Defínela cuando la app consumidora no use Vite (Next.js, Webpack, CRA, etc.). */ baseURL?: string; /** Qué hacer cuando la API responde 401: limpiar cache, mostrar toast, redirigir, etc. */ onUnauthorized?: () => void; /** Clave en localStorage donde se guarda el token. Por defecto: 'uuid'. Ignorada si pasas `tokenStorage`. */ tokenKey?: string; /** * Adaptador de almacenamiento del token. Por defecto usa `localStorage` con `tokenKey`. * Pásalo para usar `sessionStorage`, memoria o cookies `HttpOnly` gestionadas por el backend. */ tokenStorage?: TokenStorage; /** * Timeout en ms para cada request. Por defecto: 15 000 ms. * Pasado ese tiempo el request se cancela con error de timeout. */ timeout?: number; /** * Clave secreta compartida con el gateway para firmar cada request con HMAC-SHA256. * El gateway puede verificar el header `X-Signature` y rechazar requests sin firma válida. * Si no se configura, el header no se envía. */ signingKey?: string; /** * Número máximo de reintentos en errores de red o respuestas 5xx. * No se reintenta en errores 4xx. Por defecto: 2. */ maxRetries?: number; } declare function createHttpConfig(config: HttpConfig): void; export { type HttpConfig, type TokenStorage, createHttpConfig, createLocalStorageTokenStorage };