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


/**
 * For a year, list of event codes, and list of team numbers, return a JSON object
 *     containing the available filters that can additionally be applied
 *
 * For example, if just a year is given, return all team numbers and events with data on the server.
 * If a year and event code is given, return all team numbers for that event and year with data on the server.
 * If a year and multiple event codes are given, return all team numbers which have data on the server for those event codes and year.
 * If a year and a team number is given, return all event codes which have data on the server for that team number and year.
 * If a year and multiple team numbers are given, return all event codes which have data on the server for those team numbers and year.
 * @summary Get Data Filters
 */
export const GetDataFiltersDataFiltersGetQueryParams = zod.object({
  "year": zod.int(),
  "event_codes": zod.union([zod.string(),zod.null()]).optional(),
  "team_numbers": zod.union([zod.string(),zod.null()]).optional()
})

export const GetDataFiltersDataFiltersGetResponse = zod.object({
  "events": zod.array(zod.object({
  "event_code": zod.string(),
  "event_name": zod.string()
})),
  "teams": zod.array(zod.object({
  "team_number": zod.int()
}))
})

/**
 * Given a year, event codes, and team numbers, return the data that matches those filters
 *
 * Data should be structured based on the stat_type and game_piece of the associated MatchScoutingField.
 * The data should be a list of JSON objects. Each object represents a team with data. In that object,
 *     there should be four lists: teleop, auton, capability, other
 * teleop and auton should be a list of JSON objects, for each game_piece for that season.
 *     Then, for each game piece, it should be a list of JSON objects that represents each individual field with type: auton_score, auton_miss, teleop_score, teleop_miss
 *     These fields should have the field type, name, uuid, list of all data points, and the minimum, the maximum, and the average (if applicable).
 *
 * For example, there are two game pieces. Coral and Algae. There is a field for how much coral was scored and how much were dropped, both as a teleop_score.
 *     There will be a list of JSON objects for each team. In the team object, inside the teleop list, there should be two additional lists, one for coral and one for algae.
 *     Then there will two more JSON objects for both of those fields, with the field type, name, uuid, and list of all data points.
 *
 * Next, for capabilities, find each field that is a capability and find the percentages of each value occurrence. This will most likely
 *     be something that is a multiple_choice or choice MatchScoutingField, and we'll want to show how often each value occurred using something like a pie chart.
 *
 * Finally, for other, simply return the same field information and the value, as this will likely be a text input.
 *
 * [
 *     {
 *         "team_number": 1234,
 *         "nickname": "Team 1234",
 *         "teleop": [
 *             "coral": [
 *                 {
 *                     "field_uuid": "uuid",
 *                     "field_type": "small_number",
 *                     "field_name": "Coral scored",
 *                     "values": [1, 2, 3, ...],
 *                     "min": 0,
 *                     "max": 100,
 *                     "avg": 50
 *                 },
 *                 {
 *                     "field_uuid": "uuid",
 *                     "field_type": "small_number",
 *                     "field_name": "Coral dropped",
 *                     "values": [1, 2, 3, ...],
 *                     "min": 0,
 *                     "max": 100,
 *                     "avg": 50
 *                 }
 *             ],
 *             "algae": [...],
 *         ],
 *         "auton": [...],
 *         "capability": [
 *             {
 *                 "field_uuid": "uuid",
 *                 "field_type": "choice",
 *                 "field_name": "Climb level",
 *                 "values": ["low", "medium", "high"],
 *                 "percentages": [
 *                     {
 *                         "value": "low",
 *                         "percentage": 50
 *                     }, {
 *                         "value": "medium",
 *                         "percentage": 25
 *                     }, {
 *                         "value": "high",
 *                         "percentage": 25
 *                     }
 *                 ],
 *                 ...
 *             }
 *         ],
 *         "other": [
 *             {
 *                 "field_uuid": "uuid",
 *                 "field_type": "string",
 *                 "field_name": "Notes",
 *                 "value": "Some notes",
 *             },
 *             ...
 *         ]
 *     },
 *     ...
 * ]
 * @summary Get Data
 */
export const GetDataDataGetGetQueryParams = zod.object({
  "year": zod.int(),
  "event_codes": zod.union([zod.string(),zod.null()]).optional(),
  "team_numbers": zod.union([zod.string(),zod.null()]).optional()
})

export const GetDataDataGetGetResponseItem = zod.object({
  "team_number": zod.int(),
  "nickname": zod.union([zod.string(),zod.null()]),
  "teleop": zod.record(zod.string(), zod.array(zod.object({
  "field_uuid": zod.string(),
  "field_type": zod.string(),
  "field_name": zod.string(),
  "values": zod.array(zod.object({
  "match_number": zod.int(),
  "value": zod.union([zod.string(),zod.boolean(),zod.int(),zod.number(),zod.null()])
})),
  "min": zod.number(),
  "max": zod.number(),
  "avg": zod.number()
}))),
  "auton": zod.record(zod.string(), zod.array(zod.object({
  "field_uuid": zod.string(),
  "field_type": zod.string(),
  "field_name": zod.string(),
  "values": zod.array(zod.object({
  "match_number": zod.int(),
  "value": zod.union([zod.string(),zod.boolean(),zod.int(),zod.number(),zod.null()])
})),
  "min": zod.number(),
  "max": zod.number(),
  "avg": zod.number()
}))),
  "capability": zod.array(zod.object({
  "field_uuid": zod.string(),
  "field_type": zod.string(),
  "field_name": zod.string(),
  "values": zod.array(zod.union([zod.string(),zod.boolean(),zod.int(),zod.number(),zod.null()])),
  "percentages": zod.array(zod.object({
  "value": zod.union([zod.string(),zod.boolean(),zod.int(),zod.number(),zod.null()]),
  "percentage": zod.number()
}))
})),
  "other": zod.array(zod.object({
  "field_uuid": zod.string(),
  "field_type": zod.string(),
  "field_name": zod.string(),
  "values": zod.array(zod.object({
  "match_number": zod.int(),
  "value": zod.union([zod.string(),zod.boolean(),zod.int(),zod.number(),zod.null()])
}))
})),
  "summary": zod.array(zod.object({
  "field_uuid": zod.string(),
  "field_name": zod.string(),
  "stat_type": zod.string(),
  "avg": zod.union([zod.number(),zod.string()]),
  "values": zod.union([zod.array(zod.union([zod.int(),zod.number()])),zod.record(zod.string(), zod.number())])
}))
})
export const GetDataDataGetGetResponse = zod.array(GetDataDataGetGetResponseItem)

