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:
@ -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 {}
|
||||
@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user