import { getMe, resolveIntegrationName } from './client.ts'
import { inputRecord } from './validation.ts'
/**
* Read the authenticated Twitch user from Helix GET /users.
* Public profile fields only — email is never returned.
*
* @example
* import getMe from 'kody:@kody/twitch/get-me'
* const me = await getMe()
* // => { id: '...', login: '...', displayName: '...', hasEmail: false }
*/
export default async function twitchGetMe(params: Record<string, unknown> = {}) {
const input = inputRecord(params)
return getMe(resolveIntegrationName(input.integration))
}