refactor: extract emails from libraries barrel file (#19836)
* refactor: extract emails from libraries barrel file * fixup! Merge branch 'main' into refactor-libraries-barrel-emails * fix: add missing configs * add sendSignupToOrganizationEmail to barrel email file * bump libs
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
"@axiomhq/winston": "^1.2.0",
|
||||
"@calcom/platform-constants": "*",
|
||||
"@calcom/platform-enums": "*",
|
||||
"@calcom/platform-libraries": "npm:@calcom/platform-libraries@0.0.143",
|
||||
"@calcom/platform-libraries": "npm:@calcom/platform-libraries@0.0.144",
|
||||
"@calcom/platform-libraries-0.0.2": "npm:@calcom/platform-libraries@0.0.2",
|
||||
"@calcom/platform-types": "*",
|
||||
"@calcom/platform-utils": "*",
|
||||
|
||||
@@ -30,7 +30,7 @@ import {
|
||||
OrganizerRescheduledEmail,
|
||||
AttendeeCancelledEmail,
|
||||
OrganizerCancelledEmail,
|
||||
} from "@calcom/platform-libraries";
|
||||
} from "@calcom/platform-libraries/emails";
|
||||
import {
|
||||
CreateBookingInput_2024_08_13,
|
||||
BookingOutput_2024_08_13,
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ import {
|
||||
AttendeeRequestEmail,
|
||||
OrganizerRequestEmail,
|
||||
AttendeeDeclinedEmail,
|
||||
} from "@calcom/platform-libraries";
|
||||
} from "@calcom/platform-libraries/emails";
|
||||
import {
|
||||
CreateBookingInput_2024_08_13,
|
||||
BookingOutput_2024_08_13,
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ import {
|
||||
AttendeeCancelledEmail,
|
||||
OrganizerReassignedEmail,
|
||||
AttendeeUpdatedEmail,
|
||||
} from "@calcom/platform-libraries";
|
||||
} from "@calcom/platform-libraries/emails";
|
||||
import {
|
||||
CreateBookingInput_2024_08_13,
|
||||
BookingOutput_2024_08_13,
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ import {
|
||||
AttendeeRescheduledEmail,
|
||||
OrganizerCancelledEmail,
|
||||
AttendeeCancelledEmail,
|
||||
} from "@calcom/platform-libraries";
|
||||
} from "@calcom/platform-libraries/emails";
|
||||
import {
|
||||
CreateBookingInput_2024_08_13,
|
||||
BookingOutput_2024_08_13,
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import { randomString } from "test/utils/randomString";
|
||||
import { withApiAuth } from "test/utils/withApiAuth";
|
||||
|
||||
import { CAL_API_VERSION_HEADER, SUCCESS_STATUS, VERSION_2024_08_13 } from "@calcom/platform-constants";
|
||||
import { AttendeeCancelledEmail, OrganizerCancelledEmail } from "@calcom/platform-libraries";
|
||||
import { AttendeeCancelledEmail, OrganizerCancelledEmail } from "@calcom/platform-libraries/emails";
|
||||
import {
|
||||
CreateRecurringBookingInput_2024_08_13,
|
||||
RecurringBookingOutput_2024_08_13,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Injectable } from "@nestjs/common";
|
||||
|
||||
import { sendSignupToOrganizationEmail, getTranslation } from "@calcom/platform-libraries";
|
||||
import { getTranslation } from "@calcom/platform-libraries";
|
||||
import { sendSignupToOrganizationEmail } from "@calcom/platform-libraries/emails";
|
||||
|
||||
@Injectable()
|
||||
export class EmailService {
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
"@calcom/platform-utils": ["../../../packages/platform/utils/index.ts"],
|
||||
"@calcom/platform-enums": ["../../../packages/platform/enums/index.ts"],
|
||||
"@calcom/platform-libraries/event-types": ["../../../packages/platform/libraries/event-types.ts"],
|
||||
"@calcom/platform-libraries/slots": ["../../../packages/platform/libraries/slots.ts"]
|
||||
"@calcom/platform-libraries/slots": ["../../../packages/platform/libraries/slots.ts"],
|
||||
"@calcom/platform-libraries/emails": ["../../../packages/platform/libraries/emails.ts"]
|
||||
},
|
||||
"incremental": true,
|
||||
"skipLibCheck": true,
|
||||
|
||||
+599
-2523
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,36 @@
|
||||
import AttendeeCancelledEmail from "@calcom/emails/templates/attendee-cancelled-email";
|
||||
import AttendeeDeclinedEmail from "@calcom/emails/templates/attendee-declined-email";
|
||||
import AttendeeRequestEmail from "@calcom/emails/templates/attendee-request-email";
|
||||
import AttendeeRescheduledEmail from "@calcom/emails/templates/attendee-rescheduled-email";
|
||||
import AttendeeScheduledEmail from "@calcom/emails/templates/attendee-scheduled-email";
|
||||
import AttendeeUpdatedEmail from "@calcom/emails/templates/attendee-updated-email";
|
||||
import OrganizerCancelledEmail from "@calcom/emails/templates/organizer-cancelled-email";
|
||||
import OrganizerReassignedEmail from "@calcom/emails/templates/organizer-reassigned-email";
|
||||
import OrganizerRequestEmail from "@calcom/emails/templates/organizer-request-email";
|
||||
import OrganizerRescheduledEmail from "@calcom/emails/templates/organizer-rescheduled-email";
|
||||
import OrganizerScheduledEmail from "@calcom/emails/templates/organizer-scheduled-email";
|
||||
import { sendSignupToOrganizationEmail } from "@calcom/trpc/server/routers/viewer/teams/inviteMember/utils";
|
||||
|
||||
export { AttendeeScheduledEmail };
|
||||
|
||||
export { OrganizerScheduledEmail };
|
||||
|
||||
export { AttendeeDeclinedEmail };
|
||||
|
||||
export { AttendeeCancelledEmail };
|
||||
|
||||
export { OrganizerCancelledEmail };
|
||||
|
||||
export { OrganizerReassignedEmail };
|
||||
|
||||
export { OrganizerRescheduledEmail };
|
||||
|
||||
export { AttendeeRescheduledEmail };
|
||||
|
||||
export { AttendeeUpdatedEmail };
|
||||
|
||||
export { OrganizerRequestEmail };
|
||||
|
||||
export { AttendeeRequestEmail };
|
||||
|
||||
export { sendSignupToOrganizationEmail };
|
||||
@@ -1,14 +1,3 @@
|
||||
import AttendeeCancelledEmail from "@calcom/emails/templates/attendee-cancelled-email";
|
||||
import AttendeeDeclinedEmail from "@calcom/emails/templates/attendee-declined-email";
|
||||
import AttendeeRequestEmail from "@calcom/emails/templates/attendee-request-email";
|
||||
import AttendeeRescheduledEmail from "@calcom/emails/templates/attendee-rescheduled-email";
|
||||
import AttendeeScheduledEmail from "@calcom/emails/templates/attendee-scheduled-email";
|
||||
import AttendeeUpdatedEmail from "@calcom/emails/templates/attendee-updated-email";
|
||||
import OrganizerCancelledEmail from "@calcom/emails/templates/organizer-cancelled-email";
|
||||
import OrganizerReassignedEmail from "@calcom/emails/templates/organizer-reassigned-email";
|
||||
import OrganizerRequestEmail from "@calcom/emails/templates/organizer-request-email";
|
||||
import OrganizerRescheduledEmail from "@calcom/emails/templates/organizer-rescheduled-email";
|
||||
import OrganizerScheduledEmail from "@calcom/emails/templates/organizer-scheduled-email";
|
||||
import { getBookingForReschedule } from "@calcom/features/bookings/lib/get-booking";
|
||||
import { getBookingFieldsWithSystemFields } from "@calcom/features/bookings/lib/getBookingFields";
|
||||
import getBookingInfo from "@calcom/features/bookings/lib/getBookingInfo";
|
||||
@@ -28,10 +17,7 @@ import { credentialForCalendarServiceSelect } from "@calcom/prisma/selects/crede
|
||||
import { paymentDataSelect } from "@calcom/prisma/selects/payment";
|
||||
import type { TeamQuery } from "@calcom/trpc/server/routers/loggedInViewer/integrations.handler";
|
||||
import { updateHandler as updateScheduleHandler } from "@calcom/trpc/server/routers/viewer/availability/schedule/update.handler";
|
||||
import {
|
||||
createNewUsersConnectToOrgIfExists,
|
||||
sendSignupToOrganizationEmail,
|
||||
} from "@calcom/trpc/server/routers/viewer/teams/inviteMember/utils";
|
||||
import { createNewUsersConnectToOrgIfExists } from "@calcom/trpc/server/routers/viewer/teams/inviteMember/utils";
|
||||
|
||||
export { getUsersCredentials } from "@calcom/lib/server/getUsersCredentials";
|
||||
|
||||
@@ -85,7 +71,7 @@ export type { CityTimezones } from "@calcom/features/cityTimezones/cityTimezones
|
||||
|
||||
export { TRPCError } from "@trpc/server";
|
||||
export type { TUpdateInputSchema } from "@calcom/trpc/server/routers/viewer/availability/schedule/update.schema";
|
||||
export { createNewUsersConnectToOrgIfExists, sendSignupToOrganizationEmail };
|
||||
export { createNewUsersConnectToOrgIfExists };
|
||||
|
||||
export { getAllUserBookings };
|
||||
export { getBookingInfo };
|
||||
@@ -118,28 +104,6 @@ export { getClientSecretFromPayment };
|
||||
|
||||
export { confirmHandler as confirmBookingHandler } from "@calcom/trpc/server/routers/viewer/bookings/confirm.handler";
|
||||
|
||||
export { AttendeeScheduledEmail };
|
||||
|
||||
export { OrganizerScheduledEmail };
|
||||
|
||||
export { AttendeeDeclinedEmail };
|
||||
|
||||
export { AttendeeCancelledEmail };
|
||||
|
||||
export { OrganizerCancelledEmail };
|
||||
|
||||
export { OrganizerReassignedEmail };
|
||||
|
||||
export { OrganizerRescheduledEmail };
|
||||
|
||||
export { AttendeeRescheduledEmail };
|
||||
|
||||
export { AttendeeUpdatedEmail };
|
||||
|
||||
export { OrganizerRequestEmail };
|
||||
|
||||
export { AttendeeRequestEmail };
|
||||
|
||||
export { getBookingFieldsWithSystemFields };
|
||||
|
||||
export { getRoutedUrl };
|
||||
|
||||
@@ -44,6 +44,11 @@
|
||||
"require": "./dist/index.cjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
},
|
||||
"./emails": {
|
||||
"import": "./dist/emails.js",
|
||||
"require": "./dist/emails.cjs",
|
||||
"types": "./dist/emails.d.ts"
|
||||
},
|
||||
"./slots": {
|
||||
"import": "./dist/slots.js",
|
||||
"require": "./dist/slots.cjs",
|
||||
@@ -58,6 +63,9 @@
|
||||
"slots": [
|
||||
"dist/slots.d.ts"
|
||||
],
|
||||
"emails": [
|
||||
"dist/emails.d.ts"
|
||||
],
|
||||
"app-store": [
|
||||
"dist/app-store.d.ts"
|
||||
]
|
||||
|
||||
@@ -18,6 +18,7 @@ export default defineConfig({
|
||||
lib: {
|
||||
entry: {
|
||||
index: resolve(__dirname, "./index.ts"),
|
||||
emails: resolve(__dirname, "./emails.ts"),
|
||||
"event-types": resolve(__dirname, "./event-types.ts"),
|
||||
"app-store": resolve(__dirname, "./app-store.ts"),
|
||||
slots: resolve(__dirname, "./slots.ts"),
|
||||
|
||||
Reference in New Issue
Block a user