Looks like it has to come as options in the second argument when using the listBy* queries.
E.g.
client.model.Messages.listByTimestamp({ // fields you need }, { limit: 10, nextToken: nextToken, sortDirection: "DESC" });