Refactor calendar to use new sync statuses and stages (#6141)

- Refactor calendar modules and some messaging modules to better
organize them by business rules and decouple them
- Work toward a common architecture for the different calendar providers
by introducing interfaces for the drivers
- Modify cron job to use the new sync statuses and stages
This commit is contained in:
bosiraphael
2024-07-08 17:01:06 +02:00
committed by GitHub
parent 1c3ea9b106
commit f458322303
69 changed files with 1300 additions and 884 deletions

View File

@ -0,0 +1,11 @@
import { Module } from '@nestjs/common';
import { WorkspaceDataSourceModule } from 'src/engine/workspace-datasource/workspace-datasource.module';
import { AddPersonIdAndWorkspaceMemberIdService } from 'src/modules/calendar-messaging-participant-manager/services/add-person-id-and-workspace-member-id/add-person-id-and-workspace-member-id.service';
@Module({
imports: [WorkspaceDataSourceModule],
providers: [AddPersonIdAndWorkspaceMemberIdService],
exports: [],
})
export class CalendarCommonModule {}

View File

@ -8,6 +8,7 @@ export type CalendarEvent = Omit<
| 'calendarChannelEventAssociations'
| 'calendarEventParticipants'
| 'conferenceLink'
| 'id'
> & {
conferenceLinkLabel: string;
conferenceLinkUrl: string;
@ -23,15 +24,25 @@ export type CalendarEventParticipant = Omit<
| 'person'
| 'workspaceMember'
| 'calendarEvent'
| 'calendarEventId'
> & {
iCalUID: string;
};
export type CalendarEventParticipantWithCalendarEventId =
CalendarEventParticipant & {
calendarEventId: string;
};
export type CalendarEventWithParticipants = CalendarEvent & {
externalId: string;
participants: CalendarEventParticipant[];
status: string;
};
export type CalendarEventParticipantWithId = CalendarEventParticipant & {
export type CalendarEventWithParticipantsAndCalendarEventId = CalendarEvent & {
id: string;
externalId: string;
participants: CalendarEventParticipantWithCalendarEventId[];
status: string;
};