Пусть тип ответа задан так:
export type LoginResponse = { message: string }
При этом обращаемся к API мы как-то так: