import { Simplify } from '@knapsack/utils';
import type { DesignSrcItem } from './design-src.types';
import { Role } from './user-roles';
export type GenericResponse<data = Record<string, any>> = {
    ok: boolean;
    message?: string;
    data?: data;
    meta?: any;
};
export interface KnapsackFile {
    contents: string;
    path: string;
    encoding: 'utf8' | 'base64';
    /**
     * File should be deleted
     */
    isDeleted?: boolean;
}
export type KsFileSaverParams = {
    files: KnapsackFile[];
};
export type KsFileSaver = (opt: KsFileSaverParams) => Promise<GenericResponse>;
export interface KsCloudConfig<PathType extends string = string> {
    siteId: string;
    repoName?: string;
    repoOwner?: string;
    repoRoot?: PathType;
    /** @deprecated */
    baseBranch?: string;
}
export interface KsCloudSaveBody {
    owner: string;
    repo: string;
    baseBranch: string;
    title: string;
    message?: string;
    payload: {
        files: KnapsackFile[];
    };
}
/**
 * Yes, it's just `string`, but want to be a little more explicit on what kind
 * `import { makeUuid } from '@knapsack/utils'`
 * @see {makeUuid}
 * @see {uuid}
 */
export type UUID = string;
/** In ISO format: 2020-08-07T02:19:56 */
export type DateString = string;
/** Semantic Version number
 * i.e. 1.2.3 ^1.2.3 ~1.2.3
 */
export type SemVer = `${'~' | '^' | ''}${number}.${number}.${number}`;
export type FeedbackTypes = 'error' | 'info' | 'success' | 'warning';
export type ImageInfo = {
    src: string;
    alt?: string;
    title?: string;
};
export type KnapsackImage = Simplify<({
    type: 'image';
} & ImageInfo) | ({
    type: 'designSrcItem';
} & DesignSrcItem)>;
export type ContentMeta = {
    createdBy: string;
    createdDate: DateString;
    updatedBy: string;
    updatedDate: DateString;
};
export type Folder = {
    id: string;
    title: string;
    itemIds: string[];
    meta: ContentMeta;
    minRoleNeeded?: Role;
};
//# sourceMappingURL=misc.d.ts.map