/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { BaseResponse } from '../models/BaseResponse';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';

export class ProjectsService {
    /**
     * Initialize Project from Novel
     */
    public static initializeProjectFromNovel(
        requestBody: any,
    ): CancelablePromise<BaseResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/v1/projects/initialize-canvas-from-novel',
            body: requestBody,
        });
    }

    public static initializeCanvasProjectFromNovel(
        requestBody: any,
    ): CancelablePromise<BaseResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/v1/projects/initialize-canvas-from-novel',
            body: requestBody,
        });
    }

    public static initializeScriptProjectFromNovel(
        requestBody: any,
    ): CancelablePromise<BaseResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/v1/projects/initialize-script-from-novel',
            body: requestBody,
        });
    }

    public static createProject(
        requestBody: any,
    ): CancelablePromise<BaseResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/v1/projects',
            body: requestBody,
        });
    }

    public static listProjects(): CancelablePromise<BaseResponse> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/api/v1/projects',
        });
    }

    public static getProject(
        projectId: string,
    ): CancelablePromise<BaseResponse> {
        return __request(OpenAPI, {
            method: 'GET',
            url: `/api/v1/projects/${projectId}`,
        });
    }

    public static updateProject(
        projectId: string,
        requestBody: any,
    ): CancelablePromise<BaseResponse> {
        return __request(OpenAPI, {
            method: 'PUT',
            url: `/api/v1/projects/${projectId}`,
            body: requestBody,
        });
    }

    public static deleteProject(
        projectId: string,
    ): CancelablePromise<BaseResponse> {
        return __request(OpenAPI, {
            method: 'DELETE',
            url: `/api/v1/projects/${projectId}`,
        });
    }

    public static convertProjectToCanvas(
        projectId: string,
    ): CancelablePromise<BaseResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: `/api/v1/projects/${projectId}/convert-to-canvas`,
        });
    }

    public static createEpisode(
        projectId: string,
        requestBody: any,
    ): CancelablePromise<BaseResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: `/api/v1/projects/${projectId}/episodes`,
            body: requestBody,
        });
    }

    public static updateEpisode(
        projectId: string,
        episodeId: string,
        requestBody: any,
    ): CancelablePromise<BaseResponse> {
        return __request(OpenAPI, {
            method: 'PUT',
            url: `/api/v1/projects/${projectId}/episodes/${episodeId}`,
            body: requestBody,
        });
    }

    public static deleteEpisode(
        projectId: string,
        episodeId: string,
    ): CancelablePromise<BaseResponse> {
        return __request(OpenAPI, {
            method: 'DELETE',
            url: `/api/v1/projects/${projectId}/episodes/${episodeId}`,
        });
    }

    public static createAsset(
        projectId: string,
        requestBody: any,
    ): CancelablePromise<BaseResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: `/api/v1/projects/${projectId}/assets`,
            body: requestBody,
        });
    }

    public static listProjectAssets(
        projectId: string,
        assetType?: string,
        search?: string,
        limit?: number,
        offset?: number,
    ): CancelablePromise<BaseResponse> {
        return __request(OpenAPI, {
            method: 'GET',
            url: `/api/v1/projects/${projectId}/assets`,
            query: {
                asset_type: assetType,
                search,
                limit,
                offset,
            },
        });
    }

    public static updateAsset(
        projectId: string,
        assetId: string,
        requestBody: any,
    ): CancelablePromise<BaseResponse> {
        return __request(OpenAPI, {
            method: 'PUT',
            url: `/api/v1/projects/${projectId}/assets/${assetId}`,
            body: requestBody,
        });
    }

    public static deleteAsset(
        projectId: string,
        assetId: string,
    ): CancelablePromise<BaseResponse> {
        return __request(OpenAPI, {
            method: 'DELETE',
            url: `/api/v1/projects/${projectId}/assets/${assetId}`,
        });
    }

    public static analyzeEpisode(
        projectId: string,
        episodeId: string,
    ): CancelablePromise<BaseResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: `/api/v1/projects/${projectId}/episodes/${episodeId}/analyze`,
        });
    }

    public static deduplicateProjectAssets(
        projectId: string,
    ): CancelablePromise<BaseResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: `/api/v1/projects/${projectId}/deduplicate`,
        });
    }

    public static batchCreateAssets(
        projectId: string,
        requestBody: any,
    ): CancelablePromise<BaseResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: `/api/v1/projects/${projectId}/assets/batch`,
            body: requestBody,
        });
    }

    public static createStoryboard(
        projectId: string,
        requestBody: any,
    ): CancelablePromise<BaseResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: `/api/v1/projects/${projectId}/storyboards`,
            body: requestBody,
        });
    }

    public static updateStoryboard(
        projectId: string,
        storyboardId: string,
        requestBody: any,
    ): CancelablePromise<BaseResponse> {
        return __request(OpenAPI, {
            method: 'PUT',
            url: `/api/v1/projects/${projectId}/storyboards/${storyboardId}`,
            body: requestBody,
        });
    }

    public static deleteStoryboard(
        projectId: string,
        storyboardId: string,
    ): CancelablePromise<BaseResponse> {
        return __request(OpenAPI, {
            method: 'DELETE',
            url: `/api/v1/projects/${projectId}/storyboards/${storyboardId}`,
        });
    }
}
