SearchService Service
File: src/services/SearchService.ts
Overview
Exports
- MessageSearchFilters - interface export
- MessageSearchResult - interface export
- MessageSearchResponse - interface export
- SearchService - class export
- searchService - const export
Functions
for(const msg of messages)
No description available.
Parameters:
const msg of messages
Returns: void
typescript
function
for (const msg of messages)Classes
SearchService
No description available.
Methods:
constructorgetInstancesearchMessagescatchloadMessagesByIdsDate
Properties:
instanceDEFAULT_LIMITMAX_LIMITfiltersoptionspresenthasFiltersIDschannelIdsparameterslimitoffsetPostgreSQLfromDatetoDatemessagesqueryuserIdserverIdhasMediahasUrlnormalizedQueryp_queryp_channel_idp_channel_idsp_user_idp_conversation_idp_server_idp_has_mediap_has_urlp_from_datep_to_datep_limitp_offseterrorfailedsearchResultshasMoreresultsresultmessageIdsmessageMapsortedMessagesMessagesupabasetypeidcreated_atupdated_atchannel_idconversation_iduser_idbot_idcontentreply_tois_systemmetadatareactionsdecryptionencryptedencryption_metadatadecryptedMessagesfailsbatchSizesignalonProgresscounttotalprocesseddataascendingbreakcomplete
Interfaces
MessageSearchFilters
No description available.
typescript
interface MessageSearchFilters {
query: string // Search text
channelId?: string | string[] // Single or multiple channels
userId?: string // From specific user
conversationId?: string // DM conversation
serverId?: string // Within specific server
hasMedia?: boolean // Messages with file attachments
hasUrl?: boolean // Messages containing URLs
fromDate?: Date // Date range start
toDate?: Date // Date range end
limit?: number
offset?: number
}MessageSearchResult
No description available.
typescript
interface MessageSearchResult {
message_id: string
relevance: number
content_text: string
channel_id: string | null
conversation_id: string | null
user_id: string
created_at: string
}MessageSearchResponse
No description available.
typescript
interface MessageSearchResponse {
results: Message[]
total?: number
hasMore: boolean
}Source Code Insights
File Size: 9749 characters Lines of Code: 309 Imports: 3
Usage Example
typescript
import { MessageSearchFilters, MessageSearchResult, MessageSearchResponse, SearchService, searchService } from '@/services/SearchService'
// Example usage
for()This documentation was automatically generated from the source code.
