feat: Implement repositories for authentication, certificates, metrics, and platform services
- Added AuthRepository for user and settings management with CRUD operations. - Introduced CertificateRepository to handle domains, certificates, and requirements. - Created MetricsRepository for managing metrics and logs. - Developed PlatformRepository for platform services and resources management. - Established RegistryRepository for registry and token operations. - Implemented ServiceRepository for CRUD operations on services. - Defined types and interfaces in types.ts for database interactions.
This commit is contained in:
17
ts/database/types.ts
Normal file
17
ts/database/types.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Database types and interfaces
|
||||
*/
|
||||
|
||||
import * as plugins from '../plugins.ts';
|
||||
|
||||
// Type alias for sqlite bind parameters
|
||||
export type TBindValue = string | number | bigint | boolean | null | undefined | Uint8Array;
|
||||
|
||||
// Database connection type
|
||||
export type TDatabaseConnection = InstanceType<typeof plugins.sqlite.DB>;
|
||||
|
||||
// Query function type
|
||||
export type TQueryFunction = <T = Record<string, unknown>>(
|
||||
sql: string,
|
||||
params?: TBindValue[]
|
||||
) => T[];
|
||||
Reference in New Issue
Block a user