import { z } from 'zod'; export interface Database { id: string; name: string; config: DatabaseConfig; collections: Collection[]; stats: DatabaseStats; createdAt: string; updatedAt: string; } export interface DatabaseConfig { id: string; name: string; region: string; replicationRegions: string[]; encryption: { enabled: boolean; algorithm: string; keyId?: string; }; backup: { enabled: boolean; frequency: 'hourly' | 'daily' | 'weekly'; retention: number; }; settings: { maxConnections: number; queryTimeout: number; enableQueryLogging: boolean; }; } export interface Collection { name: string; database: string; schema?: Record; indexes: Index[]; settings: { strict: boolean; versioning: boolean; encryption: boolean; compression: boolean; }; stats: { documentCount: number; storageSize: number; indexSize: number; avgDocumentSize: number; }; createdAt: string; updatedAt: string; } export interface Index { name: string; fields: IndexField[]; type: 'btree' | 'hash' | 'vector' | 'fulltext' | 'geo' | 'compound'; unique: boolean; sparse: boolean; background: boolean; stats: { size: number; selectivity: number; usageCount: number; }; createdAt: string; } export interface IndexField { field: string; direction: 1 | -1; textWeight?: number; } export interface Document { _id: string; _collection: string; _version: number; _createdAt: string; _updatedAt: string; _deleted?: boolean; [key: string]: unknown; } export interface Query { collection: string; filter?: Record; projection?: Record; sort?: Record; limit?: number; skip?: number; hint?: string; } export interface UpdateQuery { collection: string; filter: Record; update: { $set?: Record; $unset?: Record; $inc?: Record; $mul?: Record; $push?: Record; $pull?: Record; $addToSet?: Record; $rename?: Record; }; options?: { upsert?: boolean; multi?: boolean; returnNew?: boolean; }; } export interface DeleteQuery { collection: string; filter: Record; options?: { multi?: boolean; }; } export interface AggregationPipeline { collection: string; pipeline: PipelineStage[]; options?: { allowDiskUse?: boolean; maxTimeMS?: number; hint?: string; }; } export type PipelineStage = { $match: Record; } | { $project: Record; } | { $sort: Record; } | { $limit: number; } | { $skip: number; } | { $group: GroupStage; } | { $unwind: string | UnwindStage; } | { $lookup: LookupStage; } | { $addFields: Record; } | { $count: string; }; export interface GroupStage { _id: unknown; [key: string]: { $sum?: unknown; $avg?: unknown; $min?: unknown; $max?: unknown; $first?: unknown; $last?: unknown; $push?: unknown; $addToSet?: unknown; $count?: Record; }; } export interface UnwindStage { path: string; includeArrayIndex?: string; preserveNullAndEmptyArrays?: boolean; } export interface LookupStage { from: string; localField: string; foreignField: string; as: string; pipeline?: PipelineStage[]; } export interface Transaction { id: string; operations: TransactionOperation[]; options?: { readConcern?: 'local' | 'majority' | 'snapshot'; writeConcern?: { w: number | 'majority'; j?: boolean; wtimeout?: number; }; maxTimeMS?: number; }; } export interface TransactionOperation { type: 'insert' | 'update' | 'delete' | 'find'; collection: string; data?: unknown; filter?: Record; update?: Record; } export interface DatabaseStats { name: string; collections: number; documents: number; indexes: number; storageSize: number; dataSize: number; indexSize: number; avgObjSize: number; operations: { insert: number; query: number; update: number; delete: number; }; performance: { avgQueryTime: number; slowQueries: number; cacheHitRatio: number; }; } export declare const CreateCollectionSchema: z.ZodObject<{ name: z.ZodString; schema: z.ZodOptional>; settings: z.ZodOptional; versioning: z.ZodDefault; encryption: z.ZodDefault; compression: z.ZodDefault; }, z.core.$strip>>; }, z.core.$strip>; export declare const CreateIndexSchema: z.ZodObject<{ name: z.ZodString; fields: z.ZodArray, z.ZodLiteral<-1>]>>; textWeight: z.ZodOptional; }, z.core.$strip>>; type: z.ZodDefault>; unique: z.ZodDefault; sparse: z.ZodDefault; background: z.ZodDefault; }, z.core.$strip>; export declare const InsertDocumentSchema: z.ZodObject<{ _id: z.ZodOptional; }, z.core.$loose>; export declare const UpdateDocumentSchema: z.ZodObject<{ $set: z.ZodOptional>; $unset: z.ZodOptional, z.core.SomeType>>; $inc: z.ZodOptional>; $mul: z.ZodOptional>; $push: z.ZodOptional>; $pull: z.ZodOptional>; $addToSet: z.ZodOptional>; $rename: z.ZodOptional>; }, z.core.$strip>; //# sourceMappingURL=database.d.ts.map