/** * CTX SDK Configuration */ export interface CTXConfig { apiKey: string; baseUrl?: string; timeout?: number; } /** * API Response wrapper */ export interface APIResponse { success: boolean; data?: T; error?: string; statusCode: number; } /** * CTX API Request metadata */ export interface CTXRequestInfo { ctx_api_version: string; request_time: string; request_parameter: string; request_private: boolean; ctx_transaction_id: string; response_time: string; } /** * CTX API Result status */ export interface CTXResultStatus { result_code: number; result_msg: string; } /** * File Upload Response Data */ export interface FileUploadData { sha256: string; sha1: string; md5: string; uploadType: 'PRIVATE' | 'UPLOAD_PRIVATE_REJECTED_SWITCHED_TO_PUBLIC' | 'PUBLIC'; } /** * File Upload API Response (raw from CTX API) */ export interface CTXFileUploadResponse { request: CTXRequestInfo; ctx_result: CTXResultStatus; ctx_data: FileUploadData; } /** * File Upload Options */ export interface FileUploadOptions { /** Set to true for private upload (file won't be shared with external services) */ private?: boolean; } /** * File Upload Response (simplified SDK response) */ export interface FileUploadResponse { sha256: string; sha1: string; md5: string; uploadType: 'PRIVATE' | 'UPLOAD_PRIVATE_REJECTED_SWITCHED_TO_PUBLIC' | 'PUBLIC'; transactionId: string; requestedPrivate: boolean; } /** * File Report */ export interface FileReport { sha256: string; sha1?: string; md5?: string; fileName?: string; fileSize?: number; fileType?: string; firstSeen?: string; lastSeen?: string; detectionRate?: number; malwareFamily?: string; tags?: string[]; verdict?: string; threatScore?: number; analysisResults?: AnalysisResult[]; } export interface AnalysisResult { engine: string; result: string; detected: boolean; } /** * IP Report */ export interface IPReport { ip: string; country?: string; countryCode?: string; asn?: number; asnOrg?: string; firstSeen?: string; lastSeen?: string; malicious?: boolean; threatScore?: number; tags?: string[]; relatedMalware?: string[]; communicatingFiles?: number; } /** * Domain Report */ export interface DomainReport { domain: string; registrar?: string; creationDate?: string; expirationDate?: string; nameServers?: string[]; firstSeen?: string; lastSeen?: string; malicious?: boolean; threatScore?: number; tags?: string[]; relatedIPs?: string[]; communicatingFiles?: number; } /** * File Relation - Similarity */ export interface FileSimilarity { sha256: string; similarity: number; malwareFamily?: string; tags?: string[]; } /** * Associated IoCs */ export interface AssociatedIoCs { files?: FileIoC[]; ips?: IPIoC[]; domains?: DomainIoC[]; urls?: URLIoC[]; } export interface FileIoC { sha256: string; fileName?: string; malwareFamily?: string; firstSeen?: string; lastSeen?: string; } export interface IPIoC { ip: string; country?: string; firstSeen?: string; lastSeen?: string; } export interface DomainIoC { domain: string; firstSeen?: string; lastSeen?: string; } export interface URLIoC { url: string; firstSeen?: string; lastSeen?: string; } /** * Tag Search Result */ export interface TagSearchResult { tag: string; count: number; items: TagItem[]; } export interface TagItem { type: 'file' | 'ip' | 'domain'; value: string; firstSeen?: string; lastSeen?: string; } /** * Campaign Report */ export interface CampaignReport { id: string; name: string; description?: string; threatActor?: string; attackerCountry?: string; victimCountries?: string[]; firstSeen?: string; lastSeen?: string; tags?: string[]; iocs?: CampaignIoCs; ttps?: TTP[]; } export interface CampaignIoCs { files?: string[]; ips?: string[]; domains?: string[]; urls?: string[]; } export interface TTP { tactic?: string; technique?: string; procedure?: string; } /** * Campaign List Item */ export interface CampaignListItem { id: string; name: string; threatActor?: string; firstSeen?: string; lastSeen?: string; iocCount?: number; } /** * Total Report (IoC + APT Intelligence combined) */ export interface TotalFileReport extends FileReport { campaigns?: CampaignListItem[]; aptContext?: APTContext; } export interface TotalIPReport extends IPReport { campaigns?: CampaignListItem[]; aptContext?: APTContext; } export interface TotalDomainReport extends DomainReport { campaigns?: CampaignListItem[]; aptContext?: APTContext; } export interface APTContext { threatActors?: string[]; attackerCountries?: string[]; victimCountries?: string[]; relatedCampaigns?: string[]; } /** * Advanced Search Request */ export interface AdvancedSearchRequest { query: string; type?: 'file' | 'ip' | 'domain' | 'url' | 'campaign'; filters?: SearchFilters; page?: number; limit?: number; } export interface SearchFilters { dateFrom?: string; dateTo?: string; tags?: string[]; threatActors?: string[]; countries?: string[]; malwareFamilies?: string[]; } /** * Advanced Search Response */ export interface AdvancedSearchResponse { searchId: string; status: 'pending' | 'processing' | 'completed' | 'failed'; progress?: number; results?: SearchResults; totalCount?: number; page?: number; limit?: number; } export interface SearchResults { files?: FileReport[]; ips?: IPReport[]; domains?: DomainReport[]; urls?: URLReport[]; campaigns?: CampaignListItem[]; } export interface URLReport { url: string; domain?: string; firstSeen?: string; lastSeen?: string; malicious?: boolean; threatScore?: number; } /** * Feed Types */ export interface FeedOptions { limit?: number; offset?: number; dateFrom?: string; dateTo?: string; } export interface FileFeedItem { sha256: string; fileName?: string; fileType?: string; malwareFamily?: string; threatScore?: number; firstSeen: string; tags?: string[]; } export interface IPFeedItem { ip: string; country?: string; threatScore?: number; firstSeen: string; tags?: string[]; } export interface DomainFeedItem { domain: string; threatScore?: number; firstSeen: string; tags?: string[]; } export interface URLFeedItem { url: string; domain?: string; threatScore?: number; firstSeen: string; tags?: string[]; } export interface CampaignFeedItem { id: string; name: string; threatActor?: string; attackerCountry?: string; victimCountries?: string[]; firstSeen: string; tags?: string[]; } /** * Feed Response Types */ export type FileFeed = FileFeedItem[]; export type IPFeed = IPFeedItem[]; export type DomainFeed = DomainFeedItem[]; export type URLFeed = URLFeedItem[]; export type CampaignThreatActorFeed = CampaignFeedItem[]; export type CampaignAttackerCountryFeed = CampaignFeedItem[]; export type CampaignVictimCountryFeed = CampaignFeedItem[]; export type CampaignTagFeed = CampaignFeedItem[]; //# sourceMappingURL=types.d.ts.map