// Copyright © 2022-2026 Partium, Inc. DBA Partium import { Observable, Subject } from 'rxjs'; import { HttpsService } from './http/https.service.interface'; import { EventLog, EventLogRequestBody } from '../models/log'; import { BaseLoginInitService } from './base-login-init.service'; import { PartiumConfig } from '../models/partium-config'; import { Organization } from './organization/models/organization'; /** * Service to create search logs (also known as search events) */ export interface LogService { /** * Sends a User-Journey-Log-Event to the backend. * This can be used to send several logs, triggered by the users behavior * in the app. This allows to better understand the user flow and improve * the system over time. * * @param eventLog the event to log (type + extra info) * * @returns Observable that resolves with the sent EventLog, enriched with * backend-timestamp and backend eventLog-id */ logEvent(eventLog: EventLog): Observable; } export declare class LogServiceImpl extends BaseLoginInitService implements LogService { protected httpsService: HttpsService; /** * An observable (and its source) over the logged eventLogs. Useful for hook * the logging without catching the subscription. For example, on unit testing. */ protected loggedEventSource: Subject; protected externalUserId?: string; loggedEvent$: Observable; /** * Initializes the LogService and configures it based on the passed Partium configuration. */ init(config: PartiumConfig, userEmail: string, currentOrganization$: Observable): Observable; onCreate(): void; logEvent(eventLog: EventLog): Observable; /** * Create the log request body * * @param eventLog: EventLog * * @returns Promise */ protected createRequestBody(eventLog: EventLog): Promise; }