Type 'Theme' does not satisfy the constraint 'Row'. Type 'Theme' is missing the following properties from type 'Row': $id, $sequence, $tableId, $databaseId, and 3 more.
interface Theme {
Background: string;
Secondary: string;
FontPrimary: string;
FontSecondary: string;
Icons: string;
Shadow: string;
}
export const GetTheme = query(async () => {
const { tablesDB } = getAdminServices();
var theme = await tablesDB.listRows<Theme>({
databaseId: '******',
tableId: 'theme',
queries: [Query.limit(1)]
});
return theme;
});
how to fix that problem am doing types manually
i don't want to use Cli to generate the types cause it rise a lot of changes in my project when i call appwrite init project
i follow this example at step 8 https://appwrite.io/docs/quick-starts/node
doc seems outdated
found the solution i just have to extend the row
interface Theme extends Models.Row {
Background: string;
Secondary: string;
FontPrimary: string;
FontSecondary: string;
Icons: string;
Shadow: string;
}
Recommended threads
- Session not found. Please run appwrite l...
I have encounter an issue with appwrite CLI They asking for a login session but in the doc, it’s mention that only setup client with endpoint / api key is enou...
- SELF HOSTING ISSUE, DATA NOT MIGRATING T...
Hey, devs, I recently tried to migrate my cloud instance to a self hosted version but my data is not transferred fully only the table structure is transferred ...
- No Document ID?
Hi I have a self hosted appwrite. My documents get a document ID but are not visible in the console. I don't know why this happens and how to fix this