telegram app (#5643)

* telegram MVP

* Fix app store seed config json

Co-authored-by: Alan <alannnc@gmail.com>
This commit is contained in:
Peer Richelsen
2022-11-23 03:15:23 +00:00
committed by GitHub
co-authored by Alan
parent e04d81cf11
commit 22a030afab
15 changed files with 88 additions and 0 deletions
@@ -36,6 +36,7 @@ import { metadata as signal_meta } from "./signal/_metadata";
import { metadata as sirius_video_meta } from "./sirius_video/_metadata";
import { metadata as stripepayment_meta } from "./stripepayment/_metadata";
import { metadata as tandemvideo_meta } from "./tandemvideo/_metadata";
import { metadata as telegram_meta } from "./telegram/_metadata";
import { metadata as typeform_meta } from "./typeform/_metadata";
import { metadata as vital_meta } from "./vital/_metadata";
import { metadata as weather_in_your_calendar_meta } from "./weather_in_your_calendar/_metadata";
@@ -80,6 +81,7 @@ export const appStoreMetadata = {
sirius_video: sirius_video_meta,
stripepayment: stripepayment_meta,
tandemvideo: tandemvideo_meta,
telegram: telegram_meta,
typeform: typeform_meta,
vital: vital_meta,
weather_in_your_calendar: weather_in_your_calendar_meta,
@@ -35,6 +35,7 @@ export const apiHandlers = {
sirius_video: import("./sirius_video/api"),
stripepayment: import("./stripepayment/api"),
tandemvideo: import("./tandemvideo/api"),
telegram: import("./telegram/api"),
typeform: import("./typeform/api"),
vital: import("./vital/api"),
weather_in_your_calendar: import("./weather_in_your_calendar/api"),
+8
View File
@@ -0,0 +1,8 @@
---
items:
- /api/app-store/telegram/1.jpg
- /api/app-store/telegram/2.jpg
- /api/app-store/telegram/3.jpg
---
Schedule a chat with your guests or have a Telegram Video call.
+10
View File
@@ -0,0 +1,10 @@
import type { AppMeta } from "@calcom/types/App";
import config from "./config.json";
export const metadata = {
category: "other",
...config,
} as AppMeta;
export default metadata;
+17
View File
@@ -0,0 +1,17 @@
import { AppDeclarativeHandler } from "@calcom/types/AppHandler";
import { createDefaultInstallation } from "../../_utils/installation";
import appConfig from "../config.json";
const handler: AppDeclarativeHandler = {
// Instead of passing appType and slug from here, api/integrations/[..args] should be able to derive and pass these directly to createCredential
appType: appConfig.type,
variant: appConfig.variant,
slug: appConfig.slug,
supportsMultipleInstalls: false,
handlerType: "add",
createCredential: ({ appType, user, slug }) =>
createDefaultInstallation({ appType, userId: user.id, slug, key: {} }),
};
export default handler;
+1
View File
@@ -0,0 +1 @@
export { default as add } from "./add";
+25
View File
@@ -0,0 +1,25 @@
{
"/*": "Don't modify slug - If required, do it using cli edit command",
"name": "Telegram",
"slug": "telegram",
"type": "telegram_video",
"imageSrc": "/api/app-store/telegram/icon.svg",
"logo": "/api/app-store/telegram/icon.svg",
"url": "https://cal.com/apps/telegram",
"variant": "conferencing",
"categories": ["video"],
"publisher": "Cal.com, Inc.",
"email": "support@cal.com",
"description": "Schedule a chat with your guests or have a Telegram Video call.",
"extendsFeature": "User",
"__createdUsingCli": true,
"appData": {
"location": {
"type": "integrations:telegram_video",
"label": "Telegram",
"linkType": "static",
"organizerInputPlaceholder": "https://t.me/MyUsername",
"urlRegExp": "^http(s)?:\\/\\/(www\\.)?t.me\\/[a-zA-Z0-9]*"
}
}
}
+2
View File
@@ -0,0 +1,2 @@
export * as api from "./api";
export { metadata } from "./_metadata";
+14
View File
@@ -0,0 +1,14 @@
{
"$schema": "https://json.schemastore.org/package.json",
"private": true,
"name": "@calcom/telegram",
"version": "0.0.0",
"main": "./index.ts",
"description": "Schedule a chat with your guests or have a Telegram Video call.",
"dependencies": {
"@calcom/lib": "*"
},
"devDependencies": {
"@calcom/types": "*"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

@@ -0,0 +1 @@
<svg id="Livello_1" data-name="Livello 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 240 240"><defs><linearGradient id="linear-gradient" x1="120" y1="240" x2="120" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#1d93d2"/><stop offset="1" stop-color="#38b0e3"/></linearGradient></defs><title>Telegram_logo</title><circle cx="120" cy="120" r="120" fill="url(#linear-gradient)"/><path d="M81.229,128.772l14.237,39.406s1.78,3.687,3.686,3.687,30.255-29.492,30.255-29.492l31.525-60.89L81.737,118.6Z" fill="#c8daea"/><path d="M100.106,138.878l-2.733,29.046s-1.144,8.9,7.754,0,17.415-15.763,17.415-15.763" fill="#a9c6d8"/><path d="M81.486,130.178,52.2,120.636s-3.5-1.42-2.373-4.64c.232-.664.7-1.229,2.1-2.2,6.489-4.523,120.106-45.36,120.106-45.36s3.208-1.081,5.1-.362a2.766,2.766,0,0,1,1.885,2.055,9.357,9.357,0,0,1,.254,2.585c-.009.752-.1,1.449-.169,2.542-.692,11.165-21.4,94.493-21.4,94.493s-1.239,4.876-5.678,5.043A8.13,8.13,0,0,1,146.1,172.5c-8.711-7.493-38.819-27.727-45.472-32.177a1.27,1.27,0,0,1-.546-.9c-.093-.469.417-1.05.417-1.05s52.426-46.6,53.821-51.492c.108-.379-.3-.566-.848-.4-3.482,1.281-63.844,39.4-70.506,43.607A3.21,3.21,0,0,1,81.486,130.178Z" fill="#fff"/></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@@ -120,6 +120,13 @@
"slug": "whatsapp",
"type": "whatsapp_video"
},
{
"dirName": "telegram",
"categories": ["video"],
"slug": "telegram",
"type": "telegram_video"
},
{
"dirName": "signal",
"categories": ["video"],