11/* eslint-disable @typescript-eslint/no-namespace */
22import mergeWith from "lodash.mergewith" ;
3- import { WithId } from "mongodb" ;
43import { Origin , Priorities } from "@core/constants/core.constants" ;
54import { BaseError } from "@core/errors/errors.base" ;
65import {
@@ -11,6 +10,7 @@ import {
1110 Schema_Event_Recur_Instance ,
1211 Schema_Event_Regular ,
1312 WithCompassId ,
13+ WithMongoId ,
1414 WithoutCompassId ,
1515} from "@core/types/event.types" ;
1616import { WithGcalId , gSchema$Event } from "@core/types/gcal" ;
@@ -37,9 +37,9 @@ export namespace MapEvent {
3737 } ;
3838
3939 export const removeProviderData = (
40- event : WithId < Omit < Schema_Event , "_id" > > | Schema_Event ,
40+ event : WithMongoId < Omit < Schema_Event , "_id" > > | Schema_Event ,
4141 ) : Omit <
42- WithId < Omit < Schema_Event , "_id" > > | Schema_Event ,
42+ WithMongoId < Omit < Schema_Event , "_id" > > | Schema_Event ,
4343 "gEventId" | "gRecurringEventId"
4444 > => {
4545 const {
@@ -57,7 +57,7 @@ export namespace MapEvent {
5757 } ;
5858
5959 export const removeIdentifyingData = (
60- event : WithId < Omit < Schema_Event , "_id" > > | Schema_Event ,
60+ event : WithMongoId < Omit < Schema_Event , "_id" > > | Schema_Event ,
6161 ) : Omit <
6262 Schema_Event ,
6363 | "_id"
@@ -128,7 +128,7 @@ export namespace MapEvent {
128128
129129 export const toGcalSingleProviderData = (
130130 base :
131- | WithId < Omit < Schema_Event_Recur_Base | Schema_Event_Regular , "_id" > >
131+ | WithMongoId < Omit < Schema_Event_Recur_Base | Schema_Event_Regular , "_id" > >
132132 | WithCompassId <
133133 Omit < Schema_Event_Recur_Base | Schema_Event_Regular , "_id" >
134134 > ,
@@ -140,11 +140,11 @@ export namespace MapEvent {
140140
141141 export const toProviderData = (
142142 event :
143- | WithId < Omit < Schema_Event , "_id" | "recurrence" > >
143+ | WithMongoId < Omit < Schema_Event , "_id" | "recurrence" > >
144144 | WithCompassId < Omit < Schema_Event , "_id" | "recurrence" > > ,
145145 provider ?: CalendarProvider ,
146146 base ?:
147- | WithId < Omit < Schema_Event_Recur_Base , "_id" > >
147+ | WithMongoId < Omit < Schema_Event_Recur_Base , "_id" > >
148148 | WithCompassId < Omit < Schema_Event_Recur_Base , "_id" > > ,
149149 ) => {
150150 const isCInstance = isInstance ( event ) ;
@@ -153,7 +153,7 @@ export namespace MapEvent {
153153 case CalendarProvider . GOOGLE : {
154154 return isCInstance
155155 ? MapEvent . toGcalInstanceProviderData (
156- event as WithId < Omit < Schema_Event_Recur_Instance , "_id" > > ,
156+ event as WithMongoId < Omit < Schema_Event_Recur_Instance , "_id" > > ,
157157 base ,
158158 )
159159 : MapEvent . toGcalSingleProviderData ( event ) ;
0 commit comments