/**
 * Generated by orval v8.23.0 🍺
 * Do not edit manually.
 * FastAPI
 * OpenAPI spec version: v2.2.0
 */
import * as zod from 'zod';


/**
 * 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 GetPitFieldsPitsFieldsSeasonUuidGetParams = zod.object({
  "season_uuid": zod.uuid()
})

export const GetPitFieldsPitsFieldsSeasonUuidGetResponseItem = zod.object({
  "uuid": zod.uuid(),
  "season": zod.uuid(),
  "name": zod.string(),
  "description": zod.union([zod.string(),zod.null()]),
  "required": zod.boolean(),
  "field_type": zod.string(),
  "options": zod.union([zod.object({
  "choices": zod.array(zod.unknown())
}),zod.null()]),
  "order": zod.int(),
  "organization": zod.union([zod.uuid(),zod.null()]),
  "created_at": zod.iso.datetime({"offset":true})
})
export const GetPitFieldsPitsFieldsSeasonUuidGetResponse = zod.array(GetPitFieldsPitsFieldsSeasonUuidGetResponseItem)

/**
 * 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 ClearPitFieldsPitsFieldsSeasonUuidClearDeleteParams = zod.object({
  "season_uuid": zod.uuid()
})

export const ClearPitFieldsPitsFieldsSeasonUuidClearDeleteResponse = zod.object({
  "message": zod.string()
})

/**
 * 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 CreatePitFieldPitsFieldsSeasonUuidCreatePostParams = zod.object({
  "season_uuid": zod.uuid()
})

export const CreatePitFieldPitsFieldsSeasonUuidCreatePostBody = zod.object({
  "uuid": zod.union([zod.uuid(),zod.null()]).optional(),
  "season_uuid": zod.uuid(),
  "name": zod.string(),
  "description": zod.union([zod.string(),zod.null()]),
  "required": zod.boolean(),
  "field_type": zod.string(),
  "options": zod.object({
  "choices": zod.array(zod.unknown())
}),
  "order": zod.int(),
  "organization_uuid": zod.union([zod.uuid(),zod.null()]).optional()
})

export const CreatePitFieldPitsFieldsSeasonUuidCreatePostResponse = zod.object({
  "uuid": zod.uuid(),
  "season": zod.uuid(),
  "name": zod.string(),
  "description": zod.union([zod.string(),zod.null()]),
  "required": zod.boolean(),
  "field_type": zod.string(),
  "options": zod.union([zod.object({
  "choices": zod.array(zod.unknown())
}),zod.null()]),
  "order": zod.int(),
  "organization": zod.union([zod.uuid(),zod.null()]),
  "created_at": zod.iso.datetime({"offset":true})
})

/**
 * 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 EditPitFieldPitsFieldsSeasonUuidEditFieldUuidPatchParams = zod.object({
  "season_uuid": zod.uuid(),
  "field_uuid": zod.uuid()
})

export const EditPitFieldPitsFieldsSeasonUuidEditFieldUuidPatchBody = zod.object({
  "uuid": zod.union([zod.uuid(),zod.null()]).optional(),
  "season_uuid": zod.uuid(),
  "name": zod.string(),
  "description": zod.union([zod.string(),zod.null()]),
  "required": zod.boolean(),
  "field_type": zod.string(),
  "options": zod.object({
  "choices": zod.array(zod.unknown())
}),
  "order": zod.int(),
  "organization_uuid": zod.union([zod.uuid(),zod.null()]).optional()
})

export const EditPitFieldPitsFieldsSeasonUuidEditFieldUuidPatchResponse = zod.object({
  "uuid": zod.uuid(),
  "season": zod.uuid(),
  "name": zod.string(),
  "description": zod.union([zod.string(),zod.null()]),
  "required": zod.boolean(),
  "field_type": zod.string(),
  "options": zod.union([zod.object({
  "choices": zod.array(zod.unknown())
}),zod.null()]),
  "order": zod.int(),
  "organization": zod.union([zod.uuid(),zod.null()]),
  "created_at": zod.iso.datetime({"offset":true})
})

/**
 * 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 MovePitFieldsPitsFieldsSeasonUuidReorderPatchParams = zod.object({
  "season_uuid": zod.uuid()
})

export const MovePitFieldsPitsFieldsSeasonUuidReorderPatchBodyItem = zod.object({
  "uuid": zod.uuid(),
  "order": zod.int()
})
export const MovePitFieldsPitsFieldsSeasonUuidReorderPatchBody = zod.array(MovePitFieldsPitsFieldsSeasonUuidReorderPatchBodyItem)

export const MovePitFieldsPitsFieldsSeasonUuidReorderPatchResponse = zod.object({
  "message": zod.string()
})

/**
 * 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 DeletePitFieldPitsFieldsFieldUuidDeleteDeleteParams = zod.object({
  "field_uuid": zod.uuid()
})

export const DeletePitFieldPitsFieldsFieldUuidDeleteDeleteResponse = zod.object({
  "message": zod.string()
})

/**
 * 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 GetPitsPitsGetSeasonUuidPostParams = zod.object({
  "season_uuid": zod.uuid()
})

export const GetPitsPitsGetSeasonUuidPostBody = zod.object({
  "season_uuid": zod.uuid(),
  "event_code": zod.string(),
  "event_name": zod.string(),
  "event_type": zod.string(),
  "event_city": zod.string(),
  "event_country": zod.string(),
  "event_start_date": zod.string(),
  "event_end_date": zod.string(),
  "event_custom": zod.boolean()
})

export const GetPitsPitsGetSeasonUuidPostResponseItem = zod.object({
  "uuid": zod.uuid(),
  "team_number": zod.int(),
  "nickname": zod.string(),
  "created_at": zod.iso.datetime({"offset":true}),
  "answers": zod.array(zod.object({
  "uuid": zod.uuid(),
  "field_uuid": zod.uuid(),
  "value": zod.union([zod.string(),zod.boolean(),zod.int(),zod.number()]),
  "username": zod.string(),
  "created_at": zod.iso.datetime({"offset":true})
}))
})
export const GetPitsPitsGetSeasonUuidPostResponse = zod.array(GetPitsPitsGetSeasonUuidPostResponseItem)

/**
 * 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 SubmitPitPitsSubmitSeasonUuidTeamNumberPostParams = zod.object({
  "season_uuid": zod.uuid(),
  "team_number": zod.int()
})

export const SubmitPitPitsSubmitSeasonUuidTeamNumberPostBody = zod.object({
  "uuid": zod.uuid(),
  "season_uuid": zod.uuid(),
  "team_number": zod.int(),
  "event_code": zod.string(),
  "event_name": zod.string(),
  "event_type": zod.string(),
  "event_city": zod.string(),
  "event_country": zod.string(),
  "event_start_date": zod.string(),
  "event_end_date": zod.string(),
  "answers": zod.array(zod.unknown()),
  "nickname": zod.string()
})

export const SubmitPitPitsSubmitSeasonUuidTeamNumberPostResponse = zod.object({
  "message": zod.string()
})

/**
 * Get all pits
 *
 * Requires superuser access
 *
 * Returns:
 *     list[AdminPitResponse]: A list of all pits
 * @summary Get All Pits
 */
export const GetAllPitsPitsGetGetResponseItem = zod.object({
  "uuid": zod.uuid(),
  "event_name": zod.string(),
  "event_code": zod.string(),
  "team_number": zod.int(),
  "answers": zod.int(),
  "created_at": zod.iso.datetime({"offset":true})
})
export const GetAllPitsPitsGetGetResponse = zod.array(GetAllPitsPitsGetGetResponseItem)

/**
 * 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 DeletePitPitsDeletePitUuidDeleteParams = zod.object({
  "pit_uuid": zod.uuid()
})

export const DeletePitPitsDeletePitUuidDeleteResponse = zod.object({
  "message": zod.string()
})

/**
 * 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 GetPitScoutingFieldPresetsPitsGetPresetsGetResponseItem = zod.object({
  "name": zod.string(),
  "preset": zod.record(zod.string(), zod.unknown())
})
export const GetPitScoutingFieldPresetsPitsGetPresetsGetResponse = zod.array(GetPitScoutingFieldPresetsPitsGetPresetsGetResponseItem)

