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
- My projects were deleted
Hello everyone, My projects were for some reason deleted. I got an email informing me about project inactivity, when I clicked to activate it again, it was sil...
- Dotnet functions on cloud
I'm trying to deploy my .Net8 functions to my project on cloud.appwrite through the CLI. I'm getting this error.
- Query multi-tenant db with $permissions ...
I'm setting up a multi-tenant database with RLS enabled. My users my have permissions set for multiple Teams, and as such when they query the database with the ...