Skip to content

Scheduling infrastructure for absolutely everyone.

feat: umami app added (#14783)

Vikas Patild666f2926cd4
diff --git a/packages/app-store/apps.browser.generated.tsx b/packages/app-store/apps.browser.generated.tsx
index ae5d69c2449..4fea31051f0 100644
--- a/packages/app-store/apps.browser.generated.tsx
+++ b/packages/app-store/apps.browser.generated.tsx
@@ -46,6 +46,7 @@ export const EventTypeAddonMap = {
import("./templates/event-type-app-card/components/EventTypeAppCardInterface")
),
twipla: dynamic(() => import("./twipla/components/EventTypeAppCardInterface")),
+ umami: dynamic(() => import("./umami/components/EventTypeAppCardInterface")),
"zoho-bigin": dynamic(() => import("./zoho-bigin/components/EventTypeAppCardInterface")),
zohocrm: dynamic(() => import("./zohocrm/components/EventTypeAppCardInterface")),
};
diff --git a/packages/app-store/apps.keys-schemas.generated.ts b/packages/app-store/apps.keys-schemas.generated.ts
index 3b45ab4a62a..40f6d986d61 100644
--- a/packages/app-store/apps.keys-schemas.generated.ts
+++ b/packages/app-store/apps.keys-schemas.generated.ts
@@ -37,6 +37,7 @@ import { appKeysSchema as tandemvideo_zod_ts } from "./tandemvideo/zod";
import { appKeysSchema as booking_pages_tag_zod_ts } from "./templates/booking-pages-tag/zod";
import { appKeysSchema as event_type_app_card_zod_ts } from "./templates/event-type-app-card/zod";
import { appKeysSchema as twipla_zod_ts } from "./twipla/zod";
+import { appKeysSchema as umami_zod_ts } from "./umami/zod";
import { appKeysSchema as vital_zod_ts } from "./vital/zod";
import { appKeysSchema as webex_zod_ts } from "./webex/zod";
import { appKeysSchema as wordpress_zod_ts } from "./wordpress/zod";
@@ -82,6 +83,7 @@ export const appKeysSchemas = {
"booking-pages-tag": booking_pages_tag_zod_ts,
"event-type-app-card": event_type_app_card_zod_ts,
twipla: twipla_zod_ts,
+ umami: umami_zod_ts,
vital: vital_zod_ts,
webex: webex_zod_ts,
wordpress: wordpress_zod_ts,
diff --git a/packages/app-store/apps.metadata.generated.ts b/packages/app-store/apps.metadata.generated.ts
index 407d824b50a..bc430514567 100644
--- a/packages/app-store/apps.metadata.generated.ts
+++ b/packages/app-store/apps.metadata.generated.ts
@@ -77,6 +77,7 @@ import general_app_settings_config_json from "./templates/general-app-settings/c
import link_as_an_app_config_json from "./templates/link-as-an-app/config.json";
import twipla_config_json from "./twipla/config.json";
import typeform_config_json from "./typeform/config.json";
+import umami_config_json from "./umami/config.json";
import vimcal_config_json from "./vimcal/config.json";
import { metadata as vital__metadata_ts } from "./vital/_metadata";
import weather_in_your_calendar_config_json from "./weather_in_your_calendar/config.json";
@@ -167,6 +168,7 @@ export const appStoreMetadata = {
"link-as-an-app": link_as_an_app_config_json,
twipla: twipla_config_json,
typeform: typeform_config_json,
+ umami: umami_config_json,
vimcal: vimcal_config_json,
vital: vital__metadata_ts,
weather_in_your_calendar: weather_in_your_calendar_config_json,
diff --git a/packages/app-store/apps.schemas.generated.ts b/packages/app-store/apps.schemas.generated.ts
index ab725ddb259..318c6543747 100644
--- a/packages/app-store/apps.schemas.generated.ts
+++ b/packages/app-store/apps.schemas.generated.ts
@@ -37,6 +37,7 @@ import { appDataSchema as tandemvideo_zod_ts } from "./tandemvideo/zod";
import { appDataSchema as booking_pages_tag_zod_ts } from "./templates/booking-pages-tag/zod";
import { appDataSchema as event_type_app_card_zod_ts } from "./templates/event-type-app-card/zod";
import { appDataSchema as twipla_zod_ts } from "./twipla/zod";
+import { appDataSchema as umami_zod_ts } from "./umami/zod";
import { appDataSchema as vital_zod_ts } from "./vital/zod";
import { appDataSchema as webex_zod_ts } from "./webex/zod";
import { appDataSchema as wordpress_zod_ts } from "./wordpress/zod";
@@ -82,6 +83,7 @@ export const appDataSchemas = {
"booking-pages-tag": booking_pages_tag_zod_ts,
"event-type-app-card": event_type_app_card_zod_ts,
twipla: twipla_zod_ts,
+ umami: umami_zod_ts,
vital: vital_zod_ts,
webex: webex_zod_ts,
wordpress: wordpress_zod_ts,
diff --git a/packages/app-store/apps.server.generated.ts b/packages/app-store/apps.server.generated.ts
index 14aa4a5884d..0fc49f53270 100644
--- a/packages/app-store/apps.server.generated.ts
+++ b/packages/app-store/apps.server.generated.ts
@@ -77,6 +77,7 @@ export const apiHandlers = {
"link-as-an-app": import("./templates/link-as-an-app/api"),
twipla: import("./twipla/api"),
typeform: import("./typeform/api"),
+ umami: import("./umami/api"),
vimcal: import("./vimcal/api"),
vital: import("./vital/api"),
weather_in_your_calendar: import("./weather_in_your_calendar/api"),
diff --git a/packages/app-store/bookerApps.metadata.generated.ts b/packages/app-store/bookerApps.metadata.generated.ts
index 5c226e0a8a0..d56837a0506 100644
--- a/packages/app-store/bookerApps.metadata.generated.ts
+++ b/packages/app-store/bookerApps.metadata.generated.ts
@@ -36,6 +36,7 @@ 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 twipla_config_json from "./twipla/config.json";
+import umami_config_json from "./umami/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";
@@ -76,6 +77,7 @@ export const appStoreMetadata = {
"booking-pages-tag": booking_pages_tag_config_json,
"event-type-location-video-static": event_type_location_video_static_config_json,
twipla: twipla_config_json,
+ umami: umami_config_json,
webex: webex_config_json,
whatsapp: whatsapp_config_json,
whereby: whereby_config_json,
diff --git a/packages/app-store/umami/DESCRIPTION.md b/packages/app-store/umami/DESCRIPTION.md
new file mode 100644
index 00000000000..d07280ea4c8
--- /dev/null
+++ b/packages/app-store/umami/DESCRIPTION.md
@@ -0,0 +1,6 @@
+---
+items:
+ - 1.png
+---
+
+{DESCRIPTION}
diff --git a/packages/app-store/umami/api/add.ts b/packages/app-store/umami/api/add.ts
new file mode 100644
index 00000000000..7603de54da7
--- /dev/null
+++ b/packages/app-store/umami/api/add.ts
@@ -0,0 +1,16 @@
+import { createDefaultInstallation } from "@calcom/app-store/_utils/installation";
+import type { AppDeclarativeHandler } from "@calcom/types/AppHandler";
+
+import appConfig from "../config.json";
+
+const handler: AppDeclarativeHandler = {
+ appType: appConfig.type,
+ variant: appConfig.variant,
+ slug: appConfig.slug,
+ supportsMultipleInstalls: false,
+ handlerType: "add",
+ createCredential: ({ appType, user, slug, teamId }) =>
+ createDefaultInstallation({ appType, user: user, slug, key: {}, teamId }),
+};
+
+export default handler;
diff --git a/packages/app-store/umami/api/index.ts b/packages/app-store/umami/api/index.ts
new file mode 100644
index 00000000000..4c0d2ead01e
--- /dev/null
+++ b/packages/app-store/umami/api/index.ts
@@ -0,0 +1 @@
+export { default as add } from "./add";
diff --git a/packages/app-store/umami/components/EventTypeAppCardInterface.tsx b/packages/app-store/umami/components/EventTypeAppCardInterface.tsx
new file mode 100644
index 00000000000..286cf1e2f20
--- /dev/null
+++ b/packages/app-store/umami/components/EventTypeAppCardInterface.tsx
@@ -0,0 +1,35 @@
+import { useAppContextWithSchema } from "@calcom/app-store/EventTypeAppContext";
+import AppCard from "@calcom/app-store/_components/AppCard";
+import useIsAppEnabled from "@calcom/app-store/_utils/useIsAppEnabled";
+import type { EventTypeAppCardComponent } from "@calcom/app-store/types";
+import { TextField } from "@calcom/ui";
+
+import type { appDataSchema } from "../zod";
+
+const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({ app, eventType }) {
+ const { getAppData, setAppData, disabled } = useAppContextWithSchema<typeof appDataSchema>();
+ const siteId = getAppData("SITE_ID");
+ const { enabled, updateEnabled } = useIsAppEnabled(app);
+
+ return (
+ <AppCard
+ app={app}
+ switchOnClick={(e) => {
+ updateEnabled(e);
+ }}
+ switchChecked={enabled}
+ teamId={eventType.team?.id || undefined}>
+ <TextField
+ disabled={disabled}
+ name="Site ID"
+ value={siteId}
+ placeholder="Enter your Site ID"
+ onChange={(e) => {
+ setAppData("SITE_ID", e.target.value);
+ }}
+ />
+ </AppCard>
+ );
+};
+
+export default EventTypeAppCard;
diff --git a/packages/app-store/umami/config.json b/packages/app-store/umami/config.json
new file mode 100644
index 00000000000..878cde0f57c
--- /dev/null
+++ b/packages/app-store/umami/config.json
@@ -0,0 +1,28 @@
+{
+ "name": "Umami",
+ "slug": "umami",
+ "type": "umami_analytics",
+ "logo": "icon.svg",
+ "url": "https://cal.com/",
+ "variant": "analytics",
+ "categories": ["analytics"],
+ "publisher": "Cal.com, Inc.",
+ "email": "[email protected]",
+ "description": "Umami makes it easy to collect, analyze, and understand your web data — while maintaining visitor privacy and data ownership.",
+ "extendsFeature": "EventType",
+ "appData": {
+ "tag": {
+ "scripts": [
+ {
+ "src": "https://us.umami.is/script.js",
+ "attrs": {
+ "data-website-id": "{SITE_ID}"
+ }
+ }
+ ]
+ }
+ },
+ "isTemplate": false,
+ "__createdUsingCli": true,
+ "__template": "booking-pages-tag"
+}
diff --git a/packages/app-store/umami/index.ts b/packages/app-store/umami/index.ts
new file mode 100644
index 00000000000..d7f36022040
--- /dev/null
+++ b/packages/app-store/umami/index.ts
@@ -0,0 +1 @@
+export * as api from "./api";
diff --git a/packages/app-store/umami/package.json b/packages/app-store/umami/package.json
new file mode 100644
index 00000000000..ae3c493bc9f
--- /dev/null
+++ b/packages/app-store/umami/package.json
@@ -0,0 +1,14 @@
+{
+ "$schema": "https://json.schemastore.org/package.json",
+ "private": true,
+ "name": "@calcom/umami",
+ "version": "0.0.0",
+ "main": "./index.ts",
+ "dependencies": {
+ "@calcom/lib": "*"
+ },
+ "devDependencies": {
+ "@calcom/types": "*"
+ },
+ "description": "Umami makes it easy to collect, analyze, and understand your web data — while maintaining visitor privacy and data ownership."
+}
diff --git a/packages/app-store/umami/static/1.png b/packages/app-store/umami/static/1.png
new file mode 100644
index 00000000000..dc72ef6a0fd
Binary files /dev/null and b/packages/app-store/umami/static/1.png differ
diff --git a/packages/app-store/umami/static/icon.svg b/packages/app-store/umami/static/icon.svg
new file mode 100644
index 00000000000..22d07b7481f
--- /dev/null
+++ b/packages/app-store/umami/static/icon.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128" viewBox="0 0 428 389.11"><g data-name="Layer 2"><g data-name="Layer 4"><circle cx="214.15" cy="181" r="171" fill="#fff" stroke="#000" stroke-miterlimit="10" stroke-width="20"></circle><path d="M413 134.11H15.29a15 15 0 0 0-15 15v15.3C.12 168 0 171.52 0 175.11c0 118.19 95.81 214 214 214 116.4 0 211.1-92.94 213.93-208.67 0-.44.07-.88.07-1.33v-30a15 15 0 0 0-15-15"></path></g></g></svg>
\ No newline at end of file
diff --git a/packages/app-store/umami/zod.ts b/packages/app-store/umami/zod.ts
new file mode 100644
index 00000000000..3339ccae144
--- /dev/null
+++ b/packages/app-store/umami/zod.ts
@@ -0,0 +1,11 @@
+import { z } from "zod";
+
+import { eventTypeAppCardZod } from "@calcom/app-store/eventTypeAppCardZod";
+
+export const appDataSchema = eventTypeAppCardZod.merge(
+ z.object({
+ SITE_ID: z.string().optional(),
+ })
+);
+
+export const appKeysSchema = z.object({});