1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27import { $fetch } from 'ofetch'; import { createDirectus, readItem, readItems, rest, type QueryFilter, } from '@directus/sdk'; import type { Schema } from '#shared/types/schema'; const { directusUrl, } = useRuntimeConfig(); const directusServer = createDirectus<Schema>(directusUrl as string, { globals: { fetch: $fetch, }, }).with(rest()); export { directusServer, readItem, readItems, }; export type { QueryFilter };