/**
 * Generated by orval v8.23.0 🍺
 * Do not edit manually.
 * FastAPI
 * OpenAPI spec version: v2.2.0
 */
import type {
  CreateReportRequest,
  CreateReportResponse,
  HTTPValidationError,
  MessageResponse,
  ReportResponse
} from '../model';

import { customInstance } from '.././client';

export type createReportReportCreatePostResponse200 = {
  data: CreateReportResponse
  status: 200
}

export type createReportReportCreatePostResponse422 = {
  data: HTTPValidationError
  status: 422
}

export type createReportReportCreatePostResponseSuccess = (createReportReportCreatePostResponse200) & {
  headers: Headers;
};
export type createReportReportCreatePostResponseError = (createReportReportCreatePostResponse422) & {
  headers: Headers;
};

export type createReportReportCreatePostResponse = (createReportReportCreatePostResponseSuccess | createReportReportCreatePostResponseError)

export const getCreateReportReportCreatePostUrl = () => {




  return `/report/create`
}

/**
 * Create a new report
 *
 * Parameters:
 *     data (CreateReportRequest): The data to create the report
 *
 * Returns:
 *     `CreateReportResponse`: The created report
 * @summary Create Report
 */
export const createReportReportCreatePost = async (createReportRequest: CreateReportRequest, options?: Parameters<typeof customInstance>[1]): Promise<createReportReportCreatePostResponse> => {

  return customInstance<createReportReportCreatePostResponse>(getCreateReportReportCreatePostUrl(),
  {
    ...options,
    method: 'POST',
    headers: { 'Content-Type': 'application/json', ...options?.headers },
    body: JSON.stringify(createReportRequest)
  }
);}


export type getReportsReportsGetGetResponse200 = {
  data: ReportResponse[]
  status: 200
}

export type getReportsReportsGetGetResponseSuccess = (getReportsReportsGetGetResponse200) & {
  headers: Headers;
};
;

export type getReportsReportsGetGetResponse = (getReportsReportsGetGetResponseSuccess)

export const getGetReportsReportsGetGetUrl = () => {




  return `/reports/get`
}

/**
 * Get all reports from the server
 *
 * Construct corresponding report_details depending on the type of each report
 *
 * Requires superuser access
 *
 * Returns:
 *     list[ReportResponse]: A list of all reports
 * @summary Get Reports
 */
export const getReportsReportsGetGet = async ( options?: Parameters<typeof customInstance>[1]): Promise<getReportsReportsGetGetResponse> => {

  return customInstance<getReportsReportsGetGetResponse>(getGetReportsReportsGetGetUrl(),
  {
    ...options,
    method: 'GET'


  }
);}


export type getReportsCountReportsGetCountGetResponse200 = {
  data: number
  status: 200
}

export type getReportsCountReportsGetCountGetResponseSuccess = (getReportsCountReportsGetCountGetResponse200) & {
  headers: Headers;
};
;

export type getReportsCountReportsGetCountGetResponse = (getReportsCountReportsGetCountGetResponseSuccess)

export const getGetReportsCountReportsGetCountGetUrl = () => {




  return `/reports/get/count`
}

/**
 * Get the number of reports
 *
 * Requires superuser access
 *
 * Returns:
 *     CountResponse: The number of reports
 * @summary Get Reports Count
 */
export const getReportsCountReportsGetCountGet = async ( options?: Parameters<typeof customInstance>[1]): Promise<getReportsCountReportsGetCountGetResponse> => {

  return customInstance<getReportsCountReportsGetCountGetResponse>(getGetReportsCountReportsGetCountGetUrl(),
  {
    ...options,
    method: 'GET'


  }
);}


export type deleteReportContentReportContentDeleteReportUuidDeleteResponse200 = {
  data: MessageResponse
  status: 200
}

export type deleteReportContentReportContentDeleteReportUuidDeleteResponse422 = {
  data: HTTPValidationError
  status: 422
}

export type deleteReportContentReportContentDeleteReportUuidDeleteResponseSuccess = (deleteReportContentReportContentDeleteReportUuidDeleteResponse200) & {
  headers: Headers;
};
export type deleteReportContentReportContentDeleteReportUuidDeleteResponseError = (deleteReportContentReportContentDeleteReportUuidDeleteResponse422) & {
  headers: Headers;
};

export type deleteReportContentReportContentDeleteReportUuidDeleteResponse = (deleteReportContentReportContentDeleteReportUuidDeleteResponseSuccess | deleteReportContentReportContentDeleteReportUuidDeleteResponseError)

export const getDeleteReportContentReportContentDeleteReportUuidDeleteUrl = (reportUuid: string,) => {




  return `/report/content/delete/${reportUuid}`
}

/**
 * Delete the content for a report. Then delete the report itself.
 *
 * Requires superuser access
 *
 * Parameters:
 *     report_uuid (`UUID`): The UUID of the report's content to delete
 *
 * Returns:
 *     MessageResponse: A message indicating that the report was deleted
 * @summary Delete Report Content
 */
export const deleteReportContentReportContentDeleteReportUuidDelete = async (reportUuid: string, options?: Parameters<typeof customInstance>[1]): Promise<deleteReportContentReportContentDeleteReportUuidDeleteResponse> => {

  return customInstance<deleteReportContentReportContentDeleteReportUuidDeleteResponse>(getDeleteReportContentReportContentDeleteReportUuidDeleteUrl(reportUuid),
  {
    ...options,
    method: 'DELETE'


  }
);}


export type deleteReportReportDeleteReportUuidDeleteResponse200 = {
  data: MessageResponse
  status: 200
}

export type deleteReportReportDeleteReportUuidDeleteResponse422 = {
  data: HTTPValidationError
  status: 422
}

export type deleteReportReportDeleteReportUuidDeleteResponseSuccess = (deleteReportReportDeleteReportUuidDeleteResponse200) & {
  headers: Headers;
};
export type deleteReportReportDeleteReportUuidDeleteResponseError = (deleteReportReportDeleteReportUuidDeleteResponse422) & {
  headers: Headers;
};

export type deleteReportReportDeleteReportUuidDeleteResponse = (deleteReportReportDeleteReportUuidDeleteResponseSuccess | deleteReportReportDeleteReportUuidDeleteResponseError)

export const getDeleteReportReportDeleteReportUuidDeleteUrl = (reportUuid: string,) => {




  return `/report/delete/${reportUuid}`
}

/**
 * Delete a report
 *
 * Requires superuser access
 *
 * Parameters:
 *     report_uuid (`UUID`): The UUID of the report to delete
 *
 * Returns:
 *     MessageResponse: A message indicating that the report was deleted
 * @summary Delete Report
 */
export const deleteReportReportDeleteReportUuidDelete = async (reportUuid: string, options?: Parameters<typeof customInstance>[1]): Promise<deleteReportReportDeleteReportUuidDeleteResponse> => {

  return customInstance<deleteReportReportDeleteReportUuidDeleteResponse>(getDeleteReportReportDeleteReportUuidDeleteUrl(reportUuid),
  {
    ...options,
    method: 'DELETE'


  }
);}


