Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/app-store/constants.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
import type { AppCategories } from "@prisma/client";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import type { AppCategories } from "@prisma/client";
import type { AppCategories } from "@calcom/prisma/enums";


export const MeetLocationType = "integrations:google:meet";

export const MSTeamsLocationType = "integrations:office365_video";

export const defaultVideoAppCategories: AppCategories[] = [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having this in utils.ts was causing a circular dependency

"messaging",
"conferencing",
// Legacy name for conferencing
"video",
];
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { TRPCError } from "@trpc/server";
import { createFallbackRoute } from "../lib/createFallbackRoute";
import { getSerializableForm } from "../lib/getSerializableForm";
import { isFallbackRoute } from "../lib/isFallbackRoute";
import { isFormCreateEditAllowed } from "../lib/isFormCreateEditAllowed";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not used in file

import isRouter from "../lib/isRouter";
import isRouterLinkedField from "../lib/isRouterLinkedField";
import type { SerializableForm } from "../types/types";
Expand Down
2 changes: 0 additions & 2 deletions packages/app-store/routing-forms/trpc/formQuery.handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import type { PrismaClient } from "@calcom/prisma";
import { MembershipRole } from "@calcom/prisma/enums";
import type { TrpcSessionUser } from "@calcom/trpc/server/types";

import { TRPCError } from "@trpc/server";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not used in file


import { getSerializableForm } from "../lib/getSerializableForm";
import type { TFormQueryInputSchema } from "./formQuery.schema";
import { checkPermissionOnExistingRoutingForm } from "./permissions";
Expand Down
2 changes: 1 addition & 1 deletion packages/app-store/routing-forms/trpc/permissions.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { PermissionString } from "@calcom/features/pbac/domain/types/permission-registry";
import { PermissionCheckService } from "@calcom/features/pbac/services/permission-check.service";
import { PrismaRoutingFormRepository } from "@calcom/lib/server/repository/PrismaRoutingFormRepository";
import { MembershipRole } from "@calcom/prisma/enums";
import type { MembershipRole } from "@calcom/prisma/enums";

import { TRPCError } from "@trpc/server";

Expand Down
2 changes: 1 addition & 1 deletion packages/app-store/server.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Prisma } from "@prisma/client";
import type { TFunction } from "i18next";

import { defaultVideoAppCategories } from "@calcom/app-store/utils";
import { defaultVideoAppCategories } from "@calcom/app-store/constants";
import getEnabledAppsFromCredentials from "@calcom/lib/apps/getEnabledAppsFromCredentials";
import {
buildNonDelegationCredentials,
Expand Down
21 changes: 7 additions & 14 deletions packages/app-store/utils.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import type { AppCategories } from "@prisma/client";

// If you import this file on any app it should produce circular dependency
// import appStore from "./index";
import { appStoreMetadata } from "@calcom/app-store/appStoreMetaData";
import { defaultVideoAppCategories } from "@calcom/app-store/constants";
import type { EventLocationType } from "@calcom/app-store/locations";
import logger from "@calcom/lib/logger";
import { getPiiFreeCredential } from "@calcom/lib/piiFreeData";
Expand All @@ -19,6 +18,12 @@ export type LocationOption = {
disabled?: boolean;
};

export type CredentialDataWithTeamName = CredentialForCalendarService & {
team?: {
name: string;
} | null;
};

const ALL_APPS_MAP = Object.keys(appStoreMetadata).reduce((store, key) => {
const metadata = appStoreMetadata[key as keyof typeof appStoreMetadata] as AppMeta;

Expand All @@ -33,12 +38,6 @@ const ALL_APPS_MAP = Object.keys(appStoreMetadata).reduce((store, key) => {
return store;
}, {} as Record<string, AppMeta>);

export type CredentialDataWithTeamName = CredentialForCalendarService & {
team?: {
name: string;
} | null;
};

export const ALL_APPS = Object.values(ALL_APPS_MAP);

/**
Expand Down Expand Up @@ -168,11 +167,5 @@ export function doesAppSupportTeamInstall({
export function isConferencing(appCategories: string[]) {
return appCategories.some((category) => category === "conferencing" || category === "video");
}
export const defaultVideoAppCategories: AppCategories[] = [
"messaging",
"conferencing",
// Legacy name for conferencing
"video",
];

export default getApps;
1 change: 0 additions & 1 deletion packages/prisma/zod/custom/booking.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// `responses` is merged with it during handleNewBooking call because `responses` schema is dynamic and depends on eventType
import z, { ZodNullable, ZodObject, ZodOptional } from "zod";
import { timeZoneSchema } from "@calcom/lib/dayjs/timeZone.schema";
// TODO: Move this out of here. Importing from app-store is a circular package dependency.
import { routingFormResponseInDbSchema } from "@calcom/app-store/routing-forms/zod";
import { CreationSource } from "@calcom/prisma/enums";

Expand Down
Loading