import { apiFailureErrorMessage, HttpService, } from "../utils/httpService/HttpService"; export class AnalyticsService { constructor(private httpService: HttpService) {} async captureEvent(eventData: any) { const url = `https://events-injestion-eobnd7jx2q-el.a.run.app/api/event`; try { const { data } = await this.httpService.post(url, { data: eventData, }); return data; } catch (error) { throw new Error(apiFailureErrorMessage); } } }