Scheduling infrastructure for absolutely everyone.
App store metadata refactor (#2495)
Omar Lópezba73960a0244
diff --git a/packages/app-store/_appRegistry.ts b/packages/app-store/_appRegistry.tsindex 978631581f6..41c6570fd00 100644--- a/packages/app-store/_appRegistry.ts+++ b/packages/app-store/_appRegistry.ts@@ -1,14 +1,14 @@import { App } from "@calcom/types/App";-import appStore from ".";+import appStoreMetadata from "./metadata";/** Mainly to use in listings for the frontend, use in getStaticProps or getServerSideProps */export function getAppRegistry() {- return Object.values(appStore).reduce((apps, app) => {+ return Object.values(appStoreMetadata).reduce((apps, app) => {// Skip if app isn't installed- if (!app.metadata.installed) return apps;+ if (!app.installed) return apps;// Let's not leak api keys to the front end- const { key, ...metadata } = app.metadata;+ const { key, ...metadata } = app;apps.push(metadata);return apps;}, [] as Omit<App, "key">[]);diff --git a/packages/app-store/_example/_metadata.ts b/packages/app-store/_example/_metadata.tsnew file mode 100644index 00000000000..3dfa91b55bb--- /dev/null+++ b/packages/app-store/_example/_metadata.ts@@ -0,0 +1,26 @@+import type { App } from "@calcom/types/App";++import _package from "./package.json";++export const metadata = {+ name: _package.name,+ description: _package.description,+ installed: true,+ category: "video",+ // If using static next public folder, can then be referenced from the base URL (/).+ imageSrc: "/api/app-store/_example/icon.svg",+ logo: "/api/app-store/_example/icon.svg",+ publisher: "Cal.com",+ rating: 5,+ reviews: 69,+ slug: "example_video",+ title: "Example App",+ trending: true,+ type: "example_video",+ url: "https://cal.com/",+ variant: "conferencing",+ verified: true,+ email: "[email protected]",+} as App;++export default metadata;diff --git a/packages/app-store/_example/index.ts b/packages/app-store/_example/index.tsindex a0465e2b988..5373eb04efc 100644--- a/packages/app-store/_example/index.ts+++ b/packages/app-store/_example/index.ts@@ -1,27 +1,3 @@-import type { App } from "@calcom/types/App";--import _package from "./package.json";--export const metadata = {- name: _package.name,- description: _package.description,- installed: true,- category: "video",- // If using static next public folder, can then be referenced from the base URL (/).- imageSrc: "/api/app-store/_example/icon.svg",- logo: "/api/app-store/_example/icon.svg",- publisher: "Cal.com",- rating: 5,- reviews: 69,- slug: "example_video",- title: "Example App",- trending: true,- type: "example_video",- url: "https://cal.com/",- variant: "conferencing",- verified: true,- email: "[email protected]",-} as App;-export * as api from "./api";export * as lib from "./lib";+export { metadata } from "./_metadata";diff --git a/packages/app-store/applecalendar/_metadata.ts b/packages/app-store/applecalendar/_metadata.tsnew file mode 100644index 00000000000..06cee34fbe1--- /dev/null+++ b/packages/app-store/applecalendar/_metadata.ts@@ -0,0 +1,25 @@+import type { App } from "@calcom/types/App";++import _package from "./package.json";++export const metadata = {+ name: "Apple Calendar",+ description: _package.description,+ installed: true,+ type: "apple_calendar",+ title: "Apple Calendar",+ imageSrc: "/api/app-store/applecalendar/icon.svg",+ variant: "calendar",+ category: "calendar",+ logo: "/api/app-store/applecalendar/icon.svg",+ publisher: "Cal.com",+ rating: 5,+ reviews: 69,+ slug: "apple-calendar",+ trending: false,+ url: "https://cal.com/",+ verified: true,+ email: "[email protected]",+} as App;++export default metadata;diff --git a/packages/app-store/applecalendar/index.ts b/packages/app-store/applecalendar/index.tsindex 1e68615932b..db3c2b10b22 100644--- a/packages/app-store/applecalendar/index.ts+++ b/packages/app-store/applecalendar/index.ts@@ -1,27 +1,4 @@-import type { App } from "@calcom/types/App";--import _package from "./package.json";--export const metadata = {- name: "Apple Calendar",- description: _package.description,- installed: true,- type: "apple_calendar",- title: "Apple Calendar",- imageSrc: "/api/app-store/applecalendar/icon.svg",- variant: "calendar",- category: "calendar",- logo: "/api/app-store/applecalendar/icon.svg",- publisher: "Cal.com",- rating: 5,- reviews: 69,- slug: "apple-calendar",- trending: false,- url: "https://cal.com/",- verified: true,- email: "[email protected]",-} as App;-export * as api from "./api";export * as components from "./components";export * as lib from "./lib";+export { metadata } from "./_metadata";diff --git a/packages/app-store/caldavcalendar/_metadata.ts b/packages/app-store/caldavcalendar/_metadata.tsnew file mode 100644index 00000000000..a9f4f77e528--- /dev/null+++ b/packages/app-store/caldavcalendar/_metadata.ts@@ -0,0 +1,25 @@+import type { App } from "@calcom/types/App";++import _package from "./package.json";++export const metadata = {+ name: "CalDav Server",+ description: _package.description,+ installed: true,+ type: "caldav_calendar",+ title: "CalDav Server",+ imageSrc: "/api/app-store/caldavcalendar/icon.svg",+ variant: "calendar",+ category: "calendar",+ logo: "/api/app-store/caldavcalendar/icon.svg",+ publisher: "Cal.com",+ rating: 5,+ reviews: 69,+ slug: "caldav-calendar",+ trending: false,+ url: "https://cal.com/",+ verified: true,+ email: "[email protected]",+} as App;++export default metadata;diff --git a/packages/app-store/dailyvideo/_metadata.ts b/packages/app-store/dailyvideo/_metadata.tsnew file mode 100644index 00000000000..b7785eacbe3--- /dev/null+++ b/packages/app-store/dailyvideo/_metadata.ts@@ -0,0 +1,30 @@+import type { App } from "@calcom/types/App";++import { LocationType } from "../locations";+import _package from "./package.json";++export const metadata = {+ name: "Cal Video",+ description: _package.description,+ installed: !!process.env.DAILY_API_KEY,+ type: "daily_video",+ imageSrc: "/api/app-store/dailyvideo/icon.svg",+ variant: "conferencing",+ url: "https://daily.co",+ trending: true,+ logo: "/api/app-store/dailyvideo/icon.svg",+ publisher: "Cal.com",+ verified: true,+ rating: 4.3, // TODO: placeholder for now, pull this from TrustPilot or G2+ reviews: 69, // TODO: placeholder for now, pull this from TrustPilot or G2+ category: "video",+ slug: "dailyvideo",+ title: "Cal Video",+ isGlobal: true,+ email: "[email protected]",+ locationType: LocationType.Daily,+ locationLabel: "Cal Video",+ key: { apikey: process.env.DAILY_API_KEY },+} as App;++export default metadata;diff --git a/packages/app-store/dailyvideo/index.ts b/packages/app-store/dailyvideo/index.tsindex a326c1e94b3..374ae5ab453 100644--- a/packages/app-store/dailyvideo/index.ts+++ b/packages/app-store/dailyvideo/index.ts@@ -1,30 +1,2 @@-import type { App } from "@calcom/types/App";--import { LocationType } from "../locations";-import _package from "./package.json";--export const metadata = {- name: "Cal Video",- description: _package.description,- installed: !!process.env.DAILY_API_KEY,- type: "daily_video",- imageSrc: "/api/app-store/dailyvideo/icon.svg",- variant: "conferencing",- url: "https://daily.co",- trending: true,- logo: "/api/app-store/dailyvideo/icon.svg",- publisher: "Cal.com",- verified: true,- rating: 4.3, // TODO: placeholder for now, pull this from TrustPilot or G2- reviews: 69, // TODO: placeholder for now, pull this from TrustPilot or G2- category: "video",- slug: "dailyvideo",- title: "Cal Video",- isGlobal: true,- email: "[email protected]",- locationType: LocationType.Daily,- locationLabel: "Cal Video",- key: { apikey: process.env.DAILY_API_KEY },-} as App;-export * as lib from "./lib";+export { metadata } from "./_metadata";diff --git a/packages/app-store/googlecalendar/_metadata.ts b/packages/app-store/googlecalendar/_metadata.tsnew file mode 100644index 00000000000..6d2aaf673df--- /dev/null+++ b/packages/app-store/googlecalendar/_metadata.ts@@ -0,0 +1,29 @@+import { validJson } from "@calcom/lib/jsonUtils";+import type { App } from "@calcom/types/App";++import { LocationType } from "../locations";+import _package from "./package.json";++export const metadata = {+ name: "Google Calendar",+ description: _package.description,+ installed: !!(process.env.GOOGLE_API_CREDENTIALS && validJson(process.env.GOOGLE_API_CREDENTIALS)),+ type: "google_calendar",+ title: "Google Calendar",+ imageSrc: "/api/app-store/googlecalendar/icon.svg",+ variant: "calendar",+ category: "calendar",+ logo: "/api/app-store/googlecalendar/icon.svg",+ publisher: "Cal.com",+ rating: 5,+ reviews: 69,+ slug: "google-calendar",+ trending: false,+ url: "https://cal.com/",+ verified: true,+ email: "[email protected]",+ locationType: LocationType.GoogleMeet,+ locationLabel: "Google Meet",+} as App;++export default metadata;diff --git a/packages/app-store/googlecalendar/index.ts b/packages/app-store/googlecalendar/index.tsindex 115050efe23..5373eb04efc 100644--- a/packages/app-store/googlecalendar/index.ts+++ b/packages/app-store/googlecalendar/index.ts@@ -1,30 +1,3 @@-import { validJson } from "@calcom/lib/jsonUtils";-import type { App } from "@calcom/types/App";--import { LocationType } from "../locations";-import _package from "./package.json";--export const metadata = {- name: "Google Calendar",- description: _package.description,- installed: !!(process.env.GOOGLE_API_CREDENTIALS && validJson(process.env.GOOGLE_API_CREDENTIALS)),- type: "google_calendar",- title: "Google Calendar",- imageSrc: "/api/app-store/googlecalendar/icon.svg",- variant: "calendar",- category: "calendar",- logo: "/api/app-store/googlecalendar/icon.svg",- publisher: "Cal.com",- rating: 5,- reviews: 69,- slug: "google-calendar",- trending: false,- url: "https://cal.com/",- verified: true,- email: "[email protected]",- locationType: LocationType.GoogleMeet,- locationLabel: "Google Meet",-} as App;-export * as api from "./api";export * as lib from "./lib";+export { metadata } from "./_metadata";diff --git a/packages/app-store/googlevideo/_metadata.ts b/packages/app-store/googlevideo/_metadata.tsnew file mode 100644index 00000000000..32889bc4fc9--- /dev/null+++ b/packages/app-store/googlevideo/_metadata.ts@@ -0,0 +1,29 @@+import { validJson } from "@calcom/lib/jsonUtils";+import type { App } from "@calcom/types/App";++import { LocationType } from "../locations";+import _package from "./package.json";++export const metadata = {+ name: "Google Meet",+ description: _package.description,+ installed: !!(process.env.GOOGLE_API_CREDENTIALS && validJson(process.env.GOOGLE_API_CREDENTIALS)),+ slug: "google-meet",+ category: "video",+ type: "google_video",+ title: "Google Meet",+ imageSrc: "https://cdn.iconscout.com/icon/free/png-256/google-meet-2923654-2416657.png",+ variant: "conferencing",+ logo: "https://cdn.iconscout.com/icon/free/png-256/google-meet-2923654-2416657.png",+ publisher: "Cal.com",+ rating: 5,+ reviews: 69,+ trending: false,+ url: "https://cal.com/",+ verified: true,+ email: "[email protected]",+ locationType: LocationType.GoogleMeet,+ locationLabel: "Google Meet",+} as App;++export default metadata;diff --git a/packages/app-store/googlevideo/index.ts b/packages/app-store/googlevideo/index.tsindex a197886243e..c9470943e84 100644--- a/packages/app-store/googlevideo/index.ts+++ b/packages/app-store/googlevideo/index.ts@@ -1,30 +1,3 @@-import { validJson } from "@calcom/lib/jsonUtils";-import type { App } from "@calcom/types/App";--import { LocationType } from "../locations";-import _package from "./package.json";--export const metadata = {- name: "Google Meet",- description: _package.description,- installed: !!(process.env.GOOGLE_API_CREDENTIALS && validJson(process.env.GOOGLE_API_CREDENTIALS)),- slug: "google-meet",- category: "video",- type: "google_video",- title: "Google Meet",- imageSrc: "https://cdn.iconscout.com/icon/free/png-256/google-meet-2923654-2416657.png",- variant: "conferencing",- logo: "https://cdn.iconscout.com/icon/free/png-256/google-meet-2923654-2416657.png",- publisher: "Cal.com",- rating: 5,- reviews: 69,- trending: false,- url: "https://cal.com/",- verified: true,- email: "[email protected]",- locationType: LocationType.GoogleMeet,- locationLabel: "Google Meet",-} as App;-// export * as api from "./api";// export * as lib from "./lib";+export { metadata } from "./_metadata";diff --git a/packages/app-store/huddle01video/_metadata.ts b/packages/app-store/huddle01video/_metadata.tsnew file mode 100644index 00000000000..90ac8d8009f--- /dev/null+++ b/packages/app-store/huddle01video/_metadata.ts@@ -0,0 +1,31 @@+import { randomString } from "@calcom/lib/random";+import type { App } from "@calcom/types/App";++import { LocationType } from "../locations";+import _package from "./package.json";++export const metadata = {+ name: "Huddle01",+ description: _package.description,+ installed: true,+ type: "huddle01_video",+ imageSrc: "/api/app-store/huddle01video/icon.svg",+ variant: "conferencing",+ logo: "/api/app-store/huddle01video/icon.svg",+ publisher: "huddle01.com",+ url: "https://huddle01.com",+ verified: true,+ rating: 0, // TODO: placeholder for now, pull this from TrustPilot or G2+ reviews: 0, // TODO: placeholder for now, pull this from TrustPilot or G2+ category: "web3",+ slug: "huddle01_video",+ title: "Huddle01",+ trending: true,+ isGlobal: true,+ email: "[email protected]",+ locationType: LocationType.Huddle01,+ locationLabel: "Huddle01 Video",+ key: { apikey: randomString(12) },+} as App;++export default metadata;diff --git a/packages/app-store/huddle01video/index.ts b/packages/app-store/huddle01video/index.tsindex 281f47b8423..374ae5ab453 100644--- a/packages/app-store/huddle01video/index.ts+++ b/packages/app-store/huddle01video/index.ts@@ -1,31 +1,2 @@-import { randomString } from "@calcom/lib/random";-import type { App } from "@calcom/types/App";--import { LocationType } from "../locations";-import _package from "./package.json";--export const metadata = {- name: "Huddle01",- description: _package.description,- installed: true,- type: "huddle01_video",- imageSrc: "/api/app-store/huddle01video/icon.svg",- variant: "conferencing",- logo: "/api/app-store/huddle01video/icon.svg",- publisher: "huddle01.com",- url: "https://huddle01.com",- verified: true,- rating: 0, // TODO: placeholder for now, pull this from TrustPilot or G2- reviews: 0, // TODO: placeholder for now, pull this from TrustPilot or G2- category: "web3",- slug: "huddle01_video",- title: "Huddle01",- trending: true,- isGlobal: true,- email: "[email protected]",- locationType: LocationType.Huddle01,- locationLabel: "Huddle01 Video",- key: { apikey: randomString(12) },-} as App;-export * as lib from "./lib";+export { metadata } from "./_metadata";diff --git a/packages/app-store/jitsivideo/_metadata.ts b/packages/app-store/jitsivideo/_metadata.tsnew file mode 100644index 00000000000..d27a0563442--- /dev/null+++ b/packages/app-store/jitsivideo/_metadata.ts@@ -0,0 +1,29 @@+import type { App } from "@calcom/types/App";++import { LocationType } from "../locations";+import _package from "./package.json";++export const metadata = {+ name: "Jitsi Video",+ description: _package.description,+ installed: true,+ type: "jitsi_video",+ imageSrc: "/api/app-store/jitsivideo/icon.svg",+ variant: "conferencing",+ logo: "/api/app-store/jitsivideo/icon.svg",+ publisher: "Cal.com",+ url: "https://jitsi.org/",+ verified: true,+ rating: 0, // TODO: placeholder for now, pull this from TrustPilot or G2+ reviews: 0, // TODO: placeholder for now, pull this from TrustPilot or G2+ category: "video",+ slug: "jitsi_video",+ title: "Jitsi Meet",+ trending: true,+ isGlobal: true,+ email: "[email protected]",+ locationType: LocationType.Jitsi,+ locationLabel: "Jitsi Video",+} as App;++export default metadata;diff --git a/packages/app-store/jitsivideo/index.ts b/packages/app-store/jitsivideo/index.tsindex 7af5e09624e..374ae5ab453 100644--- a/packages/app-store/jitsivideo/index.ts+++ b/packages/app-store/jitsivideo/index.ts@@ -1,29 +1,2 @@-import type { App } from "@calcom/types/App";--import { LocationType } from "../locations";-import _package from "./package.json";--export const metadata = {- name: "Jitsi Video",- description: _package.description,- installed: true,- type: "jitsi_video",- imageSrc: "/api/app-store/jitsivideo/icon.svg",- variant: "conferencing",- logo: "/api/app-store/jitsivideo/icon.svg",- publisher: "Cal.com",- url: "https://jitsi.org/",- verified: true,- rating: 0, // TODO: placeholder for now, pull this from TrustPilot or G2- reviews: 0, // TODO: placeholder for now, pull this from TrustPilot or G2- category: "video",- slug: "jitsi_video",- title: "Jitsi Meet",- trending: true,- isGlobal: true,- email: "[email protected]",- locationType: LocationType.Jitsi,- locationLabel: "Jitsi Video",-} as App;-export * as lib from "./lib";+export { metadata } from "./_metadata";diff --git a/packages/app-store/metadata.ts b/packages/app-store/metadata.tsnew file mode 100644index 00000000000..7179eccfedf--- /dev/null+++ b/packages/app-store/metadata.ts@@ -0,0 +1,31 @@+import { metadata as applecalendar } from "./applecalendar/_metadata";+import { metadata as caldavcalendar } from "./caldavcalendar/_metadata";+import { metadata as dailyvideo } from "./dailyvideo/_metadata";+import { metadata as googlecalendar } from "./googlecalendar/_metadata";+import { metadata as googlevideo } from "./googlevideo/_metadata";+import { metadata as huddle01video } from "./huddle01video/_metadata";+import { metadata as jitsivideo } from "./jitsivideo/_metadata";+import { metadata as office365calendar } from "./office365calendar/_metadata";+import { metadata as office365video } from "./office365video/_metadata";+import { metadata as slackmessaging } from "./slackmessaging/_metadata";+import { metadata as stripepayment } from "./stripepayment/_metadata";+import { metadata as tandemvideo } from "./tandemvideo/_metadata";+import { metadata as zoomvideo } from "./zoomvideo/_metadata";++export const appStoreMetadata = {+ applecalendar,+ caldavcalendar,+ dailyvideo,+ googlecalendar,+ googlevideo,+ huddle01video,+ jitsivideo,+ office365calendar,+ office365video,+ slackmessaging,+ stripepayment,+ tandemvideo,+ zoomvideo,+};++export default appStoreMetadata;diff --git a/packages/app-store/office365calendar/_metadata.ts b/packages/app-store/office365calendar/_metadata.tsnew file mode 100644index 00000000000..aa44204d591--- /dev/null+++ b/packages/app-store/office365calendar/_metadata.ts@@ -0,0 +1,25 @@+import type { App } from "@calcom/types/App";++import _package from "./package.json";++export const metadata = {+ name: "Office 365 / Outlook.com Calendar",+ description: _package.description,+ installed: !!(process.env.MS_GRAPH_CLIENT_ID && process.env.MS_GRAPH_CLIENT_SECRET),+ type: "office365_calendar",+ title: "Office 365 / Outlook.com Calendar",+ imageSrc: "/api/app-store/office365calendar/icon.svg",+ variant: "calendar",+ category: "calendar",+ logo: "/api/app-store/office365calendar/icon.svg",+ publisher: "Cal.com",+ rating: 5,+ reviews: 69,+ slug: "office365-calendar",+ trending: false,+ url: "https://cal.com/",+ verified: true,+ email: "[email protected]",+} as App;++export default metadata;diff --git a/packages/app-store/office365calendar/index.ts b/packages/app-store/office365calendar/index.tsindex 32211051754..5373eb04efc 100644--- a/packages/app-store/office365calendar/index.ts+++ b/packages/app-store/office365calendar/index.ts@@ -1,26 +1,3 @@-import type { App } from "@calcom/types/App";--import _package from "./package.json";--export const metadata = {- name: "Office 365 / Outlook.com Calendar",- description: _package.description,- installed: !!(process.env.MS_GRAPH_CLIENT_ID && process.env.MS_GRAPH_CLIENT_SECRET),- type: "office365_calendar",- title: "Office 365 / Outlook.com Calendar",- imageSrc: "/api/app-store/office365calendar/icon.svg",- variant: "calendar",- category: "calendar",- logo: "/api/app-store/office365calendar/icon.svg",- publisher: "Cal.com",- rating: 5,- reviews: 69,- slug: "office365-calendar",- trending: false,- url: "https://cal.com/",- verified: true,- email: "[email protected]",-} as App;-export * as api from "./api";export * as lib from "./lib";+export { metadata } from "./_metadata";diff --git a/packages/app-store/office365video/_metadata.ts b/packages/app-store/office365video/_metadata.tsnew file mode 100644index 00000000000..dcc3d6937ec--- /dev/null+++ b/packages/app-store/office365video/_metadata.ts@@ -0,0 +1,28 @@+import type { App } from "@calcom/types/App";++import { LocationType } from "../locations";+import _package from "./package.json";++export const metadata = {+ name: "Microsoft 365/Teams",+ description: _package.description,+ installed: !!(process.env.MS_GRAPH_CLIENT_ID && process.env.MS_GRAPH_CLIENT_SECRET),+ type: "office365_video",+ imageSrc: "/api/app-store/office365video/icon.svg",+ variant: "conferencing",+ logo: "/api/app-store/office365video/icon.svg",+ publisher: "Cal.com",+ url: "https://www.microsoft.com/en-ca/microsoft-teams/group-chat-software",+ verified: true,+ rating: 4.3, // TODO: placeholder for now, pull this from TrustPilot or G2+ reviews: 69, // TODO: placeholder for now, pull this from TrustPilot or G2+ category: "video",+ slug: "msteams",+ title: "MS Teams",+ trending: true,+ email: "[email protected]",+ locationType: LocationType.Teams,+ locationLabel: "MS Teams",+} as App;++export default metadata;diff --git a/packages/app-store/office365video/index.ts b/packages/app-store/office365video/index.tsindex f35b6ec0eb0..5373eb04efc 100644--- a/packages/app-store/office365video/index.ts+++ b/packages/app-store/office365video/index.ts@@ -1,29 +1,3 @@-import type { App } from "@calcom/types/App";--import { LocationType } from "../locations";-import _package from "./package.json";--export const metadata = {- name: "Microsoft 365/Teams",- description: _package.description,- installed: !!(process.env.MS_GRAPH_CLIENT_ID && process.env.MS_GRAPH_CLIENT_SECRET),- type: "office365_video",- imageSrc: "/api/app-store/office365video/icon.svg",- variant: "conferencing",- logo: "/api/app-store/office365video/icon.svg",- publisher: "Cal.com",- url: "https://www.microsoft.com/en-ca/microsoft-teams/group-chat-software",- verified: true,- rating: 4.3, // TODO: placeholder for now, pull this from TrustPilot or G2- reviews: 69, // TODO: placeholder for now, pull this from TrustPilot or G2- category: "video",- slug: "msteams",- title: "MS Teams",- trending: true,- email: "[email protected]",- locationType: LocationType.Teams,- locationLabel: "MS Teams",-} as App;-export * as api from "./api";export * as lib from "./lib";+export { metadata } from "./_metadata";diff --git a/packages/app-store/slackmessaging/_metadata.ts b/packages/app-store/slackmessaging/_metadata.tsnew file mode 100644index 00000000000..e6df3304910--- /dev/null+++ b/packages/app-store/slackmessaging/_metadata.ts@@ -0,0 +1,29 @@+import type { App } from "@calcom/types/App";++import _package from "./package.json";++export const metadata = {+ name: "Slack App",+ description: _package.description,+ installed: !!(+ process.env.SLACK_CLIENT_ID &&+ process.env.SLACK_CLIENT_SECRET &&+ process.env.SLACK_SIGNING_SECRET+ ),+ category: "messaging",+ imageSrc: "/apps/slack.svg",+ logo: "/apps/slack.svg",+ publisher: "Cal.com",+ rating: 5,+ reviews: 69,+ slug: "slack",+ title: "Slack App",+ trending: true,+ type: "slack_messaging",+ url: "https://slack.com/",+ variant: "conferencing",+ verified: true,+ email: "[email protected]",+} as App;++export default metadata;diff --git a/packages/app-store/slackmessaging/index.ts b/packages/app-store/slackmessaging/index.tsindex 7823770056e..48b87553e1d 100644--- a/packages/app-store/slackmessaging/index.ts+++ b/packages/app-store/slackmessaging/index.ts@@ -1,29 +1,2 @@-import type { App } from "@calcom/types/App";--import _package from "./package.json";--export const metadata = {- name: "Slack App",- description: _package.description,- installed: !!(- process.env.SLACK_CLIENT_ID &&- process.env.SLACK_CLIENT_SECRET &&- process.env.SLACK_SIGNING_SECRET- ),- category: "messaging",- imageSrc: "/apps/slack.svg",- logo: "/apps/slack.svg",- publisher: "Cal.com",- rating: 5,- reviews: 69,- slug: "slack",- title: "Slack App",- trending: true,- type: "slack_messaging",- url: "https://slack.com/",- variant: "conferencing",- verified: true,- email: "[email protected]",-} as App;-export * as api from "./api";+export { default } from "./_metadata";diff --git a/packages/app-store/stripepayment/_metadata.ts b/packages/app-store/stripepayment/_metadata.tsnew file mode 100644index 00000000000..86ce6bc3238--- /dev/null+++ b/packages/app-store/stripepayment/_metadata.ts@@ -0,0 +1,30 @@+import type { App } from "@calcom/types/App";++import _package from "./package.json";++export const metadata = {+ name: "Stripe",+ description: _package.description,+ installed: !!(+ process.env.STRIPE_CLIENT_ID &&+ process.env.NEXT_PUBLIC_STRIPE_PUBLIC_KEY &&+ process.env.STRIPE_PRIVATE_KEY+ ),+ slug: "stripe",+ category: "payment",+ logo: "/api/app-store/stripepayment/icon.svg",+ rating: 4.6,+ trending: true,+ reviews: 69,+ imageSrc: "/api/app-store/stripepayment/icon.svg",+ publisher: "Cal.com",+ title: "Stripe",+ type: "stripe_payment",+ url: "https://cal.com/",+ docsUrl: "https://stripe.com/docs",+ variant: "payment",+ verified: true,+ email: "[email protected]",+} as App;++export default metadata;diff --git a/packages/app-store/stripepayment/index.ts b/packages/app-store/stripepayment/index.tsindex 3d675763a5b..5d372ceda32 100644--- a/packages/app-store/stripepayment/index.ts+++ b/packages/app-store/stripepayment/index.ts@@ -1,30 +1,2 @@-import type { App } from "@calcom/types/App";--import _package from "./package.json";--export const metadata = {- name: "Stripe",- description: _package.description,- installed: !!(- process.env.STRIPE_CLIENT_ID &&- process.env.NEXT_PUBLIC_STRIPE_PUBLIC_KEY &&- process.env.STRIPE_PRIVATE_KEY- ),- slug: "stripe",- category: "payment",- logo: "/api/app-store/stripepayment/icon.svg",- rating: 4.6,- trending: true,- reviews: 69,- imageSrc: "/api/app-store/stripepayment/icon.svg",- publisher: "Cal.com",- title: "Stripe",- type: "stripe_payment",- url: "https://cal.com/",- docsUrl: "https://stripe.com/docs",- variant: "payment",- verified: true,- email: "[email protected]",-} as App;-export * as api from "./api";+export { metadata } from "./_metadata";diff --git a/packages/app-store/tandemvideo/_metadata.ts b/packages/app-store/tandemvideo/_metadata.tsnew file mode 100644index 00000000000..6cb4d6d2da7--- /dev/null+++ b/packages/app-store/tandemvideo/_metadata.ts@@ -0,0 +1,29 @@+import type { App } from "@calcom/types/App";++import { LocationType } from "../locations";+import _package from "./package.json";++export const metadata = {+ name: "Tandem Video",+ description: _package.description,+ installed: !!(process.env.TANDEM_CLIENT_ID && process.env.TANDEM_CLIENT_SECRET),+ type: "tandem_video",+ title: "Tandem Video",+ imageSrc: "/api/app-store/tandemvideo/icon.svg",+ variant: "conferencing",+ slug: "tandem",+ category: "video",+ logo: "/api/app-store/tandemvideo/icon.svg",+ publisher: "",+ url: "",+ verified: true,+ trending: true,+ rating: 0,+ reviews: 0,+ isGlobal: false,+ email: "[email protected]",+ locationType: LocationType.Tandem,+ locationLabel: "Tandem Video",+} as App;++export default metadata;diff --git a/packages/app-store/tandemvideo/index.ts b/packages/app-store/tandemvideo/index.tsindex ca870fa8682..5373eb04efc 100644--- a/packages/app-store/tandemvideo/index.ts+++ b/packages/app-store/tandemvideo/index.ts@@ -1,30 +1,3 @@-import type { App } from "@calcom/types/App";--import { LocationType } from "../locations";-import _package from "./package.json";--export const metadata = {- name: "Tandem Video",- description: _package.description,- installed: !!(process.env.TANDEM_CLIENT_ID && process.env.TANDEM_CLIENT_SECRET),- type: "tandem_video",- title: "Tandem Video",- imageSrc: "/api/app-store/tandemvideo/icon.svg",- variant: "conferencing",- slug: "tandem",- category: "video",- logo: "/api/app-store/tandemvideo/icon.svg",- publisher: "",- url: "",- verified: true,- trending: true,- rating: 0,- reviews: 0,- isGlobal: false,- email: "[email protected]",- locationType: LocationType.Tandem,- locationLabel: "Tandem Video",-} as App;-export * as api from "./api";export * as lib from "./lib";+export { metadata } from "./_metadata";diff --git a/packages/app-store/utils.ts b/packages/app-store/utils.tsindex 923eac25d3e..c7c8b2987e1 100644--- a/packages/app-store/utils.ts+++ b/packages/app-store/utils.ts@@ -3,11 +3,13 @@ import { TFunction } from "next-i18next";import type { App } from "@calcom/types/App";-import appStore from ".";import { LocationType } from "./locations";+// If you import this file on any app it should produce circular dependency+// import appStore from "./index";+import { appStoreMetadata } from "./metadata";-const ALL_APPS_MAP = Object.keys(appStore).reduce((store, key) => {- store[key] = appStore[key as keyof typeof appStore].metadata;+const ALL_APPS_MAP = Object.keys(appStoreMetadata).reduce((store, key) => {+ store[key] = appStoreMetadata[key as keyof typeof appStoreMetadata];return store;}, {} as Record<string, App>);diff --git a/packages/app-store/zoomvideo/_metadata.ts b/packages/app-store/zoomvideo/_metadata.tsnew file mode 100644index 00000000000..90f4dd4d12e--- /dev/null+++ b/packages/app-store/zoomvideo/_metadata.ts@@ -0,0 +1,28 @@+import type { App } from "@calcom/types/App";++import { LocationType } from "../locations";+import _package from "./package.json";++export const metadata = {+ name: "Zoom Video",+ description: _package.description,+ installed: !!(process.env.ZOOM_CLIENT_ID && process.env.ZOOM_CLIENT_SECRET),+ type: "zoom_video",+ imageSrc: "/api/app-store/zoomvideo/icon.svg",+ variant: "conferencing",+ logo: "/api/app-store/zoomvideo/icon.svg",+ publisher: "Cal.com",+ url: "https://zoom.us/",+ verified: true,+ rating: 4.3, // TODO: placeholder for now, pull this from TrustPilot or G2+ reviews: 69, // TODO: placeholder for now, pull this from TrustPilot or G2+ category: "video",+ slug: "zoom",+ title: "Zoom Video",+ trending: true,+ email: "[email protected]",+ locationType: LocationType.Zoom,+ locationLabel: "Zoom Video",+} as App;++export default metadata;diff --git a/packages/app-store/zoomvideo/index.ts b/packages/app-store/zoomvideo/index.tsindex 7fcc9929da9..5373eb04efc 100644--- a/packages/app-store/zoomvideo/index.ts+++ b/packages/app-store/zoomvideo/index.ts@@ -1,29 +1,3 @@-import type { App } from "@calcom/types/App";--import { LocationType } from "../locations";-import _package from "./package.json";--export const metadata = {- name: "Zoom Video",- description: _package.description,- installed: !!(process.env.ZOOM_CLIENT_ID && process.env.ZOOM_CLIENT_SECRET),- type: "zoom_video",- imageSrc: "/api/app-store/zoomvideo/icon.svg",- variant: "conferencing",- logo: "/api/app-store/zoomvideo/icon.svg",- publisher: "Cal.com",- url: "https://zoom.us/",- verified: true,- rating: 4.3, // TODO: placeholder for now, pull this from TrustPilot or G2- reviews: 69, // TODO: placeholder for now, pull this from TrustPilot or G2- category: "video",- slug: "zoom",- title: "Zoom Video",- trending: true,- email: "[email protected]",- locationType: LocationType.Zoom,- locationLabel: "Zoom Video",-} as App;-export * as api from "./api";export * as lib from "./lib";+export { metadata } from "./_metadata";