Files
xingrin/frontend/types/website.types.ts
yyhuni 9eda2caceb feat(asset): add response headers and body tracking with pg_trgm indexing
- Rename body_preview to response_body across endpoint and website models for consistency
- Change response_headers from Dict to string type for efficient text indexing
- Add pg_trgm PostgreSQL extension initialization in AssetConfig for GIN index support
- Update all DTOs to reflect response_body and response_headers field changes
- Modify repositories to handle new response_body and response_headers formats
- Update serializers and views to work with string-based response headers
- Add response_headers and response_body columns to frontend endpoint and website tables
- Update command templates and scan tasks to populate response_body and response_headers
- Add database initialization script for pg_trgm extension in PostgreSQL setup
- Update frontend types and translations for new field names
- Enable efficient full-text search on response headers and body content through GIN indexes
2026-01-01 19:34:11 +08:00

47 lines
772 B
TypeScript

/**
* WebSite related type definitions
*/
export interface WebSite {
id: number
scan?: number
target?: number
url: string
host: string
location: string
title: string
webserver: string
contentType: string
statusCode: number
contentLength: number
responseBody: string
tech: string[]
vhost: boolean | null
subdomain: string
responseHeaders?: string
createdAt: string
}
export interface Technology {
id: number
name: string
version?: string
category?: string
}
export interface WebSiteFilters {
url?: string
title?: string
statusCode?: number
webserver?: string
contentType?: string
}
export interface WebSiteListResponse {
results: WebSite[]
total: number
page: number
pageSize: number
totalPages: number
}