Remove reviews/rating/trending/verified props (#8482)

This commit is contained in:
Hariom Balhara 2023-04-25 19:34:40 +05:30 committed by GitHub
parent e870312ebe
commit 25df264823
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 3 additions and 103 deletions

View File

@ -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,

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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",

View File

@ -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;

View File

@ -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;

View File

@ -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",

View File

@ -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;

View File

@ -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: {

View File

@ -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;

View File

@ -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: {

View File

@ -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: {

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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: {

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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: {

View File

@ -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<App, "key"> & {
}[];
};
export type AppMeta = Optional<App, "rating" | "trending" | "reviews" | "verified">;
export type AppMeta = App;

View File

@ -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: {