Object literal may only specify known properties, and 'user_created' does not exist in type 'QueryMany<PersonalInfo>'
I'm using the Directus JS-SDK and have set up my schemas to be read in when I retrieve the directus client
type PersonalInfo {
firstName: string
lastName: string
// user_created: string
}
type Schemas = {
personal_info: PersonalInfo
}
export const getDirectusClient = async () => {
const directus = new Directus<Schemas>(
import.meta.env.PUBLIC_DIRECTUS_URL as string,
)
}
Then on my page I make a request to query the collection PersonalInfo filtered by the logged-in user
const directus = await getDirectusClient()
export const user = await directus.users.me.read()
export async function getPersonalInfo() {
const { data } = await directus
.items('personal_info')
.readByQuery({ user_created: user.id })
return data ? data[0] : data
}
This works, but typescript complains about it with the message I posted up top. Any advice how to make the red squiggle go away?