pull/2022/head
zomars 2022-02-22 13:05:50 -07:00
parent e5164fc087
commit 505c517237
10 changed files with 167 additions and 16 deletions

View File

@ -1,5 +1,10 @@
import { Prisma } from "@prisma/client";
import _ from "lodash";
import type { App } from "@calcom/types/App";
import { validJson } from "@lib/jsonUtils";
export const APPS = {
daily_video: {
installed: !!process.env.DAILY_API_KEY,
@ -20,4 +25,72 @@ export const APPS = {
rating: 0,
reviews: 0,
},
jitsi_video: {
installed: true,
type: "jitsi_video",
title: "Jitsi Meet",
imageSrc: "integrations/jitsi.svg",
description: "Video Conferencing",
variant: "conferencing",
name: "Daily",
label: "",
slug: "",
category: "",
logo: "",
publisher: "",
url: "",
verified: true,
trending: true,
rating: 0,
reviews: 0,
},
huddle01_video: {
installed: true,
type: "huddle01_video",
title: "Huddle01",
imageSrc: "integrations/huddle.svg",
description: "Video Conferencing",
variant: "conferencing",
name: "Daily",
label: "",
slug: "",
category: "",
logo: "",
publisher: "",
url: "",
verified: true,
trending: true,
rating: 0,
reviews: 0,
},
tandem_video: {
installed: !!(process.env.TANDEM_CLIENT_ID && process.env.TANDEM_CLIENT_SECRET),
type: "tandem_video",
title: "Tandem Video",
imageSrc: "integrations/tandem.svg",
description: "Virtual Office | Video Conferencing",
variant: "conferencing",
name: "Daily",
label: "",
slug: "",
category: "",
logo: "",
publisher: "",
url: "",
verified: true,
trending: true,
rating: 0,
reviews: 0,
},
} as Record<string, App>;
export const ALL_INTEGRATIONS = [
{
installed: true,
type: "metamask_web3",
title: "Metamask",
imageSrc: "integrations/apple-calendar.svg",
description: "For personal and business calendars",
variant: "web3",
},
];

View File

@ -0,0 +1,10 @@
import type { NextApiRequest, NextApiResponse } from "next";
/**
* This is an example endoint for an app, these will run under `/api/integrations/[...args]`
* @param req
* @param res
*/
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
res.status(200);
}

View File

@ -0,0 +1 @@
export { default as example } from "./example";

View File

@ -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",
imageSrc: "/cal-com-icon.svg",
label: "Example App",
logo: "/cal-com-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,
} as App;
export * as api from "./api";
export * as lib from "./lib";

View File

@ -0,0 +1,36 @@
import type { VideoApiAdapterFactory } from "@calcom/types/VideoApiAdapter";
/** This is a barebones factory function for a video integration */
const ExampleVideoApiAdapter: VideoApiAdapterFactory = (credential) => {
return {
getAvailability: async () => {
try {
return [];
} catch (err) {
console.error(err);
return [];
}
},
createMeeting: async (event) => {
return Promise.resolve({
type: "example_video",
id: "",
password: "",
url: "",
});
},
deleteMeeting: async (uid) => {
return Promise.resolve();
},
updateMeeting: async (bookingRef, event) => {
return Promise.resolve({
type: "example_video",
id: bookingRef.meetingId as string,
password: bookingRef.meetingPassword as string,
url: bookingRef.meetingUrl as string,
});
},
};
};
export default ExampleVideoApiAdapter;

View File

@ -0,0 +1 @@
export { default as VideoApiAdapter } from "./VideoApiAdapter";

View File

@ -1,17 +1,14 @@
{
"$schema": "https://json.schemastore.org/package.json",
"private": true,
"name": "zoom",
"label": "Zoom",
"⬇️ needs to be the same as the folder name": 1,
"slug": "zoom",
"category": "Video Conferencing",
"description": "Zoom is the most popular video conferencing platform, joinable on the web or via desktop/mobile apps.",
"logo": "/apps/zoom.svg",
"publisher": "Cal.com",
"url": "https://zoom.us/",
"verified": true,
"⬇️ TODO: placeholder for now, pull this from TrustPilot or G2": 1,
"rating": 4.3,
"⬇️ TODO 2: placeholder for now, pull this from TrustPilot or G2": 1,
"reviews": 69
"name": "@calcom/example-app",
"version": "0.0.0",
"main": "./index.ts",
"description": "This is a brief description for the Example App.",
"dependencies": {
"@calcom/prisma": "*"
},
"devDependencies": {
"@calcom/types": "*"
}
}

View File

@ -0,0 +1,6 @@
<svg width="56" height="56" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="56" height="56" rx="12" fill="#292929" />
<path
d="M18.628 36.781c2.846 0 4.946-1.096 6.183-2.59l-2.38-2.03c-.957 1.05-2.147 1.587-3.733 1.587-3.22 0-5.204-2.427-5.204-5.413 0-2.987 1.984-5.46 5.134-5.46 1.47 0 2.683.513 3.663 1.54l2.31-2.007c-1.47-1.75-3.313-2.567-5.973-2.567-5.04 0-8.517 3.803-8.517 8.493 0 4.667 3.663 8.447 8.517 8.447ZM31.69 36.781c2.17 0 3.267-.91 3.92-2.286v1.983h3.057V24.344H35.54v1.914c-.653-1.307-1.75-2.17-3.85-2.17-3.337 0-5.997 2.87-5.997 6.37s2.66 6.323 5.997 6.323Zm-2.847-6.346c0-1.89 1.354-3.5 3.36-3.5 2.077 0 3.407 1.633 3.407 3.523 0 1.89-1.33 3.477-3.407 3.477-2.006 0-3.36-1.657-3.36-3.5ZM41.472 36.478h3.15V19.444h-3.15v17.034Z"
fill="#fff" />
</svg>

After

Width:  |  Height:  |  Size: 806 B

View File

@ -1,6 +1,8 @@
import * as example from "./_example";
import * as zoomvideo from "./zoomvideo";
const appStore = {
example,
zoomvideo,
};

View File

@ -1,4 +1,5 @@
{
"private": true,
"name": "@calcom/zoomvideo",
"version": "0.0.0",
"main": "./index.ts",
@ -10,9 +11,7 @@
"publisher": "Cal.com",
"url": "https://zoom.us/",
"verified": true,
"⬇️ TODO: placeholder for now, pull this from TrustPilot or G2": 1,
"rating": 4.3,
"⬇️ TODO 2: placeholder for now, pull this from TrustPilot or G2": 1,
"reviews": 69,
"dependencies": {
"@calcom/prisma": "*"