/**
 * Team Export/Import Service
 *
 * Bundles a team's config, prompts, norms, and cron tasks into a single
 * exportable JSON document. Supports importing from that format to create
 * a complete team with all associated data.
 *
 * Part of the team-scoped cron feature (Phase 3).
 *
 * @module services/core/team-export.service
 */
import type { Team } from '../../types/index.js';
import type { CronTask } from '../../types/cron-task.types.js';
import type { StorageService } from './storage.service.js';
/**
 * Complete team export bundle containing all team data.
 *
 * This is the portable format for team backup, migration, and sharing.
 */
export interface TeamExport {
    /** Format version for forward compatibility */
    version: '1.0';
    /** ISO timestamp when the export was created */
    exportedAt: string;
    /** Team configuration (config.json content) */
    team: Team;
    /** Member prompts: memberId → prompt content */
    prompts: Record<string, string>;
    /** Team norms/SOPs: filename → markdown content */
    norms: Record<string, string>;
    /** Team-scoped cron tasks */
    cronTasks: CronTask[];
}
/**
 * Result of a team import operation.
 */
export interface TeamImportResult {
    /** The created team (may have new ID if conflict) */
    team: Team;
    /** Number of prompts written */
    promptsImported: number;
    /** Number of norms written */
    normsImported: number;
    /** Number of cron tasks created (with new IDs) */
    cronTasksImported: number;
}
/**
 * Service for exporting and importing complete team bundles.
 *
 * Export collects: config.json + prompts/*.md + norms/*.md + cron-tasks.json
 * Import creates: team directory + prompts + norms + cron tasks with new IDs
 */
export declare class TeamExportService {
    private storageService;
    /**
     * Create a new TeamExportService.
     *
     * @param storageService - StorageService for team data access
     */
    constructor(storageService: StorageService);
    /**
     * Export a team and all its associated data as a single JSON bundle.
     *
     * Collects:
     * - Team config (config.json)
     * - Member prompts (prompts/*.md)
     * - Norms/SOPs (norms/*.md)
     * - Cron tasks (cron-tasks.json)
     *
     * @param teamId - ID of the team to export
     * @returns Complete team export bundle
     * @throws Error if team not found
     */
    exportTeam(teamId: string): Promise<TeamExport>;
    /**
     * Import a team from a complete export bundle.
     *
     * Creates:
     * - Team via storageService.saveTeam()
     * - Prompts written to teams/{teamId}/prompts/
     * - Norms written to teams/{teamId}/norms/
     * - Cron tasks with NEW IDs to teams/{teamId}/cron-tasks.json
     *
     * @param data - The team export bundle to import
     * @returns Import result with counts
     * @throws Error if import data is invalid
     */
    importTeam(data: TeamExport): Promise<TeamImportResult>;
    /**
     * Read cron tasks from a team directory.
     *
     * @param teamDir - Path to the team directory
     * @returns Array of cron tasks, empty if file doesn't exist
     */
    private readCronTasks;
}
/**
 * Generate a unique cron task ID.
 *
 * @returns ID in format "cron-xxxxxxxx"
 */
export declare function generateCronId(): string;
//# sourceMappingURL=team-export.service.d.ts.map