diff --git a/front/components/poke/plans/form.tsx b/front/components/poke/plans/form.tsx
index 65384d069d08a..c291cc289ac68 100644
--- a/front/components/poke/plans/form.tsx
+++ b/front/components/poke/plans/form.tsx
@@ -4,6 +4,7 @@ import {
DropdownMenu,
GithubLogo,
Input,
+ IntercomLogo,
NotionLogo,
SlackLogo,
} from "@dust-tt/sparkle";
@@ -21,6 +22,7 @@ export type EditingPlanType = {
isNotionAllowed: boolean;
isGoogleDriveAllowed: boolean;
isGithubAllowed: boolean;
+ isIntercomAllowed: boolean;
maxMessages: string | number;
dataSourcesCount: string | number;
dataSourcesDocumentsCount: string | number;
@@ -40,6 +42,7 @@ export const fromPlanType = (plan: PlanType): EditingPlanType => {
isNotionAllowed: plan.limits.connections.isNotionAllowed,
isGoogleDriveAllowed: plan.limits.connections.isGoogleDriveAllowed,
isGithubAllowed: plan.limits.connections.isGithubAllowed,
+ isIntercomAllowed: plan.limits.connections.isIntercomAllowed,
maxMessages: plan.limits.assistant.maxMessages,
dataSourcesCount: plan.limits.dataSources.count,
dataSourcesDocumentsCount: plan.limits.dataSources.documents.count,
@@ -64,6 +67,7 @@ export const toPlanType = (editingPlan: EditingPlanType): PlanType => {
isNotionAllowed: editingPlan.isNotionAllowed,
isGoogleDriveAllowed: editingPlan.isGoogleDriveAllowed,
isGithubAllowed: editingPlan.isGithubAllowed,
+ isIntercomAllowed: editingPlan.isIntercomAllowed,
},
dataSources: {
count: parseInt(editingPlan.dataSourcesCount.toString(), 10),
@@ -92,6 +96,7 @@ const getEmptyPlan = (): EditingPlanType => ({
isNotionAllowed: false,
isGoogleDriveAllowed: false,
isGithubAllowed: false,
+ isIntercomAllowed: false,
maxMessages: "",
dataSourcesCount: "",
dataSourcesDocumentsCount: "",
@@ -199,6 +204,12 @@ export const PLAN_FIELDS = {
title: "Github",
IconComponent: () => ,
},
+ isIntercomAllowed: {
+ type: "boolean",
+ width: "tiny",
+ title: "Intercom",
+ IconComponent: () => ,
+ },
maxMessages: {
type: "number",
width: "medium",
diff --git a/front/lib/connector_providers.ts b/front/lib/connector_providers.ts
index 4a2897a4bd78e..7f872fd843e89 100644
--- a/front/lib/connector_providers.ts
+++ b/front/lib/connector_providers.ts
@@ -1,6 +1,13 @@
-import { DriveLogo, GithubLogo, NotionLogo, SlackLogo } from "@dust-tt/sparkle";
+import {
+ DriveLogo,
+ GithubLogo,
+ IntercomLogo,
+ NotionLogo,
+ SlackLogo,
+} from "@dust-tt/sparkle";
import { ConnectorProvider } from "@app/lib/connectors_api";
+import { isDevelopment } from "@app/lib/development";
export const CONNECTOR_CONFIGURATIONS: Record<
ConnectorProvider,
@@ -47,11 +54,21 @@ export const CONNECTOR_CONFIGURATIONS: Record<
github: {
name: "GitHub",
connectorProvider: "github",
- isBuilt: true,
+ isBuilt: isDevelopment(), // TODO @daph Activate Intercom connector
logoPath: "/static/github_black_32x32.png",
description:
"Authorize access to your company's GitHub on a repository-by-repository basis. Dust can access Issues, Discussions, and Pull Request threads. We're working on adding support for code indexing.",
logoComponent: GithubLogo,
isNested: false,
},
+ intercom: {
+ name: "Intercom",
+ connectorProvider: "intercom",
+ isBuilt: true,
+ logoPath: "/static/intercom_32x32.png",
+ description:
+ "Authorize access to your company's Intercom. Dust can access your Intercom Knowledge Base. Dust does not access Intercom conversations.",
+ logoComponent: IntercomLogo,
+ isNested: false,
+ },
};
diff --git a/front/lib/connectors_api.ts b/front/lib/connectors_api.ts
index 57dc67011e50e..c4bbd96dc4532 100644
--- a/front/lib/connectors_api.ts
+++ b/front/lib/connectors_api.ts
@@ -22,12 +22,14 @@ const CONNECTOR_PROVIDERS = [
"notion",
"github",
"google_drive",
+ "intercom",
] as const;
export type ConnectorProvider = (typeof CONNECTOR_PROVIDERS)[number];
export const CONNECTOR_PROVIDERS_USING_NANGO = [
"slack",
"notion",
"google_drive",
+ "intercom",
] as const;
type ConnectorProviderUsingNango =
(typeof CONNECTOR_PROVIDERS_USING_NANGO)[number];
diff --git a/front/lib/models/plan.ts b/front/lib/models/plan.ts
index b2d6178adeeee..1cc57631d25cb 100644
--- a/front/lib/models/plan.ts
+++ b/front/lib/models/plan.ts
@@ -41,6 +41,7 @@ export class Plan extends Model<
declare isManagedNotionAllowed: boolean;
declare isManagedGoogleDriveAllowed: boolean;
declare isManagedGithubAllowed: boolean;
+ declare isManagedIntercomAllowed: boolean;
declare maxDataSourcesCount: number;
declare maxDataSourcesDocumentsCount: number;
declare maxDataSourcesDocumentsSizeMb: number;
@@ -110,6 +111,10 @@ Plan.init(
type: DataTypes.BOOLEAN,
defaultValue: false,
},
+ isManagedIntercomAllowed: {
+ type: DataTypes.BOOLEAN,
+ defaultValue: false,
+ },
maxDataSourcesCount: {
type: DataTypes.INTEGER,
allowNull: false,
diff --git a/front/lib/plans/enterprise_plans.ts b/front/lib/plans/enterprise_plans.ts
index 8831809d3c898..cd03ffbdfc63a 100644
--- a/front/lib/plans/enterprise_plans.ts
+++ b/front/lib/plans/enterprise_plans.ts
@@ -30,6 +30,7 @@ export const ENT_PLAN_FAKE_DATA: PlanAttributes = {
isManagedNotionAllowed: true,
isManagedGoogleDriveAllowed: true,
isManagedGithubAllowed: true,
+ isManagedIntercomAllowed: true,
maxDataSourcesCount: -1,
maxDataSourcesDocumentsCount: -1,
maxDataSourcesDocumentsSizeMb: 2,
diff --git a/front/lib/plans/free_plans.ts b/front/lib/plans/free_plans.ts
index 7faa4817ce8df..2ecafacc13e54 100644
--- a/front/lib/plans/free_plans.ts
+++ b/front/lib/plans/free_plans.ts
@@ -36,6 +36,7 @@ export const FREE_TEST_PLAN_DATA: PlanAttributes = {
isManagedNotionAllowed: false,
isManagedGoogleDriveAllowed: false,
isManagedGithubAllowed: false,
+ isManagedIntercomAllowed: false,
maxDataSourcesCount: 5,
maxDataSourcesDocumentsCount: 10,
maxDataSourcesDocumentsSizeMb: 2,
@@ -58,6 +59,7 @@ const FREE_PLANS_DATA: PlanAttributes[] = [
isManagedNotionAllowed: true,
isManagedGoogleDriveAllowed: true,
isManagedGithubAllowed: true,
+ isManagedIntercomAllowed: true,
maxDataSourcesCount: -1,
maxDataSourcesDocumentsCount: -1,
maxDataSourcesDocumentsSizeMb: 2,
diff --git a/front/lib/plans/pro_plans.ts b/front/lib/plans/pro_plans.ts
index fa0275fb1082d..59ef0640f9fcd 100644
--- a/front/lib/plans/pro_plans.ts
+++ b/front/lib/plans/pro_plans.ts
@@ -40,6 +40,7 @@ if (isDevelopment()) {
isManagedNotionAllowed: true,
isManagedGoogleDriveAllowed: true,
isManagedGithubAllowed: true,
+ isManagedIntercomAllowed: true,
maxDataSourcesCount: -1,
maxDataSourcesDocumentsCount: -1,
maxDataSourcesDocumentsSizeMb: 2,
diff --git a/front/package-lock.json b/front/package-lock.json
index 7845936f8f72d..b7774f4223647 100644
--- a/front/package-lock.json
+++ b/front/package-lock.json
@@ -4,9 +4,8 @@
"requires": true,
"packages": {
"": {
- "name": "front",
"dependencies": {
- "@dust-tt/sparkle": "^0.2.41",
+ "@dust-tt/sparkle": "^0.2.43",
"@emoji-mart/data": "^1.1.2",
"@emoji-mart/react": "^1.1.1",
"@headlessui/react": "^1.7.7",
@@ -861,9 +860,9 @@
"integrity": "sha512-smLocSfrt3s53H/XSVP3/1kP42oqvrkjUPtyaFd1F79ux24oE31BKt+q0c6lsa6hOYrFzsIwyc5GXAI5JmfOew=="
},
"node_modules/@dust-tt/sparkle": {
- "version": "0.2.41",
- "resolved": "https://registry.npmjs.org/@dust-tt/sparkle/-/sparkle-0.2.41.tgz",
- "integrity": "sha512-BoTyj6g9YwoFssRjkMi5RJA6KETpc3TBpNpqpDedcwoTnXcfLovuas8zBLbOdwJOkMitfKQfpHqTcRpGlUsQlw==",
+ "version": "0.2.43",
+ "resolved": "https://registry.npmjs.org/@dust-tt/sparkle/-/sparkle-0.2.43.tgz",
+ "integrity": "sha512-eB3Nl3DCOB7ggIy3kAUQTLKg1lDFzWtsy/Oq0XxukPv5pM66s5BHNNvceaBPWnD3UJFFqmRuABumkchMNvZ0OA==",
"dependencies": {
"@headlessui/react": "^1.7.17"
},
diff --git a/front/package.json b/front/package.json
index 9a69d8a23738e..b2bb603fc8652 100644
--- a/front/package.json
+++ b/front/package.json
@@ -13,7 +13,7 @@
"initdb": "env $(cat .env.local) npx tsx admin/db.ts"
},
"dependencies": {
- "@dust-tt/sparkle": "^0.2.41",
+ "@dust-tt/sparkle": "^0.2.43",
"@emoji-mart/data": "^1.1.2",
"@emoji-mart/react": "^1.1.1",
"@headlessui/react": "^1.7.7",
diff --git a/front/pages/api/w/[wId]/data_sources/managed.ts b/front/pages/api/w/[wId]/data_sources/managed.ts
index 8b8d2695478af..0837fcee125f1 100644
--- a/front/pages/api/w/[wId]/data_sources/managed.ts
+++ b/front/pages/api/w/[wId]/data_sources/managed.ts
@@ -82,7 +82,7 @@ async function handler(
if (
!req.body.provider ||
- !["slack", "notion", "github", "google_drive"].includes(
+ !["slack", "notion", "github", "google_drive", "intercom"].includes(
req.body.provider
)
) {
@@ -133,6 +133,9 @@ async function handler(
isDataSourceAllowedInPlan =
plan.limits.connections.isGoogleDriveAllowed;
break;
+ case "intercom":
+ isDataSourceAllowedInPlan = plan.limits.connections.isIntercomAllowed;
+ break;
default:
isDataSourceAllowedInPlan = false; // default to false if provider is not recognized
}
diff --git a/front/pages/w/[wId]/builder/data-sources/[name]/index.tsx b/front/pages/w/[wId]/builder/data-sources/[name]/index.tsx
index e5d834b327ed0..24e94fd0524ee 100644
--- a/front/pages/w/[wId]/builder/data-sources/[name]/index.tsx
+++ b/front/pages/w/[wId]/builder/data-sources/[name]/index.tsx
@@ -49,6 +49,7 @@ const {
NANGO_SLACK_CONNECTOR_ID = "",
NANGO_NOTION_CONNECTOR_ID = "",
NANGO_GOOGLE_DRIVE_CONNECTOR_ID = "",
+ NANGO_INTERCOM_CONNECTOR_ID = "",
NANGO_PUBLIC_KEY = "",
GITHUB_APP_URL = "",
} = process.env;
@@ -67,6 +68,7 @@ export const getServerSideProps: GetServerSideProps<{
slackConnectorId: string;
notionConnectorId: string;
googleDriveConnectorId: string;
+ intercomConnectorId: string;
};
githubAppUrl: string;
gaTrackingId: string;
@@ -125,6 +127,7 @@ export const getServerSideProps: GetServerSideProps<{
slackConnectorId: NANGO_SLACK_CONNECTOR_ID,
notionConnectorId: NANGO_NOTION_CONNECTOR_ID,
googleDriveConnectorId: NANGO_GOOGLE_DRIVE_CONNECTOR_ID,
+ intercomConnectorId: NANGO_INTERCOM_CONNECTOR_ID,
},
githubAppUrl: GITHUB_APP_URL,
gaTrackingId: GA_TRACKING_ID,
@@ -434,6 +437,7 @@ const CONNECTOR_TYPE_TO_HELPER_TEXT: Record = {
google_drive: "Google Drive folders and files Dust has access to.",
slack: "Slack channels synchronized with Dust:",
github: "GitHub repositories Dust has access to.",
+ intercom: "Intercom Help Centers synchronized with Dust:",
};
const CONNECTOR_TYPE_TO_MISMATCH_ERROR: Record = {
@@ -444,6 +448,8 @@ const CONNECTOR_TYPE_TO_MISMATCH_ERROR: Record = {
"You cannot select another Github Organization.\nPlease contact us at team@dust.tt if you initially selected a wrong Organization.",
google_drive:
"You cannot select another Google Drive Domain.\nPlease contact us at team@dust.tt if you initially selected a wrong shared Drive.",
+ intercom:
+ "You cannot select another Intercom Workspace.\nPlease contact us at team@dust.tt if you initially selected a wrong Workspace.",
};
function ManagedDataSourceView({
@@ -466,6 +472,7 @@ function ManagedDataSourceView({
slackConnectorId: string;
notionConnectorId: string;
googleDriveConnectorId: string;
+ intercomConnectorId: string;
};
githubAppUrl: string;
plan: PlanType;
@@ -518,6 +525,7 @@ function ManagedDataSourceView({
slack: nangoConfig.slackConnectorId,
notion: nangoConfig.notionConnectorId,
google_drive: nangoConfig.googleDriveConnectorId,
+ intercom: nangoConfig.intercomConnectorId,
}[provider];
const nango = new Nango({ publicKey: nangoConfig.publicKey });
@@ -670,6 +678,7 @@ function ManagedDataSourceView({
);
case "notion":
case "github":
+ case "intercom":
return (