/** * Type Exports * * Central export point for all TypeScript types */ export * from "./wordpress.js"; export * from "./mcp.js"; export * from "./client.js"; export type { WordPressId, PostId, UserId, MediaId, CommentId, CategoryId, TagId, Result, DeepReadonly, ToolResult, NonEmptyArray, createWordPressId, createSuccess, createError, } from "./enhanced.js"; export * from "./requests.js"; export type { BaseToolParams, CreatePostParams, UpdatePostParams, GetPostParams, ListPostsParams, DeletePostParams, CreatePageParams, UpdatePageParams, GetPageParams, ListPagesParams, DeletePageParams, ToolDefinition as EnhancedToolDefinition, ToolRegistry as EnhancedToolRegistry, } from "./tools.js"; export type Optional = Omit & Partial>; export type RequiredKeys = T & Required>; export type Nullable = T | null; export type AsyncResult = Promise; export type ID = number | string; export interface ErrorResponse { error: true; message: string; code?: string; details?: Record; } export interface SuccessResponse { success: true; data: T; message?: string; } export type APIResult = SuccessResponse | ErrorResponse; export interface PaginationMeta { page: number; per_page: number; total: number; total_pages: number; has_next: boolean; has_previous: boolean; } export interface PaginatedResponse { data: T[]; meta: PaginationMeta; links?: { first?: string; last?: string; next?: string; previous?: string; }; } export interface DatabaseConfig { host: string; port: number; name: string; user: string; password: string; charset?: string; collate?: string; } export interface LoggingConfig { level: "debug" | "info" | "warn" | "error"; file?: string; console?: boolean; format?: "json" | "text"; } export interface ServerConfig { host: string; port: number; env: "development" | "production" | "test"; debug: boolean; logging: LoggingConfig; } export interface Environment { WORDPRESS_SITE_URL: string; WORDPRESS_USERNAME: string; WORDPRESS_APP_PASSWORD?: string; WORDPRESS_PASSWORD?: string; WORDPRESS_AUTH_METHOD: string; WORDPRESS_JWT_SECRET?: string; WORDPRESS_API_KEY?: string; DEBUG?: string; NODE_ENV?: string; LOG_LEVEL?: string; } export interface ValidationRule { type: "required" | "string" | "number" | "boolean" | "email" | "url" | "enum" | "array" | "object"; message?: string; min?: number; max?: number; pattern?: RegExp; enum_values?: unknown[]; custom?: (value: unknown) => boolean | string; } export interface ValidationSchema { [field: string]: ValidationRule | ValidationRule[]; } export interface CacheEntry { value: T; expiry: number; created: number; } export interface CacheOptions { ttl?: number; maxSize?: number; strategy?: "lru" | "fifo" | "ttl"; } export interface EventData { type: string; timestamp: number; data?: Record; } export type EventHandler = (event: T) => void | Promise; export interface PerformanceMetric { name: string; duration: number; timestamp: number; metadata?: Record; } export interface HealthStatus { status: "healthy" | "degraded" | "unhealthy"; timestamp: number; checks: Record; uptime: number; version: string; } export interface DebugInfo { timestamp: number; level: "debug" | "info" | "warn" | "error"; message: string; context?: Record; stack?: string; } export type DeepPartial = { [P in keyof T]?: T[P] extends object ? DeepPartial : T[P]; }; export type DeepRequired = { [P in keyof T]-?: T[P] extends object ? DeepRequired : T[P]; }; export type KeysOfType = { [K in keyof T]: T[K] extends U ? K : never; }[keyof T]; export type Awaited = T extends Promise ? U : T; export type Brand = T & { __brand: B; }; export type WordPressID = Brand; export type UserID = Brand; export type PostID = Brand; export type MediaID = Brand; export type CommentID = Brand; export type CategoryID = Brand; export type TagID = Brand; export type AsyncFunction = (...args: TArgs) => Promise; export type SyncFunction = (...args: TArgs) => TReturn; export type AnyFunction = SyncFunction | AsyncFunction; export type If = C extends true ? T : F; export type IsEqual = T extends U ? (U extends T ? true : false) : false; export type IsArray = T extends unknown[] ? true : false; export type IsObject = T extends object ? (T extends unknown[] ? false : true) : false; //# sourceMappingURL=index.d.ts.map