From 25df264823f69294ba06e065e2fcccfa4e7c4cba Mon Sep 17 00:00:00 2001 From: Hariom Balhara Date: Tue, 25 Apr 2023 19:34:40 +0530 Subject: [PATCH] Remove reviews/rating/trending/verified props (#8482) --- packages/app-store/_appRegistry.ts | 14 ++------------ packages/app-store/applecalendar/_metadata.ts | 4 ---- packages/app-store/caldavcalendar/_metadata.ts | 4 ---- packages/app-store/caldavcalendar/index.ts | 4 ---- packages/app-store/dailyvideo/_metadata.ts | 4 ---- .../app-store/exchange2013calendar/_metadata.ts | 4 ---- .../app-store/exchange2016calendar/_metadata.ts | 4 ---- packages/app-store/giphy/_metadata.ts | 4 ---- packages/app-store/googlecalendar/_metadata.ts | 4 ---- packages/app-store/googlevideo/_metadata.ts | 4 ---- packages/app-store/hubspot/_metadata.ts | 4 ---- packages/app-store/huddle01video/_metadata.ts | 4 ---- packages/app-store/jitsivideo/_metadata.ts | 4 ---- packages/app-store/larkcalendar/_metadata.ts | 4 ---- packages/app-store/office365calendar/_metadata.ts | 4 ---- packages/app-store/stripepayment/_metadata.ts | 4 ---- packages/app-store/tandemvideo/_metadata.ts | 4 ---- packages/app-store/vital/_metadata.ts | 4 ---- packages/app-store/wipemycalother/_metadata.ts | 4 ---- packages/app-store/zapier/_metadata.ts | 4 ---- packages/app-store/zoomvideo/_metadata.ts | 4 ---- packages/types/App.d.ts | 4 +--- packages/ui/components/apps/_storybookData.ts | 8 -------- 23 files changed, 3 insertions(+), 103 deletions(-) diff --git a/packages/app-store/_appRegistry.ts b/packages/app-store/_appRegistry.ts index a50eefdb87..7b76150770 100644 --- a/packages/app-store/_appRegistry.ts +++ b/packages/app-store/_appRegistry.ts @@ -32,13 +32,8 @@ export async function getAppRegistry() { /* This is now handled from the DB */ // if (!app.installed) return apps; - const { rating, reviews, trending, verified, ...remainingAppProps } = app; apps.push({ - rating: rating || 0, - reviews: reviews || 0, - trending: trending || true, - verified: verified || true, - ...remainingAppProps, + ...app, category: app.category || "other", installed: true /* All apps from DB are considered installed by default. @TODO: Add and filter our by `enabled` property */, @@ -98,13 +93,8 @@ export async function getAppRegistryWithCredentials(userId: number) { }); } - const { rating, reviews, trending, verified, ...remainingAppProps } = app; apps.push({ - rating: rating || 0, - reviews: reviews || 0, - trending: trending || true, - verified: verified || true, - ...remainingAppProps, + ...app, categories: dbapp.categories, credentials: dbapp.credentials, installed: true, diff --git a/packages/app-store/applecalendar/_metadata.ts b/packages/app-store/applecalendar/_metadata.ts index c186b7c72e..040610b547 100644 --- a/packages/app-store/applecalendar/_metadata.ts +++ b/packages/app-store/applecalendar/_metadata.ts @@ -14,12 +14,8 @@ export const metadata = { 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", dirName: "applecalendar", } as AppMeta; diff --git a/packages/app-store/caldavcalendar/_metadata.ts b/packages/app-store/caldavcalendar/_metadata.ts index ba13cf77e7..0f922c88c8 100644 --- a/packages/app-store/caldavcalendar/_metadata.ts +++ b/packages/app-store/caldavcalendar/_metadata.ts @@ -14,12 +14,8 @@ export const metadata = { categories: ["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: "ali@cal.com", } as AppMeta; diff --git a/packages/app-store/caldavcalendar/index.ts b/packages/app-store/caldavcalendar/index.ts index 4ef9330ee8..3ddb10e2a6 100644 --- a/packages/app-store/caldavcalendar/index.ts +++ b/packages/app-store/caldavcalendar/index.ts @@ -14,12 +14,8 @@ export const metadata = { categories: ["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", dirName: "caldavcalendar", } as App; diff --git a/packages/app-store/dailyvideo/_metadata.ts b/packages/app-store/dailyvideo/_metadata.ts index c38f39921a..19a90acf29 100644 --- a/packages/app-store/dailyvideo/_metadata.ts +++ b/packages/app-store/dailyvideo/_metadata.ts @@ -11,12 +11,8 @@ export const metadata = { variant: "conferencing", url: "https://daily.co", categories: ["video"], - 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: "daily-video", title: "Cal Video", diff --git a/packages/app-store/exchange2013calendar/_metadata.ts b/packages/app-store/exchange2013calendar/_metadata.ts index 10a8a98daa..9ed4a3e108 100644 --- a/packages/app-store/exchange2013calendar/_metadata.ts +++ b/packages/app-store/exchange2013calendar/_metadata.ts @@ -15,12 +15,8 @@ export const metadata = { label: "Exchange Calendar", logo: "/api/app-store/exchange2013calendar/icon.svg", publisher: "Cal.com", - rating: 5, - reviews: 69, slug: "exchange2013-calendar", - trending: false, url: "https://cal.com/", - verified: true, email: "help@cal.com", dirName: "exchange2013calendar", } as AppMeta; diff --git a/packages/app-store/exchange2016calendar/_metadata.ts b/packages/app-store/exchange2016calendar/_metadata.ts index 59126acde6..a0e50eeba5 100644 --- a/packages/app-store/exchange2016calendar/_metadata.ts +++ b/packages/app-store/exchange2016calendar/_metadata.ts @@ -15,12 +15,8 @@ export const metadata = { label: "Exchange Calendar", logo: "/api/app-store/exchange2016calendar/icon.svg", publisher: "Cal.com", - rating: 5, - reviews: 69, slug: "exchange2016-calendar", - trending: false, url: "https://cal.com/", - verified: true, email: "help@cal.com", dirName: "exchange2016calendar", } as AppMeta; diff --git a/packages/app-store/giphy/_metadata.ts b/packages/app-store/giphy/_metadata.ts index fa6dc9d01b..ff99e7e1ad 100644 --- a/packages/app-store/giphy/_metadata.ts +++ b/packages/app-store/giphy/_metadata.ts @@ -11,15 +11,11 @@ export const metadata = { imageSrc: "/api/app-store/giphy/icon.svg", logo: "/api/app-store/giphy/icon.svg", publisher: "Cal.com", - rating: 0, - reviews: 0, slug: "giphy", title: "Giphy", - trending: true, type: "giphy_other", url: "https://cal.com/apps/giphy", variant: "other", - verified: true, extendsFeature: "EventType", email: "help@cal.com", dirName: "giphy", diff --git a/packages/app-store/googlecalendar/_metadata.ts b/packages/app-store/googlecalendar/_metadata.ts index 3a36107423..d17a4fc05f 100644 --- a/packages/app-store/googlecalendar/_metadata.ts +++ b/packages/app-store/googlecalendar/_metadata.ts @@ -14,12 +14,8 @@ export const metadata = { categories: ["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", dirName: "googlecalendar", } as AppMeta; diff --git a/packages/app-store/googlevideo/_metadata.ts b/packages/app-store/googlevideo/_metadata.ts index affd302965..4e5d68232c 100644 --- a/packages/app-store/googlevideo/_metadata.ts +++ b/packages/app-store/googlevideo/_metadata.ts @@ -16,11 +16,7 @@ export const metadata = { variant: "conferencing", logo: "/api/app-store/googlevideo/logo.webp", publisher: "Cal.com", - rating: 5, - reviews: 69, - trending: false, url: "https://cal.com/", - verified: true, isGlobal: false, email: "help@cal.com", appData: { diff --git a/packages/app-store/hubspot/_metadata.ts b/packages/app-store/hubspot/_metadata.ts index 013bade0aa..5989134667 100644 --- a/packages/app-store/hubspot/_metadata.ts +++ b/packages/app-store/hubspot/_metadata.ts @@ -12,14 +12,10 @@ export const metadata = { logo: "/api/app-store/hubspot/icon.svg", publisher: "Cal.com", url: "https://hubspot.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 categories: ["other"], label: "HubSpot CRM", slug: "hubspot", title: "HubSpot CRM", - trending: true, email: "help@cal.com", dirName: "hubspot", } as AppMeta; diff --git a/packages/app-store/huddle01video/_metadata.ts b/packages/app-store/huddle01video/_metadata.ts index c5b4b4002d..59a1530fc5 100644 --- a/packages/app-store/huddle01video/_metadata.ts +++ b/packages/app-store/huddle01video/_metadata.ts @@ -14,13 +14,9 @@ export const metadata = { 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", title: "Huddle01", - trending: true, isGlobal: false, email: "support@huddle01.com", appData: { diff --git a/packages/app-store/jitsivideo/_metadata.ts b/packages/app-store/jitsivideo/_metadata.ts index dd26e2eb82..a47c0add14 100644 --- a/packages/app-store/jitsivideo/_metadata.ts +++ b/packages/app-store/jitsivideo/_metadata.ts @@ -13,12 +13,8 @@ export const metadata = { 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 slug: "jitsi", title: "Jitsi Meet", - trending: true, isGlobal: false, email: "help@cal.com", appData: { diff --git a/packages/app-store/larkcalendar/_metadata.ts b/packages/app-store/larkcalendar/_metadata.ts index 7e9781a2e0..3f4ee077ed 100644 --- a/packages/app-store/larkcalendar/_metadata.ts +++ b/packages/app-store/larkcalendar/_metadata.ts @@ -13,12 +13,8 @@ export const metadata = { categories: ["calendar"], logo: "/api/app-store/larkcalendar/icon.svg", publisher: "Lark", - rating: 5, - reviews: 69, slug: "lark-calendar", - trending: false, url: "https://larksuite.com/", - verified: true, email: "alan@larksuite.com", dirName: "larkcalendar", } as AppMeta; diff --git a/packages/app-store/office365calendar/_metadata.ts b/packages/app-store/office365calendar/_metadata.ts index 4c6dcb92ca..9ef8774e3d 100644 --- a/packages/app-store/office365calendar/_metadata.ts +++ b/packages/app-store/office365calendar/_metadata.ts @@ -13,12 +13,8 @@ export const metadata = { categories: ["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 AppMeta; diff --git a/packages/app-store/stripepayment/_metadata.ts b/packages/app-store/stripepayment/_metadata.ts index f3992d3406..56b63a5ecf 100644 --- a/packages/app-store/stripepayment/_metadata.ts +++ b/packages/app-store/stripepayment/_metadata.ts @@ -14,9 +14,6 @@ export const metadata = { category: "payment", categories: ["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", @@ -25,7 +22,6 @@ export const metadata = { docsUrl: "https://stripe.com/docs", variant: "payment", extendsFeature: "EventType", - verified: true, email: "help@cal.com", dirName: "stripepayment", } as AppMeta; diff --git a/packages/app-store/tandemvideo/_metadata.ts b/packages/app-store/tandemvideo/_metadata.ts index c99041dc16..42d484b3a9 100644 --- a/packages/app-store/tandemvideo/_metadata.ts +++ b/packages/app-store/tandemvideo/_metadata.ts @@ -15,10 +15,6 @@ export const metadata = { logo: "/api/app-store/tandemvideo/icon.svg", publisher: "", url: "", - verified: true, - trending: true, - rating: 0, - reviews: 0, isGlobal: false, email: "help@cal.com", appData: { diff --git a/packages/app-store/vital/_metadata.ts b/packages/app-store/vital/_metadata.ts index 0860dedd78..dbbec335d3 100644 --- a/packages/app-store/vital/_metadata.ts +++ b/packages/app-store/vital/_metadata.ts @@ -13,15 +13,11 @@ export const metadata = { logo: "/api/app-store/vital/icon.svg", label: "Vital", publisher: "Vital", - rating: 5, - reviews: 69, slug: "vital-automation", title: "Vital", - trending: true, type: "vital_other", url: "https://tryvital.io", variant: "other", - verified: true, email: "support@tryvital.io", dirName: "vital", } as AppMeta; diff --git a/packages/app-store/wipemycalother/_metadata.ts b/packages/app-store/wipemycalother/_metadata.ts index dbc038883d..7b90892398 100644 --- a/packages/app-store/wipemycalother/_metadata.ts +++ b/packages/app-store/wipemycalother/_metadata.ts @@ -12,15 +12,11 @@ export const metadata = { imageSrc: "/api/app-store/wipemycalother/icon-dark.svg", logo: "/api/app-store/wipemycalother/icon-dark.svg", publisher: "Cal.com", - rating: 0, - reviews: 0, slug: "wipe-my-cal", title: "Wipe my cal", - trending: true, type: "wipemycal_other", url: "https://cal.com/apps/wipe-my-cal", variant: "other", - verified: true, email: "help@cal.com", dirName: "wipemycalother", } as AppMeta; diff --git a/packages/app-store/zapier/_metadata.ts b/packages/app-store/zapier/_metadata.ts index cddef338da..df2d6685ce 100644 --- a/packages/app-store/zapier/_metadata.ts +++ b/packages/app-store/zapier/_metadata.ts @@ -11,15 +11,11 @@ export const metadata = { imageSrc: "/api/app-store/zapier/icon.svg", logo: "/api/app-store/zapier/icon.svg", publisher: "Cal.com", - rating: 0, - reviews: 0, slug: "zapier", title: "Zapier", - trending: true, type: "zapier_automation", url: "https://cal.com/apps/zapier", variant: "automation", - verified: true, email: "help@cal.com", dirName: "zapier", } as AppMeta; diff --git a/packages/app-store/zoomvideo/_metadata.ts b/packages/app-store/zoomvideo/_metadata.ts index cf2232aad4..8819c88e67 100644 --- a/packages/app-store/zoomvideo/_metadata.ts +++ b/packages/app-store/zoomvideo/_metadata.ts @@ -13,13 +13,9 @@ export const metadata = { 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", appData: { location: { diff --git a/packages/types/App.d.ts b/packages/types/App.d.ts index de0862634c..c5f36726e4 100644 --- a/packages/types/App.d.ts +++ b/packages/types/App.d.ts @@ -2,8 +2,6 @@ import type { Prisma } from "@prisma/client"; import type { Tag } from "@calcom/app-store/types"; -import type { Optional } from "./utils"; - type CommonProperties = { default?: false; type: string; @@ -156,4 +154,4 @@ export type AppFrontendPayload = Omit & { }[]; }; -export type AppMeta = Optional; +export type AppMeta = App; diff --git a/packages/ui/components/apps/_storybookData.ts b/packages/ui/components/apps/_storybookData.ts index 8994519230..d0af1640db 100644 --- a/packages/ui/components/apps/_storybookData.ts +++ b/packages/ui/components/apps/_storybookData.ts @@ -13,12 +13,8 @@ export const _SBApps: App[] = [ categories: ["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", dirName: "googlecalendar", }, @@ -32,13 +28,9 @@ export const _SBApps: App[] = [ 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", appData: { location: {