import { DTPluginPreciseCopyStrategy, DTPluginThemeOverrideStrategy } from "../../tools/design-tokens/utilities/SDKDTMapLoader";
import { ImportWarningType } from "../enums/SDKCloudWarningType";
import { SourceType } from "../enums/SDKSourceType";
import { StorybookUpdate } from "../storybook/SDKStorybookUpdate";
declare enum SourceRemoteType {
    figma = "Figma",
    tokenStudio = "TokenStudio",
    figmaVariablesPlugin = "FigmaVariablesPlugin",
    upload = "Upload",
    storybook = "Storybook"
}
export type SourceRemoteModel = {
    type: SourceRemoteType;
    id: string;
    fileName?: string;
    brandId?: string;
    themeId?: string;
    plugin?: {
        fileId: string;
        lastImportedAt?: string;
    };
    cloud?: SourceRemoteModelCloud;
    tokenStudio?: SourceRemoteModelTokensStudio;
    figmaVariablesPlugin?: SourceRemoteModelFigmaVariablesPlugin;
    upload?: SourceRemoteModelUpload;
    storybook?: SourceRemoteModelStorybook;
    scope: SourceScope;
};
export type SourceScope = {
    tokens: boolean;
    components: boolean;
    assets: boolean;
    documentationFrames: boolean;
    isUnpublishedContentFallbackEnabled: boolean;
};
export type SourceRemoteModelCloud = {
    fileId?: string;
    autoImportMode: "Never" | "Hourly";
    fileThumbnailUrl?: string;
    lastUpdatesCheckedAt?: string;
    lastImportedVersion?: {
        id: string;
        /** Date of file creation in Figma */
        created_at: string;
        label?: string;
        description: string;
    };
    /** This indicates last import try attempt, either failed or succeed  */
    lastImportedAt?: string;
    /** This is last successful import results, so if last import failed this won't change */
    lastImportResult?: {
        sourceId: string;
        brandId: string;
        tokensCreated: number;
        tokensUpdated: number;
        tokensDeleted: number;
        componentsCreated: number;
        componentsUpdated: number;
        componentsDeleted: number;
        componentAssetsCreated: number;
        componentAssetsUpdated: number;
        componentAssetsDeleted: number;
        isFailed: boolean;
        versionId: string;
        fileSize?: number;
        warnings?: Array<SourceImportResultWarning>;
        isFramesFailed: boolean;
        assetsInFile?: {
            frames: number;
            components: number;
        };
        invalidReferencesCount?: number;
        error?: DataSourceImportError;
    };
    ownerId: string;
    ownerUserName: string;
    state: "Active" | "MissingIntegration" | "MissingFileAccess" | "MissingFileOwner";
    stats: {
        tokens: number;
        components: number;
        assets: number;
        frames: number;
    };
};
export type DataSourceFigmaErrorType = "FigmaAPIRateLimit" | "UnknownImportError";
export type SourceErrorRateLimitDetails = {
    retryAfter?: number;
    figmaPlanTier?: string;
    rateLimitLimit?: number;
    rateLimitRemaining?: number;
    rateLimitReset?: number;
    rateLimitType?: string;
};
export type DataSourceImportError = {
    errorType?: DataSourceFigmaErrorType;
    rateLimitDetails?: SourceErrorRateLimitDetails;
};
export type SourceImportResultWarning = {
    warningType: ImportWarningType;
    componentId: string;
    componentName: string;
    styleId: string;
    styleName: string;
    unsupportedStyleValueType: string;
};
export type SourceRemoteModelTokensStudio = {
    connectionName: string;
    lastImportedAt?: string;
    settings?: {
        dryRun?: boolean;
        verbose?: boolean;
        preciseCopy?: boolean | DTPluginPreciseCopyStrategy;
        themeOverridesStrategy?: DTPluginThemeOverrideStrategy;
    };
    lastImportedResults?: Array<{
        mapping: {
            tokensTheme?: string;
            tokenSets?: string[];
            supernovaBrand?: string;
            supernovaTheme?: string;
        };
        tokensCreated: number;
        tokensUpdated: number;
        tokensDeleted: number;
        isFailed: boolean;
        error?: string;
        themeId?: string;
    }>;
};
export type SourceRemoteModelFigmaVariablesPlugin = {
    fileId: string;
    lastImportedAt?: string;
    lastImportMetadata?: Record<string, any>;
    isTokenTypeSplitEnabled: boolean;
};
export type SourceRemoteModelUpload = {
    isCollectionKeysMigrationCompleted: boolean;
};
export type SourceRemoteModelStorybook = {
    userUrl: string;
    indexUrl: string;
    isFailed: boolean;
    docsCount: number;
    storiesCount: number;
    lastImportedAt?: string;
    lastImportedSuccessfully?: string;
    description?: string;
    isUsingVpn?: boolean;
    lastImportedResult?: {
        created: number;
        updated: number;
        deleted: number;
    };
};
export type SourceModelTokenStudio = Omit<SourceRemoteModelTokensStudio, "lastUpdatesCheckedAt" | "lastImportedAt"> & {
    lastUpdatesCheckedAt?: Date;
    lastImportedAt?: Date;
};
export type SourceModelCloud = Omit<SourceRemoteModelCloud, "lastUpdatesCheckedAt" | "lastImportedAt"> & {
    lastUpdatesCheckedAt?: Date;
    lastImportedAt?: Date;
};
export type SourceModelFigmaVariablesPlugin = Omit<SourceRemoteModelFigmaVariablesPlugin, "lastImportedAt"> & {
    lastImportedAt?: Date;
};
export type SourceModelStorybook = Omit<SourceRemoteModelStorybook, "lastImportedAt" | "lastImportedSuccessfully"> & {
    lastImportedAt?: Date;
    lastImportedSuccessfully?: Date;
    isCLI: boolean;
};
export type SourceTransportModel = Pick<Source, "type" | "id" | "fileName" | "brandId" | "themeId" | "scope"> & {
    cloud?: SourceRemoteModelCloud | null;
};
export declare class Source {
    type: SourceType;
    id: string;
    fileName: string | null;
    brandId: string | null;
    themeId: string | null;
    cloud: SourceModelCloud | null;
    tokenStudio?: SourceModelTokenStudio | null;
    figmaVariablesPlugin?: SourceModelFigmaVariablesPlugin | null;
    upload?: SourceRemoteModelUpload | null;
    storybook?: SourceModelStorybook | null;
    scope: SourceScope;
    get lastImportedAt(): Date | null;
    get hasError(): boolean;
    get hasWarning(): boolean;
    get isCloudAvailable(): boolean;
    get isFigmaRateLimitError(): boolean;
    get isTokensStudioAvailable(): boolean;
    get tokensStudioHasError(): boolean;
    updateStorybookImportResult(update: StorybookUpdate): void;
    constructor(model: SourceRemoteModel);
    /** Constructs representation that can be used to write full object to remote */
    toRemote(): SourceRemoteModel;
    /** Constructs representation that can be used to transport the instantiated object as JSON, for example for SSR <> Client use-cases. Reconstruct to class instance using `fromTransport` */
    toTransport(): SourceTransportModel;
    /** Reconstructs class from the transport model */
    static fromTransport(model: SourceTransportModel): SourceRemoteModel;
}
export {};
