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

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

export type getSeasonsSeasonsGetResponse200 = {
  data: SeasonResponse[]
  status: 200
}

export type getSeasonsSeasonsGetResponseSuccess = (getSeasonsSeasonsGetResponse200) & {
  headers: Headers;
};
;

export type getSeasonsSeasonsGetResponse = (getSeasonsSeasonsGetResponseSuccess)

export const getGetSeasonsSeasonsGetUrl = () => {




  return `/seasons`
}

/**
 * Get all seasons on the server
 *
 * Returns:
 *     list[Season]: A list of all seasons
 * @summary Get Seasons
 */
export const getSeasonsSeasonsGet = async ( options?: Parameters<typeof customInstance>[1]): Promise<getSeasonsSeasonsGetResponse> => {

  return customInstance<getSeasonsSeasonsGetResponse>(getGetSeasonsSeasonsGetUrl(),
  {
    ...options,
    method: 'GET'


  }
);}


export type getActiveSeasonSeasonsActiveGetResponse200 = {
  data: SeasonResponse | null
  status: 200
}

export type getActiveSeasonSeasonsActiveGetResponseSuccess = (getActiveSeasonSeasonsActiveGetResponse200) & {
  headers: Headers;
};
;

export type getActiveSeasonSeasonsActiveGetResponse = (getActiveSeasonSeasonsActiveGetResponseSuccess)

export const getGetActiveSeasonSeasonsActiveGetUrl = () => {




  return `/seasons/active`
}

/**
 * Get the active season on the server
 *
 * Returns:
 *     Season: The active season
 * @summary Get Active Season
 */
export const getActiveSeasonSeasonsActiveGet = async ( options?: Parameters<typeof customInstance>[1]): Promise<getActiveSeasonSeasonsActiveGetResponse> => {

  return customInstance<getActiveSeasonSeasonsActiveGetResponse>(getGetActiveSeasonSeasonsActiveGetUrl(),
  {
    ...options,
    method: 'GET'


  }
);}


export type createSeasonSeasonsCreatePostResponse200 = {
  data: SeasonResponse
  status: 200
}

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

export type createSeasonSeasonsCreatePostResponseSuccess = (createSeasonSeasonsCreatePostResponse200) & {
  headers: Headers;
};
export type createSeasonSeasonsCreatePostResponseError = (createSeasonSeasonsCreatePostResponse422) & {
  headers: Headers;
};

export type createSeasonSeasonsCreatePostResponse = (createSeasonSeasonsCreatePostResponseSuccess | createSeasonSeasonsCreatePostResponseError)

export const getCreateSeasonSeasonsCreatePostUrl = () => {




  return `/seasons/create`
}

/**
 * Create a new season
 *
 * Requires superuser access
 *
 * Parameters:
 *     data (`SeasonCreate`): The data to create the season
 *
 * Returns:
 *     `SeasonResponse`: The created season
 * @summary Create Season
 */
export const createSeasonSeasonsCreatePost = async (seasonCreate: SeasonCreate, options?: Parameters<typeof customInstance>[1]): Promise<createSeasonSeasonsCreatePostResponse> => {

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


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

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

export type deleteSeasonSeasonsDeleteSeasonUuidDeleteResponseSuccess = (deleteSeasonSeasonsDeleteSeasonUuidDeleteResponse200) & {
  headers: Headers;
};
export type deleteSeasonSeasonsDeleteSeasonUuidDeleteResponseError = (deleteSeasonSeasonsDeleteSeasonUuidDeleteResponse422) & {
  headers: Headers;
};

export type deleteSeasonSeasonsDeleteSeasonUuidDeleteResponse = (deleteSeasonSeasonsDeleteSeasonUuidDeleteResponseSuccess | deleteSeasonSeasonsDeleteSeasonUuidDeleteResponseError)

export const getDeleteSeasonSeasonsDeleteSeasonUuidDeleteUrl = (seasonUuid: string,) => {




  return `/seasons/delete/${seasonUuid}`
}

/**
 * Delete a season
 *
 * Requires superuser access
 *
 * Parameters:
 *     season_uuid (`UUID`): The UUID of the season to delete
 *
 * Returns:
 *     `MessageResponse`: A message indicating that the season was deleted
 * @summary Delete Season
 */
export const deleteSeasonSeasonsDeleteSeasonUuidDelete = async (seasonUuid: string, options?: Parameters<typeof customInstance>[1]): Promise<deleteSeasonSeasonsDeleteSeasonUuidDeleteResponse> => {

  return customInstance<deleteSeasonSeasonsDeleteSeasonUuidDeleteResponse>(getDeleteSeasonSeasonsDeleteSeasonUuidDeleteUrl(seasonUuid),
  {
    ...options,
    method: 'DELETE'


  }
);}


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

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

export type activateSeasonSeasonsActivateSeasonUuidPostResponseSuccess = (activateSeasonSeasonsActivateSeasonUuidPostResponse200) & {
  headers: Headers;
};
export type activateSeasonSeasonsActivateSeasonUuidPostResponseError = (activateSeasonSeasonsActivateSeasonUuidPostResponse422) & {
  headers: Headers;
};

export type activateSeasonSeasonsActivateSeasonUuidPostResponse = (activateSeasonSeasonsActivateSeasonUuidPostResponseSuccess | activateSeasonSeasonsActivateSeasonUuidPostResponseError)

export const getActivateSeasonSeasonsActivateSeasonUuidPostUrl = (seasonUuid: string,) => {




  return `/seasons/activate/${seasonUuid}`
}

/**
 * Deactivate the current season and make the given season active
 *
 * Requires superuser access
 *
 * Paramaters:
 *     season_uuid (`UUID`): The UUID of the season to activate
 *
 * Returns:
 *     `MessageResponse`: A message indicating that the season was made active
 * @summary Activate Season
 */
export const activateSeasonSeasonsActivateSeasonUuidPost = async (seasonUuid: string, options?: Parameters<typeof customInstance>[1]): Promise<activateSeasonSeasonsActivateSeasonUuidPostResponse> => {

  return customInstance<activateSeasonSeasonsActivateSeasonUuidPostResponse>(getActivateSeasonSeasonsActivateSeasonUuidPostUrl(seasonUuid),
  {
    ...options,
    method: 'POST'


  }
);}


