/**
 * Generated by orval v8.23.0 🍺
 * Do not edit manually.
 * FastAPI
 * OpenAPI spec version: v2.2.0
 */
import type {
  AdminPitResponse,
  GetPitsForSeasonRequest,
  GetPitsResponse,
  HTTPValidationError,
  MessageResponse,
  PitFieldRequest,
  PitFieldResponse,
  PitScoutingPresetResponse,
  ReorderPitFieldsRequest,
  SubmitPitFieldAnswerRequest
} from '../model';

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

export type getPitFieldsPitsFieldsSeasonUuidGetResponse200 = {
  data: PitFieldResponse[]
  status: 200
}

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

export type getPitFieldsPitsFieldsSeasonUuidGetResponseSuccess = (getPitFieldsPitsFieldsSeasonUuidGetResponse200) & {
  headers: Headers;
};
export type getPitFieldsPitsFieldsSeasonUuidGetResponseError = (getPitFieldsPitsFieldsSeasonUuidGetResponse422) & {
  headers: Headers;
};

export type getPitFieldsPitsFieldsSeasonUuidGetResponse = (getPitFieldsPitsFieldsSeasonUuidGetResponseSuccess | getPitFieldsPitsFieldsSeasonUuidGetResponseError)

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




  return `/pits/fields/${seasonUuid}`
}

/**
 * Get all pit scouting fields for a season
 *
 * Parameters:
 *     data (`PitFieldsRequest`): The UUID of the season to get fields for
 *
 * Returns:
 *     list[PitFieldResponse]: A list of all pit scouting fields for the season
 * @summary Get Pit Fields
 */
export const getPitFieldsPitsFieldsSeasonUuidGet = async (seasonUuid: string, options?: Parameters<typeof customInstance>[1]): Promise<getPitFieldsPitsFieldsSeasonUuidGetResponse> => {

  return customInstance<getPitFieldsPitsFieldsSeasonUuidGetResponse>(getGetPitFieldsPitsFieldsSeasonUuidGetUrl(seasonUuid),
  {
    ...options,
    method: 'GET'


  }
);}


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

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

export type clearPitFieldsPitsFieldsSeasonUuidClearDeleteResponseSuccess = (clearPitFieldsPitsFieldsSeasonUuidClearDeleteResponse200) & {
  headers: Headers;
};
export type clearPitFieldsPitsFieldsSeasonUuidClearDeleteResponseError = (clearPitFieldsPitsFieldsSeasonUuidClearDeleteResponse422) & {
  headers: Headers;
};

export type clearPitFieldsPitsFieldsSeasonUuidClearDeleteResponse = (clearPitFieldsPitsFieldsSeasonUuidClearDeleteResponseSuccess | clearPitFieldsPitsFieldsSeasonUuidClearDeleteResponseError)

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




  return `/pits/fields/${seasonUuid}/clear`
}

/**
 * Clear all pit scouting fields for a season
 *
 * Requires superuser access
 *
 * Parameters:
 *     season_uuid (`UUID`): The UUID of the season to clear fields for
 *     data (`PitFieldsRequest`): The UUID of the season to clear fields for
 *
 * Returns:
 *     `MessageResponse`: A message indicating that the fields were cleared
 * @summary Clear Pit Fields
 */
export const clearPitFieldsPitsFieldsSeasonUuidClearDelete = async (seasonUuid: string, options?: Parameters<typeof customInstance>[1]): Promise<clearPitFieldsPitsFieldsSeasonUuidClearDeleteResponse> => {

  return customInstance<clearPitFieldsPitsFieldsSeasonUuidClearDeleteResponse>(getClearPitFieldsPitsFieldsSeasonUuidClearDeleteUrl(seasonUuid),
  {
    ...options,
    method: 'DELETE'


  }
);}


export type createPitFieldPitsFieldsSeasonUuidCreatePostResponse200 = {
  data: PitFieldResponse
  status: 200
}

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

export type createPitFieldPitsFieldsSeasonUuidCreatePostResponseSuccess = (createPitFieldPitsFieldsSeasonUuidCreatePostResponse200) & {
  headers: Headers;
};
export type createPitFieldPitsFieldsSeasonUuidCreatePostResponseError = (createPitFieldPitsFieldsSeasonUuidCreatePostResponse422) & {
  headers: Headers;
};

export type createPitFieldPitsFieldsSeasonUuidCreatePostResponse = (createPitFieldPitsFieldsSeasonUuidCreatePostResponseSuccess | createPitFieldPitsFieldsSeasonUuidCreatePostResponseError)

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




  return `/pits/fields/${seasonUuid}/create`
}

/**
 * Create a new pit scouting field
 *
 * Requires superuser access
 *
 * Parameters:
 *     season_uuid (`UUID`): The UUID of the season to create the field for
 *     data (`CreatePitFieldRequest`): The data to create the field
 *
 * Returns:
 *     `PitFieldResponse`: The created field
 * @summary Create Pit Field
 */
export const createPitFieldPitsFieldsSeasonUuidCreatePost = async (seasonUuid: string,
    pitFieldRequest: PitFieldRequest, options?: Parameters<typeof customInstance>[1]): Promise<createPitFieldPitsFieldsSeasonUuidCreatePostResponse> => {

  return customInstance<createPitFieldPitsFieldsSeasonUuidCreatePostResponse>(getCreatePitFieldPitsFieldsSeasonUuidCreatePostUrl(seasonUuid),
  {
    ...options,
    method: 'POST',
    headers: { 'Content-Type': 'application/json', ...options?.headers },
    body: JSON.stringify(pitFieldRequest)
  }
);}


export type editPitFieldPitsFieldsSeasonUuidEditFieldUuidPatchResponse200 = {
  data: PitFieldResponse
  status: 200
}

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

export type editPitFieldPitsFieldsSeasonUuidEditFieldUuidPatchResponseSuccess = (editPitFieldPitsFieldsSeasonUuidEditFieldUuidPatchResponse200) & {
  headers: Headers;
};
export type editPitFieldPitsFieldsSeasonUuidEditFieldUuidPatchResponseError = (editPitFieldPitsFieldsSeasonUuidEditFieldUuidPatchResponse422) & {
  headers: Headers;
};

export type editPitFieldPitsFieldsSeasonUuidEditFieldUuidPatchResponse = (editPitFieldPitsFieldsSeasonUuidEditFieldUuidPatchResponseSuccess | editPitFieldPitsFieldsSeasonUuidEditFieldUuidPatchResponseError)

export const getEditPitFieldPitsFieldsSeasonUuidEditFieldUuidPatchUrl = (seasonUuid: string,
    fieldUuid: string,) => {




  return `/pits/fields/${seasonUuid}/edit/${fieldUuid}`
}

/**
 * Edit a pit scouting field
 *
 * Requires superuser access
 *
 * Parameters:
 *     season_uuid (`UUID`): The UUID of the season to edit the field for
 *     field_uuid (`UUID`): The UUID of the field to edit
 *     data (`PitFieldRequest`): The data to edit the field
 *
 * Returns:
 *     `PitFieldResponse`: The edited field
 * @summary Edit Pit Field
 */
export const editPitFieldPitsFieldsSeasonUuidEditFieldUuidPatch = async (seasonUuid: string,
    fieldUuid: string,
    pitFieldRequest: PitFieldRequest, options?: Parameters<typeof customInstance>[1]): Promise<editPitFieldPitsFieldsSeasonUuidEditFieldUuidPatchResponse> => {

  return customInstance<editPitFieldPitsFieldsSeasonUuidEditFieldUuidPatchResponse>(getEditPitFieldPitsFieldsSeasonUuidEditFieldUuidPatchUrl(seasonUuid,fieldUuid),
  {
    ...options,
    method: 'PATCH',
    headers: { 'Content-Type': 'application/json', ...options?.headers },
    body: JSON.stringify(pitFieldRequest)
  }
);}


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

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

export type movePitFieldsPitsFieldsSeasonUuidReorderPatchResponseSuccess = (movePitFieldsPitsFieldsSeasonUuidReorderPatchResponse200) & {
  headers: Headers;
};
export type movePitFieldsPitsFieldsSeasonUuidReorderPatchResponseError = (movePitFieldsPitsFieldsSeasonUuidReorderPatchResponse422) & {
  headers: Headers;
};

export type movePitFieldsPitsFieldsSeasonUuidReorderPatchResponse = (movePitFieldsPitsFieldsSeasonUuidReorderPatchResponseSuccess | movePitFieldsPitsFieldsSeasonUuidReorderPatchResponseError)

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




  return `/pits/fields/${seasonUuid}/reorder`
}

/**
 * Reorder pit scouting fields for a season
 *
 * Parameters:
 *     season_uuid (`UUID`): The UUID of the season to reorder fields for
 *     data (`ReorderPitFieldsRequest`): The data to reorder the fields
 *
 * Returns:
 *     `MessageResponse`: A message indicating that the fields were reordered
 * @summary Move Pit Fields
 */
export const movePitFieldsPitsFieldsSeasonUuidReorderPatch = async (seasonUuid: string,
    reorderPitFieldsRequest: ReorderPitFieldsRequest, options?: Parameters<typeof customInstance>[1]): Promise<movePitFieldsPitsFieldsSeasonUuidReorderPatchResponse> => {

  return customInstance<movePitFieldsPitsFieldsSeasonUuidReorderPatchResponse>(getMovePitFieldsPitsFieldsSeasonUuidReorderPatchUrl(seasonUuid),
  {
    ...options,
    method: 'PATCH',
    headers: { 'Content-Type': 'application/json', ...options?.headers },
    body: JSON.stringify(reorderPitFieldsRequest)
  }
);}


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

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

export type deletePitFieldPitsFieldsFieldUuidDeleteDeleteResponseSuccess = (deletePitFieldPitsFieldsFieldUuidDeleteDeleteResponse200) & {
  headers: Headers;
};
export type deletePitFieldPitsFieldsFieldUuidDeleteDeleteResponseError = (deletePitFieldPitsFieldsFieldUuidDeleteDeleteResponse422) & {
  headers: Headers;
};

export type deletePitFieldPitsFieldsFieldUuidDeleteDeleteResponse = (deletePitFieldPitsFieldsFieldUuidDeleteDeleteResponseSuccess | deletePitFieldPitsFieldsFieldUuidDeleteDeleteResponseError)

export const getDeletePitFieldPitsFieldsFieldUuidDeleteDeleteUrl = (fieldUuid: string,) => {




  return `/pits/fields/${fieldUuid}/delete`
}

/**
 * Delete a pit scouting field
 *
 * Requires superuser access
 *
 * Parameters:
 *     field_uuid (`UUID`): The UUID of the field to delete
 *     data (`DeletePitFieldRequest`): The UUID of the field to delete
 *
 * Returns:
 *     `MessageResponse`: A message indicating that the field was deleted
 * @summary Delete Pit Field
 */
export const deletePitFieldPitsFieldsFieldUuidDeleteDelete = async (fieldUuid: string, options?: Parameters<typeof customInstance>[1]): Promise<deletePitFieldPitsFieldsFieldUuidDeleteDeleteResponse> => {

  return customInstance<deletePitFieldPitsFieldsFieldUuidDeleteDeleteResponse>(getDeletePitFieldPitsFieldsFieldUuidDeleteDeleteUrl(fieldUuid),
  {
    ...options,
    method: 'DELETE'


  }
);}


export type getPitsPitsGetSeasonUuidPostResponse200 = {
  data: GetPitsResponse[]
  status: 200
}

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

export type getPitsPitsGetSeasonUuidPostResponseSuccess = (getPitsPitsGetSeasonUuidPostResponse200) & {
  headers: Headers;
};
export type getPitsPitsGetSeasonUuidPostResponseError = (getPitsPitsGetSeasonUuidPostResponse422) & {
  headers: Headers;
};

export type getPitsPitsGetSeasonUuidPostResponse = (getPitsPitsGetSeasonUuidPostResponseSuccess | getPitsPitsGetSeasonUuidPostResponseError)

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




  return `/pits/get/${seasonUuid}`
}

/**
 * Get all pits for a season
 *
 * Parameters:
 *     season_uuid (`UUID`): The UUID of the season to get pits for
 *     data (`GetPitsForSeasonRequest`): The UUID of the season to get pits for
 *
 * Returns:
 *     list: A list of all pits for the season
 * @summary Get Pits
 */
export const getPitsPitsGetSeasonUuidPost = async (seasonUuid: string,
    getPitsForSeasonRequest: GetPitsForSeasonRequest, options?: Parameters<typeof customInstance>[1]): Promise<getPitsPitsGetSeasonUuidPostResponse> => {

  return customInstance<getPitsPitsGetSeasonUuidPostResponse>(getGetPitsPitsGetSeasonUuidPostUrl(seasonUuid),
  {
    ...options,
    method: 'POST',
    headers: { 'Content-Type': 'application/json', ...options?.headers },
    body: JSON.stringify(getPitsForSeasonRequest)
  }
);}


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

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

export type submitPitPitsSubmitSeasonUuidTeamNumberPostResponseSuccess = (submitPitPitsSubmitSeasonUuidTeamNumberPostResponse200) & {
  headers: Headers;
};
export type submitPitPitsSubmitSeasonUuidTeamNumberPostResponseError = (submitPitPitsSubmitSeasonUuidTeamNumberPostResponse422) & {
  headers: Headers;
};

export type submitPitPitsSubmitSeasonUuidTeamNumberPostResponse = (submitPitPitsSubmitSeasonUuidTeamNumberPostResponseSuccess | submitPitPitsSubmitSeasonUuidTeamNumberPostResponseError)

export const getSubmitPitPitsSubmitSeasonUuidTeamNumberPostUrl = (seasonUuid: string,
    teamNumber: number,) => {




  return `/pits/submit/${seasonUuid}/${teamNumber}`
}

/**
 * Get the season and event from the uuids. Then, check if a pit with that team number exists.
 * If it does, update that pit
 *
 * For the answers in that pit, find each answer that does not already exist on the server, and add them
 *
 * If a pit does not exist, that means it was created by the client of a user. It should be created.
 *
 * Parameters:
 *     season_uuid (`UUID`): The UUID of the season to get pits for
 *     team_number (`int`): The team number to get pits for
 *     data (`SubmitPitFieldAnswerRequest`): The UUID of the season and event to get pits for
 *
 * Returns:
 *     MessageResponse: A message indicating that the pits were submitted
 * @summary Submit Pit
 */
export const submitPitPitsSubmitSeasonUuidTeamNumberPost = async (seasonUuid: string,
    teamNumber: number,
    submitPitFieldAnswerRequest: SubmitPitFieldAnswerRequest, options?: Parameters<typeof customInstance>[1]): Promise<submitPitPitsSubmitSeasonUuidTeamNumberPostResponse> => {

  return customInstance<submitPitPitsSubmitSeasonUuidTeamNumberPostResponse>(getSubmitPitPitsSubmitSeasonUuidTeamNumberPostUrl(seasonUuid,teamNumber),
  {
    ...options,
    method: 'POST',
    headers: { 'Content-Type': 'application/json', ...options?.headers },
    body: JSON.stringify(submitPitFieldAnswerRequest)
  }
);}


export type getAllPitsPitsGetGetResponse200 = {
  data: AdminPitResponse[]
  status: 200
}

export type getAllPitsPitsGetGetResponseSuccess = (getAllPitsPitsGetGetResponse200) & {
  headers: Headers;
};
;

export type getAllPitsPitsGetGetResponse = (getAllPitsPitsGetGetResponseSuccess)

export const getGetAllPitsPitsGetGetUrl = () => {




  return `/pits/get`
}

/**
 * Get all pits
 *
 * Requires superuser access
 *
 * Returns:
 *     list[AdminPitResponse]: A list of all pits
 * @summary Get All Pits
 */
export const getAllPitsPitsGetGet = async ( options?: Parameters<typeof customInstance>[1]): Promise<getAllPitsPitsGetGetResponse> => {

  return customInstance<getAllPitsPitsGetGetResponse>(getGetAllPitsPitsGetGetUrl(),
  {
    ...options,
    method: 'GET'


  }
);}


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

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

export type deletePitPitsDeletePitUuidDeleteResponseSuccess = (deletePitPitsDeletePitUuidDeleteResponse200) & {
  headers: Headers;
};
export type deletePitPitsDeletePitUuidDeleteResponseError = (deletePitPitsDeletePitUuidDeleteResponse422) & {
  headers: Headers;
};

export type deletePitPitsDeletePitUuidDeleteResponse = (deletePitPitsDeletePitUuidDeleteResponseSuccess | deletePitPitsDeletePitUuidDeleteResponseError)

export const getDeletePitPitsDeletePitUuidDeleteUrl = (pitUuid: string,) => {




  return `/pits/delete/${pitUuid}`
}

/**
 * Delete a pit
 *
 * Requires superuser access
 *
 * Parameters:
 *     pit_uuid (`UUID`): The UUID of the pit to delete
 *
 * Returns:
 *     MessageResponse: A message indicating that the pit was deleted
 * @summary Delete Pit
 */
export const deletePitPitsDeletePitUuidDelete = async (pitUuid: string, options?: Parameters<typeof customInstance>[1]): Promise<deletePitPitsDeletePitUuidDeleteResponse> => {

  return customInstance<deletePitPitsDeletePitUuidDeleteResponse>(getDeletePitPitsDeletePitUuidDeleteUrl(pitUuid),
  {
    ...options,
    method: 'DELETE'


  }
);}


export type getPitScoutingFieldPresetsPitsGetPresetsGetResponse200 = {
  data: PitScoutingPresetResponse[]
  status: 200
}

export type getPitScoutingFieldPresetsPitsGetPresetsGetResponseSuccess = (getPitScoutingFieldPresetsPitsGetPresetsGetResponse200) & {
  headers: Headers;
};
;

export type getPitScoutingFieldPresetsPitsGetPresetsGetResponse = (getPitScoutingFieldPresetsPitsGetPresetsGetResponseSuccess)

export const getGetPitScoutingFieldPresetsPitsGetPresetsGetUrl = () => {




  return `/pits/get_presets`
}

/**
 * Get all JSON pit scouting field presets
 *
 * Requires superuser access
 *
 * Returns:
 *     `list[Any]`: A list of all pit scouting field presets
 * @summary Get Pit Scouting Field Presets
 */
export const getPitScoutingFieldPresetsPitsGetPresetsGet = async ( options?: Parameters<typeof customInstance>[1]): Promise<getPitScoutingFieldPresetsPitsGetPresetsGetResponse> => {

  return customInstance<getPitScoutingFieldPresetsPitsGetPresetsGetResponse>(getGetPitScoutingFieldPresetsPitsGetPresetsGetUrl(),
  {
    ...options,
    method: 'GET'


  }
);}


