@@ -269,12 +269,14 @@ describe("getSchedule", () => {
269269 createBookingScenario ( scenarioData ) ;
270270
271271 const scheduleForDayWithAGoogleCalendarBooking = await getSchedule ( {
272- eventTypeId : 1 ,
273- eventTypeSlug : "" ,
274- startTime : `${ plus1DateString } T18:30:00.000Z` ,
275- endTime : `${ plus2DateString } T18:29:59.999Z` ,
276- timeZone : Timezones [ "+5:30" ] ,
277- isTeamEvent : false ,
272+ input : {
273+ eventTypeId : 1 ,
274+ eventTypeSlug : "" ,
275+ startTime : `${ plus1DateString } T18:30:00.000Z` ,
276+ endTime : `${ plus2DateString } T18:29:59.999Z` ,
277+ timeZone : Timezones [ "+5:30" ] ,
278+ isTeamEvent : false ,
279+ } ,
278280 } ) ;
279281
280282 // As per Google Calendar Availability, only 4PM(4-4:45PM) GMT slot would be available
@@ -353,13 +355,15 @@ describe("getSchedule", () => {
353355
354356 // Day Plus 2 is completely free - It only has non accepted bookings
355357 const scheduleOnCompletelyFreeDay = await getSchedule ( {
356- eventTypeId : 1 ,
357- // EventTypeSlug doesn't matter for non-dynamic events
358- eventTypeSlug : "" ,
359- startTime : `${ plus1DateString } T18:30:00.000Z` ,
360- endTime : `${ plus2DateString } T18:29:59.999Z` ,
361- timeZone : Timezones [ "+5:30" ] ,
362- isTeamEvent : false ,
358+ input : {
359+ eventTypeId : 1 ,
360+ // EventTypeSlug doesn't matter for non-dynamic events
361+ eventTypeSlug : "" ,
362+ startTime : `${ plus1DateString } T18:30:00.000Z` ,
363+ endTime : `${ plus2DateString } T18:29:59.999Z` ,
364+ timeZone : Timezones [ "+5:30" ] ,
365+ isTeamEvent : false ,
366+ }
363367 } ) ;
364368
365369 // getSchedule returns timeslots in GMT
@@ -384,12 +388,14 @@ describe("getSchedule", () => {
384388
385389 // Day plus 3
386390 const scheduleForDayWithOneBooking = await getSchedule ( {
387- eventTypeId : 1 ,
388- eventTypeSlug : "" ,
389- startTime : `${ plus2DateString } T18:30:00.000Z` ,
390- endTime : `${ plus3DateString } T18:29:59.999Z` ,
391- timeZone : Timezones [ "+5:30" ] ,
392- isTeamEvent : false ,
391+ input : {
392+ eventTypeId : 1 ,
393+ eventTypeSlug : "" ,
394+ startTime : `${ plus2DateString } T18:30:00.000Z` ,
395+ endTime : `${ plus3DateString } T18:29:59.999Z` ,
396+ timeZone : Timezones [ "+5:30" ] ,
397+ isTeamEvent : false ,
398+ }
393399 } ) ;
394400
395401 expect ( scheduleForDayWithOneBooking ) . toHaveTimeSlots (
@@ -448,12 +454,14 @@ describe("getSchedule", () => {
448454 const { dateString : plus1DateString } = getDate ( { dateIncrement : 1 } ) ;
449455 const { dateString : plus2DateString } = getDate ( { dateIncrement : 2 } ) ;
450456 const scheduleForEventWith30Length = await getSchedule ( {
451- eventTypeId : 1 ,
452- eventTypeSlug : "" ,
453- startTime : `${ plus1DateString } T18:30:00.000Z` ,
454- endTime : `${ plus2DateString } T18:29:59.999Z` ,
455- timeZone : Timezones [ "+5:30" ] ,
456- isTeamEvent : false ,
457+ input : {
458+ eventTypeId : 1 ,
459+ eventTypeSlug : "" ,
460+ startTime : `${ plus1DateString } T18:30:00.000Z` ,
461+ endTime : `${ plus2DateString } T18:29:59.999Z` ,
462+ timeZone : Timezones [ "+5:30" ] ,
463+ isTeamEvent : false ,
464+ }
457465 } ) ;
458466
459467 expect ( scheduleForEventWith30Length ) . toHaveTimeSlots (
@@ -482,12 +490,14 @@ describe("getSchedule", () => {
482490 ) ;
483491
484492 const scheduleForEventWith30minsLengthAndSlotInterval2hrs = await getSchedule ( {
485- eventTypeId : 2 ,
486- eventTypeSlug : "" ,
487- startTime : `${ plus1DateString } T18:30:00.000Z` ,
488- endTime : `${ plus2DateString } T18:29:59.999Z` ,
489- timeZone : Timezones [ "+5:30" ] ,
490- isTeamEvent : false ,
493+ input : {
494+ eventTypeId : 2 ,
495+ eventTypeSlug : "" ,
496+ startTime : `${ plus1DateString } T18:30:00.000Z` ,
497+ endTime : `${ plus2DateString } T18:29:59.999Z` ,
498+ timeZone : Timezones [ "+5:30" ] ,
499+ isTeamEvent : false ,
500+ }
491501 } ) ;
492502 // `slotInterval` takes precedence over `length`
493503 // 4:30 is utc so it is 10:00 in IST
@@ -545,12 +555,14 @@ describe("getSchedule", () => {
545555 const { dateString : todayDateString } = getDate ( ) ;
546556 const { dateString : minus1DateString } = getDate ( { dateIncrement : - 1 } ) ;
547557 const scheduleForEventWithBookingNotice13Hrs = await getSchedule ( {
548- eventTypeId : 1 ,
549- eventTypeSlug : "" ,
550- startTime : `${ minus1DateString } T18:30:00.000Z` ,
551- endTime : `${ todayDateString } T18:29:59.999Z` ,
552- timeZone : Timezones [ "+5:30" ] ,
553- isTeamEvent : false ,
558+ input : {
559+ eventTypeId : 1 ,
560+ eventTypeSlug : "" ,
561+ startTime : `${ minus1DateString } T18:30:00.000Z` ,
562+ endTime : `${ todayDateString } T18:29:59.999Z` ,
563+ timeZone : Timezones [ "+5:30" ] ,
564+ isTeamEvent : false ,
565+ }
554566 } ) ;
555567 expect ( scheduleForEventWithBookingNotice13Hrs ) . toHaveTimeSlots (
556568 [
@@ -564,12 +576,14 @@ describe("getSchedule", () => {
564576 ) ;
565577
566578 const scheduleForEventWithBookingNotice10Hrs = await getSchedule ( {
567- eventTypeId : 2 ,
568- eventTypeSlug : "" ,
569- startTime : `${ minus1DateString } T18:30:00.000Z` ,
570- endTime : `${ todayDateString } T18:29:59.999Z` ,
571- timeZone : Timezones [ "+5:30" ] ,
572- isTeamEvent : false ,
579+ input : {
580+ eventTypeId : 2 ,
581+ eventTypeSlug : "" ,
582+ startTime : `${ minus1DateString } T18:30:00.000Z` ,
583+ endTime : `${ todayDateString } T18:29:59.999Z` ,
584+ timeZone : Timezones [ "+5:30" ] ,
585+ isTeamEvent : false ,
586+ }
573587 } ) ;
574588 expect ( scheduleForEventWithBookingNotice10Hrs ) . toHaveTimeSlots (
575589 [
@@ -627,12 +641,14 @@ describe("getSchedule", () => {
627641 createBookingScenario ( scenarioData ) ;
628642
629643 const scheduleForEventOnADayWithNonCalBooking = await getSchedule ( {
630- eventTypeId : 1 ,
631- eventTypeSlug : "" ,
632- startTime : `${ plus2DateString } T18:30:00.000Z` ,
633- endTime : `${ plus3DateString } T18:29:59.999Z` ,
634- timeZone : Timezones [ "+5:30" ] ,
635- isTeamEvent : false ,
644+ input : {
645+ eventTypeId : 1 ,
646+ eventTypeSlug : "" ,
647+ startTime : `${ plus2DateString } T18:30:00.000Z` ,
648+ endTime : `${ plus3DateString } T18:29:59.999Z` ,
649+ timeZone : Timezones [ "+5:30" ] ,
650+ isTeamEvent : false ,
651+ }
636652 } ) ;
637653
638654 expect ( scheduleForEventOnADayWithNonCalBooking ) . toHaveTimeSlots (
@@ -700,12 +716,14 @@ describe("getSchedule", () => {
700716 createBookingScenario ( scenarioData ) ;
701717
702718 const scheduleForEventOnADayWithCalBooking = await getSchedule ( {
703- eventTypeId : 1 ,
704- eventTypeSlug : "" ,
705- startTime : `${ plus1DateString } T18:30:00.000Z` ,
706- endTime : `${ plus2DateString } T18:29:59.999Z` ,
707- timeZone : Timezones [ "+5:30" ] ,
708- isTeamEvent : false ,
719+ input : {
720+ eventTypeId : 1 ,
721+ eventTypeSlug : "" ,
722+ startTime : `${ plus1DateString } T18:30:00.000Z` ,
723+ endTime : `${ plus2DateString } T18:29:59.999Z` ,
724+ timeZone : Timezones [ "+5:30" ] ,
725+ isTeamEvent : false ,
726+ }
709727 } ) ;
710728
711729 expect ( scheduleForEventOnADayWithCalBooking ) . toHaveTimeSlots (
@@ -757,12 +775,14 @@ describe("getSchedule", () => {
757775 createBookingScenario ( scenarioData ) ;
758776
759777 const schedule = await getSchedule ( {
760- eventTypeId : 1 ,
761- eventTypeSlug : "" ,
762- startTime : `${ plus1DateString } T18:30:00.000Z` ,
763- endTime : `${ plus2DateString } T18:29:59.999Z` ,
764- timeZone : Timezones [ "+5:30" ] ,
765- isTeamEvent : false ,
778+ input : {
779+ eventTypeId : 1 ,
780+ eventTypeSlug : "" ,
781+ startTime : `${ plus1DateString } T18:30:00.000Z` ,
782+ endTime : `${ plus2DateString } T18:29:59.999Z` ,
783+ timeZone : Timezones [ "+5:30" ] ,
784+ isTeamEvent : false ,
785+ }
766786 } ) ;
767787
768788 expect ( schedule ) . toHaveTimeSlots (
@@ -820,12 +840,14 @@ describe("getSchedule", () => {
820840 createBookingScenario ( scenarioData ) ;
821841
822842 const scheduleForEventOnADayWithDateOverride = await getSchedule ( {
823- eventTypeId : 1 ,
824- eventTypeSlug : "" ,
825- startTime : `${ plus1DateString } T18:30:00.000Z` ,
826- endTime : `${ plus2DateString } T18:29:59.999Z` ,
827- timeZone : Timezones [ "+5:30" ] ,
828- isTeamEvent : false ,
843+ input : {
844+ eventTypeId : 1 ,
845+ eventTypeSlug : "" ,
846+ startTime : `${ plus1DateString } T18:30:00.000Z` ,
847+ endTime : `${ plus2DateString } T18:29:59.999Z` ,
848+ timeZone : Timezones [ "+5:30" ] ,
849+ isTeamEvent : false ,
850+ }
829851 } ) ;
830852
831853 expect ( scheduleForEventOnADayWithDateOverride ) . toHaveTimeSlots (
@@ -905,12 +927,14 @@ describe("getSchedule", () => {
905927 // Requesting this user's availability for their
906928 // individual Event Type
907929 const thisUserAvailability = await getSchedule ( {
908- eventTypeId : 2 ,
909- eventTypeSlug : "" ,
910- startTime : `${ plus1DateString } T18:30:00.000Z` ,
911- endTime : `${ plus2DateString } T18:29:59.999Z` ,
912- timeZone : Timezones [ "+5:30" ] ,
913- isTeamEvent : false ,
930+ input : {
931+ eventTypeId : 2 ,
932+ eventTypeSlug : "" ,
933+ startTime : `${ plus1DateString } T18:30:00.000Z` ,
934+ endTime : `${ plus2DateString } T18:29:59.999Z` ,
935+ timeZone : Timezones [ "+5:30" ] ,
936+ isTeamEvent : false ,
937+ }
914938 } ) ;
915939
916940 expect ( thisUserAvailability ) . toHaveTimeSlots (
@@ -1002,12 +1026,14 @@ describe("getSchedule", () => {
10021026 } ) ;
10031027
10041028 const scheduleForTeamEventOnADayWithNoBooking = await getSchedule ( {
1005- eventTypeId : 1 ,
1006- eventTypeSlug : "" ,
1007- startTime : `${ todayDateString } T18:30:00.000Z` ,
1008- endTime : `${ plus1DateString } T18:29:59.999Z` ,
1009- timeZone : Timezones [ "+5:30" ] ,
1010- isTeamEvent : true ,
1029+ input : {
1030+ eventTypeId : 1 ,
1031+ eventTypeSlug : "" ,
1032+ startTime : `${ todayDateString } T18:30:00.000Z` ,
1033+ endTime : `${ plus1DateString } T18:29:59.999Z` ,
1034+ timeZone : Timezones [ "+5:30" ] ,
1035+ isTeamEvent : true ,
1036+ }
10111037 } ) ;
10121038
10131039 expect ( scheduleForTeamEventOnADayWithNoBooking ) . toHaveTimeSlots (
@@ -1030,12 +1056,14 @@ describe("getSchedule", () => {
10301056 ) ;
10311057
10321058 const scheduleForTeamEventOnADayWithOneBookingForEachUser = await getSchedule ( {
1033- eventTypeId : 1 ,
1034- eventTypeSlug : "" ,
1035- startTime : `${ plus1DateString } T18:30:00.000Z` ,
1036- endTime : `${ plus2DateString } T18:29:59.999Z` ,
1037- timeZone : Timezones [ "+5:30" ] ,
1038- isTeamEvent : true ,
1059+ input : {
1060+ eventTypeId : 1 ,
1061+ eventTypeSlug : "" ,
1062+ startTime : `${ plus1DateString } T18:30:00.000Z` ,
1063+ endTime : `${ plus2DateString } T18:29:59.999Z` ,
1064+ timeZone : Timezones [ "+5:30" ] ,
1065+ isTeamEvent : true ,
1066+ }
10391067 } ) ;
10401068
10411069 // A user with blocked time in another event, still affects Team Event availability
@@ -1137,12 +1165,14 @@ describe("getSchedule", () => {
11371165 hosts : [ ] ,
11381166 } ) ;
11391167 const scheduleForTeamEventOnADayWithOneBookingForEachUserButOnDifferentTimeslots = await getSchedule ( {
1140- eventTypeId : 1 ,
1141- eventTypeSlug : "" ,
1142- startTime : `${ plus1DateString } T18:30:00.000Z` ,
1143- endTime : `${ plus2DateString } T18:29:59.999Z` ,
1144- timeZone : Timezones [ "+5:30" ] ,
1145- isTeamEvent : true ,
1168+ input : {
1169+ eventTypeId : 1 ,
1170+ eventTypeSlug : "" ,
1171+ startTime : `${ plus1DateString } T18:30:00.000Z` ,
1172+ endTime : `${ plus2DateString } T18:29:59.999Z` ,
1173+ timeZone : Timezones [ "+5:30" ] ,
1174+ isTeamEvent : true ,
1175+ }
11461176 } ) ;
11471177 // A user with blocked time in another event, still affects Team Event availability
11481178 expect ( scheduleForTeamEventOnADayWithOneBookingForEachUserButOnDifferentTimeslots ) . toHaveTimeSlots (
@@ -1163,12 +1193,14 @@ describe("getSchedule", () => {
11631193 ) ;
11641194
11651195 const scheduleForTeamEventOnADayWithOneBookingForEachUserOnSameTimeSlot = await getSchedule ( {
1166- eventTypeId : 1 ,
1167- eventTypeSlug : "" ,
1168- startTime : `${ plus2DateString } T18:30:00.000Z` ,
1169- endTime : `${ plus3DateString } T18:29:59.999Z` ,
1170- timeZone : Timezones [ "+5:30" ] ,
1171- isTeamEvent : true ,
1196+ input : {
1197+ eventTypeId : 1 ,
1198+ eventTypeSlug : "" ,
1199+ startTime : `${ plus2DateString } T18:30:00.000Z` ,
1200+ endTime : `${ plus3DateString } T18:29:59.999Z` ,
1201+ timeZone : Timezones [ "+5:30" ] ,
1202+ isTeamEvent : true ,
1203+ }
11721204 } ) ;
11731205 // A user with blocked time in another event, still affects Team Event availability
11741206 expect ( scheduleForTeamEventOnADayWithOneBookingForEachUserOnSameTimeSlot ) . toHaveTimeSlots (
0 commit comments