diff --git a/packages/app-store/_appRegistry.ts b/packages/app-store/_appRegistry.ts index 97863158..41c6570f 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[]); diff --git a/packages/app-store/_example/_metadata.ts b/packages/app-store/_example/_metadata.ts new file mode 100644 index 00000000..3dfa91b5 --- /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: "help@cal.com", +} as App; + +export default metadata; diff --git a/packages/app-store/_example/index.ts b/packages/app-store/_example/index.ts index a0465e2b..5373eb04 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: "help@cal.com", -} 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.ts new file mode 100644 index 00000000..06cee34f --- /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: "help@cal.com", +} as App; + +export default metadata; diff --git a/packages/app-store/applecalendar/index.ts b/packages/app-store/applecalendar/index.ts index 1e686159..db3c2b10 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: "help@cal.com", -} 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.ts new file mode 100644 index 00000000..a9f4f77e --- /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: "help@cal.com", +} as App; + +export default metadata; diff --git a/packages/app-store/dailyvideo/_metadata.ts b/packages/app-store/dailyvideo/_metadata.ts new file mode 100644 index 00000000..b7785eac --- /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: "help@cal.com", + 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.ts index a326c1e9..374ae5ab 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: "help@cal.com", - 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.ts new file mode 100644 index 00000000..6d2aaf67 --- /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: "help@cal.com", + 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.ts index 115050ef..5373eb04 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: "help@cal.com", - 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.ts new file mode 100644 index 00000000..32889bc4 --- /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: "help@cal.com", + 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.ts index a1978862..c9470943 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: "help@cal.com", - 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.ts new file mode 100644 index 00000000..90ac8d80 --- /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: "support@huddle01.com", + 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.ts index 281f47b8..374ae5ab 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: "support@huddle01.com", - 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.ts new file mode 100644 index 00000000..d27a0563 --- /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: "help@cal.com", + 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.ts index 7af5e096..374ae5ab 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: "help@cal.com", - 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.ts new file mode 100644 index 00000000..7179eccf --- /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.ts new file mode 100644 index 00000000..aa44204d --- /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: "help@cal.com", +} as App; + +export default metadata; diff --git a/packages/app-store/office365calendar/index.ts b/packages/app-store/office365calendar/index.ts index 32211051..5373eb04 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: "help@cal.com", -} 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.ts new file mode 100644 index 00000000..dcc3d693 --- /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: "help@cal.com", + 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.ts index f35b6ec0..5373eb04 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: "help@cal.com", - 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.ts new file mode 100644 index 00000000..e6df3304 --- /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: "help@cal.com", +} as App; + +export default metadata; diff --git a/packages/app-store/slackmessaging/index.ts b/packages/app-store/slackmessaging/index.ts index 78237700..48b87553 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: "help@cal.com", -} 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.ts new file mode 100644 index 00000000..86ce6bc3 --- /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: "help@cal.com", +} as App; + +export default metadata; diff --git a/packages/app-store/stripepayment/index.ts b/packages/app-store/stripepayment/index.ts index 3d675763..5d372ced 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: "help@cal.com", -} 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.ts new file mode 100644 index 00000000..6cb4d6d2 --- /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: "help@cal.com", + 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.ts index ca870fa8..5373eb04 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: "help@cal.com", - 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.ts index 923eac25..c7c8b298 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); diff --git a/packages/app-store/zoomvideo/_metadata.ts b/packages/app-store/zoomvideo/_metadata.ts new file mode 100644 index 00000000..90f4dd4d --- /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: "help@cal.com", + 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.ts index 7fcc9929..5373eb04 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: "help@cal.com", - locationType: LocationType.Zoom, - locationLabel: "Zoom Video", -} as App; - export * as api from "./api"; export * as lib from "./lib"; +export { metadata } from "./_metadata";