Skip to content

Commit

Permalink
Intercom Connector - Front changes (#3203)
Browse files Browse the repository at this point in the history
  • Loading branch information
PopDaph authored Jan 15, 2024
1 parent 675f1d5 commit 0b709fd
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 3 deletions.
13 changes: 13 additions & 0 deletions connectors/src/connectors/intercom/lib/utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export function getHelpCenterCollectionDocumentId(
intercomWorkspaceId: string,
collectionId: string
): string {
return `intercom-help-center-collection-${intercomWorkspaceId}-${collectionId}`;
}

export function getHelpCenterArticleDocumentId(
intercomWorkspaceId: string,
articleId: string
): string {
return `intercom-help-center-article-${intercomWorkspaceId}-${articleId}`;
}
1 change: 1 addition & 0 deletions front/components/ConnectorPermissionsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const PERMISSIONS_EDITABLE_CONNECTOR_TYPES: Set<ConnectorProvider> = new Set([
"confluence",
"slack",
"google_drive",
"intercom",
]);

export default function ConnectorPermissionsModal({
Expand Down
5 changes: 4 additions & 1 deletion front/components/ConnectorPermissionsTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ const CONNECTOR_TYPE_TO_PERMISSIONS: Record<
},
notion: undefined,
github: undefined,
intercom: undefined,
intercom: {
selected: "read",
unselected: "none",
},
webcrawler: undefined,
};

Expand Down
2 changes: 1 addition & 1 deletion front/pages/w/[wId]/builder/data-sources/[name]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,7 @@ function ManagedDataSourceView({
case "confluence":
case "google_drive":
case "slack":
case "intercom":
return (
<>
<Button
Expand All @@ -753,7 +754,6 @@ function ManagedDataSourceView({
);
case "notion":
case "github":
case "intercom":
return (
<Button
label="Add / Remove data, manage permissions"
Expand Down
7 changes: 6 additions & 1 deletion front/pages/w/[wId]/builder/data-sources/managed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ type DataSourceIntegration = {
setupWithSuffix: string | null;
};

const REDIRECT_TO_EDIT_PERMISSIONS = ["confluence", "google_drive", "slack"];
const REDIRECT_TO_EDIT_PERMISSIONS = [
"confluence",
"google_drive",
"slack",
"intercom",
];

export const getServerSideProps: GetServerSideProps<{
user: UserType | null;
Expand Down

0 comments on commit 0b709fd

Please sign in to comment.