feat-insihts-app (#18461)
This commit is contained in:
@@ -28,6 +28,7 @@ export const EventTypeAddonMap = {
|
||||
giphy: dynamic(() => import("./giphy/components/EventTypeAppCardInterface")),
|
||||
gtm: dynamic(() => import("./gtm/components/EventTypeAppCardInterface")),
|
||||
hubspot: dynamic(() => import("./hubspot/components/EventTypeAppCardInterface")),
|
||||
insihts: dynamic(() => import("./insihts/components/EventTypeAppCardInterface")),
|
||||
matomo: dynamic(() => import("./matomo/components/EventTypeAppCardInterface")),
|
||||
metapixel: dynamic(() => import("./metapixel/components/EventTypeAppCardInterface")),
|
||||
"mock-payment-app": dynamic(() => import("./mock-payment-app/components/EventTypeAppCardInterface")),
|
||||
|
||||
@@ -15,6 +15,7 @@ import { appKeysSchema as googlecalendar_zod_ts } from "./googlecalendar/zod";
|
||||
import { appKeysSchema as googlevideo_zod_ts } from "./googlevideo/zod";
|
||||
import { appKeysSchema as gtm_zod_ts } from "./gtm/zod";
|
||||
import { appKeysSchema as hubspot_zod_ts } from "./hubspot/zod";
|
||||
import { appKeysSchema as insihts_zod_ts } from "./insihts/zod";
|
||||
import { appKeysSchema as intercom_zod_ts } from "./intercom/zod";
|
||||
import { appKeysSchema as jelly_zod_ts } from "./jelly/zod";
|
||||
import { appKeysSchema as jitsivideo_zod_ts } from "./jitsivideo/zod";
|
||||
@@ -63,6 +64,7 @@ export const appKeysSchemas = {
|
||||
googlevideo: googlevideo_zod_ts,
|
||||
gtm: gtm_zod_ts,
|
||||
hubspot: hubspot_zod_ts,
|
||||
insihts: insihts_zod_ts,
|
||||
intercom: intercom_zod_ts,
|
||||
jelly: jelly_zod_ts,
|
||||
jitsivideo: jitsivideo_zod_ts,
|
||||
|
||||
@@ -39,6 +39,7 @@ import horizon_workrooms_config_json from "./horizon-workrooms/config.json";
|
||||
import { metadata as hubspot__metadata_ts } from "./hubspot/_metadata";
|
||||
import { metadata as huddle01video__metadata_ts } from "./huddle01video/_metadata";
|
||||
import ics_feedcalendar_config_json from "./ics-feedcalendar/config.json";
|
||||
import insihts_config_json from "./insihts/config.json";
|
||||
import intercom_config_json from "./intercom/config.json";
|
||||
import jelly_config_json from "./jelly/config.json";
|
||||
import { metadata as jitsivideo__metadata_ts } from "./jitsivideo/_metadata";
|
||||
@@ -139,6 +140,7 @@ export const appStoreMetadata = {
|
||||
hubspot: hubspot__metadata_ts,
|
||||
huddle01video: huddle01video__metadata_ts,
|
||||
"ics-feedcalendar": ics_feedcalendar_config_json,
|
||||
insihts: insihts_config_json,
|
||||
intercom: intercom_config_json,
|
||||
jelly: jelly_config_json,
|
||||
jitsivideo: jitsivideo__metadata_ts,
|
||||
|
||||
@@ -15,6 +15,7 @@ import { appDataSchema as googlecalendar_zod_ts } from "./googlecalendar/zod";
|
||||
import { appDataSchema as googlevideo_zod_ts } from "./googlevideo/zod";
|
||||
import { appDataSchema as gtm_zod_ts } from "./gtm/zod";
|
||||
import { appDataSchema as hubspot_zod_ts } from "./hubspot/zod";
|
||||
import { appDataSchema as insihts_zod_ts } from "./insihts/zod";
|
||||
import { appDataSchema as intercom_zod_ts } from "./intercom/zod";
|
||||
import { appDataSchema as jelly_zod_ts } from "./jelly/zod";
|
||||
import { appDataSchema as jitsivideo_zod_ts } from "./jitsivideo/zod";
|
||||
@@ -63,6 +64,7 @@ export const appDataSchemas = {
|
||||
googlevideo: googlevideo_zod_ts,
|
||||
gtm: gtm_zod_ts,
|
||||
hubspot: hubspot_zod_ts,
|
||||
insihts: insihts_zod_ts,
|
||||
intercom: intercom_zod_ts,
|
||||
jelly: jelly_zod_ts,
|
||||
jitsivideo: jitsivideo_zod_ts,
|
||||
|
||||
@@ -39,6 +39,7 @@ export const apiHandlers = {
|
||||
hubspot: import("./hubspot/api"),
|
||||
huddle01video: import("./huddle01video/api"),
|
||||
"ics-feedcalendar": import("./ics-feedcalendar/api"),
|
||||
insihts: import("./insihts/api"),
|
||||
intercom: import("./intercom/api"),
|
||||
jelly: import("./jelly/api"),
|
||||
jitsivideo: import("./jitsivideo/api"),
|
||||
|
||||
@@ -18,6 +18,7 @@ import { metadata as googlevideo__metadata_ts } from "./googlevideo/_metadata";
|
||||
import gtm_config_json from "./gtm/config.json";
|
||||
import horizon_workrooms_config_json from "./horizon-workrooms/config.json";
|
||||
import { metadata as huddle01video__metadata_ts } from "./huddle01video/_metadata";
|
||||
import insihts_config_json from "./insihts/config.json";
|
||||
import jelly_config_json from "./jelly/config.json";
|
||||
import { metadata as jitsivideo__metadata_ts } from "./jitsivideo/_metadata";
|
||||
import matomo_config_json from "./matomo/config.json";
|
||||
@@ -64,6 +65,7 @@ export const appStoreMetadata = {
|
||||
gtm: gtm_config_json,
|
||||
"horizon-workrooms": horizon_workrooms_config_json,
|
||||
huddle01video: huddle01video__metadata_ts,
|
||||
insihts: insihts_config_json,
|
||||
jelly: jelly_config_json,
|
||||
jitsivideo: jitsivideo__metadata_ts,
|
||||
matomo: matomo_config_json,
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
items:
|
||||
- 1.png
|
||||
---
|
||||
|
||||
{DESCRIPTION}
|
||||
@@ -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;
|
||||
@@ -0,0 +1 @@
|
||||
export { default as add } from "./add";
|
||||
@@ -0,0 +1,37 @@
|
||||
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}>
|
||||
<fieldset className="space-y-2" disabled={disabled}>
|
||||
<TextField
|
||||
disabled={disabled}
|
||||
name="Site ID"
|
||||
value={siteId}
|
||||
placeholder="Enter your Site ID"
|
||||
onChange={(e) => {
|
||||
setAppData("SITE_ID", e.target.value);
|
||||
}}
|
||||
/>
|
||||
</fieldset>
|
||||
</AppCard>
|
||||
);
|
||||
};
|
||||
|
||||
export default EventTypeAppCard;
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "Insihts",
|
||||
"slug": "insihts",
|
||||
"type": "insihts_analytics",
|
||||
"logo": "icon.svg",
|
||||
"url": "https://cal.com/",
|
||||
"variant": "analytics",
|
||||
"categories": ["analytics"],
|
||||
"publisher": "Cal.com, Inc.",
|
||||
"email": "help@cal.com",
|
||||
"description": "Insihts is an all-in-one platform for businesses looking to track user behavior, optimize workflows, and make data-driven decisions. Whether you are a marketer, product manager, or part of a customer success team, Insihts provides the tools you need to succeed.",
|
||||
"extendsFeature": "EventType",
|
||||
"appData": {
|
||||
"tag": {
|
||||
"scripts": [
|
||||
{
|
||||
"src": "https://collector.insihts.com/script.js",
|
||||
"attrs": {
|
||||
"data-website-id": "{SITE_ID}"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"isTemplate": false,
|
||||
"__createdUsingCli": true,
|
||||
"__template": "booking-pages-tag"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export * as api from "./api";
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/package.json",
|
||||
"private": true,
|
||||
"name": "@calcom/insihts",
|
||||
"version": "0.0.0",
|
||||
"main": "./index.ts",
|
||||
"dependencies": {
|
||||
"@calcom/lib": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@calcom/types": "*"
|
||||
},
|
||||
"description": "Insihts is an all-in-one platform for businesses looking to track user behavior, optimize workflows, and make data-driven decisions. Whether you are a marketer, product manager, or part of a customer success team, Insihts provides the tools you need to succeed."
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 544 KiB |
@@ -0,0 +1,18 @@
|
||||
<svg width="58" height="58" viewBox="0 0 58 58" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<mask id="mask0_344_305" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="8" y="16" width="51" height="42">
|
||||
<path d="M8.47949 16.457H58.0004V57.4917H8.47949V16.457Z" fill="white"/>
|
||||
</mask>
|
||||
<g mask="url(#mask0_344_305)">
|
||||
<path d="M25.8115 57.4411C21.3677 57.4411 16.9225 57.4636 12.4747 57.4279C10.7589 57.4146 9.29751 56.3043 8.80993 54.8191C8.26406 53.1536 8.69996 51.3146 10.1508 50.415C10.9722 49.9062 12.0746 49.6438 13.0537 49.6359C21.0656 49.5736 29.0762 49.6266 37.0894 49.5855C43.3325 49.5537 48.2639 45.4398 49.4988 39.3504C51.0172 31.8658 45.2643 24.6661 37.5783 24.5469C32.048 24.4607 26.5164 24.5296 20.9861 24.523C19.2836 24.5217 18.005 23.7731 17.2259 22.2547C16.5277 20.8914 16.5303 19.3995 17.5784 18.3607C18.421 17.5234 19.7234 16.682 20.8364 16.6622C26.9815 16.5588 33.149 16.4144 39.2729 16.8397C48.0109 17.4478 55.2782 24.1017 57.1715 32.6184C59.9883 45.2861 50.4474 57.2993 37.4405 57.4358C33.5677 57.4756 29.6896 57.4411 25.8115 57.4411Z" fill="#F4F5F5"/>
|
||||
</g>
|
||||
<mask id="mask1_344_305" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="42" height="42">
|
||||
<path d="M0 0H41.3805V41.2175H0V0Z" fill="white"/>
|
||||
</mask>
|
||||
<g mask="url(#mask1_344_305)">
|
||||
<path d="M29.6314 40.6861C25.8172 40.6861 21.9568 41.0458 18.2 40.6144C9.01211 39.5616 1.08721 31.5593 0.119332 22.8227C-0.911492 13.5008 4.85525 4.59699 13.8529 1.37373C17.9105 -0.078595 22.0813 -0.089215 26.2746 0.0647792C28.5082 0.147086 30.1251 1.97378 30.1097 4.00093C30.0929 6.02542 28.4705 7.7552 26.248 7.93707C24.729 8.06053 23.1947 7.98221 21.6645 7.99283C14.2963 8.0446 8.45404 13.2831 8.36452 20.2433C8.27361 27.3961 13.9858 32.6797 20.8547 32.9532C26.4116 33.1735 31.9867 33.0262 37.5535 33.0488C38.2067 33.0501 38.8682 33.0461 39.513 33.1284C41.7131 33.4098 43.316 35.2047 43.1845 37.1946C43.0531 39.2165 41.3061 40.9051 39.1312 40.9463C35.966 41.0047 32.7994 40.9609 29.6342 40.9609C29.6342 40.8706 29.6342 40.7777 29.6314 40.6861Z" fill="#F97316"/>
|
||||
<ellipse cx="20.2572" cy="20.4716" rx="7.99142" ry="8.24454" transform="rotate(41.6752 20.2572 20.4716)" fill="#F97316"/>
|
||||
<ellipse cx="20.0029" cy="20.2734" rx="2.35042" ry="2.29015" transform="rotate(41.6752 20.0029 20.2734)" fill="#F4F5F5"/>
|
||||
</g>
|
||||
<ellipse cx="35.7752" cy="36.9938" rx="7.99142" ry="8.24454" transform="rotate(41.6752 35.7752 36.9938)" fill="#F4F5F5"/>
|
||||
<ellipse cx="36.0307" cy="36.9943" rx="2.35042" ry="2.29015" transform="rotate(41.6752 36.0307 36.9943)" fill="#F97316"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
@@ -0,0 +1,12 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import { eventTypeAppCardZod } from "@calcom/app-store/eventTypeAppCardZod";
|
||||
|
||||
export const appDataSchema = eventTypeAppCardZod.merge(
|
||||
z.object({
|
||||
SITE_ID: z.string().optional(),
|
||||
SCRIPT_URL: z.string().optional(),
|
||||
})
|
||||
);
|
||||
|
||||
export const appKeysSchema = z.object({});
|
||||
Reference in New Issue
Block a user