Skip to content

Commit

Permalink
[Enterprise Search][Connectors] Add missing RCFs for Google Drive (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
jedrazb authored Oct 16, 2023
1 parent 167605e commit de13e23
Showing 1 changed file with 106 additions and 4 deletions.
110 changes: 106 additions & 4 deletions packages/kbn-search-connectors/types/native_connectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -776,13 +776,111 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record<string, NativeConnector | unde
validations: [],
value: '',
},
use_domain_wide_delegation_for_sync: {
default_value: null,
depends_on: [],
display: DisplayType.TOGGLE,
label: i18n.translate(
'searchConnectors.nativeConnectors.gdrive.useDomainWideDelegation.label',
{
defaultMessage: 'Use domain-wide delegation for data sync',
}
),
options: [],
order: 2,
required: true,
sensitive: false,
tooltip: i18n.translate(
'searchConnectors.nativeConnectors.gdrive.useDomainWideDelegation.tooltip',
{
defaultMessage:
'Enable domain-wide delegation to automatically sync content from all shared and personal drives in the Google workspace. This eliminates the need to manually share Google Drive data with your service account, though it may increase sync time. If disabled, only items and folders manually shared with the service account will be synced. Please refer to the connector documentation to ensure domain-wide delegation is correctly configured and has the appropriate scopes.',
}
),
type: FieldType.BOOLEAN,
ui_restrictions: [],
validations: [],
value: false,
},
google_workspace_admin_email_for_data_sync: {
default_value: null,
depends_on: [
{
field: 'use_domain_wide_delegation_for_sync',
value: true,
},
],
display: DisplayType.TEXTBOX,
label: i18n.translate(
'searchConnectors.nativeConnectors.gdrive.workspaceAdminEmailDataSync.label',
{
defaultMessage: 'Google Workspace admin email',
}
),
options: [],
order: 3,
required: true,
sensitive: false,
tooltip: i18n.translate(
'searchConnectors.nativeConnectors.gdrive.workspaceAdminEmailDataSync.tooltip',
{
defaultMessage:
'Provide the admin email to be used with domain-wide delegation for data sync. This email enables the connector to utilize the Admin Directory API for listing organization users. Please refer to the connector documentation to ensure domain-wide delegation is correctly configured and has the appropriate scopes.',
}
),
type: FieldType.STRING,
ui_restrictions: [],
validations: [
{
type: 'regex',
constraint: '^\\S+@\\S+\\.\\S+$',
},
],
value: '',
},
google_workspace_email_for_shared_drives_sync: {
default_value: null,
depends_on: [
{
field: 'use_domain_wide_delegation_for_sync',
value: true,
},
],
display: DisplayType.TEXTBOX,
label: i18n.translate(
'searchConnectors.nativeConnectors.gdrive.workspaceEmailSharedDrivesSync.label',
{
defaultMessage: 'Google Workspace email for syncing shared drives',
}
),
options: [],
order: 4,
required: true,
sensitive: false,
tooltip: i18n.translate(
'searchConnectors.nativeConnectors.gdrive.workspaceEmailSharedDrivesSync.tooltip',
{
defaultMessage:
'Provide the Google Workspace user email for discovery and syncing of shared drives. Only the shared drives this user has access to will be synced.',
}
),
type: FieldType.STRING,
ui_restrictions: [],
validations: [
{
type: 'regex',
constraint: '^\\S+@\\S+\\.\\S+$',
},
],
value: '',
},
use_document_level_security: {
default_value: null,
depends_on: [],
display: DisplayType.TOGGLE,
label: ENABLE_DOCUMENT_LEVEL_SECURITY_LABEL,
options: [],
order: 2,
order: 5,
required: true,
sensitive: false,
tooltip: ENABLE_DOCUMENT_LEVEL_SECURITY_TOOLTIP,
Expand All @@ -798,14 +896,18 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record<string, NativeConnector | unde
field: 'use_document_level_security',
value: true,
},
{
field: 'use_domain_wide_delegation_for_sync',
value: false,
},
],
display: DisplayType.TEXTBOX,
label: i18n.translate(
'searchConnectors.nativeConnectors.gdrive.workspaceAdminEmail.label',
{ defaultMessage: 'Google Workspace admin email' }
),
options: [],
order: 3,
order: 6,
required: true,
sensitive: false,
tooltip: i18n.translate(
Expand Down Expand Up @@ -833,7 +935,7 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record<string, NativeConnector | unde
defaultMessage: 'Maximum concurrent HTTP requests',
}),
options: [],
order: 4,
order: 7,
required: false,
sensitive: false,
tooltip: i18n.translate('searchConnectors.nativeConnectors.gdrive.maxHTTPRequest.tooltip', {
Expand All @@ -856,7 +958,7 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record<string, NativeConnector | unde
display: DisplayType.TOGGLE,
label: USE_TEXT_EXTRACTION_SERVICE_LABEL,
options: [],
order: 5,
order: 8,
required: true,
sensitive: false,
tooltip: USE_TEXT_EXTRACTION_SERVICE_TOOLTIP,
Expand Down

0 comments on commit de13e23

Please sign in to comment.