import type { Treaty } from "@elysiajs/eden";
import type { client } from ".";

export type TreatyQuery<T> = T extends (...args: any[]) => any
  ? NonNullable<NonNullable<Parameters<T>[0]>["query"]>
  : never;

export type TreatyBody<T> = T extends (...args: any[]) => any
  ? NonNullable<Parameters<T>[0]>
  : never;

export type UserProfileData = Treaty.Data<typeof client.api.user.profile.get>;
