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

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

export type getGamepiecesGamepiecesGetResponse200 = {
  data: GamepieceResponse[]
  status: 200
}

export type getGamepiecesGamepiecesGetResponseSuccess = (getGamepiecesGamepiecesGetResponse200) & {
  headers: Headers;
};
;

export type getGamepiecesGamepiecesGetResponse = (getGamepiecesGamepiecesGetResponseSuccess)

export const getGetGamepiecesGamepiecesGetUrl = () => {




  return `/gamepieces`
}

/**
 * Get all game pieces on the server
 *
 * Returns:
 *     list[GamepieceResponse]: A list of all game pieces
 * @summary Get Gamepieces
 */
export const getGamepiecesGamepiecesGet = async ( options?: Parameters<typeof customInstance>[1]): Promise<getGamepiecesGamepiecesGetResponse> => {

  return customInstance<getGamepiecesGamepiecesGetResponse>(getGetGamepiecesGamepiecesGetUrl(),
  {
    ...options,
    method: 'GET'


  }
);}


export type createGamepieceGamepiecesCreatePostResponse200 = {
  data: GamepieceResponse
  status: 200
}

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

export type createGamepieceGamepiecesCreatePostResponseSuccess = (createGamepieceGamepiecesCreatePostResponse200) & {
  headers: Headers;
};
export type createGamepieceGamepiecesCreatePostResponseError = (createGamepieceGamepiecesCreatePostResponse422) & {
  headers: Headers;
};

export type createGamepieceGamepiecesCreatePostResponse = (createGamepieceGamepiecesCreatePostResponseSuccess | createGamepieceGamepiecesCreatePostResponseError)

export const getCreateGamepieceGamepiecesCreatePostUrl = () => {




  return `/gamepieces/create`
}

/**
 * Create a new game piece
 *
 * Requires superuser access
 *
 * Parameters:
 *     data (GamepieceRequest): The data to create the game piece
 *
 * Returns:
 *     `GamepieceResponse`: The created game piece
 * @summary Create Gamepiece
 */
export const createGamepieceGamepiecesCreatePost = async (gamepieceRequest: GamepieceRequest, options?: Parameters<typeof customInstance>[1]): Promise<createGamepieceGamepiecesCreatePostResponse> => {

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


export type getSeasonGamepiecesGamepiecesSeasonSeasonUuidGetResponse200 = {
  data: GamepieceResponse[]
  status: 200
}

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

export type getSeasonGamepiecesGamepiecesSeasonSeasonUuidGetResponseSuccess = (getSeasonGamepiecesGamepiecesSeasonSeasonUuidGetResponse200) & {
  headers: Headers;
};
export type getSeasonGamepiecesGamepiecesSeasonSeasonUuidGetResponseError = (getSeasonGamepiecesGamepiecesSeasonSeasonUuidGetResponse422) & {
  headers: Headers;
};

export type getSeasonGamepiecesGamepiecesSeasonSeasonUuidGetResponse = (getSeasonGamepiecesGamepiecesSeasonSeasonUuidGetResponseSuccess | getSeasonGamepiecesGamepiecesSeasonSeasonUuidGetResponseError)

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




  return `/gamepieces/season/${seasonUuid}`
}

/**
 * Get all game pieces for a season
 *
 * Parameters:
 *     season_uuid (`UUID`): The UUID of the season to get game pieces for
 *
 * Returns:
 *     list[GamepieceResponse]: A list of all game pieces for the season
 * @summary Get Season Gamepieces
 */
export const getSeasonGamepiecesGamepiecesSeasonSeasonUuidGet = async (seasonUuid: string, options?: Parameters<typeof customInstance>[1]): Promise<getSeasonGamepiecesGamepiecesSeasonSeasonUuidGetResponse> => {

  return customInstance<getSeasonGamepiecesGamepiecesSeasonSeasonUuidGetResponse>(getGetSeasonGamepiecesGamepiecesSeasonSeasonUuidGetUrl(seasonUuid),
  {
    ...options,
    method: 'GET'


  }
);}


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

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

export type deleteGamepieceGamepiecesDeleteGamepieceUuidDeleteResponseSuccess = (deleteGamepieceGamepiecesDeleteGamepieceUuidDeleteResponse200) & {
  headers: Headers;
};
export type deleteGamepieceGamepiecesDeleteGamepieceUuidDeleteResponseError = (deleteGamepieceGamepiecesDeleteGamepieceUuidDeleteResponse422) & {
  headers: Headers;
};

export type deleteGamepieceGamepiecesDeleteGamepieceUuidDeleteResponse = (deleteGamepieceGamepiecesDeleteGamepieceUuidDeleteResponseSuccess | deleteGamepieceGamepiecesDeleteGamepieceUuidDeleteResponseError)

export const getDeleteGamepieceGamepiecesDeleteGamepieceUuidDeleteUrl = (gamepieceUuid: string,) => {




  return `/gamepieces/delete/${gamepieceUuid}`
}

/**
 * Delete a game piece
 *
 * Requires superuser access
 *
 * Parameters:
 *     gamepiece_uuid (`UUID`): The UUID of the game piece to delete
 *
 * Returns:
 *     `MessageResponse`: A message indicating that the game piece was deleted
 * @summary Delete Gamepiece
 */
export const deleteGamepieceGamepiecesDeleteGamepieceUuidDelete = async (gamepieceUuid: string, options?: Parameters<typeof customInstance>[1]): Promise<deleteGamepieceGamepiecesDeleteGamepieceUuidDeleteResponse> => {

  return customInstance<deleteGamepieceGamepiecesDeleteGamepieceUuidDeleteResponse>(getDeleteGamepieceGamepiecesDeleteGamepieceUuidDeleteUrl(gamepieceUuid),
  {
    ...options,
    method: 'DELETE'


  }
);}


