4710 implement google calendar incremental sync (#4822)

Closes #4710
This commit is contained in:
bosiraphael
2024-04-10 15:53:14 +02:00
committed by GitHub
parent f1cc1c60e0
commit e7d146363c
20 changed files with 333 additions and 152 deletions

View File

@ -12,6 +12,21 @@ export class CalendarChannelRepository {
private readonly workspaceDataSourceService: WorkspaceDataSourceService,
) {}
public async getAll(
workspaceId: string,
transactionManager?: EntityManager,
): Promise<ObjectRecord<CalendarChannelObjectMetadata>[]> {
const dataSourceSchema =
this.workspaceDataSourceService.getSchemaName(workspaceId);
return await this.workspaceDataSourceService.executeRawQuery(
`SELECT * FROM ${dataSourceSchema}."calendarChannel"`,
[],
workspaceId,
transactionManager,
);
}
public async getByConnectedAccountId(
connectedAccountId: string,
workspaceId: string,