Skip to content

Commit

Permalink
[Search] Add Slack and Gmail connectors (elastic#163321)
Browse files Browse the repository at this point in the history
## Summary

This adds Slack and Gmail as Tech Preview connectors.
  • Loading branch information
sphilipse authored Aug 10, 2023
1 parent 294ff34 commit 1d9f76b
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 38 deletions.
22 changes: 22 additions & 0 deletions x-pack/plugins/enterprise_search/common/connectors/connectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,17 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [
}),
serviceType: 'dropbox',
},
{
iconPath: 'gmail.svg',
isBeta: false,
isNative: false,
isTechPreview: true,
keywords: ['google', 'gmail', 'connector', 'mail'],
name: i18n.translate('xpack.enterpriseSearch.content.nativeConnectors.gmail.name', {
defaultMessage: 'Gmail',
}),
serviceType: 'gmail',
},
{
iconPath: 'oracle.svg',
isBeta: true,
Expand Down Expand Up @@ -181,6 +192,17 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [
}),
serviceType: 'servicenow',
},
{
iconPath: 'slack.svg',
isBeta: false,
isNative: false,
isTechPreview: true,
keywords: ['slack', 'connector'],
name: i18n.translate('xpack.enterpriseSearch.content.nativeConnectors.slack.name', {
defaultMessage: 'Slack',
}),
serviceType: 'slack',
},
{
iconPath: 'sharepoint_server.svg',
isBeta: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ export const CONNECTORS_DICT: Record<string, ConnectorClientSideDefinition> = {
externalDocsUrl: '',
icon: CONNECTOR_ICONS.dropbox,
},
gmail: {
docsUrl: '', // TODO
externalAuthDocsUrl: '',
externalDocsUrl: '',
icon: CONNECTOR_ICONS.gmail,
},
google_cloud_storage: {
docsUrl: docLinks.connectorsGoogleCloudStorage,
externalAuthDocsUrl: 'https://cloud.google.com/storage/docs/authentication',
Expand Down Expand Up @@ -118,6 +124,13 @@ export const CONNECTORS_DICT: Record<string, ConnectorClientSideDefinition> = {
icon: CONNECTOR_ICONS.sharepoint_online,
platinumOnly: true,
},
slack: {
docsUrl: '', // TODO
externalAuthDocsUrl: '',
externalDocsUrl: '',
icon: CONNECTOR_ICONS.slack,
platinumOnly: true,
},
};

export const CONNECTORS = CONNECTOR_DEFINITIONS.map((connector) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import confluence_cloud from '../../../assets/source_icons/confluence_cloud.svg'
import custom from '../../../assets/source_icons/custom.svg';
import dropbox from '../../../assets/source_icons/dropbox.svg';
import github from '../../../assets/source_icons/github.svg';
import gmail from '../../../assets/source_icons/gmail.svg';
import google_cloud_storage from '../../../assets/source_icons/google_cloud_storage.svg';
import google_drive from '../../../assets/source_icons/google_drive.svg';
import jira_cloud from '../../../assets/source_icons/jira_cloud.svg';
Expand All @@ -23,6 +24,7 @@ import amazon_s3 from '../../../assets/source_icons/s3.svg';
import servicenow from '../../../assets/source_icons/servicenow.svg';
import sharepoint from '../../../assets/source_icons/sharepoint.svg';
import sharepoint_online from '../../../assets/source_icons/sharepoint_online.svg';
import slack from '../../../assets/source_icons/slack.svg';

export const CONNECTOR_ICONS = {
amazon_s3,
Expand All @@ -31,6 +33,7 @@ export const CONNECTOR_ICONS = {
custom,
dropbox,
github,
gmail,
google_cloud_storage,
google_drive,
jira_cloud,
Expand All @@ -43,4 +46,5 @@ export const CONNECTOR_ICONS = {
servicenow,
sharepoint,
sharepoint_online,
slack,
};
68 changes: 42 additions & 26 deletions x-pack/plugins/enterprise_search/server/integrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,6 @@ const workplaceSearchIntegrations: WorkplaceSearchIntegration[] = [
),
categories: ['enterprise_search', 'workplace_search_content_source'],
},
{
id: 'gmail',
title: i18n.translate('xpack.enterpriseSearch.workplaceSearch.integrations.gmailName', {
defaultMessage: 'Gmail',
}),
description: i18n.translate(
'xpack.enterpriseSearch.workplaceSearch.integrations.gmailDescription',
{
defaultMessage: 'Search over your emails managed by Gmail with Workplace Search.',
}
),
categories: ['enterprise_search', 'google_cloud', 'workplace_search_content_source'],
},
{
id: 'onedrive',
title: i18n.translate('xpack.enterpriseSearch.workplaceSearch.integrations.onedriveName', {
Expand Down Expand Up @@ -77,19 +64,6 @@ const workplaceSearchIntegrations: WorkplaceSearchIntegration[] = [
),
categories: ['enterprise_search', 'workplace_search_content_source'],
},
{
id: 'slack',
title: i18n.translate('xpack.enterpriseSearch.workplaceSearch.integrations.slackName', {
defaultMessage: 'Slack',
}),
description: i18n.translate(
'xpack.enterpriseSearch.workplaceSearch.integrations.slackDescription',
{
defaultMessage: 'Search over your messages on Slack with Workplace Search.',
}
),
categories: ['enterprise_search', 'workplace_search_content_source'],
},
{
id: 'zendesk',
title: i18n.translate('xpack.enterpriseSearch.workplaceSearch.integrations.zendeskName', {
Expand Down Expand Up @@ -303,6 +277,27 @@ export const registerEnterpriseSearchIntegrations = (
isBeta: false,
});

customIntegrations.registerCustomIntegration({
id: 'gmail',
title: i18n.translate('xpack.enterpriseSearch.content.integrations.gmail', {
defaultMessage: 'Gmail',
}),
description: i18n.translate('xpack.enterpriseSearch.content.integrations.gmailDescription', {
defaultMessage: 'Search over your content on Gmail.',
}),
categories: ['enterprise_search', 'elastic_stack', 'connector', 'connector_client'],
uiInternalPath:
'/app/enterprise_search/content/search_indices/new_index/connector?service_type=gmail',
icons: [
{
type: 'svg',
src: http.basePath.prepend('/plugins/enterpriseSearch/assets/source_icons/gmail.svg'),
},
],
shipper: 'enterprise_search',
isBeta: false,
});

customIntegrations.registerCustomIntegration({
id: 'mongodb',
title: i18n.translate('xpack.enterpriseSearch.workplaceSearch.integrations.mongoDBName', {
Expand Down Expand Up @@ -547,6 +542,27 @@ export const registerEnterpriseSearchIntegrations = (
isBeta: false,
});

customIntegrations.registerCustomIntegration({
id: 'slack',
title: i18n.translate('xpack.enterpriseSearch.content.integrations.slack', {
defaultMessage: 'Slack',
}),
description: i18n.translate('xpack.enterpriseSearch.content.integrations.slackDescription', {
defaultMessage: 'Search over your content on Slack.',
}),
categories: ['enterprise_search', 'elastic_stack', 'connector', 'connector_client'],
uiInternalPath:
'/app/enterprise_search/content/search_indices/new_index/connector?service_type=slack',
icons: [
{
type: 'svg',
src: http.basePath.prepend('/plugins/enterpriseSearch/assets/source_icons/slack.svg'),
},
],
shipper: 'enterprise_search',
isBeta: false,
});

customIntegrations.registerCustomIntegration({
id: 'oracle',
title: i18n.translate('xpack.enterpriseSearch.workplaceSearch.integrations.oracleName', {
Expand Down
4 changes: 0 additions & 4 deletions x-pack/plugins/translations/translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -14873,8 +14873,6 @@
"xpack.enterpriseSearch.workplaceSearch.integrations.azureBlobDescription": "Effectuez des recherches sur votre contenu sur Stockage Blob Azure avec Enterprise Search.",
"xpack.enterpriseSearch.workplaceSearch.integrations.boxDescription": "Effectuez des recherches dans vos fichiers et dossiers stockés sur Box avec Workplace Search.",
"xpack.enterpriseSearch.workplaceSearch.integrations.boxName": "Box",
"xpack.enterpriseSearch.workplaceSearch.integrations.gmailDescription": "Effectuez des recherches dans vos e-mails gérés par Gmail avec Workplace Search.",
"xpack.enterpriseSearch.workplaceSearch.integrations.gmailName": "Gmail",
"xpack.enterpriseSearch.workplaceSearch.integrations.googleCloud": "Google Cloud Storage",
"xpack.enterpriseSearch.workplaceSearch.integrations.googleCloudDescription": "Effectuez des recherches sur votre contenu sur Google Cloud Storage avec Enterprise Search.",
"xpack.enterpriseSearch.workplaceSearch.integrations.googleDriveDescription": "Effectuez des recherches dans vos documents sur Google Drive avec Workplace Search.",
Expand All @@ -14900,8 +14898,6 @@
"xpack.enterpriseSearch.workplaceSearch.integrations.sharepointOnlineName": "SharePoint Online",
"xpack.enterpriseSearch.workplaceSearch.integrations.sharepointServerDescription": "Effectuez des recherches dans vos fichiers stockés sur le serveur Microsoft SharePoint avec Workplace Search.",
"xpack.enterpriseSearch.workplaceSearch.integrations.sharepointServerName": "Serveur SharePoint",
"xpack.enterpriseSearch.workplaceSearch.integrations.slackDescription": "Effectuez des recherches dans vos messages sur Slack avec Workplace Search.",
"xpack.enterpriseSearch.workplaceSearch.integrations.slackName": "Slack",
"xpack.enterpriseSearch.workplaceSearch.integrations.zendeskDescription": "Effectuez des recherches dans vos tickets sur Zendesk avec Workplace Search.",
"xpack.enterpriseSearch.workplaceSearch.integrations.zendeskName": "Zendesk",
"xpack.enterpriseSearch.workplaceSearch.keepEditing.button": "Continuer la modification",
Expand Down
4 changes: 0 additions & 4 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -14887,8 +14887,6 @@
"xpack.enterpriseSearch.workplaceSearch.integrations.azureBlobDescription": "エンタープライズ サーチでAzure Blob Storageのコンテンツを検索します。",
"xpack.enterpriseSearch.workplaceSearch.integrations.boxDescription": "Workplace Searchを使用して、Boxに保存されたファイルとフォルダーを検索します。",
"xpack.enterpriseSearch.workplaceSearch.integrations.boxName": "Box",
"xpack.enterpriseSearch.workplaceSearch.integrations.gmailDescription": "Workplace Searchを使用して、Gmailで管理された電子メールを検索します。",
"xpack.enterpriseSearch.workplaceSearch.integrations.gmailName": "Gmail",
"xpack.enterpriseSearch.workplaceSearch.integrations.googleCloud": "Google Cloud Storage",
"xpack.enterpriseSearch.workplaceSearch.integrations.googleCloudDescription": "エンタープライズ サーチでGoogle Cloud Storageのコンテンツを検索します。",
"xpack.enterpriseSearch.workplaceSearch.integrations.googleDriveDescription": "Workplace Searchを使用して、Google Driveのドキュメントを検索します。",
Expand All @@ -14914,8 +14912,6 @@
"xpack.enterpriseSearch.workplaceSearch.integrations.sharepointOnlineName": "SharePoint Online",
"xpack.enterpriseSearch.workplaceSearch.integrations.sharepointServerDescription": "Workplace Searchを使用して、Microsoft SharePoint Serverに保存されたファイルを検索します。",
"xpack.enterpriseSearch.workplaceSearch.integrations.sharepointServerName": "SharePoint Server",
"xpack.enterpriseSearch.workplaceSearch.integrations.slackDescription": "Workplace Searchを使用して、Slackのメッセージを検索します。",
"xpack.enterpriseSearch.workplaceSearch.integrations.slackName": "Slack",
"xpack.enterpriseSearch.workplaceSearch.integrations.zendeskDescription": "Workplace Searchを使用して、Zendeskのチケットを検索します。",
"xpack.enterpriseSearch.workplaceSearch.integrations.zendeskName": "Zendesk",
"xpack.enterpriseSearch.workplaceSearch.keepEditing.button": "編集を続行",
Expand Down
4 changes: 0 additions & 4 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -14887,8 +14887,6 @@
"xpack.enterpriseSearch.workplaceSearch.integrations.azureBlobDescription": "使用 Enterprise Search 在 Azure Blob 存储上搜索您的内容。",
"xpack.enterpriseSearch.workplaceSearch.integrations.boxDescription": "通过 Workplace Search 搜索存储在 Box 上的文件和文件夹。",
"xpack.enterpriseSearch.workplaceSearch.integrations.boxName": "Box",
"xpack.enterpriseSearch.workplaceSearch.integrations.gmailDescription": "通过 Workplace Search 搜索由 Gmail 管理的电子邮件。",
"xpack.enterpriseSearch.workplaceSearch.integrations.gmailName": "Gmail",
"xpack.enterpriseSearch.workplaceSearch.integrations.googleCloud": "Google Cloud Storage",
"xpack.enterpriseSearch.workplaceSearch.integrations.googleCloudDescription": "使用 Enterprise Search 在 Google Cloud Storage 上搜索您的内容。",
"xpack.enterpriseSearch.workplaceSearch.integrations.googleDriveDescription": "通过 Workplace Search 搜索 Google 云端硬盘上的文档。",
Expand All @@ -14914,8 +14912,6 @@
"xpack.enterpriseSearch.workplaceSearch.integrations.sharepointOnlineName": "Sharepoint",
"xpack.enterpriseSearch.workplaceSearch.integrations.sharepointServerDescription": "通过 Workplace Search 搜索存储在 Microsoft SharePoint Server 上的文件。",
"xpack.enterpriseSearch.workplaceSearch.integrations.sharepointServerName": "SharePoint Server",
"xpack.enterpriseSearch.workplaceSearch.integrations.slackDescription": "通过 Workplace Search 搜索 Slack 上的消息。",
"xpack.enterpriseSearch.workplaceSearch.integrations.slackName": "Slack",
"xpack.enterpriseSearch.workplaceSearch.integrations.zendeskDescription": "通过 Workplace Search 搜索 Zendesk 上的工单。",
"xpack.enterpriseSearch.workplaceSearch.integrations.zendeskName": "Zendesk",
"xpack.enterpriseSearch.workplaceSearch.keepEditing.button": "继续编辑",
Expand Down

0 comments on commit 1d9f76b

Please sign in to comment.