/**
 * Entity API Client
 *
 * Centralized API client for entity CRUD operations
 */
export interface EntityData {
    id?: string;
    [key: string]: unknown;
}
export interface EntityListParams {
    page?: number;
    limit?: number;
    userId?: string;
    filters?: Record<string, string>;
    includeMeta?: boolean;
}
export interface EntityListResponse {
    success: true;
    data: EntityData[];
    info: {
        timestamp: string;
        page: number;
        limit: number;
        total: number;
        totalPages: number;
        hasNextPage: boolean;
        hasPrevPage: boolean;
    };
}
export interface EntityStats {
    total: number;
    recentCount: number;
    growth: number;
    status?: {
        [key: string]: number;
    };
}
export interface BulkOperation {
    id: string;
    name: string;
    description: string;
    icon?: string;
    requiresConfirmation?: boolean;
}
export interface DashboardEntityResponse {
    success: true;
    data: EntityData[];
    stats: EntityStats;
    availableOperations: BulkOperation[];
    info: {
        timestamp: string;
        entityType: string;
        hasOverride: boolean;
    };
}
/**
 * Generic entity API client
 */
export declare class EntityApiClient {
    private baseUrl;
    constructor(baseUrl?: string);
    /**
     * Get endpoint path from entity configuration using slug
     * This ensures consistent URLs across routes, endpoints, and navigation
     */
    private getEndpointPath;
    /**
     * Get list of entities
     */
    list(entityType: string, params?: EntityListParams): Promise<EntityListResponse>;
    /**
     * Get single entity by ID
     */
    get(entityType: string, id: string, includeMeta?: boolean): Promise<EntityData>;
    /**
     * Create new entity
     */
    create(entityType: string, data: EntityData, extraHeaders?: Record<string, string>): Promise<EntityData>;
    /**
     * Update entity
     */
    update(entityType: string, id: string, data: Partial<EntityData>): Promise<EntityData>;
    /**
     * Delete entity
     */
    delete(entityType: string, id: string): Promise<{
        deleted: boolean;
        id: string;
    }>;
    /**
     * Get dashboard data with stats and bulk operations
     * Optimized for dashboard views with additional metadata
     */
    getDashboardData(entityType: string, params?: EntityListParams): Promise<DashboardEntityResponse>;
    /**
     * Get entity statistics for dashboard metrics
     */
    getEntityStats(entityType: string): Promise<EntityStats>;
    /**
     * Calculate basic stats from entity list (fallback)
     */
    private calculateBasicStats;
    /**
     * Get available bulk operations for entity
     */
    getBulkOperations(entityType: string): Promise<BulkOperation[]>;
    /**
     * Execute bulk operation on multiple entities
     */
    executeBulkOperation(entityType: string, operationId: string, entityIds: string[], params?: Record<string, unknown>): Promise<{
        success: boolean;
        processed: number;
        errors: string[];
    }>;
    /**
     * Get entity activity/audit log for dashboard
     */
    getEntityActivity(entityType: string, limit?: number): Promise<Record<string, unknown>[]>;
    /**
     * Duplicate an entity — fetches the original, strips identity fields, and creates a copy
     */
    duplicate(entityType: string, id: string): Promise<EntityData>;
    /**
     * Detect if entity has custom override (client-side detection)
     */
    private detectEntityOverride;
}
export declare const entityApi: EntityApiClient;
export declare const createEntityData: (entityType: string, data: EntityData) => Promise<EntityData>;
export declare const updateEntityData: (entityType: string, id: string, data: Partial<EntityData>) => Promise<EntityData>;
export declare const deleteEntityData: (entityType: string, id: string) => Promise<{
    deleted: boolean;
    id: string;
}>;
export declare const getEntityData: (entityType: string, id: string, includeMeta?: boolean) => Promise<EntityData>;
export declare const listEntityData: (entityType: string, params?: EntityListParams) => Promise<EntityListResponse>;
export declare const duplicateEntityData: (entityType: string, id: string) => Promise<EntityData>;
/**
 * Get child entities for a parent entity
 * Example: Get order items for an order
 */
export declare const getEntityChildren: (parentEntityType: string, parentId: string, childEntityName: string, params?: EntityListParams) => Promise<EntityData[]>;
/**
 * Fetch wrapper that automatically includes team context headers
 * Used by theme components to make API calls with team isolation
 *
 * @param url - The URL to fetch (can be relative like '/api/v1/activities')
 * @param options - Standard fetch options
 * @returns Promise<Response> - The fetch response
 *
 * @example
 * const response = await fetchWithTeam('/api/v1/activities')
 * const data = await response.json()
 */
export declare function fetchWithTeam(url: string, options?: RequestInit): Promise<Response>;
//# sourceMappingURL=entities.d.ts.map