Extract OrderBy TS Keys

Hey I have the following query

const getBaseQuery = ({ offset, pageSize, slug }: GetBaseQuery) =>
    .selectFrom((eb) =>

And I'm trying to create a function that accepts that query and adds and orderBy expression based in some conditions

type BaseQuery = ReturnType<typeof getBaseQuery>;

type AddOrderBy = {
  query: BaseQuery;
  key?: 'what do I put here';
  dir?: "asc" | "desc";

const addOrderBy = ({ query, key, dir }: AddOrderBy) => {

How can I get the accepted key value types so I can put them in my type declaration?
@Igal sorry for the ping 😅 I think this might had lost between other posts