fix: extracted app-store and DWD platform-libraries imports to a /app-store barrel file (#19938)

* fix: platform libraries barrel file extract app-store

* extracted DWD to app-store barrel file

* removed getCalendar as not used in api/v2

* bump platform-libraries
This commit is contained in:
Somay Chauhan authored and GitHub committed 2025-03-11 08:30:37 +00:00
1 parent 517d509321
commit 861e3aa24f
17 files changed
+2606 -695

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
import getApps from "@calcom/app-store/utils";
import handleDeleteCredential from "@calcom/features/credentials/handleDeleteCredential";
import getEnabledAppsFromCredentials from "@calcom/lib/apps/getEnabledAppsFromCredentials";
import addDelegationCredential from "@calcom/trpc/server/routers/viewer/delegationCredential/add.handler";
export type { TDependencyData } from "@calcom/app-store/_appRegistry";
export type { CredentialOwner } from "@calcom/app-store/types";
export { CalendarService as IcsFeedCalendarService } from "@calcom/app-store/ics-feedcalendar/lib";
export { getAppFromSlug } from "@calcom/app-store/utils";
export type { CredentialDataWithTeamName, LocationOption } from "@calcom/app-store/utils";
export { CalendarService } from "@calcom/app-store/applecalendar/lib";
export { getApps };
export { handleDeleteCredential };
export type { App } from "@calcom/types/App";
export { getEnabledAppsFromCredentials };
export { getConnectedApps } from "@calcom/lib/getConnectedApps";
export type { ConnectedApps } from "@calcom/lib/getConnectedApps";
export type { AppsStatus } from "@calcom/types/Calendar";
export type { CredentialPayload } from "@calcom/types/Credential";
export { addDelegationCredential };
export { enrichUserWithDelegationConferencingCredentialsWithoutOrgId } from "@calcom/lib/delegationCredential/server";
export { toggleDelegationCredentialEnabled } from "@calcom/trpc/server/routers/viewer/delegationCredential/toggleEnabled.handler";
-64
View File
@@ -1,11 +1,3 @@
import type { TDependencyData } from "@calcom/app-store/_appRegistry";
import { getCalendar } from "@calcom/app-store/_utils/getCalendar";
import { CalendarService } from "@calcom/app-store/applecalendar/lib";
import { CalendarService as IcsFeedCalendarService } from "@calcom/app-store/ics-feedcalendar/lib";
import type { CredentialOwner } from "@calcom/app-store/types";
import { getAppFromSlug } from "@calcom/app-store/utils";
import type { CredentialDataWithTeamName, LocationOption } from "@calcom/app-store/utils";
import getApps from "@calcom/app-store/utils";
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";
@@ -22,28 +14,12 @@ import { getBookingFieldsWithSystemFields } from "@calcom/features/bookings/lib/
import getBookingInfo from "@calcom/features/bookings/lib/getBookingInfo";
import handleCancelBooking from "@calcom/features/bookings/lib/handleCancelBooking";
import * as newBookingMethods from "@calcom/features/bookings/lib/handleNewBooking";
import handleDeleteCredential from "@calcom/features/credentials/handleDeleteCredential";
import { getClientSecretFromPayment } from "@calcom/features/ee/payments/pages/getClientSecretFromPayment";
import { handleCreatePhoneCall } from "@calcom/features/handleCreatePhoneCall";
import handleMarkNoShow from "@calcom/features/handleMarkNoShow";
import * as instantMeetingMethods from "@calcom/features/instant-meeting/handleInstantMeeting";
import getEnabledAppsFromCredentials from "@calcom/lib/apps/getEnabledAppsFromCredentials";
import getAllUserBookings from "@calcom/lib/bookings/getAllUserBookings";
import { symmetricEncrypt, symmetricDecrypt } from "@calcom/lib/crypto";
import {
getFirstDelegationConferencingCredentialAppLocation,
getFirstDelegationConferencingCredential,
getDelegationCredentialOrRegularCredential,
getDelegationCredentialOrFindRegularCredential,
enrichUserWithDelegationConferencingCredentialsWithoutOrgId,
enrichUserWithDelegationCredentialsWithoutOrgId,
enrichHostsWithDelegationCredentials,
enrichUsersWithDelegationCredentials,
buildAllCredentials,
getAllDelegationCredentialsForUserByAppSlug,
getAllDelegationCredentialsForUserByAppType,
checkIfSuccessfullyConfiguredInWorkspace,
} from "@calcom/lib/delegationCredential/server";
import { getRoutedUrl } from "@calcom/lib/server/getRoutedUrl";
import { getTeamMemberEmailForResponseOrContactUsingUrlQuery } from "@calcom/lib/server/getTeamMemberEmailFromCrm";
import { getTranslation } from "@calcom/lib/server/i18n";
@@ -52,33 +28,13 @@ 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 addDelegationCredential from "@calcom/trpc/server/routers/viewer/delegationCredential/add.handler";
import {
createNewUsersConnectToOrgIfExists,
sendSignupToOrganizationEmail,
} from "@calcom/trpc/server/routers/viewer/teams/inviteMember/utils";
import type { App } from "@calcom/types/App";
import type { CredentialPayload } from "@calcom/types/Credential";
export { getUsersCredentials } from "@calcom/lib/server/getUsersCredentials";
export { getApps };
export {
getFirstDelegationConferencingCredentialAppLocation,
getFirstDelegationConferencingCredential,
getDelegationCredentialOrRegularCredential,
getDelegationCredentialOrFindRegularCredential,
enrichUserWithDelegationConferencingCredentialsWithoutOrgId,
enrichUserWithDelegationCredentialsWithoutOrgId,
enrichHostsWithDelegationCredentials,
enrichUsersWithDelegationCredentials,
buildAllCredentials,
getAllDelegationCredentialsForUserByAppSlug,
getAllDelegationCredentialsForUserByAppType,
checkIfSuccessfullyConfiguredInWorkspace,
};
export { slugify } from "@calcom/lib/slugify";
export { getBookingForReschedule };
export { updateScheduleHandler };
@@ -105,9 +61,6 @@ export { handleNewRecurringBooking } from "@calcom/features/bookings/lib/handleN
export { getConnectedDestinationCalendarsAndEnsureDefaultsInDb } from "@calcom/lib/getConnectedDestinationCalendars";
export type { ConnectedDestinationCalendars } from "@calcom/lib/getConnectedDestinationCalendars";
export { getConnectedApps } from "@calcom/lib/getConnectedApps";
export type { ConnectedApps } from "@calcom/lib/getConnectedApps";
export { getBusyCalendarTimes } from "@calcom/lib/CalendarManager";
export {
@@ -124,7 +77,6 @@ export type {
RecurringBookingCreateBody,
} from "@calcom/features/bookings/types";
export { HttpError } from "@calcom/lib/http-error";
export type { AppsStatus } from "@calcom/types/Calendar";
export { MINUTES_TO_BOOK } from "@calcom/lib/constants";
@@ -147,9 +99,6 @@ export { parseRecurringEvent } from "@calcom/lib/isRecurringEvent";
export { dynamicEvent } from "@calcom/lib/defaultEvents";
export { symmetricEncrypt, symmetricDecrypt };
export { CalendarService };
export { getCalendar };
export { getTranslation };
@@ -158,18 +107,9 @@ export { roundRobinManualReassignment } from "@calcom/features/ee/round-robin/ro
export { ErrorCode } from "@calcom/lib/errorCodes";
export { IcsFeedCalendarService };
export { validateCustomEventName } from "@calcom/lib/event";
export { getEnabledAppsFromCredentials };
export type { App };
export type { CredentialDataWithTeamName };
export type { LocationOption };
export type { TeamQuery };
export type { CredentialOwner };
export type { TDependencyData };
export type { CredentialPayload };
export { getAppFromSlug };
export { credentialForCalendarServiceSelect };
export { MembershipRole };
@@ -199,7 +139,6 @@ export { AttendeeUpdatedEmail };
export { OrganizerRequestEmail };
export { AttendeeRequestEmail };
export { handleDeleteCredential };
export { getBookingFieldsWithSystemFields };
@@ -207,9 +146,6 @@ export { getRoutedUrl };
export { getTeamMemberEmailForResponseOrContactUsingUrlQuery };
export { addDelegationCredential };
export { SelectedCalendarRepository } from "@calcom/lib/server/repository/selectedCalendar";
export { toggleDelegationCredentialEnabled } from "@calcom/trpc/server/routers/viewer/delegationCredential/toggleEnabled.handler";
export { encryptServiceAccountKey } from "@calcom/lib/server/serviceAccountKey";
export { createHandler as createApiKeyHandler } from "@calcom/trpc/server/routers/viewer/apiKeys/create.handler";
+8
View File
@@ -29,6 +29,11 @@
"vite-plugin-environment": "^1.1.3"
},
"exports": {
"./app-store": {
"import": "./dist/app-store.js",
"require": "./dist/app-store.cjs",
"types": "./dist/app-store.d.ts"
},
"./event-types": {
"import": "./dist/event-types.js",
"require": "./dist/event-types.cjs",
@@ -52,6 +57,9 @@
],
"slots": [
"dist/slots.d.ts"
],
"app-store": [
"dist/app-store.d.ts"
]
}
}
@@ -19,6 +19,7 @@ export default defineConfig({
entry: {
index: resolve(__dirname, "./index.ts"),
"event-types": resolve(__dirname, "./event-types.ts"),
"app-store": resolve(__dirname, "./app-store.ts"),
slots: resolve(__dirname, "./slots.ts"),
},
name: "calcom-lib",