claude-usage-tracker
Version:
Advanced analytics for Claude Code usage with cost optimization, conversation length analysis, and rate limit tracking
252 lines • 6.08 kB
TypeScript
import { z } from "zod";
declare const ConfigSchema: z.ZodObject<{
models: z.ZodRecord<z.ZodString, z.ZodObject<{
name: z.ZodString;
input: z.ZodNumber;
output: z.ZodNumber;
cached: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
name: string;
input: number;
output: number;
cached: number;
}, {
name: string;
input: number;
output: number;
cached: number;
}>>;
rate_limits: z.ZodRecord<z.ZodString, z.ZodObject<{
price: z.ZodNumber;
weekly: z.ZodObject<{
sonnet4: z.ZodObject<{
min: z.ZodNumber;
max: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
min: number;
max: number;
}, {
min: number;
max: number;
}>;
opus4: z.ZodObject<{
min: z.ZodNumber;
max: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
min: number;
max: number;
}, {
min: number;
max: number;
}>;
}, "strip", z.ZodTypeAny, {
sonnet4: {
min: number;
max: number;
};
opus4: {
min: number;
max: number;
};
}, {
sonnet4: {
min: number;
max: number;
};
opus4: {
min: number;
max: number;
};
}>;
}, "strip", z.ZodTypeAny, {
price: number;
weekly: {
sonnet4: {
min: number;
max: number;
};
opus4: {
min: number;
max: number;
};
};
}, {
price: number;
weekly: {
sonnet4: {
min: number;
max: number;
};
opus4: {
min: number;
max: number;
};
};
}>>;
token_estimates: z.ZodObject<{
sonnet4: z.ZodObject<{
min: z.ZodNumber;
max: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
min: number;
max: number;
}, {
min: number;
max: number;
}>;
opus4: z.ZodObject<{
min: z.ZodNumber;
max: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
min: number;
max: number;
}, {
min: number;
max: number;
}>;
}, "strip", z.ZodTypeAny, {
sonnet4: {
min: number;
max: number;
};
opus4: {
min: number;
max: number;
};
}, {
sonnet4: {
min: number;
max: number;
};
opus4: {
min: number;
max: number;
};
}>;
batch_api_discount: z.ZodNumber;
data_paths: z.ZodArray<z.ZodString, "many">;
recommendations: z.ZodRecord<z.ZodString, z.ZodObject<{
model: z.ZodString;
confidence: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
model: string;
confidence: number;
}, {
model: string;
confidence: number;
}>>;
}, "strip", z.ZodTypeAny, {
models: Record<string, {
name: string;
input: number;
output: number;
cached: number;
}>;
rate_limits: Record<string, {
price: number;
weekly: {
sonnet4: {
min: number;
max: number;
};
opus4: {
min: number;
max: number;
};
};
}>;
token_estimates: {
sonnet4: {
min: number;
max: number;
};
opus4: {
min: number;
max: number;
};
};
batch_api_discount: number;
data_paths: string[];
recommendations: Record<string, {
model: string;
confidence: number;
}>;
}, {
models: Record<string, {
name: string;
input: number;
output: number;
cached: number;
}>;
rate_limits: Record<string, {
price: number;
weekly: {
sonnet4: {
min: number;
max: number;
};
opus4: {
min: number;
max: number;
};
};
}>;
token_estimates: {
sonnet4: {
min: number;
max: number;
};
opus4: {
min: number;
max: number;
};
};
batch_api_discount: number;
data_paths: string[];
recommendations: Record<string, {
model: string;
confidence: number;
}>;
}>;
export type AppConfig = z.infer<typeof ConfigSchema>;
export declare function loadConfig(configPath?: string): AppConfig;
export declare function clearConfigCache(): void;
export declare function setTestConfig(config: any): void;
export declare function clearTestConfig(): void;
export declare function getModelPricing(): Record<string, {
name: string;
input: number;
output: number;
cached: number;
}>;
export declare function getRateLimits(): Record<string, {
price: number;
weekly: {
sonnet4: {
min: number;
max: number;
};
opus4: {
min: number;
max: number;
};
};
}>;
export declare function getTokenEstimates(): {
sonnet4: {
min: number;
max: number;
};
opus4: {
min: number;
max: number;
};
};
export declare function getDataPaths(): string[];
export declare function getBatchApiDiscount(): number;
export declare function getModelRecommendations(): Record<string, {
model: string;
confidence: number;
}>;
export {};
//# sourceMappingURL=config-loader.d.ts.map