types.ts 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. export interface AccessLog {
  2. id: number;
  3. ip: string;
  4. method: string;
  5. path: string;
  6. status_code: number;
  7. latency_ms: number;
  8. country: string;
  9. city: string;
  10. latitude: number | null;
  11. longitude: number | null;
  12. created_at: string;
  13. }
  14. export interface Stats {
  15. uptime_seconds: number;
  16. total_hits: number;
  17. active_ips: number;
  18. avg_latency_ms: number;
  19. }
  20. export interface GeoDistributionItem {
  21. country: string;
  22. count: number;
  23. percentage: number;
  24. }
  25. export interface GeoPoint {
  26. latitude: number;
  27. longitude: number;
  28. country: string;
  29. city: string;
  30. hit_count: number;
  31. }
  32. export interface ScrapeJob {
  33. job_id: string;
  34. status: 'pending' | 'running' | 'done' | 'failed';
  35. error?: string;
  36. created_at: string;
  37. }
  38. export interface ScrapeResult {
  39. url: string;
  40. model_name: string;
  41. prices: Record<string, unknown>;
  42. model_info?: {
  43. model_code?: string;
  44. display_tags?: string[];
  45. description?: string;
  46. input_modalities?: string[];
  47. output_modalities?: string[];
  48. features?: Record<string, boolean>;
  49. error?: string;
  50. };
  51. rate_limits?: Record<string, string>;
  52. tool_prices?: Array<{ label: string; price: number | string; unit?: string; note?: string }>;
  53. scraped_at: string;
  54. }
  55. export interface ScrapeJobDetail extends ScrapeJob {
  56. results?: ScrapeResult[];
  57. }
  58. export interface Discount {
  59. id: number;
  60. domain: string;
  61. discount: number;
  62. note: string | null;
  63. created_at: string;
  64. updated_at: string;
  65. }