export type InterfaceStatus = 'active' | 'deprecated' | 'disabled';

export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';

export interface InterfaceItem {
  id: string;
  name: string;
  method: HttpMethod;
  path: string;
  owner: string;
  status: InterfaceStatus;
  version: string;
  description?: string;
  createdAt: string;
  updatedAt: string;
}

export interface InterfaceListParams {
  name?: string;
  method?: HttpMethod;
  path?: string;
  owner?: string;
  status?: InterfaceStatus;
  version?: string;
  current?: number;
  pageSize?: number;
}

export interface InterfaceFormValues {
  name: string;
  method: HttpMethod;
  path: string;
  owner: string;
  status: InterfaceStatus;
  version: string;
  description?: string;
}

export interface InterfaceDocInfo {
  docUrl: string;
  exampleText: string;
  updatedAt: string;
  owner: string;
}

export interface InterfaceGatewayPolicy {
  routeId: string;
  rateLimit: string;
  authType: string;
  timeoutMs: number;
}

export interface InterfaceGatewayFormValues {
  rateLimit: string;
  authType: string;
  timeoutMs: number;
}

export interface InterfaceMockInfo {
  requestSample: string;
  responseSample: string;
  latency: string;
  mockEnabled: boolean;
  mockUrl: string;
}

export interface InterfaceIntegrationInfo {
  partner: string;
  channel: string;
  status: string;
  consoleUrl: string;
}

export interface InterfaceChangeLogItem {
  id: string;
  time: string;
  description: string;
  operator: string;
}

export interface InterfaceRoutePreview {
  routeId: string;
  upstream: string;
  path: string;
  method: HttpMethod;
  timeoutMs: number;
  rateLimit: string;
  authType: string;
}

export interface InterfaceActionResponse {
  success: boolean;
  message?: string;
}

export interface InterfaceExportResponse {
  downloadUrl: string;
  fileName: string;
}
