Type fixes
This commit is contained in:
1 parent
3d4de9476d
commit
cee41eabc7
12 files changed
+49
-45
No files matched your search
@@ -14,10 +14,10 @@ import TeamInviteEmail, { TeamInvite } from "@lib/emails/templates/team-invite-e
|
||||
import { CalendarEvent } from "@lib/integrations/calendar/interfaces/Calendar";
|
||||
|
||||
export const sendScheduledEmails = async (calEvent: CalendarEvent) => {
|
||||
const emailsToSend = [];
|
||||
const emailsToSend: Promise<unknown>[] = [];
|
||||
|
||||
emailsToSend.push(
|
||||
calEvent.attendees.map((attendee) => {
|
||||
...calEvent.attendees.map((attendee) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
const scheduledEmail = new AttendeeScheduledEmail(calEvent, attendee);
|
||||
@@ -44,10 +44,10 @@ export const sendScheduledEmails = async (calEvent: CalendarEvent) => {
|
||||
};
|
||||
|
||||
export const sendRescheduledEmails = async (calEvent: CalendarEvent) => {
|
||||
const emailsToSend = [];
|
||||
const emailsToSend: Promise<unknown>[] = [];
|
||||
|
||||
emailsToSend.push(
|
||||
calEvent.attendees.map((attendee) => {
|
||||
...calEvent.attendees.map((attendee) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
const scheduledEmail = new AttendeeRescheduledEmail(calEvent, attendee);
|
||||
@@ -85,10 +85,10 @@ export const sendOrganizerRequestEmail = async (calEvent: CalendarEvent) => {
|
||||
};
|
||||
|
||||
export const sendDeclinedEmails = async (calEvent: CalendarEvent) => {
|
||||
const emailsToSend = [];
|
||||
const emailsToSend: Promise<unknown>[] = [];
|
||||
|
||||
emailsToSend.push(
|
||||
calEvent.attendees.map((attendee) => {
|
||||
...calEvent.attendees.map((attendee) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
const declinedEmail = new AttendeeDeclinedEmail(calEvent, attendee);
|
||||
@@ -104,10 +104,10 @@ export const sendDeclinedEmails = async (calEvent: CalendarEvent) => {
|
||||
};
|
||||
|
||||
export const sendCancelledEmails = async (calEvent: CalendarEvent) => {
|
||||
const emailsToSend = [];
|
||||
const emailsToSend: Promise<unknown>[] = [];
|
||||
|
||||
emailsToSend.push(
|
||||
calEvent.attendees.map((attendee) => {
|
||||
...calEvent.attendees.map((attendee) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
const scheduledEmail = new AttendeeCancelledEmail(calEvent, attendee);
|
||||
@@ -145,10 +145,10 @@ export const sendOrganizerRequestReminderEmail = async (calEvent: CalendarEvent)
|
||||
};
|
||||
|
||||
export const sendAwaitingPaymentEmail = async (calEvent: CalendarEvent) => {
|
||||
const emailsToSend = [];
|
||||
const emailsToSend: Promise<unknown>[] = [];
|
||||
|
||||
emailsToSend.push(
|
||||
calEvent.attendees.map((attendee) => {
|
||||
...calEvent.attendees.map((attendee) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
const paymentEmail = new AttendeeAwaitingPaymentEmail(calEvent, attendee);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Credential } from "@prisma/client";
|
||||
import { Credential, Prisma } from "@prisma/client";
|
||||
import dayjs from "dayjs";
|
||||
import timezone from "dayjs/plugin/timezone";
|
||||
import utc from "dayjs/plugin/utc";
|
||||
@@ -342,8 +342,7 @@ export default abstract class BaseCalendarService implements Calendar {
|
||||
}
|
||||
|
||||
private async getEventsByUID(uid: string): Promise<CalendarEventType[]> {
|
||||
const events = [];
|
||||
|
||||
const events: Prisma.PromiseReturnType<typeof this.getEvents> = [];
|
||||
const calendars = await this.listCalendars();
|
||||
|
||||
for (const cal of calendars) {
|
||||
|
||||
Reference in new issue
Block a user