// This file is auto-generated by @hey-api/openapi-ts

export type ClientOptions = {
    baseURL: `${string}://openapi.yaml` | (string & {});
};

export type Atlas = {
    id?: string;
    nazev_cs?: string;
    nazev_en?: string;
    popis?: string;
    je_vychozi?: boolean;
};

export type AnnotationListItem = {
    annotationId?: string;
    atlasId?: string;
    atlasName?: string;
    modelLabel?: string;
    annotator?: string;
    lastUpdated?: string;
    filledTraitsCount?: number;
    fileHash?: string;
};

export type AnnotationDetail = {
    annotationId?: string;
    atlasId?: string;
    modelId?: string;
    modelLabel?: string;
    annotator?: string;
    modelPath?: string;
    mtlPath?: string;
    texturePath?: string;
    fileHash?: string;
    lastUpdated?: string;
    values?: {
        [key: string]: string;
    };
};

export type AnnotationResponse = {
    message?: string;
    annotationId?: string;
};

export type FormCategory = {
    id?: number;
    nazev_cs?: string;
    nazev_en?: string;
    znaky?: Array<TraitDefinition>;
};

export type TraitDefinition = {
    id?: string;
    label_cs?: string;
    label_en?: string;
    popis_cs?: string;
    popis_en?: string;
    options?: Array<TraitOption>;
};

export type TraitOption = {
    label_cs?: string;
    label_en?: string;
    images?: Array<string>;
    drawings?: Array<string>;
};

export type Model = {
    id?: string;
    external_id?: string;
    file_hash?: string;
    model_path?: string;
    mtl_path?: string;
    texture_path?: string;
    created_at?: string;
    has_annotations?: boolean;
};

export type GetFormSchemaData = {
    body?: never;
    path?: never;
    query: {
        atlasId: string;
    };
    url: '/api/form-schema';
};

export type GetFormSchemaResponses = {
    /**
     * Pole kategorií obsahující sloučené (tovární + uživatelské) obrázky
     */
    200: Array<FormCategory>;
};

export type GetFormSchemaResponse = GetFormSchemaResponses[keyof GetFormSchemaResponses];

export type GetAtlasesData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/atlases';
};

export type GetAtlasesResponses = {
    /**
     * Seznam atlasů
     */
    200: Array<Atlas>;
};

export type GetAtlasesResponse = GetAtlasesResponses[keyof GetAtlasesResponses];

export type AddImageToAtlasData = {
    body: {
        /**
         * ID znaku (např. nos_profil)
         */
        traitId: string;
        /**
         * Textový název varianty v češtině (Natural Key)
         */
        optionLabelCs: string;
        /**
         * Jedná se o konturu (drawing) nebo fotku?
         */
        isDrawing?: boolean;
        image: Blob | File;
    };
    path?: never;
    query?: never;
    url: '/api/atlases/add-image';
};

export type AddImageToAtlasResponses = {
    /**
     * Obrázek uložen
     */
    200: {
        imagePath?: string;
    };
};

export type AddImageToAtlasResponse = AddImageToAtlasResponses[keyof AddImageToAtlasResponses];

export type ExportUserUpdatesData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/updates/export';
};

export type ExportUserUpdatesResponses = {
    /**
     * ZIP soubor s obrázky a updates.json
     */
    200: Blob | File;
};

export type ExportUserUpdatesResponse = ExportUserUpdatesResponses[keyof ExportUserUpdatesResponses];

export type ImportUserUpdatesData = {
    body: {
        updateZip?: Blob | File;
    };
    path?: never;
    query?: never;
    url: '/api/updates/import';
};

export type ImportUserUpdatesResponses = {
    /**
     * Změny byly úspěšně naimportovány
     */
    200: {
        message?: string;
    };
};

export type ImportUserUpdatesResponse = ImportUserUpdatesResponses[keyof ImportUserUpdatesResponses];

export type GetModelsData = {
    body?: never;
    path?: never;
    query?: {
        annotated?: true | false;
    };
    url: '/api/models';
};

export type GetModelsResponses = {
    /**
     * Seznam modelů
     */
    200: Array<Model>;
};

export type GetModelsResponse = GetModelsResponses[keyof GetModelsResponses];

export type UploadModelData = {
    body: {
        modelId?: string;
        modelFile?: Blob | File;
        mtlFile?: Blob | File;
        textureFile?: Blob | File;
    };
    path?: never;
    query?: never;
    url: '/api/models';
};

export type UploadModelResponses = {
    /**
     * Model nahrán
     */
    201: {
        modelId?: string;
        message?: string;
    };
};

export type UploadModelResponse = UploadModelResponses[keyof UploadModelResponses];

export type GetAnnotationsData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/annotations';
};

export type GetAnnotationsResponses = {
    /**
     * Seznam anotací
     */
    200: {
        annotations?: Array<AnnotationListItem>;
    };
};

export type GetAnnotationsResponse = GetAnnotationsResponses[keyof GetAnnotationsResponses];

export type SaveAnnotationData = {
    body: {
        annotationId?: string;
        /**
         * ID atlasu (string) použitého pro tuto anotaci
         */
        atlasId: string;
        modelId: string;
        annotatorName: string;
        fileHash?: string;
        values: string;
        modelFile?: Blob | File;
        mtlFile?: Blob | File;
        textureFile?: Blob | File;
    };
    path?: never;
    query?: never;
    url: '/annotations';
};

export type SaveAnnotationResponses = {
    /**
     * Úspěšně uloženo
     */
    200: AnnotationResponse;
};

export type SaveAnnotationResponse = SaveAnnotationResponses[keyof SaveAnnotationResponses];

export type DeleteAnnotationData = {
    body?: never;
    path: {
        annotationId: string;
    };
    query?: never;
    url: '/annotations/{annotationId}';
};

export type DeleteAnnotationResponses = {
    /**
     * Smazáno
     */
    200: unknown;
};

export type GetAnnotationDetailData = {
    body?: never;
    path: {
        annotationId: string;
    };
    query?: never;
    url: '/annotations/{annotationId}';
};

export type GetAnnotationDetailResponses = {
    /**
     * Detailní data anotace
     */
    200: AnnotationDetail;
};

export type GetAnnotationDetailResponse = GetAnnotationDetailResponses[keyof GetAnnotationDetailResponses];
