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

export type ClientOptions = {
  baseUrl: `${string}://${string}/console/api` | (string & {})
}

export type AvatarUrlResponse = {
  avatar_url: string
}

export type AccountAvatarPayload = {
  avatar: string
}

export type Account = {
  avatar?: string | null
  readonly avatar_url: string | null
  created_at?: number | null
  email: string
  id: string
  interface_language?: string | null
  interface_theme?: string | null
  is_password_set: boolean
  last_login_at?: number | null
  last_login_ip?: string | null
  name: string
  timezone?: string | null
}

export type ChangeEmailSendPayload = {
  email: string
  language?: string | null
  phase?: string | null
  token?: string | null
}

export type SimpleResultDataResponse = {
  data: string
  result: string
}

export type CheckEmailUniquePayload = {
  email: string
}

export type SimpleResultResponse = {
  result: string
}

export type ChangeEmailResetPayload = {
  new_email: string
  token: string
}

export type ChangeEmailValidityPayload = {
  code: string
  email: string
  token: string
}

export type VerificationTokenResponse = {
  email: string
  is_valid: boolean
  token: string
}

export type AccountDeletePayload = {
  code: string
  token: string
}

export type AccountDeletionFeedbackPayload = {
  email: string
  feedback: string
}

export type EducationStatusResponse = {
  allow_refresh?: boolean | null
  expire_at?: number | null
  is_student?: boolean | null
  result?: boolean | null
}

export type EducationActivatePayload = {
  institution: string
  role: string
  token: string
}

export type EducationActivateResponse = {
  [key: string]: unknown
}

export type EducationAutocompleteResponse = {
  curr_page?: number | null
  data?: Array<string>
  has_next?: boolean | null
}

export type EducationVerifyResponse = {
  token?: string | null
}

export type AccountInitPayload = {
  interface_language: string
  invitation_code?: string | null
  timezone: string
}

export type AccountIntegrateListResponse = {
  data: Array<AccountIntegrateResponse>
}

export type AccountInterfaceLanguagePayload = {
  interface_language: string
}

export type AccountInterfaceThemePayload = {
  interface_theme: 'dark' | 'light'
}

export type AccountNamePayload = {
  name: string
}

export type AccountPasswordPayload = {
  new_password: string
  password?: string | null
  repeat_new_password: string
}

export type AccountTimezonePayload = {
  timezone: string
}

export type AccountIntegrateResponse = {
  created_at?: number | null
  is_bound: boolean
  link?: string | null
  provider: string
}

export type AccountWritable = {
  avatar?: string | null
  created_at?: number | null
  email: string
  id: string
  interface_language?: string | null
  interface_theme?: string | null
  is_password_set: boolean
  last_login_at?: number | null
  last_login_ip?: string | null
  name: string
  timezone?: string | null
}

export type GetAccountAvatarData = {
  body?: never
  path?: never
  query: {
    avatar: string
  }
  url: '/account/avatar'
}

export type GetAccountAvatarResponses = {
  200: AvatarUrlResponse
}

export type GetAccountAvatarResponse = GetAccountAvatarResponses[keyof GetAccountAvatarResponses]

export type PostAccountAvatarData = {
  body: AccountAvatarPayload
  path?: never
  query?: never
  url: '/account/avatar'
}

export type PostAccountAvatarResponses = {
  200: Account
}

export type PostAccountAvatarResponse = PostAccountAvatarResponses[keyof PostAccountAvatarResponses]

export type PostAccountChangeEmailData = {
  body: ChangeEmailSendPayload
  path?: never
  query?: never
  url: '/account/change-email'
}

export type PostAccountChangeEmailResponses = {
  200: SimpleResultDataResponse
}

export type PostAccountChangeEmailResponse
  = PostAccountChangeEmailResponses[keyof PostAccountChangeEmailResponses]

export type PostAccountChangeEmailCheckEmailUniqueData = {
  body: CheckEmailUniquePayload
  path?: never
  query?: never
  url: '/account/change-email/check-email-unique'
}

export type PostAccountChangeEmailCheckEmailUniqueResponses = {
  200: SimpleResultResponse
}

export type PostAccountChangeEmailCheckEmailUniqueResponse
  = PostAccountChangeEmailCheckEmailUniqueResponses[keyof PostAccountChangeEmailCheckEmailUniqueResponses]

export type PostAccountChangeEmailResetData = {
  body: ChangeEmailResetPayload
  path?: never
  query?: never
  url: '/account/change-email/reset'
}

export type PostAccountChangeEmailResetResponses = {
  200: Account
}

export type PostAccountChangeEmailResetResponse
  = PostAccountChangeEmailResetResponses[keyof PostAccountChangeEmailResetResponses]

export type PostAccountChangeEmailValidityData = {
  body: ChangeEmailValidityPayload
  path?: never
  query?: never
  url: '/account/change-email/validity'
}

export type PostAccountChangeEmailValidityResponses = {
  200: VerificationTokenResponse
}

export type PostAccountChangeEmailValidityResponse
  = PostAccountChangeEmailValidityResponses[keyof PostAccountChangeEmailValidityResponses]

export type PostAccountDeleteData = {
  body: AccountDeletePayload
  path?: never
  query?: never
  url: '/account/delete'
}

export type PostAccountDeleteResponses = {
  200: SimpleResultResponse
}

export type PostAccountDeleteResponse = PostAccountDeleteResponses[keyof PostAccountDeleteResponses]

export type PostAccountDeleteFeedbackData = {
  body: AccountDeletionFeedbackPayload
  path?: never
  query?: never
  url: '/account/delete/feedback'
}

export type PostAccountDeleteFeedbackResponses = {
  200: SimpleResultResponse
}

export type PostAccountDeleteFeedbackResponse
  = PostAccountDeleteFeedbackResponses[keyof PostAccountDeleteFeedbackResponses]

export type GetAccountDeleteVerifyData = {
  body?: never
  path?: never
  query?: never
  url: '/account/delete/verify'
}

export type GetAccountDeleteVerifyResponses = {
  200: SimpleResultDataResponse
}

export type GetAccountDeleteVerifyResponse
  = GetAccountDeleteVerifyResponses[keyof GetAccountDeleteVerifyResponses]

export type GetAccountEducationData = {
  body?: never
  path?: never
  query?: never
  url: '/account/education'
}

export type GetAccountEducationResponses = {
  200: EducationStatusResponse
}

export type GetAccountEducationResponse
  = GetAccountEducationResponses[keyof GetAccountEducationResponses]

export type PostAccountEducationData = {
  body: EducationActivatePayload
  path?: never
  query?: never
  url: '/account/education'
}

export type PostAccountEducationResponses = {
  200: EducationActivateResponse
}

export type PostAccountEducationResponse
  = PostAccountEducationResponses[keyof PostAccountEducationResponses]

export type GetAccountEducationAutocompleteData = {
  body?: never
  path?: never
  query: {
    keywords: string
    limit?: number
    page?: number
  }
  url: '/account/education/autocomplete'
}

export type GetAccountEducationAutocompleteResponses = {
  200: EducationAutocompleteResponse
}

export type GetAccountEducationAutocompleteResponse
  = GetAccountEducationAutocompleteResponses[keyof GetAccountEducationAutocompleteResponses]

export type GetAccountEducationVerifyData = {
  body?: never
  path?: never
  query?: never
  url: '/account/education/verify'
}

export type GetAccountEducationVerifyResponses = {
  200: EducationVerifyResponse
}

export type GetAccountEducationVerifyResponse
  = GetAccountEducationVerifyResponses[keyof GetAccountEducationVerifyResponses]

export type PostAccountInitData = {
  body: AccountInitPayload
  path?: never
  query?: never
  url: '/account/init'
}

export type PostAccountInitResponses = {
  200: SimpleResultResponse
}

export type PostAccountInitResponse = PostAccountInitResponses[keyof PostAccountInitResponses]

export type GetAccountIntegratesData = {
  body?: never
  path?: never
  query?: never
  url: '/account/integrates'
}

export type GetAccountIntegratesResponses = {
  200: AccountIntegrateListResponse
}

export type GetAccountIntegratesResponse
  = GetAccountIntegratesResponses[keyof GetAccountIntegratesResponses]

export type PostAccountInterfaceLanguageData = {
  body: AccountInterfaceLanguagePayload
  path?: never
  query?: never
  url: '/account/interface-language'
}

export type PostAccountInterfaceLanguageResponses = {
  200: Account
}

export type PostAccountInterfaceLanguageResponse
  = PostAccountInterfaceLanguageResponses[keyof PostAccountInterfaceLanguageResponses]

export type PostAccountInterfaceThemeData = {
  body: AccountInterfaceThemePayload
  path?: never
  query?: never
  url: '/account/interface-theme'
}

export type PostAccountInterfaceThemeResponses = {
  200: Account
}

export type PostAccountInterfaceThemeResponse
  = PostAccountInterfaceThemeResponses[keyof PostAccountInterfaceThemeResponses]

export type PostAccountNameData = {
  body: AccountNamePayload
  path?: never
  query?: never
  url: '/account/name'
}

export type PostAccountNameResponses = {
  200: Account
}

export type PostAccountNameResponse = PostAccountNameResponses[keyof PostAccountNameResponses]

export type PostAccountPasswordData = {
  body: AccountPasswordPayload
  path?: never
  query?: never
  url: '/account/password'
}

export type PostAccountPasswordResponses = {
  200: Account
}

export type PostAccountPasswordResponse
  = PostAccountPasswordResponses[keyof PostAccountPasswordResponses]

export type GetAccountProfileData = {
  body?: never
  path?: never
  query?: never
  url: '/account/profile'
}

export type GetAccountProfileResponses = {
  200: Account
}

export type GetAccountProfileResponse = GetAccountProfileResponses[keyof GetAccountProfileResponses]

export type PostAccountTimezoneData = {
  body: AccountTimezonePayload
  path?: never
  query?: never
  url: '/account/timezone'
}

export type PostAccountTimezoneResponses = {
  200: Account
}

export type PostAccountTimezoneResponse
  = PostAccountTimezoneResponses[keyof PostAccountTimezoneResponses]
