Hello,
we are having multiple databases and would like to use the cli to generate the types using (appwrite types --language ts), the issue is that the appwrite.d.ts only generates the names of Collection without the Database name as prefix.
For example, databases
MyPrimaryDatabase
Users
first_name: string
MySecondaryDatabase
Users
last_name: string
❌ The CLI will generate duplicate types like this:
export type Users = Models.Document & {
first_name: string;
}
export type Users = Models.Document & {
last_name: string;
}
✅ It would be better to use the database name as prefix like this:
export interface MyPrimaryDatabase{
Users: Models.Document & {
first_name: string;
},
}
export interface MySecondaryDatabase{
Users: Models.Document & {
last_name: string;
},
}
Thank you
Duplicate name types with multiple databases
Recommended threads
- [FEAT REQ] Bun runtime support
Instead of just Nodejs, it would be helpful to also add support for the Bun runtime which can speed up deployments by a ton.
- [ENHANCEMENT] Use the custom Next.js dep...
Deployment adapters on Next.js are now stable! This means that we don't have to stick to the limitations of sniffing out build outputs and manually moving or mo...
- NextJS builds sudden runtime_timeout
My builds suddenly stopped working. Activating old prebuilt snapshots work, but redeploying that same code produces builds that throw runtime_timeout FRA region