import { AbstractEntity, CommonFetchParams, FileTag, PaginationReqParams } from '@/types/index';
export declare type PackageType = 'component' | 'editor' | 'library';
export interface ComponentEntity extends AbstractEntity {
    name: string;
    applicationId: string;
    base?: string;
    contentId: string;
    deleted?: boolean;
    folderId?: string;
    intro?: string;
    online?: boolean;
    release?: string;
    suffix?: string;
    tags: Array<FileTag>;
    type: PackageType;
}
export interface ComponentInfoEntity extends Pick<ComponentEntity, 'id' | 'type' | 'tags' | 'createTime' | 'creator' | 'updateTime' | 'online'> {
    title: string;
    fileId: string;
    liveVersion: string;
    liveVersionNumber: string;
}
interface ComponentVersionEntityContent {
    id?: string;
    meta: string;
    schema: string;
    resource?: {
        entry?: {
            browser?: string;
            debug?: string;
            node?: string;
            css?: string;
        };
        'editor-entry': {
            id: string;
            name: string;
        }[];
        dependencies: {
            id: string;
            name: string;
        }[];
    };
    useStyleEditor?: boolean;
    enableChildren?: boolean;
    changelog?: string;
}
export interface ComponentVersionEntity extends Pick<ComponentEntity, 'id' | 'contentId' | 'creator' | 'createTime' | 'updateTime'> {
    fileId: string;
    isLiveVersion: boolean;
    version: string;
    versionNumber: number;
    status: 'base' | 'discard' | 'release';
    content: ComponentVersionEntityContent;
}
export interface ComponentVersionEntity extends Omit<ComponentInfoEntity, 'online' | 'tags' | 'title' | 'type' | 'liveVersion' | 'liveVersionNumber'> {
    content: ComponentVersionEntityContent;
    contentId: string;
    isLiveVersion: boolean;
    status: 'base' | 'discard' | 'release';
    version: string;
    versionNumber: number;
}
interface ComponentVersionEntityResourceEntry {
    contentId: string;
    path: string;
}
export interface ComponentVersionEntityResource {
    entry: {
        browser?: ComponentVersionEntityResourceEntry;
        node?: ComponentVersionEntityResourceEntry;
        debug?: ComponentVersionEntityResourceEntry;
        css?: ComponentVersionEntityResourceEntry;
        editor?: ComponentVersionEntityResourceEntry;
    };
    'editor-entry': {
        id: string;
        name: string;
    }[];
    dependencies: {
        id: string;
        name: string;
    }[];
}
export interface ComponentEditVersionEntity extends Omit<ComponentVersionEntity, 'fileId' | 'isLiveVersion' | 'content'> {
    content: Omit<ComponentVersionEntityContent, 'resource'> & {
        resource: ComponentVersionEntityResource;
    };
}
export interface AppPackageSearchItem {
    applicationId: string;
    id: string;
    contentId: string;
    name: string;
    type: PackageType;
}
export interface AppComponentFetchParams extends Omit<CommonFetchParams, 'id' | 'organizationId'> {
    type: PackageType;
}
export declare type AppComponentFetchComponentsParams = Pick<AppComponentFetchParams, 'applicationId'>;
export interface AppComponentAddComponentParams extends Pick<AppComponentFetchParams, 'applicationId' | 'type'> {
    name: string;
}
export interface AppComponentDeleteComponentParams extends AppComponentFetchComponentsParams {
    id: string;
}
export declare type ComponentsVersionFetchParams = AppComponentDeleteComponentParams & PaginationReqParams;
export declare type ComponentsVersionSaveParams = Pick<ComponentVersionEntity, 'contentId' | 'version' | 'content'> & Pick<AppComponentFetchParams, 'applicationId'>;
export declare type ComponentsLiveVersionUpdateParams = Pick<ComponentVersionEntity, 'id' | 'versionNumber'> & Pick<AppComponentFetchParams, 'applicationId'>;
export declare type ComponentsVersionPublishParams = Pick<ComponentVersionEntity, 'id' | 'status'> & Pick<AppComponentFetchParams, 'applicationId'>;
export declare type ComponentsVersionUpdateParams = Omit<ComponentsVersionSaveParams, 'contentId'> & Pick<AppComponentDeleteComponentParams, 'id'>;
export {};
