Scheduling infrastructure for absolutely everyone.
feat: #1490 [CAL-422] Intercom App (#10714)
Vachmaraa1b6b7ad6666
diff --git a/packages/app-store/apps.keys-schemas.generated.ts b/packages/app-store/apps.keys-schemas.generated.tsindex b9b37cb2fef..5117b121e44 100644--- a/packages/app-store/apps.keys-schemas.generated.ts+++ b/packages/app-store/apps.keys-schemas.generated.ts@@ -11,6 +11,7 @@ import { appKeysSchema as giphy_zod_ts } from "./giphy/zod";import { appKeysSchema as googlecalendar_zod_ts } from "./googlecalendar/zod";import { appKeysSchema as gtm_zod_ts } from "./gtm/zod";import { appKeysSchema as hubspot_zod_ts } from "./hubspot/zod";+import { appKeysSchema as intercom_zod_ts } from "./intercom/zod";import { appKeysSchema as jitsivideo_zod_ts } from "./jitsivideo/zod";import { appKeysSchema as larkcalendar_zod_ts } from "./larkcalendar/zod";import { appKeysSchema as make_zod_ts } from "./make/zod";@@ -45,6 +46,7 @@ export const appKeysSchemas = {googlecalendar: googlecalendar_zod_ts,gtm: gtm_zod_ts,hubspot: hubspot_zod_ts,+ intercom: intercom_zod_ts,jitsivideo: jitsivideo_zod_ts,larkcalendar: larkcalendar_zod_ts,make: make_zod_ts,diff --git a/packages/app-store/apps.metadata.generated.ts b/packages/app-store/apps.metadata.generated.tsindex c5124873684..272d5f2aec6 100644--- a/packages/app-store/apps.metadata.generated.ts+++ b/packages/app-store/apps.metadata.generated.ts@@ -28,6 +28,7 @@ import { metadata as googlevideo__metadata_ts } from "./googlevideo/_metadata";import gtm_config_json from "./gtm/config.json";import { metadata as hubspot__metadata_ts } from "./hubspot/_metadata";import { metadata as huddle01video__metadata_ts } from "./huddle01video/_metadata";+import intercom_config_json from "./intercom/config.json";import { metadata as jitsivideo__metadata_ts } from "./jitsivideo/_metadata";import { metadata as larkcalendar__metadata_ts } from "./larkcalendar/_metadata";import make_config_json from "./make/config.json";@@ -101,6 +102,7 @@ export const appStoreMetadata = {gtm: gtm_config_json,hubspot: hubspot__metadata_ts,huddle01video: huddle01video__metadata_ts,+ intercom: intercom_config_json,jitsivideo: jitsivideo__metadata_ts,larkcalendar: larkcalendar__metadata_ts,make: make_config_json,diff --git a/packages/app-store/apps.schemas.generated.ts b/packages/app-store/apps.schemas.generated.tsindex 030ef8b6da0..08d223e02d5 100644--- a/packages/app-store/apps.schemas.generated.ts+++ b/packages/app-store/apps.schemas.generated.ts@@ -11,6 +11,7 @@ import { appDataSchema as giphy_zod_ts } from "./giphy/zod";import { appDataSchema as googlecalendar_zod_ts } from "./googlecalendar/zod";import { appDataSchema as gtm_zod_ts } from "./gtm/zod";import { appDataSchema as hubspot_zod_ts } from "./hubspot/zod";+import { appDataSchema as intercom_zod_ts } from "./intercom/zod";import { appDataSchema as jitsivideo_zod_ts } from "./jitsivideo/zod";import { appDataSchema as larkcalendar_zod_ts } from "./larkcalendar/zod";import { appDataSchema as make_zod_ts } from "./make/zod";@@ -45,6 +46,7 @@ export const appDataSchemas = {googlecalendar: googlecalendar_zod_ts,gtm: gtm_zod_ts,hubspot: hubspot_zod_ts,+ intercom: intercom_zod_ts,jitsivideo: jitsivideo_zod_ts,larkcalendar: larkcalendar_zod_ts,make: make_zod_ts,diff --git a/packages/app-store/apps.server.generated.ts b/packages/app-store/apps.server.generated.tsindex 1b4d268f6b9..5698485a62b 100644--- a/packages/app-store/apps.server.generated.ts+++ b/packages/app-store/apps.server.generated.ts@@ -28,6 +28,7 @@ export const apiHandlers = {gtm: import("./gtm/api"),hubspot: import("./hubspot/api"),huddle01video: import("./huddle01video/api"),+ intercom: import("./intercom/api"),jitsivideo: import("./jitsivideo/api"),larkcalendar: import("./larkcalendar/api"),make: import("./make/api"),diff --git a/packages/app-store/intercom/DESCRIPTION.md b/packages/app-store/intercom/DESCRIPTION.mdnew file mode 100644index 00000000000..61e7037d439--- /dev/null+++ b/packages/app-store/intercom/DESCRIPTION.md@@ -0,0 +1,8 @@+---+items:+ - 1.png+ - 2.png+ - 3.png+---++{DESCRIPTION}diff --git a/packages/app-store/intercom/api/add.ts b/packages/app-store/intercom/api/add.tsnew file mode 100644index 00000000000..5487ed3bb2f--- /dev/null+++ b/packages/app-store/intercom/api/add.ts@@ -0,0 +1,30 @@+import type { NextApiRequest, NextApiResponse } from "next";+import { stringify } from "querystring";++import { WEBAPP_URL_FOR_OAUTH } from "@calcom/lib/constants";++import getAppKeysFromSlug from "../../_utils/getAppKeysFromSlug";+import { encodeOAuthState } from "../../_utils/oauth/encodeOAuthState";++let client_id = "";++export default async function handler(req: NextApiRequest, res: NextApiResponse) {+ if (req.method === "GET") {+ const appKeys = await getAppKeysFromSlug("intercom");+ if (typeof appKeys.client_id === "string") client_id = appKeys.client_id;+ if (!client_id) return res.status(400).json({ message: "Intercom client_id missing." });++ const state = encodeOAuthState(req);++ const params = {+ client_id,+ redirect_uri: WEBAPP_URL_FOR_OAUTH + "/api/integrations/intercom/callback",+ state,+ response_type: "code",+ };++ const authUrl = `https://app.intercom.com/oauth?${stringify(params)}`;++ res.status(200).json({ url: authUrl });+ }+}diff --git a/packages/app-store/intercom/api/callback.ts b/packages/app-store/intercom/api/callback.tsnew file mode 100644index 00000000000..5fd5f861ba4--- /dev/null+++ b/packages/app-store/intercom/api/callback.ts@@ -0,0 +1,92 @@+import type { NextApiRequest, NextApiResponse } from "next";++import { CAL_URL } from "@calcom/lib/constants";+import { getSafeRedirectUrl } from "@calcom/lib/getSafeRedirectUrl";+import logger from "@calcom/lib/logger";+import prisma from "@calcom/prisma";++import getAppKeysFromSlug from "../../_utils/getAppKeysFromSlug";+import getInstalledAppPath from "../../_utils/getInstalledAppPath";+import createOAuthAppCredential from "../../_utils/oauth/createOAuthAppCredential";++const log = logger.getChildLogger({ prefix: [`[[intercom/api/callback]`] });++let client_id = "";+let client_secret = "";++export default async function handler(req: NextApiRequest, res: NextApiResponse) {+ const { code } = req.query;++ if (code && typeof code !== "string") {+ res.status(400).json({ message: "`code` must be a string" });+ return;+ }+ if (!req.session?.user?.id) {+ return res.status(401).json({ message: "You must be logged in to do this" });+ }++ const appKeys = await getAppKeysFromSlug("intercom");++ if (typeof appKeys.client_id === "string") client_id = appKeys.client_id;+ if (typeof appKeys.client_secret === "string") client_secret = appKeys.client_secret;+ if (!client_id) return res.status(400).json({ message: "Intercom client_id missing." });+ if (!client_secret) return res.status(400).json({ message: "Intercom client_secret missing." });++ const response = await fetch(`https://api.intercom.io/auth/eagle/token`, {+ method: "POST",+ headers: {+ "Content-Type": "application/json",+ },+ body: JSON.stringify({+ code,+ client_id,+ client_secret,+ }),+ });++ const responseBody = await response.json();++ if (response.status !== 200) {+ log.error("get user_access_token failed", responseBody);+ return res.redirect("/apps/installed?error=" + JSON.stringify(responseBody));+ }++ // Find the admin id from the accompte thanks to access_token and store it+ const admin = await fetch(`https://api.intercom.io/me`, {+ method: "GET",+ headers: {+ "Content-Type": "application/json",+ Authorization: `Bearer ${responseBody.access_token}`,+ },+ });++ const adminBody = await admin.json();++ if (admin.status !== 200) {+ log.error("get admin_id failed", adminBody);+ return res.redirect("/apps/installed?error=" + JSON.stringify(adminBody));+ }++ const adminId = adminBody.id;++ // Remove the previous credential if admin id was already linked+ await prisma.credential.deleteMany({+ where: {+ type: "intercom_automation",+ key: {+ string_contains: adminId,+ },+ },+ });++ createOAuthAppCredential(+ { appId: "intercom", type: "intercom_automation" },+ JSON.stringify({ access_token: responseBody.access_token, admin_id: adminId }),+ req+ );++ res.redirect(+ getSafeRedirectUrl(CAL_URL + "/apps/installed/automation?hl=intercom") ??+ getInstalledAppPath({ variant: "automation", slug: "intercom" })+ );+}diff --git a/packages/app-store/intercom/api/configure.ts b/packages/app-store/intercom/api/configure.tsnew file mode 100644index 00000000000..34653695109--- /dev/null+++ b/packages/app-store/intercom/api/configure.ts@@ -0,0 +1,136 @@+import type { NextApiRequest, NextApiResponse } from "next";++import { CAL_URL } from "@calcom/lib/constants";+import prisma from "@calcom/prisma";++import type {+ NewCanvas,+ ListComponent,+ ListItem,+ SpacerComponent,+ TextComponent,+ InputComponent,+} from "../lib";+import { isValidCalURL } from "../lib/isValidCalURL";++export default async function handler(req: NextApiRequest, res: NextApiResponse) {+ const { admin, input_values, component_id } = req.body;++ let isValid: boolean | TextComponent = true;+ if (component_id || input_values?.submit_booking_url) {+ const url = component_id || input_values?.submit_booking_url;+ isValid = await isValidCalURL(url);++ if (isValid) return res.status(200).json({ results: { submit_booking_url: url } });+ }++ const input: InputComponent = {+ type: "input",+ id: "submit_booking_url",+ label: "Enter your Cal.com link",+ placeholder: "https://cal.com/valentinchmara/30min",+ save_state: "unsaved",+ action: {+ type: "submit",+ },+ aria_label: "Enter your Cal.com link",+ };++ const defaultCanvasData: NewCanvas = {+ canvas: {+ content: {+ components: isValid === true ? [input] : [isValid, input],+ },+ },+ };++ if (!admin?.id) return res.status(200).json(defaultCanvasData);++ const credential = await prisma.credential.findFirst({+ where: {+ appId: "intercom",+ key: {+ string_contains: admin.id,+ },+ },+ });++ if (!credential) return res.status(200).json(defaultCanvasData);++ const team = credential.teamId+ ? await prisma.team.findUnique({+ where: {+ id: credential.teamId,+ },+ })+ : null;++ const userId = credential.userId;++ const user = userId+ ? await prisma.user.findUnique({+ where: {+ id: userId,+ },+ })+ : null;++ const eventTypes = await prisma.eventType.findMany({+ where: {+ userId,+ hidden: false,+ },+ });++ if (!eventTypes) return res.status(200).json(defaultCanvasData);+ if (!user && !team) return res.status(200).json(defaultCanvasData);++ const list: ListItem[] = eventTypes.map((eventType) => {+ let slug;+ if (team && team.slug) {+ slug = `team/${team.slug}`;+ } else if (user && user.username) {+ slug = user.username;+ }++ return {+ id: `${CAL_URL}/${slug}/${eventType.slug}`,+ type: "item",+ title: eventType.title,+ subtitle: `${slug}/${eventType.slug}`,+ rounded_image: false,+ disabled: false,+ action: {+ type: "submit",+ },+ };+ });++ const components: ListComponent = {+ type: "list",+ items: list,+ };++ const spacer: SpacerComponent = {+ type: "spacer",+ size: "m",+ };++ const text: TextComponent = {+ type: "text",+ text: "Or choose another Cal.com link:",+ style: "muted",+ align: "left",+ };++ const canvasData: NewCanvas = {+ canvas: {+ content: {+ components:+ isValid === true ? [components, spacer, text, input] : [isValid, components, spacer, text, input],+ },+ },+ };++ return res.status(200).json(canvasData);+}diff --git a/packages/app-store/intercom/api/index.ts b/packages/app-store/intercom/api/index.tsnew file mode 100644index 00000000000..11e6b478706--- /dev/null+++ b/packages/app-store/intercom/api/index.ts@@ -0,0 +1,4 @@+export { default as add } from "./add";+export { default as callback } from "./callback";+export { default as initialize } from "./initialize";+export { default as configure } from "./configure";diff --git a/packages/app-store/intercom/api/initialize.ts b/packages/app-store/intercom/api/initialize.tsnew file mode 100644index 00000000000..a5480c1209b--- /dev/null+++ b/packages/app-store/intercom/api/initialize.ts@@ -0,0 +1,32 @@+import type { NextApiRequest, NextApiResponse } from "next";++import type { NewCanvas } from "../lib";++export default async function handler(req: NextApiRequest, res: NextApiResponse) {+ const { card_creation_options } = req.body;++ if (!card_creation_options) return res.status(400).json({ message: "Missing card_creation_options" });++ const URL = card_creation_options.submit_booking_url;++ const canvasData: NewCanvas = {+ canvas: {+ content: {+ components: [+ {+ type: "button",+ id: "submit-issue-form",+ label: "Book a meeting",+ style: "primary",+ action: {+ type: "sheet",+ url: URL,+ },+ },+ ],+ },+ },+ };++ return res.status(200).json(canvasData);+}diff --git a/packages/app-store/intercom/components/.gitkeep b/packages/app-store/intercom/components/.gitkeepnew file mode 100644index 00000000000..e69de29bb2ddiff --git a/packages/app-store/intercom/config.json b/packages/app-store/intercom/config.jsonnew file mode 100644index 00000000000..5b4b0b01864--- /dev/null+++ b/packages/app-store/intercom/config.json@@ -0,0 +1,19 @@+{+ "/*": "Don't modify slug - If required, do it using cli edit command",+ "name": "Intercom",+ "slug": "intercom",+ "type": "intercom_automation",+ "logo": "icon.svg",+ "url": "https://github.com/vachmara",+ "variant": "automation",+ "categories": [+ "automation"+ ],+ "publisher": "Valentin Chmara",+ "email": "[email protected]",+ "description": "Enhance your scheduling and appointment management experience with the Intercom Integration for Cal.com.",+ "isTemplate": false,+ "__createdUsingCli": true,+ "__template": "basic",+ "dirName": "intercom"+}diff --git a/packages/app-store/intercom/index.ts b/packages/app-store/intercom/index.tsnew file mode 100644index 00000000000..d7f36022040--- /dev/null+++ b/packages/app-store/intercom/index.ts@@ -0,0 +1 @@+export * as api from "./api";diff --git a/packages/app-store/intercom/lib/index.ts b/packages/app-store/intercom/lib/index.tsnew file mode 100644index 00000000000..c4986b90755--- /dev/null+++ b/packages/app-store/intercom/lib/index.ts@@ -0,0 +1,66 @@+export interface CanvasComponent {+ type: string;+ disabled?: boolean;+}++export interface InputComponent extends CanvasComponent {+ type: "input";+ id: string;+ label: string;+ placeholder: string;+ save_state: "unsaved" | "saved";+ action: {+ type: "submit";+ };+ aria_label: string;+}++interface ButtonComponent extends CanvasComponent {+ type: "button";+ id: string;+ label: string;+ style: "primary" | "secondary" | "link";+ action: {+ type: "submit" | "sheet" | "url";+ url?: string;+ };+}++export interface SpacerComponent extends CanvasComponent {+ type: "spacer";+ size: "s" | "m" | "l";+}++export interface TextComponent extends CanvasComponent {+ type: "text";+ text: string;+ style: "header" | "body" | "error" | "muted";+ align: "left" | "center" | "right";+}++export interface ListItem {+ id: string;+ type: "item";+ title: string;+ subtitle: string;+ rounded_image: boolean;+ disabled: boolean;+ action: {+ type: "submit";+ };+}++export interface ListComponent extends CanvasComponent {+ type: "list";+ items: ListItem[];+}++export interface CanvasContent {+ components: (InputComponent | SpacerComponent | TextComponent | ListComponent | ButtonComponent)[];+}++export interface NewCanvas {+ canvas: {+ content: CanvasContent;+ };+}diff --git a/packages/app-store/intercom/lib/isValidCalURL.ts b/packages/app-store/intercom/lib/isValidCalURL.tsnew file mode 100644index 00000000000..c5690eabfad--- /dev/null+++ b/packages/app-store/intercom/lib/isValidCalURL.ts@@ -0,0 +1,87 @@+import { CAL_URL } from "@calcom/lib/constants";+import prisma from "@calcom/prisma";++import type { TextComponent } from "../lib";++/**+ * Check if the url is a valid cal.com url+ * @param url+ * @returns boolean+ */+export async function isValidCalURL(url: string) {+ const regex = new RegExp(`^${CAL_URL}/`, `i`);++ const error: TextComponent = {+ type: "text",+ text: `This is not a valid ${CAL_URL.replace("https://", "")} link`,+ style: "error",+ align: "left",+ };++ if (!regex.test(url)) return error;++ const urlWithoutCal = url.replace(regex, "");++ const urlParts = urlWithoutCal.split("/");+ const usernameOrTeamSlug = urlParts[0];+ const eventTypeSlug = urlParts[1];++ if (!usernameOrTeamSlug || !eventTypeSlug) return error;++ // Find all potential users with the given username+ const potentialUsers = await prisma.user.findMany({+ where: {+ username: usernameOrTeamSlug,+ },+ include: {+ eventTypes: {+ where: {+ slug: eventTypeSlug,+ hidden: false,+ },+ },+ },+ });++ // Find all potential teams with the given slug+ const potentialTeams = await prisma.team.findMany({+ where: {+ slug: usernameOrTeamSlug,+ },+ include: {+ eventTypes: {+ where: {+ slug: eventTypeSlug,+ hidden: false,+ },+ },+ },+ });++ // Check if any user has the matching eventTypeSlug+ const matchingUser = potentialUsers.find((user) => user.eventTypes.length > 0);++ // Check if any team has the matching eventTypeSlug+ const matchingTeam = potentialTeams.find((team) => team.eventTypes.length > 0);++ if (!matchingUser && !matchingTeam) return error;++ const userOrTeam = matchingUser || matchingTeam;++ if (!userOrTeam) return error;++ // Retrieve the correct user or team+ const userOrTeamId = userOrTeam.id;++ const eventType = await prisma.eventType.findFirst({+ where: {+ userId: userOrTeamId,+ slug: eventTypeSlug,+ hidden: false,+ },+ });++ if (!eventType) return error;++ return true;+}diff --git a/packages/app-store/intercom/package.json b/packages/app-store/intercom/package.jsonnew file mode 100644index 00000000000..6af828037bc--- /dev/null+++ b/packages/app-store/intercom/package.json@@ -0,0 +1,14 @@+{+ "$schema": "https://json.schemastore.org/package.json",+ "private": true,+ "name": "@calcom/intercom",+ "version": "0.0.0",+ "main": "./index.ts",+ "dependencies": {+ "@calcom/lib": "*"+ },+ "devDependencies": {+ "@calcom/types": "*"+ },+ "description": "Enhance your scheduling and appointment management experience with the Intercom Integration for Cal.com."+}diff --git a/packages/app-store/intercom/static/1.png b/packages/app-store/intercom/static/1.pngnew file mode 100644index 00000000000..a61e8e5e81fBinary files /dev/null and b/packages/app-store/intercom/static/1.png differdiff --git a/packages/app-store/intercom/static/2.png b/packages/app-store/intercom/static/2.pngnew file mode 100644index 00000000000..92e5b8f15afBinary files /dev/null and b/packages/app-store/intercom/static/2.png differdiff --git a/packages/app-store/intercom/static/3.png b/packages/app-store/intercom/static/3.pngnew file mode 100644index 00000000000..f3d34792c46Binary files /dev/null and b/packages/app-store/intercom/static/3.png differdiff --git a/packages/app-store/intercom/static/icon.svg b/packages/app-store/intercom/static/icon.svgnew file mode 100644index 00000000000..78706aa5c97--- /dev/null+++ b/packages/app-store/intercom/static/icon.svg@@ -0,0 +1 @@+<svg width="36" height="36" viewBox="0 0 228 228" fill="none" xmlns="http://www.w3.org/2000/svg" data-testid="intercom-isologo" class="jsx-1515150874 intercom-isologo"><path d="M343.101 78.9354C343.101 74.1788 339.432 70.2761 334.296 70.2761C329.16 70.2761 325.491 74.1788 325.491 78.9354V149.185C325.491 153.942 329.16 157.845 334.296 157.845C339.554 157.845 343.101 153.942 343.101 149.185V78.9354Z" fill="currentColor" class="jsx-1515150874"></path><path d="M429.808 70.2761C424.672 70.2761 421.125 74.1788 421.125 78.9354V108.938L421.614 135.77L410.975 110.645L397.034 82.1064C392.754 73.2031 387.863 70.2761 380.892 70.2761C370.62 70.2761 366.095 76.74 366.095 86.0091V149.185C366.095 153.942 369.641 157.845 374.778 157.845C379.914 157.845 383.46 153.942 383.46 149.185L383.338 119.549L382.971 89.1801L394.344 116.987L408.407 146.014C412.81 155.283 417.457 157.967 424.549 157.967C433.721 157.967 438.49 152.356 438.49 141.99V78.9354C438.49 74.1788 434.944 70.2761 429.808 70.2761Z" fill="currentColor" class="jsx-1515150874"></path><path d="M503.419 88.2044L523.352 88.6923C527.999 88.8142 531.668 85.2774 531.668 80.155C531.668 75.0326 527.999 71.4957 523.352 71.4957L465.631 71.3737C461.107 71.3737 457.316 74.9106 457.316 80.033C457.316 85.1554 461.107 88.6923 465.631 88.5703L485.687 88.2044V149.185C485.687 153.942 489.355 157.845 494.492 157.845C499.75 157.845 503.419 153.942 503.419 149.185V88.2044Z" fill="currentColor" class="jsx-1515150874"></path><path d="M562.512 156.747H605.435C609.96 156.747 613.629 153.332 613.629 148.575C613.629 143.697 609.96 140.282 605.435 140.282L568.137 140.404V120.036H600.421C604.824 120.036 608.37 116.743 608.37 112.231C608.37 107.596 604.824 104.303 600.421 104.303L568.137 104.547V87.7166H605.435C609.96 87.7166 613.629 84.3017 613.629 79.4232C613.629 74.5447 609.96 71.2518 605.435 71.2518L562.634 71.3737C554.807 71.3737 550.405 75.7643 550.405 83.5699V144.551C550.405 152.356 554.807 156.747 562.512 156.747Z" fill="currentColor" class="jsx-1515150874"></path><path d="M683.543 121.988C695.16 118.939 702.009 109.914 702.009 97.9614C702.009 84.6676 693.326 71.3737 672.537 71.3737H645.633C637.807 71.3737 633.404 75.7643 633.404 83.5699V149.185C633.404 153.942 637.073 157.845 642.454 157.845C647.712 157.845 651.503 153.942 651.503 149.185L651.381 126.256H666.178L681.219 153.332C683.665 157.479 688.801 159.186 693.571 156.747C698.34 154.186 699.685 149.063 697.117 144.917L683.543 121.988ZM651.381 87.5946H672.659C679.874 87.5946 684.399 92.1072 684.399 98.8151C684.399 105.401 680.119 110.28 672.904 110.28H651.381V87.5946Z" fill="currentColor" class="jsx-1515150874"></path><path d="M756.021 158.332C773.876 158.332 785.371 150.283 789.284 137.233C791.363 129.793 786.961 124.427 780.357 124.427C776.321 124.427 773.631 126.5 772.041 131.013C769.596 137.843 763.603 142.112 755.043 142.112C741.469 142.112 735.599 132.964 735.599 113.938C735.599 95.2782 741.591 86.375 755.043 86.375C763.481 86.375 768.373 89.9119 771.43 98.0833C773.142 102.718 775.955 104.791 780.112 104.791C786.471 104.791 791.118 99.6688 789.162 92.5951C785.249 78.2036 773.876 70.1541 755.532 70.1541C730.341 70.1541 717.5 85.5213 717.5 113.938C717.5 142.599 730.341 158.332 756.021 158.332Z" fill="currentColor" class="jsx-1515150874"></path><path d="M842.964 158.089C868.89 158.089 881.73 142.233 881.73 113.938C881.73 85.3993 868.523 69.6663 842.964 69.6663C817.284 69.6663 804.443 85.6432 804.321 113.938C804.321 142.355 817.406 158.089 842.964 158.089ZM842.964 141.746C828.534 141.746 822.298 132.599 822.298 113.938C822.298 95.0343 828.657 85.8872 842.842 85.8872C857.15 85.8872 863.876 95.0343 863.754 113.938C863.754 132.72 857.395 141.746 842.964 141.746Z" fill="currentColor" class="jsx-1515150874"></path><path d="M995.57 85.5213C995.57 75.8863 989.578 70.1541 980.284 70.1541C972.702 70.1541 966.955 74.3008 964.142 83.8138L954.726 114.426L948.489 136.501L942.497 114.426L932.469 83.8138C929.656 74.9106 924.765 70.1541 916.204 70.1541C906.788 70.1541 900.918 75.7643 900.918 85.5213V149.185C900.918 153.942 904.342 157.845 909.356 157.845C914.37 157.845 917.794 153.942 917.794 149.185L917.672 118.451L916.816 85.5213L926.477 119.183L936.749 148.941C938.95 155.527 943.108 157.723 948.489 157.723C953.503 157.723 957.538 155.893 959.617 149.185L969.4 119.183L979.795 85.2774L978.817 118.451V149.185C978.817 153.942 982.363 157.845 987.255 157.845C992.268 157.845 995.693 153.942 995.693 149.185L995.57 85.5213Z" fill="currentColor" class="jsx-1515150874"></path><path d="M197.946 125.463C197.946 127.496 197.145 129.445 195.719 130.882C194.293 132.319 192.359 133.127 190.342 133.127C188.325 133.127 186.391 132.319 184.965 130.882C183.539 129.445 182.738 127.496 182.738 125.463V57.0003C182.738 54.9679 183.539 53.0187 184.965 51.5816C186.391 50.1444 188.325 49.337 190.342 49.337C192.359 49.337 194.293 50.1444 195.719 51.5816C197.145 53.0187 197.946 54.9679 197.946 57.0003V125.463ZM195.306 172.9C194.301 173.913 166.023 197.663 114.18 197.663C62.3372 197.663 34.2477 174.04 33.0538 173.026C32.3014 172.387 31.6816 171.604 31.23 170.723C30.7784 169.841 30.5038 168.879 30.4221 167.89C30.3404 166.902 30.453 165.907 30.7537 164.962C31.0543 164.018 31.537 163.142 32.174 162.386V162.386C33.4864 160.856 35.3459 159.911 37.3471 159.756C39.3483 159.602 41.3288 160.252 42.8568 161.563C43.2967 161.88 68.5583 182.526 114.117 182.526C159.676 182.526 185.126 161.753 185.378 161.563C186.923 160.263 188.91 159.622 190.916 159.776C192.923 159.93 194.791 160.866 196.123 162.386C197.405 163.894 198.045 165.851 197.904 167.831C197.763 169.811 196.852 171.656 195.369 172.963L195.306 172.9ZM30.3517 57.0003C30.4653 54.9615 31.3752 53.0508 32.8824 51.6861C34.3896 50.3213 36.3716 49.6134 38.3952 49.717C40.2711 49.8244 42.0412 50.628 43.364 51.9729C44.6869 53.3178 45.4688 55.1088 45.5589 57.0003V125.337C45.5589 127.369 44.7578 129.318 43.3319 130.755C41.9059 132.193 39.9719 133 37.9553 133C35.9387 133 34.0047 132.193 32.5787 130.755C31.1528 129.318 30.3517 127.369 30.3517 125.337V57.0003ZM68.4955 41.8004C68.6091 39.7615 69.519 37.8509 71.0262 36.4862C72.5334 35.1214 74.5154 34.4135 76.539 34.5171C78.4149 34.6245 80.185 35.4281 81.5078 36.773C82.8307 38.1179 83.6126 39.9088 83.7027 41.8004V143.133C83.7027 145.166 82.9016 147.115 81.4757 148.552C80.0497 149.989 78.1157 150.796 76.0991 150.796C74.0825 150.796 72.1485 149.989 70.7225 148.552C69.2966 147.115 68.4955 145.166 68.4955 143.133V41.8004ZM106.828 38.0004C106.828 35.968 107.629 34.0188 109.055 32.5817C110.481 31.1445 112.415 30.3371 114.431 30.3371C116.448 30.3371 118.382 31.1445 119.808 32.5817C121.234 34.0188 122.035 35.968 122.035 38.0004V148.2C122.035 150.232 121.234 152.181 119.808 153.619C118.382 155.056 116.448 155.863 114.431 155.863C112.415 155.863 110.481 155.056 109.055 153.619C107.629 152.181 106.828 150.232 106.828 148.2V38.0004ZM144.532 41.8004C144.532 39.768 145.333 37.8188 146.759 36.3816C148.185 34.9445 150.119 34.1371 152.135 34.1371C154.152 34.1371 156.086 34.9445 157.512 36.3816C158.938 37.8188 159.739 39.768 159.739 41.8004V143.133C159.739 145.166 158.938 147.115 157.512 148.552C156.086 149.989 154.152 150.796 152.135 150.796C150.119 150.796 148.185 149.989 146.759 148.552C145.333 147.115 144.532 145.166 144.532 143.133V41.8004ZM200.019 0.00063243H28.5921C24.8568 -0.024391 21.1533 0.693392 17.6937 2.11288C14.234 3.53237 11.0861 5.6257 8.43022 8.27299C5.77436 10.9203 3.66268 14.0695 2.2161 17.5405C0.769518 21.0114 0.0164457 24.7358 0 28.5005L0 199.5C0.0164457 203.264 0.769518 206.989 2.2161 210.46C3.66268 213.93 5.77436 217.08 8.43022 219.727C11.0861 222.374 14.234 224.468 17.6937 225.887C21.1533 227.307 24.8568 228.024 28.5921 227.999H200.019C203.749 228.024 207.448 227.309 210.903 225.893C214.359 224.478 217.504 222.39 220.159 219.749C222.814 217.109 224.927 213.967 226.377 210.503C227.828 207.04 228.587 203.322 228.611 199.563V199.563V28.5005C228.595 24.7412 227.844 21.022 226.401 17.5552C224.959 14.0884 222.853 10.942 220.203 8.29549C217.554 5.64903 214.414 3.55438 210.961 2.13115C207.509 0.707912 203.812 -0.0160384 200.082 0.00063243V0.00063243" fill="currentColor" class="jsx-1515150874"></path></svg>\ No newline at end of filediff --git a/packages/app-store/intercom/zod.ts b/packages/app-store/intercom/zod.tsnew file mode 100644index 00000000000..103cde7c29d--- /dev/null+++ b/packages/app-store/intercom/zod.ts@@ -0,0 +1,8 @@+import { z } from "zod";++export const appDataSchema = z.object({});++export const appKeysSchema = z.object({+ client_id: z.string(),+ client_secret: z.string(),+});