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


/**
 * Get all available repairs
 *
 * Requires superuser access
 *
 * The following repairs are able to be returned here:
 *     - `Event` is missing a `season`
 *     - `GamePiece` is mising a `season`
 *     - `MatchScoutingField` is missing a `season`
 *     - `MatchScoutingField` is missing a `game_piece` if `stat_type` is `auton_score`, `auton_miss`, `teleop_score` or `teleop_miss`
 *     - `MatchScoutingSubmission` is missing an `event`
 *     - `MatchScoutingAnswer` is missing a `field`
 *     - `MatchScoutingAnswer` is missing a `submission`
 *     - `PitScoutingField` is missing a `season`
 *     - `TeamPit` is missing a `season`
 *     - `TeamPit` is missing an `event`
 *     - `PitScoutingAnswer` is missing a `field`
 *     - `PitScoutingAnswer` is missing a `team`
 * @summary Get Repairs
 */
export const GetRepairsRepairsGetGetResponseItem = zod.union([zod.object({
  "name": zod.string(),
  "data_uuid": zod.uuid(),
  "data_created_at": zod.iso.datetime({"offset":true}),
  "data_type": zod.enum(['event']),
  "repair_type": zod.literal("missing_season")
}),zod.object({
  "name": zod.string(),
  "data_uuid": zod.uuid(),
  "data_created_at": zod.iso.datetime({"offset":true}),
  "data_type": zod.enum(['game_piece']),
  "repair_type": zod.literal("missing_season")
}),zod.object({
  "name": zod.string(),
  "data_uuid": zod.uuid(),
  "data_created_at": zod.iso.datetime({"offset":true}),
  "data_type": zod.enum(['match_scouting_field']),
  "repair_type": zod.enum(['missing_season', 'missing_game_piece'])
}),zod.object({
  "name": zod.string(),
  "data_uuid": zod.uuid(),
  "data_created_at": zod.iso.datetime({"offset":true}),
  "data_type": zod.enum(['match_scouting_submission']),
  "repair_type": zod.literal("missing_event")
}),zod.object({
  "name": zod.string(),
  "data_uuid": zod.uuid(),
  "data_created_at": zod.iso.datetime({"offset":true}),
  "data_type": zod.enum(['match_scouting_answer']),
  "repair_type": zod.enum(['missing_field', 'missing_submission'])
}),zod.object({
  "name": zod.string(),
  "data_uuid": zod.uuid(),
  "data_created_at": zod.iso.datetime({"offset":true}),
  "data_type": zod.enum(['pit_scouting_field']),
  "repair_type": zod.literal("missing_season")
}),zod.object({
  "name": zod.string(),
  "data_uuid": zod.uuid(),
  "data_created_at": zod.iso.datetime({"offset":true}),
  "data_type": zod.enum(['team_pit']),
  "repair_type": zod.enum(['missing_season', 'missing_event'])
}),zod.object({
  "name": zod.string(),
  "data_uuid": zod.uuid(),
  "data_created_at": zod.iso.datetime({"offset":true}),
  "data_type": zod.enum(['pit_scouting_answer']),
  "repair_type": zod.enum(['missing_field', 'missing_team'])
})])
export const GetRepairsRepairsGetGetResponse = zod.array(GetRepairsRepairsGetGetResponseItem)

/**
 * Get the number of available repairs
 *
 * Requires superuser access
 *
 * Returns:
 *     int: The number of available repairs
 * @summary Get Repair Count
 */
export const GetRepairCountRepairsGetCountGetResponse = zod.int()

/**
 * @summary Create Repairs For Testing
 */
export const CreateRepairsForTestingRepairsCreatePostResponse = zod.unknown()

/**
 * Get all match scouting fields. Used on the admin repair page when setting the match scouting field on a piece of data.
 *
 * Requires superuser access
 *
 * Returns:
 *     list[MatchScoutingFieldRepairResponse]: A list of all match scouting fields
 * @summary Get All Match Scouting Fields
 */
export const GetAllMatchScoutingFieldsRepairsGetMatchScoutingFieldsGetResponseItem = zod.object({
  "uuid": zod.uuid(),
  "name": zod.string(),
  "season_year": zod.union([zod.int(),zod.null()]),
  "game_piece_name": zod.union([zod.string(),zod.null()]),
  "archived": zod.boolean(),
  "created_at": zod.iso.datetime({"offset":true})
})
export const GetAllMatchScoutingFieldsRepairsGetMatchScoutingFieldsGetResponse = zod.array(GetAllMatchScoutingFieldsRepairsGetMatchScoutingFieldsGetResponseItem)

/**
 * Get all pit scouting fields. Used on the admin repair page when setting the pit scouting field on a piece of data.
 *
 * Requires superuser access
 *
 * Returns:
 *     list[PitScoutingFieldRepairResponse]: A list of all pit scouting fields
 * @summary Get All Pit Scouting Fields
 */
export const GetAllPitScoutingFieldsRepairsGetPitScoutingFieldsGetResponseItem = zod.object({
  "uuid": zod.uuid(),
  "name": zod.string(),
  "season_year": zod.union([zod.int(),zod.null()]),
  "archived": zod.boolean(),
  "created_at": zod.iso.datetime({"offset":true})
})
export const GetAllPitScoutingFieldsRepairsGetPitScoutingFieldsGetResponse = zod.array(GetAllPitScoutingFieldsRepairsGetPitScoutingFieldsGetResponseItem)

/**
 * Fix a repair
 *
 * Requires superuser access
 *
 * Parameters:
 *     data (`RepairRequest`): The data to fix
 *
 * Returns:
 *     `MessageResponse`: A message indicating that the repair was fixed (or failed to fix)
 * @summary Fix Repair
 */
export const FixRepairRepairsFixPostBody = zod.union([zod.object({
  "data_uuid": zod.uuid(),
  "content_uuid": zod.union([zod.uuid(),zod.null()]).optional(),
  "data_type": zod.literal("event"),
  "repair_type": zod.literal("missing_season")
}),zod.object({
  "data_uuid": zod.uuid(),
  "content_uuid": zod.union([zod.uuid(),zod.null()]).optional(),
  "data_type": zod.literal("game_piece"),
  "repair_type": zod.literal("missing_season")
}),zod.object({
  "data_uuid": zod.uuid(),
  "content_uuid": zod.union([zod.uuid(),zod.null()]).optional(),
  "data_type": zod.literal("match_scouting_field"),
  "repair_type": zod.enum(['missing_season', 'missing_game_piece'])
}),zod.object({
  "data_uuid": zod.uuid(),
  "content_uuid": zod.union([zod.uuid(),zod.null()]).optional(),
  "data_type": zod.literal("match_scouting_submission"),
  "repair_type": zod.literal("missing_event"),
  "event_code": zod.union([zod.string(),zod.null()]).optional()
}),zod.object({
  "data_uuid": zod.uuid(),
  "content_uuid": zod.union([zod.uuid(),zod.null()]).optional(),
  "data_type": zod.literal("match_scouting_answer"),
  "repair_type": zod.enum(['missing_field', 'missing_submission'])
}),zod.object({
  "data_uuid": zod.uuid(),
  "content_uuid": zod.union([zod.uuid(),zod.null()]).optional(),
  "data_type": zod.literal("pit_scouting_field"),
  "repair_type": zod.literal("missing_season")
}),zod.object({
  "data_uuid": zod.uuid(),
  "content_uuid": zod.union([zod.uuid(),zod.null()]).optional(),
  "data_type": zod.literal("team_pit"),
  "repair_type": zod.enum(['missing_season', 'missing_event']),
  "event_code": zod.union([zod.string(),zod.null()]).optional()
}),zod.object({
  "data_uuid": zod.uuid(),
  "content_uuid": zod.union([zod.uuid(),zod.null()]).optional(),
  "data_type": zod.literal("pit_scouting_answer"),
  "repair_type": zod.enum(['missing_field', 'missing_team'])
})])

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

/**
 * Delete data associated with a repair
 *
 * Requires superuser access
 *
 * Parameters:
 *     data_type: The type of data to delete
 *     data_uuid (`UUID`): The uuid of the data to delete
 * @summary Delete Repair Data
 */
export const DeleteRepairDataRepairsDeleteDataTypeDataUuidDeleteParams = zod.object({
  "data_type": zod.enum(['event', 'game_piece', 'match_scouting_field', 'match_scouting_submission', 'match_scouting_answer', 'pit_scouting_field', 'team_pit', 'pit_scouting_answer']),
  "data_uuid": zod.uuid()
})

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

