5531 update gmail full sync to v2 (#5674)

Closes #5531

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
bosiraphael
2024-05-31 13:29:58 +02:00
committed by GitHub
parent fe941c64be
commit f166171a1c
39 changed files with 1062 additions and 581 deletions

View File

@ -2,7 +2,6 @@ import { Injectable } from '@nestjs/common';
import { OnEvent } from '@nestjs/event-emitter';
import { AnalyticsService } from 'src/engine/core-modules/analytics/analytics.service';
import { CreateAnalyticsInput } from 'src/engine/core-modules/analytics/dto/create-analytics.input';
import { ObjectRecordCreateEvent } from 'src/engine/integrations/event-emitter/types/object-record-create.event';
@Injectable()
@ -11,14 +10,13 @@ export class TelemetryListener {
@OnEvent('*.created')
async handleAllCreate(payload: ObjectRecordCreateEvent<any>) {
this.analyticsService.create(
await this.analyticsService.create(
{
type: 'track',
name: payload.name,
data: JSON.parse(`{
"eventName": "${payload.name}"
}`),
} as CreateAnalyticsInput,
data: {
eventName: payload.name,
},
},
payload.userId,
payload.workspaceId,
'', // voluntarely not retrieving this