WIP
This commit is contained in:
parent
e5164fc087
commit
505c517237
|
@ -1,5 +1,10 @@
|
||||||
|
import { Prisma } from "@prisma/client";
|
||||||
|
import _ from "lodash";
|
||||||
|
|
||||||
import type { App } from "@calcom/types/App";
|
import type { App } from "@calcom/types/App";
|
||||||
|
|
||||||
|
import { validJson } from "@lib/jsonUtils";
|
||||||
|
|
||||||
export const APPS = {
|
export const APPS = {
|
||||||
daily_video: {
|
daily_video: {
|
||||||
installed: !!process.env.DAILY_API_KEY,
|
installed: !!process.env.DAILY_API_KEY,
|
||||||
|
@ -20,4 +25,72 @@ export const APPS = {
|
||||||
rating: 0,
|
rating: 0,
|
||||||
reviews: 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>;
|
} 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",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
export { default as example } from "./example";
|
|
@ -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";
|
|
@ -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;
|
|
@ -0,0 +1 @@
|
||||||
|
export { default as VideoApiAdapter } from "./VideoApiAdapter";
|
|
@ -1,17 +1,14 @@
|
||||||
{
|
{
|
||||||
|
"$schema": "https://json.schemastore.org/package.json",
|
||||||
"private": true,
|
"private": true,
|
||||||
"name": "zoom",
|
"name": "@calcom/example-app",
|
||||||
"label": "Zoom",
|
"version": "0.0.0",
|
||||||
"⬇️ needs to be the same as the folder name": 1,
|
"main": "./index.ts",
|
||||||
"slug": "zoom",
|
"description": "This is a brief description for the Example App.",
|
||||||
"category": "Video Conferencing",
|
"dependencies": {
|
||||||
"description": "Zoom is the most popular video conferencing platform, joinable on the web or via desktop/mobile apps.",
|
"@calcom/prisma": "*"
|
||||||
"logo": "/apps/zoom.svg",
|
},
|
||||||
"publisher": "Cal.com",
|
"devDependencies": {
|
||||||
"url": "https://zoom.us/",
|
"@calcom/types": "*"
|
||||||
"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
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 |
|
@ -1,6 +1,8 @@
|
||||||
|
import * as example from "./_example";
|
||||||
import * as zoomvideo from "./zoomvideo";
|
import * as zoomvideo from "./zoomvideo";
|
||||||
|
|
||||||
const appStore = {
|
const appStore = {
|
||||||
|
example,
|
||||||
zoomvideo,
|
zoomvideo,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
"private": true,
|
||||||
"name": "@calcom/zoomvideo",
|
"name": "@calcom/zoomvideo",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"main": "./index.ts",
|
"main": "./index.ts",
|
||||||
|
@ -10,9 +11,7 @@
|
||||||
"publisher": "Cal.com",
|
"publisher": "Cal.com",
|
||||||
"url": "https://zoom.us/",
|
"url": "https://zoom.us/",
|
||||||
"verified": true,
|
"verified": true,
|
||||||
"⬇️ TODO: placeholder for now, pull this from TrustPilot or G2": 1,
|
|
||||||
"rating": 4.3,
|
"rating": 4.3,
|
||||||
"⬇️ TODO 2: placeholder for now, pull this from TrustPilot or G2": 1,
|
|
||||||
"reviews": 69,
|
"reviews": 69,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@calcom/prisma": "*"
|
"@calcom/prisma": "*"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user