export interface PageInfo { pageSize: number; totalRows: number; isFirstPage: boolean; isLastPage: boolean; page: number; } export interface InterestsResponse { list: Interest[]; PageInfo: PageInfo; } export enum Table { Interest = "mbs9hjauug4eseo", } export const getNocoDbConfiguration = () => useRuntimeConfig().nocodb; export const createTableUrl = (table: Table) => `${getNocoDbConfiguration().url}/api/v2/tables/${table}/records`; export const getInterests = async () => $fetch(createTableUrl(Table.Interest), { headers: { "xc-token": getNocoDbConfiguration().token, }, params: { limit: 1000, }, }); export const getInterestById = async (id: string) => $fetch(`${createTableUrl(Table.Interest)}/${id}`, { headers: { "xc-token": getNocoDbConfiguration().token, }, });