Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add zod schemas for app metadata living in config.json #14952

Closed
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
21 changes: 21 additions & 0 deletions packages/app-store/alby/_metadata.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import type { AppMeta } from "@calcom/types/App";

export const metadata = {
"/*": "Don't modify slug - If required, do it using cli edit command",
name: "Alby",
slug: "alby",
type: "alby_payment",
logo: "icon.svg",
url: "https://getalby.com",
variant: "payment",
categories: ["payment"],
publisher: "Alby",
email: "support@getalby.com",
description:
"Your Bitcoin & Nostr companion for the web. Use Alby to charge Satoshi for your Cal.com meetings.\r",
extendsFeature: "EventType",
isTemplate: false,
__createdUsingCli: true,
__template: "event-type-app-card",
dirName: "alby",
} as AppMeta;
2 changes: 1 addition & 1 deletion packages/app-store/alby/api/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { NextApiRequest, NextApiResponse } from "next";

import prisma from "@calcom/prisma";

import config from "../config.json";
import { metadata as config } from "../_metadata";

export default async function handler(req: NextApiRequest, res: NextApiResponse) {
if (!req.session?.user?.id) {
Expand Down
18 changes: 0 additions & 18 deletions packages/app-store/alby/config.json

This file was deleted.

18 changes: 18 additions & 0 deletions packages/app-store/amie/_metadata.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import type { AppMeta } from "@calcom/types/App";

export const metadata = {
"/*": "Don't modify slug - If required, do it using cli edit command",
name: "Amie",
slug: "amie",
type: "amie_other",
logo: "icon.svg",
url: "https://cal.com",
variant: "other",
categories: ["calendar"],
publisher: "Cal.com, Inc.",
email: "support@cal.com",
description: "The joyful productivity app\r\r",
__createdUsingCli: true,
dependencies: ["google-calendar"],
dirName: "amie",
} as AppMeta;
2 changes: 1 addition & 1 deletion packages/app-store/amie/api/add.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { AppDeclarativeHandler } from "@calcom/types/AppHandler";

import { createDefaultInstallation } from "../../_utils/installation";
import appConfig from "../config.json";
import { metadata as appConfig } from "../_metadata";

const handler: AppDeclarativeHandler = {
appType: appConfig.type,
Expand Down
16 changes: 0 additions & 16 deletions packages/app-store/amie/config.json

This file was deleted.

252 changes: 126 additions & 126 deletions packages/app-store/apps.metadata.generated.ts

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions packages/app-store/around/_metadata.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import type { AppMeta } from "@calcom/types/App";

export const metadata = {
"/*": "Don't modify slug - If required, do it using cli edit command",
name: "Around",
title: "Around",
slug: "around",
type: "around_video",
logo: "icon.svg",
url: "https://cal.com/",
variant: "conferencing",
categories: ["conferencing"],
publisher: "Cal.com",
email: "help@cal.com",
description:
"Discover radically unique video calls designed to help hybrid-remote teams create, collaborate and celebrate together.",
__createdUsingCli: true,
appData: {
location: {
linkType: "static",
type: "integrations:around_video",
label: "Around Video",
urlRegExp: "^http(s)?:\\/\\/(www\\.)?around.co\\/[a-zA-Z0-9]*",
organizerInputPlaceholder: "https://www.around.co/rick",
},
},
} as AppMeta;
2 changes: 1 addition & 1 deletion packages/app-store/around/api/_getAdd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { defaultResponder } from "@calcom/lib/server";
import checkSession from "../../_utils/auth";
import getInstalledAppPath from "../../_utils/getInstalledAppPath";
import { checkInstalled, createDefaultInstallation } from "../../_utils/installation";
import appConfig from "../config.json";
import { metadata as appConfig } from "../_metadata";

export async function getHandler(req: NextApiRequest) {
const session = checkSession(req);
Expand Down
24 changes: 0 additions & 24 deletions packages/app-store/around/config.json

This file was deleted.

20 changes: 20 additions & 0 deletions packages/app-store/basecamp3/_metadata.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { AppMeta } from "@calcom/types/App";

export const metadata = {
name: "Basecamp3",
slug: "basecamp3",
type: "basecamp3_other_calendar",
logo: "icon-dark.svg",
url: "https://basecamp.com/",
variant: "other",
categories: ["other"],
publisher: "Jonathan D'mello",
email: "support@cal.com",
description:
"Basecamp puts everything you need to get work done in one place. It’s the calm, organized way to manage projects, work with clients, and communicate company-wide.",
extendsFeature: "EventType",
isTemplate: false,
__createdUsingCli: true,
__template: "event-type-app-card",
dirName: "basecamp3",
} as AppMeta;
2 changes: 1 addition & 1 deletion packages/app-store/basecamp3/api/callback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import prisma from "@calcom/prisma";

import getAppKeysFromSlug from "../../_utils/getAppKeysFromSlug";
import getInstalledAppPath from "../../_utils/getInstalledAppPath";
import appConfig from "../config.json";
import { metadata as appConfig } from "../_metadata";

export default async function handler(req: NextApiRequest, res: NextApiResponse) {
const { code } = req.query;
Expand Down
17 changes: 0 additions & 17 deletions packages/app-store/basecamp3/config.json

This file was deleted.

120 changes: 60 additions & 60 deletions packages/app-store/bookerApps.metadata.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,78 +2,78 @@
This file is autogenerated using the command `yarn app-store:build --watch`.
Don't modify this file manually.
**/
import around_config_json from "./around/config.json";
import campfire_config_json from "./campfire/config.json";
import { metadata as around__metadata_ts } from "./around/_metadata";
import { metadata as campfire__metadata_ts } from "./campfire/_metadata";
import { metadata as dailyvideo__metadata_ts } from "./dailyvideo/_metadata";
import demodesk_config_json from "./demodesk/config.json";
import discord_config_json from "./discord/config.json";
import eightxeight_config_json from "./eightxeight/config.json";
import element_call_config_json from "./element-call/config.json";
import facetime_config_json from "./facetime/config.json";
import fathom_config_json from "./fathom/config.json";
import ga4_config_json from "./ga4/config.json";
import { metadata as demodesk__metadata_ts } from "./demodesk/_metadata";
import { metadata as discord__metadata_ts } from "./discord/_metadata";
import { metadata as eightxeight__metadata_ts } from "./eightxeight/_metadata";
import { metadata as element_call__metadata_ts } from "./element-call/_metadata";
import { metadata as facetime__metadata_ts } from "./facetime/_metadata";
import { metadata as fathom__metadata_ts } from "./fathom/_metadata";
import { metadata as ga4__metadata_ts } from "./ga4/_metadata";
import { metadata as googlevideo__metadata_ts } from "./googlevideo/_metadata";
import gtm_config_json from "./gtm/config.json";
import { metadata as gtm__metadata_ts } from "./gtm/_metadata";
import { metadata as huddle01video__metadata_ts } from "./huddle01video/_metadata";
import jelly_config_json from "./jelly/config.json";
import { metadata as jelly__metadata_ts } from "./jelly/_metadata";
import { metadata as jitsivideo__metadata_ts } from "./jitsivideo/_metadata";
import matomo_config_json from "./matomo/config.json";
import metapixel_config_json from "./metapixel/config.json";
import mirotalk_config_json from "./mirotalk/config.json";
import office365video_config_json from "./office365video/config.json";
import ping_config_json from "./ping/config.json";
import plausible_config_json from "./plausible/config.json";
import riverside_config_json from "./riverside/config.json";
import roam_config_json from "./roam/config.json";
import salesroom_config_json from "./salesroom/config.json";
import shimmervideo_config_json from "./shimmervideo/config.json";
import signal_config_json from "./signal/config.json";
import sirius_video_config_json from "./sirius_video/config.json";
import sylapsvideo_config_json from "./sylapsvideo/config.json";
import { metadata as matomo__metadata_ts } from "./matomo/_metadata";
import { metadata as metapixel__metadata_ts } from "./metapixel/_metadata";
import { metadata as mirotalk__metadata_ts } from "./mirotalk/_metadata";
import { metadata as office365video__metadata_ts } from "./office365video/_metadata";
import { metadata as ping__metadata_ts } from "./ping/_metadata";
import { metadata as plausible__metadata_ts } from "./plausible/_metadata";
import { metadata as riverside__metadata_ts } from "./riverside/_metadata";
import { metadata as roam__metadata_ts } from "./roam/_metadata";
import { metadata as salesroom__metadata_ts } from "./salesroom/_metadata";
import { metadata as shimmervideo__metadata_ts } from "./shimmervideo/_metadata";
import { metadata as signal__metadata_ts } from "./signal/_metadata";
import { metadata as sirius_video__metadata_ts } from "./sirius_video/_metadata";
import { metadata as sylapsvideo__metadata_ts } from "./sylapsvideo/_metadata";
import { metadata as tandemvideo__metadata_ts } from "./tandemvideo/_metadata";
import telegram_config_json from "./telegram/config.json";
import booking_pages_tag_config_json from "./templates/booking-pages-tag/config.json";
import event_type_location_video_static_config_json from "./templates/event-type-location-video-static/config.json";
import webex_config_json from "./webex/config.json";
import whatsapp_config_json from "./whatsapp/config.json";
import whereby_config_json from "./whereby/config.json";
import { metadata as telegram__metadata_ts } from "./telegram/_metadata";
import { metadata as booking_pages_tag__metadata_ts } from "./templates/booking-pages-tag/_metadata";
import { metadata as event_type_location_video_static__metadata_ts } from "./templates/event-type-location-video-static/_metadata";
import { metadata as webex__metadata_ts } from "./webex/_metadata";
import { metadata as whatsapp__metadata_ts } from "./whatsapp/_metadata";
import { metadata as whereby__metadata_ts } from "./whereby/_metadata";
import { metadata as zoomvideo__metadata_ts } from "./zoomvideo/_metadata";

export const appStoreMetadata = {
around: around_config_json,
campfire: campfire_config_json,
around: around__metadata_ts,
campfire: campfire__metadata_ts,
dailyvideo: dailyvideo__metadata_ts,
demodesk: demodesk_config_json,
discord: discord_config_json,
eightxeight: eightxeight_config_json,
"element-call": element_call_config_json,
facetime: facetime_config_json,
fathom: fathom_config_json,
ga4: ga4_config_json,
demodesk: demodesk__metadata_ts,
discord: discord__metadata_ts,
eightxeight: eightxeight__metadata_ts,
"element-call": element_call__metadata_ts,
facetime: facetime__metadata_ts,
fathom: fathom__metadata_ts,
ga4: ga4__metadata_ts,
googlevideo: googlevideo__metadata_ts,
gtm: gtm_config_json,
gtm: gtm__metadata_ts,
huddle01video: huddle01video__metadata_ts,
jelly: jelly_config_json,
jelly: jelly__metadata_ts,
jitsivideo: jitsivideo__metadata_ts,
matomo: matomo_config_json,
metapixel: metapixel_config_json,
mirotalk: mirotalk_config_json,
office365video: office365video_config_json,
ping: ping_config_json,
plausible: plausible_config_json,
riverside: riverside_config_json,
roam: roam_config_json,
salesroom: salesroom_config_json,
shimmervideo: shimmervideo_config_json,
signal: signal_config_json,
sirius_video: sirius_video_config_json,
sylapsvideo: sylapsvideo_config_json,
matomo: matomo__metadata_ts,
metapixel: metapixel__metadata_ts,
mirotalk: mirotalk__metadata_ts,
office365video: office365video__metadata_ts,
ping: ping__metadata_ts,
plausible: plausible__metadata_ts,
riverside: riverside__metadata_ts,
roam: roam__metadata_ts,
salesroom: salesroom__metadata_ts,
shimmervideo: shimmervideo__metadata_ts,
signal: signal__metadata_ts,
sirius_video: sirius_video__metadata_ts,
sylapsvideo: sylapsvideo__metadata_ts,
tandemvideo: tandemvideo__metadata_ts,
telegram: telegram_config_json,
"booking-pages-tag": booking_pages_tag_config_json,
"event-type-location-video-static": event_type_location_video_static_config_json,
webex: webex_config_json,
whatsapp: whatsapp_config_json,
whereby: whereby_config_json,
telegram: telegram__metadata_ts,
"booking-pages-tag": booking_pages_tag__metadata_ts,
"event-type-location-video-static": event_type_location_video_static__metadata_ts,
webex: webex__metadata_ts,
whatsapp: whatsapp__metadata_ts,
whereby: whereby__metadata_ts,
zoomvideo: zoomvideo__metadata_ts,
};
25 changes: 25 additions & 0 deletions packages/app-store/cal-ai/_metadata.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import type { AppMeta } from "@calcom/types/App";

export const metadata = {
"/*": "Don't modify slug - If required, do it using cli edit command",
name: "Cal.ai",
slug: "cal-ai",
type: "cal-ai_automation",
logo: "icon.png",
url: "https://cal.ai",
variant: "automation",
categories: ["automation"],
publisher: "Cal.com, Inc.",
email: "support@cal.com",
description:
"Cal.ai is your AI scheduling assistant. Get your personal email assistant (username@cal.ai) that you can forward emails to or have a conversation with. Cal.ai will automatically schedule meetings for you.",
isTemplate: false,
__createdUsingCli: true,
__template: "basic",
dirName: "cal-ai",
paid: {
priceInUsd: 8,
priceId: "price_1O1ziDH8UDiwIftkDHp3MCTP",
mode: "subscription",
},
} as AppMeta;
6 changes: 3 additions & 3 deletions packages/app-store/cal-ai/api/_getAdd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ import { defaultResponder } from "@calcom/lib/server";

import checkSession from "../../_utils/auth";
import { withPaidAppRedirect } from "../../_utils/paid-apps";
import appConfig from "../config.json";
import { metadata as appConfig } from "../_metadata";

export async function getHandler(req: NextApiRequest, res: NextApiResponse) {
const session = checkSession(req);

const redirectUrl = await withPaidAppRedirect({
appPaidMode: appConfig.paid.mode,
appPaidMode: appConfig?.paid?.mode ?? "",
appSlug: appConfig.slug,
userId: session.user.id,
priceId: appConfig.paid.priceId,
priceId: appConfig?.paid?.priceId ?? "",
});

if (!redirectUrl) {
Expand Down
2 changes: 1 addition & 1 deletion packages/app-store/cal-ai/api/_getCallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import checkSession from "../../_utils/auth";
import getInstalledAppPath from "../../_utils/getInstalledAppPath";
import { checkInstalled, createDefaultInstallation } from "../../_utils/installation";
import { withStripeCallback } from "../../_utils/paid-apps";
import appConfig from "../config.json";
import { metadata as appConfig } from "../_metadata";

export async function getHandler(req: NextApiRequest, res: NextApiResponse) {
const session = checkSession(req);
Expand Down
Loading
Loading