// This file is auto-generated by @hey-api/openapi-ts

import * as z from 'zod'

/**
 * AccountAvatarPayload
 */
export const zAccountAvatarPayload = z.object({
  avatar: z.string(),
})

/**
 * Account
 */
export const zAccount = z.object({
  avatar: z.string().nullish(),
  created_at: z.int().nullish(),
  email: z.string(),
  id: z.string(),
  interface_language: z.string().nullish(),
  interface_theme: z.string().nullish(),
  is_password_set: z.boolean(),
  last_login_at: z.int().nullish(),
  last_login_ip: z.string().nullish(),
  name: z.string(),
  timezone: z.string().nullish(),
})

/**
 * ChangeEmailSendPayload
 */
export const zChangeEmailSendPayload = z.object({
  email: z.string(),
  language: z.string().nullish(),
  phase: z.string().nullish(),
  token: z.string().nullish(),
})

/**
 * CheckEmailUniquePayload
 */
export const zCheckEmailUniquePayload = z.object({
  email: z.string(),
})

/**
 * ChangeEmailResetPayload
 */
export const zChangeEmailResetPayload = z.object({
  new_email: z.string(),
  token: z.string(),
})

/**
 * ChangeEmailValidityPayload
 */
export const zChangeEmailValidityPayload = z.object({
  code: z.string(),
  email: z.string(),
  token: z.string(),
})

/**
 * AccountDeletePayload
 */
export const zAccountDeletePayload = z.object({
  code: z.string(),
  token: z.string(),
})

/**
 * AccountDeletionFeedbackPayload
 */
export const zAccountDeletionFeedbackPayload = z.object({
  email: z.string(),
  feedback: z.string(),
})

/**
 * EducationStatusResponse
 */
export const zEducationStatusResponse = z.object({
  allow_refresh: z.boolean().nullish(),
  expire_at: z.int().nullish(),
  is_student: z.boolean().nullish(),
  result: z.boolean().nullish(),
})

/**
 * EducationActivatePayload
 */
export const zEducationActivatePayload = z.object({
  institution: z.string(),
  role: z.string(),
  token: z.string(),
})

/**
 * EducationAutocompleteResponse
 */
export const zEducationAutocompleteResponse = z.object({
  curr_page: z.int().nullish(),
  data: z.array(z.string()).optional(),
  has_next: z.boolean().nullish(),
})

/**
 * EducationVerifyResponse
 */
export const zEducationVerifyResponse = z.object({
  token: z.string().nullish(),
})

/**
 * AccountInitPayload
 */
export const zAccountInitPayload = z.object({
  interface_language: z.string(),
  invitation_code: z.string().nullish(),
  timezone: z.string(),
})

/**
 * AccountInterfaceLanguagePayload
 */
export const zAccountInterfaceLanguagePayload = z.object({
  interface_language: z.string(),
})

/**
 * AccountInterfaceThemePayload
 */
export const zAccountInterfaceThemePayload = z.object({
  interface_theme: z.enum(['light', 'dark']),
})

/**
 * AccountNamePayload
 */
export const zAccountNamePayload = z.object({
  name: z.string().min(3).max(30),
})

/**
 * AccountPasswordPayload
 */
export const zAccountPasswordPayload = z.object({
  new_password: z.string(),
  password: z.string().nullish(),
  repeat_new_password: z.string(),
})

/**
 * AccountTimezonePayload
 */
export const zAccountTimezonePayload = z.object({
  timezone: z.string(),
})

/**
 * AccountIntegrateResponse
 */
export const zAccountIntegrateResponse = z.object({
  created_at: z.int().nullish(),
  is_bound: z.boolean(),
  link: z.string().nullish(),
  provider: z.string(),
})

/**
 * AccountIntegrateListResponse
 */
export const zAccountIntegrateListResponse = z.object({
  data: z.array(zAccountIntegrateResponse),
})

export const zGetAccountAvatarQuery = z.object({
  avatar: z.string(),
})

/**
 * Success
 */
export const zGetAccountAvatarResponse = z.record(z.string(), z.unknown())

export const zPostAccountAvatarBody = zAccountAvatarPayload

/**
 * Success
 */
export const zPostAccountAvatarResponse = zAccount

export const zPostAccountChangeEmailBody = zChangeEmailSendPayload

/**
 * Success
 */
export const zPostAccountChangeEmailResponse = z.record(z.string(), z.unknown())

export const zPostAccountChangeEmailCheckEmailUniqueBody = zCheckEmailUniquePayload

/**
 * Success
 */
export const zPostAccountChangeEmailCheckEmailUniqueResponse = z.record(z.string(), z.unknown())

export const zPostAccountChangeEmailResetBody = zChangeEmailResetPayload

/**
 * Success
 */
export const zPostAccountChangeEmailResetResponse = zAccount

export const zPostAccountChangeEmailValidityBody = zChangeEmailValidityPayload

/**
 * Success
 */
export const zPostAccountChangeEmailValidityResponse = z.record(z.string(), z.unknown())

export const zPostAccountDeleteBody = zAccountDeletePayload

/**
 * Success
 */
export const zPostAccountDeleteResponse = z.record(z.string(), z.unknown())

export const zPostAccountDeleteFeedbackBody = zAccountDeletionFeedbackPayload

/**
 * Success
 */
export const zPostAccountDeleteFeedbackResponse = z.record(z.string(), z.unknown())

/**
 * Success
 */
export const zGetAccountDeleteVerifyResponse = z.record(z.string(), z.unknown())

/**
 * Success
 */
export const zGetAccountEducationResponse = zEducationStatusResponse

export const zPostAccountEducationBody = zEducationActivatePayload

/**
 * Success
 */
export const zPostAccountEducationResponse = z.record(z.string(), z.unknown())

export const zGetAccountEducationAutocompleteQuery = z.object({
  keywords: z.string(),
  limit: z.int().optional().default(20),
  page: z.int().optional().default(0),
})

/**
 * Success
 */
export const zGetAccountEducationAutocompleteResponse = zEducationAutocompleteResponse

/**
 * Success
 */
export const zGetAccountEducationVerifyResponse = zEducationVerifyResponse

export const zPostAccountInitBody = zAccountInitPayload

/**
 * Success
 */
export const zPostAccountInitResponse = z.record(z.string(), z.unknown())

/**
 * Success
 */
export const zGetAccountIntegratesResponse = zAccountIntegrateListResponse

export const zPostAccountInterfaceLanguageBody = zAccountInterfaceLanguagePayload

/**
 * Success
 */
export const zPostAccountInterfaceLanguageResponse = zAccount

export const zPostAccountInterfaceThemeBody = zAccountInterfaceThemePayload

/**
 * Success
 */
export const zPostAccountInterfaceThemeResponse = zAccount

export const zPostAccountNameBody = zAccountNamePayload

/**
 * Success
 */
export const zPostAccountNameResponse = zAccount

export const zPostAccountPasswordBody = zAccountPasswordPayload

/**
 * Success
 */
export const zPostAccountPasswordResponse = zAccount

/**
 * Success
 */
export const zGetAccountProfileResponse = zAccount

export const zPostAccountTimezoneBody = zAccountTimezonePayload

/**
 * Success
 */
export const zPostAccountTimezoneResponse = zAccount
